@kevisual/cli 0.0.54 → 0.0.55

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.
package/dist/assistant.js CHANGED
@@ -62111,14 +62111,14 @@ class AssistantInit extends AssistantConfig {
62111
62111
  import path8 from "node:path";
62112
62112
  import fs10 from "node:fs";
62113
62113
 
62114
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/key.js
62114
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/key.js
62115
62115
  var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
62116
62116
  var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
62117
62117
  var isSpaceKey = (key) => key.name === "space";
62118
62118
  var isBackspaceKey = (key) => key.name === "backspace";
62119
62119
  var isNumberKey = (key) => "1234567890".includes(key.name);
62120
62120
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
62121
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/errors.js
62121
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/errors.js
62122
62122
  class AbortPromptError extends Error {
62123
62123
  name = "AbortPromptError";
62124
62124
  message = "Prompt was aborted";
@@ -62144,10 +62144,10 @@ class HookError extends Error {
62144
62144
  class ValidationError extends Error {
62145
62145
  name = "ValidationError";
62146
62146
  }
62147
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
62147
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-state.js
62148
62148
  import { AsyncResource as AsyncResource2 } from "node:async_hooks";
62149
62149
 
62150
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
62150
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
62151
62151
  import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
62152
62152
  var hookStorage = new AsyncLocalStorage;
62153
62153
  function createStore(rl) {
@@ -62252,25 +62252,25 @@ var effectScheduler = {
62252
62252
  }
62253
62253
  };
62254
62254
 
62255
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-state.js
62255
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-state.js
62256
62256
  function useState(defaultValue) {
62257
62257
  return withPointer((pointer) => {
62258
- const setFn = (newValue) => {
62258
+ const setState = AsyncResource2.bind(function setState(newValue) {
62259
62259
  if (pointer.get() !== newValue) {
62260
62260
  pointer.set(newValue);
62261
62261
  handleChange();
62262
62262
  }
62263
- };
62263
+ });
62264
62264
  if (pointer.initialized) {
62265
- return [pointer.get(), setFn];
62265
+ return [pointer.get(), setState];
62266
62266
  }
62267
62267
  const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
62268
62268
  pointer.set(value);
62269
- return [value, setFn];
62269
+ return [value, setState];
62270
62270
  });
62271
62271
  }
62272
62272
 
62273
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
62273
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
62274
62274
  function useEffect(cb, depArray) {
62275
62275
  withPointer((pointer) => {
62276
62276
  const oldDeps = pointer.get();
@@ -62282,10 +62282,10 @@ function useEffect(cb, depArray) {
62282
62282
  });
62283
62283
  }
62284
62284
 
62285
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/theme.js
62285
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/theme.js
62286
62286
  var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
62287
62287
 
62288
- // node_modules/.pnpm/@inquirer+figures@1.0.11/node_modules/@inquirer/figures/dist/esm/index.js
62288
+ // node_modules/.pnpm/@inquirer+figures@1.0.12/node_modules/@inquirer/figures/dist/esm/index.js
62289
62289
  import process5 from "node:process";
62290
62290
  function isUnicodeSupported() {
62291
62291
  if (process5.platform !== "win32") {
@@ -62571,7 +62571,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
62571
62571
  var esm_default = figures;
62572
62572
  var replacements = Object.entries(specialMainSymbols);
62573
62573
 
62574
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/theme.js
62574
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/theme.js
62575
62575
  var defaultTheme = {
62576
62576
  prefix: {
62577
62577
  idle: import_yoctocolors_cjs.default.blue("?"),
@@ -62592,7 +62592,7 @@ var defaultTheme = {
62592
62592
  }
62593
62593
  };
62594
62594
 
62595
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
62595
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
62596
62596
  function isPlainObject2(value) {
62597
62597
  if (typeof value !== "object" || value === null)
62598
62598
  return false;
@@ -62620,7 +62620,7 @@ function makeTheme(...themes) {
62620
62620
  return deepMerge(...themesToMerge);
62621
62621
  }
62622
62622
 
62623
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
62623
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
62624
62624
  function usePrefix({ status = "idle", theme }) {
62625
62625
  const [showLoader, setShowLoader] = useState(false);
62626
62626
  const [tick, setTick] = useState(0);
@@ -62629,13 +62629,13 @@ function usePrefix({ status = "idle", theme }) {
62629
62629
  if (status === "loading") {
62630
62630
  let tickInterval;
62631
62631
  let inc = -1;
62632
- const delayTimeout = setTimeout(AsyncResource2.bind(() => {
62632
+ const delayTimeout = setTimeout(() => {
62633
62633
  setShowLoader(true);
62634
- tickInterval = setInterval(AsyncResource2.bind(() => {
62634
+ tickInterval = setInterval(() => {
62635
62635
  inc = inc + 1;
62636
62636
  setTick(inc % spinner.frames.length);
62637
- }), spinner.interval);
62638
- }), 300);
62637
+ }, spinner.interval);
62638
+ }, 300);
62639
62639
  return () => {
62640
62640
  clearTimeout(delayTimeout);
62641
62641
  clearInterval(tickInterval);
@@ -62650,7 +62650,7 @@ function usePrefix({ status = "idle", theme }) {
62650
62650
  const iconName = status === "loading" ? "idle" : status;
62651
62651
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
62652
62652
  }
62653
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
62653
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
62654
62654
  function useMemo(fn, dependencies) {
62655
62655
  return withPointer((pointer) => {
62656
62656
  const prev = pointer.get();
@@ -62662,11 +62662,11 @@ function useMemo(fn, dependencies) {
62662
62662
  return prev.value;
62663
62663
  });
62664
62664
  }
62665
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
62665
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
62666
62666
  function useRef(val) {
62667
62667
  return useState({ current: val })[0];
62668
62668
  }
62669
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
62669
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
62670
62670
  function useKeypress(userHandler) {
62671
62671
  const signal = useRef(userHandler);
62672
62672
  signal.current = userHandler;
@@ -62684,7 +62684,7 @@ function useKeypress(userHandler) {
62684
62684
  };
62685
62685
  }, []);
62686
62686
  }
62687
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/utils.js
62687
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/utils.js
62688
62688
  var import_cli_width = __toESM(require_cli_width(), 1);
62689
62689
  var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
62690
62690
  function breakLines(content, width) {
@@ -62697,96 +62697,73 @@ function readlineWidth() {
62697
62697
  return import_cli_width.default({ defaultWidth: 80, output: readline().output });
62698
62698
  }
62699
62699
 
62700
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
62701
- function split(content, width) {
62702
- return breakLines(content, width).split(`
62703
- `);
62704
- }
62705
- function rotate(count, items) {
62706
- const max = items.length;
62707
- const offset = (count % max + max) % max;
62708
- return [...items.slice(offset), ...items.slice(0, offset)];
62709
- }
62710
- function lines({ items, width, renderItem, active, position: requested, pageSize }) {
62711
- const layouts = items.map((item, index) => ({
62712
- item,
62713
- index,
62714
- isActive: index === active
62715
- }));
62716
- const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
62717
- const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
62718
- const pageBuffer = Array.from({ length: pageSize });
62719
- const activeItem = renderItemAt(requested).slice(0, pageSize);
62720
- const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
62721
- pageBuffer.splice(position, activeItem.length, ...activeItem);
62722
- let bufferPointer = position + activeItem.length;
62723
- let layoutPointer = requested + 1;
62724
- while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
62725
- for (const line of renderItemAt(layoutPointer)) {
62726
- pageBuffer[bufferPointer++] = line;
62727
- if (bufferPointer >= pageSize)
62728
- break;
62729
- }
62730
- layoutPointer++;
62731
- }
62732
- bufferPointer = position - 1;
62733
- layoutPointer = requested - 1;
62734
- while (bufferPointer >= 0 && layoutPointer >= 0) {
62735
- for (const line of renderItemAt(layoutPointer).reverse()) {
62736
- pageBuffer[bufferPointer--] = line;
62737
- if (bufferPointer < 0)
62738
- break;
62739
- }
62740
- layoutPointer--;
62741
- }
62742
- return pageBuffer.filter((line) => typeof line === "string");
62743
- }
62744
-
62745
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
62746
- function finite({ active, pageSize, total }) {
62700
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
62701
+ function usePointerPosition({ active, renderedItems, pageSize, loop }) {
62702
+ const state = useRef({
62703
+ lastPointer: active,
62704
+ lastActive: undefined
62705
+ });
62706
+ const { lastPointer, lastActive } = state.current;
62747
62707
  const middle = Math.floor(pageSize / 2);
62748
- if (total <= pageSize || active < middle)
62749
- return active;
62750
- if (active >= total - middle)
62751
- return active + pageSize - total;
62752
- return middle;
62753
- }
62754
- function infinite({ active, lastActive, total, pageSize, pointer }) {
62755
- if (total <= pageSize)
62756
- return active;
62757
- if (lastActive < active && active - lastActive < pageSize) {
62758
- return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
62708
+ const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
62709
+ const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
62710
+ let pointer = defaultPointerPosition;
62711
+ if (renderedLength > pageSize) {
62712
+ if (loop) {
62713
+ pointer = lastPointer;
62714
+ if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
62715
+ pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
62716
+ }
62717
+ } else {
62718
+ const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
62719
+ pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
62720
+ }
62759
62721
  }
62722
+ state.current.lastPointer = pointer;
62723
+ state.current.lastActive = active;
62760
62724
  return pointer;
62761
62725
  }
62762
-
62763
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
62764
62726
  function usePagination({ items, active, renderItem, pageSize, loop = true }) {
62765
- const state = useRef({ position: 0, lastActive: 0 });
62766
- const position = loop ? infinite({
62767
- active,
62768
- lastActive: state.current.lastActive,
62769
- total: items.length,
62770
- pageSize,
62771
- pointer: state.current.position
62772
- }) : finite({
62773
- active,
62774
- total: items.length,
62775
- pageSize
62727
+ const width = readlineWidth();
62728
+ const bound = (num) => (num % items.length + items.length) % items.length;
62729
+ const renderedItems = items.map((item, index) => {
62730
+ if (item == null)
62731
+ return [];
62732
+ return breakLines(renderItem({ item, index, isActive: index === active }), width).split(`
62733
+ `);
62776
62734
  });
62777
- state.current.position = position;
62778
- state.current.lastActive = active;
62779
- return lines({
62780
- items,
62781
- width: readlineWidth(),
62782
- renderItem,
62783
- active,
62784
- position,
62785
- pageSize
62786
- }).join(`
62735
+ const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
62736
+ const renderItemAtIndex = (index) => renderedItems[index] ?? [];
62737
+ const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
62738
+ const activeItem = renderItemAtIndex(active).slice(0, pageSize);
62739
+ const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
62740
+ const pageBuffer = Array.from({ length: pageSize });
62741
+ pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
62742
+ const itemVisited = new Set([active]);
62743
+ let bufferPointer = activeItemPosition + activeItem.length;
62744
+ let itemPointer = bound(active + 1);
62745
+ while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
62746
+ const lines = renderItemAtIndex(itemPointer);
62747
+ const linesToAdd = lines.slice(0, pageSize - bufferPointer);
62748
+ pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
62749
+ itemVisited.add(itemPointer);
62750
+ bufferPointer += linesToAdd.length;
62751
+ itemPointer = bound(itemPointer + 1);
62752
+ }
62753
+ bufferPointer = activeItemPosition - 1;
62754
+ itemPointer = bound(active - 1);
62755
+ while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
62756
+ const lines = renderItemAtIndex(itemPointer);
62757
+ const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
62758
+ pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
62759
+ itemVisited.add(itemPointer);
62760
+ bufferPointer -= linesToAdd.length;
62761
+ itemPointer = bound(itemPointer - 1);
62762
+ }
62763
+ return pageBuffer.filter((line) => typeof line === "string").join(`
62787
62764
  `);
62788
62765
  }
62789
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
62766
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
62790
62767
  var import_mute_stream = __toESM(require_lib(), 1);
62791
62768
  import * as readline2 from "node:readline";
62792
62769
  import { AsyncResource as AsyncResource3 } from "node:async_hooks";
@@ -62999,7 +62976,7 @@ var {
62999
62976
  unload
63000
62977
  } = signalExitWrap(processOk(process6) ? new SignalExit(process6) : new SignalExitFallback);
63001
62978
 
63002
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
62979
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
63003
62980
  var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
63004
62981
  import { stripVTControlCharacters } from "node:util";
63005
62982
  var height = (content) => content.split(`
@@ -63069,7 +63046,7 @@ class ScreenManager {
63069
63046
  }
63070
63047
  }
63071
63048
 
63072
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
63049
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
63073
63050
  class PromisePolyfill extends Promise {
63074
63051
  static withResolver() {
63075
63052
  let resolve;
@@ -63082,7 +63059,7 @@ class PromisePolyfill extends Promise {
63082
63059
  }
63083
63060
  }
63084
63061
 
63085
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
63062
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
63086
63063
  function getCallSites() {
63087
63064
  const _prepareStackTrace = Error.prepareStackTrace;
63088
63065
  let result = [];
@@ -63168,7 +63145,7 @@ function createPrompt(view) {
63168
63145
  };
63169
63146
  return prompt;
63170
63147
  }
63171
- // node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/Separator.js
63148
+ // node_modules/.pnpm/@inquirer+core@10.1.13_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/Separator.js
63172
63149
  var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
63173
63150
  class Separator {
63174
63151
  separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
@@ -63182,7 +63159,7 @@ class Separator {
63182
63159
  return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
63183
63160
  }
63184
63161
  }
63185
- // node_modules/.pnpm/@inquirer+checkbox@4.1.6_@types+node@22.15.21/node_modules/@inquirer/checkbox/dist/esm/index.js
63162
+ // node_modules/.pnpm/@inquirer+checkbox@4.1.8_@types+node@22.15.21/node_modules/@inquirer/checkbox/dist/esm/index.js
63186
63163
  var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
63187
63164
  var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
63188
63165
  var checkboxTheme = {
@@ -63356,9 +63333,8 @@ ${theme.style.error(errorMsg)}`;
63356
63333
  return `${prefix} ${message}${helpTipTop}
63357
63334
  ${page}${helpTipBottom}${choiceDescription}${error}${import_ansi_escapes2.default.cursorHide}`;
63358
63335
  });
63359
- // node_modules/.pnpm/@inquirer+editor@4.2.11_@types+node@22.15.21/node_modules/@inquirer/editor/dist/esm/index.js
63336
+ // node_modules/.pnpm/@inquirer+editor@4.2.13_@types+node@22.15.21/node_modules/@inquirer/editor/dist/esm/index.js
63360
63337
  var import_external_editor = __toESM(require_main2(), 1);
63361
- import { AsyncResource as AsyncResource4 } from "node:async_hooks";
63362
63338
  var editorTheme = {
63363
63339
  validationFailureMode: "keep"
63364
63340
  };
@@ -63371,7 +63347,7 @@ var esm_default3 = createPrompt((config2, done) => {
63371
63347
  const prefix = usePrefix({ status, theme });
63372
63348
  function startEditor(rl) {
63373
63349
  rl.pause();
63374
- const editCallback = AsyncResource4.bind(async (error2, answer) => {
63350
+ const editCallback = async (error2, answer) => {
63375
63351
  rl.resume();
63376
63352
  if (error2) {
63377
63353
  setError(error2.toString());
@@ -63392,7 +63368,7 @@ var esm_default3 = createPrompt((config2, done) => {
63392
63368
  setStatus("idle");
63393
63369
  }
63394
63370
  }
63395
- });
63371
+ };
63396
63372
  import_external_editor.editAsync(value, (error2, answer) => void editCallback(error2, answer), {
63397
63373
  postfix,
63398
63374
  ...fileProps
@@ -63425,7 +63401,7 @@ var esm_default3 = createPrompt((config2, done) => {
63425
63401
  }
63426
63402
  return [[prefix, message, helpTip].filter(Boolean).join(" "), error];
63427
63403
  });
63428
- // node_modules/.pnpm/@inquirer+confirm@5.1.10_@types+node@22.15.21/node_modules/@inquirer/confirm/dist/esm/index.js
63404
+ // node_modules/.pnpm/@inquirer+confirm@5.1.12_@types+node@22.15.21/node_modules/@inquirer/confirm/dist/esm/index.js
63429
63405
  function getBooleanValue(value, defaultValue) {
63430
63406
  let answer = defaultValue !== false;
63431
63407
  if (/^(y|yes)/i.test(value))
@@ -63468,7 +63444,7 @@ var esm_default4 = createPrompt((config2, done) => {
63468
63444
  const message = theme.style.message(config2.message, status);
63469
63445
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
63470
63446
  });
63471
- // node_modules/.pnpm/@inquirer+input@4.1.10_@types+node@22.15.21/node_modules/@inquirer/input/dist/esm/index.js
63447
+ // node_modules/.pnpm/@inquirer+input@4.1.12_@types+node@22.15.21/node_modules/@inquirer/input/dist/esm/index.js
63472
63448
  var inputTheme = {
63473
63449
  validationFailureMode: "keep"
63474
63450
  };
@@ -63533,7 +63509,7 @@ var esm_default5 = createPrompt((config2, done) => {
63533
63509
  error
63534
63510
  ];
63535
63511
  });
63536
- // node_modules/.pnpm/@inquirer+number@3.0.13_@types+node@22.15.21/node_modules/@inquirer/number/dist/esm/index.js
63512
+ // node_modules/.pnpm/@inquirer+number@3.0.15_@types+node@22.15.21/node_modules/@inquirer/number/dist/esm/index.js
63537
63513
  function isStepOf(value, step, min) {
63538
63514
  const valuePow = value * Math.pow(10, 6);
63539
63515
  const stepPow = step * Math.pow(10, 6);
@@ -63613,7 +63589,7 @@ var esm_default6 = createPrompt((config2, done) => {
63613
63589
  error
63614
63590
  ];
63615
63591
  });
63616
- // node_modules/.pnpm/@inquirer+expand@4.0.13_@types+node@22.15.21/node_modules/@inquirer/expand/dist/esm/index.js
63592
+ // node_modules/.pnpm/@inquirer+expand@4.0.15_@types+node@22.15.21/node_modules/@inquirer/expand/dist/esm/index.js
63617
63593
  var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
63618
63594
  function normalizeChoices2(choices) {
63619
63595
  return choices.map((choice) => {
@@ -63710,7 +63686,7 @@ var esm_default7 = createPrompt((config2, done) => {
63710
63686
  `)
63711
63687
  ];
63712
63688
  });
63713
- // node_modules/.pnpm/@inquirer+rawlist@4.1.1_@types+node@22.15.21/node_modules/@inquirer/rawlist/dist/esm/index.js
63689
+ // node_modules/.pnpm/@inquirer+rawlist@4.1.3_@types+node@22.15.21/node_modules/@inquirer/rawlist/dist/esm/index.js
63714
63690
  var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
63715
63691
  var numberRegex = /\d+/;
63716
63692
  function isSelectableChoice(choice) {
@@ -63822,7 +63798,7 @@ var esm_default8 = createPrompt((config2, done) => {
63822
63798
  `)
63823
63799
  ];
63824
63800
  });
63825
- // node_modules/.pnpm/@inquirer+password@4.0.13_@types+node@22.15.21/node_modules/@inquirer/password/dist/esm/index.js
63801
+ // node_modules/.pnpm/@inquirer+password@4.0.15_@types+node@22.15.21/node_modules/@inquirer/password/dist/esm/index.js
63826
63802
  var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
63827
63803
  var esm_default9 = createPrompt((config2, done) => {
63828
63804
  const { validate = () => true } = config2;
@@ -63871,7 +63847,7 @@ var esm_default9 = createPrompt((config2, done) => {
63871
63847
  }
63872
63848
  return [[prefix, message, config2.mask ? formattedValue : helpTip].join(" "), error];
63873
63849
  });
63874
- // node_modules/.pnpm/@inquirer+search@3.0.13_@types+node@22.15.21/node_modules/@inquirer/search/dist/esm/index.js
63850
+ // node_modules/.pnpm/@inquirer+search@3.0.15_@types+node@22.15.21/node_modules/@inquirer/search/dist/esm/index.js
63875
63851
  var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
63876
63852
  var searchTheme = {
63877
63853
  icon: { cursor: esm_default.pointer },
@@ -64036,7 +64012,7 @@ ${theme.style.description(selectedChoice.description)}` : ``;
64036
64012
  `${error ?? page}${helpTip}${choiceDescription}`
64037
64013
  ];
64038
64014
  });
64039
- // node_modules/.pnpm/@inquirer+select@4.2.1_@types+node@22.15.21/node_modules/@inquirer/select/dist/esm/index.js
64015
+ // node_modules/.pnpm/@inquirer+select@4.2.3_@types+node@22.15.21/node_modules/@inquirer/select/dist/esm/index.js
64040
64016
  var import_yoctocolors_cjs7 = __toESM(require_yoctocolors_cjs(), 1);
64041
64017
  var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
64042
64018
  var selectTheme = {
@@ -64182,7 +64158,7 @@ ${theme.style.description(selectedChoice.description)}` : ``;
64182
64158
  return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
64183
64159
  ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
64184
64160
  });
64185
- // node_modules/.pnpm/inquirer@12.6.1_@types+node@22.15.21/node_modules/inquirer/dist/esm/ui/prompt.js
64161
+ // node_modules/.pnpm/inquirer@12.6.3_@types+node@22.15.21/node_modules/inquirer/dist/esm/ui/prompt.js
64186
64162
  var import_rxjs = __toESM(require_cjs(), 1);
64187
64163
  var import_run_async = __toESM(require_run_async(), 1);
64188
64164
  var import_mute_stream2 = __toESM(require_lib(), 1);
@@ -64394,7 +64370,7 @@ class PromptsRunner {
64394
64370
  };
64395
64371
  }
64396
64372
 
64397
- // node_modules/.pnpm/inquirer@12.6.1_@types+node@22.15.21/node_modules/inquirer/dist/esm/index.js
64373
+ // node_modules/.pnpm/inquirer@12.6.3_@types+node@22.15.21/node_modules/inquirer/dist/esm/index.js
64398
64374
  var builtInPrompts = {
64399
64375
  input: esm_default5,
64400
64376
  select: esm_default11,
@@ -64727,33 +64703,39 @@ var command = new Command("server").description("启动服务").option("-d, --da
64727
64703
  program.addCommand(command);
64728
64704
 
64729
64705
  // src/command/app/index.ts
64730
- var appManagerCommand2 = new Command("app").description("本地的应用模块的安装和下载, 分为 app 和 web 两种类型");
64731
- program.addCommand(appManagerCommand2);
64732
- var downloadCommand = new Command("download").description("下载应用").option("-i, --id <id>", "应用名称").option("-t, --type <type>", "应用类型", "web").option("-r, --registry <registry>", "应用源 https://kevisual.cn").option("-f --force", "强制覆盖").option("-y --yes", "覆盖的时候不提示").action(async (options) => {
64733
- const { id, type, force, yes } = options;
64734
- assistantConfig2.checkMounted();
64735
- const registry = options.registry || assistantConfig2.getRegistry();
64736
- const app = new AppDownload(assistantConfig2);
64737
- let info = "";
64738
- if (id) {
64739
- const msg = await app.downloadApp({ id, type, registry, force, yes });
64740
- info = String(msg);
64741
- }
64742
- logger.debug(info);
64743
- });
64744
- appManagerCommand2.addCommand(downloadCommand);
64745
- var deleteCommand = new Command("delete").description("删除应用").option("-i, --id <id>", "应用名称").option("-t, --type <type>", "应用类型", "web").action(async (options) => {
64746
- const { id, type } = options;
64747
- const app = new AppDownload(assistantConfig2);
64748
- let info = "";
64749
- if (id) {
64750
- const msg = await app.deleteApp({ id, type });
64751
- info = String(msg);
64752
- }
64753
- logger.debug(info);
64706
+ var commdands = ["app", "page"];
64707
+ var addOneCommand = (name) => {
64708
+ const appManagerCommand2 = new Command(name).description(`本地的应用模块的安装和下载, 分为 app web 两种类型. 默认类型为${name}`);
64709
+ program.addCommand(appManagerCommand2);
64710
+ const downloadCommand = new Command("download").description("下载应用").option("-i, --id <id>", "应用名称").option("-t, --type <type>", "应用类型", name).option("-r, --registry <registry>", "应用源 https://kevisual.cn").option("-f --force", "强制覆盖").option("-y --yes", "覆盖的时候不提示").action(async (options) => {
64711
+ const { id, type, force, yes } = options;
64712
+ assistantConfig2.checkMounted();
64713
+ const registry = options.registry || assistantConfig2.getRegistry();
64714
+ const app = new AppDownload(assistantConfig2);
64715
+ let info = "";
64716
+ if (id) {
64717
+ const msg = await app.downloadApp({ id, type, registry, force, yes });
64718
+ info = String(msg);
64719
+ }
64720
+ logger.debug(info);
64721
+ });
64722
+ appManagerCommand2.addCommand(downloadCommand);
64723
+ const deleteCommand = new Command("delete").description("删除应用").option("-i, --id <id>", "应用名称").option("-t, --type <type>", "应用类型", name).action(async (options) => {
64724
+ const { id, type } = options;
64725
+ const app = new AppDownload(assistantConfig2);
64726
+ let info = "";
64727
+ if (id) {
64728
+ const msg = await app.deleteApp({ id, type });
64729
+ info = String(msg);
64730
+ }
64731
+ logger.debug(info);
64732
+ });
64733
+ appManagerCommand2.addCommand(deleteCommand);
64734
+ const uploadCommand = new Command("upload").description("上传应用").option("-i, --id <id>", "应用名称 root/app-name 的格式,如果是后端,会自动解析为 app-name").option("-t, --type <type>", "应用类型", "app").action(async (options) => {});
64735
+ };
64736
+ commdands.forEach((name) => {
64737
+ addOneCommand(name);
64754
64738
  });
64755
- appManagerCommand2.addCommand(deleteCommand);
64756
- var uploadCommand = new Command("upload").description("上传应用").option("-i, --id <id>", "应用名称 root/app-name 的格式,如果是后端,会自动解析为 app-name").option("-t, --type <type>", "应用类型", "web").action(async (options) => {});
64757
64739
 
64758
64740
  // src/command/run-scripts/index.ts
64759
64741
  import { spawnSync as spawnSync3 } from "node:child_process";
@@ -64784,7 +64766,7 @@ var runScriptsCommand = new Command("run-scripts").alias("run").arguments("<cmd>
64784
64766
  });
64785
64767
  program.addCommand(runScriptsCommand);
64786
64768
 
64787
- // node_modules/.pnpm/@kevisual+ai-center@0.0.4/node_modules/@kevisual/ai-center/dist/ai-provider.mjs
64769
+ // node_modules/.pnpm/@kevisual+ai@0.0.5/node_modules/@kevisual/ai/dist/ai-provider.js
64788
64770
  import { createRequire as createRequire2 } from "node:module";
64789
64771
  import { statSync, createReadStream, promises as fs12 } from "fs";
64790
64772
  import { basename } from "path";
@@ -71044,6 +71026,1205 @@ var init_fileFromPath = __esm2(() => {
71044
71026
  }
71045
71027
  };
71046
71028
  });
71029
+ var require_core = __commonJS2((exports, module) => {
71030
+ (function(root2, factory) {
71031
+ if (typeof exports === "object") {
71032
+ module.exports = exports = factory();
71033
+ } else if (typeof define === "function" && define.amd) {
71034
+ define([], factory);
71035
+ } else {
71036
+ root2.CryptoJS = factory();
71037
+ }
71038
+ })(exports, function() {
71039
+ var CryptoJS = CryptoJS || function(Math2, undefined2) {
71040
+ var crypto;
71041
+ if (typeof window !== "undefined" && window.crypto) {
71042
+ crypto = window.crypto;
71043
+ }
71044
+ if (typeof self !== "undefined" && self.crypto) {
71045
+ crypto = self.crypto;
71046
+ }
71047
+ if (typeof globalThis !== "undefined" && globalThis.crypto) {
71048
+ crypto = globalThis.crypto;
71049
+ }
71050
+ if (!crypto && typeof window !== "undefined" && window.msCrypto) {
71051
+ crypto = window.msCrypto;
71052
+ }
71053
+ if (!crypto && typeof global !== "undefined" && global.crypto) {
71054
+ crypto = global.crypto;
71055
+ }
71056
+ if (!crypto && true) {
71057
+ try {
71058
+ crypto = __require2("crypto");
71059
+ } catch (err) {}
71060
+ }
71061
+ var cryptoSecureRandomInt = function() {
71062
+ if (crypto) {
71063
+ if (typeof crypto.getRandomValues === "function") {
71064
+ try {
71065
+ return crypto.getRandomValues(new Uint32Array(1))[0];
71066
+ } catch (err) {}
71067
+ }
71068
+ if (typeof crypto.randomBytes === "function") {
71069
+ try {
71070
+ return crypto.randomBytes(4).readInt32LE();
71071
+ } catch (err) {}
71072
+ }
71073
+ }
71074
+ throw new Error("Native crypto module could not be used to get secure random number.");
71075
+ };
71076
+ var create = Object.create || function() {
71077
+ function F2() {}
71078
+ return function(obj) {
71079
+ var subtype;
71080
+ F2.prototype = obj;
71081
+ subtype = new F2;
71082
+ F2.prototype = null;
71083
+ return subtype;
71084
+ };
71085
+ }();
71086
+ var C2 = {};
71087
+ var C_lib = C2.lib = {};
71088
+ var Base = C_lib.Base = function() {
71089
+ return {
71090
+ extend: function(overrides) {
71091
+ var subtype = create(this);
71092
+ if (overrides) {
71093
+ subtype.mixIn(overrides);
71094
+ }
71095
+ if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
71096
+ subtype.init = function() {
71097
+ subtype.$super.init.apply(this, arguments);
71098
+ };
71099
+ }
71100
+ subtype.init.prototype = subtype;
71101
+ subtype.$super = this;
71102
+ return subtype;
71103
+ },
71104
+ create: function() {
71105
+ var instance = this.extend();
71106
+ instance.init.apply(instance, arguments);
71107
+ return instance;
71108
+ },
71109
+ init: function() {},
71110
+ mixIn: function(properties) {
71111
+ for (var propertyName in properties) {
71112
+ if (properties.hasOwnProperty(propertyName)) {
71113
+ this[propertyName] = properties[propertyName];
71114
+ }
71115
+ }
71116
+ if (properties.hasOwnProperty("toString")) {
71117
+ this.toString = properties.toString;
71118
+ }
71119
+ },
71120
+ clone: function() {
71121
+ return this.init.prototype.extend(this);
71122
+ }
71123
+ };
71124
+ }();
71125
+ var WordArray = C_lib.WordArray = Base.extend({
71126
+ init: function(words, sigBytes) {
71127
+ words = this.words = words || [];
71128
+ if (sigBytes != undefined2) {
71129
+ this.sigBytes = sigBytes;
71130
+ } else {
71131
+ this.sigBytes = words.length * 4;
71132
+ }
71133
+ },
71134
+ toString: function(encoder) {
71135
+ return (encoder || Hex).stringify(this);
71136
+ },
71137
+ concat: function(wordArray) {
71138
+ var thisWords = this.words;
71139
+ var thatWords = wordArray.words;
71140
+ var thisSigBytes = this.sigBytes;
71141
+ var thatSigBytes = wordArray.sigBytes;
71142
+ this.clamp();
71143
+ if (thisSigBytes % 4) {
71144
+ for (var i2 = 0;i2 < thatSigBytes; i2++) {
71145
+ var thatByte = thatWords[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255;
71146
+ thisWords[thisSigBytes + i2 >>> 2] |= thatByte << 24 - (thisSigBytes + i2) % 4 * 8;
71147
+ }
71148
+ } else {
71149
+ for (var j2 = 0;j2 < thatSigBytes; j2 += 4) {
71150
+ thisWords[thisSigBytes + j2 >>> 2] = thatWords[j2 >>> 2];
71151
+ }
71152
+ }
71153
+ this.sigBytes += thatSigBytes;
71154
+ return this;
71155
+ },
71156
+ clamp: function() {
71157
+ var words = this.words;
71158
+ var sigBytes = this.sigBytes;
71159
+ words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
71160
+ words.length = Math2.ceil(sigBytes / 4);
71161
+ },
71162
+ clone: function() {
71163
+ var clone = Base.clone.call(this);
71164
+ clone.words = this.words.slice(0);
71165
+ return clone;
71166
+ },
71167
+ random: function(nBytes) {
71168
+ var words = [];
71169
+ for (var i2 = 0;i2 < nBytes; i2 += 4) {
71170
+ words.push(cryptoSecureRandomInt());
71171
+ }
71172
+ return new WordArray.init(words, nBytes);
71173
+ }
71174
+ });
71175
+ var C_enc = C2.enc = {};
71176
+ var Hex = C_enc.Hex = {
71177
+ stringify: function(wordArray) {
71178
+ var words = wordArray.words;
71179
+ var sigBytes = wordArray.sigBytes;
71180
+ var hexChars = [];
71181
+ for (var i2 = 0;i2 < sigBytes; i2++) {
71182
+ var bite = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255;
71183
+ hexChars.push((bite >>> 4).toString(16));
71184
+ hexChars.push((bite & 15).toString(16));
71185
+ }
71186
+ return hexChars.join("");
71187
+ },
71188
+ parse: function(hexStr) {
71189
+ var hexStrLength = hexStr.length;
71190
+ var words = [];
71191
+ for (var i2 = 0;i2 < hexStrLength; i2 += 2) {
71192
+ words[i2 >>> 3] |= parseInt(hexStr.substr(i2, 2), 16) << 24 - i2 % 8 * 4;
71193
+ }
71194
+ return new WordArray.init(words, hexStrLength / 2);
71195
+ }
71196
+ };
71197
+ var Latin1 = C_enc.Latin1 = {
71198
+ stringify: function(wordArray) {
71199
+ var words = wordArray.words;
71200
+ var sigBytes = wordArray.sigBytes;
71201
+ var latin1Chars = [];
71202
+ for (var i2 = 0;i2 < sigBytes; i2++) {
71203
+ var bite = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255;
71204
+ latin1Chars.push(String.fromCharCode(bite));
71205
+ }
71206
+ return latin1Chars.join("");
71207
+ },
71208
+ parse: function(latin1Str) {
71209
+ var latin1StrLength = latin1Str.length;
71210
+ var words = [];
71211
+ for (var i2 = 0;i2 < latin1StrLength; i2++) {
71212
+ words[i2 >>> 2] |= (latin1Str.charCodeAt(i2) & 255) << 24 - i2 % 4 * 8;
71213
+ }
71214
+ return new WordArray.init(words, latin1StrLength);
71215
+ }
71216
+ };
71217
+ var Utf8 = C_enc.Utf8 = {
71218
+ stringify: function(wordArray) {
71219
+ try {
71220
+ return decodeURIComponent(escape(Latin1.stringify(wordArray)));
71221
+ } catch (e2) {
71222
+ throw new Error("Malformed UTF-8 data");
71223
+ }
71224
+ },
71225
+ parse: function(utf8Str) {
71226
+ return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
71227
+ }
71228
+ };
71229
+ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
71230
+ reset: function() {
71231
+ this._data = new WordArray.init;
71232
+ this._nDataBytes = 0;
71233
+ },
71234
+ _append: function(data) {
71235
+ if (typeof data == "string") {
71236
+ data = Utf8.parse(data);
71237
+ }
71238
+ this._data.concat(data);
71239
+ this._nDataBytes += data.sigBytes;
71240
+ },
71241
+ _process: function(doFlush) {
71242
+ var processedWords;
71243
+ var data = this._data;
71244
+ var dataWords = data.words;
71245
+ var dataSigBytes = data.sigBytes;
71246
+ var blockSize = this.blockSize;
71247
+ var blockSizeBytes = blockSize * 4;
71248
+ var nBlocksReady = dataSigBytes / blockSizeBytes;
71249
+ if (doFlush) {
71250
+ nBlocksReady = Math2.ceil(nBlocksReady);
71251
+ } else {
71252
+ nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
71253
+ }
71254
+ var nWordsReady = nBlocksReady * blockSize;
71255
+ var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
71256
+ if (nWordsReady) {
71257
+ for (var offset = 0;offset < nWordsReady; offset += blockSize) {
71258
+ this._doProcessBlock(dataWords, offset);
71259
+ }
71260
+ processedWords = dataWords.splice(0, nWordsReady);
71261
+ data.sigBytes -= nBytesReady;
71262
+ }
71263
+ return new WordArray.init(processedWords, nBytesReady);
71264
+ },
71265
+ clone: function() {
71266
+ var clone = Base.clone.call(this);
71267
+ clone._data = this._data.clone();
71268
+ return clone;
71269
+ },
71270
+ _minBufferSize: 0
71271
+ });
71272
+ var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
71273
+ cfg: Base.extend(),
71274
+ init: function(cfg) {
71275
+ this.cfg = this.cfg.extend(cfg);
71276
+ this.reset();
71277
+ },
71278
+ reset: function() {
71279
+ BufferedBlockAlgorithm.reset.call(this);
71280
+ this._doReset();
71281
+ },
71282
+ update: function(messageUpdate) {
71283
+ this._append(messageUpdate);
71284
+ this._process();
71285
+ return this;
71286
+ },
71287
+ finalize: function(messageUpdate) {
71288
+ if (messageUpdate) {
71289
+ this._append(messageUpdate);
71290
+ }
71291
+ var hash = this._doFinalize();
71292
+ return hash;
71293
+ },
71294
+ blockSize: 512 / 32,
71295
+ _createHelper: function(hasher) {
71296
+ return function(message, cfg) {
71297
+ return new hasher.init(cfg).finalize(message);
71298
+ };
71299
+ },
71300
+ _createHmacHelper: function(hasher) {
71301
+ return function(message, key2) {
71302
+ return new C_algo.HMAC.init(hasher, key2).finalize(message);
71303
+ };
71304
+ }
71305
+ });
71306
+ var C_algo = C2.algo = {};
71307
+ return C2;
71308
+ }(Math);
71309
+ return CryptoJS;
71310
+ });
71311
+ });
71312
+ var require_enc_base64 = __commonJS2((exports, module) => {
71313
+ (function(root2, factory) {
71314
+ if (typeof exports === "object") {
71315
+ module.exports = exports = factory(require_core());
71316
+ } else if (typeof define === "function" && define.amd) {
71317
+ define(["./core"], factory);
71318
+ } else {
71319
+ factory(root2.CryptoJS);
71320
+ }
71321
+ })(exports, function(CryptoJS) {
71322
+ (function() {
71323
+ var C2 = CryptoJS;
71324
+ var C_lib = C2.lib;
71325
+ var WordArray = C_lib.WordArray;
71326
+ var C_enc = C2.enc;
71327
+ var Base64 = C_enc.Base64 = {
71328
+ stringify: function(wordArray) {
71329
+ var words = wordArray.words;
71330
+ var sigBytes = wordArray.sigBytes;
71331
+ var map = this._map;
71332
+ wordArray.clamp();
71333
+ var base64Chars = [];
71334
+ for (var i2 = 0;i2 < sigBytes; i2 += 3) {
71335
+ var byte1 = words[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255;
71336
+ var byte2 = words[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255;
71337
+ var byte3 = words[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255;
71338
+ var triplet = byte1 << 16 | byte2 << 8 | byte3;
71339
+ for (var j2 = 0;j2 < 4 && i2 + j2 * 0.75 < sigBytes; j2++) {
71340
+ base64Chars.push(map.charAt(triplet >>> 6 * (3 - j2) & 63));
71341
+ }
71342
+ }
71343
+ var paddingChar = map.charAt(64);
71344
+ if (paddingChar) {
71345
+ while (base64Chars.length % 4) {
71346
+ base64Chars.push(paddingChar);
71347
+ }
71348
+ }
71349
+ return base64Chars.join("");
71350
+ },
71351
+ parse: function(base64Str) {
71352
+ var base64StrLength = base64Str.length;
71353
+ var map = this._map;
71354
+ var reverseMap = this._reverseMap;
71355
+ if (!reverseMap) {
71356
+ reverseMap = this._reverseMap = [];
71357
+ for (var j2 = 0;j2 < map.length; j2++) {
71358
+ reverseMap[map.charCodeAt(j2)] = j2;
71359
+ }
71360
+ }
71361
+ var paddingChar = map.charAt(64);
71362
+ if (paddingChar) {
71363
+ var paddingIndex = base64Str.indexOf(paddingChar);
71364
+ if (paddingIndex !== -1) {
71365
+ base64StrLength = paddingIndex;
71366
+ }
71367
+ }
71368
+ return parseLoop(base64Str, base64StrLength, reverseMap);
71369
+ },
71370
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
71371
+ };
71372
+ function parseLoop(base64Str, base64StrLength, reverseMap) {
71373
+ var words = [];
71374
+ var nBytes = 0;
71375
+ for (var i2 = 0;i2 < base64StrLength; i2++) {
71376
+ if (i2 % 4) {
71377
+ var bits1 = reverseMap[base64Str.charCodeAt(i2 - 1)] << i2 % 4 * 2;
71378
+ var bits2 = reverseMap[base64Str.charCodeAt(i2)] >>> 6 - i2 % 4 * 2;
71379
+ var bitsCombined = bits1 | bits2;
71380
+ words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
71381
+ nBytes++;
71382
+ }
71383
+ }
71384
+ return WordArray.create(words, nBytes);
71385
+ }
71386
+ })();
71387
+ return CryptoJS.enc.Base64;
71388
+ });
71389
+ });
71390
+ var require_md5 = __commonJS2((exports, module) => {
71391
+ (function(root2, factory) {
71392
+ if (typeof exports === "object") {
71393
+ module.exports = exports = factory(require_core());
71394
+ } else if (typeof define === "function" && define.amd) {
71395
+ define(["./core"], factory);
71396
+ } else {
71397
+ factory(root2.CryptoJS);
71398
+ }
71399
+ })(exports, function(CryptoJS) {
71400
+ (function(Math2) {
71401
+ var C2 = CryptoJS;
71402
+ var C_lib = C2.lib;
71403
+ var WordArray = C_lib.WordArray;
71404
+ var Hasher = C_lib.Hasher;
71405
+ var C_algo = C2.algo;
71406
+ var T2 = [];
71407
+ (function() {
71408
+ for (var i2 = 0;i2 < 64; i2++) {
71409
+ T2[i2] = Math2.abs(Math2.sin(i2 + 1)) * 4294967296 | 0;
71410
+ }
71411
+ })();
71412
+ var MD5 = C_algo.MD5 = Hasher.extend({
71413
+ _doReset: function() {
71414
+ this._hash = new WordArray.init([
71415
+ 1732584193,
71416
+ 4023233417,
71417
+ 2562383102,
71418
+ 271733878
71419
+ ]);
71420
+ },
71421
+ _doProcessBlock: function(M2, offset) {
71422
+ for (var i2 = 0;i2 < 16; i2++) {
71423
+ var offset_i = offset + i2;
71424
+ var M_offset_i = M2[offset_i];
71425
+ M2[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
71426
+ }
71427
+ var H2 = this._hash.words;
71428
+ var M_offset_0 = M2[offset + 0];
71429
+ var M_offset_1 = M2[offset + 1];
71430
+ var M_offset_2 = M2[offset + 2];
71431
+ var M_offset_3 = M2[offset + 3];
71432
+ var M_offset_4 = M2[offset + 4];
71433
+ var M_offset_5 = M2[offset + 5];
71434
+ var M_offset_6 = M2[offset + 6];
71435
+ var M_offset_7 = M2[offset + 7];
71436
+ var M_offset_8 = M2[offset + 8];
71437
+ var M_offset_9 = M2[offset + 9];
71438
+ var M_offset_10 = M2[offset + 10];
71439
+ var M_offset_11 = M2[offset + 11];
71440
+ var M_offset_12 = M2[offset + 12];
71441
+ var M_offset_13 = M2[offset + 13];
71442
+ var M_offset_14 = M2[offset + 14];
71443
+ var M_offset_15 = M2[offset + 15];
71444
+ var a2 = H2[0];
71445
+ var b2 = H2[1];
71446
+ var c2 = H2[2];
71447
+ var d2 = H2[3];
71448
+ a2 = FF(a2, b2, c2, d2, M_offset_0, 7, T2[0]);
71449
+ d2 = FF(d2, a2, b2, c2, M_offset_1, 12, T2[1]);
71450
+ c2 = FF(c2, d2, a2, b2, M_offset_2, 17, T2[2]);
71451
+ b2 = FF(b2, c2, d2, a2, M_offset_3, 22, T2[3]);
71452
+ a2 = FF(a2, b2, c2, d2, M_offset_4, 7, T2[4]);
71453
+ d2 = FF(d2, a2, b2, c2, M_offset_5, 12, T2[5]);
71454
+ c2 = FF(c2, d2, a2, b2, M_offset_6, 17, T2[6]);
71455
+ b2 = FF(b2, c2, d2, a2, M_offset_7, 22, T2[7]);
71456
+ a2 = FF(a2, b2, c2, d2, M_offset_8, 7, T2[8]);
71457
+ d2 = FF(d2, a2, b2, c2, M_offset_9, 12, T2[9]);
71458
+ c2 = FF(c2, d2, a2, b2, M_offset_10, 17, T2[10]);
71459
+ b2 = FF(b2, c2, d2, a2, M_offset_11, 22, T2[11]);
71460
+ a2 = FF(a2, b2, c2, d2, M_offset_12, 7, T2[12]);
71461
+ d2 = FF(d2, a2, b2, c2, M_offset_13, 12, T2[13]);
71462
+ c2 = FF(c2, d2, a2, b2, M_offset_14, 17, T2[14]);
71463
+ b2 = FF(b2, c2, d2, a2, M_offset_15, 22, T2[15]);
71464
+ a2 = GG(a2, b2, c2, d2, M_offset_1, 5, T2[16]);
71465
+ d2 = GG(d2, a2, b2, c2, M_offset_6, 9, T2[17]);
71466
+ c2 = GG(c2, d2, a2, b2, M_offset_11, 14, T2[18]);
71467
+ b2 = GG(b2, c2, d2, a2, M_offset_0, 20, T2[19]);
71468
+ a2 = GG(a2, b2, c2, d2, M_offset_5, 5, T2[20]);
71469
+ d2 = GG(d2, a2, b2, c2, M_offset_10, 9, T2[21]);
71470
+ c2 = GG(c2, d2, a2, b2, M_offset_15, 14, T2[22]);
71471
+ b2 = GG(b2, c2, d2, a2, M_offset_4, 20, T2[23]);
71472
+ a2 = GG(a2, b2, c2, d2, M_offset_9, 5, T2[24]);
71473
+ d2 = GG(d2, a2, b2, c2, M_offset_14, 9, T2[25]);
71474
+ c2 = GG(c2, d2, a2, b2, M_offset_3, 14, T2[26]);
71475
+ b2 = GG(b2, c2, d2, a2, M_offset_8, 20, T2[27]);
71476
+ a2 = GG(a2, b2, c2, d2, M_offset_13, 5, T2[28]);
71477
+ d2 = GG(d2, a2, b2, c2, M_offset_2, 9, T2[29]);
71478
+ c2 = GG(c2, d2, a2, b2, M_offset_7, 14, T2[30]);
71479
+ b2 = GG(b2, c2, d2, a2, M_offset_12, 20, T2[31]);
71480
+ a2 = HH(a2, b2, c2, d2, M_offset_5, 4, T2[32]);
71481
+ d2 = HH(d2, a2, b2, c2, M_offset_8, 11, T2[33]);
71482
+ c2 = HH(c2, d2, a2, b2, M_offset_11, 16, T2[34]);
71483
+ b2 = HH(b2, c2, d2, a2, M_offset_14, 23, T2[35]);
71484
+ a2 = HH(a2, b2, c2, d2, M_offset_1, 4, T2[36]);
71485
+ d2 = HH(d2, a2, b2, c2, M_offset_4, 11, T2[37]);
71486
+ c2 = HH(c2, d2, a2, b2, M_offset_7, 16, T2[38]);
71487
+ b2 = HH(b2, c2, d2, a2, M_offset_10, 23, T2[39]);
71488
+ a2 = HH(a2, b2, c2, d2, M_offset_13, 4, T2[40]);
71489
+ d2 = HH(d2, a2, b2, c2, M_offset_0, 11, T2[41]);
71490
+ c2 = HH(c2, d2, a2, b2, M_offset_3, 16, T2[42]);
71491
+ b2 = HH(b2, c2, d2, a2, M_offset_6, 23, T2[43]);
71492
+ a2 = HH(a2, b2, c2, d2, M_offset_9, 4, T2[44]);
71493
+ d2 = HH(d2, a2, b2, c2, M_offset_12, 11, T2[45]);
71494
+ c2 = HH(c2, d2, a2, b2, M_offset_15, 16, T2[46]);
71495
+ b2 = HH(b2, c2, d2, a2, M_offset_2, 23, T2[47]);
71496
+ a2 = II(a2, b2, c2, d2, M_offset_0, 6, T2[48]);
71497
+ d2 = II(d2, a2, b2, c2, M_offset_7, 10, T2[49]);
71498
+ c2 = II(c2, d2, a2, b2, M_offset_14, 15, T2[50]);
71499
+ b2 = II(b2, c2, d2, a2, M_offset_5, 21, T2[51]);
71500
+ a2 = II(a2, b2, c2, d2, M_offset_12, 6, T2[52]);
71501
+ d2 = II(d2, a2, b2, c2, M_offset_3, 10, T2[53]);
71502
+ c2 = II(c2, d2, a2, b2, M_offset_10, 15, T2[54]);
71503
+ b2 = II(b2, c2, d2, a2, M_offset_1, 21, T2[55]);
71504
+ a2 = II(a2, b2, c2, d2, M_offset_8, 6, T2[56]);
71505
+ d2 = II(d2, a2, b2, c2, M_offset_15, 10, T2[57]);
71506
+ c2 = II(c2, d2, a2, b2, M_offset_6, 15, T2[58]);
71507
+ b2 = II(b2, c2, d2, a2, M_offset_13, 21, T2[59]);
71508
+ a2 = II(a2, b2, c2, d2, M_offset_4, 6, T2[60]);
71509
+ d2 = II(d2, a2, b2, c2, M_offset_11, 10, T2[61]);
71510
+ c2 = II(c2, d2, a2, b2, M_offset_2, 15, T2[62]);
71511
+ b2 = II(b2, c2, d2, a2, M_offset_9, 21, T2[63]);
71512
+ H2[0] = H2[0] + a2 | 0;
71513
+ H2[1] = H2[1] + b2 | 0;
71514
+ H2[2] = H2[2] + c2 | 0;
71515
+ H2[3] = H2[3] + d2 | 0;
71516
+ },
71517
+ _doFinalize: function() {
71518
+ var data = this._data;
71519
+ var dataWords = data.words;
71520
+ var nBitsTotal = this._nDataBytes * 8;
71521
+ var nBitsLeft = data.sigBytes * 8;
71522
+ dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
71523
+ var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296);
71524
+ var nBitsTotalL = nBitsTotal;
71525
+ dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360;
71526
+ dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360;
71527
+ data.sigBytes = (dataWords.length + 1) * 4;
71528
+ this._process();
71529
+ var hash = this._hash;
71530
+ var H2 = hash.words;
71531
+ for (var i2 = 0;i2 < 4; i2++) {
71532
+ var H_i = H2[i2];
71533
+ H2[i2] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
71534
+ }
71535
+ return hash;
71536
+ },
71537
+ clone: function() {
71538
+ var clone = Hasher.clone.call(this);
71539
+ clone._hash = this._hash.clone();
71540
+ return clone;
71541
+ }
71542
+ });
71543
+ function FF(a2, b2, c2, d2, x2, s2, t2) {
71544
+ var n2 = a2 + (b2 & c2 | ~b2 & d2) + x2 + t2;
71545
+ return (n2 << s2 | n2 >>> 32 - s2) + b2;
71546
+ }
71547
+ function GG(a2, b2, c2, d2, x2, s2, t2) {
71548
+ var n2 = a2 + (b2 & d2 | c2 & ~d2) + x2 + t2;
71549
+ return (n2 << s2 | n2 >>> 32 - s2) + b2;
71550
+ }
71551
+ function HH(a2, b2, c2, d2, x2, s2, t2) {
71552
+ var n2 = a2 + (b2 ^ c2 ^ d2) + x2 + t2;
71553
+ return (n2 << s2 | n2 >>> 32 - s2) + b2;
71554
+ }
71555
+ function II(a2, b2, c2, d2, x2, s2, t2) {
71556
+ var n2 = a2 + (c2 ^ (b2 | ~d2)) + x2 + t2;
71557
+ return (n2 << s2 | n2 >>> 32 - s2) + b2;
71558
+ }
71559
+ C2.MD5 = Hasher._createHelper(MD5);
71560
+ C2.HmacMD5 = Hasher._createHmacHelper(MD5);
71561
+ })(Math);
71562
+ return CryptoJS.MD5;
71563
+ });
71564
+ });
71565
+ var require_sha1 = __commonJS2((exports, module) => {
71566
+ (function(root2, factory) {
71567
+ if (typeof exports === "object") {
71568
+ module.exports = exports = factory(require_core());
71569
+ } else if (typeof define === "function" && define.amd) {
71570
+ define(["./core"], factory);
71571
+ } else {
71572
+ factory(root2.CryptoJS);
71573
+ }
71574
+ })(exports, function(CryptoJS) {
71575
+ (function() {
71576
+ var C2 = CryptoJS;
71577
+ var C_lib = C2.lib;
71578
+ var WordArray = C_lib.WordArray;
71579
+ var Hasher = C_lib.Hasher;
71580
+ var C_algo = C2.algo;
71581
+ var W2 = [];
71582
+ var SHA1 = C_algo.SHA1 = Hasher.extend({
71583
+ _doReset: function() {
71584
+ this._hash = new WordArray.init([
71585
+ 1732584193,
71586
+ 4023233417,
71587
+ 2562383102,
71588
+ 271733878,
71589
+ 3285377520
71590
+ ]);
71591
+ },
71592
+ _doProcessBlock: function(M2, offset) {
71593
+ var H2 = this._hash.words;
71594
+ var a2 = H2[0];
71595
+ var b2 = H2[1];
71596
+ var c2 = H2[2];
71597
+ var d2 = H2[3];
71598
+ var e2 = H2[4];
71599
+ for (var i2 = 0;i2 < 80; i2++) {
71600
+ if (i2 < 16) {
71601
+ W2[i2] = M2[offset + i2] | 0;
71602
+ } else {
71603
+ var n2 = W2[i2 - 3] ^ W2[i2 - 8] ^ W2[i2 - 14] ^ W2[i2 - 16];
71604
+ W2[i2] = n2 << 1 | n2 >>> 31;
71605
+ }
71606
+ var t2 = (a2 << 5 | a2 >>> 27) + e2 + W2[i2];
71607
+ if (i2 < 20) {
71608
+ t2 += (b2 & c2 | ~b2 & d2) + 1518500249;
71609
+ } else if (i2 < 40) {
71610
+ t2 += (b2 ^ c2 ^ d2) + 1859775393;
71611
+ } else if (i2 < 60) {
71612
+ t2 += (b2 & c2 | b2 & d2 | c2 & d2) - 1894007588;
71613
+ } else {
71614
+ t2 += (b2 ^ c2 ^ d2) - 899497514;
71615
+ }
71616
+ e2 = d2;
71617
+ d2 = c2;
71618
+ c2 = b2 << 30 | b2 >>> 2;
71619
+ b2 = a2;
71620
+ a2 = t2;
71621
+ }
71622
+ H2[0] = H2[0] + a2 | 0;
71623
+ H2[1] = H2[1] + b2 | 0;
71624
+ H2[2] = H2[2] + c2 | 0;
71625
+ H2[3] = H2[3] + d2 | 0;
71626
+ H2[4] = H2[4] + e2 | 0;
71627
+ },
71628
+ _doFinalize: function() {
71629
+ var data = this._data;
71630
+ var dataWords = data.words;
71631
+ var nBitsTotal = this._nDataBytes * 8;
71632
+ var nBitsLeft = data.sigBytes * 8;
71633
+ dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
71634
+ dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296);
71635
+ dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
71636
+ data.sigBytes = dataWords.length * 4;
71637
+ this._process();
71638
+ return this._hash;
71639
+ },
71640
+ clone: function() {
71641
+ var clone = Hasher.clone.call(this);
71642
+ clone._hash = this._hash.clone();
71643
+ return clone;
71644
+ }
71645
+ });
71646
+ C2.SHA1 = Hasher._createHelper(SHA1);
71647
+ C2.HmacSHA1 = Hasher._createHmacHelper(SHA1);
71648
+ })();
71649
+ return CryptoJS.SHA1;
71650
+ });
71651
+ });
71652
+ var require_hmac = __commonJS2((exports, module) => {
71653
+ (function(root2, factory) {
71654
+ if (typeof exports === "object") {
71655
+ module.exports = exports = factory(require_core());
71656
+ } else if (typeof define === "function" && define.amd) {
71657
+ define(["./core"], factory);
71658
+ } else {
71659
+ factory(root2.CryptoJS);
71660
+ }
71661
+ })(exports, function(CryptoJS) {
71662
+ (function() {
71663
+ var C2 = CryptoJS;
71664
+ var C_lib = C2.lib;
71665
+ var Base = C_lib.Base;
71666
+ var C_enc = C2.enc;
71667
+ var Utf8 = C_enc.Utf8;
71668
+ var C_algo = C2.algo;
71669
+ var HMAC = C_algo.HMAC = Base.extend({
71670
+ init: function(hasher, key2) {
71671
+ hasher = this._hasher = new hasher.init;
71672
+ if (typeof key2 == "string") {
71673
+ key2 = Utf8.parse(key2);
71674
+ }
71675
+ var hasherBlockSize = hasher.blockSize;
71676
+ var hasherBlockSizeBytes = hasherBlockSize * 4;
71677
+ if (key2.sigBytes > hasherBlockSizeBytes) {
71678
+ key2 = hasher.finalize(key2);
71679
+ }
71680
+ key2.clamp();
71681
+ var oKey = this._oKey = key2.clone();
71682
+ var iKey = this._iKey = key2.clone();
71683
+ var oKeyWords = oKey.words;
71684
+ var iKeyWords = iKey.words;
71685
+ for (var i2 = 0;i2 < hasherBlockSize; i2++) {
71686
+ oKeyWords[i2] ^= 1549556828;
71687
+ iKeyWords[i2] ^= 909522486;
71688
+ }
71689
+ oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
71690
+ this.reset();
71691
+ },
71692
+ reset: function() {
71693
+ var hasher = this._hasher;
71694
+ hasher.reset();
71695
+ hasher.update(this._iKey);
71696
+ },
71697
+ update: function(messageUpdate) {
71698
+ this._hasher.update(messageUpdate);
71699
+ return this;
71700
+ },
71701
+ finalize: function(messageUpdate) {
71702
+ var hasher = this._hasher;
71703
+ var innerHash = hasher.finalize(messageUpdate);
71704
+ hasher.reset();
71705
+ var hmac2 = hasher.finalize(this._oKey.clone().concat(innerHash));
71706
+ return hmac2;
71707
+ }
71708
+ });
71709
+ })();
71710
+ });
71711
+ });
71712
+ var require_evpkdf = __commonJS2((exports, module) => {
71713
+ (function(root2, factory, undef) {
71714
+ if (typeof exports === "object") {
71715
+ module.exports = exports = factory(require_core(), require_sha1(), require_hmac());
71716
+ } else if (typeof define === "function" && define.amd) {
71717
+ define(["./core", "./sha1", "./hmac"], factory);
71718
+ } else {
71719
+ factory(root2.CryptoJS);
71720
+ }
71721
+ })(exports, function(CryptoJS) {
71722
+ (function() {
71723
+ var C2 = CryptoJS;
71724
+ var C_lib = C2.lib;
71725
+ var Base = C_lib.Base;
71726
+ var WordArray = C_lib.WordArray;
71727
+ var C_algo = C2.algo;
71728
+ var MD5 = C_algo.MD5;
71729
+ var EvpKDF = C_algo.EvpKDF = Base.extend({
71730
+ cfg: Base.extend({
71731
+ keySize: 128 / 32,
71732
+ hasher: MD5,
71733
+ iterations: 1
71734
+ }),
71735
+ init: function(cfg) {
71736
+ this.cfg = this.cfg.extend(cfg);
71737
+ },
71738
+ compute: function(password, salt) {
71739
+ var block;
71740
+ var cfg = this.cfg;
71741
+ var hasher = cfg.hasher.create();
71742
+ var derivedKey = WordArray.create();
71743
+ var derivedKeyWords = derivedKey.words;
71744
+ var keySize = cfg.keySize;
71745
+ var iterations = cfg.iterations;
71746
+ while (derivedKeyWords.length < keySize) {
71747
+ if (block) {
71748
+ hasher.update(block);
71749
+ }
71750
+ block = hasher.update(password).finalize(salt);
71751
+ hasher.reset();
71752
+ for (var i2 = 1;i2 < iterations; i2++) {
71753
+ block = hasher.finalize(block);
71754
+ hasher.reset();
71755
+ }
71756
+ derivedKey.concat(block);
71757
+ }
71758
+ derivedKey.sigBytes = keySize * 4;
71759
+ return derivedKey;
71760
+ }
71761
+ });
71762
+ C2.EvpKDF = function(password, salt, cfg) {
71763
+ return EvpKDF.create(cfg).compute(password, salt);
71764
+ };
71765
+ })();
71766
+ return CryptoJS.EvpKDF;
71767
+ });
71768
+ });
71769
+ var require_cipher_core = __commonJS2((exports, module) => {
71770
+ (function(root2, factory, undef) {
71771
+ if (typeof exports === "object") {
71772
+ module.exports = exports = factory(require_core(), require_evpkdf());
71773
+ } else if (typeof define === "function" && define.amd) {
71774
+ define(["./core", "./evpkdf"], factory);
71775
+ } else {
71776
+ factory(root2.CryptoJS);
71777
+ }
71778
+ })(exports, function(CryptoJS) {
71779
+ CryptoJS.lib.Cipher || function(undefined2) {
71780
+ var C2 = CryptoJS;
71781
+ var C_lib = C2.lib;
71782
+ var Base = C_lib.Base;
71783
+ var WordArray = C_lib.WordArray;
71784
+ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
71785
+ var C_enc = C2.enc;
71786
+ var Utf8 = C_enc.Utf8;
71787
+ var Base64 = C_enc.Base64;
71788
+ var C_algo = C2.algo;
71789
+ var EvpKDF = C_algo.EvpKDF;
71790
+ var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
71791
+ cfg: Base.extend(),
71792
+ createEncryptor: function(key2, cfg) {
71793
+ return this.create(this._ENC_XFORM_MODE, key2, cfg);
71794
+ },
71795
+ createDecryptor: function(key2, cfg) {
71796
+ return this.create(this._DEC_XFORM_MODE, key2, cfg);
71797
+ },
71798
+ init: function(xformMode, key2, cfg) {
71799
+ this.cfg = this.cfg.extend(cfg);
71800
+ this._xformMode = xformMode;
71801
+ this._key = key2;
71802
+ this.reset();
71803
+ },
71804
+ reset: function() {
71805
+ BufferedBlockAlgorithm.reset.call(this);
71806
+ this._doReset();
71807
+ },
71808
+ process: function(dataUpdate) {
71809
+ this._append(dataUpdate);
71810
+ return this._process();
71811
+ },
71812
+ finalize: function(dataUpdate) {
71813
+ if (dataUpdate) {
71814
+ this._append(dataUpdate);
71815
+ }
71816
+ var finalProcessedData = this._doFinalize();
71817
+ return finalProcessedData;
71818
+ },
71819
+ keySize: 128 / 32,
71820
+ ivSize: 128 / 32,
71821
+ _ENC_XFORM_MODE: 1,
71822
+ _DEC_XFORM_MODE: 2,
71823
+ _createHelper: function() {
71824
+ function selectCipherStrategy(key2) {
71825
+ if (typeof key2 == "string") {
71826
+ return PasswordBasedCipher;
71827
+ } else {
71828
+ return SerializableCipher;
71829
+ }
71830
+ }
71831
+ return function(cipher2) {
71832
+ return {
71833
+ encrypt: function(message, key2, cfg) {
71834
+ return selectCipherStrategy(key2).encrypt(cipher2, message, key2, cfg);
71835
+ },
71836
+ decrypt: function(ciphertext, key2, cfg) {
71837
+ return selectCipherStrategy(key2).decrypt(cipher2, ciphertext, key2, cfg);
71838
+ }
71839
+ };
71840
+ };
71841
+ }()
71842
+ });
71843
+ var StreamCipher = C_lib.StreamCipher = Cipher.extend({
71844
+ _doFinalize: function() {
71845
+ var finalProcessedBlocks = this._process(true);
71846
+ return finalProcessedBlocks;
71847
+ },
71848
+ blockSize: 1
71849
+ });
71850
+ var C_mode = C2.mode = {};
71851
+ var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
71852
+ createEncryptor: function(cipher2, iv) {
71853
+ return this.Encryptor.create(cipher2, iv);
71854
+ },
71855
+ createDecryptor: function(cipher2, iv) {
71856
+ return this.Decryptor.create(cipher2, iv);
71857
+ },
71858
+ init: function(cipher2, iv) {
71859
+ this._cipher = cipher2;
71860
+ this._iv = iv;
71861
+ }
71862
+ });
71863
+ var CBC = C_mode.CBC = function() {
71864
+ var CBC2 = BlockCipherMode.extend();
71865
+ CBC2.Encryptor = CBC2.extend({
71866
+ processBlock: function(words, offset) {
71867
+ var cipher2 = this._cipher;
71868
+ var blockSize = cipher2.blockSize;
71869
+ xorBlock.call(this, words, offset, blockSize);
71870
+ cipher2.encryptBlock(words, offset);
71871
+ this._prevBlock = words.slice(offset, offset + blockSize);
71872
+ }
71873
+ });
71874
+ CBC2.Decryptor = CBC2.extend({
71875
+ processBlock: function(words, offset) {
71876
+ var cipher2 = this._cipher;
71877
+ var blockSize = cipher2.blockSize;
71878
+ var thisBlock = words.slice(offset, offset + blockSize);
71879
+ cipher2.decryptBlock(words, offset);
71880
+ xorBlock.call(this, words, offset, blockSize);
71881
+ this._prevBlock = thisBlock;
71882
+ }
71883
+ });
71884
+ function xorBlock(words, offset, blockSize) {
71885
+ var block;
71886
+ var iv = this._iv;
71887
+ if (iv) {
71888
+ block = iv;
71889
+ this._iv = undefined2;
71890
+ } else {
71891
+ block = this._prevBlock;
71892
+ }
71893
+ for (var i2 = 0;i2 < blockSize; i2++) {
71894
+ words[offset + i2] ^= block[i2];
71895
+ }
71896
+ }
71897
+ return CBC2;
71898
+ }();
71899
+ var C_pad = C2.pad = {};
71900
+ var Pkcs7 = C_pad.Pkcs7 = {
71901
+ pad: function(data, blockSize) {
71902
+ var blockSizeBytes = blockSize * 4;
71903
+ var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
71904
+ var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
71905
+ var paddingWords = [];
71906
+ for (var i2 = 0;i2 < nPaddingBytes; i2 += 4) {
71907
+ paddingWords.push(paddingWord);
71908
+ }
71909
+ var padding = WordArray.create(paddingWords, nPaddingBytes);
71910
+ data.concat(padding);
71911
+ },
71912
+ unpad: function(data) {
71913
+ var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
71914
+ data.sigBytes -= nPaddingBytes;
71915
+ }
71916
+ };
71917
+ var BlockCipher = C_lib.BlockCipher = Cipher.extend({
71918
+ cfg: Cipher.cfg.extend({
71919
+ mode: CBC,
71920
+ padding: Pkcs7
71921
+ }),
71922
+ reset: function() {
71923
+ var modeCreator;
71924
+ Cipher.reset.call(this);
71925
+ var cfg = this.cfg;
71926
+ var iv = cfg.iv;
71927
+ var mode = cfg.mode;
71928
+ if (this._xformMode == this._ENC_XFORM_MODE) {
71929
+ modeCreator = mode.createEncryptor;
71930
+ } else {
71931
+ modeCreator = mode.createDecryptor;
71932
+ this._minBufferSize = 1;
71933
+ }
71934
+ if (this._mode && this._mode.__creator == modeCreator) {
71935
+ this._mode.init(this, iv && iv.words);
71936
+ } else {
71937
+ this._mode = modeCreator.call(mode, this, iv && iv.words);
71938
+ this._mode.__creator = modeCreator;
71939
+ }
71940
+ },
71941
+ _doProcessBlock: function(words, offset) {
71942
+ this._mode.processBlock(words, offset);
71943
+ },
71944
+ _doFinalize: function() {
71945
+ var finalProcessedBlocks;
71946
+ var padding = this.cfg.padding;
71947
+ if (this._xformMode == this._ENC_XFORM_MODE) {
71948
+ padding.pad(this._data, this.blockSize);
71949
+ finalProcessedBlocks = this._process(true);
71950
+ } else {
71951
+ finalProcessedBlocks = this._process(true);
71952
+ padding.unpad(finalProcessedBlocks);
71953
+ }
71954
+ return finalProcessedBlocks;
71955
+ },
71956
+ blockSize: 128 / 32
71957
+ });
71958
+ var CipherParams = C_lib.CipherParams = Base.extend({
71959
+ init: function(cipherParams) {
71960
+ this.mixIn(cipherParams);
71961
+ },
71962
+ toString: function(formatter) {
71963
+ return (formatter || this.formatter).stringify(this);
71964
+ }
71965
+ });
71966
+ var C_format = C2.format = {};
71967
+ var OpenSSLFormatter = C_format.OpenSSL = {
71968
+ stringify: function(cipherParams) {
71969
+ var wordArray;
71970
+ var ciphertext = cipherParams.ciphertext;
71971
+ var salt = cipherParams.salt;
71972
+ if (salt) {
71973
+ wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
71974
+ } else {
71975
+ wordArray = ciphertext;
71976
+ }
71977
+ return wordArray.toString(Base64);
71978
+ },
71979
+ parse: function(openSSLStr) {
71980
+ var salt;
71981
+ var ciphertext = Base64.parse(openSSLStr);
71982
+ var ciphertextWords = ciphertext.words;
71983
+ if (ciphertextWords[0] == 1398893684 && ciphertextWords[1] == 1701076831) {
71984
+ salt = WordArray.create(ciphertextWords.slice(2, 4));
71985
+ ciphertextWords.splice(0, 4);
71986
+ ciphertext.sigBytes -= 16;
71987
+ }
71988
+ return CipherParams.create({ ciphertext, salt });
71989
+ }
71990
+ };
71991
+ var SerializableCipher = C_lib.SerializableCipher = Base.extend({
71992
+ cfg: Base.extend({
71993
+ format: OpenSSLFormatter
71994
+ }),
71995
+ encrypt: function(cipher2, message, key2, cfg) {
71996
+ cfg = this.cfg.extend(cfg);
71997
+ var encryptor = cipher2.createEncryptor(key2, cfg);
71998
+ var ciphertext = encryptor.finalize(message);
71999
+ var cipherCfg = encryptor.cfg;
72000
+ return CipherParams.create({
72001
+ ciphertext,
72002
+ key: key2,
72003
+ iv: cipherCfg.iv,
72004
+ algorithm: cipher2,
72005
+ mode: cipherCfg.mode,
72006
+ padding: cipherCfg.padding,
72007
+ blockSize: cipher2.blockSize,
72008
+ formatter: cfg.format
72009
+ });
72010
+ },
72011
+ decrypt: function(cipher2, ciphertext, key2, cfg) {
72012
+ cfg = this.cfg.extend(cfg);
72013
+ ciphertext = this._parse(ciphertext, cfg.format);
72014
+ var plaintext = cipher2.createDecryptor(key2, cfg).finalize(ciphertext.ciphertext);
72015
+ return plaintext;
72016
+ },
72017
+ _parse: function(ciphertext, format) {
72018
+ if (typeof ciphertext == "string") {
72019
+ return format.parse(ciphertext, this);
72020
+ } else {
72021
+ return ciphertext;
72022
+ }
72023
+ }
72024
+ });
72025
+ var C_kdf = C2.kdf = {};
72026
+ var OpenSSLKdf = C_kdf.OpenSSL = {
72027
+ execute: function(password, keySize, ivSize, salt, hasher) {
72028
+ if (!salt) {
72029
+ salt = WordArray.random(64 / 8);
72030
+ }
72031
+ if (!hasher) {
72032
+ var key2 = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
72033
+ } else {
72034
+ var key2 = EvpKDF.create({ keySize: keySize + ivSize, hasher }).compute(password, salt);
72035
+ }
72036
+ var iv = WordArray.create(key2.words.slice(keySize), ivSize * 4);
72037
+ key2.sigBytes = keySize * 4;
72038
+ return CipherParams.create({ key: key2, iv, salt });
72039
+ }
72040
+ };
72041
+ var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
72042
+ cfg: SerializableCipher.cfg.extend({
72043
+ kdf: OpenSSLKdf
72044
+ }),
72045
+ encrypt: function(cipher2, message, password, cfg) {
72046
+ cfg = this.cfg.extend(cfg);
72047
+ var derivedParams = cfg.kdf.execute(password, cipher2.keySize, cipher2.ivSize, cfg.salt, cfg.hasher);
72048
+ cfg.iv = derivedParams.iv;
72049
+ var ciphertext = SerializableCipher.encrypt.call(this, cipher2, message, derivedParams.key, cfg);
72050
+ ciphertext.mixIn(derivedParams);
72051
+ return ciphertext;
72052
+ },
72053
+ decrypt: function(cipher2, ciphertext, password, cfg) {
72054
+ cfg = this.cfg.extend(cfg);
72055
+ ciphertext = this._parse(ciphertext, cfg.format);
72056
+ var derivedParams = cfg.kdf.execute(password, cipher2.keySize, cipher2.ivSize, ciphertext.salt, cfg.hasher);
72057
+ cfg.iv = derivedParams.iv;
72058
+ var plaintext = SerializableCipher.decrypt.call(this, cipher2, ciphertext, derivedParams.key, cfg);
72059
+ return plaintext;
72060
+ }
72061
+ });
72062
+ }();
72063
+ });
72064
+ });
72065
+ var require_aes = __commonJS2((exports, module) => {
72066
+ (function(root2, factory, undef) {
72067
+ if (typeof exports === "object") {
72068
+ module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
72069
+ } else if (typeof define === "function" && define.amd) {
72070
+ define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
72071
+ } else {
72072
+ factory(root2.CryptoJS);
72073
+ }
72074
+ })(exports, function(CryptoJS) {
72075
+ (function() {
72076
+ var C2 = CryptoJS;
72077
+ var C_lib = C2.lib;
72078
+ var BlockCipher = C_lib.BlockCipher;
72079
+ var C_algo = C2.algo;
72080
+ var SBOX = [];
72081
+ var INV_SBOX = [];
72082
+ var SUB_MIX_0 = [];
72083
+ var SUB_MIX_1 = [];
72084
+ var SUB_MIX_2 = [];
72085
+ var SUB_MIX_3 = [];
72086
+ var INV_SUB_MIX_0 = [];
72087
+ var INV_SUB_MIX_1 = [];
72088
+ var INV_SUB_MIX_2 = [];
72089
+ var INV_SUB_MIX_3 = [];
72090
+ (function() {
72091
+ var d2 = [];
72092
+ for (var i2 = 0;i2 < 256; i2++) {
72093
+ if (i2 < 128) {
72094
+ d2[i2] = i2 << 1;
72095
+ } else {
72096
+ d2[i2] = i2 << 1 ^ 283;
72097
+ }
72098
+ }
72099
+ var x2 = 0;
72100
+ var xi = 0;
72101
+ for (var i2 = 0;i2 < 256; i2++) {
72102
+ var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;
72103
+ sx = sx >>> 8 ^ sx & 255 ^ 99;
72104
+ SBOX[x2] = sx;
72105
+ INV_SBOX[sx] = x2;
72106
+ var x22 = d2[x2];
72107
+ var x4 = d2[x22];
72108
+ var x8 = d2[x4];
72109
+ var t2 = d2[sx] * 257 ^ sx * 16843008;
72110
+ SUB_MIX_0[x2] = t2 << 24 | t2 >>> 8;
72111
+ SUB_MIX_1[x2] = t2 << 16 | t2 >>> 16;
72112
+ SUB_MIX_2[x2] = t2 << 8 | t2 >>> 24;
72113
+ SUB_MIX_3[x2] = t2;
72114
+ var t2 = x8 * 16843009 ^ x4 * 65537 ^ x22 * 257 ^ x2 * 16843008;
72115
+ INV_SUB_MIX_0[sx] = t2 << 24 | t2 >>> 8;
72116
+ INV_SUB_MIX_1[sx] = t2 << 16 | t2 >>> 16;
72117
+ INV_SUB_MIX_2[sx] = t2 << 8 | t2 >>> 24;
72118
+ INV_SUB_MIX_3[sx] = t2;
72119
+ if (!x2) {
72120
+ x2 = xi = 1;
72121
+ } else {
72122
+ x2 = x22 ^ d2[d2[d2[x8 ^ x22]]];
72123
+ xi ^= d2[d2[xi]];
72124
+ }
72125
+ }
72126
+ })();
72127
+ var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
72128
+ var AES = C_algo.AES = BlockCipher.extend({
72129
+ _doReset: function() {
72130
+ var t2;
72131
+ if (this._nRounds && this._keyPriorReset === this._key) {
72132
+ return;
72133
+ }
72134
+ var key2 = this._keyPriorReset = this._key;
72135
+ var keyWords = key2.words;
72136
+ var keySize = key2.sigBytes / 4;
72137
+ var nRounds = this._nRounds = keySize + 6;
72138
+ var ksRows = (nRounds + 1) * 4;
72139
+ var keySchedule = this._keySchedule = [];
72140
+ for (var ksRow = 0;ksRow < ksRows; ksRow++) {
72141
+ if (ksRow < keySize) {
72142
+ keySchedule[ksRow] = keyWords[ksRow];
72143
+ } else {
72144
+ t2 = keySchedule[ksRow - 1];
72145
+ if (!(ksRow % keySize)) {
72146
+ t2 = t2 << 8 | t2 >>> 24;
72147
+ t2 = SBOX[t2 >>> 24] << 24 | SBOX[t2 >>> 16 & 255] << 16 | SBOX[t2 >>> 8 & 255] << 8 | SBOX[t2 & 255];
72148
+ t2 ^= RCON[ksRow / keySize | 0] << 24;
72149
+ } else if (keySize > 6 && ksRow % keySize == 4) {
72150
+ t2 = SBOX[t2 >>> 24] << 24 | SBOX[t2 >>> 16 & 255] << 16 | SBOX[t2 >>> 8 & 255] << 8 | SBOX[t2 & 255];
72151
+ }
72152
+ keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t2;
72153
+ }
72154
+ }
72155
+ var invKeySchedule = this._invKeySchedule = [];
72156
+ for (var invKsRow = 0;invKsRow < ksRows; invKsRow++) {
72157
+ var ksRow = ksRows - invKsRow;
72158
+ if (invKsRow % 4) {
72159
+ var t2 = keySchedule[ksRow];
72160
+ } else {
72161
+ var t2 = keySchedule[ksRow - 4];
72162
+ }
72163
+ if (invKsRow < 4 || ksRow <= 4) {
72164
+ invKeySchedule[invKsRow] = t2;
72165
+ } else {
72166
+ invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t2 >>> 24]] ^ INV_SUB_MIX_1[SBOX[t2 >>> 16 & 255]] ^ INV_SUB_MIX_2[SBOX[t2 >>> 8 & 255]] ^ INV_SUB_MIX_3[SBOX[t2 & 255]];
72167
+ }
72168
+ }
72169
+ },
72170
+ encryptBlock: function(M2, offset) {
72171
+ this._doCryptBlock(M2, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
72172
+ },
72173
+ decryptBlock: function(M2, offset) {
72174
+ var t2 = M2[offset + 1];
72175
+ M2[offset + 1] = M2[offset + 3];
72176
+ M2[offset + 3] = t2;
72177
+ this._doCryptBlock(M2, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
72178
+ var t2 = M2[offset + 1];
72179
+ M2[offset + 1] = M2[offset + 3];
72180
+ M2[offset + 3] = t2;
72181
+ },
72182
+ _doCryptBlock: function(M2, offset, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) {
72183
+ var nRounds = this._nRounds;
72184
+ var s0 = M2[offset] ^ keySchedule[0];
72185
+ var s1 = M2[offset + 1] ^ keySchedule[1];
72186
+ var s2 = M2[offset + 2] ^ keySchedule[2];
72187
+ var s3 = M2[offset + 3] ^ keySchedule[3];
72188
+ var ksRow = 4;
72189
+ for (var round = 1;round < nRounds; round++) {
72190
+ var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++];
72191
+ var t1 = SUB_MIX_02[s1 >>> 24] ^ SUB_MIX_12[s2 >>> 16 & 255] ^ SUB_MIX_22[s3 >>> 8 & 255] ^ SUB_MIX_32[s0 & 255] ^ keySchedule[ksRow++];
72192
+ var t2 = SUB_MIX_02[s2 >>> 24] ^ SUB_MIX_12[s3 >>> 16 & 255] ^ SUB_MIX_22[s0 >>> 8 & 255] ^ SUB_MIX_32[s1 & 255] ^ keySchedule[ksRow++];
72193
+ var t3 = SUB_MIX_02[s3 >>> 24] ^ SUB_MIX_12[s0 >>> 16 & 255] ^ SUB_MIX_22[s1 >>> 8 & 255] ^ SUB_MIX_32[s2 & 255] ^ keySchedule[ksRow++];
72194
+ s0 = t0;
72195
+ s1 = t1;
72196
+ s2 = t2;
72197
+ s3 = t3;
72198
+ }
72199
+ var t0 = (SBOX2[s0 >>> 24] << 24 | SBOX2[s1 >>> 16 & 255] << 16 | SBOX2[s2 >>> 8 & 255] << 8 | SBOX2[s3 & 255]) ^ keySchedule[ksRow++];
72200
+ var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++];
72201
+ var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++];
72202
+ var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++];
72203
+ M2[offset] = t0;
72204
+ M2[offset + 1] = t1;
72205
+ M2[offset + 2] = t2;
72206
+ M2[offset + 3] = t3;
72207
+ },
72208
+ keySize: 256 / 32
72209
+ });
72210
+ C2.AES = BlockCipher._createHelper(AES);
72211
+ })();
72212
+ return CryptoJS.AES;
72213
+ });
72214
+ });
72215
+ var require_enc_utf8 = __commonJS2((exports, module) => {
72216
+ (function(root2, factory) {
72217
+ if (typeof exports === "object") {
72218
+ module.exports = exports = factory(require_core());
72219
+ } else if (typeof define === "function" && define.amd) {
72220
+ define(["./core"], factory);
72221
+ } else {
72222
+ factory(root2.CryptoJS);
72223
+ }
72224
+ })(exports, function(CryptoJS) {
72225
+ return CryptoJS.enc.Utf8;
72226
+ });
72227
+ });
71047
72228
  var default_format = "RFC3986";
71048
72229
  var formatters = {
71049
72230
  RFC1738: (v2) => String(v2).replace(/%20/g, "+"),
@@ -71349,7 +72530,7 @@ function stringify(object, opts = {}) {
71349
72530
  }
71350
72531
  return joined.length > 0 ? prefix + joined : "";
71351
72532
  }
71352
- var VERSION = "4.98.0";
72533
+ var VERSION = "4.103.0";
71353
72534
  var auto = false;
71354
72535
  var kind = undefined;
71355
72536
  var fetch = undefined;
@@ -71888,7 +73069,7 @@ class LineDecoder {
71888
73069
  newData.set(this.buffer);
71889
73070
  newData.set(binaryChunk, this.buffer.length);
71890
73071
  this.buffer = newData;
71891
- const lines2 = [];
73072
+ const lines = [];
71892
73073
  let patternIndex;
71893
73074
  while ((patternIndex = findNewlineIndex(this.buffer, __classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f"))) != null) {
71894
73075
  if (patternIndex.carriage && __classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f") == null) {
@@ -71896,18 +73077,18 @@ class LineDecoder {
71896
73077
  continue;
71897
73078
  }
71898
73079
  if (__classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f") != null && (patternIndex.index !== __classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f") + 1 || patternIndex.carriage)) {
71899
- lines2.push(this.decodeText(this.buffer.slice(0, __classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f") - 1)));
73080
+ lines.push(this.decodeText(this.buffer.slice(0, __classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f") - 1)));
71900
73081
  this.buffer = this.buffer.slice(__classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f"));
71901
73082
  __classPrivateFieldSet5(this, _LineDecoder_carriageReturnIndex, null, "f");
71902
73083
  continue;
71903
73084
  }
71904
73085
  const endIndex = __classPrivateFieldGet6(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
71905
73086
  const line = this.decodeText(this.buffer.slice(0, endIndex));
71906
- lines2.push(line);
73087
+ lines.push(line);
71907
73088
  this.buffer = this.buffer.slice(patternIndex.index);
71908
73089
  __classPrivateFieldSet5(this, _LineDecoder_carriageReturnIndex, null, "f");
71909
73090
  }
71910
- return lines2;
73091
+ return lines;
71911
73092
  }
71912
73093
  decodeText(bytes) {
71913
73094
  if (bytes == null)
@@ -75484,6 +76665,79 @@ class Completions3 extends APIResource {
75484
76665
  }
75485
76666
  }
75486
76667
 
76668
+ class Content extends APIResource {
76669
+ retrieve(containerId, fileId, options) {
76670
+ return this._client.get(`/containers/${containerId}/files/${fileId}/content`, {
76671
+ ...options,
76672
+ headers: { Accept: "*/*", ...options?.headers }
76673
+ });
76674
+ }
76675
+ }
76676
+
76677
+ class Files extends APIResource {
76678
+ constructor() {
76679
+ super(...arguments);
76680
+ this.content = new Content(this._client);
76681
+ }
76682
+ create(containerId, body, options) {
76683
+ return this._client.post(`/containers/${containerId}/files`, multipartFormRequestOptions({ body, ...options }));
76684
+ }
76685
+ retrieve(containerId, fileId, options) {
76686
+ return this._client.get(`/containers/${containerId}/files/${fileId}`, options);
76687
+ }
76688
+ list(containerId, query = {}, options) {
76689
+ if (isRequestOptions(query)) {
76690
+ return this.list(containerId, {}, query);
76691
+ }
76692
+ return this._client.getAPIList(`/containers/${containerId}/files`, FileListResponsesPage, {
76693
+ query,
76694
+ ...options
76695
+ });
76696
+ }
76697
+ del(containerId, fileId, options) {
76698
+ return this._client.delete(`/containers/${containerId}/files/${fileId}`, {
76699
+ ...options,
76700
+ headers: { Accept: "*/*", ...options?.headers }
76701
+ });
76702
+ }
76703
+ }
76704
+
76705
+ class FileListResponsesPage extends CursorPage {
76706
+ }
76707
+ Files.FileListResponsesPage = FileListResponsesPage;
76708
+ Files.Content = Content;
76709
+
76710
+ class Containers extends APIResource {
76711
+ constructor() {
76712
+ super(...arguments);
76713
+ this.files = new Files(this._client);
76714
+ }
76715
+ create(body, options) {
76716
+ return this._client.post("/containers", { body, ...options });
76717
+ }
76718
+ retrieve(containerId, options) {
76719
+ return this._client.get(`/containers/${containerId}`, options);
76720
+ }
76721
+ list(query = {}, options) {
76722
+ if (isRequestOptions(query)) {
76723
+ return this.list({}, query);
76724
+ }
76725
+ return this._client.getAPIList("/containers", ContainerListResponsesPage, { query, ...options });
76726
+ }
76727
+ del(containerId, options) {
76728
+ return this._client.delete(`/containers/${containerId}`, {
76729
+ ...options,
76730
+ headers: { Accept: "*/*", ...options?.headers }
76731
+ });
76732
+ }
76733
+ }
76734
+
76735
+ class ContainerListResponsesPage extends CursorPage {
76736
+ }
76737
+ Containers.ContainerListResponsesPage = ContainerListResponsesPage;
76738
+ Containers.Files = Files;
76739
+ Containers.FileListResponsesPage = FileListResponsesPage;
76740
+
75487
76741
  class Embeddings extends APIResource {
75488
76742
  create(body, options) {
75489
76743
  const hasUserProvidedEncodingFormat = !!body.encoding_format;
@@ -75592,7 +76846,7 @@ Evals.EvalListResponsesPage = EvalListResponsesPage;
75592
76846
  Evals.Runs = Runs2;
75593
76847
  Evals.RunListResponsesPage = RunListResponsesPage;
75594
76848
 
75595
- class Files extends APIResource {
76849
+ class Files2 extends APIResource {
75596
76850
  create(body, options) {
75597
76851
  return this._client.post("/files", multipartFormRequestOptions({ body, ...options }));
75598
76852
  }
@@ -75637,7 +76891,7 @@ class Files extends APIResource {
75637
76891
 
75638
76892
  class FileObjectsPage extends CursorPage {
75639
76893
  }
75640
- Files.FileObjectsPage = FileObjectsPage;
76894
+ Files2.FileObjectsPage = FileObjectsPage;
75641
76895
 
75642
76896
  class Methods extends APIResource {
75643
76897
  }
@@ -75977,13 +77231,13 @@ class ResponseStream extends EventStream {
75977
77231
  }
75978
77232
  static createResponse(client, params, options) {
75979
77233
  const runner = new ResponseStream(params);
75980
- runner._run(() => runner._createResponse(client, params, {
77234
+ runner._run(() => runner._createOrRetrieveResponse(client, params, {
75981
77235
  ...options,
75982
77236
  headers: { ...options?.headers, "X-Stainless-Helper-Method": "stream" }
75983
77237
  }));
75984
77238
  return runner;
75985
77239
  }
75986
- async _createResponse(client, params, options) {
77240
+ async _createOrRetrieveResponse(client, params, options) {
75987
77241
  const signal = options?.signal;
75988
77242
  if (signal) {
75989
77243
  if (signal.aborted)
@@ -75991,10 +77245,17 @@ class ResponseStream extends EventStream {
75991
77245
  signal.addEventListener("abort", () => this.controller.abort());
75992
77246
  }
75993
77247
  __classPrivateFieldGet12(this, _ResponseStream_instances, "m", _ResponseStream_beginRequest).call(this);
75994
- const stream = await client.responses.create({ ...params, stream: true }, { ...options, signal: this.controller.signal });
77248
+ let stream;
77249
+ let starting_after = null;
77250
+ if ("response_id" in params) {
77251
+ stream = await client.responses.retrieve(params.response_id, { stream: true }, { ...options, signal: this.controller.signal, stream: true });
77252
+ starting_after = params.starting_after ?? null;
77253
+ } else {
77254
+ stream = await client.responses.create({ ...params, stream: true }, { ...options, signal: this.controller.signal });
77255
+ }
75995
77256
  this._connected();
75996
77257
  for await (const event of stream) {
75997
- __classPrivateFieldGet12(this, _ResponseStream_instances, "m", _ResponseStream_addEvent).call(this, event);
77258
+ __classPrivateFieldGet12(this, _ResponseStream_instances, "m", _ResponseStream_addEvent).call(this, event, starting_after);
75998
77259
  }
75999
77260
  if (stream.controller.signal?.aborted) {
76000
77261
  throw new APIUserAbortError;
@@ -76005,11 +77266,16 @@ class ResponseStream extends EventStream {
76005
77266
  if (this.ended)
76006
77267
  return;
76007
77268
  __classPrivateFieldSet10(this, _ResponseStream_currentResponseSnapshot, undefined, "f");
76008
- }, _ResponseStream_addEvent = function _ResponseStream_addEvent(event) {
77269
+ }, _ResponseStream_addEvent = function _ResponseStream_addEvent(event, starting_after) {
76009
77270
  if (this.ended)
76010
77271
  return;
77272
+ const maybeEmit = (name, event2) => {
77273
+ if (starting_after == null || event2.sequence_number > starting_after) {
77274
+ this._emit(name, event2);
77275
+ }
77276
+ };
76011
77277
  const response = __classPrivateFieldGet12(this, _ResponseStream_instances, "m", _ResponseStream_accumulateResponse).call(this, event);
76012
- this._emit("event", event);
77278
+ maybeEmit("event", event);
76013
77279
  switch (event.type) {
76014
77280
  case "response.output_text.delta": {
76015
77281
  const output = response.output[event.output_index];
@@ -76024,7 +77290,7 @@ class ResponseStream extends EventStream {
76024
77290
  if (content.type !== "output_text") {
76025
77291
  throw new OpenAIError(`expected content to be 'output_text', got ${content.type}`);
76026
77292
  }
76027
- this._emit("response.output_text.delta", {
77293
+ maybeEmit("response.output_text.delta", {
76028
77294
  ...event,
76029
77295
  snapshot: content.text
76030
77296
  });
@@ -76037,7 +77303,7 @@ class ResponseStream extends EventStream {
76037
77303
  throw new OpenAIError(`missing output at index ${event.output_index}`);
76038
77304
  }
76039
77305
  if (output.type === "function_call") {
76040
- this._emit("response.function_call_arguments.delta", {
77306
+ maybeEmit("response.function_call_arguments.delta", {
76041
77307
  ...event,
76042
77308
  snapshot: output.arguments
76043
77309
  });
@@ -76045,7 +77311,7 @@ class ResponseStream extends EventStream {
76045
77311
  break;
76046
77312
  }
76047
77313
  default:
76048
- this._emit(event.type, event);
77314
+ maybeEmit(event.type, event);
76049
77315
  break;
76050
77316
  }
76051
77317
  }, _ResponseStream_endRequest = function _ResponseStream_endRequest() {
@@ -76193,10 +77459,19 @@ class Responses extends APIResource {
76193
77459
  });
76194
77460
  }
76195
77461
  retrieve(responseId, query = {}, options) {
76196
- if (isRequestOptions(query)) {
77462
+ if (isRequestOptions(query) && options === undefined) {
76197
77463
  return this.retrieve(responseId, {}, query);
76198
77464
  }
76199
- return this._client.get(`/responses/${responseId}`, { query, ...options });
77465
+ return this._client.get(`/responses/${responseId}`, {
77466
+ query,
77467
+ ...options,
77468
+ stream: query.stream ?? false
77469
+ })._thenUnwrap((rsp) => {
77470
+ if ("object" in rsp && rsp.object === "response") {
77471
+ addOutputText(rsp);
77472
+ }
77473
+ return rsp;
77474
+ });
76200
77475
  }
76201
77476
  del(responseId, options) {
76202
77477
  return this._client.delete(`/responses/${responseId}`, {
@@ -76210,6 +77485,12 @@ class Responses extends APIResource {
76210
77485
  stream(body, options) {
76211
77486
  return ResponseStream.createResponse(this._client, body, options);
76212
77487
  }
77488
+ cancel(responseId, options) {
77489
+ return this._client.post(`/responses/${responseId}/cancel`, {
77490
+ ...options,
77491
+ headers: { Accept: "*/*", ...options?.headers }
77492
+ });
77493
+ }
76213
77494
  }
76214
77495
 
76215
77496
  class ResponseItemsPage extends CursorPage {
@@ -76256,7 +77537,7 @@ var allSettledWithThrow = async (promises) => {
76256
77537
  return values;
76257
77538
  };
76258
77539
 
76259
- class Files2 extends APIResource {
77540
+ class Files3 extends APIResource {
76260
77541
  create(vectorStoreId, body, options) {
76261
77542
  return this._client.post(`/vector_stores/${vectorStoreId}/files`, {
76262
77543
  body,
@@ -76348,8 +77629,8 @@ class VectorStoreFilesPage extends CursorPage {
76348
77629
 
76349
77630
  class FileContentResponsesPage extends Page {
76350
77631
  }
76351
- Files2.VectorStoreFilesPage = VectorStoreFilesPage;
76352
- Files2.FileContentResponsesPage = FileContentResponsesPage;
77632
+ Files3.VectorStoreFilesPage = VectorStoreFilesPage;
77633
+ Files3.FileContentResponsesPage = FileContentResponsesPage;
76353
77634
 
76354
77635
  class FileBatches extends APIResource {
76355
77636
  create(vectorStoreId, body, options) {
@@ -76440,7 +77721,7 @@ class FileBatches extends APIResource {
76440
77721
  class VectorStores extends APIResource {
76441
77722
  constructor() {
76442
77723
  super(...arguments);
76443
- this.files = new Files2(this._client);
77724
+ this.files = new Files3(this._client);
76444
77725
  this.fileBatches = new FileBatches(this._client);
76445
77726
  }
76446
77727
  create(body, options) {
@@ -76496,7 +77777,7 @@ class VectorStoreSearchResponsesPage extends Page {
76496
77777
  }
76497
77778
  VectorStores.VectorStoresPage = VectorStoresPage;
76498
77779
  VectorStores.VectorStoreSearchResponsesPage = VectorStoreSearchResponsesPage;
76499
- VectorStores.Files = Files2;
77780
+ VectorStores.Files = Files3;
76500
77781
  VectorStores.VectorStoreFilesPage = VectorStoreFilesPage;
76501
77782
  VectorStores.FileContentResponsesPage = FileContentResponsesPage;
76502
77783
  VectorStores.FileBatches = FileBatches;
@@ -76536,7 +77817,7 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
76536
77817
  this.completions = new Completions3(this);
76537
77818
  this.chat = new Chat(this);
76538
77819
  this.embeddings = new Embeddings(this);
76539
- this.files = new Files(this);
77820
+ this.files = new Files2(this);
76540
77821
  this.images = new Images(this);
76541
77822
  this.audio = new Audio(this);
76542
77823
  this.moderations = new Moderations(this);
@@ -76549,6 +77830,7 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
76549
77830
  this.uploads = new Uploads(this);
76550
77831
  this.responses = new Responses(this);
76551
77832
  this.evals = new Evals(this);
77833
+ this.containers = new Containers(this);
76552
77834
  this._options = options;
76553
77835
  this.apiKey = apiKey;
76554
77836
  this.organization = organization;
@@ -76594,7 +77876,7 @@ OpenAI.Completions = Completions3;
76594
77876
  OpenAI.Chat = Chat;
76595
77877
  OpenAI.ChatCompletionsPage = ChatCompletionsPage;
76596
77878
  OpenAI.Embeddings = Embeddings;
76597
- OpenAI.Files = Files;
77879
+ OpenAI.Files = Files2;
76598
77880
  OpenAI.FileObjectsPage = FileObjectsPage;
76599
77881
  OpenAI.Images = Images;
76600
77882
  OpenAI.Audio = Audio;
@@ -76613,6 +77895,8 @@ OpenAI.Uploads = Uploads;
76613
77895
  OpenAI.Responses = Responses;
76614
77896
  OpenAI.Evals = Evals;
76615
77897
  OpenAI.EvalListResponsesPage = EvalListResponsesPage;
77898
+ OpenAI.Containers = Containers;
77899
+ OpenAI.ContainerListResponsesPage = ContainerListResponsesPage;
76616
77900
  var _deployments_endpoints = new Set([
76617
77901
  "/completions",
76618
77902
  "/chat/completions",
@@ -76773,7 +78057,7 @@ var CustomProvider = Custom;
76773
78057
  var VolcesProvider = Volces;
76774
78058
  var DeepSeekProvider = DeepSeek;
76775
78059
  var ModelScopeProvider = ModelScope;
76776
- var ProviderMap = {
78060
+ var ChatProviderMap = {
76777
78061
  Ollama: OllamaProvider,
76778
78062
  SiliconFlow: SiliconFlowProvider,
76779
78063
  Custom: CustomProvider,
@@ -76787,7 +78071,7 @@ class ProviderManager {
76787
78071
  provider;
76788
78072
  constructor(config2) {
76789
78073
  const { provider, model, apiKey, baseURL } = config2;
76790
- const Provider = ProviderMap[provider];
78074
+ const Provider = ChatProviderMap[provider];
76791
78075
  if (!Provider) {
76792
78076
  throw new Error(`Provider ${provider} not found`);
76793
78077
  }
@@ -76812,6 +78096,9 @@ class ProviderManager {
76812
78096
  return this.provider.chat(messages);
76813
78097
  }
76814
78098
  }
78099
+ var import_aes = __toESM2(require_aes(), 1);
78100
+ var import_enc_utf8 = __toESM2(require_enc_utf8(), 1);
78101
+ var CryptoJS = { AES: import_aes.default, enc: { Utf8: import_enc_utf8.default } };
76815
78102
 
76816
78103
  // src/command/ai/index.ts
76817
78104
  var runAiCommand = new Command("ai").description("AI 对话助手").option("-t, --text <text>", "应用类型", "").action(async (options) => {
@@ -76826,9 +78113,9 @@ var runAiCommand = new Command("ai").description("AI 对话助手").option("-t,
76826
78113
  logger.error("请输入要发送给 AI 的文本");
76827
78114
  return;
76828
78115
  }
76829
- if (!ProviderMap[ai.provider]) {
78116
+ if (!ChatProviderMap[ai.provider]) {
76830
78117
  logger.error("不支持的 AI 提供商,请检查配置文件中的提供商名称");
76831
- const supportedProviders = Object.keys(ProviderMap).join(", ");
78118
+ const supportedProviders = Object.keys(ChatProviderMap).join(", ");
76832
78119
  logger.error(`支持的提供商有:${supportedProviders}`);
76833
78120
  return;
76834
78121
  }