@sourcegraph/cody-web 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1721,13 +1721,13 @@ function baseIsNative$1(value) {
1721
1721
  return pattern.test(toSource$1(value));
1722
1722
  }
1723
1723
  var _baseIsNative = baseIsNative$1;
1724
- function getValue$1(object, key) {
1725
- return object == null ? void 0 : object[key];
1724
+ function getValue$1(object2, key) {
1725
+ return object2 == null ? void 0 : object2[key];
1726
1726
  }
1727
1727
  var _getValue = getValue$1;
1728
1728
  var baseIsNative = _baseIsNative, getValue = _getValue;
1729
- function getNative$7(object, key) {
1730
- var value = getValue(object, key);
1729
+ function getNative$7(object2, key) {
1730
+ var value = getValue(object2, key);
1731
1731
  return baseIsNative(value) ? value : void 0;
1732
1732
  }
1733
1733
  var _getNative = getNative$7;
@@ -1989,48 +1989,48 @@ var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
1989
1989
  var boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", symbolTag$3 = "[object Symbol]";
1990
1990
  var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]";
1991
1991
  var symbolProto$2 = Symbol$4 ? Symbol$4.prototype : void 0, symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : void 0;
1992
- function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
1992
+ function equalByTag$1(object2, other, tag, bitmask, customizer, equalFunc, stack) {
1993
1993
  switch (tag) {
1994
1994
  case dataViewTag$4:
1995
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
1995
+ if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) {
1996
1996
  return false;
1997
1997
  }
1998
- object = object.buffer;
1998
+ object2 = object2.buffer;
1999
1999
  other = other.buffer;
2000
2000
  case arrayBufferTag$3:
2001
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$2(object), new Uint8Array$2(other))) {
2001
+ if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array$2(object2), new Uint8Array$2(other))) {
2002
2002
  return false;
2003
2003
  }
2004
2004
  return true;
2005
2005
  case boolTag$3:
2006
2006
  case dateTag$3:
2007
2007
  case numberTag$3:
2008
- return eq$4(+object, +other);
2008
+ return eq$4(+object2, +other);
2009
2009
  case errorTag$2:
2010
- return object.name == other.name && object.message == other.message;
2010
+ return object2.name == other.name && object2.message == other.message;
2011
2011
  case regexpTag$3:
2012
2012
  case stringTag$3:
2013
- return object == other + "";
2013
+ return object2 == other + "";
2014
2014
  case mapTag$5:
2015
2015
  var convert = mapToArray;
2016
2016
  case setTag$5:
2017
2017
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
2018
2018
  convert || (convert = setToArray);
2019
- if (object.size != other.size && !isPartial) {
2019
+ if (object2.size != other.size && !isPartial) {
2020
2020
  return false;
2021
2021
  }
2022
- var stacked = stack.get(object);
2022
+ var stacked = stack.get(object2);
2023
2023
  if (stacked) {
2024
2024
  return stacked == other;
2025
2025
  }
2026
2026
  bitmask |= COMPARE_UNORDERED_FLAG;
2027
- stack.set(object, other);
2028
- var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
2029
- stack["delete"](object);
2027
+ stack.set(object2, other);
2028
+ var result = equalArrays$1(convert(object2), convert(other), bitmask, customizer, equalFunc, stack);
2029
+ stack["delete"](object2);
2030
2030
  return result;
2031
2031
  case symbolTag$3:
2032
2032
  if (symbolValueOf$1) {
2033
- return symbolValueOf$1.call(object) == symbolValueOf$1.call(other);
2033
+ return symbolValueOf$1.call(object2) == symbolValueOf$1.call(other);
2034
2034
  }
2035
2035
  }
2036
2036
  return false;
@@ -2047,9 +2047,9 @@ var _arrayPush = arrayPush$3;
2047
2047
  var isArray$8 = Array.isArray;
2048
2048
  var isArray_1 = isArray$8;
2049
2049
  var arrayPush$2 = _arrayPush, isArray$7 = isArray_1;
2050
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
2051
- var result = keysFunc(object);
2052
- return isArray$7(object) ? result : arrayPush$2(result, symbolsFunc(object));
2050
+ function baseGetAllKeys$2(object2, keysFunc, symbolsFunc) {
2051
+ var result = keysFunc(object2);
2052
+ return isArray$7(object2) ? result : arrayPush$2(result, symbolsFunc(object2));
2053
2053
  }
2054
2054
  var _baseGetAllKeys = baseGetAllKeys$2;
