langgraph-ui-components 0.0.17 → 0.0.18
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/index.es100.js +20 -354
- package/dist/index.es100.js.map +1 -1
- package/dist/index.es101.js +172 -127
- package/dist/index.es101.js.map +1 -1
- package/dist/index.es102.js +231 -60
- package/dist/index.es102.js.map +1 -1
- package/dist/index.es103.js +352 -34
- package/dist/index.es103.js.map +1 -1
- package/dist/index.es104.js +134 -34
- package/dist/index.es104.js.map +1 -1
- package/dist/index.es105.js +65 -161
- package/dist/index.es105.js.map +1 -1
- package/dist/index.es106.js +30 -196
- package/dist/index.es106.js.map +1 -1
- package/dist/index.es107.js +36 -13
- package/dist/index.es107.js.map +1 -1
- package/dist/index.es108.js +162 -26
- package/dist/index.es108.js.map +1 -1
- package/dist/index.es109.js +196 -27
- package/dist/index.es109.js.map +1 -1
- package/dist/index.es110.js +13 -3156
- package/dist/index.es110.js.map +1 -1
- package/dist/index.es111.js +27 -34
- package/dist/index.es111.js.map +1 -1
- package/dist/index.es112.js +34 -5
- package/dist/index.es112.js.map +1 -1
- package/dist/index.es113.js +3145 -61
- package/dist/index.es113.js.map +1 -1
- package/dist/index.es114.js +33 -33
- package/dist/index.es114.js.map +1 -1
- package/dist/index.es115.js +5 -21
- package/dist/index.es115.js.map +1 -1
- package/dist/index.es116.js +69 -64
- package/dist/index.es116.js.map +1 -1
- package/dist/index.es117.js +37 -3
- package/dist/index.es117.js.map +1 -1
- package/dist/index.es12.js +1 -1
- package/dist/index.es121.js +9 -9
- package/dist/index.es122.js +1 -1
- package/dist/index.es126.js +1 -1
- package/dist/index.es128.js +2 -2
- package/dist/index.es13.js +9 -3
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es136.js +1 -1
- package/dist/index.es137.js +6 -6
- package/dist/index.es139.js +1 -1
- package/dist/index.es14.js +6 -6
- package/dist/index.es140.js +1 -1
- package/dist/index.es143.js +1 -1
- package/dist/index.es144.js +1 -1
- package/dist/index.es145.js +1 -1
- package/dist/index.es146.js +1 -1
- package/dist/index.es147.js +1 -1
- package/dist/index.es148.js +1 -1
- package/dist/index.es149.js +1 -1
- package/dist/index.es150.js +1 -1
- package/dist/index.es151.js +1 -1
- package/dist/index.es152.js +1 -1
- package/dist/index.es153.js +1 -1
- package/dist/index.es154.js +1 -1
- package/dist/index.es155.js +1 -1
- package/dist/index.es156.js +1 -1
- package/dist/index.es157.js +1 -1
- package/dist/index.es158.js +1 -1
- package/dist/index.es159.js +1 -1
- package/dist/index.es16.js +10 -5
- package/dist/index.es16.js.map +1 -1
- package/dist/index.es160.js +1 -1
- package/dist/index.es161.js +1 -1
- package/dist/index.es162.js +1 -1
- package/dist/index.es163.js +1 -1
- package/dist/index.es164.js +1 -1
- package/dist/index.es165.js +1 -1
- package/dist/index.es166.js +1 -1
- package/dist/index.es167.js +1 -1
- package/dist/index.es168.js +1 -1
- package/dist/index.es169.js +1 -1
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +1 -1
- package/dist/index.es173.js +1 -1
- package/dist/index.es174.js +1 -1
- package/dist/index.es175.js +1 -1
- package/dist/index.es176.js +1 -1
- package/dist/index.es177.js +1 -1
- package/dist/index.es178.js +1 -1
- package/dist/index.es179.js +1 -1
- package/dist/index.es18.js +7 -7
- package/dist/index.es180.js +1 -1
- package/dist/index.es181.js +1 -1
- package/dist/index.es182.js +1 -1
- package/dist/index.es183.js +1 -1
- package/dist/index.es184.js +1 -1
- package/dist/index.es185.js +1 -1
- package/dist/index.es186.js +1 -1
- package/dist/index.es187.js +1 -1
- package/dist/index.es191.js +2 -56
- package/dist/index.es191.js.map +1 -1
- package/dist/index.es192.js +2 -100
- package/dist/index.es192.js.map +1 -1
- package/dist/index.es193.js +2 -191
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es194.js +2 -110
- package/dist/index.es194.js.map +1 -1
- package/dist/index.es195.js +2 -35
- package/dist/index.es195.js.map +1 -1
- package/dist/index.es196.js +2 -10
- package/dist/index.es196.js.map +1 -1
- package/dist/index.es197.js +2 -11
- package/dist/index.es197.js.map +1 -1
- package/dist/index.es198.js +2 -12
- package/dist/index.es198.js.map +1 -1
- package/dist/index.es199.js +2 -91
- package/dist/index.es199.js.map +1 -1
- package/dist/index.es2.js +96 -11
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es20.js +2 -2
- package/dist/index.es200.js +2 -275
- package/dist/index.es200.js.map +1 -1
- package/dist/index.es201.js +2 -2
- package/dist/index.es202.js +2 -164
- package/dist/index.es202.js.map +1 -1
- package/dist/index.es203.js +2 -51
- package/dist/index.es203.js.map +1 -1
- package/dist/index.es204.js +2 -40
- package/dist/index.es204.js.map +1 -1
- package/dist/index.es205.js +2 -35
- package/dist/index.es205.js.map +1 -1
- package/dist/index.es206.js +2 -40
- package/dist/index.es206.js.map +1 -1
- package/dist/index.es207.js +2 -24
- package/dist/index.es207.js.map +1 -1
- package/dist/index.es208.js +2 -591
- package/dist/index.es208.js.map +1 -1
- package/dist/index.es209.js +2 -125
- package/dist/index.es209.js.map +1 -1
- package/dist/index.es210.js +2 -164
- package/dist/index.es210.js.map +1 -1
- package/dist/index.es211.js +2 -2
- package/dist/index.es212.js +2 -2
- package/dist/index.es213.js +2 -2
- package/dist/index.es214.js +2 -2
- package/dist/index.es215.js +2 -2
- package/dist/index.es216.js +2 -2
- package/dist/index.es217.js +2 -2
- package/dist/index.es218.js +2 -2
- package/dist/index.es219.js +2 -2
- package/dist/index.es22.js +35 -119
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es220.js +2 -2
- package/dist/index.es221.js +2 -2
- package/dist/index.es222.js +2 -2
- package/dist/index.es223.js +2 -2
- package/dist/index.es224.js +2 -2
- package/dist/index.es225.js +2 -2
- package/dist/index.es226.js +2 -2
- package/dist/index.es227.js +2 -2
- package/dist/index.es228.js +2 -2
- package/dist/index.es229.js +2 -2
- package/dist/index.es23.js +66 -36
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es230.js +2 -2
- package/dist/index.es231.js +2 -2
- package/dist/index.es232.js +2 -2
- package/dist/index.es233.js +2 -2
- package/dist/index.es234.js +2 -2
- package/dist/index.es235.js +2 -2
- package/dist/index.es236.js +56 -2
- package/dist/index.es236.js.map +1 -1
- package/dist/index.es237.js +100 -2
- package/dist/index.es237.js.map +1 -1
- package/dist/index.es238.js +191 -2
- package/dist/index.es238.js.map +1 -1
- package/dist/index.es239.js +110 -2
- package/dist/index.es239.js.map +1 -1
- package/dist/index.es24.js +30 -64
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es240.js +35 -2
- package/dist/index.es240.js.map +1 -1
- package/dist/index.es241.js +10 -2
- package/dist/index.es241.js.map +1 -1
- package/dist/index.es242.js +11 -2
- package/dist/index.es242.js.map +1 -1
- package/dist/index.es243.js +12 -2
- package/dist/index.es243.js.map +1 -1
- package/dist/index.es244.js +91 -2
- package/dist/index.es244.js.map +1 -1
- package/dist/index.es245.js +275 -2
- package/dist/index.es245.js.map +1 -1
- package/dist/index.es246.js +2 -2
- package/dist/index.es247.js +164 -2
- package/dist/index.es247.js.map +1 -1
- package/dist/index.es248.js +51 -2
- package/dist/index.es248.js.map +1 -1
- package/dist/index.es249.js +40 -2
- package/dist/index.es249.js.map +1 -1
- package/dist/index.es25.js +120 -29
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es250.js +35 -2
- package/dist/index.es250.js.map +1 -1
- package/dist/index.es251.js +40 -2
- package/dist/index.es251.js.map +1 -1
- package/dist/index.es252.js +24 -2
- package/dist/index.es252.js.map +1 -1
- package/dist/index.es253.js +591 -2
- package/dist/index.es253.js.map +1 -1
- package/dist/index.es254.js +125 -2
- package/dist/index.es254.js.map +1 -1
- package/dist/index.es255.js +164 -2
- package/dist/index.es255.js.map +1 -1
- package/dist/index.es256.js +2 -2
- package/dist/index.es26.js +102 -123
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es267.js +1 -1
- package/dist/index.es27.js +66 -101
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es28.js +139 -66
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es29.js +295 -131
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es30.js +114 -298
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es305.js +1 -1
- package/dist/index.es307.js +1 -1
- package/dist/index.es319.js +1 -1
- package/dist/index.es32.js +7 -7
- package/dist/index.es33.js +1 -1
- package/dist/index.es339.js +2 -2
- package/dist/index.es36.js +4 -4
- package/dist/index.es37.js +289 -114
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +44 -70
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +145 -19
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es40.js +5 -261
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +247 -38
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +110 -207
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +68 -64
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +17 -141
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +251 -14
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +36 -223
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +213 -7
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es48.js +55 -1180
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +141 -6
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es50.js +21 -144
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +230 -5
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +8 -292
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +1190 -43
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +7 -144
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +136 -241
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es59.js +1 -1
- package/dist/index.es6.js +21 -8
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es60.js +1 -1
- package/dist/index.es61.js +1 -1
- package/dist/index.es62.js +7 -7
- package/dist/index.es67.js +3 -3
- package/dist/index.es69.js +2 -2
- package/dist/index.es70.js +1 -1
- package/dist/index.es71.js +1 -1
- package/dist/index.es72.js +1 -1
- package/dist/index.es77.js +7 -7
- package/dist/index.es78.js +17 -17
- package/dist/index.es82.js +1 -1
- package/dist/index.es83.js +4 -4
- package/dist/index.es84.js +20 -11
- package/dist/index.es84.js.map +1 -1
- package/dist/index.es85.js +66 -38
- package/dist/index.es85.js.map +1 -1
- package/dist/index.es86.js +3 -34
- package/dist/index.es86.js.map +1 -1
- package/dist/index.es87.js +10 -230
- package/dist/index.es87.js.map +1 -1
- package/dist/index.es88.js +39 -29
- package/dist/index.es88.js.map +1 -1
- package/dist/index.es89.js +32 -73
- package/dist/index.es89.js.map +1 -1
- package/dist/index.es90.js +200 -44
- package/dist/index.es90.js.map +1 -1
- package/dist/index.es91.js +15 -37
- package/dist/index.es91.js.map +1 -1
- package/dist/index.es92.js +71 -26
- package/dist/index.es92.js.map +1 -1
- package/dist/index.es93.js +72 -39
- package/dist/index.es93.js.map +1 -1
- package/dist/index.es94.js +48 -53
- package/dist/index.es94.js.map +1 -1
- package/dist/index.es95.js +30 -13
- package/dist/index.es95.js.map +1 -1
- package/dist/index.es96.js +40 -134
- package/dist/index.es96.js.map +1 -1
- package/dist/index.es97.js +56 -20
- package/dist/index.es97.js.map +1 -1
- package/dist/index.es98.js +11 -180
- package/dist/index.es98.js.map +1 -1
- package/dist/index.es99.js +129 -233
- package/dist/index.es99.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.es77.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChatAnthropicTranslator } from "./index.es70.js";
|
|
2
2
|
import { ChatOpenAITranslator } from "./index.es72.js";
|
|
3
|
-
import { ChatBedrockConverseTranslator } from "./index.
|
|
4
|
-
import { ChatDeepSeekTranslator } from "./index.
|
|
5
|
-
import { ChatGoogleGenAITranslator } from "./index.
|
|
6
|
-
import { ChatVertexTranslator } from "./index.
|
|
7
|
-
import { ChatGroqTranslator } from "./index.
|
|
8
|
-
import { ChatOllamaTranslator } from "./index.
|
|
9
|
-
import { ChatXAITranslator } from "./index.
|
|
3
|
+
import { ChatBedrockConverseTranslator } from "./index.es90.js";
|
|
4
|
+
import { ChatDeepSeekTranslator } from "./index.es91.js";
|
|
5
|
+
import { ChatGoogleGenAITranslator } from "./index.es92.js";
|
|
6
|
+
import { ChatVertexTranslator } from "./index.es93.js";
|
|
7
|
+
import { ChatGroqTranslator } from "./index.es94.js";
|
|
8
|
+
import { ChatOllamaTranslator } from "./index.es95.js";
|
|
9
|
+
import { ChatXAITranslator } from "./index.es96.js";
|
|
10
10
|
globalThis.lc_block_translators_registry ??= /* @__PURE__ */ new Map([
|
|
11
11
|
["anthropic", ChatAnthropicTranslator],
|
|
12
12
|
["bedrock-converse", ChatBedrockConverseTranslator],
|
package/dist/index.es78.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { Serializable } from "./index.es69.js";
|
|
2
2
|
import { _isToolCall, ToolInputParsingException } from "./index.es75.js";
|
|
3
|
-
import { AsyncLocalStorageProviderSingleton } from "./index.
|
|
4
|
-
import "./index.
|
|
5
|
-
import { patchConfig, DEFAULT_RECURSION_LIMIT, pickRunnableConfigKeys, ensureConfig, getCallbackManagerForConfig, mergeConfigs } from "./index.
|
|
6
|
-
import { raceWithSignal, getAbortSignalError } from "./index.
|
|
7
|
-
import { AsyncGeneratorWithSetup, IterableReadableStream, concat, pipeGeneratorWithSetup, atee } from "./index.
|
|
8
|
-
import { isLogStreamHandler, LogStreamCallbackHandler, RunLog, RunLogPatch } from "./index.
|
|
9
|
-
import { isStreamEventsHandler, EventStreamCallbackHandler } from "./index.
|
|
10
|
-
import { pRetry } from "./index.
|
|
11
|
-
import { AsyncCaller } from "./index.
|
|
12
|
-
import { RootListenersTracer } from "./index.
|
|
13
|
-
import { _RootEventFilter, isRunnableInterface } from "./index.
|
|
14
|
-
import { getSchemaDescription, isSimpleStringZodSchema, interopParseAsync } from "./index.
|
|
15
|
-
import { Graph } from "./index.
|
|
16
|
-
import { convertToHttpEventStream } from "./index.
|
|
17
|
-
import { isAsyncIterable, consumeAsyncIterableInContext, isIterableIterator, consumeIteratorInContext, isIterator } from "./index.
|
|
3
|
+
import { AsyncLocalStorageProviderSingleton } from "./index.es97.js";
|
|
4
|
+
import "./index.es98.js";
|
|
5
|
+
import { patchConfig, DEFAULT_RECURSION_LIMIT, pickRunnableConfigKeys, ensureConfig, getCallbackManagerForConfig, mergeConfigs } from "./index.es99.js";
|
|
6
|
+
import { raceWithSignal, getAbortSignalError } from "./index.es100.js";
|
|
7
|
+
import { AsyncGeneratorWithSetup, IterableReadableStream, concat, pipeGeneratorWithSetup, atee } from "./index.es101.js";
|
|
8
|
+
import { isLogStreamHandler, LogStreamCallbackHandler, RunLog, RunLogPatch } from "./index.es102.js";
|
|
9
|
+
import { isStreamEventsHandler, EventStreamCallbackHandler } from "./index.es103.js";
|
|
10
|
+
import { pRetry } from "./index.es104.js";
|
|
11
|
+
import { AsyncCaller } from "./index.es105.js";
|
|
12
|
+
import { RootListenersTracer } from "./index.es106.js";
|
|
13
|
+
import { _RootEventFilter, isRunnableInterface } from "./index.es107.js";
|
|
14
|
+
import { getSchemaDescription, isSimpleStringZodSchema, interopParseAsync } from "./index.es108.js";
|
|
15
|
+
import { Graph } from "./index.es109.js";
|
|
16
|
+
import { convertToHttpEventStream } from "./index.es110.js";
|
|
17
|
+
import { isAsyncIterable, consumeAsyncIterableInContext, isIterableIterator, consumeIteratorInContext, isIterator } from "./index.es111.js";
|
|
18
18
|
import { v4 } from "uuid";
|
|
19
|
-
import { isTraceableFunction } from "./index.
|
|
20
|
-
import { any as anyType, object as objectType, string as stringType } from "./index.
|
|
19
|
+
import { isTraceableFunction } from "./index.es112.js";
|
|
20
|
+
import { any as anyType, object as objectType, string as stringType } from "./index.es113.js";
|
|
21
21
|
function _coerceToDict(value, defaultKey) {
|
|
22
22
|
return value && !Array.isArray(value) && !(value instanceof Date) && typeof value === "object" ? value : { [defaultKey]: value };
|
|
23
23
|
}
|
package/dist/index.es82.js
CHANGED
package/dist/index.es83.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import EventEmitter from "./index.
|
|
2
|
-
import pTimeout from "./index.
|
|
3
|
-
import { TimeoutError } from "./index.
|
|
4
|
-
import PriorityQueue from "./index.
|
|
1
|
+
import EventEmitter from "./index.es115.js";
|
|
2
|
+
import pTimeout from "./index.es116.js";
|
|
3
|
+
import { TimeoutError } from "./index.es116.js";
|
|
4
|
+
import PriorityQueue from "./index.es117.js";
|
|
5
5
|
class PQueue extends EventEmitter {
|
|
6
6
|
#carryoverIntervalCount;
|
|
7
7
|
#isIntervalIgnored;
|
package/dist/index.es84.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./index.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import jsx from "./index.es257.js";
|
|
2
|
+
import typescript from "./index.es258.js";
|
|
3
|
+
tsx.displayName = "tsx";
|
|
4
|
+
tsx.aliases = [];
|
|
5
|
+
function tsx(Prism) {
|
|
6
|
+
Prism.register(jsx);
|
|
7
|
+
Prism.register(typescript);
|
|
8
|
+
(function(Prism2) {
|
|
9
|
+
var typescript2 = Prism2.util.clone(Prism2.languages.typescript);
|
|
10
|
+
Prism2.languages.tsx = Prism2.languages.extend("jsx", typescript2);
|
|
11
|
+
delete Prism2.languages.tsx["parameter"];
|
|
12
|
+
delete Prism2.languages.tsx["literal-property"];
|
|
13
|
+
var tag = Prism2.languages.tsx.tag;
|
|
14
|
+
tag.pattern = RegExp(
|
|
15
|
+
/(^|[^\w$]|(?=<\/))/.source + "(?:" + tag.pattern.source + ")",
|
|
16
|
+
tag.pattern.flags
|
|
17
|
+
);
|
|
18
|
+
tag.lookbehind = true;
|
|
19
|
+
})(Prism);
|
|
10
20
|
}
|
|
11
21
|
export {
|
|
12
|
-
|
|
13
|
-
mapKeys
|
|
22
|
+
tsx as default
|
|
14
23
|
};
|
|
15
24
|
//# sourceMappingURL=index.es84.js.map
|
package/dist/index.es84.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es84.js","sources":["../node_modules/.pnpm
|
|
1
|
+
{"version":3,"file":"index.es84.js","sources":["../node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lang/tsx.js"],"sourcesContent":["// @ts-nocheck\n/**\n * @import {Refractor} from '../lib/core.js'\n */\nimport refractorJsx from './jsx.js'\nimport refractorTypescript from './typescript.js'\ntsx.displayName = 'tsx'\ntsx.aliases = []\n\n/** @param {Refractor} Prism */\nexport default function tsx(Prism) {\n Prism.register(refractorJsx)\n Prism.register(refractorTypescript)\n ;(function (Prism) {\n var typescript = Prism.util.clone(Prism.languages.typescript)\n Prism.languages.tsx = Prism.languages.extend('jsx', typescript)\n\n // doesn't work with TS because TS is too complex\n delete Prism.languages.tsx['parameter']\n delete Prism.languages.tsx['literal-property']\n\n // This will prevent collisions between TSX tags and TS generic types.\n // Idea by https://github.com/karlhorky\n // Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928\n var tag = Prism.languages.tsx.tag\n tag.pattern = RegExp(\n /(^|[^\\w$]|(?=<\\/))/.source + '(?:' + tag.pattern.source + ')',\n tag.pattern.flags\n )\n tag.lookbehind = true\n })(Prism)\n}\n"],"names":["refractorJsx","refractorTypescript","Prism","typescript"],"mappings":";;AAMA,IAAI,cAAc;AAClB,IAAI,UAAU,CAAA;AAGC,SAAS,IAAI,OAAO;AACjC,QAAM,SAASA,GAAY;AAC3B,QAAM,SAASC,UAAmB;AACjC,GAAC,SAAUC,QAAO;AACjB,QAAIC,cAAaD,OAAM,KAAK,MAAMA,OAAM,UAAU,UAAU;AAC5D,IAAAA,OAAM,UAAU,MAAMA,OAAM,UAAU,OAAO,OAAOC,WAAU;AAG9D,WAAOD,OAAM,UAAU,IAAI,WAAW;AACtC,WAAOA,OAAM,UAAU,IAAI,kBAAkB;AAK7C,QAAI,MAAMA,OAAM,UAAU,IAAI;AAC9B,QAAI,UAAU;AAAA,MACZ,qBAAqB,SAAS,QAAQ,IAAI,QAAQ,SAAS;AAAA,MAC3D,IAAI,QAAQ;AAAA,IAClB;AACI,QAAI,aAAa;AAAA,EACnB,GAAG,KAAK;AACV;","x_google_ignoreList":[0]}
|
package/dist/index.es85.js
CHANGED
|
@@ -1,43 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
python.displayName = "python";
|
|
2
|
+
python.aliases = ["py"];
|
|
3
|
+
function python(Prism) {
|
|
4
|
+
Prism.languages.python = {
|
|
5
|
+
comment: {
|
|
6
|
+
pattern: /(^|[^\\])#.*/,
|
|
7
|
+
lookbehind: true,
|
|
8
|
+
greedy: true
|
|
9
|
+
},
|
|
10
|
+
"string-interpolation": {
|
|
11
|
+
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
12
|
+
greedy: true,
|
|
13
|
+
inside: {
|
|
14
|
+
interpolation: {
|
|
15
|
+
// "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
|
|
16
|
+
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
17
|
+
lookbehind: true,
|
|
18
|
+
inside: {
|
|
19
|
+
"format-spec": {
|
|
20
|
+
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
21
|
+
lookbehind: true
|
|
22
|
+
},
|
|
23
|
+
"conversion-option": {
|
|
24
|
+
pattern: //,
|
|
25
|
+
alias: "punctuation"
|
|
26
|
+
},
|
|
27
|
+
rest: null
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
string: /[\s\S]+/
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"triple-quoted-string": {
|
|
34
|
+
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
35
|
+
greedy: true,
|
|
36
|
+
alias: "string"
|
|
37
|
+
},
|
|
38
|
+
string: {
|
|
39
|
+
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
40
|
+
greedy: true
|
|
41
|
+
},
|
|
42
|
+
function: {
|
|
43
|
+
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
44
|
+
lookbehind: true
|
|
45
|
+
},
|
|
46
|
+
"class-name": {
|
|
47
|
+
pattern: /(\bclass\s+)\w+/i,
|
|
48
|
+
lookbehind: true
|
|
49
|
+
},
|
|
50
|
+
decorator: {
|
|
51
|
+
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
52
|
+
lookbehind: true,
|
|
53
|
+
alias: ["annotation", "punctuation"],
|
|
54
|
+
inside: {
|
|
55
|
+
punctuation: /\./
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
|
|
59
|
+
builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
|
|
60
|
+
boolean: /\b(?:False|None|True)\b/,
|
|
61
|
+
number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
|
|
62
|
+
operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
63
|
+
punctuation: /[{}[\];(),.:]/
|
|
20
64
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
24
|
-
if (pathSet.has(value)) return createNotImplemented(value);
|
|
25
|
-
if (isSerializableLike(value)) return value;
|
|
26
|
-
pathSet.add(value);
|
|
27
|
-
const record = value;
|
|
28
|
-
if (needsEscaping(record)) {
|
|
29
|
-
pathSet.delete(value);
|
|
30
|
-
return escapeObject(record);
|
|
31
|
-
}
|
|
32
|
-
const result = {};
|
|
33
|
-
for (const [key, val] of Object.entries(record)) result[key] = escapeIfNeeded(val, pathSet);
|
|
34
|
-
pathSet.delete(value);
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
if (Array.isArray(value)) return value.map((item) => escapeIfNeeded(item, pathSet));
|
|
38
|
-
return value;
|
|
65
|
+
Prism.languages.python["string-interpolation"].inside["interpolation"].inside.rest = Prism.languages.python;
|
|
66
|
+
Prism.languages.py = Prism.languages.python;
|
|
39
67
|
}
|
|
40
68
|
export {
|
|
41
|
-
|
|
69
|
+
python as default
|
|
42
70
|
};
|
|
43
71
|
//# sourceMappingURL=index.es85.js.map
|
package/dist/index.es85.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es85.js","sources":["../node_modules/.pnpm
|
|
1
|
+
{"version":3,"file":"index.es85.js","sources":["../node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lang/python.js"],"sourcesContent":["// @ts-nocheck\n/**\n * @import {Refractor} from '../lib/core.js'\n */\npython.displayName = 'python'\npython.aliases = ['py']\n\n/** @param {Refractor} Prism */\nexport default function python(Prism) {\n Prism.languages.python = {\n comment: {\n pattern: /(^|[^\\\\])#.*/,\n lookbehind: true,\n greedy: true\n },\n 'string-interpolation': {\n pattern:\n /(?:f|fr|rf)(?:(\"\"\"|''')[\\s\\S]*?\\1|(\"|')(?:\\\\.|(?!\\2)[^\\\\\\r\\n])*\\2)/i,\n greedy: true,\n inside: {\n interpolation: {\n // \"{\" <expression> <optional \"!s\", \"!r\", or \"!a\"> <optional \":\" format specifier> \"}\"\n pattern:\n /((?:^|[^{])(?:\\{\\{)*)\\{(?!\\{)(?:[^{}]|\\{(?!\\{)(?:[^{}]|\\{(?!\\{)(?:[^{}])+\\})+\\})+\\}/,\n lookbehind: true,\n inside: {\n 'format-spec': {\n pattern: /(:)[^:(){}]+(?=\\}$)/,\n lookbehind: true\n },\n 'conversion-option': {\n pattern: //,\n alias: 'punctuation'\n },\n rest: null\n }\n },\n string: /[\\s\\S]+/\n }\n },\n 'triple-quoted-string': {\n pattern: /(?:[rub]|br|rb)?(\"\"\"|''')[\\s\\S]*?\\1/i,\n greedy: true,\n alias: 'string'\n },\n string: {\n pattern: /(?:[rub]|br|rb)?(\"|')(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/i,\n greedy: true\n },\n function: {\n pattern: /((?:^|\\s)def[ \\t]+)[a-zA-Z_]\\w*(?=\\s*\\()/g,\n lookbehind: true\n },\n 'class-name': {\n pattern: /(\\bclass\\s+)\\w+/i,\n lookbehind: true\n },\n decorator: {\n pattern: /(^[\\t ]*)@\\w+(?:\\.\\w+)*/m,\n lookbehind: true,\n alias: ['annotation', 'punctuation'],\n inside: {\n punctuation: /\\./\n }\n },\n keyword:\n /\\b(?:_(?=\\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\\b/,\n builtin:\n /\\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\\b/,\n boolean: /\\b(?:False|None|True)\\b/,\n number:\n /\\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\\b|(?:\\b\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\B\\.\\d+(?:_\\d+)*)(?:e[+-]?\\d+(?:_\\d+)*)?j?(?!\\w)/i,\n operator: /[-+%=]=?|!=|:=|\\*\\*?=?|\\/\\/?=?|<[<=>]?|>[=>]?|[&|^~]/,\n punctuation: /[{}[\\];(),.:]/\n }\n Prism.languages.python['string-interpolation'].inside[\n 'interpolation'\n ].inside.rest = Prism.languages.python\n Prism.languages.py = Prism.languages.python\n}\n"],"names":[],"mappings":"AAIA,OAAO,cAAc;AACrB,OAAO,UAAU,CAAC,IAAI;AAGP,SAAS,OAAO,OAAO;AACpC,QAAM,UAAU,SAAS;AAAA,IACvB,SAAS;AAAA,MACP,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,QAAQ;AAAA,IACd;AAAA,IACI,wBAAwB;AAAA,MACtB,SACE;AAAA,MACF,QAAQ;AAAA,MACR,QAAQ;AAAA,QACN,eAAe;AAAA;AAAA,UAEb,SACE;AAAA,UACF,YAAY;AAAA,UACZ,QAAQ;AAAA,YACN,eAAe;AAAA,cACb,SAAS;AAAA,cACT,YAAY;AAAA,YAC1B;AAAA,YACY,qBAAqB;AAAA,cACnB,SAAS;AAAA,cACT,OAAO;AAAA,YACrB;AAAA,YACY,MAAM;AAAA,UAClB;AAAA,QACA;AAAA,QACQ,QAAQ;AAAA,MAChB;AAAA,IACA;AAAA,IACI,wBAAwB;AAAA,MACtB,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,OAAO;AAAA,IACb;AAAA,IACI,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,QAAQ;AAAA,IACd;AAAA,IACI,UAAU;AAAA,MACR,SAAS;AAAA,MACT,YAAY;AAAA,IAClB;AAAA,IACI,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,IAClB;AAAA,IACI,WAAW;AAAA,MACT,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,OAAO,CAAC,cAAc,aAAa;AAAA,MACnC,QAAQ;AAAA,QACN,aAAa;AAAA,MACrB;AAAA,IACA;AAAA,IACI,SACE;AAAA,IACF,SACE;AAAA,IACF,SAAS;AAAA,IACT,QACE;AAAA,IACF,UAAU;AAAA,IACV,aAAa;AAAA,EACjB;AACE,QAAM,UAAU,OAAO,sBAAsB,EAAE,OAC7C,eACJ,EAAI,OAAO,OAAO,MAAM,UAAU;AAChC,QAAM,UAAU,KAAK,MAAM,UAAU;AACvC;","x_google_ignoreList":[0]}
|
package/dist/index.es86.js
CHANGED
|
@@ -1,37 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
function _isObject(value) {
|
|
5
|
-
return typeof value === "object" && value !== null;
|
|
6
|
-
}
|
|
7
|
-
function _isArray(value) {
|
|
8
|
-
return Array.isArray(value);
|
|
9
|
-
}
|
|
10
|
-
function _isString(value) {
|
|
11
|
-
return typeof value === "string";
|
|
12
|
-
}
|
|
13
|
-
function _isNumber(value) {
|
|
14
|
-
return typeof value === "number";
|
|
15
|
-
}
|
|
16
|
-
function _isBytesArray(value) {
|
|
17
|
-
return value instanceof Uint8Array;
|
|
18
|
-
}
|
|
19
|
-
function safeParseJson(value) {
|
|
20
|
-
try {
|
|
21
|
-
return JSON.parse(value);
|
|
22
|
-
} catch {
|
|
23
|
-
return void 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const iife = (fn) => fn();
|
|
1
|
+
import { __require as requirePrism } from "./index.es141.js";
|
|
2
|
+
var prismExports = /* @__PURE__ */ requirePrism();
|
|
27
3
|
export {
|
|
28
|
-
|
|
29
|
-
_isBytesArray,
|
|
30
|
-
_isContentBlock,
|
|
31
|
-
_isNumber,
|
|
32
|
-
_isObject,
|
|
33
|
-
_isString,
|
|
34
|
-
iife,
|
|
35
|
-
safeParseJson
|
|
4
|
+
prismExports as p
|
|
36
5
|
};
|
|
37
6
|
//# sourceMappingURL=index.es86.js.map
|
package/dist/index.es86.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es86.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es86.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.es87.js
CHANGED
|
@@ -1,235 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return "text/csv";
|
|
6
|
-
case "doc":
|
|
7
|
-
return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
8
|
-
case "docx":
|
|
9
|
-
return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
10
|
-
case "html":
|
|
11
|
-
return "text/html";
|
|
12
|
-
case "md":
|
|
13
|
-
return "text/markdown";
|
|
14
|
-
case "pdf":
|
|
15
|
-
return "application/pdf";
|
|
16
|
-
case "txt":
|
|
17
|
-
return "text/plain";
|
|
18
|
-
case "xls":
|
|
19
|
-
return "application/vnd.ms-excel";
|
|
20
|
-
case "xlsx":
|
|
21
|
-
return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
22
|
-
case "gif":
|
|
23
|
-
return "image/gif";
|
|
24
|
-
case "jpeg":
|
|
25
|
-
return "image/jpeg";
|
|
26
|
-
case "jpg":
|
|
27
|
-
return "image/jpeg";
|
|
28
|
-
case "png":
|
|
29
|
-
return "image/png";
|
|
30
|
-
case "webp":
|
|
31
|
-
return "image/webp";
|
|
32
|
-
case "flv":
|
|
33
|
-
return "video/flv";
|
|
34
|
-
case "mkv":
|
|
35
|
-
return "video/mkv";
|
|
36
|
-
case "mov":
|
|
37
|
-
return "video/mov";
|
|
38
|
-
case "mp4":
|
|
39
|
-
return "video/mp4";
|
|
40
|
-
case "mpeg":
|
|
41
|
-
return "video/mpeg";
|
|
42
|
-
case "mpg":
|
|
43
|
-
return "video/mpg";
|
|
44
|
-
case "three_gp":
|
|
45
|
-
return "video/three_gp";
|
|
46
|
-
case "webm":
|
|
47
|
-
return "video/webm";
|
|
48
|
-
case "wmv":
|
|
49
|
-
return "video/wmv";
|
|
50
|
-
default:
|
|
51
|
-
return "application/octet-stream";
|
|
52
|
-
}
|
|
1
|
+
import snakeCase from "./index.es118.js";
|
|
2
|
+
import "./index.es119.js";
|
|
3
|
+
function keyToJson(key, map) {
|
|
4
|
+
return map?.[key] || snakeCase(key);
|
|
53
5
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (_isObject(block.document.source)) {
|
|
59
|
-
if (_isObject(block.document.source.s3Location) && _isString(block.document.source.s3Location.uri)) return {
|
|
60
|
-
type: "file",
|
|
61
|
-
mimeType,
|
|
62
|
-
fileId: block.document.source.s3Location.uri
|
|
63
|
-
};
|
|
64
|
-
if (_isBytesArray(block.document.source.bytes)) return {
|
|
65
|
-
type: "file",
|
|
66
|
-
mimeType,
|
|
67
|
-
data: block.document.source.bytes
|
|
68
|
-
};
|
|
69
|
-
if (_isString(block.document.source.text)) return {
|
|
70
|
-
type: "file",
|
|
71
|
-
mimeType,
|
|
72
|
-
data: Buffer.from(block.document.source.text).toString("base64")
|
|
73
|
-
};
|
|
74
|
-
if (_isArray(block.document.source.content)) {
|
|
75
|
-
const data = block.document.source.content.reduce((acc, item) => {
|
|
76
|
-
if (_isObject(item) && _isString(item.text)) return acc + item.text;
|
|
77
|
-
return acc;
|
|
78
|
-
}, "");
|
|
79
|
-
return {
|
|
80
|
-
type: "file",
|
|
81
|
-
mimeType,
|
|
82
|
-
data
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
type: "non_standard",
|
|
89
|
-
value: block
|
|
90
|
-
};
|
|
6
|
+
function mapKeys(fields, mapper, map) {
|
|
7
|
+
const mapped = {};
|
|
8
|
+
for (const key in fields) if (Object.hasOwn(fields, key)) mapped[mapper(key, map)] = fields[key];
|
|
9
|
+
return mapped;
|
|
91
10
|
}
|
|
92
|
-
function convertConverseImageBlock(block) {
|
|
93
|
-
if (_isContentBlock(block, "image") && _isObject(block.image)) {
|
|
94
|
-
const format = _isObject(block.image) && _isString(block.image.format) ? block.image.format : "";
|
|
95
|
-
const mimeType = convertFileFormatToMimeType(format);
|
|
96
|
-
if (_isObject(block.image.source)) {
|
|
97
|
-
if (_isObject(block.image.source.s3Location) && _isString(block.image.source.s3Location.uri)) return {
|
|
98
|
-
type: "image",
|
|
99
|
-
mimeType,
|
|
100
|
-
fileId: block.image.source.s3Location.uri
|
|
101
|
-
};
|
|
102
|
-
if (_isBytesArray(block.image.source.bytes)) return {
|
|
103
|
-
type: "image",
|
|
104
|
-
mimeType,
|
|
105
|
-
data: block.image.source.bytes
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
type: "non_standard",
|
|
111
|
-
value: block
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
function convertConverseVideoBlock(block) {
|
|
115
|
-
if (_isContentBlock(block, "video") && _isObject(block.video)) {
|
|
116
|
-
const format = _isObject(block.video) && _isString(block.video.format) ? block.video.format : "";
|
|
117
|
-
const mimeType = convertFileFormatToMimeType(format);
|
|
118
|
-
if (_isObject(block.video.source)) {
|
|
119
|
-
if (_isObject(block.video.source.s3Location) && _isString(block.video.source.s3Location.uri)) return {
|
|
120
|
-
type: "video",
|
|
121
|
-
mimeType,
|
|
122
|
-
fileId: block.video.source.s3Location.uri
|
|
123
|
-
};
|
|
124
|
-
if (_isBytesArray(block.video.source.bytes)) return {
|
|
125
|
-
type: "video",
|
|
126
|
-
mimeType,
|
|
127
|
-
data: block.video.source.bytes
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
type: "non_standard",
|
|
133
|
-
value: block
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function convertToV1FromChatBedrockConverseMessage(message) {
|
|
137
|
-
function* iterateContent() {
|
|
138
|
-
const content = typeof message.content === "string" ? [{
|
|
139
|
-
type: "text",
|
|
140
|
-
text: message.content
|
|
141
|
-
}] : message.content;
|
|
142
|
-
for (const block of content) {
|
|
143
|
-
if (_isContentBlock(block, "cache_point")) {
|
|
144
|
-
yield {
|
|
145
|
-
type: "non_standard",
|
|
146
|
-
value: block
|
|
147
|
-
};
|
|
148
|
-
continue;
|
|
149
|
-
} else if (_isContentBlock(block, "citations_content") && _isObject(block.citationsContent)) {
|
|
150
|
-
const text = _isArray(block.citationsContent.content) ? block.citationsContent.content.reduce((acc, item) => {
|
|
151
|
-
if (_isObject(item) && _isString(item.text)) return acc + item.text;
|
|
152
|
-
return acc;
|
|
153
|
-
}, "") : "";
|
|
154
|
-
const annotations = _isArray(block.citationsContent.citations) ? block.citationsContent.citations.reduce((acc, item) => {
|
|
155
|
-
if (_isObject(item)) {
|
|
156
|
-
const citedText = _isArray(item.sourceContent) ? item.sourceContent.reduce((acc$1, item$1) => {
|
|
157
|
-
if (_isObject(item$1) && _isString(item$1.text)) return acc$1 + item$1.text;
|
|
158
|
-
return acc$1;
|
|
159
|
-
}, "") : "";
|
|
160
|
-
const properties = iife(() => {
|
|
161
|
-
if (_isObject(item.location)) {
|
|
162
|
-
const location = item.location.documentChar || item.location.documentPage || item.location.documentChunk;
|
|
163
|
-
if (_isObject(location)) return {
|
|
164
|
-
source: _isNumber(location.documentIndex) ? location.documentIndex.toString() : void 0,
|
|
165
|
-
startIndex: _isNumber(location.start) ? location.start : void 0,
|
|
166
|
-
endIndex: _isNumber(location.end) ? location.end : void 0
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
return {};
|
|
170
|
-
});
|
|
171
|
-
acc.push({
|
|
172
|
-
type: "citation",
|
|
173
|
-
citedText,
|
|
174
|
-
...properties
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
return acc;
|
|
178
|
-
}, []) : [];
|
|
179
|
-
yield {
|
|
180
|
-
type: "text",
|
|
181
|
-
text,
|
|
182
|
-
annotations
|
|
183
|
-
};
|
|
184
|
-
continue;
|
|
185
|
-
} else if (_isContentBlock(block, "document") && _isObject(block.document)) {
|
|
186
|
-
yield convertConverseDocumentBlock(block);
|
|
187
|
-
continue;
|
|
188
|
-
} else if (_isContentBlock(block, "guard_content")) {
|
|
189
|
-
yield {
|
|
190
|
-
type: "non_standard",
|
|
191
|
-
value: block
|
|
192
|
-
};
|
|
193
|
-
continue;
|
|
194
|
-
} else if (_isContentBlock(block, "image") && _isObject(block.image)) {
|
|
195
|
-
yield convertConverseImageBlock(block);
|
|
196
|
-
continue;
|
|
197
|
-
} else if (_isContentBlock(block, "reasoning_content") && _isString(block.reasoningText)) {
|
|
198
|
-
yield {
|
|
199
|
-
type: "reasoning",
|
|
200
|
-
reasoning: block.reasoningText
|
|
201
|
-
};
|
|
202
|
-
continue;
|
|
203
|
-
} else if (_isContentBlock(block, "text") && _isString(block.text)) {
|
|
204
|
-
yield {
|
|
205
|
-
type: "text",
|
|
206
|
-
text: block.text
|
|
207
|
-
};
|
|
208
|
-
continue;
|
|
209
|
-
} else if (_isContentBlock(block, "tool_result")) {
|
|
210
|
-
yield {
|
|
211
|
-
type: "non_standard",
|
|
212
|
-
value: block
|
|
213
|
-
};
|
|
214
|
-
continue;
|
|
215
|
-
} else if (_isContentBlock(block, "tool_call")) continue;
|
|
216
|
-
else if (_isContentBlock(block, "video") && _isObject(block.video)) {
|
|
217
|
-
yield convertConverseVideoBlock(block);
|
|
218
|
-
continue;
|
|
219
|
-
}
|
|
220
|
-
yield {
|
|
221
|
-
type: "non_standard",
|
|
222
|
-
value: block
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return Array.from(iterateContent());
|
|
227
|
-
}
|
|
228
|
-
const ChatBedrockConverseTranslator = {
|
|
229
|
-
translateContent: convertToV1FromChatBedrockConverseMessage,
|
|
230
|
-
translateContentChunk: convertToV1FromChatBedrockConverseMessage
|
|
231
|
-
};
|
|
232
11
|
export {
|
|
233
|
-
|
|
12
|
+
keyToJson,
|
|
13
|
+
mapKeys
|
|
234
14
|
};
|
|
235
15
|
//# sourceMappingURL=index.es87.js.map
|
package/dist/index.es87.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es87.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/bedrock_converse.js"],"sourcesContent":["import { _isArray, _isBytesArray, _isContentBlock, _isNumber, _isObject, _isString, iife } from \"./utils.js\";\n\n//#region src/messages/block_translators/bedrock_converse.ts\nfunction convertFileFormatToMimeType(format) {\n\tswitch (format) {\n\t\tcase \"csv\": return \"text/csv\";\n\t\tcase \"doc\": return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n\t\tcase \"docx\": return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n\t\tcase \"html\": return \"text/html\";\n\t\tcase \"md\": return \"text/markdown\";\n\t\tcase \"pdf\": return \"application/pdf\";\n\t\tcase \"txt\": return \"text/plain\";\n\t\tcase \"xls\": return \"application/vnd.ms-excel\";\n\t\tcase \"xlsx\": return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n\t\tcase \"gif\": return \"image/gif\";\n\t\tcase \"jpeg\": return \"image/jpeg\";\n\t\tcase \"jpg\": return \"image/jpeg\";\n\t\tcase \"png\": return \"image/png\";\n\t\tcase \"webp\": return \"image/webp\";\n\t\tcase \"flv\": return \"video/flv\";\n\t\tcase \"mkv\": return \"video/mkv\";\n\t\tcase \"mov\": return \"video/mov\";\n\t\tcase \"mp4\": return \"video/mp4\";\n\t\tcase \"mpeg\": return \"video/mpeg\";\n\t\tcase \"mpg\": return \"video/mpg\";\n\t\tcase \"three_gp\": return \"video/three_gp\";\n\t\tcase \"webm\": return \"video/webm\";\n\t\tcase \"wmv\": return \"video/wmv\";\n\t\tdefault: return \"application/octet-stream\";\n\t}\n}\nfunction convertConverseDocumentBlock(block) {\n\tif (_isObject(block.document) && _isObject(block.document.source)) {\n\t\tconst format = _isObject(block.document) && _isString(block.document.format) ? block.document.format : \"\";\n\t\tconst mimeType = convertFileFormatToMimeType(format);\n\t\tif (_isObject(block.document.source)) {\n\t\t\tif (_isObject(block.document.source.s3Location) && _isString(block.document.source.s3Location.uri)) return {\n\t\t\t\ttype: \"file\",\n\t\t\t\tmimeType,\n\t\t\t\tfileId: block.document.source.s3Location.uri\n\t\t\t};\n\t\t\tif (_isBytesArray(block.document.source.bytes)) return {\n\t\t\t\ttype: \"file\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: block.document.source.bytes\n\t\t\t};\n\t\t\tif (_isString(block.document.source.text)) return {\n\t\t\t\ttype: \"file\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: Buffer.from(block.document.source.text).toString(\"base64\")\n\t\t\t};\n\t\t\tif (_isArray(block.document.source.content)) {\n\t\t\t\tconst data = block.document.source.content.reduce((acc, item) => {\n\t\t\t\t\tif (_isObject(item) && _isString(item.text)) return acc + item.text;\n\t\t\t\t\treturn acc;\n\t\t\t\t}, \"\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"file\",\n\t\t\t\t\tmimeType,\n\t\t\t\t\tdata\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"non_standard\",\n\t\tvalue: block\n\t};\n}\nfunction convertConverseImageBlock(block) {\n\tif (_isContentBlock(block, \"image\") && _isObject(block.image)) {\n\t\tconst format = _isObject(block.image) && _isString(block.image.format) ? block.image.format : \"\";\n\t\tconst mimeType = convertFileFormatToMimeType(format);\n\t\tif (_isObject(block.image.source)) {\n\t\t\tif (_isObject(block.image.source.s3Location) && _isString(block.image.source.s3Location.uri)) return {\n\t\t\t\ttype: \"image\",\n\t\t\t\tmimeType,\n\t\t\t\tfileId: block.image.source.s3Location.uri\n\t\t\t};\n\t\t\tif (_isBytesArray(block.image.source.bytes)) return {\n\t\t\t\ttype: \"image\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: block.image.source.bytes\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"non_standard\",\n\t\tvalue: block\n\t};\n}\nfunction convertConverseVideoBlock(block) {\n\tif (_isContentBlock(block, \"video\") && _isObject(block.video)) {\n\t\tconst format = _isObject(block.video) && _isString(block.video.format) ? block.video.format : \"\";\n\t\tconst mimeType = convertFileFormatToMimeType(format);\n\t\tif (_isObject(block.video.source)) {\n\t\t\tif (_isObject(block.video.source.s3Location) && _isString(block.video.source.s3Location.uri)) return {\n\t\t\t\ttype: \"video\",\n\t\t\t\tmimeType,\n\t\t\t\tfileId: block.video.source.s3Location.uri\n\t\t\t};\n\t\t\tif (_isBytesArray(block.video.source.bytes)) return {\n\t\t\t\ttype: \"video\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: block.video.source.bytes\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"non_standard\",\n\t\tvalue: block\n\t};\n}\nfunction convertToV1FromChatBedrockConverseMessage(message) {\n\tfunction* iterateContent() {\n\t\tconst content = typeof message.content === \"string\" ? [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t}] : message.content;\n\t\tfor (const block of content) {\n\t\t\tif (_isContentBlock(block, \"cache_point\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"citations_content\") && _isObject(block.citationsContent)) {\n\t\t\t\tconst text = _isArray(block.citationsContent.content) ? block.citationsContent.content.reduce((acc, item) => {\n\t\t\t\t\tif (_isObject(item) && _isString(item.text)) return acc + item.text;\n\t\t\t\t\treturn acc;\n\t\t\t\t}, \"\") : \"\";\n\t\t\t\tconst annotations = _isArray(block.citationsContent.citations) ? block.citationsContent.citations.reduce((acc, item) => {\n\t\t\t\t\tif (_isObject(item)) {\n\t\t\t\t\t\tconst citedText = _isArray(item.sourceContent) ? item.sourceContent.reduce((acc$1, item$1) => {\n\t\t\t\t\t\t\tif (_isObject(item$1) && _isString(item$1.text)) return acc$1 + item$1.text;\n\t\t\t\t\t\t\treturn acc$1;\n\t\t\t\t\t\t}, \"\") : \"\";\n\t\t\t\t\t\tconst properties = iife(() => {\n\t\t\t\t\t\t\tif (_isObject(item.location)) {\n\t\t\t\t\t\t\t\tconst location = item.location.documentChar || item.location.documentPage || item.location.documentChunk;\n\t\t\t\t\t\t\t\tif (_isObject(location)) return {\n\t\t\t\t\t\t\t\t\tsource: _isNumber(location.documentIndex) ? location.documentIndex.toString() : void 0,\n\t\t\t\t\t\t\t\t\tstartIndex: _isNumber(location.start) ? location.start : void 0,\n\t\t\t\t\t\t\t\t\tendIndex: _isNumber(location.end) ? location.end : void 0\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn {};\n\t\t\t\t\t\t});\n\t\t\t\t\t\tacc.push({\n\t\t\t\t\t\t\ttype: \"citation\",\n\t\t\t\t\t\t\tcitedText,\n\t\t\t\t\t\t\t...properties\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, []) : [];\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext,\n\t\t\t\t\tannotations\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"document\") && _isObject(block.document)) {\n\t\t\t\tyield convertConverseDocumentBlock(block);\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"guard_content\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"image\") && _isObject(block.image)) {\n\t\t\t\tyield convertConverseImageBlock(block);\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"reasoning_content\") && _isString(block.reasoningText)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: block.reasoningText\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"text\") && _isString(block.text)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: block.text\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"tool_result\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"tool_call\")) continue;\n\t\t\telse if (_isContentBlock(block, \"video\") && _isObject(block.video)) {\n\t\t\t\tyield convertConverseVideoBlock(block);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tyield {\n\t\t\t\ttype: \"non_standard\",\n\t\t\t\tvalue: block\n\t\t\t};\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\nconst ChatBedrockConverseTranslator = {\n\ttranslateContent: convertToV1FromChatBedrockConverseMessage,\n\ttranslateContentChunk: convertToV1FromChatBedrockConverseMessage\n};\n\n//#endregion\nexport { ChatBedrockConverseTranslator };\n//# sourceMappingURL=bedrock_converse.js.map"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.es87.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/load/map_keys.js"],"sourcesContent":["import snakeCase from \"decamelize\";\nimport camelCase from \"camelcase\";\n\n//#region src/load/map_keys.ts\nfunction keyToJson(key, map) {\n\treturn map?.[key] || snakeCase(key);\n}\nfunction keyFromJson(key, map) {\n\treturn map?.[key] || camelCase(key);\n}\nfunction mapKeys(fields, mapper, map) {\n\tconst mapped = {};\n\tfor (const key in fields) if (Object.hasOwn(fields, key)) mapped[mapper(key, map)] = fields[key];\n\treturn mapped;\n}\n\n//#endregion\nexport { keyFromJson, keyToJson, mapKeys };\n//# sourceMappingURL=map_keys.js.map"],"names":[],"mappings":";;AAIA,SAAS,UAAU,KAAK,KAAK;AAC5B,SAAO,MAAM,GAAG,KAAK,UAAU,GAAG;AACnC;AAIA,SAAS,QAAQ,QAAQ,QAAQ,KAAK;AACrC,QAAM,SAAS,CAAA;AACf,aAAW,OAAO,OAAQ,KAAI,OAAO,OAAO,QAAQ,GAAG,EAAG,QAAO,OAAO,KAAK,GAAG,CAAC,IAAI,OAAO,GAAG;AAC/F,SAAO;AACR;","x_google_ignoreList":[0]}
|