var hne = Object.defineProperty; var pne = (t, e, n) => e in t ? hne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; var we = (t, e, n) => pne(t, typeof e != "symbol" ? e + "" : e, n); import * as J from "react"; import j, { useState as ft, useEffect as kt, forwardRef as mne, useRef as ct, useImperativeHandle as gne, useCallback as $t, useContext as Au, useLayoutEffect as rh, useMemo as Vm, Fragment as vne } from "react"; import xj, { createPortal as _j } from "react-dom"; (function() { try { var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, e = new t.Error().stack; e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "bfe81679-99e3-4b92-baf2-93d0d8b7ea9d", t._sentryDebugIdIdentifier = "sentry-dbid-bfe81679-99e3-4b92-baf2-93d0d8b7ea9d"); } catch { } })(); var on = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Gs(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } function Sk(t) { if (t.__esModule) return t; var e = t.default; if (typeof e == "function") { var n = function i() { return this instanceof i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments); }; n.prototype = e.prototype; } else n = {}; return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(t).forEach(function(i) { var r = Object.getOwnPropertyDescriptor(t, i); Object.defineProperty(n, i, r.get ? r : { enumerable: !0, get: function() { return t[i]; } }); }), n; } var Oj = { exports: {} }, Ck = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var bne = j, yne = Symbol.for("react.element"), wne = Symbol.for("react.fragment"), kne = Object.prototype.hasOwnProperty, xne = bne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ne = { key: !0, ref: !0, __self: !0, __source: !0 }; function Sj(t, e, n) { var i, r = {}, s = null, o = null; n !== void 0 && (s = "" + n), e.key !== void 0 && (s = "" + e.key), e.ref !== void 0 && (o = e.ref); for (i in e) kne.call(e, i) && !_ne.hasOwnProperty(i) && (r[i] = e[i]); if (t && t.defaultProps) for (i in e = t.defaultProps, e) r[i] === void 0 && (r[i] = e[i]); return { $$typeof: yne, type: t, key: s, ref: o, props: r, _owner: xne.current }; } Ck.Fragment = wne; Ck.jsx = Sj; Ck.jsxs = Sj; Oj.exports = Ck; var y = Oj.exports; const Cj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M12 2v20m10-10H2" })), xS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("path", { d: "M8 7h15" }), /* @__PURE__ */ J.createElement("path", { d: "M23 17.5V1H8v18.5", "data-cap": "butt" }), /* @__PURE__ */ J.createElement("circle", { cx: 4.5, cy: 19.5, r: 3.5 }), /* @__PURE__ */ J.createElement("circle", { cx: 19.5, cy: 17.5, r: 3.5 }))), Ej = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 2v10h8a5 5 0 0 0 0-10H3m2 20V12h9c3.314 0 6 2.238 6 5s-2.686 5-6 5H3" })), _S = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m21 22-9-5-9 5V3a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v19Z" })), OS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M22 6H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1ZM7 12h10" })), SS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z" }), /* @__PURE__ */ J.createElement("path", { fill: "currentColor", d: "M12 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6.5v6" })), Tj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M31.976 10.886c-.007-.039-.014-.078-.024-.116l-.022-.066c-.01-.034-.022-.068-.035-.1l-.03-.067c-.015-.031-.03-.062-.048-.092-.012-.022-.026-.042-.039-.063-.018-.029-.037-.057-.058-.084-.015-.02-.03-.04-.047-.059-.022-.026-.045-.05-.068-.075l-.055-.053c-.025-.023-.051-.045-.078-.065-.021-.016-.041-.033-.063-.047-.008-.006-.014-.013-.023-.018L16.762.231c-.461-.308-1.063-.308-1.525 0L.612 9.981l-.022.017c-.022.015-.042.031-.063.047-.027.021-.053.043-.078.065-.019.017-.037.035-.055.054-.024.024-.046.048-.068.074-.017.02-.032.039-.047.06-.02.028-.04.055-.058.084l-.04.064c-.017.03-.032.06-.046.09-.01.022-.022.045-.03.067-.014.033-.026.067-.036.1l-.022.065c-.01.038-.017.076-.024.115-.004.02-.008.04-.01.06-.009.06-.013.119-.013.18v9.751c0 .06.004.121.013.18.003.022.009.039.013.06.007.038.013.077.026.116l.021.067c.011.034.022.069.035.1.009.022.021.043.03.065.014.03.03.06.047.092.012.021.026.043.04.062.018.03.038.056.06.082.014.022.03.04.047.06.022.026.043.051.069.074.017.018.034.04.056.052l.077.066c.021.017.043.03.06.046.009.005.014.013.022.017l14.621 9.755c.231.155.496.233.763.232.267-.002.532-.078.763-.232l14.625-9.75.022-.016c.022-.015.042-.031.063-.047.027-.021.053-.043.078-.066l.055-.053c.024-.024.047-.049.068-.075.017-.02.032-.039.047-.06.02-.026.04-.054.058-.083.014-.02.027-.042.04-.063.017-.03.032-.06.047-.092l.03-.066c.014-.033.025-.067.035-.1.008-.023.016-.045.022-.067.01-.038.017-.077.024-.116.004-.02.009-.039.01-.06.009-.059.013-.118.013-.179v-9.75c0-.06-.005-.12-.012-.18-.004-.02-.01-.038-.014-.06h.002zM16 19.253L11.137 16 16 12.747 20.863 16 16 19.253zm-1.375-8.895l-5.962 3.988-4.812-3.22 10.774-7.182v6.414zM6.19 16l-3.44 2.3V13.7l3.44 2.3zm2.473 1.655l5.962 3.987v6.414L3.85 20.873l4.812-3.219v.001zm8.712 3.986l5.961-3.987 4.813 3.22-10.774 7.181v-6.414zm8.434-5.64l3.44-2.302v4.602L25.81 16zm-2.473-1.655l-5.961-3.987V3.944l10.774 7.183-4.813 3.219z", fill: "#000", fillRule: "nonzero" })), CS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2 12h20" })), ES = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m2 5 10 8 10-8" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 4H3c-.53 0-1.04.199-1.414.553A1.837 1.837 0 0 0 1 5.89v13.22c0 .501.21.982.586 1.336C1.96 20.8 2.47 21 3 21h18c.53 0 1.04-.199 1.414-.553.375-.354.586-.835.586-1.336V5.89c0-.501-.21-.982-.586-1.336A2.061 2.061 0 0 0 21 4Z" })), Ug = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 7 2 2l5 18 3-7 8 8 3-3-8-8z" })), TS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m22 11.4-8.8 8.8c-2.5 2.5-6.7 2.5-9.2 0h0c-2.5-2.5-2.5-6.7 0-9.2l7.8-7.8c1.8-1.8 4.6-1.8 6.4 0h0C20 5 20 7.8 18.2 9.6L11 16.7c-1 1-2.6 1-3.5 0h0c-1-1-1-2.6 0-3.5l6-6" })), $S = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 5H3.2C1.985 5 1 5.806 1 6.8v14.4c0 .994.985 1.8 2.2 1.8h17.6c1.215 0 2.2-.806 2.2-1.8V6.8c0-.994-.985-1.8-2.2-1.8ZM6 1h12" }), /* @__PURE__ */ J.createElement("path", { fill: "currentColor", d: "M15.142 10.264a.75.75 0 0 1 .529.4l4 8A.75.75 0 0 1 19 19.75H6a.75.75 0 0 1-.498-1.31l9-8a.75.75 0 0 1 .64-.176ZM7 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" })), /* @__PURE__ */ J.createElement("defs", null, /* @__PURE__ */ J.createElement("clipPath", { id: "a" }, /* @__PURE__ */ J.createElement("path", { fill: "#fff", d: "M0 0h24v24H0z" })))), $j = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", ...t }, /* @__PURE__ */ J.createElement("g", { strokeLinecap: "round", strokeWidth: 2, fill: "none", stroke: "currentColor", strokeLinejoin: "round", className: "nc-icon-wrapper" }, /* @__PURE__ */ J.createElement("path", { d: "M3 9h42v36H3zm7-6h28" }), /* @__PURE__ */ J.createElement("path", { d: "m10 38 7-10 5 4 8-11 9 17H10z" }), /* @__PURE__ */ J.createElement("circle", { cx: 17, cy: 19, r: 3 }))), Mj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M1.5 2.75h21m-21 18.5h21M16 17V9a2 2 0 0 1 2-2h2m-4 6h3m-7 4V7m-5 6h1v2a2 2 0 0 1-4 0V9a2 2 0 0 1 2-2h2" })), Xb = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M22 7H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1ZM1 21h22M1 3h22" })), Nj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 19.5v-6.25M7 7v6.25m0 0h10M17 7v12.5" })), Aj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 22V12M4 2v10m0 0h16m0-10v20" })), MS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m8 6-6 6 6 6m8-12 6 6-6 6" })), NS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z" }), /* @__PURE__ */ J.createElement("path", { fill: "currentColor", d: "m19.642 16.276-3.85-7a.517.517 0 0 0-.181-.189.585.585 0 0 0-.749.115l-4.533 5.494-2.307-2.516a.548.548 0 0 0-.206-.14.598.598 0 0 0-.499.031.529.529 0 0 0-.183.164l-2.75 4a.468.468 0 0 0-.015.507.526.526 0 0 0 .202.189c.084.045.18.069.28.069H19.15a.594.594 0 0 0 .268-.063.532.532 0 0 0 .2-.174.462.462 0 0 0 .024-.487ZM9.25 9c.911 0 1.65-.672 1.65-1.5S10.161 6 9.25 6c-.91 0-1.65.672-1.65 1.5S8.34 9 9.25 9Z" })), K0 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 12h16m-4-4 4 4-4 4m-8 0-4-4 4-4" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M1 3v18M23 3v18" })), AS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", ...t }, /* @__PURE__ */ J.createElement("g", { strokeLinecap: "round", strokeWidth: 2, fill: "none", stroke: "currentColor", strokeLinejoin: "round", className: "nc-icon-wrapper" }, /* @__PURE__ */ J.createElement("circle", { cx: 18, cy: 16, r: 4 }), /* @__PURE__ */ J.createElement("path", { "data-cap": "butt", d: "M20.849 33.164 33 20l13 13M2 38l12-11 10 9" }), /* @__PURE__ */ J.createElement("path", { d: "M2 6h44v36H2z" }))), J0 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M23 8H1v8h22V8Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M1 21h22M1 3h22" })), e1 = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M23 8H1v8h22V8Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.5, d: "M8 21h8M8 3h8" })), Dj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M22 2h-9.333m-1.334 20H2m4.667 0L17.333 2" })), DS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M13.54 10.46c2.2 2.2 2.2 5.61 0 7.81l-3.08 3.08c-2.2 2.2-5.61 2.2-7.81 0-2.2-2.2-2.2-5.61 0-7.81L5.4 10.9" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.46 13.54c-2.2-2.2-2.2-5.61 0-7.81l3.08-3.08c2.2-2.2 5.61-2.2 7.81 0 2.2 2.2 2.2 5.61 0 7.81L18.6 13.1" })), PS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 25 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 6v12m-3-2 2.813 2.813L23.625 16" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 19V6h-1L8 18.071H7L2 6H1v13" })), One = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M32 16C32 24.8361 24.8361 32 16 32C7.16394 32 0 24.8361 0 16C0 7.16394 7.16394 0 16 0C24.8379 0 32 7.16394 32 16Z", fill: "#2081E2" }), /* @__PURE__ */ J.createElement("path", { d: "M7.89371 16.5376L7.96274 16.4291L12.125 9.91784C12.1858 9.82251 12.3288 9.83236 12.3748 9.93592C13.0702 11.4943 13.6702 13.4324 13.3891 14.639C13.2691 15.1354 12.9403 15.8078 12.5704 16.4291C12.5228 16.5196 12.4702 16.6083 12.4143 16.6938C12.388 16.7333 12.3436 16.7563 12.2959 16.7563H8.01534C7.90027 16.7563 7.83288 16.6313 7.89371 16.5376Z", fill: "white" }), /* @__PURE__ */ J.createElement("path", { d: "M26.4461 17.7475V18.7782C26.4461 18.8374 26.4099 18.89 26.3573 18.913C26.0351 19.0511 24.9321 19.5574 24.4734 20.1952C23.303 21.8242 22.4088 24.1536 20.4098 24.1536H12.0706C9.11495 24.1536 6.71985 21.7503 6.71985 18.7848V18.6894C6.71985 18.6105 6.78394 18.5464 6.86286 18.5464H11.5117C11.6037 18.5464 11.6711 18.6319 11.6629 18.7223C11.63 19.0248 11.6859 19.3338 11.8289 19.6149C12.1051 20.1755 12.6772 20.5256 13.2952 20.5256H15.5966V18.7289H13.3215C13.2048 18.7289 13.1358 18.5941 13.2032 18.4987C13.2278 18.4609 13.2558 18.4215 13.2854 18.3771C13.5007 18.0714 13.8081 17.5963 14.1139 17.0555C14.3227 16.6905 14.5248 16.3009 14.6876 15.9097C14.7205 15.839 14.7468 15.7666 14.7731 15.696C14.8174 15.571 14.8635 15.4543 14.8964 15.3376C14.9293 15.239 14.9555 15.1354 14.9818 15.0384C15.0591 14.7064 15.092 14.3546 15.092 13.9897C15.092 13.8467 15.0854 13.697 15.0723 13.554C15.0657 13.3979 15.046 13.2417 15.0262 13.0855C15.0131 12.9474 14.9884 12.811 14.9621 12.668C14.9293 12.4592 14.8832 12.2521 14.8306 12.0433L14.8125 11.9644C14.7731 11.8214 14.7402 11.685 14.6942 11.542C14.5643 11.0932 14.4147 10.6559 14.2569 10.2466C14.1994 10.0839 14.1336 9.92771 14.0678 9.77155C13.9709 9.53647 13.8722 9.32278 13.7818 9.12057C13.7358 9.02851 13.6964 8.94467 13.6569 8.85919C13.6125 8.7622 13.5665 8.66521 13.5205 8.57318C13.4876 8.50249 13.4498 8.43673 13.4235 8.37097L13.1424 7.85151C13.1029 7.78083 13.1687 7.69699 13.2459 7.71836L15.0049 8.19507H15.0098C15.0131 8.19507 15.0147 8.19673 15.0164 8.19673L15.2481 8.26083L15.503 8.33318L15.5966 8.35945V7.31398C15.5966 6.80931 16.001 6.39999 16.5008 6.39999C16.7506 6.39999 16.9775 6.50191 17.1402 6.66793C17.303 6.83398 17.4049 7.06083 17.4049 7.31398V8.86579L17.5923 8.91836C17.6071 8.92332 17.6219 8.92988 17.635 8.93974C17.6811 8.97427 17.7468 9.02521 17.8306 9.08771C17.8964 9.14028 17.9671 9.20441 18.0526 9.27017C18.2219 9.40659 18.4241 9.58249 18.646 9.7847C18.7052 9.83564 18.7627 9.88825 18.8153 9.94086C19.1014 10.2072 19.4219 10.5195 19.7277 10.8647C19.8131 10.9617 19.897 11.0603 19.9824 11.1639C20.0679 11.2691 20.1583 11.3726 20.2372 11.4762C20.3408 11.6143 20.4526 11.7573 20.5496 11.9069C20.5956 11.9776 20.6482 12.0499 20.6926 12.1206C20.8175 12.3096 20.9277 12.5053 21.0329 12.7009C21.0773 12.7913 21.1233 12.8899 21.1627 12.9869C21.2794 13.2483 21.3715 13.5146 21.4307 13.7809C21.4487 13.8384 21.4619 13.9009 21.4685 13.9568V13.9699C21.4882 14.0488 21.4948 14.1327 21.5014 14.2181C21.5277 14.491 21.5145 14.7639 21.4553 15.0384C21.4307 15.1552 21.3978 15.2653 21.3583 15.382C21.3189 15.4938 21.2794 15.6105 21.2285 15.7206C21.1299 15.9491 21.0131 16.1776 20.875 16.3913C20.8307 16.4702 20.7781 16.5541 20.7254 16.633C20.6679 16.7168 20.6087 16.7957 20.5561 16.873C20.4838 16.9716 20.4066 17.0752 20.3277 17.1672C20.257 17.2642 20.1846 17.3612 20.1057 17.4467C19.9956 17.5765 19.8904 17.6998 19.7802 17.8182C19.7145 17.8954 19.6438 17.9744 19.5715 18.045C19.5008 18.1239 19.4285 18.1946 19.3627 18.2604C19.2526 18.3705 19.1605 18.456 19.0832 18.5267L18.9024 18.6927C18.8761 18.7157 18.8416 18.7289 18.8054 18.7289H17.4049V20.5256H19.1671C19.5616 20.5256 19.9364 20.3859 20.2389 20.1294C20.3424 20.039 20.7945 19.6478 21.3287 19.0577C21.3468 19.0379 21.3699 19.0231 21.3962 19.0166L26.2636 17.6094C26.354 17.5831 26.4461 17.6522 26.4461 17.7475Z", fill: "white" })), IS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("circle", { cx: 12, cy: 13, r: 2 }), /* @__PURE__ */ J.createElement("circle", { cx: 3, cy: 13, r: 2 }), /* @__PURE__ */ J.createElement("circle", { cx: 21, cy: 13, r: 2 }))), Ek = (t) => /* @__PURE__ */ J.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M12 1.5v21M1.5 12h21", strokeLinecap: "round", strokeLinejoin: "round" }))), LS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2 }, /* @__PURE__ */ J.createElement("path", { d: "M1.373 13.183a2.064 2.064 0 0 1 0-2.366C2.946 8.59 6.819 4 12 4s9.054 4.59 10.627 6.817a2.064 2.064 0 0 1 0 2.366C21.054 15.41 17.181 20 12 20s-9.054-4.59-10.627-6.817Z" }), /* @__PURE__ */ J.createElement("circle", { cx: 12, cy: 12, r: 4 }))), RS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "m12 2.489 3.09 6.262L22 9.755l-5 4.874 1.18 6.882-6.18-3.25-6.18 3.25L7 14.629 2 9.755l6.91-1.004L12 2.489z" })), Pj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M1 12h8v10H1V12Zm0 0C1 5 2.75 3.344 6 2m8 10h8v10h-8V12Zm0 0c0-7 1.75-8.656 5-10" })), Ij = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 22H10a5 5 0 0 1-5-5v-7" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "m1 14 4-4 4 4m1.5-12H14a5 5 0 0 1 5 5v7" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "m23 10-4 4-4-4" })), Lj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M22 13.667V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h9.667M22 13.667 13.667 22M22 13.667h-6.333a2 2 0 0 0-2 2V22" })), Gb = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M22 13.667V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h9.667M22 13.667 13.667 22M22 13.667h-6.333a2 2 0 0 0-2 2V22" })), Rj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M15.924 9.922c-.236 0-.43.194-.434.433l-.177 8.866.178 3.218c.003.235.197.43.433.43s.43-.195.433-.433v.004l.193-3.219-.193-8.867c-.003-.238-.197-.432-.433-.432zm12.14 5.102c-.54 0-1.054.11-1.522.306C26.228 11.783 23.254 9 19.625 9c-.887 0-1.753.175-2.517.47-.298.115-.377.234-.38.463v12.492c.004.242.19.442.426.466l10.91.006c2.174 0 3.936-1.762 3.936-3.936s-1.762-3.937-3.936-3.937zM10.886 22.56v-.002l.226-3.338-.226-7.276c-.006-.181-.148-.323-.325-.323-.176 0-.319.142-.324.323l-.202 7.276.202 3.34c.005.178.148.32.324.32.177 0 .318-.142.325-.321v.001zm-2.952.32c.144 0 .262-.117.27-.267l.264-3.394-.265-6.497c-.007-.15-.125-.267-.27-.267-.144 0-.263.117-.269.267l-.234 6.497.234 3.395c.006.149.125.266.27.266zm5.297-10.868c-.209 0-.375.166-.38.377l-.169 6.832.17 3.287c.004.21.17.375.379.375.207 0 .373-.166.378-.377v.002l.19-3.287-.19-6.832c-.005-.211-.17-.377-.378-.377zM2.802 22.657c.083 0 .15-.066.16-.156l.34-3.286-.34-3.41c-.01-.091-.077-.157-.16-.157-.084 0-.152.066-.16.157l-.299 3.41.299 3.285c.008.091.076.157.16.157zm2.546.188c.113 0 .206-.092.214-.212l.302-3.418-.302-3.25c-.008-.12-.1-.211-.214-.211-.116 0-.208.09-.216.212l-.266 3.25.266 3.417c.008.12.1.212.216.212zm6.543.03c.191 0 .346-.154.351-.35v.003l.209-3.309-.209-7.09c-.005-.196-.16-.35-.351-.35-.193 0-.348.154-.352.35l-.185 7.09.185 3.308c.004.194.159.348.352.348zm2.69.013c.22 0 .401-.181.405-.404v.002-.002l.172-3.263-.172-8.13c-.004-.223-.186-.405-.406-.405-.22 0-.403.182-.406.405l-.153 8.127.153 3.268c.003.22.186.402.406.402zm-5.338-.016c.16 0 .29-.129.296-.294l.246-3.36-.246-7.039c-.006-.165-.137-.294-.296-.294-.162 0-.292.13-.297.295l-.218 7.038.218 3.361c.005.164.135.293.297.293zM4.07 15.527c-.1 0-.18.08-.188.185L3.6 19.215l.282 3.39c.008.104.089.184.188.184.098 0 .178-.08.187-.184l.32-3.39-.32-3.504c-.009-.104-.09-.184-.187-.184zm2.565-1.837c-.129 0-.235.105-.242.24l-.25 5.287.25 3.417c.007.133.113.239.242.239s.235-.106.243-.24v.001l.283-3.417-.283-5.288c-.008-.134-.114-.24-.243-.24zm-4.957 2.65c-.01-.076-.066-.129-.133-.129-.068 0-.124.055-.133.13l-.315 2.873.315 2.81c.01.076.065.13.133.13.067 0 .122-.053.133-.129l.358-2.81-.358-2.874zm-1.316.972c-.067 0-.12.052-.128.125L0 19.214l.234 1.747c.009.074.061.125.128.125.065 0 .117-.05.128-.124l.277-1.748-.277-1.778c-.01-.073-.063-.124-.128-.124z", fill: "#EE7C25", fillRule: "evenodd" })), jj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M16 .053C7.19.053.047 7.194.047 16.003c0 8.81 7.142 15.951 15.951 15.951 8.81 0 15.951-7.14 15.951-15.95C31.95 7.194 24.81.054 16 .054V.053zm7.314 23.005c-.285.469-.899.618-1.367.33-3.745-2.288-8.46-2.806-14.013-1.537-.535.122-1.068-.213-1.19-.749-.122-.535.212-1.068.748-1.19 6.076-1.389 11.288-.79 15.493 1.779.468.287.617.899.33 1.367zm1.953-4.343c-.36.585-1.126.77-1.71.41-4.288-2.636-10.824-3.4-15.896-1.86-.657.199-1.352-.172-1.552-.828-.198-.658.173-1.351.83-1.551 5.793-1.758 12.994-.907 17.918 2.12.585.36.77 1.125.41 1.709zm.167-4.523c-5.14-3.054-13.623-3.334-18.531-1.845-.788.24-1.622-.205-1.86-.994-.24-.788.205-1.621.994-1.86 5.634-1.711 15.001-1.38 20.92 2.133.71.42.943 1.336.522 2.044-.42.71-1.337.943-2.044.522z", fill: "#1ED760", fillRule: "nonzero" })), jS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.8 2H3.2C1.985 2 1 2.895 1 4v16c0 1.105.985 2 2.2 2h17.6c1.215 0 2.2-.895 2.2-2V4c0-1.105-.985-2-2.2-2Z" }), /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16.5 11 12 15l-4.5-4" })), Sne = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M10.063 29.002c12.076 0 18.68-10.005 18.68-18.68 0-.285 0-.567-.019-.85C30.01 8.545 31.12 7.393 32 6.076c-1.198.53-2.47.879-3.77 1.032 1.37-.82 2.395-2.11 2.886-3.63-1.29.764-2.7 1.303-4.17 1.593-2.035-2.164-5.268-2.694-7.887-1.292-2.62 1.401-3.973 4.386-3.3 7.28-5.28-.265-10.198-2.758-13.532-6.86-1.742 3-.852 6.838 2.033 8.764-1.045-.03-2.067-.313-2.98-.822v.084c0 3.125 2.204 5.817 5.267 6.435-.966.264-1.98.303-2.964.113.86 2.675 3.325 4.507 6.133 4.56-2.324 1.827-5.196 2.818-8.153 2.815-.522 0-1.044-.032-1.563-.094 3.002 1.927 6.496 2.949 10.063 2.944", fill: "#1DA1F2", fillRule: "nonzero" })), Fj = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 122.43 122.41", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M83.86 54.15v34.13H38.57V54.15H0v68.26h122.43V54.15H83.86zM38.57 0h45.3v34.13h-45.3z" })), FS = (t) => /* @__PURE__ */ J.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ J.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6.555 20.963A1 1 0 0 1 5 20.131V3.87a1 1 0 0 1 1.555-.833l12.197 8.132a1 1 0 0 1 0 1.664l-12.197 8.13Z" })), Bj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M31.886 25.508c0 3.522-2.855 6.377-6.377 6.377H6.377C2.857 31.885 0 29.03 0 25.508V6.378C0 2.854 2.857 0 6.377 0H25.51c3.522 0 6.377 2.855 6.377 6.377v19.131", fill: "#0FB7FF" }), /* @__PURE__ */ J.createElement("path", { d: "M25.998 10.58c.175-.982.17-1.992-.436-2.755-.846-1.07-2.646-1.11-3.88-.921-1.003.153-4.397 1.651-5.552 5.236 2.046-.156 3.118.148 2.921 2.4-.082.943-.558 1.976-1.09 2.966-.614 1.141-1.765 3.382-3.274 1.767-1.36-1.454-1.257-4.235-1.568-6.086-.173-1.04-.356-2.334-.697-3.402-.293-.92-.966-2.027-1.788-2.267-.884-.26-1.976.146-2.618.523-2.042 1.2-3.598 2.908-5.365 4.317v.132c.35.335.444.884.96.959 1.216.179 2.375-1.134 3.184.232.492.834.645 1.749.96 2.648.42 1.198.746 2.503 1.09 3.88.583 2.334 1.299 5.82 3.316 6.675 1.029.437 2.575-.148 3.358-.612 2.122-1.255 3.775-3.075 5.19-4.927 3.234-4.382 5.019-9.347 5.289-10.765", fill: "#FFFFFE" }))), zj = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M31.252 8.488c-.366-1.37-1.448-2.452-2.824-2.823C25.941 5 15.958 5 15.958 5s-9.977 0-12.47.665c-1.37.366-2.452 1.447-2.823 2.823C0 10.976 0 16.17 0 16.17s0 5.194.665 7.682c.366 1.372 1.447 2.453 2.823 2.823 2.493.666 12.47.666 12.47.666s9.983 0 12.47-.666c1.372-.365 2.453-1.447 2.824-2.823.665-2.488.665-7.682.665-7.682s0-5.194-.665-7.682", fill: "#D9252A" }), /* @__PURE__ */ J.createElement("path", { fill: "#FFFFFE", d: "M12.77 20.958l8.291-4.788-8.291-4.788v9.576" }))), FUe = () => { return /* @__PURE__ */ y.jsxs("div", { className: "koenig-lexical", children: [ /* @__PURE__ */ y.jsx(t, { label: "Text toolbar" }), /* @__PURE__ */ y.jsx(e, {}), /* @__PURE__ */ y.jsx(t, { label: "Image toolbar" }), /* @__PURE__ */ y.jsx(n, {}), /* @__PURE__ */ y.jsx(t, { label: "Gallery toolbar" }), /* @__PURE__ */ y.jsx(i, {}), /* @__PURE__ */ y.jsx(t, { label: "Plus menu" }), /* @__PURE__ */ y.jsx(o, {}), /* @__PURE__ */ y.jsx(t, { label: "Card menu" }), /* @__PURE__ */ y.jsx(a, {}), /* @__PURE__ */ y.jsx(t, { label: "Divider card" }), /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[740px]", children: /* @__PURE__ */ y.jsx(d, {}) }), /* @__PURE__ */ y.jsx(t, { label: "Code block" }), /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[740px]", children: /* @__PURE__ */ y.jsx(h, {}) }), /* @__PURE__ */ y.jsx(t, { label: "Image card" }), /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[740px]", children: /* @__PURE__ */ y.jsx(m, {}) }), /* @__PURE__ */ y.jsx(t, { label: "Gallery card" }), /* @__PURE__ */ y.jsx("div", { className: "relative max-w-[1172px]", children: /* @__PURE__ */ y.jsx(x, {}) }) ] }); function t({ label: _ }) { return /* @__PURE__ */ y.jsx("h3", { className: "mb-4 mt-20 text-xl font-bold first-of-type:mt-8", children: _ }); } function e() { return /* @__PURE__ */ y.jsx("div", { className: "max-w-fit", children: /* @__PURE__ */ y.jsxs("ul", { className: "m-0 flex items-center justify-evenly rounded bg-black px-1 py-0 font-sans text-md font-normal text-white", children: [ /* @__PURE__ */ y.jsx(r, { Icon: Ej, label: "Format text as bold" }), /* @__PURE__ */ y.jsx(r, { Icon: Dj, label: "Format text as italics" }), /* @__PURE__ */ y.jsx(r, { Icon: Aj, label: "Toggle heading 1" }), /* @__PURE__ */ y.jsx(r, { Icon: Nj, label: "Toggle heading 2" }), /* @__PURE__ */ y.jsx(s, {}), /* @__PURE__ */ y.jsx(r, { Icon: Pj, label: "Toggle blockquote" }), /* @__PURE__ */ y.jsx(r, { Icon: DS, label: "Insert link" }), /* @__PURE__ */ y.jsx(s, {}), /* @__PURE__ */ y.jsx(r, { Icon: Gb, label: "Save as snippet" }) ] }) }); } function n() { return /* @__PURE__ */ y.jsx("div", { className: "max-w-fit", children: /* @__PURE__ */ y.jsxs("ul", { className: "m-0 flex items-center justify-evenly rounded bg-black px-1 py-0 font-sans text-md font-normal text-white", children: [ /* @__PURE__ */ y.jsx(r, { Icon: J0, label: "Set image to regular" }), /* @__PURE__ */ y.jsx(r, { Icon: e1, label: "Set image to wide" }), /* @__PURE__ */ y.jsx(r, { Icon: K0, label: "Set image to full" }), /* @__PURE__ */ y.jsx(s, {}), /* @__PURE__ */ y.jsx(r, { Icon: DS, label: "Insert link" }), /* @__PURE__ */ y.jsx(r, { Icon: Ij, label: "Replace image" }), /* @__PURE__ */ y.jsx(s, {}), /* @__PURE__ */ y.jsx(r, { Icon: Gb, label: "Save as snippet" }) ] }) }); } function i() { return /* @__PURE__ */ y.jsx("div", { className: "max-w-fit", children: /* @__PURE__ */ y.jsxs("ul", { className: "m-0 flex items-center justify-evenly rounded bg-black px-1 py-0 font-sans text-md font-normal text-white", children: [ /* @__PURE__ */ y.jsx(r, { Icon: Cj, label: "Add image" }), /* @__PURE__ */ y.jsx(s, {}), /* @__PURE__ */ y.jsx(r, { Icon: Gb, label: "Save as snippet" }) ] }) }); } function r({ label: _, Icon: S, ...C }) { return /* @__PURE__ */ y.jsx("li", { className: "m-0 flex p-0 first:m-0", ...C, children: /* @__PURE__ */ y.jsx( "div", { className: "flex size-9 items-center justify-center", type: "button", children: /* @__PURE__ */ y.jsx(S, { className: "fill-white" }) } ) }); } function s() { return /* @__PURE__ */ y.jsx("li", { className: "m-0 mx-1 h-5 w-px bg-grey-900" }); } function o() { return /* @__PURE__ */ y.jsx( "button", { "aria-label": "Add a card", className: "group relative flex size-7 cursor-pointer items-center justify-center rounded-full border border-grey bg-white transition-all ease-linear hover:border-grey-900 md:size-9", type: "button", children: /* @__PURE__ */ y.jsx(Ek, { className: "size-4 stroke-grey-800 stroke-2 group-hover:stroke-grey-900" }) } ); } function a() { return /* @__PURE__ */ y.jsxs("div", { className: "z-[9999999] m-0 mb-3 max-h-[376px] w-[312px] flex-col overflow-y-auto rounded-lg bg-white bg-clip-padding p-0 text-sm shadow", children: [ /* @__PURE__ */ y.jsx(l, { label: "Primary" }), /* @__PURE__ */ y.jsx(u, { desc: "Upload, or embed with /image [url]", Icon: NS, label: "Image" }), /* @__PURE__ */ y.jsx(u, { desc: "Insert a Markdown editor card", Icon: PS, label: "Markdown" }), /* @__PURE__ */ y.jsx(u, { desc: "Insert a raw HTML card", Icon: MS, label: "HTML" }), /* @__PURE__ */ y.jsx(u, { desc: "Create an image gallery", Icon: $S, label: "Gallery" }), /* @__PURE__ */ y.jsx(u, { desc: "Insert a dividing line", Icon: CS, label: "Divider" }), /* @__PURE__ */ y.jsx(u, { desc: "Embed a link as a visual bookmark", Icon: _S, label: "Bookmark" }), /* @__PURE__ */ y.jsx(u, { desc: "Only visible when delivered by email", Icon: ES, label: "Email content" }), /* @__PURE__ */ y.jsx(u, { desc: "Target free or paid members with a CTA", Icon: Ug, label: "Email call to action" }), /* @__PURE__ */ y.jsx(u, { desc: "Attract signups with a public intro", Icon: LS, label: "Public preview" }), /* @__PURE__ */ y.jsx(u, { desc: "Add a button to your post", Icon: OS, label: "Button" }), /* @__PURE__ */ y.jsx(u, { desc: "Info boxes that stand out", Icon: SS, label: "Callout" }), /* @__PURE__ */ y.jsx(u, { desc: "Search and embed gifs", Icon: Mj, label: "GIF" }), /* @__PURE__ */ y.jsx(u, { desc: "Add collapsible content", Icon: jS, label: "Toggle" }), /* @__PURE__ */ y.jsx(u, { desc: "Upload and play a video", Icon: FS, label: "Video" }), /* @__PURE__ */ y.jsx(u, { desc: "Upload and play an audio file", Icon: xS, label: "Audio" }), /* @__PURE__ */ y.jsx(u, { desc: "Upload a downloadable file", Icon: TS, label: "File" }), /* @__PURE__ */ y.jsx(u, { desc: "Add a product recommendation", Icon: RS, label: "Product" }), /* @__PURE__ */ y.jsx(u, { desc: "Add a bold section header", Icon: Xb, label: "Header" }), /* @__PURE__ */ y.jsx(l, { label: "Embed" }), /* @__PURE__ */ y.jsx(u, { desc: "/youtube [video url]", Icon: zj, label: "YouTube" }), /* @__PURE__ */ y.jsx(u, { desc: "/twitter [tweet url]", Icon: Sne, label: "Twitter" }), /* @__PURE__ */ y.jsx(u, { desc: "/unsplash [search-term or url]", Icon: Fj, label: "Unsplash" }), /* @__PURE__ */ y.jsx(u, { desc: "/vimeo [video url]", Icon: Bj, label: "Vimeo" }), /* @__PURE__ */ y.jsx(u, { desc: "/codepen [pen url]", Icon: Tj, label: "CodePen" }), /* @__PURE__ */ y.jsx(u, { desc: "/spotify [track or playlist url]", Icon: jj, label: "Spotify" }), /* @__PURE__ */ y.jsx(u, { desc: "/soundcloud [track or playlist url]", Icon: Rj, label: "SoundCloud" }), /* @__PURE__ */ y.jsx(u, { desc: "/nft [opensea url]", Icon: One, label: "NFT" }), /* @__PURE__ */ y.jsx(u, { desc: "/embed [url]", Icon: IS, label: "Other..." }), /* @__PURE__ */ y.jsx(l, { label: "Snippets" }), /* @__PURE__ */ y.jsx(f, { Icon: Lj, label: "A random snippet" }) ] }); } function l({ label: _, ...S }) { return /* @__PURE__ */ y.jsx("div", { className: "mb-2 flex shrink-0 flex-col justify-center px-4 pt-3 text-2xs font-medium uppercase tracking-[.06rem] text-grey", style: { minWidth: "calc(100% - 3.2rem)" }, ...S, children: _ }); } function u({ label: _, desc: S, Icon: C, ...E }) { return /* @__PURE__ */ y.jsxs("div", { className: "flex cursor-pointer flex-row items-center border border-transparent px-4 py-2 text-grey-800 hover:bg-grey-100", ...E, children: [ /* @__PURE__ */ y.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ y.jsx(C, { className: "size-7" }) }), /* @__PURE__ */ y.jsxs("div", { className: "flex flex-col", children: [ /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-[1.3rem] font-normal leading-[1.333em] tracking-[.02rem] text-grey-900", children: _ }), /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-2xs font-normal leading-[1.333em] tracking-[.02rem] text-grey", children: S }) ] }) ] }); } function f({ label: _, Icon: S, ...C }) { return /* @__PURE__ */ y.jsxs("div", { className: "flex cursor-pointer flex-row items-center border border-transparent px-4 py-2 text-grey-800 hover:bg-grey-100", ...C, children: [ /* @__PURE__ */ y.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ y.jsx(S, { className: "size-7" }) }), /* @__PURE__ */ y.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ y.jsx("div", { className: "m-0 ml-4 truncate text-[1.3rem] font-normal leading-[1.333em] tracking-[.02rem] text-grey-900", children: _ }) }) ] }); } function d() { return /* @__PURE__ */ y.jsx("div", { children: /* @__PURE__ */ y.jsx("hr", { className: "block h-[1px] border-0 border-t border-grey-300" }) }); } function h() { return /* @__PURE__ */ y.jsxs("div", { className: "border-2 border-green", children: [ /* @__PURE__ */ y.jsx("div", { className: "rounded bg-grey-50 px-3 py-2", children: /* @__PURE__ */ y.jsx("textarea", { className: "w-full resize-none bg-grey-50 font-mono text-[1.7rem]" }) }), /* @__PURE__ */ y.jsx(w, { placeholder: "Type caption for code block (optional)" }) ] }); } function m() { const [_, S] = ft(!1), [C, E] = ft(!1), M = () => { S(!_); }, $ = (P) => { P.stopPropagation(), E(!C); }; return _ ? /* @__PURE__ */ y.jsxs( "div", { className: `border border-transparent ${_ ? "shadow-[0_0_0_2px_#30cf43]" : "hover:shadow-[0_0_0_1px_#30cf43]"}`, onClick: M, children: [ /* @__PURE__ */ y.jsx(g, { desc: "Click to select an image", Icon: AS }), /* @__PURE__ */ y.jsx(w, { placeholder: "Type caption for image (optional)" }), /* @__PURE__ */ y.jsx( "button", { className: `absolute bottom-0 right-0 m-3 cursor-pointer rounded border px-1 text-[1.3rem] font-normal leading-7 tracking-wide transition-all duration-100 ${C ? "border-green bg-green text-white" : "border-grey text-grey"} `, type: "button", onClick: (P) => $(P), children: "Alt" } ) ] } ) : /* @__PURE__ */ y.jsx( "div", { className: `border border-transparent ${_ ? "shadow-[0_0_0_2px_#30cf43]" : "hover:shadow-[0_0_0_1px_#30cf43]"}`, onClick: M, children: /* @__PURE__ */ y.jsx(g, { desc: "Click to select an image", Icon: AS }) } ); } function g({ desc: _, Icon: S, ...C }) { return /* @__PURE__ */ y.jsxs("div", { className: "relative", children: [ /* @__PURE__ */ y.jsx("figure", { className: "cursor-pointer border border-transparent", ...C, children: /* @__PURE__ */ y.jsx("div", { className: "h-100 relative flex items-center justify-center border border-grey-100 bg-grey-50 before:pb-[62.5%]", children: /* @__PURE__ */ y.jsxs("button", { className: "group flex flex-col items-center justify-center p-20", type: "button", children: [ /* @__PURE__ */ y.jsx(S, { className: "size-32 opacity-80 transition-all ease-linear group-hover:scale-105 group-hover:opacity-100" }), /* @__PURE__ */ y.jsx("p", { className: "mt-4 text-sm font-normal text-grey-700 group-hover:text-grey-800", children: _ }) ] }) }) }), /* @__PURE__ */ y.jsx("form", { children: /* @__PURE__ */ y.jsx( "input", { accept: "image/*", hidden: !0, name: "image", type: "file" } ) }) ] }); } function w({ placeholder: _ }) { return /* @__PURE__ */ y.jsx( "input", { className: "not-kg-prose w-full p-2 text-center font-sans text-sm font-normal tracking-wide text-grey-900", placeholder: _ } ); } function x() { return /* @__PURE__ */ y.jsxs("div", { className: "border-2 border-green", children: [ /* @__PURE__ */ y.jsx(g, { desc: "Click to select up to 9 images", Icon: $j }), /* @__PURE__ */ y.jsx(w, { placeholder: "Type caption for gallery (optional)" }) ] }); } }, gn = j.createContext({}), dt = j.createContext({}); var me = {}; let Tk = {}, Wj = {}, sh = {}, yg = {}, BS = {}, oh = {}, Y6 = {}, zS = {}, Zg = {}, qg = {}, ku = {}, V6 = {}, X6 = {}, Hj = {}, Qj = {}, Uj = {}, Zj = {}, qj = {}, Yj = {}, Vj = {}, Wy = {}, Xj = {}, Gj = {}, Kj = {}, Jj = {}, eF = {}, tF = {}, nF = {}, iF = {}, rF = {}, G6 = {}, K6 = {}, WS = {}, sF = {}, oF = {}, aF = {}; function Le(t) { let e = new URLSearchParams(); e.append("code", t); for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]); throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`); } let Ia = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Cne = Ia && "documentMode" in document ? document.documentMode : null, wr = Ia && /Mac|iPod|iPhone|iPad/.test(navigator.platform), zu = Ia && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Hy = Ia && "InputEvent" in window && !Cne ? "getTargetRanges" in new window.InputEvent("input") : !1, J6 = Ia && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), $k = Ia && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ene = Ia && /Android/.test(navigator.userAgent), Tne = Ia && /^(?=.*Chrome).*/i.test(navigator.userAgent), e5 = Ia && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Tne, Mk = J6 || $k || e5 ? " " : "​", $ne = zu ? " " : Mk, Mne = /^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/, Nne = /^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/, Oh = { bold: 1, code: 16, highlight: 128, italic: 2, strikethrough: 4, subscript: 32, superscript: 64, underline: 8 }, Ane = { directionless: 1, unmergeable: 2 }, W$ = { center: 2, end: 6, justify: 4, left: 1, right: 3, start: 5 }, Dne = { 2: "center", 6: "end", 4: "justify", 1: "left", 3: "right", 5: "start" }, Pne = { normal: 0, segmented: 2, token: 1 }, Ine = { 0: "normal", 2: "segmented", 1: "token" }, HS = !1, t5 = 0; function Lne(t) { t5 = t.timeStamp; } function n3(t, e, n) { return e.__lexicalLineBreak === t || t[`__lexicalKey_${n._key}`] !== void 0; } function Rne(t) { return t.getEditorState().read(() => { let e = pn(); return e !== null ? e.clone() : null; }); } function lF(t, e, n) { HS = !0; let i = 100 < performance.now() - t5; try { qs(t, () => { let r = pn() || Rne(t); var s = /* @__PURE__ */ new Map(), o = t.getRootElement(), a = t._editorState, l = t._blockCursorElement; let u = !1, f = ""; for (var d = 0; d < e.length; d++) { var h = e[d], m = h.type, g = h.target, w = n1(g, a); if (!(w === null && g !== o || ii(w))) { if (m === "characterData") { if (h = i && Ze(w)) e: { h = r, m = g; var x = w; if (xt(h)) { var _ = h.anchor.getNode(); if (_.is(x) && h.format !== _.getFormat()) { h = !1; break e; } } h = m.nodeType === 3 && x.isAttached(); } h && (x = La(t._window), m = h = null, x !== null && x.anchorNode === g && (h = x.anchorOffset, m = x.focusOffset), g = g.nodeValue, g !== null && o5(w, g, h, m, !1)); } else if (m === "childList") { for (u = !0, m = h.addedNodes, x = 0; x < m.length; x++) { _ = m[x]; var S = pF(_), C = _.parentNode; C == null || _ === l || S !== null || _.nodeName === "BR" && n3(_, C, t) || (zu && (S = _.innerText || _.nodeValue) && (f += S), C.removeChild(_)); } if (h = h.removedNodes, m = h.length, 0 < m) { for (x = 0, _ = 0; _ < m; _++) C = h[_], (C.nodeName === "BR" && n3(C, g, t) || l === C) && (g.appendChild(C), x++); m !== x && (g === o && (w = a._nodeMap.get("root")), s.set(g, w)); } } } } if (0 < s.size) for (let [ E, M ] of s) if (xe(M)) for (s = M.getChildrenKeys(), o = E.firstChild, a = 0; a < s.length; a++) l = t.getElementByKey(s[a]), l !== null && (o == null ? (E.appendChild(l), o = l) : o !== l && E.replaceChild(l, o), o = o.nextSibling); else Ze(M) && M.markDirty(); if (s = n.takeRecords(), 0 < s.length) { for (o = 0; o < s.length; o++) for (l = s[o], a = l.addedNodes, l = l.target, d = 0; d < a.length; d++) w = a[d], g = w.parentNode, g == null || w.nodeName !== "BR" || n3(w, l, t) || g.removeChild(w); n.takeRecords(); } r !== null && (u && (r.dirty = !0, $a(r)), zu && bF(t) && r.insertRawText(f)); }); } finally { HS = !1; } } function uF(t) { let e = t._observer; if (e !== null) { let n = e.takeRecords(); lF(t, n, e); } } function cF(t) { t5 === 0 && Ak(t).addEventListener("textInput", Lne, !0), t._observer = new MutationObserver((e, n) => { lF(t, e, n); }); } function H$(t, e) { let n = t.__mode, i = t.__format; t = t.__style; let r = e.__mode, s = e.__format; return e = e.__style, (n === null || n === r) && (i === null || i === s) && (t === null || t === e); } function Q$(t, e) { let n = t.mergeWithSibling(e), i = Ln()._normalizedNodes; return i.add(t.__key), i.add(e.__key), n; } function fF(t) { if (t.__text === "" && t.isSimpleText() && !t.isUnmergeable()) t.remove(); else { for (var e; (e = t.getPreviousSibling()) !== null && Ze(e) && e.isSimpleText() && !e.isUnmergeable(); ) if (e.__text === "") e.remove(); else { H$(e, t) && (t = Q$(e, t)); break; } for (var n; (n = t.getNextSibling()) !== null && Ze(n) && n.isSimpleText() && !n.isUnmergeable(); ) if (n.__text === "") n.remove(); else { H$(t, n) && Q$(t, n); break; } } } function dF(t) { return U$(t.anchor), U$(t.focus), t; } function U$(t) { for (; t.type === "element"; ) { var e = t.getNode(), n = t.offset; if (n === e.getChildrenSize() ? (e = e.getChildAtIndex(n - 1), n = !0) : (e = e.getChildAtIndex(n), n = !1), Ze(e)) { t.set(e.__key, n ? e.getTextContentSize() : 0, "text"); break; } else if (!xe(e)) break; t.set(e.__key, n ? e.getChildrenSize() : 0, "element"); } } let jne = 1, Fne = typeof queueMicrotask == "function" ? queueMicrotask : (t) => { Promise.resolve().then(t); }; function n5(t) { let e = document.activeElement; if (e === null) return !1; let n = e.nodeName; return ii(n1(t)) && (n === "INPUT" || n === "TEXTAREA" || e.contentEditable === "true" && e.__lexicalEditor == null); } function t1(t, e, n) { let i = t.getRootElement(); try { return i !== null && i.contains(e) && i.contains(n) && e !== null && !n5(e) && i5(e) === t; } catch { return !1; } } function i5(t) { for (; t != null; ) { let e = t.__lexicalEditor; if (e != null) return e; t = Nk(t); } return null; } function QS(t) { return t.isToken() || t.isSegmented(); } function Qy(t) { for (; t != null; ) { if (t.nodeType === 3) return t; t = t.firstChild; } return null; } function US(t, e, n) { let i = Oh[e]; return n !== null && (t & i) === (n & i) || (t ^= i, e === "subscript" ? t &= -65 : e === "superscript" && (t &= -33)), t; } function hF(t, e) { if (e != null) t.__key = e; else { qr(), 99 < Gg && Le(14), e = Ln(); var n = Ra(), i = "" + jne++; n._nodeMap.set(i, t), xe(t) ? e._dirtyElements.set(i, !0) : e._dirtyLeaves.add(i), e._cloneNotNeeded.add(i), e._dirtyType = 1, t.__key = i; } } function of(t) { var e = t.getParent(); if (e !== null) { let r = t.getWritable(); e = e.getWritable(); var n = t.getPreviousSibling(); if (t = t.getNextSibling(), n === null) if (t !== null) { var i = t.getWritable(); e.__first = t.__key, i.__prev = null; } else e.__first = null; else { if (i = n.getWritable(), t !== null) { let s = t.getWritable(); s.__prev = i.__key, i.__next = s.__key; } else i.__next = null; r.__prev = null; } t === null ? n !== null ? (t = n.getWritable(), e.__last = n.__key, t.__next = null) : e.__last = null : (t = t.getWritable(), n !== null ? (n = n.getWritable(), n.__next = t.__key, t.__prev = n.__key) : t.__prev = null, r.__next = null), e.__size--, r.__parent = null; } } function Uy(t) { 99 < Gg && Le(14); var e = t.getLatest(), n = e.__parent, i = Ra(); let r = Ln(), s = i._nodeMap; if (i = r._dirtyElements, n !== null) e: for (; n !== null; ) { if (i.has(n)) break e; let o = s.get(n); if (o === void 0) break; i.set(n, !1), n = o.__parent; } e = e.__key, r._dirtyType = 1, xe(t) ? i.set(e, !0) : r._dirtyLeaves.add(e); } function Pi(t) { qr(); var e = Ln(); let n = e._compositionKey; t !== n && (e._compositionKey = t, n !== null && (e = Tr(n), e !== null && e.getWritable()), t !== null && (t = Tr(t), t !== null && t.getWritable())); } function xu() { return Vh() ? null : Ln()._compositionKey; } function Tr(t, e) { return t = (e || Ra())._nodeMap.get(t), t === void 0 ? null : t; } function pF(t, e) { let n = Ln(); return t = t[`__lexicalKey_${n._key}`], t !== void 0 ? Tr(t, e) : null; } function n1(t, e) { for (; t != null; ) { let n = pF(t, e); if (n !== null) return n; t = Nk(t); } return null; } function mF(t) { let e = Object.assign({}, t._decorators); return t._pendingDecorators = e; } function Z$(t) { return t.read(() => Zs().getTextContent()); } function Bne(t, e) { qs(t, () => { var n = Ra(); if (!n.isEmpty()) if (e === "root") Zs().markDirty(); else { n = n._nodeMap; for (let [, i] of n) i.markDirty(); } }, t._pendingEditorState === null ? { tag: "history-merge" } : void 0); } function Zs() { return Ra()._nodeMap.get("root"); } function $a(t) { qr(); let e = Ra(); t !== null && (t.dirty = !0, t.setCachedNodes(null)), e._selection = t; } function Xd(t) { var e = Ln(), n; e: { for (n = t; n != null; ) { let i = n[`__lexicalKey_${e._key}`]; if (i !== void 0) { n = i; break e; } n = Nk(n); } n = null; } return n === null ? (e = e.getRootElement(), t === e ? Tr("root") : null) : Tr(n); } function gF(t) { return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t); } function r5(t) { let e = []; for (; t !== null; ) e.push(t), t = t._parentEditor; return e; } function vF() { return Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 5); } function s5(t, e, n) { if (e = La(e._window), e !== null) { var i = e.anchorNode, { anchorOffset: r, focusOffset: s } = e; if (i !== null && (e = i.nodeType === 3 ? i.nodeValue : null, i = n1(i), e !== null && Ze(i))) { if (e === Mk && n) { let o = n.length; e = n, s = r = o; } e !== null && o5(i, e, r, s, t); } } } function o5(t, e, n, i, r) { let s = t; if (s.isAttached() && (r || !s.isDirty())) { let u = s.isComposing(), f = e; if ((u || r) && e[e.length - 1] === Mk && (f = e.slice(0, -1)), e = s.getTextContent(), r || f !== e) if (f === "") if (Pi(null), J6 || $k || e5) s.remove(); else { let d = Ln(); setTimeout(() => { d.update(() => { s.isAttached() && s.remove(); }); }, 20); } else { r = s.getParent(), e = Yh(); var o = s.getTextContentSize(), a = xu(), l = s.getKey(); s.isToken() || a !== null && l === a && !u || xt(e) && (r !== null && !r.canInsertTextBefore() && e.anchor.offset === 0 || e.anchor.key === t.__key && e.anchor.offset === 0 && !s.canInsertTextBefore() && !u || e.focus.key === t.__key && e.focus.offset === o && !s.canInsertTextAfter() && !u) ? s.markDirty() : (t = pn(), xt(t) && n !== null && i !== null && (t.setTextNodeRange(s, n, s, i), s.isSegmented() && (n = s.getTextContent(), n = rr(n), s.replace(n), s = n)), s.setTextContent(f)); } } } function zne(t, e) { if (e.isSegmented()) return !0; if (!t.isCollapsed()) return !1; t = t.anchor.offset; let n = e.getParentOrThrow(), i = e.isToken(); return t === 0 ? ((t = !e.canInsertTextBefore() || !n.canInsertTextBefore() || i) || (e = e.getPreviousSibling(), t = (Ze(e) || xe(e) && e.isInline()) && !e.canInsertTextAfter()), t) : t === e.getTextContentSize() ? !e.canInsertTextAfter() || !n.canInsertTextAfter() || i : !1; } function wg(t, e) { t.__lexicalClassNameCache === void 0 && (t.__lexicalClassNameCache = {}); let n = t.__lexicalClassNameCache, i = n[e]; return i !== void 0 ? i : (t = t[e], typeof t == "string" ? (t = t.split(" "), n[e] = t) : t); } function a5(t, e, n, i, r) { n.size !== 0 && (n = i.__type, i = i.__key, e = e.get(n), e === void 0 && Le(33, n), n = e.klass, e = t.get(n), e === void 0 && (e = /* @__PURE__ */ new Map(), t.set(n, e)), t = e.get(i), n = t === "destroyed" && r === "created", (t === void 0 || n) && e.set(i, n ? "updated" : r)); } function q$(t, e, n) { let i = t.getParent(), r = n; return i !== null && (e && n === 0 ? (r = t.getIndexWithinParent(), t = i) : e || n !== t.getChildrenSize() || (r = t.getIndexWithinParent() + 1, t = i)), t.getChildAtIndex(e ? r - 1 : r); } function ZS(t, e) { var n = t.offset; return t.type === "element" ? (t = t.getNode(), q$(t, e, n)) : (t = t.getNode(), e && n === 0 || !e && n === t.getTextContentSize() ? (n = e ? t.getPreviousSibling() : t.getNextSibling(), n === null ? q$(t.getParentOrThrow(), e, t.getIndexWithinParent() + (e ? 0 : 1)) : n) : null); } function bF(t) { return t = (t = Ak(t).event) && t.inputType, t === "insertFromPaste" || t === "insertFromPasteAsQuotation"; } function Zy(t) { return !Ws(t) && !t.isLastChild() && !t.isInline(); } function qy(t, e) { return t = t._keyToDOMMap.get(e), t === void 0 && Le(75, e), t; } function Nk(t) { return t = t.assignedSlot || t.parentElement, t !== null && t.nodeType === 11 ? t.host : t; } function Yy(t, e) { for (t = t.getParent(); t !== null; ) { if (t.is(e)) return !0; t = t.getParent(); } return !1; } function Ak(t) { return t = t._window, t === null && Le(78), t; } function yF(t) { for (t = t.getParentOrThrow(); t !== null && !Wu(t); ) t = t.getParentOrThrow(); return t; } function Wu(t) { return Ws(t) || xe(t) && t.isShadowRoot(); } function wF(t) { return t = t.constructor.clone(t), hF(t, null), t; } function i1(t) { var e = Ln(); let n = t.constructor.getType(); return e = e._nodes.get(n), e === void 0 && Le(97), e = e.replace, e !== null ? (e = e(t), e instanceof t.constructor || Le(98), e) : t; } function i3(t, e) { t = t.getParent(), !Ws(t) || xe(e) || ii(e) || Le(99); } function r3(t) { return (ii(t) || xe(t) && !t.canBeEmpty()) && !t.isInline(); } function qS(t, e, n) { n.style.removeProperty("caret-color"), e._blockCursorElement = null, e = t.parentElement, e !== null && e.removeChild(t); } function La(t) { return Ia ? (t || window).getSelection() : null; } function Dk(t) { return t.nodeType === 1; } function jd(t) { if (ii(t) && !t.isInline()) return !0; if (!xe(t) || Wu(t)) return !1; var e = t.getFirstChild(); return e = e === null || hf(e) || Ze(e) || e.isInline(), !t.isInline() && t.canBeEmpty() !== !1 && e; } function s3(t, e) { for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow(); return e(t) ? t : null; } function kF(t, e, n, i, r, s) { for (t = t.getFirstChild(); t !== null; ) { let o = t.__key; t.__parent === e && (xe(t) && kF(t, o, n, i, r, s), n.has(o) || s.delete(o), r.push(o)), t = t.getNextSibling(); } } function Wne(t, e, n, i) { t = t._nodeMap, e = e._nodeMap; let r = []; for (let [s] of i) { let o = e.get(s); o === void 0 || o.isAttached() || (xe(o) && kF(o, s, t, e, r, i), t.has(s) || i.delete(s), r.push(s)); } for (let s of r) e.delete(s); for (let s of n) i = e.get(s), i === void 0 || i.isAttached() || (t.has(s) || n.delete(s), e.delete(s)); } let Ni = "", Zr = "", dl = "", Hu, Ar, Yg, xF = !1, l5 = !1, Pk, Kb = null, YS, VS, df, Qu, XS, Vg; function Jb(t, e) { let n = df.get(t); if (e !== null) { let i = JS(t); i.parentNode === e && e.removeChild(i); } Qu.has(t) || Ar._keyToDOMMap.delete(t), xe(n) && (t = Vy(n, df), GS(t, 0, t.length - 1, null)), n !== void 0 && a5(Vg, Yg, Pk, n, "destroyed"); } function GS(t, e, n, i) { for (; e <= n; ++e) { let r = t[e]; r !== void 0 && Jb(r, i); } } function Nc(t, e) { t.setProperty("text-align", e); } function _F(t, e) { var n = Hu.theme.indent; if (typeof n == "string") { let i = t.classList.contains(n); 0 < e && !i ? t.classList.add(n) : 1 > e && i && t.classList.remove(n); } n = getComputedStyle(t).getPropertyValue("--lexical-indent-base-value") || "40px", t.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${n})`); } function OF(t, e) { t = t.style, e === 0 ? Nc(t, "") : e === 1 ? Nc(t, "left") : e === 2 ? Nc(t, "center") : e === 3 ? Nc(t, "right") : e === 4 ? Nc(t, "justify") : e === 5 ? Nc(t, "start") : e === 6 && Nc(t, "end"); } function ey(t, e, n) { let i = Qu.get(t); i === void 0 && Le(60); let r = i.createDOM(Hu, Ar); var s = Ar._keyToDOMMap; if (r["__lexicalKey_" + Ar._key] = t, s.set(t, r), Ze(i) ? r.setAttribute("data-lexical-text", "true") : ii(i) && r.setAttribute("data-lexical-decorator", "true"), xe(i)) { if (t = i.__indent, s = i.__size, t !== 0 && _F(r, t), s !== 0) { --s, t = Vy(i, Qu); var o = Zr; Zr = "", KS(t, i, 0, s, r, null), CF(i, r), Zr = o; } t = i.__format, t !== 0 && OF(r, t), i.isInline() || SF(null, i, r), Zy(i) && (Ni += ` `, dl += ` `); } else s = i.getTextContent(), ii(i) ? (o = i.decorate(Ar, Hu), o !== null && EF(t, o), r.contentEditable = "false") : Ze(i) && (i.isDirectionless() || (Zr += s)), Ni += s, dl += s; return e !== null && (n != null ? e.insertBefore(r, n) : (n = e.__lexicalLineBreak, n != null ? e.insertBefore(r, n) : e.appendChild(r))), a5(Vg, Yg, Pk, i, "created"), r; } function KS(t, e, n, i, r, s) { let o = Ni; for (Ni = ""; n <= i; ++n) ey(t[n], r, s); Zy(e) && (Ni += ` `), r.__lexicalTextContent = Ni, Ni = o + Ni; } function Y$(t, e) { return t = e.get(t), hf(t) || ii(t) && t.isInline(); } function SF(t, e, n) { t = t !== null && (t.__size === 0 || Y$(t.__last, df)), e = e.__size === 0 || Y$(e.__last, Qu), t ? e || (e = n.__lexicalLineBreak, e != null && n.removeChild(e), n.__lexicalLineBreak = null) : e && (e = document.createElement("br"), n.__lexicalLineBreak = e, n.appendChild(e)); } function CF(t, e) { var n = e.__lexicalDir; if (e.__lexicalDirTextContent !== Zr || n !== Kb) { let s = Zr === ""; if (s) var i = Kb; else i = Zr, i = Mne.test(i) ? "rtl" : Nne.test(i) ? "ltr" : null; if (i !== n) { let o = e.classList, a = Hu.theme; var r = n !== null ? a[n] : void 0; let l = i !== null ? a[i] : void 0; r !== void 0 && (typeof r == "string" && (r = r.split(" "), r = a[n] = r), o.remove(...r)), i === null || s && i === "ltr" ? e.removeAttribute("dir") : (l !== void 0 && (typeof l == "string" && (n = l.split(" "), l = a[i] = n), l !== void 0 && o.add(...l)), e.dir = i), l5 || (t.getWritable().__dir = i); } Kb = i, e.__lexicalDirTextContent = Zr, e.__lexicalDir = i; } } function Vy(t, e) { let n = []; for (t = t.__first; t !== null; ) { let i = e.get(t); i === void 0 && Le(101), n.push(t), t = i.__next; } return n; } function Xm(t, e) { var n = df.get(t), i = Qu.get(t); n !== void 0 && i !== void 0 || Le(61); var r = xF || VS.has(t) || YS.has(t); let s = qy(Ar, t); if (n === i && !r) return xe(n) ? (i = s.__lexicalTextContent, i !== void 0 && (Ni += i, dl += i), i = s.__lexicalDirTextContent, i !== void 0 && (Zr += i)) : (i = n.getTextContent(), Ze(n) && !n.isDirectionless() && (Zr += i), dl += i, Ni += i), s; if (n !== i && r && a5(Vg, Yg, Pk, i, "updated"), i.updateDOM(n, s, Hu)) return i = ey(t, null, null), e === null && Le(62), e.replaceChild(i, s), Jb(t, null), i; if (xe(n) && xe(i)) { if (t = i.__indent, t !== n.__indent && _F(s, t), t = i.__format, t !== n.__format && OF(s, t), r) { t = Zr, Zr = "", r = Ni; var o = n.__size, a = i.__size; if (Ni = "", o === 1 && a === 1) { var l = n.__first; if (e = i.__first, l === e) Xm(l, s); else { var u = JS(l); e = ey(e, null, null), s.replaceChild(e, u), Jb(l, null); } } else { e = Vy(n, df); var f = Vy(i, Qu); if (o === 0) a !== 0 && KS(f, i, 0, a - 1, s, null); else if (a === 0) o !== 0 && (l = s.__lexicalLineBreak == null, GS(e, 0, o - 1, l ? null : s), l && (s.textContent = "")); else { var d = e; e = f, f = o - 1, o = a - 1; let m = s.firstChild, g = 0; for (a = 0; g <= f && a <= o; ) { var h = d[g]; let w = e[a]; if (h === w) m = o3(Xm(w, s)), g++, a++; else { l === void 0 && (l = new Set(d)), u === void 0 && (u = new Set(e)); let x = u.has(h), _ = l.has(w); x ? (_ ? (h = qy(Ar, w), h === m ? m = o3(Xm(w, s)) : (m != null ? s.insertBefore(h, m) : s.appendChild(h), Xm(w, s)), g++) : ey(w, s, m), a++) : (m = o3(JS(h)), Jb(h, s), g++); } } l = g > f, u = a > o, l && !u ? (l = e[o + 1], l = l === void 0 ? null : Ar.getElementByKey(l), KS(e, i, a, o, s, l)) : u && !l && GS(d, g, f, s); } } Zy(i) && (Ni += ` `), s.__lexicalTextContent = Ni, Ni = r + Ni, CF(i, s), Zr = t, Ws(i) || i.isInline() || SF(n, i, s); } Zy(i) && (Ni += ` `, dl += ` `); } else n = i.getTextContent(), ii(i) ? (r = i.decorate(Ar, Hu), r !== null && EF(t, r)) : Ze(i) && !i.isDirectionless() && (Zr += n), Ni += n, dl += n; return !l5 && Ws(i) && i.__cachedText !== dl && (i.getWritable().__cachedText = dl), s; } function EF(t, e) { let n = Ar._pendingDecorators, i = Ar._decorators; if (n === null) { if (i[t] === e) return; n = mF(Ar); } n[t] = e; } function o3(t) { return t = t.nextSibling, t !== null && t === Ar._blockCursorElement && (t = t.nextSibling), t; } function JS(t) { let e = XS.get(t); return e === void 0 && Le(75, t), e; } let il = Object.freeze({}), e4 = [["keydown", Xne], ["pointerdown", Qne], ["compositionstart", Yne], ["compositionend", Vne], ["input", qne], ["click", Hne], ["cut", il], ["copy", il], ["dragstart", il], ["dragover", il], ["dragend", il], ["paste", il], ["focus", il], ["blur", il], ["drop", il]]; Hy && e4.push(["beforeinput", (t, e) => Zne(t, e)]); let Xg = 0, TF = 0, $F = 0, Fd = null, kg = 0, t4 = !1, n4 = !1, xg = !1, Gm = !1, MF = [0, "", 0, "root", 0]; function NF(t, e, n, i, r) { let s = t.anchor, o = t.focus, a = s.getNode(); var l = Ln(); let u = La(l._window), f = u !== null ? u.anchorNode : null, d = s.key; l = l.getElementByKey(d); let h = n.length; return d !== o.key || !Ze(a) || (!r && (!Hy || $F < i + 50) || a.isDirty() && 2 > h || gF(n)) && s.offset !== o.offset && !a.isComposing() || QS(a) || a.isDirty() && 1 < h || (r || !Hy) && l !== null && !a.isComposing() && f !== Qy(l) || u !== null && e !== null && (!e.collapsed || e.startContainer !== u.anchorNode || e.startOffset !== u.anchorOffset) || a.getFormat() !== t.format || a.getStyle() !== t.style || zne(t, a); } function V$(t, e) { return t !== null && t.nodeValue !== null && t.nodeType === 3 && e !== 0 && e !== t.nodeValue.length; } function X$(t, e, n) { let { anchorNode: i, anchorOffset: r, focusNode: s, focusOffset: o } = t; t4 && (t4 = !1, V$(i, r) && V$(s, o)) || qs(e, () => { if (!n) $a(null); else if (t1(e, i, s)) { var a = pn(); if (xt(a)) { var l = a.anchor, u = l.getNode(); if (a.isCollapsed()) { t.type === "Range" && t.anchorNode === t.focusNode && (a.dirty = !0); var f = Ak(e).event; f = f ? f.timeStamp : performance.now(); let [w, x, _, S, C] = MF; var d = Zs(); d = e.isComposing() === !1 && d.getTextContent() === "", f < C + 200 && l.offset === _ && l.key === S ? (a.format = w, a.style = x) : l.type === "text" ? (Ze(u) || Le(141), a.format = u.getFormat(), a.style = u.getStyle()) : l.type !== "element" || d || (a.format = 0, a.style = ""); } else { var h = l.key, m = a.focus.key; l = a.getNodes(), u = l.length; var g = a.isBackward(); f = g ? o : r, d = g ? r : o; let w = g ? m : h; h = g ? h : m, m = 255, g = !1; for (let x = 0; x < u; x++) { let _ = l[x], S = _.getTextContentSize(); if (Ze(_) && S !== 0 && !(x === 0 && _.__key === w && f === S || x === u - 1 && _.__key === h && d === 0) && (g = !0, m &= _.getFormat(), m === 0)) break; } a.format = g ? m : 0; } } Pe(e, Tk, void 0); } }); } function Hne(t, e) { qs(e, () => { let n = pn(); var i = La(e._window); let r = Yh(); if (i) if (xt(n)) { let o = n.anchor; var s = o.getNode(); o.type === "element" && o.offset === 0 && n.isCollapsed() && !Ws(s) && Zs().getChildrenSize() === 1 && s.getTopLevelElementOrThrow().isEmpty() && r !== null && n.is(r) ? (i.removeAllRanges(), n.dirty = !0) : t.detail !== 3 || n.isCollapsed() || (i = n.focus.getNode(), s !== i && (xe(s) ? s.select(0) : s.getParentOrThrow().select(0))); } else t.pointerType === "touch" && (s = i.anchorNode, s !== null && (s = s.nodeType, s === 1 || s === 3)) && (i = u5(r, i, e, t), $a(i)); Pe(e, Wj, t); }); } function Qne(t, e) { let n = t.target; t = t.pointerType, n instanceof Node && t !== "touch" && qs(e, () => { ii(n1(n)) || (n4 = !0); }); } function AF(t) { return t.getTargetRanges ? (t = t.getTargetRanges(), t.length === 0 ? null : t[0]) : null; } function Une(t, e) { return t !== e || xe(t) || xe(e) || !t.isToken() || !e.isToken(); } function Zne(t, e) { let n = t.inputType, i = AF(t); n === "deleteCompositionText" || zu && bF(e) || n !== "insertCompositionText" && qs(e, () => { let r = pn(); if (n === "deleteContentBackward") { if (r === null) { var s = Yh(); if (!xt(s)) return; $a(s.clone()); } if (xt(r)) { Ene && Pi(r.anchor.key), TF === 229 && t.timeStamp < Xg + 30 && e.isComposing() && r.anchor.key === r.focus.key ? (Pi(null), Xg = 0, setTimeout(() => { qs(e, () => { Pi(null); }); }, 30), xt(r) && (s = r.anchor.getNode(), s.markDirty(), r.format = s.getFormat(), Ze(s) || Le(142), r.style = s.getStyle()), 1 >= r.anchor.getNode().getTextContent().length && (t.preventDefault(), Pe(e, sh, !0))) : (Pi(null), t.preventDefault(), Pe(e, sh, !0)); return; } } if (xt(r)) { s = t.data, Fd !== null && s5(!1, e, Fd), r.dirty && Fd === null || !r.isCollapsed() || Ws(r.anchor.getNode()) || i === null || r.applyDOMRange(i), Fd = null; var o = r.focus, a = r.anchor.getNode(); if (o = o.getNode(), n === "insertText" || n === "insertTranspose") s === ` ` ? (t.preventDefault(), Pe(e, yg, !1)) : s === ` ` ? (t.preventDefault(), Pe(e, BS, void 0)) : s == null && t.dataTransfer ? (s = t.dataTransfer.getData("text/plain"), t.preventDefault(), r.insertRawText(s)) : s != null && NF(r, i, s, t.timeStamp, !0) ? (t.preventDefault(), Pe(e, oh, s)) : Fd = s, $F = t.timeStamp; else switch (t.preventDefault(), n) { case "insertFromYank": case "insertFromDrop": case "insertReplacementText": Pe(e, oh, t); break; case "insertFromComposition": Pi(null), Pe(e, oh, t); break; case "insertLineBreak": Pi(null), Pe(e, yg, !1); break; case "insertParagraph": Pi(null), xg && !$k ? (xg = !1, Pe(e, yg, !1)) : Pe(e, BS, void 0); break; case "insertFromPaste": case "insertFromPasteAsQuotation": Pe(e, Y6, t); break; case "deleteByComposition": Une(a, o) && Pe( e, zS, t ); break; case "deleteByDrag": case "deleteByCut": Pe(e, zS, t); break; case "deleteContent": Pe(e, sh, !1); break; case "deleteWordBackward": Pe(e, Zg, !0); break; case "deleteWordForward": Pe(e, Zg, !1); break; case "deleteHardLineBackward": case "deleteSoftLineBackward": Pe(e, qg, !0); break; case "deleteContentForward": case "deleteHardLineForward": case "deleteSoftLineForward": Pe(e, qg, !1); break; case "formatStrikeThrough": Pe(e, ku, "strikethrough"); break; case "formatBold": Pe(e, ku, "bold"); break; case "formatItalic": Pe(e, ku, "italic"); break; case "formatUnderline": Pe(e, ku, "underline"); break; case "historyUndo": Pe(e, V6, void 0); break; case "historyRedo": Pe(e, X6, void 0); } } }); } function qne(t, e) { t.stopPropagation(), qs(e, () => { var n = pn(), i = t.data, r = AF(t); if (i != null && xt(n) && NF(n, r, i, t.timeStamp, !1)) { Gm && (i4(e, i), Gm = !1); var s = n.anchor, o = s.getNode(); if (r = La(e._window), r === null) return; let a = s.offset; (s = Hy && !n.isCollapsed() && Ze(o) && r.anchorNode !== null) && (o = o.getTextContent().slice(0, a) + i + o.getTextContent().slice(a + n.focus.offset), r = r.anchorNode, s = o === (r.nodeType === 3 ? r.nodeValue : null)), s || Pe(e, oh, i), i = i.length, zu && 1 < i && t.inputType === "insertCompositionText" && !e.isComposing() && (n.anchor.offset -= i), J6 || $k || e5 || !e.isComposing() || (Xg = 0, Pi(null)); } else s5(!1, e, i !== null ? i : void 0), Gm && (i4(e, i || void 0), Gm = !1); qr(), n = Ln(), uF(n); }), Fd = null; } function Yne(t, e) { qs(e, () => { let n = pn(); if (xt(n) && !e.isComposing()) { let i = n.anchor, r = n.anchor.getNode(); Pi(i.key), (t.timeStamp < Xg + 30 || i.type === "element" || !n.isCollapsed() || r.getFormat() !== n.format || Ze(r) && r.getStyle() !== n.style) && Pe(e, oh, $ne); } }); } function i4(t, e) { var n = t._compositionKey; if (Pi(null), n !== null && e != null) { if (e === "") { e = Tr(n), t = Qy(t.getElementByKey(n)), t !== null && t.nodeValue !== null && Ze(e) && o5(e, t.nodeValue, null, null, !0); return; } if (e[e.length - 1] === ` ` && (n = pn(), xt(n))) { e = n.focus, n.anchor.set(e.key, e.offset, e.type), Pe(t, Wy, null); return; } } s5(!0, t, e); } function Vne(t, e) { zu ? Gm = !0 : qs(e, () => { i4(e, t.data); }); } function Xne(t, e) { if (Xg = t.timeStamp, TF = t.keyCode, !e.isComposing()) { var { keyCode: n, shiftKey: i, ctrlKey: r, metaKey: s, altKey: o } = t; if (!Pe(e, Hj, t)) { if (n !== 39 || r || s || o) if (n !== 39 || o || i || !r && !s) if (n !== 37 || r || s || o) if (n !== 37 || o || i || !r && !s) if (n !== 38 || r || s) if (n !== 40 || r || s) if (n === 13 && i) xg = !0, Pe(e, Wy, t); else if (n === 32) Pe(e, Xj, t); else if (wr && r && n === 79) t.preventDefault(), xg = !0, Pe(e, yg, !0); else if (n !== 13 || i) { var a = wr ? o || s ? !1 : n === 8 || n === 72 && r : r || o || s ? !1 : n === 8; a ? n === 8 ? Pe(e, Gj, t) : (t.preventDefault(), Pe(e, sh, !0)) : n === 27 ? Pe( e, Kj, t ) : (a = wr ? i || o || s ? !1 : n === 46 || n === 68 && r : r || o || s ? !1 : n === 46, a ? n === 46 ? Pe(e, Jj, t) : (t.preventDefault(), Pe(e, sh, !1)) : n === 8 && (wr ? o : r) ? (t.preventDefault(), Pe(e, Zg, !0)) : n === 46 && (wr ? o : r) ? (t.preventDefault(), Pe(e, Zg, !1)) : wr && s && n === 8 ? (t.preventDefault(), Pe(e, qg, !0)) : wr && s && n === 46 ? (t.preventDefault(), Pe(e, qg, !1)) : n === 66 && !o && (wr ? s : r) ? (t.preventDefault(), Pe(e, ku, "bold")) : n === 85 && !o && (wr ? s : r) ? (t.preventDefault(), Pe(e, ku, "underline")) : n === 73 && !o && (wr ? s : r) ? (t.preventDefault(), Pe(e, ku, "italic")) : n !== 9 || o || r || s ? n === 90 && !i && (wr ? s : r) ? (t.preventDefault(), Pe(e, V6, void 0)) : (a = wr ? n === 90 && s && i : n === 89 && r || n === 90 && r && i, a ? (t.preventDefault(), Pe(e, X6, void 0)) : r1(e._editorState._selection) ? (a = i ? !1 : n === 67 ? wr ? s : r : !1, a ? (t.preventDefault(), Pe(e, G6, t)) : (a = i ? !1 : n === 88 ? wr ? s : r : !1, a ? (t.preventDefault(), Pe(e, K6, t)) : n === 65 && (wr ? s : r) && (t.preventDefault(), Pe(e, WS, t)))) : !zu && n === 65 && (wr ? s : r) && (t.preventDefault(), Pe(e, WS, t))) : Pe(e, eF, t)); } else xg = !1, Pe(e, Wy, t); else Pe(e, Vj, t); else Pe(e, Yj, t); else Pe(e, qj, t); else Pe(e, Zj, t); else Pe(e, Uj, t); else Pe(e, Qj, t); (r || i || o || s) && Pe(e, aF, t); } } } function DF(t) { let e = t.__lexicalEventHandles; return e === void 0 && (e = [], t.__lexicalEventHandles = e), e; } let ah = /* @__PURE__ */ new Map(); function PF(t) { var e = t.target; let n = La(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView); if (n !== null) { var i = i5(n.anchorNode); if (i !== null) { n4 && (n4 = !1, qs(i, () => { var a = Yh(), l = n.anchorNode; l !== null && (l = l.nodeType, l === 1 || l === 3) && (a = u5(a, n, i, t), $a(a)); })), e = r5(i), e = e[e.length - 1]; var r = e._key, s = ah.get(r), o = s || e; o !== i && X$(n, o, !1), X$(n, i, !0), i !== e ? ah.set(r, i) : s && ah.delete(r); } } } function Gne(t, e) { kg === 0 && t.ownerDocument.addEventListener("selectionchange", PF), kg++, t.__lexicalEditor = e; let n = DF(t); for (let i = 0; i < e4.length; i++) { let [r, s] = e4[i], o = typeof s == "function" ? (a) => { a._lexicalHandled !== !0 && (a._lexicalHandled = !0, e.isEditable() && s(a, e)); } : (a) => { if (a._lexicalHandled !== !0 && (a._lexicalHandled = !0, e.isEditable())) switch (r) { case "cut": return Pe(e, K6, a); case "copy": return Pe(e, G6, a); case "paste": return Pe(e, Y6, a); case "dragstart": return Pe(e, nF, a); case "dragover": return Pe(e, iF, a); case "dragend": return Pe( e, rF, a ); case "focus": return Pe(e, sF, a); case "blur": return Pe(e, oF, a); case "drop": return Pe(e, tF, a); } }; t.addEventListener(r, o), n.push(() => { t.removeEventListener(r, o); }); } } function r4(t, e, n) { qr(); var i = t.__key; let r = t.getParent(); if (r !== null) { var s = pn(); if (xt(s) && xe(t)) { var { anchor: o, focus: a } = s, l = o.getNode(), u = a.getNode(); Yy(l, t) && o.set(t.__key, 0, "element"), Yy(u, t) && a.set(t.__key, 0, "element"); } if (l = s, u = !1, xt(l) && e) { s = l.anchor; let f = l.focus; s.key === i && (Gy(s, t, r, t.getPreviousSibling(), t.getNextSibling()), u = !0), f.key === i && (Gy(f, t, r, t.getPreviousSibling(), t.getNextSibling()), u = !0); } else r1(l) && e && t.isSelected() && t.selectPrevious(); xt(l) && e && !u ? (i = t.getIndexWithinParent(), of(t), Xy(l, r, i, -1)) : of(t), n || Wu(r) || r.canBeEmpty() || !r.isEmpty() || r4(r, e), e && Ws(r) && r.isEmpty() && r.selectEnd(); } } class Ik { static getType() { Le(64, this.name); } static clone() { Le(65, this.name); } constructor(e) { this.__type = this.constructor.getType(), this.__next = this.__prev = this.__parent = null, hF(this, e); } getType() { return this.__type; } isInline() { Le(137, this.constructor.name); } isAttached() { for (var e = this.__key; e !== null; ) { if (e === "root") return !0; if (e = Tr(e), e === null) break; e = e.__parent; } return !1; } isSelected(e) { if (e = e || pn(), e == null) return !1; let n = e.getNodes().some((i) => i.__key === this.__key); return Ze(this) ? n : xt(e) && e.anchor.type === "element" && e.focus.type === "element" && e.anchor.key === e.focus.key && e.anchor.offset === e.focus.offset ? !1 : n; } getKey() { return this.__key; } getIndexWithinParent() { var e = this.getParent(); if (e === null) return -1; e = e.getFirstChild(); let n = 0; for (; e !== null; ) { if (this.is(e)) return n; n++, e = e.getNextSibling(); } return -1; } getParent() { let e = this.getLatest().__parent; return e === null ? null : Tr(e); } getParentOrThrow() { let e = this.getParent(); return e === null && Le(66, this.__key), e; } getTopLevelElement() { let e = this; for (; e !== null; ) { let n = e.getParent(); if (Wu(n)) return xe(e) || Le(138), e; e = n; } return null; } getTopLevelElementOrThrow() { let e = this.getTopLevelElement(); return e === null && Le(67, this.__key), e; } getParents() { let e = [], n = this.getParent(); for (; n !== null; ) e.push(n), n = n.getParent(); return e; } getParentKeys() { let e = [], n = this.getParent(); for (; n !== null; ) e.push(n.__key), n = n.getParent(); return e; } getPreviousSibling() { let e = this.getLatest().__prev; return e === null ? null : Tr(e); } getPreviousSiblings() { let e = []; var n = this.getParent(); if (n === null) return e; for (n = n.getFirstChild(); n !== null && !n.is(this); ) e.push(n), n = n.getNextSibling(); return e; } getNextSibling() { let e = this.getLatest().__next; return e === null ? null : Tr(e); } getNextSiblings() { let e = [], n = this.getNextSibling(); for (; n !== null; ) e.push(n), n = n.getNextSibling(); return e; } getCommonAncestor(e) { let n = this.getParents(); var i = e.getParents(); xe(this) && n.unshift(this), xe(e) && i.unshift(e), e = n.length; var r = i.length; if (e === 0 || r === 0 || n[e - 1] !== i[r - 1]) return null; for (i = new Set(i), r = 0; r < e; r++) { let s = n[r]; if (i.has(s)) return s; } return null; } is(e) { return e == null ? !1 : this.__key === e.__key; } isBefore(e) { if (this === e) return !1; if (e.isParentOf(this)) return !0; if (this.isParentOf(e)) return !1; var n = this.getCommonAncestor(e); let i = this; for (; ; ) { var r = i.getParentOrThrow(); if (r === n) { r = i.getIndexWithinParent(); break; } i = r; } for (i = e; ; ) { if (e = i.getParentOrThrow(), e === n) { n = i.getIndexWithinParent(); break; } i = e; } return r < n; } isParentOf(e) { let n = this.__key; if (n === e.__key) return !1; for (; e !== null; ) { if (e.__key === n) return !0; e = e.getParent(); } return !1; } getNodesBetween(e) { let n = this.isBefore(e), i = [], r = /* @__PURE__ */ new Set(); for (var s = this; ; ) { var o = s.__key; if (r.has(o) || (r.add(o), i.push(s)), s === e) break; if (o = xe(s) ? n ? s.getFirstChild() : s.getLastChild() : null, o !== null) s = o; else if (o = n ? s.getNextSibling() : s.getPreviousSibling(), o !== null) s = o; else { if (s = s.getParentOrThrow(), r.has(s.__key) || i.push(s), s === e) break; o = s; do o === null && Le(68), s = n ? o.getNextSibling() : o.getPreviousSibling(), o = o.getParent(), o !== null && (s !== null || r.has(o.__key) || i.push(o)); while (s === null); } } return n || i.reverse(), i; } isDirty() { let e = Ln()._dirtyLeaves; return e !== null && e.has(this.__key); } getLatest() { let e = Tr(this.__key); return e === null && Le(113), e; } getWritable() { qr(); var e = Ra(), n = Ln(); e = e._nodeMap; let i = this.__key, r = this.getLatest(), s = r.__parent; n = n._cloneNotNeeded; var o = pn(); return o !== null && o.setCachedNodes(null), n.has(i) ? (Uy(r), r) : (o = r.constructor.clone(r), o.__parent = s, o.__next = r.__next, o.__prev = r.__prev, xe(r) && xe(o) ? (o.__first = r.__first, o.__last = r.__last, o.__size = r.__size, o.__indent = r.__indent, o.__format = r.__format, o.__dir = r.__dir) : Ze(r) && Ze(o) && (o.__format = r.__format, o.__style = r.__style, o.__mode = r.__mode, o.__detail = r.__detail), n.add(i), o.__key = i, Uy(o), e.set(i, o), o); } getTextContent() { return ""; } getTextContentSize() { return this.getTextContent().length; } createDOM() { Le(70); } updateDOM() { Le(71); } exportDOM(e) { return { element: this.createDOM(e._config, e) }; } exportJSON() { Le(72); } static importJSON() { Le(18, this.name); } static transform() { return null; } remove(e) { r4(this, !0, e); } replace(e, n) { qr(); var i = pn(); i !== null && (i = i.clone()), i3(this, e); let r = this.getLatest(), s = this.__key, o = e.__key, a = e.getWritable(); e = this.getParentOrThrow().getWritable(); let l = e.__size; of(a); let u = r.getPreviousSibling(), f = r.getNextSibling(), d = r.__prev, h = r.__next, m = r.__parent; return r4(r, !1, !0), u === null ? e.__first = o : u.getWritable().__next = o, a.__prev = d, f === null ? e.__last = o : f.getWritable().__prev = o, a.__next = h, a.__parent = m, e.__size = l, n && (xe(this) && xe(a) || Le(139), this.getChildren().forEach((g) => { a.append(g); })), xt(i) && ($a(i), n = i.anchor, i = i.focus, n.key === s && eM(n, a), i.key === s && eM(i, a)), xu() === s && Pi(o), a; } insertAfter(e, n = !0) { qr(), i3(this, e); var i = this.getWritable(); let r = e.getWritable(); var s = r.getParent(); let o = pn(); var a = !1, l = !1; if (s !== null) { var u = e.getIndexWithinParent(); of(r), xt(o) && (l = s.__key, a = o.anchor, s = o.focus, a = a.type === "element" && a.key === l && a.offset === u + 1, l = s.type === "element" && s.key === l && s.offset === u + 1); } s = this.getNextSibling(), u = this.getParentOrThrow().getWritable(); let f = r.__key, d = i.__next; return s === null ? u.__last = f : s.getWritable().__prev = f, u.__size++, i.__next = f, r.__next = d, r.__prev = i.__key, r.__parent = i.__parent, n && xt(o) && (n = this.getIndexWithinParent(), Xy(o, u, n + 1), i = u.__key, a && o.anchor.set(i, n + 2, "element"), l && o.focus.set(i, n + 2, "element")), e; } insertBefore(e, n = !0) { qr(), i3(this, e); var i = this.getWritable(); let r = e.getWritable(), s = r.__key; of(r); let o = this.getPreviousSibling(), a = this.getParentOrThrow().getWritable(), l = i.__prev, u = this.getIndexWithinParent(); return o === null ? a.__first = s : o.getWritable().__next = s, a.__size++, i.__prev = s, r.__prev = l, r.__next = i.__key, r.__parent = i.__parent, i = pn(), n && xt(i) && (n = this.getParentOrThrow(), Xy( i, n, u )), e; } isParentRequired() { return !1; } createParentElementNode() { return kl(); } selectStart() { return this.selectPrevious(); } selectEnd() { return this.selectNext(0, 0); } selectPrevious(e, n) { qr(); let i = this.getPreviousSibling(), r = this.getParentOrThrow(); return i === null ? r.select(0, 0) : xe(i) ? i.select() : Ze(i) ? i.select(e, n) : (e = i.getIndexWithinParent() + 1, r.select(e, e)); } selectNext(e, n) { qr(); let i = this.getNextSibling(), r = this.getParentOrThrow(); return i === null ? r.select() : xe(i) ? i.select(0, 0) : Ze(i) ? i.select(e, n) : (e = i.getIndexWithinParent(), r.select(e, e)); } markDirty() { this.getWritable(); } } function Kne(t, e, n) { n = n || e.getParentOrThrow().getLastChild(); let i = e; for (e = [e]; i !== n; ) i.getNextSibling() || Le(140), i = i.getNextSibling(), e.push(i); for (let r of e) t = t.insertAfter(r); } class Zh extends Ik { static getType() { return "linebreak"; } static clone(e) { return new Zh(e.__key); } constructor(e) { super(e); } getTextContent() { return ` `; } createDOM() { return document.createElement("br"); } updateDOM() { return !1; } static importDOM() { return { br: (e) => { e: { var n = e.parentElement; if (n !== null) { let i = n.firstChild; if ((i === e || i.nextSibling === e && G$(i)) && (n = n.lastChild, n === e || n.previousSibling === e && G$(n))) { e = !0; break e; } } e = !1; } return e ? null : { conversion: Jne, priority: 0 }; } }; } static importJSON() { return Sh(); } exportJSON() { return { type: "linebreak", version: 1 }; } } function Jne() { return { node: Sh() }; } function Sh() { return i1(new Zh()); } function hf(t) { return t instanceof Zh; } function G$(t) { return t.nodeType === 3 && /^( |\t|\r?\n)+$/.test(t.textContent || ""); } function a3(t, e) { return e & 16 ? "code" : e & 128 ? "mark" : e & 32 ? "sub" : e & 64 ? "sup" : null; } function l3(t, e) { return e & 1 ? "strong" : e & 2 ? "em" : "span"; } function u3(t, e, n, i, r) { t = i.classList, i = wg(r, "base"), i !== void 0 && t.add(...i), i = wg(r, "underlineStrikethrough"); let s = !1, o = e & 8 && e & 4; var a = n & 8 && n & 4; i !== void 0 && (a ? (s = !0, o || t.add(...i)) : o && t.remove(...i)); for (let l in Oh) a = Oh[l], i = wg(r, l), i !== void 0 && (n & a ? !s || l !== "underline" && l !== "strikethrough" ? (!(e & a) || o && l === "underline" || l === "strikethrough") && t.add(...i) : e & a && t.remove(...i) : e & a && t.remove(...i)); } function c3(t, e, n) { let i = e.firstChild; if (n = n.isComposing(), t += n ? Mk : "", i == null) e.textContent = t; else if (e = i.nodeValue, e !== t) if (n || zu) { n = e.length; let r = t.length, s = 0, o = 0; for (; s < n && s < r && e[s] === t[s]; ) s++; for (; o + s < n && o + s < r && e[n - o - 1] === t[r - o - 1]; ) o++; t = [s, n - s - o, t.slice(s, r - o)]; let [a, l, u] = t; l !== 0 && i.deleteData(a, l), i.insertData(a, u); } else i.nodeValue = t; } function Bv(t, e) { return e = document.createElement(e), e.appendChild(t), e; } class Mf extends Ik { static getType() { return "text"; } static clone(e) { return new Mf(e.__text, e.__key); } constructor(e, n) { super(n), this.__text = e, this.__format = 0, this.__style = "", this.__detail = this.__mode = 0; } getFormat() { return this.getLatest().__format; } getDetail() { return this.getLatest().__detail; } getMode() { let e = this.getLatest(); return Ine[e.__mode]; } getStyle() { return this.getLatest().__style; } isToken() { return this.getLatest().__mode === 1; } isComposing() { return this.__key === xu(); } isSegmented() { return this.getLatest().__mode === 2; } isDirectionless() { return (this.getLatest().__detail & 1) !== 0; } isUnmergeable() { return (this.getLatest().__detail & 2) !== 0; } hasFormat(e) { return e = Oh[e], (this.getFormat() & e) !== 0; } isSimpleText() { return this.__type === "text" && this.__mode === 0; } getTextContent() { return this.getLatest().__text; } getFormatFlags(e, n) { let i = this.getLatest().__format; return US(i, e, n); } canHaveFormat() { return !0; } createDOM(e) { var n = this.__format, i = a3(this, n); let r = l3(this, n), s = document.createElement(i === null ? r : i), o = s; return this.hasFormat("code") && s.setAttribute("spellcheck", "false"), i !== null && (o = document.createElement(r), s.appendChild(o)), i = o, c3(this.__text, i, this), e = e.theme.text, e !== void 0 && u3(r, 0, n, i, e), n = this.__style, n !== "" && (s.style.cssText = n), s; } updateDOM(e, n, i) { let r = this.__text; var s = e.__format, o = this.__format, a = a3(this, s); let l = a3(this, o); var u = l3(this, s); let f = l3(this, o); return (a === null ? u : a) !== (l === null ? f : l) ? !0 : a === l && u !== f ? (s = n.firstChild, s == null && Le(48), e = a = document.createElement(f), c3(r, e, this), i = i.theme.text, i !== void 0 && u3(f, 0, o, e, i), n.replaceChild( a, s ), !1) : (u = n, l !== null && a !== null && (u = n.firstChild, u == null && Le(49)), c3(r, u, this), i = i.theme.text, i !== void 0 && s !== o && u3(f, s, o, u, i), o = this.__style, e.__style !== o && (n.style.cssText = o), !1); } static importDOM() { return { "#text": () => ({ conversion: nie, priority: 0 }), b: () => ({ conversion: tie, priority: 0 }), code: () => ({ conversion: nu, priority: 0 }), em: () => ({ conversion: nu, priority: 0 }), i: () => ({ conversion: nu, priority: 0 }), s: () => ({ conversion: nu, priority: 0 }), span: () => ({ conversion: eie, priority: 0 }), strong: () => ({ conversion: nu, priority: 0 }), sub: () => ({ conversion: nu, priority: 0 }), sup: () => ({ conversion: nu, priority: 0 }), u: () => ({ conversion: nu, priority: 0 }) }; } static importJSON(e) { let n = rr(e.text); return n.setFormat(e.format), n.setDetail(e.detail), n.setMode(e.mode), n.setStyle(e.style), n; } exportDOM(e) { return { element: e } = super.exportDOM(e), e !== null && Dk(e) || Le(132), e.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (e = Bv(e, "b")), this.hasFormat("italic") && (e = Bv(e, "i")), this.hasFormat("strikethrough") && (e = Bv(e, "s")), this.hasFormat("underline") && (e = Bv(e, "u")), { element: e }; } exportJSON() { return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), type: "text", version: 1 }; } selectionTransform() { } setFormat(e) { let n = this.getWritable(); return n.__format = typeof e == "string" ? Oh[e] : e, n; } setDetail(e) { let n = this.getWritable(); return n.__detail = typeof e == "string" ? Ane[e] : e, n; } setStyle(e) { let n = this.getWritable(); return n.__style = e, n; } toggleFormat(e) { let n = this.getFormat(); return e = US(n, e, null), this.setFormat(e); } toggleDirectionless() { let e = this.getWritable(); return e.__detail ^= 1, e; } toggleUnmergeable() { let e = this.getWritable(); return e.__detail ^= 2, e; } setMode(e) { if (e = Pne[e], this.__mode === e) return this; let n = this.getWritable(); return n.__mode = e, n; } setTextContent(e) { if (this.__text === e) return this; let n = this.getWritable(); return n.__text = e, n; } select(e, n) { qr(); let i = pn(); var r = this.getTextContent(); let s = this.__key; if (typeof r == "string" ? (r = r.length, e === void 0 && (e = r), n === void 0 && (n = r)) : n = e = 0, xt(i)) r = xu(), r !== i.anchor.key && r !== i.focus.key || Pi(s), i.setTextNodeRange( this, e, this, n ); else return WF(s, e, s, n, "text", "text"); return i; } selectStart() { return this.select(0, 0); } selectEnd() { let e = this.getTextContentSize(); return this.select(e, e); } spliceText(e, n, i, r) { let s = this.getWritable(), o = s.__text, a = i.length, l = e; 0 > l && (l = a + l, 0 > l && (l = 0)); let u = pn(); return r && xt(u) && (e += a, u.setTextNodeRange(s, e, s, e)), n = o.slice(0, l) + i + o.slice(l + n), s.__text = n, s; } canInsertTextBefore() { return !0; } canInsertTextAfter() { return !0; } splitText(...e) { qr(); var n = this.getLatest(), i = n.getTextContent(), r = n.__key, s = xu(), o = new Set(e); e = []; for (var a = i.length, l = "", u = 0; u < a; u++) l !== "" && o.has(u) && (e.push(l), l = ""), l += i[u]; if (l !== "" && e.push(l), o = e.length, o === 0) return []; if (e[0] === i) return [n]; var f = e[0]; i = n.getParentOrThrow(), u = n.getFormat(); let d = n.getStyle(), h = n.__detail; a = !1, n.isSegmented() ? (l = rr(f), l.__format = u, l.__style = d, l.__detail = h, a = !0) : (l = n.getWritable(), l.__text = f), n = pn(), l = [l], f = f.length; for (let w = 1; w < o; w++) { var m = e[w], g = m.length; m = rr(m).getWritable(), m.__format = u, m.__style = d, m.__detail = h; let x = m.__key; if (g = f + g, xt(n)) { let _ = n.anchor, S = n.focus; _.key === r && _.type === "text" && _.offset > f && _.offset <= g && (_.key = x, _.offset -= f, n.dirty = !0), S.key === r && S.type === "text" && S.offset > f && S.offset <= g && (S.key = x, S.offset -= f, n.dirty = !0); } s === r && Pi(x), f = g, l.push(m); } return r = this.getPreviousSibling(), s = this.getNextSibling(), r !== null && Uy(r), s !== null && Uy(s), r = i.getWritable(), s = this.getIndexWithinParent(), a ? (r.splice(s, 0, l), this.remove()) : r.splice(s, 1, l), xt(n) && Xy(n, i, s, o - 1), l; } mergeWithSibling(e) { var n = e === this.getPreviousSibling(); n || e === this.getNextSibling() || Le(50); var i = this.__key; let r = e.__key, s = this.__text, o = s.length; xu() === r && Pi(i); let a = pn(); if (xt(a)) { let l = a.anchor, u = a.focus; l !== null && l.key === r && (aM(l, n, i, e, o), a.dirty = !0), u !== null && u.key === r && (aM(u, n, i, e, o), a.dirty = !0); } return i = e.__text, this.setTextContent(n ? i + s : s + i), n = this.getWritable(), e.remove(), n; } isTextEntity() { return !1; } } function eie(t) { let e = t.style.fontWeight === "700", n = t.style.textDecoration === "line-through", i = t.style.fontStyle === "italic", r = t.style.textDecoration === "underline", s = t.style.verticalAlign; return { forChild: (o) => (Ze(o) && (e && o.toggleFormat("bold"), n && o.toggleFormat("strikethrough"), i && o.toggleFormat("italic"), r && o.toggleFormat("underline"), s === "sub" && o.toggleFormat("subscript"), s === "super" && o.toggleFormat("superscript")), o), node: null }; } function tie(t) { let e = t.style.fontWeight === "normal"; return { forChild: (n) => (Ze(n) && !e && n.toggleFormat("bold"), n), node: null }; } let K$ = /* @__PURE__ */ new WeakMap(); function nie(t) { t.parentElement === null && Le(129); for (var e = t.textContent || "", n, i = t.parentNode, r = [t]; i !== null && (n = K$.get(i)) === void 0 && !(i.nodeName === "PRE" || i.nodeType === 1 && i.style !== void 0 && i.style.whiteSpace !== void 0 && i.style.whiteSpace.startsWith("pre")); ) r.push(i), i = i.parentNode; for (n = n === void 0 ? i : n, i = 0; i < r.length; i++) K$.set(r[i], n); if (n !== null) { for (e = e.split(/(\r?\n|\t)/), t = [], r = e.length, n = 0; n < r; n++) i = e[n], i === ` ` || i === `\r ` ? t.push(Sh()) : i === " " ? t.push(Rk()) : i !== "" && t.push(rr(i)); return { node: t }; } if (e = e.replace(/\r/g, "").replace(/[ \t\n]+/g, " "), e === "") return { node: null }; if (e[0] === " ") { for (r = t, n = !0; r !== null && (r = J$(r, !1)) !== null; ) if (i = r.textContent || "", 0 < i.length) { /[ \t\n]$/.test(i) && (e = e.slice(1)), n = !1; break; } n && (e = e.slice(1)); } if (e[e.length - 1] === " ") { for (r = !0; t !== null && (t = J$(t, !0)) !== null; ) if (0 < (t.textContent || "").replace(/^( |\t|\r?\n)+/, "").length) { r = !1; break; } r && (e = e.slice(0, e.length - 1)); } return e === "" ? { node: null } : { node: rr(e) }; } let iie = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/, "i"); function J$(t, e) { for (; ; ) { for (var n = void 0; (n = e ? t.nextSibling : t.previousSibling) === null; ) if (t = t.parentElement, t === null) return null; if (t = n, t.nodeType === 1 && (n = t.style.display, n === "" && t.nodeName.match(iie) === null || n !== "" && !n.startsWith("inline"))) return null; for (; (n = e ? t.firstChild : t.lastChild) !== null; ) t = n; if (t.nodeType === 3) return t; if (t.nodeName === "BR") return null; } } let rie = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" }; function nu(t) { let e = rie[t.nodeName.toLowerCase()]; return e === void 0 ? { node: null } : { forChild: (n) => (Ze(n) && !n.hasFormat(e) && n.toggleFormat(e), n), node: null }; } function rr(t = "") { return i1(new Mf(t)); } function Ze(t) { return t instanceof Mf; } let Lk = class IF extends Mf { static getType() { return "tab"; } static clone(e) { let n = new IF(e.__key); return n.__text = e.__text, n.__format = e.__format, n.__style = e.__style, n; } constructor(e) { super(" ", e), this.__detail = 2; } static importDOM() { return null; } static importJSON(e) { let n = Rk(); return n.setFormat(e.format), n.setStyle(e.style), n; } exportJSON() { return { ...super.exportJSON(), type: "tab", version: 1 }; } setTextContent() { Le(126); } setDetail() { Le(127); } setMode() { Le(128); } canInsertTextBefore() { return !1; } canInsertTextAfter() { return !1; } }; function Rk() { return i1(new Lk()); } function LF(t) { return t instanceof Lk; } class sie { constructor(e, n, i) { this._selection = null, this.key = e, this.offset = n, this.type = i; } is(e) { return this.key === e.key && this.offset === e.offset && this.type === e.type; } isBefore(e) { let n = this.getNode(), i = e.getNode(), r = this.offset; if (e = e.offset, xe(n)) { var s = n.getDescendantByIndex(r); n = s ?? n; } return xe(i) && (s = i.getDescendantByIndex(e), i = s ?? i), n === i ? r < e : n.isBefore(i); } getNode() { let e = Tr(this.key); return e === null && Le(20), e; } set(e, n, i) { let r = this._selection, s = this.key; this.key = e, this.offset = n, this.type = i, Vh() || (xu() === s && Pi(e), r !== null && (r.setCachedNodes(null), r.dirty = !0)); } } function Ro(t, e, n) { return new sie(t, e, n); } function f3(t, e) { let n = e.__key, i = t.offset, r = "element"; if (Ze(e)) r = "text", e = e.getTextContentSize(), i > e && (i = e); else if (!xe(e)) { var s = e.getNextSibling(); Ze(s) ? (n = s.__key, i = 0, r = "text") : (s = e.getParent()) && (n = s.__key, i = e.getIndexWithinParent() + 1); } t.set(n, i, r); } function eM(t, e) { if (xe(e)) { let n = e.getLastDescendant(); xe(n) || Ze(n) ? f3(t, n) : f3(t, e); } else f3(t, e); } function tM(t, e, n, i) { let r = t.getNode(), s = r.getChildAtIndex(t.offset), o = rr(), a = Ws(r) ? kl().append(o) : o; o.setFormat(n), o.setStyle(i), s === null ? r.append(a) : s.insertBefore(a), t.is(e) && e.set(o.__key, 0, "text"), t.set(o.__key, 0, "text"); } function fu(t, e, n, i) { t.key = e, t.offset = n, t.type = i; } let RF = class jF { constructor(e) { this._cachedNodes = null, this._nodes = e, this.dirty = !1; } getCachedNodes() { return this._cachedNodes; } setCachedNodes(e) { this._cachedNodes = e; } is(e) { if (!r1(e)) return !1; let n = this._nodes, i = e._nodes; return n.size === i.size && Array.from(n).every((r) => i.has(r)); } isCollapsed() { return !1; } isBackward() { return !1; } getStartEndPoints() { return null; } add(e) { this.dirty = !0, this._nodes.add(e), this._cachedNodes = null; } delete(e) { this.dirty = !0, this._nodes.delete(e), this._cachedNodes = null; } clear() { this.dirty = !0, this._nodes.clear(), this._cachedNodes = null; } has(e) { return this._nodes.has(e); } clone() { return new jF(new Set(this._nodes)); } extract() { return this.getNodes(); } insertRawText() { } insertText() { } insertNodes(e) { let n = this.getNodes(), i = n.length; var r = n[i - 1]; if (Ze(r)) r = r.select(); else { let s = r.getIndexWithinParent() + 1; r = r.getParentOrThrow().select(s, s); } for (r.insertNodes(e), e = 0; e < i; e++) n[e].remove(); } getNodes() { var e = this._cachedNodes; if (e !== null) return e; var n = this._nodes; e = []; for (let i of n) n = Tr(i), n !== null && e.push(n); return Vh() || (this._cachedNodes = e), e; } getTextContent() { let e = this.getNodes(), n = ""; for (let i = 0; i < e.length; i++) n += e[i].getTextContent(); return n; } }; function xt(t) { return t instanceof qh; } let qh = class FF { constructor(e, n, i, r) { this.anchor = e, this.focus = n, e._selection = this, n._selection = this, this._cachedNodes = null, this.format = i, this.style = r, this.dirty = !1; } getCachedNodes() { return this._cachedNodes; } setCachedNodes(e) { this._cachedNodes = e; } is(e) { return xt(e) ? this.anchor.is(e.anchor) && this.focus.is(e.focus) && this.format === e.format && this.style === e.style : !1; } isCollapsed() { return this.anchor.is(this.focus); } getNodes() { var e = this._cachedNodes; if (e !== null) return e; e = this.anchor; var n = this.focus, i = e.isBefore(n), r = i ? e : n; i = i ? n : e, e = r.getNode(), n = i.getNode(); let s = r.offset; return r = i.offset, xe(e) && (i = e.getDescendantByIndex(s), e = i ?? e), xe(n) && (i = n.getDescendantByIndex(r), i !== null && i !== e && n.getChildAtIndex(r) === i && (i = i.getPreviousSibling()), n = i ?? n), e = e.is(n) ? xe(e) && 0 < e.getChildrenSize() ? [] : [e] : e.getNodesBetween(n), Vh() || (this._cachedNodes = e), e; } setTextNodeRange(e, n, i, r) { fu(this.anchor, e.__key, n, "text"), fu(this.focus, i.__key, r, "text"), this._cachedNodes = null, this.dirty = !0; } getTextContent() { let e = this.getNodes(); if (e.length === 0) return ""; let n = e[0], i = e[e.length - 1], r = this.anchor, s = this.focus, o = r.isBefore(s), [a, l] = s4(this), u = "", f = !0; for (let d = 0; d < e.length; d++) { let h = e[d]; if (xe(h) && !h.isInline()) f || (u += ` `), f = !h.isEmpty(); else if (f = !1, Ze(h)) { let m = h.getTextContent(); h === n ? h === i ? (r.type !== "element" || s.type !== "element" || s.offset === r.offset) && (m = a < l ? m.slice(a, l) : m.slice(l, a)) : m = o ? m.slice(a) : m.slice(l) : h === i && (m = o ? m.slice(0, l) : m.slice(0, a)), u += m; } else !ii(h) && !hf(h) || h === i && this.isCollapsed() || (u += h.getTextContent()); } return u; } applyDOMRange(e) { let n = Ln(), i = n.getEditorState()._selection; if (e = zF(e.startContainer, e.startOffset, e.endContainer, e.endOffset, n, i), e !== null) { var [r, s] = e; fu(this.anchor, r.key, r.offset, r.type), fu(this.focus, s.key, s.offset, s.type), this._cachedNodes = null; } } clone() { let e = this.anchor, n = this.focus; return new FF(Ro(e.key, e.offset, e.type), Ro(n.key, n.offset, n.type), this.format, this.style); } toggleFormat(e) { this.format = US(this.format, e, null), this.dirty = !0; } setStyle(e) { this.style = e, this.dirty = !0; } hasFormat(e) { return (this.format & Oh[e]) !== 0; } insertRawText(e) { e = e.split(/(\r?\n|\t)/); let n = [], i = e.length; for (let r = 0; r < i; r++) { let s = e[r]; s === ` ` || s === `\r ` ? n.push(Sh()) : s === " " ? n.push(Rk()) : n.push(rr(s)); } this.insertNodes(n); } insertText(e) { var n = this.anchor, i = this.focus, r = this.isCollapsed() || n.isBefore(i), s = this.format, o = this.style; r && n.type === "element" ? tM(n, i, s, o) : r || i.type !== "element" || tM(i, n, s, o); var a = this.getNodes(), l = a.length, u = r ? i : n; i = (r ? n : i).offset; var f = u.offset; n = a[0], Ze(n) || Le(26), r = n.getTextContent().length; var d = n.getParentOrThrow(), h = a[l - 1]; if (this.isCollapsed() && i === r && (n.isSegmented() || n.isToken() || !n.canInsertTextAfter() || !d.canInsertTextAfter() && n.getNextSibling() === null)) { var m = n.getNextSibling(); if (Ze(m) && m.canInsertTextBefore() && !QS(m) || (m = rr(), m.setFormat(s), d.canInsertTextAfter() ? n.insertAfter(m) : d.insertAfter(m)), m.select(0, 0), n = m, e !== "") { this.insertText(e); return; } } else if (this.isCollapsed() && i === 0 && (n.isSegmented() || n.isToken() || !n.canInsertTextBefore() || !d.canInsertTextBefore() && n.getPreviousSibling() === null)) { if (m = n.getPreviousSibling(), (!Ze(m) || QS(m)) && (m = rr(), m.setFormat(s), d.canInsertTextBefore() ? n.insertBefore(m) : d.insertBefore(m)), m.select(), n = m, e !== "") { this.insertText(e); return; } } else if (n.isSegmented() && i !== r) d = rr(n.getTextContent()), d.setFormat(s), n.replace(d), n = d; else if (!(this.isCollapsed() || e === "" || (m = h.getParent(), d.canInsertTextBefore() && d.canInsertTextAfter() && (!xe(m) || m.canInsertTextBefore() && m.canInsertTextAfter())))) { this.insertText(""), BF(this.anchor, this.focus, null), this.insertText(e); return; } if (l === 1) if (n.isToken()) e = rr(e), e.select(), n.replace(e); else { if (a = n.getFormat(), l = n.getStyle(), i === f && (a !== s || l !== o)) if (n.getTextContent() === "") n.setFormat(s), n.setStyle(o); else { a = rr(e), a.setFormat(s), a.setStyle(o), a.select(), i === 0 ? n.insertBefore(a, !1) : ([l] = n.splitText(i), l.insertAfter(a, !1)), a.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length); return; } else if (LF(n)) { e = rr(e), e.setFormat(s), e.setStyle(o), e.select(), n.replace(e); return; } n = n.spliceText(i, f - i, e, !0), n.getTextContent() === "" ? n.remove() : this.anchor.type === "text" && (n.isComposing() ? this.anchor.offset -= e.length : (this.format = a, this.style = l)); } else { if (s = /* @__PURE__ */ new Set([...n.getParentKeys(), ...h.getParentKeys()]), m = xe(n) ? n : n.getParentOrThrow(), o = xe(h) ? h : h.getParentOrThrow(), d = h, !m.is(o) && o.isInline()) do d = o, o = o.getParentOrThrow(); while (o.isInline()); if (u.type === "text" && (f !== 0 || h.getTextContent() === "") || u.type === "element" && h.getIndexWithinParent() < f) if (Ze(h) && !h.isToken() && f !== h.getTextContentSize()) { if (h.isSegmented()) { var g = rr(h.getTextContent()); h.replace(g), h = g; } Ws(u.getNode()) || u.type !== "text" || (h = h.spliceText(0, f, "")), s.add(h.__key); } else u = h.getParentOrThrow(), u.canBeEmpty() || u.getChildrenSize() !== 1 ? h.remove() : u.remove(); else s.add(h.__key); for (u = o.getChildren(), f = new Set(a), h = m.is(o), m = m.isInline() && n.getNextSibling() === null ? m : n, g = u.length - 1; 0 <= g; g--) { let w = u[g]; if (w.is(n) || xe(w) && w.isParentOf(n)) break; w.isAttached() && (!f.has(w) || w.is(d) ? h || m.insertAfter(w, !1) : w.remove()); } if (!h) for (u = o, o = null; u !== null; ) f = u.getChildren(), h = f.length, (h === 0 || f[h - 1].is(o)) && (s.delete(u.__key), o = u), u = u.getParent(); for (n.isToken() ? i === r ? n.select() : (e = rr(e), e.select(), n.replace(e)) : (n = n.spliceText(i, r - i, e, !0), n.getTextContent() === "" ? n.remove() : n.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length)), e = 1; e < l; e++) n = a[e], s.has(n.__key) || n.remove(); } } removeText() { this.insertText(""); } formatText(e) { if (this.isCollapsed()) this.toggleFormat(e), Pi(null); else { var n = this.getNodes(), i = []; for (var r of n) Ze(r) && i.push(r); var s = i.length; if (s === 0) this.toggleFormat(e), Pi(null); else { r = this.anchor; var o = this.focus, a = this.isBackward(); n = a ? o : r, r = a ? r : o; var l = 0, u = i[0]; if (o = n.type === "element" ? 0 : n.offset, n.type === "text" && o === u.getTextContentSize() && (l = 1, u = i[1], o = 0), u != null) { a = u.getFormatFlags(e, null); var f = s - 1, d = i[f]; if (s = r.type === "text" ? r.offset : d.getTextContentSize(), u.is(d)) o !== s && (o === 0 && s === u.getTextContentSize() ? u.setFormat(a) : (e = u.splitText(o, s), e = o === 0 ? e[0] : e[1], e.setFormat(a), n.type === "text" && n.set(e.__key, 0, "text"), r.type === "text" && r.set(e.__key, s - o, "text")), this.format = a); else { o !== 0 && ([, u] = u.splitText(o), o = 0), u.setFormat(a); var h = d.getFormatFlags(e, a); for (0 < s && (s !== d.getTextContentSize() && ([d] = d.splitText(s)), d.setFormat(h)), l += 1; l < f; l++) { let m = i[l]; if (!m.isToken()) { let g = m.getFormatFlags(e, h); m.setFormat(g); } } n.type === "text" && n.set(u.__key, o, "text"), r.type === "text" && r.set(d.__key, s, "text"), this.format = a | h; } } } } } insertNodes(e) { if (e.length !== 0) { if (this.anchor.key === "root") { this.insertParagraph(); var n = pn(); return xt(n) || Le(134), n.insertNodes(e); } n = this.isBackward() ? this.focus : this.anchor; var i = s3(n.getNode(), jd); if (n = e[e.length - 1], "__language" in i && xe(i)) if ("__language" in e[0]) this.insertText(e[0].getTextContent()); else { var r = d3(this); i.splice(r, 0, e), n.selectEnd(); } else if (e.some((a) => (xe(a) || ii(a)) && !a.isInline())) { n = uie(e), e = n.getLastDescendant(); var s = n.getChildren(); n = xe(i) && i.isEmpty() ? null : this.insertParagraph(), r = s[s.length - 1]; var o = s[0]; ((a) => xe(a) && jd(a) && !a.isEmpty() && xe(i) && (!i.isEmpty() || "__value" in i && "__checked" in i))(o) && (xe(i) || Le(135), i.append(...o.getChildren()), o = s[1]), o && Kne(i, o), s = s3(e, jd), n && xe(s) && ("__value" in n && "__checked" in n || jd(r)) && (s.append(...n.getChildren()), n.remove()), xe(i) && i.isEmpty() && i.remove(), e.selectEnd(), e = xe(i) ? i.getLastChild() : null, hf(e) && s !== i && e.remove(); } else xe(i) || Le(135), r = d3(this), i.splice(r, 0, e), n.selectEnd(); } } insertParagraph() { if (this.anchor.key === "root") { var e = kl(); return Zs().splice(this.anchor.offset, 0, [e]), e.select(), e; } var n = d3(this); return e = s3(this.anchor.getNode(), jd), xe(e) || Le(136), n = (n = e.getChildAtIndex(n)) ? [n, ...n.getNextSiblings()] : [], (e = e.insertNewAfter(this, !1)) ? (e.append(...n), e.selectStart(), e) : null; } insertLineBreak(e) { var n = Sh(); this.insertNodes([n]), e && (e = n.getParentOrThrow(), n = n.getIndexWithinParent(), e.select(n, n)); } extract() { var e = this.getNodes(), n = e.length, i = n - 1, r = this.anchor; let s = this.focus; var o = e[0]; let a = e[i], [l, u] = s4(this); return n === 0 ? [] : n === 1 ? Ze(o) && !this.isCollapsed() ? (e = l > u ? u : l, i = o.splitText(e, l > u ? l : u), e = e === 0 ? i[0] : i[1], e != null ? [e] : []) : [o] : (n = r.isBefore(s), Ze(o) && (r = n ? l : u, r === o.getTextContentSize() ? e.shift() : r !== 0 && ([, o] = o.splitText(r), e[0] = o)), Ze(a) && (o = a.getTextContent().length, n = n ? u : l, n === 0 ? e.pop() : n !== o && ([a] = a.splitText(n), e[i] = a)), e); } modify(e, n, i) { var r = this.focus, s = this.anchor, o = e === "move", a = ZS(r, n); if (ii(a) && !a.isIsolated()) o && a.isKeyboardSelectable() ? (n = o4(), n.add(a.__key), $a(n)) : (e = n ? a.getPreviousSibling() : a.getNextSibling(), Ze(e) ? (a = e.__key, n = n ? e.getTextContent().length : 0, r.set(a, n, "text"), o && s.set(a, n, "text")) : (i = a.getParentOrThrow(), xe(e) ? (i = e.__key, a = n ? e.getChildrenSize() : 0) : (a = a.getIndexWithinParent(), i = i.__key, n || a++), r.set(i, a, "element"), o && s.set(i, a, "element"))); else if (s = Ln(), r = La(s._window)) { var l = s._blockCursorElement, u = s._rootElement; if (u === null || l === null || !xe(a) || a.isInline() || a.canBeEmpty() || qS(l, s, u), r.modify(e, n ? "backward" : "forward", i), 0 < r.rangeCount && (a = r.getRangeAt(0), s = this.anchor.getNode(), s = Ws(s) ? s : yF(s), this.applyDOMRange(a), this.dirty = !0, !o)) { for (o = this.getNodes(), e = [], i = !1, l = 0; l < o.length; l++) u = o[l], Yy(u, s) ? e.push(u) : i = !0; i && 0 < e.length && (n ? (n = e[0], xe(n) ? n.selectStart() : n.getParentOrThrow().selectStart()) : (n = e[e.length - 1], xe(n) ? n.selectEnd() : n.getParentOrThrow().selectEnd())), (r.anchorNode !== a.startContainer || r.anchorOffset !== a.startOffset) && (n = this.focus, o = this.anchor, r = o.key, a = o.offset, s = o.type, fu(o, n.key, n.offset, n.type), fu(n, r, a, s), this._cachedNodes = null); } } } deleteCharacter(e) { let n = this.isCollapsed(); if (this.isCollapsed()) { var i = this.anchor, r = this.focus, s = i.getNode(); if (!e && (i.type === "element" && xe(s) && i.offset === s.getChildrenSize() || i.type === "text" && i.offset === s.getTextContentSize())) { var o = s.getParent(); if (o = s.getNextSibling() || (o === null ? null : o.getNextSibling()), xe(o) && o.isShadowRoot()) return; } if (o = ZS(r, e), ii(o) && !o.isIsolated()) { o.isKeyboardSelectable() && xe(s) && s.getChildrenSize() === 0 ? (s.remove(), e = o4(), e.add(o.__key), $a(e)) : (o.remove(), Ln().dispatchCommand(Tk, void 0)); return; } if (!e && xe(o) && xe(s) && s.isEmpty()) { s.remove(), o.selectStart(); return; } if (this.modify("extend", e, "character"), this.isCollapsed()) { if (e && i.offset === 0 && (i.type === "element" ? i.getNode() : i.getNode().getParentOrThrow()).collapseAtStart(this)) return; } else { if (o = r.type === "text" ? r.getNode() : null, s = i.type === "text" ? i.getNode() : null, o !== null && o.isSegmented()) { if (i = r.offset, r = o.getTextContentSize(), o.is(s) || e && i !== r || !e && i !== 0) { iM(o, e, i); return; } } else if (s !== null && s.isSegmented() && (i = i.offset, r = s.getTextContentSize(), s.is(o) || e && i !== 0 || !e && i !== r)) { iM(s, e, i); return; } if (s = this.anchor, o = this.focus, i = s.getNode(), r = o.getNode(), i === r && s.type === "text" && o.type === "text") { var a = s.offset, l = o.offset; let u = a < l; r = u ? a : l, l = u ? l : a, a = l - 1, r !== a && (i = i.getTextContent().slice(r, l), gF(i) || (e ? o.offset = a : s.offset = a)); } } } this.removeText(), e && !n && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (e = this.anchor.getNode(), e.isEmpty() && Ws(e.getParent()) && e.getIndexWithinParent() === 0 && e.collapseAtStart(this)); } deleteLine(e) { this.isCollapsed() && (this.anchor.type === "text" && this.modify("extend", e, "lineboundary"), (e ? this.focus : this.anchor).offset === 0 && this.modify("extend", e, "character")), this.removeText(); } deleteWord(e) { this.isCollapsed() && this.modify("extend", e, "word"), this.removeText(); } isBackward() { return this.focus.isBefore(this.anchor); } getStartEndPoints() { return [this.anchor, this.focus]; } }; function r1(t) { return t instanceof RF; } function nM(t) { let e = t.offset; return t.type === "text" ? e : (t = t.getNode(), e === t.getChildrenSize() ? t.getTextContent().length : 0); } function s4(t) { if (t = t.getStartEndPoints(), t === null) return [0, 0]; let [e, n] = t; return e.type === "element" && n.type === "element" && e.key === n.key && e.offset === n.offset ? [0, 0] : [nM(e), nM(n)]; } function iM(t, e, n) { let i = t.getTextContent().split(/(?=\s)/g), r = i.length, s = 0, o = 0; for (let a = 0; a < r; a++) { let l = i[a], u = a === r - 1; if (o = s, s += l.length, e && s === n || s > n || u) { i.splice(a, 1), u && (o = void 0); break; } } e = i.join("").trim(), e === "" ? t.remove() : (t.setTextContent(e), t.select(o, o)); } function rM(t, e, n, i) { var r = e; if (t.nodeType === 1) { let a = !1; var s = t.childNodes, o = s.length; r === o && (a = !0, r = o - 1); let l = s[r]; if (o = !1, l === i._blockCursorElement ? (l = s[r + 1], o = !0) : i._blockCursorElement !== null && r--, i = Xd(l), Ze(i)) r = a ? i.getTextContentSize() : 0; else { if (s = Xd(t), s === null) return null; if (xe(s) ? (t = s.getChildAtIndex(r), (e = xe(t)) && (e = t.getParent(), e = n === null || e === null || !e.canBeEmpty() || e !== n.getNode()), e && (n = a ? t.getLastDescendant() : t.getFirstDescendant(), n === null ? (s = t, r = 0) : (t = n, s = xe(t) ? t : t.getParentOrThrow())), Ze(t) ? (i = t, s = null, r = a ? t.getTextContentSize() : 0) : t !== s && a && !o && r++) : (r = s.getIndexWithinParent(), r = e === 0 && ii(s) && Xd(t) === s ? r : r + 1, s = s.getParentOrThrow()), xe(s)) return Ro(s.__key, r, "element"); } } else i = Xd(t); return Ze(i) ? Ro(i.__key, r, "text") : null; } function sM(t, e, n) { var i = t.offset, r = t.getNode(); i === 0 ? (i = r.getPreviousSibling(), r = r.getParent(), e ? (n || !e) && i === null && xe(r) && r.isInline() && (e = r.getPreviousSibling(), Ze(e) && (t.key = e.__key, t.offset = e.getTextContent().length)) : xe(i) && !n && i.isInline() ? (t.key = i.__key, t.offset = i.getChildrenSize(), t.type = "element") : Ze(i) && (t.key = i.__key, t.offset = i.getTextContent().length)) : i === r.getTextContent().length && (i = r.getNextSibling(), r = r.getParent(), e && xe(i) && i.isInline() ? (t.key = i.__key, t.offset = 0, t.type = "element") : (n || e) && i === null && xe(r) && r.isInline() && !r.canInsertTextAfter() && (e = r.getNextSibling(), Ze(e) && (t.key = e.__key, t.offset = 0))); } function BF(t, e, n) { if (t.type === "text" && e.type === "text") { var i = t.isBefore(e); let r = t.is(e); sM(t, i, r), sM(e, !i, r), r && (e.key = t.key, e.offset = t.offset, e.type = t.type), i = Ln(), i.isComposing() && i._compositionKey !== t.key && xt(n) && (i = n.anchor, n = n.focus, fu(t, i.key, i.offset, i.type), fu(e, n.key, n.offset, n.type)); } } function zF(t, e, n, i, r, s) { return t === null || n === null || !t1(r, t, n) || (e = rM(t, e, xt(s) ? s.anchor : null, r), e === null) || (i = rM(n, i, xt(s) ? s.focus : null, r), i === null || e.type === "element" && i.type === "element" && (t = Xd(t), n = Xd(n), ii(t) && ii(n))) ? null : (BF(e, i, s), [e, i]); } function WF(t, e, n, i, r, s) { let o = Ra(); return t = new qh(Ro(t, e, r), Ro(n, i, s), 0, ""), t.dirty = !0, o._selection = t; } function o4() { return new RF(/* @__PURE__ */ new Set()); } function oie(t) { let e = t.getEditorState()._selection, n = La(t._window); return xt(e) || e == null ? u5(e, n, t, null) : e.clone(); } function u5(t, e, n, i) { var r = n._window; if (r === null) return null; var s = (r = i || r.event) ? r.type : void 0; i = s === "selectionchange", r = !HS && (i || s === "beforeinput" || s === "compositionstart" || s === "compositionend" || s === "click" && r && r.detail === 3 || s === "drop" || s === void 0); let o; if (!xt(t) || r) { if (e === null) return null; if (r = e.anchorNode, s = e.focusNode, o = e.anchorOffset, e = e.focusOffset, i && xt(t) && !t1(n, r, s)) return t.clone(); } else return t.clone(); if (n = zF(r, o, s, e, n, t), n === null) return null; let [a, l] = n; return new qh(a, l, xt(t) ? t.format : 0, xt(t) ? t.style : ""); } function pn() { return Ra()._selection; } function Yh() { return Ln()._editorState._selection; } function Xy(t, e, n, i = 1) { var r = t.anchor, s = t.focus, o = r.getNode(), a = s.getNode(); if (e.is(o) || e.is(a)) { if (o = e.__key, t.isCollapsed()) e = r.offset, (n <= e && 0 < i || n < e && 0 > i) && (n = Math.max(0, e + i), r.set(o, n, "element"), s.set(o, n, "element"), oM(t)); else { let u = t.isBackward(); a = u ? s : r; var l = a.getNode(); r = u ? r : s, s = r.getNode(), e.is(l) && (l = a.offset, (n <= l && 0 < i || n < l && 0 > i) && a.set(o, Math.max(0, l + i), "element")), e.is(s) && (e = r.offset, (n <= e && 0 < i || n < e && 0 > i) && r.set(o, Math.max(0, e + i), "element")); } oM(t); } } function oM(t) { var e = t.anchor, n = e.offset; let i = t.focus; var r = i.offset, s = e.getNode(), o = i.getNode(); if (t.isCollapsed()) xe(s) && (o = s.getChildrenSize(), o = (r = n >= o) ? s.getChildAtIndex(o - 1) : s.getChildAtIndex(n), Ze(o) && (n = 0, r && (n = o.getTextContentSize()), e.set(o.__key, n, "text"), i.set(o.__key, n, "text"))); else { if (xe(s)) { let a = s.getChildrenSize(); n = (t = n >= a) ? s.getChildAtIndex(a - 1) : s.getChildAtIndex(n), Ze(n) && (s = 0, t && (s = n.getTextContentSize()), e.set(n.__key, s, "text")); } xe(o) && (n = o.getChildrenSize(), r = (e = r >= n) ? o.getChildAtIndex(n - 1) : o.getChildAtIndex(r), Ze(r) && (o = 0, e && (o = r.getTextContentSize()), i.set(r.__key, o, "text"))); } } function aie(t, e) { if (e = e.getEditorState()._selection, t = t._selection, xt(t)) { var n = t.anchor; let i = t.focus, r; n.type === "text" && (r = n.getNode(), r.selectionTransform(e, t)), i.type === "text" && (n = i.getNode(), r !== n && n.selectionTransform(e, t)); } } function Gy(t, e, n, i, r) { let s = null, o = 0, a = null; i !== null ? (s = i.__key, Ze(i) ? (o = i.getTextContentSize(), a = "text") : xe(i) && (o = i.getChildrenSize(), a = "element")) : r !== null && (s = r.__key, Ze(r) ? a = "text" : xe(r) && (a = "element")), s !== null && a !== null ? t.set(s, o, a) : (o = e.getIndexWithinParent(), o === -1 && (o = n.getChildrenSize()), t.set(n.__key, o, "element")); } function aM(t, e, n, i, r) { t.type === "text" ? (t.key = n, e || (t.offset += r)) : t.offset > i.getIndexWithinParent() && --t.offset; } function d3(t) { t.isCollapsed() || t.removeText(); var e = t.anchor; for (t = e.getNode(), e = e.offset; !jd(t); ) [t, e] = lie(t, e); return e; } function lie(t, e) { var n = t.getParent(); if (!n) return n = kl(), Zs().append(n), n.select(), [Zs(), 0]; if (Ze(t)) { var i = t.splitText(e); return i.length === 0 ? [n, t.getIndexWithinParent()] : (t = e === 0 ? 0 : 1, t = i[0].getIndexWithinParent() + t, [n, t]); } return !xe(t) || e === 0 ? [n, t.getIndexWithinParent()] : ((i = t.getChildAtIndex(e)) && (e = new qh(Ro(t.__key, e, "element"), Ro(t.__key, e, "element"), 0, ""), (e = t.insertNewAfter(e)) && e.append(i, ...i.getNextSiblings())), [n, t.getIndexWithinParent() + 1]); } function uie(t) { let e = kl(), n = null; for (let i = 0; i < t.length; i++) { let r = t[i], s = hf(r); if (s || ii(r) && r.isInline() || xe(r) && r.isInline() || Ze(r) || r.isParentRequired()) { if (n === null && (n = r.createParentElementNode(), e.append(n), s)) continue; n !== null && n.append(r); } else e.append(r), n = null; } return e; } let Qi = null, Ui = null, ws = !1, h3 = !1, Gg = 0, lM = { characterData: !0, childList: !0, subtree: !0 }; function Vh() { return ws || Qi !== null && Qi._readOnly; } function qr() { ws && Le(13); } function Ra() { return Qi === null && Le(15), Qi; } function Ln() { return Ui === null && Le(16), Ui; } function uM(t, e, n) { var i = e.__type; let r = t._nodes.get(i); for (r === void 0 && Le(30, i), t = n.get(i), t === void 0 && (t = Array.from(r.transforms), n.set(i, t)), n = t.length, i = 0; i < n && (t[i](e), e.isAttached()); i++) ; } function cie(t, e) { e = e._dirtyLeaves, t = t._nodeMap; for (let n of e) e = t.get(n), Ze(e) && e.isAttached() && e.isSimpleText() && !e.isUnmergeable() && fF(e); } function fie(t, e) { let n = e._dirtyLeaves, i = e._dirtyElements; t = t._nodeMap; let r = xu(), s = /* @__PURE__ */ new Map(); var o = n; let a = o.size; for (var l = i, u = l.size; 0 < a || 0 < u; ) { if (0 < a) { e._dirtyLeaves = /* @__PURE__ */ new Set(); for (let f of o) o = t.get(f), Ze(o) && o.isAttached() && o.isSimpleText() && !o.isUnmergeable() && fF(o), o !== void 0 && o !== void 0 && o.__key !== r && o.isAttached() && uM(e, o, s), n.add(f); if (o = e._dirtyLeaves, a = o.size, 0 < a) { Gg++; continue; } } e._dirtyLeaves = /* @__PURE__ */ new Set(), e._dirtyElements = /* @__PURE__ */ new Map(); for (let f of l) l = f[0], u = f[1], (l === "root" || u) && (o = t.get(l), o !== void 0 && o !== void 0 && o.__key !== r && o.isAttached() && uM(e, o, s), i.set(l, u)); o = e._dirtyLeaves, a = o.size, l = e._dirtyElements, u = l.size, Gg++; } e._dirtyLeaves = n, e._dirtyElements = i; } function c5(t, e) { var n = t.type, i = e.get(n); if (i === void 0 && Le(17, n), n = i.klass, t.type !== n.getType() && Le(18, n.name), n = n.importJSON(t), t = t.children, xe(n) && Array.isArray(t)) for (i = 0; i < t.length; i++) { let r = c5(t[i], e); n.append(r); } return n; } function cM(t, e) { let n = Qi, i = ws, r = Ui; Qi = t, ws = !0, Ui = null; try { return e(); } finally { Qi = n, ws = i, Ui = r; } } function af(t, e) { let n = t._pendingEditorState, i = t._rootElement, r = t._headless || i === null; if (n !== null) { var s = t._editorState, o = s._selection, a = n._selection, l = t._dirtyType !== 0, u = Qi, f = ws, d = Ui, h = t._updating, m = t._observer, g = null; if (t._pendingEditorState = null, t._editorState = n, !r && l && m !== null) { Ui = t, Qi = n, ws = !1, t._updating = !0; try { let He = t._dirtyType, Ct = t._dirtyElements, Lt = t._dirtyLeaves; m.disconnect(); var w = He, x = Ct, _ = Lt; Zr = dl = Ni = "", xF = w === 2, Kb = null, Ar = t, Hu = t._config, Yg = t._nodes, Pk = Ar._listeners.mutation, YS = x, VS = _, df = s._nodeMap, Qu = n._nodeMap, l5 = n._readOnly, XS = new Map(t._keyToDOMMap); let Be = /* @__PURE__ */ new Map(); Vg = Be, Xm("root", null), Vg = XS = Hu = Qu = df = VS = YS = Yg = Ar = void 0, g = Be; } catch (He) { if (He instanceof Error && t._onError(He), h3) throw He; ZF(t, null, i, n), cF(t), t._dirtyType = 2, h3 = !0, af(t, s), h3 = !1; return; } finally { m.observe(i, lM), t._updating = h, Qi = u, ws = f, Ui = d; } } n._readOnly || (n._readOnly = !0); var S = t._dirtyLeaves, C = t._dirtyElements, E = t._normalizedNodes, M = t._updateTags, $ = t._deferred; l && (t._dirtyType = 0, t._cloneNotNeeded.clear(), t._dirtyLeaves = /* @__PURE__ */ new Set(), t._dirtyElements = /* @__PURE__ */ new Map(), t._normalizedNodes = /* @__PURE__ */ new Set(), t._updateTags = /* @__PURE__ */ new Set()); var P = t._decorators, W = t._pendingDecorators || P, z = n._nodeMap, Z; for (Z in W) z.has(Z) || (W === P && (W = mF(t)), delete W[Z]); var L = r ? null : La(t._window); if (t._editable && L !== null && (l || a === null || a.dirty)) { Ui = t, Qi = n; try { if (m !== null && m.disconnect(), l || a === null || a.dirty) { let He = t._blockCursorElement; He !== null && qS(He, t, i); e: { let Ct = L.anchorNode, Lt = L.focusNode, Be = L.anchorOffset, Ie = L.focusOffset, ae = document.activeElement; if (!(M.has("collaboration") && ae !== i || ae !== null && n5(ae))) if (xt(a)) { var Q = a.anchor, V = a.focus, H = Q.key, R = V.key, q = qy(t, H), Y = qy(t, R), K = Q.offset, te = V.offset, se = a.format, ce = a.style, U = a.isCollapsed(), F = q, oe = Y, le = !1; if (Q.type === "text") { F = Qy(q); let Ue = Q.getNode(); le = Ue.getFormat() !== se || Ue.getStyle() !== ce; } else xt(o) && o.anchor.type === "text" && (le = !0); if (V.type === "text" && (oe = Qy(Y)), F !== null && oe !== null) { if (U && (o === null || le || xt(o) && (o.format !== se || o.style !== ce))) { var pe = performance.now(); MF = [se, ce, K, H, pe]; } if (Be === K && Ie === te && Ct === F && Lt === oe && (L.type !== "Range" || !U) && (ae !== null && i.contains(ae) || i.focus({ preventScroll: !0 }), Q.type !== "element")) break e; try { L.setBaseAndExtent(F, K, oe, te); } catch { } if (!M.has("skip-scroll-into-view") && a.isCollapsed() && i !== null && i === document.activeElement) { let Ue = a instanceof qh && a.anchor.type === "element" ? F.childNodes[K] || null : 0 < L.rangeCount ? L.getRangeAt(0) : null; if (Ue !== null) { let qt; if (Ue instanceof Text) { let vn = document.createRange(); vn.selectNode(Ue), qt = vn.getBoundingClientRect(); } else qt = Ue.getBoundingClientRect(); let Xn = i.ownerDocument, Dt = Xn.defaultView; if (Dt !== null) for (var { top: Re, bottom: ze } = qt, rt, pt, ge = i; ge !== null; ) { let vn = ge === Xn.body; if (vn) rt = 0, pt = Ak(t).innerHeight; else { let Za = ge.getBoundingClientRect(); rt = Za.top, pt = Za.bottom; } let Os = 0; if (Re < rt ? Os = -(rt - Re) : ze > pt && (Os = ze - pt), Os !== 0) if (vn) Dt.scrollBy(0, Os); else { let Za = ge.scrollTop; ge.scrollTop += Os; let qa = ge.scrollTop - Za; Re -= qa, ze -= qa; } if (vn) break; ge = Nk(ge); } } } t4 = !0; } } else o !== null && t1(t, Ct, Lt) && L.removeAllRanges(); } } e: { let He = t._blockCursorElement; if (xt(a) && a.isCollapsed() && a.anchor.type === "element" && i.contains(document.activeElement)) { let Ct = a.anchor, Lt = Ct.getNode(), Be = Ct.offset, Ie = Lt.getChildrenSize(), ae = !1, Ue = null; if (Be === Ie) { let qt = Lt.getChildAtIndex(Be - 1); r3(qt) && (ae = !0); } else { let qt = Lt.getChildAtIndex(Be); if (r3(qt)) { let Xn = qt.getPreviousSibling(); (Xn === null || r3(Xn)) && (ae = !0, Ue = t.getElementByKey(qt.__key)); } } if (ae) { let qt = t.getElementByKey(Lt.__key); if (He === null) { let Xn = t._config.theme, Dt = document.createElement("div"); Dt.contentEditable = "false", Dt.setAttribute("data-lexical-cursor", "true"); let vn = Xn.blockCursor; if (vn !== void 0) { if (typeof vn == "string") { let Os = vn.split(" "); vn = Xn.blockCursor = Os; } vn !== void 0 && Dt.classList.add(...vn); } t._blockCursorElement = He = Dt; } i.style.caretColor = "transparent", Ue === null ? qt.appendChild(He) : qt.insertBefore(He, Ue); break e; } } He !== null && qS(He, t, i); } m !== null && m.observe(i, lM); } finally { Ui = d, Qi = u; } } if (g !== null) { var De = g; let He = Array.from(t._listeners.mutation), Ct = He.length; for (let Lt = 0; Lt < Ct; Lt++) { let [Be, Ie] = He[Lt], ae = De.get(Ie); ae !== void 0 && Be(ae, { dirtyLeaves: S, prevEditorState: s, updateTags: M }); } } xt(a) || a === null || o !== null && o.is(a) || t.dispatchCommand(Tk, void 0); var st = t._pendingDecorators; st !== null && (t._decorators = st, t._pendingDecorators = null, _g("decorator", t, !0, st)); var It = Z$(e || s), At = Z$(n); if (It !== At && _g("textcontent", t, !0, At), _g("update", t, !0, { dirtyElements: C, dirtyLeaves: S, editorState: n, normalizedNodes: E, prevEditorState: e || s, tags: M }), t._deferred = [], $.length !== 0) { let He = t._updating; t._updating = !0; try { for (let Ct = 0; Ct < $.length; Ct++) $[Ct](); } finally { t._updating = He; } } var Ut = t._updates; if (Ut.length !== 0) { let He = Ut.shift(); if (He) { let [Ct, Lt] = He; HF(t, Ct, Lt); } } } } function _g(t, e, n, ...i) { let r = e._updating; e._updating = n; try { let s = Array.from(e._listeners[t]); for (t = 0; t < s.length; t++) s[t].apply(null, i); } finally { e._updating = r; } } function Pe(t, e, n) { if (t._updating === !1 || Ui !== t) { let s = !1; return t.update(() => { s = Pe(t, e, n); }), s; } let i = r5(t); for (let s = 4; 0 <= s; s--) for (let o = 0; o < i.length; o++) { var r = i[o]._commands.get(e); if (r !== void 0 && (r = r[s], r !== void 0)) { r = Array.from(r); let a = r.length; for (let l = 0; l < a; l++) if (r[l](n, t) === !0) return !0; } } return !1; } function fM(t, e) { let n = t._updates; for (e = e || !1; n.length !== 0; ) { var i = n.shift(); if (i) { let [r, s] = i, o; s !== void 0 && (i = s.onUpdate, o = s.tag, s.skipTransforms && (e = !0), i && t._deferred.push(i), o && t._updateTags.add(o)), r(); } } return e; } function HF(t, e, n) { let i = t._updateTags; var r, s = r = !1; if (n !== void 0) { var o = n.onUpdate; r = n.tag, r != null && i.add(r), r = n.skipTransforms || !1, s = n.discrete || !1; } o && t._deferred.push(o), n = t._editorState, o = t._pendingEditorState; let a = !1; (o === null || o._readOnly) && (o = t._pendingEditorState = new Fk(new Map((o || n)._nodeMap)), a = !0), o._flushSync = s, s = Qi; let l = ws, u = Ui, f = t._updating; Qi = o, ws = !1, t._updating = !0, Ui = t; try { a && (t._headless ? n._selection !== null && (o._selection = n._selection.clone()) : o._selection = oie(t)); let d = t._compositionKey; e(), r = fM(t, r), aie(o, t), t._dirtyType !== 0 && (r ? cie(o, t) : fie(o, t), fM(t), Wne(n, o, t._dirtyLeaves, t._dirtyElements)), d !== t._compositionKey && (o._flushSync = !0); let h = o._selection; if (xt(h)) { let m = o._nodeMap, g = h.focus.key; m.get(h.anchor.key) !== void 0 && m.get(g) !== void 0 || Le(19); } else r1(h) && h._nodes.size === 0 && (o._selection = null); } catch (d) { d instanceof Error && t._onError(d), t._pendingEditorState = n, t._dirtyType = 2, t._cloneNotNeeded.clear(), t._dirtyLeaves = /* @__PURE__ */ new Set(), t._dirtyElements.clear(), af(t); return; } finally { Qi = s, ws = l, Ui = u, t._updating = f, Gg = 0; } t._dirtyType !== 0 || die(o, t) ? o._flushSync ? (o._flushSync = !1, af(t)) : a && Fne(() => { af(t); }) : (o._flushSync = !1, a && (i.clear(), t._deferred = [], t._pendingEditorState = null)); } function qs(t, e, n) { t._updating ? t._updates.push([e, n]) : HF(t, e, n); } class QF extends Ik { constructor(e) { super(e); } decorate() { Le(47); } isIsolated() { return !1; } isInline() { return !0; } isKeyboardSelectable() { return !0; } } function ii(t) { return t instanceof QF; } class jk extends Ik { constructor(e) { super(e), this.__last = this.__first = null, this.__indent = this.__format = this.__size = 0, this.__dir = null; } getFormat() { return this.getLatest().__format; } getFormatType() { let e = this.getFormat(); return Dne[e] || ""; } getIndent() { return this.getLatest().__indent; } getChildren() { let e = [], n = this.getFirstChild(); for (; n !== null; ) e.push(n), n = n.getNextSibling(); return e; } getChildrenKeys() { let e = [], n = this.getFirstChild(); for (; n !== null; ) e.push(n.__key), n = n.getNextSibling(); return e; } getChildrenSize() { return this.getLatest().__size; } isEmpty() { return this.getChildrenSize() === 0; } isDirty() { let e = Ln()._dirtyElements; return e !== null && e.has(this.__key); } isLastChild() { let e = this.getLatest(), n = this.getParentOrThrow().getLastChild(); return n !== null && n.is(e); } getAllTextNodes() { let e = [], n = this.getFirstChild(); for (; n !== null; ) { if (Ze(n) && e.push(n), xe(n)) { let i = n.getAllTextNodes(); e.push(...i); } n = n.getNextSibling(); } return e; } getFirstDescendant() { let e = this.getFirstChild(); for (; e !== null; ) { if (xe(e)) { let n = e.getFirstChild(); if (n !== null) { e = n; continue; } } break; } return e; } getLastDescendant() { let e = this.getLastChild(); for (; e !== null; ) { if (xe(e)) { let n = e.getLastChild(); if (n !== null) { e = n; continue; } } break; } return e; } getDescendantByIndex(e) { let n = this.getChildren(), i = n.length; return e >= i ? (e = n[i - 1], xe(e) && e.getLastDescendant() || e || null) : (e = n[e], xe(e) && e.getFirstDescendant() || e || null); } getFirstChild() { let e = this.getLatest().__first; return e === null ? null : Tr(e); } getFirstChildOrThrow() { let e = this.getFirstChild(); return e === null && Le(45, this.__key), e; } getLastChild() { let e = this.getLatest().__last; return e === null ? null : Tr(e); } getLastChildOrThrow() { let e = this.getLastChild(); return e === null && Le(96, this.__key), e; } getChildAtIndex(e) { var n = this.getChildrenSize(); let i; if (e < n / 2) { for (i = this.getFirstChild(), n = 0; i !== null && n <= e; ) { if (n === e) return i; i = i.getNextSibling(), n++; } return null; } for (i = this.getLastChild(), --n; i !== null && n >= e; ) { if (n === e) return i; i = i.getPreviousSibling(), n--; } return null; } getTextContent() { let e = "", n = this.getChildren(), i = n.length; for (let r = 0; r < i; r++) { let s = n[r]; e += s.getTextContent(), xe(s) && r !== i - 1 && !s.isInline() && (e += ` `); } return e; } getTextContentSize() { let e = 0, n = this.getChildren(), i = n.length; for (let r = 0; r < i; r++) { let s = n[r]; e += s.getTextContentSize(), xe(s) && r !== i - 1 && !s.isInline() && (e += 2); } return e; } getDirection() { return this.getLatest().__dir; } hasFormat(e) { return e !== "" ? (e = W$[e], (this.getFormat() & e) !== 0) : !1; } select(e, n) { qr(); let i = pn(), r = e, s = n; var o = this.getChildrenSize(); if (!this.canBeEmpty()) { if (e === 0 && n === 0) { if (e = this.getFirstChild(), Ze(e) || xe(e)) return e.select(0, 0); } else if (!(e !== void 0 && e !== o || n !== void 0 && n !== o) && (e = this.getLastChild(), Ze(e) || xe(e))) return e.select(); } if (r === void 0 && (r = o), s === void 0 && (s = o), o = this.__key, xt(i)) i.anchor.set(o, r, "element"), i.focus.set(o, s, "element"), i.dirty = !0; else return WF(o, r, o, s, "element", "element"); return i; } selectStart() { let e = this.getFirstDescendant(); return e ? e.selectStart() : this.select(); } selectEnd() { let e = this.getLastDescendant(); return e ? e.selectEnd() : this.select(); } clear() { let e = this.getWritable(); return this.getChildren().forEach((n) => n.remove()), e; } append(...e) { return this.splice( this.getChildrenSize(), 0, e ); } setDirection(e) { let n = this.getWritable(); return n.__dir = e, n; } setFormat(e) { return this.getWritable().__format = e !== "" ? W$[e] : 0, this; } setIndent(e) { return this.getWritable().__indent = e, this; } splice(e, n, i) { let r = i.length, s = this.getChildrenSize(), o = this.getWritable(), a = o.__key; var l = [], u = []; let f = this.getChildAtIndex(e + n), d = null, h = s - n + r; if (e !== 0) if (e === s) d = this.getLastChild(); else { var m = this.getChildAtIndex(e); m !== null && (d = m.getPreviousSibling()); } if (0 < n) { var g = d === null ? this.getFirstChild() : d.getNextSibling(); for (m = 0; m < n; m++) { g === null && Le(100); var w = g.getNextSibling(), x = g.__key; g = g.getWritable(), of(g), u.push(x), g = w; } } for (m = d, w = 0; w < r; w++) { x = i[w], m !== null && x.is(m) && (d = m = m.getPreviousSibling()), g = x.getWritable(), g.__parent === a && h--, of(g); let _ = x.__key; m === null ? (o.__first = _, g.__prev = null) : (m = m.getWritable(), m.__next = _, g.__prev = m.__key), x.__key === a && Le(76), g.__parent = a, l.push(_), m = x; } if (e + n === s ? m !== null && (m.getWritable().__next = null, o.__last = m.__key) : f !== null && (e = f.getWritable(), m !== null ? (n = m.getWritable(), e.__prev = m.__key, n.__next = f.__key) : e.__prev = null), o.__size = h, u.length && (e = pn(), xt(e))) { u = new Set(u), l = new Set(l); let { anchor: _, focus: S } = e; dM(_, u, l) && Gy(_, _.getNode(), this, d, f), dM(S, u, l) && Gy(S, S.getNode(), this, d, f), h !== 0 || this.canBeEmpty() || Wu(this) || this.remove(); } return o; } exportJSON() { return { children: [], direction: this.getDirection(), format: this.getFormatType(), indent: this.getIndent(), type: "element", version: 1 }; } insertNewAfter() { return null; } canIndent() { return !0; } collapseAtStart() { return !1; } excludeFromCopy() { return !1; } canExtractContents() { return !0; } canReplaceWith() { return !0; } canInsertAfter() { return !0; } canBeEmpty() { return !0; } canInsertTextBefore() { return !0; } canInsertTextAfter() { return !0; } isInline() { return !1; } isShadowRoot() { return !1; } canMergeWith() { return !1; } extractWithChild() { return !1; } } function xe(t) { return t instanceof jk; } function dM(t, e, n) { for (t = t.getNode(); t; ) { let i = t.__key; if (e.has(i) && !n.has(i)) return !0; t = t.getParent(); } return !1; } class Xh extends jk { static getType() { return "root"; } static clone() { return new Xh(); } constructor() { super("root"), this.__cachedText = null; } getTopLevelElementOrThrow() { Le(51); } getTextContent() { let e = this.__cachedText; return !Vh() && Ln()._dirtyType !== 0 || e === null ? super.getTextContent() : e; } remove() { Le(52); } replace() { Le(53); } insertBefore() { Le(54); } insertAfter() { Le(55); } updateDOM() { return !1; } append(...e) { for (let n = 0; n < e.length; n++) { let i = e[n]; xe(i) || ii(i) || Le(56); } return super.append(...e); } static importJSON(e) { let n = Zs(); return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n; } exportJSON() { return { children: [], direction: this.getDirection(), format: this.getFormatType(), indent: this.getIndent(), type: "root", version: 1 }; } collapseAtStart() { return !0; } } function Ws(t) { return t instanceof Xh; } function die(t, e) { if (e = e.getEditorState()._selection, t = t._selection, t !== null) { if (t.dirty || !t.is(e)) return !0; } else if (e !== null) return !0; return !1; } function f5() { return new Fk(/* @__PURE__ */ new Map([["root", new Xh()]])); } function UF(t) { let e = t.exportJSON(); var n = t.constructor; if (e.type !== n.getType() && Le(130, n.name), xe(t)) { let i = e.children; for (Array.isArray(i) || Le(59, n.name), t = t.getChildren(), n = 0; n < t.length; n++) { let r = UF(t[n]); i.push(r); } } return e; } class Fk { constructor(e, n) { this._nodeMap = e, this._selection = n || null, this._readOnly = this._flushSync = !1; } isEmpty() { return this._nodeMap.size === 1 && this._selection === null; } read(e) { return cM(this, e); } clone(e) { return e = new Fk(this._nodeMap, e === void 0 ? this._selection : e), e._readOnly = !0, e; } toJSON() { return cM(this, () => ({ root: UF(Zs()) })); } } class Gh extends jk { static getType() { return "paragraph"; } static clone(e) { return new Gh(e.__key); } createDOM(e) { let n = document.createElement("p"); return e = wg(e.theme, "paragraph"), e !== void 0 && n.classList.add(...e), n; } updateDOM() { return !1; } static importDOM() { return { p: () => ({ conversion: hie, priority: 0 }) }; } exportDOM(e) { if ({ element: e } = super.exportDOM(e), e && Dk(e)) { this.isEmpty() && e.append(document.createElement("br")); var n = this.getFormatType(); e.style.textAlign = n, (n = this.getDirection()) && (e.dir = n), n = this.getIndent(), 0 < n && (e.style.textIndent = `${20 * n}px`); } return { element: e }; } static importJSON(e) { let n = kl(); return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n; } exportJSON() { return { ...super.exportJSON(), type: "paragraph", version: 1 }; } insertNewAfter(e, n) { e = kl(); let i = this.getDirection(); return e.setDirection(i), this.insertAfter(e, n), e; } collapseAtStart() { let e = this.getChildren(); if (e.length === 0 || Ze(e[0]) && e[0].getTextContent().trim() === "") { if (this.getNextSibling() !== null) return this.selectNext(), this.remove(), !0; if (this.getPreviousSibling() !== null) return this.selectPrevious(), this.remove(), !0; } return !1; } } function hie(t) { let e = kl(); return t.style && (e.setFormat(t.style.textAlign), t = parseInt(t.style.textIndent, 10) / 20, 0 < t && e.setIndent(t)), { node: e }; } function kl() { return i1(new Gh()); } function ZF(t, e, n, i) { let r = t._keyToDOMMap; r.clear(), t._editorState = f5(), t._pendingEditorState = i, t._compositionKey = null, t._dirtyType = 0, t._cloneNotNeeded.clear(), t._dirtyLeaves = /* @__PURE__ */ new Set(), t._dirtyElements.clear(), t._normalizedNodes = /* @__PURE__ */ new Set(), t._updateTags = /* @__PURE__ */ new Set(), t._updates = [], t._blockCursorElement = null, i = t._observer, i !== null && (i.disconnect(), t._observer = null), e !== null && (e.textContent = ""), n !== null && (n.textContent = "", r.set("root", n)); } function pie(t, e) { let n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), r = (s) => { Object.keys(s).forEach((o) => { let a = n.get(o); a === void 0 && (a = [], n.set(o, a)), a.push(s[o]); }); }; return t.forEach((s) => { s = s.klass.importDOM != null ? s.klass.importDOM.bind(s.klass) : null, s == null || i.has(s) || (i.add(s), s = s(), s !== null && r(s)); }), e && r(e), n; } class mie { constructor(e, n, i, r, s, o, a) { this._parentEditor = n, this._rootElement = null, this._editorState = e, this._compositionKey = this._pendingEditorState = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = r, this._nodes = i, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = 0, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = vF(), this._onError = s, this._htmlConversions = o, this._editable = a, this._headless = n !== null && n._headless, this._blockCursorElement = this._window = null; } isComposing() { return this._compositionKey != null; } registerUpdateListener(e) { let n = this._listeners.update; return n.add(e), () => { n.delete(e); }; } registerEditableListener(e) { let n = this._listeners.editable; return n.add(e), () => { n.delete(e); }; } registerDecoratorListener(e) { let n = this._listeners.decorator; return n.add(e), () => { n.delete(e); }; } registerTextContentListener(e) { let n = this._listeners.textcontent; return n.add(e), () => { n.delete(e); }; } registerRootListener(e) { let n = this._listeners.root; return e(this._rootElement, null), n.add(e), () => { e(null, this._rootElement), n.delete(e); }; } registerCommand(e, n, i) { i === void 0 && Le(35); let r = this._commands; r.has(e) || r.set(e, [/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()]); let s = r.get(e); s === void 0 && Le(36, String(e)); let o = s[i]; return o.add(n), () => { o.delete(n), s.every((a) => a.size === 0) && r.delete(e); }; } registerMutationListener(e, n) { this._nodes.get(e.getType()) === void 0 && Le(37, e.name); let i = this._listeners.mutation; return i.set(n, e), () => { i.delete(n); }; } registerNodeTransformToKlass(e, n) { var i = e.getType(); return i = this._nodes.get(i), i === void 0 && Le(37, e.name), i.transforms.add(n), i; } registerNodeTransform(e, n) { var i = this.registerNodeTransformToKlass(e, n); let r = [i]; return i = i.replaceWithKlass, i != null && (i = this.registerNodeTransformToKlass(i, n), r.push(i)), Bne(this, e.getType()), () => { r.forEach((s) => s.transforms.delete(n)); }; } hasNode(e) { return this._nodes.has(e.getType()); } hasNodes(e) { return e.every(this.hasNode.bind(this)); } dispatchCommand(e, n) { return Pe(this, e, n); } getDecorators() { return this._decorators; } getRootElement() { return this._rootElement; } getKey() { return this._key; } setRootElement(e) { let n = this._rootElement; if (e !== n) { let o = wg(this._config.theme, "root"); var i = this._pendingEditorState || this._editorState; if (this._rootElement = e, ZF(this, n, e, i), n !== null) { if (!this._config.disableEvents) { kg !== 0 && (kg--, kg === 0 && n.ownerDocument.removeEventListener("selectionchange", PF)); var r = n.__lexicalEditor; if (r != null) { if (r._parentEditor !== null) { var s = r5(r); s = s[s.length - 1]._key, ah.get(s) === r && ah.delete(s); } else ah.delete(r._key); n.__lexicalEditor = null; } for (r = DF(n), s = 0; s < r.length; s++) r[s](); n.__lexicalEventHandles = []; } o != null && n.classList.remove(...o); } e !== null ? (i = (i = e.ownerDocument) && i.defaultView || null, r = e.style, r.userSelect = "text", r.whiteSpace = "pre-wrap", r.wordBreak = "break-word", e.setAttribute( "data-lexical-editor", "true" ), this._window = i, this._dirtyType = 2, cF(this), this._updateTags.add("history-merge"), af(this), this._config.disableEvents || Gne(e, this), o != null && e.classList.add(...o)) : (this._editorState = i, this._window = this._pendingEditorState = null), _g("root", this, !1, e, n); } } getElementByKey(e) { return this._keyToDOMMap.get(e) || null; } getEditorState() { return this._editorState; } setEditorState(e, n) { e.isEmpty() && Le(38), uF(this); let i = this._pendingEditorState, r = this._updateTags; n = n !== void 0 ? n.tag : null, i === null || i.isEmpty() || (n != null && r.add(n), af(this)), this._pendingEditorState = e, this._dirtyType = 2, this._dirtyElements.set("root", !1), this._compositionKey = null, n != null && r.add(n), af(this); } parseEditorState(e, n) { e = typeof e == "string" ? JSON.parse(e) : e; let i = f5(), r = Qi, s = ws, o = Ui, a = this._dirtyElements, l = this._dirtyLeaves, u = this._cloneNotNeeded, f = this._dirtyType; this._dirtyElements = /* @__PURE__ */ new Map(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyType = 0, Qi = i, ws = !1, Ui = this; try { c5(e.root, this._nodes), n && n(), i._readOnly = !0; } catch (d) { d instanceof Error && this._onError(d); } finally { this._dirtyElements = a, this._dirtyLeaves = l, this._cloneNotNeeded = u, this._dirtyType = f, Qi = r, ws = s, Ui = o; } return i; } update(e, n) { qs(this, e, n); } focus(e, n = {}) { let i = this._rootElement; i !== null && (i.setAttribute("autocapitalize", "off"), qs(this, () => { let r = pn(), s = Zs(); r !== null ? r.dirty = !0 : s.getChildrenSize() !== 0 && (n.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()); }, { onUpdate: () => { i.removeAttribute("autocapitalize"), e && e(); }, tag: "focus" }), this._pendingEditorState === null && i.removeAttribute("autocapitalize")); } blur() { var e = this._rootElement; e !== null && e.blur(), e = La(this._window), e !== null && e.removeAllRanges(); } isEditable() { return this._editable; } setEditable(e) { this._editable !== e && (this._editable = e, _g("editable", this, !0, e)); } toJSON() { return { editorState: this._editorState.toJSON() }; } } me.$addUpdateTag = function(t) { qr(), Ln()._updateTags.add(t); }; me.$applyNodeReplacement = i1; me.$copyNode = wF; me.$createLineBreakNode = Sh; me.$createNodeSelection = o4; me.$createParagraphNode = kl; me.$createPoint = Ro; me.$createRangeSelection = function() { let t = Ro("root", 0, "element"), e = Ro("root", 0, "element"); return new qh(t, e, 0, ""); }; me.$createTabNode = Rk; me.$createTextNode = rr; me.$getAdjacentNode = ZS; me.$getCharacterOffsets = s4; me.$getEditor = function() { return Ln(); }; me.$getNearestNodeFromDOMNode = n1; me.$getNearestRootOrShadowRoot = yF; me.$getNodeByKey = Tr; me.$getPreviousSelection = Yh; me.$getRoot = Zs; me.$getSelection = pn; me.$getTextContent = function() { let t = pn(); return t === null ? "" : t.getTextContent(); }; me.$hasAncestor = Yy; me.$hasUpdateTag = function(t) { return Ln()._updateTags.has(t); }; me.$insertNodes = function(t) { let e = pn() || Yh(); e === null && (e = Zs().selectEnd()), e.insertNodes(t); }; me.$isBlockElementNode = function(t) { return xe(t) && !t.isInline(); }; me.$isDecoratorNode = ii; me.$isElementNode = xe; me.$isInlineElementOrDecoratorNode = function(t) { return xe(t) && t.isInline() || ii(t) && t.isInline(); }; me.$isLeafNode = function(t) { return Ze(t) || hf(t) || ii(t); }; me.$isLineBreakNode = hf; me.$isNodeSelection = r1; me.$isParagraphNode = function(t) { return t instanceof Gh; }; me.$isRangeSelection = xt; me.$isRootNode = Ws; me.$isRootOrShadowRoot = Wu; me.$isTabNode = LF; me.$isTextNode = Ze; me.$nodesOfType = function(t) { var e = Ra(); let n = e._readOnly, i = t.getType(); e = e._nodeMap; let r = []; for (let [, s] of e) s instanceof t && s.__type === i && (n || s.isAttached()) && r.push(s); return r; }; me.$normalizeSelection__EXPERIMENTAL = dF; me.$parseSerializedNode = function(t) { return c5(t, Ln()._nodes); }; me.$selectAll = function() { var t = Zs(); t = t.select(0, t.getChildrenSize()), $a(dF(t)); }; me.$setCompositionKey = Pi; me.$setSelection = $a; me.$splitNode = function(t, e) { let n = t.getChildAtIndex(e); n == null && (n = t), Wu(t) && Le(102); let i = (o) => { const a = o.getParentOrThrow(), l = Wu(a), u = o !== n || l ? wF(o) : o; if (l) return xe(o) && xe(u) || Le(133), o.insertAfter(u), [o, u, u]; const [f, d, h] = i(a); return o = o.getNextSiblings(), h.append(u, ...o), [f, d, u]; }, [r, s] = i(n); return [r, s]; }; me.BLUR_COMMAND = oF; me.CAN_REDO_COMMAND = {}; me.CAN_UNDO_COMMAND = {}; me.CLEAR_EDITOR_COMMAND = {}; me.CLEAR_HISTORY_COMMAND = {}; me.CLICK_COMMAND = Wj; me.COMMAND_PRIORITY_CRITICAL = 4; me.COMMAND_PRIORITY_EDITOR = 0; me.COMMAND_PRIORITY_HIGH = 3; me.COMMAND_PRIORITY_LOW = 1; me.COMMAND_PRIORITY_NORMAL = 2; me.CONTROLLED_TEXT_INSERTION_COMMAND = oh; me.COPY_COMMAND = G6; me.CUT_COMMAND = K6; me.DELETE_CHARACTER_COMMAND = sh; me.DELETE_LINE_COMMAND = qg; me.DELETE_WORD_COMMAND = Zg; me.DRAGEND_COMMAND = rF; me.DRAGOVER_COMMAND = iF; me.DRAGSTART_COMMAND = nF; me.DROP_COMMAND = tF; me.DecoratorNode = QF; me.ElementNode = jk; me.FOCUS_COMMAND = sF; me.FORMAT_ELEMENT_COMMAND = {}; me.FORMAT_TEXT_COMMAND = ku; me.INDENT_CONTENT_COMMAND = {}; me.INSERT_LINE_BREAK_COMMAND = yg; me.INSERT_PARAGRAPH_COMMAND = BS; me.INSERT_TAB_COMMAND = {}; me.KEY_ARROW_DOWN_COMMAND = Vj; me.KEY_ARROW_LEFT_COMMAND = Zj; me.KEY_ARROW_RIGHT_COMMAND = Qj; me.KEY_ARROW_UP_COMMAND = Yj; me.KEY_BACKSPACE_COMMAND = Gj; me.KEY_DELETE_COMMAND = Jj; me.KEY_DOWN_COMMAND = Hj; me.KEY_ENTER_COMMAND = Wy; me.KEY_ESCAPE_COMMAND = Kj; me.KEY_MODIFIER_COMMAND = aF; me.KEY_SPACE_COMMAND = Xj; me.KEY_TAB_COMMAND = eF; me.LineBreakNode = Zh; me.MOVE_TO_END = Uj; me.MOVE_TO_START = qj; me.OUTDENT_CONTENT_COMMAND = {}; me.PASTE_COMMAND = Y6; me.ParagraphNode = Gh; me.REDO_COMMAND = X6; me.REMOVE_TEXT_COMMAND = zS; me.RootNode = Xh; me.SELECTION_CHANGE_COMMAND = Tk; me.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = {}; me.SELECT_ALL_COMMAND = WS; me.TabNode = Lk; me.TextNode = Mf; me.UNDO_COMMAND = V6; me.createCommand = function() { return {}; }; me.createEditor = function(t) { var e = t || {}, n = Ui, i = e.theme || {}; let r = t === void 0 ? n : e.parentEditor || null, s = e.disableEvents || !1, o = f5(), a = e.namespace || (r !== null ? r._config.namespace : vF()), l = e.editorState, u = [Xh, Mf, Zh, Lk, Gh, ...e.nodes || []], { onError: f, html: d } = e; if (e = e.editable !== void 0 ? e.editable : !0, t === void 0 && n !== null) t = n._nodes; else for (t = /* @__PURE__ */ new Map(), n = 0; n < u.length; n++) { let m = u[n], g = null; var h = null; typeof m != "function" && (h = m, m = h.replace, g = h.with, h = h.withKlass || null); let w = m.getType(), x = m.transform(), _ = /* @__PURE__ */ new Set(); x !== null && _.add(x), t.set(w, { exportDOM: d && d.export ? d.export.get(m) : void 0, klass: m, replace: g, replaceWithKlass: h, transforms: _ }); } return i = new mie(o, r, t, { disableEvents: s, namespace: a, theme: i }, f || console.error, pie(t, d ? d.import : void 0), e), l !== void 0 && (i._pendingEditorState = l, i._dirtyType = 2), i; }; me.getNearestEditorFromDOMNode = i5; me.isCurrentlyReadOnlyMode = Vh; me.isHTMLAnchorElement = function(t) { return Dk(t) && t.tagName === "A"; }; me.isHTMLElement = Dk; me.isSelectionCapturedInDecoratorInput = n5; me.isSelectionWithinEditor = t1; const gie = me; var N = gie, qF = { exports: {} }, vie = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", bie = vie, yie = bie; function YF() { } function VF() { } VF.resetWarningCache = YF; var wie = function() { function t(i, r, s, o, a, l) { if (l !== yie) { var u = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" ); throw u.name = "Invariant Violation", u; } } t.isRequired = t; function e() { return t; } var n = { array: t, bigint: t, bool: t, func: t, number: t, object: t, string: t, symbol: t, any: t, arrayOf: e, element: t, elementType: t, instanceOf: e, node: t, objectOf: e, oneOf: e, oneOfType: e, shape: e, exact: e, checkPropTypes: VF, resetWarningCache: YF }; return n.PropTypes = n, n; }; qF.exports = wie(); var kie = qF.exports; const A = /* @__PURE__ */ Gs(kie), xie = (t) => /* @__PURE__ */ J.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("path", { d: "M9 20.4214C9.93991 20.785 10.9427 21 12 21C17.1812 21 21.0543 15.8362 22.6273 13.3309C22.8699 12.9407 23 12.4761 23 12C23 11.5239 22.8699 11.0593 22.6273 10.6691C22.2278 10.0328 21.68 9.22509 21 8.37401M5.63183 18.3627C3.66995 16.7105 2.20181 14.6514 1.37268 13.3309C1.1301 12.9407 1 12.4761 1 12C1 11.5239 1.1301 11.0593 1.37268 10.6691C2.94573 8.16375 6.81884 3 12 3C14.4123 3 16.5411 4.11939 18.2862 5.56867", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M17 12C17 14.7614 14.7614 17 12 17M8.42928 15.5C7.54516 14.5981 7 13.3627 7 12C7 9.23858 9.23858 7 12 7C13.3627 7 14.5981 7.54516 15.5 8.42928", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ J.createElement("path", { d: "M2 22L22 2", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), _ie = { wide: [ "w-[calc(75vw-var(--kg-breakout-adjustment-with-fallback)+2px)] mx-[calc(50%-(50vw-var(--kg-breakout-adjustment-with-fallback))-.8rem)] min-w-[calc(100%+3.6rem)] translate-x-[calc(50vw-50%+.8rem-var(--kg-breakout-adjustment-with-fallback))]", "md:min-w-[calc(100%+10rem)]", "lg:min-w-[calc(100%+18rem)]" ].join(" "), full: "inset-x-[-1px] mx-[calc(50%-50vw)] w-[calc(100vw+2px)] lg:mx-[calc(50%-50vw+(var(--kg-breakout-adjustment-with-fallback)/2))] lg:w-[calc(100vw-var(--kg-breakout-adjustment-with-fallback)+2px)]" }, hM = { top: ".6rem" }, d5 = j.forwardRef(({ cardType: t, cardWidth: e = "regular", feature: n, IndicatorIcon: i, indicatorPosition: r = hM, isDragging: s, isEditing: o, isSelected: a, isVisibilityActive: l, onIndicatorClick: u, wrapperStyle: f, children: d, ...h }, m) => { const g = () => f === "wide" && (o || a) ? "!-mx-3 !px-3" : f === "code-card" && o ? "-mx-6" : f === "wide" ? "hover:-mx-3 hover:px-3" : "border", w = [ "relative border-transparent caret-grey-800", a ? "z-20" : "z-10", // ensure setting panels sit above other cards a && !s ? "shadow-[0_0_0_2px] shadow-green" : "", !a && !s ? "hover:shadow-[0_0_0_1px] hover:shadow-green" : "", _ie[e] || "", g() ].join(" "), x = { ...hM, ...r || {}, ...t === "call-to-action" && { top: "1.4rem" } }; let _; return l ? _ = /* @__PURE__ */ y.jsx("div", { className: "sticky top-0 lg:top-8", children: /* @__PURE__ */ y.jsx( xie, { "aria-label": "Card is hidden for select audiences", className: "absolute left-[-6rem] size-5 cursor-pointer text-grey", "data-testid": "visibility-indicator", style: { left: x.left, top: x.top }, onClick: u } ) }) : i && (_ = /* @__PURE__ */ y.jsx("div", { className: "sticky top-0 lg:top-8", children: /* @__PURE__ */ y.jsx( i, { "aria-label": `${t} indicator`, className: "absolute left-[-6rem] size-5 text-grey", style: { left: x.left, top: x.top } } ) })), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [ _, /* @__PURE__ */ y.jsx( "div", { ref: m, className: w, "data-kg-card": t, "data-kg-card-editing": o, "data-kg-card-selected": a, ...h, children: d } ) ] }); }); d5.displayName = "CardWrapper"; d5.propTypes = { isSelected: A.bool, isEditing: A.bool, cardWidth: A.oneOf(["regular", "wide", "full"]), icon: A.string, indicatorPosition: A.shape({ left: A.string, top: A.string }) }; function Oie(t) { return t.replace(/]*>((.*?){.*?}(.*?))<\/code>/gi, "$1"); } function mi(t = "", e = {}) { const i = Object.assign({}, {}, e); if (!i.createDocument) { const s = typeof DOMParser < "u" && DOMParser || typeof window < "u" && window.DOMParser; if (!s) throw new Error("cleanBasicHtml() must be passed a `createDocument` function as an option when used in a non-browser environment"); i.createDocument = function(o) { return new s().parseFromString(o, "text/html"); }; } let r = t; if ((!i.allowBr || r === "
") && (r = r.replace(//g, " ")), i.removeCodeWrappers && (r = Oie(r)), r = r.replace(/(\s| ){2,}/g, " ").trim().replace(/^ | $/g, "").trim(), r) { let s = i.createDocument(r); if (s.body.textContent === "") return null; s.body.querySelectorAll("*").forEach((o) => { if (!o.textContent.trim().replace(/\u200c+/g, "")) { if (i.allowBr && o.tagName === "BR") return; if (i.allowBr && o.querySelector("br")) return o.replaceWith(s.createElement("br")); if (o.textContent.length > 0) { let a = s.createTextNode(" "); return o.replaceWith(a); } return o.remove(); } }), i.firstChildInnerContent && s.body.firstElementChild ? r = s.body.firstElementChild.innerHTML.trim() : r = s.body.innerHTML.trim(); } return r; } var s1 = {}; const pM = {}; function Sie(t) { let e = pM[t]; if (e) return e; e = pM[t] = []; for (let n = 0; n < 128; n++) { const i = String.fromCharCode(n); e.push(i); } for (let n = 0; n < t.length; n++) { const i = t.charCodeAt(n); e[i] = "%" + ("0" + i.toString(16).toUpperCase()).slice(-2); } return e; } function Bk(t, e) { typeof e != "string" && (e = Bk.defaultChars); const n = Sie(e); return t.replace(/(%[a-f0-9]{2})+/gi, function(i) { let r = ""; for (let s = 0, o = i.length; s < o; s += 3) { const a = parseInt(i.slice(s + 1, s + 3), 16); if (a < 128) { r += n[a]; continue; } if ((a & 224) === 192 && s + 3 < o) { const l = parseInt(i.slice(s + 4, s + 6), 16); if ((l & 192) === 128) { const u = a << 6 & 1984 | l & 63; u < 128 ? r += "��" : r += String.fromCharCode(u), s += 3; continue; } } if ((a & 240) === 224 && s + 6 < o) { const l = parseInt(i.slice(s + 4, s + 6), 16), u = parseInt(i.slice(s + 7, s + 9), 16); if ((l & 192) === 128 && (u & 192) === 128) { const f = a << 12 & 61440 | l << 6 & 4032 | u & 63; f < 2048 || f >= 55296 && f <= 57343 ? r += "���" : r += String.fromCharCode(f), s += 6; continue; } } if ((a & 248) === 240 && s + 9 < o) { const l = parseInt(i.slice(s + 4, s + 6), 16), u = parseInt(i.slice(s + 7, s + 9), 16), f = parseInt(i.slice(s + 10, s + 12), 16); if ((l & 192) === 128 && (u & 192) === 128 && (f & 192) === 128) { let d = a << 18 & 1835008 | l << 12 & 258048 | u << 6 & 4032 | f & 63; d < 65536 || d > 1114111 ? r += "����" : (d -= 65536, r += String.fromCharCode(55296 + (d >> 10), 56320 + (d & 1023))), s += 9; continue; } } r += "�"; } return r; }); } Bk.defaultChars = ";/?:@&=+$,#"; Bk.componentChars = ""; const mM = {}; function Cie(t) { let e = mM[t]; if (e) return e; e = mM[t] = []; for (let n = 0; n < 128; n++) { const i = String.fromCharCode(n); /^[0-9a-z]$/i.test(i) ? e.push(i) : e.push("%" + ("0" + n.toString(16).toUpperCase()).slice(-2)); } for (let n = 0; n < t.length; n++) e[t.charCodeAt(n)] = t[n]; return e; } function zk(t, e, n) { typeof e != "string" && (n = e, e = zk.defaultChars), typeof n > "u" && (n = !0); const i = Cie(e); let r = ""; for (let s = 0, o = t.length; s < o; s++) { const a = t.charCodeAt(s); if (n && a === 37 && s + 2 < o && /^[0-9a-f]{2}$/i.test(t.slice(s + 1, s + 3))) { r += t.slice(s, s + 3), s += 2; continue; } if (a < 128) { r += i[a]; continue; } if (a >= 55296 && a <= 57343) { if (a >= 55296 && a <= 56319 && s + 1 < o) { const l = t.charCodeAt(s + 1); if (l >= 56320 && l <= 57343) { r += encodeURIComponent(t[s] + t[s + 1]), s++; continue; } } r += "%EF%BF%BD"; continue; } r += encodeURIComponent(t[s]); } return r; } zk.defaultChars = ";/?:@&=+$,-_.!~*'()#"; zk.componentChars = "-_.!~*'()"; function Eie(t) { let e = ""; return e += t.protocol || "", e += t.slashes ? "//" : "", e += t.auth ? t.auth + "@" : "", t.hostname && t.hostname.indexOf(":") !== -1 ? e += "[" + t.hostname + "]" : e += t.hostname || "", e += t.port ? ":" + t.port : "", e += t.pathname || "", e += t.search || "", e += t.hash || "", e; } function Ky() { this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null; } const Tie = /^([a-z0-9.+-]+:)/i, $ie = /:[0-9]*$/, Mie = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Nie = ["<", ">", '"', "`", " ", "\r", ` `, " "], Aie = ["{", "}", "|", "\\", "^", "`"].concat(Nie), Die = ["'"].concat(Aie), gM = ["%", "/", "?", ";", "#"].concat(Die), vM = ["/", "?", "#"], Pie = 255, bM = /^[+a-z0-9A-Z_-]{0,63}$/, Iie = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, yM = { javascript: !0, "javascript:": !0 }, wM = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }; function Lie(t, e) { if (t && t instanceof Ky) return t; const n = new Ky(); return n.parse(t, e), n; } Ky.prototype.parse = function(t, e) { let n, i, r, s = t; if (s = s.trim(), !e && t.split("#").length === 1) { const u = Mie.exec(s); if (u) return this.pathname = u[1], u[2] && (this.search = u[2]), this; } let o = Tie.exec(s); if (o && (o = o[0], n = o.toLowerCase(), this.protocol = o, s = s.substr(o.length)), (e || o || s.match(/^\/\/[^@\/]+@[^@\/]+/)) && (r = s.substr(0, 2) === "//", r && !(o && yM[o]) && (s = s.substr(2), this.slashes = !0)), !yM[o] && (r || o && !wM[o])) { let u = -1; for (let g = 0; g < vM.length; g++) i = s.indexOf(vM[g]), i !== -1 && (u === -1 || i < u) && (u = i); let f, d; u === -1 ? d = s.lastIndexOf("@") : d = s.lastIndexOf("@", u), d !== -1 && (f = s.slice(0, d), s = s.slice(d + 1), this.auth = f), u = -1; for (let g = 0; g < gM.length; g++) i = s.indexOf(gM[g]), i !== -1 && (u === -1 || i < u) && (u = i); u === -1 && (u = s.length), s[u - 1] === ":" && u--; const h = s.slice(0, u); s = s.slice(u), this.parseHost(h), this.hostname = this.hostname || ""; const m = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; if (!m) { const g = this.hostname.split(/\./); for (let w = 0, x = g.length; w < x; w++) { const _ = g[w]; if (_ && !_.match(bM)) { let S = ""; for (let C = 0, E = _.length; C < E; C++) _.charCodeAt(C) > 127 ? S += "x" : S += _[C]; if (!S.match(bM)) { const C = g.slice(0, w), E = g.slice(w + 1), M = _.match(Iie); M && (C.push(M[1]), E.unshift(M[2])), E.length && (s = E.join(".") + s), this.hostname = C.join("."); break; } } } } this.hostname.length > Pie && (this.hostname = ""), m && (this.hostname = this.hostname.substr(1, this.hostname.length - 2)); } const a = s.indexOf("#"); a !== -1 && (this.hash = s.substr(a), s = s.slice(0, a)); const l = s.indexOf("?"); return l !== -1 && (this.search = s.substr(l), s = s.slice(0, l)), s && (this.pathname = s), wM[n] && this.hostname && !this.pathname && (this.pathname = ""), this; }; Ky.prototype.parseHost = function(t) { let e = $ie.exec(t); e && (e = e[0], e !== ":" && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t); }; s1.decode = Bk; s1.encode = zk; s1.format = Eie; s1.parse = Lie; var Nf = {}, Rie = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, jie = /[\0-\x1F\x7F-\x9F]/, Fie = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, Bie = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, zie = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/; Nf.Any = Rie; Nf.Cc = jie; Nf.Cf = Fie; Nf.P = Bie; Nf.Z = zie; var XF = {}, a4 = {}, h5 = {}; Object.defineProperty(h5, "__esModule", { value: !0 }); h5.default = new Uint16Array( // prettier-ignore 'ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(t) { return t.charCodeAt(0); }) ); var p5 = {}; Object.defineProperty(p5, "__esModule", { value: !0 }); p5.default = new Uint16Array( // prettier-ignore "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t) { return t.charCodeAt(0); }) ); var l4 = {}; (function(t) { var e; Object.defineProperty(t, "__esModule", { value: !0 }), t.replaceCodePoint = t.fromCodePoint = void 0; var n = /* @__PURE__ */ new Map([ [0, 65533], // C1 Unicode control character reference replacements [128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376] ]); t.fromCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins (e = String.fromCodePoint) !== null && e !== void 0 ? e : function(s) { var o = ""; return s > 65535 && (s -= 65536, o += String.fromCharCode(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), o += String.fromCharCode(s), o; }; function i(s) { var o; return s >= 55296 && s <= 57343 || s > 1114111 ? 65533 : (o = n.get(s)) !== null && o !== void 0 ? o : s; } t.replaceCodePoint = i; function r(s) { return (0, t.fromCodePoint)(i(s)); } t.default = r; })(l4); (function(t) { var e = on && on.__createBinding || (Object.create ? function(L, Q, V, H) { H === void 0 && (H = V); var R = Object.getOwnPropertyDescriptor(Q, V); (!R || ("get" in R ? !Q.__esModule : R.writable || R.configurable)) && (R = { enumerable: !0, get: function() { return Q[V]; } }), Object.defineProperty(L, H, R); } : function(L, Q, V, H) { H === void 0 && (H = V), L[H] = Q[V]; }), n = on && on.__setModuleDefault || (Object.create ? function(L, Q) { Object.defineProperty(L, "default", { enumerable: !0, value: Q }); } : function(L, Q) { L.default = Q; }), i = on && on.__importStar || function(L) { if (L && L.__esModule) return L; var Q = {}; if (L != null) for (var V in L) V !== "default" && Object.prototype.hasOwnProperty.call(L, V) && e(Q, L, V); return n(Q, L), Q; }, r = on && on.__importDefault || function(L) { return L && L.__esModule ? L : { default: L }; }; Object.defineProperty(t, "__esModule", { value: !0 }), t.decodeXML = t.decodeHTMLStrict = t.decodeHTMLAttribute = t.decodeHTML = t.determineBranch = t.EntityDecoder = t.DecodingMode = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0; var s = r(h5); t.htmlDecodeTree = s.default; var o = r(p5); t.xmlDecodeTree = o.default; var a = i(l4); t.decodeCodePoint = a.default; var l = l4; Object.defineProperty(t, "replaceCodePoint", { enumerable: !0, get: function() { return l.replaceCodePoint; } }), Object.defineProperty(t, "fromCodePoint", { enumerable: !0, get: function() { return l.fromCodePoint; } }); var u; (function(L) { L[L.NUM = 35] = "NUM", L[L.SEMI = 59] = "SEMI", L[L.EQUALS = 61] = "EQUALS", L[L.ZERO = 48] = "ZERO", L[L.NINE = 57] = "NINE", L[L.LOWER_A = 97] = "LOWER_A", L[L.LOWER_F = 102] = "LOWER_F", L[L.LOWER_X = 120] = "LOWER_X", L[L.LOWER_Z = 122] = "LOWER_Z", L[L.UPPER_A = 65] = "UPPER_A", L[L.UPPER_F = 70] = "UPPER_F", L[L.UPPER_Z = 90] = "UPPER_Z"; })(u || (u = {})); var f = 32, d; (function(L) { L[L.VALUE_LENGTH = 49152] = "VALUE_LENGTH", L[L.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", L[L.JUMP_TABLE = 127] = "JUMP_TABLE"; })(d = t.BinTrieFlags || (t.BinTrieFlags = {})); function h(L) { return L >= u.ZERO && L <= u.NINE; } function m(L) { return L >= u.UPPER_A && L <= u.UPPER_F || L >= u.LOWER_A && L <= u.LOWER_F; } function g(L) { return L >= u.UPPER_A && L <= u.UPPER_Z || L >= u.LOWER_A && L <= u.LOWER_Z || h(L); } function w(L) { return L === u.EQUALS || g(L); } var x; (function(L) { L[L.EntityStart = 0] = "EntityStart", L[L.NumericStart = 1] = "NumericStart", L[L.NumericDecimal = 2] = "NumericDecimal", L[L.NumericHex = 3] = "NumericHex", L[L.NamedEntity = 4] = "NamedEntity"; })(x || (x = {})); var _; (function(L) { L[L.Legacy = 0] = "Legacy", L[L.Strict = 1] = "Strict", L[L.Attribute = 2] = "Attribute"; })(_ = t.DecodingMode || (t.DecodingMode = {})); var S = ( /** @class */ function() { function L(Q, V, H) { this.decodeTree = Q, this.emitCodePoint = V, this.errors = H, this.state = x.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = _.Strict; } return L.prototype.startEntity = function(Q) { this.decodeMode = Q, this.state = x.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1; }, L.prototype.write = function(Q, V) { switch (this.state) { case x.EntityStart: return Q.charCodeAt(V) === u.NUM ? (this.state = x.NumericStart, this.consumed += 1, this.stateNumericStart(Q, V + 1)) : (this.state = x.NamedEntity, this.stateNamedEntity(Q, V)); case x.NumericStart: return this.stateNumericStart(Q, V); case x.NumericDecimal: return this.stateNumericDecimal(Q, V); case x.NumericHex: return this.stateNumericHex(Q, V); case x.NamedEntity: return this.stateNamedEntity(Q, V); } }, L.prototype.stateNumericStart = function(Q, V) { return V >= Q.length ? -1 : (Q.charCodeAt(V) | f) === u.LOWER_X ? (this.state = x.NumericHex, this.consumed += 1, this.stateNumericHex(Q, V + 1)) : (this.state = x.NumericDecimal, this.stateNumericDecimal(Q, V)); }, L.prototype.addToNumericResult = function(Q, V, H, R) { if (V !== H) { var q = H - V; this.result = this.result * Math.pow(R, q) + parseInt(Q.substr(V, q), R), this.consumed += q; } }, L.prototype.stateNumericHex = function(Q, V) { for (var H = V; V < Q.length; ) { var R = Q.charCodeAt(V); if (h(R) || m(R)) V += 1; else return this.addToNumericResult(Q, H, V, 16), this.emitNumericEntity(R, 3); } return this.addToNumericResult(Q, H, V, 16), -1; }, L.prototype.stateNumericDecimal = function(Q, V) { for (var H = V; V < Q.length; ) { var R = Q.charCodeAt(V); if (h(R)) V += 1; else return this.addToNumericResult(Q, H, V, 10), this.emitNumericEntity(R, 2); } return this.addToNumericResult(Q, H, V, 10), -1; }, L.prototype.emitNumericEntity = function(Q, V) { var H; if (this.consumed <= V) return (H = this.errors) === null || H === void 0 || H.absenceOfDigitsInNumericCharacterReference(this.consumed), 0; if (Q === u.SEMI) this.consumed += 1; else if (this.decodeMode === _.Strict) return 0; return this.emitCodePoint((0, a.replaceCodePoint)(this.result), this.consumed), this.errors && (Q !== u.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed; }, L.prototype.stateNamedEntity = function(Q, V) { for (var H = this.decodeTree, R = H[this.treeIndex], q = (R & d.VALUE_LENGTH) >> 14; V < Q.length; V++, this.excess++) { var Y = Q.charCodeAt(V); if (this.treeIndex = E(H, R, this.treeIndex + Math.max(1, q), Y), this.treeIndex < 0) return this.result === 0 || // If we are parsing an attribute this.decodeMode === _.Attribute && // We shouldn't have consumed any characters after the entity, (q === 0 || // And there should be no invalid characters. w(Y)) ? 0 : this.emitNotTerminatedNamedEntity(); if (R = H[this.treeIndex], q = (R & d.VALUE_LENGTH) >> 14, q !== 0) { if (Y === u.SEMI) return this.emitNamedEntityData(this.treeIndex, q, this.consumed + this.excess); this.decodeMode !== _.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0); } } return -1; }, L.prototype.emitNotTerminatedNamedEntity = function() { var Q, V = this, H = V.result, R = V.decodeTree, q = (R[H] & d.VALUE_LENGTH) >> 14; return this.emitNamedEntityData(H, q, this.consumed), (Q = this.errors) === null || Q === void 0 || Q.missingSemicolonAfterCharacterReference(), this.consumed; }, L.prototype.emitNamedEntityData = function(Q, V, H) { var R = this.decodeTree; return this.emitCodePoint(V === 1 ? R[Q] & ~d.VALUE_LENGTH : R[Q + 1], H), V === 3 && this.emitCodePoint(R[Q + 2], H), H; }, L.prototype.end = function() { var Q; switch (this.state) { case x.NamedEntity: return this.result !== 0 && (this.decodeMode !== _.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; case x.NumericDecimal: return this.emitNumericEntity(0, 2); case x.NumericHex: return this.emitNumericEntity(0, 3); case x.NumericStart: return (Q = this.errors) === null || Q === void 0 || Q.absenceOfDigitsInNumericCharacterReference(this.consumed), 0; case x.EntityStart: return 0; } }, L; }() ); t.EntityDecoder = S; function C(L) { var Q = "", V = new S(L, function(H) { return Q += (0, a.fromCodePoint)(H); }); return function(R, q) { for (var Y = 0, K = 0; (K = R.indexOf("&", K)) >= 0; ) { Q += R.slice(Y, K), V.startEntity(q); var te = V.write( R, // Skip the "&" K + 1 ); if (te < 0) { Y = K + V.end(); break; } Y = K + te, K = te === 0 ? Y + 1 : Y; } var se = Q + R.slice(Y); return Q = "", se; }; } function E(L, Q, V, H) { var R = (Q & d.BRANCH_LENGTH) >> 7, q = Q & d.JUMP_TABLE; if (R === 0) return q !== 0 && H === q ? V : -1; if (q) { var Y = H - q; return Y < 0 || Y >= R ? -1 : L[V + Y] - 1; } for (var K = V, te = K + R - 1; K <= te; ) { var se = K + te >>> 1, ce = L[se]; if (ce < H) K = se + 1; else if (ce > H) te = se - 1; else return L[se + R]; } return -1; } t.determineBranch = E; var M = C(s.default), $ = C(o.default); function P(L, Q) { return Q === void 0 && (Q = _.Legacy), M(L, Q); } t.decodeHTML = P; function W(L) { return M(L, _.Attribute); } t.decodeHTMLAttribute = W; function z(L) { return M(L, _.Strict); } t.decodeHTMLStrict = z; function Z(L) { return $(L, _.Strict); } t.decodeXML = Z; })(a4); var pf = {}, m5 = {}; Object.defineProperty(m5, "__esModule", { value: !0 }); function zv(t) { for (var e = 1; e < t.length; e++) t[e][0] += t[e - 1][0] + 1; return t; } m5.default = new Map(/* @__PURE__ */ zv([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* @__PURE__ */ zv([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* @__PURE__ */ zv([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* @__PURE__ */ zv([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); var Jy = {}; (function(t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.getCodePoint = t.xmlReplacer = void 0, t.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; var e = /* @__PURE__ */ new Map([ [34, """], [38, "&"], [39, "'"], [60, "<"], [62, ">"] ]); t.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition String.prototype.codePointAt != null ? function(r, s) { return r.codePointAt(s); } : ( // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae function(r, s) { return (r.charCodeAt(s) & 64512) === 55296 ? (r.charCodeAt(s) - 55296) * 1024 + r.charCodeAt(s + 1) - 56320 + 65536 : r.charCodeAt(s); } ); function n(r) { for (var s = "", o = 0, a; (a = t.xmlReplacer.exec(r)) !== null; ) { var l = a.index, u = r.charCodeAt(l), f = e.get(u); f !== void 0 ? (s += r.substring(o, l) + f, o = l + 1) : (s += "".concat(r.substring(o, l), "&#x").concat((0, t.getCodePoint)(r, l).toString(16), ";"), o = t.xmlReplacer.lastIndex += +((u & 64512) === 55296)); } return s + r.substr(o); } t.encodeXML = n, t.escape = n; function i(r, s) { return function(a) { for (var l, u = 0, f = ""; l = r.exec(a); ) u !== l.index && (f += a.substring(u, l.index)), f += s.get(l[0].charCodeAt(0)), u = l.index + 1; return f + a.substring(u); }; } t.escapeUTF8 = i(/[&<>'"]/g, e), t.escapeAttribute = i(/["&\u00A0]/g, /* @__PURE__ */ new Map([ [34, """], [38, "&"], [160, " "] ])), t.escapeText = i(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([ [38, "&"], [60, "<"], [62, ">"], [160, " "] ])); })(Jy); var Wie = on && on.__importDefault || function(t) { return t && t.__esModule ? t : { default: t }; }; Object.defineProperty(pf, "__esModule", { value: !0 }); pf.encodeNonAsciiHTML = pf.encodeHTML = void 0; var Hie = Wie(m5), GF = Jy, Qie = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; function Uie(t) { return KF(Qie, t); } pf.encodeHTML = Uie; function Zie(t) { return KF(GF.xmlReplacer, t); } pf.encodeNonAsciiHTML = Zie; function KF(t, e) { for (var n = "", i = 0, r; (r = t.exec(e)) !== null; ) { var s = r.index; n += e.substring(i, s); var o = e.charCodeAt(s), a = Hie.default.get(o); if (typeof a == "object") { if (s + 1 < e.length) { var l = e.charCodeAt(s + 1), u = typeof a.n == "number" ? a.n === l ? a.o : void 0 : a.n.get(l); if (u !== void 0) { n += u, i = t.lastIndex += 1; continue; } } a = a.v; } if (a !== void 0) n += a, i = s + 1; else { var f = (0, GF.getCodePoint)(e, s); n += "&#x".concat(f.toString(16), ";"), i = t.lastIndex += +(f !== o); } } return n + e.substr(i); } (function(t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.decodeXMLStrict = t.decodeHTML5Strict = t.decodeHTML4Strict = t.decodeHTML5 = t.decodeHTML4 = t.decodeHTMLAttribute = t.decodeHTMLStrict = t.decodeHTML = t.decodeXML = t.DecodingMode = t.EntityDecoder = t.encodeHTML5 = t.encodeHTML4 = t.encodeNonAsciiHTML = t.encodeHTML = t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.encode = t.decodeStrict = t.decode = t.EncodingMode = t.EntityLevel = void 0; var e = a4, n = pf, i = Jy, r; (function(h) { h[h.XML = 0] = "XML", h[h.HTML = 1] = "HTML"; })(r = t.EntityLevel || (t.EntityLevel = {})); var s; (function(h) { h[h.UTF8 = 0] = "UTF8", h[h.ASCII = 1] = "ASCII", h[h.Extensive = 2] = "Extensive", h[h.Attribute = 3] = "Attribute", h[h.Text = 4] = "Text"; })(s = t.EncodingMode || (t.EncodingMode = {})); function o(h, m) { m === void 0 && (m = r.XML); var g = typeof m == "number" ? m : m.level; if (g === r.HTML) { var w = typeof m == "object" ? m.mode : void 0; return (0, e.decodeHTML)(h, w); } return (0, e.decodeXML)(h); } t.decode = o; function a(h, m) { var g; m === void 0 && (m = r.XML); var w = typeof m == "number" ? { level: m } : m; return (g = w.mode) !== null && g !== void 0 || (w.mode = e.DecodingMode.Strict), o(h, w); } t.decodeStrict = a; function l(h, m) { m === void 0 && (m = r.XML); var g = typeof m == "number" ? { level: m } : m; return g.mode === s.UTF8 ? (0, i.escapeUTF8)(h) : g.mode === s.Attribute ? (0, i.escapeAttribute)(h) : g.mode === s.Text ? (0, i.escapeText)(h) : g.level === r.HTML ? g.mode === s.ASCII ? (0, n.encodeNonAsciiHTML)(h) : (0, n.encodeHTML)(h) : (0, i.encodeXML)(h); } t.encode = l; var u = Jy; Object.defineProperty(t, "encodeXML", { enumerable: !0, get: function() { return u.encodeXML; } }), Object.defineProperty(t, "escape", { enumerable: !0, get: function() { return u.escape; } }), Object.defineProperty(t, "escapeUTF8", { enumerable: !0, get: function() { return u.escapeUTF8; } }), Object.defineProperty(t, "escapeAttribute", { enumerable: !0, get: function() { return u.escapeAttribute; } }), Object.defineProperty(t, "escapeText", { enumerable: !0, get: function() { return u.escapeText; } }); var f = pf; Object.defineProperty(t, "encodeHTML", { enumerable: !0, get: function() { return f.encodeHTML; } }), Object.defineProperty(t, "encodeNonAsciiHTML", { enumerable: !0, get: function() { return f.encodeNonAsciiHTML; } }), Object.defineProperty(t, "encodeHTML4", { enumerable: !0, get: function() { return f.encodeHTML; } }), Object.defineProperty(t, "encodeHTML5", { enumerable: !0, get: function() { return f.encodeHTML; } }); var d = a4; Object.defineProperty(t, "EntityDecoder", { enumerable: !0, get: function() { return d.EntityDecoder; } }), Object.defineProperty(t, "DecodingMode", { enumerable: !0, get: function() { return d.DecodingMode; } }), Object.defineProperty(t, "decodeXML", { enumerable: !0, get: function() { return d.decodeXML; } }), Object.defineProperty(t, "decodeHTML", { enumerable: !0, get: function() { return d.decodeHTML; } }), Object.defineProperty(t, "decodeHTMLStrict", { enumerable: !0, get: function() { return d.decodeHTMLStrict; } }), Object.defineProperty(t, "decodeHTMLAttribute", { enumerable: !0, get: function() { return d.decodeHTMLAttribute; } }), Object.defineProperty(t, "decodeHTML4", { enumerable: !0, get: function() { return d.decodeHTML; } }), Object.defineProperty(t, "decodeHTML5", { enumerable: !0, get: function() { return d.decodeHTML; } }), Object.defineProperty(t, "decodeHTML4Strict", { enumerable: !0, get: function() { return d.decodeHTMLStrict; } }), Object.defineProperty(t, "decodeHTML5Strict", { enumerable: !0, get: function() { return d.decodeHTMLStrict; } }), Object.defineProperty(t, "decodeXMLStrict", { enumerable: !0, get: function() { return d.decodeXML; } }); })(XF); var Wv = Nf; function qie(t) { const e = {}; t = t || {}, e.src_Any = Wv.Any.source, e.src_Cc = Wv.Cc.source, e.src_Z = Wv.Z.source, e.src_P = Wv.P.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|"); const n = "[><|]"; return e.src_pseudo_letter = "(?:(?!" + n + "|" + e.src_ZPCc + ")" + e.src_Any + ")", e.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]?)", e.src_auth = "(?:(?:(?!" + e.src_ZCc + "|[@/\\[\\]()]).)+@)?", e.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", e.src_host_terminator = "(?=$|" + n + "|" + e.src_ZPCc + ")(?!" + (t["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + e.src_ZPCc + "))", e.src_path = "(?:[/?#](?:(?!" + e.src_ZCc + "|" + n + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + e.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + e.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + e.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + e.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + e.src_ZCc + "|[']).)+\\'|\\'(?=" + e.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + e.src_ZCc + "|[.]|$)|" + (t["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + // allow `,,,` in paths ",(?!" + e.src_ZCc + "|$)|;(?!" + e.src_ZCc + "|$)|\\!+(?!" + e.src_ZCc + "|[!]|$)|\\?(?!" + e.src_ZCc + "|[?]|$))+|\\/)?", e.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', e.src_xn = "xn--[a-z0-9\\-]{1,59}", e.src_domain_root = // Allow letters & digits (http://test1) "(?:" + e.src_xn + "|" + e.src_pseudo_letter + "{1,63})", e.src_domain = "(?:" + e.src_xn + "|(?:" + e.src_pseudo_letter + ")|(?:" + e.src_pseudo_letter + "(?:-|" + e.src_pseudo_letter + "){0,61}" + e.src_pseudo_letter + "))", e.src_host = "(?:(?:(?:(?:" + e.src_domain + ")\\.)*" + e.src_domain + "))", e.tpl_host_fuzzy = "(?:" + e.src_ip4 + "|(?:(?:(?:" + e.src_domain + ")\\.)+(?:%TLDS%)))", e.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + e.src_domain + ")\\.)+(?:%TLDS%))", e.src_host_strict = e.src_host + e.src_host_terminator, e.tpl_host_fuzzy_strict = e.tpl_host_fuzzy + e.src_host_terminator, e.src_host_port_strict = e.src_host + e.src_port + e.src_host_terminator, e.tpl_host_port_fuzzy_strict = e.tpl_host_fuzzy + e.src_port + e.src_host_terminator, e.tpl_host_port_no_ip_fuzzy_strict = e.tpl_host_no_ip_fuzzy + e.src_port + e.src_host_terminator, e.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + e.src_ZPCc + "|>|$))", e.tpl_email_fuzzy = "(^|" + n + '|"|\\(|' + e.src_ZCc + ")(" + e.src_email_name + "@" + e.tpl_host_fuzzy_strict + ")", e.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation. // but can start with > (markdown blockquote) "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + e.src_ZPCc + "))((?![$+<=>^`||])" + e.tpl_host_port_fuzzy_strict + e.src_path + ")", e.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation. // but can start with > (markdown blockquote) "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + e.src_ZPCc + "))((?![$+<=>^`||])" + e.tpl_host_port_no_ip_fuzzy_strict + e.src_path + ")", e; } function u4(t) { return Array.prototype.slice.call(arguments, 1).forEach(function(n) { n && Object.keys(n).forEach(function(i) { t[i] = n[i]; }); }), t; } function Wk(t) { return Object.prototype.toString.call(t); } function Yie(t) { return Wk(t) === "[object String]"; } function Vie(t) { return Wk(t) === "[object Object]"; } function Xie(t) { return Wk(t) === "[object RegExp]"; } function kM(t) { return Wk(t) === "[object Function]"; } function Gie(t) { return t.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&"); } const JF = { fuzzyLink: !0, fuzzyEmail: !0, fuzzyIP: !1 }; function Kie(t) { return Object.keys(t || {}).reduce(function(e, n) { return e || JF.hasOwnProperty(n); }, !1); } const Jie = { "http:": { validate: function(t, e, n) { const i = t.slice(e); return n.re.http || (n.re.http = new RegExp( "^\\/\\/" + n.re.src_auth + n.re.src_host_port_strict + n.re.src_path, "i" )), n.re.http.test(i) ? i.match(n.re.http)[0].length : 0; } }, "https:": "http:", "ftp:": "http:", "//": { validate: function(t, e, n) { const i = t.slice(e); return n.re.no_http || (n.re.no_http = new RegExp( "^" + n.re.src_auth + // Don't allow single-level domains, because of false positives like '//test' // with code comments "(?:localhost|(?:(?:" + n.re.src_domain + ")\\.)+" + n.re.src_domain_root + ")" + n.re.src_port + n.re.src_host_terminator + n.re.src_path, "i" )), n.re.no_http.test(i) ? e >= 3 && t[e - 3] === ":" || e >= 3 && t[e - 3] === "/" ? 0 : i.match(n.re.no_http)[0].length : 0; } }, "mailto:": { validate: function(t, e, n) { const i = t.slice(e); return n.re.mailto || (n.re.mailto = new RegExp( "^" + n.re.src_email_name + "@" + n.re.src_host_strict, "i" )), n.re.mailto.test(i) ? i.match(n.re.mailto)[0].length : 0; } } }, ere = "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]", tre = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|"); function nre(t) { t.__index__ = -1, t.__text_cache__ = ""; } function ire(t) { return function(e, n) { const i = e.slice(n); return t.test(i) ? i.match(t)[0].length : 0; }; } function xM() { return function(t, e) { e.normalize(t); }; } function ew(t) { const e = t.re = qie(t.__opts__), n = t.__tlds__.slice(); t.onCompile(), t.__tlds_replaced__ || n.push(ere), n.push(e.src_xn), e.src_tlds = n.join("|"); function i(a) { return a.replace("%TLDS%", e.src_tlds); } e.email_fuzzy = RegExp(i(e.tpl_email_fuzzy), "i"), e.link_fuzzy = RegExp(i(e.tpl_link_fuzzy), "i"), e.link_no_ip_fuzzy = RegExp(i(e.tpl_link_no_ip_fuzzy), "i"), e.host_fuzzy_test = RegExp(i(e.tpl_host_fuzzy_test), "i"); const r = []; t.__compiled__ = {}; function s(a, l) { throw new Error('(LinkifyIt) Invalid schema "' + a + '": ' + l); } Object.keys(t.__schemas__).forEach(function(a) { const l = t.__schemas__[a]; if (l === null) return; const u = { validate: null, link: null }; if (t.__compiled__[a] = u, Vie(l)) { Xie(l.validate) ? u.validate = ire(l.validate) : kM(l.validate) ? u.validate = l.validate : s(a, l), kM(l.normalize) ? u.normalize = l.normalize : l.normalize ? s(a, l) : u.normalize = xM(); return; } if (Yie(l)) { r.push(a); return; } s(a, l); }), r.forEach(function(a) { t.__compiled__[t.__schemas__[a]] && (t.__compiled__[a].validate = t.__compiled__[t.__schemas__[a]].validate, t.__compiled__[a].normalize = t.__compiled__[t.__schemas__[a]].normalize); }), t.__compiled__[""] = { validate: null, normalize: xM() }; const o = Object.keys(t.__compiled__).filter(function(a) { return a.length > 0 && t.__compiled__[a]; }).map(Gie).join("|"); t.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + e.src_ZPCc + "))(" + o + ")", "i"), t.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + e.src_ZPCc + "))(" + o + ")", "ig"), t.re.schema_at_start = RegExp("^" + t.re.schema_search.source, "i"), t.re.pretest = RegExp( "(" + t.re.schema_test.source + ")|(" + t.re.host_fuzzy_test.source + ")|@", "i" ), nre(t); } function rre(t, e) { const n = t.__index__, i = t.__last_index__, r = t.__text_cache__.slice(n, i); this.schema = t.__schema__.toLowerCase(), this.index = n + e, this.lastIndex = i + e, this.raw = r, this.text = r, this.url = r; } function c4(t, e) { const n = new rre(t, e); return t.__compiled__[n.schema].normalize(n, t), n; } function Ys(t, e) { if (!(this instanceof Ys)) return new Ys(t, e); e || Kie(t) && (e = t, t = {}), this.__opts__ = u4({}, JF, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = u4({}, Jie, t), this.__compiled__ = {}, this.__tlds__ = tre, this.__tlds_replaced__ = !1, this.re = {}, ew(this); } Ys.prototype.add = function(e, n) { return this.__schemas__[e] = n, ew(this), this; }; Ys.prototype.set = function(e) { return this.__opts__ = u4(this.__opts__, e), this; }; Ys.prototype.test = function(e) { if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return !1; let n, i, r, s, o, a, l, u, f; if (this.re.schema_test.test(e)) { for (l = this.re.schema_search, l.lastIndex = 0; (n = l.exec(e)) !== null; ) if (s = this.testSchemaAt(e, n[2], l.lastIndex), s) { this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + s; break; } } return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (u = e.search(this.re.host_fuzzy_test), u >= 0 && (this.__index__ < 0 || u < this.__index__) && (i = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (o = i.index + i[1].length, (this.__index__ < 0 || o < this.__index__) && (this.__schema__ = "", this.__index__ = o, this.__last_index__ = i.index + i[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (f = e.indexOf("@"), f >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (o = r.index + r[1].length, a = r.index + r[0].length, (this.__index__ < 0 || o < this.__index__ || o === this.__index__ && a > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = o, this.__last_index__ = a))), this.__index__ >= 0; }; Ys.prototype.pretest = function(e) { return this.re.pretest.test(e); }; Ys.prototype.testSchemaAt = function(e, n, i) { return this.__compiled__[n.toLowerCase()] ? this.__compiled__[n.toLowerCase()].validate(e, i, this) : 0; }; Ys.prototype.match = function(e) { const n = []; let i = 0; this.__index__ >= 0 && this.__text_cache__ === e && (n.push(c4(this, i)), i = this.__last_index__); let r = i ? e.slice(i) : e; for (; this.test(r); ) n.push(c4(this, i)), r = r.slice(this.__last_index__), i += this.__last_index__; return n.length ? n : null; }; Ys.prototype.matchAtStart = function(e) { if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return null; const n = this.re.schema_at_start.exec(e); if (!n) return null; const i = this.testSchemaAt(e, n[2], n[0].length); return i ? (this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + i, c4(this, 0)) : null; }; Ys.prototype.tlds = function(e, n) { return e = Array.isArray(e) ? e : [e], n ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(i, r, s) { return i !== s[r - 1]; }).reverse(), ew(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, ew(this), this); }; Ys.prototype.normalize = function(e) { e.schema || (e.url = "http://" + e.url), e.schema === "mailto:" && !/^mailto:/i.test(e.url) && (e.url = "mailto:" + e.url); }; Ys.prototype.onCompile = function() { }; var sre = Ys; const lh = 2147483647, ba = 36, g5 = 1, Kg = 26, ore = 38, are = 700, eB = 72, tB = 128, nB = "-", lre = /^xn--/, ure = /[^\0-\x7F]/, cre = /[\x2E\u3002\uFF0E\uFF61]/g, fre = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, p3 = ba - g5, ya = Math.floor, m3 = String.fromCharCode; function du(t) { throw new RangeError(fre[t]); } function dre(t, e) { const n = []; let i = t.length; for (; i--; ) n[i] = e(t[i]); return n; } function iB(t, e) { const n = t.split("@"); let i = ""; n.length > 1 && (i = n[0] + "@", t = n[1]), t = t.replace(cre, "."); const r = t.split("."), s = dre(r, e).join("."); return i + s; } function v5(t) { const e = []; let n = 0; const i = t.length; for (; n < i; ) { const r = t.charCodeAt(n++); if (r >= 55296 && r <= 56319 && n < i) { const s = t.charCodeAt(n++); (s & 64512) == 56320 ? e.push(((r & 1023) << 10) + (s & 1023) + 65536) : (e.push(r), n--); } else e.push(r); } return e; } const rB = (t) => String.fromCodePoint(...t), hre = function(t) { return t >= 48 && t < 58 ? 26 + (t - 48) : t >= 65 && t < 91 ? t - 65 : t >= 97 && t < 123 ? t - 97 : ba; }, _M = function(t, e) { return t + 22 + 75 * (t < 26) - ((e != 0) << 5); }, sB = function(t, e, n) { let i = 0; for (t = n ? ya(t / are) : t >> 1, t += ya(t / e); t > p3 * Kg >> 1; i += ba) t = ya(t / p3); return ya(i + (p3 + 1) * t / (t + ore)); }, b5 = function(t) { const e = [], n = t.length; let i = 0, r = tB, s = eB, o = t.lastIndexOf(nB); o < 0 && (o = 0); for (let a = 0; a < o; ++a) t.charCodeAt(a) >= 128 && du("not-basic"), e.push(t.charCodeAt(a)); for (let a = o > 0 ? o + 1 : 0; a < n; ) { const l = i; for (let f = 1, d = ba; ; d += ba) { a >= n && du("invalid-input"); const h = hre(t.charCodeAt(a++)); h >= ba && du("invalid-input"), h > ya((lh - i) / f) && du("overflow"), i += h * f; const m = d <= s ? g5 : d >= s + Kg ? Kg : d - s; if (h < m) break; const g = ba - m; f > ya(lh / g) && du("overflow"), f *= g; } const u = e.length + 1; s = sB(i - l, u, l == 0), ya(i / u) > lh - r && du("overflow"), r += ya(i / u), i %= u, e.splice(i++, 0, r); } return String.fromCodePoint(...e); }, y5 = function(t) { const e = []; t = v5(t); const n = t.length; let i = tB, r = 0, s = eB; for (const l of t) l < 128 && e.push(m3(l)); const o = e.length; let a = o; for (o && e.push(nB); a < n; ) { let l = lh; for (const f of t) f >= i && f < l && (l = f); const u = a + 1; l - i > ya((lh - r) / u) && du("overflow"), r += (l - i) * u, i = l; for (const f of t) if (f < i && ++r > lh && du("overflow"), f === i) { let d = r; for (let h = ba; ; h += ba) { const m = h <= s ? g5 : h >= s + Kg ? Kg : h - s; if (d < m) break; const g = d - m, w = ba - m; e.push( m3(_M(m + g % w, 0)) ), d = ya(g / w); } e.push(m3(_M(d, 0))), s = sB(r, u, a === o), r = 0, ++a; } ++r, ++i; } return e.join(""); }, oB = function(t) { return iB(t, function(e) { return lre.test(e) ? b5(e.slice(4).toLowerCase()) : e; }); }, aB = function(t) { return iB(t, function(e) { return ure.test(e) ? "xn--" + y5(e) : e; }); }, pre = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ version: "2.3.1", /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see * @memberOf punycode * @type Object */ ucs2: { decode: v5, encode: rB }, decode: b5, encode: y5, toASCII: aB, toUnicode: oB }, mre = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, decode: b5, default: pre, encode: y5, toASCII: aB, toUnicode: oB, ucs2decode: v5, ucs2encode: rB }, Symbol.toStringTag, { value: "Module" })), gre = /* @__PURE__ */ Sk(mre); var vre = s1, bre = Nf, lB = XF, yre = sre, uB = gre; function cB(t) { var e = /* @__PURE__ */ Object.create(null); return t && Object.keys(t).forEach(function(n) { if (n !== "default") { var i = Object.getOwnPropertyDescriptor(t, n); Object.defineProperty(e, n, i.get ? i : { enumerable: !0, get: function() { return t[n]; } }); } }), e.default = t, Object.freeze(e); } var _u = /* @__PURE__ */ cB(vre), fB = /* @__PURE__ */ cB(bre); function wre(t) { return Object.prototype.toString.call(t); } function w5(t) { return wre(t) === "[object String]"; } const kre = Object.prototype.hasOwnProperty; function xre(t, e) { return kre.call(t, e); } function Hk(t) { return Array.prototype.slice.call(arguments, 1).forEach(function(n) { if (n) { if (typeof n != "object") throw new TypeError(n + "must be object"); Object.keys(n).forEach(function(i) { t[i] = n[i]; }); } }), t; } function dB(t, e, n) { return [].concat(t.slice(0, e), n, t.slice(e + 1)); } function k5(t) { return !(t >= 55296 && t <= 57343 || t >= 64976 && t <= 65007 || (t & 65535) === 65535 || (t & 65535) === 65534 || t >= 0 && t <= 8 || t === 11 || t >= 14 && t <= 31 || t >= 127 && t <= 159 || t > 1114111); } function tw(t) { if (t > 65535) { t -= 65536; const e = 55296 + (t >> 10), n = 56320 + (t & 1023); return String.fromCharCode(e, n); } return String.fromCharCode(t); } const hB = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, _re = /&([a-z#][a-z0-9]{1,31});/gi, Ore = new RegExp(hB.source + "|" + _re.source, "gi"), Sre = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i; function Cre(t, e) { if (e.charCodeAt(0) === 35 && Sre.test(e)) { const i = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10); return k5(i) ? tw(i) : t; } const n = lB.decodeHTML(t); return n !== t ? n : t; } function Ere(t) { return t.indexOf("\\") < 0 ? t : t.replace(hB, "$1"); } function Jg(t) { return t.indexOf("\\") < 0 && t.indexOf("&") < 0 ? t : t.replace(Ore, function(e, n, i) { return n || Cre(e, i); }); } const Tre = /[&<>"]/, $re = /[&<>"]/g, Mre = { "&": "&", "<": "<", ">": ">", '"': """ }; function Nre(t) { return Mre[t]; } function Uu(t) { return Tre.test(t) ? t.replace($re, Nre) : t; } const Are = /[.?*+^$[\]\\(){}|-]/g; function Dre(t) { return t.replace(Are, "\\$&"); } function mn(t) { switch (t) { case 9: case 32: return !0; } return !1; } function e0(t) { if (t >= 8192 && t <= 8202) return !0; switch (t) { case 9: case 10: case 11: case 12: case 13: case 32: case 160: case 5760: case 8239: case 8287: case 12288: return !0; } return !1; } function t0(t) { return fB.P.test(t); } function n0(t) { switch (t) { 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 !0; default: return !1; } } function Qk(t) { return t = t.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (t = t.replace(/ẞ/g, "ß")), t.toLowerCase().toUpperCase(); } const Pre = { mdurl: _u, ucmicro: fB }; var Ire = /* @__PURE__ */ Object.freeze({ __proto__: null, arrayReplaceAt: dB, assign: Hk, escapeHtml: Uu, escapeRE: Dre, fromCodePoint: tw, has: xre, isMdAsciiPunct: n0, isPunctChar: t0, isSpace: mn, isString: w5, isValidEntityCode: k5, isWhiteSpace: e0, lib: Pre, normalizeReference: Qk, unescapeAll: Jg, unescapeMd: Ere }); function Lre(t, e, n) { let i, r, s, o; const a = t.posMax, l = t.pos; for (t.pos = e + 1, i = 1; t.pos < a; ) { if (s = t.src.charCodeAt(t.pos), s === 93 && (i--, i === 0)) { r = !0; break; } if (o = t.pos, t.md.inline.skipToken(t), s === 91) { if (o === t.pos - 1) i++; else if (n) return t.pos = l, -1; } } let u = -1; return r && (u = t.pos), t.pos = l, u; } function Rre(t, e, n) { let i, r = e; const s = { ok: !1, pos: 0, lines: 0, str: "" }; if (t.charCodeAt(r) === 60) { for (r++; r < n; ) { if (i = t.charCodeAt(r), i === 10 || i === 60) return s; if (i === 62) return s.pos = r + 1, s.str = Jg(t.slice(e + 1, r)), s.ok = !0, s; if (i === 92 && r + 1 < n) { r += 2; continue; } r++; } return s; } let o = 0; for (; r < n && (i = t.charCodeAt(r), !(i === 32 || i < 32 || i === 127)); ) { if (i === 92 && r + 1 < n) { if (t.charCodeAt(r + 1) === 32) break; r += 2; continue; } if (i === 40 && (o++, o > 32)) return s; if (i === 41) { if (o === 0) break; o--; } r++; } return e === r || o !== 0 || (s.str = Jg(t.slice(e, r)), s.pos = r, s.ok = !0), s; } function jre(t, e, n) { let i, r, s = 0, o = e; const a = { ok: !1, pos: 0, lines: 0, str: "" }; if (o >= n || (r = t.charCodeAt(o), r !== 34 && r !== 39 && r !== 40)) return a; for (o++, r === 40 && (r = 41); o < n; ) { if (i = t.charCodeAt(o), i === r) return a.pos = o + 1, a.lines = s, a.str = Jg(t.slice(e + 1, o)), a.ok = !0, a; if (i === 40 && r === 41) return a; i === 10 ? s++ : i === 92 && o + 1 < n && (o++, t.charCodeAt(o) === 10 && s++), o++; } return a; } var Fre = /* @__PURE__ */ Object.freeze({ __proto__: null, parseLinkDestination: Rre, parseLinkLabel: Lre, parseLinkTitle: jre }); const ja = {}; ja.code_inline = function(t, e, n, i, r) { const s = t[e]; return "" + Uu(s.content) + ""; }; ja.code_block = function(t, e, n, i, r) { const s = t[e]; return "" + Uu(t[e].content) + ` `; }; ja.fence = function(t, e, n, i, r) { const s = t[e], o = s.info ? Jg(s.info).trim() : ""; let a = "", l = ""; if (o) { const f = o.split(/(\s+)/g); a = f[0], l = f.slice(2).join(""); } let u; if (n.highlight ? u = n.highlight(s.content, a, l) || Uu(s.content) : u = Uu(s.content), u.indexOf("${u} `; } return `
${u}
`; }; ja.image = function(t, e, n, i, r) { const s = t[e]; return s.attrs[s.attrIndex("alt")][1] = r.renderInlineAsText(s.children, n, i), r.renderToken(t, e, n); }; ja.hardbreak = function(t, e, n) { return n.xhtmlOut ? `
` : `
`; }; ja.softbreak = function(t, e, n) { return n.breaks ? n.xhtmlOut ? `
` : `
` : ` `; }; ja.text = function(t, e) { return Uu(t[e].content); }; ja.html_block = function(t, e) { return t[e].content; }; ja.html_inline = function(t, e) { return t[e].content; }; function Kh() { this.rules = Hk({}, ja); } Kh.prototype.renderAttrs = function(e) { let n, i, r; if (!e.attrs) return ""; for (r = "", n = 0, i = e.attrs.length; n < i; n++) r += " " + Uu(e.attrs[n][0]) + '="' + Uu(e.attrs[n][1]) + '"'; return r; }; Kh.prototype.renderToken = function(e, n, i) { const r = e[n]; let s = ""; if (r.hidden) return ""; r.block && r.nesting !== -1 && n && e[n - 1].hidden && (s += ` `), s += (r.nesting === -1 ? " ` : ">", s; }; Kh.prototype.renderInline = function(t, e, n) { let i = ""; const r = this.rules; for (let s = 0, o = t.length; s < o; s++) { const a = t[s].type; typeof r[a] < "u" ? i += r[a](t, s, e, n, this) : i += this.renderToken(t, s, e); } return i; }; Kh.prototype.renderInlineAsText = function(t, e, n) { let i = ""; for (let r = 0, s = t.length; r < s; r++) switch (t[r].type) { case "text": i += t[r].content; break; case "image": i += this.renderInlineAsText(t[r].children, e, n); break; case "html_inline": case "html_block": i += t[r].content; break; case "softbreak": case "hardbreak": i += ` `; break; } return i; }; Kh.prototype.render = function(t, e, n) { let i = ""; const r = this.rules; for (let s = 0, o = t.length; s < o; s++) { const a = t[s].type; a === "inline" ? i += this.renderInline(t[s].children, e, n) : typeof r[a] < "u" ? i += r[a](t, s, e, n, this) : i += this.renderToken(t, s, e, n); } return i; }; function xs() { this.__rules__ = [], this.__cache__ = null; } xs.prototype.__find__ = function(t) { for (let e = 0; e < this.__rules__.length; e++) if (this.__rules__[e].name === t) return e; return -1; }; xs.prototype.__compile__ = function() { const t = this, e = [""]; t.__rules__.forEach(function(n) { n.enabled && n.alt.forEach(function(i) { e.indexOf(i) < 0 && e.push(i); }); }), t.__cache__ = {}, e.forEach(function(n) { t.__cache__[n] = [], t.__rules__.forEach(function(i) { i.enabled && (n && i.alt.indexOf(n) < 0 || t.__cache__[n].push(i.fn)); }); }); }; xs.prototype.at = function(t, e, n) { const i = this.__find__(t), r = n || {}; if (i === -1) throw new Error("Parser rule not found: " + t); this.__rules__[i].fn = e, this.__rules__[i].alt = r.alt || [], this.__cache__ = null; }; xs.prototype.before = function(t, e, n, i) { const r = this.__find__(t), s = i || {}; if (r === -1) throw new Error("Parser rule not found: " + t); this.__rules__.splice(r, 0, { name: e, enabled: !0, fn: n, alt: s.alt || [] }), this.__cache__ = null; }; xs.prototype.after = function(t, e, n, i) { const r = this.__find__(t), s = i || {}; if (r === -1) throw new Error("Parser rule not found: " + t); this.__rules__.splice(r + 1, 0, { name: e, enabled: !0, fn: n, alt: s.alt || [] }), this.__cache__ = null; }; xs.prototype.push = function(t, e, n) { const i = n || {}; this.__rules__.push({ name: t, enabled: !0, fn: e, alt: i.alt || [] }), this.__cache__ = null; }; xs.prototype.enable = function(t, e) { Array.isArray(t) || (t = [t]); const n = []; return t.forEach(function(i) { const r = this.__find__(i); if (r < 0) { if (e) return; throw new Error("Rules manager: invalid rule name " + i); } this.__rules__[r].enabled = !0, n.push(i); }, this), this.__cache__ = null, n; }; xs.prototype.enableOnly = function(t, e) { Array.isArray(t) || (t = [t]), this.__rules__.forEach(function(n) { n.enabled = !1; }), this.enable(t, e); }; xs.prototype.disable = function(t, e) { Array.isArray(t) || (t = [t]); const n = []; return t.forEach(function(i) { const r = this.__find__(i); if (r < 0) { if (e) return; throw new Error("Rules manager: invalid rule name " + i); } this.__rules__[r].enabled = !1, n.push(i); }, this), this.__cache__ = null, n; }; xs.prototype.getRules = function(t) { return this.__cache__ === null && this.__compile__(), this.__cache__[t] || []; }; function Qo(t, e, n) { this.type = t, this.tag = e, this.attrs = null, this.map = null, this.nesting = n, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1; } Qo.prototype.attrIndex = function(e) { if (!this.attrs) return -1; const n = this.attrs; for (let i = 0, r = n.length; i < r; i++) if (n[i][0] === e) return i; return -1; }; Qo.prototype.attrPush = function(e) { this.attrs ? this.attrs.push(e) : this.attrs = [e]; }; Qo.prototype.attrSet = function(e, n) { const i = this.attrIndex(e), r = [e, n]; i < 0 ? this.attrPush(r) : this.attrs[i] = r; }; Qo.prototype.attrGet = function(e) { const n = this.attrIndex(e); let i = null; return n >= 0 && (i = this.attrs[n][1]), i; }; Qo.prototype.attrJoin = function(e, n) { const i = this.attrIndex(e); i < 0 ? this.attrPush([e, n]) : this.attrs[i][1] = this.attrs[i][1] + " " + n; }; function pB(t, e, n) { this.src = t, this.env = n, this.tokens = [], this.inlineMode = !1, this.md = e; } pB.prototype.Token = Qo; const Bre = /\r\n?|\n/g, zre = /\0/g; function Wre(t) { let e; e = t.src.replace(Bre, ` `), e = e.replace(zre, "�"), t.src = e; } function Hre(t) { let e; t.inlineMode ? (e = new t.Token("inline", "", 0), e.content = t.src, e.map = [0, 1], e.children = [], t.tokens.push(e)) : t.md.block.parse(t.src, t.md, t.env, t.tokens); } function Qre(t) { const e = t.tokens; for (let n = 0, i = e.length; n < i; n++) { const r = e[n]; r.type === "inline" && t.md.inline.parse(r.content, t.md, t.env, r.children); } } function Ure(t) { return /^\s]/i.test(t); } function Zre(t) { return /^<\/a\s*>/i.test(t); } function qre(t) { const e = t.tokens; if (t.md.options.linkify) for (let n = 0, i = e.length; n < i; n++) { if (e[n].type !== "inline" || !t.md.linkify.pretest(e[n].content)) continue; let r = e[n].children, s = 0; for (let o = r.length - 1; o >= 0; o--) { const a = r[o]; if (a.type === "link_close") { for (o--; r[o].level !== a.level && r[o].type !== "link_open"; ) o--; continue; } if (a.type === "html_inline" && (Ure(a.content) && s > 0 && s--, Zre(a.content) && s++), !(s > 0) && a.type === "text" && t.md.linkify.test(a.content)) { const l = a.content; let u = t.md.linkify.match(l); const f = []; let d = a.level, h = 0; u.length > 0 && u[0].index === 0 && o > 0 && r[o - 1].type === "text_special" && (u = u.slice(1)); for (let m = 0; m < u.length; m++) { const g = u[m].url, w = t.md.normalizeLink(g); if (!t.md.validateLink(w)) continue; let x = u[m].text; u[m].schema ? u[m].schema === "mailto:" && !/^mailto:/i.test(x) ? x = t.md.normalizeLinkText("mailto:" + x).replace(/^mailto:/, "") : x = t.md.normalizeLinkText(x) : x = t.md.normalizeLinkText("http://" + x).replace(/^http:\/\//, ""); const _ = u[m].index; if (_ > h) { const M = new t.Token("text", "", 0); M.content = l.slice(h, _), M.level = d, f.push(M); } const S = new t.Token("link_open", "a", 1); S.attrs = [["href", w]], S.level = d++, S.markup = "linkify", S.info = "auto", f.push(S); const C = new t.Token("text", "", 0); C.content = x, C.level = d, f.push(C); const E = new t.Token("link_close", "a", -1); E.level = --d, E.markup = "linkify", E.info = "auto", f.push(E), h = u[m].lastIndex; } if (h < l.length) { const m = new t.Token("text", "", 0); m.content = l.slice(h), m.level = d, f.push(m); } e[n].children = r = dB(r, o, f); } } } } const mB = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Yre = /\((c|tm|r)\)/i, Vre = /\((c|tm|r)\)/ig, Xre = { c: "©", r: "®", tm: "™" }; function Gre(t, e) { return Xre[e.toLowerCase()]; } function Kre(t) { let e = 0; for (let n = t.length - 1; n >= 0; n--) { const i = t[n]; i.type === "text" && !e && (i.content = i.content.replace(Vre, Gre)), i.type === "link_open" && i.info === "auto" && e--, i.type === "link_close" && i.info === "auto" && e++; } } function Jre(t) { let e = 0; for (let n = t.length - 1; n >= 0; n--) { const i = t[n]; i.type === "text" && !e && mB.test(i.content) && (i.content = i.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1—").replace(/(^|\s)--(?=\s|$)/mg, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1–")), i.type === "link_open" && i.info === "auto" && e--, i.type === "link_close" && i.info === "auto" && e++; } } function ese(t) { let e; if (t.md.options.typographer) for (e = t.tokens.length - 1; e >= 0; e--) t.tokens[e].type === "inline" && (Yre.test(t.tokens[e].content) && Kre(t.tokens[e].children), mB.test(t.tokens[e].content) && Jre(t.tokens[e].children)); } const tse = /['"]/, OM = /['"]/g, SM = "’"; function Hv(t, e, n) { return t.slice(0, e) + n + t.slice(e + 1); } function nse(t, e) { let n; const i = []; for (let r = 0; r < t.length; r++) { const s = t[r], o = t[r].level; for (n = i.length - 1; n >= 0 && !(i[n].level <= o); n--) ; if (i.length = n + 1, s.type !== "text") continue; let a = s.content, l = 0, u = a.length; e: for (; l < u; ) { OM.lastIndex = l; const f = OM.exec(a); if (!f) break; let d = !0, h = !0; l = f.index + 1; const m = f[0] === "'"; let g = 32; if (f.index - 1 >= 0) g = a.charCodeAt(f.index - 1); else for (n = r - 1; n >= 0 && !(t[n].type === "softbreak" || t[n].type === "hardbreak"); n--) if (t[n].content) { g = t[n].content.charCodeAt(t[n].content.length - 1); break; } let w = 32; if (l < u) w = a.charCodeAt(l); else for (n = r + 1; n < t.length && !(t[n].type === "softbreak" || t[n].type === "hardbreak"); n++) if (t[n].content) { w = t[n].content.charCodeAt(0); break; } const x = n0(g) || t0(String.fromCharCode(g)), _ = n0(w) || t0(String.fromCharCode(w)), S = e0(g), C = e0(w); if (C ? d = !1 : _ && (S || x || (d = !1)), S ? h = !1 : x && (C || _ || (h = !1)), w === 34 && f[0] === '"' && g >= 48 && g <= 57 && (h = d = !1), d && h && (d = x, h = _), !d && !h) { m && (s.content = Hv(s.content, f.index, SM)); continue; } if (h) for (n = i.length - 1; n >= 0; n--) { let E = i[n]; if (i[n].level < o) break; if (E.single === m && i[n].level === o) { E = i[n]; let M, $; m ? (M = e.md.options.quotes[2], $ = e.md.options.quotes[3]) : (M = e.md.options.quotes[0], $ = e.md.options.quotes[1]), s.content = Hv(s.content, f.index, $), t[E.token].content = Hv(t[E.token].content, E.pos, M), l += $.length - 1, E.token === r && (l += M.length - 1), a = s.content, u = a.length, i.length = n; continue e; } } d ? i.push({ token: r, pos: f.index, single: m, level: o }) : h && m && (s.content = Hv(s.content, f.index, SM)); } } } function ise(t) { if (t.md.options.typographer) for (let e = t.tokens.length - 1; e >= 0; e--) t.tokens[e].type !== "inline" || !tse.test(t.tokens[e].content) || nse(t.tokens[e].children, t); } function rse(t) { let e, n; const i = t.tokens, r = i.length; for (let s = 0; s < r; s++) { if (i[s].type !== "inline") continue; const o = i[s].children, a = o.length; for (e = 0; e < a; e++) o[e].type === "text_special" && (o[e].type = "text"); for (e = n = 0; e < a; e++) o[e].type === "text" && e + 1 < a && o[e + 1].type === "text" ? o[e + 1].content = o[e].content + o[e + 1].content : (e !== n && (o[n] = o[e]), n++); e !== n && (o.length = n); } } const g3 = [ ["normalize", Wre], ["block", Hre], ["inline", Qre], ["linkify", qre], ["replacements", ese], ["smartquotes", ise], // `text_join` finds `text_special` tokens (for escape sequences) // and joins them with the rest of the text ["text_join", rse] ]; function x5() { this.ruler = new xs(); for (let t = 0; t < g3.length; t++) this.ruler.push(g3[t][0], g3[t][1]); } x5.prototype.process = function(t) { const e = this.ruler.getRules(""); for (let n = 0, i = e.length; n < i; n++) e[n](t); }; x5.prototype.State = pB; function Fa(t, e, n, i) { this.src = t, this.md = e, this.env = n, this.tokens = i, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0; const r = this.src; for (let s = 0, o = 0, a = 0, l = 0, u = r.length, f = !1; o < u; o++) { const d = r.charCodeAt(o); if (!f) if (mn(d)) { a++, d === 9 ? l += 4 - l % 4 : l++; continue; } else f = !0; (d === 10 || o === u - 1) && (d !== 10 && o++, this.bMarks.push(s), this.eMarks.push(o), this.tShift.push(a), this.sCount.push(l), this.bsCount.push(0), f = !1, a = 0, l = 0, s = o + 1); } this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1; } Fa.prototype.push = function(t, e, n) { const i = new Qo(t, e, n); return i.block = !0, n < 0 && this.level--, i.level = this.level, n > 0 && this.level++, this.tokens.push(i), i; }; Fa.prototype.isEmpty = function(e) { return this.bMarks[e] + this.tShift[e] >= this.eMarks[e]; }; Fa.prototype.skipEmptyLines = function(e) { for (let n = this.lineMax; e < n && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++) ; return e; }; Fa.prototype.skipSpaces = function(e) { for (let n = this.src.length; e < n; e++) { const i = this.src.charCodeAt(e); if (!mn(i)) break; } return e; }; Fa.prototype.skipSpacesBack = function(e, n) { if (e <= n) return e; for (; e > n; ) if (!mn(this.src.charCodeAt(--e))) return e + 1; return e; }; Fa.prototype.skipChars = function(e, n) { for (let i = this.src.length; e < i && this.src.charCodeAt(e) === n; e++) ; return e; }; Fa.prototype.skipCharsBack = function(e, n, i) { if (e <= i) return e; for (; e > i; ) if (n !== this.src.charCodeAt(--e)) return e + 1; return e; }; Fa.prototype.getLines = function(e, n, i, r) { if (e >= n) return ""; const s = new Array(n - e); for (let o = 0, a = e; a < n; a++, o++) { let l = 0; const u = this.bMarks[a]; let f = u, d; for (a + 1 < n || r ? d = this.eMarks[a] + 1 : d = this.eMarks[a]; f < d && l < i; ) { const h = this.src.charCodeAt(f); if (mn(h)) h === 9 ? l += 4 - (l + this.bsCount[a]) % 4 : l++; else if (f - u < this.tShift[a]) l++; else break; f++; } l > i ? s[o] = new Array(l - i + 1).join(" ") + this.src.slice(f, d) : s[o] = this.src.slice(f, d); } return s.join(""); }; Fa.prototype.Token = Qo; function v3(t, e) { const n = t.bMarks[e] + t.tShift[e], i = t.eMarks[e]; return t.src.slice(n, i); } function CM(t) { const e = [], n = t.length; let i = 0, r = t.charCodeAt(i), s = !1, o = 0, a = ""; for (; i < n; ) r === 124 && (s ? (a += t.substring(o, i - 1), o = i) : (e.push(a + t.substring(o, i)), a = "", o = i + 1)), s = r === 92, i++, r = t.charCodeAt(i); return e.push(a + t.substring(o)), e; } function sse(t, e, n, i) { if (e + 2 > n) return !1; let r = e + 1; if (t.sCount[r] < t.blkIndent || t.sCount[r] - t.blkIndent >= 4) return !1; let s = t.bMarks[r] + t.tShift[r]; if (s >= t.eMarks[r]) return !1; const o = t.src.charCodeAt(s++); if (o !== 124 && o !== 45 && o !== 58 || s >= t.eMarks[r]) return !1; const a = t.src.charCodeAt(s++); if (a !== 124 && a !== 45 && a !== 58 && !mn(a) || o === 45 && mn(a)) return !1; for (; s < t.eMarks[r]; ) { const C = t.src.charCodeAt(s); if (C !== 124 && C !== 45 && C !== 58 && !mn(C)) return !1; s++; } let l = v3(t, e + 1), u = l.split("|"); const f = []; for (let C = 0; C < u.length; C++) { const E = u[C].trim(); if (!E) { if (C === 0 || C === u.length - 1) continue; return !1; } if (!/^:?-+:?$/.test(E)) return !1; E.charCodeAt(E.length - 1) === 58 ? f.push(E.charCodeAt(0) === 58 ? "center" : "right") : E.charCodeAt(0) === 58 ? f.push("left") : f.push(""); } if (l = v3(t, e).trim(), l.indexOf("|") === -1 || t.sCount[e] - t.blkIndent >= 4) return !1; u = CM(l), u.length && u[0] === "" && u.shift(), u.length && u[u.length - 1] === "" && u.pop(); const d = u.length; if (d === 0 || d !== f.length) return !1; if (i) return !0; const h = t.parentType; t.parentType = "table"; const m = t.md.block.ruler.getRules("blockquote"), g = t.push("table_open", "table", 1), w = [e, 0]; g.map = w; const x = t.push("thead_open", "thead", 1); x.map = [e, e + 1]; const _ = t.push("tr_open", "tr", 1); _.map = [e, e + 1]; for (let C = 0; C < u.length; C++) { const E = t.push("th_open", "th", 1); f[C] && (E.attrs = [["style", "text-align:" + f[C]]]); const M = t.push("inline", "", 0); M.content = u[C].trim(), M.children = [], t.push("th_close", "th", -1); } t.push("tr_close", "tr", -1), t.push("thead_close", "thead", -1); let S; for (r = e + 2; r < n && !(t.sCount[r] < t.blkIndent); r++) { let C = !1; for (let M = 0, $ = m.length; M < $; M++) if (m[M](t, r, n, !0)) { C = !0; break; } if (C || (l = v3(t, r).trim(), !l) || t.sCount[r] - t.blkIndent >= 4) break; if (u = CM(l), u.length && u[0] === "" && u.shift(), u.length && u[u.length - 1] === "" && u.pop(), r === e + 2) { const M = t.push("tbody_open", "tbody", 1); M.map = S = [e + 2, 0]; } const E = t.push("tr_open", "tr", 1); E.map = [r, r + 1]; for (let M = 0; M < d; M++) { const $ = t.push("td_open", "td", 1); f[M] && ($.attrs = [["style", "text-align:" + f[M]]]); const P = t.push("inline", "", 0); P.content = u[M] ? u[M].trim() : "", P.children = [], t.push("td_close", "td", -1); } t.push("tr_close", "tr", -1); } return S && (t.push("tbody_close", "tbody", -1), S[1] = r), t.push("table_close", "table", -1), w[1] = r, t.parentType = h, t.line = r, !0; } function ose(t, e, n) { if (t.sCount[e] - t.blkIndent < 4) return !1; let i = e + 1, r = i; for (; i < n; ) { if (t.isEmpty(i)) { i++; continue; } if (t.sCount[i] - t.blkIndent >= 4) { i++, r = i; continue; } break; } t.line = r; const s = t.push("code_block", "code", 0); return s.content = t.getLines(e, r, 4 + t.blkIndent, !1) + ` `, s.map = [e, t.line], !0; } function ase(t, e, n, i) { let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e]; if (t.sCount[e] - t.blkIndent >= 4 || r + 3 > s) return !1; const o = t.src.charCodeAt(r); if (o !== 126 && o !== 96) return !1; let a = r; r = t.skipChars(r, o); let l = r - a; if (l < 3) return !1; const u = t.src.slice(a, r), f = t.src.slice(r, s); if (o === 96 && f.indexOf(String.fromCharCode(o)) >= 0) return !1; if (i) return !0; let d = e, h = !1; for (; d++, !(d >= n || (r = a = t.bMarks[d] + t.tShift[d], s = t.eMarks[d], r < s && t.sCount[d] < t.blkIndent)); ) if (t.src.charCodeAt(r) === o && !(t.sCount[d] - t.blkIndent >= 4) && (r = t.skipChars(r, o), !(r - a < l) && (r = t.skipSpaces(r), !(r < s)))) { h = !0; break; } l = t.sCount[e], t.line = d + (h ? 1 : 0); const m = t.push("fence", "code", 0); return m.info = f, m.content = t.getLines(e + 1, d, l, !0), m.markup = u, m.map = [e, t.line], !0; } function lse(t, e, n, i) { let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e]; const o = t.lineMax; if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(r) !== 62) return !1; if (i) return !0; const a = [], l = [], u = [], f = [], d = t.md.block.ruler.getRules("blockquote"), h = t.parentType; t.parentType = "blockquote"; let m = !1, g; for (g = e; g < n; g++) { const C = t.sCount[g] < t.blkIndent; if (r = t.bMarks[g] + t.tShift[g], s = t.eMarks[g], r >= s) break; if (t.src.charCodeAt(r++) === 62 && !C) { let M = t.sCount[g] + 1, $, P; t.src.charCodeAt(r) === 32 ? (r++, M++, P = !1, $ = !0) : t.src.charCodeAt(r) === 9 ? ($ = !0, (t.bsCount[g] + M) % 4 === 3 ? (r++, M++, P = !1) : P = !0) : $ = !1; let W = M; for (a.push(t.bMarks[g]), t.bMarks[g] = r; r < s; ) { const z = t.src.charCodeAt(r); if (mn(z)) z === 9 ? W += 4 - (W + t.bsCount[g] + (P ? 1 : 0)) % 4 : W++; else break; r++; } m = r >= s, l.push(t.bsCount[g]), t.bsCount[g] = t.sCount[g] + 1 + ($ ? 1 : 0), u.push(t.sCount[g]), t.sCount[g] = W - M, f.push(t.tShift[g]), t.tShift[g] = r - t.bMarks[g]; continue; } if (m) break; let E = !1; for (let M = 0, $ = d.length; M < $; M++) if (d[M](t, g, n, !0)) { E = !0; break; } if (E) { t.lineMax = g, t.blkIndent !== 0 && (a.push(t.bMarks[g]), l.push(t.bsCount[g]), f.push(t.tShift[g]), u.push(t.sCount[g]), t.sCount[g] -= t.blkIndent); break; } a.push(t.bMarks[g]), l.push(t.bsCount[g]), f.push(t.tShift[g]), u.push(t.sCount[g]), t.sCount[g] = -1; } const w = t.blkIndent; t.blkIndent = 0; const x = t.push("blockquote_open", "blockquote", 1); x.markup = ">"; const _ = [e, 0]; x.map = _, t.md.block.tokenize(t, e, g); const S = t.push("blockquote_close", "blockquote", -1); S.markup = ">", t.lineMax = o, t.parentType = h, _[1] = t.line; for (let C = 0; C < f.length; C++) t.bMarks[C + e] = a[C], t.tShift[C + e] = f[C], t.sCount[C + e] = u[C], t.bsCount[C + e] = l[C]; return t.blkIndent = w, !0; } function use(t, e, n, i) { const r = t.eMarks[e]; if (t.sCount[e] - t.blkIndent >= 4) return !1; let s = t.bMarks[e] + t.tShift[e]; const o = t.src.charCodeAt(s++); if (o !== 42 && o !== 45 && o !== 95) return !1; let a = 1; for (; s < r; ) { const u = t.src.charCodeAt(s++); if (u !== o && !mn(u)) return !1; u === o && a++; } if (a < 3) return !1; if (i) return !0; t.line = e + 1; const l = t.push("hr", "hr", 0); return l.map = [e, t.line], l.markup = Array(a + 1).join(String.fromCharCode(o)), !0; } function EM(t, e) { const n = t.eMarks[e]; let i = t.bMarks[e] + t.tShift[e]; const r = t.src.charCodeAt(i++); if (r !== 42 && r !== 45 && r !== 43) return -1; if (i < n) { const s = t.src.charCodeAt(i); if (!mn(s)) return -1; } return i; } function TM(t, e) { const n = t.bMarks[e] + t.tShift[e], i = t.eMarks[e]; let r = n; if (r + 1 >= i) return -1; let s = t.src.charCodeAt(r++); if (s < 48 || s > 57) return -1; for (; ; ) { if (r >= i) return -1; if (s = t.src.charCodeAt(r++), s >= 48 && s <= 57) { if (r - n >= 10) return -1; continue; } if (s === 41 || s === 46) break; return -1; } return r < i && (s = t.src.charCodeAt(r), !mn(s)) ? -1 : r; } function cse(t, e) { const n = t.level + 2; for (let i = e + 2, r = t.tokens.length - 2; i < r; i++) t.tokens[i].level === n && t.tokens[i].type === "paragraph_open" && (t.tokens[i + 2].hidden = !0, t.tokens[i].hidden = !0, i += 2); } function fse(t, e, n, i) { let r, s, o, a, l = e, u = !0; if (t.sCount[l] - t.blkIndent >= 4 || t.listIndent >= 0 && t.sCount[l] - t.listIndent >= 4 && t.sCount[l] < t.blkIndent) return !1; let f = !1; i && t.parentType === "paragraph" && t.sCount[l] >= t.blkIndent && (f = !0); let d, h, m; if ((m = TM(t, l)) >= 0) { if (d = !0, o = t.bMarks[l] + t.tShift[l], h = Number(t.src.slice(o, m - 1)), f && h !== 1) return !1; } else if ((m = EM(t, l)) >= 0) d = !1; else return !1; if (f && t.skipSpaces(m) >= t.eMarks[l]) return !1; if (i) return !0; const g = t.src.charCodeAt(m - 1), w = t.tokens.length; d ? (a = t.push("ordered_list_open", "ol", 1), h !== 1 && (a.attrs = [["start", h]])) : a = t.push("bullet_list_open", "ul", 1); const x = [l, 0]; a.map = x, a.markup = String.fromCharCode(g); let _ = !1; const S = t.md.block.ruler.getRules("list"), C = t.parentType; for (t.parentType = "list"; l < n; ) { s = m, r = t.eMarks[l]; const E = t.sCount[l] + m - (t.bMarks[l] + t.tShift[l]); let M = E; for (; s < r; ) { const R = t.src.charCodeAt(s); if (R === 9) M += 4 - (M + t.bsCount[l]) % 4; else if (R === 32) M++; else break; s++; } const $ = s; let P; $ >= r ? P = 1 : P = M - E, P > 4 && (P = 1); const W = E + P; a = t.push("list_item_open", "li", 1), a.markup = String.fromCharCode(g); const z = [l, 0]; a.map = z, d && (a.info = t.src.slice(o, m - 1)); const Z = t.tight, L = t.tShift[l], Q = t.sCount[l], V = t.listIndent; if (t.listIndent = t.blkIndent, t.blkIndent = W, t.tight = !0, t.tShift[l] = $ - t.bMarks[l], t.sCount[l] = M, $ >= r && t.isEmpty(l + 1) ? t.line = Math.min(t.line + 2, n) : t.md.block.tokenize(t, l, n, !0), (!t.tight || _) && (u = !1), _ = t.line - l > 1 && t.isEmpty(t.line - 1), t.blkIndent = t.listIndent, t.listIndent = V, t.tShift[l] = L, t.sCount[l] = Q, t.tight = Z, a = t.push("list_item_close", "li", -1), a.markup = String.fromCharCode(g), l = t.line, z[1] = l, l >= n || t.sCount[l] < t.blkIndent || t.sCount[l] - t.blkIndent >= 4) break; let H = !1; for (let R = 0, q = S.length; R < q; R++) if (S[R](t, l, n, !0)) { H = !0; break; } if (H) break; if (d) { if (m = TM(t, l), m < 0) break; o = t.bMarks[l] + t.tShift[l]; } else if (m = EM(t, l), m < 0) break; if (g !== t.src.charCodeAt(m - 1)) break; } return d ? a = t.push("ordered_list_close", "ol", -1) : a = t.push("bullet_list_close", "ul", -1), a.markup = String.fromCharCode(g), x[1] = l, t.line = l, t.parentType = C, u && cse(t, w), !0; } function dse(t, e, n, i) { let r = 0, s = t.bMarks[e] + t.tShift[e], o = t.eMarks[e], a = e + 1; if (t.sCount[e] - t.blkIndent >= 4 || t.src.charCodeAt(s) !== 91) return !1; for (; ++s < o; ) if (t.src.charCodeAt(s) === 93 && t.src.charCodeAt(s - 1) !== 92) { if (s + 1 === o || t.src.charCodeAt(s + 1) !== 58) return !1; break; } const l = t.lineMax, u = t.md.block.ruler.getRules("reference"), f = t.parentType; for (t.parentType = "reference"; a < l && !t.isEmpty(a); a++) { if (t.sCount[a] - t.blkIndent > 3 || t.sCount[a] < 0) continue; let M = !1; for (let $ = 0, P = u.length; $ < P; $++) if (u[$](t, a, l, !0)) { M = !0; break; } if (M) break; } const d = t.getLines(e, a, t.blkIndent, !1).trim(); o = d.length; let h = -1; for (s = 1; s < o; s++) { const M = d.charCodeAt(s); if (M === 91) return !1; if (M === 93) { h = s; break; } else M === 10 ? r++ : M === 92 && (s++, s < o && d.charCodeAt(s) === 10 && r++); } if (h < 0 || d.charCodeAt(h + 1) !== 58) return !1; for (s = h + 2; s < o; s++) { const M = d.charCodeAt(s); if (M === 10) r++; else if (!mn(M)) break; } const m = t.md.helpers.parseLinkDestination(d, s, o); if (!m.ok) return !1; const g = t.md.normalizeLink(m.str); if (!t.md.validateLink(g)) return !1; s = m.pos, r += m.lines; const w = s, x = r, _ = s; for (; s < o; s++) { const M = d.charCodeAt(s); if (M === 10) r++; else if (!mn(M)) break; } const S = t.md.helpers.parseLinkTitle(d, s, o); let C; for (s < o && _ !== s && S.ok ? (C = S.str, s = S.pos, r += S.lines) : (C = "", s = w, r = x); s < o; ) { const M = d.charCodeAt(s); if (!mn(M)) break; s++; } if (s < o && d.charCodeAt(s) !== 10 && C) for (C = "", s = w, r = x; s < o; ) { const M = d.charCodeAt(s); if (!mn(M)) break; s++; } if (s < o && d.charCodeAt(s) !== 10) return !1; const E = Qk(d.slice(1, h)); return E ? (i || (typeof t.env.references > "u" && (t.env.references = {}), typeof t.env.references[E] > "u" && (t.env.references[E] = { title: C, href: g }), t.parentType = f, t.line = e + r + 1), !0) : !1; } var hse = ["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"]; const pse = "[a-zA-Z_:][a-zA-Z0-9:._-]*", mse = "[^\"'=<>`\\x00-\\x20]+", gse = "'[^']*'", vse = '"[^"]*"', bse = "(?:" + mse + "|" + gse + "|" + vse + ")", yse = "(?:\\s+" + pse + "(?:\\s*=\\s*" + bse + ")?)", gB = "<[A-Za-z][A-Za-z0-9\\-]*" + yse + "*\\s*\\/?>", vB = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", wse = "|", kse = "<[?][\\s\\S]*?[?]>", xse = "]*>", _se = "", Ose = new RegExp("^(?:" + gB + "|" + vB + "|" + wse + "|" + kse + "|" + xse + "|" + _se + ")"), Sse = new RegExp("^(?:" + gB + "|" + vB + ")"), _d = [[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0], [/^/, !0], [/^<\?/, /\?>/, !0], [/^/, !0], [/^/, !0], [new RegExp("^|$))", "i"), /^$/, !0], [new RegExp(Sse.source + "\\s*$"), /^$/, !1]]; function Cse(t, e, n, i) { let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e]; if (t.sCount[e] - t.blkIndent >= 4 || !t.md.options.html || t.src.charCodeAt(r) !== 60) return !1; let o = t.src.slice(r, s), a = 0; for (; a < _d.length && !_d[a][0].test(o); a++) ; if (a === _d.length) return !1; if (i) return _d[a][2]; let l = e + 1; if (!_d[a][1].test(o)) { for (; l < n && !(t.sCount[l] < t.blkIndent); l++) if (r = t.bMarks[l] + t.tShift[l], s = t.eMarks[l], o = t.src.slice(r, s), _d[a][1].test(o)) { o.length !== 0 && l++; break; } } t.line = l; const u = t.push("html_block", "", 0); return u.map = [e, l], u.content = t.getLines(e, l, t.blkIndent, !0), !0; } function Ese(t, e, n, i) { let r = t.bMarks[e] + t.tShift[e], s = t.eMarks[e]; if (t.sCount[e] - t.blkIndent >= 4) return !1; let o = t.src.charCodeAt(r); if (o !== 35 || r >= s) return !1; let a = 1; for (o = t.src.charCodeAt(++r); o === 35 && r < s && a <= 6; ) a++, o = t.src.charCodeAt(++r); if (a > 6 || r < s && !mn(o)) return !1; if (i) return !0; s = t.skipSpacesBack(s, r); const l = t.skipCharsBack(s, 35, r); l > r && mn(t.src.charCodeAt(l - 1)) && (s = l), t.line = e + 1; const u = t.push("heading_open", "h" + String(a), 1); u.markup = "########".slice(0, a), u.map = [e, t.line]; const f = t.push("inline", "", 0); f.content = t.src.slice(r, s).trim(), f.map = [e, t.line], f.children = []; const d = t.push("heading_close", "h" + String(a), -1); return d.markup = "########".slice(0, a), !0; } function Tse(t, e, n) { const i = t.md.block.ruler.getRules("paragraph"); if (t.sCount[e] - t.blkIndent >= 4) return !1; const r = t.parentType; t.parentType = "paragraph"; let s = 0, o, a = e + 1; for (; a < n && !t.isEmpty(a); a++) { if (t.sCount[a] - t.blkIndent > 3) continue; if (t.sCount[a] >= t.blkIndent) { let m = t.bMarks[a] + t.tShift[a]; const g = t.eMarks[a]; if (m < g && (o = t.src.charCodeAt(m), (o === 45 || o === 61) && (m = t.skipChars(m, o), m = t.skipSpaces(m), m >= g))) { s = o === 61 ? 1 : 2; break; } } if (t.sCount[a] < 0) continue; let h = !1; for (let m = 0, g = i.length; m < g; m++) if (i[m](t, a, n, !0)) { h = !0; break; } if (h) break; } if (!s) return !1; const l = t.getLines(e, a, t.blkIndent, !1).trim(); t.line = a + 1; const u = t.push("heading_open", "h" + String(s), 1); u.markup = String.fromCharCode(o), u.map = [e, t.line]; const f = t.push("inline", "", 0); f.content = l, f.map = [e, t.line - 1], f.children = []; const d = t.push("heading_close", "h" + String(s), -1); return d.markup = String.fromCharCode(o), t.parentType = r, !0; } function $se(t, e, n) { const i = t.md.block.ruler.getRules("paragraph"), r = t.parentType; let s = e + 1; for (t.parentType = "paragraph"; s < n && !t.isEmpty(s); s++) { if (t.sCount[s] - t.blkIndent > 3 || t.sCount[s] < 0) continue; let u = !1; for (let f = 0, d = i.length; f < d; f++) if (i[f](t, s, n, !0)) { u = !0; break; } if (u) break; } const o = t.getLines(e, s, t.blkIndent, !1).trim(); t.line = s; const a = t.push("paragraph_open", "p", 1); a.map = [e, t.line]; const l = t.push("inline", "", 0); return l.content = o, l.map = [e, t.line], l.children = [], t.push("paragraph_close", "p", -1), t.parentType = r, !0; } const Qv = [ // First 2 params - rule name & source. Secondary array - list of rules, // which can be terminated by this one. ["table", sse, ["paragraph", "reference"]], ["code", ose], ["fence", ase, ["paragraph", "reference", "blockquote", "list"]], ["blockquote", lse, ["paragraph", "reference", "blockquote", "list"]], ["hr", use, ["paragraph", "reference", "blockquote", "list"]], ["list", fse, ["paragraph", "reference", "blockquote"]], ["reference", dse], ["html_block", Cse, ["paragraph", "reference", "blockquote"]], ["heading", Ese, ["paragraph", "reference", "blockquote"]], ["lheading", Tse], ["paragraph", $se] ]; function Uk() { this.ruler = new xs(); for (let t = 0; t < Qv.length; t++) this.ruler.push(Qv[t][0], Qv[t][1], { alt: (Qv[t][2] || []).slice() }); } Uk.prototype.tokenize = function(t, e, n) { const i = this.ruler.getRules(""), r = i.length, s = t.md.options.maxNesting; let o = e, a = !1; for (; o < n && (t.line = o = t.skipEmptyLines(o), !(o >= n || t.sCount[o] < t.blkIndent)); ) { if (t.level >= s) { t.line = n; break; } const l = t.line; let u = !1; for (let f = 0; f < r; f++) if (u = i[f](t, o, n, !1), u) { if (l >= t.line) throw new Error("block rule didn't increment state.line"); break; } if (!u) throw new Error("none of the block rules matched"); t.tight = !a, t.isEmpty(t.line - 1) && (a = !0), o = t.line, o < n && t.isEmpty(o) && (a = !0, o++, t.line = o); } }; Uk.prototype.parse = function(t, e, n, i) { if (!t) return; const r = new this.State(t, e, n, i); this.tokenize(r, r.line, r.lineMax); }; Uk.prototype.State = Fa; function o1(t, e, n, i) { this.src = t, this.env = n, this.md = e, this.tokens = i, this.tokens_meta = Array(i.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 = !1, this.linkLevel = 0; } o1.prototype.pushPending = function() { const t = new Qo("text", "", 0); return t.content = this.pending, t.level = this.pendingLevel, this.tokens.push(t), this.pending = "", t; }; o1.prototype.push = function(t, e, n) { this.pending && this.pushPending(); const i = new Qo(t, e, n); let r = null; return n < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), i.level = this.level, n > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], r = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(i), this.tokens_meta.push(r), i; }; o1.prototype.scanDelims = function(t, e) { let n, i, r = !0, s = !0; const o = this.posMax, a = this.src.charCodeAt(t), l = t > 0 ? this.src.charCodeAt(t - 1) : 32; let u = t; for (; u < o && this.src.charCodeAt(u) === a; ) u++; const f = u - t, d = u < o ? this.src.charCodeAt(u) : 32, h = n0(l) || t0(String.fromCharCode(l)), m = n0(d) || t0(String.fromCharCode(d)), g = e0(l), w = e0(d); return w ? r = !1 : m && (g || h || (r = !1)), g ? s = !1 : h && (w || m || (s = !1)), e ? (n = r, i = s) : (n = r && (!s || h), i = s && (!r || m)), { can_open: n, can_close: i, length: f }; }; o1.prototype.Token = Qo; function Mse(t) { switch (t) { 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 !0; default: return !1; } } function Nse(t, e) { let n = t.pos; for (; n < t.posMax && !Mse(t.src.charCodeAt(n)); ) n++; return n === t.pos ? !1 : (e || (t.pending += t.src.slice(t.pos, n)), t.pos = n, !0); } const Ase = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i; function Dse(t, e) { if (!t.md.options.linkify || t.linkLevel > 0) return !1; const n = t.pos, i = t.posMax; if (n + 3 > i || t.src.charCodeAt(n) !== 58 || t.src.charCodeAt(n + 1) !== 47 || t.src.charCodeAt(n + 2) !== 47) return !1; const r = t.pending.match(Ase); if (!r) return !1; const s = r[1], o = t.md.linkify.matchAtStart(t.src.slice(n - s.length)); if (!o) return !1; let a = o.url; if (a.length <= s.length) return !1; a = a.replace(/\*+$/, ""); const l = t.md.normalizeLink(a); if (!t.md.validateLink(l)) return !1; if (!e) { t.pending = t.pending.slice(0, -s.length); const u = t.push("link_open", "a", 1); u.attrs = [["href", l]], u.markup = "linkify", u.info = "auto"; const f = t.push("text", "", 0); f.content = t.md.normalizeLinkText(a); const d = t.push("link_close", "a", -1); d.markup = "linkify", d.info = "auto"; } return t.pos += a.length - s.length, !0; } function Pse(t, e) { let n = t.pos; if (t.src.charCodeAt(n) !== 10) return !1; const i = t.pending.length - 1, r = t.posMax; if (!e) if (i >= 0 && t.pending.charCodeAt(i) === 32) if (i >= 1 && t.pending.charCodeAt(i - 1) === 32) { let s = i - 1; for (; s >= 1 && t.pending.charCodeAt(s - 1) === 32; ) s--; t.pending = t.pending.slice(0, s), t.push("hardbreak", "br", 0); } else t.pending = t.pending.slice(0, -1), t.push("softbreak", "br", 0); else t.push("softbreak", "br", 0); for (n++; n < r && mn(t.src.charCodeAt(n)); ) n++; return t.pos = n, !0; } const _5 = []; for (let t = 0; t < 256; t++) _5.push(0); "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t) { _5[t.charCodeAt(0)] = 1; }); function Ise(t, e) { let n = t.pos; const i = t.posMax; if (t.src.charCodeAt(n) !== 92 || (n++, n >= i)) return !1; let r = t.src.charCodeAt(n); if (r === 10) { for (e || t.push("hardbreak", "br", 0), n++; n < i && (r = t.src.charCodeAt(n), !!mn(r)); ) n++; return t.pos = n, !0; } let s = t.src[n]; if (r >= 55296 && r <= 56319 && n + 1 < i) { const a = t.src.charCodeAt(n + 1); a >= 56320 && a <= 57343 && (s += t.src[n + 1], n++); } const o = "\\" + s; if (!e) { const a = t.push("text_special", "", 0); r < 256 && _5[r] !== 0 ? a.content = s : a.content = o, a.markup = o, a.info = "escape"; } return t.pos = n + 1, !0; } function Lse(t, e) { let n = t.pos; if (t.src.charCodeAt(n) !== 96) return !1; const r = n; n++; const s = t.posMax; for (; n < s && t.src.charCodeAt(n) === 96; ) n++; const o = t.src.slice(r, n), a = o.length; if (t.backticksScanned && (t.backticks[a] || 0) <= r) return e || (t.pending += o), t.pos += a, !0; let l = n, u; for (; (u = t.src.indexOf("`", l)) !== -1; ) { for (l = u + 1; l < s && t.src.charCodeAt(l) === 96; ) l++; const f = l - u; if (f === a) { if (!e) { const d = t.push("code_inline", "code", 0); d.markup = o, d.content = t.src.slice(n, u).replace(/\n/g, " ").replace(/^ (.+) $/, "$1"); } return t.pos = l, !0; } t.backticks[f] = u; } return t.backticksScanned = !0, e || (t.pending += o), t.pos += a, !0; } function Rse(t, e) { const n = t.pos, i = t.src.charCodeAt(n); if (e || i !== 126) return !1; const r = t.scanDelims(t.pos, !0); let s = r.length; const o = String.fromCharCode(i); if (s < 2) return !1; let a; s % 2 && (a = t.push("text", "", 0), a.content = o, s--); for (let l = 0; l < s; l += 2) a = t.push("text", "", 0), a.content = o + o, t.delimiters.push({ marker: i, length: 0, // disable "rule of 3" length checks meant for emphasis token: t.tokens.length - 1, end: -1, open: r.can_open, close: r.can_close }); return t.pos += r.length, !0; } function $M(t, e) { let n; const i = [], r = e.length; for (let s = 0; s < r; s++) { const o = e[s]; if (o.marker !== 126 || o.end === -1) continue; const a = e[o.end]; n = t.tokens[o.token], n.type = "s_open", n.tag = "s", n.nesting = 1, n.markup = "~~", n.content = "", n = t.tokens[a.token], n.type = "s_close", n.tag = "s", n.nesting = -1, n.markup = "~~", n.content = "", t.tokens[a.token - 1].type === "text" && t.tokens[a.token - 1].content === "~" && i.push(a.token - 1); } for (; i.length; ) { const s = i.pop(); let o = s + 1; for (; o < t.tokens.length && t.tokens[o].type === "s_close"; ) o++; o--, s !== o && (n = t.tokens[o], t.tokens[o] = t.tokens[s], t.tokens[s] = n); } } function jse(t) { const e = t.tokens_meta, n = t.tokens_meta.length; $M(t, t.delimiters); for (let i = 0; i < n; i++) e[i] && e[i].delimiters && $M(t, e[i].delimiters); } var bB = { tokenize: Rse, postProcess: jse }; function Fse(t, e) { const n = t.pos, i = t.src.charCodeAt(n); if (e || i !== 95 && i !== 42) return !1; const r = t.scanDelims(t.pos, i === 42); for (let s = 0; s < r.length; s++) { const o = t.push("text", "", 0); o.content = String.fromCharCode(i), t.delimiters.push({ // Char code of the starting marker (number). // marker: i, // Total length of these series of delimiters. // length: r.length, // A position of the token this delimiter corresponds to. // token: t.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: r.can_open, close: r.can_close }); } return t.pos += r.length, !0; } function MM(t, e) { const n = e.length; for (let i = n - 1; i >= 0; i--) { const r = e[i]; if (r.marker !== 95 && r.marker !== 42 || r.end === -1) continue; const s = e[r.end], o = i > 0 && e[i - 1].end === r.end + 1 && // check that first two markers match and adjacent e[i - 1].marker === r.marker && e[i - 1].token === r.token - 1 && // check that last two markers are adjacent (we can safely assume they match) e[r.end + 1].token === s.token + 1, a = String.fromCharCode(r.marker), l = t.tokens[r.token]; l.type = o ? "strong_open" : "em_open", l.tag = o ? "strong" : "em", l.nesting = 1, l.markup = o ? a + a : a, l.content = ""; const u = t.tokens[s.token]; u.type = o ? "strong_close" : "em_close", u.tag = o ? "strong" : "em", u.nesting = -1, u.markup = o ? a + a : a, u.content = "", o && (t.tokens[e[i - 1].token].content = "", t.tokens[e[r.end + 1].token].content = "", i--); } } function Bse(t) { const e = t.tokens_meta, n = t.tokens_meta.length; MM(t, t.delimiters); for (let i = 0; i < n; i++) e[i] && e[i].delimiters && MM(t, e[i].delimiters); } var yB = { tokenize: Fse, postProcess: Bse }; function zse(t, e) { let n, i, r, s, o = "", a = "", l = t.pos, u = !0; if (t.src.charCodeAt(t.pos) !== 91) return !1; const f = t.pos, d = t.posMax, h = t.pos + 1, m = t.md.helpers.parseLinkLabel(t, t.pos, !0); if (m < 0) return !1; let g = m + 1; if (g < d && t.src.charCodeAt(g) === 40) { for (u = !1, g++; g < d && (n = t.src.charCodeAt(g), !(!mn(n) && n !== 10)); g++) ; if (g >= d) return !1; if (l = g, r = t.md.helpers.parseLinkDestination(t.src, g, t.posMax), r.ok) { for (o = t.md.normalizeLink(r.str), t.md.validateLink(o) ? g = r.pos : o = "", l = g; g < d && (n = t.src.charCodeAt(g), !(!mn(n) && n !== 10)); g++) ; if (r = t.md.helpers.parseLinkTitle(t.src, g, t.posMax), g < d && l !== g && r.ok) for (a = r.str, g = r.pos; g < d && (n = t.src.charCodeAt(g), !(!mn(n) && n !== 10)); g++) ; } (g >= d || t.src.charCodeAt(g) !== 41) && (u = !0), g++; } if (u) { if (typeof t.env.references > "u") return !1; if (g < d && t.src.charCodeAt(g) === 91 ? (l = g + 1, g = t.md.helpers.parseLinkLabel(t, g), g >= 0 ? i = t.src.slice(l, g++) : g = m + 1) : g = m + 1, i || (i = t.src.slice(h, m)), s = t.env.references[Qk(i)], !s) return t.pos = f, !1; o = s.href, a = s.title; } if (!e) { t.pos = h, t.posMax = m; const w = t.push("link_open", "a", 1), x = [["href", o]]; w.attrs = x, a && x.push(["title", a]), t.linkLevel++, t.md.inline.tokenize(t), t.linkLevel--, t.push("link_close", "a", -1); } return t.pos = g, t.posMax = d, !0; } function Wse(t, e) { let n, i, r, s, o, a, l, u, f = ""; const d = t.pos, h = t.posMax; if (t.src.charCodeAt(t.pos) !== 33 || t.src.charCodeAt(t.pos + 1) !== 91) return !1; const m = t.pos + 2, g = t.md.helpers.parseLinkLabel(t, t.pos + 1, !1); if (g < 0) return !1; if (s = g + 1, s < h && t.src.charCodeAt(s) === 40) { for (s++; s < h && (n = t.src.charCodeAt(s), !(!mn(n) && n !== 10)); s++) ; if (s >= h) return !1; for (u = s, a = t.md.helpers.parseLinkDestination(t.src, s, t.posMax), a.ok && (f = t.md.normalizeLink(a.str), t.md.validateLink(f) ? s = a.pos : f = ""), u = s; s < h && (n = t.src.charCodeAt(s), !(!mn(n) && n !== 10)); s++) ; if (a = t.md.helpers.parseLinkTitle(t.src, s, t.posMax), s < h && u !== s && a.ok) for (l = a.str, s = a.pos; s < h && (n = t.src.charCodeAt(s), !(!mn(n) && n !== 10)); s++) ; else l = ""; if (s >= h || t.src.charCodeAt(s) !== 41) return t.pos = d, !1; s++; } else { if (typeof t.env.references > "u") return !1; if (s < h && t.src.charCodeAt(s) === 91 ? (u = s + 1, s = t.md.helpers.parseLinkLabel(t, s), s >= 0 ? r = t.src.slice(u, s++) : s = g + 1) : s = g + 1, r || (r = t.src.slice(m, g)), o = t.env.references[Qk(r)], !o) return t.pos = d, !1; f = o.href, l = o.title; } if (!e) { i = t.src.slice(m, g); const w = []; t.md.inline.parse(i, t.md, t.env, w); const x = t.push("image", "img", 0), _ = [["src", f], ["alt", ""]]; x.attrs = _, x.children = w, x.content = i, l && _.push(["title", l]); } return t.pos = s, t.posMax = h, !0; } const Hse = /^([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])?)*)$/, Qse = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/; function Use(t, e) { let n = t.pos; if (t.src.charCodeAt(n) !== 60) return !1; const i = t.pos, r = t.posMax; for (; ; ) { if (++n >= r) return !1; const o = t.src.charCodeAt(n); if (o === 60) return !1; if (o === 62) break; } const s = t.src.slice(i + 1, n); if (Qse.test(s)) { const o = t.md.normalizeLink(s); if (!t.md.validateLink(o)) return !1; if (!e) { const a = t.push("link_open", "a", 1); a.attrs = [["href", o]], a.markup = "autolink", a.info = "auto"; const l = t.push("text", "", 0); l.content = t.md.normalizeLinkText(s); const u = t.push("link_close", "a", -1); u.markup = "autolink", u.info = "auto"; } return t.pos += s.length + 2, !0; } if (Hse.test(s)) { const o = t.md.normalizeLink("mailto:" + s); if (!t.md.validateLink(o)) return !1; if (!e) { const a = t.push("link_open", "a", 1); a.attrs = [["href", o]], a.markup = "autolink", a.info = "auto"; const l = t.push("text", "", 0); l.content = t.md.normalizeLinkText(s); const u = t.push("link_close", "a", -1); u.markup = "autolink", u.info = "auto"; } return t.pos += s.length + 2, !0; } return !1; } function Zse(t) { return /^\s]/i.test(t); } function qse(t) { return /^<\/a\s*>/i.test(t); } function Yse(t) { const e = t | 32; return e >= 97 && e <= 122; } function Vse(t, e) { if (!t.md.options.html) return !1; const n = t.posMax, i = t.pos; if (t.src.charCodeAt(i) !== 60 || i + 2 >= n) return !1; const r = t.src.charCodeAt(i + 1); if (r !== 33 && r !== 63 && r !== 47 && !Yse(r)) return !1; const s = t.src.slice(i).match(Ose); if (!s) return !1; if (!e) { const o = t.push("html_inline", "", 0); o.content = s[0], Zse(o.content) && t.linkLevel++, qse(o.content) && t.linkLevel--; } return t.pos += s[0].length, !0; } const Xse = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Gse = /^&([a-z][a-z0-9]{1,31});/i; function Kse(t, e) { const n = t.pos, i = t.posMax; if (t.src.charCodeAt(n) !== 38 || n + 1 >= i) return !1; if (t.src.charCodeAt(n + 1) === 35) { const s = t.src.slice(n).match(Xse); if (s) { if (!e) { const o = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), a = t.push("text_special", "", 0); a.content = k5(o) ? tw(o) : tw(65533), a.markup = s[0], a.info = "entity"; } return t.pos += s[0].length, !0; } } else { const s = t.src.slice(n).match(Gse); if (s) { const o = lB.decodeHTML(s[0]); if (o !== s[0]) { if (!e) { const a = t.push("text_special", "", 0); a.content = o, a.markup = s[0], a.info = "entity"; } return t.pos += s[0].length, !0; } } } return !1; } function NM(t) { const e = {}, n = t.length; if (!n) return; let i = 0, r = -2; const s = []; for (let o = 0; o < n; o++) { const a = t[o]; if (s.push(0), (t[i].marker !== a.marker || r !== a.token - 1) && (i = o), r = a.token, a.length = a.length || 0, !a.close) continue; e.hasOwnProperty(a.marker) || (e[a.marker] = [-1, -1, -1, -1, -1, -1]); const l = e[a.marker][(a.open ? 3 : 0) + a.length % 3]; let u = i - s[i] - 1, f = u; for (; u > l; u -= s[u] + 1) { const d = t[u]; if (d.marker === a.marker && d.open && d.end < 0) { let h = !1; if ((d.close || a.open) && (d.length + a.length) % 3 === 0 && (d.length % 3 !== 0 || a.length % 3 !== 0) && (h = !0), !h) { const m = u > 0 && !t[u - 1].open ? s[u - 1] + 1 : 0; s[o] = o - u + m, s[u] = m, a.open = !1, d.end = o, d.close = !1, f = -1, r = -2; break; } } } f !== -1 && (e[a.marker][(a.open ? 3 : 0) + (a.length || 0) % 3] = f); } } function Jse(t) { const e = t.tokens_meta, n = t.tokens_meta.length; NM(t.delimiters); for (let i = 0; i < n; i++) e[i] && e[i].delimiters && NM(e[i].delimiters); } function eoe(t) { let e, n, i = 0; const r = t.tokens, s = t.tokens.length; for (e = n = 0; e < s; e++) r[e].nesting < 0 && i--, r[e].level = i, r[e].nesting > 0 && i++, r[e].type === "text" && e + 1 < s && r[e + 1].type === "text" ? r[e + 1].content = r[e].content + r[e + 1].content : (e !== n && (r[n] = r[e]), n++); e !== n && (r.length = n); } const b3 = [["text", Nse], ["linkify", Dse], ["newline", Pse], ["escape", Ise], ["backticks", Lse], ["strikethrough", bB.tokenize], ["emphasis", yB.tokenize], ["link", zse], ["image", Wse], ["autolink", Use], ["html_inline", Vse], ["entity", Kse]], y3 = [ ["balance_pairs", Jse], ["strikethrough", bB.postProcess], ["emphasis", yB.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", eoe] ]; function a1() { this.ruler = new xs(); for (let t = 0; t < b3.length; t++) this.ruler.push(b3[t][0], b3[t][1]); this.ruler2 = new xs(); for (let t = 0; t < y3.length; t++) this.ruler2.push(y3[t][0], y3[t][1]); } a1.prototype.skipToken = function(t) { const e = t.pos, n = this.ruler.getRules(""), i = n.length, r = t.md.options.maxNesting, s = t.cache; if (typeof s[e] < "u") { t.pos = s[e]; return; } let o = !1; if (t.level < r) { for (let a = 0; a < i; a++) if (t.level++, o = n[a](t, !0), t.level--, o) { if (e >= t.pos) throw new Error("inline rule didn't increment state.pos"); break; } } else t.pos = t.posMax; o || t.pos++, s[e] = t.pos; }; a1.prototype.tokenize = function(t) { const e = this.ruler.getRules(""), n = e.length, i = t.posMax, r = t.md.options.maxNesting; for (; t.pos < i; ) { const s = t.pos; let o = !1; if (t.level < r) { for (let a = 0; a < n; a++) if (o = e[a](t, !1), o) { if (s >= t.pos) throw new Error("inline rule didn't increment state.pos"); break; } } if (o) { if (t.pos >= i) break; continue; } t.pending += t.src[t.pos++]; } t.pending && t.pushPending(); }; a1.prototype.parse = function(t, e, n, i) { const r = new this.State(t, e, n, i); this.tokenize(r); const s = this.ruler2.getRules(""), o = s.length; for (let a = 0; a < o; a++) s[a](r); }; a1.prototype.State = o1; var toe = { options: { // Enable HTML tags in source html: !1, // Use '/' to close single tags (
) xhtmlOut: !1, // Convert '\n' in paragraphs into
breaks: !1, // CSS language prefix for fenced blocks langPrefix: "language-", // autoconvert URL-like texts to links linkify: !1, // Enable some language-neutral replacements + quotes beautification typographer: !1, // 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: "“”‘’", /* “”‘’ */ // Highlighter function. Should return escaped HTML, // or '' if the source string is not changed and should be escaped externaly. // If result starts with ) xhtmlOut: !1, // Convert '\n' in paragraphs into
breaks: !1, // CSS language prefix for fenced blocks langPrefix: "language-", // autoconvert URL-like texts to links linkify: !1, // Enable some language-neutral replacements + quotes beautification typographer: !1, // 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: "“”‘’", /* “”‘’ */ // Highlighter function. Should return escaped HTML, // or '' if the source string is not changed and should be escaped externaly. // If result starts with ) xhtmlOut: !0, // Convert '\n' in paragraphs into
breaks: !1, // CSS language prefix for fenced blocks langPrefix: "language-", // autoconvert URL-like texts to links linkify: !1, // Enable some language-neutral replacements + quotes beautification typographer: !1, // 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: "“”‘’", /* “”‘’ */ // 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 { e.hostname = uB.toASCII(e.hostname); } catch { } return _u.encode(_u.format(e)); } function uoe(t) { const e = _u.parse(t, !0); if (e.hostname && (!e.protocol || wB.indexOf(e.protocol) >= 0)) try { e.hostname = uB.toUnicode(e.hostname); } catch { } return _u.decode(_u.format(e), _u.decode.defaultChars + "%"); } function mo(t, e) { if (!(this instanceof mo)) return new mo(t, e); e || w5(t) || (e = t || {}, t = "default"), this.inline = new a1(), this.block = new Uk(), this.core = new x5(), this.renderer = new Kh(), this.linkify = new yre(), this.validateLink = aoe, this.normalizeLink = loe, this.normalizeLinkText = uoe, this.utils = Ire, this.helpers = Hk({}, Fre), this.options = {}, this.configure(t), e && this.set(e); } mo.prototype.set = function(t) { return Hk(this.options, t), this; }; mo.prototype.configure = function(t) { const e = this; if (w5(t)) { const n = t; if (t = roe[n], !t) throw new Error('Wrong `markdown-it` preset "' + n + '", check name'); } if (!t) throw new Error("Wrong `markdown-it` preset, can't be empty"); return t.options && e.set(t.options), t.components && Object.keys(t.components).forEach(function(n) { t.components[n].rules && e[n].ruler.enableOnly(t.components[n].rules), t.components[n].rules2 && e[n].ruler2.enableOnly(t.components[n].rules2); }), this; }; mo.prototype.enable = function(t, e) { let n = []; Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function(r) { n = n.concat(this[r].ruler.enable(t, !0)); }, this), n = n.concat(this.inline.ruler2.enable(t, !0)); const i = t.filter(function(r) { return n.indexOf(r) < 0; }); if (i.length && !e) throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + i); return this; }; mo.prototype.disable = function(t, e) { let n = []; Array.isArray(t) || (t = [t]), ["core", "block", "inline"].forEach(function(r) { n = n.concat(this[r].ruler.disable(t, !0)); }, this), n = n.concat(this.inline.ruler2.disable(t, !0)); const i = t.filter(function(r) { return n.indexOf(r) < 0; }); if (i.length && !e) throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + i); return this; }; mo.prototype.use = function(t) { const e = [this].concat(Array.prototype.slice.call(arguments, 1)); return t.apply(t, e), this; }; mo.prototype.parse = function(t, e) { if (typeof t != "string") throw new Error("Input data should be a String"); const n = new this.core.State(t, this, e); return this.core.process(n), n.tokens; }; mo.prototype.render = function(t, e) { return e = e || {}, this.renderer.render(this.parse(t, e), this.options, e); }; mo.prototype.parseInline = function(t, e) { const n = new this.core.State(t, this, e); return n.inlineMode = !0, this.core.process(n), n.tokens; }; mo.prototype.renderInline = function(t, e) { return e = e || {}, this.renderer.render(this.parseInline(t, e), this.options, e); }; var kB = mo, f4 = { exports: {} }; const coe = "2.0.0", xB = 256, foe = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991, doe = 16, hoe = xB - 6, poe = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ]; var Zk = { MAX_LENGTH: xB, MAX_SAFE_COMPONENT_LENGTH: doe, MAX_SAFE_BUILD_LENGTH: hoe, MAX_SAFE_INTEGER: foe, RELEASE_TYPES: poe, SEMVER_SPEC_VERSION: coe, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; const moe = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => { }; var qk = moe; (function(t, e) { const { MAX_SAFE_COMPONENT_LENGTH: n, MAX_SAFE_BUILD_LENGTH: i, MAX_LENGTH: r } = Zk, s = qk; e = t.exports = {}; const o = e.re = [], a = e.safeRe = [], l = e.src = [], u = e.safeSrc = [], f = e.t = {}; let d = 0; const h = "[a-zA-Z0-9-]", m = [ ["\\s", 1], ["\\d", r], [h, i] ], g = (x) => { for (const [_, S] of m) x = x.split(`${_}*`).join(`${_}{0,${S}}`).split(`${_}+`).join(`${_}{1,${S}}`); return x; }, w = (x, _, S) => { const C = g(_), E = d++; s(x, E, _), f[x] = E, l[E] = _, u[E] = C, o[E] = new RegExp(_, S ? "g" : void 0), a[E] = new RegExp(C, S ? "g" : void 0); }; w("NUMERICIDENTIFIER", "0|[1-9]\\d*"), w("NUMERICIDENTIFIERLOOSE", "\\d+"), w("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), w("MAINVERSION", `(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})\\.(${l[f.NUMERICIDENTIFIER]})`), w("MAINVERSIONLOOSE", `(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})\\.(${l[f.NUMERICIDENTIFIERLOOSE]})`), w("PRERELEASEIDENTIFIER", `(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIER]})`), w("PRERELEASEIDENTIFIERLOOSE", `(?:${l[f.NONNUMERICIDENTIFIER]}|${l[f.NUMERICIDENTIFIERLOOSE]})`), w("PRERELEASE", `(?:-(${l[f.PRERELEASEIDENTIFIER]}(?:\\.${l[f.PRERELEASEIDENTIFIER]})*))`), w("PRERELEASELOOSE", `(?:-?(${l[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[f.PRERELEASEIDENTIFIERLOOSE]})*))`), w("BUILDIDENTIFIER", `${h}+`), w("BUILD", `(?:\\+(${l[f.BUILDIDENTIFIER]}(?:\\.${l[f.BUILDIDENTIFIER]})*))`), w("FULLPLAIN", `v?${l[f.MAINVERSION]}${l[f.PRERELEASE]}?${l[f.BUILD]}?`), w("FULL", `^${l[f.FULLPLAIN]}$`), w("LOOSEPLAIN", `[v=\\s]*${l[f.MAINVERSIONLOOSE]}${l[f.PRERELEASELOOSE]}?${l[f.BUILD]}?`), w("LOOSE", `^${l[f.LOOSEPLAIN]}$`), w("GTLT", "((?:<|>)?=?)"), w("XRANGEIDENTIFIERLOOSE", `${l[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), w("XRANGEIDENTIFIER", `${l[f.NUMERICIDENTIFIER]}|x|X|\\*`), w("XRANGEPLAIN", `[v=\\s]*(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:\\.(${l[f.XRANGEIDENTIFIER]})(?:${l[f.PRERELEASE]})?${l[f.BUILD]}?)?)?`), w("XRANGEPLAINLOOSE", `[v=\\s]*(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[f.XRANGEIDENTIFIERLOOSE]})(?:${l[f.PRERELEASELOOSE]})?${l[f.BUILD]}?)?)?`), w("XRANGE", `^${l[f.GTLT]}\\s*${l[f.XRANGEPLAIN]}$`), w("XRANGELOOSE", `^${l[f.GTLT]}\\s*${l[f.XRANGEPLAINLOOSE]}$`), w("COERCEPLAIN", `(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`), w("COERCE", `${l[f.COERCEPLAIN]}(?:$|[^\\d])`), w("COERCEFULL", l[f.COERCEPLAIN] + `(?:${l[f.PRERELEASE]})?(?:${l[f.BUILD]})?(?:$|[^\\d])`), w("COERCERTL", l[f.COERCE], !0), w("COERCERTLFULL", l[f.COERCEFULL], !0), w("LONETILDE", "(?:~>?)"), w("TILDETRIM", `(\\s*)${l[f.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", w("TILDE", `^${l[f.LONETILDE]}${l[f.XRANGEPLAIN]}$`), w("TILDELOOSE", `^${l[f.LONETILDE]}${l[f.XRANGEPLAINLOOSE]}$`), w("LONECARET", "(?:\\^)"), w("CARETTRIM", `(\\s*)${l[f.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", w("CARET", `^${l[f.LONECARET]}${l[f.XRANGEPLAIN]}$`), w("CARETLOOSE", `^${l[f.LONECARET]}${l[f.XRANGEPLAINLOOSE]}$`), w("COMPARATORLOOSE", `^${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]})$|^$`), w("COMPARATOR", `^${l[f.GTLT]}\\s*(${l[f.FULLPLAIN]})$|^$`), w("COMPARATORTRIM", `(\\s*)${l[f.GTLT]}\\s*(${l[f.LOOSEPLAIN]}|${l[f.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", w("HYPHENRANGE", `^\\s*(${l[f.XRANGEPLAIN]})\\s+-\\s+(${l[f.XRANGEPLAIN]})\\s*$`), w("HYPHENRANGELOOSE", `^\\s*(${l[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[f.XRANGEPLAINLOOSE]})\\s*$`), w("STAR", "(<|>)?=?\\s*\\*"), w("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), w("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); })(f4, f4.exports); var l1 = f4.exports; const goe = Object.freeze({ loose: !0 }), voe = Object.freeze({}), boe = (t) => t ? typeof t != "object" ? goe : t : voe; var O5 = boe; const AM = /^[0-9]+$/, _B = (t, e) => { if (typeof t == "number" && typeof e == "number") return t === e ? 0 : t < e ? -1 : 1; const n = AM.test(t), i = AM.test(e); return n && i && (t = +t, e = +e), t === e ? 0 : n && !i ? -1 : i && !n ? 1 : t < e ? -1 : 1; }, yoe = (t, e) => _B(e, t); var OB = { compareIdentifiers: _B, rcompareIdentifiers: yoe }; const Uv = qk, { MAX_LENGTH: DM, MAX_SAFE_INTEGER: Zv } = Zk, { safeRe: qv, t: Yv } = l1, woe = O5, { compareIdentifiers: w3 } = OB; let koe = class ua { constructor(e, n) { if (n = woe(n), e instanceof ua) { if (e.loose === !!n.loose && e.includePrerelease === !!n.includePrerelease) return e; e = e.version; } else if (typeof e != "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`); if (e.length > DM) throw new TypeError( `version is longer than ${DM} characters` ); Uv("SemVer", e, n), this.options = n, this.loose = !!n.loose, this.includePrerelease = !!n.includePrerelease; const i = e.trim().match(n.loose ? qv[Yv.LOOSE] : qv[Yv.FULL]); if (!i) throw new TypeError(`Invalid Version: ${e}`); if (this.raw = e, this.major = +i[1], this.minor = +i[2], this.patch = +i[3], this.major > Zv || this.major < 0) throw new TypeError("Invalid major version"); if (this.minor > Zv || this.minor < 0) throw new TypeError("Invalid minor version"); if (this.patch > Zv || this.patch < 0) throw new TypeError("Invalid patch version"); i[4] ? this.prerelease = i[4].split(".").map((r) => { if (/^[0-9]+$/.test(r)) { const s = +r; if (s >= 0 && s < Zv) return s; } return r; }) : this.prerelease = [], this.build = i[5] ? i[5].split(".") : [], this.format(); } format() { return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version; } toString() { return this.version; } compare(e) { if (Uv("SemVer.compare", this.version, this.options, e), !(e instanceof ua)) { if (typeof e == "string" && e === this.version) return 0; e = new ua(e, this.options); } return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e); } compareMain(e) { return e instanceof ua || (e = new ua(e, this.options)), this.major < e.major ? -1 : this.major > e.major ? 1 : this.minor < e.minor ? -1 : this.minor > e.minor ? 1 : this.patch < e.patch ? -1 : this.patch > e.patch ? 1 : 0; } comparePre(e) { if (e instanceof ua || (e = new ua(e, this.options)), this.prerelease.length && !e.prerelease.length) return -1; if (!this.prerelease.length && e.prerelease.length) return 1; if (!this.prerelease.length && !e.prerelease.length) return 0; let n = 0; do { const i = this.prerelease[n], r = e.prerelease[n]; if (Uv("prerelease compare", n, i, r), i === void 0 && r === void 0) return 0; if (r === void 0) return 1; if (i === void 0) return -1; if (i === r) continue; return w3(i, r); } while (++n); } compareBuild(e) { e instanceof ua || (e = new ua(e, this.options)); let n = 0; do { const i = this.build[n], r = e.build[n]; if (Uv("build compare", n, i, r), i === void 0 && r === void 0) return 0; if (r === void 0) return 1; if (i === void 0) return -1; if (i === r) continue; return w3(i, r); } while (++n); } // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. inc(e, n, i) { if (e.startsWith("pre")) { if (!n && i === !1) throw new Error("invalid increment argument: identifier is empty"); if (n) { const r = `-${n}`.match(this.options.loose ? qv[Yv.PRERELEASELOOSE] : qv[Yv.PRERELEASE]); if (!r || r[1] !== n) throw new Error(`invalid identifier: ${n}`); } } switch (e) { case "premajor": this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", n, i); break; case "preminor": this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", n, i); break; case "prepatch": this.prerelease.length = 0, this.inc("patch", n, i), this.inc("pre", n, i); break; case "prerelease": this.prerelease.length === 0 && this.inc("patch", n, i), this.inc("pre", n, i); break; case "release": if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`); this.prerelease.length = 0; break; case "major": (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = []; break; case "minor": (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = []; break; case "patch": this.prerelease.length === 0 && this.patch++, this.prerelease = []; break; case "pre": { const r = Number(i) ? 1 : 0; if (this.prerelease.length === 0) this.prerelease = [r]; else { let s = this.prerelease.length; for (; --s >= 0; ) typeof this.prerelease[s] == "number" && (this.prerelease[s]++, s = -2); if (s === -1) { if (n === this.prerelease.join(".") && i === !1) throw new Error("invalid increment argument: identifier already exists"); this.prerelease.push(r); } } if (n) { let s = [n, r]; i === !1 && (s = [n]), w3(this.prerelease[0], n) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = s) : this.prerelease = s; } break; } default: throw new Error(`invalid increment argument: ${e}`); } return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this; } }; var ss = koe; const PM = ss, xoe = (t, e, n = !1) => { if (t instanceof PM) return t; try { return new PM(t, e); } catch (i) { if (!n) return null; throw i; } }; var Jh = xoe; const _oe = Jh, Ooe = (t, e) => { const n = _oe(t, e); return n ? n.version : null; }; var Soe = Ooe; const Coe = Jh, Eoe = (t, e) => { const n = Coe(t.trim().replace(/^[=v]+/, ""), e); return n ? n.version : null; }; var Toe = Eoe; const IM = ss, $oe = (t, e, n, i, r) => { typeof n == "string" && (r = i, i = n, n = void 0); try { return new IM( t instanceof IM ? t.version : t, n ).inc(e, i, r).version; } catch { return null; } }; var Moe = $oe; const LM = Jh, Noe = (t, e) => { const n = LM(t, null, !0), i = LM(e, null, !0), r = n.compare(i); if (r === 0) return null; const s = r > 0, o = s ? n : i, a = s ? i : n, l = !!o.prerelease.length; if (!!a.prerelease.length && !l) { if (!a.patch && !a.minor) return "major"; if (a.compareMain(o) === 0) return a.minor && !a.patch ? "minor" : "patch"; } const f = l ? "pre" : ""; return n.major !== i.major ? f + "major" : n.minor !== i.minor ? f + "minor" : n.patch !== i.patch ? f + "patch" : "prerelease"; }; var Aoe = Noe; const Doe = ss, Poe = (t, e) => new Doe(t, e).major; var Ioe = Poe; const Loe = ss, Roe = (t, e) => new Loe(t, e).minor; var joe = Roe; const Foe = ss, Boe = (t, e) => new Foe(t, e).patch; var zoe = Boe; const Woe = Jh, Hoe = (t, e) => { const n = Woe(t, e); return n && n.prerelease.length ? n.prerelease : null; }; var Qoe = Hoe; const RM = ss, Uoe = (t, e, n) => new RM(t, n).compare(new RM(e, n)); var Uo = Uoe; const Zoe = Uo, qoe = (t, e, n) => Zoe(e, t, n); var Yoe = qoe; const Voe = Uo, Xoe = (t, e) => Voe(t, e, !0); var Goe = Xoe; const jM = ss, Koe = (t, e, n) => { const i = new jM(t, n), r = new jM(e, n); return i.compare(r) || i.compareBuild(r); }; var S5 = Koe; const Joe = S5, eae = (t, e) => t.sort((n, i) => Joe(n, i, e)); var tae = eae; const nae = S5, iae = (t, e) => t.sort((n, i) => nae(i, n, e)); var rae = iae; const sae = Uo, oae = (t, e, n) => sae(t, e, n) > 0; var Yk = oae; const aae = Uo, lae = (t, e, n) => aae(t, e, n) < 0; var C5 = lae; const uae = Uo, cae = (t, e, n) => uae(t, e, n) === 0; var SB = cae; const fae = Uo, dae = (t, e, n) => fae(t, e, n) !== 0; var CB = dae; const hae = Uo, pae = (t, e, n) => hae(t, e, n) >= 0; var E5 = pae; const mae = Uo, gae = (t, e, n) => mae(t, e, n) <= 0; var T5 = gae; const vae = SB, bae = CB, yae = Yk, wae = E5, kae = C5, xae = T5, _ae = (t, e, n, i) => { switch (e) { case "===": return typeof t == "object" && (t = t.version), typeof n == "object" && (n = n.version), t === n; case "!==": return typeof t == "object" && (t = t.version), typeof n == "object" && (n = n.version), t !== n; case "": case "=": case "==": return vae(t, n, i); case "!=": return bae(t, n, i); case ">": return yae(t, n, i); case ">=": return wae(t, n, i); case "<": return kae(t, n, i); case "<=": return xae(t, n, i); default: throw new TypeError(`Invalid operator: ${e}`); } }; var EB = _ae; const Oae = ss, Sae = Jh, { safeRe: Vv, t: Xv } = l1, Cae = (t, e) => { if (t instanceof Oae) return t; if (typeof t == "number" && (t = String(t)), typeof t != "string") return null; e = e || {}; let n = null; if (!e.rtl) n = t.match(e.includePrerelease ? Vv[Xv.COERCEFULL] : Vv[Xv.COERCE]); else { const l = e.includePrerelease ? Vv[Xv.COERCERTLFULL] : Vv[Xv.COERCERTL]; let u; for (; (u = l.exec(t)) && (!n || n.index + n[0].length !== t.length); ) (!n || u.index + u[0].length !== n.index + n[0].length) && (n = u), l.lastIndex = u.index + u[1].length + u[2].length; l.lastIndex = -1; } if (n === null) return null; const i = n[2], r = n[3] || "0", s = n[4] || "0", o = e.includePrerelease && n[5] ? `-${n[5]}` : "", a = e.includePrerelease && n[6] ? `+${n[6]}` : ""; return Sae(`${i}.${r}.${s}${o}${a}`, e); }; var Eae = Cae; class Tae { constructor() { this.max = 1e3, this.map = /* @__PURE__ */ new Map(); } get(e) { const n = this.map.get(e); if (n !== void 0) return this.map.delete(e), this.map.set(e, n), n; } delete(e) { return this.map.delete(e); } set(e, n) { if (!this.delete(e) && n !== void 0) { if (this.map.size >= this.max) { const r = this.map.keys().next().value; this.delete(r); } this.map.set(e, n); } return this; } } var $ae = Tae, k3, FM; function Zo() { if (FM) return k3; FM = 1; const t = /\s+/g; class e { constructor(R, q) { if (q = r(q), R instanceof e) return R.loose === !!q.loose && R.includePrerelease === !!q.includePrerelease ? R : new e(R.raw, q); if (R instanceof s) return this.raw = R.value, this.set = [[R]], this.formatted = void 0, this; if (this.options = q, this.loose = !!q.loose, this.includePrerelease = !!q.includePrerelease, this.raw = R.trim().replace(t, " "), this.set = this.raw.split("||").map((Y) => this.parseRange(Y.trim())).filter((Y) => Y.length), !this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`); if (this.set.length > 1) { const Y = this.set[0]; if (this.set = this.set.filter((K) => !w(K[0])), this.set.length === 0) this.set = [Y]; else if (this.set.length > 1) { for (const K of this.set) if (K.length === 1 && x(K[0])) { this.set = [K]; break; } } } this.formatted = void 0; } get range() { if (this.formatted === void 0) { this.formatted = ""; for (let R = 0; R < this.set.length; R++) { R > 0 && (this.formatted += "||"); const q = this.set[R]; for (let Y = 0; Y < q.length; Y++) Y > 0 && (this.formatted += " "), this.formatted += q[Y].toString().trim(); } } return this.formatted; } format() { return this.range; } toString() { return this.range; } parseRange(R) { const Y = ((this.options.includePrerelease && m) | (this.options.loose && g)) + ":" + R, K = i.get(Y); if (K) return K; const te = this.options.loose, se = te ? l[u.HYPHENRANGELOOSE] : l[u.HYPHENRANGE]; R = R.replace(se, Q(this.options.includePrerelease)), o("hyphen replace", R), R = R.replace(l[u.COMPARATORTRIM], f), o("comparator trim", R), R = R.replace(l[u.TILDETRIM], d), o("tilde trim", R), R = R.replace(l[u.CARETTRIM], h), o("caret trim", R); let ce = R.split(" ").map((le) => S(le, this.options)).join(" ").split(/\s+/).map((le) => L(le, this.options)); te && (ce = ce.filter((le) => (o("loose invalid filter", le, this.options), !!le.match(l[u.COMPARATORLOOSE])))), o("range list", ce); const U = /* @__PURE__ */ new Map(), F = ce.map((le) => new s(le, this.options)); for (const le of F) { if (w(le)) return [le]; U.set(le.value, le); } U.size > 1 && U.has("") && U.delete(""); const oe = [...U.values()]; return i.set(Y, oe), oe; } intersects(R, q) { if (!(R instanceof e)) throw new TypeError("a Range is required"); return this.set.some((Y) => _(Y, q) && R.set.some((K) => _(K, q) && Y.every((te) => K.every((se) => te.intersects(se, q))))); } // if ANY of the sets match ALL of its comparators, then pass test(R) { if (!R) return !1; if (typeof R == "string") try { R = new a(R, this.options); } catch { return !1; } for (let q = 0; q < this.set.length; q++) if (V(this.set[q], R, this.options)) return !0; return !1; } } k3 = e; const n = $ae, i = new n(), r = O5, s = Vk(), o = qk, a = ss, { safeRe: l, t: u, comparatorTrimReplace: f, tildeTrimReplace: d, caretTrimReplace: h } = l1, { FLAG_INCLUDE_PRERELEASE: m, FLAG_LOOSE: g } = Zk, w = (H) => H.value === "<0.0.0-0", x = (H) => H.value === "", _ = (H, R) => { let q = !0; const Y = H.slice(); let K = Y.pop(); for (; q && Y.length; ) q = Y.every((te) => K.intersects(te, R)), K = Y.pop(); return q; }, S = (H, R) => (H = H.replace(l[u.BUILD], ""), o("comp", H, R), H = $(H, R), o("caret", H), H = E(H, R), o("tildes", H), H = W(H, R), o("xrange", H), H = Z(H, R), o("stars", H), H), C = (H) => !H || H.toLowerCase() === "x" || H === "*", E = (H, R) => H.trim().split(/\s+/).map((q) => M(q, R)).join(" "), M = (H, R) => { const q = R.loose ? l[u.TILDELOOSE] : l[u.TILDE]; return H.replace(q, (Y, K, te, se, ce) => { o("tilde", H, Y, K, te, se, ce); let U; return C(K) ? U = "" : C(te) ? U = `>=${K}.0.0 <${+K + 1}.0.0-0` : C(se) ? U = `>=${K}.${te}.0 <${K}.${+te + 1}.0-0` : ce ? (o("replaceTilde pr", ce), U = `>=${K}.${te}.${se}-${ce} <${K}.${+te + 1}.0-0`) : U = `>=${K}.${te}.${se} <${K}.${+te + 1}.0-0`, o("tilde return", U), U; }); }, $ = (H, R) => H.trim().split(/\s+/).map((q) => P(q, R)).join(" "), P = (H, R) => { o("caret", H, R); const q = R.loose ? l[u.CARETLOOSE] : l[u.CARET], Y = R.includePrerelease ? "-0" : ""; return H.replace(q, (K, te, se, ce, U) => { o("caret", H, K, te, se, ce, U); let F; return C(te) ? F = "" : C(se) ? F = `>=${te}.0.0${Y} <${+te + 1}.0.0-0` : C(ce) ? te === "0" ? F = `>=${te}.${se}.0${Y} <${te}.${+se + 1}.0-0` : F = `>=${te}.${se}.0${Y} <${+te + 1}.0.0-0` : U ? (o("replaceCaret pr", U), te === "0" ? se === "0" ? F = `>=${te}.${se}.${ce}-${U} <${te}.${se}.${+ce + 1}-0` : F = `>=${te}.${se}.${ce}-${U} <${te}.${+se + 1}.0-0` : F = `>=${te}.${se}.${ce}-${U} <${+te + 1}.0.0-0`) : (o("no pr"), te === "0" ? se === "0" ? F = `>=${te}.${se}.${ce}${Y} <${te}.${se}.${+ce + 1}-0` : F = `>=${te}.${se}.${ce}${Y} <${te}.${+se + 1}.0-0` : F = `>=${te}.${se}.${ce} <${+te + 1}.0.0-0`), o("caret return", F), F; }); }, W = (H, R) => (o("replaceXRanges", H, R), H.split(/\s+/).map((q) => z(q, R)).join(" ")), z = (H, R) => { H = H.trim(); const q = R.loose ? l[u.XRANGELOOSE] : l[u.XRANGE]; return H.replace(q, (Y, K, te, se, ce, U) => { o("xRange", H, Y, K, te, se, ce, U); const F = C(te), oe = F || C(se), le = oe || C(ce), pe = le; return K === "=" && pe && (K = ""), U = R.includePrerelease ? "-0" : "", F ? K === ">" || K === "<" ? Y = "<0.0.0-0" : Y = "*" : K && pe ? (oe && (se = 0), ce = 0, K === ">" ? (K = ">=", oe ? (te = +te + 1, se = 0, ce = 0) : (se = +se + 1, ce = 0)) : K === "<=" && (K = "<", oe ? te = +te + 1 : se = +se + 1), K === "<" && (U = "-0"), Y = `${K + te}.${se}.${ce}${U}`) : oe ? Y = `>=${te}.0.0${U} <${+te + 1}.0.0-0` : le && (Y = `>=${te}.${se}.0${U} <${te}.${+se + 1}.0-0`), o("xRange return", Y), Y; }); }, Z = (H, R) => (o("replaceStars", H, R), H.trim().replace(l[u.STAR], "")), L = (H, R) => (o("replaceGTE0", H, R), H.trim().replace(l[R.includePrerelease ? u.GTE0PRE : u.GTE0], "")), Q = (H) => (R, q, Y, K, te, se, ce, U, F, oe, le, pe) => (C(Y) ? q = "" : C(K) ? q = `>=${Y}.0.0${H ? "-0" : ""}` : C(te) ? q = `>=${Y}.${K}.0${H ? "-0" : ""}` : se ? q = `>=${q}` : q = `>=${q}${H ? "-0" : ""}`, C(F) ? U = "" : C(oe) ? U = `<${+F + 1}.0.0-0` : C(le) ? U = `<${F}.${+oe + 1}.0-0` : pe ? U = `<=${F}.${oe}.${le}-${pe}` : H ? U = `<${F}.${oe}.${+le + 1}-0` : U = `<=${U}`, `${q} ${U}`.trim()), V = (H, R, q) => { for (let Y = 0; Y < H.length; Y++) if (!H[Y].test(R)) return !1; if (R.prerelease.length && !q.includePrerelease) { for (let Y = 0; Y < H.length; Y++) if (o(H[Y].semver), H[Y].semver !== s.ANY && H[Y].semver.prerelease.length > 0) { const K = H[Y].semver; if (K.major === R.major && K.minor === R.minor && K.patch === R.patch) return !0; } return !1; } return !0; }; return k3; } var x3, BM; function Vk() { if (BM) return x3; BM = 1; const t = Symbol("SemVer ANY"); class e { static get ANY() { return t; } constructor(f, d) { if (d = n(d), f instanceof e) { if (f.loose === !!d.loose) return f; f = f.value; } f = f.trim().split(/\s+/).join(" "), o("comparator", f, d), this.options = d, this.loose = !!d.loose, this.parse(f), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, o("comp", this); } parse(f) { const d = this.options.loose ? i[r.COMPARATORLOOSE] : i[r.COMPARATOR], h = f.match(d); if (!h) throw new TypeError(`Invalid comparator: ${f}`); this.operator = h[1] !== void 0 ? h[1] : "", this.operator === "=" && (this.operator = ""), h[2] ? this.semver = new a(h[2], this.options.loose) : this.semver = t; } toString() { return this.value; } test(f) { if (o("Comparator.test", f, this.options.loose), this.semver === t || f === t) return !0; if (typeof f == "string") try { f = new a(f, this.options); } catch { return !1; } return s(f, this.operator, this.semver, this.options); } intersects(f, d) { if (!(f instanceof e)) throw new TypeError("a Comparator is required"); return this.operator === "" ? this.value === "" ? !0 : new l(f.value, d).test(this.value) : f.operator === "" ? f.value === "" ? !0 : new l(this.value, d).test(f.semver) : (d = n(d), d.includePrerelease && (this.value === "<0.0.0-0" || f.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || f.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && f.operator.startsWith(">") || this.operator.startsWith("<") && f.operator.startsWith("<") || this.semver.version === f.semver.version && this.operator.includes("=") && f.operator.includes("=") || s(this.semver, "<", f.semver, d) && this.operator.startsWith(">") && f.operator.startsWith("<") || s(this.semver, ">", f.semver, d) && this.operator.startsWith("<") && f.operator.startsWith(">"))); } } x3 = e; const n = O5, { safeRe: i, t: r } = l1, s = EB, o = qk, a = ss, l = Zo(); return x3; } const Mae = Zo(), Nae = (t, e, n) => { try { e = new Mae(e, n); } catch { return !1; } return e.test(t); }; var Xk = Nae; const Aae = Zo(), Dae = (t, e) => new Aae(t, e).set.map((n) => n.map((i) => i.value).join(" ").trim().split(" ")); var Pae = Dae; const Iae = ss, Lae = Zo(), Rae = (t, e, n) => { let i = null, r = null, s = null; try { s = new Lae(e, n); } catch { return null; } return t.forEach((o) => { s.test(o) && (!i || r.compare(o) === -1) && (i = o, r = new Iae(i, n)); }), i; }; var jae = Rae; const Fae = ss, Bae = Zo(), zae = (t, e, n) => { let i = null, r = null, s = null; try { s = new Bae(e, n); } catch { return null; } return t.forEach((o) => { s.test(o) && (!i || r.compare(o) === 1) && (i = o, r = new Fae(i, n)); }), i; }; var Wae = zae; const _3 = ss, Hae = Zo(), zM = Yk, Qae = (t, e) => { t = new Hae(t, e); let n = new _3("0.0.0"); if (t.test(n) || (n = new _3("0.0.0-0"), t.test(n))) return n; n = null; for (let i = 0; i < t.set.length; ++i) { const r = t.set[i]; let s = null; r.forEach((o) => { const a = new _3(o.semver.version); switch (o.operator) { case ">": a.prerelease.length === 0 ? a.patch++ : a.prerelease.push(0), a.raw = a.format(); case "": case ">=": (!s || zM(a, s)) && (s = a); break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${o.operator}`); } }), s && (!n || zM(n, s)) && (n = s); } return n && t.test(n) ? n : null; }; var Uae = Qae; const Zae = Zo(), qae = (t, e) => { try { return new Zae(t, e).range || "*"; } catch { return null; } }; var Yae = qae; const Vae = ss, TB = Vk(), { ANY: Xae } = TB, Gae = Zo(), Kae = Xk, WM = Yk, HM = C5, Jae = T5, ele = E5, tle = (t, e, n, i) => { t = new Vae(t, i), e = new Gae(e, i); let r, s, o, a, l; switch (n) { case ">": r = WM, s = Jae, o = HM, a = ">", l = ">="; break; case "<": r = HM, s = ele, o = WM, a = "<", l = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (Kae(t, e, i)) return !1; for (let u = 0; u < e.set.length; ++u) { const f = e.set[u]; let d = null, h = null; if (f.forEach((m) => { m.semver === Xae && (m = new TB(">=0.0.0")), d = d || m, h = h || m, r(m.semver, d.semver, i) ? d = m : o(m.semver, h.semver, i) && (h = m); }), d.operator === a || d.operator === l || (!h.operator || h.operator === a) && s(t, h.semver)) return !1; if (h.operator === l && o(t, h.semver)) return !1; } return !0; }; var $5 = tle; const nle = $5, ile = (t, e, n) => nle(t, e, ">", n); var rle = ile; const sle = $5, ole = (t, e, n) => sle(t, e, "<", n); var ale = ole; const QM = Zo(), lle = (t, e, n) => (t = new QM(t, n), e = new QM(e, n), t.intersects(e, n)); var ule = lle; const cle = Xk, fle = Uo; var dle = (t, e, n) => { const i = []; let r = null, s = null; const o = t.sort((f, d) => fle(f, d, n)); for (const f of o) cle(f, e, n) ? (s = f, r || (r = f)) : (s && i.push([r, s]), s = null, r = null); r && i.push([r, null]); const a = []; for (const [f, d] of i) f === d ? a.push(f) : !d && f === o[0] ? a.push("*") : d ? f === o[0] ? a.push(`<=${d}`) : a.push(`${f} - ${d}`) : a.push(`>=${f}`); const l = a.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e); return l.length < u.length ? l : e; }; const UM = Zo(), M5 = Vk(), { ANY: O3 } = M5, sm = Xk, N5 = Uo, hle = (t, e, n = {}) => { if (t === e) return !0; t = new UM(t, n), e = new UM(e, n); let i = !1; e: for (const r of t.set) { for (const s of e.set) { const o = mle(r, s, n); if (i = i || o !== null, o) continue e; } if (i) return !1; } return !0; }, ple = [new M5(">=0.0.0-0")], ZM = [new M5(">=0.0.0")], mle = (t, e, n) => { if (t === e) return !0; if (t.length === 1 && t[0].semver === O3) { if (e.length === 1 && e[0].semver === O3) return !0; n.includePrerelease ? t = ple : t = ZM; } if (e.length === 1 && e[0].semver === O3) { if (n.includePrerelease) return !0; e = ZM; } const i = /* @__PURE__ */ new Set(); let r, s; for (const m of t) m.operator === ">" || m.operator === ">=" ? r = qM(r, m, n) : m.operator === "<" || m.operator === "<=" ? s = YM(s, m, n) : i.add(m.semver); if (i.size > 1) return null; let o; if (r && s) { if (o = N5(r.semver, s.semver, n), o > 0) return null; if (o === 0 && (r.operator !== ">=" || s.operator !== "<=")) return null; } for (const m of i) { if (r && !sm(m, String(r), n) || s && !sm(m, String(s), n)) return null; for (const g of e) if (!sm(m, String(g), n)) return !1; return !0; } let a, l, u, f, d = s && !n.includePrerelease && s.semver.prerelease.length ? s.semver : !1, h = r && !n.includePrerelease && r.semver.prerelease.length ? r.semver : !1; d && d.prerelease.length === 1 && s.operator === "<" && d.prerelease[0] === 0 && (d = !1); for (const m of e) { if (f = f || m.operator === ">" || m.operator === ">=", u = u || m.operator === "<" || m.operator === "<=", r) { if (h && m.semver.prerelease && m.semver.prerelease.length && m.semver.major === h.major && m.semver.minor === h.minor && m.semver.patch === h.patch && (h = !1), m.operator === ">" || m.operator === ">=") { if (a = qM(r, m, n), a === m && a !== r) return !1; } else if (r.operator === ">=" && !sm(r.semver, String(m), n)) return !1; } if (s) { if (d && m.semver.prerelease && m.semver.prerelease.length && m.semver.major === d.major && m.semver.minor === d.minor && m.semver.patch === d.patch && (d = !1), m.operator === "<" || m.operator === "<=") { if (l = YM(s, m, n), l === m && l !== s) return !1; } else if (s.operator === "<=" && !sm(s.semver, String(m), n)) return !1; } if (!m.operator && (s || r) && o !== 0) return !1; } return !(r && u && !s && o !== 0 || s && f && !r && o !== 0 || h || d); }, qM = (t, e, n) => { if (!t) return e; const i = N5(t.semver, e.semver, n); return i > 0 ? t : i < 0 || e.operator === ">" && t.operator === ">=" ? e : t; }, YM = (t, e, n) => { if (!t) return e; const i = N5(t.semver, e.semver, n); return i < 0 ? t : i > 0 || e.operator === "<" && t.operator === "<=" ? e : t; }; var gle = hle; const S3 = l1, VM = Zk, vle = ss, XM = OB, ble = Jh, yle = Soe, wle = Toe, kle = Moe, xle = Aoe, _le = Ioe, Ole = joe, Sle = zoe, Cle = Qoe, Ele = Uo, Tle = Yoe, $le = Goe, Mle = S5, Nle = tae, Ale = rae, Dle = Yk, Ple = C5, Ile = SB, Lle = CB, Rle = E5, jle = T5, Fle = EB, Ble = Eae, zle = Vk(), Wle = Zo(), Hle = Xk, Qle = Pae, Ule = jae, Zle = Wae, qle = Uae, Yle = Yae, Vle = $5, Xle = rle, Gle = ale, Kle = ule, Jle = dle, eue = gle; var Gk = { parse: ble, valid: yle, clean: wle, inc: kle, diff: xle, major: _le, minor: Ole, patch: Sle, prerelease: Cle, compare: Ele, rcompare: Tle, compareLoose: $le, compareBuild: Mle, sort: Nle, rsort: Ale, gt: Dle, lt: Ple, eq: Ile, neq: Lle, gte: Rle, lte: jle, cmp: Fle, coerce: Ble, Comparator: zle, Range: Wle, satisfies: Hle, toComparators: Qle, maxSatisfying: Ule, minSatisfying: Zle, minVersion: qle, validRange: Yle, outside: Vle, gtr: Xle, ltr: Gle, intersects: Kle, simplifyRange: Jle, subset: eue, SemVer: vle, re: S3.re, src: S3.src, tokens: S3.t, SEMVER_SPEC_VERSION: VM.SEMVER_SPEC_VERSION, RELEASE_TYPES: VM.RELEASE_TYPES, compareIdentifiers: XM.compareIdentifiers, rcompareIdentifiers: XM.rcompareIdentifiers }; const GM = Gk; var tue = function(t = "", { ghostVersion: e = "4.0", type: n = "mobiledoc" } = {}) { const i = GM.coerce(e); return typeof t != "string" || (t || "").trim() === "" ? "" : GM.satisfies(i, "<4.x") ? n === "markdown" ? t.replace(/[^\w]/g, "").toLowerCase() : t.replace(/[<>&"?]/g, "").trim().replace(/[^\w]/g, "-").replace(/-{2,}/g, "-").toLowerCase() : encodeURIComponent( t.trim().toLowerCase().replace(/[\][!"#$%&'()*+,./:;<=>?@\\^_{|}~]/g, "").replace(/\s+/g, "-").replace(/^-|-{2,}|-$/g, "") ); }, nue = { slugify: tue }, iue = nue, C3, KM; function nw() { if (KM) return C3; KM = 1; function t(u, f, d, h) { const m = Number(u[f].meta.id + 1).toString(); let g = ""; return typeof h.docId == "string" && (g = `-${h.docId}-`), g + m; } function e(u, f) { let d = Number(u[f].meta.id + 1).toString(); return u[f].meta.subId > 0 && (d += `:${u[f].meta.subId}`), `[${d}]`; } function n(u, f, d, h, m) { const g = m.rules.footnote_anchor_name(u, f, d, h, m), w = m.rules.footnote_caption(u, f, d, h, m); let x = g; return u[f].meta.subId > 0 && (x += `:${u[f].meta.subId}`), `${w}`; } function i(u, f, d) { return (d.xhtmlOut ? `
` : `
`) + `
    `; } function r() { return `
`; } function s(u, f, d, h, m) { let g = m.rules.footnote_anchor_name(u, f, d, h, m); return u[f].meta.subId > 0 && (g += `:${u[f].meta.subId}`), `
  • `; } function o() { return `
  • `; } function a(u, f, d, h, m) { let g = m.rules.footnote_anchor_name(u, f, d, h, m); return u[f].meta.subId > 0 && (g += `:${u[f].meta.subId}`), ` ↩︎`; } function l(u) { const f = u.helpers.parseLinkLabel, d = u.utils.isSpace; u.renderer.rules.footnote_ref = n, u.renderer.rules.footnote_block_open = i, u.renderer.rules.footnote_block_close = r, u.renderer.rules.footnote_open = s, u.renderer.rules.footnote_close = o, u.renderer.rules.footnote_anchor = a, u.renderer.rules.footnote_caption = e, u.renderer.rules.footnote_anchor_name = t; function h(x, _, S, C) { const E = x.bMarks[_] + x.tShift[_], M = x.eMarks[_]; if (E + 4 > M || x.src.charCodeAt(E) !== 91 || x.src.charCodeAt(E + 1) !== 94) return !1; let $; for ($ = E + 2; $ < M; $++) { if (x.src.charCodeAt($) === 32) return !1; if (x.src.charCodeAt($) === 93) break; } if ($ === E + 2 || $ + 1 >= M || x.src.charCodeAt(++$) !== 58) return !1; if (C) return !0; $++, x.env.footnotes || (x.env.footnotes = {}), x.env.footnotes.refs || (x.env.footnotes.refs = {}); const P = x.src.slice(E + 2, $ - 2); x.env.footnotes.refs[`:${P}`] = -1; const W = new x.Token("footnote_reference_open", "", 1); W.meta = { label: P }, W.level = x.level++, x.tokens.push(W); const z = x.bMarks[_], Z = x.tShift[_], L = x.sCount[_], Q = x.parentType, V = $, H = x.sCount[_] + $ - (x.bMarks[_] + x.tShift[_]); let R = H; for (; $ < M; ) { const Y = x.src.charCodeAt($); if (d(Y)) Y === 9 ? R += 4 - R % 4 : R++; else break; $++; } x.tShift[_] = $ - V, x.sCount[_] = R - H, x.bMarks[_] = V, x.blkIndent += 4, x.parentType = "footnote", x.sCount[_] < x.blkIndent && (x.sCount[_] += x.blkIndent), x.md.block.tokenize(x, _, S, !0), x.parentType = Q, x.blkIndent -= 4, x.tShift[_] = Z, x.sCount[_] = L, x.bMarks[_] = z; const q = new x.Token("footnote_reference_close", "", -1); return q.level = --x.level, x.tokens.push(q), !0; } function m(x, _) { const S = x.posMax, C = x.pos; if (C + 2 >= S || x.src.charCodeAt(C) !== 94 || x.src.charCodeAt(C + 1) !== 91) return !1; const E = C + 2, M = f(x, C + 1); if (M < 0) return !1; if (!_) { x.env.footnotes || (x.env.footnotes = {}), x.env.footnotes.list || (x.env.footnotes.list = []); const $ = x.env.footnotes.list.length, P = []; x.md.inline.parse(x.src.slice(E, M), x.md, x.env, P); const W = x.push("footnote_ref", "", 0); W.meta = { id: $ }, x.env.footnotes.list[$] = { content: x.src.slice(E, M), tokens: P }; } return x.pos = M + 1, x.posMax = S, !0; } function g(x, _) { const S = x.posMax, C = x.pos; if (C + 3 > S || !x.env.footnotes || !x.env.footnotes.refs || x.src.charCodeAt(C) !== 91 || x.src.charCodeAt(C + 1) !== 94) return !1; let E; for (E = C + 2; E < S; E++) { if (x.src.charCodeAt(E) === 32 || x.src.charCodeAt(E) === 10) return !1; if (x.src.charCodeAt(E) === 93) break; } if (E === C + 2 || E >= S) return !1; E++; const M = x.src.slice(C + 2, E - 1); if (typeof x.env.footnotes.refs[`:${M}`] > "u") return !1; if (!_) { x.env.footnotes.list || (x.env.footnotes.list = []); let $; x.env.footnotes.refs[`:${M}`] < 0 ? ($ = x.env.footnotes.list.length, x.env.footnotes.list[$] = { label: M, count: 0 }, x.env.footnotes.refs[`:${M}`] = $) : $ = x.env.footnotes.refs[`:${M}`]; const P = x.env.footnotes.list[$].count; x.env.footnotes.list[$].count++; const W = x.push("footnote_ref", "", 0); W.meta = { id: $, subId: P, label: M }; } return x.pos = E, x.posMax = S, !0; } function w(x) { let _, S, C, E = !1; const M = {}; if (!x.env.footnotes || (x.tokens = x.tokens.filter(function(P) { return P.type === "footnote_reference_open" ? (E = !0, S = [], C = P.meta.label, !1) : P.type === "footnote_reference_close" ? (E = !1, M[":" + C] = S, !1) : (E && S.push(P), !E); }), !x.env.footnotes.list)) return; const $ = x.env.footnotes.list; x.tokens.push(new x.Token("footnote_block_open", "", 1)); for (let P = 0, W = $.length; P < W; P++) { const z = new x.Token("footnote_open", "", 1); if (z.meta = { id: P, label: $[P].label }, x.tokens.push(z), $[P].tokens) { _ = []; const Q = new x.Token("paragraph_open", "p", 1); Q.block = !0, _.push(Q); const V = new x.Token("inline", "", 0); V.children = $[P].tokens, V.content = $[P].content, _.push(V); const H = new x.Token("paragraph_close", "p", -1); H.block = !0, _.push(H); } else $[P].label && (_ = M[`:${$[P].label}`]); _ && (x.tokens = x.tokens.concat(_)); let Z; x.tokens[x.tokens.length - 1].type === "paragraph_close" ? Z = x.tokens.pop() : Z = null; const L = $[P].count > 0 ? $[P].count : 1; for (let Q = 0; Q < L; Q++) { const V = new x.Token("footnote_anchor", "", 0); V.meta = { id: P, subId: Q, label: $[P].label }, x.tokens.push(V); } Z && x.tokens.push(Z), x.tokens.push(new x.Token("footnote_close", "", -1)); } x.tokens.push(new x.Token("footnote_block_close", "", -1)); } u.block.ruler.before("reference", "footnote_def", h, { alt: ["paragraph", "reference"] }), u.inline.ruler.after("image", "footnote_inline", m), u.inline.ruler.after("footnote_inline", "footnote_ref", g), u.core.ruler.after("inline", "footnote_tail", w); } return C3 = l, C3; } var E3, JM; function iw() { return JM || (JM = 1, E3 = function(e) { function n(i, r, s, o) { var a, l, u, f, d = i.bMarks[r] + i.tShift[r], h = i.eMarks[r]; if (a = i.src.charCodeAt(d), a !== 35 || d >= h) return !1; for (l = 1, a = i.src.charCodeAt(++d); a === 35 && d < h && l <= 6; ) l++, a = i.src.charCodeAt(++d); return l > 6 ? !1 : (o || (h = i.skipCharsBack(h, 32, d), u = i.skipCharsBack(h, 35, d), u > d && i.src.charCodeAt(u - 1) === 32 && (h = u), i.line = r + 1, f = i.push("heading_open", "h" + String(l), 1), f.markup = "########".slice(0, l), f.map = [r, i.line], f = i.push("inline", "", 0), f.content = i.src.slice(d, h).trim(), f.map = [r, i.line], f.children = [], f = i.push("heading_close", "h" + String(l), -1), f.markup = "########".slice(0, l)), !0); } e.block.ruler.at("heading", n, { alt: ["paragraph", "reference", "blockquote"] }); }), E3; } var T3, e7; function rw() { if (e7) return T3; e7 = 1; function t(e) { function n(r, s) { const o = r.pos, a = r.src.charCodeAt(o); if (s || a !== 61) return !1; const l = r.scanDelims(r.pos, !0); let u = l.length; const f = String.fromCharCode(a); if (u < 2) return !1; if (u % 2) { const d = r.push("text", "", 0); d.content = f, u--; } for (let d = 0; d < u; d += 2) { const h = r.push("text", "", 0); h.content = f + f, !(!l.can_open && !l.can_close) && r.delimiters.push({ marker: a, length: 0, // disable "rule of 3" length checks meant for emphasis jump: d / 2, // 1 delimiter = 2 characters token: r.tokens.length - 1, end: -1, open: l.can_open, close: l.can_close }); } return r.pos += l.length, !0; } function i(r, s) { const o = [], a = s.length; for (let l = 0; l < a; l++) { const u = s[l]; if (u.marker !== 61 || u.end === -1) continue; const f = s[u.end], d = r.tokens[u.token]; d.type = "mark_open", d.tag = "mark", d.nesting = 1, d.markup = "==", d.content = ""; const h = r.tokens[f.token]; h.type = "mark_close", h.tag = "mark", h.nesting = -1, h.markup = "==", h.content = "", r.tokens[f.token - 1].type === "text" && r.tokens[f.token - 1].content === "=" && o.push(f.token - 1); } for (; o.length; ) { const l = o.pop(); let u = l + 1; for (; u < r.tokens.length && r.tokens[u].type === "mark_close"; ) u++; if (u--, l !== u) { const f = r.tokens[u]; r.tokens[u] = r.tokens[l], r.tokens[l] = f; } } } e.inline.ruler.before("emphasis", "mark", n), e.inline.ruler2.before("emphasis", "mark", function(r) { let s; const o = r.tokens_meta, a = (r.tokens_meta || []).length; for (i(r, r.delimiters), s = 0; s < a; s++) o[s] && o[s].delimiters && i(r, o[s].delimiters); }); } return T3 = t, T3; } var Gv = { exports: {} }; const rue = {}, sue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: rue }, Symbol.toStringTag, { value: "Module" })), i0 = /* @__PURE__ */ Sk(sue); var Kv = { exports: {} }, Jv = { exports: {} }, t7; function oue() { return t7 || (t7 = 1, typeof Object.create == "function" ? Jv.exports = function(e, n) { n && (e.super_ = n, e.prototype = Object.create(n.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })); } : Jv.exports = function(e, n) { if (n) { e.super_ = n; var i = function() { }; i.prototype = n.prototype, e.prototype = new i(), e.prototype.constructor = e; } }), Jv.exports; } var eb = { exports: {} }, n7; function aue() { if (n7) return eb.exports; n7 = 1; var t = typeof Reflect == "object" ? Reflect : null, e = t && typeof t.apply == "function" ? t.apply : function(M, $, P) { return Function.prototype.apply.call(M, $, P); }, n; t && typeof t.ownKeys == "function" ? n = t.ownKeys : Object.getOwnPropertySymbols ? n = function(M) { return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M)); } : n = function(M) { return Object.getOwnPropertyNames(M); }; function i(E) { console && console.warn && console.warn(E); } var r = Number.isNaN || function(M) { return M !== M; }; function s() { s.init.call(this); } eb.exports = s, eb.exports.once = _, s.EventEmitter = s, s.prototype._events = void 0, s.prototype._eventsCount = 0, s.prototype._maxListeners = void 0; var o = 10; function a(E) { if (typeof E != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof E); } Object.defineProperty(s, "defaultMaxListeners", { enumerable: !0, get: function() { return o; }, set: function(E) { if (typeof E != "number" || E < 0 || r(E)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + E + "."); o = E; } }), s.init = function() { (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; }, s.prototype.setMaxListeners = function(M) { if (typeof M != "number" || M < 0 || r(M)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + M + "."); return this._maxListeners = M, this; }; function l(E) { return E._maxListeners === void 0 ? s.defaultMaxListeners : E._maxListeners; } s.prototype.getMaxListeners = function() { return l(this); }, s.prototype.emit = function(M) { for (var $ = [], P = 1; P < arguments.length; P++) $.push(arguments[P]); var W = M === "error", z = this._events; if (z !== void 0) W = W && z.error === void 0; else if (!W) return !1; if (W) { var Z; if ($.length > 0 && (Z = $[0]), Z instanceof Error) throw Z; var L = new Error("Unhandled error." + (Z ? " (" + Z.message + ")" : "")); throw L.context = Z, L; } var Q = z[M]; if (Q === void 0) return !1; if (typeof Q == "function") e(Q, this, $); else for (var V = Q.length, H = g(Q, V), P = 0; P < V; ++P) e(H[P], this, $); return !0; }; function u(E, M, $, P) { var W, z, Z; if (a($), z = E._events, z === void 0 ? (z = E._events = /* @__PURE__ */ Object.create(null), E._eventsCount = 0) : (z.newListener !== void 0 && (E.emit( "newListener", M, $.listener ? $.listener : $ ), z = E._events), Z = z[M]), Z === void 0) Z = z[M] = $, ++E._eventsCount; else if (typeof Z == "function" ? Z = z[M] = P ? [$, Z] : [Z, $] : P ? Z.unshift($) : Z.push($), W = l(E), W > 0 && Z.length > W && !Z.warned) { Z.warned = !0; var L = new Error("Possible EventEmitter memory leak detected. " + Z.length + " " + String(M) + " listeners added. Use emitter.setMaxListeners() to increase limit"); L.name = "MaxListenersExceededWarning", L.emitter = E, L.type = M, L.count = Z.length, i(L); } return E; } s.prototype.addListener = function(M, $) { return u(this, M, $, !1); }, s.prototype.on = s.prototype.addListener, s.prototype.prependListener = function(M, $) { return u(this, M, $, !0); }; function f() { if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments); } function d(E, M, $) { var P = { fired: !1, wrapFn: void 0, target: E, type: M, listener: $ }, W = f.bind(P); return W.listener = $, P.wrapFn = W, W; } s.prototype.once = function(M, $) { return a($), this.on(M, d(this, M, $)), this; }, s.prototype.prependOnceListener = function(M, $) { return a($), this.prependListener(M, d(this, M, $)), this; }, s.prototype.removeListener = function(M, $) { var P, W, z, Z, L; if (a($), W = this._events, W === void 0) return this; if (P = W[M], P === void 0) return this; if (P === $ || P.listener === $) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete W[M], W.removeListener && this.emit("removeListener", M, P.listener || $)); else if (typeof P != "function") { for (z = -1, Z = P.length - 1; Z >= 0; Z--) if (P[Z] === $ || P[Z].listener === $) { L = P[Z].listener, z = Z; break; } if (z < 0) return this; z === 0 ? P.shift() : w(P, z), P.length === 1 && (W[M] = P[0]), W.removeListener !== void 0 && this.emit("removeListener", M, L || $); } return this; }, s.prototype.off = s.prototype.removeListener, s.prototype.removeAllListeners = function(M) { var $, P, W; if (P = this._events, P === void 0) return this; if (P.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : P[M] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete P[M]), this; if (arguments.length === 0) { var z = Object.keys(P), Z; for (W = 0; W < z.length; ++W) Z = z[W], Z !== "removeListener" && this.removeAllListeners(Z); return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this; } if ($ = P[M], typeof $ == "function") this.removeListener(M, $); else if ($ !== void 0) for (W = $.length - 1; W >= 0; W--) this.removeListener(M, $[W]); return this; }; function h(E, M, $) { var P = E._events; if (P === void 0) return []; var W = P[M]; return W === void 0 ? [] : typeof W == "function" ? $ ? [W.listener || W] : [W] : $ ? x(W) : g(W, W.length); } s.prototype.listeners = function(M) { return h(this, M, !0); }, s.prototype.rawListeners = function(M) { return h(this, M, !1); }, s.listenerCount = function(E, M) { return typeof E.listenerCount == "function" ? E.listenerCount(M) : m.call(E, M); }, s.prototype.listenerCount = m; function m(E) { var M = this._events; if (M !== void 0) { var $ = M[E]; if (typeof $ == "function") return 1; if ($ !== void 0) return $.length; } return 0; } s.prototype.eventNames = function() { return this._eventsCount > 0 ? n(this._events) : []; }; function g(E, M) { for (var $ = new Array(M), P = 0; P < M; ++P) $[P] = E[P]; return $; } function w(E, M) { for (; M + 1 < E.length; M++) E[M] = E[M + 1]; E.pop(); } function x(E) { for (var M = new Array(E.length), $ = 0; $ < M.length; ++$) M[$] = E[$].listener || E[$]; return M; } function _(E, M) { return new Promise(function($, P) { function W(Z) { E.removeListener(M, z), P(Z); } function z() { typeof E.removeListener == "function" && E.removeListener("error", W), $([].slice.call(arguments)); } C(E, M, z, { once: !0 }), M !== "error" && S(E, W, { once: !0 }); }); } function S(E, M, $) { typeof E.on == "function" && C(E, "error", M, $); } function C(E, M, $, P) { if (typeof E.on == "function") P.once ? E.once(M, $) : E.on(M, $); else if (typeof E.addEventListener == "function") E.addEventListener(M, function W(z) { P.once && E.removeEventListener(M, W), $(z); }); else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof E); } return eb.exports; } var i7; function lue() { if (i7) return Kv.exports; i7 = 1; var t = oue(), e = aue().EventEmitter; Kv.exports = n, Kv.exports.default = n; function n(l) { if (!(this instanceof n)) return new n(l); e.call(this), l = l || {}, this.concurrency = l.concurrency || 1 / 0, this.timeout = l.timeout || 0, this.autostart = l.autostart || !1, this.results = l.results || null, this.pending = 0, this.session = 0, this.running = !1, this.jobs = [], this.timers = {}; } t(n, e); var i = [ "pop", "shift", "indexOf", "lastIndexOf" ]; i.forEach(function(l) { n.prototype[l] = function() { return Array.prototype[l].apply(this.jobs, arguments); }; }), n.prototype.slice = function(l, u) { return this.jobs = this.jobs.slice(l, u), this; }, n.prototype.reverse = function() { return this.jobs.reverse(), this; }; var r = [ "push", "unshift", "splice" ]; r.forEach(function(l) { n.prototype[l] = function() { var u = Array.prototype[l].apply(this.jobs, arguments); return this.autostart && this.start(), u; }; }), Object.defineProperty(n.prototype, "length", { get: function() { return this.pending + this.jobs.length; } }), n.prototype.start = function(l) { if (l && o.call(this, l), this.running = !0, this.pending >= this.concurrency) return; if (this.jobs.length === 0) { this.pending === 0 && a.call(this); return; } var u = this, f = this.jobs.shift(), d = !0, h = this.session, m = null, g = !1, w = null, x = f.hasOwnProperty("timeout") ? f.timeout : this.timeout; function _(C, E) { d && u.session === h && (d = !1, u.pending--, m !== null && (delete u.timers[m], clearTimeout(m)), C ? u.emit("error", C, f) : g === !1 && (w !== null && (u.results[w] = Array.prototype.slice.call(arguments, 1)), u.emit("success", E, f)), u.session === h && (u.pending === 0 && u.jobs.length === 0 ? a.call(u) : u.running && u.start())); } x && (m = setTimeout(function() { g = !0, u.listeners("timeout").length > 0 ? u.emit("timeout", _, f) : _(); }, x), this.timers[m] = m), this.results && (w = this.results.length, this.results[w] = null), this.pending++, u.emit("start", f); var S = f(_); S && S.then && typeof S.then == "function" && S.then(function(C) { return _(null, C); }).catch(function(C) { return _(C || !0); }), this.running && this.jobs.length > 0 && this.start(); }, n.prototype.stop = function() { this.running = !1; }, n.prototype.end = function(l) { s.call(this), this.jobs.length = 0, this.pending = 0, a.call(this, l); }; function s() { for (var l in this.timers) { var u = this.timers[l]; delete this.timers[l], clearTimeout(u); } } function o(l) { var u = this; this.on("error", f), this.on("end", d); function f(h) { u.end(h); } function d(h) { u.removeListener("error", f), u.removeListener("end", d), l(h, this.results); } } function a(l) { this.session++, this.running = !1, this.emit("end", l); } return Kv.exports; } var om = {}, am = {}, $3 = {}, r7; function Xi() { return r7 || (r7 = 1, function(t) { Object.defineProperty(t, "__esModule", { value: !0 }), t.findBox = t.readUInt = t.readUInt32LE = t.readUInt32BE = t.readInt32LE = t.readUInt24LE = t.readUInt16LE = t.readUInt16BE = t.readInt16LE = t.toHexString = t.toUTF8String = void 0; const e = new TextDecoder(), n = (w, x = 0, _ = w.length) => e.decode(w.slice(x, _)); t.toUTF8String = n; const i = (w, x = 0, _ = w.length) => w.slice(x, _).reduce((S, C) => S + ("0" + C.toString(16)).slice(-2), ""); t.toHexString = i; const r = (w, x = 0) => { const _ = w[x] + w[x + 1] * 256; return _ | (_ & 2 ** 15) * 131070; }; t.readInt16LE = r; const s = (w, x = 0) => w[x] * 2 ** 8 + w[x + 1]; t.readUInt16BE = s; const o = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8; t.readUInt16LE = o; const a = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8 + w[x + 2] * 2 ** 16; t.readUInt24LE = a; const l = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8 + w[x + 2] * 2 ** 16 + (w[x + 3] << 24); t.readInt32LE = l; const u = (w, x = 0) => w[x] * 2 ** 24 + w[x + 1] * 2 ** 16 + w[x + 2] * 2 ** 8 + w[x + 3]; t.readUInt32BE = u; const f = (w, x = 0) => w[x] + w[x + 1] * 2 ** 8 + w[x + 2] * 2 ** 16 + w[x + 3] * 2 ** 24; t.readUInt32LE = f; const d = { readUInt16BE: t.readUInt16BE, readUInt16LE: t.readUInt16LE, readUInt32BE: t.readUInt32BE, readUInt32LE: t.readUInt32LE }; function h(w, x, _, S) { _ = _ || 0; const C = S ? "BE" : "LE", E = "readUInt" + x + C; return d[E](w, _); } t.readUInt = h; function m(w, x) { if (w.length - x < 4) return; const _ = (0, t.readUInt32BE)(w, x); if (!(w.length - x < _)) return { name: (0, t.toUTF8String)(w, 4 + x, 8 + x), offset: x, size: _ }; } function g(w, x, _) { for (; _ < w.length; ) { const S = m(w, _); if (!S) break; if (S.name === x) return S; _ += S.size; } } t.findBox = g; }($3)), $3; } var s7; function uue() { if (s7) return am; s7 = 1, Object.defineProperty(am, "__esModule", { value: !0 }), am.BMP = void 0; const t = Xi(); return am.BMP = { validate: (e) => (0, t.toUTF8String)(e, 0, 2) === "BM", calculate: (e) => ({ height: Math.abs((0, t.readInt32LE)(e, 22)), width: (0, t.readUInt32LE)(e, 18) }) }, am; } var lm = {}, um = {}, o7; function $B() { if (o7) return um; o7 = 1, Object.defineProperty(um, "__esModule", { value: !0 }), um.ICO = void 0; const t = Xi(), e = 1, n = 6, i = 16; function r(o, a) { const l = o[a]; return l === 0 ? 256 : l; } function s(o, a) { const l = n + a * i; return { height: r(o, l + 1), width: r(o, l) }; } return um.ICO = { validate(o) { const a = (0, t.readUInt16LE)(o, 0), l = (0, t.readUInt16LE)(o, 4); return a !== 0 || l === 0 ? !1 : (0, t.readUInt16LE)(o, 2) === e; }, calculate(o) { const a = (0, t.readUInt16LE)(o, 4), l = s(o, 0); if (a === 1) return l; const u = [l]; for (let f = 1; f < a; f += 1) u.push(s(o, f)); return { height: l.height, images: u, width: l.width }; } }, um; } var a7; function cue() { if (a7) return lm; a7 = 1, Object.defineProperty(lm, "__esModule", { value: !0 }), lm.CUR = void 0; const t = $B(), e = Xi(), n = 2; return lm.CUR = { validate(i) { const r = (0, e.readUInt16LE)(i, 0), s = (0, e.readUInt16LE)(i, 4); return r !== 0 || s === 0 ? !1 : (0, e.readUInt16LE)(i, 2) === n; }, calculate: (i) => t.ICO.calculate(i) }, lm; } var cm = {}, l7; function fue() { if (l7) return cm; l7 = 1, Object.defineProperty(cm, "__esModule", { value: !0 }), cm.DDS = void 0; const t = Xi(); return cm.DDS = { validate: (e) => (0, t.readUInt32LE)(e, 0) === 542327876, calculate: (e) => ({ height: (0, t.readUInt32LE)(e, 12), width: (0, t.readUInt32LE)(e, 16) }) }, cm; } var fm = {}, u7; function due() { if (u7) return fm; u7 = 1, Object.defineProperty(fm, "__esModule", { value: !0 }), fm.GIF = void 0; const t = Xi(), e = /^GIF8[79]a/; return fm.GIF = { validate: (n) => e.test((0, t.toUTF8String)(n, 0, 6)), calculate: (n) => ({ height: (0, t.readUInt16LE)(n, 8), width: (0, t.readUInt16LE)(n, 6) }) }, fm; } var dm = {}, c7; function hue() { if (c7) return dm; c7 = 1, Object.defineProperty(dm, "__esModule", { value: !0 }), dm.HEIF = void 0; const t = Xi(), e = { avif: "avif", mif1: "heif", msf1: "heif", // hief-sequence heic: "heic", heix: "heic", hevc: "heic", // heic-sequence hevx: "heic" // heic-sequence }; return dm.HEIF = { validate(n) { const i = (0, t.toUTF8String)(n, 4, 8), r = (0, t.toUTF8String)(n, 8, 12); return i === "ftyp" && r in e; }, calculate(n) { const i = (0, t.findBox)(n, "meta", 0), r = i && (0, t.findBox)(n, "iprp", i.offset + 12), s = r && (0, t.findBox)(n, "ipco", r.offset + 8), o = s && (0, t.findBox)(n, "ispe", s.offset + 8); if (o) return { height: (0, t.readUInt32BE)(n, o.offset + 16), width: (0, t.readUInt32BE)(n, o.offset + 12), type: (0, t.toUTF8String)(n, 8, 12) }; throw new TypeError("Invalid HEIF, no size found"); } }, dm; } var hm = {}, f7; function pue() { if (f7) return hm; f7 = 1, Object.defineProperty(hm, "__esModule", { value: !0 }), hm.ICNS = void 0; const t = Xi(), e = 8, n = 4, i = 4, r = { ICON: 32, "ICN#": 32, // m => 16 x 16 "icm#": 16, icm4: 16, icm8: 16, // s => 16 x 16 "ics#": 16, ics4: 16, ics8: 16, is32: 16, s8mk: 16, icp4: 16, // l => 32 x 32 icl4: 32, icl8: 32, il32: 32, l8mk: 32, icp5: 32, ic11: 32, // h => 48 x 48 ich4: 48, ich8: 48, ih32: 48, h8mk: 48, // . => 64 x 64 icp6: 64, ic12: 32, // t => 128 x 128 it32: 128, t8mk: 128, ic07: 128, // . => 256 x 256 ic08: 256, ic13: 256, // . => 512 x 512 ic09: 512, ic14: 512, // . => 1024 x 1024 ic10: 1024 }; function s(a, l) { const u = l + i; return [ (0, t.toUTF8String)(a, l, u), (0, t.readUInt32BE)(a, u) ]; } function o(a) { const l = r[a]; return { width: l, height: l, type: a }; } return hm.ICNS = { validate: (a) => (0, t.toUTF8String)(a, 0, 4) === "icns", calculate(a) { const l = a.length, u = (0, t.readUInt32BE)(a, n); let f = e, d = s(a, f), h = o(d[0]); if (f += d[1], f === u) return h; const m = { height: h.height, images: [h], width: h.width }; for (; f < u && f < l; ) d = s(a, f), h = o(d[0]), f += d[1], m.images.push(h); return m; } }, hm; } var pm = {}, d7; function mue() { if (d7) return pm; d7 = 1, Object.defineProperty(pm, "__esModule", { value: !0 }), pm.J2C = void 0; const t = Xi(); return pm.J2C = { // TODO: this doesn't seem right. SIZ marker doesn't have to be right after the SOC validate: (e) => (0, t.toHexString)(e, 0, 4) === "ff4fff51", calculate: (e) => ({ height: (0, t.readUInt32BE)(e, 12), width: (0, t.readUInt32BE)(e, 8) }) }, pm; } var mm = {}, h7; function gue() { if (h7) return mm; h7 = 1, Object.defineProperty(mm, "__esModule", { value: !0 }), mm.JP2 = void 0; const t = Xi(); return mm.JP2 = { validate(e) { if ((0, t.readUInt32BE)(e, 4) !== 1783636e3 || (0, t.readUInt32BE)(e, 0) < 1) return !1; const n = (0, t.findBox)(e, "ftyp", 0); return n ? (0, t.readUInt32BE)(e, n.offset + 4) === 1718909296 : !1; }, calculate(e) { const n = (0, t.findBox)(e, "jp2h", 0), i = n && (0, t.findBox)(e, "ihdr", n.offset + 8); if (i) return { height: (0, t.readUInt32BE)(e, i.offset + 8), width: (0, t.readUInt32BE)(e, i.offset + 12) }; throw new TypeError("Unsupported JPEG 2000 format"); } }, mm; } var gm = {}, p7; function vue() { if (p7) return gm; p7 = 1, Object.defineProperty(gm, "__esModule", { value: !0 }), gm.JPG = void 0; const t = Xi(), e = "45786966", n = 2, i = 6, r = 2, s = "4d4d", o = "4949", a = 12, l = 2; function u(g) { return (0, t.toHexString)(g, 2, 6) === e; } function f(g, w) { return { height: (0, t.readUInt16BE)(g, w), width: (0, t.readUInt16BE)(g, w + 2) }; } function d(g, w) { const _ = i + 8, S = (0, t.readUInt)(g, 16, _, w); for (let C = 0; C < S; C++) { const E = _ + l + C * a, M = E + a; if (E > g.length) return; const $ = g.slice(E, M); if ((0, t.readUInt)($, 16, 0, w) === 274) return (0, t.readUInt)($, 16, 2, w) !== 3 || (0, t.readUInt)($, 32, 4, w) !== 1 ? void 0 : (0, t.readUInt)($, 16, 8, w); } } function h(g, w) { const x = g.slice(n, w), _ = (0, t.toHexString)(x, i, i + r), S = _ === s; if (S || _ === o) return d(x, S); } function m(g, w) { if (w > g.length) throw new TypeError("Corrupt JPG, exceeded buffer limits"); } return gm.JPG = { validate: (g) => (0, t.toHexString)(g, 0, 2) === "ffd8", calculate(g) { g = g.slice(4); let w, x; for (; g.length; ) { const _ = (0, t.readUInt16BE)(g, 0); if (g[_] !== 255) { g = g.slice(1); continue; } if (u(g) && (w = h(g, _)), m(g, _), x = g[_ + 1], x === 192 || x === 193 || x === 194) { const S = f(g, _ + 5); return w ? { height: S.height, orientation: w, width: S.width } : S; } g = g.slice(_ + 2); } throw new TypeError("Invalid JPG, no size found"); } }, gm; } var vm = {}, m7; function bue() { if (m7) return vm; m7 = 1, Object.defineProperty(vm, "__esModule", { value: !0 }), vm.KTX = void 0; const t = Xi(); return vm.KTX = { validate: (e) => { const n = (0, t.toUTF8String)(e, 1, 7); return ["KTX 11", "KTX 20"].includes(n); }, calculate: (e) => { const n = e[5] === 49 ? "ktx" : "ktx2", i = n === "ktx" ? 36 : 20; return { height: (0, t.readUInt32LE)(e, i + 4), width: (0, t.readUInt32LE)(e, i), type: n }; } }, vm; } var bm = {}, g7; function yue() { if (g7) return bm; g7 = 1, Object.defineProperty(bm, "__esModule", { value: !0 }), bm.PNG = void 0; const t = Xi(), e = `PNG\r  `, n = "IHDR", i = "CgBI"; return bm.PNG = { validate(r) { if (e === (0, t.toUTF8String)(r, 1, 8)) { let s = (0, t.toUTF8String)(r, 12, 16); if (s === i && (s = (0, t.toUTF8String)(r, 28, 32)), s !== n) throw new TypeError("Invalid PNG"); return !0; } return !1; }, calculate(r) { return (0, t.toUTF8String)(r, 12, 16) === i ? { height: (0, t.readUInt32BE)(r, 36), width: (0, t.readUInt32BE)(r, 32) } : { height: (0, t.readUInt32BE)(r, 20), width: (0, t.readUInt32BE)(r, 16) }; } }, bm; } var ym = {}, v7; function wue() { if (v7) return ym; v7 = 1, Object.defineProperty(ym, "__esModule", { value: !0 }), ym.PNM = void 0; const t = Xi(), e = { P1: "pbm/ascii", P2: "pgm/ascii", P3: "ppm/ascii", P4: "pbm", P5: "pgm", P6: "ppm", P7: "pam", PF: "pfm" }, n = { default: (i) => { let r = []; for (; i.length > 0; ) { const s = i.shift(); if (s[0] !== "#") { r = s.split(" "); break; } } if (r.length === 2) return { height: parseInt(r[1], 10), width: parseInt(r[0], 10) }; throw new TypeError("Invalid PNM"); }, pam: (i) => { const r = {}; for (; i.length > 0; ) { const s = i.shift(); if (s.length > 16 || s.charCodeAt(0) > 128) continue; const [o, a] = s.split(" "); if (o && a && (r[o.toLowerCase()] = parseInt(a, 10)), r.height && r.width) break; } if (r.height && r.width) return { height: r.height, width: r.width }; throw new TypeError("Invalid PAM"); } }; return ym.PNM = { validate: (i) => (0, t.toUTF8String)(i, 0, 2) in e, calculate(i) { const r = (0, t.toUTF8String)(i, 0, 2), s = e[r], o = (0, t.toUTF8String)(i, 3).split(/[\r\n]+/); return (n[s] || n.default)(o); } }, ym; } var wm = {}, b7; function kue() { if (b7) return wm; b7 = 1, Object.defineProperty(wm, "__esModule", { value: !0 }), wm.PSD = void 0; const t = Xi(); return wm.PSD = { validate: (e) => (0, t.toUTF8String)(e, 0, 4) === "8BPS", calculate: (e) => ({ height: (0, t.readUInt32BE)(e, 14), width: (0, t.readUInt32BE)(e, 18) }) }, wm; } var km = {}, y7; function xue() { if (y7) return km; y7 = 1, Object.defineProperty(km, "__esModule", { value: !0 }), km.SVG = void 0; const t = Xi(), e = /"']|"[^"]*"|'[^']*')*>/, n = { height: /\sheight=(['"])([^%]+?)\1/, root: e, viewbox: /\sviewBox=(['"])(.+?)\1/i, width: /\swidth=(['"])([^%]+?)\1/ }, i = 2.54, r = { in: 96, cm: 96 / i, em: 16, ex: 8, m: 96 / i * 100, mm: 96 / i / 10, pc: 96 / 72 / 12, pt: 96 / 72, px: 1 }, s = new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(r).join("|")})?$`); function o(d) { const h = s.exec(d); if (h) return Math.round(Number(h[1]) * (r[h[2]] || 1)); } function a(d) { const h = d.split(" "); return { height: o(h[3]), width: o(h[2]) }; } function l(d) { const h = d.match(n.width), m = d.match(n.height), g = d.match(n.viewbox); return { height: m && o(m[2]), viewbox: g && a(g[2]), width: h && o(h[2]) }; } function u(d) { return { height: d.height, width: d.width }; } function f(d, h) { const m = h.width / h.height; return d.width ? { height: Math.floor(d.width / m), width: d.width } : d.height ? { height: d.height, width: Math.floor(d.height * m) } : { height: h.height, width: h.width }; } return km.SVG = { // Scan only the first kilo-byte to speed up the check on larger files validate: (d) => e.test((0, t.toUTF8String)(d, 0, 1e3)), calculate(d) { const h = (0, t.toUTF8String)(d).match(n.root); if (h) { const m = l(h[0]); if (m.width && m.height) return u(m); if (m.viewbox) return f(m, m.viewbox); } throw new TypeError("Invalid SVG"); } }, km; } var xm = {}, w7; function _ue() { if (w7) return xm; w7 = 1, Object.defineProperty(xm, "__esModule", { value: !0 }), xm.TGA = void 0; const t = Xi(); return xm.TGA = { validate(e) { return (0, t.readUInt16LE)(e, 0) === 0 && (0, t.readUInt16LE)(e, 4) === 0; }, calculate(e) { return { height: (0, t.readUInt16LE)(e, 14), width: (0, t.readUInt16LE)(e, 12) }; } }, xm; } var _m = {}, k7; function Oue() { if (k7) return _m; k7 = 1, Object.defineProperty(_m, "__esModule", { value: !0 }), _m.TIFF = void 0; const t = i0, e = Xi(); function n(l, u, f) { const d = (0, e.readUInt)(l, 32, 4, f); let h = 1024; const m = t.statSync(u).size; d + h > m && (h = m - d - 10); const g = new Uint8Array(h), w = t.openSync(u, "r"); return t.readSync(w, g, 0, h, d), t.closeSync(w), g.slice(2); } function i(l, u) { const f = (0, e.readUInt)(l, 16, 8, u); return ((0, e.readUInt)(l, 16, 10, u) << 16) + f; } function r(l) { if (l.length > 24) return l.slice(12); } function s(l, u) { const f = {}; let d = l; for (; d && d.length; ) { const h = (0, e.readUInt)(d, 16, 0, u), m = (0, e.readUInt)(d, 16, 2, u), g = (0, e.readUInt)(d, 32, 4, u); if (h === 0) break; g === 1 && (m === 3 || m === 4) && (f[h] = i(d, u)), d = r(d); } return f; } function o(l) { const u = (0, e.toUTF8String)(l, 0, 2); if (u === "II") return "LE"; if (u === "MM") return "BE"; } const a = [ // '492049', // currently not supported "49492a00", // Little endian "4d4d002a" // Big Endian // '4d4d002a', // BigTIFF > 4GB. currently not supported ]; return _m.TIFF = { validate: (l) => a.includes((0, e.toHexString)(l, 0, 4)), calculate(l, u) { if (!u) throw new TypeError("Tiff doesn't support buffer"); const f = o(l) === "BE", d = n(l, u, f), h = s(d, f), m = h[256], g = h[257]; if (!m || !g) throw new TypeError("Invalid Tiff. Missing tags"); return { height: g, width: m }; } }, _m; } var Om = {}, x7; function Sue() { if (x7) return Om; x7 = 1, Object.defineProperty(Om, "__esModule", { value: !0 }), Om.WEBP = void 0; const t = Xi(); function e(r) { return { height: 1 + (0, t.readUInt24LE)(r, 7), width: 1 + (0, t.readUInt24LE)(r, 4) }; } function n(r) { return { height: 1 + ((r[4] & 15) << 10 | r[3] << 2 | (r[2] & 192) >> 6), width: 1 + ((r[2] & 63) << 8 | r[1]) }; } function i(r) { return { height: (0, t.readInt16LE)(r, 8) & 16383, width: (0, t.readInt16LE)(r, 6) & 16383 }; } return Om.WEBP = { validate(r) { const s = (0, t.toUTF8String)(r, 0, 4) === "RIFF", o = (0, t.toUTF8String)(r, 8, 12) === "WEBP", a = (0, t.toUTF8String)(r, 12, 15) === "VP8"; return s && o && a; }, calculate(r) { const s = (0, t.toUTF8String)(r, 12, 16); if (r = r.slice(20, 30), s === "VP8X") { const a = r[0], l = (a & 192) === 0, u = (a & 1) === 0; if (l && u) return e(r); throw new TypeError("Invalid WebP"); } if (s === "VP8 " && r[0] !== 47) return i(r); const o = (0, t.toHexString)(r, 3, 6); if (s === "VP8L" && o !== "9d012a") return n(r); throw new TypeError("Invalid WebP"); } }, Om; } var _7; function MB() { if (_7) return om; _7 = 1, Object.defineProperty(om, "__esModule", { value: !0 }), om.typeHandlers = void 0; const t = uue(), e = cue(), n = fue(), i = due(), r = hue(), s = pue(), o = $B(), a = mue(), l = gue(), u = vue(), f = bue(), d = yue(), h = wue(), m = kue(), g = xue(), w = _ue(), x = Oue(), _ = Sue(); return om.typeHandlers = { bmp: t.BMP, cur: e.CUR, dds: n.DDS, gif: i.GIF, heif: r.HEIF, icns: s.ICNS, ico: o.ICO, j2c: a.J2C, jp2: l.JP2, jpg: u.JPG, ktx: f.KTX, png: d.PNG, pnm: h.PNM, psd: m.PSD, svg: g.SVG, tga: w.TGA, tiff: x.TIFF, webp: _.WEBP }, om; } var Sm = {}, O7; function Cue() { if (O7) return Sm; O7 = 1, Object.defineProperty(Sm, "__esModule", { value: !0 }), Sm.detector = void 0; const t = MB(), e = Object.keys(t.typeHandlers), n = { 56: "psd", 66: "bmp", 68: "dds", 71: "gif", 73: "tiff", 77: "tiff", 82: "webp", 105: "icns", 137: "png", 255: "jpg" }; function i(r) { const s = r[0]; if (s in n) { const a = n[s]; if (a && t.typeHandlers[a].validate(r)) return a; } const o = (a) => t.typeHandlers[a].validate(r); return e.find(o); } return Sm.detector = i, Sm; } var S7; function Eue() { return S7 || (S7 = 1, function(t, e) { Object.defineProperty(e, "__esModule", { value: !0 }), e.types = e.setConcurrency = e.disableTypes = e.disableFS = e.imageSize = void 0; const n = i0, i = i0, r = lue(), s = MB(), o = Cue(), a = 512 * 1024, l = new r.default({ concurrency: 100, autostart: !0 }), u = { disabledFS: !1, disabledTypes: [] }; function f(_, S) { const C = (0, o.detector)(_); if (typeof C < "u") { if (u.disabledTypes.indexOf(C) > -1) throw new TypeError("disabled file type: " + C); if (C in s.typeHandlers) { const E = s.typeHandlers[C].calculate(_, S); if (E !== void 0) return E.type = E.type ?? C, E; } } throw new TypeError("unsupported file type: " + C + " (file: " + S + ")"); } async function d(_) { const S = await n.promises.open(_, "r"); try { const { size: C } = await S.stat(); if (C <= 0) throw new Error("Empty file"); const E = Math.min(C, a), M = new Uint8Array(E); return await S.read(M, 0, E, 0), M; } finally { await S.close(); } } function h(_) { const S = n.openSync(_, "r"); try { const { size: C } = n.fstatSync(S); if (C <= 0) throw new Error("Empty file"); const E = Math.min(C, a), M = new Uint8Array(E); return n.readSync(S, M, 0, E, 0), M; } finally { n.closeSync(S); } } t.exports = e = m, e.default = m; function m(_, S) { if (_ instanceof Uint8Array) return f(_); if (typeof _ != "string" || u.disabledFS) throw new TypeError("invalid invocation. input should be a Uint8Array"); const C = i.resolve(_); if (typeof S == "function") l.push(() => d(C).then((E) => process.nextTick(S, null, f(E, C))).catch(S)); else { const E = h(C); return f(E, C); } } e.imageSize = m; const g = (_) => { u.disabledFS = _; }; e.disableFS = g; const w = (_) => { u.disabledTypes = _; }; e.disableTypes = w; const x = (_) => { l.concurrency = _; }; e.setConcurrency = x, e.types = Object.keys(s.typeHandlers); }(Gv, Gv.exports)), Gv.exports; } var M3, C7; function sw() { if (C7) return M3; C7 = 1; var t = Eue(), e = i0; function n(i, r) { var s = i.renderer.rules.image; i.renderer.rules.image = function(o, a, l, u, f) { var d = o[a]; if (d.attrSet("loading", "lazy"), r && r.decoding === !0 && d.attrSet("decoding", "async"), r && r.base_path && r.image_size === !0) { const h = d.attrGet("src"), m = e.join(r.base_path, h), g = t(m); d.attrSet("width", g.width), d.attrSet("height", g.height); } return s(o, a, l, u, f); }; } return M3 = n, M3; } var N3, E7; function ow() { if (E7) return N3; E7 = 1; const t = /\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g; function e(i, r) { const s = i.posMax, o = i.pos; if (i.src.charCodeAt(o) !== 126 || r || o + 2 >= s) return !1; i.pos = o + 1; let a = !1; for (; i.pos < s; ) { if (i.src.charCodeAt(i.pos) === 126) { a = !0; break; } i.md.inline.skipToken(i); } if (!a || o + 1 === i.pos) return i.pos = o, !1; const l = i.src.slice(o + 1, i.pos); if (l.match(/(^|[^\\])(\\\\)*\s/)) return i.pos = o, !1; i.posMax = i.pos, i.pos = o + 1; const u = i.push("sub_open", "sub", 1); u.markup = "~"; const f = i.push("text", "", 0); f.content = l.replace(t, "$1"); const d = i.push("sub_close", "sub", -1); return d.markup = "~", i.pos = i.posMax + 1, i.posMax = s, !0; } function n(i) { i.inline.ruler.after("emphasis", "sub", e); } return N3 = n, N3; } var A3, T7; function aw() { if (T7) return A3; T7 = 1; const t = /\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g; function e(i, r) { const s = i.posMax, o = i.pos; if (i.src.charCodeAt(o) !== 94 || r || o + 2 >= s) return !1; i.pos = o + 1; let a = !1; for (; i.pos < s; ) { if (i.src.charCodeAt(i.pos) === 94) { a = !0; break; } i.md.inline.skipToken(i); } if (!a || o + 1 === i.pos) return i.pos = o, !1; const l = i.src.slice(o + 1, i.pos); if (l.match(/(^|[^\\])(\\\\)*\s/)) return i.pos = o, !1; i.posMax = i.pos, i.pos = o + 1; const u = i.push("sup_open", "sup", 1); u.markup = "^"; const f = i.push("text", "", 0); f.content = l.replace(t, "$1"); const d = i.push("sup_close", "sup", -1); return d.markup = "^", i.pos = i.posMax + 1, i.posMax = s, !0; } function n(i) { i.inline.ruler.after("emphasis", "sup", e); } return A3 = n, A3; } const $7 = kB, M7 = Gk, { slugify: Tue } = iue, Od = {}, N7 = function({ ghostVersion: t } = {}) { const e = function(n, i = {}) { let r = Tue(n, { ghostVersion: t, type: "markdown" }); return i[r] && (i[r] += 1, r += i[r]), r; }; return function(n) { const i = n.renderer.rules.heading_open; n.renderer.rules.heading_open = function(r, s, o, a, l) { const u = {}; r[s].attrs = r[s].attrs || []; const f = r[s + 1].children.reduce(function(h, m) { return h + m.content; }, ""), d = e(f, u); return r[s].attrs.push(["id", d]), i ? i.apply(this, arguments) : l.renderToken.apply(l, arguments); }; }; }, $ue = function(t) { const e = M7.coerce(t.ghostVersion || "4.0"); if (M7.satisfies(e, "<4.x")) { if (Od["<4.x"]) return Od["<4.x"]; const n = new $7({ html: !0, breaks: !0, linkify: !0 }).use(nw()).use(iw()).use(rw()).use(sw()).use(N7(t)).use(ow()).use(aw()); return n.linkify.set({ fuzzyLink: !1 }), Od["<4.x"] = n, n; } else { if (Od.latest) return Od.latest; const n = new $7({ html: !0, breaks: !0, linkify: !0 }).use(nw()).use(iw()).use(rw()).use(sw()).use(N7(t)).use(ow()).use(aw()); return n.linkify.set({ fuzzyLink: !1 }), Od.latest = n, n; } }; var Mue = { render: function(t, e = {}) { return $ue(e).render(t); } }, Nue = Mue; const Aue = /* @__PURE__ */ Gs(Nue); function NB(t) { var e, n, i = ""; if (typeof t == "string" || typeof t == "number") i += t; else if (typeof t == "object") if (Array.isArray(t)) { var r = t.length; for (e = 0; e < r; e++) t[e] && (n = NB(t[e])) && (i && (i += " "), i += n); } else for (n in t) t[n] && (i && (i += " "), i += n); return i; } function nt() { for (var t, e, n = 0, i = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = NB(t)) && (i && (i += " "), i += e); return i; } class Af extends Error { } class Due extends Af { constructor(e) { super(`Invalid DateTime: ${e.toMessage()}`); } } class Pue extends Af { constructor(e) { super(`Invalid Interval: ${e.toMessage()}`); } } class Iue extends Af { constructor(e) { super(`Invalid Duration: ${e.toMessage()}`); } } class Gd extends Af { } class AB extends Af { constructor(e) { super(`Invalid unit ${e}`); } } class Sr extends Af { } class iu extends Af { constructor() { super("Zone is an abstract class"); } } const Me = "numeric", jo = "short", Hs = "long", lw = { year: Me, month: Me, day: Me }, DB = { year: Me, month: jo, day: Me }, Lue = { year: Me, month: jo, day: Me, weekday: jo }, PB = { year: Me, month: Hs, day: Me }, IB = { year: Me, month: Hs, day: Me, weekday: Hs }, LB = { hour: Me, minute: Me }, RB = { hour: Me, minute: Me, second: Me }, jB = { hour: Me, minute: Me, second: Me, timeZoneName: jo }, FB = { hour: Me, minute: Me, second: Me, timeZoneName: Hs }, BB = { hour: Me, minute: Me, hourCycle: "h23" }, zB = { hour: Me, minute: Me, second: Me, hourCycle: "h23" }, WB = { hour: Me, minute: Me, second: Me, hourCycle: "h23", timeZoneName: jo }, HB = { hour: Me, minute: Me, second: Me, hourCycle: "h23", timeZoneName: Hs }, QB = { year: Me, month: Me, day: Me, hour: Me, minute: Me }, UB = { year: Me, month: Me, day: Me, hour: Me, minute: Me, second: Me }, ZB = { year: Me, month: jo, day: Me, hour: Me, minute: Me }, qB = { year: Me, month: jo, day: Me, hour: Me, minute: Me, second: Me }, Rue = { year: Me, month: jo, day: Me, weekday: jo, hour: Me, minute: Me }, YB = { year: Me, month: Hs, day: Me, hour: Me, minute: Me, timeZoneName: jo }, VB = { year: Me, month: Hs, day: Me, hour: Me, minute: Me, second: Me, timeZoneName: jo }, XB = { year: Me, month: Hs, day: Me, weekday: Hs, hour: Me, minute: Me, timeZoneName: Hs }, GB = { year: Me, month: Hs, day: Me, weekday: Hs, hour: Me, minute: Me, second: Me, timeZoneName: Hs }; class u1 { /** * The type of zone * @abstract * @type {string} */ get type() { throw new iu(); } /** * The name of this zone. * @abstract * @type {string} */ get name() { throw new iu(); } /** * The IANA name of this zone. * Defaults to `name` if not overwritten by a subclass. * @abstract * @type {string} */ get ianaName() { return this.name; } /** * Returns whether the offset is known to be fixed for the whole year. * @abstract * @type {boolean} */ get isUniversal() { throw new iu(); } /** * Returns the offset's common name (such as EST) at the specified timestamp * @abstract * @param {number} ts - Epoch milliseconds for which to get the name * @param {Object} opts - Options to affect the format * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. * @param {string} opts.locale - What locale to return the offset name in. * @return {string} */ offsetName(e, n) { throw new iu(); } /** * Returns the offset's value as a string * @abstract * @param {number} ts - Epoch milliseconds for which to get the offset * @param {string} format - What style of offset to return. * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively * @return {string} */ formatOffset(e, n) { throw new iu(); } /** * Return the offset in minutes for this zone at the specified timestamp. * @abstract * @param {number} ts - Epoch milliseconds for which to compute the offset * @return {number} */ offset(e) { throw new iu(); } /** * Return whether this Zone is equal to another zone * @abstract * @param {Zone} otherZone - the zone to compare * @return {boolean} */ equals(e) { throw new iu(); } /** * Return whether this Zone is valid. * @abstract * @type {boolean} */ get isValid() { throw new iu(); } } let D3 = null; class Kk extends u1 { /** * Get a singleton instance of the local zone * @return {SystemZone} */ static get instance() { return D3 === null && (D3 = new Kk()), D3; } /** @override **/ get type() { return "system"; } /** @override **/ get name() { return new Intl.DateTimeFormat().resolvedOptions().timeZone; } /** @override **/ get isUniversal() { return !1; } /** @override **/ offsetName(e, { format: n, locale: i }) { return oz(e, n, i); } /** @override **/ formatOffset(e, n) { return Og(this.offset(e), n); } /** @override **/ offset(e) { return -new Date(e).getTimezoneOffset(); } /** @override **/ equals(e) { return e.type === "system"; } /** @override **/ get isValid() { return !0; } } let ty = {}; function jue(t) { return ty[t] || (ty[t] = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: t, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", era: "short" })), ty[t]; } const Fue = { year: 0, month: 1, day: 2, era: 3, hour: 4, minute: 5, second: 6 }; function Bue(t, e) { const n = t.format(e).replace(/\u200E/g, ""), i = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, r, s, o, a, l, u, f] = i; return [o, r, s, a, l, u, f]; } function zue(t, e) { const n = t.formatToParts(e), i = []; for (let r = 0; r < n.length; r++) { const { type: s, value: o } = n[r], a = Fue[s]; s === "era" ? i[a] = o : yt(a) || (i[a] = parseInt(o, 10)); } return i; } let tb = {}; class xl extends u1 { /** * @param {string} name - Zone name * @return {IANAZone} */ static create(e) { return tb[e] || (tb[e] = new xl(e)), tb[e]; } /** * Reset local caches. Should only be necessary in testing scenarios. * @return {void} */ static resetCache() { tb = {}, ty = {}; } /** * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. * @param {string} s - The string to check validity on * @example IANAZone.isValidSpecifier("America/New_York") //=> true * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead. * @return {boolean} */ static isValidSpecifier(e) { return this.isValidZone(e); } /** * Returns whether the provided string identifies a real zone * @param {string} zone - The string to check * @example IANAZone.isValidZone("America/New_York") //=> true * @example IANAZone.isValidZone("Fantasia/Castle") //=> false * @example IANAZone.isValidZone("Sport~~blorp") //=> false * @return {boolean} */ static isValidZone(e) { if (!e) return !1; try { return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0; } catch { return !1; } } constructor(e) { super(), this.zoneName = e, this.valid = xl.isValidZone(e); } /** * The type of zone. `iana` for all instances of `IANAZone`. * @override * @type {string} */ get type() { return "iana"; } /** * The name of this zone (i.e. the IANA zone name). * @override * @type {string} */ get name() { return this.zoneName; } /** * Returns whether the offset is known to be fixed for the whole year: * Always returns false for all IANA zones. * @override * @type {boolean} */ get isUniversal() { return !1; } /** * Returns the offset's common name (such as EST) at the specified timestamp * @override * @param {number} ts - Epoch milliseconds for which to get the name * @param {Object} opts - Options to affect the format * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. * @param {string} opts.locale - What locale to return the offset name in. * @return {string} */ offsetName(e, { format: n, locale: i }) { return oz(e, n, i, this.name); } /** * Returns the offset's value as a string * @override * @param {number} ts - Epoch milliseconds for which to get the offset * @param {string} format - What style of offset to return. * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively * @return {string} */ formatOffset(e, n) { return Og(this.offset(e), n); } /** * Return the offset in minutes for this zone at the specified timestamp. * @override * @param {number} ts - Epoch milliseconds for which to compute the offset * @return {number} */ offset(e) { const n = new Date(e); if (isNaN(n)) return NaN; const i = jue(this.name); let [r, s, o, a, l, u, f] = i.formatToParts ? zue(i, n) : Bue(i, n); a === "BC" && (r = -Math.abs(r) + 1); const h = e2({ year: r, month: s, day: o, hour: l === 24 ? 0 : l, minute: u, second: f, millisecond: 0 }); let m = +n; const g = m % 1e3; return m -= g >= 0 ? g : 1e3 + g, (h - m) / (60 * 1e3); } /** * Return whether this Zone is equal to another zone * @override * @param {Zone} otherZone - the zone to compare * @return {boolean} */ equals(e) { return e.type === "iana" && e.name === this.name; } /** * Return whether this Zone is valid. * @override * @type {boolean} */ get isValid() { return this.valid; } } let A7 = {}; function Wue(t, e = {}) { const n = JSON.stringify([t, e]); let i = A7[n]; return i || (i = new Intl.ListFormat(t, e), A7[n] = i), i; } let d4 = {}; function h4(t, e = {}) { const n = JSON.stringify([t, e]); let i = d4[n]; return i || (i = new Intl.DateTimeFormat(t, e), d4[n] = i), i; } let p4 = {}; function Hue(t, e = {}) { const n = JSON.stringify([t, e]); let i = p4[n]; return i || (i = new Intl.NumberFormat(t, e), p4[n] = i), i; } let m4 = {}; function Que(t, e = {}) { const { base: n, ...i } = e, r = JSON.stringify([t, i]); let s = m4[r]; return s || (s = new Intl.RelativeTimeFormat(t, e), m4[r] = s), s; } let Km = null; function Uue() { return Km || (Km = new Intl.DateTimeFormat().resolvedOptions().locale, Km); } let D7 = {}; function Zue(t) { let e = D7[t]; if (!e) { const n = new Intl.Locale(t); e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo, D7[t] = e; } return e; } function que(t) { const e = t.indexOf("-x-"); e !== -1 && (t = t.substring(0, e)); const n = t.indexOf("-u-"); if (n === -1) return [t]; { let i, r; try { i = h4(t).resolvedOptions(), r = t; } catch { const l = t.substring(0, n); i = h4(l).resolvedOptions(), r = l; } const { numberingSystem: s, calendar: o } = i; return [r, s, o]; } } function Yue(t, e, n) { return (n || e) && (t.includes("-u-") || (t += "-u"), n && (t += `-ca-${n}`), e && (t += `-nu-${e}`)), t; } function Vue(t) { const e = []; for (let n = 1; n <= 12; n++) { const i = ht.utc(2009, n, 1); e.push(t(i)); } return e; } function Xue(t) { const e = []; for (let n = 1; n <= 7; n++) { const i = ht.utc(2016, 11, 13 + n); e.push(t(i)); } return e; } function nb(t, e, n, i) { const r = t.listingMode(); return r === "error" ? null : r === "en" ? n(e) : i(e); } function Gue(t) { return t.numberingSystem && t.numberingSystem !== "latn" ? !1 : t.numberingSystem === "latn" || !t.locale || t.locale.startsWith("en") || new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem === "latn"; } class Kue { constructor(e, n, i) { this.padTo = i.padTo || 0, this.floor = i.floor || !1; const { padTo: r, floor: s, ...o } = i; if (!n || Object.keys(o).length > 0) { const a = { useGrouping: !1, ...i }; i.padTo > 0 && (a.minimumIntegerDigits = i.padTo), this.inf = Hue(e, a); } } format(e) { if (this.inf) { const n = this.floor ? Math.floor(e) : e; return this.inf.format(n); } else { const n = this.floor ? Math.floor(e) : L5(e, 3); return yi(n, this.padTo); } } } class Jue { constructor(e, n, i) { this.opts = i, this.originalZone = void 0; let r; if (this.opts.timeZone) this.dt = e; else if (e.zone.type === "fixed") { const o = -1 * (e.offset / 60), a = o >= 0 ? `Etc/GMT+${o}` : `Etc/GMT${o}`; e.offset !== 0 && xl.create(a).valid ? (r = a, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone); } else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone); const s = { ...this.opts }; s.timeZone = s.timeZone || r, this.dtf = h4(n, s); } format() { return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate()); } formatToParts() { const e = this.dtf.formatToParts(this.dt.toJSDate()); return this.originalZone ? e.map((n) => { if (n.type === "timeZoneName") { const i = this.originalZone.offsetName(this.dt.ts, { locale: this.dt.locale, format: this.opts.timeZoneName }); return { ...n, value: i }; } else return n; }) : e; } resolvedOptions() { return this.dtf.resolvedOptions(); } } class ece { constructor(e, n, i) { this.opts = { style: "long", ...i }, !n && rz() && (this.rtf = Que(e, i)); } format(e, n) { return this.rtf ? this.rtf.format(e, n) : _ce(n, e, this.opts.numeric, this.opts.style !== "long"); } formatToParts(e, n) { return this.rtf ? this.rtf.formatToParts(e, n) : []; } } const tce = { firstDay: 1, minimalDays: 4, weekend: [6, 7] }; class Gt { static fromOpts(e) { return Gt.create( e.locale, e.numberingSystem, e.outputCalendar, e.weekSettings, e.defaultToEN ); } static create(e, n, i, r, s = !1) { const o = e || ti.defaultLocale, a = o || (s ? "en-US" : Uue()), l = n || ti.defaultNumberingSystem, u = i || ti.defaultOutputCalendar, f = g4(r) || ti.defaultWeekSettings; return new Gt(a, l, u, f, o); } static resetCache() { Km = null, d4 = {}, p4 = {}, m4 = {}; } static fromObject({ locale: e, numberingSystem: n, outputCalendar: i, weekSettings: r } = {}) { return Gt.create(e, n, i, r); } constructor(e, n, i, r, s) { const [o, a, l] = que(e); this.locale = o, this.numberingSystem = n || a || null, this.outputCalendar = i || l || null, this.weekSettings = r, this.intl = Yue(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = s, this.fastNumbersCached = null; } get fastNumbers() { return this.fastNumbersCached == null && (this.fastNumbersCached = Gue(this)), this.fastNumbersCached; } listingMode() { const e = this.isEnglish(), n = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); return e && n ? "en" : "intl"; } clone(e) { return !e || Object.getOwnPropertyNames(e).length === 0 ? this : Gt.create( e.locale || this.specifiedLocale, e.numberingSystem || this.numberingSystem, e.outputCalendar || this.outputCalendar, g4(e.weekSettings) || this.weekSettings, e.defaultToEN || !1 ); } redefaultToEN(e = {}) { return this.clone({ ...e, defaultToEN: !0 }); } redefaultToSystem(e = {}) { return this.clone({ ...e, defaultToEN: !1 }); } months(e, n = !1) { return nb(this, e, uz, () => { const i = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone"; return this.monthsCache[r][e] || (this.monthsCache[r][e] = Vue((s) => this.extract(s, i, "month"))), this.monthsCache[r][e]; }); } weekdays(e, n = !1) { return nb(this, e, dz, () => { const i = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone"; return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = Xue( (s) => this.extract(s, i, "weekday") )), this.weekdaysCache[r][e]; }); } meridiems() { return nb( this, void 0, () => hz, () => { if (!this.meridiemCache) { const e = { hour: "numeric", hourCycle: "h12" }; this.meridiemCache = [ht.utc(2016, 11, 13, 9), ht.utc(2016, 11, 13, 19)].map( (n) => this.extract(n, e, "dayperiod") ); } return this.meridiemCache; } ); } eras(e) { return nb(this, e, pz, () => { const n = { era: e }; return this.eraCache[e] || (this.eraCache[e] = [ht.utc(-40, 1, 1), ht.utc(2017, 1, 1)].map( (i) => this.extract(i, n, "era") )), this.eraCache[e]; }); } extract(e, n, i) { const r = this.dtFormatter(e, n), s = r.formatToParts(), o = s.find((a) => a.type.toLowerCase() === i); return o ? o.value : null; } numberFormatter(e = {}) { return new Kue(this.intl, e.forceSimple || this.fastNumbers, e); } dtFormatter(e, n = {}) { return new Jue(e, this.intl, n); } relFormatter(e = {}) { return new ece(this.intl, this.isEnglish(), e); } listFormatter(e = {}) { return Wue(this.intl, e); } isEnglish() { return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); } getWeekSettings() { return this.weekSettings ? this.weekSettings : sz() ? Zue(this.locale) : tce; } getStartOfWeek() { return this.getWeekSettings().firstDay; } getMinDaysInFirstWeek() { return this.getWeekSettings().minimalDays; } getWeekendDays() { return this.getWeekSettings().weekend; } equals(e) { return this.locale === e.locale && this.numberingSystem === e.numberingSystem && this.outputCalendar === e.outputCalendar; } toString() { return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`; } } let P3 = null; class Gr extends u1 { /** * Get a singleton instance of UTC * @return {FixedOffsetZone} */ static get utcInstance() { return P3 === null && (P3 = new Gr(0)), P3; } /** * Get an instance with a specified offset * @param {number} offset - The offset in minutes * @return {FixedOffsetZone} */ static instance(e) { return e === 0 ? Gr.utcInstance : new Gr(e); } /** * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" * @param {string} s - The offset string to parse * @example FixedOffsetZone.parseSpecifier("UTC+6") * @example FixedOffsetZone.parseSpecifier("UTC+06") * @example FixedOffsetZone.parseSpecifier("UTC-6:00") * @return {FixedOffsetZone} */ static parseSpecifier(e) { if (e) { const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); if (n) return new Gr(t2(n[1], n[2])); } return null; } constructor(e) { super(), this.fixed = e; } /** * The type of zone. `fixed` for all instances of `FixedOffsetZone`. * @override * @type {string} */ get type() { return "fixed"; } /** * The name of this zone. * All fixed zones' names always start with "UTC" (plus optional offset) * @override * @type {string} */ get name() { return this.fixed === 0 ? "UTC" : `UTC${Og(this.fixed, "narrow")}`; } /** * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn` * * @override * @type {string} */ get ianaName() { return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${Og(-this.fixed, "narrow")}`; } /** * Returns the offset's common name at the specified timestamp. * * For fixed offset zones this equals to the zone name. * @override */ offsetName() { return this.name; } /** * Returns the offset's value as a string * @override * @param {number} ts - Epoch milliseconds for which to get the offset * @param {string} format - What style of offset to return. * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively * @return {string} */ formatOffset(e, n) { return Og(this.fixed, n); } /** * Returns whether the offset is known to be fixed for the whole year: * Always returns true for all fixed offset zones. * @override * @type {boolean} */ get isUniversal() { return !0; } /** * Return the offset in minutes for this zone at the specified timestamp. * * For fixed offset zones, this is constant and does not depend on a timestamp. * @override * @return {number} */ offset() { return this.fixed; } /** * Return whether this Zone is equal to another zone (i.e. also fixed and same offset) * @override * @param {Zone} otherZone - the zone to compare * @return {boolean} */ equals(e) { return e.type === "fixed" && e.fixed === this.fixed; } /** * Return whether this Zone is valid: * All fixed offset zones are valid. * @override * @type {boolean} */ get isValid() { return !0; } } class nce extends u1 { constructor(e) { super(), this.zoneName = e; } /** @override **/ get type() { return "invalid"; } /** @override **/ get name() { return this.zoneName; } /** @override **/ get isUniversal() { return !1; } /** @override **/ offsetName() { return null; } /** @override **/ formatOffset() { return ""; } /** @override **/ offset() { return NaN; } /** @override **/ equals() { return !1; } /** @override **/ get isValid() { return !1; } } function vu(t, e) { if (yt(t) || t === null) return e; if (t instanceof u1) return t; if (lce(t)) { const n = t.toLowerCase(); return n === "default" ? e : n === "local" || n === "system" ? Kk.instance : n === "utc" || n === "gmt" ? Gr.utcInstance : Gr.parseSpecifier(n) || xl.create(t); } else return Du(t) ? Gr.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new nce(t); } const A5 = { arab: "[٠-٩]", arabext: "[۰-۹]", bali: "[᭐-᭙]", beng: "[০-৯]", deva: "[०-९]", fullwide: "[0-9]", gujr: "[૦-૯]", hanidec: "[〇|一|二|三|四|五|六|七|八|九]", khmr: "[០-៩]", knda: "[೦-೯]", laoo: "[໐-໙]", limb: "[᥆-᥏]", mlym: "[൦-൯]", mong: "[᠐-᠙]", mymr: "[၀-၉]", orya: "[୦-୯]", tamldec: "[௦-௯]", telu: "[౦-౯]", thai: "[๐-๙]", tibt: "[༠-༩]", latn: "\\d" }, P7 = { arab: [1632, 1641], arabext: [1776, 1785], bali: [6992, 7001], beng: [2534, 2543], deva: [2406, 2415], fullwide: [65296, 65303], gujr: [2790, 2799], khmr: [6112, 6121], knda: [3302, 3311], laoo: [3792, 3801], limb: [6470, 6479], mlym: [3430, 3439], mong: [6160, 6169], mymr: [4160, 4169], orya: [2918, 2927], tamldec: [3046, 3055], telu: [3174, 3183], thai: [3664, 3673], tibt: [3872, 3881] }, ice = A5.hanidec.replace(/[\[|\]]/g, "").split(""); function rce(t) { let e = parseInt(t, 10); if (isNaN(e)) { e = ""; for (let n = 0; n < t.length; n++) { const i = t.charCodeAt(n); if (t[n].search(A5.hanidec) !== -1) e += ice.indexOf(t[n]); else for (const r in P7) { const [s, o] = P7[r]; i >= s && i <= o && (e += i - s); } } return parseInt(e, 10); } else return e; } let Bd = {}; function sce() { Bd = {}; } function Mo({ numberingSystem: t }, e = "") { const n = t || "latn"; return Bd[n] || (Bd[n] = {}), Bd[n][e] || (Bd[n][e] = new RegExp(`${A5[n]}${e}`)), Bd[n][e]; } let I7 = () => Date.now(), L7 = "system", R7 = null, j7 = null, F7 = null, B7 = 60, z7, W7 = null; class ti { /** * Get the callback for returning the current timestamp. * @type {function} */ static get now() { return I7; } /** * Set the callback for returning the current timestamp. * The function should return a number, which will be interpreted as an Epoch millisecond count * @type {function} * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time */ static set now(e) { I7 = e; } /** * Set the default time zone to create DateTimes in. Does not affect existing instances. * Use the value "system" to reset this value to the system's time zone. * @type {string} */ static set defaultZone(e) { L7 = e; } /** * Get the default time zone object currently used to create DateTimes. Does not affect existing instances. * The default value is the system's time zone (the one set on the machine that runs this code). * @type {Zone} */ static get defaultZone() { return vu(L7, Kk.instance); } /** * Get the default locale to create DateTimes with. Does not affect existing instances. * @type {string} */ static get defaultLocale() { return R7; } /** * Set the default locale to create DateTimes with. Does not affect existing instances. * @type {string} */ static set defaultLocale(e) { R7 = e; } /** * Get the default numbering system to create DateTimes with. Does not affect existing instances. * @type {string} */ static get defaultNumberingSystem() { return j7; } /** * Set the default numbering system to create DateTimes with. Does not affect existing instances. * @type {string} */ static set defaultNumberingSystem(e) { j7 = e; } /** * Get the default output calendar to create DateTimes with. Does not affect existing instances. * @type {string} */ static get defaultOutputCalendar() { return F7; } /** * Set the default output calendar to create DateTimes with. Does not affect existing instances. * @type {string} */ static set defaultOutputCalendar(e) { F7 = e; } /** * @typedef {Object} WeekSettings * @property {number} firstDay * @property {number} minimalDays * @property {number[]} weekend */ /** * @return {WeekSettings|null} */ static get defaultWeekSettings() { return W7; } /** * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and * how many days are required in the first week of a year. * Does not affect existing instances. * * @param {WeekSettings|null} weekSettings */ static set defaultWeekSettings(e) { W7 = g4(e); } /** * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. * @type {number} */ static get twoDigitCutoffYear() { return B7; } /** * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. * @type {number} * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950 * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50 * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50 */ static set twoDigitCutoffYear(e) { B7 = e % 100; } /** * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals * @type {boolean} */ static get throwOnInvalid() { return z7; } /** * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals * @type {boolean} */ static set throwOnInvalid(e) { z7 = e; } /** * Reset Luxon's global caches. Should only be necessary in testing scenarios. * @return {void} */ static resetCaches() { Gt.resetCache(), xl.resetCache(), ht.resetCache(), sce(); } } class Po { constructor(e, n) { this.reason = e, this.explanation = n; } toMessage() { return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason; } } const KB = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], JB = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; function ro(t, e) { return new Po( "unit out of range", `you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid` ); } function D5(t, e, n) { const i = new Date(Date.UTC(t, e - 1, n)); t < 100 && t >= 0 && i.setUTCFullYear(i.getUTCFullYear() - 1900); const r = i.getUTCDay(); return r === 0 ? 7 : r; } function ez(t, e, n) { return n + (c1(t) ? JB : KB)[e - 1]; } function tz(t, e) { const n = c1(t) ? JB : KB, i = n.findIndex((s) => s < e), r = e - n[i]; return { month: i + 1, day: r }; } function P5(t, e) { return (t - e + 7) % 7 + 1; } function uw(t, e = 4, n = 1) { const { year: i, month: r, day: s } = t, o = ez(i, r, s), a = P5(D5(i, r, s), n); let l = Math.floor((o - a + 14 - e) / 7), u; return l < 1 ? (u = i - 1, l = r0(u, e, n)) : l > r0(i, e, n) ? (u = i + 1, l = 1) : u = i, { weekYear: u, weekNumber: l, weekday: a, ...n2(t) }; } function H7(t, e = 4, n = 1) { const { weekYear: i, weekNumber: r, weekday: s } = t, o = P5(D5(i, 1, e), n), a = uh(i); let l = r * 7 + s - o - 7 + e, u; l < 1 ? (u = i - 1, l += uh(u)) : l > a ? (u = i + 1, l -= uh(i)) : u = i; const { month: f, day: d } = tz(u, l); return { year: u, month: f, day: d, ...n2(t) }; } function I3(t) { const { year: e, month: n, day: i } = t, r = ez(e, n, i); return { year: e, ordinal: r, ...n2(t) }; } function Q7(t) { const { year: e, ordinal: n } = t, { month: i, day: r } = tz(e, n); return { year: e, month: i, day: r, ...n2(t) }; } function U7(t, e) { if (!yt(t.localWeekday) || !yt(t.localWeekNumber) || !yt(t.localWeekYear)) { if (!yt(t.weekday) || !yt(t.weekNumber) || !yt(t.weekYear)) throw new Gd( "Cannot mix locale-based week fields with ISO-based week fields" ); return yt(t.localWeekday) || (t.weekday = t.localWeekday), yt(t.localWeekNumber) || (t.weekNumber = t.localWeekNumber), yt(t.localWeekYear) || (t.weekYear = t.localWeekYear), delete t.localWeekday, delete t.localWeekNumber, delete t.localWeekYear, { minDaysInFirstWeek: e.getMinDaysInFirstWeek(), startOfWeek: e.getStartOfWeek() }; } else return { minDaysInFirstWeek: 4, startOfWeek: 1 }; } function oce(t, e = 4, n = 1) { const i = Jk(t.weekYear), r = so( t.weekNumber, 1, r0(t.weekYear, e, n) ), s = so(t.weekday, 1, 7); return i ? r ? s ? !1 : ro("weekday", t.weekday) : ro("week", t.weekNumber) : ro("weekYear", t.weekYear); } function ace(t) { const e = Jk(t.year), n = so(t.ordinal, 1, uh(t.year)); return e ? n ? !1 : ro("ordinal", t.ordinal) : ro("year", t.year); } function nz(t) { const e = Jk(t.year), n = so(t.month, 1, 12), i = so(t.day, 1, cw(t.year, t.month)); return e ? n ? i ? !1 : ro("day", t.day) : ro("month", t.month) : ro("year", t.year); } function iz(t) { const { hour: e, minute: n, second: i, millisecond: r } = t, s = so(e, 0, 23) || e === 24 && n === 0 && i === 0 && r === 0, o = so(n, 0, 59), a = so(i, 0, 59), l = so(r, 0, 999); return s ? o ? a ? l ? !1 : ro("millisecond", r) : ro("second", i) : ro("minute", n) : ro("hour", e); } function yt(t) { return typeof t > "u"; } function Du(t) { return typeof t == "number"; } function Jk(t) { return typeof t == "number" && t % 1 === 0; } function lce(t) { return typeof t == "string"; } function uce(t) { return Object.prototype.toString.call(t) === "[object Date]"; } function rz() { try { return typeof Intl < "u" && !!Intl.RelativeTimeFormat; } catch { return !1; } } function sz() { try { return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype); } catch { return !1; } } function cce(t) { return Array.isArray(t) ? t : [t]; } function Z7(t, e, n) { if (t.length !== 0) return t.reduce((i, r) => { const s = [e(r), r]; return i && n(i[0], s[0]) === i[0] ? i : s; }, null)[1]; } function fce(t, e) { return e.reduce((n, i) => (n[i] = t[i], n), {}); } function Ch(t, e) { return Object.prototype.hasOwnProperty.call(t, e); } function g4(t) { if (t == null) return null; if (typeof t != "object") throw new Sr("Week settings must be an object"); if (!so(t.firstDay, 1, 7) || !so(t.minimalDays, 1, 7) || !Array.isArray(t.weekend) || t.weekend.some((e) => !so(e, 1, 7))) throw new Sr("Invalid week settings"); return { firstDay: t.firstDay, minimalDays: t.minimalDays, weekend: Array.from(t.weekend) }; } function so(t, e, n) { return Jk(t) && t >= e && t <= n; } function dce(t, e) { return t - e * Math.floor(t / e); } function yi(t, e = 2) { const n = t < 0; let i; return n ? i = "-" + ("" + -t).padStart(e, "0") : i = ("" + t).padStart(e, "0"), i; } function hu(t) { if (!(yt(t) || t === null || t === "")) return parseInt(t, 10); } function Ac(t) { if (!(yt(t) || t === null || t === "")) return parseFloat(t); } function I5(t) { if (!(yt(t) || t === null || t === "")) { const e = parseFloat("0." + t) * 1e3; return Math.floor(e); } } function L5(t, e, n = !1) { const i = 10 ** e; return (n ? Math.trunc : Math.round)(t * i) / i; } function c1(t) { return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0); } function uh(t) { return c1(t) ? 366 : 365; } function cw(t, e) { const n = dce(e - 1, 12) + 1, i = t + (e - n) / 12; return n === 2 ? c1(i) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1]; } function e2(t) { let e = Date.UTC( t.year, t.month - 1, t.day, t.hour, t.minute, t.second, t.millisecond ); return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e; } function q7(t, e, n) { return -P5(D5(t, 1, e), n) + e - 1; } function r0(t, e = 4, n = 1) { const i = q7(t, e, n), r = q7(t + 1, e, n); return (uh(t) - i + r) / 7; } function v4(t) { return t > 99 ? t : t > ti.twoDigitCutoffYear ? 1900 + t : 2e3 + t; } function oz(t, e, n, i = null) { const r = new Date(t), s = { hourCycle: "h23", year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit" }; i && (s.timeZone = i); const o = { timeZoneName: e, ...s }, a = new Intl.DateTimeFormat(n, o).formatToParts(r).find((l) => l.type.toLowerCase() === "timezonename"); return a ? a.value : null; } function t2(t, e) { let n = parseInt(t, 10); Number.isNaN(n) && (n = 0); const i = parseInt(e, 10) || 0, r = n < 0 || Object.is(n, -0) ? -i : i; return n * 60 + r; } function az(t) { const e = Number(t); if (typeof t == "boolean" || t === "" || Number.isNaN(e)) throw new Sr(`Invalid unit value ${t}`); return e; } function fw(t, e) { const n = {}; for (const i in t) if (Ch(t, i)) { const r = t[i]; if (r == null) continue; n[e(i)] = az(r); } return n; } function Og(t, e) { const n = Math.trunc(Math.abs(t / 60)), i = Math.trunc(Math.abs(t % 60)), r = t >= 0 ? "+" : "-"; switch (e) { case "short": return `${r}${yi(n, 2)}:${yi(i, 2)}`; case "narrow": return `${r}${n}${i > 0 ? `:${i}` : ""}`; case "techie": return `${r}${yi(n, 2)}${yi(i, 2)}`; default: throw new RangeError(`Value format ${e} is out of range for property format`); } } function n2(t) { return fce(t, ["hour", "minute", "second", "millisecond"]); } const hce = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], lz = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], pce = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; function uz(t) { switch (t) { case "narrow": return [...pce]; case "short": return [...lz]; case "long": return [...hce]; case "numeric": return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; case "2-digit": return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; default: return null; } } const cz = [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], fz = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], mce = ["M", "T", "W", "T", "F", "S", "S"]; function dz(t) { switch (t) { case "narrow": return [...mce]; case "short": return [...fz]; case "long": return [...cz]; case "numeric": return ["1", "2", "3", "4", "5", "6", "7"]; default: return null; } } const hz = ["AM", "PM"], gce = ["Before Christ", "Anno Domini"], vce = ["BC", "AD"], bce = ["B", "A"]; function pz(t) { switch (t) { case "narrow": return [...bce]; case "short": return [...vce]; case "long": return [...gce]; default: return null; } } function yce(t) { return hz[t.hour < 12 ? 0 : 1]; } function wce(t, e) { return dz(e)[t.weekday - 1]; } function kce(t, e) { return uz(e)[t.month - 1]; } function xce(t, e) { return pz(e)[t.year < 0 ? 0 : 1]; } function _ce(t, e, n = "always", i = !1) { const r = { years: ["year", "yr."], quarters: ["quarter", "qtr."], months: ["month", "mo."], weeks: ["week", "wk."], days: ["day", "day", "days"], hours: ["hour", "hr."], minutes: ["minute", "min."], seconds: ["second", "sec."] }, s = ["hours", "minutes", "seconds"].indexOf(t) === -1; if (n === "auto" && s) { const d = t === "days"; switch (e) { case 1: return d ? "tomorrow" : `next ${r[t][0]}`; case -1: return d ? "yesterday" : `last ${r[t][0]}`; case 0: return d ? "today" : `this ${r[t][0]}`; } } const o = Object.is(e, -0) || e < 0, a = Math.abs(e), l = a === 1, u = r[t], f = i ? l ? u[1] : u[2] || u[1] : l ? r[t][0] : t; return o ? `${a} ${f} ago` : `in ${a} ${f}`; } function Y7(t, e) { let n = ""; for (const i of t) i.literal ? n += i.val : n += e(i.val); return n; } const Oce = { D: lw, DD: DB, DDD: PB, DDDD: IB, t: LB, tt: RB, ttt: jB, tttt: FB, T: BB, TT: zB, TTT: WB, TTTT: HB, f: QB, ff: ZB, fff: YB, ffff: XB, F: UB, FF: qB, FFF: VB, FFFF: GB }; class $r { static create(e, n = {}) { return new $r(e, n); } static parseFormat(e) { let n = null, i = "", r = !1; const s = []; for (let o = 0; o < e.length; o++) { const a = e.charAt(o); a === "'" ? (i.length > 0 && s.push({ literal: r || /^\s+$/.test(i), val: i }), n = null, i = "", r = !r) : r || a === n ? i += a : (i.length > 0 && s.push({ literal: /^\s+$/.test(i), val: i }), i = a, n = a); } return i.length > 0 && s.push({ literal: r || /^\s+$/.test(i), val: i }), s; } static macroTokenToFormatOpts(e) { return Oce[e]; } constructor(e, n) { this.opts = n, this.loc = e, this.systemLoc = null; } formatWithSystemDefault(e, n) { return this.systemLoc === null && (this.systemLoc = this.loc.redefaultToSystem()), this.systemLoc.dtFormatter(e, { ...this.opts, ...n }).format(); } dtFormatter(e, n = {}) { return this.loc.dtFormatter(e, { ...this.opts, ...n }); } formatDateTime(e, n) { return this.dtFormatter(e, n).format(); } formatDateTimeParts(e, n) { return this.dtFormatter(e, n).formatToParts(); } formatInterval(e, n) { return this.dtFormatter(e.start, n).dtf.formatRange(e.start.toJSDate(), e.end.toJSDate()); } resolvedOptions(e, n) { return this.dtFormatter(e, n).resolvedOptions(); } num(e, n = 0) { if (this.opts.forceSimple) return yi(e, n); const i = { ...this.opts }; return n > 0 && (i.padTo = n), this.loc.numberFormatter(i).format(e); } formatDateTimeFromString(e, n) { const i = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", s = (m, g) => this.loc.extract(e, m, g), o = (m) => e.isOffsetFixed && e.offset === 0 && m.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, m.format) : "", a = () => i ? yce(e) : s({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (m, g) => i ? kce(e, m) : s(g ? { month: m } : { month: m, day: "numeric" }, "month"), u = (m, g) => i ? wce(e, m) : s( g ? { weekday: m } : { weekday: m, month: "long", day: "numeric" }, "weekday" ), f = (m) => { const g = $r.macroTokenToFormatOpts(m); return g ? this.formatWithSystemDefault(e, g) : m; }, d = (m) => i ? xce(e, m) : s({ era: m }, "era"), h = (m) => { switch (m) { case "S": return this.num(e.millisecond); case "u": case "SSS": return this.num(e.millisecond, 3); case "s": return this.num(e.second); case "ss": return this.num(e.second, 2); case "uu": return this.num(Math.floor(e.millisecond / 10), 2); case "uuu": return this.num(Math.floor(e.millisecond / 100)); case "m": return this.num(e.minute); case "mm": return this.num(e.minute, 2); case "h": return this.num(e.hour % 12 === 0 ? 12 : e.hour % 12); case "hh": return this.num(e.hour % 12 === 0 ? 12 : e.hour % 12, 2); case "H": return this.num(e.hour); case "HH": return this.num(e.hour, 2); case "Z": return o({ format: "narrow", allowZ: this.opts.allowZ }); case "ZZ": return o({ format: "short", allowZ: this.opts.allowZ }); case "ZZZ": return o({ format: "techie", allowZ: this.opts.allowZ }); case "ZZZZ": return e.zone.offsetName(e.ts, { format: "short", locale: this.loc.locale }); case "ZZZZZ": return e.zone.offsetName(e.ts, { format: "long", locale: this.loc.locale }); case "z": return e.zoneName; case "a": return a(); case "d": return r ? s({ day: "numeric" }, "day") : this.num(e.day); case "dd": return r ? s({ day: "2-digit" }, "day") : this.num(e.day, 2); case "c": return this.num(e.weekday); case "ccc": return u("short", !0); case "cccc": return u("long", !0); case "ccccc": return u("narrow", !0); case "E": return this.num(e.weekday); case "EEE": return u("short", !1); case "EEEE": return u("long", !1); case "EEEEE": return u("narrow", !1); case "L": return r ? s({ month: "numeric", day: "numeric" }, "month") : this.num(e.month); case "LL": return r ? s({ month: "2-digit", day: "numeric" }, "month") : this.num(e.month, 2); case "LLL": return l("short", !0); case "LLLL": return l("long", !0); case "LLLLL": return l("narrow", !0); case "M": return r ? s({ month: "numeric" }, "month") : this.num(e.month); case "MM": return r ? s({ month: "2-digit" }, "month") : this.num(e.month, 2); case "MMM": return l("short", !1); case "MMMM": return l("long", !1); case "MMMMM": return l("narrow", !1); case "y": return r ? s({ year: "numeric" }, "year") : this.num(e.year); case "yy": return r ? s({ year: "2-digit" }, "year") : this.num(e.year.toString().slice(-2), 2); case "yyyy": return r ? s({ year: "numeric" }, "year") : this.num(e.year, 4); case "yyyyyy": return r ? s({ year: "numeric" }, "year") : this.num(e.year, 6); case "G": return d("short"); case "GG": return d("long"); case "GGGGG": return d("narrow"); case "kk": return this.num(e.weekYear.toString().slice(-2), 2); case "kkkk": return this.num(e.weekYear, 4); case "W": return this.num(e.weekNumber); case "WW": return this.num(e.weekNumber, 2); case "n": return this.num(e.localWeekNumber); case "nn": return this.num(e.localWeekNumber, 2); case "ii": return this.num(e.localWeekYear.toString().slice(-2), 2); case "iiii": return this.num(e.localWeekYear, 4); case "o": return this.num(e.ordinal); case "ooo": return this.num(e.ordinal, 3); case "q": return this.num(e.quarter); case "qq": return this.num(e.quarter, 2); case "X": return this.num(Math.floor(e.ts / 1e3)); case "x": return this.num(e.ts); default: return f(m); } }; return Y7($r.parseFormat(n), h); } formatDurationFromString(e, n) { const i = (l) => { switch (l[0]) { case "S": return "millisecond"; case "s": return "second"; case "m": return "minute"; case "h": return "hour"; case "d": return "day"; case "w": return "week"; case "M": return "month"; case "y": return "year"; default: return null; } }, r = (l) => (u) => { const f = i(u); return f ? this.num(l.get(f), u.length) : u; }, s = $r.parseFormat(n), o = s.reduce( (l, { literal: u, val: f }) => u ? l : l.concat(f), [] ), a = e.shiftTo(...o.map(i).filter((l) => l)); return Y7(s, r(a)); } } const mz = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; function ep(...t) { const e = t.reduce((n, i) => n + i.source, ""); return RegExp(`^${e}$`); } function tp(...t) { return (e) => t.reduce( ([n, i, r], s) => { const [o, a, l] = s(e, r); return [{ ...n, ...o }, a || i, l]; }, [{}, null, 1] ).slice(0, 2); } function np(t, ...e) { if (t == null) return [null, null]; for (const [n, i] of e) { const r = n.exec(t); if (r) return i(r); } return [null, null]; } function gz(...t) { return (e, n) => { const i = {}; let r; for (r = 0; r < t.length; r++) i[t[r]] = hu(e[n + r]); return [i, null, n + r]; }; } const vz = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Sce = `(?:${vz.source}?(?:\\[(${mz.source})\\])?)?`, R5 = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, bz = RegExp(`${R5.source}${Sce}`), j5 = RegExp(`(?:T${bz.source})?`), Cce = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Ece = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Tce = /(\d{4})-?(\d{3})/, $ce = gz("weekYear", "weekNumber", "weekDay"), Mce = gz("year", "ordinal"), Nce = /(\d{4})-(\d\d)-(\d\d)/, yz = RegExp( `${R5.source} ?(?:${vz.source}|(${mz.source}))?` ), Ace = RegExp(`(?: ${yz.source})?`); function ch(t, e, n) { const i = t[e]; return yt(i) ? n : hu(i); } function Dce(t, e) { return [{ year: ch(t, e), month: ch(t, e + 1, 1), day: ch(t, e + 2, 1) }, null, e + 3]; } function ip(t, e) { return [{ hours: ch(t, e, 0), minutes: ch(t, e + 1, 0), seconds: ch(t, e + 2, 0), milliseconds: I5(t[e + 3]) }, null, e + 4]; } function f1(t, e) { const n = !t[e] && !t[e + 1], i = t2(t[e + 1], t[e + 2]), r = n ? null : Gr.instance(i); return [{}, r, e + 3]; } function d1(t, e) { const n = t[e] ? xl.create(t[e]) : null; return [{}, n, e + 1]; } const Pce = RegExp(`^T?${R5.source}$`), Ice = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; function Lce(t) { const [e, n, i, r, s, o, a, l, u] = t, f = e[0] === "-", d = l && l[0] === "-", h = (m, g = !1) => m !== void 0 && (g || m && f) ? -m : m; return [ { years: h(Ac(n)), months: h(Ac(i)), weeks: h(Ac(r)), days: h(Ac(s)), hours: h(Ac(o)), minutes: h(Ac(a)), seconds: h(Ac(l), l === "-0"), milliseconds: h(I5(u), d) } ]; } const Rce = { GMT: 0, EDT: -4 * 60, EST: -5 * 60, CDT: -5 * 60, CST: -6 * 60, MDT: -6 * 60, MST: -7 * 60, PDT: -7 * 60, PST: -8 * 60 }; function F5(t, e, n, i, r, s, o) { const a = { year: e.length === 2 ? v4(hu(e)) : hu(e), month: lz.indexOf(n) + 1, day: hu(i), hour: hu(r), minute: hu(s) }; return o && (a.second = hu(o)), t && (a.weekday = t.length > 3 ? cz.indexOf(t) + 1 : fz.indexOf(t) + 1), a; } const jce = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; function Fce(t) { const [ , e, n, i, r, s, o, a, l, u, f, d ] = t, h = F5(e, r, i, n, s, o, a); let m; return l ? m = Rce[l] : u ? m = 0 : m = t2(f, d), [h, new Gr(m)]; } function Bce(t) { return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); } const zce = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, Wce = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, Hce = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; function V7(t) { const [, e, n, i, r, s, o, a] = t; return [F5(e, r, i, n, s, o, a), Gr.utcInstance]; } function Qce(t) { const [, e, n, i, r, s, o, a] = t; return [F5(e, a, n, i, r, s, o), Gr.utcInstance]; } const Uce = ep(Cce, j5), Zce = ep(Ece, j5), qce = ep(Tce, j5), Yce = ep(bz), wz = tp( Dce, ip, f1, d1 ), Vce = tp( $ce, ip, f1, d1 ), Xce = tp( Mce, ip, f1, d1 ), Gce = tp( ip, f1, d1 ); function Kce(t) { return np( t, [Uce, wz], [Zce, Vce], [qce, Xce], [Yce, Gce] ); } function Jce(t) { return np(Bce(t), [jce, Fce]); } function efe(t) { return np( t, [zce, V7], [Wce, V7], [Hce, Qce] ); } function tfe(t) { return np(t, [Ice, Lce]); } const nfe = tp(ip); function ife(t) { return np(t, [Pce, nfe]); } const rfe = ep(Nce, Ace), sfe = ep(yz), ofe = tp( ip, f1, d1 ); function afe(t) { return np( t, [rfe, wz], [sfe, ofe] ); } const X7 = "Invalid Duration", kz = { weeks: { days: 7, hours: 7 * 24, minutes: 7 * 24 * 60, seconds: 7 * 24 * 60 * 60, milliseconds: 7 * 24 * 60 * 60 * 1e3 }, days: { hours: 24, minutes: 24 * 60, seconds: 24 * 60 * 60, milliseconds: 24 * 60 * 60 * 1e3 }, hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 }, minutes: { seconds: 60, milliseconds: 60 * 1e3 }, seconds: { milliseconds: 1e3 } }, lfe = { years: { quarters: 4, months: 12, weeks: 52, days: 365, hours: 365 * 24, minutes: 365 * 24 * 60, seconds: 365 * 24 * 60 * 60, milliseconds: 365 * 24 * 60 * 60 * 1e3 }, quarters: { months: 3, weeks: 13, days: 91, hours: 91 * 24, minutes: 91 * 24 * 60, seconds: 91 * 24 * 60 * 60, milliseconds: 91 * 24 * 60 * 60 * 1e3 }, months: { weeks: 4, days: 30, hours: 30 * 24, minutes: 30 * 24 * 60, seconds: 30 * 24 * 60 * 60, milliseconds: 30 * 24 * 60 * 60 * 1e3 }, ...kz }, Ks = 146097 / 400, Sd = 146097 / 4800, ufe = { years: { quarters: 4, months: 12, weeks: Ks / 7, days: Ks, hours: Ks * 24, minutes: Ks * 24 * 60, seconds: Ks * 24 * 60 * 60, milliseconds: Ks * 24 * 60 * 60 * 1e3 }, quarters: { months: 3, weeks: Ks / 28, days: Ks / 4, hours: Ks * 24 / 4, minutes: Ks * 24 * 60 / 4, seconds: Ks * 24 * 60 * 60 / 4, milliseconds: Ks * 24 * 60 * 60 * 1e3 / 4 }, months: { weeks: Sd / 7, days: Sd, hours: Sd * 24, minutes: Sd * 24 * 60, seconds: Sd * 24 * 60 * 60, milliseconds: Sd * 24 * 60 * 60 * 1e3 }, ...kz }, Zc = [ "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds" ], cfe = Zc.slice(0).reverse(); function ru(t, e, n = !1) { const i = { values: n ? e.values : { ...t.values, ...e.values || {} }, loc: t.loc.clone(e.loc), conversionAccuracy: e.conversionAccuracy || t.conversionAccuracy, matrix: e.matrix || t.matrix }; return new Ht(i); } function xz(t, e) { let n = e.milliseconds ?? 0; for (const i of cfe.slice(1)) e[i] && (n += e[i] * t[i].milliseconds); return n; } function G7(t, e) { const n = xz(t, e) < 0 ? -1 : 1; Zc.reduceRight((i, r) => { if (yt(e[r])) return i; if (i) { const s = e[i] * n, o = t[r][i], a = Math.floor(s / o); e[r] += a * n, e[i] -= a * o * n; } return r; }, null), Zc.reduce((i, r) => { if (yt(e[r])) return i; if (i) { const s = e[i] % 1; e[i] -= s, e[r] += s * t[i][r]; } return r; }, null); } function ffe(t) { const e = {}; for (const [n, i] of Object.entries(t)) i !== 0 && (e[n] = i); return e; } class Ht { /** * @private */ constructor(e) { const n = e.conversionAccuracy === "longterm" || !1; let i = n ? ufe : lfe; e.matrix && (i = e.matrix), this.values = e.values, this.loc = e.loc || Gt.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = i, this.isLuxonDuration = !0; } /** * Create Duration from a number of milliseconds. * @param {number} count of milliseconds * @param {Object} opts - options for parsing * @param {string} [opts.locale='en-US'] - the locale to use * @param {string} opts.numberingSystem - the numbering system to use * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use * @return {Duration} */ static fromMillis(e, n) { return Ht.fromObject({ milliseconds: e }, n); } /** * Create a Duration from a JavaScript object with keys like 'years' and 'hours'. * If this object is empty then a zero milliseconds duration is returned. * @param {Object} obj - the object to create the DateTime from * @param {number} obj.years * @param {number} obj.quarters * @param {number} obj.months * @param {number} obj.weeks * @param {number} obj.days * @param {number} obj.hours * @param {number} obj.minutes * @param {number} obj.seconds * @param {number} obj.milliseconds * @param {Object} [opts=[]] - options for creating this Duration * @param {string} [opts.locale='en-US'] - the locale to use * @param {string} opts.numberingSystem - the numbering system to use * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use * @param {string} [opts.matrix=Object] - the custom conversion system to use * @return {Duration} */ static fromObject(e, n = {}) { if (e == null || typeof e != "object") throw new Sr( `Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}` ); return new Ht({ values: fw(e, Ht.normalizeUnit), loc: Gt.fromObject(n), conversionAccuracy: n.conversionAccuracy, matrix: n.matrix }); } /** * Create a Duration from DurationLike. * * @param {Object | number | Duration} durationLike * One of: * - object with keys like 'years' and 'hours'. * - number representing milliseconds * - Duration instance * @return {Duration} */ static fromDurationLike(e) { if (Du(e)) return Ht.fromMillis(e); if (Ht.isDuration(e)) return e; if (typeof e == "object") return Ht.fromObject(e); throw new Sr( `Unknown duration argument ${e} of type ${typeof e}` ); } /** * Create a Duration from an ISO 8601 duration string. * @param {string} text - text to parse * @param {Object} opts - options for parsing * @param {string} [opts.locale='en-US'] - the locale to use * @param {string} opts.numberingSystem - the numbering system to use * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use * @param {string} [opts.matrix=Object] - the preset conversion system to use * @see https://en.wikipedia.org/wiki/ISO_8601#Durations * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } * @return {Duration} */ static fromISO(e, n) { const [i] = tfe(e); return i ? Ht.fromObject(i, n) : Ht.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`); } /** * Create a Duration from an ISO 8601 time string. * @param {string} text - text to parse * @param {Object} opts - options for parsing * @param {string} [opts.locale='en-US'] - the locale to use * @param {string} opts.numberingSystem - the numbering system to use * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use * @param {string} [opts.matrix=Object] - the conversion system to use * @see https://en.wikipedia.org/wiki/ISO_8601#Times * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 } * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } * @return {Duration} */ static fromISOTime(e, n) { const [i] = ife(e); return i ? Ht.fromObject(i, n) : Ht.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`); } /** * Create an invalid Duration. * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information * @return {Duration} */ static invalid(e, n = null) { if (!e) throw new Sr("need to specify a reason the Duration is invalid"); const i = e instanceof Po ? e : new Po(e, n); if (ti.throwOnInvalid) throw new Iue(i); return new Ht({ invalid: i }); } /** * @private */ static normalizeUnit(e) { const n = { year: "years", years: "years", quarter: "quarters", quarters: "quarters", month: "months", months: "months", week: "weeks", weeks: "weeks", day: "days", days: "days", hour: "hours", hours: "hours", minute: "minutes", minutes: "minutes", second: "seconds", seconds: "seconds", millisecond: "milliseconds", milliseconds: "milliseconds" }[e && e.toLowerCase()]; if (!n) throw new AB(e); return n; } /** * Check if an object is a Duration. Works across context boundaries * @param {object} o * @return {boolean} */ static isDuration(e) { return e && e.isLuxonDuration || !1; } /** * Get the locale of a Duration, such 'en-GB' * @type {string} */ get locale() { return this.isValid ? this.loc.locale : null; } /** * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration * * @type {string} */ get numberingSystem() { return this.isValid ? this.loc.numberingSystem : null; } /** * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: * * `S` for milliseconds * * `s` for seconds * * `m` for minutes * * `h` for hours * * `d` for days * * `w` for weeks * * `M` for months * * `y` for years * Notes: * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits * * Tokens can be escaped by wrapping with single quotes. * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting. * @param {string} fmt - the format string * @param {Object} opts - options * @param {boolean} [opts.floor=true] - floor numerical values * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" * @return {string} */ toFormat(e, n = {}) { const i = { ...n, floor: n.round !== !1 && n.floor !== !1 }; return this.isValid ? $r.create(this.loc, i).formatDurationFromString(this, e) : X7; } /** * Returns a string representation of a Duration with all units included. * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`. * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor. * @example * ```js * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 }) * dur.toHuman() //=> '1 day, 5 hours, 6 minutes' * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes' * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min' * ``` */ toHuman(e = {}) { if (!this.isValid) return X7; const n = Zc.map((i) => { const r = this.values[i]; return yt(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: i.slice(0, -1) }).format(r); }).filter((i) => i); return this.loc.listFormatter({ type: "conjunction", style: e.listStyle || "narrow", ...e }).format(n); } /** * Returns a JavaScript object with this Duration's values. * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } * @return {Object} */ toObject() { return this.isValid ? { ...this.values } : {}; } /** * Returns an ISO 8601-compliant string representation of this Duration. * @see https://en.wikipedia.org/wiki/ISO_8601#Durations * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' * @return {string} */ toISO() { if (!this.isValid) return null; let e = "P"; return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += L5(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e; } /** * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day. * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours. * @see https://en.wikipedia.org/wiki/ISO_8601#Times * @param {Object} opts - options * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 * @param {boolean} [opts.includePrefix=false] - include the `T` prefix * @param {string} [opts.format='extended'] - choose between the basic and extended format * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000' * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00' * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00' * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000' * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000' * @return {string} */ toISOTime(e = {}) { if (!this.isValid) return null; const n = this.toMillis(); return n < 0 || n >= 864e5 ? null : (e = { suppressMilliseconds: !1, suppressSeconds: !1, includePrefix: !1, format: "extended", ...e, includeOffset: !1 }, ht.fromMillis(n, { zone: "UTC" }).toISOTime(e)); } /** * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. * @return {string} */ toJSON() { return this.toISO(); } /** * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. * @return {string} */ toString() { return this.toISO(); } /** * Returns a string representation of this Duration appropriate for the REPL. * @return {string} */ [Symbol.for("nodejs.util.inspect.custom")]() { return this.isValid ? `Duration { values: ${JSON.stringify(this.values)} }` : `Duration { Invalid, reason: ${this.invalidReason} }`; } /** * Returns an milliseconds value of this Duration. * @return {number} */ toMillis() { return this.isValid ? xz(this.matrix, this.values) : NaN; } /** * Returns an milliseconds value of this Duration. Alias of {@link toMillis} * @return {number} */ valueOf() { return this.toMillis(); } /** * Make this Duration longer by the specified amount. Return a newly-constructed Duration. * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() * @return {Duration} */ plus(e) { if (!this.isValid) return this; const n = Ht.fromDurationLike(e), i = {}; for (const r of Zc) (Ch(n.values, r) || Ch(this.values, r)) && (i[r] = n.get(r) + this.get(r)); return ru(this, { values: i }, !0); } /** * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() * @return {Duration} */ minus(e) { if (!this.isValid) return this; const n = Ht.fromDurationLike(e); return this.plus(n.negate()); } /** * Scale this Duration by the specified amount. Return a newly-constructed Duration. * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 } * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 } * @return {Duration} */ mapUnits(e) { if (!this.isValid) return this; const n = {}; for (const i of Object.keys(this.values)) n[i] = az(e(this.values[i], i)); return ru(this, { values: n }, !0); } /** * Get the value of unit. * @param {string} unit - a unit such as 'minute' or 'day' * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2 * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0 * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3 * @return {number} */ get(e) { return this[Ht.normalizeUnit(e)]; } /** * "Set" the values of specified units. Return a newly-constructed Duration. * @param {Object} values - a mapping of units to numbers * @example dur.set({ years: 2017 }) * @example dur.set({ hours: 8, minutes: 30 }) * @return {Duration} */ set(e) { if (!this.isValid) return this; const n = { ...this.values, ...fw(e, Ht.normalizeUnit) }; return ru(this, { values: n }); } /** * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. * @example dur.reconfigure({ locale: 'en-GB' }) * @return {Duration} */ reconfigure({ locale: e, numberingSystem: n, conversionAccuracy: i, matrix: r } = {}) { const o = { loc: this.loc.clone({ locale: e, numberingSystem: n }), matrix: r, conversionAccuracy: i }; return ru(this, o); } /** * Return the length of the duration in the specified unit. * @param {string} unit - a unit such as 'minutes' or 'days' * @example Duration.fromObject({years: 1}).as('days') //=> 365 * @example Duration.fromObject({years: 1}).as('months') //=> 12 * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 * @return {number} */ as(e) { return this.isValid ? this.shiftTo(e).get(e) : NaN; } /** * Reduce this Duration to its canonical representation in its current units. * Assuming the overall value of the Duration is positive, this means: * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example) * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise * the overall value would be negative, see third example) * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example) * * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`. * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 } * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 } * @return {Duration} */ normalize() { if (!this.isValid) return this; const e = this.toObject(); return G7(this.matrix, e), ru(this, { values: e }, !0); } /** * Rescale units to its largest representation * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 } * @return {Duration} */ rescale() { if (!this.isValid) return this; const e = ffe(this.normalize().shiftToAll().toObject()); return ru(this, { values: e }, !0); } /** * Convert this Duration into its representation in a different set of units. * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } * @return {Duration} */ shiftTo(...e) { if (!this.isValid) return this; if (e.length === 0) return this; e = e.map((o) => Ht.normalizeUnit(o)); const n = {}, i = {}, r = this.toObject(); let s; for (const o of Zc) if (e.indexOf(o) >= 0) { s = o; let a = 0; for (const u in i) a += this.matrix[u][o] * i[u], i[u] = 0; Du(r[o]) && (a += r[o]); const l = Math.trunc(a); n[o] = l, i[o] = (a * 1e3 - l * 1e3) / 1e3; } else Du(r[o]) && (i[o] = r[o]); for (const o in i) i[o] !== 0 && (n[s] += o === s ? i[o] : i[o] / this.matrix[s][o]); return G7(this.matrix, n), ru(this, { values: n }, !0); } /** * Shift this Duration to all available units. * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") * @return {Duration} */ shiftToAll() { return this.isValid ? this.shiftTo( "years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds" ) : this; } /** * Return the negative of this Duration. * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } * @return {Duration} */ negate() { if (!this.isValid) return this; const e = {}; for (const n of Object.keys(this.values)) e[n] = this.values[n] === 0 ? 0 : -this.values[n]; return ru(this, { values: e }, !0); } /** * Get the years. * @type {number} */ get years() { return this.isValid ? this.values.years || 0 : NaN; } /** * Get the quarters. * @type {number} */ get quarters() { return this.isValid ? this.values.quarters || 0 : NaN; } /** * Get the months. * @type {number} */ get months() { return this.isValid ? this.values.months || 0 : NaN; } /** * Get the weeks * @type {number} */ get weeks() { return this.isValid ? this.values.weeks || 0 : NaN; } /** * Get the days. * @type {number} */ get days() { return this.isValid ? this.values.days || 0 : NaN; } /** * Get the hours. * @type {number} */ get hours() { return this.isValid ? this.values.hours || 0 : NaN; } /** * Get the minutes. * @type {number} */ get minutes() { return this.isValid ? this.values.minutes || 0 : NaN; } /** * Get the seconds. * @return {number} */ get seconds() { return this.isValid ? this.values.seconds || 0 : NaN; } /** * Get the milliseconds. * @return {number} */ get milliseconds() { return this.isValid ? this.values.milliseconds || 0 : NaN; } /** * Returns whether the Duration is invalid. Invalid durations are returned by diff operations * on invalid DateTimes or Intervals. * @return {boolean} */ get isValid() { return this.invalid === null; } /** * Returns an error code if this Duration became invalid, or null if the Duration is valid * @return {string} */ get invalidReason() { return this.invalid ? this.invalid.reason : null; } /** * Returns an explanation of why this Duration became invalid, or null if the Duration is valid * @type {string} */ get invalidExplanation() { return this.invalid ? this.invalid.explanation : null; } /** * Equality check * Two Durations are equal iff they have the same units and the same values for each unit. * @param {Duration} other * @return {boolean} */ equals(e) { if (!this.isValid || !e.isValid || !this.loc.equals(e.loc)) return !1; function n(i, r) { return i === void 0 || i === 0 ? r === void 0 || r === 0 : i === r; } for (const i of Zc) if (!n(this.values[i], e.values[i])) return !1; return !0; } } const Cd = "Invalid Interval"; function dfe(t, e) { return !t || !t.isValid ? ei.invalid("missing or invalid start") : !e || !e.isValid ? ei.invalid("missing or invalid end") : e < t ? ei.invalid( "end before start", `The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}` ) : null; } class ei { /** * @private */ constructor(e) { this.s = e.start, this.e = e.end, this.invalid = e.invalid || null, this.isLuxonInterval = !0; } /** * Create an invalid Interval. * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information * @return {Interval} */ static invalid(e, n = null) { if (!e) throw new Sr("need to specify a reason the Interval is invalid"); const i = e instanceof Po ? e : new Po(e, n); if (ti.throwOnInvalid) throw new Pue(i); return new ei({ invalid: i }); } /** * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. * @param {DateTime|Date|Object} start * @param {DateTime|Date|Object} end * @return {Interval} */ static fromDateTimes(e, n) { const i = Cm(e), r = Cm(n), s = dfe(i, r); return s ?? new ei({ start: i, end: r }); } /** * Create an Interval from a start DateTime and a Duration to extend to. * @param {DateTime|Date|Object} start * @param {Duration|Object|number} duration - the length of the Interval. * @return {Interval} */ static after(e, n) { const i = Ht.fromDurationLike(n), r = Cm(e); return ei.fromDateTimes(r, r.plus(i)); } /** * Create an Interval from an end DateTime and a Duration to extend backwards to. * @param {DateTime|Date|Object} end * @param {Duration|Object|number} duration - the length of the Interval. * @return {Interval} */ static before(e, n) { const i = Ht.fromDurationLike(n), r = Cm(e); return ei.fromDateTimes(r.minus(i), r); } /** * Create an Interval from an ISO 8601 string. * Accepts `/`, `/`, and `/` formats. * @param {string} text - the ISO string to parse * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO} * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals * @return {Interval} */ static fromISO(e, n) { const [i, r] = (e || "").split("/", 2); if (i && r) { let s, o; try { s = ht.fromISO(i, n), o = s.isValid; } catch { o = !1; } let a, l; try { a = ht.fromISO(r, n), l = a.isValid; } catch { l = !1; } if (o && l) return ei.fromDateTimes(s, a); if (o) { const u = Ht.fromISO(r, n); if (u.isValid) return ei.after(s, u); } else if (l) { const u = Ht.fromISO(i, n); if (u.isValid) return ei.before(a, u); } } return ei.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`); } /** * Check if an object is an Interval. Works across context boundaries * @param {object} o * @return {boolean} */ static isInterval(e) { return e && e.isLuxonInterval || !1; } /** * Returns the start of the Interval * @type {DateTime} */ get start() { return this.isValid ? this.s : null; } /** * Returns the end of the Interval * @type {DateTime} */ get end() { return this.isValid ? this.e : null; } /** * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. * @type {boolean} */ get isValid() { return this.invalidReason === null; } /** * Returns an error code if this Interval is invalid, or null if the Interval is valid * @type {string} */ get invalidReason() { return this.invalid ? this.invalid.reason : null; } /** * Returns an explanation of why this Interval became invalid, or null if the Interval is valid * @type {string} */ get invalidExplanation() { return this.invalid ? this.invalid.explanation : null; } /** * Returns the length of the Interval in the specified unit. * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. * @return {number} */ length(e = "milliseconds") { return this.isValid ? this.toDuration(e).get(e) : NaN; } /** * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' * asks 'what dates are included in this interval?', not 'how many days long is this interval?' * @param {string} [unit='milliseconds'] - the unit of time to count. * @param {Object} opts - options * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime * @return {number} */ count(e = "milliseconds", n) { if (!this.isValid) return NaN; const i = this.start.startOf(e, n); let r; return n != null && n.useLocaleWeeks ? r = this.end.reconfigure({ locale: i.locale }) : r = this.end, r = r.startOf(e, n), Math.floor(r.diff(i, e).get(e)) + (r.valueOf() !== this.end.valueOf()); } /** * Returns whether this Interval's start and end are both in the same unit of time * @param {string} unit - the unit of time to check sameness on * @return {boolean} */ hasSame(e) { return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, e) : !1; } /** * Return whether this Interval has the same start and end DateTimes. * @return {boolean} */ isEmpty() { return this.s.valueOf() === this.e.valueOf(); } /** * Return whether this Interval's start is after the specified DateTime. * @param {DateTime} dateTime * @return {boolean} */ isAfter(e) { return this.isValid ? this.s > e : !1; } /** * Return whether this Interval's end is before the specified DateTime. * @param {DateTime} dateTime * @return {boolean} */ isBefore(e) { return this.isValid ? this.e <= e : !1; } /** * Return whether this Interval contains the specified DateTime. * @param {DateTime} dateTime * @return {boolean} */ contains(e) { return this.isValid ? this.s <= e && this.e > e : !1; } /** * "Sets" the start and/or end dates. Returns a newly-constructed Interval. * @param {Object} values - the values to set * @param {DateTime} values.start - the starting DateTime * @param {DateTime} values.end - the ending DateTime * @return {Interval} */ set({ start: e, end: n } = {}) { return this.isValid ? ei.fromDateTimes(e || this.s, n || this.e) : this; } /** * Split this Interval at each of the specified DateTimes * @param {...DateTime} dateTimes - the unit of time to count. * @return {Array} */ splitAt(...e) { if (!this.isValid) return []; const n = e.map(Cm).filter((o) => this.contains(o)).sort((o, a) => o.toMillis() - a.toMillis()), i = []; let { s: r } = this, s = 0; for (; r < this.e; ) { const o = n[s] || this.e, a = +o > +this.e ? this.e : o; i.push(ei.fromDateTimes(r, a)), r = a, s += 1; } return i; } /** * Split this Interval into smaller Intervals, each of the specified length. * Left over time is grouped into a smaller interval * @param {Duration|Object|number} duration - The length of each resulting interval. * @return {Array} */ splitBy(e) { const n = Ht.fromDurationLike(e); if (!this.isValid || !n.isValid || n.as("milliseconds") === 0) return []; let { s: i } = this, r = 1, s; const o = []; for (; i < this.e; ) { const a = this.start.plus(n.mapUnits((l) => l * r)); s = +a > +this.e ? this.e : a, o.push(ei.fromDateTimes(i, s)), i = s, r += 1; } return o; } /** * Split this Interval into the specified number of smaller intervals. * @param {number} numberOfParts - The number of Intervals to divide the Interval into. * @return {Array} */ divideEqually(e) { return this.isValid ? this.splitBy(this.length() / e).slice(0, e) : []; } /** * Return whether this Interval overlaps with the specified Interval * @param {Interval} other * @return {boolean} */ overlaps(e) { return this.e > e.s && this.s < e.e; } /** * Return whether this Interval's end is adjacent to the specified Interval's start. * @param {Interval} other * @return {boolean} */ abutsStart(e) { return this.isValid ? +this.e == +e.s : !1; } /** * Return whether this Interval's start is adjacent to the specified Interval's end. * @param {Interval} other * @return {boolean} */ abutsEnd(e) { return this.isValid ? +e.e == +this.s : !1; } /** * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise. * @param {Interval} other * @return {boolean} */ engulfs(e) { return this.isValid ? this.s <= e.s && this.e >= e.e : !1; } /** * Return whether this Interval has the same start and end as the specified Interval. * @param {Interval} other * @return {boolean} */ equals(e) { return !this.isValid || !e.isValid ? !1 : this.s.equals(e.s) && this.e.equals(e.e); } /** * Return an Interval representing the intersection of this Interval and the specified Interval. * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. * Returns null if the intersection is empty, meaning, the intervals don't intersect. * @param {Interval} other * @return {Interval} */ intersection(e) { if (!this.isValid) return this; const n = this.s > e.s ? this.s : e.s, i = this.e < e.e ? this.e : e.e; return n >= i ? null : ei.fromDateTimes(n, i); } /** * Return an Interval representing the union of this Interval and the specified Interval. * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. * @param {Interval} other * @return {Interval} */ union(e) { if (!this.isValid) return this; const n = this.s < e.s ? this.s : e.s, i = this.e > e.e ? this.e : e.e; return ei.fromDateTimes(n, i); } /** * Merge an array of Intervals into a equivalent minimal set of Intervals. * Combines overlapping and adjacent Intervals. * @param {Array} intervals * @return {Array} */ static merge(e) { const [n, i] = e.sort((r, s) => r.s - s.s).reduce( ([r, s], o) => s ? s.overlaps(o) || s.abutsStart(o) ? [r, s.union(o)] : [r.concat([s]), o] : [r, o], [[], null] ); return i && n.push(i), n; } /** * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. * @param {Array} intervals * @return {Array} */ static xor(e) { let n = null, i = 0; const r = [], s = e.map((l) => [ { time: l.s, type: "s" }, { time: l.e, type: "e" } ]), o = Array.prototype.concat(...s), a = o.sort((l, u) => l.time - u.time); for (const l of a) i += l.type === "s" ? 1 : -1, i === 1 ? n = l.time : (n && +n != +l.time && r.push(ei.fromDateTimes(n, l.time)), n = null); return ei.merge(r); } /** * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. * @param {...Interval} intervals * @return {Array} */ difference(...e) { return ei.xor([this].concat(e)).map((n) => this.intersection(n)).filter((n) => n && !n.isEmpty()); } /** * Returns a string representation of this Interval appropriate for debugging. * @return {string} */ toString() { return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : Cd; } /** * Returns a string representation of this Interval appropriate for the REPL. * @return {string} */ [Symbol.for("nodejs.util.inspect.custom")]() { return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`; } /** * Returns a localized string representing this Interval. Accepts the same options as the * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method * is browser-specific, but in general it will return an appropriate representation of the * Interval in the assigned locale. Defaults to the system's locale if no locale has been * specified. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or * Intl.DateTimeFormat constructor options. * @param {Object} opts - Options to override the configuration of the start DateTime. * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022 * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022 * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022 * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p * @return {string} */ toLocaleString(e = lw, n = {}) { return this.isValid ? $r.create(this.s.loc.clone(n), e).formatInterval(this) : Cd; } /** * Returns an ISO 8601-compliant string representation of this Interval. * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals * @param {Object} opts - The same options as {@link DateTime#toISO} * @return {string} */ toISO(e) { return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : Cd; } /** * Returns an ISO 8601-compliant string representation of date of this Interval. * The time components are ignored. * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals * @return {string} */ toISODate() { return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : Cd; } /** * Returns an ISO 8601-compliant string representation of time of this Interval. * The date components are ignored. * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals * @param {Object} opts - The same options as {@link DateTime#toISO} * @return {string} */ toISOTime(e) { return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : Cd; } /** * Returns a string representation of this Interval formatted according to the specified format * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible * formatting tool. * @param {string} dateFormat - The format string. This string formats the start and end time. * See {@link DateTime#toFormat} for details. * @param {Object} opts - Options. * @param {string} [opts.separator = ' – '] - A separator to place between the start and end * representations. * @return {string} */ toFormat(e, { separator: n = " – " } = {}) { return this.isValid ? `${this.s.toFormat(e)}${n}${this.e.toFormat(e)}` : Cd; } /** * Return a Duration representing the time spanned by this interval. * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. * @param {Object} opts - options that affect the creation of the Duration * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } * @return {Duration} */ toDuration(e, n) { return this.isValid ? this.e.diff(this.s, e, n) : Ht.invalid(this.invalidReason); } /** * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes * @param {function} mapFn * @return {Interval} * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) */ mapEndpoints(e) { return ei.fromDateTimes(e(this.s), e(this.e)); } } class ib { /** * Return whether the specified zone contains a DST. * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. * @return {boolean} */ static hasDST(e = ti.defaultZone) { const n = ht.now().setZone(e).set({ month: 12 }); return !e.isUniversal && n.offset !== n.set({ month: 6 }).offset; } /** * Return whether the specified zone is a valid IANA specifier. * @param {string} zone - Zone to check * @return {boolean} */ static isValidIANAZone(e) { return xl.isValidZone(e); } /** * Converts the input into a {@link Zone} instance. * * * If `input` is already a Zone instance, it is returned unchanged. * * If `input` is a string containing a valid time zone name, a Zone instance * with that name is returned. * * If `input` is a string that doesn't refer to a known time zone, a Zone * instance with {@link Zone#isValid} == false is returned. * * If `input is a number, a Zone instance with the specified fixed offset * in minutes is returned. * * If `input` is `null` or `undefined`, the default zone is returned. * @param {string|Zone|number} [input] - the value to be converted * @return {Zone} */ static normalizeZone(e) { return vu(e, ti.defaultZone); } /** * Get the weekday on which the week starts according to the given locale. * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @param {string} [opts.locObj=null] - an existing locale object to use * @returns {number} the start of the week, 1 for Monday through 7 for Sunday */ static getStartOfWeek({ locale: e = null, locObj: n = null } = {}) { return (n || Gt.create(e)).getStartOfWeek(); } /** * Get the minimum number of days necessary in a week before it is considered part of the next year according * to the given locale. * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @param {string} [opts.locObj=null] - an existing locale object to use * @returns {number} */ static getMinimumDaysInFirstWeek({ locale: e = null, locObj: n = null } = {}) { return (n || Gt.create(e)).getMinDaysInFirstWeek(); } /** * Get the weekdays, which are considered the weekend according to the given locale * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @param {string} [opts.locObj=null] - an existing locale object to use * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday */ static getWeekendWeekdays({ locale: e = null, locObj: n = null } = {}) { return (n || Gt.create(e)).getWeekendDays().slice(); } /** * Return an array of standalone month names. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @param {string} [opts.numberingSystem=null] - the numbering system * @param {string} [opts.locObj=null] - an existing locale object to use * @param {string} [opts.outputCalendar='gregory'] - the calendar * @example Info.months()[0] //=> 'January' * @example Info.months('short')[0] //=> 'Jan' * @example Info.months('numeric')[0] //=> '1' * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' * @return {Array} */ static months(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null, outputCalendar: s = "gregory" } = {}) { return (r || Gt.create(n, i, s)).months(e); } /** * Return an array of format month names. * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that * changes the string. * See {@link Info#months} * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @param {string} [opts.numberingSystem=null] - the numbering system * @param {string} [opts.locObj=null] - an existing locale object to use * @param {string} [opts.outputCalendar='gregory'] - the calendar * @return {Array} */ static monthsFormat(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null, outputCalendar: s = "gregory" } = {}) { return (r || Gt.create(n, i, s)).months(e, !0); } /** * Return an array of standalone week names. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @param {string} [opts.numberingSystem=null] - the numbering system * @param {string} [opts.locObj=null] - an existing locale object to use * @example Info.weekdays()[0] //=> 'Monday' * @example Info.weekdays('short')[0] //=> 'Mon' * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' * @return {Array} */ static weekdays(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null } = {}) { return (r || Gt.create(n, i, null)).weekdays(e); } /** * Return an array of format week names. * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that * changes the string. * See {@link Info#weekdays} * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". * @param {Object} opts - options * @param {string} [opts.locale=null] - the locale code * @param {string} [opts.numberingSystem=null] - the numbering system * @param {string} [opts.locObj=null] - an existing locale object to use * @return {Array} */ static weekdaysFormat(e = "long", { locale: n = null, numberingSystem: i = null, locObj: r = null } = {}) { return (r || Gt.create(n, i, null)).weekdays(e, !0); } /** * Return an array of meridiems. * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @example Info.meridiems() //=> [ 'AM', 'PM' ] * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] * @return {Array} */ static meridiems({ locale: e = null } = {}) { return Gt.create(e).meridiems(); } /** * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". * @param {Object} opts - options * @param {string} [opts.locale] - the locale code * @example Info.eras() //=> [ 'BC', 'AD' ] * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] * @return {Array} */ static eras(e = "short", { locale: n = null } = {}) { return Gt.create(n, null, "gregory").eras(e); } /** * Return the set of available features in this environment. * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case. * Keys: * * `relative`: whether this environment supports relative time formatting * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale * @example Info.features() //=> { relative: false, localeWeek: true } * @return {Object} */ static features() { return { relative: rz(), localeWeek: sz() }; } } function K7(t, e) { const n = (r) => r.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), i = n(e) - n(t); return Math.floor(Ht.fromMillis(i).as("days")); } function hfe(t, e, n) { const i = [ ["years", (l, u) => u.year - l.year], ["quarters", (l, u) => u.quarter - l.quarter + (u.year - l.year) * 4], ["months", (l, u) => u.month - l.month + (u.year - l.year) * 12], [ "weeks", (l, u) => { const f = K7(l, u); return (f - f % 7) / 7; } ], ["days", K7] ], r = {}, s = t; let o, a; for (const [l, u] of i) n.indexOf(l) >= 0 && (o = l, r[l] = u(t, e), a = s.plus(r), a > e ? (r[l]--, t = s.plus(r), t > e && (a = t, r[l]--, t = s.plus(r))) : t = a); return [t, r, a, o]; } function pfe(t, e, n, i) { let [r, s, o, a] = hfe(t, e, n); const l = e - r, u = n.filter( (d) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(d) >= 0 ); u.length === 0 && (o < e && (o = r.plus({ [a]: 1 })), o !== r && (s[a] = (s[a] || 0) + l / (o - r))); const f = Ht.fromObject(s, i); return u.length > 0 ? Ht.fromMillis(l, i).shiftTo(...u).plus(f) : f; } const mfe = "missing Intl.DateTimeFormat.formatToParts support"; function Vt(t, e = (n) => n) { return { regex: t, deser: ([n]) => e(rce(n)) }; } const gfe = " ", _z = `[ ${gfe}]`, Oz = new RegExp(_z, "g"); function vfe(t) { return t.replace(/\./g, "\\.?").replace(Oz, _z); } function J7(t) { return t.replace(/\./g, "").replace(Oz, " ").toLowerCase(); } function No(t, e) { return t === null ? null : { regex: RegExp(t.map(vfe).join("|")), deser: ([n]) => t.findIndex((i) => J7(n) === J7(i)) + e }; } function eN(t, e) { return { regex: t, deser: ([, n, i]) => t2(n, i), groups: e }; } function rb(t) { return { regex: t, deser: ([e]) => e }; } function bfe(t) { return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); } function yfe(t, e) { const n = Mo(e), i = Mo(e, "{2}"), r = Mo(e, "{3}"), s = Mo(e, "{4}"), o = Mo(e, "{6}"), a = Mo(e, "{1,2}"), l = Mo(e, "{1,3}"), u = Mo(e, "{1,6}"), f = Mo(e, "{1,9}"), d = Mo(e, "{2,4}"), h = Mo(e, "{4,6}"), m = (x) => ({ regex: RegExp(bfe(x.val)), deser: ([_]) => _, literal: !0 }), w = ((x) => { if (t.literal) return m(x); switch (x.val) { case "G": return No(e.eras("short"), 0); case "GG": return No(e.eras("long"), 0); case "y": return Vt(u); case "yy": return Vt(d, v4); case "yyyy": return Vt(s); case "yyyyy": return Vt(h); case "yyyyyy": return Vt(o); case "M": return Vt(a); case "MM": return Vt(i); case "MMM": return No(e.months("short", !0), 1); case "MMMM": return No(e.months("long", !0), 1); case "L": return Vt(a); case "LL": return Vt(i); case "LLL": return No(e.months("short", !1), 1); case "LLLL": return No(e.months("long", !1), 1); case "d": return Vt(a); case "dd": return Vt(i); case "o": return Vt(l); case "ooo": return Vt(r); case "HH": return Vt(i); case "H": return Vt(a); case "hh": return Vt(i); case "h": return Vt(a); case "mm": return Vt(i); case "m": return Vt(a); case "q": return Vt(a); case "qq": return Vt(i); case "s": return Vt(a); case "ss": return Vt(i); case "S": return Vt(l); case "SSS": return Vt(r); case "u": return rb(f); case "uu": return rb(a); case "uuu": return Vt(n); case "a": return No(e.meridiems(), 0); case "kkkk": return Vt(s); case "kk": return Vt(d, v4); case "W": return Vt(a); case "WW": return Vt(i); case "E": case "c": return Vt(n); case "EEE": return No(e.weekdays("short", !1), 1); case "EEEE": return No(e.weekdays("long", !1), 1); case "ccc": return No(e.weekdays("short", !0), 1); case "cccc": return No(e.weekdays("long", !0), 1); case "Z": case "ZZ": return eN(new RegExp(`([+-]${a.source})(?::(${i.source}))?`), 2); case "ZZZ": return eN(new RegExp(`([+-]${a.source})(${i.source})?`), 2); case "z": return rb(/[a-z_+-/]{1,256}?/i); case " ": return rb(/[^\S\n\r]/); default: return m(x); } })(t) || { invalidReason: mfe }; return w.token = t, w; } const wfe = { year: { "2-digit": "yy", numeric: "yyyyy" }, month: { numeric: "M", "2-digit": "MM", short: "MMM", long: "MMMM" }, day: { numeric: "d", "2-digit": "dd" }, weekday: { short: "EEE", long: "EEEE" }, dayperiod: "a", dayPeriod: "a", hour12: { numeric: "h", "2-digit": "hh" }, hour24: { numeric: "H", "2-digit": "HH" }, minute: { numeric: "m", "2-digit": "mm" }, second: { numeric: "s", "2-digit": "ss" }, timeZoneName: { long: "ZZZZZ", short: "ZZZ" } }; function kfe(t, e, n) { const { type: i, value: r } = t; if (i === "literal") { const l = /^\s+$/.test(r); return { literal: !l, val: l ? " " : r }; } const s = e[i]; let o = i; i === "hour" && (e.hour12 != null ? o = e.hour12 ? "hour12" : "hour24" : e.hourCycle != null ? e.hourCycle === "h11" || e.hourCycle === "h12" ? o = "hour12" : o = "hour24" : o = n.hour12 ? "hour12" : "hour24"); let a = wfe[o]; if (typeof a == "object" && (a = a[s]), a) return { literal: !1, val: a }; } function xfe(t) { return [`^${t.map((n) => n.regex).reduce((n, i) => `${n}(${i.source})`, "")}$`, t]; } function _fe(t, e, n) { const i = t.match(e); if (i) { const r = {}; let s = 1; for (const o in n) if (Ch(n, o)) { const a = n[o], l = a.groups ? a.groups + 1 : 1; !a.literal && a.token && (r[a.token.val[0]] = a.deser(i.slice(s, s + l))), s += l; } return [i, r]; } else return [i, {}]; } function Ofe(t) { const e = (s) => { switch (s) { case "S": return "millisecond"; case "s": return "second"; case "m": return "minute"; case "h": case "H": return "hour"; case "d": return "day"; case "o": return "ordinal"; case "L": case "M": return "month"; case "y": return "year"; case "E": case "c": return "weekday"; case "W": return "weekNumber"; case "k": return "weekYear"; case "q": return "quarter"; default: return null; } }; let n = null, i; return yt(t.z) || (n = xl.create(t.z)), yt(t.Z) || (n || (n = new Gr(t.Z)), i = t.Z), yt(t.q) || (t.M = (t.q - 1) * 3 + 1), yt(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), yt(t.u) || (t.S = I5(t.u)), [Object.keys(t).reduce((s, o) => { const a = e(o); return a && (s[a] = t[o]), s; }, {}), n, i]; } let L3 = null; function Sfe() { return L3 || (L3 = ht.fromMillis(1555555555555)), L3; } function Cfe(t, e) { if (t.literal) return t; const n = $r.macroTokenToFormatOpts(t.val), i = Tz(n, e); return i == null || i.includes(void 0) ? t : i; } function Sz(t, e) { return Array.prototype.concat(...t.map((n) => Cfe(n, e))); } class Cz { constructor(e, n) { if (this.locale = e, this.format = n, this.tokens = Sz($r.parseFormat(n), e), this.units = this.tokens.map((i) => yfe(i, e)), this.disqualifyingUnit = this.units.find((i) => i.invalidReason), !this.disqualifyingUnit) { const [i, r] = xfe(this.units); this.regex = RegExp(i, "i"), this.handlers = r; } } explainFromTokens(e) { if (this.isValid) { const [n, i] = _fe(e, this.regex, this.handlers), [r, s, o] = i ? Ofe(i) : [null, null, void 0]; if (Ch(i, "a") && Ch(i, "H")) throw new Gd( "Can't include meridiem when specifying 24-hour format" ); return { input: e, tokens: this.tokens, regex: this.regex, rawMatches: n, matches: i, result: r, zone: s, specificOffset: o }; } else return { input: e, tokens: this.tokens, invalidReason: this.invalidReason }; } get isValid() { return !this.disqualifyingUnit; } get invalidReason() { return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null; } } function Ez(t, e, n) { return new Cz(t, n).explainFromTokens(e); } function Efe(t, e, n) { const { result: i, zone: r, specificOffset: s, invalidReason: o } = Ez(t, e, n); return [i, r, s, o]; } function Tz(t, e) { if (!t) return null; const i = $r.create(e, t).dtFormatter(Sfe()), r = i.formatToParts(), s = i.resolvedOptions(); return r.map((o) => kfe(o, t, s)); } const R3 = "Invalid DateTime", tN = 864e13; function Jm(t) { return new Po("unsupported zone", `the zone "${t.name}" is not supported`); } function j3(t) { return t.weekData === null && (t.weekData = uw(t.c)), t.weekData; } function F3(t) { return t.localWeekData === null && (t.localWeekData = uw( t.c, t.loc.getMinDaysInFirstWeek(), t.loc.getStartOfWeek() )), t.localWeekData; } function Dc(t, e) { const n = { ts: t.ts, zone: t.zone, c: t.c, o: t.o, loc: t.loc, invalid: t.invalid }; return new ht({ ...n, ...e, old: n }); } function $z(t, e, n) { let i = t - e * 60 * 1e3; const r = n.offset(i); if (e === r) return [i, e]; i -= (r - e) * 60 * 1e3; const s = n.offset(i); return r === s ? [i, r] : [t - Math.min(r, s) * 60 * 1e3, Math.max(r, s)]; } function sb(t, e) { t += e * 60 * 1e3; const n = new Date(t); return { year: n.getUTCFullYear(), month: n.getUTCMonth() + 1, day: n.getUTCDate(), hour: n.getUTCHours(), minute: n.getUTCMinutes(), second: n.getUTCSeconds(), millisecond: n.getUTCMilliseconds() }; } function ny(t, e, n) { return $z(e2(t), e, n); } function nN(t, e) { const n = t.o, i = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, s = { ...t.c, year: i, month: r, day: Math.min(t.c.day, cw(i, r)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7 }, o = Ht.fromObject({ years: e.years - Math.trunc(e.years), quarters: e.quarters - Math.trunc(e.quarters), months: e.months - Math.trunc(e.months), weeks: e.weeks - Math.trunc(e.weeks), days: e.days - Math.trunc(e.days), hours: e.hours, minutes: e.minutes, seconds: e.seconds, milliseconds: e.milliseconds }).as("milliseconds"), a = e2(s); let [l, u] = $z(a, n, t.zone); return o !== 0 && (l += o, u = t.zone.offset(l)), { ts: l, o: u }; } function Ed(t, e, n, i, r, s) { const { setZone: o, zone: a } = n; if (t && Object.keys(t).length !== 0 || e) { const l = e || a, u = ht.fromObject(t, { ...n, zone: l, specificOffset: s }); return o ? u : u.setZone(a); } else return ht.invalid( new Po("unparsable", `the input "${r}" can't be parsed as ${i}`) ); } function ob(t, e, n = !0) { return t.isValid ? $r.create(Gt.create("en-US"), { allowZ: n, forceSimple: !0 }).formatDateTimeFromString(t, e) : null; } function B3(t, e) { const n = t.c.year > 9999 || t.c.year < 0; let i = ""; return n && t.c.year >= 0 && (i += "+"), i += yi(t.c.year, n ? 6 : 4), e ? (i += "-", i += yi(t.c.month), i += "-", i += yi(t.c.day)) : (i += yi(t.c.month), i += yi(t.c.day)), i; } function iN(t, e, n, i, r, s) { let o = yi(t.c.hour); return e ? (o += ":", o += yi(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += ":")) : o += yi(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += yi(t.c.second), (t.c.millisecond !== 0 || !i) && (o += ".", o += yi(t.c.millisecond, 3))), r && (t.isOffsetFixed && t.offset === 0 && !s ? o += "Z" : t.o < 0 ? (o += "-", o += yi(Math.trunc(-t.o / 60)), o += ":", o += yi(Math.trunc(-t.o % 60))) : (o += "+", o += yi(Math.trunc(t.o / 60)), o += ":", o += yi(Math.trunc(t.o % 60)))), s && (o += "[" + t.zone.ianaName + "]"), o; } const Mz = { month: 1, day: 1, hour: 0, minute: 0, second: 0, millisecond: 0 }, Tfe = { weekNumber: 1, weekday: 1, hour: 0, minute: 0, second: 0, millisecond: 0 }, $fe = { ordinal: 1, hour: 0, minute: 0, second: 0, millisecond: 0 }, Nz = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Mfe = [ "weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond" ], Nfe = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; function Afe(t) { const e = { year: "year", years: "year", month: "month", months: "month", day: "day", days: "day", hour: "hour", hours: "hour", minute: "minute", minutes: "minute", quarter: "quarter", quarters: "quarter", second: "second", seconds: "second", millisecond: "millisecond", milliseconds: "millisecond", weekday: "weekday", weekdays: "weekday", weeknumber: "weekNumber", weeksnumber: "weekNumber", weeknumbers: "weekNumber", weekyear: "weekYear", weekyears: "weekYear", ordinal: "ordinal" }[t.toLowerCase()]; if (!e) throw new AB(t); return e; } function rN(t) { switch (t.toLowerCase()) { case "localweekday": case "localweekdays": return "localWeekday"; case "localweeknumber": case "localweeknumbers": return "localWeekNumber"; case "localweekyear": case "localweekyears": return "localWeekYear"; default: return Afe(t); } } function Dfe(t) { return ry[t] || (iy === void 0 && (iy = ti.now()), ry[t] = t.offset(iy)), ry[t]; } function sN(t, e) { const n = vu(e.zone, ti.defaultZone); if (!n.isValid) return ht.invalid(Jm(n)); const i = Gt.fromObject(e); let r, s; if (yt(t.year)) r = ti.now(); else { for (const l of Nz) yt(t[l]) && (t[l] = Mz[l]); const o = nz(t) || iz(t); if (o) return ht.invalid(o); const a = Dfe(n); [r, s] = ny(t, a, n); } return new ht({ ts: r, zone: n, loc: i, o: s }); } function oN(t, e, n) { const i = yt(n.round) ? !0 : n.round, r = (o, a) => (o = L5(o, i || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(o, a)), s = (o) => n.calendary ? e.hasSame(t, o) ? 0 : e.startOf(o).diff(t.startOf(o), o).get(o) : e.diff(t, o).get(o); if (n.unit) return r(s(n.unit), n.unit); for (const o of n.units) { const a = s(o); if (Math.abs(a) >= 1) return r(a, o); } return r(t > e ? -0 : 0, n.units[n.units.length - 1]); } function aN(t) { let e = {}, n; return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n]; } let iy, ry = {}; class ht { /** * @access private */ constructor(e) { const n = e.zone || ti.defaultZone; let i = e.invalid || (Number.isNaN(e.ts) ? new Po("invalid input") : null) || (n.isValid ? null : Jm(n)); this.ts = yt(e.ts) ? ti.now() : e.ts; let r = null, s = null; if (!i) if (e.old && e.old.ts === this.ts && e.old.zone.equals(n)) [r, s] = [e.old.c, e.old.o]; else { const a = Du(e.o) && !e.old ? e.o : n.offset(this.ts); r = sb(this.ts, a), i = Number.isNaN(r.year) ? new Po("invalid input") : null, r = i ? null : r, s = i ? null : a; } this._zone = n, this.loc = e.loc || Gt.create(), this.invalid = i, this.weekData = null, this.localWeekData = null, this.c = r, this.o = s, this.isLuxonDateTime = !0; } // CONSTRUCT /** * Create a DateTime for the current instant, in the system's time zone. * * Use Settings to override these default values if needed. * @example DateTime.now().toISO() //~> now in the ISO format * @return {DateTime} */ static now() { return new ht({}); } /** * Create a local DateTime * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used * @param {number} [month=1] - The month, 1-indexed * @param {number} [day=1] - The day of the month, 1-indexed * @param {number} [hour=0] - The hour of the day, in 24-hour time * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 * @example DateTime.local() //~> now * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 * @return {DateTime} */ static local() { const [e, n] = aN(arguments), [i, r, s, o, a, l, u] = n; return sN({ year: i, month: r, day: s, hour: o, minute: a, second: l, millisecond: u }, e); } /** * Create a DateTime in UTC * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used * @param {number} [month=1] - The month, 1-indexed * @param {number} [day=1] - The day of the month * @param {number} [hour=0] - The hour of the day, in 24-hour time * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 * @param {Object} options - configuration options for the DateTime * @param {string} [options.locale] - a locale to set on the resulting DateTime instance * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance * @example DateTime.utc() //~> now * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale * @return {DateTime} */ static utc() { const [e, n] = aN(arguments), [i, r, s, o, a, l, u] = n; return e.zone = Gr.utcInstance, sN({ year: i, month: r, day: s, hour: o, minute: a, second: l, millisecond: u }, e); } /** * Create a DateTime from a JavaScript Date object. Uses the default zone. * @param {Date} date - a JavaScript Date object * @param {Object} options - configuration options for the DateTime * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into * @return {DateTime} */ static fromJSDate(e, n = {}) { const i = uce(e) ? e.valueOf() : NaN; if (Number.isNaN(i)) return ht.invalid("invalid input"); const r = vu(n.zone, ti.defaultZone); return r.isValid ? new ht({ ts: i, zone: r, loc: Gt.fromObject(n) }) : ht.invalid(Jm(r)); } /** * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. * @param {number} milliseconds - a number of milliseconds since 1970 UTC * @param {Object} options - configuration options for the DateTime * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into * @param {string} [options.locale] - a locale to set on the resulting DateTime instance * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance * @return {DateTime} */ static fromMillis(e, n = {}) { if (Du(e)) return e < -tN || e > tN ? ht.invalid("Timestamp out of range") : new ht({ ts: e, zone: vu(n.zone, ti.defaultZone), loc: Gt.fromObject(n) }); throw new Sr( `fromMillis requires a numerical input, but received a ${typeof e} with value ${e}` ); } /** * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. * @param {number} seconds - a number of seconds since 1970 UTC * @param {Object} options - configuration options for the DateTime * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into * @param {string} [options.locale] - a locale to set on the resulting DateTime instance * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance * @return {DateTime} */ static fromSeconds(e, n = {}) { if (Du(e)) return new ht({ ts: e * 1e3, zone: vu(n.zone, ti.defaultZone), loc: Gt.fromObject(n) }); throw new Sr("fromSeconds requires a numerical input"); } /** * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults. * @param {Object} obj - the object to create the DateTime from * @param {number} obj.year - a year, such as 1987 * @param {number} obj.month - a month, 1-12 * @param {number} obj.day - a day of the month, 1-31, depending on the month * @param {number} obj.ordinal - day of the year, 1-365 or 366 * @param {number} obj.weekYear - an ISO week year * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday * @param {number} obj.localWeekYear - a week year, according to the locale * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale * @param {number} obj.hour - hour of the day, 0-23 * @param {number} obj.minute - minute of the hour, 0-59 * @param {number} obj.second - second of the minute, 0-59 * @param {number} obj.millisecond - millisecond of the second, 0-999 * @param {Object} opts - options for creating this DateTime * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }), * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' }) * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' }) * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26' * @return {DateTime} */ static fromObject(e, n = {}) { e = e || {}; const i = vu(n.zone, ti.defaultZone); if (!i.isValid) return ht.invalid(Jm(i)); const r = Gt.fromObject(n), s = fw(e, rN), { minDaysInFirstWeek: o, startOfWeek: a } = U7(s, r), l = ti.now(), u = yt(n.specificOffset) ? i.offset(l) : n.specificOffset, f = !yt(s.ordinal), d = !yt(s.year), h = !yt(s.month) || !yt(s.day), m = d || h, g = s.weekYear || s.weekNumber; if ((m || f) && g) throw new Gd( "Can't mix weekYear/weekNumber units with year/month/day or ordinals" ); if (h && f) throw new Gd("Can't mix ordinal dates with month/day"); const w = g || s.weekday && !m; let x, _, S = sb(l, u); w ? (x = Mfe, _ = Tfe, S = uw(S, o, a)) : f ? (x = Nfe, _ = $fe, S = I3(S)) : (x = Nz, _ = Mz); let C = !1; for (const Z of x) { const L = s[Z]; yt(L) ? C ? s[Z] = _[Z] : s[Z] = S[Z] : C = !0; } const E = w ? oce(s, o, a) : f ? ace(s) : nz(s), M = E || iz(s); if (M) return ht.invalid(M); const $ = w ? H7(s, o, a) : f ? Q7(s) : s, [P, W] = ny($, u, i), z = new ht({ ts: P, zone: i, o: W, loc: r }); return s.weekday && m && e.weekday !== z.weekday ? ht.invalid( "mismatched weekday", `you can't specify both a weekday of ${s.weekday} and a date of ${z.toISO()}` ) : z.isValid ? z : ht.invalid(z.invalid); } /** * Create a DateTime from an ISO 8601 string * @param {string} text - the ISO string * @param {Object} opts - options to affect the creation * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance * @example DateTime.fromISO('2016-05-25T09:08:34.123') * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) * @example DateTime.fromISO('2016-W05-4') * @return {DateTime} */ static fromISO(e, n = {}) { const [i, r] = Kce(e); return Ed(i, r, n, "ISO 8601", e); } /** * Create a DateTime from an RFC 2822 string * @param {string} text - the RFC 2822 string * @param {Object} opts - options to affect the creation * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') * @return {DateTime} */ static fromRFC2822(e, n = {}) { const [i, r] = Jce(e); return Ed(i, r, n, "RFC 2822", e); } /** * Create a DateTime from an HTTP header date * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 * @param {string} text - the HTTP header date * @param {Object} opts - options to affect the creation * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') * @return {DateTime} */ static fromHTTP(e, n = {}) { const [i, r] = efe(e); return Ed(i, r, n, "HTTP", n); } /** * Create a DateTime from an input string and format string. * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens). * @param {string} text - the string to parse * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) * @param {Object} opts - options to affect the creation * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance * @return {DateTime} */ static fromFormat(e, n, i = {}) { if (yt(e) || yt(n)) throw new Sr("fromFormat requires an input string and a format"); const { locale: r = null, numberingSystem: s = null } = i, o = Gt.fromOpts({ locale: r, numberingSystem: s, defaultToEN: !0 }), [a, l, u, f] = Efe(o, e, n); return f ? ht.invalid(f) : Ed(a, l, i, `format ${n}`, e, u); } /** * @deprecated use fromFormat instead */ static fromString(e, n, i = {}) { return ht.fromFormat(e, n, i); } /** * Create a DateTime from a SQL date, time, or datetime * Defaults to en-US if no locale has been specified, regardless of the system's locale * @param {string} text - the string to parse * @param {Object} opts - options to affect the creation * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance * @example DateTime.fromSQL('2017-05-15') * @example DateTime.fromSQL('2017-05-15 09:12:34') * @example DateTime.fromSQL('2017-05-15 09:12:34.342') * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) * @example DateTime.fromSQL('09:12:34.342') * @return {DateTime} */ static fromSQL(e, n = {}) { const [i, r] = afe(e); return Ed(i, r, n, "SQL", e); } /** * Create an invalid DateTime. * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent. * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information * @return {DateTime} */ static invalid(e, n = null) { if (!e) throw new Sr("need to specify a reason the DateTime is invalid"); const i = e instanceof Po ? e : new Po(e, n); if (ti.throwOnInvalid) throw new Due(i); return new ht({ invalid: i }); } /** * Check if an object is an instance of DateTime. Works across context boundaries * @param {object} o * @return {boolean} */ static isDateTime(e) { return e && e.isLuxonDateTime || !1; } /** * Produce the format string for a set of options * @param formatOpts * @param localeOpts * @returns {string} */ static parseFormatForOpts(e, n = {}) { const i = Tz(e, Gt.fromObject(n)); return i ? i.map((r) => r ? r.val : null).join("") : null; } /** * Produce the the fully expanded format token for the locale * Does NOT quote characters, so quoted tokens will not round trip correctly * @param fmt * @param localeOpts * @returns {string} */ static expandFormat(e, n = {}) { return Sz($r.parseFormat(e), Gt.fromObject(n)).map((r) => r.val).join(""); } static resetCache() { iy = void 0, ry = {}; } // INFO /** * Get the value of unit. * @param {string} unit - a unit such as 'minute' or 'day' * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 * @return {number} */ get(e) { return this[e]; } /** * Returns whether the DateTime is valid. Invalid DateTimes occur when: * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 * * The DateTime was created by an operation on another invalid date * @type {boolean} */ get isValid() { return this.invalid === null; } /** * Returns an error code if this DateTime is invalid, or null if the DateTime is valid * @type {string} */ get invalidReason() { return this.invalid ? this.invalid.reason : null; } /** * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid * @type {string} */ get invalidExplanation() { return this.invalid ? this.invalid.explanation : null; } /** * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime * * @type {string} */ get locale() { return this.isValid ? this.loc.locale : null; } /** * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime * * @type {string} */ get numberingSystem() { return this.isValid ? this.loc.numberingSystem : null; } /** * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime * * @type {string} */ get outputCalendar() { return this.isValid ? this.loc.outputCalendar : null; } /** * Get the time zone associated with this DateTime. * @type {Zone} */ get zone() { return this._zone; } /** * Get the name of the time zone. * @type {string} */ get zoneName() { return this.isValid ? this.zone.name : null; } /** * Get the year * @example DateTime.local(2017, 5, 25).year //=> 2017 * @type {number} */ get year() { return this.isValid ? this.c.year : NaN; } /** * Get the quarter * @example DateTime.local(2017, 5, 25).quarter //=> 2 * @type {number} */ get quarter() { return this.isValid ? Math.ceil(this.c.month / 3) : NaN; } /** * Get the month (1-12). * @example DateTime.local(2017, 5, 25).month //=> 5 * @type {number} */ get month() { return this.isValid ? this.c.month : NaN; } /** * Get the day of the month (1-30ish). * @example DateTime.local(2017, 5, 25).day //=> 25 * @type {number} */ get day() { return this.isValid ? this.c.day : NaN; } /** * Get the hour of the day (0-23). * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 * @type {number} */ get hour() { return this.isValid ? this.c.hour : NaN; } /** * Get the minute of the hour (0-59). * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 * @type {number} */ get minute() { return this.isValid ? this.c.minute : NaN; } /** * Get the second of the minute (0-59). * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 * @type {number} */ get second() { return this.isValid ? this.c.second : NaN; } /** * Get the millisecond of the second (0-999). * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 * @type {number} */ get millisecond() { return this.isValid ? this.c.millisecond : NaN; } /** * Get the week year * @see https://en.wikipedia.org/wiki/ISO_week_date * @example DateTime.local(2014, 12, 31).weekYear //=> 2015 * @type {number} */ get weekYear() { return this.isValid ? j3(this).weekYear : NaN; } /** * Get the week number of the week year (1-52ish). * @see https://en.wikipedia.org/wiki/ISO_week_date * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 * @type {number} */ get weekNumber() { return this.isValid ? j3(this).weekNumber : NaN; } /** * Get the day of the week. * 1 is Monday and 7 is Sunday * @see https://en.wikipedia.org/wiki/ISO_week_date * @example DateTime.local(2014, 11, 31).weekday //=> 4 * @type {number} */ get weekday() { return this.isValid ? j3(this).weekday : NaN; } /** * Returns true if this date is on a weekend according to the locale, false otherwise * @returns {boolean} */ get isWeekend() { return this.isValid && this.loc.getWeekendDays().includes(this.weekday); } /** * Get the day of the week according to the locale. * 1 is the first day of the week and 7 is the last day of the week. * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1, * @returns {number} */ get localWeekday() { return this.isValid ? F3(this).weekday : NaN; } /** * Get the week number of the week year according to the locale. Different locales assign week numbers differently, * because the week can start on different days of the week (see localWeekday) and because a different number of days * is required for a week to count as the first week of a year. * @returns {number} */ get localWeekNumber() { return this.isValid ? F3(this).weekNumber : NaN; } /** * Get the week year according to the locale. Different locales assign week numbers (and therefor week years) * differently, see localWeekNumber. * @returns {number} */ get localWeekYear() { return this.isValid ? F3(this).weekYear : NaN; } /** * Get the ordinal (meaning the day of the year) * @example DateTime.local(2017, 5, 25).ordinal //=> 145 * @type {number|DateTime} */ get ordinal() { return this.isValid ? I3(this.c).ordinal : NaN; } /** * Get the human readable short month name, such as 'Oct'. * Defaults to the system's locale if no locale has been specified * @example DateTime.local(2017, 10, 30).monthShort //=> Oct * @type {string} */ get monthShort() { return this.isValid ? ib.months("short", { locObj: this.loc })[this.month - 1] : null; } /** * Get the human readable long month name, such as 'October'. * Defaults to the system's locale if no locale has been specified * @example DateTime.local(2017, 10, 30).monthLong //=> October * @type {string} */ get monthLong() { return this.isValid ? ib.months("long", { locObj: this.loc })[this.month - 1] : null; } /** * Get the human readable short weekday, such as 'Mon'. * Defaults to the system's locale if no locale has been specified * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon * @type {string} */ get weekdayShort() { return this.isValid ? ib.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null; } /** * Get the human readable long weekday, such as 'Monday'. * Defaults to the system's locale if no locale has been specified * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday * @type {string} */ get weekdayLong() { return this.isValid ? ib.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null; } /** * Get the UTC offset of this DateTime in minutes * @example DateTime.now().offset //=> -240 * @example DateTime.utc().offset //=> 0 * @type {number} */ get offset() { return this.isValid ? +this.o : NaN; } /** * Get the short human name for the zone's current offset, for example "EST" or "EDT". * Defaults to the system's locale if no locale has been specified * @type {string} */ get offsetNameShort() { return this.isValid ? this.zone.offsetName(this.ts, { format: "short", locale: this.locale }) : null; } /** * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". * Defaults to the system's locale if no locale has been specified * @type {string} */ get offsetNameLong() { return this.isValid ? this.zone.offsetName(this.ts, { format: "long", locale: this.locale }) : null; } /** * Get whether this zone's offset ever changes, as in a DST. * @type {boolean} */ get isOffsetFixed() { return this.isValid ? this.zone.isUniversal : null; } /** * Get whether the DateTime is in a DST. * @type {boolean} */ get isInDST() { return this.isOffsetFixed ? !1 : this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset; } /** * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC * in this DateTime's zone. During DST changes local time can be ambiguous, for example * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`. * This method will return both possible DateTimes if this DateTime's local time is ambiguous. * @returns {DateTime[]} */ getPossibleOffsets() { if (!this.isValid || this.isOffsetFixed) return [this]; const e = 864e5, n = 6e4, i = e2(this.c), r = this.zone.offset(i - e), s = this.zone.offset(i + e), o = this.zone.offset(i - r * n), a = this.zone.offset(i - s * n); if (o === a) return [this]; const l = i - o * n, u = i - a * n, f = sb(l, o), d = sb(u, a); return f.hour === d.hour && f.minute === d.minute && f.second === d.second && f.millisecond === d.millisecond ? [Dc(this, { ts: l }), Dc(this, { ts: u })] : [this]; } /** * Returns true if this DateTime is in a leap year, false otherwise * @example DateTime.local(2016).isInLeapYear //=> true * @example DateTime.local(2013).isInLeapYear //=> false * @type {boolean} */ get isInLeapYear() { return c1(this.year); } /** * Returns the number of days in this DateTime's month * @example DateTime.local(2016, 2).daysInMonth //=> 29 * @example DateTime.local(2016, 3).daysInMonth //=> 31 * @type {number} */ get daysInMonth() { return cw(this.year, this.month); } /** * Returns the number of days in this DateTime's year * @example DateTime.local(2016).daysInYear //=> 366 * @example DateTime.local(2013).daysInYear //=> 365 * @type {number} */ get daysInYear() { return this.isValid ? uh(this.year) : NaN; } /** * Returns the number of weeks in this DateTime's year * @see https://en.wikipedia.org/wiki/ISO_week_date * @example DateTime.local(2004).weeksInWeekYear //=> 53 * @example DateTime.local(2013).weeksInWeekYear //=> 52 * @type {number} */ get weeksInWeekYear() { return this.isValid ? r0(this.weekYear) : NaN; } /** * Returns the number of weeks in this DateTime's local week year * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52 * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53 * @type {number} */ get weeksInLocalWeekYear() { return this.isValid ? r0( this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek() ) : NaN; } /** * Returns the resolved Intl options for this DateTime. * This is useful in understanding the behavior of formatting methods * @param {Object} opts - the same options as toLocaleString * @return {Object} */ resolvedLocaleOptions(e = {}) { const { locale: n, numberingSystem: i, calendar: r } = $r.create( this.loc.clone(e), e ).resolvedOptions(this); return { locale: n, numberingSystem: i, outputCalendar: r }; } // TRANSFORM /** * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. * * Equivalent to {@link DateTime#setZone}('utc') * @param {number} [offset=0] - optionally, an offset from UTC in minutes * @param {Object} [opts={}] - options to pass to `setZone()` * @return {DateTime} */ toUTC(e = 0, n = {}) { return this.setZone(Gr.instance(e), n); } /** * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. * * Equivalent to `setZone('local')` * @return {DateTime} */ toLocal() { return this.setZone(ti.defaultZone); } /** * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. * * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones. * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class. * @param {Object} opts - options * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. * @return {DateTime} */ setZone(e, { keepLocalTime: n = !1, keepCalendarTime: i = !1 } = {}) { if (e = vu(e, ti.defaultZone), e.equals(this.zone)) return this; if (e.isValid) { let r = this.ts; if (n || i) { const s = e.offset(this.ts), o = this.toObject(); [r] = ny(o, s, e); } return Dc(this, { ts: r, zone: e }); } else return ht.invalid(Jm(e)); } /** * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. * @param {Object} properties - the properties to set * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) * @return {DateTime} */ reconfigure({ locale: e, numberingSystem: n, outputCalendar: i } = {}) { const r = this.loc.clone({ locale: e, numberingSystem: n, outputCalendar: i }); return Dc(this, { loc: r }); } /** * "Set" the locale. Returns a newly-constructed DateTime. * Just a convenient alias for reconfigure({ locale }) * @example DateTime.local(2017, 5, 25).setLocale('en-GB') * @return {DateTime} */ setLocale(e) { return this.reconfigure({ locale: e }); } /** * "Set" the values of specified units. Returns a newly-constructed DateTime. * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}. * * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`. * They cannot be mixed with ISO-week units like `weekday`. * @param {Object} values - a mapping of units to numbers * @example dt.set({ year: 2017 }) * @example dt.set({ hour: 8, minute: 30 }) * @example dt.set({ weekday: 5 }) * @example dt.set({ year: 2005, ordinal: 234 }) * @return {DateTime} */ set(e) { if (!this.isValid) return this; const n = fw(e, rN), { minDaysInFirstWeek: i, startOfWeek: r } = U7(n, this.loc), s = !yt(n.weekYear) || !yt(n.weekNumber) || !yt(n.weekday), o = !yt(n.ordinal), a = !yt(n.year), l = !yt(n.month) || !yt(n.day), u = a || l, f = n.weekYear || n.weekNumber; if ((u || o) && f) throw new Gd( "Can't mix weekYear/weekNumber units with year/month/day or ordinals" ); if (l && o) throw new Gd("Can't mix ordinal dates with month/day"); let d; s ? d = H7( { ...uw(this.c, i, r), ...n }, i, r ) : yt(n.ordinal) ? (d = { ...this.toObject(), ...n }, yt(n.day) && (d.day = Math.min(cw(d.year, d.month), d.day))) : d = Q7({ ...I3(this.c), ...n }); const [h, m] = ny(d, this.o, this.zone); return Dc(this, { ts: h, o: m }); } /** * Add a period of time to this DateTime and return the resulting DateTime * * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() * @example DateTime.now().plus(123) //~> in 123 milliseconds * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min * @return {DateTime} */ plus(e) { if (!this.isValid) return this; const n = Ht.fromDurationLike(e); return Dc(this, nN(this, n)); } /** * Subtract a period of time to this DateTime and return the resulting DateTime * See {@link DateTime#plus} * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() @return {DateTime} */ minus(e) { if (!this.isValid) return this; const n = Ht.fromDurationLike(e).negate(); return Dc(this, nN(this, n)); } /** * "Set" this DateTime to the beginning of a unit of time. * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. * @param {Object} opts - options * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' * @return {DateTime} */ startOf(e, { useLocaleWeeks: n = !1 } = {}) { if (!this.isValid) return this; const i = {}, r = Ht.normalizeUnit(e); switch (r) { case "years": i.month = 1; case "quarters": case "months": i.day = 1; case "weeks": case "days": i.hour = 0; case "hours": i.minute = 0; case "minutes": i.second = 0; case "seconds": i.millisecond = 0; break; } if (r === "weeks") if (n) { const s = this.loc.getStartOfWeek(), { weekday: o } = this; o < s && (i.weekNumber = this.weekNumber - 1), i.weekday = s; } else i.weekday = 1; if (r === "quarters") { const s = Math.ceil(this.month / 3); i.month = (s - 1) * 3 + 1; } return this.set(i); } /** * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. * @param {Object} opts - options * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' * @return {DateTime} */ endOf(e, n) { return this.isValid ? this.plus({ [e]: 1 }).startOf(e, n).minus(1) : this; } // OUTPUT /** * Returns a string representation of this DateTime formatted according to the specified format string. * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens). * Defaults to en-US if no locale has been specified, regardless of the system's locale. * @param {string} fmt - the format string * @param {Object} opts - opts to override the configuration options on this DateTime * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22' * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' * @return {string} */ toFormat(e, n = {}) { return this.isValid ? $r.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : R3; } /** * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation * of the DateTime in the assigned locale. * Defaults to the system's locale if no locale has been specified * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options * @param {Object} opts - opts to override the configuration options on this DateTime * @example DateTime.now().toLocaleString(); //=> 4/20/2017 * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022' * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' * @return {string} */ toLocaleString(e = lw, n = {}) { return this.isValid ? $r.create(this.loc.clone(n), e).formatDateTime(this) : R3; } /** * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. * Defaults to the system's locale if no locale has been specified * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. * @example DateTime.now().toLocaleParts(); //=> [ * //=> { type: 'day', value: '25' }, * //=> { type: 'literal', value: '/' }, * //=> { type: 'month', value: '05' }, * //=> { type: 'literal', value: '/' }, * //=> { type: 'year', value: '1982' } * //=> ] */ toLocaleParts(e = {}) { return this.isValid ? $r.create(this.loc.clone(e), e).formatDateTimeParts(this) : []; } /** * Returns an ISO 8601-compliant string representation of this DateTime * @param {Object} opts - options * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' * @param {boolean} [opts.extendedZone=false] - add the time zone format extension * @param {string} [opts.format='extended'] - choose between the basic and extended format * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00' * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' * @return {string} */ toISO({ format: e = "extended", suppressSeconds: n = !1, suppressMilliseconds: i = !1, includeOffset: r = !0, extendedZone: s = !1 } = {}) { if (!this.isValid) return null; const o = e === "extended"; let a = B3(this, o); return a += "T", a += iN(this, o, n, i, r, s), a; } /** * Returns an ISO 8601-compliant string representation of this DateTime's date component * @param {Object} opts - options * @param {string} [opts.format='extended'] - choose between the basic and extended format * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' * @return {string} */ toISODate({ format: e = "extended" } = {}) { return this.isValid ? B3(this, e === "extended") : null; } /** * Returns an ISO 8601-compliant string representation of this DateTime's week date * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' * @return {string} */ toISOWeekDate() { return ob(this, "kkkk-'W'WW-c"); } /** * Returns an ISO 8601-compliant string representation of this DateTime's time component * @param {Object} opts - options * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' * @param {boolean} [opts.extendedZone=true] - add the time zone format extension * @param {boolean} [opts.includePrefix=false] - include the `T` prefix * @param {string} [opts.format='extended'] - choose between the basic and extended format * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z' * @return {string} */ toISOTime({ suppressMilliseconds: e = !1, suppressSeconds: n = !1, includeOffset: i = !0, includePrefix: r = !1, extendedZone: s = !1, format: o = "extended" } = {}) { return this.isValid ? (r ? "T" : "") + iN( this, o === "extended", n, e, i, s ) : null; } /** * Returns an RFC 2822-compatible string representation of this DateTime * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' * @return {string} */ toRFC2822() { return ob(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1); } /** * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT. * Specifically, the string conforms to RFC 1123. * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' * @return {string} */ toHTTP() { return ob(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); } /** * Returns a string representation of this DateTime appropriate for use in SQL Date * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' * @return {string} */ toSQLDate() { return this.isValid ? B3(this, !0) : null; } /** * Returns a string representation of this DateTime appropriate for use in SQL Time * @param {Object} opts - options * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' * @example DateTime.utc().toSQL() //=> '05:15:16.345' * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00' * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345' * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' * @return {string} */ toSQLTime({ includeOffset: e = !0, includeZone: n = !1, includeOffsetSpace: i = !0 } = {}) { let r = "HH:mm:ss.SSS"; return (n || e) && (i && (r += " "), n ? r += "z" : e && (r += "ZZ")), ob(this, r, !0); } /** * Returns a string representation of this DateTime appropriate for use in SQL DateTime * @param {Object} opts - options * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' * @return {string} */ toSQL(e = {}) { return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null; } /** * Returns a string representation of this DateTime appropriate for debugging * @return {string} */ toString() { return this.isValid ? this.toISO() : R3; } /** * Returns a string representation of this DateTime appropriate for the REPL. * @return {string} */ [Symbol.for("nodejs.util.inspect.custom")]() { return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`; } /** * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis} * @return {number} */ valueOf() { return this.toMillis(); } /** * Returns the epoch milliseconds of this DateTime. * @return {number} */ toMillis() { return this.isValid ? this.ts : NaN; } /** * Returns the epoch seconds of this DateTime. * @return {number} */ toSeconds() { return this.isValid ? this.ts / 1e3 : NaN; } /** * Returns the epoch seconds (as a whole number) of this DateTime. * @return {number} */ toUnixInteger() { return this.isValid ? Math.floor(this.ts / 1e3) : NaN; } /** * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. * @return {string} */ toJSON() { return this.toISO(); } /** * Returns a BSON serializable equivalent to this DateTime. * @return {Date} */ toBSON() { return this.toJSDate(); } /** * Returns a JavaScript object with this DateTime's year, month, day, and so on. * @param opts - options for generating the object * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } * @return {Object} */ toObject(e = {}) { if (!this.isValid) return {}; const n = { ...this.c }; return e.includeConfig && (n.outputCalendar = this.outputCalendar, n.numberingSystem = this.loc.numberingSystem, n.locale = this.loc.locale), n; } /** * Returns a JavaScript Date equivalent to this DateTime. * @return {Date} */ toJSDate() { return new Date(this.isValid ? this.ts : NaN); } // COMPARE /** * Return the difference between two DateTimes as a Duration. * @param {DateTime} otherDateTime - the DateTime to compare this one to * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. * @param {Object} opts - options that affect the creation of the Duration * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use * @example * var i1 = DateTime.fromISO('1982-05-25T09:45'), * i2 = DateTime.fromISO('1983-10-14T10:30'); * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } * @return {Duration} */ diff(e, n = "milliseconds", i = {}) { if (!this.isValid || !e.isValid) return Ht.invalid("created by diffing an invalid DateTime"); const r = { locale: this.locale, numberingSystem: this.numberingSystem, ...i }, s = cce(n).map(Ht.normalizeUnit), o = e.valueOf() > this.valueOf(), a = o ? this : e, l = o ? e : this, u = pfe(a, l, s, r); return o ? u.negate() : u; } /** * Return the difference between this DateTime and right now. * See {@link DateTime#diff} * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration * @param {Object} opts - options that affect the creation of the Duration * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use * @return {Duration} */ diffNow(e = "milliseconds", n = {}) { return this.diff(ht.now(), e, n); } /** * Return an Interval spanning between this DateTime and another DateTime * @param {DateTime} otherDateTime - the other end point of the Interval * @return {Interval} */ until(e) { return this.isValid ? ei.fromDateTimes(this, e) : this; } /** * Return whether this DateTime is in the same unit of time as another DateTime. * Higher-order units must also be identical for this function to return `true`. * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed. * @param {DateTime} otherDateTime - the other DateTime * @param {string} unit - the unit of time to check sameness on * @param {Object} opts - options * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day * @return {boolean} */ hasSame(e, n, i) { if (!this.isValid) return !1; const r = e.valueOf(), s = this.setZone(e.zone, { keepLocalTime: !0 }); return s.startOf(n, i) <= r && r <= s.endOf(n, i); } /** * Equality check * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid. * To compare just the millisecond values, use `+dt1 === +dt2`. * @param {DateTime} other - the other DateTime * @return {boolean} */ equals(e) { return this.isValid && e.isValid && this.valueOf() === e.valueOf() && this.zone.equals(e.zone) && this.loc.equals(e.loc); } /** * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your * platform supports Intl.RelativeTimeFormat. Rounds down by default. * @param {Object} options - options that affect the output * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" * @param {boolean} [options.round=true] - whether to round the numbers in the output. * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. * @param {string} options.locale - override the locale of this DateTime * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day" * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago" * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" */ toRelative(e = {}) { if (!this.isValid) return null; const n = e.base || ht.fromObject({}, { zone: this.zone }), i = e.padding ? this < n ? -e.padding : e.padding : 0; let r = ["years", "months", "days", "hours", "minutes", "seconds"], s = e.unit; return Array.isArray(e.unit) && (r = e.unit, s = void 0), oN(n, this.plus(i), { ...e, numeric: "always", units: r, unit: s }); } /** * Returns a string representation of this date relative to today, such as "yesterday" or "next month". * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. * @param {Object} options - options that affect the output * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. * @param {string} options.locale - override the locale of this DateTime * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" */ toRelativeCalendar(e = {}) { return this.isValid ? oN(e.base || ht.fromObject({}, { zone: this.zone }), this, { ...e, numeric: "auto", units: ["years", "months", "days"], calendary: !0 }) : null; } /** * Return the min of several date times * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum * @return {DateTime} the min DateTime, or undefined if called with no argument */ static min(...e) { if (!e.every(ht.isDateTime)) throw new Sr("min requires all arguments be DateTimes"); return Z7(e, (n) => n.valueOf(), Math.min); } /** * Return the max of several date times * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum * @return {DateTime} the max DateTime, or undefined if called with no argument */ static max(...e) { if (!e.every(ht.isDateTime)) throw new Sr("max requires all arguments be DateTimes"); return Z7(e, (n) => n.valueOf(), Math.max); } // MISC /** * Explain how a string would be parsed by fromFormat() * @param {string} text - the string to parse * @param {string} fmt - the format the string is expected to be in (see description) * @param {Object} options - options taken by fromFormat() * @return {Object} */ static fromFormatExplain(e, n, i = {}) { const { locale: r = null, numberingSystem: s = null } = i, o = Gt.fromOpts({ locale: r, numberingSystem: s, defaultToEN: !0 }); return Ez(o, e, n); } /** * @deprecated use fromFormatExplain instead */ static fromStringExplain(e, n, i = {}) { return ht.fromFormatExplain(e, n, i); } /** * Build a parser for `fmt` using the given locale. This parser can be passed * to {@link DateTime.fromFormatParser} to a parse a date in this format. This * can be used to optimize cases where many dates need to be parsed in a * specific format. * * @param {String} fmt - the format the string is expected to be in (see * description) * @param {Object} options - options used to set locale and numberingSystem * for parser * @returns {TokenParser} - opaque object to be used */ static buildFormatParser(e, n = {}) { const { locale: i = null, numberingSystem: r = null } = n, s = Gt.fromOpts({ locale: i, numberingSystem: r, defaultToEN: !0 }); return new Cz(s, e); } /** * Create a DateTime from an input string and format parser. * * The format parser must have been created with the same locale as this call. * * @param {String} text - the string to parse * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser} * @param {Object} opts - options taken by fromFormat() * @returns {DateTime} */ static fromFormatParser(e, n, i = {}) { if (yt(e) || yt(n)) throw new Sr( "fromFormatParser requires an input string and a format parser" ); const { locale: r = null, numberingSystem: s = null } = i, o = Gt.fromOpts({ locale: r, numberingSystem: s, defaultToEN: !0 }); if (!o.equals(n.locale)) throw new Sr( `fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}` ); const { result: a, zone: l, specificOffset: u, invalidReason: f } = n.explainFromTokens(e); return f ? ht.invalid(f) : Ed( a, l, i, `format ${n.format}`, e, u ); } // FORMAT PRESETS /** * {@link DateTime#toLocaleString} format like 10/14/1983 * @type {Object} */ static get DATE_SHORT() { return lw; } /** * {@link DateTime#toLocaleString} format like 'Oct 14, 1983' * @type {Object} */ static get DATE_MED() { return DB; } /** * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983' * @type {Object} */ static get DATE_MED_WITH_WEEKDAY() { return Lue; } /** * {@link DateTime#toLocaleString} format like 'October 14, 1983' * @type {Object} */ static get DATE_FULL() { return PB; } /** * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983' * @type {Object} */ static get DATE_HUGE() { return IB; } /** * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. * @type {Object} */ static get TIME_SIMPLE() { return LB; } /** * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. * @type {Object} */ static get TIME_WITH_SECONDS() { return RB; } /** * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. * @type {Object} */ static get TIME_WITH_SHORT_OFFSET() { return jB; } /** * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. * @type {Object} */ static get TIME_WITH_LONG_OFFSET() { return FB; } /** * {@link DateTime#toLocaleString} format like '09:30', always 24-hour. * @type {Object} */ static get TIME_24_SIMPLE() { return BB; } /** * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour. * @type {Object} */ static get TIME_24_WITH_SECONDS() { return zB; } /** * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour. * @type {Object} */ static get TIME_24_WITH_SHORT_OFFSET() { return WB; } /** * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. * @type {Object} */ static get TIME_24_WITH_LONG_OFFSET() { return HB; } /** * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_SHORT() { return QB; } /** * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_SHORT_WITH_SECONDS() { return UB; } /** * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_MED() { return ZB; } /** * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_MED_WITH_SECONDS() { return qB; } /** * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_MED_WITH_WEEKDAY() { return Rue; } /** * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_FULL() { return YB; } /** * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_FULL_WITH_SECONDS() { return VB; } /** * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_HUGE() { return XB; } /** * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. * @type {Object} */ static get DATETIME_HUGE_WITH_SECONDS() { return GB; } } function Cm(t) { if (ht.isDateTime(t)) return t; if (t && t.valueOf && Du(t.valueOf())) return ht.fromJSDate(t); if (t && typeof t == "object") return ht.fromObject(t); throw new Sr( `Unknown datetime argument: ${t}, of type ${typeof t}` ); } var Pfe = typeof on == "object" && on && on.Object === Object && on, Az = Pfe, Ife = Az, Lfe = typeof self == "object" && self && self.Object === Object && self, Rfe = Ife || Lfe || Function("return this")(), qo = Rfe, jfe = qo, Ffe = jfe.Symbol, rp = Ffe; function Bfe(t, e) { var n = -1, i = t.length; for (e || (e = Array(i)); ++n < i; ) e[n] = t[n]; return e; } var Dz = Bfe, lN = rp, Pz = Object.prototype, zfe = Pz.hasOwnProperty, Wfe = Pz.toString, Em = lN ? lN.toStringTag : void 0; function Hfe(t) { var e = zfe.call(t, Em), n = t[Em]; try { t[Em] = void 0; var i = !0; } catch { } var r = Wfe.call(t); return i && (e ? t[Em] = n : delete t[Em]), r; } var Qfe = Hfe, Ufe = Object.prototype, Zfe = Ufe.toString; function qfe(t) { return Zfe.call(t); } var Yfe = qfe, uN = rp, Vfe = Qfe, Xfe = Yfe, Gfe = "[object Null]", Kfe = "[object Undefined]", cN = uN ? uN.toStringTag : void 0; function Jfe(t) { return t == null ? t === void 0 ? Kfe : Gfe : cN && cN in Object(t) ? Vfe(t) : Xfe(t); } var sp = Jfe; function ede(t) { var e = typeof t; return t != null && (e == "object" || e == "function"); } var Ll = ede, tde = sp, nde = Ll, ide = "[object AsyncFunction]", rde = "[object Function]", sde = "[object GeneratorFunction]", ode = "[object Proxy]"; function ade(t) { if (!nde(t)) return !1; var e = tde(t); return e == rde || e == sde || e == ide || e == ode; } var Iz = ade, lde = qo, ude = lde["__core-js_shared__"], cde = ude, z3 = cde, fN = function() { var t = /[^.]+$/.exec(z3 && z3.keys && z3.keys.IE_PROTO || ""); return t ? "Symbol(src)_1." + t : ""; }(); function fde(t) { return !!fN && fN in t; } var dde = fde, hde = Function.prototype, pde = hde.toString; function mde(t) { if (t != null) { try { return pde.call(t); } catch { } try { return t + ""; } catch { } } return ""; } var Lz = mde, gde = Iz, vde = dde, bde = Ll, yde = Lz, wde = /[\\^$.*+?()[\]{}|]/g, kde = /^\[object .+?Constructor\]$/, xde = Function.prototype, _de = Object.prototype, Ode = xde.toString, Sde = _de.hasOwnProperty, Cde = RegExp( "^" + Ode.call(Sde).replace(wde, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Ede(t) { if (!bde(t) || vde(t)) return !1; var e = gde(t) ? Cde : kde; return e.test(yde(t)); } var Tde = Ede; function $de(t, e) { return t == null ? void 0 : t[e]; } var Mde = $de, Nde = Tde, Ade = Mde; function Dde(t, e) { var n = Ade(t, e); return Nde(n) ? n : void 0; } var Df = Dde, Pde = Df, Ide = qo, Lde = Pde(Ide, "DataView"), Rde = Lde, jde = Df, Fde = qo, Bde = jde(Fde, "Map"), B5 = Bde, zde = Df, Wde = qo, Hde = zde(Wde, "Promise"), Qde = Hde, Ude = Df, Zde = qo, qde = Ude(Zde, "Set"), Yde = qde, Vde = Df, Xde = qo, Gde = Vde(Xde, "WeakMap"), Kde = Gde, b4 = Rde, y4 = B5, w4 = Qde, k4 = Yde, x4 = Kde, Rz = sp, op = Lz, dN = "[object Map]", Jde = "[object Object]", hN = "[object Promise]", pN = "[object Set]", mN = "[object WeakMap]", gN = "[object DataView]", ehe = op(b4), the = op(y4), nhe = op(w4), ihe = op(k4), rhe = op(x4), Rc = Rz; (b4 && Rc(new b4(new ArrayBuffer(1))) != gN || y4 && Rc(new y4()) != dN || w4 && Rc(w4.resolve()) != hN || k4 && Rc(new k4()) != pN || x4 && Rc(new x4()) != mN) && (Rc = function(t) { var e = Rz(t), n = e == Jde ? t.constructor : void 0, i = n ? op(n) : ""; if (i) switch (i) { case ehe: return gN; case the: return dN; case nhe: return hN; case ihe: return pN; case rhe: return mN; } return e; }); var i2 = Rc, she = 9007199254740991; function ohe(t) { return typeof t == "number" && t > -1 && t % 1 == 0 && t <= she; } var z5 = ohe, ahe = Iz, lhe = z5; function uhe(t) { return t != null && lhe(t.length) && !ahe(t); } var W5 = uhe, che = Array.isArray, Rl = che; function fhe(t) { return t != null && typeof t == "object"; } var Pf = fhe, dhe = sp, hhe = Rl, phe = Pf, mhe = "[object String]"; function ghe(t) { return typeof t == "string" || !hhe(t) && phe(t) && dhe(t) == mhe; } var vhe = ghe; function bhe(t) { for (var e, n = []; !(e = t.next()).done; ) n.push(e.value); return n; } var yhe = bhe; function whe(t) { var e = -1, n = Array(t.size); return t.forEach(function(i, r) { n[++e] = [r, i]; }), n; } var khe = whe; function xhe(t) { var e = -1, n = Array(t.size); return t.forEach(function(i) { n[++e] = i; }), n; } var _he = xhe; function Ohe(t) { return t.split(""); } var She = Ohe, Che = "\\ud800-\\udfff", Ehe = "\\u0300-\\u036f", The = "\\ufe20-\\ufe2f", $he = "\\u20d0-\\u20ff", Mhe = Ehe + The + $he, Nhe = "\\ufe0e\\ufe0f", Ahe = "\\u200d", Dhe = RegExp("[" + Ahe + Che + Mhe + Nhe + "]"); function Phe(t) { return Dhe.test(t); } var Ihe = Phe, jz = "\\ud800-\\udfff", Lhe = "\\u0300-\\u036f", Rhe = "\\ufe20-\\ufe2f", jhe = "\\u20d0-\\u20ff", Fhe = Lhe + Rhe + jhe, Bhe = "\\ufe0e\\ufe0f", zhe = "[" + jz + "]", _4 = "[" + Fhe + "]", O4 = "\\ud83c[\\udffb-\\udfff]", Whe = "(?:" + _4 + "|" + O4 + ")", Fz = "[^" + jz + "]", Bz = "(?:\\ud83c[\\udde6-\\uddff]){2}", zz = "[\\ud800-\\udbff][\\udc00-\\udfff]", Hhe = "\\u200d", Wz = Whe + "?", Hz = "[" + Bhe + "]?", Qhe = "(?:" + Hhe + "(?:" + [Fz, Bz, zz].join("|") + ")" + Hz + Wz + ")*", Uhe = Hz + Wz + Qhe, Zhe = "(?:" + [Fz + _4 + "?", _4, Bz, zz, zhe].join("|") + ")", qhe = RegExp(O4 + "(?=" + O4 + ")|" + Zhe + Uhe, "g"); function Yhe(t) { return t.match(qhe) || []; } var Vhe = Yhe, Xhe = She, Ghe = Ihe, Khe = Vhe; function Jhe(t) { return Ghe(t) ? Khe(t) : Xhe(t); } var epe = Jhe; function tpe(t, e) { for (var n = -1, i = t == null ? 0 : t.length, r = Array(i); ++n < i; ) r[n] = e(t[n], n, t); return r; } var Qz = tpe, npe = Qz; function ipe(t, e) { return npe(e, function(n) { return t[n]; }); } var rpe = ipe; function spe(t, e) { for (var n = -1, i = Array(t); ++n < t; ) i[n] = e(n); return i; } var ope = spe, ape = sp, lpe = Pf, upe = "[object Arguments]"; function cpe(t) { return lpe(t) && ape(t) == upe; } var fpe = cpe, vN = fpe, dpe = Pf, Uz = Object.prototype, hpe = Uz.hasOwnProperty, ppe = Uz.propertyIsEnumerable, mpe = vN(/* @__PURE__ */ function() { return arguments; }()) ? vN : function(t) { return dpe(t) && hpe.call(t, "callee") && !ppe.call(t, "callee"); }, H5 = mpe, dw = { exports: {} }; function gpe() { return !1; } var vpe = gpe; dw.exports; (function(t, e) { var n = qo, i = vpe, r = e && !e.nodeType && e, s = r && !0 && t && !t.nodeType && t, o = s && s.exports === r, a = o ? n.Buffer : void 0, l = a ? a.isBuffer : void 0, u = l || i; t.exports = u; })(dw, dw.exports); var Zz = dw.exports, bpe = 9007199254740991, ype = /^(?:0|[1-9]\d*)$/; function wpe(t, e) { var n = typeof t; return e = e ?? bpe, !!e && (n == "number" || n != "symbol" && ype.test(t)) && t > -1 && t % 1 == 0 && t < e; } var Q5 = wpe, kpe = sp, xpe = z5, _pe = Pf, Ope = "[object Arguments]", Spe = "[object Array]", Cpe = "[object Boolean]", Epe = "[object Date]", Tpe = "[object Error]", $pe = "[object Function]", Mpe = "[object Map]", Npe = "[object Number]", Ape = "[object Object]", Dpe = "[object RegExp]", Ppe = "[object Set]", Ipe = "[object String]", Lpe = "[object WeakMap]", Rpe = "[object ArrayBuffer]", jpe = "[object DataView]", Fpe = "[object Float32Array]", Bpe = "[object Float64Array]", zpe = "[object Int8Array]", Wpe = "[object Int16Array]", Hpe = "[object Int32Array]", Qpe = "[object Uint8Array]", Upe = "[object Uint8ClampedArray]", Zpe = "[object Uint16Array]", qpe = "[object Uint32Array]", xn = {}; xn[Fpe] = xn[Bpe] = xn[zpe] = xn[Wpe] = xn[Hpe] = xn[Qpe] = xn[Upe] = xn[Zpe] = xn[qpe] = !0; xn[Ope] = xn[Spe] = xn[Rpe] = xn[Cpe] = xn[jpe] = xn[Epe] = xn[Tpe] = xn[$pe] = xn[Mpe] = xn[Npe] = xn[Ape] = xn[Dpe] = xn[Ppe] = xn[Ipe] = xn[Lpe] = !1; function Ype(t) { return _pe(t) && xpe(t.length) && !!xn[kpe(t)]; } var Vpe = Ype; function Xpe(t) { return function(e) { return t(e); }; } var U5 = Xpe, hw = { exports: {} }; hw.exports; (function(t, e) { var n = Az, i = e && !e.nodeType && e, r = i && !0 && t && !t.nodeType && t, s = r && r.exports === i, o = s && n.process, a = function() { try { var l = r && r.require && r.require("util").types; return l || o && o.binding && o.binding("util"); } catch { } }(); t.exports = a; })(hw, hw.exports); var Z5 = hw.exports, Gpe = Vpe, Kpe = U5, bN = Z5, yN = bN && bN.isTypedArray, Jpe = yN ? Kpe(yN) : Gpe, eme = Jpe, tme = ope, nme = H5, ime = Rl, rme = Zz, sme = Q5, ome = eme, ame = Object.prototype, lme = ame.hasOwnProperty; function ume(t, e) { var n = ime(t), i = !n && nme(t), r = !n && !i && rme(t), s = !n && !i && !r && ome(t), o = n || i || r || s, a = o ? tme(t.length, String) : [], l = a.length; for (var u in t) (e || lme.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. r && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. s && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. sme(u, l))) && a.push(u); return a; } var qz = ume, cme = Object.prototype; function fme(t) { var e = t && t.constructor, n = typeof e == "function" && e.prototype || cme; return t === n; } var q5 = fme; function dme(t, e) { return function(n) { return t(e(n)); }; } var Yz = dme, hme = Yz, pme = hme(Object.keys, Object), mme = pme, gme = q5, vme = mme, bme = Object.prototype, yme = bme.hasOwnProperty; function wme(t) { if (!gme(t)) return vme(t); var e = []; for (var n in Object(t)) yme.call(t, n) && n != "constructor" && e.push(n); return e; } var kme = wme, xme = qz, _me = kme, Ome = W5; function Sme(t) { return Ome(t) ? xme(t) : _me(t); } var r2 = Sme, Cme = rpe, Eme = r2; function Tme(t) { return t == null ? [] : Cme(t, Eme(t)); } var $me = Tme, wN = rp, Mme = Dz, Nme = i2, Ame = W5, Dme = vhe, Pme = yhe, Ime = khe, Lme = _he, Rme = epe, jme = $me, Fme = "[object Map]", Bme = "[object Set]", W3 = wN ? wN.iterator : void 0; function zme(t) { if (!t) return []; if (Ame(t)) return Dme(t) ? Rme(t) : Mme(t); if (W3 && t[W3]) return Pme(t[W3]()); var e = Nme(t), n = e == Fme ? Ime : e == Bme ? Lme : jme; return n(t); } var Wme = zme; const Hme = /* @__PURE__ */ Gs(Wme); function Qme() { this.__data__ = [], this.size = 0; } var Ume = Qme; function Zme(t, e) { return t === e || t !== t && e !== e; } var Vz = Zme, qme = Vz; function Yme(t, e) { for (var n = t.length; n--; ) if (qme(t[n][0], e)) return n; return -1; } var s2 = Yme, Vme = s2, Xme = Array.prototype, Gme = Xme.splice; function Kme(t) { var e = this.__data__, n = Vme(e, t); if (n < 0) return !1; var i = e.length - 1; return n == i ? e.pop() : Gme.call(e, n, 1), --this.size, !0; } var Jme = Kme, ege = s2; function tge(t) { var e = this.__data__, n = ege(e, t); return n < 0 ? void 0 : e[n][1]; } var nge = tge, ige = s2; function rge(t) { return ige(this.__data__, t) > -1; } var sge = rge, oge = s2; function age(t, e) { var n = this.__data__, i = oge(n, t); return i < 0 ? (++this.size, n.push([t, e])) : n[i][1] = e, this; } var lge = age, uge = Ume, cge = Jme, fge = nge, dge = sge, hge = lge; function ap(t) { var e = -1, n = t == null ? 0 : t.length; for (this.clear(); ++e < n; ) { var i = t[e]; this.set(i[0], i[1]); } } ap.prototype.clear = uge; ap.prototype.delete = cge; ap.prototype.get = fge; ap.prototype.has = dge; ap.prototype.set = hge; var o2 = ap, pge = o2; function mge() { this.__data__ = new pge(), this.size = 0; } var gge = mge; function vge(t) { var e = this.__data__, n = e.delete(t); return this.size = e.size, n; } var bge = vge; function yge(t) { return this.__data__.get(t); } var wge = yge; function kge(t) { return this.__data__.has(t); } var xge = kge, _ge = Df, Oge = _ge(Object, "create"), a2 = Oge, kN = a2; function Sge() { this.__data__ = kN ? kN(null) : {}, this.size = 0; } var Cge = Sge; function Ege(t) { var e = this.has(t) && delete this.__data__[t]; return this.size -= e ? 1 : 0, e; } var Tge = Ege, $ge = a2, Mge = "__lodash_hash_undefined__", Nge = Object.prototype, Age = Nge.hasOwnProperty; function Dge(t) { var e = this.__data__; if ($ge) { var n = e[t]; return n === Mge ? void 0 : n; } return Age.call(e, t) ? e[t] : void 0; } var Pge = Dge, Ige = a2, Lge = Object.prototype, Rge = Lge.hasOwnProperty; function jge(t) { var e = this.__data__; return Ige ? e[t] !== void 0 : Rge.call(e, t); } var Fge = jge, Bge = a2, zge = "__lodash_hash_undefined__"; function Wge(t, e) { var n = this.__data__; return this.size += this.has(t) ? 0 : 1, n[t] = Bge && e === void 0 ? zge : e, this; } var Hge = Wge, Qge = Cge, Uge = Tge, Zge = Pge, qge = Fge, Yge = Hge; function lp(t) { var e = -1, n = t == null ? 0 : t.length; for (this.clear(); ++e < n; ) { var i = t[e]; this.set(i[0], i[1]); } } lp.prototype.clear = Qge; lp.prototype.delete = Uge; lp.prototype.get = Zge; lp.prototype.has = qge; lp.prototype.set = Yge; var Vge = lp, xN = Vge, Xge = o2, Gge = B5; function Kge() { this.size = 0, this.__data__ = { hash: new xN(), map: new (Gge || Xge)(), string: new xN() }; } var Jge = Kge; function e0e(t) { var e = typeof t; return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null; } var t0e = e0e, n0e = t0e; function i0e(t, e) { var n = t.__data__; return n0e(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map; } var l2 = i0e, r0e = l2; function s0e(t) { var e = r0e(this, t).delete(t); return this.size -= e ? 1 : 0, e; } var o0e = s0e, a0e = l2; function l0e(t) { return a0e(this, t).get(t); } var u0e = l0e, c0e = l2; function f0e(t) { return c0e(this, t).has(t); } var d0e = f0e, h0e = l2; function p0e(t, e) { var n = h0e(this, t), i = n.size; return n.set(t, e), this.size += n.size == i ? 0 : 1, this; } var m0e = p0e, g0e = Jge, v0e = o0e, b0e = u0e, y0e = d0e, w0e = m0e; function up(t) { var e = -1, n = t == null ? 0 : t.length; for (this.clear(); ++e < n; ) { var i = t[e]; this.set(i[0], i[1]); } } up.prototype.clear = g0e; up.prototype.delete = v0e; up.prototype.get = b0e; up.prototype.has = y0e; up.prototype.set = w0e; var Xz = up, k0e = o2, x0e = B5, _0e = Xz, O0e = 200; function S0e(t, e) { var n = this.__data__; if (n instanceof k0e) { var i = n.__data__; if (!x0e || i.length < O0e - 1) return i.push([t, e]), this.size = ++n.size, this; n = this.__data__ = new _0e(i); } return n.set(t, e), this.size = n.size, this; } var C0e = S0e, E0e = o2, T0e = gge, $0e = bge, M0e = wge, N0e = xge, A0e = C0e; function cp(t) { var e = this.__data__ = new E0e(t); this.size = e.size; } cp.prototype.clear = T0e; cp.prototype.delete = $0e; cp.prototype.get = M0e; cp.prototype.has = N0e; cp.prototype.set = A0e; var D0e = cp; function P0e(t, e) { for (var n = -1, i = t == null ? 0 : t.length; ++n < i && e(t[n], n, t) !== !1; ) ; return t; } var I0e = P0e, L0e = Df, R0e = function() { try { var t = L0e(Object, "defineProperty"); return t({}, "", {}), t; } catch { } }(), Gz = R0e, _N = Gz; function j0e(t, e, n) { e == "__proto__" && _N ? _N(t, e, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : t[e] = n; } var Kz = j0e, F0e = Kz, B0e = Vz, z0e = Object.prototype, W0e = z0e.hasOwnProperty; function H0e(t, e, n) { var i = t[e]; (!(W0e.call(t, e) && B0e(i, n)) || n === void 0 && !(e in t)) && F0e(t, e, n); } var Y5 = H0e, Q0e = Y5, U0e = Kz; function Z0e(t, e, n, i) { var r = !n; n || (n = {}); for (var s = -1, o = e.length; ++s < o; ) { var a = e[s], l = i ? i(n[a], t[a], a, n, t) : void 0; l === void 0 && (l = t[a]), r ? U0e(n, a, l) : Q0e(n, a, l); } return n; } var u2 = Z0e, q0e = u2, Y0e = r2; function V0e(t, e) { return t && q0e(e, Y0e(e), t); } var X0e = V0e; function G0e(t) { var e = []; if (t != null) for (var n in Object(t)) e.push(n); return e; } var K0e = G0e, J0e = Ll, e1e = q5, t1e = K0e, n1e = Object.prototype, i1e = n1e.hasOwnProperty; function r1e(t) { if (!J0e(t)) return t1e(t); var e = e1e(t), n = []; for (var i in t) i == "constructor" && (e || !i1e.call(t, i)) || n.push(i); return n; } var s1e = r1e, o1e = qz, a1e = s1e, l1e = W5; function u1e(t) { return l1e(t) ? o1e(t, !0) : a1e(t); } var V5 = u1e, c1e = u2, f1e = V5; function d1e(t, e) { return t && c1e(e, f1e(e), t); } var h1e = d1e, pw = { exports: {} }; pw.exports; (function(t, e) { var n = qo, i = e && !e.nodeType && e, r = i && !0 && t && !t.nodeType && t, s = r && r.exports === i, o = s ? n.Buffer : void 0, a = o ? o.allocUnsafe : void 0; function l(u, f) { if (f) return u.slice(); var d = u.length, h = a ? a(d) : new u.constructor(d); return u.copy(h), h; } t.exports = l; })(pw, pw.exports); var p1e = pw.exports; function m1e(t, e) { for (var n = -1, i = t == null ? 0 : t.length, r = 0, s = []; ++n < i; ) { var o = t[n]; e(o, n, t) && (s[r++] = o); } return s; } var g1e = m1e; function v1e() { return []; } var Jz = v1e, b1e = g1e, y1e = Jz, w1e = Object.prototype, k1e = w1e.propertyIsEnumerable, ON = Object.getOwnPropertySymbols, x1e = ON ? function(t) { return t == null ? [] : (t = Object(t), b1e(ON(t), function(e) { return k1e.call(t, e); })); } : y1e, X5 = x1e, _1e = u2, O1e = X5; function S1e(t, e) { return _1e(t, O1e(t), e); } var C1e = S1e; function E1e(t, e) { for (var n = -1, i = e.length, r = t.length; ++n < i; ) t[r + n] = e[n]; return t; } var G5 = E1e, T1e = Yz, $1e = T1e(Object.getPrototypeOf, Object), eW = $1e, M1e = G5, N1e = eW, A1e = X5, D1e = Jz, P1e = Object.getOwnPropertySymbols, I1e = P1e ? function(t) { for (var e = []; t; ) M1e(e, A1e(t)), t = N1e(t); return e; } : D1e, tW = I1e, L1e = u2, R1e = tW; function j1e(t, e) { return L1e(t, R1e(t), e); } var F1e = j1e, B1e = G5, z1e = Rl; function W1e(t, e, n) { var i = e(t); return z1e(t) ? i : B1e(i, n(t)); } var nW = W1e, H1e = nW, Q1e = X5, U1e = r2; function Z1e(t) { return H1e(t, U1e, Q1e); } var q1e = Z1e, Y1e = nW, V1e = tW, X1e = V5; function G1e(t) { return Y1e(t, X1e, V1e); } var K1e = G1e, J1e = Object.prototype, eve = J1e.hasOwnProperty; function tve(t) { var e = t.length, n = new t.constructor(e); return e && typeof t[0] == "string" && eve.call(t, "index") && (n.index = t.index, n.input = t.input), n; } var nve = tve, ive = qo, rve = ive.Uint8Array, sve = rve, SN = sve; function ove(t) { var e = new t.constructor(t.byteLength); return new SN(e).set(new SN(t)), e; } var K5 = ove, ave = K5; function lve(t, e) { var n = e ? ave(t.buffer) : t.buffer; return new t.constructor(n, t.byteOffset, t.byteLength); } var uve = lve, cve = /\w*$/; function fve(t) { var e = new t.constructor(t.source, cve.exec(t)); return e.lastIndex = t.lastIndex, e; } var dve = fve, CN = rp, EN = CN ? CN.prototype : void 0, TN = EN ? EN.valueOf : void 0; function hve(t) { return TN ? Object(TN.call(t)) : {}; } var pve = hve, mve = K5; function gve(t, e) { var n = e ? mve(t.buffer) : t.buffer; return new t.constructor(n, t.byteOffset, t.length); } var vve = gve, bve = K5, yve = uve, wve = dve, kve = pve, xve = vve, _ve = "[object Boolean]", Ove = "[object Date]", Sve = "[object Map]", Cve = "[object Number]", Eve = "[object RegExp]", Tve = "[object Set]", $ve = "[object String]", Mve = "[object Symbol]", Nve = "[object ArrayBuffer]", Ave = "[object DataView]", Dve = "[object Float32Array]", Pve = "[object Float64Array]", Ive = "[object Int8Array]", Lve = "[object Int16Array]", Rve = "[object Int32Array]", jve = "[object Uint8Array]", Fve = "[object Uint8ClampedArray]", Bve = "[object Uint16Array]", zve = "[object Uint32Array]"; function Wve(t, e, n) { var i = t.constructor; switch (e) { case Nve: return bve(t); case _ve: case Ove: return new i(+t); case Ave: return yve(t, n); case Dve: case Pve: case Ive: case Lve: case Rve: case jve: case Fve: case Bve: case zve: return xve(t, n); case Sve: return new i(); case Cve: case $ve: return new i(t); case Eve: return wve(t); case Tve: return new i(); case Mve: return kve(t); } } var Hve = Wve, Qve = Ll, $N = Object.create, Uve = /* @__PURE__ */ function() { function t() { } return function(e) { if (!Qve(e)) return {}; if ($N) return $N(e); t.prototype = e; var n = new t(); return t.prototype = void 0, n; }; }(), Zve = Uve, qve = Zve, Yve = eW, Vve = q5; function Xve(t) { return typeof t.constructor == "function" && !Vve(t) ? qve(Yve(t)) : {}; } var Gve = Xve, Kve = i2, Jve = Pf, ebe = "[object Map]"; function tbe(t) { return Jve(t) && Kve(t) == ebe; } var nbe = tbe, ibe = nbe, rbe = U5, MN = Z5, NN = MN && MN.isMap, sbe = NN ? rbe(NN) : ibe, obe = sbe, abe = i2, lbe = Pf, ube = "[object Set]"; function cbe(t) { return lbe(t) && abe(t) == ube; } var fbe = cbe, dbe = fbe, hbe = U5, AN = Z5, DN = AN && AN.isSet, pbe = DN ? hbe(DN) : dbe, mbe = pbe, gbe = D0e, vbe = I0e, bbe = Y5, ybe = X0e, wbe = h1e, kbe = p1e, xbe = Dz, _be = C1e, Obe = F1e, Sbe = q1e, Cbe = K1e, Ebe = i2, Tbe = nve, $be = Hve, Mbe = Gve, Nbe = Rl, Abe = Zz, Dbe = obe, Pbe = Ll, Ibe = mbe, Lbe = r2, Rbe = V5, jbe = 1, Fbe = 2, Bbe = 4, iW = "[object Arguments]", zbe = "[object Array]", Wbe = "[object Boolean]", Hbe = "[object Date]", Qbe = "[object Error]", rW = "[object Function]", Ube = "[object GeneratorFunction]", Zbe = "[object Map]", qbe = "[object Number]", sW = "[object Object]", Ybe = "[object RegExp]", Vbe = "[object Set]", Xbe = "[object String]", Gbe = "[object Symbol]", Kbe = "[object WeakMap]", Jbe = "[object ArrayBuffer]", eye = "[object DataView]", tye = "[object Float32Array]", nye = "[object Float64Array]", iye = "[object Int8Array]", rye = "[object Int16Array]", sye = "[object Int32Array]", oye = "[object Uint8Array]", aye = "[object Uint8ClampedArray]", lye = "[object Uint16Array]", uye = "[object Uint32Array]", ln = {}; ln[iW] = ln[zbe] = ln[Jbe] = ln[eye] = ln[Wbe] = ln[Hbe] = ln[tye] = ln[nye] = ln[iye] = ln[rye] = ln[sye] = ln[Zbe] = ln[qbe] = ln[sW] = ln[Ybe] = ln[Vbe] = ln[Xbe] = ln[Gbe] = ln[oye] = ln[aye] = ln[lye] = ln[uye] = !0; ln[Qbe] = ln[rW] = ln[Kbe] = !1; function sy(t, e, n, i, r, s) { var o, a = e & jbe, l = e & Fbe, u = e & Bbe; if (n && (o = r ? n(t, i, r, s) : n(t)), o !== void 0) return o; if (!Pbe(t)) return t; var f = Nbe(t); if (f) { if (o = Tbe(t), !a) return xbe(t, o); } else { var d = Ebe(t), h = d == rW || d == Ube; if (Abe(t)) return kbe(t, a); if (d == sW || d == iW || h && !r) { if (o = l || h ? {} : Mbe(t), !a) return l ? Obe(t, wbe(o, t)) : _be(t, ybe(o, t)); } else { if (!ln[d]) return r ? t : {}; o = $be(t, d, a); } } s || (s = new gbe()); var m = s.get(t); if (m) return m; s.set(t, o), Ibe(t) ? t.forEach(function(x) { o.add(sy(x, e, n, x, t, s)); }) : Dbe(t) && t.forEach(function(x, _) { o.set(_, sy(x, e, n, _, t, s)); }); var g = u ? l ? Cbe : Sbe : l ? Rbe : Lbe, w = f ? void 0 : g(t); return vbe(w || t, function(x, _) { w && (_ = x, x = t[_]), bbe(o, _, sy(x, e, n, _, t, s)); }), o; } var cye = sy, fye = cye, dye = 1, hye = 4; function pye(t) { return fye(t, dye | hye); } var mye = pye; const PN = /* @__PURE__ */ Gs(mye); var Ba = {}, jl = {}, J5 = {}, Gi = {}, et = N; let mw = /* @__PURE__ */ new Map(); function IN(t) { for (; t != null; ) { if (t.nodeType === Node.TEXT_NODE) return t; t = t.firstChild; } return null; } function LN(t) { let e = t.parentNode; if (e == null) throw Error("Should never happen"); return [e, Array.from(e.childNodes).indexOf(t)]; } function oW(t) { let e = {}; t = t.split(";"); for (let n of t) if (n !== "") { let [i, r] = n.split(/:([^]+)/); i && r && (e[i.trim()] = r.trim()); } return e; } function gw(t) { let e = mw.get(t); return e === void 0 && (e = oW(t), mw.set(t, e)), e; } function gye(t) { let e = ""; for (let n in t) n && (e += `${n}: ${t[n]};`); return e; } function Td(t, e) { let n = gw("getStyle" in t ? t.getStyle() : t.style); e = Object.entries(e).reduce((r, [s, o]) => (o instanceof Function ? r[s] = o(n[s]) : o === null ? delete r[s] : r[s] = o, r), { ...n }); let i = gye(e); t.setStyle(i), mw.set(i, e); } function vye(t) { for (; t !== null && !et.$isRootOrShadowRoot(t); ) { let e = t.getLatest(), n = t.getParent(); e.getChildrenSize() === 0 && t.remove(!0), t = n; } } function H3(t, e, n, i, r = null) { if (e.length !== 0) { var s = e[0], o = /* @__PURE__ */ new Map(), a = []; s = et.$isElementNode(s) ? s : s.getParentOrThrow(), s.isInline() && (s = s.getParentOrThrow()); for (var l = !1; s !== null; ) { var u = s.getPreviousSibling(); if (u !== null) { s = u, l = !0; break; } if (s = s.getParentOrThrow(), et.$isRootOrShadowRoot(s)) break; } u = /* @__PURE__ */ new Set(); for (var f = 0; f < n; f++) { var d = e[f]; et.$isElementNode(d) && d.getChildrenSize() === 0 && u.add(d.getKey()); } var h = /* @__PURE__ */ new Set(); for (f = 0; f < n; f++) { d = e[f]; var m = d.getParent(); if (m !== null && m.isInline() && (m = m.getParent()), m !== null && et.$isLeafNode(d) && !h.has(d.getKey())) { if (d = m.getKey(), o.get(d) === void 0) { let g = i(); g.setFormat(m.getFormatType()), g.setIndent(m.getIndent()), a.push(g), o.set(d, g), m.getChildren().forEach((w) => { g.append(w), h.add(w.getKey()), et.$isElementNode(w) && w.getChildrenKeys().forEach((x) => h.add(x)); }), vye(m); } } else if (u.has(d.getKey())) { if (!et.$isElementNode(d)) throw Error("Expected node in emptyElements to be an ElementNode"); m = i(), m.setFormat(d.getFormatType()), m.setIndent(d.getIndent()), a.push(m), d.remove(!0); } } if (r !== null) for (e = 0; e < a.length; e++) r.append(a[e]); if (e = null, et.$isRootOrShadowRoot(s)) if (l) if (r !== null) s.insertAfter(r); else for (r = a.length - 1; 0 <= r; r--) s.insertAfter(a[r]); else if (l = s.getFirstChild(), et.$isElementNode(l) && (s = l), l === null) if (r) s.append(r); else for (r = 0; r < a.length; r++) l = a[r], s.append(l), e = l; else if (r !== null) l.insertBefore(r); else for (s = 0; s < a.length; s++) r = a[s], l.insertBefore(r), e = r; else if (r) s.insertAfter(r); else for (r = a.length - 1; 0 <= r; r--) l = a[r], s.insertAfter(l), e = l; a = et.$getPreviousSelection(), et.$isRangeSelection(a) && a.anchor.getNode().isAttached() && a.focus.getNode().isAttached() ? et.$setSelection(a.clone()) : e !== null ? e.selectEnd() : t.dirty = !0; } } function aW(t, e, n, i) { t.modify(e ? "extend" : "move", n, i); } function lW(t) { return t = t.anchor.getNode(), (et.$isRootNode(t) ? t : t.getParentOrThrow()).getDirection() === "rtl"; } function Q3(t) { if (et.$isDecoratorNode(t) || !et.$isElementNode(t) || et.$isRootOrShadowRoot(t)) return !1; var e = t.getFirstChild(); return e = e === null || et.$isLineBreakNode(e) || et.$isTextNode(e) || e.isInline(), !t.isInline() && t.canBeEmpty() !== !1 && e; } Gi.$addNodeStyle = function(t) { t = t.getStyle(); let e = oW(t); mw.set(t, e); }; Gi.$cloneWithProperties = function(t) { let e = t.constructor.clone(t); return e.__parent = t.__parent, e.__next = t.__next, e.__prev = t.__prev, et.$isElementNode(t) && et.$isElementNode(e) ? (e.__first = t.__first, e.__last = t.__last, e.__size = t.__size, e.__format = t.__format, e.__indent = t.__indent, e.__dir = t.__dir, e) : (et.$isTextNode(t) && et.$isTextNode(e) && (e.__format = t.__format, e.__style = t.__style, e.__mode = t.__mode, e.__detail = t.__detail), e); }; Gi.$getSelectionStyleValueForProperty = function(t, e, n = "") { let i = null, r = t.getNodes(); var s = t.anchor, o = t.focus, a = t.isBackward(); let l = a ? o.offset : s.offset; if (s = a ? o.getNode() : s.getNode(), t.isCollapsed() && t.style !== "" && (t = gw(t.style), t !== null && e in t)) return t[e]; for (t = 0; t < r.length; t++) { var u = r[t]; if ((t === 0 || l !== 0 || !u.is(s)) && et.$isTextNode(u)) { if (o = e, a = n, u = u.getStyle(), u = gw(u), o = u !== null && u[o] || a, i === null) i = o; else if (i !== o) { i = ""; break; } } } return i === null ? n : i; }; Gi.$isAtNodeEnd = function(t) { if (t.type === "text") return t.offset === t.getNode().getTextContentSize(); let e = t.getNode(); if (!et.$isElementNode(e)) throw Error("isAtNodeEnd: node must be a TextNode or ElementNode"); return t.offset === e.getChildrenSize(); }; Gi.$isParentElementRTL = lW; Gi.$moveCaretSelection = aW; Gi.$moveCharacter = function(t, e, n) { let i = lW(t); aW(t, e, n ? !i : i, "character"); }; Gi.$patchStyleText = function(t, e) { var n = t.getNodes(), i = n.length, r = t.getStartEndPoints(); if (r !== null) { var [s, o] = r; --i, r = n[0]; var a = n[i]; if (t.isCollapsed() && et.$isRangeSelection(t)) Td(t, e); else { var l = r.getTextContent().length, u = o.offset, f = s.offset, d = s.isBefore(o), h = d ? f : u; t = d ? u : f; var m = d ? s.type : o.type, g = d ? o.type : s.type; if (d = d ? o.key : s.key, et.$isTextNode(r) && h === l) { let w = r.getNextSibling(); et.$isTextNode(w) && (h = f = 0, r = w); } if (n.length === 1) et.$isTextNode(r) && r.canHaveFormat() && (h = m === "element" ? 0 : f > u ? u : f, t = g === "element" ? l : f > u ? f : u, h !== t && (h === 0 && t === l ? (Td(r, e), r.select(h, t)) : (n = r.splitText(h, t), n = h === 0 ? n[0] : n[1], Td(n, e), n.select(0, t - h)))); else for (et.$isTextNode(r) && h < r.getTextContentSize() && r.canHaveFormat() && (h !== 0 && (r = r.splitText(h)[1], h = 0, s.set(r.getKey(), h, "text")), Td(r, e)), et.$isTextNode(a) && a.canHaveFormat() && (h = a.getTextContent().length, a.__key !== d && t !== 0 && (t = h), t !== h && ([a] = a.splitText(t)), t === 0 && g !== "element" || Td(a, e)), t = 1; t < i; t++) h = n[t], g = h.getKey(), et.$isTextNode(h) && h.canHaveFormat() && g !== r.getKey() && g !== a.getKey() && !h.isToken() && Td(h, e); } } }; Gi.$selectAll = function(t) { let e = t.anchor; t = t.focus; var n = e.getNode().getTopLevelElementOrThrow().getParentOrThrow(); let i = n.getFirstDescendant(); n = n.getLastDescendant(); let r = "element", s = "element", o = 0; et.$isTextNode(i) ? r = "text" : et.$isElementNode(i) || i === null || (i = i.getParentOrThrow()), et.$isTextNode(n) ? (s = "text", o = n.getTextContentSize()) : et.$isElementNode(n) || n === null || (n = n.getParentOrThrow()), i && n && (e.set(i.getKey(), 0, r), t.set(n.getKey(), o, s)); }; Gi.$setBlocksType = function(t, e) { if (t !== null) { var n = t.getStartEndPoints(); if (n = n ? n[0] : null, n !== null && n.key === "root") e = e(), t = et.$getRoot(), (n = t.getFirstChild()) ? n.replace(e, !0) : t.append(e); else { if (t = t.getNodes(), n !== null) { for (n = n.getNode(); n !== null && n.getParent() !== null && !Q3(n); ) n = n.getParentOrThrow(); n = Q3(n) ? n : null; } else n = !1; for (n && t.indexOf(n) === -1 && t.push(n), n = 0; n < t.length; n++) { let i = t[n]; if (!Q3(i)) continue; if (!et.$isElementNode(i)) throw Error("Expected block node to be an ElementNode"); let r = e(); r.setFormat(i.getFormatType()), r.setIndent(i.getIndent()), i.replace(r, !0); } } } }; Gi.$shouldOverrideDefaultCharacterSelection = function(t, e) { return t = et.$getAdjacentNode(t.focus, e), et.$isDecoratorNode(t) && !t.isIsolated() || et.$isElementNode(t) && !t.isInline() && !t.canBeEmpty(); }; Gi.$sliceSelectedTextNodeContent = function(t, e) { var n = t.getStartEndPoints(); if (e.isSelected(t) && !e.isSegmented() && !e.isToken() && n !== null) { let [a, l] = n; n = t.isBackward(); var i = a.getNode(), r = l.getNode(), s = e.is(i), o = e.is(r); if (s || o) { let [u, f] = et.$getCharacterOffsets(t); t = i.is(r), s = e.is(n ? r : i), r = e.is(n ? i : r), i = 0, o = void 0, t ? (i = u > f ? f : u, o = u > f ? u : f) : s ? (i = n ? f : u, o = void 0) : r && (n = n ? u : f, i = 0, o = n), e.__text = e.__text.slice(i, o); } } return e; }; Gi.$wrapNodes = function(t, e, n = null) { var i = t.getStartEndPoints(), r = i ? i[0] : null; i = t.getNodes(); let s = i.length; if (r !== null && (s === 0 || s === 1 && r.type === "element" && r.getNode().getChildrenSize() === 0)) { t = r.type === "text" ? r.getNode().getParentOrThrow() : r.getNode(), i = t.getChildren(); let a = e(); a.setFormat(t.getFormatType()), a.setIndent(t.getIndent()), i.forEach((l) => a.append(l)), n && (a = n.append(a)), t.replace(a); } else { r = null; var o = []; for (let a = 0; a < s; a++) { let l = i[a]; et.$isRootOrShadowRoot(l) ? (H3(t, o, o.length, e, n), o = [], r = l) : r === null || r !== null && et.$hasAncestor(l, r) ? o.push(l) : (H3(t, o, o.length, e, n), o = [l]); } H3(t, o, o.length, e, n); } }; Gi.createDOMRange = function(t, e, n, i, r) { let s = e.getKey(), o = i.getKey(), a = document.createRange(), l = t.getElementByKey(s); if (t = t.getElementByKey(o), et.$isTextNode(e) && (l = IN(l)), et.$isTextNode(i) && (t = IN(t)), e === void 0 || i === void 0 || l === null || t === null) return null; l.nodeName === "BR" && ([l, n] = LN(l)), t.nodeName === "BR" && ([t, r] = LN(t)), e = l.firstChild, l === t && e != null && e.nodeName === "BR" && n === 0 && r === 0 && (r = 1); try { a.setStart(l, n), a.setEnd(t, r); } catch { return null; } return !a.collapsed || n === r && s === o || (a.setStart(t, r), a.setEnd( l, n )), a; }; Gi.createRectsFromDOMRange = function(t, e) { var n = t.getRootElement(); if (n === null) return []; t = n.getBoundingClientRect(), n = getComputedStyle(n), n = parseFloat(n.paddingLeft) + parseFloat(n.paddingRight), e = Array.from(e.getClientRects()); let i = e.length; e.sort((s, o) => { let a = s.top - o.top; return 3 >= Math.abs(a) ? s.left - o.left : a; }); let r; for (let s = 0; s < i; s++) { let o = e[s], a = o.width + n === t.width; r && r.top <= o.top && r.top + r.height > o.top && r.left + r.width > o.left || a ? (e.splice(s--, 1), i--) : r = o; } return e; }; Gi.getStyleObjectFromCSS = gw; Gi.trimTextContentFromAnchor = function(t, e, n) { let i = e.getNode(); if (et.$isElementNode(i)) { var r = i.getDescendantByIndex(e.offset); r !== null && (i = r); } for (; 0 < n && i !== null; ) { et.$isElementNode(i) && (r = i.getLastDescendant(), r !== null && (i = r)); var s = i.getPreviousSibling(), o = 0; if (s === null) { r = i.getParentOrThrow(); for (var a = r.getPreviousSibling(); a === null; ) { if (r = r.getParent(), r === null) { s = null; break; } a = r.getPreviousSibling(); } r !== null && (o = r.isInline() ? 0 : 2, s = a); } if (a = i.getTextContent(), a === "" && et.$isElementNode(i) && !i.isInline() && (a = ` `), r = a.length, !et.$isTextNode(i) || n >= r) a = i.getParent(), i.remove(), a == null || a.getChildrenSize() !== 0 || et.$isRootNode(a) || a.remove(), n -= r + o, i = s; else { let l = i.getKey(); o = t.getEditorState().read(() => { const f = et.$getNodeByKey(l); return et.$isTextNode(f) && f.isSimpleText() ? f.getTextContent() : null; }), s = r - n; let u = a.slice(0, s); o !== null && o !== a ? (n = et.$getPreviousSelection(), r = i, i.isSimpleText() ? i.setTextContent(o) : (r = et.$createTextNode(o), i.replace(r)), et.$isRangeSelection(n) && n.isCollapsed() && (n = n.anchor.offset, r.select(n, n))) : i.isSimpleText() ? (o = e.key === l, a = e.offset, a < n && (a = r), n = o ? a - n : 0, r = o ? a : s, o && n === 0 ? ([n] = i.splitText(n, r), n.remove()) : ([, n] = i.splitText(n, r), n.remove())) : (n = et.$createTextNode(u), i.replace(n)), n = 0; } } }; const bye = Gi; var Ri = bye, oi = {}, uW = Ri, Pn = N; function yye(t) { let e = new URLSearchParams(); e.append("code", t); for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]); throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`); } function cW(...t) { return () => { t.forEach((e) => e()); }; } let wye = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }; function fW(t, e, n) { function i() { if (o === null) throw Error("Unexpected null rootDOMNode"); if (a === null) throw Error("Unexpected null parentDOMNode"); let { left: h, top: m } = o.getBoundingClientRect(); var g = a; let w = uW.createRectsFromDOMRange(t, e); f.isConnected || g.append(f), g = !1; for (let S = 0; S < w.length; S++) { var x = w[S]; let C = u[S] || document.createElement("div"), E = C.style; E.position !== "absolute" && (E.position = "absolute", g = !0); var _ = `${x.left - h}px`; E.left !== _ && (E.left = _, g = !0), _ = `${x.top - m}px`, E.top !== _ && (C.style.top = _, g = !0), _ = `${x.width}px`, E.width !== _ && (C.style.width = _, g = !0), x = `${x.height}px`, E.height !== x && (C.style.height = x, g = !0), C.parentNode !== f && (f.append(C), g = !0), u[S] = C; } for (; u.length > w.length; ) u.pop(); g && n(u); } function r() { o = a = null, l !== null && l.disconnect(), l = null, f.remove(); for (let h of u) h.remove(); u = []; } function s() { let h = t.getRootElement(); if (h === null) return r(); let m = h.parentElement; if (!(m instanceof HTMLElement)) return r(); r(), o = h, a = m, l = new MutationObserver((g) => { let w = t.getRootElement(), x = w && w.parentElement; if (w !== o || x !== a) return s(); for (let _ of g) if (!f.contains(_.target)) return i(); }), l.observe(m, wye), i(); } let o = null, a = null, l = null, u = [], f = document.createElement("div"), d = t.registerRootListener(s); return () => { d(), r(); }; } function dW(t, e) { for (let n of e) if (t.type.startsWith(n)) return !0; return !1; } let hW = (t, e) => { for (; t !== Pn.$getRoot() && t != null; ) { if (e(t)) return t; t = t.getParent(); } return null; }; oi.$splitNode = Pn.$splitNode; oi.isHTMLAnchorElement = Pn.isHTMLAnchorElement; oi.isHTMLElement = Pn.isHTMLElement; oi.$dfs = function(t, e) { let n = []; t = (t || Pn.$getRoot()).getLatest(), e = e || (Pn.$isElementNode(t) ? t.getLastDescendant() : t); for (var i = t, r = 0; (i = i.getParent()) !== null; ) r++; for (i = r; t !== null && !t.is(e); ) if (n.push({ depth: i, node: t }), Pn.$isElementNode(t) && 0 < t.getChildrenSize()) t = t.getFirstChild(), i++; else for (r = null; r === null && t !== null; ) r = t.getNextSibling(), r === null ? (t = t.getParent(), i--) : t = r; return t !== null && t.is(e) && n.push({ depth: i, node: t }), n; }; oi.$filter = function(t, e) { let n = []; for (let i = 0; i < t.length; i++) { let r = e(t[i]); r !== null && n.push(r); } return n; }; oi.$findMatchingParent = hW; oi.$getNearestBlockElementAncestorOrThrow = function(t) { let e = hW(t, (n) => Pn.$isElementNode(n) && !n.isInline()); return Pn.$isElementNode(e) || yye(4, t.__key), e; }; oi.$getNearestNodeOfType = function(t, e) { for (; t != null; ) { if (t instanceof e) return t; t = t.getParent(); } return null; }; oi.$insertFirst = function(t, e) { let n = t.getFirstChild(); n !== null ? n.insertBefore(e) : t.append(e); }; oi.$insertNodeToNearestRoot = function(t) { var e = Pn.$getSelection() || Pn.$getPreviousSelection(); if (Pn.$isRangeSelection(e)) { var { focus: n } = e; if (e = n.getNode(), n = n.offset, Pn.$isRootOrShadowRoot(e)) n = e.getChildAtIndex(n), n == null ? e.append(t) : n.insertBefore(t), t.selectNext(); else { let i, r; Pn.$isTextNode(e) ? (i = e.getParentOrThrow(), r = e.getIndexWithinParent(), 0 < n && (r += 1, e.splitText(n))) : (i = e, r = n), [, e] = Pn.$splitNode(i, r), e.insertBefore(t), e.selectStart(); } } else e != null ? (e = e.getNodes(), e[e.length - 1].getTopLevelElementOrThrow().insertAfter(t)) : Pn.$getRoot().append(t), e = Pn.$createParagraphNode(), t.insertAfter(e), e.select(); return t.getLatest(); }; oi.$restoreEditorState = function(t, e) { let n = /* @__PURE__ */ new Map(), i = t._pendingEditorState; for (let [r, s] of e._nodeMap) { let o = uW.$cloneWithProperties(s); if (Pn.$isTextNode(o)) { if (!Pn.$isTextNode(s)) throw Error("Expected node be a TextNode"); o.__text = s.__text; } n.set(r, o); } i && (i._nodeMap = n), t._dirtyType = 2, t = e._selection, Pn.$setSelection(t === null ? null : t.clone()); }; oi.$wrapNodeInElement = function(t, e) { return e = e(), t.replace(e), e.append(t), e; }; oi.addClassNamesToElement = function(t, ...e) { e.forEach((n) => { typeof n == "string" && (n = n.split(" ").filter((i) => i !== ""), t.classList.add(...n)); }); }; oi.isMimeType = dW; oi.markSelection = function(t, e) { function n(l) { l.read(() => { var u = Pn.$getSelection(); if (Pn.$isRangeSelection(u)) { var { anchor: f, focus: d } = u; u = f.getNode(); var h = u.getKey(), m = f.offset, g = d.getNode(), w = g.getKey(), x = d.offset, _ = t.getElementByKey(h), S = t.getElementByKey(w); if (h = i === null || _ === null || m !== r || h !== i.getKey() || u !== i && (!(i instanceof Pn.TextNode) || u.updateDOM(i, _, t._config)), w = s === null || S === null || x !== o || w !== s.getKey() || g !== s && (!(s instanceof Pn.TextNode) || g.updateDOM(s, S, t._config)), h || w) { _ = t.getElementByKey(f.getNode().getKey()); var C = t.getElementByKey(d.getNode().getKey()); if (_ !== null && C !== null && _.tagName === "SPAN" && C.tagName === "SPAN") { if (w = document.createRange(), d.isBefore(f) ? (h = C, S = d.offset, C = _, _ = f.offset) : (h = _, S = f.offset, _ = d.offset), h = h.firstChild, h === null || (C = C.firstChild, C === null)) throw Error("Expected text node to be first child of span"); w.setStart(h, S), w.setEnd(C, _), a(), a = fW(t, w, (E) => { for (let M of E) { let $ = M.style; $.background !== "Highlight" && ($.background = "Highlight"), $.color !== "HighlightText" && ($.color = "HighlightText"), $.zIndex !== "-1" && ($.zIndex = "-1"), $.pointerEvents !== "none" && ($.pointerEvents = "none"), $.marginTop !== "-1.5px" && ($.marginTop = "-1.5px"), $.paddingTop !== "4px" && ($.paddingTop = "4px"), $.paddingBottom !== "0px" && ($.paddingBottom = "0px"); } e !== void 0 && e(E); }); } } i = u, r = m, s = g, o = x; } else o = s = r = i = null, a(), a = () => { }; }); } let i = null, r = null, s = null, o = null, a = () => { }; return n(t.getEditorState()), cW(t.registerUpdateListener(({ editorState: l }) => n(l)), a, () => { a(); }); }; oi.mediaFileReader = function(t, e) { let n = t[Symbol.iterator](); return new Promise((i, r) => { let s = [], o = () => { const { done: a, value: l } = n.next(); if (a) return i(s); const u = new FileReader(); u.addEventListener("error", r), u.addEventListener("load", () => { const f = u.result; typeof f == "string" && s.push({ file: l, result: f }), o(); }), dW(l, e) ? u.readAsDataURL(l) : o(); }; o(); }); }; oi.mergeRegister = cW; oi.objectKlassEquals = function(t, e) { return t !== null ? Object.getPrototypeOf(t).constructor.name === e.name : !1; }; oi.positionNodeOnRange = fW; oi.registerNestedElementResolver = function(t, e, n, i) { return t.registerNodeTransform(e, (r) => { e: { for (var s = r.getChildren(), o = 0; o < s.length; o++) if (s[o] instanceof e) { s = null; break e; } for (s = r; s !== null; ) if (o = s, s = s.getParent(), s instanceof e) { s = { child: o, parent: s }; break e; } s = null; } if (s !== null) { const { child: a, parent: l } = s; if (a.is(r)) { if (i(l, r), r = a.getNextSiblings(), s = r.length, l.insertAfter(a), s !== 0) { o = n(l), a.insertAfter(o); for (let u = 0; u < s; u++) o.append(r[u]); } l.canBeEmpty() || l.getChildrenSize() !== 0 || l.remove(); } } }); }; oi.removeClassNamesFromElement = function(t, ...e) { e.forEach((n) => { typeof n == "string" && t.classList.remove(...n.split(" ")); }); }; const kye = oi; var lt = kye, RN = Ri, xye = lt, Kd = N; function pW(t, e, n, i = null) { let r = i !== null ? e.isSelected(i) : !0, s = Kd.$isElementNode(e) && e.excludeFromCopy("html"); var o = e; i !== null && (o = RN.$cloneWithProperties(e), o = Kd.$isTextNode(o) && i !== null ? RN.$sliceSelectedTextNodeContent(i, o) : o); let a = Kd.$isElementNode(o) ? o.getChildren() : []; var l = t._nodes.get(o.getType()); l = l && l.exportDOM !== void 0 ? l.exportDOM(t, o) : o.exportDOM(t); let { element: u, after: f } = l; if (!u) return !1; l = document.createDocumentFragment(); for (let d = 0; d < a.length; d++) { let h = a[d], m = pW(t, h, l, i); !r && Kd.$isElementNode(e) && m && e.extractWithChild(h, i, "html") && (r = !0); } return r && !s ? (xye.isHTMLElement(u) && u.append(l), n.append(u), f && (t = f.call(o, u)) && u.replaceWith(t)) : n.append(l), r; } let mW = /* @__PURE__ */ new Set(["STYLE", "SCRIPT"]); function gW(t, e, n = /* @__PURE__ */ new Map(), i) { let r = []; if (mW.has(t.nodeName)) return r; let s = null; var o, { nodeName: a } = t, l = e._htmlConversions.get(a.toLowerCase()); if (a = null, l !== void 0) for (o of l) l = o(t), l !== null && (a === null || (a.priority || 0) < (l.priority || 0)) && (a = l); if (a = (o = a !== null ? a.conversion : null) ? o(t) : null, o = null, a !== null) { if (o = a.after, l = a.node, s = Array.isArray(l) ? l[l.length - 1] : l, s !== null) { for (var [, u] of n) if (s = u(s, i), !s) break; s && r.push(...Array.isArray(l) ? l : [s]); } a.forChild != null && n.set(t.nodeName, a.forChild); } for (t = t.childNodes, i = [], u = 0; u < t.length; u++) i.push(...gW(t[u], e, new Map(n), s)); return o != null && (i = o(i)), s == null ? r = r.concat(i) : Kd.$isElementNode(s) && s.append(...i), r; } J5.$generateHtmlFromNodes = function(t, e) { if (typeof document > "u" || typeof window > "u" && typeof on.window > "u") throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function."); let n = document.createElement("div"), i = Kd.$getRoot().getChildren(); for (let r = 0; r < i.length; r++) pW(t, i[r], n, e); return n.innerHTML; }; J5.$generateNodesFromDOM = function(t, e) { e = e.body ? e.body.childNodes : []; let n = []; for (let r = 0; r < e.length; r++) { var i = e[r]; mW.has(i.nodeName) || (i = gW(i, t), i !== null && (n = n.concat(i))); } return n; }; const _ye = J5; var Rn = _ye, vW = Rn, S4 = Ri, Oye = lt, wi = N; function jN(t) { let e = new URLSearchParams(); e.append("code", t); for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]); throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`); } let bW = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u"; function yW(t) { let e = wi.$getSelection(); if (e == null) throw Error("Expected valid LexicalSelection"); return wi.$isRangeSelection(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : vW.$generateHtmlFromNodes(t, e); } function wW(t) { let e = wi.$getSelection(); if (e == null) throw Error("Expected valid LexicalSelection"); return wi.$isRangeSelection(e) && e.isCollapsed() || e.getNodes().length === 0 ? null : JSON.stringify(xW(t, e)); } function C4(t, e, n) { t.dispatchCommand(wi.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, { nodes: e, selection: n }) || n.insertNodes(e); } function kW(t, e, n, i = []) { let r = e !== null ? n.isSelected(e) : !0, s = wi.$isElementNode(n) && n.excludeFromCopy("html"); var o = n; if (e !== null) { var a = S4.$cloneWithProperties(n); o = a = wi.$isTextNode(a) && e !== null ? S4.$sliceSelectedTextNodeContent(e, a) : a; } let l = wi.$isElementNode(o) ? o.getChildren() : []; var u = o; a = u.exportJSON(); var f = u.constructor; for (a.type !== f.getType() && jN(58, f.name), wi.$isElementNode(u) && (Array.isArray(a.children) || jN(59, f.name)), wi.$isTextNode(o) && (o = o.__text, 0 < o.length ? a.text = o : r = !1), o = 0; o < l.length; o++) u = l[o], f = kW(t, e, u, a.children), !r && wi.$isElementNode(n) && f && n.extractWithChild(u, e, "clone") && (r = !0); if (r && !s) i.push(a); else if (Array.isArray(a.children)) for (t = 0; t < a.children.length; t++) i.push(a.children[t]); return r; } function xW(t, e) { let n = [], i = wi.$getRoot().getChildren(); for (let r = 0; r < i.length; r++) kW(t, e, i[r], n); return { namespace: t._config.namespace, nodes: n }; } function _W(t) { let e = []; for (let n = 0; n < t.length; n++) { let i = wi.$parseSerializedNode(t[n]); wi.$isTextNode(i) && S4.$addNodeStyle(i), e.push(i); } return e; } let $d = null; function FN(t, e) { var n = bW ? (t._window || window).getSelection() : null; if (!n) return !1; var i = n.anchorNode; if (n = n.focusNode, i !== null && n !== null && !wi.isSelectionWithinEditor(t, i, n) || (e.preventDefault(), e = e.clipboardData, i = wi.$getSelection(), e === null || i === null)) return !1; n = yW(t), t = wW(t); let r = ""; return i !== null && (r = i.getTextContent()), n !== null && e.setData("text/html", n), t !== null && e.setData("application/x-lexical-editor", t), e.setData("text/plain", r), !0; } jl.$generateJSONFromSelectedNodes = xW; jl.$generateNodesFromSerializedNodes = _W; jl.$getHtmlContent = yW; jl.$getLexicalContent = wW; jl.$insertDataTransferForPlainText = function(t, e) { t = t.getData("text/plain") || t.getData("text/uri-list"), t != null && e.insertRawText(t); }; jl.$insertDataTransferForRichText = function(t, e, n) { var i = t.getData("application/x-lexical-editor"); if (i) try { let s = JSON.parse(i); if (s.namespace === n._config.namespace && Array.isArray(s.nodes)) { let o = _W(s.nodes); return C4(n, o, e); } } catch { } if (i = t.getData("text/html")) try { var r = new DOMParser().parseFromString(i, "text/html"); let s = vW.$generateNodesFromDOM(n, r); return C4(n, s, e); } catch { } if (t = t.getData("text/plain") || t.getData("text/uri-list"), t != null) if (wi.$isRangeSelection(e)) for (t = t.split(/(\r?\n|\t)/), t[t.length - 1] === "" && t.pop(), n = 0; n < t.length; n++) r = t[n], r === ` ` || r === `\r ` ? e.insertParagraph() : r === " " ? e.insertNodes([wi.$createTabNode()]) : e.insertText(r); else e.insertRawText(t); }; jl.$insertGeneratedNodes = C4; jl.copyToClipboard = async function(t, e) { if ($d !== null) return !1; if (e !== null) return new Promise((o) => { t.update(() => { o(FN(t, e)); }); }); var n = t.getRootElement(); let i = t._window == null ? window.document : t._window.document, r = bW ? (t._window || window).getSelection() : null; if (n === null || r === null) return !1; let s = i.createElement("span"); return s.style.cssText = "position: fixed; top: -1000px;", s.append(i.createTextNode("#")), n.append(s), n = new Range(), n.setStart(s, 0), n.setEnd(s, 1), r.removeAllRanges(), r.addRange(n), new Promise((o) => { let a = t.registerCommand(wi.COPY_COMMAND, (l) => (Oye.objectKlassEquals(l, ClipboardEvent) && (a(), $d !== null && (window.clearTimeout($d), $d = null), o(FN(t, l))), !0), wi.COMMAND_PRIORITY_CRITICAL); $d = window.setTimeout(() => { a(), $d = null, o(!1); }, 50), i.execCommand("copy"), s.remove(); }); }; const Sye = jl; var mf = Sye, vw = mf, ab = Ri, wa = lt, ue = N; function BN(t, e) { return typeof document.caretRangeFromPoint < "u" ? (t = document.caretRangeFromPoint(t, e), t === null ? null : { node: t.startContainer, offset: t.startOffset }) : document.caretPositionFromPoint !== "undefined" ? (t = document.caretPositionFromPoint(t, e), t === null ? null : { node: t.offsetNode, offset: t.offset }) : null; } let fp = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Cye = fp && "documentMode" in document ? document.documentMode : null, Eye = fp && "InputEvent" in window && !Cye ? "getTargetRanges" in new window.InputEvent("input") : !1, Tye = fp && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), $ye = fp && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Mye = fp && /^(?=.*Chrome).*/i.test(navigator.userAgent), Nye = fp && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Mye, E4 = ue.createCommand("DRAG_DROP_PASTE_FILE"), eE = class OW extends ue.ElementNode { static getType() { return "quote"; } static clone(e) { return new OW(e.__key); } constructor(e) { super(e); } createDOM(e) { let n = document.createElement("blockquote"); return wa.addClassNamesToElement(n, e.theme.quote), n; } updateDOM() { return !1; } static importDOM() { return { blockquote: () => ({ conversion: Aye, priority: 0 }) }; } exportDOM(e) { if ({ element: e } = super.exportDOM(e), e && wa.isHTMLElement(e)) { this.isEmpty() && e.append(document.createElement("br")); var n = this.getFormatType(); e.style.textAlign = n, (n = this.getDirection()) && (e.dir = n); } return { element: e }; } static importJSON(e) { let n = tE(); return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n; } exportJSON() { return { ...super.exportJSON(), type: "quote" }; } insertNewAfter(e, n) { e = ue.$createParagraphNode(); let i = this.getDirection(); return e.setDirection(i), this.insertAfter(e, n), e; } collapseAtStart() { let e = ue.$createParagraphNode(); return this.getChildren().forEach((n) => e.append(n)), this.replace(e), !0; } }; function tE() { return ue.$applyNodeReplacement(new eE()); } let nE = class SW extends ue.ElementNode { static getType() { return "heading"; } static clone(e) { return new SW(e.__tag, e.__key); } constructor(e, n) { super(n), this.__tag = e; } getTag() { return this.__tag; } createDOM(e) { let n = this.__tag, i = document.createElement(n); return e = e.theme.heading, e !== void 0 && wa.addClassNamesToElement(i, e[n]), i; } updateDOM() { return !1; } static importDOM() { return { h1: () => ({ conversion: Md, priority: 0 }), h2: () => ({ conversion: Md, priority: 0 }), h3: () => ({ conversion: Md, priority: 0 }), h4: () => ({ conversion: Md, priority: 0 }), h5: () => ({ conversion: Md, priority: 0 }), h6: () => ({ conversion: Md, priority: 0 }), p: (e) => (e = e.firstChild, e !== null && zN(e) ? { conversion: () => ({ node: null }), priority: 3 } : null), span: (e) => zN(e) ? { conversion: () => ({ node: Jd("h1") }), priority: 3 } : null }; } exportDOM(e) { if ({ element: e } = super.exportDOM(e), e && wa.isHTMLElement(e)) { this.isEmpty() && e.append(document.createElement("br")); var n = this.getFormatType(); e.style.textAlign = n, (n = this.getDirection()) && (e.dir = n); } return { element: e }; } static importJSON(e) { let n = Jd(e.tag); return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n; } exportJSON() { return { ...super.exportJSON(), tag: this.getTag(), type: "heading", version: 1 }; } insertNewAfter(e, n = !0) { let i = e ? e.anchor.offset : 0, r = i !== this.getTextContentSize() && e ? Jd(this.getTag()) : ue.$createParagraphNode(), s = this.getDirection(); return r.setDirection(s), this.insertAfter(r, n), i === 0 && !this.isEmpty() && e && (e = ue.$createParagraphNode(), e.select(), this.replace(e, !0)), r; } collapseAtStart() { let e = this.isEmpty() ? ue.$createParagraphNode() : Jd(this.getTag()); return this.getChildren().forEach((n) => e.append(n)), this.replace(e), !0; } extractWithChild() { return !0; } }; function zN(t) { return t.nodeName.toLowerCase() === "span" ? t.style.fontSize === "26pt" : !1; } function Md(t) { let e = t.nodeName.toLowerCase(), n = null; return (e === "h1" || e === "h2" || e === "h3" || e === "h4" || e === "h5" || e === "h6") && (n = Jd(e), t.style !== null && n.setFormat(t.style.textAlign)), { node: n }; } function Aye(t) { let e = tE(); return t.style !== null && e.setFormat(t.style.textAlign), { node: e }; } function Jd(t) { return ue.$applyNodeReplacement(new nE(t)); } function Dye(t, e) { t.preventDefault(), e.update(() => { let n = ue.$getSelection(), i = t instanceof InputEvent || t instanceof KeyboardEvent ? null : t.clipboardData; i != null && n !== null && vw.$insertDataTransferForRichText(i, n, e); }, { tag: "paste" }); } async function Pye(t, e) { await vw.copyToClipboard(e, wa.objectKlassEquals(t, ClipboardEvent) ? t : null), e.update(() => { let n = ue.$getSelection(); ue.$isRangeSelection(n) ? n.removeText() : ue.$isNodeSelection(n) && n.getNodes().forEach((i) => i.remove()); }); } function eg(t) { let e = null; if (t instanceof DragEvent ? e = t.dataTransfer : t instanceof ClipboardEvent && (e = t.clipboardData), e === null) return [!1, [], !1]; var n = e.types; return t = n.includes("Files"), n = n.includes("text/html") || n.includes("text/plain"), [t, Array.from(e.files), n]; } function WN(t) { var e = ue.$getSelection(); if (!ue.$isRangeSelection(e)) return !1; let n = /* @__PURE__ */ new Set(); e = e.getNodes(); for (let s = 0; s < e.length; s++) { var i = e[s], r = i.getKey(); n.has(r) || (i = wa.$getNearestBlockElementAncestorOrThrow(i), r = i.getKey(), i.canIndent() && !n.has(r) && (n.add(r), t(i))); } return 0 < n.size; } function lb(t) { return t = ue.$getNearestNodeFromDOMNode(t), ue.$isDecoratorNode(t); } Ba.$createHeadingNode = Jd; Ba.$createQuoteNode = tE; Ba.$isHeadingNode = function(t) { return t instanceof nE; }; Ba.$isQuoteNode = function(t) { return t instanceof eE; }; Ba.DRAG_DROP_PASTE = E4; Ba.HeadingNode = nE; Ba.QuoteNode = eE; Ba.eventFiles = eg; Ba.registerRichText = function(t) { return wa.mergeRegister( t.registerCommand(ue.CLICK_COMMAND, () => { const e = ue.$getSelection(); return ue.$isNodeSelection(e) ? (e.clear(), !0) : !1; }, 0), t.registerCommand(ue.DELETE_CHARACTER_COMMAND, (e) => { const n = ue.$getSelection(); return ue.$isRangeSelection(n) ? (n.deleteCharacter(e), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.DELETE_WORD_COMMAND, (e) => { const n = ue.$getSelection(); return ue.$isRangeSelection(n) ? (n.deleteWord(e), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.DELETE_LINE_COMMAND, (e) => { const n = ue.$getSelection(); return ue.$isRangeSelection(n) ? (n.deleteLine(e), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.CONTROLLED_TEXT_INSERTION_COMMAND, (e) => { const n = ue.$getSelection(); if (typeof e == "string") n !== null && n.insertText(e); else { if (n === null) return !1; const i = e.dataTransfer; i != null ? vw.$insertDataTransferForRichText(i, n, t) : ue.$isRangeSelection(n) && (e = e.data) && n.insertText(e); } return !0; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand( ue.REMOVE_TEXT_COMMAND, () => { const e = ue.$getSelection(); return ue.$isRangeSelection(e) ? (e.removeText(), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR ), t.registerCommand(ue.FORMAT_TEXT_COMMAND, (e) => { const n = ue.$getSelection(); return ue.$isRangeSelection(n) ? (n.formatText(e), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.FORMAT_ELEMENT_COMMAND, (e) => { var n = ue.$getSelection(); if (!ue.$isRangeSelection(n) && !ue.$isNodeSelection(n)) return !1; n = n.getNodes(); for (const i of n) n = wa.$findMatchingParent(i, (r) => ue.$isElementNode(r) && !r.isInline()), n !== null && n.setFormat(e); return !0; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.INSERT_LINE_BREAK_COMMAND, (e) => { const n = ue.$getSelection(); return ue.$isRangeSelection(n) ? (n.insertLineBreak(e), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.INSERT_PARAGRAPH_COMMAND, () => { const e = ue.$getSelection(); return ue.$isRangeSelection(e) ? (e.insertParagraph(), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.INSERT_TAB_COMMAND, () => (ue.$insertNodes([ue.$createTabNode()]), !0), ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.INDENT_CONTENT_COMMAND, () => WN((e) => { const n = e.getIndent(); e.setIndent(n + 1); }), ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.OUTDENT_CONTENT_COMMAND, () => WN((e) => { const n = e.getIndent(); 0 < n && e.setIndent(n - 1); }), ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_ARROW_UP_COMMAND, (e) => { var n = ue.$getSelection(); if (ue.$isNodeSelection(n) && !lb(e.target)) { if (e = n.getNodes(), 0 < e.length) return e[0].selectPrevious(), !0; } else if (ue.$isRangeSelection(n) && (n = ue.$getAdjacentNode(n.focus, !0), !e.shiftKey && ue.$isDecoratorNode(n) && !n.isIsolated() && !n.isInline())) return n.selectPrevious(), e.preventDefault(), !0; return !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_ARROW_DOWN_COMMAND, (e) => { var n = ue.$getSelection(); if (ue.$isNodeSelection(n)) { if (e = n.getNodes(), 0 < e.length) return e[0].selectNext(0, 0), !0; } else if (ue.$isRangeSelection(n)) { let i = n.focus; if (i.key === "root" && i.offset === ue.$getRoot().getChildrenSize()) return e.preventDefault(), !0; if (n = ue.$getAdjacentNode(n.focus, !1), !e.shiftKey && ue.$isDecoratorNode(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0; } return !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_ARROW_LEFT_COMMAND, (e) => { const n = ue.$getSelection(); if (ue.$isNodeSelection(n)) { var i = n.getNodes(); if (0 < i.length) return e.preventDefault(), i[0].selectPrevious(), !0; } return ue.$isRangeSelection(n) && ab.$shouldOverrideDefaultCharacterSelection(n, !0) ? (i = e.shiftKey, e.preventDefault(), ab.$moveCharacter(n, i, !0), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_ARROW_RIGHT_COMMAND, (e) => { const n = ue.$getSelection(); if (ue.$isNodeSelection(n) && !lb(e.target)) { var i = n.getNodes(); if (0 < i.length) return e.preventDefault(), i[0].selectNext(0, 0), !0; } return ue.$isRangeSelection(n) ? (i = e.shiftKey, ab.$shouldOverrideDefaultCharacterSelection(n, !1) ? (e.preventDefault(), ab.$moveCharacter(n, i, !1), !0) : !1) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_BACKSPACE_COMMAND, (e) => { if (lb(e.target)) return !1; const n = ue.$getSelection(); if (!ue.$isRangeSelection(n)) return !1; e.preventDefault(), { anchor: e } = n; const i = e.getNode(); return n.isCollapsed() && e.offset === 0 && !ue.$isRootNode(i) && 0 < wa.$getNearestBlockElementAncestorOrThrow(i).getIndent() ? t.dispatchCommand(ue.OUTDENT_CONTENT_COMMAND, void 0) : t.dispatchCommand(ue.DELETE_CHARACTER_COMMAND, !0); }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_DELETE_COMMAND, (e) => { if (lb(e.target)) return !1; const n = ue.$getSelection(); return ue.$isRangeSelection(n) ? (e.preventDefault(), t.dispatchCommand(ue.DELETE_CHARACTER_COMMAND, !1)) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_ENTER_COMMAND, (e) => { const n = ue.$getSelection(); if (!ue.$isRangeSelection(n)) return !1; if (e !== null) { if (($ye || Tye || Nye) && Eye) return !1; if (e.preventDefault(), e.shiftKey) return t.dispatchCommand(ue.INSERT_LINE_BREAK_COMMAND, !1); } return t.dispatchCommand(ue.INSERT_PARAGRAPH_COMMAND, void 0); }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.KEY_ESCAPE_COMMAND, () => { const e = ue.$getSelection(); return ue.$isRangeSelection(e) ? (t.blur(), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.DROP_COMMAND, (e) => { const [, n] = eg(e); if (0 < n.length) { var i = BN(e.clientX, e.clientY); if (i !== null) { const { offset: s, node: o } = i; var r = ue.$getNearestNodeFromDOMNode(o); if (r !== null) { if (i = ue.$createRangeSelection(), ue.$isTextNode(r)) i.anchor.set(r.getKey(), s, "text"), i.focus.set(r.getKey(), s, "text"); else { const a = r.getParentOrThrow().getKey(); r = r.getIndexWithinParent() + 1, i.anchor.set(a, r, "element"), i.focus.set(a, r, "element"); } i = ue.$normalizeSelection__EXPERIMENTAL(i), ue.$setSelection(i); } t.dispatchCommand(E4, n); } return e.preventDefault(), !0; } return e = ue.$getSelection(), !!ue.$isRangeSelection(e); }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.DRAGSTART_COMMAND, (e) => { [e] = eg(e); const n = ue.$getSelection(); return !(e && !ue.$isRangeSelection(n)); }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.DRAGOVER_COMMAND, (e) => { var [n] = eg(e); const i = ue.$getSelection(); return n && !ue.$isRangeSelection(i) ? !1 : (n = BN(e.clientX, e.clientY), n !== null && (n = ue.$getNearestNodeFromDOMNode(n.node), ue.$isDecoratorNode(n) && e.preventDefault()), !0); }, ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.SELECT_ALL_COMMAND, () => (ue.$selectAll(), !0), ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.COPY_COMMAND, (e) => (vw.copyToClipboard(t, wa.objectKlassEquals(e, ClipboardEvent) ? e : null), !0), ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.CUT_COMMAND, (e) => (Pye(e, t), !0), ue.COMMAND_PRIORITY_EDITOR), t.registerCommand(ue.PASTE_COMMAND, (e) => { const [, n, i] = eg(e); return 0 < n.length && !i ? (t.dispatchCommand(E4, n), !0) : ue.isSelectionCapturedInDecoratorInput(e.target) ? !1 : ue.$getSelection() !== null ? (Dye(e, t), !0) : !1; }, ue.COMMAND_PRIORITY_EDITOR) ); }; const Iye = Ba; var rn = Iye; class iE extends N.DecoratorNode { } function qc(t) { return t instanceof iE; } function Lye(t, e) { const n = `__${e}`, i = `${n}Editor`, r = t[i] || t[n]; if (!r) return ""; if (typeof r == "string") return r; if (typeof r == "number") return r.toString(); if (typeof r.getEditorState == "function") { let s = ""; return r.getEditorState().read(() => { s = N.$getRoot().getTextContent(); }), s; } return ""; } function Ir(t) { return { element: t.createElement("span"), type: "inner" }; } const lo = "status:free,status:-free", CW = "status:-free", EW = "status:free", Yc = "", Rye = { web: { nonMember: !0, memberSegment: lo }, email: { memberSegment: lo } }; function Fc(t) { return t == null; } function bw() { return JSON.parse(JSON.stringify(Rye)); } function rE(t) { return !Object.prototype.hasOwnProperty.call(t, "web") || !Object.prototype.hasOwnProperty.call(t, "email") || !Object.prototype.hasOwnProperty.call(t.web, "nonMember") || Fc(t.web.memberSegment) || Fc(t.email.memberSegment); } function TW(t) { return rE(t) ? t.showOnEmail === !1 || t.showOnWeb === !1 || t.emailOnly === !0 || t.segment !== "" : t.web.nonMember === !1 || t.web.memberSegment !== lo || t.email.memberSegment !== lo; } function sE(t) { if (!t || !rE(t)) return t; const e = JSON.parse(JSON.stringify(t)); return e.web ?? (e.web = {}), e.email ?? (e.email = {}), Fc(t.showOnWeb) && Fc(t.emailOnly) ? e.web = bw().web : Fc(t.emailOnly) ? (e.web.nonMember = t.showOnWeb, e.web.memberSegment = t.showOnWeb ? lo : Yc) : (e.web.nonMember = !t.emailOnly, e.web.memberSegment = t.emailOnly ? Yc : lo), Fc(t.showOnEmail) && Fc(t.emailOnly) ? e.email = bw().email : t.showOnEmail === !1 || t.segment === "status:-free+status:-paid" ? e.email.memberSegment = Yc : t.segment === "status:free" ? e.email.memberSegment = EW : t.segment === "status:paid" || t.segment === "status:-free" ? e.email.memberSegment = CW : t.segment || (e.email.memberSegment = lo), e; } function s0(t, e, n) { const i = t.element.ownerDocument, r = jye(t); return e = sE(e), n.target === "email" ? e.email.memberSegment === Yc ? Ir(i) : e.email.memberSegment === lo ? t : Fye(i, r, e.email) : e.web.nonMember === !1 && e.web.memberSegment === Yc ? Ir(i) : e.web.nonMember !== !0 || e.web.memberSegment !== lo ? Bye(i, r, e.web) : t; } function jye({ element: t, type: e }) { return e === "inner" ? t.innerHTML : e === "value" ? "value" in t ? t.value : "" : t.outerHTML; } function Fye(t, e, n) { const { memberSegment: i } = n, r = t.createElement("div"); return r.innerHTML = e, r.setAttribute("data-gh-segment", i), r.classList.add("kg-visibility-wrapper"), { element: r, type: "html" }; } function Bye(t, e, n) { const { nonMember: i, memberSegment: r } = n, s = ` ${e} `, o = t.createElement("textarea"); return o.value = s, { element: o, type: "value" }; } var zye = /* @__PURE__ */ Object.freeze({ __proto__: null, ALL_MEMBERS_SEGMENT: lo, FREE_MEMBERS_SEGMENT: EW, NO_MEMBERS_SEGMENT: Yc, PAID_MEMBERS_SEGMENT: CW, buildDefaultVisibility: bw, isOldVisibilityFormat: rE, isVisibilityRestricted: TW, migrateOldVisibilityFormat: sE, renderWithVisibility: s0 }); function Wye(t, e) { if (!t) throw new Error({ message: '[generateDecoratorNode] A unique "nodeType" should be provided' }); e.forEach((n) => { if (!("name" in n) || !("default" in n)) throw new Error({ message: '[generateDecoratorNode] Properties should have both "name" and "default" attributes.' }); if (n.urlType && !["url", "html", "markdown"].includes(n.urlType)) throw new Error({ message: '[generateDecoratorNode] "urlType" should be either "url", "html" or "markdown"' }); if ("wordCount" in n && typeof n.wordCount != "boolean") throw new Error({ message: '[generateDecoratorNode] "wordCount" should be of boolean type.' }); }); } function Yn({ nodeType: t, properties: e = [], defaultRenderFn: n, version: i = 1, hasVisibility: r = !1 }) { Wye(t, e), e = e.map((o) => ({ ...o, privateName: `__${o.name}` })), r && e.push({ name: "visibility", get default() { return bw(); }, privateName: "__visibility" }); class s extends iE { constructor(a = {}, l) { super(l), e.forEach((u) => { typeof u.default == "boolean" ? this[u.privateName] = a[u.name] ?? u.default : this[u.privateName] = a[u.name] || u.default; }); } /** * Returns the node's unique type * @extends DecoratorNode * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode * @returns {string} */ static getType() { return t; } /** * Creates a copy of an existing node with all its properties * @extends DecoratorNode * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode */ static clone(a) { return new this(a.getDataset(), a.__key); } /** * Returns default values for any properties, allowing our editor code * to detect when a property has been changed */ static getPropertyDefaults() { return e.reduce((a, l) => (a[l.name] = l.default, a), {}); } /** * Transforms URLs contained in the payload to relative paths (`__GHOST_URL__/relative/path/`), * so that URLs to be changed without having to update the database * @see https://github.com/TryGhost/SDK/tree/main/packages/url-utils */ static get urlTransformMap() { let a = {}; return e.forEach((l) => { l.urlType && (l.urlPath ? a[l.urlPath] = l.urlType : a[l.name] = l.urlType); }), a; } /** * Convenience method to get all properties of the node * @returns {Object} - The node's properties */ getDataset() { const a = this.getLatest(); let l = {}; return e.forEach((u) => { l[u.name] = a[u.privateName]; }), l; } /** * Converts JSON to a Lexical node * @see https://lexical.dev/docs/concepts/serialization#lexicalnodeimportjson * @extends DecoratorNode * @param {Object} serializedNode - Lexical's representation of the node, in JSON format */ static importJSON(a) { const l = {}; return a.visibility = sE(a.visibility), e.forEach((u) => { l[u.name] = a[u.name]; }), new this(l); } /** * Serializes a Lexical node to JSON. The JSON content is then saved to the database. * @extends DecoratorNode * @see https://lexical.dev/docs/concepts/serialization#lexicalnodeexportjson */ exportJSON() { return { type: t, version: i, ...e.reduce((l, u) => (l[u.name] = this[u.name], l), {}) }; } exportDOM(a = {}) { var f; const l = this.__version || i; if ((f = a.nodeRenderers) != null && f[t]) { const d = a.nodeRenderers[t]; if (typeof d == "object") { const h = d[l]; if (!h) throw new Error(`[generateDecoratorNode] ${t}: options.nodeRenderers['${t}'] for version ${l} is required`); return h(this, a); } else return d(this, a); } if (typeof n == "object") { const d = n[l]; if (!d) throw new Error(`[generateDecoratorNode] ${t}: "defaultRenderFn" for version ${l} is required`); return d(this, a); } if (!n) throw new Error(`[generateDecoratorNode] ${t}: "defaultRenderFn" is required`); return n(this, a); } /* c8 ignore start */ /** * Inserts node in the DOM. Required when extending the DecoratorNode. * @extends DecoratorNode * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode */ createDOM() { return document.createElement("div"); } /** * Required when extending the DecoratorNode * @extends DecoratorNode * @see https://lexical.dev/docs/concepts/nodes#extending-decoratornode */ updateDOM() { return !1; } /** * Defines whether a node is a top-level block. * @see https://lexical.dev/docs/api/classes/lexical.DecoratorNode#isinline */ isInline() { return !1; } /* c8 ignore stop */ /** * Defines whether a node has dynamic data that needs to be fetched from the server when rendering */ hasDynamicData() { return !1; } /** * Defines whether a node has an edit mode in the editor UI */ hasEditMode() { return !0; } /* * Returns the text content of the node, used by the editor to calculate the word count * This method filters out properties without `wordCount: true` */ getTextContent() { const a = this.getLatest(), u = e.filter((f) => !!f.wordCount).map((f) => Lye(a, f.name)).filter(Boolean).join(` `); return u ? `${u} ` : ""; } /** * Returns true/false for whether the node's visibility property * is active or not. Always false if a node has no visibility property * @returns {boolean} */ getIsVisibilityActive() { if (!e.some((u) => u.name === "visibility")) return !1; const l = this.getLatest().__visibility; return TW(l); } } return e.forEach((o) => { Object.defineProperty(s.prototype, o.name, { get: function() { return this.getLatest()[o.privateName]; }, set: function(a) { const l = this.getWritable(); l[o.privateName] = a; } }); }), s; } function $W(t) { return function(n, i = {}) { return mi(n, { createDocument: (s) => { const o = t.ownerDocument.implementation.createHTMLDocument(); return o.body.innerHTML = s, o; }, ...i }); }; } function Io(t, { selector: e = "figcaption" } = {}) { const n = $W(t); let i; const r = Array.from(t.querySelectorAll(e)); return r.length && r.forEach((s) => { const o = n(s.innerHTML); i = i ? `${i} / ${o}` : o; }), i; } function yw(t) { const e = {}; if (t.src && (e.src = t.src), t.width ? e.width = t.width : t.dataset && t.dataset.width && (e.width = parseInt(t.dataset.width, 10)), t.height ? e.height = t.height : t.dataset && t.dataset.height && (e.height = parseInt(t.dataset.height, 10)), !t.width && !t.height && t.getAttribute("data-image-dimensions")) { const [, n, i] = /^(\d*)x(\d*)$/gi.exec(t.getAttribute("data-image-dimensions")); e.width = parseInt(n, 10), e.height = parseInt(i, 10); } if (t.alt && (e.alt = t.alt), t.title && (e.title = t.title), t.parentNode.tagName === "A") { const n = t.parentNode.href; n !== e.src && (e.href = n); } return e; } function Hye(t) { return { img: () => ({ conversion(e) { if (e.tagName === "IMG") { const { src: n, width: i, height: r, alt: s, title: o, href: a } = yw(e); return { node: new t({ alt: s, src: n, title: o, width: i, height: r, href: a }) }; } return null; }, priority: 1 }), figure: (e) => { const n = e.querySelector("img"); return n ? { conversion(i) { const r = i.className.match(/kg-width-(wide|full)/), s = i.className.match(/graf--layout(FillWidth|OutsetCenter)/); if (!n) return null; const o = yw(n); r ? o.cardWidth = r[1] : s && (o.cardWidth = s[1] === "FillWidth" ? "full" : "wide"), o.caption = Io(i); const { src: a, width: l, height: u, alt: f, title: d, caption: h, cardWidth: m, href: g } = o; return { node: new t({ alt: f, src: a, title: d, width: l, height: u, caption: h, cardWidth: m, href: g }) }; }, priority: 0 // since we are generically parsing figure elements, we want this to run after others (like the gallery) } : null; } }; } const oE = function(t, e) { const n = Object.values(e).map(({ width: r }) => r).sort((r, s) => r - s), i = n.filter((r) => r <= t.width); return t.width > i[i.length - 1] && t.width < n[n.length - 1] && i.push(t.width), i; }, gf = function(t, e = "") { const n = e.replace(/\/$/, ""), i = t.replace(n, ""); return /^(\/.*|__GHOST_URL__)\/?content\/images\//.test(i); }, MW = function(t) { return /images\.unsplash\.com/.test(t); }, NW = function({ src: t, width: e, options: n }) { if (!n.imageOptimization || n.imageOptimization.srcsets === !1 || !e || !n.imageOptimization.contentImageSizes || gf(t, n.siteUrl) && n.canTransformImage && !n.canTransformImage(t)) return; const i = oE({ width: e }, n.imageOptimization.contentImageSizes); if (gf(t, n.siteUrl)) { const [, r, s] = t.match(/(.*\/content\/images)\/(.*)/), o = []; if (i.forEach((a) => { a === e ? o.push(`${t} ${a}w`) : a <= e && o.push(`${r}/size/w${a}/${s} ${a}w`); }), o.length) return o.join(", "); } if (MW(t)) { const r = new URL(t), s = []; return i.forEach((o) => { r.searchParams.set("w", o), s.push(`${r.href} ${o}w`); }), s.join(", "); } }, AW = function(t, e, n) { if (!t || !["IMG", "SOURCE"].includes(t.tagName) || !t.getAttribute("src") || !e) return; const { src: i, width: r } = e, s = NW({ src: i, width: r, options: n }); s && t.setAttribute("srcset", s); }, Eh = function(t, { width: e, height: n } = {}) { const { width: i, height: r } = t, s = i / r; if (e) { const o = Math.round(e / s); return { width: e, height: o }; } if (n) return { width: Math.round(n * s), height: n }; }; function Vn(t) { if (!t.createDocument && t.dom && (t.createDocument = function() { return t.dom.window.document; }), !t.createDocument) { let e = typeof window < "u" && window.document; if (!e) throw new Error("Must be passed a `createDocument` function as an option when used in a non-browser environment"); t.createDocument = function() { return e; }; } } function Qye(t, e = {}) { var l; Vn(e); const n = e.createDocument(); if (!t.src || t.src.trim() === "") return Ir(n); const i = n.createElement("figure"); let r = "kg-card kg-image-card"; t.cardWidth !== "regular" && (r += ` kg-width-${t.cardWidth}`), t.caption && (r += " kg-card-hascaption"), i.setAttribute("class", r); const s = n.createElement("img"); s.setAttribute("src", t.src), s.setAttribute("class", "kg-image"), s.setAttribute("alt", t.alt), s.setAttribute("loading", "lazy"), t.title && s.setAttribute("title", t.title), t.width && t.height && (s.setAttribute("width", t.width), s.setAttribute("height", t.height)); const { canTransformImage: o } = e, { defaultMaxWidth: a } = e.imageOptimization || {}; if (a && t.width > a && gf(t.src, e.siteUrl) && o && o(t.src)) { const u = { width: t.width, height: t.height }, { width: f, height: d } = Eh(u, { width: a }); s.setAttribute("width", f), s.setAttribute("height", d); } if (e.target !== "email") { const u = { src: t.src, width: t.width, height: t.height }; AW(s, u, e), s.getAttribute("srcset") && t.width && t.width >= 720 && ((!t.cardWidth || t.cardWidth === "regular") && s.setAttribute("sizes", "(min-width: 720px) 720px"), t.cardWidth === "wide" && t.width >= 1200 && s.setAttribute("sizes", "(min-width: 1200px) 1200px")); } if (e.target === "email" && t.width && t.height) { let u = { width: t.width, height: t.height }; if (t.width >= 600 && (u = Eh(u, { width: 600 })), s.setAttribute("width", u.width), s.setAttribute("height", u.height), gf(t.src, e.siteUrl) && ((l = e.canTransformImage) != null && l.call(e, t.src))) { const d = oE(t, e.imageOptimization.contentImageSizes).find((h) => h >= 1200); if (!(!d || d === t.width)) { const [, h, m] = t.src.match(/(.*\/content\/images)\/(.*)/); s.setAttribute("src", `${h}/size/w${d}/${m}`); } } } if (t.href) { const u = n.createElement("a"); u.setAttribute("href", t.href), u.appendChild(s), i.appendChild(u); } else i.appendChild(s); if (t.caption) { const u = n.createElement("figcaption"); u.innerHTML = t.caption, i.appendChild(u); } return { element: i }; } let h1 = class extends Yn({ nodeType: "image", properties: [{ name: "src", default: "", urlType: "url" }, { name: "caption", default: "", urlType: "html", wordCount: !0 }, { name: "title", default: "" }, { name: "alt", default: "" }, { name: "cardWidth", default: "regular" }, { name: "width", default: null }, { name: "height", default: null }, { name: "href", default: "", urlType: "url" }], defaultRenderFn: Qye }) { /* @override */ exportJSON() { const { src: e, width: n, height: i, title: r, alt: s, caption: o, cardWidth: a, href: l } = this; return { type: "image", version: 1, src: e && e.startsWith("data:") ? "" : e, width: n, height: i, title: r, alt: s, caption: o, cardWidth: a, href: l }; } static importDOM() { return Hye(this); } hasEditMode() { return !1; } }; const Uye = (t) => new h1(t); function Zye(t) { return t instanceof h1; } function qye(t) { return { figure: (e) => { const n = e.querySelector("pre"); return e.tagName === "FIGURE" && n ? { conversion(i) { let r = n.querySelector("code"), s = i.querySelector("figcaption"); if (!r || !s) return null; let o = { code: r.textContent, caption: Io(i) }, a = n.getAttribute("class") || "", l = r.getAttribute("class") || "", u = /lang(?:uage)?-(.*?)(?:\s|$)/i, f = a.match(u) || l.match(u); return f && (o.language = f[1].toLowerCase()), { node: new t(o) }; }, priority: 2 // falls back to pre if no caption } : null; }, pre: () => ({ conversion(e) { if (e.tagName === "PRE") { let [n] = e.children; if (n && n.tagName === "CODE") { let i = { code: n.textContent }, r = e.getAttribute("class") || "", s = n.getAttribute("class") || "", o = /lang(?:uage)?-(.*?)(?:\s|$)/i, a = r.match(o) || s.match(o); return a && (i.language = a[1].toLowerCase()), { node: new t(i) }; } } return null; }, priority: 1 }) }; } function Yye(t, e = {}) { Vn(e); const n = e.createDocument(); if (!t.code || t.code.trim() === "") return Ir(n); const i = n.createElement("pre"), r = n.createElement("code"); if (t.language && r.setAttribute("class", `language-${t.language}`), r.appendChild(n.createTextNode(t.code)), i.appendChild(r), t.caption) { let s = n.createElement("figure"); s.setAttribute("class", "kg-card kg-code-card"), s.appendChild(i); let o = n.createElement("figcaption"); return o.innerHTML = t.caption, s.appendChild(o), { element: s }; } else return { element: i }; } let p1 = class extends Yn({ nodeType: "codeblock", properties: [{ name: "code", default: "", wordCount: !0 }, { name: "language", default: "" }, { name: "caption", default: "", urlType: "html", wordCount: !0 }], defaultRenderFn: Yye }) { static importDOM() { return qye(this); } isEmpty() { return !this.__code; } }; function Vye(t) { return new p1(t); } function Xye(t) { return t instanceof p1; } function Gye(t, e = {}) { Vn(e); const n = e.createDocument(), i = Aue.render(t.markdown || "", e), r = n.createElement("div"); return r.innerHTML = i, { element: r, type: "inner" }; } let m1 = class extends Yn({ nodeType: "markdown", properties: [{ name: "markdown", default: "", urlType: "markdown", wordCount: !0 }], defaultRenderFn: Gye }) { isEmpty() { return !this.__markdown; } }; function Kye(t) { return new m1(t); } function Jye(t) { return t instanceof m1; } function ewe(t) { return { figure: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-video-card"); return e.tagName === "FIGURE" && n ? { conversion(r) { const s = r.querySelector(".kg-video-container video"), o = r.querySelector(".kg-video-duration"), a = s && s.src, l = s && s.width, u = s && s.height, f = o && o.innerHTML.trim(), d = Io(r); if (!a) return null; const h = { src: a, loop: !!s.loop, cardWidth: twe(s) }; if (f) { const [g, w] = f.split(":"); try { h.duration = parseInt(g) * 60 + parseInt(w); } catch { } } return r.dataset.kgThumbnail && (h.thumbnailSrc = r.dataset.kgThumbnail), r.dataset.kgCustomThumbnail && (h.customThumbnailSrc = r.dataset.kgCustomThumbnail), d && (h.caption = d), l && (h.width = l), u && (h.height = u), { node: new t(h) }; }, priority: 1 } : null; } }; } function twe(t) { return t.classList.contains("kg-width-full") ? "full" : t.classList.contains("kg-width-wide") ? "wide" : "regular"; } function nwe(t, e = {}) { Vn(e); const n = e.createDocument(); if (!t.src || t.src.trim() === "") return Ir(n); const i = swe(t).join(" "), r = e.target === "email" ? rwe({ node: t, options: e, cardClasses: i }) : iwe({ node: t, cardClasses: i }), s = n.createElement("div"); return s.innerHTML = r.trim(), { element: s.firstElementChild }; } function iwe({ node: t, cardClasses: e }) { const n = t.width, i = t.height, r = `https://img.spacergif.org/v1/${n}x${i}/0a/spacer.png`, s = t.loop ? "loop autoplay muted" : "", o = t.customThumbnailSrc || t.thumbnailSrc, a = t.loop ? " kg-video-hide" : ""; return `
    0:00
    /${t.formattedDuration}
    ${t.caption ? `
    ${t.caption}
    ` : ""}
    `; } function rwe({ node: t, options: e, cardClasses: n }) { const i = t.customThumbnailSrc || t.thumbnailSrc, r = 600, s = t.width / t.height, o = Math.round(r / 4), a = Math.round(r / s), l = `https://img.spacergif.org/v1/${o}x${a}/0a/spacer.png`, u = Math.round(r / 2 - 39), f = Math.round(a / 2 - 39), d = Math.round(r / 2 - 11), h = Math.round(a / 2 - 17); return `
     
    ${t.caption ? `
    ${t.caption}
    ` : ""}
    `; } function swe(t) { let e = ["kg-card kg-video-card"]; return t.cardWidth && e.push(`kg-width-${t.cardWidth}`), t.caption && e.push("kg-card-hascaption"), e; } let g1 = class extends Yn({ nodeType: "video", properties: [{ name: "src", default: "", urlType: "url" }, { name: "caption", default: "", urlType: "html", wordCount: !0 }, { name: "fileName", default: "" }, { name: "mimeType", default: "" }, { name: "width", default: null }, { name: "height", default: null }, { name: "duration", default: 0 }, { name: "thumbnailSrc", default: "", urlType: "url" }, { name: "customThumbnailSrc", default: "", urlType: "url" }, { name: "thumbnailWidth", default: null }, { name: "thumbnailHeight", default: null }, { name: "cardWidth", default: "regular" }, { name: "loop", default: !1 }], defaultRenderFn: nwe }) { /* override */ exportJSON() { const { src: e, caption: n, fileName: i, mimeType: r, width: s, height: o, duration: a, thumbnailSrc: l, customThumbnailSrc: u, thumbnailWidth: f, thumbnailHeight: d, cardWidth: h, loop: m } = this; return { type: "video", version: 1, src: e && e.startsWith("data:") ? "" : e, caption: n, fileName: i, mimeType: r, width: s, height: o, duration: a, thumbnailSrc: l, customThumbnailSrc: u, thumbnailWidth: f, thumbnailHeight: d, cardWidth: h, loop: m }; } static importDOM() { return ewe(this); } get formattedDuration() { const e = Math.floor(this.duration / 60), n = Math.floor(this.duration - e * 60), i = String(n).padStart(2, "0"); return `${e}:${i}`; } }; const owe = (t) => new g1(t); function awe(t) { return t instanceof g1; } function lwe(t) { return { div: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-audio-card"); return e.tagName === "DIV" && n ? { conversion(r) { const s = r == null ? void 0 : r.querySelector(".kg-audio-title"), o = r == null ? void 0 : r.querySelector(".kg-audio-player-container audio"), a = r == null ? void 0 : r.querySelector(".kg-audio-duration"), l = r == null ? void 0 : r.querySelector(".kg-audio-thumbnail"), u = s && s.innerHTML.trim(), f = o && o.src, d = l && l.src, h = a && a.innerHTML.trim(), m = { src: f, title: u }; if (d && (m.thumbnailSrc = d), h) { const [w, x = 0] = h.split(":"); try { m.duration = parseInt(w) * 60 + parseInt(x); } catch { } } return { node: new t(m) }; }, priority: 1 } : null; } }; } function uwe(t, e = {}) { Vn(e); const n = e.createDocument(); if (!t.src || t.src.trim() === "") return Ir(n); const i = dwe(t), r = hwe(t); return e.target === "email" ? fwe(t, n, e, i, r) : cwe(t, n, i, r); } function cwe(t, e, n, i) { const r = e.createElement("div"); r.setAttribute("class", "kg-card kg-audio-card"); const s = e.createElement("img"); s.src = t.thumbnailSrc, s.alt = "audio-thumbnail", s.setAttribute("class", n), r.appendChild(s); const o = e.createElement("div"); o.setAttribute("class", i); const a = e.createElementNS("http://www.w3.org/2000/svg", "svg"); a.setAttribute("width", "24"), a.setAttribute("height", "24"), a.setAttribute("fill", "none"); const l = e.createElementNS("http://www.w3.org/2000/svg", "path"); l.setAttribute("fill-rule", "evenodd"), l.setAttribute("clip-rule", "evenodd"), l.setAttribute("d", "M7.5 15.33a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm-2.25.75a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0ZM15 13.83a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm-2.25.75a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0Z"), a.appendChild(l); const u = e.createElementNS("http://www.w3.org/2000/svg", "path"); u.setAttribute("fill-rule", "evenodd"), u.setAttribute("clip-rule", "evenodd"), u.setAttribute("d", "M14.486 6.81A2.25 2.25 0 0 1 17.25 9v5.579a.75.75 0 0 1-1.5 0v-5.58a.75.75 0 0 0-.932-.727.755.755 0 0 1-.059.013l-4.465.744a.75.75 0 0 0-.544.72v6.33a.75.75 0 0 1-1.5 0v-6.33a2.25 2.25 0 0 1 1.763-2.194l4.473-.746Z"), a.appendChild(u); const f = e.createElementNS("http://www.w3.org/2000/svg", "path"); f.setAttribute("fill-rule", "evenodd"), f.setAttribute("clip-rule", "evenodd"), f.setAttribute("d", "M3 1.5a.75.75 0 0 0-.75.75v19.5a.75.75 0 0 0 .75.75h18a.75.75 0 0 0 .75-.75V5.133a.75.75 0 0 0-.225-.535l-.002-.002-3-2.883A.75.75 0 0 0 18 1.5H3ZM1.409.659A2.25 2.25 0 0 1 3 0h15a2.25 2.25 0 0 1 1.568.637l.003.002 3 2.883a2.25 2.25 0 0 1 .679 1.61V21.75A2.25 2.25 0 0 1 21 24H3a2.25 2.25 0 0 1-2.25-2.25V2.25c0-.597.237-1.169.659-1.591Z"), a.appendChild(f), o.appendChild(a), r.appendChild(o); const d = e.createElement("div"); d.setAttribute("class", "kg-audio-player-container"); const h = e.createElement("audio"); h.setAttribute("src", t.src), h.setAttribute("preload", "metadata"), d.appendChild(h); const m = e.createElement("div"); m.setAttribute("class", "kg-audio-title"), m.textContent = t.title, d.appendChild(m); const g = e.createElement("div"); g.setAttribute("class", "kg-audio-player"); const w = e.createElement("button"); w.setAttribute("class", "kg-audio-play-icon"), w.setAttribute("aria-label", "Play audio"); const x = e.createElementNS("http://www.w3.org/2000/svg", "svg"); x.setAttribute("viewBox", "0 0 24 24"); const _ = e.createElementNS("http://www.w3.org/2000/svg", "path"); _.setAttribute("d", "M23.14 10.608 2.253.164A1.559 1.559 0 0 0 0 1.557v20.887a1.558 1.558 0 0 0 2.253 1.392L23.14 13.393a1.557 1.557 0 0 0 0-2.785Z"), x.appendChild(_), w.appendChild(x), g.appendChild(w); const S = e.createElement("button"); S.setAttribute("class", "kg-audio-pause-icon kg-audio-hide"), S.setAttribute("aria-label", "Pause audio"); const C = e.createElementNS("http://www.w3.org/2000/svg", "svg"); C.setAttribute("viewBox", "0 0 24 24"); const E = e.createElementNS("http://www.w3.org/2000/svg", "rect"); E.setAttribute("x", "3"), E.setAttribute("y", "1"), E.setAttribute("width", "7"), E.setAttribute("height", "22"), E.setAttribute("rx", "1.5"), E.setAttribute("ry", "1.5"), C.appendChild(E); const M = e.createElementNS("http://www.w3.org/2000/svg", "rect"); M.setAttribute("x", "14"), M.setAttribute("y", "1"), M.setAttribute("width", "7"), M.setAttribute("height", "22"), M.setAttribute("rx", "1.5"), M.setAttribute("ry", "1.5"), C.appendChild(M), S.appendChild(C), g.appendChild(S); const $ = e.createElement("span"); $.setAttribute("class", "kg-audio-current-time"), $.textContent = "0:00", g.appendChild($); const P = e.createElement("div"); P.setAttribute("class", "kg-audio-time"), P.textContent = "/"; const W = e.createElement("span"); W.setAttribute("class", "kg-audio-duration"), W.textContent = t.duration, P.appendChild(W), g.appendChild(P); const z = e.createElement("input"); z.setAttribute("type", "range"), z.setAttribute("class", "kg-audio-seek-slider"), z.setAttribute("max", "100"), z.setAttribute("value", "0"), g.appendChild(z); const Z = e.createElement("button"); Z.setAttribute("class", "kg-audio-playback-rate"), Z.setAttribute("aria-label", "Adjust playback speed"), Z.innerHTML = "1×", g.appendChild(Z); const L = e.createElement("button"); L.setAttribute("class", "kg-audio-unmute-icon"), L.setAttribute("aria-label", "Unmute"); const Q = e.createElementNS("http://www.w3.org/2000/svg", "svg"); Q.setAttribute("viewBox", "0 0 24 24"); const V = e.createElementNS("http://www.w3.org/2000/svg", "path"); V.setAttribute("d", "M15.189 2.021a9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h1.794a.249.249 0 0 1 .221.133 9.73 9.73 0 0 0 7.924 4.85h.06a1 1 0 0 0 1-1V3.02a1 1 0 0 0-1.06-.998Z"), Q.appendChild(V), L.appendChild(Q), g.appendChild(L); const H = e.createElement("button"); H.setAttribute("class", "kg-audio-mute-icon kg-audio-hide"), H.setAttribute("aria-label", "Mute"); const R = e.createElementNS("http://www.w3.org/2000/svg", "svg"); R.setAttribute("viewBox", "0 0 24 24"); const q = e.createElementNS("http://www.w3.org/2000/svg", "path"); q.setAttribute("d", "M16.177 4.3a.248.248 0 0 0 .073-.176v-1.1a1 1 0 0 0-1.061-1 9.728 9.728 0 0 0-7.924 4.85.249.249 0 0 1-.221.133H5.25a3 3 0 0 0-3 3v2a3 3 0 0 0 3 3h.114a.251.251 0 0 0 .177-.073ZM23.707 1.706A1 1 0 0 0 22.293.292l-22 22a1 1 0 0 0 0 1.414l.009.009a1 1 0 0 0 1.405-.009l6.63-6.631A.251.251 0 0 1 8.515 17a.245.245 0 0 1 .177.075 10.081 10.081 0 0 0 6.5 2.92 1 1 0 0 0 1.061-1V9.266a.247.247 0 0 1 .073-.176Z"), R.appendChild(q), H.appendChild(R), g.appendChild(H); const Y = e.createElement("input"); return Y.setAttribute("type", "range"), Y.setAttribute("class", "kg-audio-volume-slider"), Y.setAttribute("max", "100"), Y.setAttribute("value", "100"), g.appendChild(Y), d.appendChild(g), r.appendChild(d), { element: r }; } function fwe(t, e, n, i, r) { const s = `
    ${t.thumbnailSrc ? ` ` : ` `}
    ${t.title}
    ${pwe(t.duration)} • Click to play audio
    `, o = e.createElement("div"); return o.innerHTML = s.trim(), { element: o.firstElementChild }; } function dwe(t) { let e = "kg-audio-thumbnail"; return t.thumbnailSrc || (e += " kg-audio-hide"), e; } function hwe(t) { let e = "kg-audio-thumbnail placeholder"; return t.thumbnailSrc && (e += " kg-audio-hide"), e; } function pwe(t = 200) { const e = Math.floor(t / 60), n = Math.floor(t - e * 60), i = String(n).padStart(2, "0"); return `${e}:${i}`; } let v1 = class extends Yn({ nodeType: "audio", properties: [{ name: "duration", default: 0 }, { name: "mimeType", default: "" }, { name: "src", default: "", urlType: "url" }, { name: "title", default: "" }, { name: "thumbnailSrc", default: "" }], defaultRenderFn: uwe }) { static importDOM() { return lwe(this); } }; const mwe = (t) => new v1(t); function gwe(t) { return t instanceof v1; } function DW(t, e) { for (let n = 0; n < t.childNodes.length; n++) { let i = t.childNodes[n]; if (i.nodeType === 1 && !e.includes(i.tagName)) { for (; i.firstChild; ) t.insertBefore(i.firstChild, i); t.removeChild(i), n -= 1; } else i.nodeType === 1 && DW(i, e); } } function vwe(t, e = {}) { Vn(e); const n = e.createDocument(), i = n.createElement("div"); if ((!t.backgroundColor || !t.backgroundColor.match(/^[a-zA-Z\d-]+$/)) && (t.backgroundColor = "white"), i.classList.add("kg-card", "kg-callout-card", `kg-callout-card-${t.backgroundColor}`), t.calloutEmoji) { const a = n.createElement("div"); a.classList.add("kg-callout-emoji"), a.textContent = t.calloutEmoji, i.appendChild(a); } const r = n.createElement("div"); r.classList.add("kg-callout-text"); const s = n.createElement("div"); return s.innerHTML = t.calloutText, DW(s, ["A", "STRONG", "EM", "B", "I", "BR", "CODE", "MARK", "S", "DEL", "U", "SUP", "SUB"]), r.innerHTML = s.innerHTML, i.appendChild(r), { element: i }; } const bwe = (t) => { var n, i; const e = (i = (n = t.classList) == null ? void 0 : n.value) == null ? void 0 : i.match(/kg-callout-card-(\w+)/); return e && e[1]; }; function ywe(t) { return { div: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-callout-card"); return e.tagName === "DIV" && n ? { conversion(r) { const s = r == null ? void 0 : r.querySelector(".kg-callout-text"), o = r == null ? void 0 : r.querySelector(".kg-callout-emoji"), a = bwe(r), l = { calloutText: s && s.innerHTML.trim() || "", calloutEmoji: o && o.innerHTML.trim() || "", backgroundColor: a }; return { node: new t(l) }; }, priority: 1 } : null; } }; } let b1 = class extends Yn({ nodeType: "callout", properties: [{ name: "calloutText", default: "", wordCount: !0 }, { name: "calloutEmoji", default: "💡" }, { name: "backgroundColor", default: "blue" }], defaultRenderFn: vwe }) { /* override */ constructor({ calloutText: e, calloutEmoji: n, backgroundColor: i } = {}, r) { super(r), this.__calloutText = e || "", this.__calloutEmoji = n !== void 0 ? n : "💡", this.__backgroundColor = i || "blue"; } static importDOM() { return ywe(this); } }; function wwe(t) { return t instanceof b1; } const kwe = (t) => new b1(t), eh = (t) => t.showButton && t.buttonUrl && t.buttonText, tg = (t, e) => eh(t) ? `${e}` : e; function xwe(t) { (!t.buttonColor || !t.buttonColor.match(/^[a-zA-Z\d-]+|#([a-fA-F\d]{3}|[a-fA-F\d]{6})$/)) && (t.buttonColor = "accent"); const e = t.buttonColor === "accent" ? "kg-style-accent" : "", n = t.buttonColor === "accent" ? `style="color: ${t.buttonTextColor};"` : `style="background-color: ${t.buttonColor}; color: ${t.buttonTextColor};"`; return `
    ${t.hasSponsorLabel ? `
    ${t.sponsorLabel}
    ` : ""}
    ${t.imageUrl ? `
    ${tg(t, `CTA Image`)}
    ` : ""} ${t.textValue || t.showButton ? `
    ${t.textValue ? `
    ${t.textValue}
    ` : ""} ${eh(t) ? ` ${t.buttonText} ` : ""}
    ` : ""}
    `; } function _we(t, e = {}) { var s, o, a, l, u, f, d, h; let n = t.buttonColor === "accent" ? `color: ${t.buttonTextColor};` : `background-color: ${t.buttonColor}; color: ${t.buttonTextColor};`, i = n; ((s = e == null ? void 0 : e.feature) != null && s.emailCustomization || (o = e == null ? void 0 : e.feature) != null && o.emailCustomizationAlpha) && ((a = e == null ? void 0 : e.design) == null ? void 0 : a.buttonStyle) === "outline" && // accent buttons are fully handled by main template CSS t.buttonColor !== "accent" && (n = ` border: 1px solid ${t.buttonColor}; background-color: transparent; color: ${t.buttonColor}; `, i = ` background-color: transparent; color: ${t.buttonColor}; `); let r; if (t.imageUrl && t.imageWidth && t.imageHeight && (r = { width: t.imageWidth, height: t.imageHeight }, t.imageWidth >= 560 && (r = Eh(r, { width: 560 }))), t.layout === "minimal" && t.imageUrl && gf(t.imageUrl, e.siteUrl) && (l = e.canTransformImage) != null && l.call(e, t.imageUrl)) { const [, m, g] = t.imageUrl.match(/(.*\/content\/images)\/(.*)/), w = ((f = (u = e == null ? void 0 : e.imageOptimization) == null ? void 0 : u.internalImageSizes) == null ? void 0 : f["email-cta-minimal-image"]) || { width: 256, height: 256 }; t.imageUrl = `${m}/size/w${w.width}h${w.height}/${g}`; } if ((d = e.feature) != null && d.emailCustomization || (h = e.feature) != null && h.emailCustomizationAlpha) { const m = () => t.layout === "minimal" ? ` ${t.imageUrl ? ` ` : ""}
    ${tg(t, `CTA Image`)} ${t.textValue ? ` ` : ""} ${eh(t) ? ` ` : ""}
    ${t.textValue}
    ${t.buttonText}
    ` : ` ${t.imageUrl ? ` ` : ""} ${eh(t) ? ` ` : ""}
    ${tg(t, `CTA Image`)}
    ${t.textValue}
    ${t.buttonText}
    `; return ` ${t.hasSponsorLabel ? ` ` : ""} ${m()}
    ${t.sponsorLabel}
    `; } else { const m = () => t.layout === "minimal" ? ` ${t.imageUrl ? ` ` : ""}
    ${tg(t, `CTA Image`)} ${t.textValue ? ` ` : ""} ${eh(t) ? ` ` : ""}
    ${t.textValue}
    ${t.buttonText}
    ` : ` ${t.imageUrl ? ` ` : ""} ${eh(t) ? ` ` : ""}
    ${tg(t, `CTA Image`)}
    ${t.textValue}
    ${t.buttonText}
    `; return ` ${t.hasSponsorLabel ? ` ` : ""} ${m()}
    ${t.sponsorLabel}
    `; } } function Owe(t, e = {}) { Vn(e); const n = e.createDocument(), i = { layout: t.layout, alignment: t.alignment, textValue: t.textValue, showButton: t.showButton, showDividers: t.showDividers, buttonText: t.buttonText, buttonUrl: t.buttonUrl, buttonColor: t.buttonColor, buttonTextColor: t.buttonTextColor, hasSponsorLabel: t.hasSponsorLabel, backgroundColor: t.backgroundColor, sponsorLabel: t.sponsorLabel, imageUrl: t.imageUrl, imageWidth: t.imageWidth, imageHeight: t.imageHeight, linkColor: t.linkColor }; if ((!i.backgroundColor || !i.backgroundColor.match(/^[a-zA-Z\d-]+|#([a-fA-F\d]{3}|[a-fA-F\d]{6})$/)) && (i.backgroundColor = "white"), e.target === "email") { const a = e.createDocument().createElement("div"); return a.innerHTML = _we(i, e), s0({ element: a.firstElementChild }, t.visibility, e); } const r = n.createElement("div"); if (i.hasSponsorLabel) { const a = $W(r)(i.sponsorLabel, { firstChildInnerContent: !0 }); i.sponsorLabel = a; } const s = xwe(i); return r.innerHTML = s == null ? void 0 : s.trim(), s0({ element: r.firstElementChild }, t.visibility, e); } const Vc = (t) => { if (t === "transparent") return t; try { const [e, n, i] = t.match(/\d+/g), r = parseInt(e, 10).toString(16).padStart(2, "0"), s = parseInt(n, 10).toString(16).padStart(2, "0"), o = parseInt(i, 10).toString(16).padStart(2, "0"); return `#${r}${s}${o}`; } catch { return null; } }; function Swe(t) { return { div: (e) => { var i; return ((i = e.classList) == null ? void 0 : i.contains("kg-cta-card")) ? { conversion(r) { const s = r, o = s.getAttribute("data-layout") || "minimal", a = s.getAttribute("data-alignment") || "left", l = r.querySelector(".kg-cta-text"), u = r.querySelector(".kg-cta-button"), f = (u == null ? void 0 : u.style) || {}, d = f.backgroundColor || "#000000", h = f.color || "#ffffff", m = r.querySelector(".kg-cta-sponsor-label"), g = s.className.match(/kg-cta-bg-(\w+)/), w = g ? g[1] : "grey", x = s.classList.contains("kg-cta-has-dividers"), _ = r.querySelector(".kg-cta-image-container"), S = _ == null ? void 0 : _.querySelector("img"); let C = { imageUrl: "", imageWidth: null, imageHeight: null }; if (S) { const { src: $, width: P, height: W } = yw(S); C.imageUrl = $, C.imageWidth = P || null, C.imageHeight = W || null; } m && (m.innerHTML = `

    ${m.innerHTML.trim()}

    `); const E = { layout: o, alignment: a, textValue: l.textContent.trim() || "", showButton: !!u, showDividers: x, buttonText: (u == null ? void 0 : u.textContent.trim()) || "", buttonUrl: u == null ? void 0 : u.getAttribute("href"), buttonColor: Vc(d), buttonTextColor: Vc(h), hasSponsorLabel: !!m, sponsorLabel: (m == null ? void 0 : m.innerHTML) || "", backgroundColor: w, imageUrl: C.imageUrl, imageWidth: C.imageWidth, imageHeight: C.imageHeight }; return { node: new t(E) }; }, priority: 1 } : null; } }; } let y1 = class extends Yn({ nodeType: "call-to-action", hasVisibility: !0, properties: [ { name: "layout", default: "minimal" }, { name: "alignment", default: "left" }, { name: "textValue", default: "", wordCount: !0 }, { name: "showButton", default: !0 }, { name: "showDividers", default: !0 }, { name: "buttonText", default: "Learn more" }, { name: "buttonUrl", default: "" }, { name: "buttonColor", default: "#000000" }, // Where colour is customisable, we should use hex values { name: "buttonTextColor", default: "#ffffff" }, { name: "hasSponsorLabel", default: !0 }, { name: "sponsorLabel", default: '

    SPONSORED

    ' }, { name: "backgroundColor", default: "grey" }, // Since this is one of a few fixed options, we stick to colour names. { name: "linkColor", default: "text" }, { name: "imageUrl", default: "" }, { name: "imageWidth", default: null }, { name: "imageHeight", default: null } ], defaultRenderFn: Owe }) { static importDOM() { return Swe(this); } }; const Cwe = (t) => new y1(t), Ewe = (t) => t instanceof y1; class Twe { constructor(e) { this.NodeClass = e; } get DOMConversionMap() { const e = this; return { blockquote: () => ({ conversion(n) { var r; const i = (r = n.classList) == null ? void 0 : r.contains("kg-blockquote-alt"); return n.tagName === "BLOCKQUOTE" && i ? { node: new e.NodeClass() } : null; }, priority: 0 }) }; } } let w1 = class extends N.ElementNode { static getType() { return "aside"; } static clone(e) { return new this(e.__key); } static get urlTransformMap() { return {}; } constructor(e) { super(e); } static importJSON(e) { const n = new this(); return n.setFormat(e.format), n.setIndent(e.indent), n.setDirection(e.direction), n; } exportJSON() { return { ...super.exportJSON(), type: "aside", version: 1 }; } static importDOM() { return new Twe(this).DOMConversionMap; } /* c8 ignore start */ createDOM() { return document.createElement("div"); } updateDOM() { return !1; } isInline() { return !1; } extractWithChild() { return !0; } /* c8 ignore stop */ }; function $we() { return new w1(); } function Mwe(t) { return t instanceof w1; } function Nwe(t, e = {}) { return Vn(e), { element: e.createDocument().createElement("hr") }; } function Awe(t) { return { hr: () => ({ conversion() { return { node: new t() }; }, priority: 0 }) }; } let k1 = class extends Yn({ nodeType: "horizontalrule", defaultRenderFn: Nwe }) { static importDOM() { return Awe(this); } getTextContent() { return `--- `; } hasEditMode() { return !1; } }; function Dwe() { return new k1(); } function Pwe(t) { return t instanceof k1; } function Iwe(t, e = {}) { Vn(e); const n = e.createDocument(), i = t.html; if (!i) return Ir(n); const r = ` ${i} `, s = n.createElement("textarea"); return s.value = r, t.visibility ? s0({ element: s, type: "value" }, t.visibility, e) : { element: s, type: "value" }; } function Lwe(t) { return { "#comment": (e) => e.nodeType === 8 && e.nodeValue.trim().match(/^kg-card-begin:\s?html$/) ? { conversion(n) { let i = [], r = n.nextSibling; for (; r && !Rwe(r); ) { let a = r; i.push(a.outerHTML), r = a.nextSibling, a.remove(); } let s = { html: i.join(` `).trim() }; return { node: new t(s) }; }, priority: 0 } : null, table: (e) => e.nodeType === 1 && e.tagName === "TABLE" && e.parentNode.tagName !== "TABLE" ? { conversion(n) { const i = { html: n.outerHTML }; return { node: new t(i) }; }, priority: 0 } : null }; } function Rwe(t) { return t && t.nodeType === 8 && t.nodeValue.trim().match(/^kg-card-end:\s?html$/); } let x1 = class extends Yn({ nodeType: "html", hasVisibility: !0, properties: [{ name: "html", default: "", urlType: "html", wordCount: !0 }], defaultRenderFn: Iwe }) { static importDOM() { return Lwe(this); } isEmpty() { return !this.__html; } }; function jwe(t) { return new x1(t); } function Fwe(t) { return t instanceof x1; } function Bwe(t) { return { div: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-toggle-card"); return e.tagName === "DIV" && n ? { conversion(r) { const o = r.querySelector(".kg-toggle-heading-text").textContent, l = r.querySelector(".kg-toggle-content").textContent, u = { heading: o, content: l }; return { node: new t(u) }; }, priority: 1 } : null; } }; } const PW = function(t, ...e) { return typeof t == "string" ? t.replace(/\n\s+/g, "").trim() : t.reduce((i, r, s) => i + r + (e[s] || ""), "").replace(/\n\s+/g, "").trim(); }, fh = PW; var zwe = /* @__PURE__ */ Object.freeze({ __proto__: null, html: fh, oneline: PW }); function Wwe({ node: t }) { return `

    ${t.heading}

    ${t.content}
    `; } function Hwe({ node: t }, e = {}) { var n, i; return (n = e.feature) != null && n.emailCustomization || (i = e.feature) != null && i.emailCustomizationAlpha ? fh`

    ${t.heading}

    ${t.content}
    ` : `

    ${t.heading}

    ${t.content}
    `; } function Qwe(t, e = {}) { Vn(e); const n = e.createDocument(), i = e.target === "email" ? Hwe({ node: t }, e) : Wwe({ node: t }), r = n.createElement("div"); return r.innerHTML = i.trim(), { element: r.firstElementChild }; } let _1 = class extends Yn({ nodeType: "toggle", properties: [{ name: "heading", default: "", urlType: "html", wordCount: !0 }, { name: "content", default: "", urlType: "html", wordCount: !0 }], defaultRenderFn: Qwe }) { static importDOM() { return Bwe(this); } }; const Uwe = (t) => new _1(t); function Zwe(t) { return t instanceof _1; } function qwe(t) { return { div: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-button-card"); return e.tagName === "DIV" && n ? { conversion(r) { const s = e.className.match(/kg-align-(left|center)/); let o; s && (o = s[1]); const a = r == null ? void 0 : r.querySelector(".kg-btn"), l = a.getAttribute("href"), f = { buttonText: a.textContent, alignment: o, buttonUrl: l }; return { node: new t(f) }; }, priority: 1 } : null; } }; } function Ywe({ alignment: t = "", color: e = "accent", text: n = "", url: i = "" } = {}) { const r = nt("btn", e === "accent" && "btn-accent"); return fh`
    ${n}
    `; } function Vwe(t, e = {}) { Vn(e); const n = e.createDocument(); return !t.buttonUrl || t.buttonUrl.trim() === "" ? Ir(n) : e.target === "email" ? Gwe(t, e, n) : Xwe(t, n); } function Xwe(t, e) { const n = Kwe(t), i = e.createElement("div"); i.setAttribute("class", n); const r = e.createElement("a"); return r.setAttribute("href", t.buttonUrl), r.setAttribute("class", "kg-btn kg-btn-accent"), r.textContent = t.buttonText || "Button Title", i.appendChild(r), { element: i }; } function Gwe(t, e, n) { var o, a; const { buttonUrl: i, buttonText: r } = t; let s; if ((o = e.feature) != null && o.emailCustomization) { s = fh`
    ${r}
    `; const l = n.createElement("p"); return l.innerHTML = s, { element: l }; } else if ((a = e.feature) != null && a.emailCustomizationAlpha) { const l = Ywe({ alignment: t.alignment, color: "accent", url: i, text: r }); s = fh`
    ${l}
    `; const u = n.createElement("div"); return u.innerHTML = s, { element: u, type: "inner" }; } else { s = fh` `; const l = n.createElement("p"); return l.innerHTML = s, { element: l }; } } function Kwe(t) { let e = ["kg-card kg-button-card"]; return t.alignment && e.push(`kg-align-${t.alignment}`), e.join(" "); } let O1 = class extends Yn({ nodeType: "button", properties: [{ name: "buttonText", default: "" }, { name: "alignment", default: "center" }, { name: "buttonUrl", default: "", urlType: "url" }], defaultRenderFn: Vwe }) { static importDOM() { return qwe(this); } }; const Jwe = (t) => new O1(t); function eke(t) { return t instanceof O1; } function tke(t) { return { figure: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-bookmark-card"); return e.tagName === "FIGURE" && n ? { conversion(r) { var w, x, _, S, C, E, M, $; const s = (w = r == null ? void 0 : r.querySelector(".kg-bookmark-container")) == null ? void 0 : w.getAttribute("href"), o = (x = r == null ? void 0 : r.querySelector(".kg-bookmark-icon")) == null ? void 0 : x.src, a = (_ = r == null ? void 0 : r.querySelector(".kg-bookmark-title")) == null ? void 0 : _.textContent, l = (S = r == null ? void 0 : r.querySelector(".kg-bookmark-description")) == null ? void 0 : S.textContent, u = (C = r == null ? void 0 : r.querySelector(".kg-bookmark-publisher")) == null ? void 0 : C.textContent, f = (E = r == null ? void 0 : r.querySelector(".kg-bookmark-author")) == null ? void 0 : E.textContent, d = (M = r == null ? void 0 : r.querySelector(".kg-bookmark-thumbnail img")) == null ? void 0 : M.src, h = ($ = r == null ? void 0 : r.querySelector("figure.kg-bookmark-card figcaption")) == null ? void 0 : $.textContent, m = { url: s, metadata: { icon: o, title: a, description: l, author: u, publisher: f, thumbnail: d }, caption: h }; return { node: new t(m) }; }, priority: 1 } : null; }, div: (e) => e.nodeType === 1 && e.tagName === "DIV" && e.className.match(/graf--mixtapeEmbed/) ? { conversion(n) { const i = n.querySelector(".markup--mixtapeEmbed-anchor"), r = i.querySelector(".markup--mixtapeEmbed-strong"), s = i.querySelector(".markup--mixtapeEmbed-em"), o = n.querySelector(".mixtapeImage"); n.querySelector("br").remove(); const a = i.getAttribute("href"); let l = "", u = "", f = ""; r && r.innerHTML && (l = r.innerHTML.trim(), i.removeChild(r)), s && s.innerHTML && (u = s.innerHTML.trim(), i.removeChild(s)); let d = i.innerHTML.trim(); o && o.style["background-image"] && (f = o.style["background-image"].match(/url\(([^)]*?)\)/)[1]); let h = { url: a, metadata: { title: l, description: u, publisher: d, thumbnail: f } }; return { node: new t(h) }; }, priority: 1 } : null }; } function Di(t) { return t.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); } function HN(t, e, n) { if (t.length <= n) return Di(t); if (t && t.length > n) { let i = ""; return t.length > n && t.length <= e ? i = '' : t.length > e && (i = "…"), Di(t.substring(0, n - 1)) + '' + Di(t.substring(n - 1, e - 1)) + "" + i; } else return Di(t ?? ""); } function nke(t, e = {}) { Vn(e); const n = e.createDocument(); return !t.url || t.url.trim() === "" ? Ir(n) : e.target === "email" ? ike(t, n) : rke(t, n); } function ike(t, e) { const n = Di(t.title), i = Di(t.publisher), r = Di(t.author), s = Di(t.description), o = t.icon, a = t.url, l = t.thumbnail, u = t.caption, f = e.createElement("div"), d = `
    ${n}
    ${HN(s, 120, 90)}
    ${l ? `
    ` : ""}
    ${u ? `
    ${u}
    ` : ""}
    `; return f.innerHTML = d, { element: f }; } function rke(t, e) { const n = e.createElement("figure"), i = t.caption; let r = "kg-card kg-bookmark-card"; i && (r += " kg-card-hascaption"), n.setAttribute("class", r); const s = e.createElement("a"); s.setAttribute("class", "kg-bookmark-container"), s.href = t.url, n.appendChild(s); const o = e.createElement("div"); o.setAttribute("class", "kg-bookmark-content"), s.appendChild(o); const a = e.createElement("div"); a.setAttribute("class", "kg-bookmark-title"), a.textContent = t.title, o.appendChild(a); const l = e.createElement("div"); l.setAttribute("class", "kg-bookmark-description"), l.textContent = t.description, o.appendChild(l); const u = e.createElement("div"); if (u.setAttribute("class", "kg-bookmark-metadata"), o.appendChild(u), u.icon = t.icon, u.icon) { const f = e.createElement("img"); f.setAttribute("class", "kg-bookmark-icon"), f.src = u.icon, f.alt = "", u.appendChild(f); } if (u.publisher = t.publisher, u.publisher) { const f = e.createElement("span"); f.setAttribute("class", "kg-bookmark-author"), f.textContent = u.publisher, u.appendChild(f); } if (u.author = t.author, u.author) { const f = e.createElement("span"); f.setAttribute("class", "kg-bookmark-publisher"), f.textContent = u.author, u.appendChild(f); } if (u.thumbnail = t.thumbnail, u.thumbnail) { const f = e.createElement("div"); f.setAttribute("class", "kg-bookmark-thumbnail"), s.appendChild(f); const d = e.createElement("img"); d.src = u.thumbnail, d.alt = "", d.setAttribute("onerror", "this.style.display = 'none'"), f.appendChild(d); } if (i) { const f = e.createElement("figcaption"); f.innerHTML = i, n.appendChild(f); } return { element: n }; } let S1 = class extends Yn({ nodeType: "bookmark", properties: [{ name: "title", default: "", wordCount: !0 }, { name: "description", default: "", wordCount: !0 }, { name: "url", default: "", urlType: "url", wordCount: !0 }, { name: "caption", default: "", wordCount: !0 }, { name: "author", default: "" }, { name: "publisher", default: "" }, { name: "icon", urlPath: "metadata.icon", default: "", urlType: "url" }, { name: "thumbnail", urlPath: "metadata.thumbnail", default: "", urlType: "url" }], defaultRenderFn: nke }) { static importDOM() { return tke(this); } /* override */ constructor({ url: e, metadata: n, caption: i } = {}, r) { super(r), this.__url = e || "", this.__icon = (n == null ? void 0 : n.icon) || "", this.__title = (n == null ? void 0 : n.title) || "", this.__description = (n == null ? void 0 : n.description) || "", this.__author = (n == null ? void 0 : n.author) || "", this.__publisher = (n == null ? void 0 : n.publisher) || "", this.__thumbnail = (n == null ? void 0 : n.thumbnail) || "", this.__caption = i || ""; } /* @override */ getDataset() { const e = this.getLatest(); return { url: e.__url, metadata: { icon: e.__icon, title: e.__title, description: e.__description, author: e.__author, publisher: e.__publisher, thumbnail: e.__thumbnail }, caption: e.__caption }; } /* @override */ static importJSON(e) { const { url: n, metadata: i, caption: r } = e; return new this({ url: n, metadata: i, caption: r }); } /* @override */ exportJSON() { return { type: "bookmark", version: 1, url: this.url, metadata: { icon: this.icon, title: this.title, description: this.description, author: this.author, publisher: this.publisher, thumbnail: this.thumbnail }, caption: this.caption }; } isEmpty() { return !this.url; } }; const ske = (t) => new S1(t); function oke(t) { return t instanceof S1; } function ake(t) { if (!t) return 0; const e = ["Bytes", "KB", "MB", "GB", "TB"], n = t.split(" "), i = parseFloat(n[0]), r = n[1], s = e.indexOf(r); return s === -1 ? 0 : Math.round(i * Math.pow(1024, s)); } function IW(t) { if (!t) return "0 Byte"; const e = ["Bytes", "KB", "MB", "GB", "TB"]; if (t === 0) return "0 Byte"; const n = parseInt(Math.floor(Math.log(t) / Math.log(1024))); return Math.round(t / Math.pow(1024, n)) + " " + e[n]; } function lke(t, e = {}) { Vn(e); const n = e.createDocument(); return !t.src || t.src.trim() === "" ? Ir(n) : e.target === "email" ? uke(t, n, e) : cke(t, n); } function uke(t, e, n) { let i; !t.fileTitle && !t.fileCaption ? i = "margin-top: 6px; height: 20px; width: 20px; max-width: 20px; padding-top: 4px; padding-bottom: 4px;" : i = "margin-top: 6px; height: 24px; width: 24px; max-width: 24px;"; const r = `
    ${t.fileTitle ? `
    ${Di(t.fileTitle)}
    ` : ""} ${t.fileCaption ? `
    ${Di(t.fileCaption)}
    ` : ""}
    ${Di(t.fileName)} • ${IW(t.fileSize)}
    `, s = e.createElement("div"); return s.innerHTML = r.trim(), { element: s.firstElementChild }; } function cke(t, e) { const n = e.createElement("div"); n.setAttribute("class", "kg-card kg-file-card"); const i = e.createElement("a"); i.setAttribute("class", "kg-file-card-container"), i.setAttribute("href", t.src), i.setAttribute("title", "Download"), i.setAttribute("download", ""); const r = e.createElement("div"); r.setAttribute("class", "kg-file-card-contents"); const s = e.createElement("div"); s.setAttribute("class", "kg-file-card-title"), s.textContent = t.fileTitle || ""; const o = e.createElement("div"); o.setAttribute("class", "kg-file-card-caption"), o.textContent = t.fileCaption || ""; const a = e.createElement("div"); a.setAttribute("class", "kg-file-card-metadata"); const l = e.createElement("div"); l.setAttribute("class", "kg-file-card-filename"), l.textContent = t.fileName || ""; const u = e.createElement("div"); u.setAttribute("class", "kg-file-card-filesize"), u.textContent = t.formattedFileSize || "", a.appendChild(l), a.appendChild(u), r.appendChild(s), r.appendChild(o), r.appendChild(a), i.appendChild(r); const f = e.createElement("div"); f.setAttribute("class", "kg-file-card-icon"); const d = e.createElementNS("http://www.w3.org/2000/svg", "svg"); d.setAttribute("viewBox", "0 0 24 24"); const h = e.createElementNS("http://www.w3.org/2000/svg", "defs"), m = e.createElementNS("http://www.w3.org/2000/svg", "style"); m.textContent = ".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}", h.appendChild(m); const g = e.createElementNS("http://www.w3.org/2000/svg", "title"); g.textContent = "download-circle"; const w = e.createElementNS("http://www.w3.org/2000/svg", "polyline"); w.setAttribute("class", "a"), w.setAttribute("points", "8.25 14.25 12 18 15.75 14.25"); const x = e.createElementNS("http://www.w3.org/2000/svg", "line"); x.setAttribute("class", "a"), x.setAttribute("x1", "12"), x.setAttribute("y1", "6.75"), x.setAttribute("x2", "12"), x.setAttribute("y2", "18"); const _ = e.createElementNS("http://www.w3.org/2000/svg", "circle"); return _.setAttribute("class", "a"), _.setAttribute("cx", "12"), _.setAttribute("cy", "12"), _.setAttribute("r", "11.25"), d.appendChild(h), d.appendChild(g), d.appendChild(w), d.appendChild(x), d.appendChild(_), f.appendChild(d), i.appendChild(f), n.appendChild(i), { element: n }; } function fke(t) { return { div: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-file-card"); return e.tagName === "DIV" && n ? { conversion(r) { var m, g, w, x; const o = r.querySelector("a").getAttribute("href"), a = ((m = r.querySelector(".kg-file-card-title")) == null ? void 0 : m.textContent) || "", l = ((g = r.querySelector(".kg-file-card-caption")) == null ? void 0 : g.textContent) || "", u = ((w = r.querySelector(".kg-file-card-filename")) == null ? void 0 : w.textContent) || ""; let f = ake(((x = r.querySelector(".kg-file-card-filesize")) == null ? void 0 : x.textContent) || ""); const d = { src: o, fileTitle: a, fileCaption: l, fileName: u, fileSize: f }; return { node: new t(d) }; }, priority: 1 } : null; } }; } let C1 = class extends Yn({ nodeType: "file", properties: [{ name: "src", default: "", urlType: "url" }, { name: "fileTitle", default: "", wordCount: !0 }, { name: "fileCaption", default: "", wordCount: !0 }, { name: "fileName", default: "" }, { name: "fileSize", default: "" }], defaultRenderFn: lke }) { /* @override */ exportJSON() { const { src: e, fileTitle: n, fileCaption: i, fileName: r, fileSize: s } = this; return { type: "file", src: e && e.startsWith("data:") ? "" : e, fileTitle: n, fileCaption: i, fileName: r, fileSize: s }; } static importDOM() { return fke(this); } get formattedFileSize() { return IW(this.fileSize); } }; function dke(t) { return t instanceof C1; } const hke = (t) => new C1(t); function ww(t) { return t = t.replace(/<[^>]*>?/gm, ""), t = t.replace(/[^\w\s]/gi, ""), t = t.replace(/\s+/g, "-"), t = t.toLowerCase(), t; } function pke(t, e = {}) { Vn(e); const n = e.createDocument(); if (!t.header && !t.subheader && (!t.buttonEnabled || !t.buttonUrl || !t.buttonText)) return Ir(n); const i = { size: t.size, style: t.style, buttonEnabled: t.buttonEnabled && !!t.buttonUrl && !!t.buttonText, buttonUrl: t.buttonUrl, buttonText: t.buttonText, header: t.header, headerSlug: ww(t.header), subheader: t.subheader, subheaderSlug: ww(t.subheader), hasHeader: !!t.header, hasSubheader: !!t.subheader && !!t.subheader.replace(/(
    )+$/g).trim(), backgroundImageStyle: t.style === "image" ? `background-image: url(${t.backgroundImageSrc})` : "", backgroundImageSrc: t.backgroundImageSrc }, r = n.createElement("div"); if (r.classList.add("kg-card", "kg-header-card", "kg-width-full", `kg-size-${i.size}`, `kg-style-${i.style}`), r.setAttribute("data-kg-background-image", i.backgroundImageSrc), r.setAttribute("style", i.backgroundImageStyle), i.hasHeader) { const s = n.createElement("h2"); s.classList.add("kg-header-card-header"), s.setAttribute("id", i.headerSlug), s.innerHTML = i.header, r.appendChild(s); } if (i.hasSubheader) { const s = n.createElement("h3"); s.classList.add("kg-header-card-subheader"), s.setAttribute("id", i.subheaderSlug), s.innerHTML = i.subheader, r.appendChild(s); } if (i.buttonEnabled) { const s = n.createElement("a"); s.classList.add("kg-header-card-button"), s.setAttribute("href", i.buttonUrl), s.textContent = i.buttonText, r.appendChild(s); } return { element: r }; } function mke(t) { return { div: (e) => { var r, s, o, a; const n = ((r = e.classList) == null ? void 0 : r.contains("kg-header-card")) && !((s = e.classList) != null && s.contains("kg-v2")), i = ((o = e.classList) == null ? void 0 : o.contains("kg-header-card")) && ((a = e.classList) == null ? void 0 : a.contains("kg-v2")); return e.tagName === "DIV" && n ? { conversion(l) { const u = l, f = l.querySelector(".kg-header-card-header"), d = l.querySelector(".kg-header-card-subheader"), h = l.querySelector(".kg-header-card-button"), m = u.classList.contains("kg-size-large") ? "large" : "small", g = u.classList.contains("kg-style-image") ? "image" : "text", w = u.getAttribute("data-kg-background-image"), _ = !!f ? f.textContent : "", C = !!d ? d.textContent : "", E = !!h, M = E ? h.getAttribute("href") : "", $ = E ? h.textContent : "", P = { size: m, style: g, backgroundImageSrc: w, header: _, subheader: C, buttonEnabled: E, buttonUrl: M, buttonText: $, version: 1 }; return { node: new t(P) }; }, priority: 1 } : e.tagName === "DIV" && i ? { conversion(l) { var L; const u = l, f = u.querySelector(".kg-header-card-heading"), d = u.querySelector(".kg-header-card-subheading"), h = u.querySelector(".kg-header-card-button"), m = u.classList.contains("kg-align-center") ? "center" : "", g = (L = u.querySelector(".kg-header-card-image")) == null ? void 0 : L.getAttribute("src"), w = g ? "split" : "", x = u.classList.contains("kg-style-accent") ? "accent" : u.getAttribute("data-background-color"), _ = (h == null ? void 0 : h.getAttribute("data-button-color")) || "", S = (f == null ? void 0 : f.getAttribute("data-text-color")) || "", C = (h == null ? void 0 : h.getAttribute("data-button-text-color")) || "", E = (f == null ? void 0 : f.textContent) || "", M = (d == null ? void 0 : d.textContent) || "", $ = !!h, P = $ ? h.getAttribute("href") : "", W = $ ? h.textContent : "", z = { backgroundColor: x, buttonColor: _, alignment: m, backgroundImageSrc: g, layout: w, textColor: S, header: E, subheader: M, buttonEnabled: $, buttonUrl: P, buttonText: W, buttonTextColor: C, version: 2 }; return { node: new t(z) }; }, priority: 1 } : null; } }; } function gke(t, e = {}) { const n = yke(t).join(" "), i = t.backgroundColor === "accent" ? "kg-style-accent" : "", r = t.buttonColor === "accent" ? "kg-style-accent" : "", s = t.buttonColor !== "accent" ? `background-color: ${t.buttonColor};` : "", o = t.alignment === "center" ? "kg-align-center" : "", a = t.backgroundColor !== "accent" && (!t.backgroundImageSrc || t.layout === "split") ? `background-color: ${t.backgroundColor}` : ""; let l = ""; if (t.backgroundImageSrc) { const m = { src: t.backgroundImageSrc, width: t.backgroundImageWidth, height: t.backgroundImageHeight }, g = NW({ ...m, options: e }), w = g ? `srcset="${g}"` : ""; l = ` `; } const u = () => t.header ? `

    ${t.header}

    ` : "", f = () => t.subheader ? `

    ${t.subheader}

    ` : "", d = () => t.buttonEnabled && t.buttonUrl && t.buttonUrl.trim() !== "" ? `${t.buttonText}` : "", h = a ? `style="${a};"` : ""; return `
    ${t.layout !== "split" ? l : ""}
    ${t.layout === "split" ? l : ""}
    ${u()} ${f()} ${d()}
    `; } function vke(t, e) { var u, f, d, h, m; const n = t.backgroundColor === "accent" ? `background-color: ${t.accentColor};` : ""; let i = t.buttonColor === "accent" ? `background-color: ${t.accentColor};` : t.buttonColor, r = t.buttonColor !== "accent" ? `background-color: ${t.buttonColor};` : "", s = t.buttonTextColor; const o = t.alignment === "center" ? "text-align: center;" : "", a = t.backgroundImageSrc ? t.layout !== "split" ? `background-image: url(${t.backgroundImageSrc}); background-size: cover; background-position: center center;` : `background-color: ${t.backgroundColor};` : `background-color: ${t.backgroundColor};`, l = `background-image: url(${t.backgroundImageSrc}); background-size: ${t.backgroundSize !== "contain" ? "cover" : "50%"}; background-position: center`; return ((u = e == null ? void 0 : e.feature) != null && u.emailCustomization || (f = e == null ? void 0 : e.feature) != null && f.emailCustomizationAlpha) && ((d = e == null ? void 0 : e.design) == null ? void 0 : d.buttonStyle) === "outline" && (t.buttonColor === "accent" ? (i = "", r = ` border: 1px solid ${t.accentColor}; background-color: transparent; color: ${t.accentColor} !important; `, s = t.accentColor) : (r = ` border: 1px solid ${t.buttonColor}; background-color: transparent; color: ${t.buttonColor} !important; `, s = t.buttonColor)), (h = e == null ? void 0 : e.feature) != null && h.emailCustomization || (m = e == null ? void 0 : e.feature) != null && m.emailCustomizationAlpha ? `
    ${t.layout === "split" && t.backgroundImageSrc ? `
    ` : ""}
    ${t.buttonEnabled && t.buttonUrl && t.buttonUrl.trim() !== "" ? ` ` : ""}

    ${t.header}

    ${t.subheader}

    ${t.buttonText}
    ` : `
    ${t.layout === "split" && t.backgroundImageSrc ? `
    ` : ""}

    ${t.header}

    ${t.subheader}

    ${t.buttonEnabled && t.buttonUrl && t.buttonUrl.trim() !== "" ? ` ${t.buttonText} ` : ""}
    `; } function bke(t, e = {}) { var o; Vn(e); const n = e.createDocument(), i = { alignment: t.__alignment, buttonText: t.__buttonText, buttonEnabled: t.__buttonEnabled, buttonUrl: t.__buttonUrl, header: t.__header, subheader: t.__subheader, backgroundImageSrc: t.__backgroundImageSrc, backgroundImageWidth: t.__backgroundImageWidth, backgroundImageHeight: t.__backgroundImageHeight, backgroundSize: t.__backgroundSize, backgroundColor: t.__backgroundColor, buttonColor: t.__buttonColor, layout: t.__layout, textColor: t.__textColor, buttonTextColor: t.__buttonTextColor, swapped: t.__swapped, accentColor: t.__accentColor }; if (e.target === "email") { const l = e.createDocument().createElement("div"); return l.innerHTML = (o = vke(i, e)) == null ? void 0 : o.trim(), { element: l.firstElementChild }; } const r = gke(i, e), s = n.createElement("div"); if (s.innerHTML = r == null ? void 0 : r.trim(), i.header === "") { const a = s.querySelector(".kg-header-card-heading"); a && a.remove(); } if (i.subheader === "") { const a = s.querySelector(".kg-header-card-subheading"); a && a.remove(); } return { element: s.firstElementChild }; } function yke(t) { let e = ["kg-card kg-header-card kg-v2"]; return t.layout && t.layout !== "split" && e.push(`kg-width-${t.layout}`), t.layout === "split" && e.push("kg-layout-split kg-width-full"), t.swapped && t.layout === "split" && e.push("kg-swapped"), t.layout && t.layout === "full" && e.push("kg-content-wide"), t.layout === "split" && t.backgroundSize === "contain" && e.push("kg-content-wide"), e; } let E1 = class extends Yn({ nodeType: "header", properties: [ { name: "size", default: "small" }, { name: "style", default: "dark" }, { name: "buttonEnabled", default: !1 }, { name: "buttonUrl", default: "", urlType: "url" }, { name: "buttonText", default: "" }, { name: "header", default: "", urlType: "html", wordCount: !0 }, { name: "subheader", default: "", urlType: "html", wordCount: !0 }, { name: "backgroundImageSrc", default: "", urlType: "url" }, // we need to initialize a new version property here so that we can separate v1 and v2 // we should never remove old properties, only add new ones, as this could break & corrupt existing content // ref https://lexical.dev/docs/concepts/serialization#versioning--breaking-changes { name: "version", default: 1 }, { name: "accentColor", default: "#FF1A75" }, // this is used to have the accent color hex for email // v2 properties { name: "alignment", default: "center" }, { name: "backgroundColor", default: "#000000" }, { name: "backgroundImageWidth", default: null }, { name: "backgroundImageHeight", default: null }, { name: "backgroundSize", default: "cover" }, { name: "textColor", default: "#FFFFFF" }, { name: "buttonColor", default: "#ffffff" }, { name: "buttonTextColor", default: "#000000" }, { name: "layout", default: "full" }, // replaces size { name: "swapped", default: !1 } ], defaultRenderFn: { 1: pke, 2: bke } }) { static importDOM() { return mke(this); } }; const wke = (t) => new E1(t); function kke(t) { return t instanceof E1; } function xke(t) { return { "#comment": (e) => e.nodeType === 8 && e.nodeValue.trim() === "members-only" ? { conversion() { return { node: new t() }; }, priority: 0 } : null }; } function _ke(t, e = {}) { Vn(e); const i = e.createDocument().createElement("div"); return i.innerHTML = "", { element: i, type: "inner" }; } let T1 = class extends Yn({ nodeType: "paywall", defaultRenderFn: _ke }) { static importDOM() { return xke(this); } }; const Oke = (t) => new T1(t); function Ske(t) { return t instanceof T1; } function Cke(t) { return { div: (e) => { var i; const n = (i = e.classList) == null ? void 0 : i.contains("kg-product-card"); return e.tagName === "DIV" && n ? { conversion(r) { const s = Io(r, { selector: ".kg-product-card-title" }), o = Io(r, { selector: ".kg-product-card-description" }), a = { productButtonEnabled: !1, productRatingEnabled: !1, productTitle: s, productDescription: o }, l = r.querySelector(".kg-product-card-image"); l && l.getAttribute("src") && (a.productImageSrc = l.getAttribute("src"), l.getAttribute("width") && (a.productImageWidth = l.getAttribute("width")), l.getAttribute("height") && (a.productImageHeight = l.getAttribute("height"))); const u = [...r.querySelectorAll(".kg-product-card-rating-active")].length; u && (a.productRatingEnabled = !0, a.productStarRating = u); const f = r.querySelector("a"); if (f) { const h = f.getAttribute("href"), m = Eke(f); h && m && (a.productButtonEnabled = !0, a.productButton = m, a.productUrl = h); } return !s && !o && !l && !f ? null : { node: new t(a) }; }, priority: 1 } : null; } }; } function Eke(t) { let e = t.textContent; return e && (e = e.replace(/\n/g, " ").replace(/\s+/g, " ").trim()), e; } function Tke(t, e = {}) { var l, u, f; Vn(e); const n = e.createDocument(); if (t.isEmpty()) return Ir(n); let i = "5px"; ((l = e.design) == null ? void 0 : l.buttonCorners) === "rounded" ? i = "6px" : ((u = e.design) == null ? void 0 : u.buttonCorners) === "square" ? i = "0px" : ((f = e.design) == null ? void 0 : f.buttonCorners) === "pill" && (i = "9999px"); const r = { ...t.getDataset(), starIcon: '', buttonBorderRadius: i }, s = "kg-product-card-rating-active"; for (let d = 1; d <= 5; d++) r["star" + d] = "", t.productStarRating >= d && (r["star" + d] = s); const o = e.target === "email" ? Mke({ data: r, feature: e.feature }) : $ke({ data: r, feature: e.feature }), a = n.createElement("div"); return a.innerHTML = o.trim(), { element: a.firstElementChild }; } function $ke({ data: t }) { return `
    ${t.productImageSrc ? `` : ""}

    ${t.productTitle}

    ${t.productRatingEnabled ? `
    ${t.starIcon} ${t.starIcon} ${t.starIcon} ${t.starIcon} ${t.starIcon}
    ` : ""}
    ${t.productDescription}
    ${t.productButtonEnabled ? ` ${t.productButton} ` : ""}
    `; } function Mke({ data: t, feature: e }) { let n; return t.productImageWidth && t.productImageHeight && (n = { width: t.productImageWidth, height: t.productImageHeight }, t.productImageWidth >= 560 && (n = Eh(n, { width: 560 }))), e != null && e.emailCustomization || e != null && e.emailCustomizationAlpha ? `
    ${t.productImageSrc ? ` ` : ""} ${t.productRatingEnabled ? ` ` : ""} ${t.productButtonEnabled ? ` ` : ""}

    ${t.productTitle}

    ${t.productDescription}
    ${t.productButton}
    ` : ` ${t.productImageSrc ? ` ` : ""} ${t.productRatingEnabled ? ` ` : ""} ${t.productButtonEnabled ? ` ` : ""}

    ${t.productTitle}

    ${t.productDescription}
    `; } let $1 = class extends Yn({ nodeType: "product", properties: [{ name: "productImageSrc", default: "", urlType: "url" }, { name: "productImageWidth", default: null }, { name: "productImageHeight", default: null }, { name: "productTitle", default: "", urlType: "html", wordCount: !0 }, { name: "productDescription", default: "", urlType: "html", wordCount: !0 }, { name: "productRatingEnabled", default: !1 }, { name: "productStarRating", default: 5 }, { name: "productButtonEnabled", default: !1 }, { name: "productButton", default: "" }, { name: "productUrl", default: "" }], defaultRenderFn: Tke }) { /* override */ exportJSON() { const { productImageSrc: e, productImageWidth: n, productImageHeight: i, productTitle: r, productDescription: s, productRatingEnabled: o, productStarRating: a, productButtonEnabled: l, productButton: u, productUrl: f } = this; return { type: "product", version: 1, productImageSrc: e && e.startsWith("data:") ? "" : e, productImageWidth: n, productImageHeight: i, productTitle: r, productDescription: s, productRatingEnabled: o, productStarRating: a, productButtonEnabled: l, productButton: u, productUrl: f }; } static importDOM() { return Cke(this); } isEmpty() { const e = this.__productButtonEnabled && this.__productUrl && this.__productButton; return !this.__productTitle && !this.__productDescription && !e && !this.__productImageSrc && !this.__productRatingEnabled; } }; const Nke = (t) => new $1(t); function Ake(t) { return t instanceof $1; } function Dke(t) { return { figure: (e) => { if (e.nodeType === 1 && e.tagName === "FIGURE") { const n = e.querySelector("iframe"); if (n) return { conversion(r) { const s = QN(n); return s ? (s.caption = Io(r), { node: new t(s) }) : null; }, priority: 1 }; if (e.querySelector("blockquote")) return { conversion(r) { const s = r.querySelector("a"); if (!s) return null; let o = s.getAttribute("href"); if (!o || !o.match(/^https?:\/\//i)) return null; let a = { url: o }; a.caption = Io(r); let l = r.querySelector("figcaption"); return l == null || l.remove(), a.html = r.innerHTML, { node: new t(a) }; }, priority: 1 }; } return null; }, iframe: (e) => e.nodeType === 1 && e.tagName === "IFRAME" ? { conversion(n) { const i = QN(n); return i ? { node: new t(i) } : null; }, priority: 1 } : null }; } function QN(t) { if (!t.src || !t.src.match(/^(https?:)?\/\//i)) return; t.src.match(/^\/\//) && (t.src = `https:${t.src}`); let e = { url: t.src }; return e.html = t.outerHTML, e; } function Pke(t, e, n) { const i = t.metadata, r = e.createElement("figure"); r.setAttribute("class", "kg-card kg-embed-card"); let s = t.html; const o = i && i.tweet_data, a = n.target === "email"; if (o && a) { const u = o.id, f = new Intl.NumberFormat("en-US", { style: "decimal", notation: "compact", unitDisplay: "narrow", maximumFractionDigits: 1 }), d = f.format(o.public_metrics.retweet_count), h = f.format(o.public_metrics.like_count), m = o.users && o.users.find((W) => W.id === o.author_id), g = ht.fromISO(o.created_at).toLocaleString(ht.TIME_SIMPLE), w = ht.fromISO(o.created_at).toLocaleString(ht.DATE_MED), x = o.entities && o.entities.mentions || [], _ = o.entities && o.entities.urls || [], S = o.entities && o.entities.hashtags || [], C = x.concat(_).concat(S).sort((W, z) => W.start - z.start); let E = o.text, M = null; const $ = o.attachments && o.attachments && o.attachments.media_keys; $ && (M = o.includes.media[0].preview_image_url || o.includes.media[0].url); const P = o.attachments && o.attachments && o.attachments.poll_ids; if (x) { let W = 0, z = [], Z = Hme(E); for (const L of C) { let Q = "text", V = Z.slice(L.start, L.end + 1).join("").replace(/\n/g, "
    "); L.url && (!L.display_url || L.display_url.startsWith("pic.twitter.com") ? Q = "img_url" : (Q = "url", V = V.replace(L.url, L.display_url))), L.username && (Q = "mention"), L.tag && (Q = "hashtag"), z.push({ type: "text", data: Z.slice(W, L.start).join("").replace(/\n/g, "
    ") }), z.push({ type: Q, data: V }), W = L.end + 1; } z.push({ type: "text", data: Z.slice(W, Z.length).join("").replace(/\n/g, "
    ") }), E = z.reduce((L, Q) => Q.type === "text" ? L + Q.data : Q.type === "mention" ? L + `${Q.data}` : Q.type === "hashtag" ? L + `${Q.data}` : Q.type === "url" ? L + `${Q.data}` : L, ""); } s = `
    ${m ? ` ${m.profile_image_url ? `` : ""} ${m.name ? ` ` : ""} ` : ""} ${$ ? `` : ""}
    ${m.name}
    @${m.username}
    ${E} ${P ? '
    View poll →' : ""}
    ${g} • ${w}
    ${h} likes • ${d} retweets
    `; } r.innerHTML = s.trim(); const l = t.caption; if (l) { const u = e.createElement("figcaption"); u.innerHTML = l, r.appendChild(u), r.setAttribute("class", `${r.getAttribute("class")} kg-card-hascaption`); } return { element: r }; } function Ike(t, e = {}) { Vn(e); const n = e.createDocument(); return t.embedType === "twitter" ? Pke(t, n, e) : Lke(t, n, e); } function Lke(t, e, n) { if (t.isEmpty()) return Ir(e); const i = n.target === "email", r = t.metadata, s = t.url, o = t.embedType === "video" && r && r.thumbnail_url, a = e.createElement("figure"); if (a.setAttribute("class", "kg-card kg-embed-card"), i && o) { const f = r.thumbnail_width / r.thumbnail_height, d = Math.round(600 / 4), h = Math.round(600 / f), m = `
     
    `; a.innerHTML = m.trim(); } else a.innerHTML = t.html; const l = t.caption; if (l) { const u = e.createElement("figcaption"); u.innerHTML = l, a.appendChild(u), a.setAttribute("class", `${a.getAttribute("class")} kg-card-hascaption`); } return { element: a }; } let M1 = class extends Yn({ nodeType: "embed", properties: [{ name: "url", default: "", urlType: "url" }, { name: "embedType", default: "" }, { name: "html", default: "" }, { name: "metadata", default: {} }, { name: "caption", default: "", wordCount: !0 }], defaultRenderFn: Ike }) { static importDOM() { return Dke(this); } isEmpty() { return !this.__url && !this.__html; } }; const Rke = (t) => new M1(t); function jke(t) { return t instanceof M1; } function T4(t) { return t.replace(/\n/g, " ").replace(/\s+/g, " ").trim(); } function $4(t) { return t.replace(/\{(\w*?)(?:,? *"(.*?)")?\}/g, "%%$&%%"); } function M4(t, e) { const n = e.createElement("div"); return n.innerHTML = t, n.querySelectorAll("code").forEach((s) => { if (s.textContent.match(/((.*?){.*?}(.*?))/gi)) { const a = s.innerHTML; s.parentNode.replaceChild(e.createRange().createContextualFragment(a), s); } }), n.innerHTML; } function Fke(t, e = {}) { Vn(e); const n = e.createDocument(), i = t.html; if (!i || e.target !== "email") return Ir(n); const r = $4(M4(T4(i), n)), s = n.createElement("div"); return s.innerHTML = r, { element: s, type: "inner" }; } let N1 = class extends Yn({ nodeType: "email", properties: [{ name: "html", default: "", urlType: "html" }], defaultRenderFn: Fke }) { }; const Bke = (t) => new N1(t); function zke(t) { return t instanceof N1; } function U3(t, e) { const n = yw(t); return n.fileName = t.src.match(/[^/]*$/)[0], n.row = Math.floor(e / 3), n; } function Wke(t) { return { figure: (e) => { var n; return (n = e.classList) != null && n.contains("kg-gallery-card") ? { conversion(i) { const r = {}, s = Array.from(i.querySelectorAll("img")); return r.images = s.map(U3), r.caption = Io(i), { node: new t(r) }; }, priority: 1 } : null; }, div: (e) => { function n(r) { var s; return r.tagName === "DIV" && ((s = r.dataset) == null ? void 0 : s.paragraphCount) && r.querySelectorAll("img").length > 0; } if (n(e)) return { conversion(r) { const s = { caption: Io(r) }; let o = Array.from(r.querySelectorAll("img")), a = r.nextElementSibling; for (; a && n(a); ) { let u = a; o = o.concat(Array.from(u.querySelectorAll("img"))); const f = Io(u); f && (s.caption = `${s.caption} / ${f}`), a = u.nextElementSibling, u.remove(); } return s.images = o.map(U3), { node: new t(s) }; }, priority: 1 }; function i(r) { return r.tagName === "DIV" && r.className.match(/sqs-gallery-container/) && !r.className.match(/summary-/); } return i(e) ? { conversion(r) { const s = {}; let o = Array.from(r.querySelectorAll("img.thumb-image")); return o = o.map((l) => { if (!l.getAttribute("src")) if (l.previousElementSibling.tagName === "NOSCRIPT" && l.previousElementSibling.getElementsByTagName("img").length) { const u = l.previousElementSibling; l.setAttribute("src", l.getAttribute("data-src")), u.remove(); } else return; return l; }).filter((l) => l !== void 0), s.images = o.map(U3), s.caption = Io(r, { selector: ".meta-title" }), { node: new t(s) }; }, priority: 1 } : null; } }; } const Hke = 3; function Qke(t) { return t.fileName && t.src && t.width && t.height; } function Uke(t) { const e = [], n = t.length; return t.forEach((i, r) => { let s = i.row; n > 1 && n % Hke === 1 && r === n - 2 && (s = s + 1), e[s] || (e[s] = []), e[s].push(i); }), e; } function Zke(t, e = {}) { Vn(e); const n = e.createDocument(), i = t.images.filter(Qke); if (!i.length) return Ir(n); const r = n.createElement("figure"); r.setAttribute("class", "kg-card kg-gallery-card kg-width-wide"); const s = n.createElement("div"); s.setAttribute("class", "kg-gallery-container"), r.appendChild(s); const o = Uke(i); if (o.forEach((a) => { const l = n.createElement("div"); l.setAttribute("class", "kg-gallery-row"), a.forEach((u) => { const f = n.createElement("div"); f.setAttribute("class", "kg-gallery-image"); const d = n.createElement("img"); d.setAttribute("src", u.src), d.setAttribute("width", u.width), d.setAttribute("height", u.height), d.setAttribute("loading", "lazy"), d.setAttribute("alt", u.alt || ""), u.title && d.setAttribute("title", u.title); const { canTransformImage: h } = e, { defaultMaxWidth: m } = e.imageOptimization || {}; if (m && u.width > m && gf(u.src, e.siteUrl) && h && h(u.src)) { const { width: g, height: w } = Eh(u, { width: m }); d.setAttribute("width", g), d.setAttribute("height", w); } if (e.target !== "email" && (AW(d, u, e), d.getAttribute("srcset") && u.width >= 720 && (o.length === 1 && a.length === 1 && u.width >= 1200 ? d.setAttribute("sizes", "(min-width: 1200px) 1200px") : d.setAttribute("sizes", "(min-width: 720px) 720px"))), e.target === "email") { if (u.width > 600) { const g = Eh(u, { width: 600 }); d.setAttribute("width", g.width), d.setAttribute("height", g.height); } if (gf(u.src, e.siteUrl) && e.canTransformImage && e.canTransformImage(u.src)) { const w = oE(u, e.imageOptimization.contentImageSizes).find((x) => x >= 1200); if (!(!w || w === u.width)) { const [, x, _] = u.src.match(/(.*\/content\/images)\/(.*)/); d.setAttribute("src", `${x}/size/w${w}/${_}`); } } if (MW(u.src)) { const g = new URL(u.src); g.searchParams.set("w", 1200), d.setAttribute("src", g.href); } } if (u.href) { const g = n.createElement("a"); g.setAttribute("href", u.href), g.appendChild(d), f.appendChild(g); } else f.appendChild(d); l.appendChild(f); }), s.appendChild(l); }), t.caption) { let a = n.createElement("figcaption"); a.innerHTML = t.caption, r.appendChild(a), r.setAttribute("class", `${r.getAttribute("class")} kg-card-hascaption`); } return { element: r }; } let A1 = class extends Yn({ nodeType: "gallery", properties: [{ name: "images", default: [] }, { name: "caption", default: "", wordCount: !0 }], defaultRenderFn: Zke }) { /* override */ static get urlTransformMap() { return { caption: "html", images: { src: "url", caption: "html" } }; } static importDOM() { return Wke(this); } hasEditMode() { return !1; } }; const qke = (t) => new A1(t); function Yke(t) { return t instanceof A1; } function Vke(t, e = {}) { Vn(e); const n = e.createDocument(), { html: i, buttonText: r, buttonUrl: s, showButton: o, alignment: a, segment: l, showDividers: u } = t, f = o && !!r && !!s; if (!i && !f || e.target !== "email") return Ir(n); const d = n.createElement("div"); l && d.setAttribute("data-gh-segment", l), a === "center" && d.setAttribute("class", "align-center"), u && d.appendChild(n.createElement("hr")); const h = $4(M4(T4(i), n)); if (d.innerHTML = d.innerHTML + h, f) { const m = `

    `, g = $4(M4(T4(m), n)); d.innerHTML = d.innerHTML + g; } return u && d.appendChild(n.createElement("hr")), { element: d }; } let D1 = class extends Yn({ nodeType: "email-cta", properties: [{ name: "alignment", default: "left" }, { name: "buttonText", default: "" }, { name: "buttonUrl", default: "", urlType: "url" }, { name: "html", default: "", urlType: "html" }, { name: "segment", default: "status:free" }, { name: "showButton", default: !1 }, { name: "showDividers", default: !0 }], defaultRenderFn: Vke }) { }; const Xke = (t) => new D1(t); function Gke(t) { return t instanceof D1; } function Kke(t) { return t.classList.contains("kg-layout-split") ? "split" : t.classList.contains("kg-layout-full") ? "full" : t.classList.contains("kg-layout-wide") ? "wide" : "regular"; } function Jke(t) { return { div: (e) => { var i; const n = ((i = e.dataset) == null ? void 0 : i.lexicalSignupForm) === ""; return e.tagName === "DIV" && n ? { conversion(r) { var W, z, Z, L, Q, V, H, R, q, Y, K, te, se, ce, U; const s = Kke(r), o = ((W = r.querySelector("h2")) == null ? void 0 : W.textContent) || "", a = ((z = r.querySelector("h3")) == null ? void 0 : z.textContent) || "", l = ((Z = r.querySelector("p")) == null ? void 0 : Z.textContent) || "", u = (L = r.querySelector(".kg-signup-card-image")) == null ? void 0 : L.getAttribute("src"), f = r.style.backgroundColor || "", d = ((Q = r.querySelector(".kg-signup-card-button")) == null ? void 0 : Q.style.backgroundColor) || "", h = ((H = (V = r.querySelector(".kg-signup-card-button-default")) == null ? void 0 : V.textContent) == null ? void 0 : H.trim()) || "Subscribe", m = ((R = r.querySelector(".kg-signup-card-button")) == null ? void 0 : R.style.color) || "", g = ((q = r.querySelector(".kg-signup-card-success")) == null ? void 0 : q.style.color) || "", w = (Y = r.querySelector(".kg-signup-card-text")) != null && Y.classList.contains("kg-align-center") ? "center" : "left", x = ((te = (K = r.querySelector(".kg-signup-card-success")) == null ? void 0 : K.textContent) == null ? void 0 : te.trim()) || "", _ = [...r.querySelectorAll("input[data-members-label]")].map((F) => F.value), S = ((se = r.classList) == null ? void 0 : se.contains("kg-style-accent")) ?? !1, C = ((U = (ce = r.querySelector(".kg-signup-card-button")) == null ? void 0 : ce.classList) == null ? void 0 : U.contains("kg-style-accent")) ?? !1, E = r.classList.contains("kg-swapped"), M = r.classList.contains("kg-content-wide") ? "contain" : "cover", $ = { layout: s, buttonText: h, header: o, subheader: a, disclaimer: l, backgroundImageSrc: u, backgroundSize: M, backgroundColor: S ? "accent" : Vc(f) || "#ffffff", buttonColor: C ? "accent" : Vc(d) || "#ffffff", textColor: Vc(g) || "#ffffff", buttonTextColor: Vc(m) || "#000000", alignment: w, successMessage: x, labels: _, swapped: E }; return { node: new t($) }; }, priority: 1 } : null; } }; } function e2e(t) { const e = i2e(t).join(" "), n = r2e(t), i = t.buttonColor === "accent" ? "kg-style-accent" : "", r = t.buttonColor !== "accent" ? `background-color: ${t.buttonColor};` : "", s = t.alignment === "center" ? "kg-align-center" : "", o = t.backgroundColor !== "accent" && (!t.backgroundImageSrc || t.layout === "split") ? `background-color: ${t.backgroundColor}` : "", a = t.backgroundImageSrc ? ` ` : "", l = ` `; return ` `; } function t2e() { return ` `; } function n2e(t, e = {}) { Vn(e); const n = e.createDocument(), i = { alignment: t.__alignment, buttonText: t.__buttonText, header: t.__header, subheader: t.__subheader, disclaimer: t.__disclaimer, backgroundImageSrc: t.__backgroundImageSrc, backgroundSize: t.__backgroundSize, backgroundColor: t.__backgroundColor, buttonColor: t.__buttonColor, labels: t.__labels, layout: t.__layout, textColor: t.__textColor, buttonTextColor: t.__buttonTextColor, successMessage: t.__successMessage, swapped: t.__swapped }; if (e.target === "email") return { element: n.createElement("div") }; const r = e2e(i), s = n.createElement("div"); if (s.innerHTML = r == null ? void 0 : r.trim(), i.header === "") { const o = s.querySelector(".kg-signup-card-heading"); o && o.remove(); } if (i.subheader === "") { const o = s.querySelector(".kg-signup-card-subheading"); o && o.remove(); } if (i.disclaimer === "") { const o = s.querySelector(".kg-signup-card-disclaimer"); o && o.remove(); } return { element: s.firstElementChild }; } function i2e(t) { let e = ["kg-card kg-signup-card"]; return t.layout && t.layout !== "split" && e.push(`kg-width-${t.layout}`), t.layout === "split" && e.push("kg-layout-split kg-width-full"), t.swapped && t.layout === "split" && e.push("kg-swapped"), t.layout && t.layout === "full" && e.push("kg-content-wide"), t.layout === "split" && t.backgroundSize === "contain" && e.push("kg-content-wide"), e; } const r2e = (t) => t.layout === "split" && t.backgroundColor === "accent" || t.layout !== "split" && !t.backgroundImageSrc && t.backgroundColor === "accent" ? "kg-style-accent" : ""; let P1 = class extends Yn({ nodeType: "signup", properties: [{ name: "alignment", default: "left" }, { name: "backgroundColor", default: "#F0F0F0" }, { name: "backgroundImageSrc", default: "" }, { name: "backgroundSize", default: "cover" }, { name: "textColor", default: "" }, { name: "buttonColor", default: "accent" }, { name: "buttonTextColor", default: "#FFFFFF" }, { name: "buttonText", default: "Subscribe" }, { name: "disclaimer", default: "", wordCount: !0 }, { name: "header", default: "", wordCount: !0 }, { name: "labels", default: [] }, { name: "layout", default: "wide" }, { name: "subheader", default: "", wordCount: !0 }, { name: "successMessage", default: "Email sent! Check your inbox to complete your signup." }, { name: "swapped", default: !1 }], defaultRenderFn: n2e }) { /* override */ constructor({ alignment: e, backgroundColor: n, backgroundImageSrc: i, backgroundSize: r, textColor: s, buttonColor: o, buttonTextColor: a, buttonText: l, disclaimer: u, header: f, labels: d, layout: h, subheader: m, successMessage: g, swapped: w } = {}, x) { super(x), this.__alignment = e || "left", this.__backgroundColor = n || "#F0F0F0", this.__backgroundImageSrc = i || "", this.__backgroundSize = r || "cover", this.__textColor = n === "transparent" && (h === "split" || !i) ? "" : s || "#000000", this.__buttonColor = o || "accent", this.__buttonTextColor = a || "#FFFFFF", this.__buttonText = l || "Subscribe", this.__disclaimer = u || "", this.__header = f || "", this.__labels = d || [], this.__layout = h || "wide", this.__subheader = m || "", this.__successMessage = g || "Email sent! Check your inbox to complete your signup.", this.__swapped = w || !1; } static importDOM() { return Jke(this); } // keeping some custom methods for labels as it requires some special handling setLabels(e) { if (!Array.isArray(e) || !e.every((i) => typeof i == "string")) throw new Error("Invalid argument: Expected an array of strings."); const n = this.getWritable(); n.__labels = e; } addLabel(e) { this.getWritable().__labels.push(e); } removeLabel(e) { const n = this.getWritable(); n.__labels = n.__labels.filter((i) => i !== e); } }; const s2e = (t) => new P1(t); function o2e(t) { return t instanceof P1; } function a2e(t, e) { Vn(e); const n = e.createDocument(), i = t.accentColor, r = t.backgroundColor, s = "https://partner.transistor.fm/ghost/embed/{uuid}", o = new URLSearchParams(); i && o.set("color", i.replace(/^#/, "")), r && o.set("background", r.replace(/^#/, "")); const a = o.toString(), l = a ? `${s}?${a}` : s, u = n.createElement("iframe"); u.setAttribute("width", "100%"), u.setAttribute("height", "180"), u.setAttribute("frameborder", "no"), u.setAttribute("scrolling", "no"), u.setAttribute("seamless", ""), u.setAttribute("src", l); const f = n.createElement("figure"); return f.setAttribute("class", "kg-card kg-transistor-card"), f.appendChild(u), s0({ element: f, type: "inner" }, t.visibility, e); } const UN = { web: { nonMember: !1, // Hide from public visitors - requires member UUID memberSegment: lo // Show to all members (free + paid) }, email: { memberSegment: lo } }; let I1 = class extends Yn({ nodeType: "transistor", hasVisibility: !0, properties: [ { name: "accentColor", default: "" }, // Player accent color (text/buttons) - hex value { name: "backgroundColor", default: "" } // Player background color - hex value ], defaultRenderFn: a2e }) { constructor(e = {}, n) { super(e, n), e.visibility || (this.__visibility = PN(UN)); } static getPropertyDefaults() { const e = super.getPropertyDefaults(); return e.visibility = PN(UN), e; } isEmpty() { return !1; } hasEditMode() { return !0; } }; const l2e = (t) => new I1(t), u2e = (t) => t instanceof I1, c2 = { replace: N.TextNode, with: (t) => new Fo(t.__text) }; class Fo extends N.TextNode { constructor(e, n) { super(e, n); } static getType() { return "extended-text"; } static clone(e) { return new Fo(e.__text, e.__key); } static importDOM() { const e = N.TextNode.importDOM(); return { ...e, span: () => ({ conversion: c2e(e == null ? void 0 : e.span, f2e), priority: 1 }) }; } static importJSON(e) { return N.TextNode.importJSON(e); } exportJSON() { const e = super.exportJSON(); return e.type = "extended-text", e; } isSimpleText() { return (this.__type === "text" || this.__type === "extended-text") && this.__mode === 0; } isInline() { return !0; } } function c2e(t, e) { return (n) => { const i = t == null ? void 0 : t(n); if (!i) return null; const r = i.conversion(n); return r && { ...r, forChild: (s, o) => { const l = ((r == null ? void 0 : r.forChild) ?? ((u) => u))(s, o); return N.$isTextNode(l) ? e(l, n) : l; } }; }; } function f2e(t, e) { var l, u, f, d, h; const n = e, i = n.style.fontWeight === "bold" || ((l = n.parentElement) == null ? void 0 : l.style.fontWeight) === "bold", r = n.style.fontStyle === "italic" || ((u = n.parentElement) == null ? void 0 : u.style.fontStyle) === "italic", s = n.style.textDecoration === "underline" || ((f = n.parentElement) == null ? void 0 : f.style.textDecoration) === "underline", o = n.classList.contains("Strikethrough") || ((d = n.parentElement) == null ? void 0 : d.classList.contains("Strikethrough")), a = n.classList.contains("Highlight") || ((h = n.parentElement) == null ? void 0 : h.classList.contains("Highlight")); return i && !t.hasFormat("bold") && (t = t.toggleFormat("bold")), r && !t.hasFormat("italic") && (t = t.toggleFormat("italic")), s && !t.hasFormat("underline") && (t = t.toggleFormat("underline")), o && !t.hasFormat("strikethrough") && (t = t.toggleFormat("strikethrough")), a && !t.hasFormat("highlight") && (t = t.toggleFormat("highlight")), t; } const f2 = { replace: rn.HeadingNode, with: (t) => new uc(t.__tag) }; class uc extends rn.HeadingNode { constructor(e, n) { super(e, n); } static getType() { return "extended-heading"; } static clone(e) { return new uc(e.__tag, e.__key); } static importDOM() { const e = rn.HeadingNode.importDOM(); return { ...e, p: d2e(e == null ? void 0 : e.p) }; } static importJSON(e) { return rn.HeadingNode.importJSON(e); } exportJSON() { const e = super.exportJSON(); return e.type = "extended-heading", e; } } function d2e(t) { return (e) => { const n = t == null ? void 0 : t(e); if (n) return n; const i = e, r = i.getAttribute("role") === "heading", s = i.getAttribute("aria-level"); if (r && s) { const o = parseInt(s, 10); if (o > 0 && o < 7) return { conversion: () => ({ node: new uc(`h${o}`) }), priority: 1 }; } return null; }; } const aE = { replace: rn.QuoteNode, with: () => new If() }; class If extends rn.QuoteNode { constructor(e) { super(e); } static getType() { return "extended-quote"; } static clone(e) { return new If(e.__key); } static importDOM() { return { ...rn.QuoteNode.importDOM(), blockquote: h2e }; } static importJSON(e) { return rn.QuoteNode.importJSON(e); } exportJSON() { const e = super.exportJSON(); return e.type = "extended-quote", e; } /* c8 ignore start */ extractWithChild() { return !0; } /* c8 ignore end */ } function h2e() { return { conversion: () => ({ node: new If(), after: (e) => { const n = []; return e.forEach((i) => { N.$isParagraphNode(i) ? (n.length > 0 && (n.push(N.$createLineBreakNode()), n.push(N.$createLineBreakNode())), n.push(...i.getChildren())) : n.push(i); }), n; } }), priority: 1 }; } class uo extends N.TextNode { static getType() { return "tk"; } static clone(e) { return new uo(e.__text, e.__key); } constructor(e, n) { super(e, n); } createDOM(e) { var r; const n = super.createDOM(e), i = ((r = e.theme.tk) == null ? void 0 : r.split(" ")) || []; return n.classList.add(...i), n.dataset.kgTk = !0, n; } static importJSON(e) { const n = lE(e.text); return n.setFormat(e.format), n.setDetail(e.detail), n.setMode(e.mode), n.setStyle(e.style), n; } exportJSON() { return { ...super.exportJSON(), type: "tk" }; } canInsertTextBefore() { return !1; } isTextEntity() { return !0; } } function lE(t) { return N.$applyNodeReplacement(new uo(t)); } function LW(t) { return t instanceof uo; } var p2e = ` `; class Ma extends N.ElementNode { constructor(n, i) { super(i); // We keep track of the format that was applied to the original '@' character // so we can re-apply that when converting to a LinkNode we(this, "__linkFormat", null); this.__linkFormat = n; } static getType() { return "at-link"; } static clone(n) { return new Ma(n.__linkFormat, n.__key); } // This is a temporary node, it should never be serialized but we need // to implement just in case and to match expected types. The AtLinkPlugin // should take care of replacing this node with it's children when needed. static importJSON({ linkFormat: n }) { return uE(n); } exportJSON() { return { ...super.exportJSON(), type: "at-link", version: 1, linkFormat: this.__linkFormat }; } createDOM(n) { const i = document.createElement("span"), r = (n.theme.atLink || "").split(" ").filter(Boolean), s = (n.theme.atLinkIcon || "").split(" ").filter(Boolean); i.classList.add(...r); const o = new DOMParser().parseFromString(p2e, "image/svg+xml").documentElement; return o.classList.add(...s), i.appendChild(o), i; } updateDOM() { return !1; } // should not render anything - this is a placeholder node exportDOM() { return null; } /* c8 ignore next 3 */ static importDOM() { return null; } getTextContent() { return ""; } isInline() { return !0; } canBeEmpty() { return !1; } setLinkFormat(n) { const i = this.getWritable(); i.__linkFormat = n; } getLinkFormat() { return this.getLatest().__linkFormat; } } function uE(t) { return N.$applyNodeReplacement(new Ma(t)); } function ul(t) { return t instanceof Ma; } class cc extends N.TextNode { constructor(n, i, r) { super(n, r); we(this, "__placeholder", null); we(this, "defaultPlaceholder", "Find a post, tag or author"); this.__placeholder = i; } static getType() { return "at-link-search"; } static clone(n) { return new cc(n.__text, n.__placeholder, n.__key); } // This is a temporary node, it should never be serialized but we need // to implement just in case and to match expected types. The AtLinkPlugin // should take care of replacing this node when needed. static importJSON({ text: n, placeholder: i }) { return Sg(n, i); } exportJSON() { return { ...super.exportJSON(), type: "at-link-search", version: 1, placeholder: this.__placeholder }; } createDOM(n) { const i = super.createDOM(n); return i.dataset.placeholder = "", this.__text ? i.dataset.placeholder = this.__placeholder || "" : i.dataset.placeholder = this.__placeholder ?? this.defaultPlaceholder, i.classList.add(...n.theme.atLinkSearch.split(" ")), i; } updateDOM(n, i) { return this.__text && (i.dataset.placeholder = this.__placeholder ?? ""), super.updateDOM(...arguments); } // should not render anything - this is a placeholder node exportDOM() { return null; } /* c8 ignore next 3 */ static importDOM() { return null; } canHaveFormat() { return !1; } setPlaceholder(n) { const i = this.getWritable(); i.__placeholder = n; } getPlaceholder() { return this.getLatest().__placeholder; } // Lexical will incorrectly pick up this node as an element node when the // cursor is placed by the SVG icon element in the parent AtLinkNode. We // need these methods to avoid throwing errors in that case but otherwise // behaviour is unaffected. getChildrenSize() { return 0; } getChildAtIndex() { return null; } } function Sg(t = "", e = null) { return N.$applyNodeReplacement(new cc(t, e)); } function cl(t) { return t instanceof cc; } class Lf extends N.TextNode { static getType() { return "zwnj"; } static clone(e) { return new Lf("", e.__key); } createDOM(e) { const n = super.createDOM(e); return n.innerHTML = "‌", n; } updateDOM() { return !1; } exportJSON() { return { ...super.exportJSON(), type: "zwnj", version: 1 }; } getTextContent() { return ""; } isToken() { return !0; } } function N4() { return new Lf(""); } function zd(t) { return t instanceof Lf; } var m2e = { import: { br: (t) => { var o, a; const e = !!t.closest('[id^="docs-internal-guid-"]'), n = (o = t.previousElementSibling) == null ? void 0 : o.nodeName, i = (a = t.nextElementSibling) == null ? void 0 : a.nodeName, r = ["H1", "H2", "H3", "H4", "H5", "H6"], s = ["UL", "OL", "DL"]; return e && (n === "P" && i === "P" || n === "BR" || i === "BR" || [...r, ...s].includes(n) && i === "P" || n === "P" && [...r, ...s].includes(i)) ? { conversion: () => null, priority: 1 } : null; } } }, g2e = { import: { p: (t) => !!t.closest('[id^="docs-internal-guid-"]') && t.textContent === "" ? { conversion: () => null, priority: 1 } : null } }; const RW = { generateDecoratorNode: Yn, visibility: zye, rgbToHex: Vc, taggedTemplateFns: zwe }, A4 = { linebreak: m2e, paragraph: g2e }, jW = { html: { import: { ...A4.linebreak.import, ...A4.paragraph.import } } }, v2e = [Fo, c2, uc, f2, If, aE, p1, h1, m1, g1, v1, b1, y1, w1, k1, x1, C1, _1, O1, E1, S1, T1, $1, M1, N1, A1, D1, P1, I1, uo, Ma, cc, Lf], b2e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, $createAsideNode: $we, $createAtLinkNode: uE, $createAtLinkSearchNode: Sg, $createAudioNode: mwe, $createBookmarkNode: ske, $createButtonNode: Jwe, $createCallToActionNode: Cwe, $createCalloutNode: kwe, $createCodeBlockNode: Vye, $createEmailCtaNode: Xke, $createEmailNode: Bke, $createEmbedNode: Rke, $createFileNode: hke, $createGalleryNode: qke, $createHeaderNode: wke, $createHorizontalRuleNode: Dwe, $createHtmlNode: jwe, $createImageNode: Uye, $createMarkdownNode: Kye, $createPaywallNode: Oke, $createProductNode: Nke, $createSignupNode: s2e, $createTKNode: lE, $createToggleNode: Uwe, $createTransistorNode: l2e, $createVideoNode: owe, $createZWNJNode: N4, $isAsideNode: Mwe, $isAtLinkNode: ul, $isAtLinkSearchNode: cl, $isAudioNode: gwe, $isBookmarkNode: oke, $isButtonNode: eke, $isCallToActionNode: Ewe, $isCalloutNode: wwe, $isCodeBlockNode: Xye, $isEmailCtaNode: Gke, $isEmailNode: zke, $isEmbedNode: jke, $isFileNode: dke, $isGalleryNode: Yke, $isHeaderNode: kke, $isHorizontalRuleNode: Pwe, $isHtmlNode: Fwe, $isImageNode: Zye, $isKoenigCard: qc, $isMarkdownNode: Jye, $isPaywallNode: Ske, $isProductNode: Ake, $isSignupNode: o2e, $isTKNode: LW, $isToggleNode: Zwe, $isTransistorNode: u2e, $isVideoNode: awe, $isZWNJNode: zd, AsideNode: w1, AtLinkNode: Ma, AtLinkSearchNode: cc, AudioNode: v1, BookmarkNode: S1, ButtonNode: O1, CallToActionNode: y1, CalloutNode: b1, CodeBlockNode: p1, DEFAULT_CONFIG: jW, DEFAULT_NODES: v2e, EmailCtaNode: D1, EmailNode: N1, EmbedNode: M1, ExtendedHeadingNode: uc, ExtendedQuoteNode: If, ExtendedTextNode: Fo, FileNode: C1, GalleryNode: A1, HeaderNode: E1, HorizontalRuleNode: k1, HtmlNode: x1, ImageNode: h1, KoenigDecoratorNode: iE, MarkdownNode: m1, PaywallNode: T1, ProductNode: $1, SignupNode: P1, TKNode: uo, ToggleNode: _1, TransistorNode: I1, VideoNode: g1, ZWNJNode: Lf, extendedHeadingNodeReplacement: f2, extendedQuoteNodeReplacement: aE, extendedTextNodeReplacement: c2, serializers: A4, utils: RW }, Symbol.toStringTag, { value: "Module" })); class cE extends w1 { createDOM(e) { const n = document.createElement("aside"); return lt.addClassNamesToElement(n, e.theme.aside), n; } // Mutation insertNewAfter() { const e = N.$createParagraphNode(), n = this.getDirection(); return e.setDirection(n), this.insertAfter(e), e; } collapseAtStart() { const e = N.$createParagraphNode(); return this.getChildren().forEach((i) => e.append(i)), this.replace(e), !0; } } function FW() { return new cE(); } function ZN(t) { return t instanceof cE; } const y2e = (t) => /* @__PURE__ */ J.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ J.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ J.createElement("path", { d: "M32 2.667C32 .889 31.111 0 29.333 0H2.667C1.93 0 1.302.26.78.781.261 1.301 0 1.931 0 2.667v26.666C0 31.111.889 32 2.667 32h26.666C31.111 32 32 31.111 32 29.333V2.667z", fill: "#465961", fillRule: "nonzero" }), /* @__PURE__ */ J.createElement("path", { stroke: "#FFF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 12l-4 4.333 4 3.667M21.5 12l4 4.333-4 3.667M18 11l-4 10" }))), BW = j.createContext({}), w2e = ({ children: t }) => { const [e, n] = j.useState(null), [i, r] = j.useState(!1), [s, o] = j.useState(!1), [a, l] = j.useState(!1), u = j.useMemo(() => ({ selectedCardKey: e, setSelectedCardKey: n, isEditingCard: i, setIsEditingCard: r, isDragging: s, setIsDragging: o, showVisibilitySettings: a, setShowVisibilitySettings: l }), [ e, n, i, r, s, o, a, l ]); return /* @__PURE__ */ y.jsx(BW.Provider, { value: u, children: t }); }, Rf = () => j.useContext(BW); function St({ isVisible: t, children: e, ...n }) { const { isDragging: i } = Rf(); if (t && !i) return /* @__PURE__ */ y.jsx("div", { className: "not-kg-prose absolute left-1/2 top-[-46px] z-[1000] -translate-x-1/2", ...n, children: e }); } function D4() { return D4 = Object.assign ? Object.assign.bind() : function(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); } return t; }, D4.apply(this, arguments); } function k2e(t, e) { if (t == null) return {}; var n = {}, i = Object.keys(t), r, s; for (s = 0; s < i.length; s++) r = i[s], !(e.indexOf(r) >= 0) && (n[r] = t[r]); return n; } let Kt = class zW { /** Get the line description around the given position. */ lineAt(e) { if (e < 0 || e > this.length) throw new RangeError(`Invalid position ${e} in document of length ${this.length}`); return this.lineInner(e, !1, 1, 0); } /** Get the description for the given (1-based) line number. */ line(e) { if (e < 1 || e > this.lines) throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`); return this.lineInner(e, !0, 1, 0); } /** Replace a range of the text with the given content. */ replace(e, n, i) { [e, n] = Th(this, e, n); let r = []; return this.decompose( 0, e, r, 2 /* Open.To */ ), i.length && i.decompose( 0, i.length, r, 3 /* Open.To */ ), this.decompose( n, this.length, r, 1 /* Open.From */ ), ga.from(r, this.length - (n - e) + i.length); } /** Append another document to this one. */ append(e) { return this.replace(this.length, this.length, e); } /** Retrieve the text between the given points. */ slice(e, n = this.length) { [e, n] = Th(this, e, n); let i = []; return this.decompose(e, n, i, 0), ga.from(i, n - e); } /** Test whether this text is equal to another instance. */ eq(e) { if (e == this) return !0; if (e.length != this.length || e.lines != this.lines) return !1; let n = this.scanIdentical(e, 1), i = this.length - this.scanIdentical(e, -1), r = new Cg(this), s = new Cg(e); for (let o = n, a = n; ; ) { if (r.next(o), s.next(o), o = 0, r.lineBreak != s.lineBreak || r.done != s.done || r.value != s.value) return !1; if (a += r.value.length, r.done || a >= i) return !0; } } /** Iterate over the text. When `dir` is `-1`, iteration happens from end to start. This will return lines and the breaks between them as separate strings. */ iter(e = 1) { return new Cg(this, e); } /** Iterate over a range of the text. When `from` > `to`, the iterator will run in reverse. */ iterRange(e, n = this.length) { return new WW(this, e, n); } /** Return a cursor that iterates over the given range of lines, _without_ returning the line breaks between, and yielding empty strings for empty lines. When `from` and `to` are given, they should be 1-based line numbers. */ iterLines(e, n) { let i; if (e == null) i = this.iter(); else { n == null && (n = this.lines + 1); let r = this.line(e).from; i = this.iterRange(r, Math.max(r, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to)); } return new HW(i); } /** Return the document as a string, using newline characters to separate lines. */ toString() { return this.sliceString(0); } /** Convert the document to an array of lines (which can be deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)). */ toJSON() { let e = []; return this.flatten(e), e; } /** @internal */ constructor() { } /** Create a `Text` instance for the given array of lines. */ static of(e) { if (e.length == 0) throw new RangeError("A document must have at least one line"); return e.length == 1 && !e[0] ? zW.empty : e.length <= 32 ? new hi(e) : ga.from(hi.split(e, [])); } }; class hi extends Kt { constructor(e, n = x2e(e)) { super(), this.text = e, this.length = n; } get lines() { return this.text.length; } get children() { return null; } lineInner(e, n, i, r) { for (let s = 0; ; s++) { let o = this.text[s], a = r + o.length; if ((n ? i : a) >= e) return new _2e(r, a, i, o); r = a + 1, i++; } } decompose(e, n, i, r) { let s = e <= 0 && n >= this.length ? this : new hi(qN(this.text, e, n), Math.min(n, this.length) - Math.max(0, e)); if (r & 1) { let o = i.pop(), a = oy(s.text, o.text.slice(), 0, s.length); if (a.length <= 32) i.push(new hi(a, o.length + s.length)); else { let l = a.length >> 1; i.push(new hi(a.slice(0, l)), new hi(a.slice(l))); } } else i.push(s); } replace(e, n, i) { if (!(i instanceof hi)) return super.replace(e, n, i); [e, n] = Th(this, e, n); let r = oy(this.text, oy(i.text, qN(this.text, 0, e)), n), s = this.length + i.length - (n - e); return r.length <= 32 ? new hi(r, s) : ga.from(hi.split(r, []), s); } sliceString(e, n = this.length, i = ` `) { [e, n] = Th(this, e, n); let r = ""; for (let s = 0, o = 0; s <= n && o < this.text.length; o++) { let a = this.text[o], l = s + a.length; s > e && o && (r += i), e < l && n > s && (r += a.slice(Math.max(0, e - s), n - s)), s = l + 1; } return r; } flatten(e) { for (let n of this.text) e.push(n); } scanIdentical() { return 0; } static split(e, n) { let i = [], r = -1; for (let s of e) i.push(s), r += s.length + 1, i.length == 32 && (n.push(new hi(i, r)), i = [], r = -1); return r > -1 && n.push(new hi(i, r)), n; } } class ga extends Kt { constructor(e, n) { super(), this.children = e, this.length = n, this.lines = 0; for (let i of e) this.lines += i.lines; } lineInner(e, n, i, r) { for (let s = 0; ; s++) { let o = this.children[s], a = r + o.length, l = i + o.lines - 1; if ((n ? l : a) >= e) return o.lineInner(e, n, i, r); r = a + 1, i = l + 1; } } decompose(e, n, i, r) { for (let s = 0, o = 0; o <= n && s < this.children.length; s++) { let a = this.children[s], l = o + a.length; if (e <= l && n >= o) { let u = r & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0)); o >= e && l <= n && !u ? i.push(a) : a.decompose(e - o, n - o, i, u); } o = l + 1; } } replace(e, n, i) { if ([e, n] = Th(this, e, n), i.lines < this.lines) for (let r = 0, s = 0; r < this.children.length; r++) { let o = this.children[r], a = s + o.length; if (e >= s && n <= a) { let l = o.replace(e - s, n - s, i), u = this.lines - o.lines + l.lines; if (l.lines < u >> 4 && l.lines > u >> 6) { let f = this.children.slice(); return f[r] = l, new ga(f, this.length - (n - e) + i.length); } return super.replace(s, a, l); } s = a + 1; } return super.replace(e, n, i); } sliceString(e, n = this.length, i = ` `) { [e, n] = Th(this, e, n); let r = ""; for (let s = 0, o = 0; s < this.children.length && o <= n; s++) { let a = this.children[s], l = o + a.length; o > e && s && (r += i), e < l && n > o && (r += a.sliceString(e - o, n - o, i)), o = l + 1; } return r; } flatten(e) { for (let n of this.children) n.flatten(e); } scanIdentical(e, n) { if (!(e instanceof ga)) return 0; let i = 0, [r, s, o, a] = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1]; for (; ; r += n, s += n) { if (r == o || s == a) return i; let l = this.children[r], u = e.children[s]; if (l != u) return i + l.scanIdentical(u, n); i += l.length + 1; } } static from(e, n = e.reduce((i, r) => i + r.length + 1, -1)) { let i = 0; for (let m of e) i += m.lines; if (i < 32) { let m = []; for (let g of e) g.flatten(m); return new hi(m, n); } let r = Math.max( 32, i >> 5 /* Tree.BranchShift */ ), s = r << 1, o = r >> 1, a = [], l = 0, u = -1, f = []; function d(m) { let g; if (m.lines > s && m instanceof ga) for (let w of m.children) d(w); else m.lines > o && (l > o || !l) ? (h(), a.push(m)) : m instanceof hi && l && (g = f[f.length - 1]) instanceof hi && m.lines + g.lines <= 32 ? (l += m.lines, u += m.length + 1, f[f.length - 1] = new hi(g.text.concat(m.text), g.length + 1 + m.length)) : (l + m.lines > r && h(), l += m.lines, u += m.length + 1, f.push(m)); } function h() { l != 0 && (a.push(f.length == 1 ? f[0] : ga.from(f, u)), u = -1, l = f.length = 0); } for (let m of e) d(m); return h(), a.length == 1 ? a[0] : new ga(a, n); } } Kt.empty = /* @__PURE__ */ new hi([""], 0); function x2e(t) { let e = -1; for (let n of t) e += n.length + 1; return e; } function oy(t, e, n = 0, i = 1e9) { for (let r = 0, s = 0, o = !0; s < t.length && r <= i; s++) { let a = t[s], l = r + a.length; l >= n && (l > i && (a = a.slice(0, i - r)), r < n && (a = a.slice(n - r)), o ? (e[e.length - 1] += a, o = !1) : e.push(a)), r = l + 1; } return e; } function qN(t, e, n) { return oy(t, [""], e, n); } class Cg { constructor(e, n = 1) { this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof hi ? e.text.length : e.children.length) << 1]; } nextInner(e, n) { for (this.done = this.lineBreak = !1; ; ) { let i = this.nodes.length - 1, r = this.nodes[i], s = this.offsets[i], o = s >> 1, a = r instanceof hi ? r.text.length : r.children.length; if (o == (n > 0 ? a : 0)) { if (i == 0) return this.done = !0, this.value = "", this; n > 0 && this.offsets[i - 1]++, this.nodes.pop(), this.offsets.pop(); } else if ((s & 1) == (n > 0 ? 0 : 1)) { if (this.offsets[i] += n, e == 0) return this.lineBreak = !0, this.value = ` `, this; e--; } else if (r instanceof hi) { let l = r.text[o + (n < 0 ? -1 : 0)]; if (this.offsets[i] += n, l.length > Math.max(0, e)) return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this; e -= l.length; } else { let l = r.children[o + (n < 0 ? -1 : 0)]; e > l.length ? (e -= l.length, this.offsets[i] += n) : (n < 0 && this.offsets[i]--, this.nodes.push(l), this.offsets.push(n > 0 ? 1 : (l instanceof hi ? l.text.length : l.children.length) << 1)); } } } next(e = 0) { return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir); } } class WW { constructor(e, n, i) { this.value = "", this.done = !1, this.cursor = new Cg(e, n > i ? -1 : 1), this.pos = n > i ? e.length : 0, this.from = Math.min(n, i), this.to = Math.max(n, i); } nextInner(e, n) { if (n < 0 ? this.pos <= this.from : this.pos >= this.to) return this.value = "", this.done = !0, this; e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos); let i = n < 0 ? this.pos - this.from : this.to - this.pos; e > i && (e = i), i -= e; let { value: r } = this.cursor.next(e); return this.pos += (r.length + e) * n, this.value = r.length <= i ? r : n < 0 ? r.slice(r.length - i) : r.slice(0, i), this.done = !this.value, this; } next(e = 0) { return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir); } get lineBreak() { return this.cursor.lineBreak && this.value != ""; } } class HW { constructor(e) { this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1; } next(e = 0) { let { done: n, lineBreak: i, value: r } = this.inner.next(e); return n && this.afterBreak ? (this.value = "", this.afterBreak = !1) : n ? (this.done = !0, this.value = "") : i ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = r, this.afterBreak = !1), this; } get lineBreak() { return !1; } } typeof Symbol < "u" && (Kt.prototype[Symbol.iterator] = function() { return this.iter(); }, Cg.prototype[Symbol.iterator] = WW.prototype[Symbol.iterator] = HW.prototype[Symbol.iterator] = function() { return this; }); class _2e { /** @internal */ constructor(e, n, i, r) { this.from = e, this.to = n, this.number = i, this.text = r; } /** The length of the line (not including any line break after it). */ get length() { return this.to - this.from; } } function Th(t, e, n) { return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))]; } let dh = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1); for (let t = 1; t < dh.length; t++) dh[t] += dh[t - 1]; function O2e(t) { for (let e = 1; e < dh.length; e += 2) if (dh[e] > t) return dh[e - 1] <= t; return !1; } function YN(t) { return t >= 127462 && t <= 127487; } const VN = 8205; function dr(t, e, n = !0, i = !0) { return (n ? QW : S2e)(t, e, i); } function QW(t, e, n) { if (e == t.length) return e; e && UW(t.charCodeAt(e)) && ZW(t.charCodeAt(e - 1)) && e--; let i = ar(t, e); for (e += io(i); e < t.length; ) { let r = ar(t, e); if (i == VN || r == VN || n && O2e(r)) e += io(r), i = r; else if (YN(r)) { let s = 0, o = e - 2; for (; o >= 0 && YN(ar(t, o)); ) s++, o -= 2; if (s % 2 == 0) break; e += 2; } else break; } return e; } function S2e(t, e, n) { for (; e > 0; ) { let i = QW(t, e - 2, n); if (i < e) return i; e--; } return 0; } function UW(t) { return t >= 56320 && t < 57344; } function ZW(t) { return t >= 55296 && t < 56320; } function ar(t, e) { let n = t.charCodeAt(e); if (!ZW(n) || e + 1 == t.length) return n; let i = t.charCodeAt(e + 1); return UW(i) ? (n - 55296 << 10) + (i - 56320) + 65536 : n; } function fE(t) { return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320)); } function io(t) { return t < 65536 ? 1 : 2; } const P4 = /\r\n?|\n/; var ur = /* @__PURE__ */ function(t) { return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t; }(ur || (ur = {})); class Sa { // Sections are encoded as pairs of integers. The first is the // length in the current document, and the second is -1 for // unaffected sections, and the length of the replacement content // otherwise. So an insertion would be (0, n>0), a deletion (n>0, // 0), and a replacement two positive numbers. /** @internal */ constructor(e) { this.sections = e; } /** The length of the document before the change. */ get length() { let e = 0; for (let n = 0; n < this.sections.length; n += 2) e += this.sections[n]; return e; } /** The length of the document after the change. */ get newLength() { let e = 0; for (let n = 0; n < this.sections.length; n += 2) { let i = this.sections[n + 1]; e += i < 0 ? this.sections[n] : i; } return e; } /** False when there are actual changes in this set. */ get empty() { return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0; } /** Iterate over the unchanged parts left by these changes. `posA` provides the position of the range in the old document, `posB` the new position in the changed document. */ iterGaps(e) { for (let n = 0, i = 0, r = 0; n < this.sections.length; ) { let s = this.sections[n++], o = this.sections[n++]; o < 0 ? (e(i, r, s), r += s) : r += o, i += s; } } /** Iterate over the ranges changed by these changes. (See [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a variant that also provides you with the inserted text.) `fromA`/`toA` provides the extent of the change in the starting document, `fromB`/`toB` the extent of the replacement in the changed document. When `individual` is true, adjacent changes (which are kept separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are reported separately. */ iterChangedRanges(e, n = !1) { I4(this, e, n); } /** Get a description of the inverted form of these changes. */ get invertedDesc() { let e = []; for (let n = 0; n < this.sections.length; ) { let i = this.sections[n++], r = this.sections[n++]; r < 0 ? e.push(i, r) : e.push(r, i); } return new Sa(e); } /** Compute the combined effect of applying another set of changes after this one. The length of the document after this set should match the length before `other`. */ composeDesc(e) { return this.empty ? e : e.empty ? this : qW(this, e); } /** Map this description, which should start with the same document as `other`, over another set of changes, so that it can be applied after it. When `before` is true, map as if the changes in `other` happened before the ones in `this`. */ mapDesc(e, n = !1) { return e.empty ? this : L4(this, e, n); } mapPos(e, n = -1, i = ur.Simple) { let r = 0, s = 0; for (let o = 0; o < this.sections.length; ) { let a = this.sections[o++], l = this.sections[o++], u = r + a; if (l < 0) { if (u > e) return s + (e - r); s += a; } else { if (i != ur.Simple && u >= e && (i == ur.TrackDel && r < e && u > e || i == ur.TrackBefore && r < e || i == ur.TrackAfter && u > e)) return null; if (u > e || u == e && n < 0 && !a) return e == r || n < 0 ? s : s + l; s += l; } r = u; } if (e > r) throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`); return s; } /** Check whether these changes touch a given range. When one of the changes entirely covers the range, the string `"cover"` is returned. */ touchesRange(e, n = e) { for (let i = 0, r = 0; i < this.sections.length && r <= n; ) { let s = this.sections[i++], o = this.sections[i++], a = r + s; if (o >= 0 && r <= n && a >= e) return r < e && a > n ? "cover" : !0; r = a; } return !1; } /** @internal */ toString() { let e = ""; for (let n = 0; n < this.sections.length; ) { let i = this.sections[n++], r = this.sections[n++]; e += (e ? " " : "") + i + (r >= 0 ? ":" + r : ""); } return e; } /** Serialize this change desc to a JSON-representable value. */ toJSON() { return this.sections; } /** Create a change desc from its JSON representation (as produced by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON). */ static fromJSON(e) { if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number")) throw new RangeError("Invalid JSON representation of ChangeDesc"); return new Sa(e); } /** @internal */ static create(e) { return new Sa(e); } } class Ii extends Sa { constructor(e, n) { super(e), this.inserted = n; } /** Apply the changes to a document, returning the modified document. */ apply(e) { if (this.length != e.length) throw new RangeError("Applying change set to a document with the wrong length"); return I4(this, (n, i, r, s, o) => e = e.replace(r, r + (i - n), o), !1), e; } mapDesc(e, n = !1) { return L4(this, e, n, !0); } /** Given the document as it existed _before_ the changes, return a change set that represents the inverse of this set, which could be used to go from the document created by the changes back to the document as it existed before the changes. */ invert(e) { let n = this.sections.slice(), i = []; for (let r = 0, s = 0; r < n.length; r += 2) { let o = n[r], a = n[r + 1]; if (a >= 0) { n[r] = a, n[r + 1] = o; let l = r >> 1; for (; i.length < l; ) i.push(Kt.empty); i.push(o ? e.slice(s, s + o) : Kt.empty); } s += o; } return new Ii(n, i); } /** Combine two subsequent change sets into a single set. `other` must start in the document produced by `this`. If `this` goes `docA` → `docB` and `other` represents `docB` → `docC`, the returned value will represent the change `docA` → `docC`. */ compose(e) { return this.empty ? e : e.empty ? this : qW(this, e, !0); } /** Given another change set starting in the same document, maps this change set over the other, producing a new change set that can be applied to the document produced by applying `other`. When `before` is `true`, order changes as if `this` comes before `other`, otherwise (the default) treat `other` as coming first. Given two changes `A` and `B`, `A.compose(B.map(A))` and `B.compose(A.map(B, true))` will produce the same document. This provides a basic form of [operational transformation](https://en.wikipedia.org/wiki/Operational_transformation), and can be used for collaborative editing. */ map(e, n = !1) { return e.empty ? this : L4(this, e, n, !0); } /** Iterate over the changed ranges in the document, calling `f` for each, with the range in the original document (`fromA`-`toA`) and the range that replaces it in the new document (`fromB`-`toB`). When `individual` is true, adjacent changes are reported separately. */ iterChanges(e, n = !1) { I4(this, e, n); } /** Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change set. */ get desc() { return Sa.create(this.sections); } /** @internal */ filter(e) { let n = [], i = [], r = [], s = new o0(this); e: for (let o = 0, a = 0; ; ) { let l = o == e.length ? 1e9 : e[o++]; for (; a < l || a == l && s.len == 0; ) { if (s.done) break e; let f = Math.min(s.len, l - a); Cr(r, f, -1); let d = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0; Cr(n, f, d), d > 0 && Ou(i, n, s.text), s.forward(f), a += f; } let u = e[o++]; for (; a < u; ) { if (s.done) break e; let f = Math.min(s.len, u - a); Cr(n, f, -1), Cr(r, f, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(f), a += f; } } return { changes: new Ii(n, i), filtered: Sa.create(r) }; } /** Serialize this change set to a JSON-representable value. */ toJSON() { let e = []; for (let n = 0; n < this.sections.length; n += 2) { let i = this.sections[n], r = this.sections[n + 1]; r < 0 ? e.push(i) : r == 0 ? e.push([i]) : e.push([i].concat(this.inserted[n >> 1].toJSON())); } return e; } /** Create a change set for the given changes, for a document of the given length, using `lineSep` as line separator. */ static of(e, n, i) { let r = [], s = [], o = 0, a = null; function l(f = !1) { if (!f && !r.length) return; o < n && Cr(r, n - o, -1); let d = new Ii(r, s); a = a ? a.compose(d.map(a)) : d, r = [], s = [], o = 0; } function u(f) { if (Array.isArray(f)) for (let d of f) u(d); else if (f instanceof Ii) { if (f.length != n) throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`); l(), a = a ? a.compose(f.map(a)) : f; } else { let { from: d, to: h = d, insert: m } = f; if (d > h || d < 0 || h > n) throw new RangeError(`Invalid change range ${d} to ${h} (in doc of length ${n})`); let g = m ? typeof m == "string" ? Kt.of(m.split(i || P4)) : m : Kt.empty, w = g.length; if (d == h && w == 0) return; d < o && l(), d > o && Cr(r, d - o, -1), Cr(r, h - d, w), Ou(s, r, g), o = h; } } return u(e), l(!a), a; } /** Create an empty changeset of the given length. */ static empty(e) { return new Ii(e ? [e, -1] : [], []); } /** Create a changeset from its JSON representation (as produced by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON). */ static fromJSON(e) { if (!Array.isArray(e)) throw new RangeError("Invalid JSON representation of ChangeSet"); let n = [], i = []; for (let r = 0; r < e.length; r++) { let s = e[r]; if (typeof s == "number") n.push(s, -1); else { if (!Array.isArray(s) || typeof s[0] != "number" || s.some((o, a) => a && typeof o != "string")) throw new RangeError("Invalid JSON representation of ChangeSet"); if (s.length == 1) n.push(s[0], 0); else { for (; i.length < r; ) i.push(Kt.empty); i[r] = Kt.of(s.slice(1)), n.push(s[0], i[r].length); } } } return new Ii(n, i); } /** @internal */ static createSet(e, n) { return new Ii(e, n); } } function Cr(t, e, n, i = !1) { if (e == 0 && n <= 0) return; let r = t.length - 2; r >= 0 && n <= 0 && n == t[r + 1] ? t[r] += e : e == 0 && t[r] == 0 ? t[r + 1] += n : i ? (t[r] += e, t[r + 1] += n) : t.push(e, n); } function Ou(t, e, n) { if (n.length == 0) return; let i = e.length - 2 >> 1; if (i < t.length) t[t.length - 1] = t[t.length - 1].append(n); else { for (; t.length < i; ) t.push(Kt.empty); t.push(n); } } function I4(t, e, n) { let i = t.inserted; for (let r = 0, s = 0, o = 0; o < t.sections.length; ) { let a = t.sections[o++], l = t.sections[o++]; if (l < 0) r += a, s += a; else { let u = r, f = s, d = Kt.empty; for (; u += a, f += l, l && i && (d = d.append(i[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); ) a = t.sections[o++], l = t.sections[o++]; e(r, u, s, f, d), r = u, s = f; } } } function L4(t, e, n, i = !1) { let r = [], s = i ? [] : null, o = new o0(t), a = new o0(e); for (let l = -1; ; ) if (o.ins == -1 && a.ins == -1) { let u = Math.min(o.len, a.len); Cr(r, u, -1), o.forward(u), a.forward(u); } else if (a.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (a.len < o.len || a.len == o.len && !n))) { let u = a.len; for (Cr(r, a.ins, -1); u; ) { let f = Math.min(o.len, u); o.ins >= 0 && l < o.i && o.len <= f && (Cr(r, 0, o.ins), s && Ou(s, r, o.text), l = o.i), o.forward(f), u -= f; } a.next(); } else if (o.ins >= 0) { let u = 0, f = o.len; for (; f; ) if (a.ins == -1) { let d = Math.min(f, a.len); u += d, f -= d, a.forward(d); } else if (a.ins == 0 && a.len < f) f -= a.len, a.next(); else break; Cr(r, u, l < o.i ? o.ins : 0), s && l < o.i && Ou(s, r, o.text), l = o.i, o.forward(o.len - f); } else { if (o.done && a.done) return s ? Ii.createSet(r, s) : Sa.create(r); throw new Error("Mismatched change set lengths"); } } function qW(t, e, n = !1) { let i = [], r = n ? [] : null, s = new o0(t), o = new o0(e); for (let a = !1; ; ) { if (s.done && o.done) return r ? Ii.createSet(i, r) : Sa.create(i); if (s.ins == 0) Cr(i, s.len, 0, a), s.next(); else if (o.len == 0 && !o.done) Cr(i, 0, o.ins, a), r && Ou(r, i, o.text), o.next(); else { if (s.done || o.done) throw new Error("Mismatched change set lengths"); { let l = Math.min(s.len2, o.len), u = i.length; if (s.ins == -1) { let f = o.ins == -1 ? -1 : o.off ? 0 : o.ins; Cr(i, l, f, a), r && f && Ou(r, i, o.text); } else o.ins == -1 ? (Cr(i, s.off ? 0 : s.len, l, a), r && Ou(r, i, s.textBit(l))) : (Cr(i, s.off ? 0 : s.len, o.off ? 0 : o.ins, a), r && !o.off && Ou(r, i, o.text)); a = (s.ins > l || o.ins >= 0 && o.len > l) && (a || i.length > u), s.forward2(l), o.forward(l); } } } } class o0 { constructor(e) { this.set = e, this.i = 0, this.next(); } next() { let { sections: e } = this.set; this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0; } get done() { return this.ins == -2; } get len2() { return this.ins < 0 ? this.len : this.ins; } get text() { let { inserted: e } = this.set, n = this.i - 2 >> 1; return n >= e.length ? Kt.empty : e[n]; } textBit(e) { let { inserted: n } = this.set, i = this.i - 2 >> 1; return i >= n.length && !e ? Kt.empty : n[i].slice(this.off, e == null ? void 0 : this.off + e); } forward(e) { e == this.len ? this.next() : (this.len -= e, this.off += e); } forward2(e) { this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e); } } class Xc { constructor(e, n, i) { this.from = e, this.to = n, this.flags = i; } /** The anchor of the range—the side that doesn't move when you extend it. */ get anchor() { return this.flags & 32 ? this.to : this.from; } /** The head of the range, which is moved when the range is [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend). */ get head() { return this.flags & 32 ? this.from : this.to; } /** True when `anchor` and `head` are at the same position. */ get empty() { return this.from == this.to; } /** If this is a cursor that is explicitly associated with the character on one of its sides, this returns the side. -1 means the character before its position, 1 the character after, and 0 means no association. */ get assoc() { return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0; } /** The bidirectional text level associated with this cursor, if any. */ get bidiLevel() { let e = this.flags & 7; return e == 7 ? null : e; } /** The goal column (stored vertical offset) associated with a cursor. This is used to preserve the vertical position when [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across lines of different length. */ get goalColumn() { let e = this.flags >> 6; return e == 16777215 ? void 0 : e; } /** Map this range through a change, producing a valid range in the updated document. */ map(e, n = -1) { let i, r; return this.empty ? i = r = e.mapPos(this.from, n) : (i = e.mapPos(this.from, 1), r = e.mapPos(this.to, -1)), i == this.from && r == this.to ? this : new Xc(i, r, this.flags); } /** Extend this range to cover at least `from` to `to`. */ extend(e, n = e) { if (e <= this.anchor && n >= this.anchor) return he.range(e, n); let i = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n; return he.range(this.anchor, i); } /** Compare this range to another range. */ eq(e, n = !1) { return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc); } /** Return a JSON-serializable object representing the range. */ toJSON() { return { anchor: this.anchor, head: this.head }; } /** Convert a JSON representation of a range to a `SelectionRange` instance. */ static fromJSON(e) { if (!e || typeof e.anchor != "number" || typeof e.head != "number") throw new RangeError("Invalid JSON representation for SelectionRange"); return he.range(e.anchor, e.head); } /** @internal */ static create(e, n, i) { return new Xc(e, n, i); } } class he { constructor(e, n) { this.ranges = e, this.mainIndex = n; } /** Map a selection through a change. Used to adjust the selection position for changes. */ map(e, n = -1) { return e.empty ? this : he.create(this.ranges.map((i) => i.map(e, n)), this.mainIndex); } /** Compare this selection to another selection. By default, ranges are compared only by position. When `includeAssoc` is true, cursor ranges must also have the same [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value. */ eq(e, n = !1) { if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex) return !1; for (let i = 0; i < this.ranges.length; i++) if (!this.ranges[i].eq(e.ranges[i], n)) return !1; return !0; } /** Get the primary selection range. Usually, you should make sure your code applies to _all_ ranges, by using methods like [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange). */ get main() { return this.ranges[this.mainIndex]; } /** Make sure the selection only has one range. Returns a selection holding only the main range from this selection. */ asSingle() { return this.ranges.length == 1 ? this : new he([this.main], 0); } /** Extend this selection with an extra range. */ addRange(e, n = !0) { return he.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1); } /** Replace a given range with another range, and then normalize the selection to merge and sort ranges if necessary. */ replaceRange(e, n = this.mainIndex) { let i = this.ranges.slice(); return i[n] = e, he.create(i, this.mainIndex); } /** Convert this selection to an object that can be serialized to JSON. */ toJSON() { return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex }; } /** Create a selection from a JSON representation. */ static fromJSON(e) { if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length) throw new RangeError("Invalid JSON representation for EditorSelection"); return new he(e.ranges.map((n) => Xc.fromJSON(n)), e.main); } /** Create a selection holding a single range. */ static single(e, n = e) { return new he([he.range(e, n)], 0); } /** Sort and merge the given set of ranges, creating a valid selection. */ static create(e, n = 0) { if (e.length == 0) throw new RangeError("A selection needs at least one range"); for (let i = 0, r = 0; r < e.length; r++) { let s = e[r]; if (s.empty ? s.from <= i : s.from < i) return he.normalized(e.slice(), n); i = s.to; } return new he(e, n); } /** Create a cursor selection range at the given position. You can safely ignore the optional arguments in most situations. */ static cursor(e, n = 0, i, r) { return Xc.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (i == null ? 7 : Math.min(6, i)) | (r ?? 16777215) << 6); } /** Create a selection range. */ static range(e, n, i, r) { let s = (i ?? 16777215) << 6 | (r == null ? 7 : Math.min(6, r)); return n < e ? Xc.create(n, e, 48 | s) : Xc.create(e, n, (n > e ? 8 : 0) | s); } /** @internal */ static normalized(e, n = 0) { let i = e[n]; e.sort((r, s) => r.from - s.from), n = e.indexOf(i); for (let r = 1; r < e.length; r++) { let s = e[r], o = e[r - 1]; if (s.empty ? s.from <= o.to : s.from < o.to) { let a = o.from, l = Math.max(s.to, o.to); r <= n && n--, e.splice(--r, 2, s.anchor > s.head ? he.range(l, a) : he.range(a, l)); } } return new he(e, n); } } function YW(t, e) { for (let n of t.ranges) if (n.to > e) throw new RangeError("Selection points outside of document"); } let dE = 0; class Qe { constructor(e, n, i, r, s) { this.combine = e, this.compareInput = n, this.compare = i, this.isStatic = r, this.id = dE++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s; } /** Returns a facet reader for this facet, which can be used to [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it. */ get reader() { return this; } /** Define a new facet. */ static define(e = {}) { return new Qe(e.combine || ((n) => n), e.compareInput || ((n, i) => n === i), e.compare || (e.combine ? (n, i) => n === i : hE), !!e.static, e.enables); } /** Returns an extension that adds the given value to this facet. */ of(e) { return new ay([], this, 0, e); } /** Create an extension that computes a value for the facet from a state. You must take care to declare the parts of the state that this value depends on, since your function is only called again for a new state when one of those parts changed. In cases where your value depends only on a single field, you'll want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead. */ compute(e, n) { if (this.isStatic) throw new Error("Can't compute a static facet"); return new ay(e, this, 1, n); } /** Create an extension that computes zero or more values for this facet from a state. */ computeN(e, n) { if (this.isStatic) throw new Error("Can't compute a static facet"); return new ay(e, this, 2, n); } from(e, n) { return n || (n = (i) => i), this.compute([e], (i) => n(i.field(e))); } } function hE(t, e) { return t == e || t.length == e.length && t.every((n, i) => n === e[i]); } class ay { constructor(e, n, i, r) { this.dependencies = e, this.facet = n, this.type = i, this.value = r, this.id = dE++; } dynamicSlot(e) { var n; let i = this.value, r = this.facet.compareInput, s = this.id, o = e[s] >> 1, a = this.type == 2, l = !1, u = !1, f = []; for (let d of this.dependencies) d == "doc" ? l = !0 : d == "selection" ? u = !0 : ((n = e[d.id]) !== null && n !== void 0 ? n : 1) & 1 || f.push(e[d.id]); return { create(d) { return d.values[o] = i(d), 1; }, update(d, h) { if (l && h.docChanged || u && (h.docChanged || h.selection) || R4(d, f)) { let m = i(d); if (a ? !XN(m, d.values[o], r) : !r(m, d.values[o])) return d.values[o] = m, 1; } return 0; }, reconfigure: (d, h) => { let m, g = h.config.address[s]; if (g != null) { let w = xw(h, g); if (this.dependencies.every((x) => x instanceof Qe ? h.facet(x) === d.facet(x) : x instanceof Ki ? h.field(x, !1) == d.field(x, !1) : !0) || (a ? XN(m = i(d), w, r) : r(m = i(d), w))) return d.values[o] = w, 0; } else m = i(d); return d.values[o] = m, 1; } }; } } function XN(t, e, n) { if (t.length != e.length) return !1; for (let i = 0; i < t.length; i++) if (!n(t[i], e[i])) return !1; return !0; } function R4(t, e) { let n = !1; for (let i of e) Eg(t, i) & 1 && (n = !0); return n; } function C2e(t, e, n) { let i = n.map((l) => t[l.id]), r = n.map((l) => l.type), s = i.filter((l) => !(l & 1)), o = t[e.id] >> 1; function a(l) { let u = []; for (let f = 0; f < i.length; f++) { let d = xw(l, i[f]); if (r[f] == 2) for (let h of d) u.push(h); else u.push(d); } return e.combine(u); } return { create(l) { for (let u of i) Eg(l, u); return l.values[o] = a(l), 1; }, update(l, u) { if (!R4(l, s)) return 0; let f = a(l); return e.compare(f, l.values[o]) ? 0 : (l.values[o] = f, 1); }, reconfigure(l, u) { let f = R4(l, i), d = u.config.facets[e.id], h = u.facet(e); if (d && !f && hE(n, d)) return l.values[o] = h, 0; let m = a(l); return e.compare(m, h) ? (l.values[o] = h, 0) : (l.values[o] = m, 1); } }; } const GN = /* @__PURE__ */ Qe.define({ static: !0 }); class Ki { constructor(e, n, i, r, s) { this.id = e, this.createF = n, this.updateF = i, this.compareF = r, this.spec = s, this.provides = void 0; } /** Define a state field. */ static define(e) { let n = new Ki(dE++, e.create, e.update, e.compare || ((i, r) => i === r), e); return e.provide && (n.provides = e.provide(n)), n; } create(e) { let n = e.facet(GN).find((i) => i.field == this); return ((n == null ? void 0 : n.create) || this.createF)(e); } /** @internal */ slot(e) { let n = e[this.id] >> 1; return { create: (i) => (i.values[n] = this.create(i), 1), update: (i, r) => { let s = i.values[n], o = this.updateF(s, r); return this.compareF(s, o) ? 0 : (i.values[n] = o, 1); }, reconfigure: (i, r) => r.config.address[this.id] != null ? (i.values[n] = r.field(this), 0) : (i.values[n] = this.create(i), 1) }; } /** Returns an extension that enables this field and overrides the way it is initialized. Can be useful when you need to provide a non-default starting value for the field. */ init(e) { return [this, GN.of({ field: this, create: e })]; } /** State field instances can be used as [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a given state. */ get extension() { return this; } } const Bc = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; function Tm(t) { return (e) => new VW(e, t); } const jf = { /** The highest precedence level, for extensions that should end up near the start of the precedence ordering. */ highest: /* @__PURE__ */ Tm(Bc.highest), /** A higher-than-default precedence, for extensions that should come before those with default precedence. */ high: /* @__PURE__ */ Tm(Bc.high), /** The default precedence, which is also used for extensions without an explicit precedence. */ default: /* @__PURE__ */ Tm(Bc.default), /** A lower-than-default precedence. */ low: /* @__PURE__ */ Tm(Bc.low), /** The lowest precedence level. Meant for things that should end up near the end of the extension order. */ lowest: /* @__PURE__ */ Tm(Bc.lowest) }; class VW { constructor(e, n) { this.inner = e, this.prec = n; } } class d2 { /** Create an instance of this compartment to add to your [state configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions). */ of(e) { return new j4(this, e); } /** Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that reconfigures this compartment. */ reconfigure(e) { return d2.reconfigure.of({ compartment: this, extension: e }); } /** Get the current content of the compartment in the state, or `undefined` if it isn't present. */ get(e) { return e.config.compartments.get(this); } } class j4 { constructor(e, n) { this.compartment = e, this.inner = n; } } class kw { constructor(e, n, i, r, s, o) { for (this.base = e, this.compartments = n, this.dynamicSlots = i, this.address = r, this.staticValues = s, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < i.length; ) this.statusTemplate.push( 0 /* SlotStatus.Unresolved */ ); } staticFacet(e) { let n = this.address[e.id]; return n == null ? e.default : this.staticValues[n >> 1]; } static resolve(e, n, i) { let r = [], s = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map(); for (let h of E2e(e, n, o)) h instanceof Ki ? r.push(h) : (s[h.facet.id] || (s[h.facet.id] = [])).push(h); let a = /* @__PURE__ */ Object.create(null), l = [], u = []; for (let h of r) a[h.id] = u.length << 1, u.push((m) => h.slot(m)); let f = i == null ? void 0 : i.config.facets; for (let h in s) { let m = s[h], g = m[0].facet, w = f && f[h] || []; if (m.every( (x) => x.type == 0 /* Provider.Static */ )) if (a[g.id] = l.length << 1 | 1, hE(w, m)) l.push(i.facet(g)); else { let x = g.combine(m.map((_) => _.value)); l.push(i && g.compare(x, i.facet(g)) ? i.facet(g) : x); } else { for (let x of m) x.type == 0 ? (a[x.id] = l.length << 1 | 1, l.push(x.value)) : (a[x.id] = u.length << 1, u.push((_) => x.dynamicSlot(_))); a[g.id] = u.length << 1, u.push((x) => C2e(x, g, m)); } } let d = u.map((h) => h(a)); return new kw(e, o, d, a, l, s); } } function E2e(t, e, n) { let i = [[], [], [], [], []], r = /* @__PURE__ */ new Map(); function s(o, a) { let l = r.get(o); if (l != null) { if (l <= a) return; let u = i[l].indexOf(o); u > -1 && i[l].splice(u, 1), o instanceof j4 && n.delete(o.compartment); } if (r.set(o, a), Array.isArray(o)) for (let u of o) s(u, a); else if (o instanceof j4) { if (n.has(o.compartment)) throw new RangeError("Duplicate use of compartment in extensions"); let u = e.get(o.compartment) || o.inner; n.set(o.compartment, u), s(u, a); } else if (o instanceof VW) s(o.inner, o.prec); else if (o instanceof Ki) i[a].push(o), o.provides && s(o.provides, a); else if (o instanceof ay) i[a].push(o), o.facet.extensions && s(o.facet.extensions, Bc.default); else { let u = o.extension; if (!u) throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`); s(u, a); } } return s(t, Bc.default), i.reduce((o, a) => o.concat(a)); } function Eg(t, e) { if (e & 1) return 2; let n = e >> 1, i = t.status[n]; if (i == 4) throw new Error("Cyclic dependency between fields and/or facets"); if (i & 2) return i; t.status[n] = 4; let r = t.computeSlot(t, t.config.dynamicSlots[n]); return t.status[n] = 2 | r; } function xw(t, e) { return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1]; } const XW = /* @__PURE__ */ Qe.define(), F4 = /* @__PURE__ */ Qe.define({ combine: (t) => t.some((e) => e), static: !0 }), GW = /* @__PURE__ */ Qe.define({ combine: (t) => t.length ? t[0] : void 0, static: !0 }), KW = /* @__PURE__ */ Qe.define(), JW = /* @__PURE__ */ Qe.define(), eH = /* @__PURE__ */ Qe.define(), tH = /* @__PURE__ */ Qe.define({ combine: (t) => t.length ? t[0] : !1 }); class za { /** @internal */ constructor(e, n) { this.type = e, this.value = n; } /** Define a new type of annotation. */ static define() { return new T2e(); } } class T2e { /** Create an instance of this annotation. */ of(e) { return new za(this, e); } } class $2e { /** @internal */ constructor(e) { this.map = e; } /** Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this type. */ of(e) { return new Ot(this, e); } } class Ot { /** @internal */ constructor(e, n) { this.type = e, this.value = n; } /** Map this effect through a position mapping. Will return `undefined` when that ends up deleting the effect. */ map(e) { let n = this.type.map(this.value, e); return n === void 0 ? void 0 : n == this.value ? this : new Ot(this.type, n); } /** Tells you whether this effect object is of a given [type](https://codemirror.net/6/docs/ref/#state.StateEffectType). */ is(e) { return this.type == e; } /** Define a new effect type. The type parameter indicates the type of values that his effect holds. It should be a type that doesn't include `undefined`, since that is used in [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is removed. */ static define(e = {}) { return new $2e(e.map || ((n) => n)); } /** Map an array of effects through a change set. */ static mapEffects(e, n) { if (!e.length) return e; let i = []; for (let r of e) { let s = r.map(n); s && i.push(s); } return i; } } Ot.reconfigure = /* @__PURE__ */ Ot.define(); Ot.appendConfig = /* @__PURE__ */ Ot.define(); let Jr = class ng { constructor(e, n, i, r, s, o) { this.startState = e, this.changes = n, this.selection = i, this.effects = r, this.annotations = s, this.scrollIntoView = o, this._doc = null, this._state = null, i && YW(i, n.newLength), s.some((a) => a.type == ng.time) || (this.annotations = s.concat(ng.time.of(Date.now()))); } /** @internal */ static create(e, n, i, r, s, o) { return new ng(e, n, i, r, s, o); } /** The new document produced by the transaction. Contrary to [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't force the entire new state to be computed right away, so it is recommended that [transaction filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter when they need to look at the new document. */ get newDoc() { return this._doc || (this._doc = this.changes.apply(this.startState.doc)); } /** The new selection produced by the transaction. If [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined, this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's current selection through the changes made by the transaction. */ get newSelection() { return this.selection || this.startState.selection.map(this.changes); } /** The new state created by the transaction. Computed on demand (but retained for subsequent access), so it is recommended not to access it in [transaction filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible. */ get state() { return this._state || this.startState.applyTransaction(this), this._state; } /** Get the value of the given annotation type, if any. */ annotation(e) { for (let n of this.annotations) if (n.type == e) return n.value; } /** Indicates whether the transaction changed the document. */ get docChanged() { return !this.changes.empty; } /** Indicates whether this transaction reconfigures the state (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or with a top-level configuration [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure). */ get reconfigured() { return this.startState.config != this.state.config; } /** Returns true if the transaction has a [user event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to or more specific than `event`. For example, if the transaction has `"select.pointer"` as user event, `"select"` and `"select.pointer"` will match it. */ isUserEvent(e) { let n = this.annotation(ng.userEvent); return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == ".")); } }; Jr.time = /* @__PURE__ */ za.define(); Jr.userEvent = /* @__PURE__ */ za.define(); Jr.addToHistory = /* @__PURE__ */ za.define(); Jr.remote = /* @__PURE__ */ za.define(); function M2e(t, e) { let n = []; for (let i = 0, r = 0; ; ) { let s, o; if (i < t.length && (r == e.length || e[r] >= t[i])) s = t[i++], o = t[i++]; else if (r < e.length) s = e[r++], o = e[r++]; else return n; !n.length || n[n.length - 1] < s ? n.push(s, o) : n[n.length - 1] < o && (n[n.length - 1] = o); } } function nH(t, e, n) { var i; let r, s, o; return n ? (r = e.changes, s = Ii.empty(e.changes.length), o = t.changes.compose(e.changes)) : (r = e.changes.map(t.changes), s = t.changes.mapDesc(e.changes, !0), o = t.changes.compose(r)), { changes: o, selection: e.selection ? e.selection.map(s) : (i = t.selection) === null || i === void 0 ? void 0 : i.map(r), effects: Ot.mapEffects(t.effects, r).concat(Ot.mapEffects(e.effects, s)), annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations, scrollIntoView: t.scrollIntoView || e.scrollIntoView }; } function B4(t, e, n) { let i = e.selection, r = hh(e.annotations); return e.userEvent && (r = r.concat(Jr.userEvent.of(e.userEvent))), { changes: e.changes instanceof Ii ? e.changes : Ii.of(e.changes || [], n, t.facet(GW)), selection: i && (i instanceof he ? i : he.single(i.anchor, i.head)), effects: hh(e.effects), annotations: r, scrollIntoView: !!e.scrollIntoView }; } function iH(t, e, n) { let i = B4(t, e.length ? e[0] : {}, t.doc.length); e.length && e[0].filter === !1 && (n = !1); for (let s = 1; s < e.length; s++) { e[s].filter === !1 && (n = !1); let o = !!e[s].sequential; i = nH(i, B4(t, e[s], o ? i.changes.newLength : t.doc.length), o); } let r = Jr.create(t, i.changes, i.selection, i.effects, i.annotations, i.scrollIntoView); return A2e(n ? N2e(r) : r); } function N2e(t) { let e = t.startState, n = !0; for (let r of e.facet(KW)) { let s = r(t); if (s === !1) { n = !1; break; } Array.isArray(s) && (n = n === !0 ? s : M2e(n, s)); } if (n !== !0) { let r, s; if (n === !1) s = t.changes.invertedDesc, r = Ii.empty(e.doc.length); else { let o = t.changes.filter(n); r = o.changes, s = o.filtered.mapDesc(o.changes).invertedDesc; } t = Jr.create(e, r, t.selection && t.selection.map(s), Ot.mapEffects(t.effects, s), t.annotations, t.scrollIntoView); } let i = e.facet(JW); for (let r = i.length - 1; r >= 0; r--) { let s = i[r](t); s instanceof Jr ? t = s : Array.isArray(s) && s.length == 1 && s[0] instanceof Jr ? t = s[0] : t = iH(e, hh(s), !1); } return t; } function A2e(t) { let e = t.startState, n = e.facet(eH), i = t; for (let r = n.length - 1; r >= 0; r--) { let s = n[r](t); s && Object.keys(s).length && (i = nH(i, B4(e, s, t.changes.newLength), !0)); } return i == t ? t : Jr.create(e, t.changes, t.selection, i.effects, i.annotations, i.scrollIntoView); } const D2e = []; function hh(t) { return t == null ? D2e : Array.isArray(t) ? t : [t]; } var In = /* @__PURE__ */ function(t) { return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t; }(In || (In = {})); const P2e = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; let z4; try { z4 = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); } catch { } function I2e(t) { if (z4) return z4.test(t); for (let e = 0; e < t.length; e++) { let n = t[e]; if (/\w/.test(n) || n > "€" && (n.toUpperCase() != n.toLowerCase() || P2e.test(n))) return !0; } return !1; } function L2e(t) { return (e) => { if (!/\S/.test(e)) return In.Space; if (I2e(e)) return In.Word; for (let n = 0; n < t.length; n++) if (e.indexOf(t[n]) > -1) return In.Word; return In.Other; }; } class zt { constructor(e, n, i, r, s, o) { this.config = e, this.doc = n, this.selection = i, this.values = r, this.status = e.statusTemplate.slice(), this.computeSlot = s, o && (o._state = this); for (let a = 0; a < this.config.dynamicSlots.length; a++) Eg(this, a << 1); this.computeSlot = null; } field(e, n = !0) { let i = this.config.address[e.id]; if (i == null) { if (n) throw new RangeError("Field is not present in this state"); return; } return Eg(this, i), xw(this, i); } /** Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec) can be passed. Unless [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec are assumed to start in the _current_ document (not the document produced by previous specs), and its [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer to the document created by its _own_ changes. The resulting transaction contains the combined effect of all the different specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later specs take precedence over earlier ones. */ update(...e) { return iH(this, e, !0); } /** @internal */ applyTransaction(e) { let n = this.config, { base: i, compartments: r } = n; for (let a of e.effects) a.is(d2.reconfigure) ? (n && (r = /* @__PURE__ */ new Map(), n.compartments.forEach((l, u) => r.set(u, l)), n = null), r.set(a.value.compartment, a.value.extension)) : a.is(Ot.reconfigure) ? (n = null, i = a.value) : a.is(Ot.appendConfig) && (n = null, i = hh(i).concat(a.value)); let s; n ? s = e.startState.values.slice() : (n = kw.resolve(i, r, this), s = new zt(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values); let o = e.startState.facet(F4) ? e.newSelection : e.newSelection.asSingle(); new zt(n, e.newDoc, o, s, (a, l) => l.update(a, e), e); } /** Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that replaces every selection range with the given content. */ replaceSelection(e) { return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({ changes: { from: n.from, to: n.to, insert: e }, range: he.cursor(n.from + e.length) })); } /** Create a set of changes and a new selection by running the given function for each range in the active selection. The function can return an optional set of changes (in the coordinate space of the start document), plus an updated range (in the coordinate space of the document produced by the call's own changes). This method will merge all the changes and ranges into a single changeset and selection, and return it as a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update). */ changeByRange(e) { let n = this.selection, i = e(n.ranges[0]), r = this.changes(i.changes), s = [i.range], o = hh(i.effects); for (let a = 1; a < n.ranges.length; a++) { let l = e(n.ranges[a]), u = this.changes(l.changes), f = u.map(r); for (let h = 0; h < a; h++) s[h] = s[h].map(f); let d = r.mapDesc(u, !0); s.push(l.range.map(d)), r = r.compose(f), o = Ot.mapEffects(o, f).concat(Ot.mapEffects(hh(l.effects), d)); } return { changes: r, selection: he.create(s, n.mainIndex), effects: o }; } /** Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change description, taking the state's document length and line separator into account. */ changes(e = []) { return e instanceof Ii ? e : Ii.of(e, this.doc.length, this.facet(zt.lineSeparator)); } /** Using the state's [line separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string. */ toText(e) { return Kt.of(e.split(this.facet(zt.lineSeparator) || P4)); } /** Return the given range of the document as a string. */ sliceDoc(e = 0, n = this.doc.length) { return this.doc.sliceString(e, n, this.lineBreak); } /** Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet). */ facet(e) { let n = this.config.address[e.id]; return n == null ? e.default : (Eg(this, n), xw(this, n)); } /** Convert this state to a JSON-serializable object. When custom fields should be serialized, you can pass them in as an object mapping property names (in the resulting object, which should not use `doc` or `selection`) to fields. */ toJSON(e) { let n = { doc: this.sliceDoc(), selection: this.selection.toJSON() }; if (e) for (let i in e) { let r = e[i]; r instanceof Ki && this.config.address[r.id] != null && (n[i] = r.spec.toJSON(this.field(e[i]), this)); } return n; } /** Deserialize a state from its JSON representation. When custom fields should be deserialized, pass the same object you passed to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as third argument. */ static fromJSON(e, n = {}, i) { if (!e || typeof e.doc != "string") throw new RangeError("Invalid JSON representation for EditorState"); let r = []; if (i) { for (let s in i) if (Object.prototype.hasOwnProperty.call(e, s)) { let o = i[s], a = e[s]; r.push(o.init((l) => o.spec.fromJSON(a, l))); } } return zt.create({ doc: e.doc, selection: he.fromJSON(e.selection), extensions: n.extensions ? r.concat([n.extensions]) : r }); } /** Create a new state. You'll usually only need this when initializing an editor—updated states are created by applying transactions. */ static create(e = {}) { let n = kw.resolve(e.extensions || [], /* @__PURE__ */ new Map()), i = e.doc instanceof Kt ? e.doc : Kt.of((e.doc || "").split(n.staticFacet(zt.lineSeparator) || P4)), r = e.selection ? e.selection instanceof he ? e.selection : he.single(e.selection.anchor, e.selection.head) : he.single(0); return YW(r, i.length), n.staticFacet(F4) || (r = r.asSingle()), new zt(n, i, r, n.dynamicSlots.map(() => null), (s, o) => o.create(s), null); } /** The size (in columns) of a tab in the document, determined by the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet. */ get tabSize() { return this.facet(zt.tabSize); } /** Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator) string for this state. */ get lineBreak() { return this.facet(zt.lineSeparator) || ` `; } /** Returns true when the editor is [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only. */ get readOnly() { return this.facet(tH); } /** Look up a translation for the given phrase (via the [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the original string if no translation is found. If additional arguments are passed, they will be inserted in place of markers like `$1` (for the first value) and `$2`, etc. A single `$` is equivalent to `$1`, and `$$` will produce a literal dollar sign. */ phrase(e, ...n) { for (let i of this.facet(zt.phrases)) if (Object.prototype.hasOwnProperty.call(i, e)) { e = i[e]; break; } return n.length && (e = e.replace(/\$(\$|\d*)/g, (i, r) => { if (r == "$") return "$"; let s = +(r || 1); return !s || s > n.length ? i : n[s - 1]; })), e; } /** Find the values for a given language data field, provided by the the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet. Examples of language data fields are... - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying comment syntax. - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override) for providing language-specific completion sources. - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding characters that should be considered part of words in this language. - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls bracket closing behavior. */ languageDataAt(e, n, i = -1) { let r = []; for (let s of this.facet(XW)) for (let o of s(this, n, i)) Object.prototype.hasOwnProperty.call(o, e) && r.push(o[e]); return r; } /** Return a function that can categorize strings (expected to represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak)) into one of: - Word (contains an alphanumeric character or a character explicitly listed in the local language's `"wordChars"` language data, which should be a string) - Space (contains only whitespace) - Other (anything else) */ charCategorizer(e) { return L2e(this.languageDataAt("wordChars", e).join("")); } /** Find the word at the given position, meaning the range containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters around it. If no word characters are adjacent to the position, this returns null. */ wordAt(e) { let { text: n, from: i, length: r } = this.doc.lineAt(e), s = this.charCategorizer(e), o = e - i, a = e - i; for (; o > 0; ) { let l = dr(n, o, !1); if (s(n.slice(l, o)) != In.Word) break; o = l; } for (; a < r; ) { let l = dr(n, a); if (s(n.slice(a, l)) != In.Word) break; a = l; } return o == a ? null : he.range(o + i, a + i); } } zt.allowMultipleSelections = F4; zt.tabSize = /* @__PURE__ */ Qe.define({ combine: (t) => t.length ? t[0] : 4 }); zt.lineSeparator = GW; zt.readOnly = tH; zt.phrases = /* @__PURE__ */ Qe.define({ compare(t, e) { let n = Object.keys(t), i = Object.keys(e); return n.length == i.length && n.every((r) => t[r] == e[r]); } }); zt.languageData = XW; zt.changeFilter = KW; zt.transactionFilter = JW; zt.transactionExtender = eH; d2.reconfigure = /* @__PURE__ */ Ot.define(); function Wa(t, e, n = {}) { let i = {}; for (let r of t) for (let s of Object.keys(r)) { let o = r[s], a = i[s]; if (a === void 0) i[s] = o; else if (!(a === o || o === void 0)) if (Object.hasOwnProperty.call(n, s)) i[s] = n[s](a, o); else throw new Error("Config merge conflict for field " + s); } for (let r in e) i[r] === void 0 && (i[r] = e[r]); return i; } class vf { /** Compare this value with another value. Used when comparing rangesets. The default implementation compares by identity. Unless you are only creating a fixed number of unique instances of your value type, it is a good idea to implement this properly. */ eq(e) { return this == e; } /** Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value. */ range(e, n = e) { return W4.create(e, n, this); } } vf.prototype.startSide = vf.prototype.endSide = 0; vf.prototype.point = !1; vf.prototype.mapMode = ur.TrackDel; let W4 = class rH { constructor(e, n, i) { this.from = e, this.to = n, this.value = i; } /** @internal */ static create(e, n, i) { return new rH(e, n, i); } }; function H4(t, e) { return t.from - e.from || t.value.startSide - e.value.startSide; } class pE { constructor(e, n, i, r) { this.from = e, this.to = n, this.value = i, this.maxPoint = r; } get length() { return this.to[this.to.length - 1]; } // Find the index of the given position and side. Use the ranges' // `from` pos when `end == false`, `to` when `end == true`. findIndex(e, n, i, r = 0) { let s = i ? this.to : this.from; for (let o = r, a = s.length; ; ) { if (o == a) return o; let l = o + a >> 1, u = s[l] - e || (i ? this.value[l].endSide : this.value[l].startSide) - n; if (l == o) return u >= 0 ? o : a; u >= 0 ? a = l : o = l + 1; } } between(e, n, i, r) { for (let s = this.findIndex(n, -1e9, !0), o = this.findIndex(i, 1e9, !1, s); s < o; s++) if (r(this.from[s] + e, this.to[s] + e, this.value[s]) === !1) return !1; } map(e, n) { let i = [], r = [], s = [], o = -1, a = -1; for (let l = 0; l < this.value.length; l++) { let u = this.value[l], f = this.from[l] + e, d = this.to[l] + e, h, m; if (f == d) { let g = n.mapPos(f, u.startSide, u.mapMode); if (g == null || (h = m = g, u.startSide != u.endSide && (m = n.mapPos(f, u.endSide), m < h))) continue; } else if (h = n.mapPos(f, u.startSide), m = n.mapPos(d, u.endSide), h > m || h == m && u.startSide > 0 && u.endSide <= 0) continue; (m - h || u.endSide - u.startSide) < 0 || (o < 0 && (o = h), u.point && (a = Math.max(a, m - h)), i.push(u), r.push(h - o), s.push(m - o)); } return { mapped: i.length ? new pE(r, s, i, a) : null, pos: o }; } } class Qt { constructor(e, n, i, r) { this.chunkPos = e, this.chunk = n, this.nextLayer = i, this.maxPoint = r; } /** @internal */ static create(e, n, i, r) { return new Qt(e, n, i, r); } /** @internal */ get length() { let e = this.chunk.length - 1; return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length); } /** The number of ranges in the set. */ get size() { if (this.isEmpty) return 0; let e = this.nextLayer.size; for (let n of this.chunk) e += n.value.length; return e; } /** @internal */ chunkEnd(e) { return this.chunkPos[e] + this.chunk[e].length; } /** Update the range set, optionally adding new ranges or filtering out existing ones. (Note: The type parameter is just there as a kludge to work around TypeScript variance issues that prevented `RangeSet` from being a subtype of `RangeSet` when `X` is a subtype of `Y`.) */ update(e) { let { add: n = [], sort: i = !1, filterFrom: r = 0, filterTo: s = this.length } = e, o = e.filter; if (n.length == 0 && !o) return this; if (i && (n = n.slice().sort(H4)), this.isEmpty) return n.length ? Qt.of(n) : this; let a = new sH(this, null, -1).goto(0), l = 0, u = [], f = new Zu(); for (; a.value || l < n.length; ) if (l < n.length && (a.from - n[l].from || a.startSide - n[l].value.startSide) >= 0) { let d = n[l++]; f.addInner(d.from, d.to, d.value) || u.push(d); } else a.rangeIndex == 1 && a.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(a.chunkIndex) < n[l].from) && (!o || r > this.chunkEnd(a.chunkIndex) || s < this.chunkPos[a.chunkIndex]) && f.addChunk(this.chunkPos[a.chunkIndex], this.chunk[a.chunkIndex]) ? a.nextChunk() : ((!o || r > a.to || s < a.from || o(a.from, a.to, a.value)) && (f.addInner(a.from, a.to, a.value) || u.push(W4.create(a.from, a.to, a.value))), a.next()); return f.finishInner(this.nextLayer.isEmpty && !u.length ? Qt.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: r, filterTo: s })); } /** Map this range set through a set of changes, return the new set. */ map(e) { if (e.empty || this.isEmpty) return this; let n = [], i = [], r = -1; for (let o = 0; o < this.chunk.length; o++) { let a = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(a, a + l.length); if (u === !1) r = Math.max(r, l.maxPoint), n.push(l), i.push(e.mapPos(a)); else if (u === !0) { let { mapped: f, pos: d } = l.map(a, e); f && (r = Math.max(r, f.maxPoint), n.push(f), i.push(d)); } } let s = this.nextLayer.map(e); return n.length == 0 ? s : new Qt(i, n, s || Qt.empty, r); } /** Iterate over the ranges that touch the region `from` to `to`, calling `f` for each. There is no guarantee that the ranges will be reported in any specific order. When the callback returns `false`, iteration stops. */ between(e, n, i) { if (!this.isEmpty) { for (let r = 0; r < this.chunk.length; r++) { let s = this.chunkPos[r], o = this.chunk[r]; if (n >= s && e <= s + o.length && o.between(s, e - s, n - s, i) === !1) return; } this.nextLayer.between(e, n, i); } } /** Iterate over the ranges in this set, in order, including all ranges that end at or after `from`. */ iter(e = 0) { return a0.from([this]).goto(e); } /** @internal */ get isEmpty() { return this.nextLayer == this; } /** Iterate over the ranges in a collection of sets, in order, starting from `from`. */ static iter(e, n = 0) { return a0.from(e).goto(n); } /** Iterate over two groups of sets, calling methods on `comparator` to notify it of possible differences. */ static compare(e, n, i, r, s = -1) { let o = e.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= s), a = n.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= s), l = KN(o, a, i), u = new $m(o, l, s), f = new $m(a, l, s); i.iterGaps((d, h, m) => JN(u, d, f, h, m, r)), i.empty && i.length == 0 && JN(u, 0, f, 0, 0, r); } /** Compare the contents of two groups of range sets, returning true if they are equivalent in the given range. */ static eq(e, n, i = 0, r) { r == null && (r = 999999999); let s = e.filter((f) => !f.isEmpty && n.indexOf(f) < 0), o = n.filter((f) => !f.isEmpty && e.indexOf(f) < 0); if (s.length != o.length) return !1; if (!s.length) return !0; let a = KN(s, o), l = new $m(s, a, 0).goto(i), u = new $m(o, a, 0).goto(i); for (; ; ) { if (l.to != u.to || !Q4(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point))) return !1; if (l.to > r) return !0; l.next(), u.next(); } } /** Iterate over a group of range sets at the same time, notifying the iterator about the ranges covering every given piece of content. Returns the open count (see [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end of the iteration. */ static spans(e, n, i, r, s = -1) { let o = new $m(e, null, s).goto(n), a = n, l = o.openStart; for (; ; ) { let u = Math.min(o.to, i); if (o.point) { let f = o.activeForPoint(o.to), d = o.pointFrom < n ? f.length + 1 : Math.min(f.length, l); r.point(a, u, o.point, f, d, o.pointRank), l = Math.min(o.openEnd(u), f.length); } else u > a && (r.span(a, u, o.active, l), l = o.openEnd(u)); if (o.to > i) return l + (o.point && o.to > i ? 1 : 0); a = o.to, o.next(); } } /** Create a range set for the given range or array of ranges. By default, this expects the ranges to be _sorted_ (by start position and, if two start at the same position, `value.startSide`). You can pass `true` as second argument to cause the method to sort them. */ static of(e, n = !1) { let i = new Zu(); for (let r of e instanceof W4 ? [e] : n ? R2e(e) : e) i.add(r.from, r.to, r.value); return i.finish(); } /** Join an array of range sets into a single set. */ static join(e) { if (!e.length) return Qt.empty; let n = e[e.length - 1]; for (let i = e.length - 2; i >= 0; i--) for (let r = e[i]; r != Qt.empty; r = r.nextLayer) n = new Qt(r.chunkPos, r.chunk, n, Math.max(r.maxPoint, n.maxPoint)); return n; } } Qt.empty = /* @__PURE__ */ new Qt([], [], null, -1); function R2e(t) { if (t.length > 1) for (let e = t[0], n = 1; n < t.length; n++) { let i = t[n]; if (H4(e, i) > 0) return t.slice().sort(H4); e = i; } return t; } Qt.empty.nextLayer = Qt.empty; class Zu { finishChunk(e) { this.chunks.push(new pE(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []); } /** Create an empty builder. */ constructor() { this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null; } /** Add a range. Ranges should be added in sorted (by `from` and `value.startSide`) order. */ add(e, n, i) { this.addInner(e, n, i) || (this.nextLayer || (this.nextLayer = new Zu())).add(e, n, i); } /** @internal */ addInner(e, n, i) { let r = e - this.lastTo || i.startSide - this.last.endSide; if (r <= 0 && (e - this.lastFrom || i.startSide - this.last.startSide) < 0) throw new Error("Ranges must be added sorted by `from` position and `startSide`"); return r < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(n - this.chunkStart), this.last = i, this.lastFrom = e, this.lastTo = n, this.value.push(i), i.point && (this.maxPoint = Math.max(this.maxPoint, n - e)), !0); } /** @internal */ addChunk(e, n) { if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0) return !1; this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e); let i = n.value.length - 1; return this.last = n.value[i], this.lastFrom = n.from[i] + e, this.lastTo = n.to[i] + e, !0; } /** Finish the range set. Returns the new set. The builder can't be used anymore after this has been called. */ finish() { return this.finishInner(Qt.empty); } /** @internal */ finishInner(e) { if (this.from.length && this.finishChunk(!1), this.chunks.length == 0) return e; let n = Qt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint); return this.from = null, n; } } function KN(t, e, n) { let i = /* @__PURE__ */ new Map(); for (let s of t) for (let o = 0; o < s.chunk.length; o++) s.chunk[o].maxPoint <= 0 && i.set(s.chunk[o], s.chunkPos[o]); let r = /* @__PURE__ */ new Set(); for (let s of e) for (let o = 0; o < s.chunk.length; o++) { let a = i.get(s.chunk[o]); a != null && (n ? n.mapPos(a) : a) == s.chunkPos[o] && !(n != null && n.touchesRange(a, a + s.chunk[o].length)) && r.add(s.chunk[o]); } return r; } class sH { constructor(e, n, i, r = 0) { this.layer = e, this.skip = n, this.minPoint = i, this.rank = r; } get startSide() { return this.value ? this.value.startSide : 0; } get endSide() { return this.value ? this.value.endSide : 0; } goto(e, n = -1e9) { return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this; } gotoInner(e, n, i) { for (; this.chunkIndex < this.layer.chunk.length; ) { let r = this.layer.chunk[this.chunkIndex]; if (!(this.skip && this.skip.has(r) || this.layer.chunkEnd(this.chunkIndex) < e || r.maxPoint < this.minPoint)) break; this.chunkIndex++, i = !1; } if (this.chunkIndex < this.layer.chunk.length) { let r = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0); (!i || this.rangeIndex < r) && this.setRangeIndex(r); } this.next(); } forward(e, n) { (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0); } next() { for (; ; ) if (this.chunkIndex == this.layer.chunk.length) { this.from = this.to = 1e9, this.value = null; break; } else { let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], i = e + n.from[this.rangeIndex]; if (this.from = i, this.to = e + n.to[this.rangeIndex], this.value = n.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint) break; } } setRangeIndex(e) { if (e == this.layer.chunk[this.chunkIndex].value.length) { if (this.chunkIndex++, this.skip) for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); ) this.chunkIndex++; this.rangeIndex = 0; } else this.rangeIndex = e; } nextChunk() { this.chunkIndex++, this.rangeIndex = 0, this.next(); } compare(e) { return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide; } } class a0 { constructor(e) { this.heap = e; } static from(e, n = null, i = -1) { let r = []; for (let s = 0; s < e.length; s++) for (let o = e[s]; !o.isEmpty; o = o.nextLayer) o.maxPoint >= i && r.push(new sH(o, n, i, s)); return r.length == 1 ? r[0] : new a0(r); } get startSide() { return this.value ? this.value.startSide : 0; } goto(e, n = -1e9) { for (let i of this.heap) i.goto(e, n); for (let i = this.heap.length >> 1; i >= 0; i--) Z3(this.heap, i); return this.next(), this; } forward(e, n) { for (let i of this.heap) i.forward(e, n); for (let i = this.heap.length >> 1; i >= 0; i--) Z3(this.heap, i); (this.to - e || this.value.endSide - n) < 0 && this.next(); } next() { if (this.heap.length == 0) this.from = this.to = 1e9, this.value = null, this.rank = -1; else { let e = this.heap[0]; this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), Z3(this.heap, 0); } } } function Z3(t, e) { for (let n = t[e]; ; ) { let i = (e << 1) + 1; if (i >= t.length) break; let r = t[i]; if (i + 1 < t.length && r.compare(t[i + 1]) >= 0 && (r = t[i + 1], i++), n.compare(r) < 0) break; t[i] = n, t[e] = r, e = i; } } class $m { constructor(e, n, i) { this.minPoint = i, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = a0.from(e, n, i); } goto(e, n = -1e9) { return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this; } forward(e, n) { for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; ) this.removeActive(this.minActive); this.cursor.forward(e, n); } removeActive(e) { ub(this.active, e), ub(this.activeTo, e), ub(this.activeRank, e), this.minActive = eA(this.active, this.activeTo); } addActive(e) { let n = 0, { value: i, to: r, rank: s } = this.cursor; for (; n < this.activeRank.length && (s - this.activeRank[n] || r - this.activeTo[n]) > 0; ) n++; cb(this.active, n, i), cb(this.activeTo, n, r), cb(this.activeRank, n, s), e && cb(e, n, this.cursor.from), this.minActive = eA(this.active, this.activeTo); } // After calling this, if `this.point` != null, the next range is a // point. Otherwise, it's a regular range, covered by `this.active`. next() { let e = this.to, n = this.point; this.point = null; let i = this.openStart < 0 ? [] : null; for (; ; ) { let r = this.minActive; if (r > -1 && (this.activeTo[r] - this.cursor.from || this.active[r].endSide - this.cursor.startSide) < 0) { if (this.activeTo[r] > e) { this.to = this.activeTo[r], this.endSide = this.active[r].endSide; break; } this.removeActive(r), i && ub(i, r); } else if (this.cursor.value) if (this.cursor.from > e) { this.to = this.cursor.from, this.endSide = this.cursor.startSide; break; } else { let s = this.cursor.value; if (!s.point) this.addActive(i), this.cursor.next(); else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to) this.cursor.next(); else { this.point = s, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = s.endSide, this.cursor.next(), this.forward(this.to, this.endSide); break; } } else { this.to = this.endSide = 1e9; break; } } if (i) { this.openStart = 0; for (let r = i.length - 1; r >= 0 && i[r] < e; r--) this.openStart++; } } activeForPoint(e) { if (!this.active.length) return this.active; let n = []; for (let i = this.active.length - 1; i >= 0 && !(this.activeRank[i] < this.pointRank); i--) (this.activeTo[i] > e || this.activeTo[i] == e && this.active[i].endSide >= this.point.endSide) && n.push(this.active[i]); return n.reverse(); } openEnd(e) { let n = 0; for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > e; i--) n++; return n; } } function JN(t, e, n, i, r, s) { t.goto(e), n.goto(i); let o = i + r, a = i, l = i - e; for (; ; ) { let u = t.to + l - n.to || t.endSide - n.endSide, f = u < 0 ? t.to + l : n.to, d = Math.min(f, o); if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && Q4(t.activeForPoint(t.to), n.activeForPoint(n.to)) || s.comparePoint(a, d, t.point, n.point) : d > a && !Q4(t.active, n.active) && s.compareRange(a, d, t.active, n.active), f > o) break; a = f, u <= 0 && t.next(), u >= 0 && n.next(); } } function Q4(t, e) { if (t.length != e.length) return !1; for (let n = 0; n < t.length; n++) if (t[n] != e[n] && !t[n].eq(e[n])) return !1; return !0; } function ub(t, e) { for (let n = e, i = t.length - 1; n < i; n++) t[n] = t[n + 1]; t.pop(); } function cb(t, e, n) { for (let i = t.length - 1; i >= e; i--) t[i + 1] = t[i]; t[e] = n; } function eA(t, e) { let n = -1, i = 1e9; for (let r = 0; r < e.length; r++) (e[r] - i || t[r].endSide - t[n].endSide) < 0 && (n = r, i = e[r]); return n; } function dp(t, e, n = t.length) { let i = 0; for (let r = 0; r < n; ) t.charCodeAt(r) == 9 ? (i += e - i % e, r++) : (i++, r = dr(t, r)); return i; } function U4(t, e, n, i) { for (let r = 0, s = 0; ; ) { if (s >= e) return r; if (r == t.length) break; s += t.charCodeAt(r) == 9 ? n - s % n : 1, r = dr(t, r); } return i === !0 ? -1 : t.length; } const Z4 = "ͼ", tA = typeof Symbol > "u" ? "__" + Z4 : Symbol.for(Z4), q4 = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), nA = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}; class qu { // :: (Object