2055
2055
  function arrayFilter$1(array2, predicate) {
@@ -2071,13 +2071,13 @@ var arrayFilter = _arrayFilter, stubArray$1 = stubArray_1;
2071
2071
  var objectProto$a = Object.prototype;
2072
2072
  var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
2073
2073
  var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2074
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
2075
- if (object == null) {
2074
+ var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object2) {
2075
+ if (object2 == null) {
2076
2076
  return [];
2077
2077
  }
2078
- object = Object(object);
2079
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2080
- return propertyIsEnumerable$1.call(object, symbol);
2078
+ object2 = Object(object2);
2079
+ return arrayFilter(nativeGetSymbols$1(object2), function(symbol) {
2080
+ return propertyIsEnumerable$1.call(object2, symbol);
2081
2081
  });
2082
2082
  };
2083
2083
  var _getSymbols = getSymbols$3;
@@ -2215,13 +2215,13 @@ var _nativeKeys = nativeKeys$1;
2215
2215
  var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
2216
2216
  var objectProto$6 = Object.prototype;
2217
2217
  var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
2218
- function baseKeys$1(object) {
2219
- if (!isPrototype$2(object)) {
2220
- return nativeKeys(object);
2218
+ function baseKeys$1(object2) {
2219
+ if (!isPrototype$2(object2)) {
2220
+ return nativeKeys(object2);
2221
2221
  }
2222
2222
  var result = [];
2223
- for (var key in Object(object)) {
2224
- if (hasOwnProperty$6.call(object, key) && key != "constructor") {
2223
+ for (var key in Object(object2)) {
2224
+ if (hasOwnProperty$6.call(object2, key) && key != "constructor") {
2225
2225
  result.push(key);
2226
2226
  }
2227
2227
  }
@@ -2234,21 +2234,21 @@ function isArrayLike$2(value) {
2234
2234
  }
2235
2235
  var isArrayLike_1 = isArrayLike$2;
2236
2236
  var arrayLikeKeys$1 = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike$1 = isArrayLike_1;
2237
- function keys$3(object) {
2238
- return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
2237
+ function keys$3(object2) {
2238
+ return isArrayLike$1(object2) ? arrayLikeKeys$1(object2) : baseKeys(object2);
2239
2239
  }
2240
2240
  var keys_1 = keys$3;
2241
2241
  var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols$2 = _getSymbols, keys$2 = keys_1;
2242
- function getAllKeys$2(object) {
2243
- return baseGetAllKeys$1(object, keys$2, getSymbols$2);
2242
+ function getAllKeys$2(object2) {
2243
+ return baseGetAllKeys$1(object2, keys$2, getSymbols$2);
2244
2244
  }
2245
2245
  var _getAllKeys = getAllKeys$2;
2246
2246
  var getAllKeys$1 = _getAllKeys;
2247
2247
  var COMPARE_PARTIAL_FLAG$1 = 1;
2248
2248
  var objectProto$5 = Object.prototype;
2249
2249
  var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
2250
- function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
2251
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys$1(object), objLength = objProps.length, othProps = getAllKeys$1(other), othLength = othProps.length;
2250
+ function equalObjects$1(object2, other, bitmask, customizer, equalFunc, stack) {
2251
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys$1(object2), objLength = objProps.length, othProps = getAllKeys$1(other), othLength = othProps.length;
2252
2252
  if (objLength != othLength && !isPartial) {
2253
2253
  return false;
2254
2254
  }
@@ -2259,20 +2259,20 @@ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
2259
2259
  return false;
2260
2260
  }
2261
2261
  }
2262
- var objStacked = stack.get(object);
2262
+ var objStacked = stack.get(object2);
2263
2263
  var othStacked = stack.get(other);
2264
2264
  if (objStacked && othStacked) {
2265
- return objStacked == other && othStacked == object;
2265
+ return objStacked == other && othStacked == object2;
2266
2266
  }
2267
2267
  var result = true;
2268
- stack.set(object, other);
2269
- stack.set(other, object);
2268
+ stack.set(object2, other);
2269
+ stack.set(other, object2);
2270
2270
  var skipCtor = isPartial;
2271
2271
  while (++index < objLength) {
2272
2272
  key = objProps[index];
2273
- var objValue = object[key], othValue = other[key];
2273
+ var objValue = object2[key], othValue = other[key];
2274
2274
  if (customizer) {
2275
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
2275
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue, othValue, key, object2, other, stack);
2276
2276
  }
2277
2277
  if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
2278
2278
  result = false;
@@ -2281,12 +2281,12 @@ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
2281
2281
  skipCtor || (skipCtor = key == "constructor");
2282
2282
  }
2283
2283
  if (result && !skipCtor) {
2284
- var objCtor = object.constructor, othCtor = other.constructor;
2285
- if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
2284
+ var objCtor = object2.constructor, othCtor = other.constructor;
2285
+ if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
2286
2286
  result = false;
2287
2287
  }
2288
2288
  }
2289
- stack["delete"](object);
2289
+ stack["delete"](object2);
2290
2290
  stack["delete"](other);
2291
2291
  return result;
2292
2292
  }
@@ -2334,12 +2334,12 @@ var COMPARE_PARTIAL_FLAG = 1;
2334
2334
  var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", objectTag$2 = "[object Object]";
2335
2335
  var objectProto$4 = Object.prototype;
2336
2336
  var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
2337
- function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
2338
- var objIsArr = isArray$5(object), othIsArr = isArray$5(other), objTag = objIsArr ? arrayTag$1 : getTag$3(object), othTag = othIsArr ? arrayTag$1 : getTag$3(other);
2337
+ function baseIsEqualDeep$1(object2, other, bitmask, customizer, equalFunc, stack) {
2338
+ var objIsArr = isArray$5(object2), othIsArr = isArray$5(other), objTag = objIsArr ? arrayTag$1 : getTag$3(object2), othTag = othIsArr ? arrayTag$1 : getTag$3(other);
2339
2339
  objTag = objTag == argsTag$1 ? objectTag$2 : objTag;
2340
2340
  othTag = othTag == argsTag$1 ? objectTag$2 : othTag;
2341
2341
  var objIsObj = objTag == objectTag$2, othIsObj = othTag == objectTag$2, isSameTag = objTag == othTag;
2342
- if (isSameTag && isBuffer$1(object)) {
2342
+ if (isSameTag && isBuffer$1(object2)) {
2343
2343
  if (!isBuffer$1(other)) {
2344
2344
  return false;
2345
2345
  }
@@ -2348,12 +2348,12 @@ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack)
2348
2348
  }
2349
2349
  if (isSameTag && !objIsObj) {
2350
2350
  stack || (stack = new Stack$1());
2351
- return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
2351
+ return objIsArr || isTypedArray(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
2352
2352
  }
2353
2353
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
2354
- var objIsWrapped = objIsObj && hasOwnProperty$4.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$4.call(other, "__wrapped__");
2354
+ var objIsWrapped = objIsObj && hasOwnProperty$4.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$4.call(other, "__wrapped__");
2355
2355
  if (objIsWrapped || othIsWrapped) {
2356
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
2356
+ var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
2357
2357
  stack || (stack = new Stack$1());
2358
2358
  return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
2359
2359
  }
@@ -2362,7 +2362,7 @@ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack)
2362
2362
  return false;
2363
2363
  }
2364
2364
  stack || (stack = new Stack$1());
2365
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
2365
+ return equalObjects(object2, other, bitmask, customizer, equalFunc, stack);
2366
2366
  }
2367
2367
  var _baseIsEqualDeep = baseIsEqualDeep$1;
2368
2368
  var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike$4 = isObjectLike_1;
@@ -3261,67 +3261,6 @@ function proxyStringWithNodeFallback(envValue) {
3261
3261
  }
3262
3262
  return void 0;
3263
3263
  }
3264
- const DOTCOM_URL = new URL(cenv.CODY_OVERRIDE_DOTCOM_URL || "https://sourcegraph.com/");
3265
- function isDotCom(arg) {
3266
- const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3267
- if (url === void 0) {
3268
- return false;
3269
- }
3270
- try {
3271
- return new URL(url).origin === DOTCOM_URL.origin;
3272
- } catch {
3273
- return false;
3274
- }
3275
- }
3276
- const S2_URL = new URL("https://sourcegraph.sourcegraph.com/");
3277
- function isS2(arg) {
3278
- const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3279
- if (url === void 0) {
3280
- return false;
3281
- }
3282
- try {
3283
- return new URL(url).origin === S2_URL.origin;
3284
- } catch {
3285
- return false;
3286
- }
3287
- }
3288
- function isCodyProUser(authStatus2, sub) {
3289
- return isDotCom(authStatus2) && authStatus2.authenticated && sub !== null && !sub.userCanUpgrade;
3290
- }
3291
- function isEnterpriseUser(authStatus2) {
3292
- return !isDotCom(authStatus2);
3293
- }
3294
- const _authStatus = fromLateSetSource();
3295
- let hasSetAuthStatusObservable = false;
3296
- function setAuthStatusObservable(input) {
3297
- if (hasSetAuthStatusObservable) {
3298
- throw new Error("setAuthStatusObservable must be called exactly once total");
3299
- }
3300
- hasSetAuthStatusObservable = true;
3301
- _authStatus.setSource(input.pipe(distinctUntilChanged()));
3302
- }
3303
- const authStatus = _authStatus.observable.pipe(shareReplay());
3304
- const { value: syncValue, subscription: syncValueSubscription } = storeLastValue(authStatus);
3305
- function currentAuthStatus() {
3306
- if (!syncValue.isSet) {
3307
- throw new Error("AuthStatus is not initialized");
3308
- }
3309
- return syncValue.last;
3310
- }
3311
- function currentAuthStatusAuthed() {
3312
- const authStatus2 = currentAuthStatus();
3313
- if (!authStatus2.authenticated) {
3314
- throw new Error("Not authenticated");
3315
- }
3316
- return authStatus2;
3317
- }
3318
- function currentAuthStatusOrNotReadyYet() {
3319
- return syncValue.last;
3320
- }
3321
- function isDotComAuthed() {
3322
- const authStatus2 = currentAuthStatusOrNotReadyYet();
3323
- return Boolean((authStatus2 == null ? void 0 : authStatus2.authenticated) && isDotCom(authStatus2));
3324
- }
3325
3264
  const consoleLogger = {
3326
3265
  logDebug(filterLabel, text, ...args) {
3327
3266
  console.log(`${filterLabel}: ${text}`, ...args);
@@ -3474,6 +3413,92 @@ async function firstResultFromOperation(observable, signal) {
3474
3413
  }
3475
3414
  return result;
3476
3415
  }
3416
+ const DOTCOM_URL = new URL(cenv.CODY_OVERRIDE_DOTCOM_URL || "https://sourcegraph.com/");
3417
+ function isDotCom(arg) {
3418
+ const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3419
+ if (url === void 0) {
3420
+ return false;
3421
+ }
3422
+ try {
3423
+ return new URL(url).origin === DOTCOM_URL.origin;
3424
+ } catch {
3425
+ return false;
3426
+ }
3427
+ }
3428
+ const S2_URL = new URL("https://sourcegraph.sourcegraph.com/");
3429
+ function isS2(arg) {
3430
+ const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3431
+ if (url === void 0) {
3432
+ return false;
3433
+ }
3434
+ try {
3435
+ return new URL(url).origin === S2_URL.origin;
3436
+ } catch {
3437
+ return false;
3438
+ }
3439
+ }
3440
+ const DOTCOM_WORKSPACE_UPGRADE_URL = new URL("https://sourcegraph.com/cody/manage");
3441
+ function getAuthErrorMessage(error2) {
3442
+ switch (error2.type) {
3443
+ case "network-error":
3444
+ return {
3445
+ title: "Network Error",
3446
+ message: "Cody is unreachable"
3447
+ };
3448
+ case "invalid-access-token":
3449
+ return {
3450
+ title: "Invalid Access Token",
3451
+ message: "The access token is invalid or has expired"
3452
+ };
3453
+ case "enterprise-user-logged-into-dotcom":
3454
+ return {
3455
+ title: "Enterprise User Authentication Error",
3456
+ message: `Based on your email address we think you may be an employee of ${error2.enterprise}. To get access to all your features please sign in through your organization's enterprise instance instead. If you need assistance please contact your Sourcegraph admin.`
3457
+ };
3458
+ }
3459
+ }
3460
+ function isCodyProUser(authStatus2, sub) {
3461
+ return isDotCom(authStatus2) && authStatus2.authenticated && sub !== null && !sub.userCanUpgrade;
3462
+ }
3463
+ function isEnterpriseUser(authStatus2) {
3464
+ return !isDotCom(authStatus2);
3465
+ }
3466
+ const _authStatus = fromLateSetSource();
3467
+ let hasSetAuthStatusObservable = false;
3468
+ function setAuthStatusObservable(input) {
3469
+ if (hasSetAuthStatusObservable) {
3470
+ throw new Error("setAuthStatusObservable must be called exactly once total");
3471
+ }
3472
+ hasSetAuthStatusObservable = true;
3473
+ _authStatus.setSource(input.pipe(distinctUntilChanged()));
3474
+ }
3475
+ const authStatus = _authStatus.observable.pipe(shareReplay());
3476
+ const { value: syncValue, subscription: syncValueSubscription } = storeLastValue(authStatus);
3477
+ function currentAuthStatus() {
3478
+ if (!syncValue.isSet) {
3479
+ throw new Error("AuthStatus is not initialized");
3480
+ }
3481
+ return syncValue.last;
3482
+ }
3483
+ function currentAuthStatusAuthed() {
3484
+ const authStatus2 = currentAuthStatus();
3485
+ if (!authStatus2.authenticated) {
3486
+ throw new Error("Not authenticated");
3487
+ }
3488
+ return authStatus2;
3489
+ }
3490
+ function currentAuthStatusOrNotReadyYet() {
3491
+ return syncValue.last;
3492
+ }
3493
+ function firstNonPendingAuthStatus() {
3494
+ return firstValueFrom(
3495
+ Observable.from(authStatus).pipe(skipPendingOperation()).filter((status) => !status.pendingValidation)
3496
+ );
3497
+ }
3498
+ function isDotComAuthed() {
3499
+ const authStatus2 = currentAuthStatusOrNotReadyYet();
3500
+ return Boolean((authStatus2 == null ? void 0 : authStatus2.authenticated) && isDotCom(authStatus2));
3501
+ }
3477
3502
  async function resolveConfiguration({
3478
3503
  clientConfiguration,
3479
3504
  clientSecrets,
@@ -4183,58 +4208,58 @@ var defineProperty$2 = function() {
4183
4208
  }();
4184
4209
  var _defineProperty = defineProperty$2;
4185
4210
  var defineProperty$1 = _defineProperty;
4186
- function baseAssignValue$2(object, key, value) {
4211
+ function baseAssignValue$2(object2, key, value) {
4187
4212
  if (key == "__proto__" && defineProperty$1) {
4188
- defineProperty$1(object, key, {
4213
+ defineProperty$1(object2, key, {
4189
4214
  "configurable": true,
4190
4215
  "enumerable": true,
4191
4216
  "value": value,
4192
4217
  "writable": true
4193
4218
  });
4194
4219
  } else {
4195
- object[key] = value;
4220
+ object2[key] = value;
4196
4221
  }
4197
4222
  }
4198
4223
  var _baseAssignValue = baseAssignValue$2;
4199
4224
  var baseAssignValue$1 = _baseAssignValue, eq$3 = eq_1$1;
4200
4225
  var objectProto$3 = Object.prototype;
4201
4226
  var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
4202
- function assignValue$2(object, key, value) {
4203
- var objValue = object[key];
4204
- if (!(hasOwnProperty$3.call(object, key) && eq$3(objValue, value)) || value === void 0 && !(key in object)) {
4205
- baseAssignValue$1(object, key, value);
4227
+ function assignValue$2(object2, key, value) {
4228
+ var objValue = object2[key];
4229
+ if (!(hasOwnProperty$3.call(object2, key) && eq$3(objValue, value)) || value === void 0 && !(key in object2)) {
4230
+ baseAssignValue$1(object2, key, value);
4206
4231
  }
4207
4232
  }
4208
4233
  var _assignValue = assignValue$2;
4209
4234
  var assignValue$1 = _assignValue, baseAssignValue = _baseAssignValue;
4210
- function copyObject$5(source, props, object, customizer) {
4211
- var isNew = !object;
4212
- object || (object = {});
4235
+ function copyObject$5(source, props, object2, customizer) {
4236
+ var isNew = !object2;
4237
+ object2 || (object2 = {});
4213
4238
  var index = -1, length = props.length;
4214
4239
  while (++index < length) {
4215
4240
  var key = props[index];
4216
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
4241
+ var newValue = customizer ? customizer(object2[key], source[key], key, object2, source) : void 0;
4217
4242
  if (newValue === void 0) {
4218
4243
  newValue = source[key];
4219
4244
  }
4220
4245
  if (isNew) {
4221
- baseAssignValue(object, key, newValue);
4246
+ baseAssignValue(object2, key, newValue);
4222
4247
  } else {
4223
- assignValue$1(object, key, newValue);
4248
+ assignValue$1(object2, key, newValue);
4224
4249
  }
4225
4250
  }
4226
- return object;
4251
+ return object2;
4227
4252
  }
4228
4253
  var _copyObject = copyObject$5;
4229
4254
  var copyObject$4 = _copyObject, keys$1 = keys_1;
4230
- function baseAssign$1(object, source) {
4231
- return object && copyObject$4(source, keys$1(source), object);
4255
+ function baseAssign$1(object2, source) {
4256
+ return object2 && copyObject$4(source, keys$1(source), object2);
4232
4257
  }
4233
4258
  var _baseAssign = baseAssign$1;
4234
- function nativeKeysIn$1(object) {
4259
+ function nativeKeysIn$1(object2) {
4235
4260
  var result = [];
4236
- if (object != null) {
4237
- for (var key in Object(object)) {
4261
+ if (object2 != null) {
4262
+ for (var key in Object(object2)) {
4238
4263
  result.push(key);
4239
4264
  }
4240
4265
  }
@@ -4244,13 +4269,13 @@ var _nativeKeysIn = nativeKeysIn$1;
4244
4269
  var isObject$4 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
4245
4270
  var objectProto$2 = Object.prototype;
4246
4271
  var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
4247
- function baseKeysIn$1(object) {
4248
- if (!isObject$4(object)) {
4249
- return nativeKeysIn(object);
4272
+ function baseKeysIn$1(object2) {
4273
+ if (!isObject$4(object2)) {
4274
+ return nativeKeysIn(object2);
4250
4275
  }
4251
- var isProto = isPrototype$1(object), result = [];
4252
- for (var key in object) {
4253
- if (!(key == "constructor" && (isProto || !hasOwnProperty$2.call(object, key)))) {
4276
+ var isProto = isPrototype$1(object2), result = [];
4277
+ for (var key in object2) {
4278
+ if (!(key == "constructor" && (isProto || !hasOwnProperty$2.call(object2, key)))) {
4254
4279
  result.push(key);
4255
4280
  }
4256
4281
  }
@@ -4258,13 +4283,13 @@ function baseKeysIn$1(object) {
4258
4283
  }
4259
4284
  var _baseKeysIn = baseKeysIn$1;
4260
4285
  var arrayLikeKeys = _arrayLikeKeys, baseKeysIn = _baseKeysIn, isArrayLike = isArrayLike_1;
4261
- function keysIn$3(object) {
4262
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
4286
+ function keysIn$3(object2) {
4287
+ return isArrayLike(object2) ? arrayLikeKeys(object2, true) : baseKeysIn(object2);
4263
4288
  }
4264
4289
  var keysIn_1 = keysIn$3;
4265
4290
  var copyObject$3 = _copyObject, keysIn$2 = keysIn_1;
4266
- function baseAssignIn$1(object, source) {
4267
- return object && copyObject$3(source, keysIn$2(source), object);
4291
+ function baseAssignIn$1(object2, source) {
4292
+ return object2 && copyObject$3(source, keysIn$2(source), object2);
4268
4293
  }
4269
4294
  var _baseAssignIn = baseAssignIn$1;
4270
4295
  var _cloneBuffer = { exports: {} };
@@ -4296,8 +4321,8 @@ function copyArray$1(source, array2) {
4296
4321
  }
4297
4322
  var _copyArray = copyArray$1;
4298
4323
  var copyObject$2 = _copyObject, getSymbols$1 = _getSymbols;
4299
- function copySymbols$1(source, object) {
4300
- return copyObject$2(source, getSymbols$1(source), object);
4324
+ function copySymbols$1(source, object2) {
4325
+ return copyObject$2(source, getSymbols$1(source), object2);
4301
4326
  }
4302
4327
  var _copySymbols = copySymbols$1;
4303
4328
  var overArg = _overArg;
@@ -4305,23 +4330,23 @@ var getPrototype$3 = overArg(Object.getPrototypeOf, Object);
4305
4330
  var _getPrototype = getPrototype$3;
4306
4331
  var arrayPush$1 = _arrayPush, getPrototype$2 = _getPrototype, getSymbols = _getSymbols, stubArray = stubArray_1;
4307
4332
  var nativeGetSymbols = Object.getOwnPropertySymbols;
4308
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
4333
+ var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object2) {
4309
4334
  var result = [];
4310
- while (object) {
4311
- arrayPush$1(result, getSymbols(object));
4312
- object = getPrototype$2(object);
4335
+ while (object2) {
4336
+ arrayPush$1(result, getSymbols(object2));
4337
+ object2 = getPrototype$2(object2);
4313
4338
  }
4314
4339
  return result;
4315
4340
  };
4316
4341
  var _getSymbolsIn = getSymbolsIn$2;
4317
4342
  var copyObject$1 = _copyObject, getSymbolsIn$1 = _getSymbolsIn;
4318
- function copySymbolsIn$1(source, object) {
4319
- return copyObject$1(source, getSymbolsIn$1(source), object);
4343
+ function copySymbolsIn$1(source, object2) {
4344
+ return copyObject$1(source, getSymbolsIn$1(source), object2);
4320
4345
  }
4321
4346
  var _copySymbolsIn = copySymbolsIn$1;
4322
4347
  var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn = _getSymbolsIn, keysIn$1 = keysIn_1;
4323
- function getAllKeysIn$2(object) {
4324
- return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
4348
+ function getAllKeysIn$2(object2) {
4349
+ return baseGetAllKeys(object2, keysIn$1, getSymbolsIn);
4325
4350
  }
4326
4351
  var _getAllKeysIn = getAllKeysIn$2;
4327
4352
  var objectProto$1 = Object.prototype;
@@ -4370,16 +4395,16 @@ var _cloneTypedArray = cloneTypedArray$1;
4370
4395
  var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray;
4371
4396
  var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
4372
4397
  var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
4373
- function initCloneByTag$1(object, tag, isDeep) {
4374
- var Ctor = object.constructor;
4398
+ function initCloneByTag$1(object2, tag, isDeep) {
4399
+ var Ctor = object2.constructor;
4375
4400
  switch (tag) {
4376
4401
  case arrayBufferTag$1:
4377
- return cloneArrayBuffer(object);
4402
+ return cloneArrayBuffer(object2);
4378
4403
  case boolTag$1:
4379
4404
  case dateTag$1:
4380
- return new Ctor(+object);
4405
+ return new Ctor(+object2);
4381
4406
  case dataViewTag$1:
4382
- return cloneDataView(object, isDeep);
4407
+ return cloneDataView(object2, isDeep);
4383
4408
  case float32Tag$1:
4384
4409
  case float64Tag$1:
4385
4410
  case int8Tag$1:
@@ -4389,25 +4414,25 @@ function initCloneByTag$1(object, tag, isDeep) {
4389
4414
  case uint8ClampedTag$1:
4390
4415
  case uint16Tag$1:
4391
4416
  case uint32Tag$1:
4392
- return cloneTypedArray(object, isDeep);
4417
+ return cloneTypedArray(object2, isDeep);
4393
4418
  case mapTag$2:
4394
4419
  return new Ctor();
4395
4420
  case numberTag$1:
4396
4421
  case stringTag$1:
4397
- return new Ctor(object);
4422
+ return new Ctor(object2);
4398
4423
  case regexpTag$1:
4399
- return cloneRegExp(object);
4424
+ return cloneRegExp(object2);
4400
4425
  case setTag$2:
4401
4426
  return new Ctor();
4402
4427
  case symbolTag$1:
4403
- return cloneSymbol(object);
4428
+ return cloneSymbol(object2);
4404
4429
  }
4405
4430
  }
4406
4431
  var _initCloneByTag = initCloneByTag$1;
4407
4432
  var isObject$3 = isObject_1;
4408
4433
  var objectCreate = Object.create;
4409
4434
  var baseCreate$1 = /* @__PURE__ */ function() {
4410
- function object() {
4435
+ function object2() {
4411
4436
  }
4412
4437
  return function(proto) {
4413
4438
  if (!isObject$3(proto)) {
@@ -4416,16 +4441,16 @@ var baseCreate$1 = /* @__PURE__ */ function() {
4416
4441
  if (objectCreate) {
4417
4442
  return objectCreate(proto);
4418
4443
  }
4419
- object.prototype = proto;
4420
- var result = new object();
4421
- object.prototype = void 0;
4444
+ object2.prototype = proto;
4445
+ var result = new object2();
4446
+ object2.prototype = void 0;
4422
4447
  return result;
4423
4448
  };
4424
4449
  }();
4425
4450
  var _baseCreate = baseCreate$1;
4426
4451
  var baseCreate = _baseCreate, getPrototype$1 = _getPrototype, isPrototype = _isPrototype;
4427
- function initCloneObject$1(object) {
4428
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype$1(object)) : {};
4452
+ function initCloneObject$1(object2) {
4453
+ return typeof object2.constructor == "function" && !isPrototype(object2) ? baseCreate(getPrototype$1(object2)) : {};
4429
4454
  }
4430
4455
  var _initCloneObject = initCloneObject$1;
4431
4456
  var getTag$2 = _getTag, isObjectLike$2 = isObjectLike_1;
@@ -4455,10 +4480,10 @@ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]",
4455
4480
  var cloneableTags = {};
4456
4481
  cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag$1] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
4457
4482
  cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
4458
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
4483
+ function baseClone$1(value, bitmask, customizer, key, object2, stack) {
4459
4484
  var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
4460
4485
  if (customizer) {
4461
- result = object ? customizer(value, key, object, stack) : customizer(value);
4486
+ result = object2 ? customizer(value, key, object2, stack) : customizer(value);
4462
4487
  }
4463
4488
  if (result !== void 0) {
4464
4489
  return result;
@@ -4477,14 +4502,14 @@ function baseClone$1(value, bitmask, customizer, key, object, stack) {
4477
4502
  if (isBuffer(value)) {
4478
4503
  return cloneBuffer(value, isDeep);
4479
4504
  }
4480
- if (tag == objectTag$1 || tag == argsTag || isFunc && !object) {
4505
+ if (tag == objectTag$1 || tag == argsTag || isFunc && !object2) {
4481
4506
  result = isFlat || isFunc ? {} : initCloneObject(value);
4482
4507
  if (!isDeep) {
4483
4508
  return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
4484
4509
  }
4485
4510
  } else {
4486
4511
  if (!cloneableTags[tag]) {
4487
- return object ? value : {};
4512
+ return object2 ? value : {};
4488
4513
  }
4489
4514
  result = initCloneByTag(value, tag, isDeep);
4490
4515
  }
@@ -4518,7 +4543,7 @@ function baseClone$1(value, bitmask, customizer, key, object, stack) {
4518
4543
  var _baseClone = baseClone$1;
4519
4544
  var isArray$2 = isArray_1, isSymbol$2 = isSymbol_1;
4520
4545
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
4521
- function isKey$1(value, object) {
4546
+ function isKey$1(value, object2) {
4522
4547
  if (isArray$2(value)) {
4523
4548
  return false;
4524
4549
  }
@@ -4526,7 +4551,7 @@ function isKey$1(value, object) {
4526
4551
  if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$2(value)) {
4527
4552
  return true;
4528
4553
  }
4529
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
4554
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object2 != null && value in Object(object2);
4530
4555
  }
4531
4556
  var _isKey = isKey$1;
4532
4557
  var MapCache = _MapCache;
@@ -4577,11 +4602,11 @@ var stringToPath$1 = memoizeCapped(function(string2) {
4577
4602
  });
4578
4603
  var _stringToPath = stringToPath$1;
4579
4604
  var isArray$1 = isArray_1, isKey = _isKey, stringToPath = _stringToPath, toString$2 = toString_1;
4580
- function castPath$3(value, object) {
4605
+ function castPath$3(value, object2) {
4581
4606
  if (isArray$1(value)) {
4582
4607
  return value;
4583
4608
  }
4584
- return isKey(value, object) ? [value] : stringToPath(toString$2(value));
4609
+ return isKey(value, object2) ? [value] : stringToPath(toString$2(value));
4585
4610
  }
4586
4611
  var _castPath = castPath$3;
4587
4612
  function last$1(array2) {
@@ -4600,13 +4625,13 @@ function toKey$2(value) {
4600
4625
  }
4601
4626
  var _toKey = toKey$2;
4602
4627
  var castPath$2 = _castPath, toKey$1 = _toKey;
4603
- function baseGet$1(object, path) {
4604
- path = castPath$2(path, object);
4628
+ function baseGet$1(object2, path) {
4629
+ path = castPath$2(path, object2);
4605
4630
  var index = 0, length = path.length;
4606
- while (object != null && index < length) {
4607
- object = object[toKey$1(path[index++])];
4631
+ while (object2 != null && index < length) {
4632
+ object2 = object2[toKey$1(path[index++])];
4608
4633
  }
4609
- return index && index == length ? object : void 0;
4634
+ return index && index == length ? object2 : void 0;
4610
4635
  }
4611
4636
  var _baseGet = baseGet$1;
4612
4637
  function baseSlice$2(array2, start, end) {
@@ -4628,15 +4653,15 @@ function baseSlice$2(array2, start, end) {
4628
4653
  }
4629
4654
  var _baseSlice = baseSlice$2;
4630
4655
  var baseGet = _baseGet, baseSlice$1 = _baseSlice;
4631
- function parent$1(object, path) {
4632
- return path.length < 2 ? object : baseGet(object, baseSlice$1(path, 0, -1));
4656
+ function parent$1(object2, path) {
4657
+ return path.length < 2 ? object2 : baseGet(object2, baseSlice$1(path, 0, -1));
4633
4658
  }
4634
4659
  var _parent = parent$1;
4635
4660
  var castPath$1 = _castPath, last = last_1, parent = _parent, toKey = _toKey;
4636
- function baseUnset$1(object, path) {
4637
- path = castPath$1(path, object);
4638
- object = parent(object, path);
4639
- return object == null || delete object[toKey(last(path))];
4661
+ function baseUnset$1(object2, path) {
4662
+ path = castPath$1(path, object2);
4663
+ object2 = parent(object2, path);
4664
+ return object2 == null || delete object2[toKey(last(path))];
4640
4665
  }
4641
4666
  var _baseUnset = baseUnset$1;
4642
4667
  var baseGetTag = _baseGetTag, getPrototype = _getPrototype, isObjectLike = isObjectLike_1;
@@ -4775,18 +4800,18 @@ function flatRest$1(func2) {
4775
4800
  var _flatRest = flatRest$1;
4776
4801
  var arrayMap = _arrayMap, baseClone = _baseClone, baseUnset = _baseUnset, castPath = _castPath, copyObject = _copyObject, customOmitClone = _customOmitClone, flatRest = _flatRest, getAllKeysIn = _getAllKeysIn;
4777
4802
  var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
4778
- var omit = flatRest(function(object, paths) {
4803
+ var omit = flatRest(function(object2, paths) {
4779
4804
  var result = {};
4780
- if (object == null) {
4805
+ if (object2 == null) {
4781
4806
  return result;
4782
4807
  }
4783
4808
  var isDeep = false;
4784
4809
  paths = arrayMap(paths, function(path) {
4785
- path = castPath(path, object);
4810
+ path = castPath(path, object2);
4786
4811
  isDeep || (isDeep = path.length > 1);
4787
4812
  return path;
4788
4813
  });
4789
- copyObject(object, getAllKeysIn(object), result);
4814
+ copyObject(object2, getAllKeysIn(object2), result);
4790
4815
  if (isDeep) {
4791
4816
  result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
4792
4817
  }
@@ -8078,6 +8103,17 @@ const tracer = opentelemetry.trace.getTracer(
8078
8103
  INSTRUMENTATION_SCOPE_NAME,
8079
8104
  INSTRUMENTATION_SCOPE_VERSION
8080
8105
  );
8106
+ function getActiveTraceAndSpanId() {
8107
+ const activeSpan = opentelemetry.trace.getActiveSpan();
8108
+ if (activeSpan) {
8109
+ const context2 = activeSpan.spanContext();
8110
+ return {
8111
+ traceId: context2.traceId,
8112
+ spanId: context2.spanId
8113
+ };
8114
+ }
8115
+ return void 0;
8116
+ }
8081
8117
  function wrapInActiveSpan(name, fn) {
8082
8118
  return tracer.startActiveSpan(name, (span) => {
8083
8119
  const handleSuccess = (response) => {
@@ -8107,6 +8143,17 @@ function addTraceparent(headers) {
8107
8143
  }
8108
8144
  });
8109
8145
  }
8146
+ function logResponseHeadersToSpan(span, response) {
8147
+ const responseHeaders = {};
8148
+ response.headers.forEach((value, key) => {
8149
+ responseHeaders[key] = value;
8150
+ });
8151
+ span.addEvent("response");
8152
+ span.setAttributes({
8153
+ ...responseHeaders,
8154
+ status: response.status
8155
+ });
8156
+ }
8110
8157
  function recordErrorToSpan(span, error2) {
8111
8158
  span.recordException(error2);
8112
8159
  span.setStatus({ code: SpanStatusCode.ERROR });
@@ -9462,9 +9509,9 @@ function buildMatchFn(args) {
9462
9509
  };
9463
9510
  };
9464
9511
  }
9465
- function findKey(object, predicate) {
9466
- for (var key in object) {
9467
- if (object.hasOwnProperty(key) && predicate(object[key])) {
9512
+ function findKey(object2, predicate) {
9513
+ for (var key in object2) {
9514
+ if (object2.hasOwnProperty(key) && predicate(object2[key])) {
9468
9515
  return key;
9469
9516
  }
9470
9517
  }
@@ -9678,19 +9725,19 @@ function cleanEscapedString(input) {
9678
9725
  }
9679
9726
  return matched[1].replace(doubleQuoteRegExp, "'");
9680
9727
  }
9681
- function assign(target, object) {
9728
+ function assign(target, object2) {
9682
9729
  if (target == null) {
9683
9730
  throw new TypeError("assign requires that input parameter not be null or undefined");
9684
9731
  }
9685
- for (var property in object) {
9686
- if (Object.prototype.hasOwnProperty.call(object, property)) {
9687
- target[property] = object[property];
9732
+ for (var property in object2) {
9733
+ if (Object.prototype.hasOwnProperty.call(object2, property)) {
9734
+ target[property] = object2[property];
9688
9735
  }
9689
9736
  }
9690
9737
  return target;
9691
9738
  }
9692
- function cloneObject(object) {
9693
- return assign({}, object);
9739
+ function cloneObject(object2) {
9740
+ return assign({}, object2);
9694
9741
  }
9695
9742
  var MILLISECONDS_IN_MINUTE = 1e3 * 60;
9696
9743
  var MINUTES_IN_DAY = 60 * 24;
@@ -9857,6 +9904,12 @@ function isRateLimitError(error2) {
9857
9904
  function isContextWindowLimitError(error2) {
9858
9905
  return error2 instanceof Error && error2.message.includes("token limit");
9859
9906
  }
9907
+ class TracedError extends Error {
9908
+ constructor(message, traceId) {
9909
+ super(message);
9910
+ this.traceId = traceId;
9911
+ }
9912
+ }
9860
9913
  class NetworkError extends Error {
9861
9914
  constructor(response, content, traceId) {
9862
9915
  super(
@@ -10411,8 +10464,8 @@ var PromptsOrderBy = /* @__PURE__ */ ((PromptsOrderBy2) => {
10411
10464
  return PromptsOrderBy2;
10412
10465
  })(PromptsOrderBy || {});
10413
10466
  const PROMPTS_QUERY = `
10414
- query ViewerPrompts($query: String, $first: Int!, $recommendedOnly: Boolean!, $orderByMultiple: [PromptsOrderBy!]) {
10415
- prompts(query: $query, first: $first, includeDrafts: false, recommendedOnly: $recommendedOnly, includeViewerDrafts: true, viewerIsAffiliated: true, orderByMultiple: $orderByMultiple) {
10467
+ query ViewerPrompts($query: String, $first: Int!, $recommendedOnly: Boolean!, $orderByMultiple: [PromptsOrderBy!], $tags: [ID!], $owner: ID, $includeViewerDrafts: Boolean!) {
10468
+ prompts(query: $query, first: $first, includeDrafts: false, recommendedOnly: $recommendedOnly, includeViewerDrafts: $includeViewerDrafts, viewerIsAffiliated: true, orderByMultiple: $orderByMultiple, tags: $tags, owner: $owner) {
10416
10469
  nodes {
10417
10470
  id
10418
10471
  name
@@ -10435,6 +10488,12 @@ query ViewerPrompts($query: String, $first: Int!, $recommendedOnly: Boolean!, $o
10435
10488
  displayName
10436
10489
  avatarURL
10437
10490
  }
10491
+ tags(first: 999) {
10492
+ nodes {
10493
+ id
10494
+ name
10495
+ }
10496
+ }
10438
10497
  }
10439
10498
  totalCount
10440
10499
  }
@@ -10468,6 +10527,15 @@ query ViewerBuiltinPrompts($query: String!, $first: Int!, $orderByMultiple: [Pro
10468
10527
  totalCount
10469
10528
  }
10470
10529
  }`;
10530
+ const PROMPT_TAGS_QUERY = `
10531
+ query PromptTags() {
10532
+ promptTags(first: 999) {
10533
+ nodes {
10534
+ id
10535
+ name
10536
+ }
10537
+ }
10538
+ }`;
10471
10539
  const REPO_NAME_QUERY = `
10472
10540
  query ResolveRepoName($cloneURL: String!) {
10473
10541
  repository(cloneURL: $cloneURL) {
@@ -10507,17 +10575,6 @@ mutation ChangePromptVisibility($id: ID!, $newVisibility: PromptVisibility!) {
10507
10575
  }
10508
10576
  }
10509
10577
  `;
10510
- const CURRENT_SITE_IDENTIFICATION = `
10511
- query SiteIdentification {
10512
- site {
10513
- siteID
10514
- productSubscription {
10515
- license {
10516
- hashedKey
10517
- }
10518
- }
10519
- }
10520
- }`;
10521
10578
  const GET_FEATURE_FLAGS_QUERY = `
10522
10579
  query FeatureFlags {
10523
10580
  evaluatedFeatureFlags {
@@ -10659,6 +10716,12 @@ const NLS_SEARCH_QUERY = `
10659
10716
  query NLSSearchQuery($query: String!) {
10660
10717
  search(query: $query, version: V3, patternType: nls) {
10661
10718
  results {
10719
+ dynamicFilters {
10720
+ value
10721
+ label
10722
+ count
10723
+ kind
10724
+ }
10662
10725
  results {
10663
10726
  __typename
10664
10727
  ... on FileMatch {
@@ -10817,6 +10880,9 @@ const buildGraphQLUrl = ({ request, baseUrl }) => {
10817
10880
  const apiURL = `${GRAPHQL_URI}${nameMatch ? `?${nameMatch[1]}` : ""}`;
10818
10881
  return baseUrl ? new URL(trimEnd$1(baseUrl, "/") + apiURL).href : apiURL;
10819
10882
  };
10883
+ function isNodeResponse(response) {
10884
+ return Boolean(response.body && !("getReader" in response.body));
10885
+ }
10820
10886
  var PromptMode = /* @__PURE__ */ ((PromptMode2) => {
10821
10887
  PromptMode2["CHAT"] = "CHAT";
10822
10888
  PromptMode2["EDIT"] = "EDIT";
@@ -10979,22 +11045,6 @@ class SourcegraphGraphQLAPIClient {
10979
11045
  )
10980
11046
  );
10981
11047
  }
10982
- async getSiteIdentification() {
10983
- const response = await this.fetchSourcegraphAPI(
10984
- CURRENT_SITE_IDENTIFICATION,
10985
- {}
10986
- );
10987
- return extractDataOrError(
10988
- response,
10989
- (data) => {
10990
- var _a2, _b, _c, _d, _e2, _f, _g, _h;
10991
- return ((_a2 = data.site) == null ? void 0 : _a2.siteID) ? ((_d = (_c = (_b = data.site) == null ? void 0 : _b.productSubscription) == null ? void 0 : _c.license) == null ? void 0 : _d.hashedKey) ? {
10992
- siteid: (_e2 = data.site) == null ? void 0 : _e2.siteID,
10993
- hashedLicenseKey: (_h = (_g = (_f = data.site) == null ? void 0 : _f.productSubscription) == null ? void 0 : _g.license) == null ? void 0 : _h.hashedKey
10994
- } : new Error("site hashed license key not found") : new Error("site ID not found");
10995
- }
10996
- );
10997
- }
10998
11048
  async getSiteHasIsCodyEnabledField(signal) {
10999
11049
  return this.fetchSourcegraphAPI(
11000
11050
  CURRENT_SITE_GRAPHQL_FIELDS_QUERY,
@@ -11020,10 +11070,11 @@ class SourcegraphGraphQLAPIClient {
11020
11070
  return ((_a2 = data.site) == null ? void 0 : _a2.isCodyEnabled) ?? false;
11021
11071
  }));
11022
11072
  }
11023
- async getCurrentUserId() {
11073
+ async getCurrentUserId(signal) {
11024
11074
  return this.fetchSourcegraphAPI(
11025
11075
  CURRENT_USER_ID_QUERY,
11026
- {}
11076
+ {},
11077
+ signal
11027
11078
  ).then(
11028
11079
  (response) => extractDataOrError(response, (data) => data.currentUser ? data.currentUser.id : null)
11029
11080
  );
@@ -11388,12 +11439,20 @@ class SourcegraphGraphQLAPIClient {
11388
11439
  query,
11389
11440
  first,
11390
11441
  recommendedOnly,
11442
+ tags,
11391
11443
  signal,
11392
- orderByMultiple
11444
+ orderByMultiple,
11445
+ owner,
11446
+ includeViewerDrafts,
11447
+ builtinOnly
11393
11448
  }) {
11394
11449
  const hasIncludeViewerDraftsArg = await this.isValidSiteVersion({
11395
11450
  minimumVersion: "5.9.0"
11396
11451
  });
11452
+ const hasPromptTagsField = await this.isValidSiteVersion({
11453
+ minimumVersion: "5.11.0",
11454
+ insider: true
11455
+ });
11397
11456
  const response = await this.fetchSourcegraphAPI(
11398
11457
  hasIncludeViewerDraftsArg ? PROMPTS_QUERY : LEGACY_PROMPTS_QUERY_5_8,
11399
11458
  {
@@ -11403,7 +11462,11 @@ class SourcegraphGraphQLAPIClient {
11403
11462
  orderByMultiple: orderByMultiple || [
11404
11463
  PromptsOrderBy.PROMPT_RECOMMENDED,
11405
11464
  PromptsOrderBy.PROMPT_UPDATED_AT
11406
- ]
11465
+ ],
11466
+ tags: hasPromptTagsField ? tags : void 0,
11467
+ owner,
11468
+ includeViewerDrafts: includeViewerDrafts ?? true,
11469
+ builtinOnly
11407
11470
  },
11408
11471
  signal
11409
11472
  );
@@ -11470,6 +11533,23 @@ class SourcegraphGraphQLAPIClient {
11470
11533
  }
11471
11534
  return;
11472
11535
  }
11536
+ async queryPromptTags({
11537
+ signal
11538
+ }) {
11539
+ const hasPromptTags = await this.isValidSiteVersion({
11540
+ minimumVersion: "5.11.0",
11541
+ insider: true
11542
+ });
11543
+ if (!hasPromptTags) {
11544
+ return [];
11545
+ }
11546
+ const response = await this.fetchSourcegraphAPI(PROMPT_TAGS_QUERY, signal);
11547
+ const result = extractDataOrError(response, (data) => data.promptTags.nodes);
11548
+ if (result instanceof Error) {
11549
+ throw result;
11550
+ }
11551
+ return result;
11552
+ }
11473
11553
  /**
11474
11554
  * recordTelemetryEvents uses the new Telemetry API to record events that
11475
11555
  * gets exported: https://sourcegraph.com/docs/dev/background-information/telemetry
@@ -11544,10 +11624,11 @@ class SourcegraphGraphQLAPIClient {
11544
11624
  signal
11545
11625
  ).then((response) => extractDataOrError(response, (data) => data.evaluateFeatureFlag));
11546
11626
  }
11547
- async viewerSettings() {
11627
+ async viewerSettings(signal) {
11548
11628
  const response = await this.fetchSourcegraphAPI(
11549
11629
  VIEWER_SETTINGS_QUERY,
11550
- {}
11630
+ {},
11631
+ signal
11551
11632
  );
11552
11633
  return extractDataOrError(response, (data) => JSON.parse(data.viewerSettings.final));
11553
11634
  }
@@ -11585,13 +11666,16 @@ class SourcegraphGraphQLAPIClient {
11585
11666
  );
11586
11667
  }
11587
11668
  // Performs an authenticated request to our non-GraphQL HTTP / REST API.
11588
- async fetchHTTP(queryName, method, urlPath, body, signal) {
11669
+ async fetchHTTP(queryName, method, urlPath, body, signal, configOverride) {
11589
11670
  var _a2;
11590
- if (!this.config) {
11591
- throw new Error("SourcegraphGraphQLAPIClient config not set");
11592
- }
11593
- const config = await firstValueFrom(this.config);
11594
- signal == null ? void 0 : signal.throwIfAborted();
11671
+ const config = configOverride ?? await (async () => {
11672
+ if (!this.config) {
11673
+ throw new Error("SourcegraphGraphQLAPIClient config not set");
11674
+ }
11675
+ const resolvedConfig2 = await firstValueFrom(this.config);
11676
+ signal == null ? void 0 : signal.throwIfAborted();
11677
+ return resolvedConfig2;
11678
+ })();
11595
11679
  const headers = new Headers((_a2 = config.configuration) == null ? void 0 : _a2.customHeaders);
11596
11680
  headers.set("Content-Type", "application/json; charset=utf-8");
11597
11681
  if (config.auth.accessToken) {
@@ -11635,8 +11719,8 @@ function catchHTTPError(url, timeoutSignal) {
11635
11719
  }
11636
11720
  error2 = `ETIMEDOUT: timed out after ${DEFAULT_TIMEOUT_MSEC}ms`;
11637
11721
  }
11638
- const code = `${(typeof error2 === "object" && error2 ? error2.code : void 0) ?? ""} `;
11639
- return new Error(`accessing Sourcegraph HTTP API: ${code}${error2} (${url})`);
11722
+ const code2 = `${(typeof error2 === "object" && error2 ? error2.code : void 0) ?? ""} `;
11723
+ return new Error(`accessing Sourcegraph HTTP API: ${code2}${error2} (${url})`);
11640
11724
  };
11641
11725
  }
11642
11726
  const graphqlClient = SourcegraphGraphQLAPIClient.withGlobalConfig();
@@ -11673,6 +11757,7 @@ var FeatureFlag = /* @__PURE__ */ ((FeatureFlag2) => {
11673
11757
  FeatureFlag2["CodyAutocompleteContextExperimentControl"] = "cody-autocomplete-context-experiment-control";
11674
11758
  FeatureFlag2["CodyAutoeditExperimentEnabledFeatureFlag"] = "cody-autoedit-experiment-enabled-flag";
11675
11759
  FeatureFlag2["CodyEditDefaultToGpt4oMini"] = "cody-edit-default-to-gpt-4o-mini";
11760
+ FeatureFlag2["CodyChatDefaultToClaude35Haiku"] = "cody-chat-default-to-claude-3-5-haiku";
11676
11761
  FeatureFlag2["UseSscForCodySubscription"] = "use-ssc-for-cody-subscription";
11677
11762
  FeatureFlag2["CodyProTrialEnded"] = "cody-pro-trial-ended";
11678
11763
  FeatureFlag2["CodyInteractiveTutorial"] = "cody-interactive-tutorial";
@@ -13289,23 +13374,23 @@ var CustomCommandType = /* @__PURE__ */ ((CustomCommandType2) => {
13289
13374
  CustomCommandType2["User"] = "user";
13290
13375
  return CustomCommandType2;
13291
13376
  })(CustomCommandType || {});
13292
- function forceHydration(object) {
13293
- if (typeof object !== "object" || object === null) {
13294
- return object;
13377
+ function forceHydration(object2) {
13378
+ if (typeof object2 !== "object" || object2 === null) {
13379
+ return object2;
13295
13380
  }
13296
- if (object instanceof PromptString) {
13297
- return object;
13381
+ if (object2 instanceof PromptString) {
13382
+ return object2;
13298
13383
  }
13299
- if (Array.isArray(object)) {
13300
- return object.map(forceHydration);
13384
+ if (Array.isArray(object2)) {
13385
+ return object2.map(forceHydration);
13301
13386
  }
13302
13387
  let clone;
13303
- if (object instanceof Date) {
13304
- clone = new Date(object);
13388
+ if (object2 instanceof Date) {
13389
+ clone = new Date(object2);
13305
13390
  } else {
13306
- clone = Object.create(Object.getPrototypeOf(object));
13391
+ clone = Object.create(Object.getPrototypeOf(object2));
13307
13392
  }
13308
- for (const [key, value] of Object.entries(object)) {
13393
+ for (const [key, value] of Object.entries(object2)) {
13309
13394
  clone[key] = forceHydration(value);
13310
13395
  }
13311
13396
  return clone;
@@ -13357,106 +13442,98 @@ function isDehydratedUri(value) {
13357
13442
  value.authority !== void 0 && value.path !== void 0 && value.fragment !== void 0 && value.query !== void 0);
13358
13443
  }
13359
13444
  var base64Js = {};
13360
- var hasRequiredBase64Js;
13361
- function requireBase64Js() {
13362
- if (hasRequiredBase64Js) return base64Js;
13363
- hasRequiredBase64Js = 1;
13364
- base64Js.byteLength = byteLength;
13365
- base64Js.toByteArray = toByteArray;
13366
- base64Js.fromByteArray = fromByteArray;
13367
- var lookup = [];
13368
- var revLookup = [];
13369
- var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
13370
- var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
13371
- for (var i3 = 0, len = code.length; i3 < len; ++i3) {
13372
- lookup[i3] = code[i3];
13373
- revLookup[code.charCodeAt(i3)] = i3;
13374
- }
13375
- revLookup["-".charCodeAt(0)] = 62;
13376
- revLookup["_".charCodeAt(0)] = 63;
13377
- function getLens(b64) {
13378
- var len2 = b64.length;
13379
- if (len2 % 4 > 0) {
13380
- throw new Error("Invalid string. Length must be a multiple of 4");
13381
- }
13382
- var validLen = b64.indexOf("=");
13383
- if (validLen === -1) validLen = len2;
13384
- var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
13385
- return [validLen, placeHoldersLen];
13386
- }
13387
- function byteLength(b64) {
13388
- var lens = getLens(b64);
13389
- var validLen = lens[0];
13390
- var placeHoldersLen = lens[1];
13391
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
13392
- }
13393
- function _byteLength(b64, validLen, placeHoldersLen) {
13394
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
13395
- }
13396
- function toByteArray(b64) {
13397
- var tmp;
13398
- var lens = getLens(b64);
13399
- var validLen = lens[0];
13400
- var placeHoldersLen = lens[1];
13401
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
13402
- var curByte = 0;
13403
- var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
13404
- var i4;
13405
- for (i4 = 0; i4 < len2; i4 += 4) {
13406
- tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)];
13407
- arr[curByte++] = tmp >> 16 & 255;
13408
- arr[curByte++] = tmp >> 8 & 255;
13409
- arr[curByte++] = tmp & 255;
13410
- }
13411
- if (placeHoldersLen === 2) {
13412
- tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4;
13413
- arr[curByte++] = tmp & 255;
13414
- }
13415
- if (placeHoldersLen === 1) {
13416
- tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2;
13417
- arr[curByte++] = tmp >> 8 & 255;
13418
- arr[curByte++] = tmp & 255;
13419
- }
13420
- return arr;
13421
- }
13422
- function tripletToBase64(num) {
13423
- return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
13424
- }
13425
- function encodeChunk(uint8, start, end) {
13426
- var tmp;
13427
- var output = [];
13428
- for (var i4 = start; i4 < end; i4 += 3) {
13429
- tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);
13430
- output.push(tripletToBase64(tmp));
13431
- }
13432
- return output.join("");
13433
- }
13434
- function fromByteArray(uint8) {
13435
- var tmp;
13436
- var len2 = uint8.length;
13437
- var extraBytes = len2 % 3;
13438
- var parts = [];
13439
- var maxChunkLength = 16383;
13440
- for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) {
13441
- parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength));
13442
- }
13443
- if (extraBytes === 1) {
13444
- tmp = uint8[len2 - 1];
13445
- parts.push(
13446
- lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
13447
- );
13448
- } else if (extraBytes === 2) {
13449
- tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
13450
- parts.push(
13451
- lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
13452
- );
13453
- }
13454
- return parts.join("");
13445
+ base64Js.byteLength = byteLength;
13446
+ base64Js.toByteArray = toByteArray;
13447
+ base64Js.fromByteArray = fromByteArray;
13448
+ var lookup = [];
13449
+ var revLookup = [];
13450
+ var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
13451
+ var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
13452
+ for (var i$1 = 0, len = code.length; i$1 < len; ++i$1) {
13453
+ lookup[i$1] = code[i$1];
13454
+ revLookup[code.charCodeAt(i$1)] = i$1;
13455
+ }
13456
+ revLookup["-".charCodeAt(0)] = 62;
13457
+ revLookup["_".charCodeAt(0)] = 63;
13458
+ function getLens(b64) {
13459
+ var len = b64.length;
13460
+ if (len % 4 > 0) {
13461
+ throw new Error("Invalid string. Length must be a multiple of 4");
13462
+ }
13463
+ var validLen = b64.indexOf("=");
13464
+ if (validLen === -1) validLen = len;
13465
+ var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
13466
+ return [validLen, placeHoldersLen];
13467
+ }
13468
+ function byteLength(b64) {
13469
+ var lens = getLens(b64);
13470
+ var validLen = lens[0];
13471
+ var placeHoldersLen = lens[1];
13472
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
13473
+ }
13474
+ function _byteLength(b64, validLen, placeHoldersLen) {
13475
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
13476
+ }
13477
+ function toByteArray(b64) {
13478
+ var tmp;
13479
+ var lens = getLens(b64);
13480
+ var validLen = lens[0];
13481
+ var placeHoldersLen = lens[1];
13482
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
13483
+ var curByte = 0;
13484
+ var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
13485
+ var i3;
13486
+ for (i3 = 0; i3 < len; i3 += 4) {
13487
+ tmp = revLookup[b64.charCodeAt(i3)] << 18 | revLookup[b64.charCodeAt(i3 + 1)] << 12 | revLookup[b64.charCodeAt(i3 + 2)] << 6 | revLookup[b64.charCodeAt(i3 + 3)];
13488
+ arr[curByte++] = tmp >> 16 & 255;
13489
+ arr[curByte++] = tmp >> 8 & 255;
13490
+ arr[curByte++] = tmp & 255;
13491
+ }
13492
+ if (placeHoldersLen === 2) {
13493
+ tmp = revLookup[b64.charCodeAt(i3)] << 2 | revLookup[b64.charCodeAt(i3 + 1)] >> 4;
13494
+ arr[curByte++] = tmp & 255;
13495
+ }
13496
+ if (placeHoldersLen === 1) {
13497
+ tmp = revLookup[b64.charCodeAt(i3)] << 10 | revLookup[b64.charCodeAt(i3 + 1)] << 4 | revLookup[b64.charCodeAt(i3 + 2)] >> 2;
13498
+ arr[curByte++] = tmp >> 8 & 255;
13499
+ arr[curByte++] = tmp & 255;
13500
+ }
13501
+ return arr;
13502
+ }
13503
+ function tripletToBase64(num) {
13504
+ return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
13505
+ }
13506
+ function encodeChunk(uint8, start, end) {
13507
+ var tmp;
13508
+ var output = [];
13509
+ for (var i3 = start; i3 < end; i3 += 3) {
13510
+ tmp = (uint8[i3] << 16 & 16711680) + (uint8[i3 + 1] << 8 & 65280) + (uint8[i3 + 2] & 255);
13511
+ output.push(tripletToBase64(tmp));
13512
+ }
13513
+ return output.join("");
13514
+ }
13515
+ function fromByteArray(uint8) {
13516
+ var tmp;
13517
+ var len = uint8.length;
13518
+ var extraBytes = len % 3;
13519
+ var parts = [];
13520
+ var maxChunkLength = 16383;
13521
+ for (var i3 = 0, len2 = len - extraBytes; i3 < len2; i3 += maxChunkLength) {
13522
+ parts.push(encodeChunk(uint8, i3, i3 + maxChunkLength > len2 ? len2 : i3 + maxChunkLength));
13523
+ }
13524
+ if (extraBytes === 1) {
13525
+ tmp = uint8[len - 1];
13526
+ parts.push(
13527
+ lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
13528
+ );
13529
+ } else if (extraBytes === 2) {
13530
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
13531
+ parts.push(
13532
+ lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
13533
+ );
13455
13534
  }
13456
- return base64Js;
13535
+ return parts.join("");
13457
13536
  }
13458
- var base64JsExports = requireBase64Js();
13459
- const base64 = /* @__PURE__ */ getDefaultExportFromCjs(base64JsExports);
13460
13537
  var __defProp2 = Object.defineProperty;
13461
13538
  var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13462
13539
  var __publicField2 = (obj, key, value) => {
@@ -13521,7 +13598,7 @@ var _Tiktoken = class {
13521
13598
  return memo;
13522
13599
  }, {});
13523
13600
  for (const [token, rank] of Object.entries(uncompressed)) {
13524
- const bytes = base64.toByteArray(token);
13601
+ const bytes = base64Js.toByteArray(token);
13525
13602
  this.rankMap.set(bytes.join(","), rank);
13526
13603
  this.textMap.set(rank, bytes);
13527
13604
  }
@@ -13842,6 +13919,12 @@ const REMOTE_FILE_PROVIDER_URI = "internal-remote-file-search";
13842
13919
  const REMOTE_DIRECTORY_PROVIDER_URI = "internal-remote-directory-search";
13843
13920
  const WEB_PROVIDER_URI = "internal-web-provider";
13844
13921
  const GIT_OPENCTX_PROVIDER_URI = "internal-git-openctx-provider";
13922
+ const CODE_SEARCH_PROVIDER_URI = "internal-code-search-provider";
13923
+ const WORKSPACE_DIRECTORY_PROVIDER_URI = DOTCOM_WORKSPACE_UPGRADE_URL.href + "?workspace=dir";
13924
+ const WORKSPACE_REPOSITORY_PROVIDER_URI = DOTCOM_WORKSPACE_UPGRADE_URL.href + "?workspace=repo";
13925
+ function isRemoteWorkspaceProvider(uri) {
13926
+ return uri === WORKSPACE_DIRECTORY_PROVIDER_URI || uri === WORKSPACE_REPOSITORY_PROVIDER_URI;
13927
+ }
13845
13928
  const FILE_CONTEXT_MENTION_PROVIDER = {
13846
13929
  id: "file",
13847
13930
  title: "Files",
@@ -14395,13 +14478,13 @@ lodash.exports;
14395
14478
  return length ? baseSum(array2, iteratee) / length : NAN2;
14396
14479
  }
14397
14480
  function baseProperty(key) {
14398
- return function(object) {
14399
- return object == null ? undefined$1 : object[key];
14481
+ return function(object2) {
14482
+ return object2 == null ? undefined$1 : object2[key];
14400
14483
  };
14401
14484
  }
14402
- function basePropertyOf(object) {
14485
+ function basePropertyOf(object2) {
14403
14486
  return function(key) {
14404
- return object == null ? undefined$1 : object[key];
14487
+ return object2 == null ? undefined$1 : object2[key];
14405
14488
  };
14406
14489
  }
14407
14490
  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
@@ -14435,9 +14518,9 @@ lodash.exports;
14435
14518
  }
14436
14519
  return result;
14437
14520
  }
14438
- function baseToPairs(object, props) {
14521
+ function baseToPairs(object2, props) {
14439
14522
  return arrayMap2(props, function(key) {
14440
- return [key, object[key]];
14523
+ return [key, object2[key]];
14441
14524
  });
14442
14525
  }
14443
14526
  function baseTrim2(string2) {
@@ -14448,9 +14531,9 @@ lodash.exports;
14448
14531
  return func2(value);
14449
14532
  };
14450
14533
  }
14451
- function baseValues(object, props) {
14534
+ function baseValues(object2, props) {
14452
14535
  return arrayMap2(props, function(key) {
14453
- return object[key];
14536
+ return object2[key];
14454
14537
  });
14455
14538
  }
14456
14539
  function cacheHas2(cache, key) {
@@ -14482,8 +14565,8 @@ lodash.exports;
14482
14565
  function escapeStringChar(chr) {
14483
14566
  return "\\" + stringEscapes[chr];
14484
14567
  }
14485
- function getValue2(object, key) {
14486
- return object == null ? undefined$1 : object[key];
14568
+ function getValue2(object2, key) {
14569
+ return object2 == null ? undefined$1 : object2[key];
14487
14570
  }
14488
14571
  function hasUnicode2(string2) {
14489
14572
  return reHasUnicode2.test(string2);
@@ -14625,7 +14708,7 @@ lodash.exports;
14625
14708
  return new LodashWrapper(value);
14626
14709
  }
14627
14710
  var baseCreate2 = /* @__PURE__ */ function() {
14628
- function object() {
14711
+ function object2() {
14629
14712
  }
14630
14713
  return function(proto) {
14631
14714
  if (!isObject2(proto)) {
@@ -14634,9 +14717,9 @@ lodash.exports;
14634
14717
  if (objectCreate2) {
14635
14718
  return objectCreate2(proto);
14636
14719
  }
14637
- object.prototype = proto;
14638
- var result2 = new object();
14639
- object.prototype = undefined$1;
14720
+ object2.prototype = proto;
14721
+ var result2 = new object2();
14722
+ object2.prototype = undefined$1;
14640
14723
  return result2;
14641
14724
  };
14642
14725
  }();
@@ -14960,15 +15043,15 @@ lodash.exports;
14960
15043
  function arrayShuffle(array2) {
14961
15044
  return shuffleSelf(copyArray2(array2));
14962
15045
  }
14963
- function assignMergeValue(object, key, value) {
14964
- if (value !== undefined$1 && !eq2(object[key], value) || value === undefined$1 && !(key in object)) {
14965
- baseAssignValue2(object, key, value);
15046
+ function assignMergeValue(object2, key, value) {
15047
+ if (value !== undefined$1 && !eq2(object2[key], value) || value === undefined$1 && !(key in object2)) {
15048
+ baseAssignValue2(object2, key, value);
14966
15049
  }
14967
15050
  }
14968
- function assignValue2(object, key, value) {
14969
- var objValue = object[key];
14970
- if (!(hasOwnProperty2.call(object, key) && eq2(objValue, value)) || value === undefined$1 && !(key in object)) {
14971
- baseAssignValue2(object, key, value);
15051
+ function assignValue2(object2, key, value) {
15052
+ var objValue = object2[key];
15053
+ if (!(hasOwnProperty2.call(object2, key) && eq2(objValue, value)) || value === undefined$1 && !(key in object2)) {
15054
+ baseAssignValue2(object2, key, value);
14972
15055
  }
14973
15056
  }
14974
15057
  function assocIndexOf2(array2, key) {
@@ -14986,28 +15069,28 @@ lodash.exports;
14986
15069
  });
14987
15070
  return accumulator;
14988
15071
  }
14989
- function baseAssign2(object, source) {
14990
- return object && copyObject2(source, keys2(source), object);
15072
+ function baseAssign2(object2, source) {
15073
+ return object2 && copyObject2(source, keys2(source), object2);
14991
15074
  }
14992
- function baseAssignIn2(object, source) {
14993
- return object && copyObject2(source, keysIn2(source), object);
15075
+ function baseAssignIn2(object2, source) {
15076
+ return object2 && copyObject2(source, keysIn2(source), object2);
14994
15077
  }
14995
- function baseAssignValue2(object, key, value) {
15078
+ function baseAssignValue2(object2, key, value) {
14996
15079
  if (key == "__proto__" && defineProperty2) {
14997
- defineProperty2(object, key, {
15080
+ defineProperty2(object2, key, {
14998
15081
  "configurable": true,
14999
15082
  "enumerable": true,
15000
15083
  "value": value,
15001
15084
  "writable": true
15002
15085
  });
15003
15086
  } else {
15004
- object[key] = value;
15087
+ object2[key] = value;
15005
15088
  }
15006
15089
  }
15007
- function baseAt(object, paths) {
15008
- var index = -1, length = paths.length, result2 = Array2(length), skip2 = object == null;
15090
+ function baseAt(object2, paths) {
15091
+ var index = -1, length = paths.length, result2 = Array2(length), skip2 = object2 == null;
15009
15092
  while (++index < length) {
15010
- result2[index] = skip2 ? undefined$1 : get2(object, paths[index]);
15093
+ result2[index] = skip2 ? undefined$1 : get2(object2, paths[index]);
15011
15094
  }
15012
15095
  return result2;
15013
15096
  }
@@ -15022,10 +15105,10 @@ lodash.exports;
15022
15105
  }
15023
15106
  return number2;
15024
15107
  }
15025
- function baseClone2(value, bitmask, customizer, key, object, stack) {
15108
+ function baseClone2(value, bitmask, customizer, key, object2, stack) {
15026
15109
  var result2, isDeep = bitmask & CLONE_DEEP_FLAG2, isFlat = bitmask & CLONE_FLAT_FLAG2, isFull = bitmask & CLONE_SYMBOLS_FLAG2;
15027
15110
  if (customizer) {
15028
- result2 = object ? customizer(value, key, object, stack) : customizer(value);
15111
+ result2 = object2 ? customizer(value, key, object2, stack) : customizer(value);
15029
15112
  }
15030
15113
  if (result2 !== undefined$1) {
15031
15114
  return result2;
@@ -15044,14 +15127,14 @@ lodash.exports;
15044
15127
  if (isBuffer2(value)) {
15045
15128
  return cloneBuffer2(value, isDeep);
15046
15129
  }
15047
- if (tag == objectTag2 || tag == argsTag2 || isFunc && !object) {
15130
+ if (tag == objectTag2 || tag == argsTag2 || isFunc && !object2) {
15048
15131
  result2 = isFlat || isFunc ? {} : initCloneObject2(value);
15049
15132
  if (!isDeep) {
15050
15133
  return isFlat ? copySymbolsIn2(value, baseAssignIn2(result2, value)) : copySymbols2(value, baseAssign2(result2, value));
15051
15134
  }
15052
15135
  } else {
15053
15136
  if (!cloneableTags2[tag]) {
15054
- return object ? value : {};
15137
+ return object2 ? value : {};
15055
15138
  }
15056
15139
  result2 = initCloneByTag2(value, tag, isDeep);
15057
15140
  }
@@ -15084,19 +15167,19 @@ lodash.exports;
15084
15167
  }
15085
15168
  function baseConforms(source) {
15086
15169
  var props = keys2(source);
15087
- return function(object) {
15088
- return baseConformsTo(object, source, props);
15170
+ return function(object2) {
15171
+ return baseConformsTo(object2, source, props);
15089
15172
  };
15090
15173
  }
15091
- function baseConformsTo(object, source, props) {
15174
+ function baseConformsTo(object2, source, props) {
15092
15175
  var length = props.length;
15093
- if (object == null) {
15176
+ if (object2 == null) {
15094
15177
  return !length;
15095
15178
  }
15096
- object = Object2(object);
15179
+ object2 = Object2(object2);
15097
15180
  while (length--) {
15098
- var key = props[length], predicate = source[key], value = object[key];
15099
- if (value === undefined$1 && !(key in object) || !predicate(value)) {
15181
+ var key = props[length], predicate = source[key], value = object2[key];
15182
+ if (value === undefined$1 && !(key in object2) || !predicate(value)) {
15100
15183
  return false;
15101
15184
  }
15102
15185
  }
@@ -15209,28 +15292,28 @@ lodash.exports;
15209
15292
  }
15210
15293
  var baseFor = createBaseFor();
15211
15294
  var baseForRight = createBaseFor(true);
15212
- function baseForOwn(object, iteratee2) {
15213
- return object && baseFor(object, iteratee2, keys2);
15295
+ function baseForOwn(object2, iteratee2) {
15296
+ return object2 && baseFor(object2, iteratee2, keys2);
15214
15297
  }
15215
- function baseForOwnRight(object, iteratee2) {
15216
- return object && baseForRight(object, iteratee2, keys2);
15298
+ function baseForOwnRight(object2, iteratee2) {
15299
+ return object2 && baseForRight(object2, iteratee2, keys2);
15217
15300
  }
15218
- function baseFunctions(object, props) {
15301
+ function baseFunctions(object2, props) {
15219
15302
  return arrayFilter2(props, function(key) {
15220
- return isFunction2(object[key]);
15303
+ return isFunction2(object2[key]);
15221
15304
  });
15222
15305
  }
15223
- function baseGet2(object, path) {
15224
- path = castPath2(path, object);
15306
+ function baseGet2(object2, path) {
15307
+ path = castPath2(path, object2);
15225
15308
  var index = 0, length = path.length;
15226
- while (object != null && index < length) {
15227
- object = object[toKey2(path[index++])];
15309
+ while (object2 != null && index < length) {
15310
+ object2 = object2[toKey2(path[index++])];
15228
15311
  }
15229
- return index && index == length ? object : undefined$1;
15312
+ return index && index == length ? object2 : undefined$1;
15230
15313
  }
15231
- function baseGetAllKeys2(object, keysFunc, symbolsFunc) {
15232
- var result2 = keysFunc(object);
15233
- return isArray2(object) ? result2 : arrayPush2(result2, symbolsFunc(object));
15314
+ function baseGetAllKeys2(object2, keysFunc, symbolsFunc) {
15315
+ var result2 = keysFunc(object2);
15316
+ return isArray2(object2) ? result2 : arrayPush2(result2, symbolsFunc(object2));
15234
15317
  }
15235
15318
  function baseGetTag2(value) {
15236
15319
  if (value == null) {
@@ -15241,11 +15324,11 @@ lodash.exports;
15241
15324
  function baseGt(value, other) {
15242
15325
  return value > other;
15243
15326
  }
15244
- function baseHas(object, key) {
15245
- return object != null && hasOwnProperty2.call(object, key);
15327
+ function baseHas(object2, key) {
15328
+ return object2 != null && hasOwnProperty2.call(object2, key);
15246
15329
  }
15247
- function baseHasIn(object, key) {
15248
- return object != null && key in Object2(object);
15330
+ function baseHasIn(object2, key) {
15331
+ return object2 != null && key in Object2(object2);
15249
15332
  }
15250
15333
  function baseInRange(number2, start, end) {
15251
15334
  return number2 >= nativeMin2(start, end) && number2 < nativeMax2(start, end);
@@ -15282,17 +15365,17 @@ lodash.exports;
15282
15365
  }
15283
15366
  return result2;
15284
15367
  }
15285
- function baseInverter(object, setter, iteratee2, accumulator) {
15286
- baseForOwn(object, function(value, key, object2) {
15287
- setter(accumulator, iteratee2(value), key, object2);
15368
+ function baseInverter(object2, setter, iteratee2, accumulator) {
15369
+ baseForOwn(object2, function(value, key, object22) {
15370
+ setter(accumulator, iteratee2(value), key, object22);
15288
15371
  });
15289
15372
  return accumulator;
15290
15373
  }
15291
- function baseInvoke(object, path, args) {
15292
- path = castPath2(path, object);
15293
- object = parent2(object, path);
15294
- var func2 = object == null ? object : object[toKey2(last2(path))];
15295
- return func2 == null ? undefined$1 : apply2(func2, object, args);
15374
+ function baseInvoke(object2, path, args) {
15375
+ path = castPath2(path, object2);
15376
+ object2 = parent2(object2, path);
15377
+ var func2 = object2 == null ? object2 : object2[toKey2(last2(path))];
15378
+ return func2 == null ? undefined$1 : apply2(func2, object2, args);
15296
15379
  }
15297
15380
  function baseIsArguments2(value) {
15298
15381
  return isObjectLike2(value) && baseGetTag2(value) == argsTag2;
@@ -15312,12 +15395,12 @@ lodash.exports;
15312
15395
  }
15313
15396
  return baseIsEqualDeep2(value, other, bitmask, customizer, baseIsEqual2, stack);
15314
15397
  }
15315
- function baseIsEqualDeep2(object, other, bitmask, customizer, equalFunc, stack) {
15316
- var objIsArr = isArray2(object), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag2 : getTag2(object), othTag = othIsArr ? arrayTag2 : getTag2(other);
15398
+ function baseIsEqualDeep2(object2, other, bitmask, customizer, equalFunc, stack) {
15399
+ var objIsArr = isArray2(object2), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag2 : getTag2(object2), othTag = othIsArr ? arrayTag2 : getTag2(other);
15317
15400
  objTag = objTag == argsTag2 ? objectTag2 : objTag;
15318
15401
  othTag = othTag == argsTag2 ? objectTag2 : othTag;
15319
15402
  var objIsObj = objTag == objectTag2, othIsObj = othTag == objectTag2, isSameTag = objTag == othTag;
15320
- if (isSameTag && isBuffer2(object)) {
15403
+ if (isSameTag && isBuffer2(object2)) {
15321
15404
  if (!isBuffer2(other)) {
15322
15405
  return false;
15323
15406
  }
@@ -15326,12 +15409,12 @@ lodash.exports;
15326
15409
  }
15327
15410
  if (isSameTag && !objIsObj) {
15328
15411
  stack || (stack = new Stack2());
15329
- return objIsArr || isTypedArray2(object) ? equalArrays2(object, other, bitmask, customizer, equalFunc, stack) : equalByTag2(object, other, objTag, bitmask, customizer, equalFunc, stack);
15412
+ return objIsArr || isTypedArray2(object2) ? equalArrays2(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag2(object2, other, objTag, bitmask, customizer, equalFunc, stack);
15330
15413
  }
15331
15414
  if (!(bitmask & COMPARE_PARTIAL_FLAG2)) {
15332
- var objIsWrapped = objIsObj && hasOwnProperty2.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, "__wrapped__");
15415
+ var objIsWrapped = objIsObj && hasOwnProperty2.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, "__wrapped__");
15333
15416
  if (objIsWrapped || othIsWrapped) {
15334
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
15417
+ var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
15335
15418
  stack || (stack = new Stack2());
15336
15419
  return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
15337
15420
  }
@@ -15340,34 +15423,34 @@ lodash.exports;
15340
15423
  return false;
15341
15424
  }
15342
15425
  stack || (stack = new Stack2());
15343
- return equalObjects2(object, other, bitmask, customizer, equalFunc, stack);
15426
+ return equalObjects2(object2, other, bitmask, customizer, equalFunc, stack);
15344
15427
  }
15345
15428
  function baseIsMap2(value) {
15346
15429
  return isObjectLike2(value) && getTag2(value) == mapTag2;
15347
15430
  }
15348
- function baseIsMatch(object, source, matchData, customizer) {
15431
+ function baseIsMatch(object2, source, matchData, customizer) {
15349
15432
  var index = matchData.length, length = index, noCustomizer = !customizer;
15350
- if (object == null) {
15433
+ if (object2 == null) {
15351
15434
  return !length;
15352
15435
  }
15353
- object = Object2(object);
15436
+ object2 = Object2(object2);
15354
15437
  while (index--) {
15355
15438
  var data = matchData[index];
15356
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
15439
+ if (noCustomizer && data[2] ? data[1] !== object2[data[0]] : !(data[0] in object2)) {
15357
15440
  return false;
15358
15441
  }
15359
15442
  }
15360
15443
  while (++index < length) {
15361
15444
  data = matchData[index];
15362
- var key = data[0], objValue = object[key], srcValue = data[1];
15445
+ var key = data[0], objValue = object2[key], srcValue = data[1];
15363
15446
  if (noCustomizer && data[2]) {
15364
- if (objValue === undefined$1 && !(key in object)) {
15447
+ if (objValue === undefined$1 && !(key in object2)) {
15365
15448
  return false;
15366
15449
  }
15367
15450
  } else {
15368
15451
  var stack = new Stack2();
15369
15452
  if (customizer) {
15370
- var result2 = customizer(objValue, srcValue, key, object, source, stack);
15453
+ var result2 = customizer(objValue, srcValue, key, object2, source, stack);
15371
15454
  }
15372
15455
  if (!(result2 === undefined$1 ? baseIsEqual2(srcValue, objValue, COMPARE_PARTIAL_FLAG2 | COMPARE_UNORDERED_FLAG2, customizer, stack) : result2)) {
15373
15456
  return false;
@@ -15404,25 +15487,25 @@ lodash.exports;
15404
15487
  }
15405
15488
  return property(value);
15406
15489
  }
15407
- function baseKeys2(object) {
15408
- if (!isPrototype2(object)) {
15409
- return nativeKeys2(object);
15490
+ function baseKeys2(object2) {
15491
+ if (!isPrototype2(object2)) {
15492
+ return nativeKeys2(object2);
15410
15493
  }
15411
15494
  var result2 = [];
15412
- for (var key in Object2(object)) {
15413
- if (hasOwnProperty2.call(object, key) && key != "constructor") {
15495
+ for (var key in Object2(object2)) {
15496
+ if (hasOwnProperty2.call(object2, key) && key != "constructor") {
15414
15497
  result2.push(key);
15415
15498
  }
15416
15499
  }
15417
15500
  return result2;
15418
15501
  }
15419
- function baseKeysIn2(object) {
15420
- if (!isObject2(object)) {
15421
- return nativeKeysIn2(object);
15502
+ function baseKeysIn2(object2) {
15503
+ if (!isObject2(object2)) {
15504
+ return nativeKeysIn2(object2);
15422
15505
  }
15423
- var isProto = isPrototype2(object), result2 = [];
15424
- for (var key in object) {
15425
- if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object, key)))) {
15506
+ var isProto = isPrototype2(object2), result2 = [];
15507
+ for (var key in object2) {
15508
+ if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object2, key)))) {
15426
15509
  result2.push(key);
15427
15510
  }
15428
15511
  }
@@ -15443,43 +15526,43 @@ lodash.exports;
15443
15526
  if (matchData.length == 1 && matchData[0][2]) {
15444
15527
  return matchesStrictComparable(matchData[0][0], matchData[0][1]);
15445
15528
  }
15446
- return function(object) {
15447
- return object === source || baseIsMatch(object, source, matchData);
15529
+ return function(object2) {
15530
+ return object2 === source || baseIsMatch(object2, source, matchData);
15448
15531
  };
15449
15532
  }
15450
15533
  function baseMatchesProperty(path, srcValue) {
15451
15534
  if (isKey2(path) && isStrictComparable(srcValue)) {
15452
15535
  return matchesStrictComparable(toKey2(path), srcValue);
15453
15536
  }
15454
- return function(object) {
15455
- var objValue = get2(object, path);
15456
- return objValue === undefined$1 && objValue === srcValue ? hasIn(object, path) : baseIsEqual2(srcValue, objValue, COMPARE_PARTIAL_FLAG2 | COMPARE_UNORDERED_FLAG2);
15537
+ return function(object2) {
15538
+ var objValue = get2(object2, path);
15539
+ return objValue === undefined$1 && objValue === srcValue ? hasIn(object2, path) : baseIsEqual2(srcValue, objValue, COMPARE_PARTIAL_FLAG2 | COMPARE_UNORDERED_FLAG2);
15457
15540
  };
15458
15541
  }
15459
- function baseMerge(object, source, srcIndex, customizer, stack) {
15460
- if (object === source) {
15542
+ function baseMerge(object2, source, srcIndex, customizer, stack) {
15543
+ if (object2 === source) {
15461
15544
  return;
15462
15545
  }
15463
15546
  baseFor(source, function(srcValue, key) {
15464
15547
  stack || (stack = new Stack2());
15465
15548
  if (isObject2(srcValue)) {
15466
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
15549
+ baseMergeDeep(object2, source, key, srcIndex, baseMerge, customizer, stack);
15467
15550
  } else {
15468
- var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
15551
+ var newValue = customizer ? customizer(safeGet(object2, key), srcValue, key + "", object2, source, stack) : undefined$1;
15469
15552
  if (newValue === undefined$1) {
15470
15553
  newValue = srcValue;
15471
15554
  }
15472
- assignMergeValue(object, key, newValue);
15555
+ assignMergeValue(object2, key, newValue);
15473
15556
  }
15474
15557
  }, keysIn2);
15475
15558
  }
15476
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
15477
- var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
15559
+ function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, stack) {
15560
+ var objValue = safeGet(object2, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
15478
15561
  if (stacked) {
15479
- assignMergeValue(object, key, stacked);
15562
+ assignMergeValue(object2, key, stacked);
15480
15563
  return;
15481
15564
  }
15482
- var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined$1;
15565
+ var newValue = customizer ? customizer(objValue, srcValue, key + "", object2, source, stack) : undefined$1;
15483
15566
  var isCommon = newValue === undefined$1;
15484
15567
  if (isCommon) {
15485
15568
  var isArr = isArray2(srcValue), isBuff = !isArr && isBuffer2(srcValue), isTyped = !isArr && !isBuff && isTypedArray2(srcValue);
@@ -15514,7 +15597,7 @@ lodash.exports;
15514
15597
  mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
15515
15598
  stack["delete"](srcValue);
15516
15599
  }
15517
- assignMergeValue(object, key, newValue);
15600
+ assignMergeValue(object2, key, newValue);
15518
15601
  }
15519
15602
  function baseNth(array2, n2) {
15520
15603
  var length = array2.length;
@@ -15545,28 +15628,28 @@ lodash.exports;
15545
15628
  });
15546
15629
  return { "criteria": criteria, "index": ++index, "value": value };
15547
15630
  });
15548
- return baseSortBy(result2, function(object, other) {
15549
- return compareMultiple(object, other, orders);
15631
+ return baseSortBy(result2, function(object2, other) {
15632
+ return compareMultiple(object2, other, orders);
15550
15633
  });
15551
15634
  }
15552
- function basePick(object, paths) {
15553
- return basePickBy(object, paths, function(value, path) {
15554
- return hasIn(object, path);
15635
+ function basePick(object2, paths) {
15636
+ return basePickBy(object2, paths, function(value, path) {
15637
+ return hasIn(object2, path);
15555
15638
  });
15556
15639
  }
15557
- function basePickBy(object, paths, predicate) {
15640
+ function basePickBy(object2, paths, predicate) {
15558
15641
  var index = -1, length = paths.length, result2 = {};
15559
15642
  while (++index < length) {
15560
- var path = paths[index], value = baseGet2(object, path);
15643
+ var path = paths[index], value = baseGet2(object2, path);
15561
15644
  if (predicate(value, path)) {
15562
- baseSet(result2, castPath2(path, object), value);
15645
+ baseSet(result2, castPath2(path, object2), value);
15563
15646
  }
15564
15647
  }
15565
15648
  return result2;
15566
15649
  }
15567
15650
  function basePropertyDeep(path) {
15568
- return function(object) {
15569
- return baseGet2(object, path);
15651
+ return function(object2) {
15652
+ return baseGet2(object2, path);
15570
15653
  };
15571
15654
  }
15572
15655
  function basePullAll(array2, values2, iteratee2, comparator2) {
@@ -15640,16 +15723,16 @@ lodash.exports;
15640
15723
  var array2 = values(collection);
15641
15724
  return shuffleSelf(array2, baseClamp(n2, 0, array2.length));
15642
15725
  }
15643
- function baseSet(object, path, value, customizer) {
15644
- if (!isObject2(object)) {
15645
- return object;
15726
+ function baseSet(object2, path, value, customizer) {
15727
+ if (!isObject2(object2)) {
15728
+ return object2;
15646
15729
  }
15647
- path = castPath2(path, object);
15648
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
15730
+ path = castPath2(path, object2);
15731
+ var index = -1, length = path.length, lastIndex = length - 1, nested = object2;
15649
15732
  while (nested != null && ++index < length) {
15650
15733
  var key = toKey2(path[index]), newValue = value;
15651
15734
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
15652
- return object;
15735
+ return object2;
15653
15736
  }
15654
15737
  if (index != lastIndex) {
15655
15738
  var objValue = nested[key];
@@ -15661,7 +15744,7 @@ lodash.exports;
15661
15744
  assignValue2(nested, key, newValue);
15662
15745
  nested = nested[key];
15663
15746
  }
15664
- return object;
15747
+ return object2;
15665
15748
  }
15666
15749
  var baseSetData = !metaMap ? identity2 : function(func2, data) {
15667
15750
  metaMap.set(func2, data);
@@ -15821,13 +15904,13 @@ lodash.exports;
15821
15904
  }
15822
15905
  return result2;
15823
15906
  }
15824
- function baseUnset2(object, path) {
15825
- path = castPath2(path, object);
15826
- object = parent2(object, path);
15827
- return object == null || delete object[toKey2(last2(path))];
15907
+ function baseUnset2(object2, path) {
15908
+ path = castPath2(path, object2);
15909
+ object2 = parent2(object2, path);
15910
+ return object2 == null || delete object2[toKey2(last2(path))];
15828
15911
  }
15829
- function baseUpdate(object, path, updater, customizer) {
15830
- return baseSet(object, path, updater(baseGet2(object, path)), customizer);
15912
+ function baseUpdate(object2, path, updater, customizer) {
15913
+ return baseSet(object2, path, updater(baseGet2(object2, path)), customizer);
15831
15914
  }
15832
15915
  function baseWhile(array2, predicate, isDrop, fromRight) {
15833
15916
  var length = array2.length, index = fromRight ? length : -1;
@@ -15874,11 +15957,11 @@ lodash.exports;
15874
15957
  function castFunction(value) {
15875
15958
  return typeof value == "function" ? value : identity2;
15876
15959
  }
15877
- function castPath2(value, object) {
15960
+ function castPath2(value, object2) {
15878
15961
  if (isArray2(value)) {
15879
15962
  return value;
15880
15963
  }
15881
- return isKey2(value, object) ? [value] : stringToPath2(toString2(value));
15964
+ return isKey2(value, object2) ? [value] : stringToPath2(toString2(value));
15882
15965
  }
15883
15966
  var castRest = baseRest;
15884
15967
  function castSlice2(array2, start, end) {
@@ -15931,8 +16014,8 @@ lodash.exports;
15931
16014
  }
15932
16015
  return 0;
15933
16016
  }
15934
- function compareMultiple(object, other, orders) {
15935
- var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
16017
+ function compareMultiple(object2, other, orders) {
16018
+ var index = -1, objCriteria = object2.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
15936
16019
  while (++index < length) {
15937
16020
  var result2 = compareAscending(objCriteria[index], othCriteria[index]);
15938
16021
  if (result2) {
@@ -15943,7 +16026,7 @@ lodash.exports;
15943
16026
  return result2 * (order == "desc" ? -1 : 1);
15944
16027
  }
15945
16028
  }
15946
- return object.index - other.index;
16029
+ return object2.index - other.index;
15947
16030
  }
15948
16031
  function composeArgs(args, partials, holders, isCurried) {
15949
16032
  var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax2(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried;
@@ -15984,29 +16067,29 @@ lodash.exports;
15984
16067
  }
15985
16068
  return array2;
15986
16069
  }
15987
- function copyObject2(source, props, object, customizer) {
15988
- var isNew = !object;
15989
- object || (object = {});
16070
+ function copyObject2(source, props, object2, customizer) {
16071
+ var isNew = !object2;
16072
+ object2 || (object2 = {});
15990
16073
  var index = -1, length = props.length;
15991
16074
  while (++index < length) {
15992
16075
  var key = props[index];
15993
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined$1;
16076
+ var newValue = customizer ? customizer(object2[key], source[key], key, object2, source) : undefined$1;
15994
16077
  if (newValue === undefined$1) {
15995
16078
  newValue = source[key];
15996
16079
  }
15997
16080
  if (isNew) {
15998
- baseAssignValue2(object, key, newValue);
16081
+ baseAssignValue2(object2, key, newValue);
15999
16082
  } else {
16000
- assignValue2(object, key, newValue);
16083
+ assignValue2(object2, key, newValue);
16001
16084
  }
16002
16085
  }
16003
- return object;
16086
+ return object2;
16004
16087
  }
16005
- function copySymbols2(source, object) {
16006
- return copyObject2(source, getSymbols2(source), object);
16088
+ function copySymbols2(source, object2) {
16089
+ return copyObject2(source, getSymbols2(source), object2);
16007
16090
  }
16008
- function copySymbolsIn2(source, object) {
16009
- return copyObject2(source, getSymbolsIn2(source), object);
16091
+ function copySymbolsIn2(source, object2) {
16092
+ return copyObject2(source, getSymbolsIn2(source), object2);
16010
16093
  }
16011
16094
  function createAggregator(setter, initializer) {
16012
16095
  return function(collection, iteratee2) {
@@ -16015,21 +16098,21 @@ lodash.exports;
16015
16098
  };
16016
16099
  }
16017
16100
  function createAssigner(assigner) {
16018
- return baseRest(function(object, sources) {
16101
+ return baseRest(function(object2, sources) {
16019
16102
  var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
16020
16103
  customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
16021
16104
  if (guard && isIterateeCall(sources[0], sources[1], guard)) {
16022
16105
  customizer = length < 3 ? undefined$1 : customizer;
16023
16106
  length = 1;
16024
16107
  }
16025
- object = Object2(object);
16108
+ object2 = Object2(object2);
16026
16109
  while (++index < length) {
16027
16110
  var source = sources[index];
16028
16111
  if (source) {
16029
- assigner(object, source, index, customizer);
16112
+ assigner(object2, source, index, customizer);
16030
16113
  }
16031
16114
  }
16032
- return object;
16115
+ return object2;
16033
16116
  });
16034
16117
  }
16035
16118
  function createBaseEach(eachFunc, fromRight) {
@@ -16050,15 +16133,15 @@ lodash.exports;
16050
16133
  };
16051
16134
  }
16052
16135
  function createBaseFor(fromRight) {
16053
- return function(object, iteratee2, keysFunc) {
16054
- var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
16136
+ return function(object2, iteratee2, keysFunc) {
16137
+ var index = -1, iterable = Object2(object2), props = keysFunc(object2), length = props.length;
16055
16138
  while (length--) {
16056
16139
  var key = props[fromRight ? length : ++index];
16057
16140
  if (iteratee2(iterable[key], key, iterable) === false) {
16058
16141
  break;
16059
16142
  }
16060
16143
  }
16061
- return object;
16144
+ return object2;
16062
16145
  };
16063
16146
  }
16064
16147
  function createBind(func2, bitmask, thisArg) {
@@ -16238,8 +16321,8 @@ lodash.exports;
16238
16321
  return wrapper;
16239
16322
  }
16240
16323
  function createInverter(setter, toIteratee) {
16241
- return function(object, iteratee2) {
16242
- return baseInverter(object, setter, toIteratee(iteratee2), {});
16324
+ return function(object2, iteratee2) {
16325
+ return baseInverter(object2, setter, toIteratee(iteratee2), {});
16243
16326
  };
16244
16327
  }
16245
16328
  function createMathOperation(operator, defaultValue) {
@@ -16369,15 +16452,15 @@ lodash.exports;
16369
16452
  return new Set2(values2);
16370
16453
  };
16371
16454
  function createToPairs(keysFunc) {
16372
- return function(object) {
16373
- var tag = getTag2(object);
16455
+ return function(object2) {
16456
+ var tag = getTag2(object2);
16374
16457
  if (tag == mapTag2) {
16375
- return mapToArray2(object);
16458
+ return mapToArray2(object2);
16376
16459
  }
16377
16460
  if (tag == setTag2) {
16378
- return setToPairs(object);
16461
+ return setToPairs(object2);
16379
16462
  }
16380
- return baseToPairs(object, keysFunc(object));
16463
+ return baseToPairs(object2, keysFunc(object2));
16381
16464
  };
16382
16465
  }
16383
16466
  function createWrap(func2, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
@@ -16434,13 +16517,13 @@ lodash.exports;
16434
16517
  var setter = data ? baseSetData : setData;
16435
16518
  return setWrapToString(setter(result2, newData), func2, bitmask);
16436
16519
  }
16437
- function customDefaultsAssignIn(objValue, srcValue, key, object) {
16438
- if (objValue === undefined$1 || eq2(objValue, objectProto2[key]) && !hasOwnProperty2.call(object, key)) {
16520
+ function customDefaultsAssignIn(objValue, srcValue, key, object2) {
16521
+ if (objValue === undefined$1 || eq2(objValue, objectProto2[key]) && !hasOwnProperty2.call(object2, key)) {
16439
16522
  return srcValue;
16440
16523
  }
16441
16524
  return objValue;
16442
16525
  }
16443
- function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
16526
+ function customDefaultsMerge(objValue, srcValue, key, object2, source, stack) {
16444
16527
  if (isObject2(objValue) && isObject2(srcValue)) {
16445
16528
  stack.set(srcValue, objValue);
16446
16529
  baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
@@ -16494,54 +16577,54 @@ lodash.exports;
16494
16577
  stack["delete"](other);
16495
16578
  return result2;
16496
16579
  }
16497
- function equalByTag2(object, other, tag, bitmask, customizer, equalFunc, stack) {
16580
+ function equalByTag2(object2, other, tag, bitmask, customizer, equalFunc, stack) {
16498
16581
  switch (tag) {
16499
16582
  case dataViewTag2:
16500
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
16583
+ if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) {
16501
16584
  return false;
16502
16585
  }
16503
- object = object.buffer;
16586
+ object2 = object2.buffer;
16504
16587
  other = other.buffer;
16505
16588
  case arrayBufferTag2:
16506
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
16589
+ if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object2), new Uint8Array2(other))) {
16507
16590
  return false;
16508
16591
  }
16509
16592
  return true;
16510
16593
  case boolTag2:
16511
16594
  case dateTag2:
16512
16595
  case numberTag2:
16513
- return eq2(+object, +other);
16596
+ return eq2(+object2, +other);
16514
16597
  case errorTag2:
16515
- return object.name == other.name && object.message == other.message;
16598
+ return object2.name == other.name && object2.message == other.message;
16516
16599
  case regexpTag2:
16517
16600
  case stringTag2:
16518
- return object == other + "";
16601
+ return object2 == other + "";
16519
16602
  case mapTag2:
16520
16603
  var convert = mapToArray2;
16521
16604
  case setTag2:
16522
16605
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
16523
16606
  convert || (convert = setToArray2);
16524
- if (object.size != other.size && !isPartial) {
16607
+ if (object2.size != other.size && !isPartial) {
16525
16608
  return false;
16526
16609
  }
16527
- var stacked = stack.get(object);
16610
+ var stacked = stack.get(object2);
16528
16611
  if (stacked) {
16529
16612
  return stacked == other;
16530
16613
  }
16531
16614
  bitmask |= COMPARE_UNORDERED_FLAG2;
16532
- stack.set(object, other);
16533
- var result2 = equalArrays2(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
16534
- stack["delete"](object);
16615
+ stack.set(object2, other);
16616
+ var result2 = equalArrays2(convert(object2), convert(other), bitmask, customizer, equalFunc, stack);
16617
+ stack["delete"](object2);
16535
16618
  return result2;
16536
16619
  case symbolTag2:
16537
16620
  if (symbolValueOf2) {
16538
- return symbolValueOf2.call(object) == symbolValueOf2.call(other);
16621
+ return symbolValueOf2.call(object2) == symbolValueOf2.call(other);
16539
16622
  }
16540
16623
  }
16541
16624
  return false;
16542
16625
  }
16543
- function equalObjects2(object, other, bitmask, customizer, equalFunc, stack) {
16544
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG2, objProps = getAllKeys2(object), objLength = objProps.length, othProps = getAllKeys2(other), othLength = othProps.length;
16626
+ function equalObjects2(object2, other, bitmask, customizer, equalFunc, stack) {
16627
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG2, objProps = getAllKeys2(object2), objLength = objProps.length, othProps = getAllKeys2(other), othLength = othProps.length;
16545
16628
  if (objLength != othLength && !isPartial) {
16546
16629
  return false;
16547
16630
  }
@@ -16552,20 +16635,20 @@ lodash.exports;
16552
16635
  return false;
16553
16636
  }
16554
16637
  }
16555
- var objStacked = stack.get(object);
16638
+ var objStacked = stack.get(object2);
16556
16639
  var othStacked = stack.get(other);
16557
16640
  if (objStacked && othStacked) {
16558
- return objStacked == other && othStacked == object;
16641
+ return objStacked == other && othStacked == object2;
16559
16642
  }
16560
16643
  var result2 = true;
16561
- stack.set(object, other);
16562
- stack.set(other, object);
16644
+ stack.set(object2, other);
16645
+ stack.set(other, object2);
16563
16646
  var skipCtor = isPartial;
16564
16647
  while (++index < objLength) {
16565
16648
  key = objProps[index];
16566
- var objValue = object[key], othValue = other[key];
16649
+ var objValue = object2[key], othValue = other[key];
16567
16650
  if (customizer) {
16568
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
16651
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue, othValue, key, object2, other, stack);
16569
16652
  }
16570
16653
  if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
16571
16654
  result2 = false;
@@ -16574,23 +16657,23 @@ lodash.exports;
16574
16657
  skipCtor || (skipCtor = key == "constructor");
16575
16658
  }
16576
16659
  if (result2 && !skipCtor) {
16577
- var objCtor = object.constructor, othCtor = other.constructor;
16578
- if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
16660
+ var objCtor = object2.constructor, othCtor = other.constructor;
16661
+ if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
16579
16662
  result2 = false;
16580
16663
  }
16581
16664
  }
16582
- stack["delete"](object);
16665
+ stack["delete"](object2);
16583
16666
  stack["delete"](other);
16584
16667
  return result2;
16585
16668
  }
16586
16669
  function flatRest2(func2) {
16587
16670
  return setToString2(overRest2(func2, undefined$1, flatten2), func2 + "");
16588
16671
  }
16589
- function getAllKeys2(object) {
16590
- return baseGetAllKeys2(object, keys2, getSymbols2);
16672
+ function getAllKeys2(object2) {
16673
+ return baseGetAllKeys2(object2, keys2, getSymbols2);
16591
16674
  }
16592
- function getAllKeysIn2(object) {
16593
- return baseGetAllKeys2(object, keysIn2, getSymbolsIn2);
16675
+ function getAllKeysIn2(object2) {
16676
+ return baseGetAllKeys2(object2, keysIn2, getSymbolsIn2);
16594
16677
  }
16595
16678
  var getData = !metaMap ? noop : function(func2) {
16596
16679
  return metaMap.get(func2);
@@ -16606,8 +16689,8 @@ lodash.exports;
16606
16689
  return result2;
16607
16690
  }
16608
16691
  function getHolder(func2) {
16609
- var object = hasOwnProperty2.call(lodash2, "placeholder") ? lodash2 : func2;
16610
- return object.placeholder;
16692
+ var object2 = hasOwnProperty2.call(lodash2, "placeholder") ? lodash2 : func2;
16693
+ return object2.placeholder;
16611
16694
  }
16612
16695
  function getIteratee() {
16613
16696
  var result2 = lodash2.iteratee || iteratee;
@@ -16618,16 +16701,16 @@ lodash.exports;
16618
16701
  var data = map22.__data__;
16619
16702
  return isKeyable2(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
16620
16703
  }
16621
- function getMatchData(object) {
16622
- var result2 = keys2(object), length = result2.length;
16704
+ function getMatchData(object2) {
16705
+ var result2 = keys2(object2), length = result2.length;
16623
16706
  while (length--) {
16624
- var key = result2[length], value = object[key];
16707
+ var key = result2[length], value = object2[key];
16625
16708
  result2[length] = [key, value, isStrictComparable(value)];
16626
16709
  }
16627
16710
  return result2;
16628
16711
  }
16629
- function getNative2(object, key) {
16630
- var value = getValue2(object, key);
16712
+ function getNative2(object2, key) {
16713
+ var value = getValue2(object2, key);
16631
16714
  return baseIsNative2(value) ? value : undefined$1;
16632
16715
  }
16633
16716
  function getRawTag2(value) {
@@ -16647,20 +16730,20 @@ lodash.exports;
16647
16730
  }
16648
16731
  return result2;
16649
16732
  }
16650
- var getSymbols2 = !nativeGetSymbols2 ? stubArray2 : function(object) {
16651
- if (object == null) {
16733
+ var getSymbols2 = !nativeGetSymbols2 ? stubArray2 : function(object2) {
16734
+ if (object2 == null) {
16652
16735
  return [];
16653
16736
  }
16654
- object = Object2(object);
16655
- return arrayFilter2(nativeGetSymbols2(object), function(symbol) {
16656
- return propertyIsEnumerable2.call(object, symbol);
16737
+ object2 = Object2(object2);
16738
+ return arrayFilter2(nativeGetSymbols2(object2), function(symbol) {
16739
+ return propertyIsEnumerable2.call(object2, symbol);
16657
16740
  });
16658
16741
  };
16659
- var getSymbolsIn2 = !nativeGetSymbols2 ? stubArray2 : function(object) {
16742
+ var getSymbolsIn2 = !nativeGetSymbols2 ? stubArray2 : function(object2) {
16660
16743
  var result2 = [];
16661
- while (object) {
16662
- arrayPush2(result2, getSymbols2(object));
16663
- object = getPrototype2(object);
16744
+ while (object2) {
16745
+ arrayPush2(result2, getSymbols2(object2));
16746
+ object2 = getPrototype2(object2);
16664
16747
  }
16665
16748
  return result2;
16666
16749
  };
@@ -16710,21 +16793,21 @@ lodash.exports;
16710
16793
  var match2 = source.match(reWrapDetails);
16711
16794
  return match2 ? match2[1].split(reSplitDetails) : [];
16712
16795
  }
16713
- function hasPath(object, path, hasFunc) {
16714
- path = castPath2(path, object);
16796
+ function hasPath(object2, path, hasFunc) {
16797
+ path = castPath2(path, object2);
16715
16798
  var index = -1, length = path.length, result2 = false;
16716
16799
  while (++index < length) {
16717
16800
  var key = toKey2(path[index]);
16718
- if (!(result2 = object != null && hasFunc(object, key))) {
16801
+ if (!(result2 = object2 != null && hasFunc(object2, key))) {
16719
16802
  break;
16720
16803
  }
16721
- object = object[key];
16804
+ object2 = object2[key];
16722
16805
  }
16723
16806
  if (result2 || ++index != length) {
16724
16807
  return result2;
16725
16808
  }
16726
- length = object == null ? 0 : object.length;
16727
- return !!length && isLength2(length) && isIndex2(key, length) && (isArray2(object) || isArguments2(object));
16809
+ length = object2 == null ? 0 : object2.length;
16810
+ return !!length && isLength2(length) && isIndex2(key, length) && (isArray2(object2) || isArguments2(object2));
16728
16811
  }
16729
16812
  function initCloneArray2(array2) {
16730
16813
  var length = array2.length, result2 = new array2.constructor(length);
@@ -16734,19 +16817,19 @@ lodash.exports;
16734
16817
  }
16735
16818
  return result2;
16736
16819
  }
16737
- function initCloneObject2(object) {
16738
- return typeof object.constructor == "function" && !isPrototype2(object) ? baseCreate2(getPrototype2(object)) : {};
16820
+ function initCloneObject2(object2) {
16821
+ return typeof object2.constructor == "function" && !isPrototype2(object2) ? baseCreate2(getPrototype2(object2)) : {};
16739
16822
  }
16740
- function initCloneByTag2(object, tag, isDeep) {
16741
- var Ctor = object.constructor;
16823
+ function initCloneByTag2(object2, tag, isDeep) {
16824
+ var Ctor = object2.constructor;
16742
16825
  switch (tag) {
16743
16826
  case arrayBufferTag2:
16744
- return cloneArrayBuffer2(object);
16827
+ return cloneArrayBuffer2(object2);
16745
16828
  case boolTag2:
16746
16829
  case dateTag2:
16747
- return new Ctor(+object);
16830
+ return new Ctor(+object2);
16748
16831
  case dataViewTag2:
16749
- return cloneDataView2(object, isDeep);
16832
+ return cloneDataView2(object2, isDeep);
16750
16833
  case float32Tag2:
16751
16834
  case float64Tag2:
16752
16835
  case int8Tag2:
@@ -16756,18 +16839,18 @@ lodash.exports;
16756
16839
  case uint8ClampedTag2:
16757
16840
  case uint16Tag2:
16758
16841
  case uint32Tag2:
16759
- return cloneTypedArray2(object, isDeep);
16842
+ return cloneTypedArray2(object2, isDeep);
16760
16843
  case mapTag2:
16761
16844
  return new Ctor();
16762
16845
  case numberTag2:
16763
16846
  case stringTag2:
16764
- return new Ctor(object);
16847
+ return new Ctor(object2);
16765
16848
  case regexpTag2:
16766
- return cloneRegExp2(object);
16849
+ return cloneRegExp2(object2);
16767
16850
  case setTag2:
16768
16851
  return new Ctor();
16769
16852
  case symbolTag2:
16770
- return cloneSymbol2(object);
16853
+ return cloneSymbol2(object2);
16771
16854
  }
16772
16855
  }
16773
16856
  function insertWrapDetails(source, details) {
@@ -16788,17 +16871,17 @@ lodash.exports;
16788
16871
  length = length == null ? MAX_SAFE_INTEGER2 : length;
16789
16872
  return !!length && (type == "number" || type != "symbol" && reIsUint2.test(value)) && (value > -1 && value % 1 == 0 && value < length);
16790
16873
  }
16791
- function isIterateeCall(value, index, object) {
16792
- if (!isObject2(object)) {
16874
+ function isIterateeCall(value, index, object2) {
16875
+ if (!isObject2(object2)) {
16793
16876
  return false;
16794
16877
  }
16795
16878
  var type = typeof index;
16796
- if (type == "number" ? isArrayLike2(object) && isIndex2(index, object.length) : type == "string" && index in object) {
16797
- return eq2(object[index], value);
16879
+ if (type == "number" ? isArrayLike2(object2) && isIndex2(index, object2.length) : type == "string" && index in object2) {
16880
+ return eq2(object2[index], value);
16798
16881
  }
16799
16882
  return false;
16800
16883
  }
16801
- function isKey2(value, object) {
16884
+ function isKey2(value, object2) {
16802
16885
  if (isArray2(value)) {
16803
16886
  return false;
16804
16887
  }
@@ -16806,7 +16889,7 @@ lodash.exports;
16806
16889
  if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol2(value)) {
16807
16890
  return true;
16808
16891
  }
16809
- return reIsPlainProp2.test(value) || !reIsDeepProp2.test(value) || object != null && value in Object2(object);
16892
+ return reIsPlainProp2.test(value) || !reIsDeepProp2.test(value) || object2 != null && value in Object2(object2);
16810
16893
  }
16811
16894
  function isKeyable2(value) {
16812
16895
  var type = typeof value;
@@ -16835,11 +16918,11 @@ lodash.exports;
16835
16918
  return value === value && !isObject2(value);
16836
16919
  }
16837
16920
  function matchesStrictComparable(key, srcValue) {
16838
- return function(object) {
16839
- if (object == null) {
16921
+ return function(object2) {
16922
+ if (object2 == null) {
16840
16923
  return false;
16841
16924
  }
16842
- return object[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object));
16925
+ return object2[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object2));
16843
16926
  };
16844
16927
  }
16845
16928
  function memoizeCapped2(func2) {
@@ -16888,10 +16971,10 @@ lodash.exports;
16888
16971
  data[1] = newBitmask;
16889
16972
  return data;
16890
16973
  }
16891
- function nativeKeysIn2(object) {
16974
+ function nativeKeysIn2(object2) {
16892
16975
  var result2 = [];
16893
- if (object != null) {
16894
- for (var key in Object2(object)) {
16976
+ if (object2 != null) {
16977
+ for (var key in Object2(object2)) {
16895
16978
  result2.push(key);
16896
16979
  }
16897
16980
  }
@@ -16916,8 +16999,8 @@ lodash.exports;
16916
16999
  return apply2(func2, this, otherArgs);
16917
17000
  };
16918
17001
  }
16919
- function parent2(object, path) {
16920
- return path.length < 2 ? object : baseGet2(object, baseSlice2(path, 0, -1));
17002
+ function parent2(object2, path) {
17003
+ return path.length < 2 ? object2 : baseGet2(object2, baseSlice2(path, 0, -1));
16921
17004
  }
16922
17005
  function reorder(array2, indexes) {
16923
17006
  var arrLength = array2.length, length = nativeMin2(indexes.length, arrLength), oldArray = copyArray2(array2);
@@ -16927,14 +17010,14 @@ lodash.exports;
16927
17010
  }
16928
17011
  return array2;
16929
17012
  }
16930
- function safeGet(object, key) {
16931
- if (key === "constructor" && typeof object[key] === "function") {
17013
+ function safeGet(object2, key) {
17014
+ if (key === "constructor" && typeof object2[key] === "function") {
16932
17015
  return;
16933
17016
  }
16934
17017
  if (key == "__proto__") {
16935
17018
  return;
16936
17019
  }
16937
- return object[key];
17020
+ return object2[key];
16938
17021
  }
16939
17022
  var setData = shortOut2(baseSetData);
16940
17023
  var setTimeout2 = ctxSetTimeout || function(func2, wait) {
@@ -17426,8 +17509,8 @@ lodash.exports;
17426
17509
  return interceptor(value);
17427
17510
  }
17428
17511
  var wrapperAt = flatRest2(function(paths) {
17429
- var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
17430
- return baseAt(object, paths);
17512
+ var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object2) {
17513
+ return baseAt(object2, paths);
17431
17514
  };
17432
17515
  if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex2(start)) {
17433
17516
  return this.thru(interceptor);
@@ -17688,13 +17771,13 @@ lodash.exports;
17688
17771
  }
17689
17772
  return createWrap(func2, bitmask, thisArg, partials, holders);
17690
17773
  });
17691
- var bindKey = baseRest(function(object, key, partials) {
17774
+ var bindKey = baseRest(function(object2, key, partials) {
17692
17775
  var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
17693
17776
  if (partials.length) {
17694
17777
  var holders = replaceHolders(partials, getHolder(bindKey));
17695
17778
  bitmask |= WRAP_PARTIAL_FLAG;
17696
17779
  }
17697
- return createWrap(key, bitmask, object, partials, holders);
17780
+ return createWrap(key, bitmask, object2, partials, holders);
17698
17781
  });
17699
17782
  function curry(func2, arity, guard) {
17700
17783
  arity = guard ? undefined$1 : arity;
@@ -17921,8 +18004,8 @@ lodash.exports;
17921
18004
  customizer = typeof customizer == "function" ? customizer : undefined$1;
17922
18005
  return baseClone2(value, CLONE_DEEP_FLAG2 | CLONE_SYMBOLS_FLAG2, customizer);
17923
18006
  }
17924
- function conformsTo(object, source) {
17925
- return source == null || baseConformsTo(object, source, keys2(source));
18007
+ function conformsTo(object2, source) {
18008
+ return source == null || baseConformsTo(object2, source, keys2(source));
17926
18009
  }
17927
18010
  function eq2(value, other) {
17928
18011
  return value === other || value !== value && other !== other;
@@ -18012,12 +18095,12 @@ lodash.exports;
18012
18095
  return value != null && typeof value == "object";
18013
18096
  }
18014
18097
  var isMap2 = nodeIsMap2 ? baseUnary2(nodeIsMap2) : baseIsMap2;
18015
- function isMatch(object, source) {
18016
- return object === source || baseIsMatch(object, source, getMatchData(source));
18098
+ function isMatch(object2, source) {
18099
+ return object2 === source || baseIsMatch(object2, source, getMatchData(source));
18017
18100
  }
18018
- function isMatchWith(object, source, customizer) {
18101
+ function isMatchWith(object2, source, customizer) {
18019
18102
  customizer = typeof customizer == "function" ? customizer : undefined$1;
18020
- return baseIsMatch(object, source, getMatchData(source), customizer);
18103
+ return baseIsMatch(object2, source, getMatchData(source), customizer);
18021
18104
  }
18022
18105
  function isNaN2(value) {
18023
18106
  return isNumber(value) && value != +value;
@@ -18131,33 +18214,33 @@ lodash.exports;
18131
18214
  function toString2(value) {
18132
18215
  return value == null ? "" : baseToString2(value);
18133
18216
  }
18134
- var assign2 = createAssigner(function(object, source) {
18217
+ var assign2 = createAssigner(function(object2, source) {
18135
18218
  if (isPrototype2(source) || isArrayLike2(source)) {
18136
- copyObject2(source, keys2(source), object);
18219
+ copyObject2(source, keys2(source), object2);
18137
18220
  return;
18138
18221
  }
18139
18222
  for (var key in source) {
18140
18223
  if (hasOwnProperty2.call(source, key)) {
18141
- assignValue2(object, key, source[key]);
18224
+ assignValue2(object2, key, source[key]);
18142
18225
  }
18143
18226
  }
18144
18227
  });
18145
- var assignIn = createAssigner(function(object, source) {
18146
- copyObject2(source, keysIn2(source), object);
18228
+ var assignIn = createAssigner(function(object2, source) {
18229
+ copyObject2(source, keysIn2(source), object2);
18147
18230
  });
18148
- var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
18149
- copyObject2(source, keysIn2(source), object, customizer);
18231
+ var assignInWith = createAssigner(function(object2, source, srcIndex, customizer) {
18232
+ copyObject2(source, keysIn2(source), object2, customizer);
18150
18233
  });
18151
- var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
18152
- copyObject2(source, keys2(source), object, customizer);
18234
+ var assignWith = createAssigner(function(object2, source, srcIndex, customizer) {
18235
+ copyObject2(source, keys2(source), object2, customizer);
18153
18236
  });
18154
18237
  var at2 = flatRest2(baseAt);
18155
18238
  function create(prototype, properties) {
18156
18239
  var result2 = baseCreate2(prototype);
18157
18240
  return properties == null ? result2 : baseAssign2(result2, properties);
18158
18241
  }
18159
- var defaults = baseRest(function(object, sources) {
18160
- object = Object2(object);
18242
+ var defaults = baseRest(function(object2, sources) {
18243
+ object2 = Object2(object2);
18161
18244
  var index = -1;
18162
18245
  var length = sources.length;
18163
18246
  var guard = length > 2 ? sources[2] : undefined$1;
@@ -18171,51 +18254,51 @@ lodash.exports;
18171
18254
  var propsLength = props.length;
18172
18255
  while (++propsIndex < propsLength) {
18173
18256
  var key = props[propsIndex];
18174
- var value = object[key];
18175
- if (value === undefined$1 || eq2(value, objectProto2[key]) && !hasOwnProperty2.call(object, key)) {
18176
- object[key] = source[key];
18257
+ var value = object2[key];
18258
+ if (value === undefined$1 || eq2(value, objectProto2[key]) && !hasOwnProperty2.call(object2, key)) {
18259
+ object2[key] = source[key];
18177
18260
  }
18178
18261
  }
18179
18262
  }
18180
- return object;
18263
+ return object2;
18181
18264
  });
18182
18265
  var defaultsDeep = baseRest(function(args) {
18183
18266
  args.push(undefined$1, customDefaultsMerge);
18184
18267
  return apply2(mergeWith, undefined$1, args);
18185
18268
  });
18186
- function findKey2(object, predicate) {
18187
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
18269
+ function findKey2(object2, predicate) {
18270
+ return baseFindKey(object2, getIteratee(predicate, 3), baseForOwn);
18188
18271
  }
18189
- function findLastKey(object, predicate) {
18190
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
18272
+ function findLastKey(object2, predicate) {
18273
+ return baseFindKey(object2, getIteratee(predicate, 3), baseForOwnRight);
18191
18274
  }
18192
- function forIn(object, iteratee2) {
18193
- return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn2);
18275
+ function forIn(object2, iteratee2) {
18276
+ return object2 == null ? object2 : baseFor(object2, getIteratee(iteratee2, 3), keysIn2);
18194
18277
  }
18195
- function forInRight(object, iteratee2) {
18196
- return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn2);
18278
+ function forInRight(object2, iteratee2) {
18279
+ return object2 == null ? object2 : baseForRight(object2, getIteratee(iteratee2, 3), keysIn2);
18197
18280
  }
18198
- function forOwn(object, iteratee2) {
18199
- return object && baseForOwn(object, getIteratee(iteratee2, 3));
18281
+ function forOwn(object2, iteratee2) {
18282
+ return object2 && baseForOwn(object2, getIteratee(iteratee2, 3));
18200
18283
  }
18201
- function forOwnRight(object, iteratee2) {
18202
- return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
18284
+ function forOwnRight(object2, iteratee2) {
18285
+ return object2 && baseForOwnRight(object2, getIteratee(iteratee2, 3));
18203
18286
  }
18204
- function functions(object) {
18205
- return object == null ? [] : baseFunctions(object, keys2(object));
18287
+ function functions(object2) {
18288
+ return object2 == null ? [] : baseFunctions(object2, keys2(object2));
18206
18289
  }
18207
- function functionsIn(object) {
18208
- return object == null ? [] : baseFunctions(object, keysIn2(object));
18290
+ function functionsIn(object2) {
18291
+ return object2 == null ? [] : baseFunctions(object2, keysIn2(object2));
18209
18292
  }
18210
- function get2(object, path, defaultValue) {
18211
- var result2 = object == null ? undefined$1 : baseGet2(object, path);
18293
+ function get2(object2, path, defaultValue) {
18294
+ var result2 = object2 == null ? undefined$1 : baseGet2(object2, path);
18212
18295
  return result2 === undefined$1 ? defaultValue : result2;
18213
18296
  }
18214
- function has(object, path) {
18215
- return object != null && hasPath(object, path, baseHas);
18297
+ function has(object2, path) {
18298
+ return object2 != null && hasPath(object2, path, baseHas);
18216
18299
  }
18217
- function hasIn(object, path) {
18218
- return object != null && hasPath(object, path, baseHasIn);
18300
+ function hasIn(object2, path) {
18301
+ return object2 != null && hasPath(object2, path, baseHasIn);
18219
18302
  }
18220
18303
  var invert = createInverter(function(result2, value, key) {
18221
18304
  if (value != null && typeof value.toString != "function") {
@@ -18234,46 +18317,46 @@ lodash.exports;
18234
18317
  }
18235
18318
  }, getIteratee);
18236
18319
  var invoke = baseRest(baseInvoke);
18237
- function keys2(object) {
18238
- return isArrayLike2(object) ? arrayLikeKeys2(object) : baseKeys2(object);
18320
+ function keys2(object2) {
18321
+ return isArrayLike2(object2) ? arrayLikeKeys2(object2) : baseKeys2(object2);
18239
18322
  }
18240
- function keysIn2(object) {
18241
- return isArrayLike2(object) ? arrayLikeKeys2(object, true) : baseKeysIn2(object);
18323
+ function keysIn2(object2) {
18324
+ return isArrayLike2(object2) ? arrayLikeKeys2(object2, true) : baseKeysIn2(object2);
18242
18325
  }
18243
- function mapKeys(object, iteratee2) {
18326
+ function mapKeys(object2, iteratee2) {
18244
18327
  var result2 = {};
18245
18328
  iteratee2 = getIteratee(iteratee2, 3);
18246
- baseForOwn(object, function(value, key, object2) {
18247
- baseAssignValue2(result2, iteratee2(value, key, object2), value);
18329
+ baseForOwn(object2, function(value, key, object22) {
18330
+ baseAssignValue2(result2, iteratee2(value, key, object22), value);
18248
18331
  });
18249
18332
  return result2;
18250
18333
  }
18251
- function mapValues(object, iteratee2) {
18334
+ function mapValues(object2, iteratee2) {
18252
18335
  var result2 = {};
18253
18336
  iteratee2 = getIteratee(iteratee2, 3);
18254
- baseForOwn(object, function(value, key, object2) {
18255
- baseAssignValue2(result2, key, iteratee2(value, key, object2));
18337
+ baseForOwn(object2, function(value, key, object22) {
18338
+ baseAssignValue2(result2, key, iteratee2(value, key, object22));
18256
18339
  });
18257
18340
  return result2;
18258
18341
  }
18259
- var merge = createAssigner(function(object, source, srcIndex) {
18260
- baseMerge(object, source, srcIndex);
18342
+ var merge = createAssigner(function(object2, source, srcIndex) {
18343
+ baseMerge(object2, source, srcIndex);
18261
18344
  });
18262
- var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
18263
- baseMerge(object, source, srcIndex, customizer);
18345
+ var mergeWith = createAssigner(function(object2, source, srcIndex, customizer) {
18346
+ baseMerge(object2, source, srcIndex, customizer);
18264
18347
  });
18265
- var omit2 = flatRest2(function(object, paths) {
18348
+ var omit2 = flatRest2(function(object2, paths) {
18266
18349
  var result2 = {};
18267
- if (object == null) {
18350
+ if (object2 == null) {
18268
18351
  return result2;
18269
18352
  }
18270
18353
  var isDeep = false;
18271
18354
  paths = arrayMap2(paths, function(path) {
18272
- path = castPath2(path, object);
18355
+ path = castPath2(path, object2);
18273
18356
  isDeep || (isDeep = path.length > 1);
18274
18357
  return path;
18275
18358
  });
18276
- copyObject2(object, getAllKeysIn2(object), result2);
18359
+ copyObject2(object2, getAllKeysIn2(object2), result2);
18277
18360
  if (isDeep) {
18278
18361
  result2 = baseClone2(result2, CLONE_DEEP_FLAG2 | CLONE_FLAT_FLAG2 | CLONE_SYMBOLS_FLAG2, customOmitClone2);
18279
18362
  }
@@ -18283,83 +18366,83 @@ lodash.exports;
18283
18366
  }
18284
18367
  return result2;
18285
18368
  });
18286
- function omitBy(object, predicate) {
18287
- return pickBy(object, negate(getIteratee(predicate)));
18369
+ function omitBy(object2, predicate) {
18370
+ return pickBy(object2, negate(getIteratee(predicate)));
18288
18371
  }
18289
- var pick2 = flatRest2(function(object, paths) {
18290
- return object == null ? {} : basePick(object, paths);
18372
+ var pick2 = flatRest2(function(object2, paths) {
18373
+ return object2 == null ? {} : basePick(object2, paths);
18291
18374
  });
18292
- function pickBy(object, predicate) {
18293
- if (object == null) {
18375
+ function pickBy(object2, predicate) {
18376
+ if (object2 == null) {
18294
18377
  return {};
18295
18378
  }
18296
- var props = arrayMap2(getAllKeysIn2(object), function(prop) {
18379
+ var props = arrayMap2(getAllKeysIn2(object2), function(prop) {
18297
18380
  return [prop];
18298
18381
  });
18299
18382
  predicate = getIteratee(predicate);
18300
- return basePickBy(object, props, function(value, path) {
18383
+ return basePickBy(object2, props, function(value, path) {
18301
18384
  return predicate(value, path[0]);
18302
18385
  });
18303
18386
  }
18304
- function result(object, path, defaultValue) {
18305
- path = castPath2(path, object);
18387
+ function result(object2, path, defaultValue) {
18388
+ path = castPath2(path, object2);
18306
18389
  var index = -1, length = path.length;
18307
18390
  if (!length) {
18308
18391
  length = 1;
18309
- object = undefined$1;
18392
+ object2 = undefined$1;
18310
18393
  }
18311
18394
  while (++index < length) {
18312
- var value = object == null ? undefined$1 : object[toKey2(path[index])];
18395
+ var value = object2 == null ? undefined$1 : object2[toKey2(path[index])];
18313
18396
  if (value === undefined$1) {
18314
18397
  index = length;
18315
18398
  value = defaultValue;
18316
18399
  }
18317
- object = isFunction2(value) ? value.call(object) : value;
18400
+ object2 = isFunction2(value) ? value.call(object2) : value;
18318
18401
  }
18319
- return object;
18402
+ return object2;
18320
18403
  }
18321
- function set(object, path, value) {
18322
- return object == null ? object : baseSet(object, path, value);
18404
+ function set(object2, path, value) {
18405
+ return object2 == null ? object2 : baseSet(object2, path, value);
18323
18406
  }
18324
- function setWith(object, path, value, customizer) {
18407
+ function setWith(object2, path, value, customizer) {
18325
18408
  customizer = typeof customizer == "function" ? customizer : undefined$1;
18326
- return object == null ? object : baseSet(object, path, value, customizer);
18409
+ return object2 == null ? object2 : baseSet(object2, path, value, customizer);
18327
18410
  }
18328
18411
  var toPairs = createToPairs(keys2);
18329
18412
  var toPairsIn = createToPairs(keysIn2);
18330
- function transform(object, iteratee2, accumulator) {
18331
- var isArr = isArray2(object), isArrLike = isArr || isBuffer2(object) || isTypedArray2(object);
18413
+ function transform(object2, iteratee2, accumulator) {
18414
+ var isArr = isArray2(object2), isArrLike = isArr || isBuffer2(object2) || isTypedArray2(object2);
18332
18415
  iteratee2 = getIteratee(iteratee2, 4);
18333
18416
  if (accumulator == null) {
18334
- var Ctor = object && object.constructor;
18417
+ var Ctor = object2 && object2.constructor;
18335
18418
  if (isArrLike) {
18336
18419
  accumulator = isArr ? new Ctor() : [];
18337
- } else if (isObject2(object)) {
18338
- accumulator = isFunction2(Ctor) ? baseCreate2(getPrototype2(object)) : {};
18420
+ } else if (isObject2(object2)) {
18421
+ accumulator = isFunction2(Ctor) ? baseCreate2(getPrototype2(object2)) : {};
18339
18422
  } else {
18340
18423
  accumulator = {};
18341
18424
  }
18342
18425
  }
18343
- (isArrLike ? arrayEach2 : baseForOwn)(object, function(value, index, object2) {
18344
- return iteratee2(accumulator, value, index, object2);
18426
+ (isArrLike ? arrayEach2 : baseForOwn)(object2, function(value, index, object22) {
18427
+ return iteratee2(accumulator, value, index, object22);
18345
18428
  });
18346
18429
  return accumulator;
18347
18430
  }
18348
- function unset(object, path) {
18349
- return object == null ? true : baseUnset2(object, path);
18431
+ function unset(object2, path) {
18432
+ return object2 == null ? true : baseUnset2(object2, path);
18350
18433
  }
18351
- function update(object, path, updater) {
18352
- return object == null ? object : baseUpdate(object, path, castFunction(updater));
18434
+ function update(object2, path, updater) {
18435
+ return object2 == null ? object2 : baseUpdate(object2, path, castFunction(updater));
18353
18436
  }
18354
- function updateWith(object, path, updater, customizer) {
18437
+ function updateWith(object2, path, updater, customizer) {
18355
18438
  customizer = typeof customizer == "function" ? customizer : undefined$1;
18356
- return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
18439
+ return object2 == null ? object2 : baseUpdate(object2, path, castFunction(updater), customizer);
18357
18440
  }
18358
- function values(object) {
18359
- return object == null ? [] : baseValues(object, keys2(object));
18441
+ function values(object2) {
18442
+ return object2 == null ? [] : baseValues(object2, keys2(object2));
18360
18443
  }
18361
- function valuesIn(object) {
18362
- return object == null ? [] : baseValues(object, keysIn2(object));
18444
+ function valuesIn(object2) {
18445
+ return object2 == null ? [] : baseValues(object2, keysIn2(object2));
18363
18446
  }
18364
18447
  function clamp(number2, lower, upper) {
18365
18448
  if (upper === undefined$1) {
@@ -18687,12 +18770,12 @@ lodash.exports;
18687
18770
  return isError2(e3) ? e3 : new Error2(e3);
18688
18771
  }
18689
18772
  });
18690
- var bindAll = flatRest2(function(object, methodNames) {
18773
+ var bindAll = flatRest2(function(object2, methodNames) {
18691
18774
  arrayEach2(methodNames, function(key) {
18692
18775
  key = toKey2(key);
18693
- baseAssignValue2(object, key, bind(object[key], object));
18776
+ baseAssignValue2(object2, key, bind(object2[key], object2));
18694
18777
  });
18695
- return object;
18778
+ return object2;
18696
18779
  });
18697
18780
  function cond(pairs) {
18698
18781
  var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
@@ -18738,41 +18821,41 @@ lodash.exports;
18738
18821
  return baseMatchesProperty(path, baseClone2(srcValue, CLONE_DEEP_FLAG2));
18739
18822
  }
18740
18823
  var method = baseRest(function(path, args) {
18741
- return function(object) {
18742
- return baseInvoke(object, path, args);
18824
+ return function(object2) {
18825
+ return baseInvoke(object2, path, args);
18743
18826
  };
18744
18827
  });
18745
- var methodOf = baseRest(function(object, args) {
18828
+ var methodOf = baseRest(function(object2, args) {
18746
18829
  return function(path) {
18747
- return baseInvoke(object, path, args);
18830
+ return baseInvoke(object2, path, args);
18748
18831
  };
18749
18832
  });
18750
- function mixin(object, source, options) {
18833
+ function mixin(object2, source, options) {
18751
18834
  var props = keys2(source), methodNames = baseFunctions(source, props);
18752
18835
  if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
18753
18836
  options = source;
18754
- source = object;
18755
- object = this;
18837
+ source = object2;
18838
+ object2 = this;
18756
18839
  methodNames = baseFunctions(source, keys2(source));
18757
18840
  }
18758
- var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction2(object);
18841
+ var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction2(object2);
18759
18842
  arrayEach2(methodNames, function(methodName) {
18760
18843
  var func2 = source[methodName];
18761
- object[methodName] = func2;
18844
+ object2[methodName] = func2;
18762
18845
  if (isFunc) {
18763
- object.prototype[methodName] = function() {
18846
+ object2.prototype[methodName] = function() {
18764
18847
  var chainAll = this.__chain__;
18765
18848
  if (chain2 || chainAll) {
18766
- var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray2(this.__actions__);
18767
- actions.push({ "func": func2, "args": arguments, "thisArg": object });
18849
+ var result2 = object2(this.__wrapped__), actions = result2.__actions__ = copyArray2(this.__actions__);
18850
+ actions.push({ "func": func2, "args": arguments, "thisArg": object2 });
18768
18851
  result2.__chain__ = chainAll;
18769
18852
  return result2;
18770
18853
  }
18771
- return func2.apply(object, arrayPush2([this.value()], arguments));
18854
+ return func2.apply(object2, arrayPush2([this.value()], arguments));
18772
18855
  };
18773
18856
  }
18774
18857
  });
18775
- return object;
18858
+ return object2;
18776
18859
  }
18777
18860
  function noConflict() {
18778
18861
  if (root2._ === this) {
@@ -18794,9 +18877,9 @@ lodash.exports;
18794
18877
  function property(path) {
18795
18878
  return isKey2(path) ? baseProperty(toKey2(path)) : basePropertyDeep(path);
18796
18879
  }
18797
- function propertyOf(object) {
18880
+ function propertyOf(object2) {
18798
18881
  return function(path) {
18799
- return object == null ? undefined$1 : baseGet2(object, path);
18882
+ return object2 == null ? undefined$1 : baseGet2(object2, path);
18800
18883
  };
18801
18884
  }
18802
18885
  var range2 = createRange();
@@ -28905,7 +28988,7 @@ function rs(t3, e3) {
28905
28988
  }
28906
28989
  return s4;
28907
28990
  }
28908
- function is$2(t3, e3, n2) {
28991
+ function is$3(t3, e3, n2) {
28909
28992
  const r2 = Ji, i3 = Vi, s4 = Ui;
28910
28993
  Ji = e3, Vi = true, Ui = t3;
28911
28994
  try {
@@ -29518,14 +29601,14 @@ class vs {
29518
29601
  return 1 === this._nodeMap.size && null === this._selection;
29519
29602
  }
29520
29603
  read(t3, e3) {
29521
- return is$2(e3 && e3.editor || null, this, t3);
29604
+ return is$3(e3 && e3.editor || null, this, t3);
29522
29605
  }
29523
29606
  clone(t3) {
29524
29607
  const e3 = new vs(this._nodeMap, void 0 === t3 ? this._selection : t3);
29525
29608
  return e3._readOnly = true, e3;
29526
29609
  }
29527
29610
  toJSON() {
29528
- return is$2(null, this, () => ({ root: xs(ke()) }));
29611
+ return is$3(null, this, () => ({ root: xs(ke()) }));
29529
29612
  }
29530
29613
  }
29531
29614
  class Ss extends fs {
@@ -30600,6 +30683,8 @@ function createExtensionAPI(messageAPI, staticDefaultContext) {
30600
30683
  mentionMenuData: proxyExtensionAPI(messageAPI, "mentionMenuData"),
30601
30684
  evaluatedFeatureFlag: proxyExtensionAPI(messageAPI, "evaluatedFeatureFlag"),
30602
30685
  prompts: proxyExtensionAPI(messageAPI, "prompts"),
30686
+ promptTags: proxyExtensionAPI(messageAPI, "promptTags"),
30687
+ getCurrentUserId: proxyExtensionAPI(messageAPI, "getCurrentUserId"),
30603
30688
  clientActionBroadcast: proxyExtensionAPI(messageAPI, "clientActionBroadcast"),
30604
30689
  models: proxyExtensionAPI(messageAPI, "models"),
30605
30690
  chatModels: proxyExtensionAPI(messageAPI, "chatModels"),
@@ -30617,6 +30702,376 @@ function createExtensionAPI(messageAPI, staticDefaultContext) {
30617
30702
  userProductSubscription: proxyExtensionAPI(messageAPI, "userProductSubscription")
30618
30703
  };
30619
30704
  }
30705
+ var store;
30706
+ function getGlobalConfig(config2) {
30707
+ return {
30708
+ lang: (config2 == null ? void 0 : config2.lang) ?? (store == null ? void 0 : store.lang),
30709
+ message: config2 == null ? void 0 : config2.message,
30710
+ abortEarly: (config2 == null ? void 0 : config2.abortEarly) ?? (store == null ? void 0 : store.abortEarly),
30711
+ abortPipeEarly: (config2 == null ? void 0 : config2.abortPipeEarly) ?? (store == null ? void 0 : store.abortPipeEarly)
30712
+ };
30713
+ }
30714
+ var store2;
30715
+ function getGlobalMessage(lang) {
30716
+ return store2 == null ? void 0 : store2.get(lang);
30717
+ }
30718
+ var store3;
30719
+ function getSchemaMessage(lang) {
30720
+ return store3 == null ? void 0 : store3.get(lang);
30721
+ }
30722
+ var store4;
30723
+ function getSpecificMessage(reference, lang) {
30724
+ var _a2;
30725
+ return (_a2 = store4 == null ? void 0 : store4.get(reference)) == null ? void 0 : _a2.get(lang);
30726
+ }
30727
+ function _stringify(input) {
30728
+ var _a2, _b;
30729
+ const type = typeof input;
30730
+ if (type === "string") {
30731
+ return `"${input}"`;
30732
+ }
30733
+ if (type === "number" || type === "bigint" || type === "boolean") {
30734
+ return `${input}`;
30735
+ }
30736
+ if (type === "object" || type === "function") {
30737
+ return (input && ((_b = (_a2 = Object.getPrototypeOf(input)) == null ? void 0 : _a2.constructor) == null ? void 0 : _b.name)) ?? "null";
30738
+ }
30739
+ return type;
30740
+ }
30741
+ function _addIssue(context2, label, dataset, config2, other) {
30742
+ const input = other && "input" in other ? other.input : dataset.value;
30743
+ const expected = (other == null ? void 0 : other.expected) ?? context2.expects ?? null;
30744
+ const received = (other == null ? void 0 : other.received) ?? _stringify(input);
30745
+ const issue = {
30746
+ kind: context2.kind,
30747
+ type: context2.type,
30748
+ input,
30749
+ expected,
30750
+ received,
30751
+ message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
30752
+ requirement: context2.requirement,
30753
+ path: other == null ? void 0 : other.path,
30754
+ issues: other == null ? void 0 : other.issues,
30755
+ lang: config2.lang,
30756
+ abortEarly: config2.abortEarly,
30757
+ abortPipeEarly: config2.abortPipeEarly
30758
+ };
30759
+ const isSchema = context2.kind === "schema";
30760
+ const message = (other == null ? void 0 : other.message) ?? context2.message ?? getSpecificMessage(context2.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);
30761
+ if (message) {
30762
+ issue.message = typeof message === "function" ? (
30763
+ // @ts-expect-error
30764
+ message(issue)
30765
+ ) : message;
30766
+ }
30767
+ if (isSchema) {
30768
+ dataset.typed = false;
30769
+ }
30770
+ if (dataset.issues) {
30771
+ dataset.issues.push(issue);
30772
+ } else {
30773
+ dataset.issues = [issue];
30774
+ }
30775
+ }
30776
+ function _getStandardProps(context2) {
30777
+ return {
30778
+ version: 1,
30779
+ vendor: "valibot",
30780
+ validate(value2) {
30781
+ return context2["~run"]({ value: value2 }, getGlobalConfig());
30782
+ }
30783
+ };
30784
+ }
30785
+ function _joinExpects(values, separator) {
30786
+ const list = [...new Set(values)];
30787
+ if (list.length > 1) {
30788
+ return `(${list.join(` ${separator} `)})`;
30789
+ }
30790
+ return list[0] ?? "never";
30791
+ }
30792
+ function getDefault(schema, dataset, config2) {
30793
+ return typeof schema.default === "function" ? (
30794
+ // @ts-expect-error
30795
+ schema.default(dataset, config2)
30796
+ ) : (
30797
+ // @ts-expect-error
30798
+ schema.default
30799
+ );
30800
+ }
30801
+ function is$2(schema, input) {
30802
+ return !schema["~run"]({ value: input }, { abortEarly: true }).issues;
30803
+ }
30804
+ function array$1(item, message) {
30805
+ return {
30806
+ kind: "schema",
30807
+ type: "array",
30808
+ reference: array$1,
30809
+ expects: "Array",
30810
+ async: false,
30811
+ item,
30812
+ message,
30813
+ get "~standard"() {
30814
+ return _getStandardProps(this);
30815
+ },
30816
+ "~run"(dataset, config2) {
30817
+ var _a2;
30818
+ const input = dataset.value;
30819
+ if (Array.isArray(input)) {
30820
+ dataset.typed = true;
30821
+ dataset.value = [];
30822
+ for (let key = 0; key < input.length; key++) {
30823
+ const value2 = input[key];
30824
+ const itemDataset = this.item["~run"]({ value: value2 }, config2);
30825
+ if (itemDataset.issues) {
30826
+ const pathItem = {
30827
+ type: "array",
30828
+ origin: "value",
30829
+ input,
30830
+ key,
30831
+ value: value2
30832
+ };
30833
+ for (const issue of itemDataset.issues) {
30834
+ if (issue.path) {
30835
+ issue.path.unshift(pathItem);
30836
+ } else {
30837
+ issue.path = [pathItem];
30838
+ }
30839
+ (_a2 = dataset.issues) == null ? void 0 : _a2.push(issue);
30840
+ }
30841
+ if (!dataset.issues) {
30842
+ dataset.issues = itemDataset.issues;
30843
+ }
30844
+ if (config2.abortEarly) {
30845
+ dataset.typed = false;
30846
+ break;
30847
+ }
30848
+ }
30849
+ if (!itemDataset.typed) {
30850
+ dataset.typed = false;
30851
+ }
30852
+ dataset.value.push(itemDataset.value);
30853
+ }
30854
+ } else {
30855
+ _addIssue(this, "type", dataset, config2);
30856
+ }
30857
+ return dataset;
30858
+ }
30859
+ };
30860
+ }
30861
+ function literal(literal_, message) {
30862
+ return {
30863
+ kind: "schema",
30864
+ type: "literal",
30865
+ reference: literal,
30866
+ expects: _stringify(literal_),
30867
+ async: false,
30868
+ literal: literal_,
30869
+ message,
30870
+ get "~standard"() {
30871
+ return _getStandardProps(this);
30872
+ },
30873
+ "~run"(dataset, config2) {
30874
+ if (dataset.value === this.literal) {
30875
+ dataset.typed = true;
30876
+ } else {
30877
+ _addIssue(this, "type", dataset, config2);
30878
+ }
30879
+ return dataset;
30880
+ }
30881
+ };
30882
+ }
30883
+ function object(entries, message) {
30884
+ return {
30885
+ kind: "schema",
30886
+ type: "object",
30887
+ reference: object,
30888
+ expects: "Object",
30889
+ async: false,
30890
+ entries,
30891
+ message,
30892
+ get "~standard"() {
30893
+ return _getStandardProps(this);
30894
+ },
30895
+ "~run"(dataset, config2) {
30896
+ var _a2;
30897
+ const input = dataset.value;
30898
+ if (input && typeof input === "object") {
30899
+ dataset.typed = true;
30900
+ dataset.value = {};
30901
+ for (const key in this.entries) {
30902
+ const value2 = input[key];
30903
+ const valueDataset = this.entries[key]["~run"]({ value: value2 }, config2);
30904
+ if (valueDataset.issues) {
30905
+ const pathItem = {
30906
+ type: "object",
30907
+ origin: "value",
30908
+ input,
30909
+ key,
30910
+ value: value2
30911
+ };
30912
+ for (const issue of valueDataset.issues) {
30913
+ if (issue.path) {
30914
+ issue.path.unshift(pathItem);
30915
+ } else {
30916
+ issue.path = [pathItem];
30917
+ }
30918
+ (_a2 = dataset.issues) == null ? void 0 : _a2.push(issue);
30919
+ }
30920
+ if (!dataset.issues) {
30921
+ dataset.issues = valueDataset.issues;
30922
+ }
30923
+ if (config2.abortEarly) {
30924
+ dataset.typed = false;
30925
+ break;
30926
+ }
30927
+ }
30928
+ if (!valueDataset.typed) {
30929
+ dataset.typed = false;
30930
+ }
30931
+ if (valueDataset.value !== void 0 || key in input) {
30932
+ dataset.value[key] = valueDataset.value;
30933
+ }
30934
+ }
30935
+ } else {
30936
+ _addIssue(this, "type", dataset, config2);
30937
+ }
30938
+ return dataset;
30939
+ }
30940
+ };
30941
+ }
30942
+ function optional(wrapped, default_) {
30943
+ return {
30944
+ kind: "schema",
30945
+ type: "optional",
30946
+ reference: optional,
30947
+ expects: `(${wrapped.expects} | undefined)`,
30948
+ async: false,
30949
+ wrapped,
30950
+ default: default_,
30951
+ get "~standard"() {
30952
+ return _getStandardProps(this);
30953
+ },
30954
+ "~run"(dataset, config2) {
30955
+ if (dataset.value === void 0) {
30956
+ if (this.default !== void 0) {
30957
+ dataset.value = getDefault(this, dataset, config2);
30958
+ }
30959
+ if (dataset.value === void 0) {
30960
+ dataset.typed = true;
30961
+ return dataset;
30962
+ }
30963
+ }
30964
+ return this.wrapped["~run"](dataset, config2);
30965
+ }
30966
+ };
30967
+ }
30968
+ function string$1(message) {
30969
+ return {
30970
+ kind: "schema",
30971
+ type: "string",
30972
+ reference: string$1,
30973
+ expects: "string",
30974
+ async: false,
30975
+ message,
30976
+ get "~standard"() {
30977
+ return _getStandardProps(this);
30978
+ },
30979
+ "~run"(dataset, config2) {
30980
+ if (typeof dataset.value === "string") {
30981
+ dataset.typed = true;
30982
+ } else {
30983
+ _addIssue(this, "type", dataset, config2);
30984
+ }
30985
+ return dataset;
30986
+ }
30987
+ };
30988
+ }
30989
+ function variant(key, options, message) {
30990
+ return {
30991
+ kind: "schema",
30992
+ type: "variant",
30993
+ reference: variant,
30994
+ expects: "Object",
30995
+ async: false,
30996
+ key,
30997
+ options,
30998
+ message,
30999
+ get "~standard"() {
31000
+ return _getStandardProps(this);
31001
+ },
31002
+ "~run"(dataset, config2) {
31003
+ const input = dataset.value;
31004
+ if (input && typeof input === "object") {
31005
+ let outputDataset;
31006
+ let maxDiscriminatorPriority = 0;
31007
+ let invalidDiscriminatorKey = this.key;
31008
+ let expectedDiscriminators = [];
31009
+ const parseOptions2 = (variant2, allKeys) => {
31010
+ for (const schema of variant2.options) {
31011
+ if (schema.type === "variant") {
31012
+ parseOptions2(schema, new Set(allKeys).add(schema.key));
31013
+ } else {
31014
+ let keysAreValid = true;
31015
+ let currentPriority = 0;
31016
+ for (const currentKey of allKeys) {
31017
+ if (schema.entries[currentKey]["~run"](
31018
+ // @ts-expect-error
31019
+ { typed: false, value: input[currentKey] },
31020
+ config2
31021
+ ).issues) {
31022
+ keysAreValid = false;
31023
+ if (invalidDiscriminatorKey !== currentKey && (maxDiscriminatorPriority < currentPriority || maxDiscriminatorPriority === currentPriority && currentKey in input && !(invalidDiscriminatorKey in input))) {
31024
+ maxDiscriminatorPriority = currentPriority;
31025
+ invalidDiscriminatorKey = currentKey;
31026
+ expectedDiscriminators = [];
31027
+ }
31028
+ if (invalidDiscriminatorKey === currentKey) {
31029
+ expectedDiscriminators.push(
31030
+ schema.entries[currentKey].expects
31031
+ );
31032
+ }
31033
+ break;
31034
+ }
31035
+ currentPriority++;
31036
+ }
31037
+ if (keysAreValid) {
31038
+ const optionDataset = schema["~run"]({ value: input }, config2);
31039
+ if (!outputDataset || !outputDataset.typed && optionDataset.typed) {
31040
+ outputDataset = optionDataset;
31041
+ }
31042
+ }
31043
+ }
31044
+ if (outputDataset && !outputDataset.issues) {
31045
+ break;
31046
+ }
31047
+ }
31048
+ };
31049
+ parseOptions2(this, /* @__PURE__ */ new Set([this.key]));
31050
+ if (outputDataset) {
31051
+ return outputDataset;
31052
+ }
31053
+ _addIssue(this, "type", dataset, config2, {
31054
+ // @ts-expect-error
31055
+ input: input[invalidDiscriminatorKey],
31056
+ expected: _joinExpects(expectedDiscriminators, "|"),
31057
+ path: [
31058
+ {
31059
+ type: "object",
31060
+ origin: "value",
31061
+ input,
31062
+ key: invalidDiscriminatorKey,
31063
+ // @ts-expect-error
31064
+ value: input[invalidDiscriminatorKey]
31065
+ }
31066
+ ]
31067
+ });
31068
+ } else {
31069
+ _addIssue(this, "type", dataset, config2);
31070
+ }
31071
+ return dataset;
31072
+ }
31073
+ };
31074
+ }
30620
31075
  var root = _root;
30621
31076
  var now$1 = function() {
30622
31077
  return root.Date.now();
@@ -30756,10 +31211,98 @@ const ACCOUNT_LIMITS_INFO_URL = new URL(
30756
31211
  "https://sourcegraph.com/docs/cody/troubleshooting#autocomplete-rate-limits"
30757
31212
  );
30758
31213
  const CODY_BLOG_URL_o1_WAITLIST = new URL("https://sourcegraph.com/blog/openai-o1-for-cody");
31214
+ const DOTCOM_WORKSPACE_LEARN_MORE_URL = new URL("https://sourcegraph.com/docs");
30759
31215
  const sourcegraphTokenRegex = /(sgp_(?:[a-fA-F0-9]{16}|local)|sgp_)?[a-fA-F0-9]{40}|(sgd|slk|sgs)_[a-fA-F0-9]{64}/;
30760
31216
  function isSourcegraphToken(text) {
30761
31217
  return sourcegraphTokenRegex.test(text);
30762
31218
  }
31219
+ var CodyTaskState = /* @__PURE__ */ ((CodyTaskState2) => {
31220
+ CodyTaskState2["Idle"] = "Idle";
31221
+ CodyTaskState2["Working"] = "Working";
31222
+ CodyTaskState2["Inserting"] = "Inserting";
31223
+ CodyTaskState2["Applying"] = "Applying";
31224
+ CodyTaskState2["Applied"] = "Applied";
31225
+ CodyTaskState2["Finished"] = "Finished";
31226
+ CodyTaskState2["Error"] = "Error";
31227
+ CodyTaskState2["Pending"] = "Pending";
31228
+ return CodyTaskState2;
31229
+ })(CodyTaskState || {});
31230
+ const FileContentResultSchema = object({
31231
+ type: literal("file"),
31232
+ repoName: string$1(),
31233
+ filePath: string$1(),
31234
+ rev: string$1()
31235
+ });
31236
+ const ResultSchema = variant("type", [FileContentResultSchema]);
31237
+ const MentionDataSchema = object({
31238
+ results: array$1(ResultSchema),
31239
+ tooltip: optional(string$1())
31240
+ });
31241
+ function createCodeSearchProvider() {
31242
+ return {
31243
+ providerUri: CODE_SEARCH_PROVIDER_URI,
31244
+ meta() {
31245
+ return {
31246
+ name: "Code Search",
31247
+ mentions: {}
31248
+ };
31249
+ },
31250
+ async items({ mention }) {
31251
+ if (!is$2(MentionDataSchema, mention == null ? void 0 : mention.data)) {
31252
+ return [];
31253
+ }
31254
+ const searchResultsMention = mention.data;
31255
+ return (await Promise.all(
31256
+ searchResultsMention.results.map((result) => {
31257
+ if (result.type === "file") {
31258
+ return getFileItem(result.repoName, result.filePath, result.rev);
31259
+ }
31260
+ return null;
31261
+ }).filter(isDefined)
31262
+ )).flat();
31263
+ }
31264
+ };
31265
+ }
31266
+ async function getFileItem(repoName, filePath, rev = "HEAD") {
31267
+ var _a2, _b;
31268
+ const { auth } = await currentResolvedConfig();
31269
+ const dataOrError = await graphqlClient.getFileContents(repoName, filePath, rev);
31270
+ if (isError(dataOrError)) {
31271
+ return [];
31272
+ }
31273
+ const file = (_b = (_a2 = dataOrError == null ? void 0 : dataOrError.repository) == null ? void 0 : _a2.commit) == null ? void 0 : _b.file;
31274
+ if (!file) {
31275
+ return [];
31276
+ }
31277
+ const url = `${auth.serverEndpoint.replace(/\/$/, "")}${file.url}`;
31278
+ return [
31279
+ {
31280
+ url,
31281
+ title: `${repoName}/${file.path}`,
31282
+ ai: {
31283
+ content: file.content
31284
+ }
31285
+ }
31286
+ ];
31287
+ }
31288
+ function createContextItem(results) {
31289
+ const uri = `search://${CODE_SEARCH_PROVIDER_URI}`;
31290
+ return {
31291
+ type: "openctx",
31292
+ provider: "openctx",
31293
+ title: `${results.length} code search ${pluralize("result", results.length)}`,
31294
+ uri: URI.parse(uri),
31295
+ providerUri: CODE_SEARCH_PROVIDER_URI,
31296
+ mention: {
31297
+ uri,
31298
+ data: {
31299
+ results,
31300
+ tooltip: "Code results make the organization, repo name, and code available as context"
31301
+ }
31302
+ },
31303
+ source: ContextItemSource.User
31304
+ };
31305
+ }
30763
31306
  var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString = toString_1;
30764
31307
  function createCaseFirst$1(methodName) {
30765
31308
  return function(string2) {
@@ -30775,17 +31318,6 @@ var createCaseFirst = _createCaseFirst;
30775
31318
  var upperFirst = createCaseFirst("toUpperCase");
30776
31319
  var upperFirst_1 = upperFirst;
30777
31320
  const upperFirst$1 = /* @__PURE__ */ getDefaultExportFromCjs(upperFirst_1);
30778
- var CodyTaskState = /* @__PURE__ */ ((CodyTaskState2) => {
30779
- CodyTaskState2["Idle"] = "Idle";
30780
- CodyTaskState2["Working"] = "Working";
30781
- CodyTaskState2["Inserting"] = "Inserting";
30782
- CodyTaskState2["Applying"] = "Applying";
30783
- CodyTaskState2["Applied"] = "Applied";
30784
- CodyTaskState2["Finished"] = "Finished";
30785
- CodyTaskState2["Error"] = "Error";
30786
- CodyTaskState2["Pending"] = "Pending";
30787
- return CodyTaskState2;
30788
- })(CodyTaskState || {});
30789
31321
  var View = /* @__PURE__ */ ((View2) => {
30790
31322
  View2["Chat"] = "chat";
30791
31323
  View2["Login"] = "login";
@@ -30869,9 +31401,9 @@ var ErrorCodes;
30869
31401
  ErrorCodes2.serverErrorEnd = -32e3;
30870
31402
  })(ErrorCodes || (messages.ErrorCodes = ErrorCodes = {}));
30871
31403
  class ResponseError extends Error {
30872
- constructor(code, message, data) {
31404
+ constructor(code2, message, data) {
30873
31405
  super(message);
30874
- this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
31406
+ this.code = is.number(code2) ? code2 : ErrorCodes.UnknownErrorCode;
30875
31407
  this.data = data;
30876
31408
  Object.setPrototypeOf(this, ResponseError.prototype);
30877
31409
  }
@@ -32376,9 +32908,9 @@ var connection = {};
32376
32908
  ConnectionErrors2[ConnectionErrors2["AlreadyListening"] = 3] = "AlreadyListening";
32377
32909
  })(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {}));
32378
32910
  class ConnectionError extends Error {
32379
- constructor(code, message) {
32911
+ constructor(code2, message) {
32380
32912
  super(message);
32381
- this.code = code;
32913
+ this.code = code2;
32382
32914
  Object.setPrototypeOf(this, ConnectionError.prototype);
32383
32915
  }
32384
32916
  }
@@ -33818,7 +34350,7 @@ export {
33818
34350
  b2 as Z,
33819
34351
  _s as _,
33820
34352
  ds as a,
33821
- Ts as a$,
34353
+ debounce$1 as a$,
33822
34354
  s3 as a0,
33823
34355
  o as a1,
33824
34356
  w2 as a2,
@@ -33829,33 +34361,33 @@ export {
33829
34361
  m3 as a7,
33830
34362
  S3 as a8,
33831
34363
  v as a9,
33832
- Es as aA,
33833
- U as aB,
33834
- e2 as aC,
33835
- Ns as aD,
33836
- an as aE,
33837
- gs as aF,
33838
- serializeContextItem as aG,
33839
- CONTEXT_ITEM_MENTION_NODE_TYPE as aH,
33840
- contextItemMentionNodeDisplayText as aI,
33841
- URI as aJ,
33842
- qr as aK,
33843
- _ as aL,
33844
- TEMPLATE_INPUT_NODE_TYPE as aM,
33845
- N as aN,
33846
- parseMentionQuery as aO,
33847
- NO_SYMBOL_MATCHES_HELP_LABEL as aP,
33848
- FILE_RANGE_TOOLTIP_LABEL as aQ,
33849
- Observable as aR,
33850
- createExtensionAPI as aS,
33851
- createMessageAPIForWebview as aT,
33852
- debounce$1 as aU,
33853
- memoizeLastValue as aV,
33854
- toSerializedPromptEditorValue as aW,
33855
- ri as aX,
33856
- isEqual$1 as aY,
33857
- scanForMentionTriggerInUserTextInput as aZ,
33858
- fs as a_,
34364
+ Ei as aA,
34365
+ xe as aB,
34366
+ V as aC,
34367
+ Es as aD,
34368
+ U as aE,
34369
+ e2 as aF,
34370
+ Ns as aG,
34371
+ object as aH,
34372
+ literal as aI,
34373
+ string$1 as aJ,
34374
+ an as aK,
34375
+ gs as aL,
34376
+ serializeContextItem as aM,
34377
+ CONTEXT_ITEM_MENTION_NODE_TYPE as aN,
34378
+ contextItemMentionNodeDisplayText as aO,
34379
+ URI as aP,
34380
+ is$2 as aQ,
34381
+ qr as aR,
34382
+ _ as aS,
34383
+ TEMPLATE_INPUT_NODE_TYPE as aT,
34384
+ N as aU,
34385
+ parseMentionQuery as aV,
34386
+ NO_SYMBOL_MATCHES_HELP_LABEL as aW,
34387
+ FILE_RANGE_TOOLTIP_LABEL as aX,
34388
+ Observable as aY,
34389
+ createExtensionAPI as aZ,
34390
+ createMessageAPIForWebview as a_,
33859
34391
  P as aa,
33860
34392
  E2 as ab,
33861
34393
  Wi as ac,
@@ -33867,273 +34399,293 @@ export {
33867
34399
  u2 as ai,
33868
34400
  r as aj,
33869
34401
  t2 as ak,
33870
- FILE_CONTEXT_MENTION_PROVIDER as al,
33871
- SYMBOL_CONTEXT_MENTION_PROVIDER as am,
33872
- REMOTE_REPOSITORY_PROVIDER_URI as an,
33873
- REMOTE_FILE_PROVIDER_URI as ao,
33874
- REMOTE_DIRECTORY_PROVIDER_URI as ap,
33875
- WEB_PROVIDER_URI as aq,
33876
- displayPath as ar,
33877
- displayLineRange as as,
33878
- displayPathDirname as at,
33879
- displayPathBasename as au,
33880
- IGNORED_FILE_WARNING_LABEL as av,
33881
- LARGE_FILE_WARNING_LABEL as aw,
33882
- Ei as ax,
33883
- xe as ay,
33884
- V as az,
34402
+ isRemoteWorkspaceProvider as al,
34403
+ FILE_CONTEXT_MENTION_PROVIDER as am,
34404
+ SYMBOL_CONTEXT_MENTION_PROVIDER as an,
34405
+ REMOTE_REPOSITORY_PROVIDER_URI as ao,
34406
+ REMOTE_FILE_PROVIDER_URI as ap,
34407
+ REMOTE_DIRECTORY_PROVIDER_URI as aq,
34408
+ WEB_PROVIDER_URI as ar,
34409
+ WORKSPACE_DIRECTORY_PROVIDER_URI as as,
34410
+ WORKSPACE_REPOSITORY_PROVIDER_URI as at,
34411
+ displayPath as au,
34412
+ displayLineRange as av,
34413
+ displayPathDirname as aw,
34414
+ displayPathBasename as ax,
34415
+ IGNORED_FILE_WARNING_LABEL as ay,
34416
+ LARGE_FILE_WARNING_LABEL as az,
33885
34417
  ks as b,
33886
- logDebug as b$,
33887
- ps as b0,
33888
- getMentionOperations as b1,
33889
- forceHydration as b2,
33890
- hydrateAfterPostMessage as b3,
33891
- isSourcegraphToken as b4,
33892
- trace as b5,
33893
- context as b6,
33894
- SpanStatusCode as b7,
33895
- FeatureFlag as b8,
33896
- webviewOpenURIForContextItem as b9,
33897
- isDotCom as bA,
33898
- lodashExports as bB,
33899
- textContentFromSerializedLexicalNode as bC,
33900
- firstValueFrom as bD,
33901
- skipPendingOperation as bE,
33902
- FAST_CHAT_INPUT_TOKEN_BUDGET as bF,
33903
- inputTextWithMappedContextChipsFromPromptEditorState as bG,
33904
- deserializeContextItem as bH,
33905
- truncateTextStart as bI,
33906
- CHAT_INPUT_TOKEN_BUDGET as bJ,
33907
- S2_URL as bK,
33908
- browser as bL,
33909
- isErrorLike as bM,
33910
- PromptString as bN,
33911
- setDisplayPathEnvInfo as bO,
33912
- unsubscribe as bP,
33913
- AsyncSerialScheduler$1 as bQ,
33914
- authStatus as bR,
33915
- debounceTime as bS,
33916
- switchMapReplayOperation as bT,
33917
- interval as bU,
33918
- map as bV,
33919
- filter as bW,
33920
- startWith as bX,
33921
- switchMap as bY,
33922
- promiseFactoryToObservable as bZ,
33923
- distinctUntilChanged as b_,
33924
- isCodyProUser as ba,
33925
- upperFirst$1 as bb,
33926
- commonjsGlobal as bc,
33927
- CodyIDE as bd,
33928
- CodyTaskState as be,
33929
- cryptoJsExports as bf,
33930
- isError as bg,
33931
- RateLimitError as bh,
33932
- CODY_FEEDBACK_URL as bi,
33933
- isDefined as bj,
33934
- reformatBotMessageForChat as bk,
33935
- isAbortErrorOrSocketHangUp as bl,
33936
- ModelTag as bm,
33937
- serializedPromptEditorStateFromChatMessage as bn,
33938
- contextItemsFromPromptEditorValue as bo,
33939
- filterContextItemsFromPromptEditorValue as bp,
33940
- pluralize as bq,
33941
- CustomCommandType as br,
33942
- View as bs,
33943
- isCodyProModel as bt,
33944
- isWaitlistModel as bu,
33945
- ACCOUNT_USAGE_URL as bv,
33946
- ACCOUNT_UPGRADE_URL as bw,
33947
- getRelativeChatPeriod as bx,
33948
- isMacOS as by,
33949
- firstResultFromOperation as bz,
34418
+ AsyncSerialScheduler$1 as b$,
34419
+ memoizeLastValue as b0,
34420
+ toSerializedPromptEditorValue as b1,
34421
+ ri as b2,
34422
+ isEqual$1 as b3,
34423
+ scanForMentionTriggerInUserTextInput as b4,
34424
+ fs as b5,
34425
+ Ts as b6,
34426
+ ps as b7,
34427
+ getMentionOperations as b8,
34428
+ forceHydration as b9,
34429
+ pluralize as bA,
34430
+ CustomCommandType as bB,
34431
+ View as bC,
34432
+ isCodyProModel as bD,
34433
+ isWaitlistModel as bE,
34434
+ isDotCom as bF,
34435
+ ACCOUNT_USAGE_URL as bG,
34436
+ ACCOUNT_UPGRADE_URL as bH,
34437
+ getRelativeChatPeriod as bI,
34438
+ isMacOS as bJ,
34439
+ firstResultFromOperation as bK,
34440
+ textContentFromSerializedLexicalNode as bL,
34441
+ firstValueFrom as bM,
34442
+ skipPendingOperation as bN,
34443
+ FAST_CHAT_INPUT_TOKEN_BUDGET as bO,
34444
+ inputTextWithMappedContextChipsFromPromptEditorState as bP,
34445
+ deserializeContextItem as bQ,
34446
+ truncateTextStart as bR,
34447
+ CHAT_INPUT_TOKEN_BUDGET as bS,
34448
+ DOTCOM_WORKSPACE_UPGRADE_URL as bT,
34449
+ DOTCOM_WORKSPACE_LEARN_MORE_URL as bU,
34450
+ S2_URL as bV,
34451
+ browser as bW,
34452
+ isErrorLike as bX,
34453
+ PromptString as bY,
34454
+ setDisplayPathEnvInfo as bZ,
34455
+ unsubscribe as b_,
34456
+ hydrateAfterPostMessage as ba,
34457
+ isSourcegraphToken as bb,
34458
+ trace as bc,
34459
+ context as bd,
34460
+ SpanStatusCode as be,
34461
+ FeatureFlag as bf,
34462
+ webviewOpenURIForContextItem as bg,
34463
+ isCodyProUser as bh,
34464
+ commonjsGlobal as bi,
34465
+ CodyIDE as bj,
34466
+ CodyTaskState as bk,
34467
+ cryptoJsExports as bl,
34468
+ isError as bm,
34469
+ RateLimitError as bn,
34470
+ CODY_FEEDBACK_URL as bo,
34471
+ isDefined as bp,
34472
+ upperFirst$1 as bq,
34473
+ lodashExports as br,
34474
+ createContextItem as bs,
34475
+ CODE_SEARCH_PROVIDER_URI as bt,
34476
+ reformatBotMessageForChat as bu,
34477
+ isAbortErrorOrSocketHangUp as bv,
34478
+ ModelTag as bw,
34479
+ serializedPromptEditorStateFromChatMessage as bx,
34480
+ contextItemsFromPromptEditorValue as by,
34481
+ filterContextItemsFromPromptEditorValue as bz,
33950
34482
  bs as c,
33951
- isBufferExports as c$,
33952
- graphqlClient as c0,
33953
- isAbortError as c1,
33954
- logError as c2,
33955
- semver$1 as c3,
33956
- pick as c4,
33957
- pendingOperation as c5,
33958
- getModelInfo as c6,
33959
- CHAT_OUTPUT_TOKEN_BUDGET as c7,
33960
- EXTENDED_CHAT_INPUT_TOKEN_BUDGET as c8,
33961
- EXTENDED_USER_CONTEXT_TOKEN_BUDGET as c9,
33962
- recordErrorToSpan as cA,
33963
- addClientInfoParams as cB,
33964
- dependentAbortController as cC,
33965
- truncatePromptString as cD,
33966
- isS2 as cE,
33967
- GIT_OPENCTX_PROVIDER_URI as cF,
33968
- openCtx as cG,
33969
- MulticastSubject as cH,
33970
- AsyncSerialScheduler_1 as cI,
33971
- Utils as cJ,
33972
- toString_1 as cK,
33973
- upperFirst_1 as cL,
33974
- _$1 as cM,
33975
- extensionForLanguage as cN,
33976
- setClientNameVersion as cO,
33977
- _baseAssignValue as cP,
33978
- eq_1$1 as cQ,
33979
- isArrayLike_1 as cR,
33980
- isObjectLike_1 as cS,
33981
- _copyObject as cT,
33982
- keysIn_1 as cU,
33983
- _cloneBufferExports as cV,
33984
- _cloneTypedArray as cW,
33985
- _copyArray as cX,
33986
- _initCloneObject as cY,
33987
- isArguments_1 as cZ,
33988
- isArray_1 as c_,
33989
- createSubscriber as ca,
33990
- fromVSCodeEvent as cb,
33991
- cenv as cc,
33992
- currentAuthStatus as cd,
33993
- isFileURI as ce,
33994
- INCLUDE_EVERYTHING_CONTEXT_FILTERS as cf,
33995
- EXCLUDE_EVERYTHING_CONTEXT_FILTERS as cg,
33996
- onAbort as ch,
33997
- addCodyClientIdentificationHeaders as ci,
33998
- addTraceparent as cj,
33999
- fetch as ck,
34000
- verifyResponseCode as cl,
34001
- combineLatest as cm,
34002
- take as cn,
34003
- clientCapabilities as co,
34004
- shareReplay as cp,
34005
- tap as cq,
34006
- featureFlagProvider as cr,
34007
- getEnterpriseContextWindow as cs,
34008
- ANSWER_TOKENS as ct,
34009
- storeLastValue as cu,
34010
- resolvedConfig as cv,
34011
- userProductSubscription as cw,
34012
- isEnterpriseUser as cx,
34013
- currentResolvedConfig as cy,
34014
- isCustomModel as cz,
34483
+ _baseAssignValue as c$,
34484
+ authStatus as c0,
34485
+ debounceTime as c1,
34486
+ switchMapReplayOperation as c2,
34487
+ interval as c3,
34488
+ map as c4,
34489
+ filter as c5,
34490
+ startWith as c6,
34491
+ switchMap as c7,
34492
+ promiseFactoryToObservable as c8,
34493
+ distinctUntilChanged as c9,
34494
+ shareReplay as cA,
34495
+ tap as cB,
34496
+ featureFlagProvider as cC,
34497
+ getEnterpriseContextWindow as cD,
34498
+ ANSWER_TOKENS as cE,
34499
+ storeLastValue as cF,
34500
+ resolvedConfig as cG,
34501
+ userProductSubscription as cH,
34502
+ isEnterpriseUser as cI,
34503
+ currentResolvedConfig as cJ,
34504
+ isCustomModel as cK,
34505
+ recordErrorToSpan as cL,
34506
+ addClientInfoParams as cM,
34507
+ dependentAbortController as cN,
34508
+ truncatePromptString as cO,
34509
+ isS2 as cP,
34510
+ GIT_OPENCTX_PROVIDER_URI as cQ,
34511
+ openCtx as cR,
34512
+ MulticastSubject as cS,
34513
+ AsyncSerialScheduler_1 as cT,
34514
+ Utils as cU,
34515
+ toString_1 as cV,
34516
+ upperFirst_1 as cW,
34517
+ _$1 as cX,
34518
+ extensionForLanguage as cY,
34519
+ setClientNameVersion as cZ,
34520
+ base64Js as c_,
34521
+ logDebug as ca,
34522
+ graphqlClient as cb,
34523
+ isAbortError as cc,
34524
+ logError as cd,
34525
+ semver$1 as ce,
34526
+ pendingOperation as cf,
34527
+ pick as cg,
34528
+ getModelInfo as ch,
34529
+ CHAT_OUTPUT_TOKEN_BUDGET as ci,
34530
+ EXTENDED_CHAT_INPUT_TOKEN_BUDGET as cj,
34531
+ EXTENDED_USER_CONTEXT_TOKEN_BUDGET as ck,
34532
+ createSubscriber as cl,
34533
+ fromVSCodeEvent as cm,
34534
+ cenv as cn,
34535
+ currentAuthStatus as co,
34536
+ isFileURI as cp,
34537
+ INCLUDE_EVERYTHING_CONTEXT_FILTERS as cq,
34538
+ EXCLUDE_EVERYTHING_CONTEXT_FILTERS as cr,
34539
+ onAbort as cs,
34540
+ addCodyClientIdentificationHeaders as ct,
34541
+ addTraceparent as cu,
34542
+ fetch as cv,
34543
+ verifyResponseCode as cw,
34544
+ combineLatest as cx,
34545
+ take as cy,
34546
+ clientCapabilities as cz,
34015
34547
  dedent as d,
34016
- TESTING_TELEMETRY_EXPORTER as d$,
34017
- isFunction_1 as d0,
34018
- isObject_1 as d1,
34019
- isPlainObject_1 as d2,
34020
- isTypedArray_1 as d3,
34021
- _Stack as d4,
34022
- identity_1 as d5,
34023
- _overRest as d6,
34024
- _setToString as d7,
34025
- _isIndex as d8,
34026
- requireBase64Js as d9,
34027
- pluck as dA,
34028
- TokenCounterUtils as dB,
34029
- toRangeData as dC,
34030
- DefaultChatCommands as dD,
34031
- pathFunctionsForURI as dE,
34032
- uriParseNameAndExtension as dF,
34033
- uriDirname as dG,
34034
- uriExtname as dH,
34035
- uriBasename as dI,
34036
- DefaultEditCommands as dJ,
34037
- subscriptionDisposable as dK,
34038
- NoOpTelemetryRecorderProvider as dL,
34039
- TimestampTelemetryProcessor_1 as dM,
34040
- updateGlobalTelemetryInstances as dN,
34041
- TelemetryRecorderProvider as dO,
34042
- telemetryRecorderProvider as dP,
34043
- createGitDiff as dQ,
34044
- catchError as dR,
34045
- omit$1 as dS,
34046
- displayPathWithoutWorkspaceFolderPrefix as dT,
34047
- getEditorInsertSpaces as dU,
34048
- escapeRegExp$1 as dV,
34049
- isNetworkError as dW,
34050
- http as dX,
34051
- currentAuthStatusOrNotReadyYet as dY,
34052
- getAugmentedNamespace as dZ,
34053
- main as d_,
34054
- setExtensionVersion as da,
34055
- withLatestFrom as db,
34056
- NEVER as dc,
34057
- abortableOperation as dd,
34058
- disposableSubscription as de,
34059
- setAuthStatusObservable as df,
34060
- DOTCOM_URL as dg,
34061
- normalizeServerEndpointURL as dh,
34062
- SourcegraphGraphQLAPIClient as di,
34063
- isNetworkLikeError as dj,
34064
- SUPPORTED_URI_SCHEMAS as dk,
34065
- _baseIsEqual as dl,
34066
- keys_1 as dm,
34067
- _baseGet as dn,
34068
- _castPath as dp,
34069
- isLength_1 as dq,
34070
- _toKey as dr,
34071
- _isKey as ds,
34072
- toNumber_1 as dt,
34073
- _baseFindIndex as du,
34074
- require$$0 as dv,
34075
- NetworkError as dw,
34076
- isRateLimitError as dx,
34077
- isAuthError as dy,
34078
- convertGitCloneURLToCodebaseName as dz,
34548
+ telemetryRecorderProvider as d$,
34549
+ eq_1$1 as d0,
34550
+ isArrayLike_1 as d1,
34551
+ isObjectLike_1 as d2,
34552
+ _copyObject as d3,
34553
+ keysIn_1 as d4,
34554
+ _cloneBufferExports as d5,
34555
+ _cloneTypedArray as d6,
34556
+ _copyArray as d7,
34557
+ _initCloneObject as d8,
34558
+ isArguments_1 as d9,
34559
+ _baseGet as dA,
34560
+ _castPath as dB,
34561
+ isLength_1 as dC,
34562
+ _toKey as dD,
34563
+ _isKey as dE,
34564
+ toNumber_1 as dF,
34565
+ _baseFindIndex as dG,
34566
+ require$$0 as dH,
34567
+ NetworkError as dI,
34568
+ isRateLimitError as dJ,
34569
+ isAuthError as dK,
34570
+ convertGitCloneURLToCodebaseName as dL,
34571
+ pluck as dM,
34572
+ TokenCounterUtils as dN,
34573
+ toRangeData as dO,
34574
+ DefaultChatCommands as dP,
34575
+ pathFunctionsForURI as dQ,
34576
+ uriParseNameAndExtension as dR,
34577
+ uriDirname as dS,
34578
+ uriExtname as dT,
34579
+ uriBasename as dU,
34580
+ DefaultEditCommands as dV,
34581
+ subscriptionDisposable as dW,
34582
+ NoOpTelemetryRecorderProvider as dX,
34583
+ TimestampTelemetryProcessor_1 as dY,
34584
+ updateGlobalTelemetryInstances as dZ,
34585
+ TelemetryRecorderProvider as d_,
34586
+ isArray_1 as da,
34587
+ isBufferExports as db,
34588
+ isFunction_1 as dc,
34589
+ isObject_1 as dd,
34590
+ isPlainObject_1 as de,
34591
+ isTypedArray_1 as df,
34592
+ _Stack as dg,
34593
+ identity_1 as dh,
34594
+ _overRest as di,
34595
+ _setToString as dj,
34596
+ _isIndex as dk,
34597
+ setExtensionVersion as dl,
34598
+ withLatestFrom as dm,
34599
+ NEVER as dn,
34600
+ abortableOperation as dp,
34601
+ disposableSubscription as dq,
34602
+ setAuthStatusObservable as dr,
34603
+ DOTCOM_URL as ds,
34604
+ normalizeServerEndpointURL as dt,
34605
+ SourcegraphGraphQLAPIClient as du,
34606
+ isNetworkLikeError as dv,
34607
+ getAuthErrorMessage as dw,
34608
+ SUPPORTED_URI_SCHEMAS as dx,
34609
+ _baseIsEqual as dy,
34610
+ keys_1 as dz,
34079
34611
  ws as e,
34080
- dist as e0,
34081
- checkIfEnterpriseUser as e1,
34082
- currentAuthStatusAuthed as e2,
34083
- waitUntilComplete as e3,
34084
- isWindows as e4,
34085
- currentUserProductSubscription as e5,
34086
- structuredPatch as e6,
34087
- isDotComAuthed as e7,
34088
- dedupeWith as e8,
34089
- AbortError as e9,
34090
- psDedent as eA,
34091
- languageFromFilename as eB,
34092
- ProgrammingLanguage as eC,
34093
- truncatePromptStringStart as eD,
34094
- MAX_CURRENT_FILE_TOKENS as eE,
34095
- posixFilePaths as eF,
34096
- SURROUNDING_LINES as eG,
34097
- CODY_SUPPORT_URL as eH,
34098
- CODY_DOC_URL as eI,
34099
- DISCORD_URL as eJ,
34100
- globalAgentRef as eK,
34101
- VSCODE_CHANGELOG_URL as eL,
34102
- SG_CHANGELOG_URL as eM,
34103
- ACCOUNT_LIMITS_INFO_URL as eN,
34104
- assertUnreachable as eO,
34105
- promise as eP,
34106
- setLogger as eQ,
34107
- setClientCapabilities as eR,
34108
- setResolvedConfigurationObservable as eS,
34109
- CODY_OLLAMA_DOCS_URL as eT,
34110
- TimeoutError as ea,
34111
- createDisposables as eb,
34112
- getEditorTabSize as ec,
34113
- debounce_1 as ed,
34114
- mentionProvidersMetadata as ee,
34115
- editorStateFromPromptString as ef,
34116
- assertFileURI as eg,
34117
- setOpenCtx as eh,
34118
- _baseGetTag as ei,
34119
- truncateTextNearestLine as ej,
34120
- MAX_BYTES_PER_FILE as ek,
34121
- expandToLineRange as el,
34122
- TokenCounter as em,
34123
- PromptMode as en,
34124
- skip as eo,
34125
- extractContextFromTraceparent as ep,
34612
+ CODY_SUPPORT_URL as e$,
34613
+ createGitDiff as e0,
34614
+ catchError as e1,
34615
+ omit$1 as e2,
34616
+ displayPathWithoutWorkspaceFolderPrefix as e3,
34617
+ getEditorInsertSpaces as e4,
34618
+ escapeRegExp$1 as e5,
34619
+ isNetworkError as e6,
34620
+ http as e7,
34621
+ getAugmentedNamespace as e8,
34622
+ main as e9,
34623
+ assertFileURI as eA,
34624
+ setOpenCtx as eB,
34625
+ createCodeSearchProvider as eC,
34626
+ _baseGetTag as eD,
34627
+ truncateTextNearestLine as eE,
34628
+ MAX_BYTES_PER_FILE as eF,
34629
+ expandToLineRange as eG,
34630
+ TokenCounter as eH,
34631
+ PromptMode as eI,
34632
+ skip as eJ,
34633
+ extractContextFromTraceparent as eK,
34634
+ getTokenCounterUtils as eL,
34635
+ inputTextWithoutContextChipsFromPromptEditorState as eM,
34636
+ isContextWindowLimitError as eN,
34637
+ addMessageListenersForExtensionAPI as eO,
34638
+ createMessageAPIForExtension as eP,
34639
+ CODY_BLOG_URL_o1_WAITLIST as eQ,
34640
+ CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID as eR,
34641
+ GENERAL_HELP_LABEL as eS,
34642
+ diffLines as eT,
34643
+ psDedent as eU,
34644
+ languageFromFilename as eV,
34645
+ ProgrammingLanguage as eW,
34646
+ truncatePromptStringStart as eX,
34647
+ MAX_CURRENT_FILE_TOKENS as eY,
34648
+ posixFilePaths as eZ,
34649
+ SURROUNDING_LINES as e_,
34650
+ firstNonPendingAuthStatus as ea,
34651
+ TESTING_TELEMETRY_EXPORTER as eb,
34652
+ dist as ec,
34653
+ checkIfEnterpriseUser as ed,
34654
+ currentAuthStatusAuthed as ee,
34655
+ waitUntilComplete as ef,
34656
+ isWindows as eg,
34657
+ currentAuthStatusOrNotReadyYet as eh,
34658
+ currentUserProductSubscription as ei,
34659
+ structuredPatch as ej,
34660
+ isDotComAuthed as ek,
34661
+ dedupeWith as el,
34662
+ AbortError as em,
34663
+ TimeoutError as en,
34664
+ createDisposables as eo,
34665
+ getClientInfoQueryParams as ep,
34126
34666
  tracer as eq,
34127
- getTokenCounterUtils as er,
34128
- inputTextWithoutContextChipsFromPromptEditorState as es,
34129
- isContextWindowLimitError as et,
34130
- addMessageListenersForExtensionAPI as eu,
34131
- createMessageAPIForExtension as ev,
34132
- CODY_BLOG_URL_o1_WAITLIST as ew,
34133
- CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID as ex,
34134
- GENERAL_HELP_LABEL as ey,
34135
- diffLines as ez,
34667
+ getClientIdentificationHeaders as er,
34668
+ logResponseHeadersToSpan as es,
34669
+ getActiveTraceAndSpanId as et,
34670
+ TracedError as eu,
34671
+ isNodeResponse as ev,
34672
+ getEditorTabSize as ew,
34673
+ debounce_1 as ex,
34674
+ mentionProvidersMetadata as ey,
34675
+ editorStateFromPromptString as ez,
34136
34676
  g as f,
34677
+ CODY_DOC_URL as f0,
34678
+ DISCORD_URL as f1,
34679
+ globalAgentRef as f2,
34680
+ VSCODE_CHANGELOG_URL as f3,
34681
+ SG_CHANGELOG_URL as f4,
34682
+ ACCOUNT_LIMITS_INFO_URL as f5,
34683
+ assertUnreachable as f6,
34684
+ promise as f7,
34685
+ setLogger as f8,
34686
+ setClientCapabilities as f9,
34687
+ setResolvedConfigurationObservable as fa,
34688
+ CODY_OLLAMA_DOCS_URL as fb,
34137
34689
  getDefaultExportFromCjs as g,
34138
34690
  h3 as h,
34139
34691
  ii as i,