From b0b29be4a690c32ed8d005da3cd82256b9513b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20PONS?= Date: Thu, 5 Oct 2023 15:02:27 +0200 Subject: [PATCH] vault backup: 2023-10-05 15:02:27 --- .obsidian/plugins/obsidian-git/main.js | 2824 +++++++++++------- .obsidian/plugins/obsidian-git/manifest.json | 2 +- .obsidian/plugins/obsidian-git/styles.css | 5 + 3 files changed, 1717 insertions(+), 1114 deletions(-) diff --git a/.obsidian/plugins/obsidian-git/main.js b/.obsidian/plugins/obsidian-git/main.js index 8baa0fd..dc70752 100644 --- a/.obsidian/plugins/obsidian-git/main.js +++ b/.obsidian/plugins/obsidian-git/main.js @@ -9,6 +9,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; +var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; @@ -36,6 +37,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __publicField = (obj, key2, value) => { + __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value); + return value; +}; // node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js var require_base64_js = __commonJS({ @@ -7656,9 +7661,9 @@ var require_ms = __commonJS({ } }); -// node_modules/.pnpm/debug@4.3.4_supports-color@7.2.0/node_modules/debug/src/common.js +// node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/common.js var require_common2 = __commonJS({ - "node_modules/.pnpm/debug@4.3.4_supports-color@7.2.0/node_modules/debug/src/common.js"(exports2, module2) { + "node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/common.js"(exports2, module2) { init_polyfill_buffer(); function setup(env) { createDebug.debug = createDebug; @@ -7820,9 +7825,9 @@ var require_common2 = __commonJS({ } }); -// node_modules/.pnpm/debug@4.3.4_supports-color@7.2.0/node_modules/debug/src/browser.js +// node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/browser.js var require_browser = __commonJS({ - "node_modules/.pnpm/debug@4.3.4_supports-color@7.2.0/node_modules/debug/src/browser.js"(exports2, module2) { + "node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/browser.js"(exports2, module2) { init_polyfill_buffer(); exports2.formatArgs = formatArgs; exports2.save = save; @@ -7990,9 +7995,9 @@ var require_browser = __commonJS({ } }); -// node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@7.2.0/node_modules/@kwsites/file-exists/dist/src/index.js +// node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/src/index.js var require_src = __commonJS({ - "node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@7.2.0/node_modules/@kwsites/file-exists/dist/src/index.js"(exports2) { + "node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/src/index.js"(exports2) { "use strict"; init_polyfill_buffer(); var __importDefault = exports2 && exports2.__importDefault || function(mod) { @@ -8035,9 +8040,9 @@ var require_src = __commonJS({ } }); -// node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@7.2.0/node_modules/@kwsites/file-exists/dist/index.js +// node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/index.js var require_dist = __commonJS({ - "node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@7.2.0/node_modules/@kwsites/file-exists/dist/index.js"(exports2) { + "node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/index.js"(exports2) { "use strict"; init_polyfill_buffer(); function __export3(m) { @@ -8754,15 +8759,15 @@ var require_implementation = __commonJS({ } }; keysShim = function keys(object) { - var isObject = object !== null && typeof object === "object"; - var isFunction = toStr.call(object) === "[object Function]"; + var isObject2 = object !== null && typeof object === "object"; + var isFunction2 = toStr.call(object) === "[object Function]"; var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === "[object String]"; + var isString = isObject2 && toStr.call(object) === "[object String]"; var theKeys = []; - if (!isObject && !isFunction && !isArguments) { + if (!isObject2 && !isFunction2 && !isArguments) { throw new TypeError("Object.keys called on a non-object"); } - var skipProto = hasProtoEnumBug && isFunction; + var skipProto = hasProtoEnumBug && isFunction2; if (isString && object.length > 0 && !has.call(object, 0)) { for (var i = 0; i < object.length; ++i) { theKeys.push(String(i)); @@ -8918,6 +8923,21 @@ var require_has_symbols = __commonJS({ } }); +// node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js +var require_has_proto = __commonJS({ + "node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var test = { + foo: {} + }; + var $Object = Object; + module2.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); + }; + } +}); + // node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js var require_implementation2 = __commonJS({ "node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) { @@ -8989,9 +9009,9 @@ var require_src2 = __commonJS({ } }); -// node_modules/.pnpm/get-intrinsic@1.2.0/node_modules/get-intrinsic/index.js +// node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js var require_get_intrinsic = __commonJS({ - "node_modules/.pnpm/get-intrinsic@1.2.0/node_modules/get-intrinsic/index.js"(exports2, module2) { + "node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var undefined2; @@ -9028,16 +9048,17 @@ var require_get_intrinsic = __commonJS({ } }() : throwTypeError; var hasSymbols = require_has_symbols()(); - var getProto = Object.getPrototypeOf || function(x) { + var hasProto = require_has_proto()(); + var getProto = Object.getPrototypeOf || (hasProto ? function(x) { return x.__proto__; - }; + } : null); var needsEval = {}; - var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array); + var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); var INTRINSICS = { "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, - "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2, + "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, "%AsyncFromSyncIteratorPrototype%": undefined2, "%AsyncFunction%": needsEval, "%AsyncGenerator%": needsEval, @@ -9068,10 +9089,10 @@ var require_get_intrinsic = __commonJS({ "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, - "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, "%JSON%": typeof JSON === "object" ? JSON : undefined2, "%Map%": typeof Map === "undefined" ? undefined2 : Map, - "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, @@ -9084,10 +9105,10 @@ var require_get_intrinsic = __commonJS({ "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? undefined2 : Set, - "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, "%String%": String, - "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2, + "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, "%Symbol%": hasSymbols ? Symbol : undefined2, "%SyntaxError%": $SyntaxError, "%ThrowTypeError%": ThrowTypeError, @@ -9102,11 +9123,13 @@ var require_get_intrinsic = __commonJS({ "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet }; - try { - null.error; - } catch (e) { - errorProto = getProto(getProto(e)); - INTRINSICS["%Error.prototype%"] = errorProto; + if (getProto) { + try { + null.error; + } catch (e) { + errorProto = getProto(getProto(e)); + INTRINSICS["%Error.prototype%"] = errorProto; + } } var errorProto; var doEval = function doEval2(name) { @@ -9124,7 +9147,7 @@ var require_get_intrinsic = __commonJS({ } } else if (name === "%AsyncIteratorPrototype%") { var gen = doEval2("%AsyncGenerator%"); - if (gen) { + if (gen && getProto) { value = getProto(gen.prototype); } } @@ -9336,7 +9359,7 @@ var require_define_properties = __commonJS({ var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; - var isFunction = function(fn) { + var isFunction2 = function(fn) { return typeof fn === "function" && toStr.call(fn) === "[object Function]"; }; var hasPropertyDescriptors = require_has_property_descriptors()(); @@ -9347,7 +9370,7 @@ var require_define_properties = __commonJS({ if (object[name] === value) { return; } - } else if (!isFunction(predicate) || !predicate()) { + } else if (!isFunction2(predicate) || !predicate()) { return; } } @@ -11100,19 +11123,22 @@ var require_gopd = __commonJS({ } }); -// node_modules/.pnpm/is-typed-array@1.1.10/node_modules/is-typed-array/index.js -var require_is_typed_array = __commonJS({ - "node_modules/.pnpm/is-typed-array@1.1.10/node_modules/is-typed-array/index.js"(exports2, module2) { +// node_modules/.pnpm/which-typed-array@1.1.11/node_modules/which-typed-array/index.js +var require_which_typed_array = __commonJS({ + "node_modules/.pnpm/which-typed-array@1.1.11/node_modules/which-typed-array/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var forEach2 = require_for_each(); var availableTypedArrays = require_available_typed_arrays(); + var callBind = require_call_bind(); var callBound = require_callBound(); + var gOPD = require_gopd(); var $toString = callBound("Object.prototype.toString"); var hasToStringTag = require_shams2()(); - var gOPD = require_gopd(); var g = typeof globalThis === "undefined" ? global : globalThis; var typedArrays = availableTypedArrays(); + var $slice = callBound("String.prototype.slice"); + var getPrototypeOf = Object.getPrototypeOf; var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) { for (var i = 0; i < array.length; i += 1) { if (array[i] === value) { @@ -11121,9 +11147,7 @@ var require_is_typed_array = __commonJS({ } return -1; }; - var $slice = callBound("String.prototype.slice"); - var toStrTags = {}; - var getPrototypeOf = Object.getPrototypeOf; + var cache = { __proto__: null }; if (hasToStringTag && gOPD && getPrototypeOf) { forEach2(typedArrays, function(typedArray) { var arr = new g[typedArray](); @@ -11134,38 +11158,76 @@ var require_is_typed_array = __commonJS({ var superProto = getPrototypeOf(proto); descriptor = gOPD(superProto, Symbol.toStringTag); } - toStrTags[typedArray] = descriptor.get; + cache["$" + typedArray] = callBind(descriptor.get); } }); + } else { + forEach2(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + cache["$" + typedArray] = callBind(arr.slice); + }); } var tryTypedArrays = function tryAllTypedArrays(value) { - var anyTrue = false; - forEach2(toStrTags, function(getter, typedArray) { - if (!anyTrue) { + var found = false; + forEach2(cache, function(getter, typedArray) { + if (!found) { try { - anyTrue = getter.call(value) === typedArray; + if ("$" + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } } catch (e) { } } }); - return anyTrue; + return found; }; - module2.exports = function isTypedArray(value) { + var trySlices = function tryAllSlices(value) { + var found = false; + forEach2(cache, function(getter, name) { + if (!found) { + try { + getter(value); + found = $slice(name, 1); + } catch (e) { + } + } + }); + return found; + }; + module2.exports = function whichTypedArray(value) { if (!value || typeof value !== "object") { return false; } - if (!hasToStringTag || !(Symbol.toStringTag in value)) { + if (!hasToStringTag) { var tag2 = $slice($toString(value), 8, -1); - return $indexOf(typedArrays, tag2) > -1; + if ($indexOf(typedArrays, tag2) > -1) { + return tag2; + } + if (tag2 !== "Object") { + return false; + } + return trySlices(value); } if (!gOPD) { - return false; + return null; } return tryTypedArrays(value); }; } }); +// node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js +var require_is_typed_array = __commonJS({ + "node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var whichTypedArray = require_which_typed_array(); + module2.exports = function isTypedArray(value) { + return !!whichTypedArray(value); + }; + } +}); + // node_modules/.pnpm/is-array-buffer@3.0.2/node_modules/is-array-buffer/index.js var require_is_array_buffer = __commonJS({ "node_modules/.pnpm/is-array-buffer@3.0.2/node_modules/is-array-buffer/index.js"(exports2, module2) { @@ -11595,66 +11657,6 @@ var require_which_collection = __commonJS({ } }); -// node_modules/.pnpm/which-typed-array@1.1.9/node_modules/which-typed-array/index.js -var require_which_typed_array = __commonJS({ - "node_modules/.pnpm/which-typed-array@1.1.9/node_modules/which-typed-array/index.js"(exports2, module2) { - "use strict"; - init_polyfill_buffer(); - var forEach2 = require_for_each(); - var availableTypedArrays = require_available_typed_arrays(); - var callBound = require_callBound(); - var gOPD = require_gopd(); - var $toString = callBound("Object.prototype.toString"); - var hasToStringTag = require_shams2()(); - var g = typeof globalThis === "undefined" ? global : globalThis; - var typedArrays = availableTypedArrays(); - var $slice = callBound("String.prototype.slice"); - var toStrTags = {}; - var getPrototypeOf = Object.getPrototypeOf; - if (hasToStringTag && gOPD && getPrototypeOf) { - forEach2(typedArrays, function(typedArray) { - if (typeof g[typedArray] === "function") { - var arr = new g[typedArray](); - if (Symbol.toStringTag in arr) { - var proto = getPrototypeOf(arr); - var descriptor = gOPD(proto, Symbol.toStringTag); - if (!descriptor) { - var superProto = getPrototypeOf(proto); - descriptor = gOPD(superProto, Symbol.toStringTag); - } - toStrTags[typedArray] = descriptor.get; - } - } - }); - } - var tryTypedArrays = function tryAllTypedArrays(value) { - var foundName = false; - forEach2(toStrTags, function(getter, typedArray) { - if (!foundName) { - try { - var name = getter.call(value); - if (name === typedArray) { - foundName = name; - } - } catch (e) { - } - } - }); - return foundName; - }; - var isTypedArray = require_is_typed_array(); - module2.exports = function whichTypedArray(value) { - if (!isTypedArray(value)) { - return false; - } - if (!hasToStringTag || !(Symbol.toStringTag in value)) { - return $slice($toString(value), 8, -1); - } - return tryTypedArrays(value); - }; - } -}); - // node_modules/.pnpm/array-buffer-byte-length@1.0.0/node_modules/array-buffer-byte-length/index.js var require_array_buffer_byte_length = __commonJS({ "node_modules/.pnpm/array-buffer-byte-length@1.0.0/node_modules/array-buffer-byte-length/index.js"(exports2, module2) { @@ -11672,9 +11674,9 @@ var require_array_buffer_byte_length = __commonJS({ } }); -// node_modules/.pnpm/deep-equal@2.2.1/node_modules/deep-equal/index.js +// node_modules/.pnpm/deep-equal@2.2.2/node_modules/deep-equal/index.js var require_deep_equal = __commonJS({ - "node_modules/.pnpm/deep-equal@2.2.1/node_modules/deep-equal/index.js"(exports2, module2) { + "node_modules/.pnpm/deep-equal@2.2.2/node_modules/deep-equal/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var assign2 = require_object(); @@ -11957,9 +11959,20 @@ var require_deep_equal = __commonJS({ } var aWhich = whichTypedArray(a); var bWhich = whichTypedArray(b); - if ((aWhich || bWhich) && aWhich !== bWhich) { + if (aWhich !== bWhich) { return false; } + if (aWhich || bWhich) { + if (a.length !== b.length) { + return false; + } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } var aIsBuffer = isBuffer(a); var bIsBuffer = isBuffer(b); if (aIsBuffer !== bIsBuffer) { @@ -13154,9 +13167,9 @@ var require_hogan = __commonJS({ } }); -// node_modules/.pnpm/feather-icons@4.29.0/node_modules/feather-icons/dist/feather.js +// node_modules/.pnpm/feather-icons@4.29.1/node_modules/feather-icons/dist/feather.js var require_feather = __commonJS({ - "node_modules/.pnpm/feather-icons@4.29.0/node_modules/feather-icons/dist/feather.js"(exports2, module2) { + "node_modules/.pnpm/feather-icons@4.29.1/node_modules/feather-icons/dist/feather.js"(exports2, module2) { init_polyfill_buffer(); (function webpackUniversalModuleDefinition(root2, factory) { if (typeof exports2 === "object" && typeof module2 === "object") @@ -13236,7 +13249,7 @@ var require_feather = __commonJS({ /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, aperture, archive, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, award, bar-chart-2, bar-chart, battery-charging, battery, bell-off, bell, bluetooth, bold, book-open, book, bookmark, box, briefcase, calendar, camera-off, camera, cast, check-circle, check-square, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, chrome, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-off, cloud-rain, cloud-snow, cloud, code, codepen, codesandbox, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, divide-circle, divide-square, divide, dollar-sign, download-cloud, download, dribbble, droplet, edit-2, edit-3, edit, external-link, eye-off, eye, facebook, fast-forward, feather, figma, file-minus, file-plus, file-text, file, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, grid, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, info, instagram, italic, key, layers, layout, life-buoy, link-2, link, linkedin, list, loader, lock, log-in, log-out, mail, map-pin, map, maximize-2, maximize, meh, menu, message-circle, message-square, mic-off, mic, minimize-2, minimize, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation-2, navigation, octagon, package, paperclip, pause-circle, pause, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, pie-chart, play-circle, play, plus-circle, plus-square, plus, pocket, power, printer, radio, refresh-ccw, refresh-cw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, server, settings, share-2, share, shield-off, shield, shopping-bag, shopping-cart, shuffle, sidebar, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, square, star, stop-circle, sun, sunrise, sunset, table, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash-2, trash, trello, trending-down, trending-up, triangle, truck, tv, twitch, twitter, type, umbrella, underline, unlock, upload-cloud, upload, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume-1, volume-2, volume-x, volume, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ /***/ function(module3) { - module3.exports = { "activity": '', "airplay": '', "alert-circle": '', "alert-octagon": '', "alert-triangle": '', "align-center": '', "align-justify": '', "align-left": '', "align-right": '', "anchor": '', "aperture": '', "archive": '', "arrow-down-circle": '', "arrow-down-left": '', "arrow-down-right": '', "arrow-down": '', "arrow-left-circle": '', "arrow-left": '', "arrow-right-circle": '', "arrow-right": '', "arrow-up-circle": '', "arrow-up-left": '', "arrow-up-right": '', "arrow-up": '', "at-sign": '', "award": '', "bar-chart-2": '', "bar-chart": '', "battery-charging": '', "battery": '', "bell-off": '', "bell": '', "bluetooth": '', "bold": '', "book-open": '', "book": '', "bookmark": '', "box": '', "briefcase": '', "calendar": '', "camera-off": '', "camera": '', "cast": '', "check-circle": '', "check-square": '', "check": '', "chevron-down": '', "chevron-left": '', "chevron-right": '', "chevron-up": '', "chevrons-down": '', "chevrons-left": '', "chevrons-right": '', "chevrons-up": '', "chrome": '', "circle": '', "clipboard": '', "clock": '', "cloud-drizzle": '', "cloud-lightning": '', "cloud-off": '', "cloud-rain": '', "cloud-snow": '', "cloud": '', "code": '', "codepen": '', "codesandbox": '', "coffee": '', "columns": '', "command": '', "compass": '', "copy": '', "corner-down-left": '', "corner-down-right": '', "corner-left-down": '', "corner-left-up": '', "corner-right-down": '', "corner-right-up": '', "corner-up-left": '', "corner-up-right": '', "cpu": '', "credit-card": '', "crop": '', "crosshair": '', "database": '', "delete": '', "disc": '', "divide-circle": '', "divide-square": '', "divide": '', "dollar-sign": '', "download-cloud": '', "download": '', "dribbble": '', "droplet": '', "edit-2": '', "edit-3": '', "edit": '', "external-link": '', "eye-off": '', "eye": '', "facebook": '', "fast-forward": '', "feather": '', "figma": '', "file-minus": '', "file-plus": '', "file-text": '', "file": '', "film": '', "filter": '', "flag": '', "folder-minus": '', "folder-plus": '', "folder": '', "framer": '', "frown": '', "gift": '', "git-branch": '', "git-commit": '', "git-merge": '', "git-pull-request": '', "github": '', "gitlab": '', "globe": '', "grid": '', "hard-drive": '', "hash": '', "headphones": '', "heart": '', "help-circle": '', "hexagon": '', "home": '', "image": '', "inbox": '', "info": '', "instagram": '', "italic": '', "key": '', "layers": '', "layout": '', "life-buoy": '', "link-2": '', "link": '', "linkedin": '', "list": '', "loader": '', "lock": '', "log-in": '', "log-out": '', "mail": '', "map-pin": '', "map": '', "maximize-2": '', "maximize": '', "meh": '', "menu": '', "message-circle": '', "message-square": '', "mic-off": '', "mic": '', "minimize-2": '', "minimize": '', "minus-circle": '', "minus-square": '', "minus": '', "monitor": '', "moon": '', "more-horizontal": '', "more-vertical": '', "mouse-pointer": '', "move": '', "music": '', "navigation-2": '', "navigation": '', "octagon": '', "package": '', "paperclip": '', "pause-circle": '', "pause": '', "pen-tool": '', "percent": '', "phone-call": '', "phone-forwarded": '', "phone-incoming": '', "phone-missed": '', "phone-off": '', "phone-outgoing": '', "phone": '', "pie-chart": '', "play-circle": '', "play": '', "plus-circle": '', "plus-square": '', "plus": '', "pocket": '', "power": '', "printer": '', "radio": '', "refresh-ccw": '', "refresh-cw": '', "repeat": '', "rewind": '', "rotate-ccw": '', "rotate-cw": '', "rss": '', "save": '', "scissors": '', "search": '', "send": '', "server": '', "settings": '', "share-2": '', "share": '', "shield-off": '', "shield": '', "shopping-bag": '', "shopping-cart": '', "shuffle": '', "sidebar": '', "skip-back": '', "skip-forward": '', "slack": '', "slash": '', "sliders": '', "smartphone": '', "smile": '', "speaker": '', "square": '', "star": '', "stop-circle": '', "sun": '', "sunrise": '', "sunset": '', "table": '', "tablet": '', "tag": '', "target": '', "terminal": '', "thermometer": '', "thumbs-down": '', "thumbs-up": '', "toggle-left": '', "toggle-right": '', "tool": '', "trash-2": '', "trash": '', "trello": '', "trending-down": '', "trending-up": '', "triangle": '', "truck": '', "tv": '', "twitch": '', "twitter": '', "type": '', "umbrella": '', "underline": '', "unlock": '', "upload-cloud": '', "upload": '', "user-check": '', "user-minus": '', "user-plus": '', "user-x": '', "user": '', "users": '', "video-off": '', "video": '', "voicemail": '', "volume-1": '', "volume-2": '', "volume-x": '', "volume": '', "watch": '', "wifi-off": '', "wifi": '', "wind": '', "x-circle": '', "x-octagon": '', "x-square": '', "x": '', "youtube": '', "zap-off": '', "zap": '', "zoom-in": '', "zoom-out": '' }; + module3.exports = { "activity": '', "airplay": '', "alert-circle": '', "alert-octagon": '', "alert-triangle": '', "align-center": '', "align-justify": '', "align-left": '', "align-right": '', "anchor": '', "aperture": '', "archive": '', "arrow-down-circle": '', "arrow-down-left": '', "arrow-down-right": '', "arrow-down": '', "arrow-left-circle": '', "arrow-left": '', "arrow-right-circle": '', "arrow-right": '', "arrow-up-circle": '', "arrow-up-left": '', "arrow-up-right": '', "arrow-up": '', "at-sign": '', "award": '', "bar-chart-2": '', "bar-chart": '', "battery-charging": '', "battery": '', "bell-off": '', "bell": '', "bluetooth": '', "bold": '', "book-open": '', "book": '', "bookmark": '', "box": '', "briefcase": '', "calendar": '', "camera-off": '', "camera": '', "cast": '', "check-circle": '', "check-square": '', "check": '', "chevron-down": '', "chevron-left": '', "chevron-right": '', "chevron-up": '', "chevrons-down": '', "chevrons-left": '', "chevrons-right": '', "chevrons-up": '', "chrome": '', "circle": '', "clipboard": '', "clock": '', "cloud-drizzle": '', "cloud-lightning": '', "cloud-off": '', "cloud-rain": '', "cloud-snow": '', "cloud": '', "code": '', "codepen": '', "codesandbox": '', "coffee": '', "columns": '', "command": '', "compass": '', "copy": '', "corner-down-left": '', "corner-down-right": '', "corner-left-down": '', "corner-left-up": '', "corner-right-down": '', "corner-right-up": '', "corner-up-left": '', "corner-up-right": '', "cpu": '', "credit-card": '', "crop": '', "crosshair": '', "database": '', "delete": '', "disc": '', "divide-circle": '', "divide-square": '', "divide": '', "dollar-sign": '', "download-cloud": '', "download": '', "dribbble": '', "droplet": '', "edit-2": '', "edit-3": '', "edit": '', "external-link": '', "eye-off": '', "eye": '', "facebook": '', "fast-forward": '', "feather": '', "figma": '', "file-minus": '', "file-plus": '', "file-text": '', "file": '', "film": '', "filter": '', "flag": '', "folder-minus": '', "folder-plus": '', "folder": '', "framer": '', "frown": '', "gift": '', "git-branch": '', "git-commit": '', "git-merge": '', "git-pull-request": '', "github": '', "gitlab": '', "globe": '', "grid": '', "hard-drive": '', "hash": '', "headphones": '', "heart": '', "help-circle": '', "hexagon": '', "home": '', "image": '', "inbox": '', "info": '', "instagram": '', "italic": '', "key": '', "layers": '', "layout": '', "life-buoy": '', "link-2": '', "link": '', "linkedin": '', "list": '', "loader": '', "lock": '', "log-in": '', "log-out": '', "mail": '', "map-pin": '', "map": '', "maximize-2": '', "maximize": '', "meh": '', "menu": '', "message-circle": '', "message-square": '', "mic-off": '', "mic": '', "minimize-2": '', "minimize": '', "minus-circle": '', "minus-square": '', "minus": '', "monitor": '', "moon": '', "more-horizontal": '', "more-vertical": '', "mouse-pointer": '', "move": '', "music": '', "navigation-2": '', "navigation": '', "octagon": '', "package": '', "paperclip": '', "pause-circle": '', "pause": '', "pen-tool": '', "percent": '', "phone-call": '', "phone-forwarded": '', "phone-incoming": '', "phone-missed": '', "phone-off": '', "phone-outgoing": '', "phone": '', "pie-chart": '', "play-circle": '', "play": '', "plus-circle": '', "plus-square": '', "plus": '', "pocket": '', "power": '', "printer": '', "radio": '', "refresh-ccw": '', "refresh-cw": '', "repeat": '', "rewind": '', "rotate-ccw": '', "rotate-cw": '', "rss": '', "save": '', "scissors": '', "search": '', "send": '', "server": '', "settings": '', "share-2": '', "share": '', "shield-off": '', "shield": '', "shopping-bag": '', "shopping-cart": '', "shuffle": '', "sidebar": '', "skip-back": '', "skip-forward": '', "slack": '', "slash": '', "sliders": '', "smartphone": '', "smile": '', "speaker": '', "square": '', "star": '', "stop-circle": '', "sun": '', "sunrise": '', "sunset": '', "table": '', "tablet": '', "tag": '', "target": '', "terminal": '', "thermometer": '', "thumbs-down": '', "thumbs-up": '', "toggle-left": '', "toggle-right": '', "tool": '', "trash-2": '', "trash": '', "trello": '', "trending-down": '', "trending-up": '', "triangle": '', "truck": '', "tv": '', "twitch": '', "twitter": '', "type": '', "umbrella": '', "underline": '', "unlock": '', "upload-cloud": '', "upload": '', "user-check": '', "user-minus": '', "user-plus": '', "user-x": '', "user": '', "users": '', "video-off": '', "video": '', "voicemail": '', "volume-1": '', "volume-2": '', "volume-x": '', "volume": '', "watch": '', "wifi-off": '', "wifi": '', "wind": '', "x-circle": '', "x-octagon": '', "x-square": '', "x": '', "youtube": '', "zap-off": '', "zap": '', "zoom-in": '', "zoom-out": '' }; } ), /***/ @@ -13369,12 +13382,12 @@ var require_feather = __commonJS({ /*! no static exports found */ /***/ function(module3, exports3, __webpack_require__) { - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); module3.exports = function(it) { - if (!isObject(it)) { + if (!isObject2(it)) { throw TypeError(String(it) + " is not an object"); } return it; @@ -13970,12 +13983,12 @@ var require_feather = __commonJS({ /*! ../internals/global */ "./node_modules/core-js/internals/global.js" ); - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); var document2 = global2.document; - var exist = isObject(document2) && isObject(document2.createElement); + var exist = isObject2(document2) && isObject2(document2.createElement); module3.exports = function(it) { return exist ? document2.createElement(it) : {}; }; @@ -14289,7 +14302,7 @@ var require_feather = __commonJS({ /*! ../internals/global */ "./node_modules/core-js/internals/global.js" ); - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); @@ -14317,7 +14330,7 @@ var require_feather = __commonJS({ var getterFor = function(TYPE) { return function(it) { var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { + if (!isObject2(it) || (state = get(it)).type !== TYPE) { throw TypeError("Incompatible receiver, " + TYPE + " required"); } return state; @@ -15287,19 +15300,19 @@ var require_feather = __commonJS({ /*! no static exports found */ /***/ function(module3, exports3, __webpack_require__) { - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); module3.exports = function(it, S) { - if (!isObject(it)) + if (!isObject2(it)) return it; var fn, val; - if (S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it))) + if (S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == "function" && !isObject(val = fn.call(it))) + if (typeof (fn = it.valueOf) == "function" && !isObject2(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it))) + if (!S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; @@ -15328,7 +15341,7 @@ var require_feather = __commonJS({ /*! no static exports found */ /***/ function(module3, exports3, __webpack_require__) { - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); @@ -15338,7 +15351,7 @@ var require_feather = __commonJS({ ); module3.exports = function(O, proto) { anObject(O); - if (!isObject(proto) && proto !== null) { + if (!isObject2(proto) && proto !== null) { throw TypeError("Can't set " + String(proto) + " as a prototype"); } }; @@ -15716,10 +15729,10 @@ var require_feather = __commonJS({ /*!***********************!*\ !*** ./src/tags.json ***! \***********************/ - /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-bouy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ + /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-buoy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ /***/ function(module3) { - module3.exports = { "activity": ["pulse", "health", "action", "motion"], "airplay": ["stream", "cast", "mirroring"], "alert-circle": ["warning", "alert", "danger"], "alert-octagon": ["warning", "alert", "danger"], "alert-triangle": ["warning", "alert", "danger"], "align-center": ["text alignment", "center"], "align-justify": ["text alignment", "justified"], "align-left": ["text alignment", "left"], "align-right": ["text alignment", "right"], "anchor": [], "archive": ["index", "box"], "at-sign": ["mention", "at", "email", "message"], "award": ["achievement", "badge"], "aperture": ["camera", "photo"], "bar-chart": ["statistics", "diagram", "graph"], "bar-chart-2": ["statistics", "diagram", "graph"], "battery": ["power", "electricity"], "battery-charging": ["power", "electricity"], "bell": ["alarm", "notification", "sound"], "bell-off": ["alarm", "notification", "silent"], "bluetooth": ["wireless"], "book-open": ["read", "library"], "book": ["read", "dictionary", "booklet", "magazine", "library"], "bookmark": ["read", "clip", "marker", "tag"], "box": ["cube"], "briefcase": ["work", "bag", "baggage", "folder"], "calendar": ["date"], "camera": ["photo"], "cast": ["chromecast", "airplay"], "chevron-down": ["expand"], "chevron-up": ["collapse"], "circle": ["off", "zero", "record"], "clipboard": ["copy"], "clock": ["time", "watch", "alarm"], "cloud-drizzle": ["weather", "shower"], "cloud-lightning": ["weather", "bolt"], "cloud-rain": ["weather"], "cloud-snow": ["weather", "blizzard"], "cloud": ["weather"], "codepen": ["logo"], "codesandbox": ["logo"], "code": ["source", "programming"], "coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"], "columns": ["layout"], "command": ["keyboard", "cmd", "terminal", "prompt"], "compass": ["navigation", "safari", "travel", "direction"], "copy": ["clone", "duplicate"], "corner-down-left": ["arrow", "return"], "corner-down-right": ["arrow"], "corner-left-down": ["arrow"], "corner-left-up": ["arrow"], "corner-right-down": ["arrow"], "corner-right-up": ["arrow"], "corner-up-left": ["arrow"], "corner-up-right": ["arrow"], "cpu": ["processor", "technology"], "credit-card": ["purchase", "payment", "cc"], "crop": ["photo", "image"], "crosshair": ["aim", "target"], "database": ["storage", "memory"], "delete": ["remove"], "disc": ["album", "cd", "dvd", "music"], "dollar-sign": ["currency", "money", "payment"], "droplet": ["water"], "edit": ["pencil", "change"], "edit-2": ["pencil", "change"], "edit-3": ["pencil", "change"], "eye": ["view", "watch"], "eye-off": ["view", "watch", "hide", "hidden"], "external-link": ["outbound"], "facebook": ["logo", "social"], "fast-forward": ["music"], "figma": ["logo", "design", "tool"], "file-minus": ["delete", "remove", "erase"], "file-plus": ["add", "create", "new"], "file-text": ["data", "txt", "pdf"], "film": ["movie", "video"], "filter": ["funnel", "hopper"], "flag": ["report"], "folder-minus": ["directory"], "folder-plus": ["directory"], "folder": ["directory"], "framer": ["logo", "design", "tool"], "frown": ["emoji", "face", "bad", "sad", "emotion"], "gift": ["present", "box", "birthday", "party"], "git-branch": ["code", "version control"], "git-commit": ["code", "version control"], "git-merge": ["code", "version control"], "git-pull-request": ["code", "version control"], "github": ["logo", "version control"], "gitlab": ["logo", "version control"], "globe": ["world", "browser", "language", "translate"], "hard-drive": ["computer", "server", "memory", "data"], "hash": ["hashtag", "number", "pound"], "headphones": ["music", "audio", "sound"], "heart": ["like", "love", "emotion"], "help-circle": ["question mark"], "hexagon": ["shape", "node.js", "logo"], "home": ["house", "living"], "image": ["picture"], "inbox": ["email"], "instagram": ["logo", "camera"], "key": ["password", "login", "authentication", "secure"], "layers": ["stack"], "layout": ["window", "webpage"], "life-bouy": ["help", "life ring", "support"], "link": ["chain", "url"], "link-2": ["chain", "url"], "linkedin": ["logo", "social media"], "list": ["options"], "lock": ["security", "password", "secure"], "log-in": ["sign in", "arrow", "enter"], "log-out": ["sign out", "arrow", "exit"], "mail": ["email", "message"], "map-pin": ["location", "navigation", "travel", "marker"], "map": ["location", "navigation", "travel"], "maximize": ["fullscreen"], "maximize-2": ["fullscreen", "arrows", "expand"], "meh": ["emoji", "face", "neutral", "emotion"], "menu": ["bars", "navigation", "hamburger"], "message-circle": ["comment", "chat"], "message-square": ["comment", "chat"], "mic-off": ["record", "sound", "mute"], "mic": ["record", "sound", "listen"], "minimize": ["exit fullscreen", "close"], "minimize-2": ["exit fullscreen", "arrows", "close"], "minus": ["subtract"], "monitor": ["tv", "screen", "display"], "moon": ["dark", "night"], "more-horizontal": ["ellipsis"], "more-vertical": ["ellipsis"], "mouse-pointer": ["arrow", "cursor"], "move": ["arrows"], "music": ["note"], "navigation": ["location", "travel"], "navigation-2": ["location", "travel"], "octagon": ["stop"], "package": ["box", "container"], "paperclip": ["attachment"], "pause": ["music", "stop"], "pause-circle": ["music", "audio", "stop"], "pen-tool": ["vector", "drawing"], "percent": ["discount"], "phone-call": ["ring"], "phone-forwarded": ["call"], "phone-incoming": ["call"], "phone-missed": ["call"], "phone-off": ["call", "mute"], "phone-outgoing": ["call"], "phone": ["call"], "play": ["music", "start"], "pie-chart": ["statistics", "diagram"], "play-circle": ["music", "start"], "plus": ["add", "new"], "plus-circle": ["add", "new"], "plus-square": ["add", "new"], "pocket": ["logo", "save"], "power": ["on", "off"], "printer": ["fax", "office", "device"], "radio": ["signal"], "refresh-cw": ["synchronise", "arrows"], "refresh-ccw": ["arrows"], "repeat": ["loop", "arrows"], "rewind": ["music"], "rotate-ccw": ["arrow"], "rotate-cw": ["arrow"], "rss": ["feed", "subscribe"], "save": ["floppy disk"], "scissors": ["cut"], "search": ["find", "magnifier", "magnifying glass"], "send": ["message", "mail", "email", "paper airplane", "paper aeroplane"], "settings": ["cog", "edit", "gear", "preferences"], "share-2": ["network", "connections"], "shield": ["security", "secure"], "shield-off": ["security", "insecure"], "shopping-bag": ["ecommerce", "cart", "purchase", "store"], "shopping-cart": ["ecommerce", "cart", "purchase", "store"], "shuffle": ["music"], "skip-back": ["music"], "skip-forward": ["music"], "slack": ["logo"], "slash": ["ban", "no"], "sliders": ["settings", "controls"], "smartphone": ["cellphone", "device"], "smile": ["emoji", "face", "happy", "good", "emotion"], "speaker": ["audio", "music"], "star": ["bookmark", "favorite", "like"], "stop-circle": ["media", "music"], "sun": ["brightness", "weather", "light"], "sunrise": ["weather", "time", "morning", "day"], "sunset": ["weather", "time", "evening", "night"], "tablet": ["device"], "tag": ["label"], "target": ["logo", "bullseye"], "terminal": ["code", "command line", "prompt"], "thermometer": ["temperature", "celsius", "fahrenheit", "weather"], "thumbs-down": ["dislike", "bad", "emotion"], "thumbs-up": ["like", "good", "emotion"], "toggle-left": ["on", "off", "switch"], "toggle-right": ["on", "off", "switch"], "tool": ["settings", "spanner"], "trash": ["garbage", "delete", "remove", "bin"], "trash-2": ["garbage", "delete", "remove", "bin"], "triangle": ["delta"], "truck": ["delivery", "van", "shipping", "transport", "lorry"], "tv": ["television", "stream"], "twitch": ["logo"], "twitter": ["logo", "social"], "type": ["text"], "umbrella": ["rain", "weather"], "unlock": ["security"], "user-check": ["followed", "subscribed"], "user-minus": ["delete", "remove", "unfollow", "unsubscribe"], "user-plus": ["new", "add", "create", "follow", "subscribe"], "user-x": ["delete", "remove", "unfollow", "unsubscribe", "unavailable"], "user": ["person", "account"], "users": ["group"], "video-off": ["camera", "movie", "film"], "video": ["camera", "movie", "film"], "voicemail": ["phone"], "volume": ["music", "sound", "mute"], "volume-1": ["music", "sound"], "volume-2": ["music", "sound"], "volume-x": ["music", "sound", "mute"], "watch": ["clock", "time"], "wifi-off": ["disabled"], "wifi": ["connection", "signal", "wireless"], "wind": ["weather", "air"], "x-circle": ["cancel", "close", "delete", "remove", "times", "clear"], "x-octagon": ["delete", "stop", "alert", "warning", "times", "clear"], "x-square": ["cancel", "close", "delete", "remove", "times", "clear"], "x": ["cancel", "close", "delete", "remove", "times", "clear"], "youtube": ["logo", "video", "play"], "zap-off": ["flash", "camera", "lightning"], "zap": ["flash", "camera", "lightning"], "zoom-in": ["magnifying glass"], "zoom-out": ["magnifying glass"] }; + module3.exports = { "activity": ["pulse", "health", "action", "motion"], "airplay": ["stream", "cast", "mirroring"], "alert-circle": ["warning", "alert", "danger"], "alert-octagon": ["warning", "alert", "danger"], "alert-triangle": ["warning", "alert", "danger"], "align-center": ["text alignment", "center"], "align-justify": ["text alignment", "justified"], "align-left": ["text alignment", "left"], "align-right": ["text alignment", "right"], "anchor": [], "archive": ["index", "box"], "at-sign": ["mention", "at", "email", "message"], "award": ["achievement", "badge"], "aperture": ["camera", "photo"], "bar-chart": ["statistics", "diagram", "graph"], "bar-chart-2": ["statistics", "diagram", "graph"], "battery": ["power", "electricity"], "battery-charging": ["power", "electricity"], "bell": ["alarm", "notification", "sound"], "bell-off": ["alarm", "notification", "silent"], "bluetooth": ["wireless"], "book-open": ["read", "library"], "book": ["read", "dictionary", "booklet", "magazine", "library"], "bookmark": ["read", "clip", "marker", "tag"], "box": ["cube"], "briefcase": ["work", "bag", "baggage", "folder"], "calendar": ["date"], "camera": ["photo"], "cast": ["chromecast", "airplay"], "chevron-down": ["expand"], "chevron-up": ["collapse"], "circle": ["off", "zero", "record"], "clipboard": ["copy"], "clock": ["time", "watch", "alarm"], "cloud-drizzle": ["weather", "shower"], "cloud-lightning": ["weather", "bolt"], "cloud-rain": ["weather"], "cloud-snow": ["weather", "blizzard"], "cloud": ["weather"], "codepen": ["logo"], "codesandbox": ["logo"], "code": ["source", "programming"], "coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"], "columns": ["layout"], "command": ["keyboard", "cmd", "terminal", "prompt"], "compass": ["navigation", "safari", "travel", "direction"], "copy": ["clone", "duplicate"], "corner-down-left": ["arrow", "return"], "corner-down-right": ["arrow"], "corner-left-down": ["arrow"], "corner-left-up": ["arrow"], "corner-right-down": ["arrow"], "corner-right-up": ["arrow"], "corner-up-left": ["arrow"], "corner-up-right": ["arrow"], "cpu": ["processor", "technology"], "credit-card": ["purchase", "payment", "cc"], "crop": ["photo", "image"], "crosshair": ["aim", "target"], "database": ["storage", "memory"], "delete": ["remove"], "disc": ["album", "cd", "dvd", "music"], "dollar-sign": ["currency", "money", "payment"], "droplet": ["water"], "edit": ["pencil", "change"], "edit-2": ["pencil", "change"], "edit-3": ["pencil", "change"], "eye": ["view", "watch"], "eye-off": ["view", "watch", "hide", "hidden"], "external-link": ["outbound"], "facebook": ["logo", "social"], "fast-forward": ["music"], "figma": ["logo", "design", "tool"], "file-minus": ["delete", "remove", "erase"], "file-plus": ["add", "create", "new"], "file-text": ["data", "txt", "pdf"], "film": ["movie", "video"], "filter": ["funnel", "hopper"], "flag": ["report"], "folder-minus": ["directory"], "folder-plus": ["directory"], "folder": ["directory"], "framer": ["logo", "design", "tool"], "frown": ["emoji", "face", "bad", "sad", "emotion"], "gift": ["present", "box", "birthday", "party"], "git-branch": ["code", "version control"], "git-commit": ["code", "version control"], "git-merge": ["code", "version control"], "git-pull-request": ["code", "version control"], "github": ["logo", "version control"], "gitlab": ["logo", "version control"], "globe": ["world", "browser", "language", "translate"], "hard-drive": ["computer", "server", "memory", "data"], "hash": ["hashtag", "number", "pound"], "headphones": ["music", "audio", "sound"], "heart": ["like", "love", "emotion"], "help-circle": ["question mark"], "hexagon": ["shape", "node.js", "logo"], "home": ["house", "living"], "image": ["picture"], "inbox": ["email"], "instagram": ["logo", "camera"], "key": ["password", "login", "authentication", "secure"], "layers": ["stack"], "layout": ["window", "webpage"], "life-buoy": ["help", "life ring", "support"], "link": ["chain", "url"], "link-2": ["chain", "url"], "linkedin": ["logo", "social media"], "list": ["options"], "lock": ["security", "password", "secure"], "log-in": ["sign in", "arrow", "enter"], "log-out": ["sign out", "arrow", "exit"], "mail": ["email", "message"], "map-pin": ["location", "navigation", "travel", "marker"], "map": ["location", "navigation", "travel"], "maximize": ["fullscreen"], "maximize-2": ["fullscreen", "arrows", "expand"], "meh": ["emoji", "face", "neutral", "emotion"], "menu": ["bars", "navigation", "hamburger"], "message-circle": ["comment", "chat"], "message-square": ["comment", "chat"], "mic-off": ["record", "sound", "mute"], "mic": ["record", "sound", "listen"], "minimize": ["exit fullscreen", "close"], "minimize-2": ["exit fullscreen", "arrows", "close"], "minus": ["subtract"], "monitor": ["tv", "screen", "display"], "moon": ["dark", "night"], "more-horizontal": ["ellipsis"], "more-vertical": ["ellipsis"], "mouse-pointer": ["arrow", "cursor"], "move": ["arrows"], "music": ["note"], "navigation": ["location", "travel"], "navigation-2": ["location", "travel"], "octagon": ["stop"], "package": ["box", "container"], "paperclip": ["attachment"], "pause": ["music", "stop"], "pause-circle": ["music", "audio", "stop"], "pen-tool": ["vector", "drawing"], "percent": ["discount"], "phone-call": ["ring"], "phone-forwarded": ["call"], "phone-incoming": ["call"], "phone-missed": ["call"], "phone-off": ["call", "mute"], "phone-outgoing": ["call"], "phone": ["call"], "play": ["music", "start"], "pie-chart": ["statistics", "diagram"], "play-circle": ["music", "start"], "plus": ["add", "new"], "plus-circle": ["add", "new"], "plus-square": ["add", "new"], "pocket": ["logo", "save"], "power": ["on", "off"], "printer": ["fax", "office", "device"], "radio": ["signal"], "refresh-cw": ["synchronise", "arrows"], "refresh-ccw": ["arrows"], "repeat": ["loop", "arrows"], "rewind": ["music"], "rotate-ccw": ["arrow"], "rotate-cw": ["arrow"], "rss": ["feed", "subscribe"], "save": ["floppy disk"], "scissors": ["cut"], "search": ["find", "magnifier", "magnifying glass"], "send": ["message", "mail", "email", "paper airplane", "paper aeroplane"], "settings": ["cog", "edit", "gear", "preferences"], "share-2": ["network", "connections"], "shield": ["security", "secure"], "shield-off": ["security", "insecure"], "shopping-bag": ["ecommerce", "cart", "purchase", "store"], "shopping-cart": ["ecommerce", "cart", "purchase", "store"], "shuffle": ["music"], "skip-back": ["music"], "skip-forward": ["music"], "slack": ["logo"], "slash": ["ban", "no"], "sliders": ["settings", "controls"], "smartphone": ["cellphone", "device"], "smile": ["emoji", "face", "happy", "good", "emotion"], "speaker": ["audio", "music"], "star": ["bookmark", "favorite", "like"], "stop-circle": ["media", "music"], "sun": ["brightness", "weather", "light"], "sunrise": ["weather", "time", "morning", "day"], "sunset": ["weather", "time", "evening", "night"], "tablet": ["device"], "tag": ["label"], "target": ["logo", "bullseye"], "terminal": ["code", "command line", "prompt"], "thermometer": ["temperature", "celsius", "fahrenheit", "weather"], "thumbs-down": ["dislike", "bad", "emotion"], "thumbs-up": ["like", "good", "emotion"], "toggle-left": ["on", "off", "switch"], "toggle-right": ["on", "off", "switch"], "tool": ["settings", "spanner"], "trash": ["garbage", "delete", "remove", "bin"], "trash-2": ["garbage", "delete", "remove", "bin"], "triangle": ["delta"], "truck": ["delivery", "van", "shipping", "transport", "lorry"], "tv": ["television", "stream"], "twitch": ["logo"], "twitter": ["logo", "social"], "type": ["text"], "umbrella": ["rain", "weather"], "unlock": ["security"], "user-check": ["followed", "subscribed"], "user-minus": ["delete", "remove", "unfollow", "unsubscribe"], "user-plus": ["new", "add", "create", "follow", "subscribe"], "user-x": ["delete", "remove", "unfollow", "unsubscribe", "unavailable"], "user": ["person", "account"], "users": ["group"], "video-off": ["camera", "movie", "film"], "video": ["camera", "movie", "film"], "voicemail": ["phone"], "volume": ["music", "sound", "mute"], "volume-1": ["music", "sound"], "volume-2": ["music", "sound"], "volume-x": ["music", "sound", "mute"], "watch": ["clock", "time"], "wifi-off": ["disabled"], "wifi": ["connection", "signal", "wireless"], "wind": ["weather", "air"], "x-circle": ["cancel", "close", "delete", "remove", "times", "clear"], "x-octagon": ["delete", "stop", "alert", "warning", "times", "clear"], "x-square": ["cancel", "close", "delete", "remove", "times", "clear"], "x": ["cancel", "close", "delete", "remove", "times", "clear"], "youtube": ["logo", "video", "play"], "zap-off": ["flash", "camera", "lightning"], "zap": ["flash", "camera", "lightning"], "zoom-in": ["magnifying glass"], "zoom-out": ["magnifying glass"] }; } ), /***/ @@ -15789,7 +15802,7 @@ __export(main_exports, { module.exports = __toCommonJS(main_exports); init_polyfill_buffer(); -// node_modules/.pnpm/isomorphic-git@1.23.0/node_modules/isomorphic-git/index.js +// node_modules/.pnpm/isomorphic-git@1.24.5/node_modules/isomorphic-git/index.js init_polyfill_buffer(); var import_async_lock = __toESM(require_async_lock(), 1); var import_sha1 = __toESM(require_sha1(), 1); @@ -15799,7 +15812,7 @@ var import_pify = __toESM(require_pify(), 1); var import_ignore = __toESM(require_ignore(), 1); var import_clean_git_ref = __toESM(require_lib2(), 1); var import_diff3 = __toESM(require_diff3(), 1); -var BaseError = class extends Error { +var BaseError = class _BaseError extends Error { constructor(message) { super(message); this.caller = ""; @@ -15814,7 +15827,7 @@ var BaseError = class extends Error { }; } fromJSON(json) { - const e = new BaseError(json.message); + const e = new _BaseError(json.message); e.code = json.code; e.data = json.data; e.caller = json.caller; @@ -15825,7 +15838,7 @@ var BaseError = class extends Error { return true; } }; -var UnmergedPathsError = class extends BaseError { +var UnmergedPathsError = class _UnmergedPathsError extends BaseError { /** * @param {Array} filepaths */ @@ -15833,12 +15846,12 @@ var UnmergedPathsError = class extends BaseError { super( `Modifying the index is not possible because you have unmerged files: ${filepaths.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.` ); - this.code = this.name = UnmergedPathsError.code; + this.code = this.name = _UnmergedPathsError.code; this.data = { filepaths }; } }; UnmergedPathsError.code = "UnmergedPathsError"; -var InternalError = class extends BaseError { +var InternalError = class _InternalError extends BaseError { /** * @param {string} message */ @@ -15846,18 +15859,18 @@ var InternalError = class extends BaseError { super( `An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}` ); - this.code = this.name = InternalError.code; + this.code = this.name = _InternalError.code; this.data = { message }; } }; InternalError.code = "InternalError"; -var UnsafeFilepathError = class extends BaseError { +var UnsafeFilepathError = class _UnsafeFilepathError extends BaseError { /** * @param {string} filepath */ constructor(filepath) { super(`The filepath "${filepath}" contains unsafe character sequences`); - this.code = this.name = UnsafeFilepathError.code; + this.code = this.name = _UnsafeFilepathError.code; this.data = { filepath }; } }; @@ -16034,7 +16047,7 @@ function renderCacheEntryFlags(entry) { flags.nameLength = Math.min(Buffer.from(entry.path).length, 4095); return (flags.assumeValid ? 32768 : 0) + (flags.extended ? 16384 : 0) + ((flags.stage & 3) << 12) + (flags.nameLength & 4095); } -var GitIndex = class { +var GitIndex = class _GitIndex { /*:: _entries: Map _dirty: boolean // Used to determine if index needs to be saved to filesystem @@ -16061,14 +16074,23 @@ var GitIndex = class { } static async from(buffer2) { if (Buffer.isBuffer(buffer2)) { - return GitIndex.fromBuffer(buffer2); + return _GitIndex.fromBuffer(buffer2); } else if (buffer2 === null) { - return new GitIndex(null); + return new _GitIndex(null); } else { throw new InternalError("invalid type passed to GitIndex.from"); } } static async fromBuffer(buffer2) { + if (buffer2.length === 0) { + throw new InternalError("Index file is empty (.git/index)"); + } + const index2 = new _GitIndex(); + const reader = new BufferCursor(buffer2); + const magic = reader.toString("utf8", 4); + if (magic !== "DIRC") { + throw new InternalError(`Invalid dircache magic file number: ${magic}`); + } const shaComputed = await shasum(buffer2.slice(0, -20)); const shaClaimed = buffer2.slice(-20).toString("hex"); if (shaClaimed !== shaComputed) { @@ -16076,12 +16098,6 @@ var GitIndex = class { `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}` ); } - const index2 = new GitIndex(); - const reader = new BufferCursor(buffer2); - const magic = reader.toString("utf8", 4); - if (magic !== "DIRC") { - throw new InternalError(`Inavlid dircache magic file number: ${magic}`); - } const version2 = reader.readUInt32BE(); if (version2 !== 2) { throw new InternalError(`Unsupported dircache version: ${version2}`); @@ -16247,11 +16263,11 @@ var GitIndex = class { writer.writeUInt32BE(this.entriesFlat.length); let entryBuffers = []; for (const entry of this.entries) { - entryBuffers.push(GitIndex._entryToBuffer(entry)); + entryBuffers.push(_GitIndex._entryToBuffer(entry)); if (entry.stages.length > 1) { for (const stage of entry.stages) { if (stage && stage !== entry) { - entryBuffers.push(GitIndex._entryToBuffer(stage)); + entryBuffers.push(_GitIndex._entryToBuffer(stage)); } } } @@ -16506,18 +16522,18 @@ function STAGE() { Object.freeze(o); return o; } -var NotFoundError = class extends BaseError { +var NotFoundError = class _NotFoundError extends BaseError { /** * @param {string} what */ constructor(what) { super(`Could not find ${what}.`); - this.code = this.name = NotFoundError.code; + this.code = this.name = _NotFoundError.code; this.data = { what }; } }; NotFoundError.code = "NotFoundError"; -var ObjectTypeError = class extends BaseError { +var ObjectTypeError = class _ObjectTypeError extends BaseError { /** * @param {string} oid * @param {'blob'|'commit'|'tag'|'tree'} actual @@ -16528,23 +16544,23 @@ var ObjectTypeError = class extends BaseError { super( `Object ${oid} ${filepath ? `at ${filepath}` : ""}was anticipated to be a ${expected} but it is a ${actual}.` ); - this.code = this.name = ObjectTypeError.code; + this.code = this.name = _ObjectTypeError.code; this.data = { oid, actual, expected, filepath }; } }; ObjectTypeError.code = "ObjectTypeError"; -var InvalidOidError = class extends BaseError { +var InvalidOidError = class _InvalidOidError extends BaseError { /** * @param {string} value */ constructor(value) { super(`Expected a 40-char hex object id but saw "${value}".`); - this.code = this.name = InvalidOidError.code; + this.code = this.name = _InvalidOidError.code; this.data = { value }; } }; InvalidOidError.code = "InvalidOidError"; -var NoRefspecError = class extends BaseError { +var NoRefspecError = class _NoRefspecError extends BaseError { /** * @param {string} remote */ @@ -16553,12 +16569,12 @@ var NoRefspecError = class extends BaseError { [remote "${remote}"] fetch = +refs/heads/*:refs/remotes/origin/* `); - this.code = this.name = NoRefspecError.code; + this.code = this.name = _NoRefspecError.code; this.data = { remote }; } }; NoRefspecError.code = "NoRefspecError"; -var GitPackedRefs = class { +var GitPackedRefs = class _GitPackedRefs { constructor(text2) { this.refs = /* @__PURE__ */ new Map(); this.parsedConfig = []; @@ -16584,7 +16600,7 @@ var GitPackedRefs = class { return this; } static from(text2) { - return new GitPackedRefs(text2); + return new _GitPackedRefs(text2); } delete(ref) { this.parsedConfig = this.parsedConfig.filter((entry) => entry.ref !== ref); @@ -16594,7 +16610,7 @@ var GitPackedRefs = class { return this.parsedConfig.map(({ line }) => line).join("\n") + "\n"; } }; -var GitRefSpec = class { +var GitRefSpec = class _GitRefSpec { constructor({ remotePath, localPath, force, matchPrefix }) { Object.assign(this, { remotePath, @@ -16617,7 +16633,7 @@ var GitRefSpec = class { if (remoteIsGlob !== localIsGlob) { throw new InternalError("Invalid refspec"); } - return new GitRefSpec({ + return new _GitRefSpec({ remotePath, localPath, force, @@ -16647,7 +16663,7 @@ var GitRefSpec = class { return null; } }; -var GitRefSpecSet = class { +var GitRefSpecSet = class _GitRefSpecSet { constructor(rules = []) { this.rules = rules; } @@ -16656,7 +16672,7 @@ var GitRefSpecSet = class { for (const refspec of refspecs) { rules.push(GitRefSpec.from(refspec)); } - return new GitRefSpecSet(rules); + return new _GitRefSpecSet(rules); } add(refspec) { const rule = GitRefSpec.from(refspec); @@ -16806,7 +16822,7 @@ var findLastIndex = (array, callback) => { return callback(item) ? index2 : lastIndex; }, -1); }; -var GitConfig = class { +var GitConfig = class _GitConfig { constructor(text2) { let section = null; let subsection = null; @@ -16832,7 +16848,7 @@ var GitConfig = class { }); } static from(text2) { - return new GitConfig(text2); + return new _GitConfig(text2); } async get(path2, getall = false) { const normalizedPath = normalizePath$1(path2).path; @@ -16951,7 +16967,7 @@ var refpaths = (ref) => [ `refs/remotes/${ref}/HEAD` ]; var GIT_FILES = ["config", "description", "index", "shallow", "commondir"]; -var GitRefManager = class { +var GitRefManager = class _GitRefManager { static async updateRemoteRefs({ fs, gitdir, @@ -16979,12 +16995,12 @@ var GitRefManager = class { const refspec = GitRefSpecSet.from(refspecs); const actualRefsToWrite = /* @__PURE__ */ new Map(); if (pruneTags) { - const tags2 = await GitRefManager.listRefs({ + const tags2 = await _GitRefManager.listRefs({ fs, gitdir, filepath: "refs/tags" }); - await GitRefManager.deleteRefs({ + await _GitRefManager.deleteRefs({ fs, gitdir, refs: tags2.map((tag2) => `refs/tags/${tag2}`) @@ -16993,7 +17009,7 @@ var GitRefManager = class { if (tags) { for (const serverRef of refs.keys()) { if (serverRef.startsWith("refs/tags") && !serverRef.endsWith("^{}")) { - if (!await GitRefManager.exists({ fs, gitdir, ref: serverRef })) { + if (!await _GitRefManager.exists({ fs, gitdir, ref: serverRef })) { const oid = refs.get(serverRef); actualRefsToWrite.set(serverRef, oid); } @@ -17016,7 +17032,7 @@ var GitRefManager = class { const pruned = []; if (prune) { for (const filepath of refspec.localNamespaces()) { - const refs2 = (await GitRefManager.listRefs({ + const refs2 = (await _GitRefManager.listRefs({ fs, gitdir, filepath @@ -17028,7 +17044,7 @@ var GitRefManager = class { } } if (pruned.length > 0) { - await GitRefManager.deleteRefs({ fs, gitdir, refs: pruned }); + await _GitRefManager.deleteRefs({ fs, gitdir, refs: pruned }); } } for (const [key2, value] of actualRefsToWrite) { @@ -17050,7 +17066,7 @@ var GitRefManager = class { `, "utf8"); } static async deleteRef({ fs, gitdir, ref }) { - return GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] }); + return _GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] }); } static async deleteRefs({ fs, gitdir, refs }) { await Promise.all(refs.map((ref) => fs.rm(join(gitdir, ref)))); @@ -17085,24 +17101,24 @@ var GitRefManager = class { let sha; if (ref.startsWith("ref: ")) { ref = ref.slice("ref: ".length); - return GitRefManager.resolve({ fs, gitdir, ref, depth }); + return _GitRefManager.resolve({ fs, gitdir, ref, depth }); } if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { return ref; } - const packedMap = await GitRefManager.packedRefs({ fs, gitdir }); + const packedMap = await _GitRefManager.packedRefs({ fs, gitdir }); const allpaths = refpaths(ref).filter((p) => !GIT_FILES.includes(p)); for (const ref2 of allpaths) { sha = await fs.read(`${gitdir}/${ref2}`, { encoding: "utf8" }) || packedMap.get(ref2); if (sha) { - return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth }); + return _GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth }); } } throw new NotFoundError(ref); } static async exists({ fs, gitdir, ref }) { try { - await GitRefManager.expand({ fs, gitdir, ref }); + await _GitRefManager.expand({ fs, gitdir, ref }); return true; } catch (err) { return false; @@ -17112,7 +17128,7 @@ var GitRefManager = class { if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { return ref; } - const packedMap = await GitRefManager.packedRefs({ fs, gitdir }); + const packedMap = await _GitRefManager.packedRefs({ fs, gitdir }); const allpaths = refpaths(ref); for (const ref2 of allpaths) { if (await fs.exists(`${gitdir}/${ref2}`)) @@ -17139,7 +17155,7 @@ var GitRefManager = class { } if (ref.startsWith("ref: ")) { ref = ref.slice("ref: ".length); - return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map }); + return _GitRefManager.resolveAgainstMap({ ref, fullref, depth, map }); } if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { return { fullref, oid: ref }; @@ -17148,7 +17164,7 @@ var GitRefManager = class { for (const ref2 of allpaths) { const sha = map.get(ref2); if (sha) { - return GitRefManager.resolveAgainstMap({ + return _GitRefManager.resolveAgainstMap({ ref: sha.trim(), fullref: ref2, depth, @@ -17165,7 +17181,7 @@ var GitRefManager = class { } // List all the refs that match the `filepath` prefix static async listRefs({ fs, gitdir, filepath }) { - const packedMap = GitRefManager.packedRefs({ fs, gitdir }); + const packedMap = _GitRefManager.packedRefs({ fs, gitdir }); let files = null; try { files = await fs.readdirDeep(`${gitdir}/${filepath}`); @@ -17186,17 +17202,17 @@ var GitRefManager = class { } static async listBranches({ fs, gitdir, remote }) { if (remote) { - return GitRefManager.listRefs({ + return _GitRefManager.listRefs({ fs, gitdir, filepath: `refs/remotes/${remote}` }); } else { - return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` }); + return _GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` }); } } static async listTags({ fs, gitdir }) { - const tags = await GitRefManager.listRefs({ + const tags = await _GitRefManager.listRefs({ fs, gitdir, filepath: `refs/tags` @@ -17281,7 +17297,7 @@ function nudgeIntoShape(entry) { } return entry; } -var GitTree = class { +var GitTree = class _GitTree { constructor(entries) { if (Buffer.isBuffer(entries)) { this._entries = parseBuffer(entries); @@ -17293,7 +17309,7 @@ var GitTree = class { this._entries.sort(comparePath); } static from(tree) { - return new GitTree(tree); + return new _GitTree(tree); } render() { return this._entries.map((entry) => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`).join("\n"); @@ -17693,7 +17709,7 @@ function otherVarIntDecode(reader, startWith) { } while (byte & 128); return result; } -var GitPackIndex = class { +var GitPackIndex = class _GitPackIndex { constructor(stuff) { Object.assign(this, stuff); this.offsetCache = {}; @@ -17728,7 +17744,7 @@ var GitPackIndex = class { offsets.set(hashes[i], reader.readUInt32BE()); } const packfileSha = reader.slice(20).toString("hex"); - return new GitPackIndex({ + return new _GitPackIndex({ hashes, crcs: {}, offsets, @@ -17794,7 +17810,7 @@ var GitPackIndex = class { o.end = end; o.crc = crc; } - const p = new GitPackIndex({ + const p = new _GitPackIndex({ pack: Promise.resolve(pack), packfileSha, crcs, @@ -18076,7 +18092,7 @@ async function _readObject({ } throw new InternalError(`invalid format "${result.format}"`); } -var AlreadyExistsError = class extends BaseError { +var AlreadyExistsError = class _AlreadyExistsError extends BaseError { /** * @param {'note'|'remote'|'tag'|'branch'} noun * @param {string} where @@ -18086,12 +18102,12 @@ var AlreadyExistsError = class extends BaseError { super( `Failed to create ${noun} at ${where} because it already exists.${canForce ? ` (Hint: use 'force: true' parameter to overwrite existing ${noun}.)` : ""}` ); - this.code = this.name = AlreadyExistsError.code; + this.code = this.name = _AlreadyExistsError.code; this.data = { noun, where, canForce }; } }; AlreadyExistsError.code = "AlreadyExistsError"; -var AmbiguousError = class extends BaseError { +var AmbiguousError = class _AmbiguousError extends BaseError { /** * @param {'oids'|'refs'} nouns * @param {string} short @@ -18103,12 +18119,12 @@ var AmbiguousError = class extends BaseError { ", " )}). Use a longer abbreviation length to disambiguate them.` ); - this.code = this.name = AmbiguousError.code; + this.code = this.name = _AmbiguousError.code; this.data = { nouns, short, matches }; } }; AmbiguousError.code = "AmbiguousError"; -var CheckoutConflictError = class extends BaseError { +var CheckoutConflictError = class _CheckoutConflictError extends BaseError { /** * @param {string[]} filepaths */ @@ -18118,12 +18134,12 @@ var CheckoutConflictError = class extends BaseError { ", " )}` ); - this.code = this.name = CheckoutConflictError.code; + this.code = this.name = _CheckoutConflictError.code; this.data = { filepaths }; } }; CheckoutConflictError.code = "CheckoutConflictError"; -var CommitNotFetchedError = class extends BaseError { +var CommitNotFetchedError = class _CommitNotFetchedError extends BaseError { /** * @param {string} ref * @param {string} oid @@ -18132,40 +18148,40 @@ var CommitNotFetchedError = class extends BaseError { super( `Failed to checkout "${ref}" because commit ${oid} is not available locally. Do a git fetch to make the branch available locally.` ); - this.code = this.name = CommitNotFetchedError.code; + this.code = this.name = _CommitNotFetchedError.code; this.data = { ref, oid }; } }; CommitNotFetchedError.code = "CommitNotFetchedError"; -var EmptyServerResponseError = class extends BaseError { +var EmptyServerResponseError = class _EmptyServerResponseError extends BaseError { constructor() { super(`Empty response from git server.`); - this.code = this.name = EmptyServerResponseError.code; + this.code = this.name = _EmptyServerResponseError.code; this.data = {}; } }; EmptyServerResponseError.code = "EmptyServerResponseError"; -var FastForwardError = class extends BaseError { +var FastForwardError = class _FastForwardError extends BaseError { constructor() { super(`A simple fast-forward merge was not possible.`); - this.code = this.name = FastForwardError.code; + this.code = this.name = _FastForwardError.code; this.data = {}; } }; FastForwardError.code = "FastForwardError"; -var GitPushError = class extends BaseError { +var GitPushError = class _GitPushError extends BaseError { /** * @param {string} prettyDetails * @param {PushResult} result */ constructor(prettyDetails, result) { super(`One or more branches were not updated: ${prettyDetails}`); - this.code = this.name = GitPushError.code; + this.code = this.name = _GitPushError.code; this.data = { prettyDetails, result }; } }; GitPushError.code = "GitPushError"; -var HttpError = class extends BaseError { +var HttpError = class _HttpError extends BaseError { /** * @param {number} statusCode * @param {string} statusMessage @@ -18173,12 +18189,12 @@ var HttpError = class extends BaseError { */ constructor(statusCode, statusMessage, response) { super(`HTTP Error: ${statusCode} ${statusMessage}`); - this.code = this.name = HttpError.code; + this.code = this.name = _HttpError.code; this.data = { statusCode, statusMessage, response }; } }; HttpError.code = "HttpError"; -var InvalidFilepathError = class extends BaseError { +var InvalidFilepathError = class _InvalidFilepathError extends BaseError { /** * @param {'leading-slash'|'trailing-slash'|'directory'} [reason] */ @@ -18190,12 +18206,12 @@ var InvalidFilepathError = class extends BaseError { message = `"filepath" should not be a directory.`; } super(message); - this.code = this.name = InvalidFilepathError.code; + this.code = this.name = _InvalidFilepathError.code; this.data = { reason }; } }; InvalidFilepathError.code = "InvalidFilepathError"; -var InvalidRefNameError = class extends BaseError { +var InvalidRefNameError = class _InvalidRefNameError extends BaseError { /** * @param {string} ref * @param {string} suggestion @@ -18205,31 +18221,31 @@ var InvalidRefNameError = class extends BaseError { super( `"${ref}" would be an invalid git reference. (Hint: a valid alternative would be "${suggestion}".)` ); - this.code = this.name = InvalidRefNameError.code; + this.code = this.name = _InvalidRefNameError.code; this.data = { ref, suggestion }; } }; InvalidRefNameError.code = "InvalidRefNameError"; -var MaxDepthError = class extends BaseError { +var MaxDepthError = class _MaxDepthError extends BaseError { /** * @param {number} depth */ constructor(depth) { super(`Maximum search depth of ${depth} exceeded.`); - this.code = this.name = MaxDepthError.code; + this.code = this.name = _MaxDepthError.code; this.data = { depth }; } }; MaxDepthError.code = "MaxDepthError"; -var MergeNotSupportedError = class extends BaseError { +var MergeNotSupportedError = class _MergeNotSupportedError extends BaseError { constructor() { super(`Merges with conflicts are not supported yet.`); - this.code = this.name = MergeNotSupportedError.code; + this.code = this.name = _MergeNotSupportedError.code; this.data = {}; } }; MergeNotSupportedError.code = "MergeNotSupportedError"; -var MergeConflictError = class extends BaseError { +var MergeConflictError = class _MergeConflictError extends BaseError { /** * @param {Array} filepaths */ @@ -18237,12 +18253,12 @@ var MergeConflictError = class extends BaseError { super( `Automatic merge failed with one or more merge conflicts in the following files: ${filepaths.toString()}. Fix conflicts then commit the result.` ); - this.code = this.name = MergeConflictError.code; + this.code = this.name = _MergeConflictError.code; this.data = { filepaths }; } }; MergeConflictError.code = "MergeConflictError"; -var MissingNameError = class extends BaseError { +var MissingNameError = class _MissingNameError extends BaseError { /** * @param {'author'|'committer'|'tagger'} role */ @@ -18250,12 +18266,12 @@ var MissingNameError = class extends BaseError { super( `No name was provided for ${role} in the argument or in the .git/config file.` ); - this.code = this.name = MissingNameError.code; + this.code = this.name = _MissingNameError.code; this.data = { role }; } }; MissingNameError.code = "MissingNameError"; -var MissingParameterError = class extends BaseError { +var MissingParameterError = class _MissingParameterError extends BaseError { /** * @param {string} parameter */ @@ -18263,12 +18279,12 @@ var MissingParameterError = class extends BaseError { super( `The function requires a "${parameter}" parameter but none was provided.` ); - this.code = this.name = MissingParameterError.code; + this.code = this.name = _MissingParameterError.code; this.data = { parameter }; } }; MissingParameterError.code = "MissingParameterError"; -var MultipleGitError = class extends BaseError { +var MultipleGitError = class _MultipleGitError extends BaseError { /** * @param {Error[]} errors * @param {string} message @@ -18277,25 +18293,25 @@ var MultipleGitError = class extends BaseError { super( `There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more` ); - this.code = this.name = MultipleGitError.code; + this.code = this.name = _MultipleGitError.code; this.data = { errors }; this.errors = errors; } }; MultipleGitError.code = "MultipleGitError"; -var ParseError = class extends BaseError { +var ParseError = class _ParseError extends BaseError { /** * @param {string} expected * @param {string} actual */ constructor(expected, actual) { super(`Expected "${expected}" but received "${actual}".`); - this.code = this.name = ParseError.code; + this.code = this.name = _ParseError.code; this.data = { expected, actual }; } }; ParseError.code = "ParseError"; -var PushRejectedError = class extends BaseError { +var PushRejectedError = class _PushRejectedError extends BaseError { /** * @param {'not-fast-forward'|'tag-exists'} reason */ @@ -18307,12 +18323,12 @@ var PushRejectedError = class extends BaseError { message = " because tag already exists"; } super(`Push rejected${message}. Use "force: true" to override.`); - this.code = this.name = PushRejectedError.code; + this.code = this.name = _PushRejectedError.code; this.data = { reason }; } }; PushRejectedError.code = "PushRejectedError"; -var RemoteCapabilityError = class extends BaseError { +var RemoteCapabilityError = class _RemoteCapabilityError extends BaseError { /** * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability * @param {'depth'|'since'|'exclude'|'relative'} parameter @@ -18321,12 +18337,12 @@ var RemoteCapabilityError = class extends BaseError { super( `Remote does not support the "${capability}" so the "${parameter}" parameter cannot be used.` ); - this.code = this.name = RemoteCapabilityError.code; + this.code = this.name = _RemoteCapabilityError.code; this.data = { capability, parameter }; } }; RemoteCapabilityError.code = "RemoteCapabilityError"; -var SmartHttpError = class extends BaseError { +var SmartHttpError = class _SmartHttpError extends BaseError { /** * @param {string} preview * @param {string} response @@ -18335,12 +18351,12 @@ var SmartHttpError = class extends BaseError { super( `Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${preview}` ); - this.code = this.name = SmartHttpError.code; + this.code = this.name = _SmartHttpError.code; this.data = { preview, response }; } }; SmartHttpError.code = "SmartHttpError"; -var UnknownTransportError = class extends BaseError { +var UnknownTransportError = class _UnknownTransportError extends BaseError { /** * @param {string} url * @param {string} transport @@ -18350,31 +18366,31 @@ var UnknownTransportError = class extends BaseError { super( `Git remote "${url}" uses an unrecognized transport protocol: "${transport}"` ); - this.code = this.name = UnknownTransportError.code; + this.code = this.name = _UnknownTransportError.code; this.data = { url, transport, suggestion }; } }; UnknownTransportError.code = "UnknownTransportError"; -var UrlParseError = class extends BaseError { +var UrlParseError = class _UrlParseError extends BaseError { /** * @param {string} url */ constructor(url) { super(`Cannot parse remote URL: "${url}"`); - this.code = this.name = UrlParseError.code; + this.code = this.name = _UrlParseError.code; this.data = { url }; } }; UrlParseError.code = "UrlParseError"; -var UserCanceledError = class extends BaseError { +var UserCanceledError = class _UserCanceledError extends BaseError { constructor() { super(`The operation was canceled.`); - this.code = this.name = UserCanceledError.code; + this.code = this.name = _UserCanceledError.code; this.data = {}; } }; UserCanceledError.code = "UserCanceledError"; -var IndexResetError = class extends BaseError { +var IndexResetError = class _IndexResetError extends BaseError { /** * @param {Array} filepaths */ @@ -18382,7 +18398,7 @@ var IndexResetError = class extends BaseError { super( `Could not merge index: Entry for '${filepath}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged chages.` ); - this.code = this.name = IndexResetError.code; + this.code = this.name = _IndexResetError.code; this.data = { filepath }; } }; @@ -18469,14 +18485,14 @@ function parseTimezoneOffset(offset) { function negateExceptForZero$1(n) { return n === 0 ? n : -n; } -var GitAnnotatedTag = class { +var GitAnnotatedTag = class _GitAnnotatedTag { constructor(tag2) { if (typeof tag2 === "string") { this._tag = tag2; } else if (Buffer.isBuffer(tag2)) { this._tag = tag2.toString("utf8"); } else if (typeof tag2 === "object") { - this._tag = GitAnnotatedTag.render(tag2); + this._tag = _GitAnnotatedTag.render(tag2); } else { throw new InternalError( "invalid type passed to GitAnnotatedTag constructor" @@ -18484,7 +18500,7 @@ var GitAnnotatedTag = class { } } static from(tag2) { - return new GitAnnotatedTag(tag2); + return new _GitAnnotatedTag(tag2); } static render(obj) { return `object ${obj.object} @@ -18565,7 +18581,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`; let { signature } = await sign({ payload, secretKey }); signature = normalizeNewlines(signature); const signedTag = payload + signature; - return GitAnnotatedTag.from(signedTag); + return _GitAnnotatedTag.from(signedTag); } }; function indent(str) { @@ -18574,28 +18590,28 @@ function indent(str) { function outdent(str) { return str.split("\n").map((x) => x.replace(/^ /, "")).join("\n"); } -var GitCommit = class { +var GitCommit = class _GitCommit { constructor(commit2) { if (typeof commit2 === "string") { this._commit = commit2; } else if (Buffer.isBuffer(commit2)) { this._commit = commit2.toString("utf8"); } else if (typeof commit2 === "object") { - this._commit = GitCommit.render(commit2); + this._commit = _GitCommit.render(commit2); } else { throw new InternalError("invalid type passed to GitCommit constructor"); } } static fromPayloadSignature({ payload, signature }) { - const headers = GitCommit.justHeaders(payload); - const message = GitCommit.justMessage(payload); + const headers = _GitCommit.justHeaders(payload); + const message = _GitCommit.justMessage(payload); const commit2 = normalizeNewlines( headers + "\ngpgsig" + indent(signature) + "\n" + message ); - return new GitCommit(commit2); + return new _GitCommit(commit2); } static from(commit2) { - return new GitCommit(commit2); + return new _GitCommit(commit2); } toObject() { return Buffer.from(this._commit, "utf8"); @@ -18606,7 +18622,7 @@ var GitCommit = class { } // Todo: allow setting the headers and message message() { - return GitCommit.justMessage(this._commit); + return _GitCommit.justMessage(this._commit); } parse() { return Object.assign({ message: this.message() }, this.headers()); @@ -18618,7 +18634,7 @@ var GitCommit = class { return commit2.slice(0, commit2.indexOf("\n\n")); } parseHeaders() { - const headers = GitCommit.justHeaders(this._commit).split("\n"); + const headers = _GitCommit.justHeaders(this._commit).split("\n"); const hs = []; for (const h of headers) { if (h[0] === " ") { @@ -18677,7 +18693,7 @@ var GitCommit = class { return headers; } static render(obj) { - return GitCommit.renderHeaders(obj) + "\n" + normalizeNewlines(obj.message); + return _GitCommit.renderHeaders(obj) + "\n" + normalizeNewlines(obj.message); } render() { return this._commit; @@ -18701,12 +18717,12 @@ var GitCommit = class { } static async sign(commit2, sign, secretKey) { const payload = commit2.withoutSignature(); - const message = GitCommit.justMessage(commit2._commit); + const message = _GitCommit.justMessage(commit2._commit); let { signature } = await sign({ payload, secretKey }); signature = normalizeNewlines(signature); - const headers = GitCommit.justHeaders(commit2._commit); + const headers = _GitCommit.justHeaders(commit2._commit); const signedCommit = headers + "\ngpgsig" + indent(signature) + "\n" + message; - return GitCommit.from(signedCommit); + return _GitCommit.from(signedCommit); } }; async function resolveTree({ fs, cache, gitdir, oid }) { @@ -19106,47 +19122,72 @@ async function rmRecursive(fs, filepath) { await fs.rmdir(filepath); } } +function isPromiseLike(obj) { + return isObject(obj) && isFunction(obj.then) && isFunction(obj.catch); +} +function isObject(obj) { + return obj && typeof obj === "object"; +} +function isFunction(obj) { + return typeof obj === "function"; +} +function isPromiseFs(fs) { + const test = (targetFs) => { + try { + return targetFs.readFile().catch((e) => e); + } catch (e) { + return e; + } + }; + return isPromiseLike(test(fs)); +} +var commands = [ + "readFile", + "writeFile", + "mkdir", + "rmdir", + "unlink", + "stat", + "lstat", + "readdir", + "readlink", + "symlink" +]; +function bindFs(target, fs) { + if (isPromiseFs(fs)) { + for (const command of commands) { + target[`_${command}`] = fs[command].bind(fs); + } + } else { + for (const command of commands) { + target[`_${command}`] = (0, import_pify.default)(fs[command].bind(fs)); + } + } + if (isPromiseFs(fs)) { + if (fs.rm) + target._rm = fs.rm.bind(fs); + else if (fs.rmdir.length > 1) + target._rm = fs.rmdir.bind(fs); + else + target._rm = rmRecursive.bind(null, target); + } else { + if (fs.rm) + target._rm = (0, import_pify.default)(fs.rm.bind(fs)); + else if (fs.rmdir.length > 2) + target._rm = (0, import_pify.default)(fs.rmdir.bind(fs)); + else + target._rm = rmRecursive.bind(null, target); + } +} var FileSystem = class { constructor(fs) { if (typeof fs._original_unwrapped_fs !== "undefined") return fs; const promises = Object.getOwnPropertyDescriptor(fs, "promises"); if (promises && promises.enumerable) { - this._readFile = fs.promises.readFile.bind(fs.promises); - this._writeFile = fs.promises.writeFile.bind(fs.promises); - this._mkdir = fs.promises.mkdir.bind(fs.promises); - if (fs.promises.rm) { - this._rm = fs.promises.rm.bind(fs.promises); - } else if (fs.promises.rmdir.length > 1) { - this._rm = fs.promises.rmdir.bind(fs.promises); - } else { - this._rm = rmRecursive.bind(null, this); - } - this._rmdir = fs.promises.rmdir.bind(fs.promises); - this._unlink = fs.promises.unlink.bind(fs.promises); - this._stat = fs.promises.stat.bind(fs.promises); - this._lstat = fs.promises.lstat.bind(fs.promises); - this._readdir = fs.promises.readdir.bind(fs.promises); - this._readlink = fs.promises.readlink.bind(fs.promises); - this._symlink = fs.promises.symlink.bind(fs.promises); + bindFs(this, fs.promises); } else { - this._readFile = (0, import_pify.default)(fs.readFile.bind(fs)); - this._writeFile = (0, import_pify.default)(fs.writeFile.bind(fs)); - this._mkdir = (0, import_pify.default)(fs.mkdir.bind(fs)); - if (fs.rm) { - this._rm = (0, import_pify.default)(fs.rm.bind(fs)); - } else if (fs.rmdir.length > 2) { - this._rm = (0, import_pify.default)(fs.rmdir.bind(fs)); - } else { - this._rm = rmRecursive.bind(null, this); - } - this._rmdir = (0, import_pify.default)(fs.rmdir.bind(fs)); - this._unlink = (0, import_pify.default)(fs.unlink.bind(fs)); - this._stat = (0, import_pify.default)(fs.stat.bind(fs)); - this._lstat = (0, import_pify.default)(fs.lstat.bind(fs)); - this._readdir = (0, import_pify.default)(fs.readdir.bind(fs)); - this._readlink = (0, import_pify.default)(fs.readlink.bind(fs)); - this._symlink = (0, import_pify.default)(fs.symlink.bind(fs)); + bindFs(this, fs); } this._original_unwrapped_fs = fs; } @@ -19520,7 +19561,8 @@ async function add({ gitdir = join(dir, ".git"), filepath, cache = {}, - force = false + force = false, + parallel = true }) { try { assertParameter("fs", _fs); @@ -19529,14 +19571,30 @@ async function add({ assertParameter("filepath", filepath); const fs = new FileSystem(_fs); await GitIndexManager.acquire({ fs, gitdir, cache }, async (index2) => { - return addToIndex({ dir, gitdir, fs, filepath, index: index2, force }); + return addToIndex({ + dir, + gitdir, + fs, + filepath, + index: index2, + force, + parallel + }); }); } catch (err) { err.caller = "git.add"; throw err; } } -async function addToIndex({ dir, gitdir, fs, filepath, index: index2, force }) { +async function addToIndex({ + dir, + gitdir, + fs, + filepath, + index: index2, + force, + parallel +}) { filepath = Array.isArray(filepath) ? filepath : [filepath]; const promises = filepath.map(async (currentFilepath) => { if (!force) { @@ -19554,17 +19612,32 @@ async function addToIndex({ dir, gitdir, fs, filepath, index: index2, force }) { throw new NotFoundError(currentFilepath); if (stats.isDirectory()) { const children2 = await fs.readdir(join(dir, currentFilepath)); - const promises2 = children2.map( - (child) => addToIndex({ - dir, - gitdir, - fs, - filepath: [join(currentFilepath, child)], - index: index2, - force - }) - ); - await Promise.all(promises2); + if (parallel) { + const promises2 = children2.map( + (child) => addToIndex({ + dir, + gitdir, + fs, + filepath: [join(currentFilepath, child)], + index: index2, + force, + parallel + }) + ); + await Promise.all(promises2); + } else { + for (const child of children2) { + await addToIndex({ + dir, + gitdir, + fs, + filepath: [join(currentFilepath, child)], + index: index2, + force, + parallel + }); + } + } } else { const object = stats.isSymbolicLink() ? await fs.readlink(join(dir, currentFilepath)).then(posixifyPathBuffer) : await fs.read(join(dir, currentFilepath)); if (object === null) @@ -21101,8 +21174,8 @@ function filterCapabilities(server, client) { } var pkg = { name: "isomorphic-git", - version: "1.23.0", - agent: "git/isomorphic-git@1.23.0" + version: "1.24.5", + agent: "git/isomorphic-git@1.24.5" }; var FIFO = class { constructor() { @@ -21884,6 +21957,7 @@ async function currentBranch({ } } async function _deleteBranch({ fs, gitdir, ref }) { + ref = ref.startsWith("refs/heads/") ? ref : `refs/heads/${ref}`; const exist = await GitRefManager.exists({ fs, gitdir, ref }); if (!exist) { throw new NotFoundError(ref); @@ -22001,15 +22075,19 @@ async function expandOidPacked({ } async function _expandOid({ fs, cache, gitdir, oid: short }) { const getExternalRefDelta = (oid) => _readObject({ fs, cache, gitdir, oid }); - const results1 = await expandOidLoose({ fs, gitdir, oid: short }); - const results2 = await expandOidPacked({ + const results = await expandOidLoose({ fs, gitdir, oid: short }); + const packedOids = await expandOidPacked({ fs, cache, gitdir, oid: short, getExternalRefDelta }); - const results = results1.concat(results2); + for (const packedOid of packedOids) { + if (results.indexOf(packedOid) === -1) { + results.push(packedOid); + } + } if (results.length === 1) { return results[0]; } @@ -24547,7 +24625,13 @@ async function _renameBranch({ }); await GitRefManager.writeRef({ fs, gitdir, ref: fullnewref, value }); await GitRefManager.deleteRef({ fs, gitdir, ref: fulloldref }); - if (checkout2) { + const fullCurrentBranchRef = await _currentBranch({ + fs, + gitdir, + fullname: true + }); + const isCurrentBranch = fullCurrentBranchRef === fulloldref; + if (checkout2 || isCurrentBranch) { await GitRefManager.writeSymbolicRef({ fs, gitdir, @@ -25333,7 +25417,7 @@ var import_obsidian4 = require("obsidian"); var path = __toESM(require("path")); var import_path = require("path"); -// node_modules/.pnpm/github.com+Vinzent03+git-js@6b9a2d899bc8256e38a1d6f0b8a88116ba2bf56a_supports-color@7.2.0/node_modules/simple-git/dist/esm/index.js +// node_modules/.pnpm/github.com+Vinzent03+git-js@6b9a2d899bc8256e38a1d6f0b8a88116ba2bf56a_supports-color@9.4.0_rdkutdaeyye3o67thmklazfzta/node_modules/simple-git/dist/esm/index.js init_polyfill_buffer(); var import_file_exists = __toESM(require_dist(), 1); var import_debug = __toESM(require_browser(), 1); @@ -25348,15 +25432,15 @@ var __getOwnPropNames2 = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp2 = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp2(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; +var __defNormalProp2 = (obj, key2, value) => key2 in obj ? __defProp2(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp2.call(b, prop)) - __defNormalProp(a, prop, b[prop]); + __defNormalProp2(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); + __defNormalProp2(a, prop, b[prop]); } return a; }; @@ -25684,19 +25768,19 @@ var init_simple_git_options = __esm2({ }; } }); -function appendTaskOptions(options, commands = []) { +function appendTaskOptions(options, commands2 = []) { if (!filterPlainObject(options)) { - return commands; + return commands2; } - return Object.keys(options).reduce((commands2, key2) => { + return Object.keys(options).reduce((commands22, key2) => { const value = options[key2]; if (filterPrimitives(value, ["boolean"])) { - commands2.push(key2 + "=" + value); + commands22.push(key2 + "=" + value); } else { - commands2.push(key2); + commands22.push(key2); } - return commands2; - }, commands); + return commands22; + }, commands2); } function getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) { const command = []; @@ -25821,18 +25905,18 @@ function checkIsRepoTask(action) { case "root": return checkIsRepoRootTask(); } - const commands = ["rev-parse", "--is-inside-work-tree"]; + const commands2 = ["rev-parse", "--is-inside-work-tree"]; return { - commands, + commands: commands2, format: "utf-8", onError, parser }; } function checkIsRepoRootTask() { - const commands = ["rev-parse", "--git-dir"]; + const commands2 = ["rev-parse", "--git-dir"]; return { - commands, + commands: commands2, format: "utf-8", onError, parser(path2) { @@ -25841,9 +25925,9 @@ function checkIsRepoRootTask() { }; } function checkIsBareRepoTask() { - const commands = ["rev-parse", "--is-bare-repository"]; + const commands2 = ["rev-parse", "--is-bare-repository"]; return { - commands, + commands: commands2, format: "utf-8", onError, parser @@ -25931,18 +26015,18 @@ function configurationErrorTask(error) { } }; } -function straightThroughStringTask(commands, trimmed2 = false) { +function straightThroughStringTask(commands2, trimmed2 = false) { return { - commands, + commands: commands2, format: "utf-8", parser(text2) { return trimmed2 ? String(text2).trim() : text2; } }; } -function straightThroughBufferTask(commands) { +function straightThroughBufferTask(commands2) { return { - commands, + commands: commands2, format: "buffer", parser(buffer2) { return buffer2; @@ -25987,9 +26071,9 @@ function cleanWithOptionsTask(mode, customArgs) { return cleanTask(cleanMode, options); } function cleanTask(mode, customArgs) { - const commands = ["clean", `-${mode}`, ...customArgs]; + const commands2 = ["clean", `-${mode}`, ...customArgs]; return { - commands, + commands: commands2, format: "utf-8", parser(text2) { return cleanSummaryParser(mode === "n", text2); @@ -26150,13 +26234,13 @@ function asConfigScope(scope, fallback) { return fallback; } function addConfigTask(key2, value, append22, scope) { - const commands = ["config", `--${scope}`]; + const commands2 = ["config", `--${scope}`]; if (append22) { - commands.push("--add"); + commands2.push("--add"); } - commands.push(key2, value); + commands2.push(key2, value); return { - commands, + commands: commands2, format: "utf-8", parser(text2) { return text2; @@ -26164,12 +26248,12 @@ function addConfigTask(key2, value, append22, scope) { }; } function getConfigTask(key2, scope) { - const commands = ["config", "--null", "--show-origin", "--get-all", key2]; + const commands2 = ["config", "--null", "--show-origin", "--get-all", key2]; if (scope) { - commands.splice(1, 0, `--${scope}`); + commands2.splice(1, 0, `--${scope}`); } return { - commands, + commands: commands2, format: "utf-8", parser(text2) { return configGetParser(text2, key2); @@ -26177,12 +26261,12 @@ function getConfigTask(key2, scope) { }; } function listConfigTask(scope) { - const commands = ["config", "--list", "--show-origin", "--null"]; + const commands2 = ["config", "--list", "--show-origin", "--null"]; if (scope) { - commands.push(`--${scope}`); + commands2.push(`--${scope}`); } return { - commands, + commands: commands2, format: "utf-8", parser(text2) { return configListParser(text2); @@ -26253,9 +26337,9 @@ function grep_default() { if (typeof searchTerm === "string") { searchTerm = grepQueryBuilder().param(searchTerm); } - const commands = ["grep", "--null", "-n", "--full-name", ...options, ...searchTerm]; + const commands2 = ["grep", "--null", "-n", "--full-name", ...options, ...searchTerm]; return this._runTask({ - commands, + commands: commands2, format: "utf-8", parser(stdOut) { return parseGrep(stdOut); @@ -26301,12 +26385,12 @@ __export2(reset_exports, { resetTask: () => resetTask }); function resetTask(mode, customArgs) { - const commands = ["reset"]; + const commands2 = ["reset"]; if (isValidResetMode(mode)) { - commands.push(`--${mode}`); + commands2.push(`--${mode}`); } - commands.push(...customArgs); - return straightThroughStringTask(commands); + commands2.push(...customArgs); + return straightThroughStringTask(commands2); } function getResetMode(mode) { if (isValidResetMode(mode)) { @@ -26463,10 +26547,10 @@ var init_tasks_pending_queue = __esm2({ TasksPendingQueue.counter = 0; } }); -function pluginContext(task, commands) { +function pluginContext(task, commands2) { return { method: first(task.commands) || "", - commands + commands: commands2 }; } function onErrorReceived(target, logger) { @@ -26725,11 +26809,11 @@ var init_change_working_directory = __esm2({ } }); function checkoutTask(args) { - const commands = ["checkout", ...args]; - if (commands[1] === "-b" && commands.includes("-B")) { - commands[1] = remove2(commands, "-B"); + const commands2 = ["checkout", ...args]; + if (commands2[1] === "-b" && commands2.includes("-B")) { + commands2[1] = remove2(commands2, "-B"); } - return straightThroughStringTask(commands); + return straightThroughStringTask(commands2); } function checkout_default() { return { @@ -26803,7 +26887,7 @@ var init_parse_commit = __esm2({ } }); function commitTask(message, files, customArgs) { - const commands = [ + const commands2 = [ "-c", "core.abbrev=40", "commit", @@ -26812,7 +26896,7 @@ function commitTask(message, files, customArgs) { ...customArgs ]; return { - commands, + commands: commands2, format: "utf-8", parser: parseCommitResult }; @@ -26837,11 +26921,11 @@ var init_commit = __esm2({ } }); function hashObjectTask(filePath, write) { - const commands = ["hash-object", filePath]; + const commands2 = ["hash-object", filePath]; if (write) { - commands.push("-w"); + commands2.push("-w"); } - return straightThroughStringTask(commands, true); + return straightThroughStringTask(commands2, true); } var init_hash_object = __esm2({ "src/lib/tasks/hash-object.ts"() { @@ -26889,15 +26973,15 @@ function hasBareCommand(command) { return command.includes(bareCommand); } function initTask(bare = false, path2, customArgs) { - const commands = ["init", ...customArgs]; - if (bare && !hasBareCommand(commands)) { - commands.splice(1, 0, bareCommand); + const commands2 = ["init", ...customArgs]; + if (bare && !hasBareCommand(commands2)) { + commands2.splice(1, 0, bareCommand); } return { - commands, + commands: commands2, format: "utf-8", parser(text2) { - return parseInit(commands.includes("--bare"), path2, text2); + return parseInit(commands2.includes("--bare"), path2, text2); } }; } @@ -27099,14 +27183,14 @@ __export2(diff_exports, { }); function diffSummaryTask(customArgs) { let logFormat = logFormatFromCommand(customArgs); - const commands = ["diff"]; + const commands2 = ["diff"]; if (logFormat === "") { logFormat = "--stat"; - commands.push("--stat=4096"); + commands2.push("--stat=4096"); } - commands.push(...customArgs); - return validateLogFormatConfig(commands) || { - commands, + commands2.push(...customArgs); + return validateLogFormatConfig(commands2) || { + commands: commands2, format: "utf-8", parser: getDiffParser(logFormat) }; @@ -27569,18 +27653,18 @@ function pushTagsTask(ref = {}, customArgs) { return pushTask(ref, customArgs); } function pushTask(ref = {}, customArgs) { - const commands = ["push", ...customArgs]; + const commands2 = ["push", ...customArgs]; if (ref.branch) { - commands.splice(1, 0, ref.branch); + commands2.splice(1, 0, ref.branch); } if (ref.remote) { - commands.splice(1, 0, ref.remote); + commands2.splice(1, 0, ref.remote); } - remove2(commands, "-v"); - append(commands, "--verbose"); - append(commands, "--porcelain"); + remove2(commands2, "-v"); + append(commands2, "--verbose"); + append(commands2, "--porcelain"); return { - commands, + commands: commands2, format: "utf-8", parser: parsePushResult }; @@ -27753,7 +27837,7 @@ var init_StatusSummary = __esm2({ } }); function statusTask(customArgs) { - const commands = [ + const commands2 = [ "status", "--porcelain", "-b", @@ -27763,7 +27847,7 @@ function statusTask(customArgs) { ]; return { format: "utf-8", - commands, + commands: commands2, parser(text2) { return parseStatusSummary(text2); } @@ -28100,22 +28184,22 @@ __export2(branch_exports, { deleteBranchTask: () => deleteBranchTask, deleteBranchesTask: () => deleteBranchesTask }); -function containsDeleteBranchCommand(commands) { +function containsDeleteBranchCommand(commands2) { const deleteCommands = ["-d", "-D", "--delete"]; - return commands.some((command) => deleteCommands.includes(command)); + return commands2.some((command) => deleteCommands.includes(command)); } function branchTask(customArgs) { const isDelete = containsDeleteBranchCommand(customArgs); - const commands = ["branch", ...customArgs]; - if (commands.length === 1) { - commands.push("-a"); + const commands2 = ["branch", ...customArgs]; + if (commands2.length === 1) { + commands2.push("-a"); } - if (!commands.includes("-v")) { - commands.splice(1, 0, "-v"); + if (!commands2.includes("-v")) { + commands2.splice(1, 0, "-v"); } return { format: "utf-8", - commands, + commands: commands2, parser(stdOut, stdErr) { if (isDelete) { return parseBranchDeletions(stdOut, stdErr).all[0]; @@ -28204,14 +28288,14 @@ function disallowedCommand(command) { return /^--upload-pack(=|$)/.test(command); } function cloneTask(repo, directory, customArgs) { - const commands = ["clone", ...customArgs]; - filterString(repo) && commands.push(repo); - filterString(directory) && commands.push(directory); - const banned = commands.find(disallowedCommand); + const commands2 = ["clone", ...customArgs]; + filterString(repo) && commands2.push(repo); + filterString(directory) && commands2.push(directory); + const banned = commands2.find(disallowedCommand); if (banned) { return configurationErrorTask(`git.fetch: potential exploit argument blocked.`); } - return straightThroughStringTask(commands); + return straightThroughStringTask(commands2); } function cloneMirrorTask(repo, directory, customArgs) { append(customArgs, "--mirror"); @@ -28278,16 +28362,16 @@ function disallowedCommand2(command) { return /^--upload-pack(=|$)/.test(command); } function fetchTask(remote, branch2, customArgs) { - const commands = ["fetch", ...customArgs]; + const commands2 = ["fetch", ...customArgs]; if (remote && branch2) { - commands.push(remote, branch2); + commands2.push(remote, branch2); } - const banned = commands.find(disallowedCommand2); + const banned = commands2.find(disallowedCommand2); if (banned) { return configurationErrorTask(`git.fetch: potential exploit argument blocked.`); } return { - commands, + commands: commands2, format: "utf-8", parser: parseFetchResult }; @@ -28334,12 +28418,12 @@ __export2(pull_exports, { pullTask: () => pullTask }); function pullTask(remote, branch2, customArgs) { - const commands = ["pull", ...customArgs]; + const commands2 = ["pull", ...customArgs]; if (remote && branch2) { - commands.splice(1, 0, remote, branch2); + commands2.splice(1, 0, remote, branch2); } return { - commands, + commands: commands2, format: "utf-8", parser(stdOut, stdErr) { return parsePullResult(stdOut, stdErr); @@ -28400,29 +28484,29 @@ function addRemoteTask(remoteName, remoteRepo, customArgs = []) { return straightThroughStringTask(["remote", "add", ...customArgs, remoteName, remoteRepo]); } function getRemotesTask(verbose) { - const commands = ["remote"]; + const commands2 = ["remote"]; if (verbose) { - commands.push("-v"); + commands2.push("-v"); } return { - commands, + commands: commands2, format: "utf-8", parser: verbose ? parseGetRemotesVerbose : parseGetRemotes }; } function listRemotesTask(customArgs = []) { - const commands = [...customArgs]; - if (commands[0] !== "ls-remote") { - commands.unshift("ls-remote"); + const commands2 = [...customArgs]; + if (commands2[0] !== "ls-remote") { + commands2.unshift("ls-remote"); } - return straightThroughStringTask(commands); + return straightThroughStringTask(commands2); } function remoteTask(customArgs = []) { - const commands = [...customArgs]; - if (commands[0] !== "remote") { - commands.unshift("remote"); + const commands2 = [...customArgs]; + if (commands2[0] !== "remote") { + commands2.unshift("remote"); } - return straightThroughStringTask(commands); + return straightThroughStringTask(commands2); } function removeRemoteTask(remoteName) { return straightThroughStringTask(["remote", "remove", remoteName]); @@ -28439,10 +28523,10 @@ __export2(stash_list_exports, { }); function stashListTask(opt = {}, customArgs) { const options = parseLogOptions(opt); - const commands = ["stash", "list", ...options.commands, ...customArgs]; - const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands)); - return validateLogFormatConfig(commands) || { - commands, + const commands2 = ["stash", "list", ...options.commands, ...customArgs]; + const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands2)); + return validateLogFormatConfig(commands2) || { + commands: commands2, format: "utf-8", parser: parser3 }; @@ -28469,11 +28553,11 @@ function initSubModuleTask(customArgs) { return subModuleTask(["init", ...customArgs]); } function subModuleTask(customArgs) { - const commands = [...customArgs]; - if (commands[0] !== "submodule") { - commands.unshift("submodule"); + const commands2 = [...customArgs]; + if (commands2[0] !== "submodule") { + commands2.unshift("submodule"); } - return straightThroughStringTask(commands); + return straightThroughStringTask(commands2); } function updateSubModuleTask(customArgs) { return subModuleTask(["update", ...customArgs]); @@ -28713,9 +28797,9 @@ var require_git = __commonJS2({ Git2.prototype.branchLocal = function(then) { return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments)); }; - Git2.prototype.raw = function(commands) { - const createRestCommands = !Array.isArray(commands); - const command = [].slice.call(createRestCommands ? arguments : commands, 0); + Git2.prototype.raw = function(commands2) { + const createRestCommands = !Array.isArray(commands2); + const command = [].slice.call(createRestCommands ? arguments : commands2, 0); for (let i = 0; i < command.length && createRestCommands; i++) { if (!filterPrimitives2(command[i])) { command.splice(i, command.length - i); @@ -28807,8 +28891,8 @@ var require_git = __commonJS2({ return this._runTask(task, trailingFunctionArgument2(arguments)); }; Git2.prototype.revparse = function() { - const commands = ["rev-parse", ...getTrailingOptions2(arguments, true)]; - return this._runTask(straightThroughStringTask2(commands, true), trailingFunctionArgument2(arguments)); + const commands2 = ["rev-parse", ...getTrailingOptions2(arguments, true)]; + return this._runTask(straightThroughStringTask2(commands2, true), trailingFunctionArgument2(arguments)); }; Git2.prototype.show = function(options, then) { return this._runTask(straightThroughStringTask2(["show", ...getTrailingOptions2(arguments, 1)]), trailingFunctionArgument2(arguments)); @@ -29879,21 +29963,21 @@ var SimpleGit = class extends GitManager { (err) => this.onError(err) ); return res.all.map((e) => { - var _a2, _b; + var _a2, _b, _c, _d; return { ...e, refs: e.refs.split(", "), diff: { ...e.diff, - files: e.diff.files.map((f) => ({ + files: (_b = (_a2 = e.diff) == null ? void 0 : _a2.files.map((f) => ({ ...f, status: f.status, path: f.file, hash: e.hash, vault_path: this.getVaultPath(f.file) - })) + }))) != null ? _b : [] }, - fileName: (_b = (_a2 = e.diff) == null ? void 0 : _a2.files.first()) == null ? void 0 : _b.file + fileName: (_d = (_c = e.diff) == null ? void 0 : _c.files.first()) == null ? void 0 : _d.file }; }); } @@ -31065,6 +31149,7 @@ var IsomorphicGit = class extends GitManager { "110": "DA", // Technically, two files: first one is deleted "D " and second one is untracked "??" "111": " ", + "113": "MM", "120": "DA", // Same as "110" "121": " M", @@ -32095,8 +32180,8 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { }) ); if (!plugin.settings.setLastSaveToLastCommit) - new import_obsidian8.Setting(containerEl).setName(`Auto Backup after file change`).setDesc( - `If turned on, do auto ${commitOrBackup} every ${plugin.settings.autoSaveInterval} minutes after last change. This also prevents auto ${commitOrBackup} while editing a file. If turned off, it's independent from the last change.` + new import_obsidian8.Setting(containerEl).setName(`Auto Backup after stop editing any file`).setDesc( + `Requires the ${commitOrBackup} interval not to be 0. If turned on, do auto ${commitOrBackup} every ${plugin.settings.autoSaveInterval} minutes after stop editing any file. This also prevents auto ${commitOrBackup} while editing a file. If turned off, it's independent from the last change.` ).addToggle( (toggle) => toggle.setValue(plugin.settings.autoBackupAfterFileChange).onChange((value) => { plugin.settings.autoBackupAfterFileChange = value; @@ -32181,8 +32266,8 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { }) ); new import_obsidian8.Setting(containerEl).setName("Commit message on auto backup/commit").setDesc( - "Available placeholders: {{date}} (see below), {{hostname}} (see below) and {{numFiles}} (number of changed files in the commit)" - ).addText( + "Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message)" + ).addTextArea( (text2) => text2.setPlaceholder("vault backup: {{date}}").setValue(plugin.settings.autoCommitMessage).onChange((value) => { plugin.settings.autoCommitMessage = value; plugin.saveSettings(); @@ -32191,8 +32276,8 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { containerEl.createEl("br"); containerEl.createEl("h3", { text: "Commit message" }); new import_obsidian8.Setting(containerEl).setName("Commit message on manual backup/commit").setDesc( - "Available placeholders: {{date}} (see below), {{hostname}} (see below) and {{numFiles}} (number of changed files in the commit)" - ).addText( + "Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message)" + ).addTextArea( (text2) => text2.setPlaceholder("vault backup: {{date}}").setValue( plugin.settings.commitMessage ? plugin.settings.commitMessage : "" ).onChange((value) => { @@ -32266,9 +32351,11 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.saveSettings(); }) ); - containerEl.createEl("br"); - containerEl.createEl("h3", { text: "Line author information" }); - this.addLineAuthorInfoSettings(); + if (plugin.gitManager instanceof SimpleGit) { + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Line author information" }); + this.addLineAuthorInfoSettings(); + } } containerEl.createEl("br"); containerEl.createEl("h3", { text: "Miscellaneous" }); @@ -34254,13 +34341,13 @@ var LocalStorageSettings = class { // src/ui/diff/diffView.ts init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff2html.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff2html.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff-parser.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff-parser.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/types.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/types.js init_polyfill_buffer(); var LineType; (function(LineType2) { @@ -34282,7 +34369,7 @@ var DiffStyleType = { CHAR: "char" }; -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/utils.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/utils.js init_polyfill_buffer(); var specials = [ "-", @@ -34310,8 +34397,8 @@ function unifyPath(path2) { return path2 ? path2.replace(/\\/g, "/") : path2; } function hashCode(text2) { - var i, chr, len; - var hash2 = 0; + let i, chr, len; + let hash2 = 0; for (i = 0, len = text2.length; i < len; i++) { chr = text2.charCodeAt(i); hash2 = (hash2 << 5) - hash2 + chr; @@ -34320,36 +34407,21 @@ function hashCode(text2) { return hash2; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff-parser.js -var __spreadArray = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff-parser.js function getExtension(filename, language) { - var filenameParts = filename.split("."); + const filenameParts = filename.split("."); return filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : language; } function startsWithAny(str, prefixes) { - return prefixes.reduce(function(startsWith, prefix) { - return startsWith || str.startsWith(prefix); - }, false); + return prefixes.reduce((startsWith, prefix) => startsWith || str.startsWith(prefix), false); } var baseDiffFilenamePrefixes = ["a/", "b/", "i/", "w/", "c/", "o/"]; function getFilename(line, linePrefix, extraPrefix) { - var prefixes = extraPrefix !== void 0 ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes, true), [extraPrefix], false) : baseDiffFilenamePrefixes; - var FilenameRegExp = linePrefix ? new RegExp("^".concat(escapeForRegExp(linePrefix), ' "?(.+?)"?$')) : new RegExp('^"?(.+?)"?$'); - var _a2 = FilenameRegExp.exec(line) || [], _b = _a2[1], filename = _b === void 0 ? "" : _b; - var matchingPrefix = prefixes.find(function(p) { - return filename.indexOf(p) === 0; - }); - var fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename; + const prefixes = extraPrefix !== void 0 ? [...baseDiffFilenamePrefixes, extraPrefix] : baseDiffFilenamePrefixes; + const FilenameRegExp = linePrefix ? new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`) : new RegExp('^"?(.+?)"?$'); + const [, filename = ""] = FilenameRegExp.exec(line) || []; + const matchingPrefix = prefixes.find((p) => filename.indexOf(p) === 0); + const fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename; return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, ""); } function getSrcFilename(line, srcPrefix) { @@ -34358,39 +34430,36 @@ function getSrcFilename(line, srcPrefix) { function getDstFilename(line, dstPrefix) { return getFilename(line, "+++", dstPrefix); } -function parse(diffInput, config) { - if (config === void 0) { - config = {}; - } - var files = []; - var currentFile = null; - var currentBlock = null; - var oldLine = null; - var oldLine2 = null; - var newLine = null; - var possibleOldName = null; - var possibleNewName = null; - var oldFileNameHeader = "--- "; - var newFileNameHeader = "+++ "; - var hunkHeaderPrefix = "@@"; - var oldMode = /^old mode (\d{6})/; - var newMode = /^new mode (\d{6})/; - var deletedFileMode = /^deleted file mode (\d{6})/; - var newFileMode = /^new file mode (\d{6})/; - var copyFrom = /^copy from "?(.+)"?/; - var copyTo = /^copy to "?(.+)"?/; - var renameFrom = /^rename from "?(.+)"?/; - var renameTo = /^rename to "?(.+)"?/; - var similarityIndex = /^similarity index (\d+)%/; - var dissimilarityIndex = /^dissimilarity index (\d+)%/; - var index2 = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/; - var binaryFiles = /^Binary files (.*) and (.*) differ/; - var binaryDiff = /^GIT binary patch/; - var combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/; - var combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/; - var combinedNewFile = /^new file mode (\d{6})/; - var combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/; - var diffLines2 = diffInput.replace(/\\ No newline at end of file/g, "").replace(/\r\n?/g, "\n").split("\n"); +function parse(diffInput, config = {}) { + const files = []; + let currentFile = null; + let currentBlock = null; + let oldLine = null; + let oldLine2 = null; + let newLine = null; + let possibleOldName = null; + let possibleNewName = null; + const oldFileNameHeader = "--- "; + const newFileNameHeader = "+++ "; + const hunkHeaderPrefix = "@@"; + const oldMode = /^old mode (\d{6})/; + const newMode = /^new mode (\d{6})/; + const deletedFileMode = /^deleted file mode (\d{6})/; + const newFileMode = /^new file mode (\d{6})/; + const copyFrom = /^copy from "?(.+)"?/; + const copyTo = /^copy to "?(.+)"?/; + const renameFrom = /^rename from "?(.+)"?/; + const renameTo = /^rename to "?(.+)"?/; + const similarityIndex = /^similarity index (\d+)%/; + const dissimilarityIndex = /^dissimilarity index (\d+)%/; + const index2 = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/; + const binaryFiles = /^Binary files (.*) and (.*) differ/; + const binaryDiff = /^GIT binary patch/; + const combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/; + const combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/; + const combinedNewFile = /^new file mode (\d{6})/; + const combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/; + const diffLines2 = diffInput.replace(/\\ No newline at end of file/g, "").replace(/\r\n?/g, "\n").split("\n"); function saveBlock() { if (currentBlock !== null && currentFile !== null) { currentFile.blocks.push(currentBlock); @@ -34424,7 +34493,7 @@ function parse(diffInput, config) { } function startBlock(line) { saveBlock(); - var values; + let values; if (currentFile !== null) { if (values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line)) { currentFile.isCombined = false; @@ -34455,11 +34524,11 @@ function parse(diffInput, config) { function createLine(line) { if (currentFile === null || currentBlock === null || oldLine === null || newLine === null) return; - var currentLine = { + const currentLine = { content: line }; - var addedPrefixes = currentFile.isCombined ? ["+ ", " +", "++"] : ["+"]; - var deletedPrefixes = currentFile.isCombined ? ["- ", " -", "--"] : ["-"]; + const addedPrefixes = currentFile.isCombined ? ["+ ", " +", "++"] : ["+"]; + const deletedPrefixes = currentFile.isCombined ? ["- ", " -", "--"] : ["-"]; if (startsWithAny(line, addedPrefixes)) { currentFile.addedLines++; currentLine.type = LineType.INSERT; @@ -34478,7 +34547,7 @@ function parse(diffInput, config) { currentBlock.lines.push(currentLine); } function existHunkHeader(line, lineIdx) { - var idx = lineIdx; + let idx = lineIdx; while (idx < diffLines2.length - 3) { if (line.startsWith("diff")) { return false; @@ -34490,17 +34559,17 @@ function parse(diffInput, config) { } return false; } - diffLines2.forEach(function(line, lineIndex) { + diffLines2.forEach((line, lineIndex) => { if (!line || line.startsWith("*")) { return; } - var values; - var prevLine = diffLines2[lineIndex - 1]; - var nxtLine = diffLines2[lineIndex + 1]; - var afterNxtLine = diffLines2[lineIndex + 2]; + let values; + const prevLine = diffLines2[lineIndex - 1]; + const nxtLine = diffLines2[lineIndex + 1]; + const afterNxtLine = diffLines2[lineIndex + 2]; if (line.startsWith("diff --git") || line.startsWith("diff --combined")) { startFile(); - var gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/; + const gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/; if (values = gitDiffStart.exec(line)) { possibleOldName = getFilename(values[1], void 0, config.dstPrefix); possibleNewName = getFilename(values[2], void 0, config.srcPrefix); @@ -34513,7 +34582,7 @@ function parse(diffInput, config) { } if (line.startsWith("Binary files") && !(currentFile === null || currentFile === void 0 ? void 0 : currentFile.isGitDiff)) { startFile(); - var unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/; + const unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/; if (values = unixDiffBinaryStart.exec(line)) { possibleOldName = getFilename(values[1], void 0, config.dstPrefix); possibleNewName = getFilename(values[2], void 0, config.srcPrefix); @@ -34536,7 +34605,7 @@ function parse(diffInput, config) { currentFile.deletedLines = 0; currentFile.blocks = []; currentBlock = null; - var message = typeof config.diffTooBigMessage === "function" ? config.diffTooBigMessage(files.length) : "Diff too big to be displayed"; + const message = typeof config.diffTooBigMessage === "function" ? config.diffTooBigMessage(files.length) : "Diff too big to be displayed"; startBlock(message); return; } @@ -34560,7 +34629,7 @@ function parse(diffInput, config) { createLine(line); return; } - var doesNotExistHunkHeader = !existHunkHeader(line, lineIndex); + const doesNotExistHunkHeader = !existHunkHeader(line, lineIndex); if (currentFile === null) { throw new Error("Where is my file !!!"); } @@ -34629,13 +34698,13 @@ function parse(diffInput, config) { return files; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/file-list-renderer.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/file-list-renderer.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/render-utils.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/render-utils.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/rematch.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/rematch.js init_polyfill_buffer(); function levenshtein(a, b) { if (a.length === 0) { @@ -34644,12 +34713,12 @@ function levenshtein(a, b) { if (b.length === 0) { return a.length; } - var matrix = []; - var i; + const matrix = []; + let i; for (i = 0; i <= b.length; i++) { matrix[i] = [i]; } - var j; + let j; for (j = 0; j <= a.length; j++) { matrix[0][j] = j; } @@ -34665,24 +34734,21 @@ function levenshtein(a, b) { return matrix[b.length][a.length]; } function newDistanceFn(str) { - return function(x, y) { - var xValue = str(x).trim(); - var yValue = str(y).trim(); - var lev = levenshtein(xValue, yValue); + return (x, y) => { + const xValue = str(x).trim(); + const yValue = str(y).trim(); + const lev = levenshtein(xValue, yValue); return lev / (xValue.length + yValue.length); }; } function newMatcherFn(distance2) { - function findBestMatch(a, b, cache) { - if (cache === void 0) { - cache = /* @__PURE__ */ new Map(); - } - var bestMatchDist = Infinity; - var bestMatch; - for (var i = 0; i < a.length; ++i) { - for (var j = 0; j < b.length; ++j) { - var cacheKey = JSON.stringify([a[i], b[j]]); - var md = void 0; + function findBestMatch(a, b, cache = /* @__PURE__ */ new Map()) { + let bestMatchDist = Infinity; + let bestMatch; + for (let i = 0; i < a.length; ++i) { + for (let j = 0; j < b.length; ++j) { + const cacheKey = JSON.stringify([a[i], b[j]]); + let md; if (!(cache.has(cacheKey) && (md = cache.get(cacheKey)))) { md = distance2(a[i], b[j]); cache.set(cacheKey, md); @@ -34695,29 +34761,23 @@ function newMatcherFn(distance2) { } return bestMatch; } - function group(a, b, level, cache) { - if (level === void 0) { - level = 0; - } - if (cache === void 0) { - cache = /* @__PURE__ */ new Map(); - } - var bm = findBestMatch(a, b, cache); + function group(a, b, level = 0, cache = /* @__PURE__ */ new Map()) { + const bm = findBestMatch(a, b, cache); if (!bm || a.length + b.length < 3) { return [[a, b]]; } - var a1 = a.slice(0, bm.indexA); - var b1 = b.slice(0, bm.indexB); - var aMatch = [a[bm.indexA]]; - var bMatch = [b[bm.indexB]]; - var tailA = bm.indexA + 1; - var tailB = bm.indexB + 1; - var a2 = a.slice(tailA); - var b2 = b.slice(tailB); - var group1 = group(a1, b1, level + 1, cache); - var groupMatch = group(aMatch, bMatch, level + 1, cache); - var group2 = group(a2, b2, level + 1, cache); - var result = groupMatch; + const a1 = a.slice(0, bm.indexA); + const b1 = b.slice(0, bm.indexB); + const aMatch = [a[bm.indexA]]; + const bMatch = [b[bm.indexB]]; + const tailA = bm.indexA + 1; + const tailB = bm.indexB + 1; + const a2 = a.slice(tailA); + const b2 = b.slice(tailB); + const group1 = group(a1, b1, level + 1, cache); + const groupMatch = group(aMatch, bMatch, level + 1, cache); + const group2 = group(a2, b2, level + 1, cache); + let result = groupMatch; if (bm.indexA > 0 || bm.indexB > 0) { result = group1.concat(result); } @@ -34729,19 +34789,7 @@ function newMatcherFn(distance2) { return group; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/render-utils.js -var __assign = function() { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/render-utils.js var CSSLineClass = { INSERTS: "d2h-ins", DELETES: "d2h-del", @@ -34757,9 +34805,7 @@ var defaultRenderConfig = { diffStyle: DiffStyleType.WORD }; var separator = "/"; -var distance = newDistanceFn(function(change) { - return change.value; -}); +var distance = newDistanceFn((change) => change.value); var matcher = newMatcherFn(distance); function isDevNullName(name) { return name.indexOf("dev/null") !== -1; @@ -34786,29 +34832,26 @@ function prefixLength(isCombined) { function escapeForHtml(str) { return str.slice(0).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); } -function deconstructLine(line, isCombined, escape) { - if (escape === void 0) { - escape = true; - } - var indexToSplit = prefixLength(isCombined); +function deconstructLine(line, isCombined, escape = true) { + const indexToSplit = prefixLength(isCombined); return { prefix: line.substring(0, indexToSplit), content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit) }; } function filenameDiff(file) { - var oldFilename = unifyPath(file.oldName); - var newFilename = unifyPath(file.newName); + const oldFilename = unifyPath(file.oldName); + const newFilename = unifyPath(file.newName); if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) { - var prefixPaths = []; - var suffixPaths = []; - var oldFilenameParts = oldFilename.split(separator); - var newFilenameParts = newFilename.split(separator); - var oldFilenamePartsSize = oldFilenameParts.length; - var newFilenamePartsSize = newFilenameParts.length; - var i = 0; - var j = oldFilenamePartsSize - 1; - var k = newFilenamePartsSize - 1; + const prefixPaths = []; + const suffixPaths = []; + const oldFilenameParts = oldFilename.split(separator); + const newFilenameParts = newFilename.split(separator); + const oldFilenamePartsSize = oldFilenameParts.length; + const newFilenamePartsSize = newFilenameParts.length; + let i = 0; + let j = oldFilenamePartsSize - 1; + let k = newFilenamePartsSize - 1; while (i < j && i < k) { if (oldFilenameParts[i] === newFilenameParts[i]) { prefixPaths.push(newFilenameParts[i]); @@ -34826,10 +34869,10 @@ function filenameDiff(file) { break; } } - var finalPrefix = prefixPaths.join(separator); - var finalSuffix = suffixPaths.join(separator); - var oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator); - var newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator); + const finalPrefix = prefixPaths.join(separator); + const finalSuffix = suffixPaths.join(separator); + const oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator); + const newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator); if (finalPrefix.length && finalSuffix.length) { return finalPrefix + separator + "{" + oldRemainingPath + " \u2192 " + newRemainingPath + "}" + separator + finalSuffix; } else if (finalPrefix.length) { @@ -34845,10 +34888,10 @@ function filenameDiff(file) { } } function getHtmlId(file) { - return "d2h-".concat(hashCode(filenameDiff(file)).toString().slice(-6)); + return `d2h-${hashCode(filenameDiff(file)).toString().slice(-6)}`; } function getFileIcon(file) { - var templateName = "file-changed"; + let templateName = "file-changed"; if (file.isRename) { templateName = "file-renamed"; } else if (file.isCopy) { @@ -34862,13 +34905,10 @@ function getFileIcon(file) { } return templateName; } -function diffHighlight(diffLine1, diffLine2, isCombined, config) { - if (config === void 0) { - config = {}; - } - var _a2 = __assign(__assign({}, defaultRenderConfig), config), matching = _a2.matching, maxLineLengthHighlight = _a2.maxLineLengthHighlight, matchWordsThreshold = _a2.matchWordsThreshold, diffStyle = _a2.diffStyle; - var line1 = deconstructLine(diffLine1, isCombined, false); - var line2 = deconstructLine(diffLine2, isCombined, false); +function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) { + const { matching, maxLineLengthHighlight, matchWordsThreshold, diffStyle } = Object.assign(Object.assign({}, defaultRenderConfig), config); + const line1 = deconstructLine(diffLine1, isCombined, false); + const line2 = deconstructLine(diffLine2, isCombined, false); if (line1.content.length > maxLineLengthHighlight || line2.content.length > maxLineLengthHighlight) { return { oldLine: { @@ -34881,19 +34921,15 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { } }; } - var diff2 = diffStyle === "char" ? diffChars(line1.content, line2.content) : diffWordsWithSpace(line1.content, line2.content); - var changedWords = []; + const diff2 = diffStyle === "char" ? diffChars(line1.content, line2.content) : diffWordsWithSpace(line1.content, line2.content); + const changedWords = []; if (diffStyle === "word" && matching === "words") { - var removed = diff2.filter(function(element2) { - return element2.removed; - }); - var added = diff2.filter(function(element2) { - return element2.added; - }); - var chunks = matcher(added, removed); - chunks.forEach(function(chunk) { + const removed = diff2.filter((element2) => element2.removed); + const added = diff2.filter((element2) => element2.added); + const chunks = matcher(added, removed); + chunks.forEach((chunk) => { if (chunk[0].length === 1 && chunk[1].length === 1) { - var dist = distance(chunk[0][0], chunk[1][0]); + const dist = distance(chunk[0][0], chunk[1][0]); if (dist < matchWordsThreshold) { changedWords.push(chunk[0][0]); changedWords.push(chunk[1][0]); @@ -34901,11 +34937,11 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { } }); } - var highlightedLine = diff2.reduce(function(highlightedLine2, part) { - var elemType = part.added ? "ins" : part.removed ? "del" : null; - var addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : ""; - var escapedValue = escapeForHtml(part.value); - return elemType !== null ? "".concat(highlightedLine2, "<").concat(elemType).concat(addClass, ">").concat(escapedValue, "") : "".concat(highlightedLine2).concat(escapedValue); + const highlightedLine = diff2.reduce((highlightedLine2, part) => { + const elemType = part.added ? "ins" : part.removed ? "del" : null; + const addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : ""; + const escapedValue = escapeForHtml(part.value); + return elemType !== null ? `${highlightedLine2}<${elemType}${addClass}>${escapedValue}` : `${highlightedLine2}${escapedValue}`; }, ""); return { oldLine: { @@ -34919,75 +34955,57 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { }; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/file-list-renderer.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/file-list-renderer.js var baseTemplatesPath = "file-summary"; var iconsBaseTemplatesPath = "icon"; function render(diffFiles, hoganUtils) { - var files = diffFiles.map(function(file) { - return hoganUtils.render(baseTemplatesPath, "line", { - fileHtmlId: getHtmlId(file), - oldName: file.oldName, - newName: file.newName, - fileName: filenameDiff(file), - deletedLines: "-" + file.deletedLines, - addedLines: "+" + file.addedLines - }, { - fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) - }); - }).join("\n"); + const files = diffFiles.map((file) => hoganUtils.render(baseTemplatesPath, "line", { + fileHtmlId: getHtmlId(file), + oldName: file.oldName, + newName: file.newName, + fileName: filenameDiff(file), + deletedLines: "-" + file.deletedLines, + addedLines: "+" + file.addedLines + }, { + fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) + })).join("\n"); return hoganUtils.render(baseTemplatesPath, "wrapper", { filesNumber: diffFiles.length, files }); } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/line-by-line-renderer.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/line-by-line-renderer.js init_polyfill_buffer(); -var __assign2 = function() { - __assign2 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); -}; -var defaultLineByLineRendererConfig = __assign2(__assign2({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); +var defaultLineByLineRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); var genericTemplatesPath = "generic"; var baseTemplatesPath2 = "line-by-line"; var iconsBaseTemplatesPath2 = "icon"; var tagsBaseTemplatesPath = "tag"; -var LineByLineRenderer = function() { - function LineByLineRenderer2(hoganUtils, config) { - if (config === void 0) { - config = {}; - } +var LineByLineRenderer = class { + constructor(hoganUtils, config = {}) { this.hoganUtils = hoganUtils; - this.config = __assign2(__assign2({}, defaultLineByLineRendererConfig), config); + this.config = Object.assign(Object.assign({}, defaultLineByLineRendererConfig), config); } - LineByLineRenderer2.prototype.render = function(diffFiles) { - var _this = this; - var diffsHtml = diffFiles.map(function(file) { - var diffs; + render(diffFiles) { + const diffsHtml = diffFiles.map((file) => { + let diffs; if (file.blocks.length) { - diffs = _this.generateFileHtml(file); + diffs = this.generateFileHtml(file); } else { - diffs = _this.generateEmptyDiff(); + diffs = this.generateEmptyDiff(); } - return _this.makeFileDiffHtml(file, diffs); + return this.makeFileDiffHtml(file, diffs); }).join("\n"); return this.hoganUtils.render(genericTemplatesPath, "wrapper", { content: diffsHtml }); - }; - LineByLineRenderer2.prototype.makeFileDiffHtml = function(file, diffs) { + } + makeFileDiffHtml(file, diffs) { if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) return ""; - var fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath2, "file-diff"); - var filePathTemplate = this.hoganUtils.template(genericTemplatesPath, "file-path"); - var fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath2, "file"); - var fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file)); + const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath2, "file-diff"); + const filePathTemplate = this.hoganUtils.template(genericTemplatesPath, "file-path"); + const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath2, "file"); + const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file)); return fileDiffTemplate.render({ file, fileHtmlId: getHtmlId(file), @@ -34999,38 +35017,33 @@ var LineByLineRenderer = function() { fileTag: fileTagTemplate }) }); - }; - LineByLineRenderer2.prototype.generateEmptyDiff = function() { + } + generateEmptyDiff() { return this.hoganUtils.render(genericTemplatesPath, "empty-diff", { contentClass: "d2h-code-line", CSSLineClass }); - }; - LineByLineRenderer2.prototype.generateFileHtml = function(file) { - var _this = this; - var matcher2 = newMatcherFn(newDistanceFn(function(e) { - return deconstructLine(e.content, file.isCombined).content; - })); - return file.blocks.map(function(block) { - var lines = _this.hoganUtils.render(genericTemplatesPath, "block-header", { + } + generateFileHtml(file) { + const matcher2 = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content)); + return file.blocks.map((block) => { + let lines = this.hoganUtils.render(genericTemplatesPath, "block-header", { CSSLineClass, blockHeader: file.isTooBig ? block.header : escapeForHtml(block.header), lineClass: "d2h-code-linenumber", contentClass: "d2h-code-line" }); - _this.applyLineGroupping(block).forEach(function(_a2) { - var contextLines = _a2[0], oldLines = _a2[1], newLines = _a2[2]; + this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => { if (oldLines.length && newLines.length && !contextLines.length) { - _this.applyRematchMatching(oldLines, newLines, matcher2).map(function(_a3) { - var oldLines2 = _a3[0], newLines2 = _a3[1]; - var _b2 = _this.processChangedLines(file, file.isCombined, oldLines2, newLines2), left2 = _b2.left, right2 = _b2.right; - lines += left2; - lines += right2; + this.applyRematchMatching(oldLines, newLines, matcher2).map(([oldLines2, newLines2]) => { + const { left, right } = this.processChangedLines(file, file.isCombined, oldLines2, newLines2); + lines += left; + lines += right; }); } else if (contextLines.length) { - contextLines.forEach(function(line) { - var _a3 = deconstructLine(line.content, file.isCombined), prefix = _a3.prefix, content = _a3.content; - lines += _this.generateSingleLineHtml(file, { + contextLines.forEach((line) => { + const { prefix, content } = deconstructLine(line.content, file.isCombined); + lines += this.generateSingleLineHtml(file, { type: CSSLineClass.CONTEXT, prefix, content, @@ -35039,7 +35052,7 @@ var LineByLineRenderer = function() { }); }); } else if (oldLines.length || newLines.length) { - var _b = _this.processChangedLines(file, file.isCombined, oldLines, newLines), left = _b.left, right = _b.right; + const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines); lines += left; lines += right; } else { @@ -35048,13 +35061,13 @@ var LineByLineRenderer = function() { }); return lines; }).join("\n"); - }; - LineByLineRenderer2.prototype.applyLineGroupping = function(block) { - var blockLinesGroups = []; - var oldLines = []; - var newLines = []; - for (var i = 0; i < block.lines.length; i++) { - var diffLine = block.lines[i]; + } + applyLineGroupping(block) { + const blockLinesGroups = []; + let oldLines = []; + let newLines = []; + for (let i = 0; i < block.lines.length; i++) { + const diffLine = block.lines[i]; if (diffLine.type !== LineType.INSERT && newLines.length || diffLine.type === LineType.CONTEXT && oldLines.length > 0) { blockLinesGroups.push([[], oldLines, newLines]); oldLines = []; @@ -35076,51 +35089,49 @@ var LineByLineRenderer = function() { newLines = []; } return blockLinesGroups; - }; - LineByLineRenderer2.prototype.applyRematchMatching = function(oldLines, newLines, matcher2) { - var comparisons = oldLines.length * newLines.length; - var maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(function(elem) { - return elem.content.length; - }))); - var doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); + } + applyRematchMatching(oldLines, newLines, matcher2) { + const comparisons = oldLines.length * newLines.length; + const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map((elem) => elem.content.length))); + const doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); return doMatching ? matcher2(oldLines, newLines) : [[oldLines, newLines]]; - }; - LineByLineRenderer2.prototype.processChangedLines = function(file, isCombined, oldLines, newLines) { - var fileHtml = { + } + processChangedLines(file, isCombined, oldLines, newLines) { + const fileHtml = { right: "", left: "" }; - var maxLinesNumber = Math.max(oldLines.length, newLines.length); - for (var i = 0; i < maxLinesNumber; i++) { - var oldLine = oldLines[i]; - var newLine = newLines[i]; - var diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; - var preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? __assign2(__assign2({}, diff2 !== void 0 ? { + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; + const preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.oldLine.prefix, content: diff2.oldLine.content, type: CSSLineClass.DELETE_CHANGES - } : __assign2(__assign2({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : void 0; - var preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? __assign2(__assign2({}, diff2 !== void 0 ? { + } : Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : void 0; + const preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.newLine.prefix, content: diff2.newLine.content, type: CSSLineClass.INSERT_CHANGES - } : __assign2(__assign2({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : void 0; - var _a2 = this.generateLineHtml(file, preparedOldLine, preparedNewLine), left = _a2.left, right = _a2.right; + } : Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : void 0; + const { left, right } = this.generateLineHtml(file, preparedOldLine, preparedNewLine); fileHtml.left += left; fileHtml.right += right; } return fileHtml; - }; - LineByLineRenderer2.prototype.generateLineHtml = function(file, oldLine, newLine) { + } + generateLineHtml(file, oldLine, newLine) { return { left: this.generateSingleLineHtml(file, oldLine), right: this.generateSingleLineHtml(file, newLine) }; - }; - LineByLineRenderer2.prototype.generateSingleLineHtml = function(file, line) { + } + generateSingleLineHtml(file, line) { if (line === void 0) return ""; - var lineNumberHtml = this.hoganUtils.render(baseTemplatesPath2, "numbers", { + const lineNumberHtml = this.hoganUtils.render(baseTemplatesPath2, "numbers", { oldNumber: line.oldNumber || "", newNumber: line.newNumber || "" }); @@ -35134,58 +35145,40 @@ var LineByLineRenderer = function() { line, file }); - }; - return LineByLineRenderer2; -}(); -var line_by_line_renderer_default = LineByLineRenderer; - -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/side-by-side-renderer.js -init_polyfill_buffer(); -var __assign3 = function() { - __assign3 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); + } }; -var defaultSideBySideRendererConfig = __assign3(__assign3({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); + +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/side-by-side-renderer.js +init_polyfill_buffer(); +var defaultSideBySideRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); var genericTemplatesPath2 = "generic"; var baseTemplatesPath3 = "side-by-side"; var iconsBaseTemplatesPath3 = "icon"; var tagsBaseTemplatesPath2 = "tag"; -var SideBySideRenderer = function() { - function SideBySideRenderer2(hoganUtils, config) { - if (config === void 0) { - config = {}; - } +var SideBySideRenderer = class { + constructor(hoganUtils, config = {}) { this.hoganUtils = hoganUtils; - this.config = __assign3(__assign3({}, defaultSideBySideRendererConfig), config); + this.config = Object.assign(Object.assign({}, defaultSideBySideRendererConfig), config); } - SideBySideRenderer2.prototype.render = function(diffFiles) { - var _this = this; - var diffsHtml = diffFiles.map(function(file) { - var diffs; + render(diffFiles) { + const diffsHtml = diffFiles.map((file) => { + let diffs; if (file.blocks.length) { - diffs = _this.generateFileHtml(file); + diffs = this.generateFileHtml(file); } else { - diffs = _this.generateEmptyDiff(); + diffs = this.generateEmptyDiff(); } - return _this.makeFileDiffHtml(file, diffs); + return this.makeFileDiffHtml(file, diffs); }).join("\n"); return this.hoganUtils.render(genericTemplatesPath2, "wrapper", { content: diffsHtml }); - }; - SideBySideRenderer2.prototype.makeFileDiffHtml = function(file, diffs) { + } + makeFileDiffHtml(file, diffs) { if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) return ""; - var fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath3, "file-diff"); - var filePathTemplate = this.hoganUtils.template(genericTemplatesPath2, "file-path"); - var fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath3, "file"); - var fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath2, getFileIcon(file)); + const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath3, "file-diff"); + const filePathTemplate = this.hoganUtils.template(genericTemplatesPath2, "file-path"); + const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath3, "file"); + const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath2, getFileIcon(file)); return fileDiffTemplate.render({ file, fileHtmlId: getHtmlId(file), @@ -35197,8 +35190,8 @@ var SideBySideRenderer = function() { fileTag: fileTagTemplate }) }); - }; - SideBySideRenderer2.prototype.generateEmptyDiff = function() { + } + generateEmptyDiff() { return { right: "", left: this.hoganUtils.render(genericTemplatesPath2, "empty-diff", { @@ -35206,30 +35199,25 @@ var SideBySideRenderer = function() { CSSLineClass }) }; - }; - SideBySideRenderer2.prototype.generateFileHtml = function(file) { - var _this = this; - var matcher2 = newMatcherFn(newDistanceFn(function(e) { - return deconstructLine(e.content, file.isCombined).content; - })); - return file.blocks.map(function(block) { - var fileHtml = { - left: _this.makeHeaderHtml(block.header, file), - right: _this.makeHeaderHtml("") + } + generateFileHtml(file) { + const matcher2 = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content)); + return file.blocks.map((block) => { + const fileHtml = { + left: this.makeHeaderHtml(block.header, file), + right: this.makeHeaderHtml("") }; - _this.applyLineGroupping(block).forEach(function(_a2) { - var contextLines = _a2[0], oldLines = _a2[1], newLines = _a2[2]; + this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => { if (oldLines.length && newLines.length && !contextLines.length) { - _this.applyRematchMatching(oldLines, newLines, matcher2).map(function(_a3) { - var oldLines2 = _a3[0], newLines2 = _a3[1]; - var _b2 = _this.processChangedLines(file.isCombined, oldLines2, newLines2), left2 = _b2.left, right2 = _b2.right; - fileHtml.left += left2; - fileHtml.right += right2; + this.applyRematchMatching(oldLines, newLines, matcher2).map(([oldLines2, newLines2]) => { + const { left, right } = this.processChangedLines(file.isCombined, oldLines2, newLines2); + fileHtml.left += left; + fileHtml.right += right; }); } else if (contextLines.length) { - contextLines.forEach(function(line) { - var _a3 = deconstructLine(line.content, file.isCombined), prefix = _a3.prefix, content = _a3.content; - var _b2 = _this.generateLineHtml({ + contextLines.forEach((line) => { + const { prefix, content } = deconstructLine(line.content, file.isCombined); + const { left, right } = this.generateLineHtml({ type: CSSLineClass.CONTEXT, prefix, content, @@ -35239,12 +35227,12 @@ var SideBySideRenderer = function() { prefix, content, number: line.newNumber - }), left2 = _b2.left, right2 = _b2.right; - fileHtml.left += left2; - fileHtml.right += right2; + }); + fileHtml.left += left; + fileHtml.right += right; }); } else if (oldLines.length || newLines.length) { - var _b = _this.processChangedLines(file.isCombined, oldLines, newLines), left = _b.left, right = _b.right; + const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines); fileHtml.left += left; fileHtml.right += right; } else { @@ -35252,16 +35240,16 @@ var SideBySideRenderer = function() { } }); return fileHtml; - }).reduce(function(accomulated, html2) { + }).reduce((accomulated, html2) => { return { left: accomulated.left + html2.left, right: accomulated.right + html2.right }; }, { left: "", right: "" }); - }; - SideBySideRenderer2.prototype.applyLineGroupping = function(block) { - var blockLinesGroups = []; - var oldLines = []; - var newLines = []; - for (var i = 0; i < block.lines.length; i++) { - var diffLine = block.lines[i]; + } + applyLineGroupping(block) { + const blockLinesGroups = []; + let oldLines = []; + let newLines = []; + for (let i = 0; i < block.lines.length; i++) { + const diffLine = block.lines[i]; if (diffLine.type !== LineType.INSERT && newLines.length || diffLine.type === LineType.CONTEXT && oldLines.length > 0) { blockLinesGroups.push([[], oldLines, newLines]); oldLines = []; @@ -35283,76 +35271,72 @@ var SideBySideRenderer = function() { newLines = []; } return blockLinesGroups; - }; - SideBySideRenderer2.prototype.applyRematchMatching = function(oldLines, newLines, matcher2) { - var comparisons = oldLines.length * newLines.length; - var maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(function(elem) { - return elem.content.length; - }))); - var doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); + } + applyRematchMatching(oldLines, newLines, matcher2) { + const comparisons = oldLines.length * newLines.length; + const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map((elem) => elem.content.length))); + const doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); return doMatching ? matcher2(oldLines, newLines) : [[oldLines, newLines]]; - }; - SideBySideRenderer2.prototype.makeHeaderHtml = function(blockHeader, file) { + } + makeHeaderHtml(blockHeader, file) { return this.hoganUtils.render(genericTemplatesPath2, "block-header", { CSSLineClass, blockHeader: (file === null || file === void 0 ? void 0 : file.isTooBig) ? blockHeader : escapeForHtml(blockHeader), lineClass: "d2h-code-side-linenumber", contentClass: "d2h-code-side-line" }); - }; - SideBySideRenderer2.prototype.processChangedLines = function(isCombined, oldLines, newLines) { - var fileHtml = { + } + processChangedLines(isCombined, oldLines, newLines) { + const fileHtml = { right: "", left: "" }; - var maxLinesNumber = Math.max(oldLines.length, newLines.length); - for (var i = 0; i < maxLinesNumber; i++) { - var oldLine = oldLines[i]; - var newLine = newLines[i]; - var diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; - var preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? __assign3(__assign3({}, diff2 !== void 0 ? { + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; + const preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.oldLine.prefix, content: diff2.oldLine.content, type: CSSLineClass.DELETE_CHANGES - } : __assign3(__assign3({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { number: oldLine.oldNumber }) : void 0; - var preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? __assign3(__assign3({}, diff2 !== void 0 ? { + } : Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { number: oldLine.oldNumber }) : void 0; + const preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.newLine.prefix, content: diff2.newLine.content, type: CSSLineClass.INSERT_CHANGES - } : __assign3(__assign3({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { number: newLine.newNumber }) : void 0; - var _a2 = this.generateLineHtml(preparedOldLine, preparedNewLine), left = _a2.left, right = _a2.right; + } : Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { number: newLine.newNumber }) : void 0; + const { left, right } = this.generateLineHtml(preparedOldLine, preparedNewLine); fileHtml.left += left; fileHtml.right += right; } return fileHtml; - }; - SideBySideRenderer2.prototype.generateLineHtml = function(oldLine, newLine) { + } + generateLineHtml(oldLine, newLine) { return { left: this.generateSingleHtml(oldLine), right: this.generateSingleHtml(newLine) }; - }; - SideBySideRenderer2.prototype.generateSingleHtml = function(line) { - var lineClass = "d2h-code-side-linenumber"; - var contentClass = "d2h-code-side-line"; + } + generateSingleHtml(line) { + const lineClass = "d2h-code-side-linenumber"; + const contentClass = "d2h-code-side-line"; return this.hoganUtils.render(genericTemplatesPath2, "line", { - type: (line === null || line === void 0 ? void 0 : line.type) || "".concat(CSSLineClass.CONTEXT, " d2h-emptyplaceholder"), - lineClass: line !== void 0 ? lineClass : "".concat(lineClass, " d2h-code-side-emptyplaceholder"), - contentClass: line !== void 0 ? contentClass : "".concat(contentClass, " d2h-code-side-emptyplaceholder"), + type: (line === null || line === void 0 ? void 0 : line.type) || `${CSSLineClass.CONTEXT} d2h-emptyplaceholder`, + lineClass: line !== void 0 ? lineClass : `${lineClass} d2h-code-side-emptyplaceholder`, + contentClass: line !== void 0 ? contentClass : `${contentClass} d2h-code-side-emptyplaceholder`, prefix: (line === null || line === void 0 ? void 0 : line.prefix) === " " ? " " : line === null || line === void 0 ? void 0 : line.prefix, content: line === null || line === void 0 ? void 0 : line.content, lineNumber: line === null || line === void 0 ? void 0 : line.number }); - }; - return SideBySideRenderer2; -}(); -var side_by_side_renderer_default = SideBySideRenderer; + } +}; -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/hoganjs-utils.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/hoganjs-utils.js init_polyfill_buffer(); var Hogan3 = __toESM(require_hogan()); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff2html-templates.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff2html-templates.js init_polyfill_buffer(); var Hogan2 = __toESM(require_hogan()); var defaultTemplates = {}; @@ -35757,75 +35741,43 @@ defaultTemplates["tag-file-renamed"] = new Hogan2.Template({ code: function(c, p return t.fl(); }, partials: {}, subs: {} }); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/hoganjs-utils.js -var __assign4 = function() { - __assign4 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign4.apply(this, arguments); -}; -var HoganJsUtils = function() { - function HoganJsUtils2(_a2) { - var _b = _a2.compiledTemplates, compiledTemplates = _b === void 0 ? {} : _b, _c = _a2.rawTemplates, rawTemplates = _c === void 0 ? {} : _c; - var compiledRawTemplates = Object.entries(rawTemplates).reduce(function(previousTemplates, _a3) { - var _b2; - var name = _a3[0], templateString = _a3[1]; - var compiledTemplate = Hogan3.compile(templateString, { asString: false }); - return __assign4(__assign4({}, previousTemplates), (_b2 = {}, _b2[name] = compiledTemplate, _b2)); +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/hoganjs-utils.js +var HoganJsUtils = class { + constructor({ compiledTemplates = {}, rawTemplates = {} }) { + const compiledRawTemplates = Object.entries(rawTemplates).reduce((previousTemplates, [name, templateString]) => { + const compiledTemplate = Hogan3.compile(templateString, { asString: false }); + return Object.assign(Object.assign({}, previousTemplates), { [name]: compiledTemplate }); }, {}); - this.preCompiledTemplates = __assign4(__assign4(__assign4({}, defaultTemplates), compiledTemplates), compiledRawTemplates); + this.preCompiledTemplates = Object.assign(Object.assign(Object.assign({}, defaultTemplates), compiledTemplates), compiledRawTemplates); } - HoganJsUtils2.compile = function(templateString) { + static compile(templateString) { return Hogan3.compile(templateString, { asString: false }); - }; - HoganJsUtils2.prototype.render = function(namespace, view, params, partials, indent2) { - var templateKey = this.templateKey(namespace, view); + } + render(namespace, view, params, partials, indent2) { + const templateKey = this.templateKey(namespace, view); try { - var template = this.preCompiledTemplates[templateKey]; + const template = this.preCompiledTemplates[templateKey]; return template.render(params, partials, indent2); } catch (e) { - throw new Error("Could not find template to render '".concat(templateKey, "'")); + throw new Error(`Could not find template to render '${templateKey}'`); } - }; - HoganJsUtils2.prototype.template = function(namespace, view) { - return this.preCompiledTemplates[this.templateKey(namespace, view)]; - }; - HoganJsUtils2.prototype.templateKey = function(namespace, view) { - return "".concat(namespace, "-").concat(view); - }; - return HoganJsUtils2; -}(); -var hoganjs_utils_default = HoganJsUtils; - -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff2html.js -var __assign5 = function() { - __assign5 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign5.apply(this, arguments); -}; -var defaultDiff2HtmlConfig = __assign5(__assign5(__assign5({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true }); -function html(diffInput, configuration) { - if (configuration === void 0) { - configuration = {}; } - var config = __assign5(__assign5({}, defaultDiff2HtmlConfig), configuration); - var diffJson = typeof diffInput === "string" ? parse(diffInput, config) : diffInput; - var hoganUtils = new hoganjs_utils_default(config); - var fileList = config.drawFileList ? render(diffJson, hoganUtils) : ""; - var diffOutput = config.outputFormat === "side-by-side" ? new side_by_side_renderer_default(hoganUtils, config).render(diffJson) : new line_by_line_renderer_default(hoganUtils, config).render(diffJson); + template(namespace, view) { + return this.preCompiledTemplates[this.templateKey(namespace, view)]; + } + templateKey(namespace, view) { + return `${namespace}-${view}`; + } +}; + +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff2html.js +var defaultDiff2HtmlConfig = Object.assign(Object.assign(Object.assign({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true }); +function html(diffInput, configuration = {}) { + const config = Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration); + const diffJson = typeof diffInput === "string" ? parse(diffInput, config) : diffInput; + const hoganUtils = new HoganJsUtils(config); + const fileList = config.drawFileList ? render(diffJson, hoganUtils) : ""; + const diffOutput = config.outputFormat === "side-by-side" ? new SideBySideRenderer(hoganUtils, config).render(diffJson) : new LineByLineRenderer(hoganUtils, config).render(diffJson); return fileList + diffOutput; } @@ -35836,9 +35788,12 @@ var DiffView = class extends import_obsidian17.ItemView { super(leaf); this.plugin = plugin; this.gettingDiff = false; + this.gitRefreshBind = this.refresh.bind(this); + this.gitViewRefreshBind = this.refresh.bind(this); this.parser = new DOMParser(); this.navigation = true; - addEventListener("git-refresh", this.refresh.bind(this)); + addEventListener("git-refresh", this.gitRefreshBind); + addEventListener("git-view-refresh", this.gitViewRefreshBind); } getViewType() { return DIFF_VIEW_CONFIG.type; @@ -35858,14 +35813,17 @@ var DiffView = class extends import_obsidian17.ItemView { } async setState(state, result) { this.state = state; + if (import_obsidian17.Platform.isMobile) { + this.leaf.view.titleEl.textContent = this.getDisplayText(); + } await this.refresh(); - return; } getState() { return this.state; } onClose() { - removeEventListener("git-refresh", this.refresh.bind(this)); + removeEventListener("git-refresh", this.gitRefreshBind); + removeEventListener("git-view-refresh", this.gitViewRefreshBind); return super.onClose(); } onOpen() { @@ -35884,16 +35842,26 @@ var DiffView = class extends import_obsidian17.ItemView { ); this.contentEl.empty(); if (!diff2) { - const content = await this.app.vault.adapter.read( - this.plugin.gitManager.getVaultPath(this.state.file) - ); - const header = `--- /dev/null + if (this.plugin.gitManager instanceof SimpleGit && await this.plugin.gitManager.isTracked( + this.state.file + )) { + diff2 = [ + `--- ${this.state.file}`, + `+++ ${this.state.file}`, + "" + ].join("\n"); + } else { + const content = await this.app.vault.adapter.read( + this.plugin.gitManager.getVaultPath(this.state.file) + ); + const header = `--- /dev/null +++ ${this.state.file} @@ -0,0 +1,${content.split("\n").length} @@`; - diff2 = [ - ...header.split("\n"), - ...content.split("\n").map((line) => `+${line}`) - ].join("\n"); + diff2 = [ + ...header.split("\n"), + ...content.split("\n").map((line) => `+${line}`) + ].join("\n"); + } } const diffEl = this.parser.parseFromString(html(diff2), "text/html").querySelector(".d2h-file-diff"); this.contentEl.append(diffEl); @@ -35911,7 +35879,13 @@ var import_obsidian20 = require("obsidian"); // src/ui/history/historyView.svelte init_polyfill_buffer(); -// node_modules/.pnpm/svelte@3.59.0/node_modules/svelte/internal/index.mjs +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/index.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/animations.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/utils.js init_polyfill_buffer(); function noop() { } @@ -35929,14 +35903,20 @@ function is_function(thing) { return typeof thing === "function"; } function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function"); + return a != a ? b == b : a !== b || a && typeof a === "object" || typeof a === "function"; } function is_empty(obj) { return Object.keys(obj).length === 0; } + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/environment.js +init_polyfill_buffer(); var is_client = typeof window !== "undefined"; var now = is_client ? () => window.performance.now() : () => Date.now(); var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/loop.js +init_polyfill_buffer(); var tasks = /* @__PURE__ */ new Set(); function run_tasks(now2) { tasks.forEach((task) => { @@ -35961,12 +35941,47 @@ function loop(callback) { } }; } -var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : global; -var ResizeObserverSingleton = class { + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/style_manager.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/dom.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/globals.js +init_polyfill_buffer(); +var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : ( + // @ts-ignore Node typings have this + global +); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js +var ResizeObserverSingleton = class _ResizeObserverSingleton { + /** @param {ResizeObserverOptions} options */ constructor(options) { + /** + * @private + * @readonly + * @type {WeakMap} + */ + __publicField(this, "_listeners", "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0); + /** + * @private + * @type {ResizeObserver} + */ + __publicField(this, "_observer"); + /** @type {ResizeObserverOptions} */ + __publicField(this, "options"); this.options = options; - this._listeners = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; } + /** + * @param {Element} element + * @param {import('./private.js').Listener} listener + * @returns {() => void} + */ observe(element2, listener) { this._listeners.set(element2, listener); this._getObserver().observe(element2, this.options); @@ -35975,18 +35990,23 @@ var ResizeObserverSingleton = class { this._observer.unobserve(element2); }; } + /** + * @private + */ _getObserver() { var _a2; - return (_a2 = this._observer) !== null && _a2 !== void 0 ? _a2 : this._observer = new ResizeObserver((entries) => { + return (_a2 = this._observer) != null ? _a2 : this._observer = new ResizeObserver((entries) => { var _a3; for (const entry of entries) { - ResizeObserverSingleton.entries.set(entry.target, entry); - (_a3 = this._listeners.get(entry.target)) === null || _a3 === void 0 ? void 0 : _a3(entry); + _ResizeObserverSingleton.entries.set(entry.target, entry); + (_a3 = this._listeners.get(entry.target)) == null ? void 0 : _a3(entry); } }); } }; ResizeObserverSingleton.entries = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/dom.js var is_hydrating = false; function start_hydrating() { is_hydrating = true; @@ -36010,18 +36030,27 @@ function get_root_for_style(node) { if (!node) return document; const root2 = node.getRootNode ? node.getRootNode() : node.ownerDocument; - if (root2 && root2.host) { - return root2; + if (root2 && /** @type {ShadowRoot} */ + root2.host) { + return ( + /** @type {ShadowRoot} */ + root2 + ); } return node.ownerDocument; } function append_empty_stylesheet(node) { const style_element = element("style"); + style_element.textContent = "/* empty */"; append_stylesheet(get_root_for_style(node), style_element); return style_element.sheet; } function append_stylesheet(node, style) { - append2(node.head || node, style); + append2( + /** @type {Document} */ + node.head || node, + style + ); return style.sheet; } function insert(target, node, anchor) { @@ -36073,7 +36102,8 @@ function set_data(text2, data) { data = "" + data; if (text2.data === data) return; - text2.data = data; + text2.data = /** @type {string} */ + data; } function set_input_value(input, value) { input.value = value == null ? "" : value; @@ -36086,13 +36116,23 @@ function set_style(node, key2, value, important) { } } function toggle_class(element2, name, toggle) { - element2.classList[toggle ? "add" : "remove"](name); + element2.classList.toggle(name, !!toggle); } function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { - const e = document.createEvent("CustomEvent"); - e.initCustomEvent(type, bubbles, cancelable, detail); - return e; + return new CustomEvent(type, { detail, bubbles, cancelable }); } +function get_custom_elements_slots(element2) { + const result = {}; + element2.childNodes.forEach( + /** @param {Element} node */ + (node) => { + result[node.slot || "default"] = true; + } + ); + return result; +} + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/style_manager.js var managed_styles = /* @__PURE__ */ new Map(); var active = 0; function hash(str) { @@ -36155,6 +36195,18 @@ function clear_rules() { managed_styles.clear(); }); } + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/await_block.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/transitions.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/scheduler.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/lifecycle.js +init_polyfill_buffer(); var current_component; function set_current_component(component) { current_component = component; @@ -36173,6 +36225,8 @@ function bubble(component, event) { callbacks.slice().forEach((fn) => fn.call(this, event)); } } + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/scheduler.js var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; @@ -36246,6 +36300,8 @@ function flush_render_callbacks(fns) { targets.forEach((c) => c()); render_callbacks = filtered; } + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/transitions.js var promise; function wait() { if (!promise) { @@ -36307,12 +36363,16 @@ function create_bidirectional_transition(node, fn, params, intro) { let running_program = null; let pending_program = null; let animation_name = null; + let original_inert_value; function clear_animation() { if (animation_name) delete_rule(node, animation_name); } function init3(program, duration) { - const d = program.b - t; + const d = ( + /** @type {Program['d']} */ + program.b - t + ); duration *= Math.abs(d); return { a: t, @@ -36325,7 +36385,13 @@ function create_bidirectional_transition(node, fn, params, intro) { }; } function go(b) { - const { delay: delay2 = 0, duration = 300, easing = identity, tick: tick2 = noop, css } = config || null_transition; + const { + delay: delay2 = 0, + duration = 300, + easing = identity, + tick: tick2 = noop, + css + } = config || null_transition; const program = { start: now() + delay2, b @@ -36334,6 +36400,17 @@ function create_bidirectional_transition(node, fn, params, intro) { program.group = outros; outros.r += 1; } + if ("inert" in node) { + if (b) { + if (original_inert_value !== void 0) { + node.inert = original_inert_value; + } + } else { + original_inert_value = /** @type {HTMLElement} */ + node.inert; + node.inert = true; + } + } if (running_program || pending_program) { pending_program = program; } else { @@ -36352,7 +36429,15 @@ function create_bidirectional_transition(node, fn, params, intro) { dispatch(node, running_program.b, "start"); if (css) { clear_animation(); - animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css); + animation_name = create_rule( + node, + t, + running_program.b, + running_program.duration, + 0, + easing, + config.css + ); } } if (running_program) { @@ -36382,7 +36467,8 @@ function create_bidirectional_transition(node, fn, params, intro) { run(b) { if (is_function(config)) { wait().then(() => { - config = config(options); + const opts = { direction: b ? "in" : "out" }; + config = config(opts); go(b); }); } else { @@ -36395,51 +36481,73 @@ function create_bidirectional_transition(node, fn, params, intro) { } }; } -var _boolean_attributes = [ - "allowfullscreen", - "allowpaymentrequest", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "defer", - "disabled", - "formnovalidate", - "hidden", - "inert", - "ismap", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "selected" -]; + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/each.js +init_polyfill_buffer(); +function ensure_array_like(array_like_or_iterator) { + return (array_like_or_iterator == null ? void 0 : array_like_or_iterator.length) !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator); +} + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/spread.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/ssr.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/shared/boolean_attributes.js +init_polyfill_buffer(); +var _boolean_attributes = ( + /** @type {const} */ + [ + "allowfullscreen", + "allowpaymentrequest", + "async", + "autofocus", + "autoplay", + "checked", + "controls", + "default", + "defer", + "disabled", + "formnovalidate", + "hidden", + "inert", + "ismap", + "loop", + "multiple", + "muted", + "nomodule", + "novalidate", + "open", + "playsinline", + "readonly", + "required", + "reversed", + "selected" + ] +); var boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/shared/utils/names.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/Component.js +init_polyfill_buffer(); function create_component(block) { block && block.c(); } -function mount_component(component, target, anchor, customElement) { +function mount_component(component, target, anchor) { const { fragment, after_update } = component.$$; fragment && fragment.m(target, anchor); - if (!customElement) { - add_render_callback(() => { - const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); - if (component.$$.on_destroy) { - component.$$.on_destroy.push(...new_on_destroy); - } else { - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - } + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } else { + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { @@ -36511,7 +36619,7 @@ function init2(component, options, instance10, create_fragment10, not_equal, pro } if (options.intro) transition_in(component.$$.fragment); - mount_component(component, options.target, options.anchor, options.customElement); + mount_component(component, options.target, options.anchor); end_hydrating(); flush(); } @@ -36520,53 +36628,226 @@ function init2(component, options, instance10, create_fragment10, not_equal, pro var SvelteElement; if (typeof HTMLElement === "function") { SvelteElement = class extends HTMLElement { - constructor() { + constructor($$componentCtor, $$slots, use_shadow_dom) { super(); - this.attachShadow({ mode: "open" }); - } - connectedCallback() { - const { on_mount } = this.$$; - this.$$.on_disconnect = on_mount.map(run).filter(is_function); - for (const key2 in this.$$.slotted) { - this.appendChild(this.$$.slotted[key2]); + /** The Svelte component constructor */ + __publicField(this, "$$ctor"); + /** Slots */ + __publicField(this, "$$s"); + /** The Svelte component instance */ + __publicField(this, "$$c"); + /** Whether or not the custom element is connected */ + __publicField(this, "$$cn", false); + /** Component props data */ + __publicField(this, "$$d", {}); + /** `true` if currently in the process of reflecting component props back to attributes */ + __publicField(this, "$$r", false); + /** @type {Record} Props definition (name, reflected, type etc) */ + __publicField(this, "$$p_d", {}); + /** @type {Record} Event listeners */ + __publicField(this, "$$l", {}); + /** @type {Map} Event listener unsubscribe functions */ + __publicField(this, "$$l_u", /* @__PURE__ */ new Map()); + this.$$ctor = $$componentCtor; + this.$$s = $$slots; + if (use_shadow_dom) { + this.attachShadow({ mode: "open" }); } } + addEventListener(type, listener, options) { + this.$$l[type] = this.$$l[type] || []; + this.$$l[type].push(listener); + if (this.$$c) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); + } + super.addEventListener(type, listener, options); + } + removeEventListener(type, listener, options) { + super.removeEventListener(type, listener, options); + if (this.$$c) { + const unsub = this.$$l_u.get(listener); + if (unsub) { + unsub(); + this.$$l_u.delete(listener); + } + } + } + async connectedCallback() { + this.$$cn = true; + if (!this.$$c) { + let create_slot = function(name) { + return () => { + let node; + const obj = { + c: function create() { + node = element("slot"); + if (name !== "default") { + attr(node, "name", name); + } + }, + /** + * @param {HTMLElement} target + * @param {HTMLElement} [anchor] + */ + m: function mount(target, anchor) { + insert(target, node, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach(node); + } + } + }; + return obj; + }; + }; + await Promise.resolve(); + if (!this.$$cn) { + return; + } + const $$slots = {}; + const existing_slots = get_custom_elements_slots(this); + for (const name of this.$$s) { + if (name in existing_slots) { + $$slots[name] = [create_slot(name)]; + } + } + for (const attribute of this.attributes) { + const name = this.$$g_p(attribute.name); + if (!(name in this.$$d)) { + this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp"); + } + } + this.$$c = new this.$$ctor({ + target: this.shadowRoot || this, + props: { + ...this.$$d, + $$slots, + $$scope: { + ctx: [] + } + } + }); + const reflect_attributes = () => { + this.$$r = true; + for (const key2 in this.$$p_d) { + this.$$d[key2] = this.$$c.$$.ctx[this.$$c.$$.props[key2]]; + if (this.$$p_d[key2].reflect) { + const attribute_value = get_custom_element_value( + key2, + this.$$d[key2], + this.$$p_d, + "toAttribute" + ); + if (attribute_value == null) { + this.removeAttribute(key2); + } else { + this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value); + } + } + } + this.$$r = false; + }; + this.$$c.$$.after_update.push(reflect_attributes); + reflect_attributes(); + for (const type in this.$$l) { + for (const listener of this.$$l[type]) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); + } + } + this.$$l = {}; + } + } + // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte + // and setting attributes through setAttribute etc, this is helpful attributeChangedCallback(attr2, _oldValue, newValue) { - this[attr2] = newValue; + var _a2; + if (this.$$r) + return; + attr2 = this.$$g_p(attr2); + this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); + (_a2 = this.$$c) == null ? void 0 : _a2.$set({ [attr2]: this.$$d[attr2] }); } disconnectedCallback() { - run_all(this.$$.on_disconnect); + this.$$cn = false; + Promise.resolve().then(() => { + if (!this.$$cn) { + this.$$c.$destroy(); + this.$$c = void 0; + } + }); } - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - $on(type, callback) { - if (!is_function(callback)) { - return noop; - } - const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); - callbacks.push(callback); - return () => { - const index2 = callbacks.indexOf(callback); - if (index2 !== -1) - callbacks.splice(index2, 1); - }; - } - $set($$props) { - if (this.$$set && !is_empty($$props)) { - this.$$.skip_bound = true; - this.$$set($$props); - this.$$.skip_bound = false; - } + $$g_p(attribute_name) { + return Object.keys(this.$$p_d).find( + (key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name + ) || attribute_name; } }; } +function get_custom_element_value(prop, value, props_definition, transform) { + var _a2; + const type = (_a2 = props_definition[prop]) == null ? void 0 : _a2.type; + value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; + if (!transform || !props_definition[prop]) { + return value; + } else if (transform === "toAttribute") { + switch (type) { + case "Object": + case "Array": + return value == null ? null : JSON.stringify(value); + case "Boolean": + return value ? "" : null; + case "Number": + return value == null ? null : value; + default: + return value; + } + } else { + switch (type) { + case "Object": + case "Array": + return value && JSON.parse(value); + case "Boolean": + return value; + case "Number": + return value != null ? +value : value; + default: + return value; + } + } +} var SvelteComponent = class { + constructor() { + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + __publicField(this, "$$"); + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + __publicField(this, "$$set"); + } + /** @returns {void} */ $destroy() { destroy_component(this, 1); this.$destroy = noop; } + /** + * @template {Extract} K + * @param {K} type + * @param {((e: Events[K]) => void) | null | undefined} callback + * @returns {() => void} + */ $on(type, callback) { if (!is_function(callback)) { return noop; @@ -36579,16 +36860,32 @@ var SvelteComponent = class { callbacks.splice(index2, 1); }; } - $set($$props) { - if (this.$$set && !is_empty($$props)) { + /** + * @param {Partial} props + * @returns {void} + */ + $set(props) { + if (this.$$set && !is_empty(props)) { this.$$.skip_bound = true; - this.$$set($$props); + this.$$set(props); this.$$.skip_bound = false; } } }; -// node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.es6.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/dev.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/shared/version.js +init_polyfill_buffer(); +var PUBLIC_VERSION = "4"; + +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/disclose-version/index.js +init_polyfill_buffer(); +if (typeof window !== "undefined") + (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(PUBLIC_VERSION); + +// node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs init_polyfill_buffer(); function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { @@ -36621,36 +36918,42 @@ function __awaiter(thisArg, _arguments, P, generator) { // src/ui/history/historyView.svelte var import_obsidian19 = require("obsidian"); -// node_modules/.pnpm/svelte@3.59.0/node_modules/svelte/index.mjs +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/index.js init_polyfill_buffer(); // src/ui/history/components/logComponent.svelte init_polyfill_buffer(); -// node_modules/.pnpm/svelte@3.59.0/node_modules/svelte/transition/index.mjs +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/transition/index.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@3.59.0/node_modules/svelte/easing/index.mjs +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/easing/index.js init_polyfill_buffer(); function cubicOut(t) { const f = t - 1; return f * f * f + 1; } -// node_modules/.pnpm/svelte@3.59.0/node_modules/svelte/transition/index.mjs +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/transition/index.js function slide(node, { delay: delay2 = 0, duration = 400, easing = cubicOut, axis = "y" } = {}) { const style = getComputedStyle(node); const opacity = +style.opacity; const primary_property = axis === "y" ? "height" : "width"; const primary_property_value = parseFloat(style[primary_property]); const secondary_properties = axis === "y" ? ["top", "bottom"] : ["left", "right"]; - const capitalized_secondary_properties = secondary_properties.map((e) => `${e[0].toUpperCase()}${e.slice(1)}`); + const capitalized_secondary_properties = secondary_properties.map( + (e) => `${e[0].toUpperCase()}${e.slice(1)}` + ); const padding_start_value = parseFloat(style[`padding${capitalized_secondary_properties[0]}`]); const padding_end_value = parseFloat(style[`padding${capitalized_secondary_properties[1]}`]); const margin_start_value = parseFloat(style[`margin${capitalized_secondary_properties[0]}`]); const margin_end_value = parseFloat(style[`margin${capitalized_secondary_properties[1]}`]); - const border_width_start_value = parseFloat(style[`border${capitalized_secondary_properties[0]}Width`]); - const border_width_end_value = parseFloat(style[`border${capitalized_secondary_properties[1]}Width`]); + const border_width_start_value = parseFloat( + style[`border${capitalized_secondary_properties[0]}Width`] + ); + const border_width_end_value = parseFloat( + style[`border${capitalized_secondary_properties[1]}Width`] + ); return { delay: delay2, duration, @@ -36663,7 +36966,7 @@ function slide(node, { delay: delay2 = 0, duration = 400, easing = cubicOut, axi init_polyfill_buffer(); var import_obsidian18 = require("obsidian"); function add_css(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block(ctx) { let div; @@ -36695,8 +36998,9 @@ function create_if_block(ctx) { }, p: noop, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } ctx[7](null); mounted = false; run_all(dispose); @@ -36730,12 +37034,14 @@ function create_fragment(ctx) { ); let t3; let span_data_type_value; + let div3_data_path_value; let div3_aria_label_value; let mounted; let dispose; let if_block = show_if && create_if_block(ctx); return { c() { + var _a2, _b; main = element("main"); div3 = element("div"); div0 = element("div"); @@ -36748,13 +37054,15 @@ function create_fragment(ctx) { t2 = space(); span = element("span"); t3 = text(t3_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(div1, "class", "buttons"); attr(span, "class", "type"); attr(span, "data-type", span_data_type_value = /*diff*/ ctx[0].status); attr(div2, "class", "git-tools"); - attr(div3, "class", "tree-item-self is-clickable nav-file-title"); + attr(div3, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div3, "data-path", div3_data_path_value = /*diff*/ + ctx[0].vault_path); attr( div3, "aria-label-position", @@ -36763,7 +37071,15 @@ function create_fragment(ctx) { ); attr(div3, "aria-label", div3_aria_label_value = /*diff*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + toggle_class( + div3, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*diff*/ + ctx[0].vault_path && /*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -36799,6 +37115,7 @@ function create_fragment(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b; if (dirty & /*diff*/ 1 && t0_value !== (t0_value = getDisplayPath( /*diff*/ @@ -36833,6 +37150,11 @@ function create_fragment(ctx) { ctx2[0].status)) { attr(span, "data-type", span_data_type_value); } + if (dirty & /*diff*/ + 1 && div3_data_path_value !== (div3_data_path_value = /*diff*/ + ctx2[0].vault_path)) { + attr(div3, "data-path", div3_data_path_value); + } if (dirty & /*side*/ 8) { attr( @@ -36847,12 +37169,24 @@ function create_fragment(ctx) { ctx2[0].vault_path)) { attr(div3, "aria-label", div3_aria_label_value); } + if (dirty & /*view, diff*/ + 3) { + toggle_class( + div3, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*diff*/ + ctx2[0].vault_path && /*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) + ); + } }, i: noop, o: noop, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } if (if_block) if_block.d(); mounted = false; @@ -36979,6 +37313,15 @@ function create_else_block(ctx) { set_style(div0, "padding-right", "5px"); set_style(div0, "display", "flex"); attr(div1, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); attr(div2, "class", "tree-item-inner nav-folder-title-content svelte-1lnl15d"); attr(div3, "class", "tree-item-self is-clickable nav-folder-title"); attr( @@ -37021,6 +37364,18 @@ function create_else_block(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; + if (!current || dirty & /*closed, hierarchy*/ + 17) { + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); + } if ((!current || dirty & /*hierarchy*/ 1) && t2_value !== (t2_value = /*entity*/ ctx[8].title + "")) @@ -37087,8 +37442,9 @@ function create_else_block(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div4); + } if (if_block) if_block.d(); mounted = false; @@ -37148,8 +37504,9 @@ function create_if_block2(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } destroy_component(logfilecomponent); } }; @@ -37227,8 +37584,9 @@ function create_if_block_1(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } destroy_component(logtreecomponent); if (detaching && div_transition) div_transition.end(); @@ -37295,16 +37653,17 @@ function create_each_block(ctx) { current = false; }, d(detaching) { - if_blocks[current_block_type_index].d(detaching); - if (detaching) + if (detaching) { detach(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); } }; } function create_fragment2(ctx) { let main; let current; - let each_value = ( + let each_value = ensure_array_like( /*hierarchy*/ ctx[0].children ); @@ -37341,8 +37700,10 @@ function create_fragment2(ctx) { p(ctx2, [dirty]) { if (dirty & /*hierarchy, view, closed, plugin, side, fold*/ 119) { - each_value = /*hierarchy*/ - ctx2[0].children; + each_value = ensure_array_like( + /*hierarchy*/ + ctx2[0].children + ); let i; for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context(ctx2, each_value, i); @@ -37388,8 +37749,9 @@ function create_fragment2(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } destroy_each(each_blocks, detaching); } }; @@ -37478,8 +37840,9 @@ function create_if_block_2(ctx) { set_data(t, t_value); }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } } }; } @@ -37559,8 +37922,9 @@ function create_if_block3(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } if_blocks[current_block_type_index].d(); if (detaching && div_transition) div_transition.end(); @@ -37570,7 +37934,7 @@ function create_if_block3(ctx) { function create_else_block2(ctx) { let each_1_anchor; let current; - let each_value = ( + let each_value = ensure_array_like( /*log*/ ctx[0].diff.files ); @@ -37600,8 +37964,10 @@ function create_else_block2(ctx) { p(ctx2, dirty) { if (dirty & /*view, log*/ 3) { - each_value = /*log*/ - ctx2[0].diff.files; + each_value = ensure_array_like( + /*log*/ + ctx2[0].diff.files + ); let i; for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context2(ctx2, each_value, i); @@ -37638,9 +38004,10 @@ function create_else_block2(ctx) { current = false; }, d(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) + if (detaching) { detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); } }; } @@ -37796,6 +38163,12 @@ function create_fragment3(ctx) { if (if_block1) if_block1.c(); attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div0, + "is-collapsed", + /*isCollapsed*/ + ctx[4] + ); attr(div1, "class", "tree-item-inner nav-folder-title-content"); attr(div1, "aria-label", div1_aria_label_value = /*log*/ ctx[0].message); @@ -37841,6 +38214,15 @@ function create_fragment3(ctx) { } }, p(ctx2, [dirty]) { + if (!current || dirty & /*isCollapsed*/ + 16) { + toggle_class( + div0, + "is-collapsed", + /*isCollapsed*/ + ctx2[4] + ); + } if ( /*log*/ ctx2[0].refs.length > 0 @@ -37916,8 +38298,9 @@ function create_fragment3(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } if (if_block0) if_block0.d(); if (if_block1) @@ -37983,7 +38366,7 @@ function create_if_block4(ctx) { let div1; let div0; let current; - let each_value = ( + let each_value = ensure_array_like( /*logs*/ ctx[6] ); @@ -38017,8 +38400,10 @@ function create_if_block4(ctx) { p(ctx2, dirty) { if (dirty & /*view, showTree, logs, plugin*/ 71) { - each_value = /*logs*/ - ctx2[6]; + each_value = ensure_array_like( + /*logs*/ + ctx2[6] + ); let i; for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context3(ctx2, each_value, i); @@ -38055,8 +38440,9 @@ function create_if_block4(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div1); + } destroy_each(each_blocks, detaching); } }; @@ -38246,8 +38632,9 @@ function create_fragment4(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } ctx[7](null); ctx[9](null); if (if_block) @@ -38514,10 +38901,10 @@ var DiscardModal = class extends import_obsidian23.Modal { init_polyfill_buffer(); var import_obsidian25 = require("obsidian"); -// node_modules/.pnpm/obsidian-community-lib@2.0.2_fbkkrmn4giwwsr5htt45gr2jni/node_modules/obsidian-community-lib/dist/index.js +// node_modules/.pnpm/github.com+Vinzent03+obsidian-community-lib@e663de4f95c879b40613090da78ea599ff621d24_@codemir_kbfcpig3uak7df3ohthcqq53p4/node_modules/obsidian-community-lib/dist/index.js init_polyfill_buffer(); -// node_modules/.pnpm/obsidian-community-lib@2.0.2_fbkkrmn4giwwsr5htt45gr2jni/node_modules/obsidian-community-lib/dist/utils.js +// node_modules/.pnpm/github.com+Vinzent03+obsidian-community-lib@e663de4f95c879b40613090da78ea599ff621d24_@codemir_kbfcpig3uak7df3ohthcqq53p4/node_modules/obsidian-community-lib/dist/utils.js init_polyfill_buffer(); var feather = __toESM(require_feather()); var import_obsidian24 = require("obsidian"); @@ -38534,7 +38921,7 @@ function hoverPreview(event, view, to) { // src/ui/sourceControl/components/fileComponent.svelte function add_css4(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block5(ctx) { let div; @@ -38566,8 +38953,9 @@ function create_if_block5(ctx) { }, p: noop, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } ctx[11](null); mounted = false; run_all(dispose); @@ -38605,12 +38993,14 @@ function create_fragment5(ctx) { ); let t5; let div4_data_type_value; + let div6_data_path_value; let div6_aria_label_value; let mounted; let dispose; let if_block = show_if && create_if_block5(ctx); return { c() { + var _a2, _b, _c; main = element("main"); div6 = element("div"); div0 = element("div"); @@ -38627,7 +39017,7 @@ function create_fragment5(ctx) { t4 = space(); div4 = element("div"); t5 = text(t5_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(div1, "data-icon", "undo"); attr(div1, "aria-label", "Discard"); attr(div1, "class", "clickable-icon"); @@ -38639,7 +39029,9 @@ function create_fragment5(ctx) { attr(div4, "data-type", div4_data_type_value = /*change*/ ctx[0].working_dir); attr(div5, "class", "git-tools"); - attr(div6, "class", "tree-item-self is-clickable nav-file-title"); + attr(div6, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div6, "data-path", div6_data_path_value = /*change*/ + ctx[0].vault_path); attr( div6, "aria-label-position", @@ -38648,7 +39040,16 @@ function create_fragment5(ctx) { ); attr(div6, "aria-label", div6_aria_label_value = /*change*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + toggle_class( + div6, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx[0].vault_path && !/*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && !/*view*/ + ((_c = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -38704,6 +39105,7 @@ function create_fragment5(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b, _c; if (dirty & /*change*/ 1 && t0_value !== (t0_value = getDisplayPath( /*change*/ @@ -38738,6 +39140,11 @@ function create_fragment5(ctx) { ctx2[0].working_dir)) { attr(div4, "data-type", div4_data_type_value); } + if (dirty & /*change*/ + 1 && div6_data_path_value !== (div6_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div6, "data-path", div6_data_path_value); + } if (dirty & /*side*/ 8) { attr( @@ -38752,12 +39159,25 @@ function create_fragment5(ctx) { ctx2[0].vault_path)) { attr(div6, "aria-label", div6_aria_label_value); } + if (dirty & /*view, change*/ + 3) { + toggle_class( + div6, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx2[0].vault_path && !/*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && !/*view*/ + ((_c = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + } }, i: noop, o: noop, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } if (if_block) if_block.d(); ctx[12](null); @@ -38881,7 +39301,7 @@ var fileComponent_default = FileComponent; init_polyfill_buffer(); var import_obsidian26 = require("obsidian"); function add_css5(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_fragment6(ctx) { let main; @@ -38901,6 +39321,7 @@ function create_fragment6(ctx) { ); let t2; let span_data_type_value; + let div2_data_path_value; let div2_aria_label_value; let mounted; let dispose; @@ -38914,12 +39335,14 @@ function create_fragment6(ctx) { div1 = element("div"); span = element("span"); t2 = text(t2_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(span, "class", "type"); attr(span, "data-type", span_data_type_value = /*change*/ ctx[0].working_dir); attr(div1, "class", "git-tools"); - attr(div2, "class", "tree-item-self is-clickable nav-file-title"); + attr(div2, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div2, "data-path", div2_data_path_value = /*change*/ + ctx[0].vault_path); attr( div2, "aria-label-position", @@ -38928,7 +39351,7 @@ function create_fragment6(ctx) { ); attr(div2, "aria-label", div2_aria_label_value = /*change*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -38981,6 +39404,11 @@ function create_fragment6(ctx) { ctx2[0].working_dir)) { attr(span, "data-type", span_data_type_value); } + if (dirty & /*change*/ + 1 && div2_data_path_value !== (div2_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div2, "data-path", div2_data_path_value); + } if (dirty & /*side*/ 2) { attr( @@ -38999,8 +39427,9 @@ function create_fragment6(ctx) { i: noop, o: noop, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } mounted = false; run_all(dispose); } @@ -39052,7 +39481,7 @@ var pulledFileComponent_default = PulledFileComponent; init_polyfill_buffer(); var import_obsidian27 = require("obsidian"); function add_css6(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block6(ctx) { let div; @@ -39078,8 +39507,9 @@ function create_if_block6(ctx) { }, p: noop, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } ctx[10](null); mounted = false; dispose(); @@ -39115,12 +39545,14 @@ function create_fragment7(ctx) { ); let t4; let div3_data_type_value; + let div5_data_path_value; let div5_aria_label_value; let mounted; let dispose; let if_block = show_if && create_if_block6(ctx); return { c() { + var _a2, _b, _c; main = element("main"); div5 = element("div"); div0 = element("div"); @@ -39135,7 +39567,7 @@ function create_fragment7(ctx) { t3 = space(); div3 = element("div"); t4 = text(t4_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(div1, "data-icon", "minus"); attr(div1, "aria-label", "Unstage"); attr(div1, "class", "clickable-icon"); @@ -39144,7 +39576,9 @@ function create_fragment7(ctx) { attr(div3, "data-type", div3_data_type_value = /*change*/ ctx[0].index); attr(div4, "class", "git-tools"); - attr(div5, "class", "tree-item-self is-clickable nav-file-title"); + attr(div5, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div5, "data-path", div5_data_path_value = /*change*/ + ctx[0].vault_path); attr( div5, "aria-label-position", @@ -39153,7 +39587,16 @@ function create_fragment7(ctx) { ); attr(div5, "aria-label", div5_aria_label_value = /*change*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + toggle_class( + div5, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx[0].vault_path && !/*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && /*view*/ + ((_c = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -39202,6 +39645,7 @@ function create_fragment7(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b, _c; if (dirty & /*change*/ 1 && t0_value !== (t0_value = getDisplayPath( /*change*/ @@ -39236,6 +39680,11 @@ function create_fragment7(ctx) { ctx2[0].index)) { attr(div3, "data-type", div3_data_type_value); } + if (dirty & /*change*/ + 1 && div5_data_path_value !== (div5_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div5, "data-path", div5_data_path_value); + } if (dirty & /*side*/ 8) { attr( @@ -39250,12 +39699,25 @@ function create_fragment7(ctx) { ctx2[0].vault_path)) { attr(div5, "aria-label", div5_aria_label_value); } + if (dirty & /*view, change*/ + 3) { + toggle_class( + div5, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx2[0].vault_path && !/*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && /*view*/ + ((_c = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + } }, i: noop, o: noop, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } if (if_block) if_block.d(); ctx[11](null); @@ -39358,7 +39820,7 @@ var stagedFileComponent_default = StagedFileComponent; // src/ui/sourceControl/components/treeComponent.svelte init_polyfill_buffer(); function add_css7(target) { - append_styles(target, "svelte-1lnl15d", "main.svelte-1lnl15d .nav-folder-title-content.svelte-1lnl15d{display:flex;align-items:center}"); + append_styles(target, "svelte-hup5mn", "main.svelte-hup5mn .nav-folder-title.svelte-hup5mn{align-items:center}"); } function get_each_context4(ctx, list, i) { const child_ctx = ctx.slice(); @@ -39438,11 +39900,20 @@ function create_else_block3(ctx) { set_style(div0, "padding-right", "5px"); set_style(div0, "display", "flex"); attr(div1, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); - attr(div2, "class", "tree-item-inner nav-folder-title-content svelte-1lnl15d"); + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + attr(div2, "class", "tree-item-inner nav-folder-title-content"); set_style(div3, "width", "11px"); attr(div4, "class", "buttons"); attr(div5, "class", "git-tools"); - attr(div6, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div6, "class", "tree-item-self is-clickable nav-folder-title svelte-hup5mn"); attr( div6, "aria-label-position", @@ -39489,6 +39960,18 @@ function create_else_block3(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; + if (!current || dirty & /*closed, hierarchy*/ + 33) { + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + } if ((!current || dirty & /*hierarchy*/ 1) && t2_value !== (t2_value = /*entity*/ ctx[15].title + "")) @@ -39565,8 +40048,9 @@ function create_else_block3(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div7); + } if_block0.d(); if (if_block1) if_block1.d(); @@ -39660,8 +40144,9 @@ function create_if_block7(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } if (~current_block_type_index) { if_blocks[current_block_type_index].d(); } @@ -39722,12 +40207,11 @@ function create_else_block_1(ctx) { ctx = new_ctx; }, d(detaching) { - if (detaching) + if (detaching) { detach(div0); - if (detaching) detach(t); - if (detaching) detach(div1); + } mounted = false; run_all(dispose); } @@ -39765,8 +40249,9 @@ function create_if_block_5(ctx) { ctx = new_ctx; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } mounted = false; dispose(); } @@ -39853,8 +40338,9 @@ function create_if_block_4(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } destroy_component(treecomponent); if (detaching && div_transition) div_transition.end(); @@ -40087,16 +40573,17 @@ function create_each_block4(ctx) { current = false; }, d(detaching) { - if_blocks[current_block_type_index].d(detaching); - if (detaching) + if (detaching) { detach(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); } }; } function create_fragment8(ctx) { let main; let current; - let each_value = ( + let each_value = ensure_array_like( /*hierarchy*/ ctx[0].children ); @@ -40113,7 +40600,7 @@ function create_fragment8(ctx) { for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - attr(main, "class", "svelte-1lnl15d"); + attr(main, "class", "svelte-hup5mn"); toggle_class( main, "topLevel", @@ -40131,10 +40618,12 @@ function create_fragment8(ctx) { current = true; }, p(ctx2, [dirty]) { - if (dirty & /*hierarchy, plugin, view, fileType, FileType, closed, fold, side, unstage, stage, discard*/ + if (dirty & /*hierarchy, plugin, view, fileType, closed, fold, side, unstage, stage, discard*/ 2031) { - each_value = /*hierarchy*/ - ctx2[0].children; + each_value = ensure_array_like( + /*hierarchy*/ + ctx2[0].children + ); let i; for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context4(ctx2, each_value, i); @@ -40180,8 +40669,9 @@ function create_fragment8(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } destroy_each(each_blocks, detaching); } }; @@ -40284,7 +40774,7 @@ var treeComponent_default = TreeComponent; // src/ui/sourceControl/sourceControl.svelte function add_css8(target) { - append_styles(target, "svelte-48bivb", `.commit-msg-input.svelte-48bivb.svelte-48bivb{width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field)}.git-commit-msg.svelte-48bivb.svelte-48bivb{position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto}main.svelte-48bivb .git-tools .files-count.svelte-48bivb{padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center}.git-commit-msg-clear-button.svelte-48bivb.svelte-48bivb{position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out}.git-commit-msg-clear-button.svelte-48bivb.svelte-48bivb:after{content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat}`); + append_styles(target, "svelte-1bvmxec", `.commit-msg-input.svelte-1bvmxec.svelte-1bvmxec{width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field)}.git-commit-msg.svelte-1bvmxec.svelte-1bvmxec{position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto}main.svelte-1bvmxec .git-tools .files-count.svelte-1bvmxec{padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center}.nav-folder-title.svelte-1bvmxec.svelte-1bvmxec{align-items:center}.git-commit-msg-clear-button.svelte-1bvmxec.svelte-1bvmxec{position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out}.git-commit-msg-clear-button.svelte-1bvmxec.svelte-1bvmxec:after{content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat}`); } function get_each_context5(ctx, list, i) { const child_ctx = ctx.slice(); @@ -40309,7 +40799,7 @@ function create_if_block_8(ctx) { return { c() { div = element("div"); - attr(div, "class", "git-commit-msg-clear-button svelte-48bivb"); + attr(div, "class", "git-commit-msg-clear-button svelte-1bvmxec"); attr(div, "aria-label", div_aria_label_value = "Clear"); }, m(target, anchor) { @@ -40326,8 +40816,9 @@ function create_if_block_8(ctx) { }, p: noop, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } mounted = false; dispose(); } @@ -40437,18 +40928,22 @@ function create_if_block8(ctx) { if (if_block2) if_block2.c(); attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class(div0, "is-collapsed", !/*stagedOpen*/ + ctx[13]); attr(div1, "class", "tree-item-inner nav-folder-title-content"); attr(div2, "data-icon", "minus"); attr(div2, "aria-label", "Unstage"); attr(div2, "class", "clickable-icon"); attr(div3, "class", "buttons"); - attr(div4, "class", "files-count svelte-48bivb"); + attr(div4, "class", "files-count svelte-1bvmxec"); attr(div5, "class", "git-tools"); - attr(div6, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div6, "class", "tree-item-self is-clickable nav-folder-title svelte-1bvmxec"); attr(div7, "class", "staged tree-item nav-folder"); toggle_class(div7, "is-collapsed", !/*stagedOpen*/ ctx[13]); attr(div8, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class(div8, "is-collapsed", !/*changesOpen*/ + ctx[12]); attr(div9, "class", "tree-item-inner nav-folder-title-content"); attr(div10, "data-icon", "undo"); attr(div10, "aria-label", "Discard"); @@ -40457,10 +40952,10 @@ function create_if_block8(ctx) { attr(div11, "aria-label", "Stage"); attr(div11, "class", "clickable-icon"); attr(div12, "class", "buttons"); - attr(div13, "class", "files-count svelte-48bivb"); + attr(div13, "class", "files-count svelte-1bvmxec"); attr(div14, "class", "git-tools"); - attr(div15, "class", "tree-item-self is-clickable nav-folder-title"); - attr(div16, "class", "changes nav-folder"); + attr(div15, "class", "tree-item-self is-clickable nav-folder-title svelte-1bvmxec"); + attr(div16, "class", "changes tree-item nav-folder"); toggle_class(div16, "is-collapsed", !/*changesOpen*/ ctx[12]); attr(div17, "class", "tree-item-children nav-folder-children"); @@ -40539,6 +41034,11 @@ function create_if_block8(ctx) { } }, p(ctx2, dirty) { + if (!current || dirty[0] & /*stagedOpen*/ + 8192) { + toggle_class(div0, "is-collapsed", !/*stagedOpen*/ + ctx2[13]); + } if ((!current || dirty[0] & /*status*/ 64) && t4_value !== (t4_value = /*status*/ ctx2[6].staged.length + "")) @@ -40571,6 +41071,11 @@ function create_if_block8(ctx) { toggle_class(div7, "is-collapsed", !/*stagedOpen*/ ctx2[13]); } + if (!current || dirty[0] & /*changesOpen*/ + 4096) { + toggle_class(div8, "is-collapsed", !/*changesOpen*/ + ctx2[12]); + } if ((!current || dirty[0] & /*status*/ 64) && t12_value !== (t12_value = /*status*/ ctx2[6].changed.length + "")) @@ -40642,8 +41147,9 @@ function create_if_block8(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div18); + } ctx[34](null); if (if_block0) if_block0.d(); @@ -40733,8 +41239,9 @@ function create_if_block_6(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } if_blocks[current_block_type_index].d(); if (detaching && div_transition) div_transition.end(); @@ -40744,7 +41251,7 @@ function create_if_block_6(ctx) { function create_else_block_2(ctx) { let each_1_anchor; let current; - let each_value_2 = ( + let each_value_2 = ensure_array_like( /*status*/ ctx[6].staged ); @@ -40774,8 +41281,10 @@ function create_else_block_2(ctx) { p(ctx2, dirty) { if (dirty[0] & /*status, view, plugin*/ 67) { - each_value_2 = /*status*/ - ctx2[6].staged; + each_value_2 = ensure_array_like( + /*status*/ + ctx2[6].staged + ); let i; for (i = 0; i < each_value_2.length; i += 1) { const child_ctx = get_each_context_2(ctx2, each_value_2, i); @@ -40812,9 +41321,10 @@ function create_else_block_2(ctx) { current = false; }, d(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) + if (detaching) { detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); } }; } @@ -41012,8 +41522,9 @@ function create_if_block_42(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } if_blocks[current_block_type_index].d(); if (detaching && div_transition) div_transition.end(); @@ -41023,7 +41534,7 @@ function create_if_block_42(ctx) { function create_else_block_12(ctx) { let each_1_anchor; let current; - let each_value_1 = ( + let each_value_1 = ensure_array_like( /*status*/ ctx[6].changed ); @@ -41053,8 +41564,10 @@ function create_else_block_12(ctx) { p(ctx2, dirty) { if (dirty[0] & /*status, view, plugin*/ 67) { - each_value_1 = /*status*/ - ctx2[6].changed; + each_value_1 = ensure_array_like( + /*status*/ + ctx2[6].changed + ); let i; for (i = 0; i < each_value_1.length; i += 1) { const child_ctx = get_each_context_1(ctx2, each_value_1, i); @@ -41091,9 +41604,10 @@ function create_else_block_12(ctx) { current = false; }, d(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) + if (detaching) { detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); } }; } @@ -41255,7 +41769,7 @@ function create_if_block_14(ctx) { attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); attr(div1, "class", "tree-item-inner nav-folder-title-content"); attr(span, "class", "tree-item-flair"); - attr(div2, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div2, "class", "tree-item-self is-clickable nav-folder-title svelte-1bvmxec"); attr(div3, "class", "pulled nav-folder"); toggle_class(div3, "is-collapsed", !/*lastPulledFilesOpen*/ ctx[14]); @@ -41328,8 +41842,9 @@ function create_if_block_14(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div3); + } if (if_block) if_block.d(); mounted = false; @@ -41413,8 +41928,9 @@ function create_if_block_23(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(div); + } if_blocks[current_block_type_index].d(); if (detaching && div_transition) div_transition.end(); @@ -41424,7 +41940,7 @@ function create_if_block_23(ctx) { function create_else_block4(ctx) { let each_1_anchor; let current; - let each_value = ( + let each_value = ensure_array_like( /*lastPulledFiles*/ ctx[7] ); @@ -41454,8 +41970,10 @@ function create_else_block4(ctx) { p(ctx2, dirty) { if (dirty[0] & /*lastPulledFiles, view*/ 130) { - each_value = /*lastPulledFiles*/ - ctx2[7]; + each_value = ensure_array_like( + /*lastPulledFiles*/ + ctx2[7] + ); let i; for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context5(ctx2, each_value, i); @@ -41492,9 +42010,10 @@ function create_else_block4(ctx) { current = false; }, d(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) + if (detaching) { detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); } }; } @@ -41634,6 +42153,7 @@ function create_fragment9(ctx) { let t8; let t9; let div11; + let main_data_type_value; let current; let mounted; let dispose; @@ -41723,13 +42243,14 @@ function create_fragment9(ctx) { /*rows*/ ctx[15] ); - attr(textarea, "class", "commit-msg-input svelte-48bivb"); + attr(textarea, "class", "commit-msg-input svelte-1bvmxec"); attr(textarea, "spellcheck", "true"); attr(textarea, "placeholder", "Commit Message"); - attr(div10, "class", "git-commit-msg svelte-48bivb"); + attr(div10, "class", "git-commit-msg svelte-1bvmxec"); attr(div11, "class", "nav-files-container"); set_style(div11, "position", "relative"); - attr(main, "class", "svelte-48bivb"); + attr(main, "data-type", main_data_type_value = SOURCE_CONTROL_VIEW_CONFIG.type); + attr(main, "class", "svelte-1bvmxec"); }, m(target, anchor) { insert(target, main, anchor); @@ -41908,8 +42429,9 @@ function create_fragment9(ctx) { current = false; }, d(detaching) { - if (detaching) + if (detaching) { detach(main); + } ctx[23](null); ctx[24](null); ctx[25](null); @@ -41951,8 +42473,8 @@ function instance9($$self, $$props, $$invalidate) { plugin.app.workspace.onLayoutReady(() => { window.setTimeout( () => { - buttons.forEach((btn) => (0, import_obsidian28.setIcon)(btn, btn.getAttr("data-icon"), 16)); - (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + buttons.forEach((btn) => (0, import_obsidian28.setIcon)(btn, btn.getAttr("data-icon"))); + (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder"); }, 0 ); @@ -41968,12 +42490,12 @@ function instance9($$self, $$props, $$invalidate) { plugin.setState(0 /* idle */); return false; } - plugin.gitManager.commit(commitMessage).then(() => { + plugin.promiseQueue.addTask(() => plugin.gitManager.commit(commitMessage).then(() => { if (commitMessage !== plugin.settings.commitMessage) { $$invalidate(2, commitMessage = ""); } plugin.setUpAutoBackup(); - }).finally(triggerRefresh2); + }).finally(triggerRefresh2)); } }); } @@ -41981,11 +42503,11 @@ function instance9($$self, $$props, $$invalidate) { return __awaiter(this, void 0, void 0, function* () { $$invalidate(5, loading = true); if (status2) { - plugin.createBackup(false, false, commitMessage).then(() => { + plugin.promiseQueue.addTask(() => plugin.createBackup(false, false, commitMessage).then(() => { if (commitMessage !== plugin.settings.commitMessage) { $$invalidate(2, commitMessage = ""); } - }).finally(triggerRefresh2); + }).finally(triggerRefresh2)); } }); } @@ -41995,6 +42517,21 @@ function instance9($$self, $$props, $$invalidate) { $$invalidate(6, status2 = void 0); return; } + const unPushedCommits = yield plugin.gitManager.getUnpushedCommits(); + buttons.forEach((btn) => { + var _a2, _b; + if (import_obsidian28.Platform.isMobile) { + btn.removeClass("button-border"); + if (btn.id == "push" && unPushedCommits > 0) { + btn.addClass("button-border"); + } + } else { + (_a2 = btn.firstElementChild) === null || _a2 === void 0 ? void 0 : _a2.removeAttribute("color"); + if (btn.id == "push" && unPushedCommits > 0) { + (_b = btn.firstElementChild) === null || _b === void 0 ? void 0 : _b.setAttr("color", "var(--text-accent)"); + } + } + }); $$invalidate(6, status2 = plugin.cachedStatus); if (plugin.lastPulledFiles && plugin.lastPulledFiles != lastPulledFiles) { $$invalidate(7, lastPulledFiles = plugin.lastPulledFiles); @@ -42039,26 +42576,26 @@ function instance9($$self, $$props, $$invalidate) { } function stageAll() { $$invalidate(5, loading = true); - plugin.gitManager.stageAll({ status: status2 }).finally(triggerRefresh2); + plugin.promiseQueue.addTask(() => plugin.gitManager.stageAll({ status: status2 }).finally(triggerRefresh2)); } function unstageAll() { $$invalidate(5, loading = true); - plugin.gitManager.unstageAll({ status: status2 }).finally(triggerRefresh2); + plugin.promiseQueue.addTask(() => plugin.gitManager.unstageAll({ status: status2 }).finally(triggerRefresh2)); } function push2() { $$invalidate(5, loading = true); - plugin.push().finally(triggerRefresh2); + plugin.promiseQueue.addTask(() => plugin.push().finally(triggerRefresh2)); } function pull2() { $$invalidate(5, loading = true); - plugin.pullChangesFromRemote().finally(triggerRefresh2); + plugin.promiseQueue.addTask(() => plugin.pullChangesFromRemote().finally(triggerRefresh2)); } function discard() { new DiscardModal(view.app, false, plugin.gitManager.getVaultPath("/")).myOpen().then((shouldDiscard) => { if (shouldDiscard === true) { - plugin.gitManager.discardAll({ status: plugin.cachedStatus }).finally(() => { + plugin.promiseQueue.addTask(() => plugin.gitManager.discardAll({ status: plugin.cachedStatus }).finally(() => { dispatchEvent(new CustomEvent("git-refresh")); - }); + })); } }); } @@ -42147,7 +42684,7 @@ function instance9($$self, $$props, $$invalidate) { $: { if (layoutBtn) { layoutBtn.empty(); - (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder"); } } } @@ -42418,18 +42955,29 @@ var ObsidianGit = class extends import_obsidian30.Plugin { this.addCommand({ id: "view-file-on-github", name: "Open file on GitHub", - editorCallback: (editor, { file }) => openLineInGitHub(editor, file, this.gitManager) + editorCallback: (editor, { file }) => { + if (file) + return openLineInGitHub(editor, file, this.gitManager); + } }); this.addCommand({ id: "view-history-on-github", name: "Open file history on GitHub", - editorCallback: (_, { file }) => openHistoryInGitHub(file, this.gitManager) + editorCallback: (_, { file }) => { + if (file) + return openHistoryInGitHub(file, this.gitManager); + } }); this.addCommand({ id: "pull", name: "Pull", callback: () => this.promiseQueue.addTask(() => this.pullChangesFromRemote()) }); + this.addCommand({ + id: "fetch", + name: "fetch", + callback: () => this.promiseQueue.addTask(() => this.fetch()) + }); this.addCommand({ id: "switch-to-remote-branch", name: "Switch to remote branch", @@ -42790,6 +43338,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { "git-head-update", this.refreshUpdatedHead.bind(this) ); + this.app.workspace.offref(this.openEvent); this.app.metadataCache.offref(this.modifyEvent); this.app.metadataCache.offref(this.deleteEvent); this.app.metadataCache.offref(this.createEvent); @@ -42815,7 +43364,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { (_a2 = this.settingsTab) == null ? void 0 : _a2.beforeSaveSettings(); await this.saveData(this.settings); } - async saveLastAuto(date, mode) { + saveLastAuto(date, mode) { if (mode === "backup") { this.localStorage.setLastAutoBackup(date.toString()); } else if (mode === "pull") { @@ -42824,7 +43373,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { this.localStorage.setLastAutoPush(date.toString()); } } - async loadLastAuto() { + loadLastAuto() { var _a2, _b, _c; return { backup: new Date((_a2 = this.localStorage.getLastAutoBackup()) != null ? _a2 : ""), @@ -42859,6 +43408,10 @@ var ObsidianGit = class extends import_obsidian30.Plugin { case "valid": this.gitReady = true; this.setState(0 /* idle */); + this.openEvent = this.app.workspace.on( + "active-leaf-change", + (leaf) => this.handleViewActiveState(leaf) + ); this.modifyEvent = this.app.vault.on("modify", () => { this.debRefresh(); }); @@ -42906,7 +43459,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { if (url) { const confirmOption = "Vault Root"; let dir = await new GeneralModal({ - options: [confirmOption], + options: this.gitManager instanceof IsomorphicGit ? [confirmOption] : [], placeholder: "Enter directory for clone. It needs to be empty or not existent.", allowEmpty: this.gitManager instanceof IsomorphicGit }).open(); @@ -43044,13 +43597,17 @@ var ObsidianGit = class extends import_obsidian30.Plugin { }) { if (!await this.isAllInitialized()) return false; - const hadConflict = this.localStorage.getConflict() === "true"; + let hadConflict = this.localStorage.getConflict() === "true"; let changedFiles; let status2; let unstagedFiles; if (this.gitManager instanceof SimpleGit) { this.mayDeleteConflictFile(); status2 = await this.updateCachedStatus(); + if (status2.conflicted.length == 0) { + this.localStorage.setConflict("false"); + hadConflict = false; + } if (fromAutoBackup && status2.conflicted.length > 0) { this.displayError( `Did not commit, because you have conflicts in ${status2.conflicted.length} ${status2.conflicted.length == 1 ? "file" : "files"}. Please resolve them and commit per command.` @@ -43107,15 +43664,16 @@ var ObsidianGit = class extends import_obsidian30.Plugin { committedFiles = await this.gitManager.commit(cmtMessage); } else { committedFiles = await this.gitManager.commitAll({ - // A type error occurs here because `this.settings.autoCommitMessage` is possibly undefined. - // However, since `this.settings.autoCommitMessage` is always set to string in `this.migrateSettings`, - // `undefined` is never passed here. Therefore, temporarily ignore this error. - // @ts-ignore message: cmtMessage, status: status2, unstagedFiles }); } + if (this.gitManager instanceof SimpleGit) { + if ((await this.updateCachedStatus()).conflicted.length == 0) { + this.localStorage.setConflict("false"); + } + } let roughly = false; if (committedFiles === void 0) { roughly = true; @@ -43193,6 +43751,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } this.offlineMode = false; this.setState(0 /* idle */); + dispatchEvent(new CustomEvent("git-refresh")); return true; } } @@ -43212,6 +43771,15 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } return pulledFiles.length != 0; } + async fetch() { + if (!await this.remotesAreSet()) { + return; + } + await this.gitManager.fetch(); + this.displayMessage(`Fetched from remote`); + this.offlineMode = false; + dispatchEvent(new CustomEvent("git-refresh")); + } async mayDeleteConflictFile() { const file = this.app.vault.getAbstractFileByPath( this.conflictOutputFile @@ -43585,6 +44153,36 @@ I strongly recommend to use "Source mode" for viewing the conflicted files. For this.app.workspace.openLinkText(this.conflictOutputFile, "/", true); } } + handleViewActiveState(leaf) { + var _a2, _b; + if (!(leaf == null ? void 0 : leaf.view.getState().file)) + return; + const sourceControlLeaf = this.app.workspace.getLeavesOfType(SOURCE_CONTROL_VIEW_CONFIG.type).first(); + const historyLeaf = this.app.workspace.getLeavesOfType(HISTORY_VIEW_CONFIG.type).first(); + (_a2 = sourceControlLeaf == null ? void 0 : sourceControlLeaf.view.containerEl.querySelector(`div.nav-file-title.is-active`)) == null ? void 0 : _a2.removeClass("is-active"); + (_b = historyLeaf == null ? void 0 : historyLeaf.view.containerEl.querySelector(`div.nav-file-title.is-active`)) == null ? void 0 : _b.removeClass("is-active"); + if ((leaf == null ? void 0 : leaf.view) instanceof DiffView) { + const path2 = leaf.view.state.file; + this.lastDiffViewState = leaf.view.getState(); + let el; + if (sourceControlLeaf && leaf.view.state.staged) { + el = sourceControlLeaf.view.containerEl.querySelector( + `div.staged div.nav-file-title[data-path='${path2}']` + ); + } else if (sourceControlLeaf && leaf.view.state.staged === false && !leaf.view.state.hash) { + el = sourceControlLeaf.view.containerEl.querySelector( + `div.changes div.nav-file-title[data-path='${path2}']` + ); + } else if (historyLeaf && leaf.view.state.hash) { + el = historyLeaf.view.containerEl.querySelector( + `div.nav-file-title[data-path='${path2}']` + ); + } + el == null ? void 0 : el.addClass("is-active"); + } else { + this.lastDiffViewState = void 0; + } + } // region: displaying / formatting messages displayMessage(message, timeout = 4 * 1e3) { var _a2; diff --git a/.obsidian/plugins/obsidian-git/manifest.json b/.obsidian/plugins/obsidian-git/manifest.json index 813daf5..a771a54 100644 --- a/.obsidian/plugins/obsidian-git/manifest.json +++ b/.obsidian/plugins/obsidian-git/manifest.json @@ -5,5 +5,5 @@ "isDesktopOnly": false, "fundingUrl": "https://ko-fi.com/vinzent", "js": "main.js", - "version": "2.20.0" + "version": "2.22.0" } diff --git a/.obsidian/plugins/obsidian-git/styles.css b/.obsidian/plugins/obsidian-git/styles.css index 39cdb13..c1d5065 100644 --- a/.obsidian/plugins/obsidian-git/styles.css +++ b/.obsidian/plugins/obsidian-git/styles.css @@ -8,6 +8,11 @@ } } +.workspace-leaf-content[data-type='git-view'] .button-border { + border: 2px solid var(--interactive-accent); + border-radius: var(--radius-s); +} + .workspace-leaf-content[data-type='git-view'] .view-content { padding: 0; }