@lmnr-ai/lmnr 0.8.37 → 0.8.39
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/cli.cjs +2 -2
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/{dist-CdR_Phvb.mjs → dist-Dgq2z7AD.mjs} +28 -4
- package/dist/dist-Dgq2z7AD.mjs.map +1 -0
- package/dist/{dist-muQLQb9o.cjs → dist-oS06mAi1.cjs} +39 -3
- package/dist/dist-oS06mAi1.cjs.map +1 -0
- package/dist/{evaluations-D6_c4gW-.d.cts → evaluations-BUitiaxR.d.cts} +21 -30
- package/dist/{evaluations-DpDwGehc.d.mts → evaluations-gHrXUnIp.d.mts} +21 -30
- package/dist/{file-utils-C0oHtdus.cjs → file-utils-Bf15ARiL.cjs} +2 -2
- package/dist/{file-utils-C0oHtdus.cjs.map → file-utils-Bf15ARiL.cjs.map} +1 -1
- package/dist/{file-utils-BE3NvLX0.mjs → file-utils-D0UCmQi0.mjs} +2 -2
- package/dist/{file-utils-BE3NvLX0.mjs.map → file-utils-D0UCmQi0.mjs.map} +1 -1
- package/dist/index.cjs +299 -496
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13943 -7780
- package/dist/index.d.mts +13943 -7780
- package/dist/index.mjs +301 -498
- package/dist/index.mjs.map +1 -1
- package/dist/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.cjs +71 -55
- package/dist/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.cjs.map +1 -1
- package/dist/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.d.cts +4410 -61
- package/dist/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.d.mts +4410 -61
- package/dist/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.mjs +71 -55
- package/dist/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.mjs.map +1 -1
- package/package.json +26 -26
- package/dist/dist-CdR_Phvb.mjs.map +0 -1
- package/dist/dist-muQLQb9o.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-interceptors.cjs","names":["exports","exports","exports","exports","#cancelRequested","signalOptions","exports","AsyncLocalStorage"],"sources":["../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/encoding.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/type-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/errors.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/internal-workflow/index.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/activity-options.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/activity-cancellation-details.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/continue-as-new.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/internal/symbol-instanceof.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/common/handler-error.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/common/operation-error.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/common/index.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/internal/object-utils.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/service/service-definition.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/service/helpers.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/service/index.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/start-operation-result.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/operation-handler.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/service-handler.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/index.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/index.js","../../../../../../node_modules/.pnpm/long@5.3.2/node_modules/long/umd/index.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/failure.js","../../../../../../node_modules/.pnpm/ms@3.0.0-canary.1/node_modules/ms/dist/index.cjs","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/time.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/converter/types.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/converter/payload-converter.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/converter/failure-converter.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/converter/data-converter.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/converter/payload-codec.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/deprecated-time.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/interfaces.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/logger.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/priority.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/metrics.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/retry-policy.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/worker-deployments.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/workflow-definition-options.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/workflow-handle.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/workflow-options.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/versioning-intent.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/search-attributes.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/index.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/global-attributes.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/stack-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/flags.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/cancellation-scope.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/errors.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/interceptors.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/interfaces.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/sinks.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/random-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/random-streams.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/interceptors.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/interceptor-composition.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/user-metadata.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/versioning-intent-enum.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.18.1/node_modules/@temporalio/common/lib/reserved.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/update-scope.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/workflow.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/logs.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/trigger.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/metrics.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/nexus.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.18.1/node_modules/@temporalio/workflow/lib/index.js","../../../../src/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.ts"],"sourcesContent":["\"use strict\";\n// Pasted with modifications from: https://raw.githubusercontent.com/anonyco/FastestSmallestTextEncoderDecoder/master/EncoderDecoderTogether.src.js\n/* eslint no-fallthrough: 0 */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextEncoder = exports.TextDecoder = void 0;\nexports.encode = encode;\nexports.decode = decode;\nconst fromCharCode = String.fromCharCode;\nconst encoderRegexp = /[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g;\nconst tmpBufferU16 = new Uint16Array(32);\nclass TextDecoder {\n decode(inputArrayOrBuffer) {\n const inputAs8 = inputArrayOrBuffer instanceof Uint8Array ? inputArrayOrBuffer : new Uint8Array(inputArrayOrBuffer);\n let resultingString = '', tmpStr = '', index = 0, nextEnd = 0, cp0 = 0, codePoint = 0, minBits = 0, cp1 = 0, pos = 0, tmp = -1;\n const len = inputAs8.length | 0;\n const lenMinus32 = (len - 32) | 0;\n // Note that tmp represents the 2nd half of a surrogate pair incase a surrogate gets divided between blocks\n for (; index < len;) {\n nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0;\n for (; pos < nextEnd; index = (index + 1) | 0, pos = (pos + 1) | 0) {\n // @ts-expect-error ignoring unchecked index\n cp0 = inputAs8[index] & 0xff;\n switch (cp0 >> 4) {\n case 15:\n // @ts-expect-error ignoring unchecked index\n cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff;\n if (cp1 >> 6 !== 0b10 || 0b11110111 < cp0) {\n index = (index - 1) | 0;\n break;\n }\n codePoint = ((cp0 & 0b111) << 6) | (cp1 & 0b00111111);\n minBits = 5; // 20 ensures it never passes -> all invalid replacements\n cp0 = 0x100; // keep track of th bit size\n case 14:\n // @ts-expect-error ignoring unchecked index\n cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff;\n codePoint <<= 6;\n codePoint |= ((cp0 & 0b1111) << 6) | (cp1 & 0b00111111);\n minBits = cp1 >> 6 === 0b10 ? (minBits + 4) | 0 : 24; // 24 ensures it never passes -> all invalid replacements\n cp0 = (cp0 + 0x100) & 0x300; // keep track of th bit size\n case 13:\n case 12:\n // @ts-expect-error ignoring unchecked index\n cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff;\n codePoint <<= 6;\n codePoint |= ((cp0 & 0b11111) << 6) | (cp1 & 0b00111111);\n minBits = (minBits + 7) | 0;\n // Now, process the code point\n if (index < len && cp1 >> 6 === 0b10 && codePoint >> minBits && codePoint < 0x110000) {\n cp0 = codePoint;\n codePoint = (codePoint - 0x10000) | 0;\n if (0 <= codePoint /*0xffff < codePoint*/) {\n // BMP code point\n //nextEnd = nextEnd - 1|0;\n tmp = ((codePoint >> 10) + 0xd800) | 0; // highSurrogate\n cp0 = ((codePoint & 0x3ff) + 0xdc00) | 0; // lowSurrogate (will be inserted later in the switch-statement)\n if (pos < 31) {\n // notice 31 instead of 32\n tmpBufferU16[pos] = tmp;\n pos = (pos + 1) | 0;\n tmp = -1;\n }\n else {\n // else, we are at the end of the inputAs8 and let tmp0 be filled in later on\n // NOTE that cp1 is being used as a temporary variable for the swapping of tmp with cp0\n cp1 = tmp;\n tmp = cp0;\n cp0 = cp1;\n }\n }\n else\n nextEnd = (nextEnd + 1) | 0; // because we are advancing i without advancing pos\n }\n else {\n // invalid code point means replacing the whole thing with null replacement characters\n cp0 >>= 8;\n index = (index - cp0 - 1) | 0; // reset index back to what it was before\n cp0 = 0xfffd;\n }\n // Finally, reset the variables for the next go-around\n minBits = 0;\n codePoint = 0;\n nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0;\n /*case 11:\n case 10:\n case 9:\n case 8:\n codePoint ? codePoint = 0 : cp0 = 0xfffd; // fill with invalid replacement character\n case 7:\n case 6:\n case 5:\n case 4:\n case 3:\n case 2:\n case 1:\n case 0:\n tmpBufferU16[pos] = cp0;\n continue;*/\n default: // fill with invalid replacement character\n tmpBufferU16[pos] = cp0;\n continue;\n case 11:\n case 10:\n case 9:\n case 8:\n }\n tmpBufferU16[pos] = 0xfffd; // fill with invalid replacement character\n }\n tmpStr += fromCharCode(\n // @ts-expect-error ignoring unchecked index\n tmpBufferU16[0], tmpBufferU16[1], tmpBufferU16[2], tmpBufferU16[3], tmpBufferU16[4], tmpBufferU16[5], tmpBufferU16[6], tmpBufferU16[7], tmpBufferU16[8], tmpBufferU16[9], tmpBufferU16[10], tmpBufferU16[11], tmpBufferU16[12], tmpBufferU16[13], tmpBufferU16[14], tmpBufferU16[15], tmpBufferU16[16], tmpBufferU16[17], tmpBufferU16[18], tmpBufferU16[19], tmpBufferU16[20], tmpBufferU16[21], tmpBufferU16[22], tmpBufferU16[23], tmpBufferU16[24], tmpBufferU16[25], tmpBufferU16[26], tmpBufferU16[27], tmpBufferU16[28], tmpBufferU16[29], tmpBufferU16[30], tmpBufferU16[31]);\n if (pos < 32)\n tmpStr = tmpStr.slice(0, (pos - 32) | 0); //-(32-pos));\n if (index < len) {\n //fromCharCode.apply(0, tmpBufferU16 : Uint8Array ? tmpBufferU16.subarray(0,pos) : tmpBufferU16.slice(0,pos));\n tmpBufferU16[0] = tmp;\n pos = ~tmp >>> 31; //tmp !== -1 ? 1 : 0;\n tmp = -1;\n if (tmpStr.length < resultingString.length)\n continue;\n }\n else if (tmp !== -1) {\n tmpStr += fromCharCode(tmp);\n }\n resultingString += tmpStr;\n tmpStr = '';\n }\n return resultingString;\n }\n}\nexports.TextDecoder = TextDecoder;\n//////////////////////////////////////////////////////////////////////////////////////\nfunction encoderReplacer(nonAsciiChars) {\n // make the UTF string into a binary UTF-8 encoded string\n let point = nonAsciiChars.charCodeAt(0) | 0;\n if (0xd800 <= point) {\n if (point <= 0xdbff) {\n const nextcode = nonAsciiChars.charCodeAt(1) | 0; // defaults to 0 when NaN, causing null replacement character\n if (0xdc00 <= nextcode && nextcode <= 0xdfff) {\n //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0;\n point = ((point << 10) + nextcode - 0x35fdc00) | 0;\n if (point > 0xffff)\n return fromCharCode((0x1e /*0b11110*/ << 3) | (point >> 18), (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/);\n }\n else\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n else if (point <= 0xdfff) {\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n }\n /*if (point <= 0x007f) return nonAsciiChars;\n else */ if (point <= 0x07ff) {\n return fromCharCode((0x6 << 5) | (point >> 6), (0x2 << 6) | (point & 0x3f));\n }\n else\n return fromCharCode((0xe /*0b1110*/ << 4) | (point >> 12), (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/);\n}\nclass TextEncoder {\n encode(inputString) {\n // 0xc0 => 0b11000000; 0xff => 0b11111111; 0xc0-0xff => 0b11xxxxxx\n // 0x80 => 0b10000000; 0xbf => 0b10111111; 0x80-0xbf => 0b10xxxxxx\n const encodedString = inputString === void 0 ? '' : '' + inputString, len = encodedString.length | 0;\n let result = new Uint8Array(((len << 1) + 8) | 0);\n let tmpResult;\n let i = 0, pos = 0, point = 0, nextcode = 0;\n let upgradededArraySize = !Uint8Array; // normal arrays are auto-expanding\n for (i = 0; i < len; i = (i + 1) | 0, pos = (pos + 1) | 0) {\n point = encodedString.charCodeAt(i) | 0;\n if (point <= 0x007f) {\n result[pos] = point;\n }\n else if (point <= 0x07ff) {\n result[pos] = (0x6 << 5) | (point >> 6);\n result[(pos = (pos + 1) | 0)] = (0x2 << 6) | (point & 0x3f);\n }\n else {\n widenCheck: {\n if (0xd800 <= point) {\n if (point <= 0xdbff) {\n nextcode = encodedString.charCodeAt((i = (i + 1) | 0)) | 0; // defaults to 0 when NaN, causing null replacement character\n if (0xdc00 <= nextcode && nextcode <= 0xdfff) {\n //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0;\n point = ((point << 10) + nextcode - 0x35fdc00) | 0;\n if (point > 0xffff) {\n result[pos] = (0x1e /*0b11110*/ << 3) | (point >> 18);\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/;\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/;\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/;\n continue;\n }\n break widenCheck;\n }\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n else if (point <= 0xdfff) {\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n }\n if (!upgradededArraySize && i << 1 < pos && i << 1 < ((pos - 7) | 0)) {\n upgradededArraySize = true;\n tmpResult = new Uint8Array(len * 3);\n tmpResult.set(result);\n result = tmpResult;\n }\n }\n result[pos] = (0xe /*0b1110*/ << 4) | (point >> 12);\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/;\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/;\n }\n }\n return Uint8Array ? result.subarray(0, pos) : result.slice(0, pos);\n }\n encodeInto(inputString, u8Arr) {\n const encodedString = inputString === void 0 ? '' : ('' + inputString).replace(encoderRegexp, encoderReplacer);\n let len = encodedString.length | 0, i = 0, char = 0, read = 0;\n const u8ArrLen = u8Arr.length | 0;\n const inputLength = inputString.length | 0;\n if (u8ArrLen < len)\n len = u8ArrLen;\n putChars: {\n for (; i < len; i = (i + 1) | 0) {\n char = encodedString.charCodeAt(i) | 0;\n switch (char >> 4) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n read = (read + 1) | 0;\n // extension points:\n case 8:\n case 9:\n case 10:\n case 11:\n break;\n case 12:\n case 13:\n if (((i + 1) | 0) < u8ArrLen) {\n read = (read + 1) | 0;\n break;\n }\n case 14:\n if (((i + 2) | 0) < u8ArrLen) {\n //if (!(char === 0xEF && encodedString.substr(i+1|0,2) === \"\\xBF\\xBD\"))\n read = (read + 1) | 0;\n break;\n }\n case 15:\n if (((i + 3) | 0) < u8ArrLen) {\n read = (read + 1) | 0;\n break;\n }\n default:\n break putChars;\n }\n //read = read + ((char >> 6) !== 2) |0;\n u8Arr[i] = char;\n }\n }\n return { written: i, read: inputLength < read ? inputLength : read };\n }\n}\nexports.TextEncoder = TextEncoder;\n/**\n * Encode a UTF-8 string into a Uint8Array\n */\nfunction encode(s) {\n return TextEncoder.prototype.encode(s);\n}\n/**\n * Decode a Uint8Array into a UTF-8 string\n */\nfunction decode(a) {\n return TextDecoder.prototype.decode(a);\n}\n//# sourceMappingURL=encoding.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkExtends = checkExtends;\nexports.isRecord = isRecord;\nexports.hasOwnProperty = hasOwnProperty;\nexports.hasOwnProperties = hasOwnProperties;\nexports.isError = isError;\nexports.isAbortError = isAbortError;\nexports.errorMessage = errorMessage;\nexports.errorCode = errorCode;\nexports.assertNever = assertNever;\nexports.SymbolBasedInstanceOfError = SymbolBasedInstanceOfError;\n/** Verify that an type _Copy extends _Orig */\nfunction checkExtends() {\n // noop, just type check\n}\nfunction isRecord(value) {\n return typeof value === 'object' && value !== null;\n}\nfunction hasOwnProperty(record, prop) {\n return prop in record;\n}\nfunction hasOwnProperties(record, props) {\n return props.every((prop) => prop in record);\n}\nfunction isError(error) {\n return (isRecord(error) &&\n typeof error.name === 'string' &&\n typeof error.message === 'string' &&\n (error.stack == null || typeof error.stack === 'string'));\n}\nfunction isAbortError(error) {\n return isError(error) && error.name === 'AbortError';\n}\n/**\n * Get `error.message` (or `undefined` if not present)\n */\nfunction errorMessage(error) {\n if (isError(error)) {\n return error.message;\n }\n else if (typeof error === 'string') {\n return error;\n }\n return undefined;\n}\nfunction isErrorWithCode(error) {\n return isRecord(error) && typeof error.code === 'string';\n}\n/**\n * Get `error.code` (or `undefined` if not present)\n */\nfunction errorCode(error) {\n if (isErrorWithCode(error)) {\n return error.code;\n }\n return undefined;\n}\n/**\n * Asserts that some type is the never type\n */\nfunction assertNever(msg, x) {\n throw new TypeError(msg + ': ' + x);\n}\n/**\n * A decorator to be used on error classes. It adds the 'name' property AND provides a custom\n * 'instanceof' handler that works correctly across execution contexts.\n *\n * ### Details ###\n *\n * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the\n * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the\n * constructor function 'Y'.\n *\n * Unfortunately, it happens in various situations that different constructor function objects get created for what\n * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is\n * known that the object is indeed an instance of that class. One particular case where this happens is when constructor\n * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies\n * of the same library gets loaded in the same realm.\n *\n * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module\n * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549\n * for some details on that one).\n *\n * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and\n * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then\n * checking for the presence of that symbol.\n */\nfunction SymbolBasedInstanceOfError(markerName) {\n return (clazz) => {\n const marker = Symbol.for(`__temporal_is${markerName}`);\n Object.defineProperty(clazz.prototype, 'name', { value: markerName, enumerable: true });\n Object.defineProperty(clazz.prototype, marker, { value: true, enumerable: false });\n Object.defineProperty(clazz, Symbol.hasInstance, {\n // eslint-disable-next-line object-shorthand\n value: function (error) {\n if (this === clazz) {\n return isRecord(error) && error[marker] === true;\n }\n else {\n // 'this' must be a _subclass_ of clazz that doesn't redefined [Symbol.hasInstance], so that it inherited\n // from clazz's [Symbol.hasInstance]. If we don't handle this particular situation, then\n // `x instanceof SubclassOfParent` would return true for any instance of 'Parent', which is clearly wrong.\n //\n // Ideally, it'd be preferable to avoid this case entirely, by making sure that all subclasses of 'clazz'\n // redefine [Symbol.hasInstance], but we can't enforce that. We therefore fallback to the default instanceof\n // behavior (which is NOT cross-realm safe).\n return this.prototype.isPrototypeOf(error); // eslint-disable-line no-prototype-builtins\n }\n },\n });\n };\n}\n//# sourceMappingURL=type-helpers.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompleteAsyncError = exports.NamespaceNotFoundError = exports.WorkflowNotFoundError = exports.IllegalStateError = exports.PayloadConverterError = exports.ValueError = void 0;\nconst type_helpers_1 = require(\"./type-helpers\");\n/**\n * Thrown from code that receives a value that is unexpected or that it's unable to handle.\n */\nlet ValueError = class ValueError extends Error {\n cause;\n constructor(message, cause) {\n super(message ?? undefined);\n this.cause = cause;\n }\n};\nexports.ValueError = ValueError;\nexports.ValueError = ValueError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ValueError')\n], ValueError);\n/**\n * Thrown when a Payload Converter is misconfigured.\n */\nlet PayloadConverterError = class PayloadConverterError extends ValueError {\n};\nexports.PayloadConverterError = PayloadConverterError;\nexports.PayloadConverterError = PayloadConverterError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('PayloadConverterError')\n], PayloadConverterError);\n/**\n * Signals that a requested operation can't be completed because it is illegal given the\n * current state of the object; e.g. trying to use a resource after it has been closed.\n */\nlet IllegalStateError = class IllegalStateError extends Error {\n};\nexports.IllegalStateError = IllegalStateError;\nexports.IllegalStateError = IllegalStateError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('IllegalStateError')\n], IllegalStateError);\n/**\n * Thrown when a Workflow with the given Id is not known to Temporal Server.\n * It could be because:\n * - Id passed is incorrect\n * - Workflow is closed (for some calls, e.g. `terminate`)\n * - Workflow was deleted from the Server after reaching its retention limit\n */\nlet WorkflowNotFoundError = class WorkflowNotFoundError extends Error {\n workflowId;\n runId;\n constructor(message, workflowId, runId) {\n super(message);\n this.workflowId = workflowId;\n this.runId = runId;\n }\n};\nexports.WorkflowNotFoundError = WorkflowNotFoundError;\nexports.WorkflowNotFoundError = WorkflowNotFoundError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowNotFoundError')\n], WorkflowNotFoundError);\n/**\n * Thrown when the specified namespace is not known to Temporal Server.\n */\nlet NamespaceNotFoundError = class NamespaceNotFoundError extends Error {\n namespace;\n constructor(namespace) {\n super(`Namespace not found: '${namespace}'`);\n this.namespace = namespace;\n }\n};\nexports.NamespaceNotFoundError = NamespaceNotFoundError;\nexports.NamespaceNotFoundError = NamespaceNotFoundError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('NamespaceNotFoundError')\n], NamespaceNotFoundError);\n/**\n * Throw this error from an Activity in order to make the Worker forget about this Activity.\n *\n * The Activity can then be completed asynchronously (from anywhere—usually outside the Worker) using\n * the Client's activity handle.\n *\n * @example\n *\n * ```ts\n *import { CompleteAsyncError } from '@temporalio/activity';\n *\n *export async function myActivity(): Promise<never> {\n * // ...\n * throw new CompleteAsyncError();\n *}\n * ```\n */\nlet CompleteAsyncError = class CompleteAsyncError extends Error {\n};\nexports.CompleteAsyncError = CompleteAsyncError;\nexports.CompleteAsyncError = CompleteAsyncError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('CompleteAsyncError')\n], CompleteAsyncError);\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeProtoEnumConverters = makeProtoEnumConverters;\nconst errors_1 = require(\"../errors\");\n/**\n * Create encoding and decoding functions to convert between the numeric `enum` types produced by our\n * Protobuf compiler and \"const object of strings\" enum values that we expose in our public APIs.\n *\n * ### Usage\n *\n * Newly introduced enums should follow the following pattern:\n *\n * ```ts\n * const ParentClosePolicy = {\n * TERMINATE: 'TERMINATE',\n * ABANDON: 'ABANDON',\n * REQUEST_CANCEL: 'REQUEST_CANCEL',\n * } as const;\n * type ParentClosePolicy = (typeof ParentClosePolicy)[keyof typeof ParentClosePolicy];\n *\n * const [encodeParentClosePolicy, decodeParentClosePolicy] = //\n * makeProtoEnumConverters<\n * coresdk.child_workflow.ParentClosePolicy,\n * typeof coresdk.child_workflow.ParentClosePolicy,\n * keyof typeof coresdk.child_workflow.ParentClosePolicy,\n * typeof ParentClosePolicy,\n * 'PARENT_CLOSE_POLICY_' // This may be an empty string if the proto enum doesn't add a repeated prefix on values\n * >(\n * {\n * [ParentClosePolicy.TERMINATE]: 1, // These numbers must match the ones in the proto enum\n * [ParentClosePolicy.ABANDON]: 2,\n * [ParentClosePolicy.REQUEST_CANCEL]: 3,\n *\n * UNSPECIFIED: 0,\n * } as const,\n * 'PARENT_CLOSE_POLICY_'\n * );\n * ```\n *\n * `makeProtoEnumConverters` supports other usage patterns, but they are only meant for\n * backward compatibility with former enum definitions and should not be used for new enums.\n *\n * ### Context\n *\n * Temporal's Protobuf APIs define several `enum` types; our Protobuf compiler transforms these to\n * traditional (i.e. non-const) [TypeScript numeric `enum`s](https://www.typescriptlang.org/docs/handbook/enums.html#numeric-enums).\n *\n * For various reasons, this is far from ideal:\n *\n * - Due to the dual nature of non-const TypeScript `enum`s (they are both a type and a value),\n * it is not possible to refer to an enum value from code without a \"real\" import of the enum type\n * (i.e. can't simply do `import type ...`). In Workflow code, such an import would result in\n * loading our entire Protobuf definitions into the workflow sandbox, adding several megabytes to\n * the per-workflow memory footprint, which is unacceptable; to avoid that, we need to maintain\n * a mirror copy of each enum types used by in-workflow APIs, and export these from either\n * `@temporalio/common` or `@temporalio/workflow`.\n * - It is not desirable for users to need an explicit dependency on `@temporalio/proto` just to\n * get access to these enum types; we therefore made it a common practice to reexport these enums\n * from our public facing packages. However, experience demontrated that these reexports effectively\n * resulted in poor and inconsistent documentation coverage compared to mirrored enums types.\n * - Our Protobuf enum types tend to follow a verbose and redundant naming convention, which feels\n * unatural and excessive according to most TypeScript style guides; e.g. instead of\n * `workflowIdReusePolicy: WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`,\n * a TypeScript developer would generally expect to be able to write something similar to\n * `workflowIdReusePolicy: 'REJECT_DUPLICATE'`.\n * - Because of the way Protobuf works, many of our enum types contain an `UNSPECIFIED` value, which\n * is used to explicitly identify a value that is unset. In TypeScript code, the `undefined` value\n * already serves that purpose, and is definitely more idiomatic to TS developers, whereas these\n * `UNSPECIFIED` values create noise and confusion in our APIs.\n * - TypeScript editors generally do a very bad job at providing autocompletion that implies reaching\n * for values of a TypeScript enum type, forcing developers to explicitly type in at least part\n * of the name of the enum type before they can get autocompletion for its values. On the other\n * hand, all TS editors immediately provide autocompletion for string union types.\n * - The [TypeScript's official documentation](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)\n * itself suggests that, in modern TypeScript, the use of `as const` objects may generally suffice\n * and may be advantageous over the use of `enum` types.\n *\n * A const object of strings, combined with a union type of possible string values, provides a much\n * more idiomatic syntax and a better DX for TypeScript developers. This however requires a way to\n * convert back and forth between the `enum` values produced by the Protobuf compiler and the\n * equivalent string values.\n *\n * This helper dynamically creates these conversion functions for a given Protobuf enum type,\n * strongly building upon specific conventions that we have adopted in our Protobuf definitions.\n *\n * ### Validations\n *\n * The complex type signature of this helper is there to prevent most potential incoherencies\n * that could result from having to manually synchronize the const object of strings enum and the\n * conversion table with the proto enum, while not requiring a regular import on the Protobuf enum\n * itself (so it can be used safely for enums meant to be used from workflow code).\n *\n * In particular, failing any of the following invariants will result in build time errors:\n *\n * - For every key of the form `PREFIX_KEY: number` in the proto enum, excluding the `UNSPECIFIED` key:\n * - There MUST be a corresponding `KEY: 'KEY'` entry in the const object of strings enum;\n * - There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum\n * (this is meant to preserve backward compatibility with the former syntax; such aliases should\n * not be added for new enums and enum entries introduced going forward);\n * - There MUST be a corresponding `KEY: number` in the mapping table.\n * - If the proto enum contains a `PREFIX_UNSPECIFIED` entry, then:\n * - There MAY be a corresponding `PREFIX_UNSPECIFIED: undefined` and/or `UNSPECIFIED: undefined`\n * entries in the const object of strings enum — this is meant to preserve backward compatibility\n * with the former syntax; this alias should not be added for new enums introduced going forward;\n * - There MUST be an `UNSPECIFIED: 0` in the mapping table.\n * - The const object of strings enum MUST NOT contain any other keys than the ones mandated or\n * optionally allowed be the preceeding rules.\n * - The mapping table MUST NOT contain any other keys than the ones mandated above.\n *\n * These rules notably ensure that whenever a new value is added to an existing Proto enum, the code\n * will fail to compile until the corresponding entry is added on the const object of strings enum\n * and the mapping table.\n *\n * @internal\n */\nfunction makeProtoEnumConverters(mapTable, prefix) {\n const reverseTable = Object.fromEntries(Object.entries(mapTable).map(([k, v]) => [v, k]));\n const hasUnspecified = mapTable['UNSPECIFIED'] === 0 || mapTable[`${prefix}UNSPECIFIED`] === 0;\n function isShortStringEnumKeys(x) {\n return typeof x === 'string' && x in mapTable;\n }\n function isNumericEnumValue(x) {\n return typeof x === 'number' && x in reverseTable;\n }\n function encode(input) {\n if (input == null) {\n return undefined;\n }\n else if (typeof input === 'string') {\n let shorten = input;\n if (shorten.startsWith(prefix)) {\n shorten = shorten.slice(prefix.length);\n }\n if (isShortStringEnumKeys(shorten)) {\n return mapTable[shorten];\n }\n throw new errors_1.ValueError(`Invalid enum value: '${input}'`);\n }\n else if (typeof input === 'number') {\n return input;\n }\n else {\n throw new errors_1.ValueError(`Invalid enum value: '${input}' of type ${typeof input}`);\n }\n }\n function decode(input) {\n if (input == null) {\n return undefined;\n }\n else if (typeof input === 'number') {\n if (hasUnspecified && input === 0) {\n return undefined;\n }\n if (isNumericEnumValue(input)) {\n return reverseTable[input];\n }\n // We got a proto enum value that we don't yet know about (i.e. it didn't exist when this code\n // was compiled). This is certainly a possibility, but given how our APIs evolve, this is is\n // unlikely to be a terribly bad thing by itself (we avoid adding new enum values in places\n // that would break backward compatibility with existing deployed code). Therefore, throwing\n // on \"unexpected\" values is likely to end up causing more problems than it might avoid,\n // especially given that the decoded value may actually never get read anwyay.\n //\n // Therefore, we instead cheat on type constraints and return a string of the form \"unknown_23\".\n // That somewhat mirrors the behavior we'd get with the pure numerical approach.\n return `unknown_${input}`;\n }\n throw new errors_1.ValueError(`Invalid proto enum value: '${input}' of type ${typeof input}`);\n }\n return [encode, decode];\n}\n//# sourceMappingURL=enums-helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterNullAndUndefined = filterNullAndUndefined;\nexports.mergeObjects = mergeObjects;\nexports.deepMerge = deepMerge;\n/**\n * Helper to prevent `undefined` and `null` values overriding defaults when merging maps.\n */\nfunction filterNullAndUndefined(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([_k, v]) => v != null));\n}\nfunction mergeObjects(original, delta) {\n if (original == null)\n return delta;\n if (delta == null)\n return original;\n const merged = { ...original };\n let changed = false;\n for (const [k, v] of Object.entries(delta)) {\n if (v !== merged[k]) {\n if (v == null)\n delete merged[k];\n else\n merged[k] = v;\n changed = true;\n }\n }\n return changed ? merged : original;\n}\nfunction isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n/**\n * Recursively merges two objects, returning a new object.\n *\n * Properties from `source` will overwrite properties on `target`.\n * Nested objects are merged recursively.\n *\n * Object fields in the returned object are references, as in,\n * the returned object is not completely fresh.\n */\nfunction deepMerge(target, source) {\n const output = { ...target };\n if (isObject(target) && isObject(source)) {\n for (const key of Object.keys(source)) {\n const sourceValue = source[key];\n if (isObject(sourceValue) && key in target && isObject(target[key])) {\n output[key] = deepMerge(target[key], sourceValue);\n }\n else {\n output[key] = sourceValue;\n }\n }\n }\n return output;\n}\n//# sourceMappingURL=objects-helpers.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deepMerge = exports.mergeObjects = exports.filterNullAndUndefined = void 0;\n__exportStar(require(\"./enums-helpers\"), exports);\nvar objects_helpers_1 = require(\"./objects-helpers\");\nObject.defineProperty(exports, \"filterNullAndUndefined\", { enumerable: true, get: function () { return objects_helpers_1.filterNullAndUndefined; } });\nObject.defineProperty(exports, \"mergeObjects\", { enumerable: true, get: function () { return objects_helpers_1.mergeObjects; } });\n// ts-prune-ignore-next\nObject.defineProperty(exports, \"deepMerge\", { enumerable: true, get: function () { return objects_helpers_1.deepMerge; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeActivityCancellationType = exports.encodeActivityCancellationType = exports.ActivityCancellationType = void 0;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n// Note: The types defined in this file are here for legacy reasons. They should have been defined\n// in the 'workflow' package, instead of 'common'. They are now reexported from the 'workflow'\n// package, which is the preferred way to import them, but we unfortunately can't remove them from\n// here as that would be a breaking change.\n/**\n * Determines:\n * - whether cancellation requests should be propagated from the current Workflow to the Activity; and\n * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the\n * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`).\n *\n * Note that this setting only applies to cancellation originating from cancellation being\n * externally requested on the Workflow itself, or from internal cancellation of the\n * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution\n * always results in cancellation of its outstanding Activity executions, regardless of those\n * Activities' {@link ActivityCancellationType} settings.\n *\n * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED\n */\n// MAINTENANCE: Keep this typedoc in sync with the `ActivityOptions.cancellationType` and\n// `LocalActivityOptions.cancellationType` fields later in this file.\nexports.ActivityCancellationType = {\n /**\n * Do not propagate cancellation requests to the Activity, and immediately report cancellation\n * to the caller.\n */\n ABANDON: 'ABANDON',\n /**\n * Propagate cancellation request from the Workflow to the Activity, yet _immediately_ report\n * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation\n * request.\n *\n * Note that this cancellation type provides no guarantee, from the Workflow-side, that the\n * cancellation request will actually be delivered to the Activity; e.g. the calling Workflow\n * may exit before the delivery is completed, or the Activity may complete (either successfully\n * or uncessfully) before the cancellation is delivered, resulting in a situation where the\n * workflow thinks the activity was cancelled, but the activity actually completed successfully.\n *\n * To ensure that the Workflow is properly informed of the Activity's final state (i.e. either\n * completion or cancellation), use {@link WAIT_CANCELLATION_COMPLETED}.\n */\n TRY_CANCEL: 'TRY_CANCEL',\n /**\n * Propagate cancellation request from the Workflow to the Activity, and wait for the activity\n * to complete its execution (either successfully, uncessfully, or as cancelled).\n *\n * Note that the Activity must heartbeat to receive a cancellation notification. This can block\n * the Workflow's cancellation for a long time if the Activity doesn't heartbeat or chooses to\n * ignore the cancellation request.\n */\n WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED',\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.ActivityCancellationType.TRY_CANCEL]: 0,\n [exports.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED]: 1,\n [exports.ActivityCancellationType.ABANDON]: 2,\n}, ''), exports.encodeActivityCancellationType = _a[0], exports.decodeActivityCancellationType = _a[1];\n//# sourceMappingURL=activity-options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ActivityCancellationDetails = void 0;\n/**\n * Provides the reasons for the activity's cancellation. Cancellation details are set once and do not change once set.\n */\nclass ActivityCancellationDetails {\n notFound;\n cancelRequested;\n paused;\n timedOut;\n workerShutdown;\n reset;\n constructor(options = {}) {\n this.notFound = options.notFound ?? false;\n this.cancelRequested = options.cancelRequested ?? false;\n this.paused = options.paused ?? false;\n this.timedOut = options.timedOut ?? false;\n this.workerShutdown = options.workerShutdown ?? false;\n this.reset = options.reset ?? false;\n }\n static fromProto(proto) {\n if (proto == null) {\n return new ActivityCancellationDetails();\n }\n return new ActivityCancellationDetails({\n notFound: proto.isNotFound ?? false,\n cancelRequested: proto.isCancelled ?? false,\n paused: proto.isPaused ?? false,\n timedOut: proto.isTimedOut ?? false,\n workerShutdown: proto.isWorkerShutdown ?? false,\n reset: proto.isReset ?? false,\n });\n }\n}\nexports.ActivityCancellationDetails = ActivityCancellationDetails;\n//# sourceMappingURL=activity-cancellation-details.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeSuggestContinueAsNewReason = exports.encodeSuggestContinueAsNewReason = exports.SuggestContinueAsNewReason = void 0;\nexports.suggestContinueAsNewReasonsFromProto = suggestContinueAsNewReasonsFromProto;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * Reason(s) why continue as new is suggested. Can potentially be multiple reasons.\n *\n * @experimental May be removed or changed in the future.\n */\nexports.SuggestContinueAsNewReason = {\n HISTORY_SIZE_TOO_LARGE: 'HISTORY_SIZE_TOO_LARGE',\n TOO_MANY_HISTORY_EVENTS: 'TOO_MANY_HISTORY_EVENTS',\n TOO_MANY_UPDATES: 'TOO_MANY_UPDATES',\n};\n// ts-prune-ignore-next\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.SuggestContinueAsNewReason.HISTORY_SIZE_TOO_LARGE]: 1,\n [exports.SuggestContinueAsNewReason.TOO_MANY_HISTORY_EVENTS]: 2,\n [exports.SuggestContinueAsNewReason.TOO_MANY_UPDATES]: 3,\n UNSPECIFIED: 0,\n}, 'SUGGEST_CONTINUE_AS_NEW_REASON_'), exports.encodeSuggestContinueAsNewReason = _a[0], exports.decodeSuggestContinueAsNewReason = _a[1];\n// ts-prune-ignore-next\nfunction suggestContinueAsNewReasonsFromProto(reasons) {\n if (reasons == null) {\n return undefined;\n }\n const res = [];\n for (const r of reasons) {\n const decoded = (0, exports.decodeSuggestContinueAsNewReason)(r);\n if (decoded !== undefined) {\n res.push(decoded);\n }\n }\n if (res.length === 0) {\n return undefined;\n }\n return res;\n}\n//# sourceMappingURL=continue-as-new.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.injectSymbolBasedInstanceOf = injectSymbolBasedInstanceOf;\n/**\n * Inject a custom 'instanceof' handler on the given class, that works correctly across execution contexts.\n *\n * ### Details ###\n *\n * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the\n * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the\n * constructor function 'Y'.\n *\n * Unfortunately, it happens in various situations that different constructor function objects get created for what\n * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is\n * known that the object is indeed an instance of that class. One particular case where this happens is when constructor\n * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies\n * of the same library gets loaded in the same realm.\n *\n * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module\n * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549\n * for some details on that one).\n *\n * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and\n * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then\n * checking for the presence of that symbol.\n *\n * @internal\n * @hidden\n */\nfunction injectSymbolBasedInstanceOf(clazz, markerName) {\n // It may seem redundant to have an explicit markerName argument here. Can't we simply use the class\n // function name for that? Unfortunately, no, as the class name may get mangled if the file gets minified.\n const marker = Symbol.for(`__nexus_is${markerName}`);\n Object.defineProperty(clazz.prototype, \"name\", { value: markerName, enumerable: true });\n Object.defineProperty(clazz.prototype, marker, { value: true, enumerable: false });\n Object.defineProperty(clazz, Symbol.hasInstance, {\n value: function (value) {\n if (this === clazz) {\n return typeof value === \"object\" && value !== null && value[marker] === true;\n }\n else {\n // 'this' must be a _subclass_ of clazz that doesn't redefined [Symbol.hasInstance], so that it inherited\n // from clazz's [Symbol.hasInstance]. If we don't handle this particular situation, then\n // `x instanceof SubclassOfParent` would return true for any instance of 'Parent', which is clearly wrong.\n //\n // Ideally, it'd be preferable to avoid this case entirely, by making sure that all subclasses of 'clazz'\n // redefine [Symbol.hasInstance], but we can't enforce that. We therefore fallback to the default instanceof\n // behavior (which is NOT cross-realm safe).\n return this.prototype.isPrototypeOf(value); // eslint-disable-line no-prototype-builtins\n }\n },\n });\n}\n//# sourceMappingURL=symbol-instanceof.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandlerErrorType = exports.HandlerError = void 0;\nconst symbol_instanceof_1 = require(\"../internal/symbol-instanceof\");\n/**\n * A Nexus handler error.\n *\n * This error class represents an error that occurred during the handling of a\n * Nexus operation that should be reported to the caller as a handler error.\n *\n * Example:\n *\n * ```ts\n * import { HandlerError } from \"nexus-rpc\";\n *\n * // Throw a bad request error\n * throw new HandlerError(\"BAD_REQUEST\", \"Invalid input provided\");\n *\n * // Throw a bad request error, with a cause\n * throw new HandlerError(\"BAD_REQUEST\", \"Invalid input provided\", { cause });\n *\n * // Throw a retryable internal error\n * throw new HandlerError(\"INTERNAL\", \"Database unavailable\", { retryableOverride: true });\n *\n * ```\n *\n * @experimental\n */\nclass HandlerError extends Error {\n /**\n * One of the predefined error types.\n *\n * If the constructor received an unknown string, this will be `\"UNKNOWN\"`.\n * Use {@link rawErrorType} to access the original string.\n *\n * @see {@link HandlerErrorType}\n */\n type;\n /**\n * The raw error type string.\n *\n * For known types, this equals {@link type}. For unknown types, this preserves\n * the original wire string while {@link type} is set to `\"UNKNOWN\"`.\n */\n rawErrorType;\n /**\n * Whether this error should be considered retryable.\n *\n * By default, the retry behavior is determined from the error type.\n * For example, by default, `INTERNAL` is retryable, but `UNAVAILABLE` is non-retryable.\n *\n * If specified, `retryableOverride` overrides the default retry behavior determined based on\n * the error type. Use {@link retryable} to determine the effective retry behavior.\n *\n * @see {@link retryable}.\n */\n retryableOverride;\n /**\n * Set if this error was constructed from a {@link Failure} object.\n *\n * Preserves the original failure for round-tripping through the wire format.\n */\n originalFailure;\n /**\n * Constructs a new {@link HandlerError}.\n *\n * @param type - The type of the error. Must be a known {@link HandlerErrorType}.\n * @param message - The message of the error.\n * @param options - Extra options for the error, including the cause and retryable override.\n *\n * @experimental\n */\n constructor(type, message, options) {\n const actualMessage = message || `Handler error: ${type}`;\n super(actualMessage, { cause: options?.cause });\n if (!Object.hasOwn(exports.HandlerErrorType, type)) {\n throw new TypeError(`Invalid HandlerErrorType: ${type}`);\n }\n this.type = type;\n this.rawErrorType = type === \"UNKNOWN\" ? (options?.rawErrorType ?? type) : type;\n this.retryableOverride = options?.retryableOverride;\n this.originalFailure = options?.originalFailure;\n if (options?.stackTrace !== undefined) {\n this.stack = options.stackTrace;\n }\n }\n /**\n * Whether this error is retryable.\n *\n * This differs from the {@link retryableOverride} property in that `retryable` takes into\n * account the default behavior resulting from the error type, if no override is provided.\n *\n * @see {@link retryableOverride}.\n */\n get retryable() {\n if (typeof this.retryableOverride === \"boolean\")\n return this.retryableOverride;\n switch (this.type) {\n case \"BAD_REQUEST\":\n case \"UNAUTHENTICATED\":\n case \"UNAUTHORIZED\":\n case \"NOT_FOUND\":\n case \"NOT_IMPLEMENTED\":\n case \"CONFLICT\":\n return false;\n case \"UNAVAILABLE\":\n case \"UPSTREAM_TIMEOUT\":\n case \"RESOURCE_EXHAUSTED\":\n case \"INTERNAL\":\n case \"REQUEST_TIMEOUT\":\n case \"UNKNOWN\":\n return true;\n default: {\n // Force a compile time error if missing a case\n const _noMissingCase = this.type;\n return true;\n }\n }\n }\n}\nexports.HandlerError = HandlerError;\n(0, symbol_instanceof_1.injectSymbolBasedInstanceOf)(HandlerError, \"HandlerError\");\nexports.HandlerErrorType = {\n /**\n * The error type is unknown.\n *\n * Subsequent requests by the client are permissible.\n */\n UNKNOWN: \"UNKNOWN\",\n /**\n * The handler cannot or will not process the request due to an apparent client error.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n BAD_REQUEST: \"BAD_REQUEST\",\n /**\n * The client did not supply valid authentication credentials for this request.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n UNAUTHENTICATED: \"UNAUTHENTICATED\",\n /**\n * The caller does not have permission to execute the specified operation.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n UNAUTHORIZED: \"UNAUTHORIZED\",\n /**\n * The requested resource could not be found but may be available in the future.\n */\n NOT_FOUND: \"NOT_FOUND\",\n /**\n * Returned by the server when it has given up handling a request. This may occur by enforcing\n * a client provided `Request-Timeout` or for any arbitrary reason such as enforcing some\n * configurable limit.\n *\n * Subsequent requests by the client are permissible.\n */\n REQUEST_TIMEOUT: \"REQUEST_TIMEOUT\",\n /**\n * The request could not be made due to a conflict. This may happen when trying to create an\n * operation that has already been started.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n CONFLICT: \"CONFLICT\",\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system\n * is out of space.\n *\n * Subsequent requests by the client are permissible.\n */\n RESOURCE_EXHAUSTED: \"RESOURCE_EXHAUSTED\",\n /**\n * An internal error occurred.\n *\n * Subsequent requests by the client are permissible.\n */\n INTERNAL: \"INTERNAL\",\n /**\n * The server either does not recognize the request method, or it lacks the ability to fulfill the\n * request. Clients should not retry this request unless advised otherwise.\n */\n NOT_IMPLEMENTED: \"NOT_IMPLEMENTED\",\n /**\n * The service is currently unavailable.\n *\n * Subsequent requests by the client are permissible.\n */\n UNAVAILABLE: \"UNAVAILABLE\",\n /**\n * Used by gateways to report that a request to an upstream server has timed out.\n *\n * Subsequent requests by the client are permissible.\n */\n UPSTREAM_TIMEOUT: \"UPSTREAM_TIMEOUT\",\n};\n//# sourceMappingURL=handler-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationError = void 0;\nconst symbol_instanceof_1 = require(\"../internal/symbol-instanceof\");\n/**\n * A Nexus operation error.\n *\n * This error class represents the abnormal completion of a Nexus operation,\n * that should be reported to the caller as an operation error.\n *\n * Example:\n *\n * ```ts\n * import { OperationError } from \"nexus-rpc\";\n *\n * // Throw a failed operation error\n * throw new OperationError(\"failed\", \"Not enough inventory\");\n *\n * // Throw a failed operation error, with a cause\n * throw new OperationError(\"failed\", \"Not enough inventory\", { cause });\n *\n * // Throw a canceled operation error\n * throw new OperationError(\"canceled\", \"User canceled the operation\");\n * ```\n *\n * @experimental\n */\nclass OperationError extends Error {\n /**\n * State of the operation.\n */\n state;\n /**\n * Set if this error was constructed from a {@link Failure} object.\n *\n * Preserves the original failure for round-tripping through the wire format.\n */\n originalFailure;\n /**\n * Constructs a new {@link OperationError}.\n *\n * @param state - The state of the operation.\n * @param message - The message of the error.\n * @param options - Extra options for the error, e.g. the cause.\n *\n * @experimental\n */\n constructor(state, message, options) {\n const defaultMessage = state === \"canceled\" ? `Operation canceled` : `Operation failed`;\n const actualMessage = message || defaultMessage;\n super(actualMessage, { cause: options?.cause });\n this.state = state;\n this.originalFailure = options?.originalFailure;\n if (options?.stackTrace !== undefined) {\n this.stack = options.stackTrace;\n }\n }\n}\nexports.OperationError = OperationError;\n(0, symbol_instanceof_1.injectSymbolBasedInstanceOf)(OperationError, \"OperationError\");\n//# sourceMappingURL=operation-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationError = exports.HandlerErrorType = exports.HandlerError = void 0;\nvar handler_error_1 = require(\"./handler-error\");\nObject.defineProperty(exports, \"HandlerError\", { enumerable: true, get: function () { return handler_error_1.HandlerError; } });\nObject.defineProperty(exports, \"HandlerErrorType\", { enumerable: true, get: function () { return handler_error_1.HandlerErrorType; } });\nvar operation_error_1 = require(\"./operation-error\");\nObject.defineProperty(exports, \"OperationError\", { enumerable: true, get: function () { return operation_error_1.OperationError; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapKeyValues = mapKeyValues;\n/**\n * Creates a new object by mapping all string properties (keys and values) of an existing object\n * through a mapper function.\n *\n * @param obj - The source object, whose properties will be mapped.\n * @param fn - The mapper function.\n *\n * @returns A new object with the properties mapped to the new type.\n *\n * @internal\n * @hidden\n */\nfunction mapKeyValues(obj, fn) {\n return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(key, value)]));\n}\n//# sourceMappingURL=object-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateServiceDefinition = validateServiceDefinition;\n/**\n * Confirm that a service definition is valid.\n *\n * @param service - The service definition to validate.\n *\n * @throws {TypeError} If the service definition is invalid.\n *\n * @experimental\n */\nfunction validateServiceDefinition(service) {\n if (typeof service.name !== \"string\" || !service.name) {\n throw new TypeError(\"Service name must be a non-empty string\");\n }\n const operationNames = new Set();\n for (const [propName, operation] of Object.entries(service.operations)) {\n const operationName = operation.name;\n if (typeof operationName !== \"string\" || !operationName) {\n throw new TypeError(`Operation name must be a non-empty string, for property '${propName}'`);\n }\n if (operationNames.has(operationName)) {\n throw new TypeError(`Duplicate operation definition for name: '${operationName}'`);\n }\n operationNames.add(operationName);\n }\n}\n//# sourceMappingURL=service-definition.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.service = service;\nexports.operation = operation;\nconst object_utils_1 = require(\"../internal/object-utils\");\nconst service_definition_1 = require(\"./service-definition\");\n/**\n * Construct a service definition for a collection of operations.\n *\n * @experimental\n */\nfunction service(name, operations) {\n const service = {\n name,\n operations: (0, object_utils_1.mapKeyValues)(operations, (key, op) => ({\n ...op,\n name: op.name || key,\n })),\n };\n (0, service_definition_1.validateServiceDefinition)(service);\n return service;\n}\n/**\n * Construct an operation definition as part of a service contract.\n *\n * @experimental\n */\nfunction operation(op) {\n return { ...op };\n}\n//# sourceMappingURL=helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.operation = exports.service = void 0;\nvar helpers_1 = require(\"./helpers\");\nObject.defineProperty(exports, \"service\", { enumerable: true, get: function () { return helpers_1.service; } });\nObject.defineProperty(exports, \"operation\", { enumerable: true, get: function () { return helpers_1.operation; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/** @import { OperationHandler } from \"./operation-handler\" */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandlerStartOperationResult = void 0;\n/**\n * An internal symbol, used to prevent direct implementation of interfaces.\n *\n * @hidden\n * @internal\n */\nconst isHandlerStartOperationResultSymbol = Symbol(\"__nexus_isHandlerStartOperationResult\");\n/**\n * The return type from the {@link OperationHandler.start} method.\n *\n * Use either {@link HandlerStartOperationResult.sync} or {@link HandlerStartOperationResult.async}\n * to create a result object. Do not implement this interface directly.\n *\n * @experimental\n */\nexports.HandlerStartOperationResult = {\n /**\n * Create a result that indicates that an operation has been accepted and will complete asynchronously.\n */\n async(token) {\n return {\n isAsync: true,\n token,\n [isHandlerStartOperationResultSymbol]: true,\n };\n },\n /**\n * Create a result that indicates that an operation completed successfully.\n */\n sync(value) {\n return {\n isAsync: false,\n value,\n [isHandlerStartOperationResultSymbol]: true,\n };\n },\n [Symbol.hasInstance]: function (value) {\n return (typeof value === \"object\" &&\n value !== null &&\n value[isHandlerStartOperationResultSymbol] === true);\n },\n};\n//# sourceMappingURL=start-operation-result.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compileOperationHandler = compileOperationHandler;\nconst common_1 = require(\"../common\");\nconst start_operation_result_1 = require(\"./start-operation-result\");\n/**\n * Compiles an operation handler into a {@link CompiledOperationHandler}. A compiled operation\n * handler is a single object that is both an operation definition and a full-fledged operation\n * handler for that operation.\n *\n * @hidden\n * @internal\n */\nfunction compileOperationHandler(definition, handler) {\n if (handler == null) {\n throw new TypeError(`No handler registered for operation '${definition.name}' (expected property name '${definition.name}')`);\n }\n if (typeof handler === \"function\") {\n // Operation handler is declared using the shortcut syntax. Wrap it into a full-fledged handler.\n return {\n ...definition,\n start: async (ctx, input) => {\n return start_operation_result_1.HandlerStartOperationResult.sync(await handler(ctx, input));\n },\n cancel: notImplemented,\n };\n }\n if (typeof handler.start !== \"function\") {\n throw new TypeError(`Handler for operation '${definition.name}' has no start method`);\n }\n return {\n ...definition,\n // Defensively ensure that the handler has all the required methods,\n // defaulting to throwing a not implemented error if some methods are missing.\n start: handler.start.bind(handler),\n cancel: handler.cancel?.bind(handler) ?? notImplemented,\n };\n}\n/**\n * @internal\n * @hidden\n */\nfunction notImplemented() {\n throw new common_1.HandlerError(\"NOT_IMPLEMENTED\", \"Not implemented\");\n}\n//# sourceMappingURL=operation-handler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceHandler = void 0;\nexports.serviceHandler = serviceHandler;\nconst common_1 = require(\"../common\");\nconst operation_handler_1 = require(\"./operation-handler\");\n/**\n * A Nexus Service implementation, that provides handlers for each of its operations.\n *\n * @experimental\n */\nclass ServiceHandler {\n definition;\n handlers;\n operationsMap;\n /**\n * Build a `ServiceHandler` from a service definition and a collection of operation handlers.\n *\n * There must be an operation handler for every operation in the service definition.\n *\n * @param service The service definition\n * @param handlers The collection of handlers\n * @returns The compiled service handler\n *\n * @internal\n * @hidden\n */\n static build(service, handlers) {\n const operations = new Map();\n for (const [propName, definition] of Object.entries(service.operations)) {\n const compiledOpHandler = (0, operation_handler_1.compileOperationHandler)(definition, handlers[propName]);\n const operationName = compiledOpHandler.name;\n if (operations.has(operationName)) {\n throw new TypeError(`Operation with name '${operationName}' already registered for service '${service.name}'`);\n }\n operations.set(operationName, compiledOpHandler);\n }\n return new ServiceHandler(service, handlers, operations);\n }\n constructor(definition, handlers, operationsMap) {\n this.definition = definition;\n this.handlers = handlers;\n this.operationsMap = operationsMap;\n }\n /**\n * Returns the definition and handler for a given operation.\n *\n * @param operationName\n */\n getOperationHandler(operationName) {\n const entry = this.operationsMap.get(operationName);\n if (entry == null) {\n throw new common_1.HandlerError(\"NOT_FOUND\", `Operation handler not registered for operation '${operationName}' in service '${this.definition.name}'`);\n }\n return entry;\n }\n}\nexports.ServiceHandler = ServiceHandler;\n/**\n * Constructs a service handler for a given service contract.\n *\n * @experimental\n */\nfunction serviceHandler(service, handlers) {\n return ServiceHandler.build(service, handlers);\n}\n//# sourceMappingURL=service-handler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serviceHandler = exports.ServiceHandler = exports.HandlerStartOperationResult = void 0;\nvar start_operation_result_1 = require(\"./start-operation-result\");\nObject.defineProperty(exports, \"HandlerStartOperationResult\", { enumerable: true, get: function () { return start_operation_result_1.HandlerStartOperationResult; } });\nvar service_handler_1 = require(\"./service-handler\");\nObject.defineProperty(exports, \"ServiceHandler\", { enumerable: true, get: function () { return service_handler_1.ServiceHandler; } });\nObject.defineProperty(exports, \"serviceHandler\", { enumerable: true, get: function () { return service_handler_1.serviceHandler; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./common\"), exports);\n__exportStar(require(\"./service\"), exports);\n__exportStar(require(\"./handler\"), exports);\n//# sourceMappingURL=index.js.map","// GENERATED FILE. DO NOT EDIT.\n(function (global, factory) {\n function preferDefault(exports) {\n return exports.default || exports;\n }\n if (typeof define === \"function\" && define.amd) {\n define([], function () {\n var exports = {};\n factory(exports);\n return preferDefault(exports);\n });\n } else if (typeof exports === \"object\") {\n factory(exports);\n if (typeof module === \"object\") module.exports = preferDefault(exports);\n } else {\n (function () {\n var exports = {};\n factory(exports);\n global.Long = preferDefault(exports);\n })();\n }\n})(\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : this,\n function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true,\n });\n _exports.default = void 0;\n /**\n * @license\n * Copyright 2009 The Closure Library Authors\n * Copyright 2020 Daniel Wirtz / The long.js Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n // WebAssembly optimizations to do native i64 multiplication and divide\n var wasm = null;\n try {\n wasm = new WebAssembly.Instance(\n new WebAssembly.Module(\n new Uint8Array([\n // \\0asm\n 0, 97, 115, 109,\n // version 1\n 1, 0, 0, 0,\n // section \"type\"\n 1, 13, 2,\n // 0, () => i32\n 96, 0, 1, 127,\n // 1, (i32, i32, i32, i32) => i32\n 96, 4, 127, 127, 127, 127, 1, 127,\n // section \"function\"\n 3, 7, 6,\n // 0, type 0\n 0,\n // 1, type 1\n 1,\n // 2, type 1\n 1,\n // 3, type 1\n 1,\n // 4, type 1\n 1,\n // 5, type 1\n 1,\n // section \"global\"\n 6, 6, 1,\n // 0, \"high\", mutable i32\n 127, 1, 65, 0, 11,\n // section \"export\"\n 7, 50, 6,\n // 0, \"mul\"\n 3, 109, 117, 108, 0, 1,\n // 1, \"div_s\"\n 5, 100, 105, 118, 95, 115, 0, 2,\n // 2, \"div_u\"\n 5, 100, 105, 118, 95, 117, 0, 3,\n // 3, \"rem_s\"\n 5, 114, 101, 109, 95, 115, 0, 4,\n // 4, \"rem_u\"\n 5, 114, 101, 109, 95, 117, 0, 5,\n // 5, \"get_high\"\n 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,\n // section \"code\"\n 10, 191, 1, 6,\n // 0, \"get_high\"\n 4, 0, 35, 0, 11,\n // 1, \"mul\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 2, \"div_s\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 3, \"div_u\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 4, \"rem_s\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 5, \"rem_u\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n ]),\n ),\n {},\n ).exports;\n } catch {\n // no wasm support :(\n }\n\n /**\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\n * See the from* functions below for more convenient ways of constructing Longs.\n * @exports Long\n * @class A Long class for representing a 64 bit two's-complement integer value.\n * @param {number} low The low (signed) 32 bits of the long\n * @param {number} high The high (signed) 32 bits of the long\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @constructor\n */\n function Long(low, high, unsigned) {\n /**\n * The low 32 bits as a signed value.\n * @type {number}\n */\n this.low = low | 0;\n\n /**\n * The high 32 bits as a signed value.\n * @type {number}\n */\n this.high = high | 0;\n\n /**\n * Whether unsigned or not.\n * @type {boolean}\n */\n this.unsigned = !!unsigned;\n }\n\n // The internal representation of a long is the two given signed, 32-bit values.\n // We use 32-bit pieces because these are the size of integers on which\n // Javascript performs bit-operations. For operations like addition and\n // multiplication, we split each number into 16 bit pieces, which can easily be\n // multiplied within Javascript's floating-point representation without overflow\n // or change in sign.\n //\n // In the algorithms below, we frequently reduce the negative case to the\n // positive case by negating the input(s) and then post-processing the result.\n // Note that we must ALWAYS check specially whether those values are MIN_VALUE\n // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n // a positive number, it overflows back into a negative). Not handling this\n // case would often result in infinite recursion.\n //\n // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\n // methods on which they depend.\n\n /**\n * An indicator used to reliably determine if an object is a Long or not.\n * @type {boolean}\n * @const\n * @private\n */\n Long.prototype.__isLong__;\n Object.defineProperty(Long.prototype, \"__isLong__\", {\n value: true,\n });\n\n /**\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n * @inner\n */\n function isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n }\n\n /**\n * @function\n * @param {*} value number\n * @returns {number}\n * @inner\n */\n function ctz32(value) {\n var c = Math.clz32(value & -value);\n return value ? 31 - c : c;\n }\n\n /**\n * Tests if the specified object is a Long.\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n */\n Long.isLong = isLong;\n\n /**\n * A cache of the Long representations of small integer values.\n * @type {!Object}\n * @inner\n */\n var INT_CACHE = {};\n\n /**\n * A cache of the Long representations of small unsigned integer values.\n * @type {!Object}\n * @inner\n */\n var UINT_CACHE = {};\n\n /**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if ((cache = 0 <= value && value < 256)) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj) return cachedObj;\n }\n obj = fromBits(value, 0, true);\n if (cache) UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if ((cache = -128 <= value && value < 128)) {\n cachedObj = INT_CACHE[value];\n if (cachedObj) return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache) INT_CACHE[value] = obj;\n return obj;\n }\n }\n\n /**\n * Returns a Long representing the given 32 bit integer value.\n * @function\n * @param {number} value The 32 bit integer in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromInt = fromInt;\n\n /**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromNumber(value, unsigned) {\n if (isNaN(value)) return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0) return UZERO;\n if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;\n }\n if (value < 0) return fromNumber(-value, unsigned).neg();\n return fromBits(\n value % TWO_PWR_32_DBL | 0,\n (value / TWO_PWR_32_DBL) | 0,\n unsigned,\n );\n }\n\n /**\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\n * @function\n * @param {number} value The number in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromNumber = fromNumber;\n\n /**\n * @param {number} lowBits\n * @param {number} highBits\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromBits(lowBits, highBits, unsigned) {\n return new Long(lowBits, highBits, unsigned);\n }\n\n /**\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\n * assumed to use 32 bits.\n * @function\n * @param {number} lowBits The low 32 bits\n * @param {number} highBits The high 32 bits\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromBits = fromBits;\n\n /**\n * @function\n * @param {number} base\n * @param {number} exponent\n * @returns {number}\n * @inner\n */\n var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\n\n /**\n * @param {string} str\n * @param {(boolean|number)=} unsigned\n * @param {number=} radix\n * @returns {!Long}\n * @inner\n */\n function fromString(str, unsigned, radix) {\n if (str.length === 0) throw Error(\"empty string\");\n if (typeof unsigned === \"number\") {\n // For goog.math.long compatibility\n radix = unsigned;\n unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n if (\n str === \"NaN\" ||\n str === \"Infinity\" ||\n str === \"+Infinity\" ||\n str === \"-Infinity\"\n )\n return unsigned ? UZERO : ZERO;\n radix = radix || 10;\n if (radix < 2 || 36 < radix) throw RangeError(\"radix\");\n var p;\n if ((p = str.indexOf(\"-\")) > 0) throw Error(\"interior hyphen\");\n else if (p === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n\n // Do several (8) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i),\n value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n }\n\n /**\n * Returns a Long representation of the given string, written using the specified radix.\n * @function\n * @param {string} str The textual representation of the Long\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\n * @returns {!Long} The corresponding Long value\n */\n Long.fromString = fromString;\n\n /**\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromValue(val, unsigned) {\n if (typeof val === \"number\") return fromNumber(val, unsigned);\n if (typeof val === \"string\") return fromString(val, unsigned);\n // Throws for non-objects, converts non-instanceof Long:\n return fromBits(\n val.low,\n val.high,\n typeof unsigned === \"boolean\" ? unsigned : val.unsigned,\n );\n }\n\n /**\n * Converts the specified value to a Long using the appropriate from* function for its type.\n * @function\n * @param {!Long|number|bigint|string|!{low: number, high: number, unsigned: boolean}} val Value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long}\n */\n Long.fromValue = fromValue;\n\n // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\n // no runtime penalty for these.\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_16_DBL = 1 << 16;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_24_DBL = 1 << 24;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n\n /**\n * @type {!Long}\n * @const\n * @inner\n */\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n\n /**\n * @type {!Long}\n * @inner\n */\n var ZERO = fromInt(0);\n\n /**\n * Signed zero.\n * @type {!Long}\n */\n Long.ZERO = ZERO;\n\n /**\n * @type {!Long}\n * @inner\n */\n var UZERO = fromInt(0, true);\n\n /**\n * Unsigned zero.\n * @type {!Long}\n */\n Long.UZERO = UZERO;\n\n /**\n * @type {!Long}\n * @inner\n */\n var ONE = fromInt(1);\n\n /**\n * Signed one.\n * @type {!Long}\n */\n Long.ONE = ONE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var UONE = fromInt(1, true);\n\n /**\n * Unsigned one.\n * @type {!Long}\n */\n Long.UONE = UONE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var NEG_ONE = fromInt(-1);\n\n /**\n * Signed negative one.\n * @type {!Long}\n */\n Long.NEG_ONE = NEG_ONE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var MAX_VALUE = fromBits(0xffffffff | 0, 0x7fffffff | 0, false);\n\n /**\n * Maximum signed value.\n * @type {!Long}\n */\n Long.MAX_VALUE = MAX_VALUE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var MAX_UNSIGNED_VALUE = fromBits(0xffffffff | 0, 0xffffffff | 0, true);\n\n /**\n * Maximum unsigned value.\n * @type {!Long}\n */\n Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var MIN_VALUE = fromBits(0, 0x80000000 | 0, false);\n\n /**\n * Minimum signed value.\n * @type {!Long}\n */\n Long.MIN_VALUE = MIN_VALUE;\n\n /**\n * @alias Long.prototype\n * @inner\n */\n var LongPrototype = Long.prototype;\n\n /**\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\n * @this {!Long}\n * @returns {number}\n */\n LongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n };\n\n /**\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\n * @this {!Long}\n * @returns {number}\n */\n LongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n };\n\n /**\n * Converts the Long to a string written in the specified radix.\n * @this {!Long}\n * @param {number=} radix Radix (2-36), defaults to 10\n * @returns {string}\n * @override\n * @throws {RangeError} If `radix` is out of range\n */\n LongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix) throw RangeError(\"radix\");\n if (this.isZero()) return \"0\";\n if (this.isNegative()) {\n // Unsigned Longs are never negative\n if (this.eq(MIN_VALUE)) {\n // We need to change the Long value before it can be negated, so we remove\n // the bottom-most digit in this base and then recurse to do the rest.\n var radixLong = fromNumber(radix),\n div = this.div(radixLong),\n rem1 = div.mul(radixLong).sub(this);\n return div.toString(radix) + rem1.toInt().toString(radix);\n } else return \"-\" + this.neg().toString(radix);\n }\n\n // Do several (6) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\n rem = this;\n var result = \"\";\n while (true) {\n var remDiv = rem.div(radixToPower),\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\n digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero()) return digits + result;\n else {\n while (digits.length < 6) digits = \"0\" + digits;\n result = \"\" + digits + result;\n }\n }\n };\n\n /**\n * Gets the high 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed high bits\n */\n LongPrototype.getHighBits = function getHighBits() {\n return this.high;\n };\n\n /**\n * Gets the high 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned high bits\n */\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n };\n\n /**\n * Gets the low 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed low bits\n */\n LongPrototype.getLowBits = function getLowBits() {\n return this.low;\n };\n\n /**\n * Gets the low 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned low bits\n */\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n };\n\n /**\n * Gets the number of bits needed to represent the absolute value of this Long.\n * @this {!Long}\n * @returns {number}\n */\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative())\n // Unsigned Longs are never negative\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--) if ((val & (1 << bit)) != 0) break;\n return this.high != 0 ? bit + 33 : bit + 1;\n };\n\n /**\n * Tests if this Long can be safely represented as a JavaScript number.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isSafeInteger = function isSafeInteger() {\n // 2^53-1 is the maximum safe value\n var top11Bits = this.high >> 21;\n // [0, 2^53-1]\n if (!top11Bits) return true;\n // > 2^53-1\n if (this.unsigned) return false;\n // [-2^53, -1] except -2^53\n return top11Bits === -1 && !(this.low === 0 && this.high === -0x200000);\n };\n\n /**\n * Tests if this Long's value equals zero.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n };\n\n /**\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\n * @returns {boolean}\n */\n LongPrototype.eqz = LongPrototype.isZero;\n\n /**\n * Tests if this Long's value is negative.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n };\n\n /**\n * Tests if this Long's value is positive or zero.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n };\n\n /**\n * Tests if this Long's value is odd.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n };\n\n /**\n * Tests if this Long's value is even.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isEven = function isEven() {\n return (this.low & 1) === 0;\n };\n\n /**\n * Tests if this Long's value equals the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.equals = function equals(other) {\n if (!isLong(other)) other = fromValue(other);\n if (\n this.unsigned !== other.unsigned &&\n this.high >>> 31 === 1 &&\n other.high >>> 31 === 1\n )\n return false;\n return this.high === other.high && this.low === other.low;\n };\n\n /**\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.eq = LongPrototype.equals;\n\n /**\n * Tests if this Long's value differs from the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.notEquals = function notEquals(other) {\n return !this.eq(/* validates */ other);\n };\n\n /**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.neq = LongPrototype.notEquals;\n\n /**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.ne = LongPrototype.notEquals;\n\n /**\n * Tests if this Long's value is less than the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lessThan = function lessThan(other) {\n return this.comp(/* validates */ other) < 0;\n };\n\n /**\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lt = LongPrototype.lessThan;\n\n /**\n * Tests if this Long's value is less than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(/* validates */ other) <= 0;\n };\n\n /**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\n\n /**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.le = LongPrototype.lessThanOrEqual;\n\n /**\n * Tests if this Long's value is greater than the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(/* validates */ other) > 0;\n };\n\n /**\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.gt = LongPrototype.greaterThan;\n\n /**\n * Tests if this Long's value is greater than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(/* validates */ other) >= 0;\n };\n\n /**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\n\n /**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.ge = LongPrototype.greaterThanOrEqual;\n\n /**\n * Compares this Long's value with the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\n LongPrototype.compare = function compare(other) {\n if (!isLong(other)) other = fromValue(other);\n if (this.eq(other)) return 0;\n var thisNeg = this.isNegative(),\n otherNeg = other.isNegative();\n if (thisNeg && !otherNeg) return -1;\n if (!thisNeg && otherNeg) return 1;\n // At this point the sign bits are the same\n if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;\n // Both are positive if at least one is unsigned\n return other.high >>> 0 > this.high >>> 0 ||\n (other.high === this.high && other.low >>> 0 > this.low >>> 0)\n ? -1\n : 1;\n };\n\n /**\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\n LongPrototype.comp = LongPrototype.compare;\n\n /**\n * Negates this Long's value.\n * @this {!Long}\n * @returns {!Long} Negated Long\n */\n LongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;\n return this.not().add(ONE);\n };\n\n /**\n * Negates this Long's value. This is an alias of {@link Long#negate}.\n * @function\n * @returns {!Long} Negated Long\n */\n LongPrototype.neg = LongPrototype.negate;\n\n /**\n * Returns the sum of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|bigint|string} addend Addend\n * @returns {!Long} Sum\n */\n LongPrototype.add = function add(addend) {\n if (!isLong(addend)) addend = fromValue(addend);\n\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xffff;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xffff;\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 0xffff;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 0xffff;\n var c48 = 0,\n c32 = 0,\n c16 = 0,\n c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xffff;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c48 += a48 + b48;\n c48 &= 0xffff;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n };\n\n /**\n * Returns the difference of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|bigint|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\n LongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n };\n\n /**\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\n * @function\n * @param {!Long|number|bigint|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\n LongPrototype.sub = LongPrototype.subtract;\n\n /**\n * Returns the product of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|bigint|string} multiplier Multiplier\n * @returns {!Long} Product\n */\n LongPrototype.multiply = function multiply(multiplier) {\n if (this.isZero()) return this;\n if (!isLong(multiplier)) multiplier = fromValue(multiplier);\n\n // use wasm support if present\n if (wasm) {\n var low = wasm[\"mul\"](\n this.low,\n this.high,\n multiplier.low,\n multiplier.high,\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;\n if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;\n if (this.isNegative()) {\n if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());\n else return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n\n // If both longs are small, use float multiplication\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(\n this.toNumber() * multiplier.toNumber(),\n this.unsigned,\n );\n\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n // We can skip products that would overflow.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xffff;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xffff;\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 0xffff;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 0xffff;\n var c48 = 0,\n c32 = 0,\n c16 = 0,\n c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 0xffff;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 0xffff;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n };\n\n /**\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\n * @function\n * @param {!Long|number|bigint|string} multiplier Multiplier\n * @returns {!Long} Product\n */\n LongPrototype.mul = LongPrototype.multiply;\n\n /**\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\n * unsigned if this Long is unsigned.\n * @this {!Long}\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Quotient\n */\n LongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor)) divisor = fromValue(divisor);\n if (divisor.isZero()) throw Error(\"division by zero\");\n\n // use wasm support if present\n if (wasm) {\n // guard against signed division overflow: the largest\n // negative number / -1 would be 1 larger than the largest\n // positive number, due to two's complement.\n if (\n !this.unsigned &&\n this.high === -0x80000000 &&\n divisor.low === -1 &&\n divisor.high === -1\n ) {\n // be consistent with non-wasm code path\n return this;\n }\n var low = (this.unsigned ? wasm[\"div_u\"] : wasm[\"div_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high,\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n if (this.isZero()) return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n // This section is only relevant for signed longs and is derived from the\n // closure library as a whole.\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\n else if (divisor.eq(MIN_VALUE)) return ONE;\n else {\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative()) return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n // The algorithm below has not been made for unsigned longs. It's therefore\n // required to take special care of the MSB prior to running it.\n if (!divisor.unsigned) divisor = divisor.toUnsigned();\n if (divisor.gt(this)) return UZERO;\n if (divisor.gt(this.shru(1)))\n // 15 >>> 1 = 7 ; with divisor = 8 ; true\n return UONE;\n res = UZERO;\n }\n\n // Repeat the following until the remainder is less than other: find a\n // floating-point that approximates remainder / other *from below*, add this\n // into the result, and subtract it from the remainder. It is critical that\n // the approximate value is less than or equal to the real value so that the\n // remainder never becomes negative.\n rem = this;\n while (rem.gte(divisor)) {\n // Approximate the result of division. This may be a little greater or\n // smaller than the actual value.\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n\n // We will tweak the approximate result by changing it in the 48-th digit or\n // the smallest non-fractional digit, whichever is larger.\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\n delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48),\n // Decrease the approximation until it is smaller than the remainder. Note\n // that if it is too large, the product overflows and is negative.\n approxRes = fromNumber(approx),\n approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n\n // We know the answer can't be zero... and actually, zero would cause\n // infinite recursion since we would make no progress.\n if (approxRes.isZero()) approxRes = ONE;\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n };\n\n /**\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\n * @function\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Quotient\n */\n LongPrototype.div = LongPrototype.divide;\n\n /**\n * Returns this Long modulo the specified.\n * @this {!Long}\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n LongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor)) divisor = fromValue(divisor);\n\n // use wasm support if present\n if (wasm) {\n var low = (this.unsigned ? wasm[\"rem_u\"] : wasm[\"rem_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high,\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n return this.sub(this.div(divisor).mul(divisor));\n };\n\n /**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n LongPrototype.mod = LongPrototype.modulo;\n\n /**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n LongPrototype.rem = LongPrototype.modulo;\n\n /**\n * Returns the bitwise NOT of this Long.\n * @this {!Long}\n * @returns {!Long}\n */\n LongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n };\n\n /**\n * Returns count leading zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\n LongPrototype.countLeadingZeros = function countLeadingZeros() {\n return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;\n };\n\n /**\n * Returns count leading zeros. This is an alias of {@link Long#countLeadingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\n LongPrototype.clz = LongPrototype.countLeadingZeros;\n\n /**\n * Returns count trailing zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\n LongPrototype.countTrailingZeros = function countTrailingZeros() {\n return this.low ? ctz32(this.low) : ctz32(this.high) + 32;\n };\n\n /**\n * Returns count trailing zeros. This is an alias of {@link Long#countTrailingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\n LongPrototype.ctz = LongPrototype.countTrailingZeros;\n\n /**\n * Returns the bitwise AND of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other Long\n * @returns {!Long}\n */\n LongPrototype.and = function and(other) {\n if (!isLong(other)) other = fromValue(other);\n return fromBits(\n this.low & other.low,\n this.high & other.high,\n this.unsigned,\n );\n };\n\n /**\n * Returns the bitwise OR of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other Long\n * @returns {!Long}\n */\n LongPrototype.or = function or(other) {\n if (!isLong(other)) other = fromValue(other);\n return fromBits(\n this.low | other.low,\n this.high | other.high,\n this.unsigned,\n );\n };\n\n /**\n * Returns the bitwise XOR of this Long and the given one.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other Long\n * @returns {!Long}\n */\n LongPrototype.xor = function xor(other) {\n if (!isLong(other)) other = fromValue(other);\n return fromBits(\n this.low ^ other.low,\n this.high ^ other.high,\n this.unsigned,\n );\n };\n\n /**\n * Returns this Long with bits shifted to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n else if (numBits < 32)\n return fromBits(\n this.low << numBits,\n (this.high << numBits) | (this.low >>> (32 - numBits)),\n this.unsigned,\n );\n else return fromBits(0, this.low << (numBits - 32), this.unsigned);\n };\n\n /**\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shl = LongPrototype.shiftLeft;\n\n /**\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n else if (numBits < 32)\n return fromBits(\n (this.low >>> numBits) | (this.high << (32 - numBits)),\n this.high >> numBits,\n this.unsigned,\n );\n else\n return fromBits(\n this.high >> (numBits - 32),\n this.high >= 0 ? 0 : -1,\n this.unsigned,\n );\n };\n\n /**\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shr = LongPrototype.shiftRight;\n\n /**\n * Returns this Long with bits logically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits < 32)\n return fromBits(\n (this.low >>> numBits) | (this.high << (32 - numBits)),\n this.high >>> numBits,\n this.unsigned,\n );\n if (numBits === 32) return fromBits(this.high, 0, this.unsigned);\n return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);\n };\n\n /**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\n\n /**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n\n /**\n * Returns this Long with bits rotated to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotateLeft = function rotateLeft(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = 32 - numBits;\n return fromBits(\n (this.low << numBits) | (this.high >>> b),\n (this.high << numBits) | (this.low >>> b),\n this.unsigned,\n );\n }\n numBits -= 32;\n b = 32 - numBits;\n return fromBits(\n (this.high << numBits) | (this.low >>> b),\n (this.low << numBits) | (this.high >>> b),\n this.unsigned,\n );\n };\n /**\n * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotl = LongPrototype.rotateLeft;\n\n /**\n * Returns this Long with bits rotated to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotateRight = function rotateRight(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = 32 - numBits;\n return fromBits(\n (this.high << b) | (this.low >>> numBits),\n (this.low << b) | (this.high >>> numBits),\n this.unsigned,\n );\n }\n numBits -= 32;\n b = 32 - numBits;\n return fromBits(\n (this.low << b) | (this.high >>> numBits),\n (this.high << b) | (this.low >>> numBits),\n this.unsigned,\n );\n };\n /**\n * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotr = LongPrototype.rotateRight;\n\n /**\n * Converts this Long to signed.\n * @this {!Long}\n * @returns {!Long} Signed long\n */\n LongPrototype.toSigned = function toSigned() {\n if (!this.unsigned) return this;\n return fromBits(this.low, this.high, false);\n };\n\n /**\n * Converts this Long to unsigned.\n * @this {!Long}\n * @returns {!Long} Unsigned long\n */\n LongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned) return this;\n return fromBits(this.low, this.high, true);\n };\n\n /**\n * Converts this Long to its byte representation.\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @this {!Long}\n * @returns {!Array.<number>} Byte representation\n */\n LongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n };\n\n /**\n * Converts this Long to its little endian byte representation.\n * @this {!Long}\n * @returns {!Array.<number>} Little endian byte representation\n */\n LongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high,\n lo = this.low;\n return [\n lo & 0xff,\n (lo >>> 8) & 0xff,\n (lo >>> 16) & 0xff,\n lo >>> 24,\n hi & 0xff,\n (hi >>> 8) & 0xff,\n (hi >>> 16) & 0xff,\n hi >>> 24,\n ];\n };\n\n /**\n * Converts this Long to its big endian byte representation.\n * @this {!Long}\n * @returns {!Array.<number>} Big endian byte representation\n */\n LongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high,\n lo = this.low;\n return [\n hi >>> 24,\n (hi >>> 16) & 0xff,\n (hi >>> 8) & 0xff,\n hi & 0xff,\n lo >>> 24,\n (lo >>> 16) & 0xff,\n (lo >>> 8) & 0xff,\n lo & 0xff,\n ];\n };\n\n /**\n * Creates a Long from its byte representation.\n * @param {!Array.<number>} bytes Byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @returns {Long} The corresponding Long value\n */\n Long.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le\n ? Long.fromBytesLE(bytes, unsigned)\n : Long.fromBytesBE(bytes, unsigned);\n };\n\n /**\n * Creates a Long from its little endian byte representation.\n * @param {!Array.<number>} bytes Little endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\n Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long(\n bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24),\n bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24),\n unsigned,\n );\n };\n\n /**\n * Creates a Long from its big endian byte representation.\n * @param {!Array.<number>} bytes Big endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\n Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long(\n (bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7],\n (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3],\n unsigned,\n );\n };\n\n // Support conversion to/from BigInt where available\n if (typeof BigInt === \"function\") {\n /**\n * Returns a Long representing the given big integer.\n * @function\n * @param {number} value The big integer value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromBigInt = function fromBigInt(value, unsigned) {\n var lowBits = Number(BigInt.asIntN(32, value));\n var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));\n return fromBits(lowBits, highBits, unsigned);\n };\n\n // Override\n Long.fromValue = function fromValueWithBigInt(value, unsigned) {\n if (typeof value === \"bigint\") return Long.fromBigInt(value, unsigned);\n return fromValue(value, unsigned);\n };\n\n /**\n * Converts the Long to its big integer representation.\n * @this {!Long}\n * @returns {bigint}\n */\n LongPrototype.toBigInt = function toBigInt() {\n var lowBigInt = BigInt(this.low >>> 0);\n var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);\n return (highBigInt << BigInt(32)) | lowBigInt;\n };\n }\n var _default = (_exports.default = Long);\n },\n);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar _a, _b, _c;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkflowExecutionAlreadyStartedError = exports.NexusOperationFailure = exports.ChildWorkflowFailure = exports.ActivityFailure = exports.TimeoutFailure = exports.TerminatedFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ServerFailure = exports.TemporalFailure = exports.decodeApplicationFailureCategory = exports.encodeApplicationFailureCategory = exports.ApplicationFailureCategory = exports.decodeRetryState = exports.encodeRetryState = exports.RetryState = exports.decodeTimeoutType = exports.encodeTimeoutType = exports.TimeoutType = exports.FAILURE_SOURCE = void 0;\nexports.ensureApplicationFailure = ensureApplicationFailure;\nexports.ensureTemporalFailure = ensureTemporalFailure;\nexports.rootCause = rootCause;\nconst type_helpers_1 = require(\"./type-helpers\");\nconst internal_workflow_1 = require(\"./internal-workflow\");\nexports.FAILURE_SOURCE = 'TypeScriptSDK';\nexports.TimeoutType = {\n START_TO_CLOSE: 'START_TO_CLOSE',\n SCHEDULE_TO_START: 'SCHEDULE_TO_START',\n SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE',\n HEARTBEAT: 'HEARTBEAT',\n /** @deprecated Use {@link START_TO_CLOSE} instead. */\n TIMEOUT_TYPE_START_TO_CLOSE: 'START_TO_CLOSE',\n /** @deprecated Use {@link SCHEDULE_TO_START} instead. */\n TIMEOUT_TYPE_SCHEDULE_TO_START: 'SCHEDULE_TO_START',\n /** @deprecated Use {@link SCHEDULE_TO_CLOSE} instead. */\n TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE',\n /** @deprecated Use {@link HEARTBEAT} instead. */\n TIMEOUT_TYPE_HEARTBEAT: 'HEARTBEAT',\n /** @deprecated Use `undefined` instead. */\n TIMEOUT_TYPE_UNSPECIFIED: undefined,\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.TimeoutType.START_TO_CLOSE]: 1,\n [exports.TimeoutType.SCHEDULE_TO_START]: 2,\n [exports.TimeoutType.SCHEDULE_TO_CLOSE]: 3,\n [exports.TimeoutType.HEARTBEAT]: 4,\n UNSPECIFIED: 0,\n}, 'TIMEOUT_TYPE_'), exports.encodeTimeoutType = _a[0], exports.decodeTimeoutType = _a[1];\nexports.RetryState = {\n IN_PROGRESS: 'IN_PROGRESS',\n NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE',\n TIMEOUT: 'TIMEOUT',\n MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED',\n RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET',\n INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',\n CANCEL_REQUESTED: 'CANCEL_REQUESTED',\n /** @deprecated Use {@link IN_PROGRESS} instead. */\n RETRY_STATE_IN_PROGRESS: 'IN_PROGRESS',\n /** @deprecated Use {@link NON_RETRYABLE_FAILURE} instead. */\n RETRY_STATE_NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE',\n /** @deprecated Use {@link TIMEOUT} instead. */\n RETRY_STATE_TIMEOUT: 'TIMEOUT',\n /** @deprecated Use {@link MAXIMUM_ATTEMPTS_REACHED} instead. */\n RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED',\n /** @deprecated Use {@link RETRY_POLICY_NOT_SET} instead. */\n RETRY_STATE_RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET',\n /** @deprecated Use {@link INTERNAL_SERVER_ERROR} instead. */\n RETRY_STATE_INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',\n /** @deprecated Use {@link CANCEL_REQUESTED} instead. */\n RETRY_STATE_CANCEL_REQUESTED: 'CANCEL_REQUESTED',\n /** @deprecated Use `undefined` instead. */\n RETRY_STATE_UNSPECIFIED: undefined,\n};\n_b = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.RetryState.IN_PROGRESS]: 1,\n [exports.RetryState.NON_RETRYABLE_FAILURE]: 2,\n [exports.RetryState.TIMEOUT]: 3,\n [exports.RetryState.MAXIMUM_ATTEMPTS_REACHED]: 4,\n [exports.RetryState.RETRY_POLICY_NOT_SET]: 5,\n [exports.RetryState.INTERNAL_SERVER_ERROR]: 6,\n [exports.RetryState.CANCEL_REQUESTED]: 7,\n UNSPECIFIED: 0,\n}, 'RETRY_STATE_'), exports.encodeRetryState = _b[0], exports.decodeRetryState = _b[1];\n/**\n * A category to describe the severity and change the observability behavior of an application failure.\n *\n * Currently, observability behavior changes are limited to:\n * - activities that fail due to a BENIGN application failure emit DEBUG level logs and do not record metrics\n *\n * @experimental Category is a new feature and may be subject to change.\n */\nexports.ApplicationFailureCategory = {\n BENIGN: 'BENIGN',\n};\n_c = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.ApplicationFailureCategory.BENIGN]: 1,\n UNSPECIFIED: 0,\n}, 'APPLICATION_ERROR_CATEGORY_'), exports.encodeApplicationFailureCategory = _c[0], exports.decodeApplicationFailureCategory = _c[1];\n/**\n * Represents failures that can cross Workflow and Activity boundaries.\n *\n * **Never extend this class or any of its children.**\n *\n * The only child class you should ever throw from your code is {@link ApplicationFailure}.\n */\nlet TemporalFailure = class TemporalFailure extends Error {\n cause;\n /**\n * The original failure that constructed this error.\n *\n * Only present if this error was generated from an external operation.\n */\n failure;\n constructor(message, cause) {\n super(message ?? undefined);\n this.cause = cause;\n }\n};\nexports.TemporalFailure = TemporalFailure;\nexports.TemporalFailure = TemporalFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('TemporalFailure')\n], TemporalFailure);\n/** Exceptions originated at the Temporal service. */\nlet ServerFailure = class ServerFailure extends TemporalFailure {\n nonRetryable;\n constructor(message, nonRetryable, cause) {\n super(message, cause);\n this.nonRetryable = nonRetryable;\n }\n};\nexports.ServerFailure = ServerFailure;\nexports.ServerFailure = ServerFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ServerFailure')\n], ServerFailure);\n/**\n * `ApplicationFailure`s are used to communicate application-specific failures in Workflows and Activities.\n *\n * The {@link type} property is matched against {@link RetryPolicy.nonRetryableErrorTypes} to determine if an instance\n * of this error is retryable. Another way to avoid retrying is by setting the {@link nonRetryable} flag to `true`.\n *\n * In Workflows, if you throw a non-`ApplicationFailure`, the Workflow Task will fail and be retried. If you throw an\n * `ApplicationFailure`, the Workflow Execution will fail.\n *\n * In Activities, you can either throw an `ApplicationFailure` or another `Error` to fail the Activity Task. In the\n * latter case, the `Error` will be converted to an `ApplicationFailure`. The conversion is done as following:\n *\n * - `type` is set to `error.constructor?.name ?? error.name`\n * - `message` is set to `error.message`\n * - `nonRetryable` is set to false\n * - `details` are set to null\n * - stack trace is copied from the original error\n *\n * When an {@link https://docs.temporal.io/activity-execution#activity-execution | Activity Execution} fails, the\n * `ApplicationFailure` from the last Activity Task will be the `cause` of the {@link ActivityFailure} thrown in the\n * Workflow.\n */\nlet ApplicationFailure = class ApplicationFailure extends TemporalFailure {\n type;\n nonRetryable;\n details;\n nextRetryDelay;\n category;\n /**\n * Alternatively, use {@link fromError} or {@link create}.\n */\n constructor(message, type, nonRetryable, details, cause, nextRetryDelay, category) {\n super(message, cause);\n this.type = type;\n this.nonRetryable = nonRetryable;\n this.details = details;\n this.nextRetryDelay = nextRetryDelay;\n this.category = category;\n }\n /**\n * Create a new `ApplicationFailure` from an Error object.\n *\n * First calls {@link ensureApplicationFailure | `ensureApplicationFailure(error)`} and then overrides any fields\n * provided in `overrides`.\n */\n static fromError(error, overrides) {\n const failure = ensureApplicationFailure(error);\n Object.assign(failure, overrides);\n return failure;\n }\n /**\n * Create a new `ApplicationFailure`.\n *\n * By default, will be retryable (unless its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}).\n */\n static create(options) {\n const { message, type, nonRetryable = false, details, nextRetryDelay, cause, category } = options;\n return new this(message, type, nonRetryable, details, cause, nextRetryDelay, category);\n }\n /**\n * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to false. Note that this error will still\n * not be retried if its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}.\n *\n * @param message Optional error message\n * @param type Optional error type (used by {@link RetryPolicy.nonRetryableErrorTypes})\n * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}.\n */\n static retryable(message, type, ...details) {\n return new this(message, type ?? 'Error', false, details);\n }\n /**\n * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to true.\n *\n * When thrown from an Activity or Workflow, the Activity or Workflow will not be retried (even if `type` is not\n * listed in {@link RetryPolicy.nonRetryableErrorTypes}).\n *\n * @param message Optional error message\n * @param type Optional error type\n * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}.\n */\n static nonRetryable(message, type, ...details) {\n return new this(message, type ?? 'Error', true, details);\n }\n};\nexports.ApplicationFailure = ApplicationFailure;\nexports.ApplicationFailure = ApplicationFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ApplicationFailure')\n], ApplicationFailure);\n/**\n * This error is thrown when Cancellation has been requested. To allow Cancellation to happen, let it propagate. To\n * ignore Cancellation, catch it and continue executing. Note that Cancellation can only be requested a single time, so\n * your Workflow/Activity Execution will not receive further Cancellation requests.\n *\n * When a Workflow or Activity has been successfully cancelled, a `CancelledFailure` will be the `cause`.\n */\nlet CancelledFailure = class CancelledFailure extends TemporalFailure {\n details;\n constructor(message, details = [], cause) {\n super(message, cause);\n this.details = details;\n }\n};\nexports.CancelledFailure = CancelledFailure;\nexports.CancelledFailure = CancelledFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('CancelledFailure')\n], CancelledFailure);\n/**\n * Used as the `cause` when a Workflow has been terminated\n */\nlet TerminatedFailure = class TerminatedFailure extends TemporalFailure {\n constructor(message, cause) {\n super(message, cause);\n }\n};\nexports.TerminatedFailure = TerminatedFailure;\nexports.TerminatedFailure = TerminatedFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('TerminatedFailure')\n], TerminatedFailure);\n/**\n * Used to represent timeouts of Activities and Workflows\n */\nlet TimeoutFailure = class TimeoutFailure extends TemporalFailure {\n lastHeartbeatDetails;\n timeoutType;\n constructor(message, lastHeartbeatDetails, timeoutType) {\n super(message);\n this.lastHeartbeatDetails = lastHeartbeatDetails;\n this.timeoutType = timeoutType;\n }\n};\nexports.TimeoutFailure = TimeoutFailure;\nexports.TimeoutFailure = TimeoutFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('TimeoutFailure')\n], TimeoutFailure);\n/**\n * Contains information about an Activity failure. Always contains the original reason for the failure as its `cause`.\n * For example, if an Activity timed out, the cause will be a {@link TimeoutFailure}.\n *\n * This exception is expected to be thrown only by the framework code.\n */\nlet ActivityFailure = class ActivityFailure extends TemporalFailure {\n activityType;\n activityId;\n retryState;\n identity;\n constructor(message, activityType, activityId, retryState, identity, cause) {\n super(message, cause);\n this.activityType = activityType;\n this.activityId = activityId;\n this.retryState = retryState;\n this.identity = identity;\n }\n};\nexports.ActivityFailure = ActivityFailure;\nexports.ActivityFailure = ActivityFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityFailure')\n], ActivityFailure);\n/**\n * Contains information about a Child Workflow failure. Always contains the reason for the failure as its {@link cause}.\n * For example, if the Child was Terminated, the `cause` is a {@link TerminatedFailure}.\n *\n * This exception is expected to be thrown only by the framework code.\n */\nlet ChildWorkflowFailure = class ChildWorkflowFailure extends TemporalFailure {\n namespace;\n execution;\n workflowType;\n retryState;\n constructor(namespace, execution, workflowType, retryState, cause) {\n super('Child Workflow execution failed', cause);\n this.namespace = namespace;\n this.execution = execution;\n this.workflowType = workflowType;\n this.retryState = retryState;\n }\n};\nexports.ChildWorkflowFailure = ChildWorkflowFailure;\nexports.ChildWorkflowFailure = ChildWorkflowFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ChildWorkflowFailure')\n], ChildWorkflowFailure);\n/**\n * Thrown when a Nexus Operation executed inside a Workflow fails.\n *\n * @experimental Nexus support in Temporal SDK is experimental.\n */\nlet NexusOperationFailure = class NexusOperationFailure extends TemporalFailure {\n scheduledEventId;\n endpoint;\n service;\n operation;\n operationToken;\n constructor(message, scheduledEventId, endpoint, service, operation, operationToken, cause) {\n super(message, cause);\n this.scheduledEventId = scheduledEventId;\n this.endpoint = endpoint;\n this.service = service;\n this.operation = operation;\n this.operationToken = operationToken;\n }\n};\nexports.NexusOperationFailure = NexusOperationFailure;\nexports.NexusOperationFailure = NexusOperationFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('NexusOperationFailure')\n], NexusOperationFailure);\n// TODO(nexus/error): Maybe add a NexusHandlerFailure class here, once we've decided on error handling.\n/**\n * This exception is thrown in the following cases:\n * - Workflow with the same Workflow ID is currently running and the {@link WorkflowOptions.workflowIdConflictPolicy} is `WORKFLOW_ID_CONFLICT_POLICY_FAIL`\n * - There is a closed Workflow with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy}\n * is `WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`\n * - There is closed Workflow in the `Completed` state with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy}\n * is `WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY`\n */\nlet WorkflowExecutionAlreadyStartedError = class WorkflowExecutionAlreadyStartedError extends TemporalFailure {\n workflowId;\n workflowType;\n constructor(message, workflowId, workflowType) {\n super(message);\n this.workflowId = workflowId;\n this.workflowType = workflowType;\n }\n};\nexports.WorkflowExecutionAlreadyStartedError = WorkflowExecutionAlreadyStartedError;\nexports.WorkflowExecutionAlreadyStartedError = WorkflowExecutionAlreadyStartedError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowExecutionAlreadyStartedError')\n], WorkflowExecutionAlreadyStartedError);\n/**\n * If `error` is already an `ApplicationFailure`, returns `error`.\n *\n * Otherwise, converts `error` into an `ApplicationFailure` with:\n *\n * - `message`: `error.message` or `String(error)`\n * - `type`: `error.constructor.name` or `error.name`\n * - `stack`: `error.stack` or `''`\n */\nfunction ensureApplicationFailure(error) {\n if (error instanceof ApplicationFailure) {\n return error;\n }\n const message = ((0, type_helpers_1.isRecord)(error) && String(error.message)) || String(error);\n const type = ((0, type_helpers_1.isRecord)(error) && (error.constructor?.name ?? error.name)) || undefined;\n const failure = ApplicationFailure.create({ message, type, nonRetryable: false });\n failure.stack = ((0, type_helpers_1.isRecord)(error) && String(error.stack)) || '';\n return failure;\n}\n/**\n * If `err` is an Error it is turned into an `ApplicationFailure`.\n *\n * If `err` was already a `TemporalFailure`, returns the original error.\n *\n * Otherwise returns an `ApplicationFailure` with `String(err)` as the message.\n */\nfunction ensureTemporalFailure(err) {\n if (err instanceof TemporalFailure) {\n return err;\n }\n return ensureApplicationFailure(err);\n}\n/**\n * Get the root cause message of given `error`.\n *\n * In case `error` is a {@link TemporalFailure}, recurse the `cause` chain and return the root `cause.message`.\n * Otherwise, return `error.message`.\n */\nfunction rootCause(error) {\n if (error instanceof TemporalFailure) {\n return error.cause ? rootCause(error.cause) : error.message;\n }\n return (0, type_helpers_1.errorMessage)(error);\n}\n//# sourceMappingURL=failure.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Helpers.\nconst s = 1000;\nconst m = s * 60;\nconst h = m * 60;\nconst d = h * 24;\nconst w = d * 7;\nconst y = d * 365.25;\nfunction ms(value, options) {\n try {\n if (typeof value === 'string' && value.length > 0) {\n return parse(value);\n }\n else if (typeof value === 'number' && isFinite(value)) {\n return options?.long ? fmtLong(value) : fmtShort(value);\n }\n throw new Error('Value is not a string or number.');\n }\n catch (error) {\n const message = isError(error)\n ? `${error.message}. value=${JSON.stringify(value)}`\n : 'An unknown error has occured.';\n throw new Error(message);\n }\n}\n/**\n * Parse the given `str` and return milliseconds.\n */\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n throw new Error('Value exceeds the maximum length of 100 characters.');\n }\n const match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n if (!match) {\n return NaN;\n }\n const n = parseFloat(match[1]);\n const type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n // This should never occur.\n throw new Error(`The unit ${type} was matched, but no matching case exists.`);\n }\n}\nexports.default = ms;\n/**\n * Short format for `ms`.\n */\nfunction fmtShort(ms) {\n const msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return `${Math.round(ms / d)}d`;\n }\n if (msAbs >= h) {\n return `${Math.round(ms / h)}h`;\n }\n if (msAbs >= m) {\n return `${Math.round(ms / m)}m`;\n }\n if (msAbs >= s) {\n return `${Math.round(ms / s)}s`;\n }\n return `${ms}ms`;\n}\n/**\n * Long format for `ms`.\n */\nfunction fmtLong(ms) {\n const msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return `${ms} ms`;\n}\n/**\n * Pluralization helper.\n */\nfunction plural(ms, msAbs, n, name) {\n const isPlural = msAbs >= n * 1.5;\n return `${Math.round(ms / n)} ${name}${isPlural ? 's' : ''}`;\n}\n/**\n * A type guard for errors.\n */\nfunction isError(error) {\n return typeof error === 'object' && error !== null && 'message' in error;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.optionalTsToMs = optionalTsToMs;\nexports.requiredTsToMs = requiredTsToMs;\nexports.tsToMs = tsToMs;\nexports.msNumberToTs = msNumberToTs;\nexports.msToTs = msToTs;\nexports.msOptionalToTs = msOptionalToTs;\nexports.msOptionalToNumber = msOptionalToNumber;\nexports.msToNumber = msToNumber;\nexports.tsToDate = tsToDate;\nexports.requiredTsToDate = requiredTsToDate;\nexports.optionalTsToDate = optionalTsToDate;\nexports.optionalDateToTs = optionalDateToTs;\nconst long_1 = __importDefault(require(\"long\"));\nconst ms_1 = __importDefault(require(\"ms\"));\nconst errors_1 = require(\"./errors\");\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow.\n * If ts is null or undefined returns undefined.\n */\nfunction optionalTsToMs(ts) {\n if (ts === undefined || ts === null) {\n return undefined;\n }\n return tsToMs(ts);\n}\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow.\n * If ts is null or undefined, throws a TypeError, with error message including the name of the field.\n */\nfunction requiredTsToMs(ts, fieldName) {\n if (ts === undefined || ts === null) {\n throw new TypeError(`Expected ${fieldName} to be a timestamp, got ${ts}`);\n }\n return tsToMs(ts);\n}\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow\n */\nfunction tsToMs(ts) {\n if (ts === undefined || ts === null) {\n throw new Error(`Expected timestamp, got ${ts}`);\n }\n const { seconds, nanos } = ts;\n return (seconds || long_1.default.UZERO)\n .mul(1000)\n .add(Math.floor((nanos || 0) / 1000000))\n .toNumber();\n}\nfunction msNumberToTs(millis) {\n const seconds = Math.floor(millis / 1000);\n const nanos = (millis % 1000) * 1000000;\n if (Number.isNaN(seconds) || Number.isNaN(nanos)) {\n throw new errors_1.ValueError(`Invalid millis ${millis}`);\n }\n return { seconds: long_1.default.fromNumber(seconds), nanos };\n}\nfunction msToTs(str) {\n return msNumberToTs(msToNumber(str));\n}\nfunction msOptionalToTs(str) {\n return str ? msToTs(str) : undefined;\n}\nfunction msOptionalToNumber(val) {\n if (val === undefined)\n return undefined;\n return msToNumber(val);\n}\nfunction msToNumber(val) {\n if (typeof val === 'number') {\n return val;\n }\n return msWithValidation(val);\n}\nfunction msWithValidation(str) {\n const millis = (0, ms_1.default)(str);\n if (millis == null || isNaN(millis)) {\n throw new TypeError(`Invalid duration string: '${str}'`);\n }\n return millis;\n}\nfunction tsToDate(ts) {\n return new Date(tsToMs(ts));\n}\n// ts-prune-ignore-next\nfunction requiredTsToDate(ts, fieldName) {\n return new Date(requiredTsToMs(ts, fieldName));\n}\nfunction optionalTsToDate(ts) {\n if (ts === undefined || ts === null) {\n return undefined;\n }\n return new Date(tsToMs(ts));\n}\n// ts-prune-ignore-next (imported via schedule-helpers.ts)\nfunction optionalDateToTs(date) {\n if (date === undefined || date === null) {\n return undefined;\n }\n return msToTs(date.getTime());\n}\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.METADATA_MESSAGE_TYPE_KEY = exports.encodingKeys = exports.encodingTypes = exports.METADATA_ENCODING_KEY = void 0;\nconst encoding_1 = require(\"../encoding\");\nexports.METADATA_ENCODING_KEY = 'encoding';\nexports.encodingTypes = {\n METADATA_ENCODING_NULL: 'binary/null',\n METADATA_ENCODING_RAW: 'binary/plain',\n METADATA_ENCODING_JSON: 'json/plain',\n METADATA_ENCODING_PROTOBUF_JSON: 'json/protobuf',\n METADATA_ENCODING_PROTOBUF: 'binary/protobuf',\n};\nexports.encodingKeys = {\n METADATA_ENCODING_NULL: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_NULL),\n METADATA_ENCODING_RAW: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_RAW),\n METADATA_ENCODING_JSON: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_JSON),\n METADATA_ENCODING_PROTOBUF_JSON: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_PROTOBUF_JSON),\n METADATA_ENCODING_PROTOBUF: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_PROTOBUF),\n};\nexports.METADATA_MESSAGE_TYPE_KEY = 'messageType';\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultPayloadConverter = exports.DefaultPayloadConverter = exports.JsonPayloadConverter = exports.BinaryPayloadConverter = exports.UndefinedPayloadConverter = exports.CompositePayloadConverter = exports.RawValue = void 0;\nexports.toPayloads = toPayloads;\nexports.toPayloadsWithContext = toPayloadsWithContext;\nexports.convertOptionalToPayload = convertOptionalToPayload;\nexports.mapToPayloads = mapToPayloads;\nexports.fromPayloadsAtIndex = fromPayloadsAtIndex;\nexports.arrayFromPayloads = arrayFromPayloads;\nexports.mapFromPayloads = mapFromPayloads;\nconst encoding_1 = require(\"../encoding\");\nconst errors_1 = require(\"../errors\");\nconst types_1 = require(\"./types\");\n/**\n * Implements conversion of a list of values.\n *\n * @param converter\n * @param values JS values to convert to Payloads\n * @return list of {@link Payload}s\n * @throws {@link ValueError} if conversion of the value passed as parameter failed for any\n * reason.\n */\nfunction toPayloads(converter, ...values) {\n return toPayloadsWithContext(converter, undefined, values);\n}\n/**\n * Implements conversion of a list of values with an optional serialization context.\n *\n * @hidden\n */\nfunction toPayloadsWithContext(converter, context, values) {\n if (values.length === 0) {\n return undefined;\n }\n return values.map((value) => converter.toPayload(value, context));\n}\n/**\n * Run {@link PayloadConverter.toPayload} on an optional value, and then encode it.\n */\nfunction convertOptionalToPayload(payloadConverter, value, context) {\n if (value == null)\n return value;\n return payloadConverter.toPayload(value, context);\n}\n/**\n * Run {@link PayloadConverter.toPayload} on each value in the map.\n *\n * @throws {@link ValueError} if conversion of any value in the map fails\n */\nfunction mapToPayloads(converter, map, context) {\n return Object.fromEntries(Object.entries(map).map(([k, v]) => [k, converter.toPayload(v, context)]));\n}\n/**\n * Implements conversion of an array of values of different types. Useful for deserializing\n * arguments of function invocations.\n *\n * @param converter\n * @param index index of the value in the payloads\n * @param payloads serialized value to convert to JS values.\n * @return converted JS value\n * @throws {@link PayloadConverterError} if conversion of the data passed as parameter failed for any\n * reason.\n */\nfunction fromPayloadsAtIndex(converter, index, payloads, context) {\n // To make adding arguments a backwards compatible change\n if (payloads === undefined || payloads === null || index >= payloads.length) {\n return undefined;\n }\n const payload = payloads?.[index];\n if (!payload) {\n return undefined;\n }\n return converter.fromPayload(payload, context);\n}\n/**\n * Run {@link PayloadConverter.fromPayload} on each value in the array.\n */\nfunction arrayFromPayloads(converter, payloads, context) {\n if (!payloads) {\n return [];\n }\n return payloads.map((payload) => converter.fromPayload(payload, context));\n}\nfunction mapFromPayloads(converter, map, context) {\n if (map == null)\n return undefined;\n return Object.fromEntries(Object.entries(map).map(([k, payload]) => {\n const value = converter.fromPayload(payload, context);\n return [k, value];\n }));\n}\n/**\n * RawValue is a wrapper over a payload.\n * A payload that belongs to a RawValue is special in that it bypasses user-defined payload converters,\n * instead using the default payload converter. The payload still undergoes codec conversion.\n */\nclass RawValue {\n _payload;\n [exports.rawPayloadTypeBrand] = undefined;\n constructor(value, payloadConverter = exports.defaultPayloadConverter, context) {\n this._payload = payloadConverter.toPayload(value, context);\n }\n static fromPayload(p) {\n return new RawValue(p, identityPayloadConverter);\n }\n get payload() {\n return this._payload;\n }\n}\nexports.RawValue = RawValue;\n/**\n * Tries to convert values to {@link Payload}s using the {@link PayloadConverterWithEncoding}s provided to the constructor, in the order provided.\n *\n * Converts Payloads to values based on the `Payload.metadata.encoding` field, which matches the {@link PayloadConverterWithEncoding.encodingType}\n * of the converter that created the Payload.\n */\nclass CompositePayloadConverter {\n converters;\n converterByEncoding = new Map();\n constructor(...converters) {\n if (converters.length === 0) {\n throw new errors_1.PayloadConverterError('Must provide at least one PayloadConverterWithEncoding');\n }\n this.converters = converters;\n for (const converter of converters) {\n this.converterByEncoding.set(converter.encodingType, converter);\n }\n }\n /**\n * Tries to run `.toPayload(value)` on each converter in the order provided at construction.\n * Returns the first successful result, throws {@link ValueError} if there is no converter that can handle the value.\n */\n toPayload(value, context) {\n if (value instanceof RawValue) {\n return value.payload;\n }\n for (const converter of this.converters) {\n const result = converter.toPayload(value, context);\n if (result !== undefined) {\n return result;\n }\n }\n throw new errors_1.ValueError(`Unable to convert ${value} to payload`);\n }\n /**\n * Run {@link PayloadConverterWithEncoding.fromPayload} based on the `encoding` metadata of the {@link Payload}.\n */\n fromPayload(payload, context) {\n if (payload.metadata === undefined || payload.metadata === null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n const encoding = (0, encoding_1.decode)(payload.metadata[types_1.METADATA_ENCODING_KEY]);\n const converter = this.converterByEncoding.get(encoding);\n if (converter === undefined) {\n throw new errors_1.ValueError(`Unknown encoding: ${encoding}`);\n }\n return converter.fromPayload(payload, context);\n }\n}\nexports.CompositePayloadConverter = CompositePayloadConverter;\n/**\n * Converts between JS undefined and NULL Payload\n */\nclass UndefinedPayloadConverter {\n encodingType = types_1.encodingTypes.METADATA_ENCODING_NULL;\n toPayload(value) {\n if (value !== undefined) {\n return undefined;\n }\n return {\n metadata: {\n [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_NULL,\n },\n };\n }\n fromPayload(_content) {\n return undefined; // Just return undefined\n }\n}\nexports.UndefinedPayloadConverter = UndefinedPayloadConverter;\n/**\n * Converts between binary data types and RAW Payload\n */\nclass BinaryPayloadConverter {\n encodingType = types_1.encodingTypes.METADATA_ENCODING_RAW;\n toPayload(value) {\n if (!(value instanceof Uint8Array)) {\n return undefined;\n }\n return {\n metadata: {\n [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_RAW,\n },\n data: value,\n };\n }\n fromPayload(content) {\n return (\n // Wrap with Uint8Array from this context to ensure `instanceof` works\n (content.data ? new Uint8Array(content.data.buffer, content.data.byteOffset, content.data.length) : content.data));\n }\n}\nexports.BinaryPayloadConverter = BinaryPayloadConverter;\n/**\n * Converts between non-undefined values and serialized JSON Payload\n */\nclass JsonPayloadConverter {\n encodingType = types_1.encodingTypes.METADATA_ENCODING_JSON;\n toPayload(value) {\n if (value === undefined) {\n return undefined;\n }\n let json;\n try {\n json = JSON.stringify(value);\n }\n catch (_err) {\n return undefined;\n }\n return {\n metadata: {\n [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_JSON,\n },\n data: (0, encoding_1.encode)(json),\n };\n }\n fromPayload(content) {\n if (content.data === undefined || content.data === null) {\n throw new errors_1.ValueError('Got payload with no data');\n }\n return JSON.parse((0, encoding_1.decode)(content.data));\n }\n}\nexports.JsonPayloadConverter = JsonPayloadConverter;\nclass DefaultPayloadConverter extends CompositePayloadConverter {\n // Match the order used in other SDKs, but exclude Protobuf converters so that the code, including\n // `proto3-json-serializer`, doesn't take space in Workflow bundles that don't use Protobufs. To use Protobufs, use\n // {@link DefaultPayloadConverterWithProtobufs}.\n //\n // Go SDK:\n // https://github.com/temporalio/sdk-go/blob/5e5645f0c550dcf717c095ae32c76a7087d2e985/converter/default_data_converter.go#L28\n constructor() {\n super(new UndefinedPayloadConverter(), new BinaryPayloadConverter(), new JsonPayloadConverter());\n }\n}\nexports.DefaultPayloadConverter = DefaultPayloadConverter;\n/**\n * The default {@link PayloadConverter} used by the SDK. Supports `Uint8Array` and JSON serializables (so if\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`}\n * works, the default payload converter will work).\n *\n * To also support Protobufs, create a custom payload converter with {@link DefaultPayloadConverter}:\n *\n * `const myConverter = new DefaultPayloadConverter({ protobufRoot })`\n */\nexports.defaultPayloadConverter = new DefaultPayloadConverter();\n/**\n * The identity payload converter returns the inputs it was given.\n */\nclass IdentityPayloadConverter {\n toPayload(value) {\n return value;\n }\n fromPayload(payload) {\n return payload;\n }\n}\nconst identityPayloadConverter = new IdentityPayloadConverter();\n//# sourceMappingURL=payload-converter.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultFailureConverter = void 0;\nexports.cutoffStackTrace = cutoffStackTrace;\nconst nexus = __importStar(require(\"nexus-rpc\"));\nconst long_1 = __importDefault(require(\"long\"));\nconst failure_1 = require(\"../failure\");\nconst internal_workflow_1 = require(\"../internal-workflow\");\nconst type_helpers_1 = require(\"../type-helpers\");\nconst time_1 = require(\"../time\");\nconst encoding_1 = require(\"../encoding\");\nconst payload_converter_1 = require(\"./payload-converter\");\n// Can't import proto enums into the workflow sandbox, use this helper type and enum converter instead.\nconst NexusHandlerErrorRetryBehavior = {\n RETRYABLE: 'RETRYABLE',\n NON_RETRYABLE: 'NON_RETRYABLE',\n};\nconst [encodeNexusHandlerErrorRetryBehavior, decodeNexusHandlerErrorRetryBehavior] = (0, internal_workflow_1.makeProtoEnumConverters)({\n UNSPECIFIED: 0,\n [NexusHandlerErrorRetryBehavior.RETRYABLE]: 1,\n [NexusHandlerErrorRetryBehavior.NON_RETRYABLE]: 2,\n}, 'NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_');\nfunction combineRegExp(...regexps) {\n return new RegExp(regexps.map((x) => `(?:${x.source})`).join('|'));\n}\n/**\n * Stack traces will be cutoff when on of these patterns is matched\n */\nconst CUTOFF_STACK_PATTERNS = combineRegExp(\n/** Activity execution */\n/\\s+at (Activity\\.)?execute \\(.*[\\\\/]worker[\\\\/](?:src|lib)[\\\\/]activity\\.[jt]s:\\d+:\\d+\\)/, \n/** Nexus execution */\n/\\s+at( async)? (NexusHandler\\.)?invokeUserCode \\(.*[\\\\/]worker[\\\\/](?:src|lib)[\\\\/]nexus[\\\\/]index\\.[jt]s:\\d+:\\d+\\)/, \n/** Workflow activation (inbound handlers only) */\n/\\s+at( async)? (Activator\\.)?(startWorkflow|queryWorkflow|signalWorkflow|update|validateUpdate)NextHandler \\(.*\\.[jt]s:\\d+:\\d+\\)/, \n/** Workflow run anything in context */\n/\\s+at (Script\\.)?runInContext \\(native|unknown|(?:(?:node:vm|vm\\.js):\\d+:\\d+)\\)/);\n/**\n * Any stack trace frames that match any of those wil be dopped.\n * The \"null.\" prefix on some cases is to avoid https://github.com/nodejs/node/issues/42417\n */\nconst DROPPED_STACK_FRAMES_PATTERNS = combineRegExp(\n/** Internal functions used to recursively chain interceptors */\n/\\s+at (null\\.)?next \\(.*[\\\\/]common[\\\\/](?:src|lib)[\\\\/]interceptors\\.[jt]s:\\d+:\\d+\\)/, \n/** Internal functions used to recursively chain interceptors */\n/\\s+at (null\\.)?executeNextHandler \\(.*[\\\\/]worker[\\\\/](?:src|lib)[\\\\/]activity\\.[jt]s:\\d+:\\d+\\)/);\n/**\n * Cuts out the framework part of a stack trace, leaving only user code entries\n */\nfunction cutoffStackTrace(stack) {\n const lines = (stack ?? '').split(/\\r?\\n/);\n const acc = Array();\n for (const line of lines) {\n if (CUTOFF_STACK_PATTERNS.test(line))\n break;\n if (!DROPPED_STACK_FRAMES_PATTERNS.test(line))\n acc.push(line);\n }\n return acc.join('\\n');\n}\n/**\n * Default, cross-language-compatible Failure converter.\n *\n * By default, it will leave error messages and stack traces as plain text. In order to encrypt them, set\n * `encodeCommonAttributes` to `true` in the constructor options and use a {@link PayloadCodec} that can encrypt /\n * decrypt Payloads in your {@link WorkerOptions.dataConverter | Worker} and\n * {@link ClientOptions.dataConverter | Client options}.\n */\nclass DefaultFailureConverter {\n options;\n constructor(options) {\n const { encodeCommonAttributes } = options ?? {};\n this.options = {\n encodeCommonAttributes: encodeCommonAttributes ?? false,\n };\n }\n /**\n * Converts a Failure proto message to a JS Error object.\n *\n * Does not set common properties, that is done in {@link failureToError}.\n */\n failureToErrorInner(failure, payloadConverter, context) {\n if (failure.applicationFailureInfo) {\n return new failure_1.ApplicationFailure(failure.message ?? undefined, failure.applicationFailureInfo.type, Boolean(failure.applicationFailureInfo.nonRetryable), (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.applicationFailureInfo.details?.payloads, context), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context), undefined, (0, failure_1.decodeApplicationFailureCategory)(failure.applicationFailureInfo.category));\n }\n if (failure.serverFailureInfo) {\n return new failure_1.ServerFailure(failure.message ?? undefined, Boolean(failure.serverFailureInfo.nonRetryable), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.timeoutFailureInfo) {\n return new failure_1.TimeoutFailure(failure.message ?? undefined, (0, payload_converter_1.fromPayloadsAtIndex)(payloadConverter, 0, failure.timeoutFailureInfo.lastHeartbeatDetails?.payloads, context), (0, failure_1.decodeTimeoutType)(failure.timeoutFailureInfo.timeoutType));\n }\n if (failure.terminatedFailureInfo) {\n return new failure_1.TerminatedFailure(failure.message ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.canceledFailureInfo) {\n return new failure_1.CancelledFailure(failure.message ?? undefined, (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.canceledFailureInfo.details?.payloads, context), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.resetWorkflowFailureInfo) {\n return new failure_1.ApplicationFailure(failure.message ?? undefined, 'ResetWorkflow', false, (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.resetWorkflowFailureInfo.lastHeartbeatDetails?.payloads, context), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.childWorkflowExecutionFailureInfo) {\n const { namespace, workflowType, workflowExecution, retryState } = failure.childWorkflowExecutionFailureInfo;\n if (!(workflowType?.name && workflowExecution)) {\n throw new TypeError('Missing attributes on childWorkflowExecutionFailureInfo');\n }\n return new failure_1.ChildWorkflowFailure(namespace ?? undefined, workflowExecution, workflowType.name, (0, failure_1.decodeRetryState)(retryState), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.activityFailureInfo) {\n if (!failure.activityFailureInfo.activityType?.name) {\n throw new TypeError('Missing activityType?.name on activityFailureInfo');\n }\n return new failure_1.ActivityFailure(failure.message ?? undefined, failure.activityFailureInfo.activityType.name, failure.activityFailureInfo.activityId ?? undefined, (0, failure_1.decodeRetryState)(failure.activityFailureInfo.retryState), failure.activityFailureInfo.identity ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.nexusHandlerFailureInfo) {\n let retryableOverride = undefined;\n const retryBehavior = decodeNexusHandlerErrorRetryBehavior(failure.nexusHandlerFailureInfo.retryBehavior);\n switch (retryBehavior) {\n case 'RETRYABLE':\n retryableOverride = true;\n break;\n case 'NON_RETRYABLE':\n retryableOverride = false;\n break;\n }\n const rawErrorType = failure.nexusHandlerFailureInfo.type || '';\n const resolvedType = Object.hasOwn(nexus.HandlerErrorType, rawErrorType)\n ? nexus.HandlerErrorType[rawErrorType]\n : 'UNKNOWN';\n return new nexus.HandlerError(resolvedType, failure.message ?? 'Nexus handler error', {\n cause: this.optionalFailureToOptionalError(failure.cause, payloadConverter, context),\n retryableOverride,\n rawErrorType,\n originalFailure: this.temporalFailureToNexusFailure(failure),\n });\n }\n if (failure.nexusOperationExecutionFailureInfo) {\n return new failure_1.NexusOperationFailure(\n // TODO(nexus/error): Maybe set a default message here, once we've decided on error handling.\n failure.message ?? undefined, failure.nexusOperationExecutionFailureInfo.scheduledEventId?.toNumber(), \n // We assume these will always be set or gracefully set to empty strings.\n failure.nexusOperationExecutionFailureInfo.endpoint ?? '', failure.nexusOperationExecutionFailureInfo.service ?? '', failure.nexusOperationExecutionFailureInfo.operation ?? '', failure.nexusOperationExecutionFailureInfo.operationToken ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n return new failure_1.TemporalFailure(failure.message ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n failureToError(failure, payloadConverter, context) {\n if (failure.encodedAttributes) {\n const attrs = payloadConverter.fromPayload(failure.encodedAttributes, context);\n // Don't apply encodedAttributes unless they conform to an expected schema\n if (typeof attrs === 'object' && attrs !== null) {\n const { message, stack_trace } = attrs;\n // Avoid mutating the argument\n failure = { ...failure };\n if (typeof message === 'string') {\n failure.message = message;\n }\n if (typeof stack_trace === 'string') {\n failure.stackTrace = stack_trace;\n }\n }\n }\n const err = this.failureToErrorInner(failure, payloadConverter, context);\n err.stack = failure.stackTrace ?? '';\n if (err instanceof failure_1.TemporalFailure) {\n err.failure = failure;\n }\n return err;\n }\n errorToFailure(err, payloadConverter, context) {\n const failure = this.errorToFailureInner(err, payloadConverter, context);\n if (this.options.encodeCommonAttributes) {\n const { message, stackTrace } = failure;\n failure.message = 'Encoded failure';\n failure.stackTrace = '';\n failure.encodedAttributes = payloadConverter.toPayload({ message, stack_trace: stackTrace }, context);\n }\n return failure;\n }\n errorToFailureInner(err, payloadConverter, context) {\n if (err instanceof failure_1.TemporalFailure || err instanceof nexus.HandlerError) {\n if (err instanceof failure_1.TemporalFailure && err.failure)\n return err.failure;\n const base = {\n message: err.message,\n stackTrace: cutoffStackTrace(err.stack),\n cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter, context),\n source: failure_1.FAILURE_SOURCE,\n };\n if (err instanceof failure_1.ActivityFailure) {\n return {\n ...base,\n activityFailureInfo: {\n ...err,\n retryState: (0, failure_1.encodeRetryState)(err.retryState),\n activityType: { name: err.activityType },\n },\n };\n }\n if (err instanceof failure_1.ChildWorkflowFailure) {\n return {\n ...base,\n childWorkflowExecutionFailureInfo: {\n ...err,\n retryState: (0, failure_1.encodeRetryState)(err.retryState),\n workflowExecution: err.execution,\n workflowType: { name: err.workflowType },\n },\n };\n }\n if (err instanceof failure_1.ApplicationFailure) {\n return {\n ...base,\n applicationFailureInfo: {\n type: err.type,\n nonRetryable: err.nonRetryable,\n details: err.details && err.details.length\n ? { payloads: (0, payload_converter_1.toPayloadsWithContext)(payloadConverter, context, err.details) }\n : undefined,\n nextRetryDelay: (0, time_1.msOptionalToTs)(err.nextRetryDelay),\n category: (0, failure_1.encodeApplicationFailureCategory)(err.category),\n },\n };\n }\n if (err instanceof failure_1.CancelledFailure) {\n return {\n ...base,\n canceledFailureInfo: {\n details: err.details && err.details.length\n ? { payloads: (0, payload_converter_1.toPayloadsWithContext)(payloadConverter, context, err.details) }\n : undefined,\n },\n };\n }\n if (err instanceof failure_1.TimeoutFailure) {\n return {\n ...base,\n timeoutFailureInfo: {\n timeoutType: (0, failure_1.encodeTimeoutType)(err.timeoutType),\n lastHeartbeatDetails: err.lastHeartbeatDetails\n ? { payloads: (0, payload_converter_1.toPayloadsWithContext)(payloadConverter, context, [err.lastHeartbeatDetails]) }\n : undefined,\n },\n };\n }\n if (err instanceof failure_1.ServerFailure) {\n return {\n ...base,\n serverFailureInfo: { nonRetryable: err.nonRetryable },\n };\n }\n if (err instanceof failure_1.TerminatedFailure) {\n return {\n ...base,\n terminatedFailureInfo: {},\n };\n }\n if (err instanceof nexus.HandlerError) {\n if (err.originalFailure) {\n return this.nexusFailureToTemporalFailure(err.originalFailure, err.retryable);\n }\n else {\n let retryBehavior = undefined;\n switch (err.retryableOverride) {\n case true:\n retryBehavior = encodeNexusHandlerErrorRetryBehavior('RETRYABLE');\n break;\n case false:\n retryBehavior = encodeNexusHandlerErrorRetryBehavior('NON_RETRYABLE');\n break;\n }\n return {\n ...base,\n nexusHandlerFailureInfo: {\n type: err.type,\n retryBehavior,\n },\n };\n }\n }\n if (err instanceof failure_1.NexusOperationFailure) {\n return {\n ...base,\n nexusOperationExecutionFailureInfo: {\n scheduledEventId: err.scheduledEventId ? long_1.default.fromNumber(err.scheduledEventId) : undefined,\n endpoint: err.endpoint,\n service: err.service,\n operation: err.operation,\n operationToken: err.operationToken,\n },\n };\n }\n // Just a TemporalFailure\n return base;\n }\n const base = {\n source: failure_1.FAILURE_SOURCE,\n };\n if ((0, type_helpers_1.isError)(err)) {\n return {\n ...base,\n message: String(err.message ?? ''),\n stackTrace: cutoffStackTrace(err.stack),\n cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter, context),\n };\n }\n const recommendation = ` [A non-Error value was thrown from your code. We recommend throwing Error objects so that we can provide a stack trace]`;\n if (typeof err === 'string') {\n return { ...base, message: err + recommendation };\n }\n if (typeof err === 'object') {\n let message = '';\n try {\n message = JSON.stringify(err);\n }\n catch (_err) {\n message = String(err);\n }\n return { ...base, message: message + recommendation };\n }\n return { ...base, message: String(err) + recommendation };\n }\n /**\n * Converts a Failure proto message to a JS Error object if defined or returns undefined.\n */\n optionalFailureToOptionalError(failure, payloadConverter, context) {\n return failure ? this.failureToError(failure, payloadConverter, context) : undefined;\n }\n /**\n * Converts an error to a Failure proto message if defined or returns undefined\n */\n optionalErrorToOptionalFailure(err, payloadConverter, context) {\n return err ? this.errorToFailure(err, payloadConverter, context) : undefined;\n }\n nexusFailureToTemporalFailure(failure, retryable) {\n if (failure.metadata?.type === 'temporal.api.failure.v1.Failure') {\n if (failure.details == null) {\n throw new TypeError(\"missing details for Nexus Failure of type 'temporal.api.failure.v1.Failure'\");\n }\n return failure.details;\n }\n else {\n const temporalFailure = {};\n temporalFailure.applicationFailureInfo = {\n type: 'NexusFailure',\n nonRetryable: !retryable,\n details: {\n payloads: [\n {\n metadata: { encoding: (0, encoding_1.encode)('json/plain') },\n data: (0, encoding_1.encode)(JSON.stringify({ ...failure, message: '' })),\n },\n ],\n },\n };\n temporalFailure.message = failure.message;\n temporalFailure.stackTrace = failure.stackTrace ?? '';\n return temporalFailure;\n }\n }\n temporalFailureToNexusFailure(failure) {\n return {\n message: failure.message ?? '',\n metadata: { type: 'temporal.api.failure.v1.Failure' },\n // Store the full ProtoFailure as the Nexus failure details so it can be round-tripped\n // losslessly back to a ProtoFailure via nexusFailureToTemporalFailure.\n details: { ...failure },\n };\n }\n}\nexports.DefaultFailureConverter = DefaultFailureConverter;\n//# sourceMappingURL=failure-converter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultDataConverter = exports.defaultFailureConverter = void 0;\nconst failure_converter_1 = require(\"./failure-converter\");\nconst payload_converter_1 = require(\"./payload-converter\");\n/**\n * The default {@link FailureConverter} used by the SDK.\n *\n * Error messages and stack traces are serizalized as plain text.\n */\nexports.defaultFailureConverter = new failure_converter_1.DefaultFailureConverter();\n/**\n * A \"loaded\" data converter that uses the default set of failure and payload converters.\n */\nexports.defaultDataConverter = {\n payloadConverter: payload_converter_1.defaultPayloadConverter,\n failureConverter: exports.defaultFailureConverter,\n payloadCodecs: [],\n};\n//# sourceMappingURL=data-converter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=payload-codec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.optionalTsToMs = optionalTsToMs;\nexports.tsToMs = tsToMs;\nexports.msNumberToTs = msNumberToTs;\nexports.msToTs = msToTs;\nexports.msOptionalToTs = msOptionalToTs;\nexports.msOptionalToNumber = msOptionalToNumber;\nexports.msToNumber = msToNumber;\nexports.tsToDate = tsToDate;\nexports.optionalTsToDate = optionalTsToDate;\nconst time = __importStar(require(\"./time\"));\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow.\n * If ts is null or undefined returns undefined.\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction optionalTsToMs(ts) {\n return time.optionalTsToMs(ts);\n}\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow\n *\n * @hidden\n * @deprecated - meant for internal use only\n * @deprecated - meant for internal use only\n */\nfunction tsToMs(ts) {\n return time.tsToMs(ts);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msNumberToTs(millis) {\n return time.msNumberToTs(millis);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msToTs(str) {\n return time.msToTs(str);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msOptionalToTs(str) {\n return time.msOptionalToTs(str);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msOptionalToNumber(val) {\n return time.msOptionalToNumber(val);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msToNumber(val) {\n return time.msToNumber(val);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction tsToDate(ts) {\n return time.tsToDate(ts);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction optionalTsToDate(ts) {\n return time.optionalTsToDate(ts);\n}\n//# sourceMappingURL=deprecated-time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandlerUnfinishedPolicy = void 0;\n/**\n * Policy defining actions taken when a workflow exits while update or signal handlers are running.\n * The workflow exit may be due to successful return, failure, cancellation, or continue-as-new.\n */\nexports.HandlerUnfinishedPolicy = {\n /**\n * Issue a warning in addition to abandoning the handler execution. The warning will not be issued if the workflow fails.\n */\n WARN_AND_ABANDON: 'WARN_AND_ABANDON',\n /**\n * Abandon the handler execution.\n *\n * In the case of an update handler this means that the client will receive an error rather than\n * the update result.\n */\n ABANDON: 'ABANDON',\n};\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LoggerWithComposedMetadata = exports.SdkComponent = void 0;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * Possible values of the `sdkComponent` meta attributes on log messages. This\n * attribute indicates which subsystem emitted the log message; this may for\n * example be used to implement fine-grained filtering of log messages.\n *\n * Note that there is no guarantee that this list will remain stable in the\n * future; values may be added or removed, and messages that are currently\n * emitted with some `sdkComponent` value may use a different value in the future.\n */\nvar SdkComponent;\n(function (SdkComponent) {\n /**\n * Component name for messages emited from Workflow code, using the {@link Workflow context logger|workflow.log}.\n * The SDK itself never publishes messages with this component name.\n */\n SdkComponent[\"workflow\"] = \"workflow\";\n /**\n * Component name for messages emited from an activity, using the {@link activity context logger|Context.log}.\n * The SDK itself never publishes messages with this component name.\n */\n SdkComponent[\"activity\"] = \"activity\";\n /**\n * Component name for messages emited from a Nexus Operation Handler, using the Nexus context logger.\n * The SDK itself never publishes messages with this component name.\n */\n SdkComponent[\"nexus\"] = \"nexus\";\n /**\n * Component name for messages emited from a Temporal Worker instance.\n *\n * This notably includes:\n * - Issues with Worker or runtime configuration, or the JS execution environment;\n * - Worker's, Activity's, and Workflow's lifecycle events;\n * - Workflow Activation and Activity Task processing events;\n * - Workflow bundling messages;\n * - Sink processing issues.\n */\n SdkComponent[\"worker\"] = \"worker\";\n /**\n * Component name for all messages emitted by the Rust Core SDK library.\n */\n SdkComponent[\"core\"] = \"core\";\n})(SdkComponent || (exports.SdkComponent = SdkComponent = {}));\n/**\n * A logger implementation that adds metadata before delegating calls to a parent logger.\n *\n * @internal\n * @hidden\n */\nclass LoggerWithComposedMetadata {\n parentLogger;\n contributors;\n /**\n * Return a {@link Logger} that adds metadata before delegating calls to a parent logger.\n *\n * New metadata may either be specified statically as a delta object, or as a function evaluated\n * every time a log is emitted that will return a delta object.\n *\n * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime\n * overhead associated with resolving metadata as low as possible.\n */\n static compose(logger, metaOrFunc) {\n // Flatten recursive LoggerWithComposedMetadata instances\n if (logger instanceof LoggerWithComposedMetadata) {\n const contributors = appendToChain(logger.contributors, metaOrFunc);\n // If the new contributor results in no actual change to the chain, then we don't need a new logger\n if (contributors === undefined)\n return logger;\n return new LoggerWithComposedMetadata(logger.parentLogger, contributors);\n }\n else {\n const contributors = appendToChain(undefined, metaOrFunc);\n if (contributors === undefined)\n return logger;\n return new LoggerWithComposedMetadata(logger, contributors);\n }\n }\n constructor(parentLogger, contributors) {\n this.parentLogger = parentLogger;\n this.contributors = contributors;\n }\n log(level, message, extraMeta) {\n this.parentLogger.log(level, message, resolveMetadata(this.contributors, extraMeta));\n }\n trace(message, extraMeta) {\n this.parentLogger.trace(message, resolveMetadata(this.contributors, extraMeta));\n }\n debug(message, extraMeta) {\n this.parentLogger.debug(message, resolveMetadata(this.contributors, extraMeta));\n }\n info(message, extraMeta) {\n this.parentLogger.info(message, resolveMetadata(this.contributors, extraMeta));\n }\n warn(message, extraMeta) {\n this.parentLogger.warn(message, resolveMetadata(this.contributors, extraMeta));\n }\n error(message, extraMeta) {\n this.parentLogger.error(message, resolveMetadata(this.contributors, extraMeta));\n }\n}\nexports.LoggerWithComposedMetadata = LoggerWithComposedMetadata;\nfunction resolveMetadata(contributors, extraMeta) {\n const resolved = {};\n for (const contributor of contributors) {\n Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor);\n }\n Object.assign(resolved, extraMeta);\n return (0, internal_workflow_1.filterNullAndUndefined)(resolved);\n}\n/**\n * Append a metadata contributor to the chain, merging it with the former last contributor if both are plain objects\n */\nfunction appendToChain(existingContributors, newContributor) {\n // If the new contributor is an empty object, then it results in no actual change to the chain\n if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) {\n return existingContributors;\n }\n // If existing chain is empty, then the new contributor is the chain\n if (existingContributors == null || existingContributors.length === 0) {\n return [newContributor];\n }\n // If both last contributor and new contributor are plain objects, merge them to a single object.\n const last = existingContributors[existingContributors.length - 1];\n if (typeof last === 'object' && typeof newContributor === 'object') {\n const merged = (0, internal_workflow_1.mergeObjects)(last, newContributor);\n if (merged === last)\n return existingContributors;\n return [...existingContributors.slice(0, -1), merged];\n }\n // Otherwise, just append the new contributor to the chain.\n return [...existingContributors, newContributor];\n}\n//# sourceMappingURL=logger.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodePriority = decodePriority;\nexports.compilePriority = compilePriority;\n/**\n * Turn a proto compatible Priority into a TS Priority\n */\nfunction decodePriority(priority) {\n return {\n priorityKey: priority?.priorityKey ?? undefined,\n fairnessKey: priority?.fairnessKey ?? undefined,\n fairnessWeight: priority?.fairnessWeight ?? undefined,\n };\n}\n/**\n * Turn a TS Priority into a proto compatible Priority\n */\nfunction compilePriority(priority) {\n if (priority.priorityKey !== undefined && priority.priorityKey !== null) {\n if (!Number.isInteger(priority.priorityKey)) {\n throw new TypeError('priorityKey must be an integer');\n }\n if (priority.priorityKey < 0) {\n throw new RangeError('priorityKey must be a positive integer');\n }\n }\n return {\n priorityKey: priority.priorityKey ?? 0,\n fairnessKey: priority.fairnessKey ?? '',\n fairnessWeight: priority.fairnessWeight ?? 0,\n };\n}\n//# sourceMappingURL=priority.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricMeterWithComposedTags = exports.noopMetricMeter = void 0;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n////////////////////////////////////////////////////////////////////////////////////////////////////\n/**\n * A meter implementation that does nothing.\n */\nclass NoopMetricMeter {\n createCounter(name, unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'counter',\n valueType: 'int',\n add(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n createHistogram(name, valueType = 'int', unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'histogram',\n valueType,\n record(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n createGauge(name, valueType = 'int', unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'gauge',\n valueType,\n set(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n createUpDownCounter(name, unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'up-down-counter',\n valueType: 'int',\n add(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n withTags(_extraTags) {\n return this;\n }\n}\nexports.noopMetricMeter = new NoopMetricMeter();\n/**\n * A meter implementation that adds tags before delegating calls to a parent meter.\n *\n * @experimental The Metric API is an experimental feature and may be subject to change.\n * @internal\n * @hidden\n */\nclass MetricMeterWithComposedTags {\n parentMeter;\n contributors;\n /**\n * Return a {@link MetricMeter} that adds tags before delegating calls to a parent meter.\n *\n * New tags may either be specified statically as a delta object, or as a function evaluated\n * every time a metric is recorded that will return a delta object.\n *\n * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime\n * overhead associated with resolving tags as low as possible.\n *\n * @param meter The parent meter to delegate calls to.\n * @param tagsOrFunc New tags may either be specified statically as a delta object, or as a function\n * evaluated every time a metric is recorded that will return a delta object.\n * @param force if `true`, then a `MetricMeterWithComposedTags` will be created even if there\n * is no tags to add. This is useful to add tags support to an underlying meter\n * implementation that does not support tags directly.\n */\n static compose(meter, tagsOrFunc, force = false) {\n if (meter instanceof MetricMeterWithComposedTags) {\n const contributors = appendToChain(meter.contributors, tagsOrFunc);\n // If the new contributor results in no actual change to the chain, then we don't need a new meter\n if (contributors === undefined && !force)\n return meter;\n return new MetricMeterWithComposedTags(meter.parentMeter, contributors ?? []);\n }\n else {\n const contributors = appendToChain(undefined, tagsOrFunc);\n if (contributors === undefined && !force)\n return meter;\n return new MetricMeterWithComposedTags(meter, contributors ?? []);\n }\n }\n constructor(parentMeter, contributors) {\n this.parentMeter = parentMeter;\n this.contributors = contributors;\n }\n createCounter(name, unit, description) {\n const parentCounter = this.parentMeter.createCounter(name, unit, description);\n return new MetricCounterWithComposedTags(parentCounter, this.contributors);\n }\n createHistogram(name, valueType = 'int', unit, description) {\n const parentHistogram = this.parentMeter.createHistogram(name, valueType, unit, description);\n return new MetricHistogramWithComposedTags(parentHistogram, this.contributors);\n }\n createGauge(name, valueType = 'int', unit, description) {\n const parentGauge = this.parentMeter.createGauge(name, valueType, unit, description);\n return new MetricGaugeWithComposedTags(parentGauge, this.contributors);\n }\n createUpDownCounter(name, unit, description) {\n // FIXME: Remove this guard once up-down-counter support is complete on all MetricMeter\n // implementations and `createUpDownCounter` is no longer optional on MetricMeter.\n if (!this.parentMeter.createUpDownCounter) {\n throw new Error('createUpDownCounter is not supported by the underlying meter');\n }\n const parentCounter = this.parentMeter.createUpDownCounter(name, unit, description);\n return new MetricUpDownCounterWithComposedTags(parentCounter, this.contributors);\n }\n withTags(tags) {\n return MetricMeterWithComposedTags.compose(this, tags);\n }\n}\nexports.MetricMeterWithComposedTags = MetricMeterWithComposedTags;\n/**\n * @experimental The Metric API is an experimental feature and may be subject to change.\n */\nclass MetricCounterWithComposedTags {\n parentCounter;\n contributors;\n kind = 'counter';\n valueType = 'int';\n constructor(parentCounter, contributors) {\n this.parentCounter = parentCounter;\n this.contributors = contributors;\n }\n add(value, extraTags) {\n this.parentCounter.add(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricCounterWithComposedTags(this.parentCounter, contributors);\n }\n get name() {\n return this.parentCounter.name;\n }\n get unit() {\n return this.parentCounter.unit;\n }\n get description() {\n return this.parentCounter.description;\n }\n}\n/**\n * @experimental The Metric API is an experimental feature and may be subject to change.\n */\nclass MetricHistogramWithComposedTags {\n parentHistogram;\n contributors;\n kind = 'histogram';\n constructor(parentHistogram, contributors) {\n this.parentHistogram = parentHistogram;\n this.contributors = contributors;\n }\n record(value, extraTags) {\n this.parentHistogram.record(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricHistogramWithComposedTags(this.parentHistogram, contributors);\n }\n get name() {\n return this.parentHistogram.name;\n }\n get valueType() {\n return this.parentHistogram.valueType;\n }\n get unit() {\n return this.parentHistogram.unit;\n }\n get description() {\n return this.parentHistogram.description;\n }\n}\n/**\n * @internal\n * @hidden\n */\nclass MetricGaugeWithComposedTags {\n parentGauge;\n contributors;\n kind = 'gauge';\n constructor(parentGauge, contributors) {\n this.parentGauge = parentGauge;\n this.contributors = contributors;\n }\n set(value, extraTags) {\n this.parentGauge.set(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricGaugeWithComposedTags(this.parentGauge, contributors);\n }\n get name() {\n return this.parentGauge.name;\n }\n get valueType() {\n return this.parentGauge.valueType;\n }\n get unit() {\n return this.parentGauge.unit;\n }\n get description() {\n return this.parentGauge.description;\n }\n}\n/**\n * @internal\n * @hidden\n */\nclass MetricUpDownCounterWithComposedTags {\n parentCounter;\n contributors;\n kind = 'up-down-counter';\n valueType = 'int';\n constructor(parentCounter, contributors) {\n this.parentCounter = parentCounter;\n this.contributors = contributors;\n }\n add(value, extraTags) {\n this.parentCounter.add(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricUpDownCounterWithComposedTags(this.parentCounter, contributors);\n }\n get name() {\n return this.parentCounter.name;\n }\n get unit() {\n return this.parentCounter.unit;\n }\n get description() {\n return this.parentCounter.description;\n }\n}\nfunction resolveTags(contributors, extraTags) {\n const resolved = {};\n for (const contributor of contributors) {\n Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor);\n }\n Object.assign(resolved, extraTags);\n return (0, internal_workflow_1.filterNullAndUndefined)(resolved);\n}\n/**\n * Append a tags contributor to the chain, merging it with the former last contributor if possible.\n *\n * If appending the new contributor results in no actual change to the chain of contributors, return\n * `existingContributors`; in that case, the caller should avoid creating a new object if possible.\n */\nfunction appendToChain(existingContributors, newContributor) {\n // If the new contributor is an empty object, then it results in no actual change to the chain\n if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) {\n return existingContributors;\n }\n // If existing chain is empty, then the new contributor is the chain\n if (existingContributors == null || existingContributors.length === 0) {\n return [newContributor];\n }\n // If both last contributor and new contributor are plain objects, merge them to a single object.\n const last = existingContributors[existingContributors.length - 1];\n if (typeof last === 'object' && typeof newContributor === 'object') {\n const merged = (0, internal_workflow_1.mergeObjects)(last, newContributor);\n if (merged === last)\n return existingContributors;\n return [...existingContributors.slice(0, -1), merged];\n }\n // Otherwise, just append the new contributor to the chain.\n return [...existingContributors, newContributor];\n}\n//# sourceMappingURL=metrics.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compileRetryPolicy = compileRetryPolicy;\nexports.decompileRetryPolicy = decompileRetryPolicy;\nconst errors_1 = require(\"./errors\");\nconst time_1 = require(\"./time\");\n/**\n * Turn a TS RetryPolicy into a proto compatible RetryPolicy\n */\nfunction compileRetryPolicy(retryPolicy) {\n if (retryPolicy.backoffCoefficient != null && retryPolicy.backoffCoefficient <= 0) {\n throw new errors_1.ValueError('RetryPolicy.backoffCoefficient must be greater than 0');\n }\n if (retryPolicy.maximumAttempts != null) {\n if (retryPolicy.maximumAttempts === Number.POSITIVE_INFINITY) {\n // drop field (Infinity is the default)\n const { maximumAttempts: _, ...without } = retryPolicy;\n retryPolicy = without;\n }\n else if (retryPolicy.maximumAttempts <= 0) {\n throw new errors_1.ValueError('RetryPolicy.maximumAttempts must be a positive integer');\n }\n else if (!Number.isInteger(retryPolicy.maximumAttempts)) {\n throw new errors_1.ValueError('RetryPolicy.maximumAttempts must be an integer');\n }\n }\n const maximumInterval = (0, time_1.msOptionalToNumber)(retryPolicy.maximumInterval);\n const initialInterval = (0, time_1.msToNumber)(retryPolicy.initialInterval ?? 1000);\n if (maximumInterval === 0) {\n throw new errors_1.ValueError('RetryPolicy.maximumInterval cannot be 0');\n }\n if (initialInterval === 0) {\n throw new errors_1.ValueError('RetryPolicy.initialInterval cannot be 0');\n }\n if (maximumInterval != null && maximumInterval < initialInterval) {\n throw new errors_1.ValueError('RetryPolicy.maximumInterval cannot be less than its initialInterval');\n }\n return {\n maximumAttempts: retryPolicy.maximumAttempts,\n initialInterval: (0, time_1.msToTs)(initialInterval),\n maximumInterval: (0, time_1.msOptionalToTs)(maximumInterval),\n backoffCoefficient: retryPolicy.backoffCoefficient,\n nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes,\n };\n}\n/**\n * Turn a proto compatible RetryPolicy into a TS RetryPolicy\n */\nfunction decompileRetryPolicy(retryPolicy) {\n if (!retryPolicy) {\n return undefined;\n }\n return {\n backoffCoefficient: retryPolicy.backoffCoefficient ?? undefined,\n maximumAttempts: retryPolicy.maximumAttempts ?? undefined,\n maximumInterval: (0, time_1.optionalTsToMs)(retryPolicy.maximumInterval),\n initialInterval: (0, time_1.optionalTsToMs)(retryPolicy.initialInterval),\n nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes ?? undefined,\n };\n}\n//# sourceMappingURL=retry-policy.js.map","\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeInitialVersioningBehavior = exports.encodeInitialVersioningBehavior = exports.InitialVersioningBehavior = exports.decodeVersioningBehavior = exports.encodeVersioningBehavior = exports.VersioningBehavior = void 0;\nexports.toCanonicalString = toCanonicalString;\nexports.convertDeploymentVersion = convertDeploymentVersion;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * @returns The canonical representation of a deployment version, which is a string in the format\n * `deploymentName.buildId`.\n */\nfunction toCanonicalString(version) {\n return `${version.deploymentName}.${version.buildId}`;\n}\n/**\n * Specifies when a workflow might move from a worker of one Build Id to another.\n *\n * * 'PINNED' - The workflow will be pinned to the current Build ID unless manually moved.\n * * 'AUTO_UPGRADE' - The workflow will automatically move to the latest version (default Build ID\n * of the task queue) when the next task is dispatched.\n */\nexports.VersioningBehavior = {\n PINNED: 'PINNED',\n AUTO_UPGRADE: 'AUTO_UPGRADE',\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.VersioningBehavior.PINNED]: 1,\n [exports.VersioningBehavior.AUTO_UPGRADE]: 2,\n UNSPECIFIED: 0,\n}, 'VERSIONING_BEHAVIOR_'), exports.encodeVersioningBehavior = _a[0], exports.decodeVersioningBehavior = _a[1];\n/**\n * Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n *\n * AUTO_UPGRADE - Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\n * start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\n * Versioning Behavior the workflow is annotated with in the workflow code.\n *\n * Note that if the previous workflow had a Pinned override, that override will be inherited by the\n * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\n * command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\n * behavior, the base version of the new run will be the Target Version as described above, but the\n * effective version will be whatever is specified by the Versioning Override until the override is removed.\n *\n * USE_RAMPING_VERSION - Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\n * Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\n * the workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping\n * Version by the time that the first workflow task is dispatched, it will be sent to the Current Version.\n *\n * It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\n * this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\n * is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\n * may be the Current Version instead of the Ramping Version.\n *\n * Note that if the workflow being continued has a Pinned override, that override will be inherited by the\n * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\n * command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n *\n * @experimental Versioning semantics with continue-as-new are experimental and may change in the future.\n */\nexports.InitialVersioningBehavior = {\n AUTO_UPGRADE: 'AUTO_UPGRADE',\n USE_RAMPING_VERSION: 'USE_RAMPING_VERSION',\n};\n_b = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.InitialVersioningBehavior.AUTO_UPGRADE]: 1,\n [exports.InitialVersioningBehavior.USE_RAMPING_VERSION]: 2,\n UNSPECIFIED: 0,\n}, 'CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_'), exports.encodeInitialVersioningBehavior = _b[0], exports.decodeInitialVersioningBehavior = _b[1];\n/**\n * @internal\n */\nfunction convertDeploymentVersion(v) {\n if (!v || !v.buildId) {\n return undefined;\n }\n return {\n buildId: v.buildId,\n deploymentName: v.deploymentName ?? '',\n };\n}\n//# sourceMappingURL=worker-deployments.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=workflow-definition-options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=workflow-handle.js.map","\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeWorkflowIdConflictPolicy = exports.encodeWorkflowIdConflictPolicy = exports.WorkflowIdConflictPolicy = exports.decodeWorkflowIdReusePolicy = exports.encodeWorkflowIdReusePolicy = exports.WorkflowIdReusePolicy = void 0;\nexports.extractWorkflowType = extractWorkflowType;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow.\n *\n * See {@link WorkflowOptions.workflowIdConflictPolicy} for what happens when trying to start a\n * Workflow with the same ID as a *Running* Workflow.\n *\n * Concept: {@link https://docs.temporal.io/workflow-execution/workflowid-runid#workflow-id-reuse-policy | Workflow Id Reuse Policy}\n *\n * *Note: It is not possible to have two actively running Workflows with the same ID.*\n *\n */\nexports.WorkflowIdReusePolicy = {\n /**\n * The Workflow can be started if the previous Workflow is in a Closed state.\n * @default\n */\n ALLOW_DUPLICATE: 'ALLOW_DUPLICATE',\n /**\n * The Workflow can be started if the previous Workflow is in a Closed state that is not Completed.\n */\n ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY',\n /**\n * The Workflow cannot be started.\n */\n REJECT_DUPLICATE: 'REJECT_DUPLICATE',\n /**\n * Terminate the current Workflow if one is already running; otherwise allow reusing the Workflow ID.\n *\n * @deprecated Use {@link WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE} instead, and\n * set `WorkflowOptions.workflowIdConflictPolicy` to\n * {@link WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING}.\n * When using this option, `WorkflowOptions.workflowIdConflictPolicy` must be left unspecified.\n */\n TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING',\n /// Anything below this line has been deprecated\n /**\n * No need to use this. If a `WorkflowIdReusePolicy` is set to this, or is not set at all, the default value will be used.\n *\n * @deprecated Either leave property `undefined`, or use {@link ALLOW_DUPLICATE} instead.\n */\n WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: undefined,\n /** @deprecated Use {@link ALLOW_DUPLICATE} instead. */\n WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: 'ALLOW_DUPLICATE',\n /** @deprecated Use {@link ALLOW_DUPLICATE_FAILED_ONLY} instead. */\n WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY',\n /** @deprecated Use {@link REJECT_DUPLICATE} instead. */\n WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: 'REJECT_DUPLICATE',\n /** @deprecated Use {@link TERMINATE_IF_RUNNING} instead. */\n WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING',\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.WorkflowIdReusePolicy.ALLOW_DUPLICATE]: 1,\n [exports.WorkflowIdReusePolicy.ALLOW_DUPLICATE_FAILED_ONLY]: 2,\n [exports.WorkflowIdReusePolicy.REJECT_DUPLICATE]: 3,\n [exports.WorkflowIdReusePolicy.TERMINATE_IF_RUNNING]: 4, // eslint-disable-line @typescript-eslint/no-deprecated\n UNSPECIFIED: 0,\n}, 'WORKFLOW_ID_REUSE_POLICY_'), exports.encodeWorkflowIdReusePolicy = _a[0], exports.decodeWorkflowIdReusePolicy = _a[1];\n/**\n * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow.\n *\n * See {@link WorkflowOptions.workflowIdReusePolicy} for what happens when trying to start a Workflow\n * with the same ID as a *Closed* Workflow.\n *\n * *Note: It is never possible to have two _actively running_ Workflows with the same ID.*\n */\nexports.WorkflowIdConflictPolicy = {\n /**\n * Do not start a new Workflow. Instead raise a `WorkflowExecutionAlreadyStartedError`.\n */\n FAIL: 'FAIL',\n /**\n * Do not start a new Workflow. Instead return a Workflow Handle for the already Running Workflow.\n */\n USE_EXISTING: 'USE_EXISTING',\n /**\n * Start a new Workflow, terminating the current workflow if one is already running.\n */\n TERMINATE_EXISTING: 'TERMINATE_EXISTING',\n};\n_b = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.WorkflowIdConflictPolicy.FAIL]: 1,\n [exports.WorkflowIdConflictPolicy.USE_EXISTING]: 2,\n [exports.WorkflowIdConflictPolicy.TERMINATE_EXISTING]: 3,\n UNSPECIFIED: 0,\n}, 'WORKFLOW_ID_CONFLICT_POLICY_'), exports.encodeWorkflowIdConflictPolicy = _b[0], exports.decodeWorkflowIdConflictPolicy = _b[1];\nfunction extractWorkflowType(workflowTypeOrFunc) {\n if (typeof workflowTypeOrFunc === 'string')\n return workflowTypeOrFunc;\n if (typeof workflowTypeOrFunc === 'function') {\n if (workflowTypeOrFunc?.name)\n return workflowTypeOrFunc.name;\n throw new TypeError('Invalid workflow type: the workflow function is anonymous');\n }\n throw new TypeError(`Invalid workflow type: expected either a string or a function, got '${typeof workflowTypeOrFunc}'`);\n}\n//# sourceMappingURL=workflow-options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=versioning-intent.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypedSearchAttributes = exports.TypedSearchAttributeUpdateValue = exports.TypedSearchAttributeValue = exports._ = exports.encodeSearchAttributeIndexedValueType = exports.SearchAttributeType = void 0;\nexports.isValidValueForType = isValidValueForType;\nexports.defineSearchAttributeKey = defineSearchAttributeKey;\nconst internal_workflow_1 = require(\"./internal-workflow\");\nexports.SearchAttributeType = {\n TEXT: 'TEXT',\n KEYWORD: 'KEYWORD',\n INT: 'INT',\n DOUBLE: 'DOUBLE',\n BOOL: 'BOOL',\n DATETIME: 'DATETIME',\n KEYWORD_LIST: 'KEYWORD_LIST',\n};\n// Note: encodeSearchAttributeIndexedValueType exported for use in tests to register search attributes\n// ts-prune-ignore-next\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.SearchAttributeType.TEXT]: 1,\n [exports.SearchAttributeType.KEYWORD]: 2,\n [exports.SearchAttributeType.INT]: 3,\n [exports.SearchAttributeType.DOUBLE]: 4,\n [exports.SearchAttributeType.BOOL]: 5,\n [exports.SearchAttributeType.DATETIME]: 6,\n [exports.SearchAttributeType.KEYWORD_LIST]: 7,\n UNSPECIFIED: 0,\n}, 'INDEXED_VALUE_TYPE_'), exports.encodeSearchAttributeIndexedValueType = _a[0], exports._ = _a[1];\nfunction isValidValueForType(type, value) {\n switch (type) {\n case exports.SearchAttributeType.TEXT:\n case exports.SearchAttributeType.KEYWORD:\n return typeof value === 'string';\n case exports.SearchAttributeType.INT:\n return Number.isInteger(value);\n case exports.SearchAttributeType.DOUBLE:\n return typeof value === 'number';\n case exports.SearchAttributeType.BOOL:\n return typeof value === 'boolean';\n case exports.SearchAttributeType.DATETIME:\n return value instanceof Date;\n case exports.SearchAttributeType.KEYWORD_LIST:\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n default:\n return false;\n }\n}\nfunction defineSearchAttributeKey(name, type) {\n return { name, type };\n}\nclass BaseSearchAttributeValue {\n _type;\n _value;\n constructor(type, value) {\n this._type = type;\n this._value = value;\n }\n get type() {\n return this._type;\n }\n get value() {\n return this._value;\n }\n}\n// Internal type for class private data.\n// Exported for use in payload conversion.\nclass TypedSearchAttributeValue extends BaseSearchAttributeValue {\n}\nexports.TypedSearchAttributeValue = TypedSearchAttributeValue;\n// ts-prune-ignore-next\nclass TypedSearchAttributeUpdateValue extends BaseSearchAttributeValue {\n}\nexports.TypedSearchAttributeUpdateValue = TypedSearchAttributeUpdateValue;\nclass TypedSearchAttributes {\n searchAttributes = {};\n constructor(initialAttributes) {\n if (initialAttributes === undefined)\n return;\n for (const pair of initialAttributes) {\n if (pair.key.name in this.searchAttributes) {\n throw new Error(`Duplicate search attribute key: ${pair.key.name}`);\n }\n this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value);\n }\n }\n get(key) {\n const attr = this.searchAttributes[key.name];\n // Key not found or type mismatch.\n if (attr === undefined || !isValidValueForType(key.type, attr.value)) {\n return undefined;\n }\n return attr.value;\n }\n /** Returns a deep copy of the given TypedSearchAttributes instance */\n copy() {\n const state = {};\n for (const [key, attr] of Object.entries(this.searchAttributes)) {\n // Create a new instance with the same properties\n let value = attr.value;\n // For non-primitive types, create a deep copy\n if (attr.value instanceof Date) {\n value = new Date(attr.value);\n }\n else if (Array.isArray(attr.value)) {\n value = [...attr.value];\n }\n state[key] = new TypedSearchAttributeValue(attr.type, value);\n }\n // Create return value with manually assigned state.\n const res = new TypedSearchAttributes();\n res.searchAttributes = state;\n return res;\n }\n /**\n * @hidden\n * Return JSON representation of this class as SearchAttributePair[]\n * Default toJSON method is not used because it's JSON representation includes private state.\n */\n toJSON() {\n return this.getAll();\n }\n /** Returns a copy of the current TypedSearchAttributes instance with the updated attributes. */\n updateCopy(updates) {\n // Create a deep copy of the current instance.\n const res = this.copy();\n // Apply updates.\n res.update(updates);\n return res;\n }\n // Performs direct mutation on the current instance.\n update(updates) {\n // Apply updates.\n for (const pair of updates) {\n // Delete attribute.\n if (pair.value === null) {\n // Delete only if the update matches a key and type.\n const attrVal = this.searchAttributes[pair.key.name];\n if (attrVal && attrVal.type === pair.key.type) {\n delete this.searchAttributes[pair.key.name];\n }\n continue;\n }\n // Add or update attribute.\n this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value);\n }\n }\n getAll() {\n const res = [];\n for (const [key, attr] of Object.entries(this.searchAttributes)) {\n const attrKey = { name: key, type: attr.type };\n // Sanity check, should always be legal.\n if (isValidValueForType(attrKey.type, attr.value)) {\n res.push({ key: attrKey, value: attr.value });\n }\n }\n return res;\n }\n static getKeyFromUntyped(key, value) {\n if (value == null) {\n return;\n }\n // Unpack single-element arrays.\n const val = value.length === 1 ? value[0] : value;\n switch (typeof val) {\n case 'string':\n // Check if val is an ISO string, if so, return a DATETIME key.\n if (!isNaN(Date.parse(val)) && Date.parse(val) === new Date(val).getTime()) {\n return { name: key, type: exports.SearchAttributeType.DATETIME };\n }\n return { name: key, type: exports.SearchAttributeType.TEXT };\n case 'number':\n return {\n name: key,\n type: Number.isInteger(val) ? exports.SearchAttributeType.INT : exports.SearchAttributeType.DOUBLE,\n };\n case 'boolean':\n return { name: key, type: exports.SearchAttributeType.BOOL };\n case 'object':\n if (val instanceof Date) {\n return { name: key, type: exports.SearchAttributeType.DATETIME };\n }\n if (Array.isArray(val) && val.every((item) => typeof item === 'string')) {\n return { name: key, type: exports.SearchAttributeType.KEYWORD_LIST };\n }\n return;\n default:\n return;\n }\n }\n static toMetadataType(type) {\n switch (type) {\n case exports.SearchAttributeType.TEXT:\n return 'Text';\n case exports.SearchAttributeType.KEYWORD:\n return 'Keyword';\n case exports.SearchAttributeType.INT:\n return 'Int';\n case exports.SearchAttributeType.DOUBLE:\n return 'Double';\n case exports.SearchAttributeType.BOOL:\n return 'Bool';\n case exports.SearchAttributeType.DATETIME:\n return 'Datetime';\n case exports.SearchAttributeType.KEYWORD_LIST:\n return 'KeywordList';\n default:\n throw new Error(`Unknown search attribute type: ${type}`);\n }\n }\n static toSearchAttributeType(type) {\n // The type metadata is usually in PascalCase (e.g. \"KeywordList\") but in\n // rare cases may be in SCREAMING_SNAKE_CASE (e.g. \"INDEXED_VALUE_TYPE_KEYWORD_LIST\").\n switch (type) {\n case 'Text':\n case 'INDEXED_VALUE_TYPE_TEXT':\n return exports.SearchAttributeType.TEXT;\n case 'Keyword':\n case 'INDEXED_VALUE_TYPE_KEYWORD':\n return exports.SearchAttributeType.KEYWORD;\n case 'Int':\n case 'INDEXED_VALUE_TYPE_INT':\n return exports.SearchAttributeType.INT;\n case 'Double':\n case 'INDEXED_VALUE_TYPE_DOUBLE':\n return exports.SearchAttributeType.DOUBLE;\n case 'Bool':\n case 'INDEXED_VALUE_TYPE_BOOL':\n return exports.SearchAttributeType.BOOL;\n case 'Datetime':\n case 'INDEXED_VALUE_TYPE_DATETIME':\n return exports.SearchAttributeType.DATETIME;\n case 'KeywordList':\n case 'INDEXED_VALUE_TYPE_KEYWORD_LIST':\n return exports.SearchAttributeType.KEYWORD_LIST;\n default:\n return;\n }\n }\n}\nexports.TypedSearchAttributes = TypedSearchAttributes;\n//# sourceMappingURL=search-attributes.js.map","\"use strict\";\n/**\n * Common library for code that's used across the Client, Worker, and/or Workflow\n *\n * @module\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defineSearchAttributeKey = exports.TypedSearchAttributes = exports.SearchAttributeType = exports.SuggestContinueAsNewReason = exports.ActivityCancellationDetails = void 0;\nexports.u8 = u8;\nexports.str = str;\nexports.errorMessage = errorMessage;\nexports.errorCode = errorCode;\nconst encoding = __importStar(require(\"./encoding\"));\nconst helpers = __importStar(require(\"./type-helpers\"));\n__exportStar(require(\"./activity-options\"), exports);\nvar activity_cancellation_details_1 = require(\"./activity-cancellation-details\");\nObject.defineProperty(exports, \"ActivityCancellationDetails\", { enumerable: true, get: function () { return activity_cancellation_details_1.ActivityCancellationDetails; } });\nvar continue_as_new_1 = require(\"./continue-as-new\");\nObject.defineProperty(exports, \"SuggestContinueAsNewReason\", { enumerable: true, get: function () { return continue_as_new_1.SuggestContinueAsNewReason; } });\n__exportStar(require(\"./converter/data-converter\"), exports);\n__exportStar(require(\"./converter/failure-converter\"), exports);\n__exportStar(require(\"./converter/payload-codec\"), exports);\n__exportStar(require(\"./converter/payload-converter\"), exports);\n__exportStar(require(\"./converter/types\"), exports);\n__exportStar(require(\"./deprecated-time\"), exports);\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./failure\"), exports);\n__exportStar(require(\"./interfaces\"), exports);\n__exportStar(require(\"./logger\"), exports);\n__exportStar(require(\"./priority\"), exports);\n__exportStar(require(\"./metrics\"), exports);\n__exportStar(require(\"./retry-policy\"), exports);\n__exportStar(require(\"./worker-deployments\"), exports);\n__exportStar(require(\"./workflow-definition-options\"), exports);\n__exportStar(require(\"./workflow-handle\"), exports);\n__exportStar(require(\"./workflow-options\"), exports);\n__exportStar(require(\"./versioning-intent\"), exports);\nvar search_attributes_1 = require(\"./search-attributes\");\nObject.defineProperty(exports, \"SearchAttributeType\", { enumerable: true, get: function () { return search_attributes_1.SearchAttributeType; } });\nObject.defineProperty(exports, \"TypedSearchAttributes\", { enumerable: true, get: function () { return search_attributes_1.TypedSearchAttributes; } });\nObject.defineProperty(exports, \"defineSearchAttributeKey\", { enumerable: true, get: function () { return search_attributes_1.defineSearchAttributeKey; } });\n/**\n * Encode a UTF-8 string into a Uint8Array\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction u8(s) {\n return encoding.encode(s);\n}\n/**\n * Decode a Uint8Array into a UTF-8 string\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction str(arr) {\n return encoding.decode(arr);\n}\n/**\n * Get `error.message` (or `undefined` if not present)\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction errorMessage(error) {\n return helpers.errorMessage(error);\n}\n/**\n * Get `error.code` (or `undefined` if not present)\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction errorCode(error) {\n return helpers.errorCode(error);\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getActivator = void 0;\nexports.setActivator = setActivator;\nexports.maybeGetActivator = maybeGetActivator;\nexports.assertInWorkflowContext = assertInWorkflowContext;\nconst common_1 = require(\"@temporalio/common\");\nfunction setActivator(activator) {\n globalThis.__TEMPORAL_ACTIVATOR__ = activator;\n}\nfunction maybeGetActivator() {\n return globalThis.__TEMPORAL_ACTIVATOR__;\n}\nfunction assertInWorkflowContext(uninitializedErrorMessage) {\n const activator = maybeGetActivator();\n if (activator == null)\n throw new common_1.IllegalStateError(uninitializedErrorMessage);\n return activator;\n}\n// This is really just an alias for `assertInWorkflowContext` with a default error message,\n// because that name better conveys the intent in some very common use cases.\nexports.getActivator = assertInWorkflowContext.bind(null, 'Workflow uninitialized');\n//# sourceMappingURL=global-attributes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.untrackPromise = untrackPromise;\nconst global_attributes_1 = require(\"./global-attributes\");\n/**\n * Helper function to remove a promise from being tracked for stack trace query purposes\n */\nfunction untrackPromise(promise) {\n const store = (0, global_attributes_1.maybeGetActivator)()?.promiseStackStore;\n if (!store)\n return;\n store.childToParent.delete(promise);\n store.promiseToStack.delete(promise);\n}\n//# sourceMappingURL=stack-helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SdkFlags = void 0;\nexports.assertValidFlag = assertValidFlag;\nconst flagsRegistry = new Map();\nexports.SdkFlags = {\n /**\n * This flag gates multiple fixes related to cancellation scopes and timers introduced in 1.10.2/1.11.0:\n * - Cancellation of a non-cancellable scope no longer propagates to children scopes\n * (see https://github.com/temporalio/sdk-typescript/issues/1423).\n * - CancellationScope.withTimeout(fn) now cancel the timer if `fn` completes before expiration\n * of the timeout, similar to how `condition(fn, timeout)` works.\n * - Timers created using setTimeout can now be intercepted.\n *\n * @since Introduced in 1.10.2/1.11.0. However, due to an SDK bug, SDKs v1.11.0 and v1.11.1 were not\n * properly writing back the flags to history, possibly resulting in NDE on replay. We therefore\n * consider that a WFT emitted by Worker v1.11.0 or v1.11.1 to implicitly have this flag on.\n */\n NonCancellableScopesAreShieldedFromPropagation: defineFlag(1, true, [buildIdSdkVersionMatches(/1\\.11\\.[01]/)]),\n /**\n * Prior to 1.11.0, when processing a Workflow activation, the SDK would execute `notifyHasPatch`\n * and `signalWorkflow` jobs in distinct phases, before other types of jobs. The primary reason\n * behind that multi-phase algorithm was to avoid the possibility that a Workflow execution might\n * complete before all incoming signals have been dispatched (at least to the point that the\n * _synchronous_ part of the handler function has been executed).\n *\n * This flag replaces that multi-phase algorithm with a simpler one where jobs are simply sorted as\n * `(signals and updates) -> others`, but without processing them as distinct batches (i.e. without\n * leaving/reentering the VM context between each group, which automatically triggers the execution\n * of all outstanding microtasks). That single-phase approach resolves a number of quirks of the\n * former algorithm, and yet still satisfies to the original requirement of ensuring that every\n * `signalWorkflow` jobs - and now `doUpdate` jobs as well - have been given a proper chance to\n * execute before the Workflow main function might completes.\n *\n * @since Introduced in 1.11.0. This change is not rollback-safe. However, due to an SDK bug, SDKs\n * v1.11.0 and v1.11.1 were not properly writing back the flags to history, possibly resulting\n * in NDE on replay. We therefore consider that a WFT emitted by Worker v1.11.0 or v1.11.1\n * to implicitely have this flag on.\n */\n ProcessWorkflowActivationJobsAsSingleBatch: defineFlag(2, true, [buildIdSdkVersionMatches(/1\\.11\\.[01]/)]),\n /**\n * In 1.11.5 the `handleSignal` interceptor was added to @temporalio/interceptors-opentelemetry\n * which added a yield point. The added yield point can cause NDE if there was a signal handler and\n * the workflow was started with a signal.\n *\n * This yield point was removed in 1.13.2, but in order to prevent workflows from the\n * affected versions resulting in NDE, we have to inject the yield point on replay.\n * @since Introduced in 1.13.2.\n */\n OpenTelemetryInterceptorsTracesInboundSignals: defineFlag(3, true, [isAtLeast({ major: 1, minor: 11, patch: 5 })]),\n /**\n * In 1.11.6, the `scheduleLocalActivity` interceptor was added to\n * `@temporalio/interceptors-opentelemetry` which added a yield point to the\n * outbound interceptor. This yield point was removed in 1.13.2.\n *\n * @since Introduced in 1.13.2\n */\n OpenTelemetryInterceptorsTracesLocalActivities: defineFlag(4, true, [isAtLeast({ major: 1, minor: 11, patch: 6 })]),\n /**\n * The interceptors provided by @temporalio/interceptors-opentelemetry initially had unnecessary\n * yield points on calling to `extractContextFromHeaders`.\n * If replaying a workflow created from these versions a yield point is injected to prevent any NDE.\n *\n * If the history does not include the SDK version, default to extra yields since the yields were present since the OTEL\n * package was created.\n *\n * @since Introduced in 1.13.2\n */\n OpenTelemetryInterceporsAvoidsExtraYields: defineFlag(5, true, [isAtLeast({ major: 1, minor: 13, patch: 2 })]),\n /**\n * In 1.13.3, all remaining interceptor methods were implemented in @temporalio/interceptors-opentelemetry\n * including `handleUpdate`, `validateUpdate`, `handleQuery`, `startTimer`, and `startNexusOperation`.\n * These add instrumentation and yield points that were not present in earlier versions.\n * This flag gates these new interceptor methods to prevent NDE on replay of workflows from earlier versions.\n *\n * @since Introduced in 1.13.3\n */\n OpenTelemetryInterceptorsInstrumentsAllMethods: defineFlag(6, true),\n};\nfunction defineFlag(id, def, alternativeConditions) {\n const flag = { id, default: def, alternativeConditions };\n flagsRegistry.set(id, flag);\n return flag;\n}\nfunction assertValidFlag(id) {\n if (!flagsRegistry.has(id))\n throw new TypeError(`Unknown SDK flag: ${id}`);\n}\nfunction buildIdSdkVersionMatches(version) {\n const regex = new RegExp(`^@temporalio/worker@(${version.source})[+]`);\n return ({ info }) => info.currentBuildId != null && regex.test(info.currentBuildId);\n}\n/**\n * Creates an `AltConditionFn` that checks if the SDK version is equal to or after the provided version.\n * An optional default can be provided in case the SDK version is not available.\n */\nfunction isAtLeast(compare, missingDefault) {\n return (ctx) => {\n return isCompared(compare, -1, missingDefault)(ctx) || isCompared(compare, 0, missingDefault)(ctx);\n };\n}\nfunction isCompared(compare, comparison, missingDefault = false) {\n return ({ sdkVersion }) => {\n if (!sdkVersion)\n return missingDefault;\n const version = parseSemver(sdkVersion);\n if (!version)\n return missingDefault;\n return compareSemver(compare, version) === comparison;\n };\n}\nfunction parseSemver(version) {\n try {\n const [_, major, minor, patch] = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n return {\n major: Number.parseInt(major),\n minor: Number.parseInt(minor),\n patch: Number.parseInt(patch),\n };\n }\n catch {\n return undefined;\n }\n}\nfunction compareSemver(a, b) {\n if (a.major < b.major)\n return -1;\n if (a.major > b.major)\n return +1;\n if (a.minor < b.minor)\n return -1;\n if (a.minor > b.minor)\n return +1;\n if (a.patch < b.patch)\n return -1;\n if (a.patch > b.patch)\n return +1;\n return 0;\n}\n//# sourceMappingURL=flags.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RootCancellationScope = exports.CancellationScope = exports.AsyncLocalStorage = void 0;\nexports.registerSleepImplementation = registerSleepImplementation;\nconst common_1 = require(\"@temporalio/common\");\nconst time_1 = require(\"@temporalio/common/lib/time\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst flags_1 = require(\"./flags\");\n// AsyncLocalStorage is injected via vm module into global scope.\n// In case Workflow code is imported in Node.js context, replace with an empty class.\nexports.AsyncLocalStorage = globalThis.AsyncLocalStorage ?? class {\n};\n/** Magic symbol used to create the root scope - intentionally not exported */\nconst NO_PARENT = Symbol('NO_PARENT');\n/**\n * Cancellation Scopes provide the mechanic by which a Workflow may gracefully handle incoming requests for cancellation\n * (e.g. in response to {@link WorkflowHandle.cancel} or through the UI or CLI), as well as request cancellation of\n * cancellable operations it owns (e.g. Activities, Timers, Child Workflows, etc).\n *\n * Cancellation Scopes form a tree, with the Workflow's main function running in the root scope of that tree.\n * By default, cancellation propagates down from a parent scope to its children and its cancellable operations.\n * A non-cancellable scope can receive cancellation requests, but is never effectively considered as cancelled,\n * thus shieldding its children and cancellable operations from propagation of cancellation requests it receives.\n *\n * Scopes are created using the `CancellationScope` constructor or the static helper methods {@link cancellable},\n * {@link nonCancellable} and {@link withTimeout}. `withTimeout` creates a scope that automatically cancels itself after\n * some duration.\n *\n * Cancellation of a cancellable scope results in all operations created directly in that scope to throw a\n * {@link CancelledFailure} (either directly, or as the `cause` of an {@link ActivityFailure} or a\n * {@link ChildWorkflowFailure}). Further attempt to create new cancellable scopes or cancellable operations within a\n * scope that has already been cancelled will also immediately throw a {@link CancelledFailure} exception. It is however\n * possible to create a non-cancellable scope at that point; this is often used to execute rollback or cleanup\n * operations. For example:\n *\n * ```ts\n * async function myWorkflow(...): Promise<void> {\n * try {\n * // This activity runs in the root cancellation scope. Therefore, a cancellation request on\n * // the Workflow execution (e.g. through the UI or CLI) automatically propagates to this\n * // activity. Assuming that the activity properly handle the cancellation request, then the\n * // call below will throw an `ActivityFailure` exception, with `cause` sets to an\n * // instance of `CancelledFailure`.\n * await someActivity();\n * } catch (e) {\n * if (isCancellation(e)) {\n * // Run cleanup activity in a non-cancellable scope\n * await CancellationScope.nonCancellable(async () => {\n * await cleanupActivity();\n * }\n * } else {\n * throw e;\n * }\n * }\n * }\n * ```\n *\n * A cancellable scope may be programatically cancelled by calling {@link cancel|`scope.cancel()`}`. This may be used,\n * for example, to explicitly request cancellation of an Activity or Child Workflow:\n *\n * ```ts\n * const cancellableActivityScope = new CancellationScope();\n * const activityPromise = cancellableActivityScope.run(() => someActivity());\n * cancellableActivityScope.cancel(); // Cancels the activity\n * await activityPromise; // Throws `ActivityFailure` with `cause` set to `CancelledFailure`\n * ```\n */\nclass CancellationScope {\n /**\n * Time in milliseconds before the scope cancellation is automatically requested\n */\n timeout;\n /**\n * If false, then this scope will never be considered cancelled, even if a cancellation request is received (either\n * directly by calling `scope.cancel()` or indirectly by cancelling a cancellable parent scope). This effectively\n * shields the scope's children and cancellable operations from propagation of cancellation requests made on the\n * non-cancellable scope.\n *\n * Note that the Promise returned by the `run` function of non-cancellable scope may still throw a `CancelledFailure`\n * if such an exception is thrown from within that scope (e.g. by directly cancelling a cancellable child scope).\n */\n cancellable;\n /**\n * An optional CancellationScope (useful for running background tasks), defaults to {@link CancellationScope.current}()\n */\n parent;\n /**\n * A Promise that throws when a cancellable scope receives a cancellation request, either directly\n * (i.e. `scope.cancel()`), or indirectly (by cancelling a cancellable parent scope).\n *\n * Note that a non-cancellable scope may receive cancellation requests, resulting in the `cancelRequested` promise for\n * that scope to throw, though the scope will not effectively get cancelled (i.e. `consideredCancelled` will still\n * return `false`, and cancellation will not be propagated to child scopes and contained operations).\n */\n cancelRequested;\n #cancelRequested = false;\n // Typescript does not understand that the Promise executor runs synchronously in the constructor\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n reject;\n constructor(options) {\n this.timeout = (0, time_1.msOptionalToNumber)(options?.timeout);\n this.cancellable = options?.cancellable ?? true;\n this.cancelRequested = new Promise((_, reject) => {\n // @ts-expect-error TSC doesn't understand that the Promise executor runs synchronously\n this.reject = (err) => {\n this.#cancelRequested = true;\n reject(err);\n };\n });\n (0, stack_helpers_1.untrackPromise)(this.cancelRequested);\n // Avoid unhandled rejections\n (0, stack_helpers_1.untrackPromise)(this.cancelRequested.catch(() => undefined));\n if (options?.parent !== NO_PARENT) {\n this.parent = options?.parent || CancellationScope.current();\n if (this.parent.cancellable ||\n (this.parent.#cancelRequested &&\n !(0, global_attributes_1.getActivator)().hasFlag(flags_1.SdkFlags.NonCancellableScopesAreShieldedFromPropagation))) {\n this.#cancelRequested = this.parent.#cancelRequested;\n (0, stack_helpers_1.untrackPromise)(this.parent.cancelRequested.catch((err) => {\n this.reject(err);\n }));\n }\n else {\n (0, stack_helpers_1.untrackPromise)(this.parent.cancelRequested.catch((err) => {\n if (!(0, global_attributes_1.getActivator)().hasFlag(flags_1.SdkFlags.NonCancellableScopesAreShieldedFromPropagation)) {\n this.reject(err);\n }\n }));\n }\n }\n }\n /**\n * Whether the scope was effectively cancelled. A non-cancellable scope can never be considered cancelled.\n */\n get consideredCancelled() {\n return this.#cancelRequested && this.cancellable;\n }\n /**\n * Activate the scope as current and run `fn`\n *\n * Any timers, Activities, Triggers and CancellationScopes created in the body of `fn`\n * automatically link their cancellation to this scope.\n *\n * @return the result of `fn`\n */\n run(fn) {\n return storage.run(this, this.runInContext.bind(this, fn));\n }\n /**\n * Method that runs a function in AsyncLocalStorage context.\n *\n * Could have been written as anonymous function, made into a method for improved stack traces.\n */\n async runInContext(fn) {\n let timerScope;\n if (this.timeout) {\n timerScope = new CancellationScope();\n (0, stack_helpers_1.untrackPromise)(timerScope\n .run(() => sleep(this.timeout))\n .then(() => this.cancel(), () => {\n // scope was already cancelled, ignore\n }));\n }\n try {\n return await fn();\n }\n finally {\n if (timerScope &&\n !timerScope.consideredCancelled &&\n (0, global_attributes_1.getActivator)().hasFlag(flags_1.SdkFlags.NonCancellableScopesAreShieldedFromPropagation)) {\n timerScope.cancel();\n }\n }\n }\n /**\n * Request to cancel the scope and linked children\n */\n cancel() {\n this.reject(new common_1.CancelledFailure('Cancellation scope cancelled'));\n }\n /**\n * Get the current \"active\" scope\n */\n static current() {\n // Using globals directly instead of a helper function to avoid circular import\n return storage.getStore() ?? globalThis.__TEMPORAL_ACTIVATOR__.rootScope;\n }\n /** Alias to `new CancellationScope({ cancellable: true }).run(fn)` */\n static cancellable(fn) {\n return new this({ cancellable: true }).run(fn);\n }\n /** Alias to `new CancellationScope({ cancellable: false }).run(fn)` */\n static nonCancellable(fn) {\n return new this({ cancellable: false }).run(fn);\n }\n /** Alias to `new CancellationScope({ cancellable: true, timeout }).run(fn)` */\n static withTimeout(timeout, fn) {\n return new this({ cancellable: true, timeout }).run(fn);\n }\n}\nexports.CancellationScope = CancellationScope;\nconst storage = new exports.AsyncLocalStorage();\nclass RootCancellationScope extends CancellationScope {\n constructor() {\n super({ cancellable: true, parent: NO_PARENT });\n }\n cancel() {\n this.reject(new common_1.CancelledFailure('Workflow cancelled'));\n }\n}\nexports.RootCancellationScope = RootCancellationScope;\n/** This function is here to avoid a circular dependency between this module and workflow.ts */\nlet sleep = (_) => {\n throw new common_1.IllegalStateError('Workflow has not been properly initialized');\n};\nfunction registerSleepImplementation(fn) {\n sleep = fn;\n}\n//# sourceMappingURL=cancellation-scope.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LocalActivityDoBackoff = exports.DeterminismViolationError = exports.WorkflowError = void 0;\nexports.isCancellation = isCancellation;\nconst common_1 = require(\"@temporalio/common\");\nconst type_helpers_1 = require(\"@temporalio/common/lib/type-helpers\");\n/**\n * Base class for all workflow errors\n */\nlet WorkflowError = class WorkflowError extends Error {\n};\nexports.WorkflowError = WorkflowError;\nexports.WorkflowError = WorkflowError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowError')\n], WorkflowError);\n/**\n * Thrown in workflow when it tries to do something that non-deterministic such as construct a WeakRef()\n */\nlet DeterminismViolationError = class DeterminismViolationError extends WorkflowError {\n};\nexports.DeterminismViolationError = DeterminismViolationError;\nexports.DeterminismViolationError = DeterminismViolationError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('DeterminismViolationError')\n], DeterminismViolationError);\n/**\n * A class that acts as a marker for this special result type\n */\nlet LocalActivityDoBackoff = class LocalActivityDoBackoff extends Error {\n backoff;\n constructor(backoff) {\n super();\n this.backoff = backoff;\n }\n};\nexports.LocalActivityDoBackoff = LocalActivityDoBackoff;\nexports.LocalActivityDoBackoff = LocalActivityDoBackoff = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('LocalActivityDoBackoff')\n], LocalActivityDoBackoff);\n/**\n * Returns whether provided `err` is caused by cancellation\n */\nfunction isCancellation(err) {\n return (err instanceof common_1.CancelledFailure ||\n ((err instanceof common_1.ActivityFailure || err instanceof common_1.ChildWorkflowFailure || err instanceof common_1.NexusOperationFailure) &&\n err.cause instanceof common_1.CancelledFailure));\n}\n//# sourceMappingURL=errors.js.map","\"use strict\";\n/**\n * Type definitions for Workflow interceptors.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interceptors.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeParentClosePolicy = exports.encodeParentClosePolicy = exports.ParentClosePolicy = exports.decodeChildWorkflowCancellationType = exports.encodeChildWorkflowCancellationType = exports.ChildWorkflowCancellationType = exports.ContinueAsNew = void 0;\nconst type_helpers_1 = require(\"@temporalio/common/lib/type-helpers\");\nconst enums_helpers_1 = require(\"@temporalio/common/lib/internal-workflow/enums-helpers\");\n/**\n * Not an actual error, used by the Workflow runtime to abort execution when {@link continueAsNew} is called\n */\nlet ContinueAsNew = class ContinueAsNew extends Error {\n command;\n constructor(command) {\n super('Workflow continued as new');\n this.command = command;\n }\n};\nexports.ContinueAsNew = ContinueAsNew;\nexports.ContinueAsNew = ContinueAsNew = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ContinueAsNew')\n], ContinueAsNew);\n/**\n * Determines:\n * - whether cancellation requests should be propagated from the Parent Workflow to the Child, and\n * - whether and when should the Child's cancellation be reported back to the Parent Workflow\n * (i.e. at which moment should the {@link executeChild}'s or {@link ChildWorkflowHandle.result}'s\n * promise fail with a `ChildWorkflowFailure`, with `cause` set to a `CancelledFailure`).\n *\n * Note that this setting only applies to cancellation originating from an external request for the\n * Parent Workflow itself, or from internal cancellation of the `CancellationScope` in which the\n * Child Workflow call was made. Eventual Cancellation of a Child Workflow on completion of the\n * Parent Workflow is controlled by the {@link ParentClosePolicy} setting.\n *\n * @default ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED\n */\n// MAINTENANCE: Keep this typedoc in sync with the `ChildWorkflowOptions.cancellationType` field\nexports.ChildWorkflowCancellationType = {\n /**\n * Do not propagate cancellation requests to the Child, and immediately report cancellation\n * to the caller.\n */\n ABANDON: 'ABANDON',\n /**\n * Propagate cancellation request from the Parent Workflow to the Child, yet _immediately_ report\n * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation\n * request.\n *\n * Note that this cancellation type provides no guarantee, from the Parent-side, that the\n * cancellation request will actually be atomically added to the Child workflow's history.\n * In particular, the Child may complete (either successfully or uncessfully) before the\n * cancellation is delivered, resulting in a situation where the Parent workflow thinks its child\n * was cancelled, but the child actually completed successfully.\n *\n * To guarantee that the Child will eventually be notified of the cancellation request,\n * use {@link WAIT_CANCELLATION_REQUESTED}.\n */\n TRY_CANCEL: 'TRY_CANCEL',\n /**\n * Propagate cancellation request from the Parent Workflow to the Child, then wait for the server\n * to confirm that the Child Workflow cancellation request was recorded in its history.\n *\n * This cancellation type guarantees that the Child will eventually be notified of the\n * cancellation request (that is, unless the Child terminates inbetween due to unexpected causes).\n */\n WAIT_CANCELLATION_REQUESTED: 'WAIT_CANCELLATION_REQUESTED',\n /**\n * Propagate cancellation request from the Parent Workflow to the Child, then wait for completion\n * of the Child Workflow.\n *\n * The Child may respect cancellation, in which case the Parent's `executeChild` or\n * `ChildWorkflowHandle.result` promise will fail with a `ChildWorkflowFailure`, with `cause`\n * set to a `CancelledFailure`. On the other hand, the Child may ignore the cancellation request,\n * in which case the corresponding promise will either resolve with a result (if Child completed\n * successfully) or reject with a different cause (if Child completed uncessfully).\n *\n * @default\n */\n WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED',\n};\n// ts-prune-ignore-next\n_a = (0, enums_helpers_1.makeProtoEnumConverters)({\n [exports.ChildWorkflowCancellationType.ABANDON]: 0,\n [exports.ChildWorkflowCancellationType.TRY_CANCEL]: 1,\n [exports.ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED]: 2,\n [exports.ChildWorkflowCancellationType.WAIT_CANCELLATION_REQUESTED]: 3,\n}, ''), exports.encodeChildWorkflowCancellationType = _a[0], exports.decodeChildWorkflowCancellationType = _a[1];\n/**\n * How a Child Workflow reacts to the Parent Workflow reaching a Closed state.\n *\n * @see {@link https://docs.temporal.io/concepts/what-is-a-parent-close-policy/ | Parent Close Policy}\n */\nexports.ParentClosePolicy = {\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @default\n */\n TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n */\n ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n */\n REQUEST_CANCEL: 'REQUEST_CANCEL',\n /// Anything below this line has been deprecated\n /**\n * If a `ParentClosePolicy` is set to this, or is not set at all, the server default value will be used.\n *\n * @deprecated Either leave property `undefined`, or set an explicit policy instead.\n */\n PARENT_CLOSE_POLICY_UNSPECIFIED: undefined,\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @deprecated Use {@link ParentClosePolicy.TERMINATE} instead.\n */\n PARENT_CLOSE_POLICY_TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n *\n * @deprecated Use {@link ParentClosePolicy.ABANDON} instead.\n */\n PARENT_CLOSE_POLICY_ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n *\n * @deprecated Use {@link ParentClosePolicy.REQUEST_CANCEL} instead.\n */\n PARENT_CLOSE_POLICY_REQUEST_CANCEL: 'REQUEST_CANCEL',\n};\n// ts-prune-ignore-next\n_b = (0, enums_helpers_1.makeProtoEnumConverters)({\n [exports.ParentClosePolicy.TERMINATE]: 1,\n [exports.ParentClosePolicy.ABANDON]: 2,\n [exports.ParentClosePolicy.REQUEST_CANCEL]: 3,\n UNSPECIFIED: 0,\n}, 'PARENT_CLOSE_POLICY_'), exports.encodeParentClosePolicy = _b[0], exports.decodeParentClosePolicy = _b[1];\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\n/**\n * Type definitions for the Workflow end of the sinks mechanism.\n *\n * Sinks are a mechanism for exporting data from the Workflow isolate to the\n * Node.js environment, they are necessary because the Workflow has no way to\n * communicate with the outside World.\n *\n * Sinks are typically used for exporting logs, metrics and traces out from the\n * Workflow.\n *\n * Sink functions may not return values to the Workflow in order to prevent\n * breaking determinism.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.proxySinks = proxySinks;\nconst global_attributes_1 = require(\"./global-attributes\");\n/**\n * Get a reference to Sinks for exporting data out of the Workflow.\n *\n * These Sinks **must** be registered with the Worker in order for this\n * mechanism to work.\n *\n * @example\n * ```ts\n * import { proxySinks, Sinks } from '@temporalio/workflow';\n *\n * interface MySinks extends Sinks {\n * logger: {\n * info(message: string): void;\n * error(message: string): void;\n * };\n * }\n *\n * const { logger } = proxySinks<MyDependencies>();\n * logger.info('setting up');\n *\n * export function myWorkflow() {\n * return {\n * async execute() {\n * logger.info(\"hey ho\");\n * logger.error(\"lets go\");\n * }\n * };\n * }\n * ```\n */\nfunction proxySinks() {\n return new Proxy({}, {\n get(_, ifaceName) {\n return new Proxy({}, {\n get(_, fnName) {\n return (...args) => {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Proxied sinks functions may only be used from a Workflow Execution.');\n activator.sinkCalls.push({\n ifaceName: ifaceName,\n fnName: fnName,\n // Sink function doesn't get called immediately. Make a clone of the sink's args, so that further mutations\n // to these objects don't corrupt the args that the sink function will receive. Only available from node 17.\n args: globalThis.structuredClone ? globalThis.structuredClone(args) : args,\n // activator.info is internally copy-on-write. This ensure that any further mutations\n // to the workflow state in the context of the present activation will not corrupt the\n // workflowInfo state that gets passed when the sink function actually gets called.\n workflowInfo: activator.info,\n });\n };\n },\n });\n },\n });\n}\n//# sourceMappingURL=sinks.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fillWithRandom = fillWithRandom;\nexports.uuid4FromRandom = uuid4FromRandom;\nfunction fillWithRandom(random, bytes) {\n for (let i = 0; i < bytes.length; ++i) {\n bytes[i] = Math.floor(random() * 0x100);\n }\n return bytes;\n}\nfunction uuid4FromRandom(random) {\n const ho = (n, p) => n.toString(16).padStart(p, '0');\n const view = new DataView(new ArrayBuffer(16));\n view.setUint32(0, (random() * 0x100000000) >>> 0);\n view.setUint32(4, (random() * 0x100000000) >>> 0);\n view.setUint32(8, (random() * 0x100000000) >>> 0);\n view.setUint32(12, (random() * 0x100000000) >>> 0);\n view.setUint8(6, (view.getUint8(6) & 0xf) | 0x40);\n view.setUint8(8, (view.getUint8(8) & 0x3f) | 0x80);\n return `${ho(view.getUint32(0), 8)}-${ho(view.getUint16(4), 4)}-${ho(view.getUint16(6), 4)}-${ho(view.getUint16(8), 4)}-${ho(view.getUint32(10), 8)}${ho(view.getUint16(14), 4)}`;\n}\n//# sourceMappingURL=random-helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.workflowRandom = void 0;\nexports.getRandomStream = getRandomStream;\nconst global_attributes_1 = require(\"./global-attributes\");\nconst random_helpers_1 = require(\"./random-helpers\");\nclass ActivatorRandomStream {\n activator;\n name;\n constructor(activator, name) {\n this.activator = activator;\n this.name = name;\n }\n random() {\n return this.activator.getNamedRandom(this.name)();\n }\n uuid4() {\n return (0, random_helpers_1.uuid4FromRandom)(() => this.random());\n }\n fill(bytes) {\n return (0, random_helpers_1.fillWithRandom)(() => this.random(), bytes);\n }\n with(fn) {\n return this.activator.withCurrentRandom(this, fn);\n }\n}\nclass DefaultWorkflowRandomStream {\n random() {\n return (0, global_attributes_1.assertInWorkflowContext)('Workflow.workflowRandom may only be used from workflow context.').random();\n }\n uuid4() {\n return (0, random_helpers_1.uuid4FromRandom)(() => this.random());\n }\n fill(bytes) {\n return (0, random_helpers_1.fillWithRandom)(() => this.random(), bytes);\n }\n with(fn) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.workflowRandom may only be used from workflow context.');\n return activator.withCurrentRandom(this, fn);\n }\n}\n/**\n * The default deterministic random stream for the current workflow execution.\n *\n * This exposes the same underlying sequence used by workflow-level `Math.random()`\n * when no named override is active. It can be useful for plugin/interceptor code\n * that wants an explicit handle to the main workflow random stream, including from\n * inside a temporary named scope established by another `WorkflowRandomStream`.\n *\n * @experimental This API may be removed or changed in the future.\n */\nexports.workflowRandom = new DefaultWorkflowRandomStream();\n/**\n * Get a named deterministic random stream for the current workflow execution.\n *\n * Named streams are derived from the workflow seed and a stable stream name,\n * without consuming the workflow's default `Math.random()` stream. Repeated\n * calls with the same `name` within a workflow execution refer to the same\n * logical stream state, including across activations.\n *\n * This is the preferred entry point for workflow plugins and interceptors that\n * need their own deterministic entropy. Use stable package- or module-style\n * names so the stream identity remains replay-safe, then keep the returned\n * `WorkflowRandomStream` around and call its methods directly.\n *\n * @experimental This API may be removed or changed in the future.\n */\nfunction getRandomStream(name) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.getRandomStream(...) may only be used from workflow context.');\n return new ActivatorRandomStream(activator, name);\n}\n//# sourceMappingURL=random-streams.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.composeInterceptorsWith = composeInterceptorsWith;\nexports.composeInterceptors = composeInterceptors;\n/**\n * Shared implementation for interceptor chaining.\n *\n * The workflow package needs one small behavioral extension over the generic interceptor\n * semantics: every `next(...)` continuation it hands to workflow interceptors must first\n * restore the workflow random scope that was current when that continuation was created.\n *\n * We keep the chain-construction loop here as the single source of truth so ordering and\n * basic composition behavior cannot drift between the generic implementation used by client,\n * worker, activity, and nexus code and the workflow-specific implementation that decorates\n * `next(...)` at each boundary. The only behavior that varies between callers is the\n * `wrapNext` hook: most packages use the identity wrapper, while workflow code supplies a\n * wrapper that re-enters the captured workflow async-local random scope.\n */\nfunction composeInterceptorsWith(interceptors, method, next, wrapNext) {\n let composedNext = next;\n for (let i = interceptors.length - 1; i >= 0; --i) {\n const interceptor = interceptors[i];\n if (interceptor?.[method] !== undefined) {\n const prev = wrapNext(composedNext);\n // We lose type safety here because Typescript can't deduce that interceptor[method] is a function that returns\n // the same type as Next<I, M>\n composedNext = ((input) => interceptor[method](input, prev));\n }\n }\n return composedNext;\n}\n/**\n * Compose all interceptor methods into a single function.\n *\n * Calling the composed function results in calling each of the provided interceptor, in order (from the first to\n * the last), followed by the original function provided as argument to `composeInterceptors()`.\n *\n * @param interceptors a list of interceptors\n * @param method the name of the interceptor method to compose\n * @param next the original function to be executed at the end of the interception chain\n */\n// ts-prune-ignore-next (imported via lib/interceptors)\nfunction composeInterceptors(interceptors, method, next) {\n return composeInterceptorsWith(interceptors, method, next, ((wrappedNext) => wrappedNext));\n}\n//# sourceMappingURL=interceptors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.composeInterceptors = composeInterceptors;\nconst interceptors_1 = require(\"@temporalio/common/lib/interceptors\");\nconst global_attributes_1 = require(\"./global-attributes\");\n/**\n * Compose workflow interceptors while making every `next(...)` continuation re-enter\n * the workflow-random scope that was current when that continuation was created.\n *\n * This is intentionally a thin wrapper over the shared interceptor composition helper\n * in `packages/common`. The shared helper owns the actual chain-construction algorithm,\n * ordering, and `next(...)` wiring so workflow code cannot silently drift away from the\n * semantics used by the rest of the SDK.\n *\n * The workflow-specific behavior lives entirely in the `wrapNext` hook we pass into that\n * shared helper. Each `next(...)` continuation handed to a workflow interceptor is wrapped\n * with `Activator.bindCurrentRandom(...)`, which captures the currently active workflow\n * random scope, including the absence of any scoped override. When the interceptor later\n * calls `next(...)`, the wrapper restores that captured scope before entering the rest of\n * the interceptor chain or the base workflow/runtime handler.\n *\n * That is the behavior we need for `WorkflowRandomStream.with(...)`: a temporary\n * plugin/interceptor scope should apply to the plugin's own code, but it must not\n * leak through `next(...)` into downstream workflow code unless that downstream code\n * explicitly establishes its own scope.\n */\nfunction composeInterceptors(interceptors, method, next) {\n const activator = (0, global_attributes_1.getActivator)();\n return (0, interceptors_1.composeInterceptorsWith)(interceptors, method, next, ((wrappedNext) => activator.bindCurrentRandom(wrappedNext)));\n}\n//# sourceMappingURL=interceptor-composition.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.userMetadataToPayload = userMetadataToPayload;\nconst payload_converter_1 = require(\"./converter/payload-converter\");\nfunction userMetadataToPayload(payloadConverter, staticSummary, staticDetails, context) {\n if (staticSummary == null && staticDetails == null)\n return undefined;\n const summary = (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticSummary, context);\n const details = (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticDetails, context);\n if (summary == null && details == null)\n return undefined;\n return { summary, details };\n}\n//# sourceMappingURL=user-metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.typedSearchAttributePayloadConverter = exports.TypedSearchAttributePayloadConverter = exports.searchAttributePayloadConverter = exports.SearchAttributePayloadConverter = void 0;\nexports.encodeUnifiedSearchAttributes = encodeUnifiedSearchAttributes;\nexports.decodeSearchAttributes = decodeSearchAttributes;\nexports.decodeTypedSearchAttributes = decodeTypedSearchAttributes;\nconst encoding_1 = require(\"../encoding\");\nconst errors_1 = require(\"../errors\");\nconst search_attributes_1 = require(\"../search-attributes\");\nconst payload_converter_1 = require(\"./payload-converter\");\n/**\n * Converts Search Attribute values using JsonPayloadConverter\n */\nclass SearchAttributePayloadConverter {\n jsonConverter = new payload_converter_1.JsonPayloadConverter();\n validNonDateTypes = ['string', 'number', 'boolean'];\n toPayload(values) {\n if (!Array.isArray(values)) {\n throw new errors_1.ValueError(`SearchAttribute value must be an array`);\n }\n if (values.length > 0) {\n const firstValue = values[0];\n const firstType = typeof firstValue;\n if (firstType === 'object') {\n for (const [idx, value] of values.entries()) {\n if (!(value instanceof Date)) {\n throw new errors_1.ValueError(`SearchAttribute values must arrays of strings, numbers, booleans, or Dates. The value ${value} at index ${idx} is of type ${typeof value}`);\n }\n }\n }\n else {\n if (!this.validNonDateTypes.includes(firstType)) {\n throw new errors_1.ValueError(`SearchAttribute array values must be: string | number | boolean | Date`);\n }\n for (const [idx, value] of values.entries()) {\n if (typeof value !== firstType) {\n throw new errors_1.ValueError(`All SearchAttribute array values must be of the same type. The first value ${firstValue} of type ${firstType} doesn't match value ${value} of type ${typeof value} at index ${idx}`);\n }\n }\n }\n }\n // JSON.stringify takes care of converting Dates to ISO strings\n const ret = this.jsonConverter.toPayload(values);\n if (ret === undefined) {\n throw new errors_1.ValueError('Could not convert search attributes to payloads');\n }\n return ret;\n }\n /**\n * Datetime Search Attribute values are converted to `Date`s\n */\n fromPayload(payload) {\n if (payload.metadata == null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n const value = this.jsonConverter.fromPayload(payload);\n let arrayWrappedValue = Array.isArray(value) ? value : [value];\n const searchAttributeType = payload.metadata.type ? (0, encoding_1.decode)(payload.metadata.type) : undefined;\n if (searchAttributeType === 'Datetime') {\n arrayWrappedValue = arrayWrappedValue.map((dateString) => new Date(dateString));\n }\n return arrayWrappedValue;\n }\n}\nexports.SearchAttributePayloadConverter = SearchAttributePayloadConverter;\nexports.searchAttributePayloadConverter = new SearchAttributePayloadConverter();\nclass TypedSearchAttributePayloadConverter {\n jsonConverter = new payload_converter_1.JsonPayloadConverter();\n toPayload(attr) {\n if (!(attr instanceof search_attributes_1.TypedSearchAttributeValue || attr instanceof search_attributes_1.TypedSearchAttributeUpdateValue)) {\n throw new errors_1.ValueError(`Expect input to be instance of TypedSearchAttributeValue or TypedSearchAttributeUpdateValue, got: ${JSON.stringify(attr)}`);\n }\n // We check for deletion as well as regular typed search attributes.\n if (attr.value !== null && !(0, search_attributes_1.isValidValueForType)(attr.type, attr.value)) {\n throw new errors_1.ValueError(`Invalid search attribute value ${attr.value} for given type ${attr.type}`);\n }\n // For server search attributes to work properly, we cannot set the metadata\n // type when we set null\n if (attr.value === null) {\n const payload = this.jsonConverter.toPayload(attr.value);\n if (payload === undefined) {\n throw new errors_1.ValueError('Could not convert typed search attribute to payload');\n }\n return payload;\n }\n // JSON.stringify takes care of converting Dates to ISO strings\n const payload = this.jsonConverter.toPayload(attr.value);\n if (payload === undefined) {\n throw new errors_1.ValueError('Could not convert typed search attribute to payload');\n }\n // Note: this shouldn't be the case but the compiler complains without this check.\n if (payload.metadata == null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n // Add encoded type of search attribute to metatdata\n payload.metadata['type'] = (0, encoding_1.encode)(search_attributes_1.TypedSearchAttributes.toMetadataType(attr.type));\n return payload;\n }\n // Note: type casting undefined values is not clear to caller.\n // We can't change the typing of the method to return undefined, it's not allowed by the interface.\n fromPayload(payload) {\n if (payload.metadata == null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n // If no 'type' metadata field or no given value, we skip.\n if (payload.metadata.type == null) {\n return undefined;\n }\n const type = search_attributes_1.TypedSearchAttributes.toSearchAttributeType((0, encoding_1.decode)(payload.metadata.type));\n // Unrecognized metadata type (sanity check).\n if (type === undefined) {\n return undefined;\n }\n let value = this.jsonConverter.fromPayload(payload);\n // Handle legacy values without KEYWORD_LIST type.\n if (type !== search_attributes_1.SearchAttributeType.KEYWORD_LIST && Array.isArray(value)) {\n // Cannot have an array with multiple values for non-KEYWORD_LIST type.\n if (value.length > 1) {\n return undefined;\n }\n // Unpack single value array.\n value = value[0];\n }\n if (type === search_attributes_1.SearchAttributeType.DATETIME && value) {\n value = new Date(value);\n }\n // Check if the value is a valid for the given type. If not, skip.\n if (!(0, search_attributes_1.isValidValueForType)(type, value)) {\n return undefined;\n }\n return new search_attributes_1.TypedSearchAttributeValue(type, value);\n }\n}\nexports.TypedSearchAttributePayloadConverter = TypedSearchAttributePayloadConverter;\nexports.typedSearchAttributePayloadConverter = new TypedSearchAttributePayloadConverter();\n// If both params are provided, conflicting keys will be overwritten by typedSearchAttributes.\nfunction encodeUnifiedSearchAttributes(searchAttributes, typedSearchAttributes) {\n return {\n ...(searchAttributes ? (0, payload_converter_1.mapToPayloads)(exports.searchAttributePayloadConverter, searchAttributes) : {}),\n ...(typedSearchAttributes\n ? (0, payload_converter_1.mapToPayloads)(exports.typedSearchAttributePayloadConverter, Object.fromEntries((Array.isArray(typedSearchAttributes) ? typedSearchAttributes : typedSearchAttributes.getAll()).map((pair) => {\n return [pair.key.name, new search_attributes_1.TypedSearchAttributeUpdateValue(pair.key.type, pair.value)];\n })))\n : {}),\n };\n}\nfunction decodeSearchAttributes(indexedFields) {\n if (!indexedFields)\n return {};\n return Object.fromEntries(Object.entries((0, payload_converter_1.mapFromPayloads)(exports.searchAttributePayloadConverter, indexedFields)).filter(([_, v]) => v && v.length > 0) // Filter out empty arrays returned by pre 1.18 servers\n );\n}\nfunction decodeTypedSearchAttributes(indexedFields) {\n return new search_attributes_1.TypedSearchAttributes(Object.entries((0, payload_converter_1.mapFromPayloads)(exports.typedSearchAttributePayloadConverter, indexedFields) ?? {}).reduce((acc, [k, attr]) => {\n // Filter out undefined values from converter.\n if (!attr) {\n return acc;\n }\n const key = { name: k, type: attr.type };\n // Ensure is valid pair.\n if ((0, search_attributes_1.isValidValueForType)(key.type, attr.value)) {\n acc.push({ key, value: attr.value });\n }\n return acc;\n }, []));\n}\n//# sourceMappingURL=payload-search-attributes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VersioningIntent = void 0;\nexports.versioningIntentToProto = versioningIntentToProto;\nconst type_helpers_1 = require(\"./type-helpers\");\n// Avoid importing the proto implementation to reduce workflow bundle size\n// Copied from coresdk.common.VersioningIntent\n/**\n * Protobuf enum representation of {@link VersioningIntentString}.\n *\n * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments\n */\nvar VersioningIntent;\n(function (VersioningIntent) {\n VersioningIntent[VersioningIntent[\"UNSPECIFIED\"] = 0] = \"UNSPECIFIED\";\n VersioningIntent[VersioningIntent[\"COMPATIBLE\"] = 1] = \"COMPATIBLE\";\n VersioningIntent[VersioningIntent[\"DEFAULT\"] = 2] = \"DEFAULT\";\n})(VersioningIntent || (exports.VersioningIntent = VersioningIntent = {}));\n(0, type_helpers_1.checkExtends)();\n(0, type_helpers_1.checkExtends)();\n/**\n * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments\n */\nfunction versioningIntentToProto(intent) {\n switch (intent) {\n case 'DEFAULT':\n return VersioningIntent.DEFAULT;\n case 'COMPATIBLE':\n return VersioningIntent.COMPATIBLE;\n case undefined:\n return VersioningIntent.UNSPECIFIED;\n default:\n (0, type_helpers_1.assertNever)('Unexpected VersioningIntent', intent);\n }\n}\n//# sourceMappingURL=versioning-intent-enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ENHANCED_STACK_TRACE_QUERY_NAME = exports.STACK_TRACE_QUERY_NAME = exports.TEMPORAL_RESERVED_PREFIX = void 0;\nexports.throwIfReservedName = throwIfReservedName;\nexports.TEMPORAL_RESERVED_PREFIX = '__temporal_';\nexports.STACK_TRACE_QUERY_NAME = '__stack_trace';\nexports.ENHANCED_STACK_TRACE_QUERY_NAME = '__enhanced_stack_trace';\n/**\n * Wire identifiers used by first-party SDK contrib packages. Each entry pairs\n * a name with the entity type it's allowed to register as; that pair bypasses\n * the {@link TEMPORAL_RESERVED_PREFIX} check at registration time. Registering\n * the same name as a different entity type is still rejected.\n */\nconst INTERNAL_HANDLER_NAME_ALLOWLIST = new Map([\n // @temporalio/workflow-streams\n ['__temporal_workflow_stream_publish', 'signal'],\n ['__temporal_workflow_stream_poll', 'update'],\n ['__temporal_workflow_stream_offset', 'query'],\n]);\n/**\n * Validates if the provided name contains any reserved prefixes or matches any reserved names.\n * Throws a TypeError if validation fails, with a specific message indicating whether the issue\n * is with a reserved prefix or an exact match to a reserved name.\n *\n * @param type The entity type being checked\n * @param name The name to check against reserved prefixes/names\n */\nfunction throwIfReservedName(type, name) {\n if (name.startsWith(exports.TEMPORAL_RESERVED_PREFIX) && INTERNAL_HANDLER_NAME_ALLOWLIST.get(name) !== type) {\n throw new TypeError(`Cannot use ${type} name: '${name}', with reserved prefix: '${exports.TEMPORAL_RESERVED_PREFIX}'`);\n }\n if (name === exports.STACK_TRACE_QUERY_NAME || name === exports.ENHANCED_STACK_TRACE_QUERY_NAME) {\n throw new TypeError(`Cannot use ${type} name: '${name}', which is a reserved name`);\n }\n}\n//# sourceMappingURL=reserved.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateScope = exports.AsyncLocalStorage = void 0;\n// AsyncLocalStorage is injected via vm module into global scope.\n// In case Workflow code is imported in Node.js context, replace with an empty class.\nexports.AsyncLocalStorage = globalThis.AsyncLocalStorage ?? class {\n};\nclass UpdateScope {\n /**\n * A workflow-unique identifier for this update.\n */\n id;\n /**\n * The update type name.\n */\n name;\n constructor(options) {\n this.id = options.id;\n this.name = options.name;\n }\n /**\n * Activate the scope as current and run the update handler `fn`.\n *\n * @return the result of `fn`\n */\n run(fn) {\n return storage.run(this, fn);\n }\n /**\n * Get the current \"active\" update scope.\n */\n static current() {\n return storage.getStore();\n }\n /** Alias to `new UpdateScope({ id, name }).run(fn)` */\n static updateWithInfo(id, name, fn) {\n return new this({ id, name }).run(fn);\n }\n}\nexports.UpdateScope = UpdateScope;\nconst storage = new exports.AsyncLocalStorage();\n//# sourceMappingURL=update-scope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.workflowMetadataQuery = exports.enhancedStackTraceQuery = exports.stackTraceQuery = exports.NotAnActivityMethod = void 0;\nexports.addDefaultWorkflowOptions = addDefaultWorkflowOptions;\nexports.sleep = sleep;\nexports.scheduleActivity = scheduleActivity;\nexports.scheduleLocalActivity = scheduleLocalActivity;\nexports.proxyActivities = proxyActivities;\nexports.proxyLocalActivities = proxyLocalActivities;\nexports.getExternalWorkflowHandle = getExternalWorkflowHandle;\nexports.startChild = startChild;\nexports.executeChild = executeChild;\nexports.workflowInfo = workflowInfo;\nexports.currentUpdateInfo = currentUpdateInfo;\nexports.inWorkflowContext = inWorkflowContext;\nexports.makeContinueAsNewFunc = makeContinueAsNewFunc;\nexports.continueAsNew = continueAsNew;\nexports.uuid4 = uuid4;\nexports.patched = patched;\nexports.deprecatePatch = deprecatePatch;\nexports.condition = condition;\nexports.defineUpdate = defineUpdate;\nexports.defineSignal = defineSignal;\nexports.defineQuery = defineQuery;\nexports.setHandler = setHandler;\nexports.setDefaultSignalHandler = setDefaultSignalHandler;\nexports.setDefaultUpdateHandler = setDefaultUpdateHandler;\nexports.setDefaultQueryHandler = setDefaultQueryHandler;\nexports.upsertSearchAttributes = upsertSearchAttributes;\nexports.upsertMemo = upsertMemo;\nexports.allHandlersFinished = allHandlersFinished;\nexports.setWorkflowOptions = setWorkflowOptions;\nexports.getCurrentDetails = getCurrentDetails;\nexports.setCurrentDetails = setCurrentDetails;\nconst common_1 = require(\"@temporalio/common\");\nconst user_metadata_1 = require(\"@temporalio/common/lib/user-metadata\");\nconst payload_search_attributes_1 = require(\"@temporalio/common/lib/converter/payload-search-attributes\");\nconst versioning_intent_enum_1 = require(\"@temporalio/common/lib/versioning-intent-enum\");\nconst time_1 = require(\"@temporalio/common/lib/time\");\nconst internal_workflow_1 = require(\"@temporalio/common/lib/internal-workflow\");\nconst reserved_1 = require(\"@temporalio/common/lib/reserved\");\nconst cancellation_scope_1 = require(\"./cancellation-scope\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst update_scope_1 = require(\"./update-scope\");\nconst interfaces_1 = require(\"./interfaces\");\nconst errors_1 = require(\"./errors\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst random_helpers_1 = require(\"./random-helpers\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\n// Avoid a circular dependency\n(0, cancellation_scope_1.registerSleepImplementation)(sleep);\nfunction currentWorkflowSerializationContext(info) {\n return {\n type: 'workflow',\n namespace: info.namespace,\n workflowId: info.workflowId,\n };\n}\nfunction targetWorkflowSerializationContext(info, workflowId) {\n return {\n type: 'workflow',\n namespace: info.namespace,\n workflowId,\n };\n}\nfunction activitySerializationContext(info, activityId, isLocal) {\n return {\n type: 'activity',\n namespace: info.namespace,\n activityId,\n workflowId: info.workflowId,\n isLocal,\n };\n}\n/**\n * Adds default values of `workflowId` and `cancellationType` to given workflow options.\n */\nfunction addDefaultWorkflowOptions(opts) {\n const { args, workflowId, ...rest } = opts;\n return {\n workflowId: workflowId ?? uuid4(),\n args: (args ?? []),\n cancellationType: interfaces_1.ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED,\n ...rest,\n };\n}\n/**\n * Push a startTimer command into state accumulator and register completion\n */\nfunction timerNextHandler({ seq, durationMs, options }) {\n const activator = (0, global_attributes_1.getActivator)();\n const context = currentWorkflowSerializationContext(activator.info);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch((err) => {\n if (!activator.completions.timer.delete(seq)) {\n return; // Already resolved or never scheduled\n }\n activator.pushCommand({\n cancelTimer: {\n seq,\n },\n });\n reject(err);\n }));\n }\n activator.pushCommand({\n startTimer: {\n seq,\n startToFireTimeout: (0, time_1.msToTs)(durationMs),\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options?.summary, undefined, context),\n });\n activator.completions.timer.set(seq, {\n resolve,\n reject,\n });\n });\n}\n/**\n * Asynchronous sleep.\n *\n * Schedules a timer on the Temporal service.\n *\n * @param ms sleep duration - number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string}.\n * If given a negative number or 0, value will be set to 1.\n * @param options optional timer options for additional configuration\n */\nfunction sleep(ms, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.sleep(...) may only be used from a Workflow Execution');\n const seq = activator.nextSeqs.timer++;\n const durationMs = Math.max(1, (0, time_1.msToNumber)(ms));\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startTimer', timerNextHandler);\n return execute({\n durationMs,\n seq,\n options,\n });\n}\nfunction validateActivityOptions(options) {\n if (options.scheduleToCloseTimeout === undefined && options.startToCloseTimeout === undefined) {\n throw new TypeError('Required either scheduleToCloseTimeout or startToCloseTimeout');\n }\n}\n// Use same validation we use for normal activities\nconst validateLocalActivityOptions = validateActivityOptions;\n/**\n * Push a scheduleActivity command into activator accumulator and register completion\n */\nfunction scheduleActivityNextHandler({ options, args, headers, seq, activityType }) {\n const activator = (0, global_attributes_1.getActivator)();\n validateActivityOptions(options);\n const activityId = options.activityId ?? `${seq}`;\n const context = activitySerializationContext(activator.info, activityId, false);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n if (!activator.completions.activity.has(seq)) {\n return; // Already resolved or never scheduled\n }\n activator.pushCommand({\n requestCancelActivity: {\n seq,\n },\n });\n }));\n }\n activator.pushCommand({\n scheduleActivity: {\n seq,\n activityId,\n activityType,\n arguments: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,\n taskQueue: options.taskQueue || activator.info.taskQueue,\n heartbeatTimeout: (0, time_1.msOptionalToTs)(options.heartbeatTimeout),\n scheduleToCloseTimeout: (0, time_1.msOptionalToTs)(options.scheduleToCloseTimeout),\n startToCloseTimeout: (0, time_1.msOptionalToTs)(options.startToCloseTimeout),\n scheduleToStartTimeout: (0, time_1.msOptionalToTs)(options.scheduleToStartTimeout),\n headers,\n cancellationType: (0, common_1.encodeActivityCancellationType)(options.cancellationType),\n doNotEagerlyExecute: !(options.allowEagerDispatch ?? true),\n versioningIntent: (0, versioning_intent_enum_1.versioningIntentToProto)(options.versioningIntent),\n priority: options.priority ? (0, common_1.compilePriority)(options.priority) : undefined,\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options.summary, undefined, context),\n });\n activator.completions.activity.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n}\n/**\n * Push a scheduleActivity command into state accumulator and register completion\n */\nasync function scheduleLocalActivityNextHandler({ options, args, headers, seq, activityType, attempt, originalScheduleTime, }) {\n const activator = (0, global_attributes_1.getActivator)();\n const activityId = `${seq}`;\n const context = activitySerializationContext(activator.info, activityId, true);\n // Eagerly fail the local activity (which will in turn fail the workflow task.\n // Do not fail on replay where the local activities may not be registered on the replay worker.\n if (!activator.info.unsafe.isReplaying && !activator.registeredActivityNames.has(activityType)) {\n throw new ReferenceError(`Local activity of type '${activityType}' not registered on worker`);\n }\n validateLocalActivityOptions(options);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n if (!activator.completions.activity.has(seq)) {\n return; // Already resolved or never scheduled\n }\n activator.pushCommand({\n requestCancelLocalActivity: {\n seq,\n },\n });\n }));\n }\n activator.pushCommand({\n scheduleLocalActivity: {\n seq,\n attempt,\n originalScheduleTime,\n activityId,\n activityType,\n arguments: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,\n scheduleToCloseTimeout: (0, time_1.msOptionalToTs)(options.scheduleToCloseTimeout),\n startToCloseTimeout: (0, time_1.msOptionalToTs)(options.startToCloseTimeout),\n scheduleToStartTimeout: (0, time_1.msOptionalToTs)(options.scheduleToStartTimeout),\n localRetryThreshold: (0, time_1.msOptionalToTs)(options.localRetryThreshold),\n headers,\n cancellationType: (0, common_1.encodeActivityCancellationType)(options.cancellationType),\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options.summary, undefined, context),\n });\n activator.completions.activity.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n}\n/**\n * Schedule an activity and run outbound interceptors\n * @hidden\n */\nfunction scheduleActivity(activityType, args, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.scheduleActivity(...) may only be used from a Workflow Execution');\n if (options === undefined) {\n throw new TypeError('Got empty activity options');\n }\n const seq = activator.nextSeqs.activity++;\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'scheduleActivity', scheduleActivityNextHandler);\n return execute({\n activityType,\n headers: {},\n options,\n args,\n seq,\n });\n}\n/**\n * Schedule an activity and run outbound interceptors\n * @hidden\n */\nasync function scheduleLocalActivity(activityType, args, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.scheduleLocalActivity(...) may only be used from a Workflow Execution');\n if (options === undefined) {\n throw new TypeError('Got empty activity options');\n }\n let attempt = 1;\n let originalScheduleTime = undefined;\n for (;;) {\n const seq = activator.nextSeqs.activity++;\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'scheduleLocalActivity', scheduleLocalActivityNextHandler);\n try {\n return (await execute({\n activityType,\n headers: {},\n options,\n args,\n seq,\n attempt,\n originalScheduleTime,\n }));\n }\n catch (err) {\n if (err instanceof errors_1.LocalActivityDoBackoff) {\n await sleep((0, time_1.requiredTsToMs)(err.backoff.backoffDuration, 'backoffDuration'));\n if (typeof err.backoff.attempt !== 'number') {\n throw new TypeError('Invalid backoff attempt type');\n }\n attempt = err.backoff.attempt;\n originalScheduleTime = err.backoff.originalScheduleTime ?? undefined;\n }\n else {\n throw err;\n }\n }\n }\n}\nfunction startChildWorkflowExecutionNextHandler({ options, headers, workflowType, seq, }) {\n const activator = (0, global_attributes_1.getActivator)();\n const workflowId = options.workflowId ?? uuid4();\n const context = targetWorkflowSerializationContext(activator.info, workflowId);\n const startPromise = new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n const complete = !activator.completions.childWorkflowComplete.has(seq);\n if (!complete) {\n activator.pushCommand({\n cancelChildWorkflowExecution: { childWorkflowSeq: seq },\n });\n }\n // Nothing to cancel otherwise\n }));\n }\n activator.pushCommand({\n startChildWorkflowExecution: {\n seq,\n workflowId,\n workflowType,\n input: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, options.args),\n retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,\n taskQueue: options.taskQueue || activator.info.taskQueue,\n workflowExecutionTimeout: (0, time_1.msOptionalToTs)(options.workflowExecutionTimeout),\n workflowRunTimeout: (0, time_1.msOptionalToTs)(options.workflowRunTimeout),\n workflowTaskTimeout: (0, time_1.msOptionalToTs)(options.workflowTaskTimeout),\n namespace: activator.info.namespace, // Not configurable\n headers,\n cancellationType: (0, interfaces_1.encodeChildWorkflowCancellationType)(options.cancellationType),\n workflowIdReusePolicy: (0, common_1.encodeWorkflowIdReusePolicy)(options.workflowIdReusePolicy),\n parentClosePolicy: (0, interfaces_1.encodeParentClosePolicy)(options.parentClosePolicy),\n cronSchedule: options.cronSchedule,\n searchAttributes: options.searchAttributes || options.typedSearchAttributes\n ? { indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(options.searchAttributes, options.typedSearchAttributes) }\n : undefined,\n memo: options.memo && (0, common_1.mapToPayloads)(activator.payloadConverter, options.memo, context),\n versioningIntent: (0, versioning_intent_enum_1.versioningIntentToProto)(options.versioningIntent),\n priority: options.priority ? (0, common_1.compilePriority)(options.priority) : undefined,\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options?.staticSummary, options?.staticDetails, context),\n });\n activator.completions.childWorkflowStart.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n // We construct a Promise for the completion of the child Workflow before we know\n // if the Workflow code will await it to capture the result in case it does.\n const completePromise = new Promise((resolve, reject) => {\n // Chain start Promise rejection to the complete Promise.\n (0, stack_helpers_1.untrackPromise)(startPromise.catch(reject));\n activator.completions.childWorkflowComplete.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n (0, stack_helpers_1.untrackPromise)(startPromise);\n (0, stack_helpers_1.untrackPromise)(completePromise);\n // Prevent unhandled rejection because the completion might not be awaited\n (0, stack_helpers_1.untrackPromise)(completePromise.catch(() => undefined));\n const ret = new Promise((resolve) => resolve([startPromise, completePromise]));\n (0, stack_helpers_1.untrackPromise)(ret);\n return ret;\n}\nfunction signalWorkflowNextHandler({ seq, signalName, args, target, headers }) {\n const activator = (0, global_attributes_1.getActivator)();\n const targetWorkflowId = target.type === 'external' ? target.workflowExecution.workflowId : target.childWorkflowId;\n const context = targetWorkflowSerializationContext(activator.info, targetWorkflowId);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n if (!activator.completions.signalWorkflow.has(seq)) {\n return;\n }\n activator.pushCommand({ cancelSignalWorkflow: { seq } });\n }));\n }\n activator.pushCommand({\n signalExternalWorkflowExecution: {\n seq,\n args: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n headers,\n signalName,\n ...(target.type === 'external'\n ? {\n workflowExecution: {\n namespace: activator.info.namespace,\n ...target.workflowExecution,\n },\n }\n : {\n childWorkflowId: target.childWorkflowId,\n }),\n },\n });\n activator.completions.signalWorkflow.set(seq, { resolve, reject, context });\n });\n}\n/**\n * Symbol used in the return type of proxy methods to mark that an attribute on the source type is not a method.\n *\n * @see {@link ActivityInterfaceFor}\n * @see {@link proxyActivities}\n * @see {@link proxyLocalActivities}\n */\nexports.NotAnActivityMethod = Symbol.for('__TEMPORAL_NOT_AN_ACTIVITY_METHOD');\n/**\n * Configure Activity functions with given {@link ActivityOptions}.\n *\n * This method may be called multiple times to setup Activities with different options.\n *\n * @return a {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy | Proxy} for\n * which each attribute is a callable Activity function\n *\n * @example\n * ```ts\n * import { proxyActivities } from '@temporalio/workflow';\n * import * as activities from '../activities';\n *\n * // Setup Activities from module exports\n * const { httpGet, otherActivity } = proxyActivities<typeof activities>({\n * startToCloseTimeout: '30 minutes',\n * });\n *\n * // Use activities with default options\n * const result1 = await httpGet('http://example.com');\n *\n * // Override options for specific activity calls\n * const result2 = await httpGet.executeWithOptions({\n * staticSummary: 'Fetches data from external API',\n * scheduleToCloseTimeout: '5m'\n * }, ['http://api.example.com']);\n *\n * const result3 = await otherActivity.executeWithOptions({\n * staticSummary: 'Processes the fetched data',\n * taskQueue: 'special-task-queue'\n * }, [data]);\n *\n * // Setup Activities from an explicit interface (e.g. when defined by another SDK)\n * interface JavaActivities {\n * httpGetFromJava(url: string): Promise<string>\n * someOtherJavaActivity(arg1: number, arg2: string): Promise<string>;\n * }\n *\n * const {\n * httpGetFromJava,\n * someOtherJavaActivity\n * } = proxyActivities<JavaActivities>({\n * taskQueue: 'java-worker-taskQueue',\n * startToCloseTimeout: '5m',\n * });\n *\n * export function execute(): Promise<void> {\n * const response = await httpGet(\"http://example.com\");\n * // Or with custom options:\n * const response2 = await httpGetFromJava.executeWithOptions({\n * staticSummary: 'Java HTTP call with timeout override',\n * startToCloseTimeout: '2m'\n * }, [\"http://fast-api.example.com\"]);\n * // ...\n * }\n * ```\n */\nfunction proxyActivities(options) {\n if (options === undefined) {\n throw new TypeError('options must be defined');\n }\n // Validate as early as possible for immediate user feedback\n validateActivityOptions(options);\n return new Proxy({}, {\n get(_, activityType) {\n if (typeof activityType !== 'string') {\n throw new TypeError(`Only strings are supported for Activity types, got: ${String(activityType)}`);\n }\n function activityProxyFunction(...args) {\n return scheduleActivity(activityType, args, options);\n }\n activityProxyFunction.executeWithOptions = function (overrideOptions, args) {\n return scheduleActivity(activityType, args, (0, internal_workflow_1.deepMerge)(options, overrideOptions));\n };\n return activityProxyFunction;\n },\n });\n}\n/**\n * Configure Local Activity functions with given {@link LocalActivityOptions}.\n *\n * This method may be called multiple times to setup Activities with different options.\n *\n * @return a {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy | Proxy}\n * for which each attribute is a callable Activity function\n *\n * @see {@link proxyActivities} for examples\n */\nfunction proxyLocalActivities(options) {\n if (options === undefined) {\n throw new TypeError('options must be defined');\n }\n // Validate as early as possible for immediate user feedback\n validateLocalActivityOptions(options);\n return new Proxy({}, {\n get(_, activityType) {\n if (typeof activityType !== 'string') {\n throw new TypeError(`Only strings are supported for Activity types, got: ${String(activityType)}`);\n }\n function localActivityProxyFunction(...args) {\n return scheduleLocalActivity(activityType, args, options);\n }\n localActivityProxyFunction.executeWithOptions = function (overrideOptions, args) {\n return scheduleLocalActivity(activityType, args, (0, internal_workflow_1.deepMerge)(options, overrideOptions));\n };\n return localActivityProxyFunction;\n },\n });\n}\n// TODO: deprecate this patch after \"enough\" time has passed\nconst EXTERNAL_WF_CANCEL_PATCH = '__temporal_internal_connect_external_handle_cancel_to_scope';\n// The name of this patch comes from an attempt to build a generic internal patching mechanism.\n// That effort has been abandoned in favor of a newer WorkflowTaskCompletedMetadata based mechanism.\nconst CONDITION_0_PATCH = '__sdk_internal_patch_number:1';\n/**\n * Returns a client-side handle that can be used to signal and cancel an existing Workflow execution.\n * It takes a Workflow ID and optional run ID.\n */\nfunction getExternalWorkflowHandle(workflowId, runId) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.getExternalWorkflowHandle(...) may only be used from a Workflow Execution. Consider using Client.workflow.getHandle(...) instead.)');\n return {\n workflowId,\n runId,\n cancel() {\n return new Promise((resolve, reject) => {\n // Connect this cancel operation to the current cancellation scope.\n // This is behavior was introduced after v0.22.0 and is incompatible\n // with histories generated with previous SDK versions and thus requires\n // patching.\n //\n // We try to delay patching as much as possible to avoid polluting\n // histories unless strictly required.\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch((err) => {\n if (patched(EXTERNAL_WF_CANCEL_PATCH)) {\n reject(err);\n }\n }));\n }\n if (scope.consideredCancelled) {\n if (patched(EXTERNAL_WF_CANCEL_PATCH)) {\n return;\n }\n }\n const seq = activator.nextSeqs.cancelWorkflow++;\n activator.pushCommand({\n requestCancelExternalWorkflowExecution: {\n seq,\n workflowExecution: {\n namespace: activator.info.namespace,\n workflowId,\n runId,\n },\n },\n });\n activator.completions.cancelWorkflow.set(seq, {\n resolve,\n reject,\n context: targetWorkflowSerializationContext(activator.info, workflowId),\n });\n });\n },\n signal(def, ...args) {\n return (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'signalWorkflow', signalWorkflowNextHandler)({\n seq: activator.nextSeqs.signalWorkflow++,\n signalName: typeof def === 'string' ? def : def.name,\n args,\n target: {\n type: 'external',\n workflowExecution: { workflowId, runId },\n },\n headers: {},\n });\n },\n };\n}\nasync function startChild(workflowTypeOrFunc, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.startChild(...) may only be used from a Workflow Execution. Consider using Client.workflow.start(...) instead.)');\n const optionsWithDefaults = addDefaultWorkflowOptions(options ?? {});\n const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc);\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startChildWorkflowExecution', startChildWorkflowExecutionNextHandler);\n const [started, completed] = await execute({\n seq: activator.nextSeqs.childWorkflow++,\n options: optionsWithDefaults,\n headers: {},\n workflowType,\n });\n const firstExecutionRunId = await started;\n return {\n workflowId: optionsWithDefaults.workflowId,\n firstExecutionRunId,\n async result() {\n return (await completed);\n },\n async signal(def, ...args) {\n return (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'signalWorkflow', signalWorkflowNextHandler)({\n seq: activator.nextSeqs.signalWorkflow++,\n signalName: typeof def === 'string' ? def : def.name,\n args,\n target: {\n type: 'child',\n childWorkflowId: optionsWithDefaults.workflowId,\n },\n headers: {},\n });\n },\n };\n}\nasync function executeChild(workflowTypeOrFunc, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.executeChild(...) may only be used from a Workflow Execution. Consider using Client.workflow.execute(...) instead.');\n const optionsWithDefaults = addDefaultWorkflowOptions(options ?? {});\n const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc);\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startChildWorkflowExecution', startChildWorkflowExecutionNextHandler);\n const execPromise = execute({\n seq: activator.nextSeqs.childWorkflow++,\n options: optionsWithDefaults,\n headers: {},\n workflowType,\n });\n (0, stack_helpers_1.untrackPromise)(execPromise);\n const completedPromise = execPromise.then(([_started, completed]) => completed);\n (0, stack_helpers_1.untrackPromise)(completedPromise);\n return completedPromise;\n}\n/**\n * Get information about the current Workflow.\n *\n * WARNING: This function returns a frozen copy of WorkflowInfo, at the point where this method has been called.\n * Changes happening at later point in workflow execution will not be reflected in the returned object.\n *\n * For this reason, we recommend calling `workflowInfo()` on every access to {@link WorkflowInfo}'s fields,\n * rather than caching the `WorkflowInfo` object (or part of it) in a local variable. For example:\n *\n * ```ts\n * // GOOD\n * function myWorkflow() {\n * doSomething(workflowInfo().searchAttributes)\n * ...\n * doSomethingElse(workflowInfo().searchAttributes)\n * }\n * ```\n *\n * vs\n *\n * ```ts\n * // BAD\n * function myWorkflow() {\n * const attributes = workflowInfo().searchAttributes\n * doSomething(attributes)\n * ...\n * doSomethingElse(attributes)\n * }\n * ```\n */\nfunction workflowInfo() {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.workflowInfo(...) may only be used from a Workflow Execution.');\n return activator.info;\n}\n/**\n * Get information about the current update if any.\n *\n * @return Info for the current update handler the code calling this is executing\n * within if any.\n */\nfunction currentUpdateInfo() {\n (0, global_attributes_1.assertInWorkflowContext)('Workflow.currentUpdateInfo(...) may only be used from a Workflow Execution.');\n return update_scope_1.UpdateScope.current();\n}\n/**\n * Returns whether or not code is executing in workflow context\n */\nfunction inWorkflowContext() {\n return (0, global_attributes_1.maybeGetActivator)() !== undefined;\n}\n/**\n * Returns a function `f` that will cause the current Workflow to ContinueAsNew when called.\n *\n * `f` takes the same arguments as the Workflow function supplied to typeparam `F`.\n *\n * Once `f` is called, Workflow Execution immediately completes.\n */\nfunction makeContinueAsNewFunc(options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.continueAsNew(...) and Workflow.makeContinueAsNewFunc(...) may only be used from a Workflow Execution.');\n const info = activator.info;\n const { workflowType, taskQueue, ...rest } = options ?? {};\n const requiredOptions = {\n workflowType: workflowType ?? info.workflowType,\n taskQueue: taskQueue ?? info.taskQueue,\n ...rest,\n };\n return (...args) => {\n const context = currentWorkflowSerializationContext(info);\n const fn = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'continueAsNew', async (input) => {\n const { headers, args, options } = input;\n throw new interfaces_1.ContinueAsNew({\n workflowType: options.workflowType,\n arguments: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n headers,\n taskQueue: options.taskQueue,\n memo: options.memo && (0, common_1.mapToPayloads)(activator.payloadConverter, options.memo, context),\n searchAttributes: options.searchAttributes || options.typedSearchAttributes\n ? { indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(options.searchAttributes, options.typedSearchAttributes) }\n : undefined,\n workflowRunTimeout: (0, time_1.msOptionalToTs)(options.workflowRunTimeout),\n workflowTaskTimeout: (0, time_1.msOptionalToTs)(options.workflowTaskTimeout),\n versioningIntent: (0, versioning_intent_enum_1.versioningIntentToProto)(options.versioningIntent),\n initialVersioningBehavior: (0, common_1.encodeInitialVersioningBehavior)(options.initialVersioningBehavior),\n });\n });\n return fn({\n args,\n headers: {},\n options: requiredOptions,\n });\n };\n}\n/**\n * {@link https://docs.temporal.io/workflow-execution/continue-as-new#continue-as-new | Continues-As-New} the current Workflow Execution\n * with default options.\n *\n * Shorthand for `makeContinueAsNewFunc<F>()(...args)`. (See: {@link makeContinueAsNewFunc}.)\n *\n * @example\n *\n * ```ts\n * import { continueAsNew } from '@temporalio/workflow';\n * import { SearchAttributeType } from '@temporalio/common';\n *\n * export async function myWorkflow(n: number): Promise<void> {\n * // ... Workflow logic\n * await continueAsNew<typeof myWorkflow>(n + 1);\n * }\n * ```\n */\nfunction continueAsNew(...args) {\n return makeContinueAsNewFunc()(...args);\n}\n/**\n * Generate an RFC compliant V4 uuid.\n * Uses the workflow's deterministic PRNG making it safe for use within a workflow.\n * This function is cryptographically insecure.\n * See the {@link https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid | stackoverflow discussion}.\n */\nfunction uuid4() {\n const activator = (0, global_attributes_1.maybeGetActivator)();\n return (0, random_helpers_1.uuid4FromRandom)(activator ? () => activator.currentRandom() : Math.random);\n}\n/**\n * Patch or upgrade workflow code by checking or stating that this workflow has a certain patch.\n *\n * See {@link https://docs.temporal.io/typescript/versioning | docs page} for info.\n *\n * If the workflow is replaying an existing history, then this function returns true if that\n * history was produced by a worker which also had a `patched` call with the same `patchId`.\n * If the history was produced by a worker *without* such a call, then it will return false.\n *\n * If the workflow is not currently replaying, then this call *always* returns true.\n *\n * Your workflow code should run the \"new\" code if this returns true, if it returns false, you\n * should run the \"old\" code. By doing this, you can maintain determinism.\n *\n * @param patchId An identifier that should be unique to this patch. It is OK to use multiple\n * calls with the same ID, which means all such calls will always return the same value.\n */\nfunction patched(patchId) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.patch(...) and Workflow.deprecatePatch may only be used from a Workflow Execution.');\n return activator.patchInternal(patchId, false);\n}\n/**\n * Indicate that a patch is being phased out.\n *\n * See {@link https://docs.temporal.io/typescript/versioning | docs page} for info.\n *\n * Workflows with this call may be deployed alongside workflows with a {@link patched} call, but\n * they must *not* be deployed while any workers still exist running old code without a\n * {@link patched} call, or any runs with histories produced by such workers exist. If either kind\n * of worker encounters a history produced by the other, their behavior is undefined.\n *\n * Once all live workflow runs have been produced by workers with this call, you can deploy workers\n * which are free of either kind of patch call for this ID. Workers with and without this call\n * may coexist, as long as they are both running the \"new\" code.\n *\n * @param patchId An identifier that should be unique to this patch. It is OK to use multiple\n * calls with the same ID, which means all such calls will always return the same value.\n */\nfunction deprecatePatch(patchId) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.patch(...) and Workflow.deprecatePatch may only be used from a Workflow Execution.');\n activator.patchInternal(patchId, true);\n}\nasync function condition(fn, timeout, opts) {\n (0, global_attributes_1.assertInWorkflowContext)('Workflow.condition(...) may only be used from a Workflow Execution.');\n // Prior to 1.5.0, `condition(fn, 0)` was treated as equivalent to `condition(fn, undefined)`\n if (timeout === 0 && !patched(CONDITION_0_PATCH)) {\n return conditionInner(fn);\n }\n if (typeof timeout === 'number' || typeof timeout === 'string') {\n return cancellation_scope_1.CancellationScope.cancellable(async () => {\n try {\n return await Promise.race([sleep(timeout, opts).then(() => false), conditionInner(fn).then(() => true)]);\n }\n finally {\n cancellation_scope_1.CancellationScope.current().cancel();\n }\n });\n }\n return conditionInner(fn);\n}\nfunction conditionInner(fn) {\n const activator = (0, global_attributes_1.getActivator)();\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n const seq = activator.nextSeqs.condition++;\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch((err) => {\n activator.blockedConditions.delete(seq);\n reject(err);\n }));\n }\n // Eager evaluation\n if (fn()) {\n resolve();\n return;\n }\n activator.blockedConditions.set(seq, { fn, resolve });\n });\n}\n/**\n * Define an update method for a Workflow.\n *\n * A definition is used to register a handler in the Workflow via {@link setHandler} and to update a Workflow using a {@link WorkflowHandle}, {@link ChildWorkflowHandle} or {@link ExternalWorkflowHandle}.\n * A definition can be reused in multiple Workflows.\n */\nfunction defineUpdate(name) {\n return {\n type: 'update',\n name,\n };\n}\n/**\n * Define a signal method for a Workflow.\n *\n * A definition is used to register a handler in the Workflow via {@link setHandler} and to signal a Workflow using a {@link WorkflowHandle}, {@link ChildWorkflowHandle} or {@link ExternalWorkflowHandle}.\n * A definition can be reused in multiple Workflows.\n */\nfunction defineSignal(name) {\n return {\n type: 'signal',\n name,\n };\n}\n/**\n * Define a query method for a Workflow.\n *\n * A definition is used to register a handler in the Workflow via {@link setHandler} and to query a Workflow using a {@link WorkflowHandle}.\n * A definition can be reused in multiple Workflows.\n */\nfunction defineQuery(name) {\n return {\n type: 'query',\n name,\n };\n}\n// For Updates and Signals we want to make a public guarantee something like the\n// following:\n//\n// \"If a WFT contains a Signal/Update, and if a handler is available for that\n// Signal/Update, then the handler will be executed.\"\"\n//\n// However, that statement is not well-defined, leaving several questions open:\n//\n// 1. What does it mean for a handler to be \"available\"? What happens if the\n// handler is not present initially but is set at some point during the\n// Workflow code that is executed in that WFT? What happens if the handler is\n// set and then deleted, or replaced with a different handler?\n//\n// 2. When is the handler executed? (When it first becomes available? At the end\n// of the activation?) What are the execution semantics of Workflow and\n// Signal/Update handler code given that they are concurrent? Can the user\n// rely on Signal/Update side effects being reflected in the Workflow return\n// value, or in the value passed to Continue-As-New? If the handler is an\n// async function / coroutine, how much of it is executed and when is the\n// rest executed?\n//\n// 3. What happens if the handler is not executed? (i.e. because it wasn't\n// available in the sense defined by (1))\n//\n// 4. In the case of Update, when is the validation function executed?\n//\n// The implementation for Typescript is as follows:\n//\n// 1. sdk-core sorts Signal and Update jobs (and Patches) ahead of all other\n// jobs. Thus if the handler is available at the start of the Activation then\n// the Signal/Update will be executed before Workflow code is executed. If it\n// is not, then the Signal/Update calls are pushed to a buffer.\n//\n// 2. On each call to setHandler for a given Signal/Update, we make a pass\n// through the buffer list. If a buffered job is associated with the just-set\n// handler, then the job is removed from the buffer and the initial\n// synchronous portion of the handler is invoked on that input (i.e.\n// preempting workflow code).\n//\n// Thus in the case of Typescript the questions above are answered as follows:\n//\n// 1. A handler is \"available\" if it is set at the start of the Activation or\n// becomes set at any point during the Activation. If the handler is not set\n// initially then it is executed as soon as it is set. Subsequent deletion or\n// replacement by a different handler has no impact because the jobs it was\n// handling have already been handled and are no longer in the buffer.\n//\n// 2. The handler is executed as soon as it becomes available. I.e. if the\n// handler is set at the start of the Activation then it is executed when\n// first attempting to process the Signal/Update job; alternatively, if it is\n// set by a setHandler call made by Workflow code, then it is executed as\n// part of that call (preempting Workflow code). Therefore, a user can rely\n// on Signal/Update side effects being reflected in e.g. the Workflow return\n// value, and in the value passed to Continue-As-New. Activation jobs are\n// processed in the order supplied by sdk-core, i.e. Signals, then Updates,\n// then other jobs. Within each group, the order sent by the server is\n// preserved. If the handler is async, it is executed up to its first yield\n// point.\n//\n// 3. Signal case: If a handler does not become available for a Signal job then\n// the job remains in the buffer. If a handler for the Signal becomes\n// available in a subsequent Activation (of the same or a subsequent WFT)\n// then the handler will be executed. If not, then the Signal will never be\n// responded to and this causes no error.\n//\n// Update case: If a handler does not become available for an Update job then\n// the Update is rejected at the end of the Activation. Thus, if a user does\n// not want an Update to be rejected for this reason, then it is their\n// responsibility to ensure that their application and workflow code interact\n// such that a handler is available for the Update during any Activation\n// which might contain their Update job. (Note that the user often has\n// uncertainty about which WFT their Signal/Update will appear in. For\n// example, if they call startWorkflow() followed by startUpdate(), then they\n// will typically not know whether these will be delivered in one or two\n// WFTs. On the other hand there are situations where they would have reason\n// to believe they are in the same WFT, for example if they do not start\n// Worker polling until after they have verified that both requests have\n// succeeded.)\n//\n// 4. If an Update has a validation function then it is executed immediately\n// prior to the handler. (Note that the validation function is required to be\n// synchronous).\nfunction setHandler(def, handler, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setHandler(...) may only be used from a Workflow Execution.');\n // Cannot register handler for reserved names\n (0, reserved_1.throwIfReservedName)(def.type, def.name);\n const description = options?.description;\n if (def.type === 'update') {\n if (typeof handler === 'function') {\n const updateOptions = options;\n const validator = updateOptions?.validator;\n const unfinishedPolicy = updateOptions?.unfinishedPolicy ?? common_1.HandlerUnfinishedPolicy.WARN_AND_ABANDON;\n activator.updateHandlers.set(def.name, { handler, validator, description, unfinishedPolicy });\n activator.dispatchBufferedUpdates();\n }\n else if (handler == null) {\n activator.updateHandlers.delete(def.name);\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n }\n else if (def.type === 'signal') {\n if (typeof handler === 'function') {\n const signalOptions = options;\n const unfinishedPolicy = signalOptions?.unfinishedPolicy ?? common_1.HandlerUnfinishedPolicy.WARN_AND_ABANDON;\n activator.signalHandlers.set(def.name, { handler: handler, description, unfinishedPolicy });\n activator.dispatchBufferedSignals();\n }\n else if (handler == null) {\n activator.signalHandlers.delete(def.name);\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n }\n else if (def.type === 'query') {\n if (typeof handler === 'function') {\n activator.queryHandlers.set(def.name, { handler: handler, description });\n }\n else if (handler == null) {\n activator.queryHandlers.delete(def.name);\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n }\n else {\n throw new TypeError(`Invalid definition type: ${def.type}`);\n }\n}\n/**\n * Set a signal handler function that will handle signals calls for non-registered signal names.\n *\n * Signals are dispatched to the default signal handler in the order that they were accepted by the server.\n *\n * If this function is called multiple times for a given signal name the last handler will overwrite any previous calls.\n *\n * @param handler a function that will handle signals for non-registered signal names, or `undefined` to unset the handler.\n */\nfunction setDefaultSignalHandler(handler) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setDefaultSignalHandler(...) may only be used from a Workflow Execution.');\n if (typeof handler === 'function') {\n activator.defaultSignalHandler = handler;\n activator.dispatchBufferedSignals();\n }\n else if (handler == null) {\n activator.defaultSignalHandler = undefined;\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n}\n/**\n * Set a update handler function that will handle updates calls for non-registered update names.\n *\n * Updates are dispatched to the default update handler in the order that they were accepted by the server.\n *\n * If this function is called multiple times for a given update name the last handler will overwrite any previous calls.\n *\n * @param handler a function that will handle updates for non-registered update names, or `undefined` to unset the handler.\n */\nfunction setDefaultUpdateHandler(handler) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setDefaultUpdateHandler(...) may only be used from a Workflow Execution.');\n if (typeof handler === 'function') {\n activator.defaultUpdateHandler = handler;\n activator.dispatchBufferedUpdates();\n }\n else if (handler == null) {\n activator.defaultUpdateHandler = undefined;\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n}\n/**\n * Set a query handler function that will handle query calls for non-registered query names.\n *\n * Queries are dispatched to the default query handler in the order that they were accepted by the server.\n *\n * If this function is called multiple times for a given query name the last handler will overwrite any previous calls.\n *\n * @param handler a function that will handle queries for non-registered query names, or `undefined` to unset the handler.\n */\nfunction setDefaultQueryHandler(handler) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setDefaultQueryHandler(...) may only be used from a Workflow Execution.');\n if (typeof handler === 'function' || handler === undefined) {\n activator.defaultQueryHandler = handler;\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n}\n/**\n * Updates this Workflow's Search Attributes by merging the provided `searchAttributes` with the existing Search\n * Attributes, `workflowInfo().searchAttributes`.\n *\n * Search attributes can be upserted using either SearchAttributes (deprecated) or SearchAttributeUpdatePair[] (preferred)\n *\n * Upserting a workflow's search attributes using SearchAttributeUpdatePair[]:\n *\n * ```ts\n * const intKey = defineSearchKey('CustomIntField', 'INT');\n * const boolKey = defineSearchKey('CustomBoolField', 'BOOL');\n * const keywordListKey = defineSearchKey('CustomKeywordField', 'KEYWORD_LIST');\n *\n * upsertSearchAttributes([\n * defineSearchAttribute(intKey, 1),\n * defineSearchAttribute(boolKey, true)\n * ]);\n * upsertSearchAttributes([\n * defineSearchAttribute(intKey, 42),\n * defineSearchAttribute(keywordListKey, ['durable code', 'is great'])\n * ]);\n * ```\n *\n * Would result in the Workflow having these Search Attributes:\n *\n * ```ts\n * {\n * CustomIntField: [42],\n * CustomBoolField: [true],\n * CustomKeywordField: ['durable code', 'is great']\n * }\n * ```\n *\n * @param searchAttributes The Record to merge.\n * If using SearchAttributeUpdatePair[] (preferred), set a value to null to remove the search attribute.\n * If using SearchAttributes (deprecated), set a value to undefined or an empty list to remove the search attribute.\n */\nfunction upsertSearchAttributes(searchAttributes) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.upsertSearchAttributes(...) may only be used from a Workflow Execution.');\n if (searchAttributes == null) {\n throw new Error('searchAttributes must be a non-null SearchAttributes');\n }\n if (Array.isArray(searchAttributes)) {\n // Typed search attributes\n activator.pushCommand({\n upsertWorkflowSearchAttributes: {\n searchAttributes: {\n indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(undefined, searchAttributes),\n },\n },\n });\n activator.mutateWorkflowInfo((info) => {\n // Create a copy of the current state.\n const newSearchAttributes = { ...info.searchAttributes };\n for (const pair of searchAttributes) {\n if (pair.value == null) {\n // If the value is null, remove the search attribute.\n // We don't mutate the existing state (just the new map) so this is safe.\n delete newSearchAttributes[pair.key.name];\n }\n else {\n newSearchAttributes[pair.key.name] = Array.isArray(pair.value)\n ? pair.value\n : [pair.value];\n }\n }\n return {\n ...info,\n searchAttributes: newSearchAttributes,\n // Create an empty copy and apply existing and new updates. Keep in mind the order matters here (existing first, new second - to possibly overwrite existing).\n typedSearchAttributes: info.typedSearchAttributes.updateCopy([...searchAttributes]),\n };\n });\n }\n else {\n // Legacy search attributes\n activator.pushCommand({\n upsertWorkflowSearchAttributes: {\n searchAttributes: {\n indexedFields: (0, common_1.mapToPayloads)(payload_search_attributes_1.searchAttributePayloadConverter, searchAttributes),\n },\n },\n });\n activator.mutateWorkflowInfo((info) => {\n // Create a new copy of the current state.\n let typedSearchAttributes = info.typedSearchAttributes.updateCopy([]);\n const newSearchAttributes = { ...info.searchAttributes };\n // Upsert legacy search attributes into typedSearchAttributes.\n for (const [k, v] of Object.entries(searchAttributes)) {\n if (v !== undefined && !Array.isArray(v)) {\n throw new Error(`Search attribute value must be an array or undefined, got ${v}`);\n }\n // The value is undefined or an empty list, this signifies deletion.\n // Remove from both untyped & typed search attributes.\n if (v == null || (Array.isArray(v) && v.length === 0)) {\n // We cannot discern a valid key typing from these values.\n // Instead, we do a \"best effort\" deletion from typed search attributes:\n // - check if a matching key name exists, if so, remove it.\n const matchingPair = typedSearchAttributes.getAll().find((pair) => pair.key.name === k);\n if (matchingPair) {\n typedSearchAttributes = typedSearchAttributes.updateCopy([\n { key: matchingPair.key, value: null },\n ]);\n }\n delete newSearchAttributes[k];\n continue;\n }\n // Attempt to discern a valid key typing for the update.\n const typedKey = common_1.TypedSearchAttributes.getKeyFromUntyped(k, v);\n // Unable to discern a valid key typing (no valid type for defined value).\n // Skip applying this update (no-op).\n if (typedKey === undefined) {\n continue;\n }\n // TEXT type is inferred from a string value, but it could also be KEYWORD.\n // If a matching pair exists with KEYWORD type, use that instead.\n if (typedKey.type === 'TEXT') {\n const matchingPair = typedSearchAttributes.getAll().find((pair) => pair.key.name === typedKey.name);\n if (matchingPair) {\n typedKey.type = matchingPair.key.type;\n }\n }\n let newValue = v;\n // Unpack value if it is a single-element array.\n if (v.length === 1) {\n newValue = v[0];\n // Convert value back to Date.\n if (typedKey.type === 'DATETIME') {\n newValue = new Date(newValue);\n }\n }\n // We have a defined value with valid type. Apply the update.\n typedSearchAttributes = typedSearchAttributes.updateCopy([\n { key: typedKey, value: newValue },\n ]);\n newSearchAttributes[k] = v;\n }\n return {\n ...info,\n searchAttributes: newSearchAttributes,\n typedSearchAttributes,\n };\n });\n }\n}\n/**\n * Updates this Workflow's Memos by merging the provided `memo` with existing\n * Memos (as returned by `workflowInfo().memo`).\n *\n * New memo is merged by replacing properties of the same name _at the first\n * level only_. Setting a property to value `undefined` or `null` clears that\n * key from the Memo.\n *\n * For example:\n *\n * ```ts\n * upsertMemo({\n * key1: value,\n * key3: { subkey1: value }\n * key4: value,\n * });\n * upsertMemo({\n * key2: value\n * key3: { subkey2: value }\n * key4: undefined,\n * });\n * ```\n *\n * would result in the Workflow having these Memo:\n *\n * ```ts\n * {\n * key1: value,\n * key2: value,\n * key3: { subkey2: value } // Note this object was completely replaced\n * // Note that key4 was completely removed\n * }\n * ```\n *\n * @param memo The Record to merge.\n */\nfunction upsertMemo(memo) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.upsertMemo(...) may only be used from a Workflow Execution.');\n const context = currentWorkflowSerializationContext(activator.info);\n if (memo == null) {\n throw new Error('memo must be a non-null Record');\n }\n activator.pushCommand({\n modifyWorkflowProperties: {\n upsertedMemo: {\n fields: (0, common_1.mapToPayloads)(activator.payloadConverter, \n // Convert null to undefined\n Object.fromEntries(Object.entries(memo).map(([k, v]) => [k, v ?? undefined])), context),\n },\n },\n });\n activator.mutateWorkflowInfo((info) => {\n return {\n ...info,\n memo: Object.fromEntries(Object.entries({\n ...info.memo,\n ...memo,\n }).filter(([_, v]) => v != null)),\n };\n });\n}\n/**\n * Whether update and signal handlers have finished executing.\n *\n * Consider waiting on this condition before workflow return or continue-as-new, to prevent\n * interruption of in-progress handlers by workflow exit:\n *\n * ```ts\n * await workflow.condition(workflow.allHandlersFinished)\n * ```\n *\n * @returns true if there are no in-progress update or signal handler executions.\n */\nfunction allHandlersFinished() {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('allHandlersFinished() may only be used from a Workflow Execution.');\n return activator.inProgressSignals.size === 0 && activator.inProgressUpdates.size === 0;\n}\n/**\n * Can be used to alter workflow functions with certain options specified at definition time.\n *\n * @example\n * For example:\n * ```ts\n * setWorkflowOptions({\n * versioningBehavior: 'PINNED',\n * failureExceptionTypes: [CustomWorkflowError]\n * }, myWorkflow);\n * export async function myWorkflow(): Promise<string> {\n * // Workflow code here\n * return \"hi\";\n * }\n * ```\n *\n * @example\n * To annotate a default or dynamic workflow:\n * ```ts\n * export default async function (): Promise<string> {\n * // Workflow code here\n * return \"hi\";\n * }\n * setWorkflowOptions({\n * versioningBehavior: 'PINNED',\n * failureExceptionTypes: [CustomWorkflowError]\n * }, module.exports.default);\n * ```\n *\n * @param options Options for the workflow defintion, or a function that returns options. If a\n * function is provided, it will be called once just before the workflow function is called for the\n * first time. It is safe to call {@link workflowInfo} inside such a function.\n * @param fn The workflow function.\n */\nfunction setWorkflowOptions(options, fn) {\n Object.assign(fn, {\n workflowDefinitionOptions: options,\n });\n}\nexports.stackTraceQuery = defineQuery('__stack_trace');\nexports.enhancedStackTraceQuery = defineQuery('__enhanced_stack_trace');\nexports.workflowMetadataQuery = defineQuery('__temporal_workflow_metadata');\nfunction getCurrentDetails() {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('getCurrentDetails() may only be used from a Workflow Execution.');\n return activator.currentDetails;\n}\nfunction setCurrentDetails(details) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('getCurrentDetails() may only be used from a Workflow Execution.');\n activator.currentDetails = details;\n}\n//# sourceMappingURL=workflow.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.log = void 0;\nexports.executeWithLifecycleLogging = executeWithLifecycleLogging;\nexports.workflowLogAttributes = workflowLogAttributes;\nconst common_1 = require(\"@temporalio/common\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\nconst sinks_1 = require(\"./sinks\");\nconst errors_1 = require(\"./errors\");\nconst interfaces_1 = require(\"./interfaces\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst workflow_1 = require(\"./workflow\");\nconst loggerSink = (0, sinks_1.proxySinks)().__temporal_logger;\n/**\n * Symbol used by the SDK logger to extract a timestamp from log attributes.\n * Also defined in `worker/logger.ts` - intentionally not shared.\n */\nconst LogTimestamp = Symbol.for('log_timestamp');\n/**\n * Default workflow logger.\n *\n * This logger is replay-aware and will omit log messages on workflow replay. Messages emitted by this logger are\n * funnelled through a sink that forwards them to the logger registered on {@link Runtime.logger}.\n *\n * Attributes from the current Workflow Execution context are automatically included as metadata on every log\n * entries. An extra `sdkComponent` metadata attribute is also added, with value `workflow`; this can be used for\n * fine-grained filtering of log entries further downstream.\n *\n * To customize log attributes, register a {@link WorkflowOutboundCallsInterceptor} that intercepts the\n * `getLogAttributes()` method.\n *\n * Notice that since sinks are used to power this logger, any log attributes must be transferable via the\n * {@link https://nodejs.org/api/worker_threads.html#worker_threads_port_postmessage_value_transferlist | postMessage}\n * API.\n *\n * NOTE: Specifying a custom logger through {@link defaultSink} or by manually registering a sink named\n * `defaultWorkerLogger` has been deprecated. Please use {@link Runtime.logger} instead.\n */\nexports.log = Object.fromEntries(['trace', 'debug', 'info', 'warn', 'error'].map((level) => {\n return [\n level,\n (message, attrs) => {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.log(...) may only be used from workflow context.');\n const getLogAttributes = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'getLogAttributes', (a) => a);\n return loggerSink[level](message, {\n // Inject the call time in nanosecond resolution as expected by the worker logger.\n [LogTimestamp]: activator.getTimeOfDay(),\n sdkComponent: common_1.SdkComponent.workflow,\n ...getLogAttributes(workflowLogAttributes(activator.info)),\n ...attrs,\n });\n },\n ];\n}));\nfunction executeWithLifecycleLogging(fn) {\n exports.log.debug('Workflow started', { sdkComponent: common_1.SdkComponent.worker });\n const p = fn().then((res) => {\n exports.log.debug('Workflow completed', { sdkComponent: common_1.SdkComponent.worker });\n return res;\n }, (error) => {\n // Avoid using instanceof checks in case the modules they're defined in loaded more than once,\n // e.g. by jest or when multiple versions are installed.\n if (typeof error === 'object' && error != null) {\n if ((0, errors_1.isCancellation)(error)) {\n exports.log.debug('Workflow completed as cancelled', { sdkComponent: common_1.SdkComponent.worker });\n throw error;\n }\n else if (error instanceof interfaces_1.ContinueAsNew) {\n exports.log.debug('Workflow continued as new', { sdkComponent: common_1.SdkComponent.worker });\n throw error;\n }\n }\n exports.log.warn('Workflow failed', { error, sdkComponent: common_1.SdkComponent.worker });\n throw error;\n });\n // Avoid showing this interceptor in stack trace query\n (0, stack_helpers_1.untrackPromise)(p);\n return p;\n}\n/**\n * Returns a map of attributes to be set _by default_ on log messages for a given Workflow.\n * Note that this function may be called from outside of the Workflow context (eg. by the worker itself).\n */\nfunction workflowLogAttributes(info) {\n const attributes = {\n namespace: info.namespace,\n taskQueue: info.taskQueue,\n workflowId: info.workflowId,\n runId: info.runId,\n workflowType: info.workflowType,\n };\n if ((0, workflow_1.inWorkflowContext)()) {\n const updateInfo = (0, workflow_1.currentUpdateInfo)();\n if (updateInfo) {\n // Add update info if it exists\n attributes['updateId'] = updateInfo.id;\n attributes['updateName'] = updateInfo.name;\n }\n }\n return attributes;\n}\n//# sourceMappingURL=logs.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Trigger = void 0;\nconst cancellation_scope_1 = require(\"./cancellation-scope\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\n/**\n * A `PromiseLike` helper which exposes its `resolve` and `reject` methods.\n *\n * Trigger is CancellationScope-aware: it is linked to the current scope on\n * construction and throws when that scope is cancelled.\n *\n * Useful for e.g. waiting for unblocking a Workflow from a Signal.\n *\n * @example\n * ```ts\n * import { defineSignal, setHandler, sleep, Trigger } from '@temporalio/workflow';\n *\n * const completeUserInteraction = defineSignal('completeUserInteraction');\n *\n * export async function waitOnUser(userId: string): Promise<void> {\n * const userInteraction = new Trigger<boolean>();\n *\n * // programmatically resolve Trigger\n * setHandler(completeUserInteraction, () => userInteraction.resolve(true));\n *\n * const userInteracted = await Promise.race([userInteraction, sleep('30 days')]);\n * if (!userInteracted) {\n * await sendReminderEmail(userId);\n * }\n * }\n * ```\n */\nclass Trigger {\n // Typescript does not realize that the promise executor is run synchronously in the constructor\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n resolve;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n reject;\n promise;\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.resolve = resolve;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.reject = reject;\n });\n // Avoid unhandled rejections\n (0, stack_helpers_1.untrackPromise)(this.promise.catch(() => undefined));\n }\n then(onfulfilled, onrejected) {\n return this.promise.then(onfulfilled, onrejected);\n }\n}\nexports.Trigger = Trigger;\n//# sourceMappingURL=trigger.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.metricMeter = void 0;\nconst common_1 = require(\"@temporalio/common\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst sinks_1 = require(\"./sinks\");\nconst workflow_1 = require(\"./workflow\");\nconst global_attributes_1 = require(\"./global-attributes\");\nclass WorkflowMetricMeterImpl {\n constructor() { }\n createCounter(name, unit, description) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n return new WorkflowMetricCounter(name, unit, description);\n }\n createHistogram(name, valueType = 'int', unit, description) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n return new WorkflowMetricHistogram(name, valueType, unit, description);\n }\n createGauge(name, valueType = 'int', unit, description) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n return new WorkflowMetricGauge(name, valueType, unit, description);\n }\n withTags(_tags) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricMeter`);\n }\n}\nclass WorkflowMetricCounter {\n name;\n unit;\n description;\n kind = 'counter';\n valueType = 'int';\n constructor(name, unit, description) {\n this.name = name;\n this.unit = unit;\n this.description = description;\n }\n add(value, extraTags = {}) {\n if (value < 0) {\n throw new Error(`MetricCounter value must be non-negative (got ${value})`);\n }\n if (!(0, workflow_1.workflowInfo)().unsafe.isReplaying) {\n metricSink.addMetricCounterValue(this.name, this.unit, this.description, value, extraTags);\n }\n }\n withTags(_tags) {\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricCounter`);\n }\n}\nclass WorkflowMetricHistogram {\n name;\n valueType;\n unit;\n description;\n kind = 'histogram';\n constructor(name, valueType, unit, description) {\n this.name = name;\n this.valueType = valueType;\n this.unit = unit;\n this.description = description;\n }\n record(value, extraTags = {}) {\n if (value < 0) {\n throw new Error(`MetricHistogram value must be non-negative (got ${value})`);\n }\n if (!(0, workflow_1.workflowInfo)().unsafe.isReplaying) {\n metricSink.recordMetricHistogramValue(this.name, this.valueType, this.unit, this.description, value, extraTags);\n }\n }\n withTags(_tags) {\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricHistogram`);\n }\n}\nclass WorkflowMetricGauge {\n name;\n valueType;\n unit;\n description;\n kind = 'gauge';\n constructor(name, valueType, unit, description) {\n this.name = name;\n this.valueType = valueType;\n this.unit = unit;\n this.description = description;\n }\n set(value, tags) {\n if (value < 0) {\n throw new Error(`MetricGauge value must be non-negative (got ${value})`);\n }\n if (!(0, workflow_1.workflowInfo)().unsafe.isReplaying) {\n metricSink.setMetricGaugeValue(this.name, this.valueType, this.unit, this.description, value, tags ?? {});\n }\n }\n withTags(_tags) {\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricGauge`);\n }\n}\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// Note: given that forwarding metrics outside of the sanbox can be quite chatty and add non\n// negligeable overhead, we eagerly check for `isReplaying` and completely skip doing sink\n// calls if we are replaying.\nconst metricSink = (0, sinks_1.proxySinks)().__temporal_metrics;\n/**\n * A MetricMeter that can be used to emit metrics from within a Workflow.\n *\n * @experimental The Metric API is an experimental feature and may be subject to change.\n */\nexports.metricMeter = common_1.MetricMeterWithComposedTags.compose(new WorkflowMetricMeterImpl(), () => {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.metricMeter may only be used from workflow context.');\n const getMetricTags = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'getMetricTags', (a) => a);\n const info = activator.info;\n return getMetricTags({\n // namespace and taskQueue will be added by the Worker\n workflowType: info.workflowType,\n });\n}, true);\n//# sourceMappingURL=metrics.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NexusOperationCancellationType = void 0;\nexports.createNexusServiceClient = createNexusServiceClient;\nconst time_1 = require(\"@temporalio/common/lib/time\");\nconst user_metadata_1 = require(\"@temporalio/common/lib/user-metadata\");\nconst enums_helpers_1 = require(\"@temporalio/common/lib/internal-workflow/enums-helpers\");\nconst cancellation_scope_1 = require(\"./cancellation-scope\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\n/**\n * Create a Nexus client for invoking Nexus Operations from a Workflow.\n *\n * @experimental Nexus support in Temporal SDK is experimental.\n */\nfunction createNexusServiceClient(options) {\n class NexusServiceClientImpl {\n async executeOperation(operation, input, operationOptions) {\n const handle = await this.startOperation(operation, input, operationOptions);\n return await handle.result();\n }\n async startOperation(operation, input, operationOptions) {\n const opName = typeof operation === 'string'\n ? // Casting as string to cover up the fact that `opName` might be undefined.\n // If this happens, then `execute` will produce a `NexusOperationFailure.NOT_FOUND`.\n options.service.operations[operation]?.name\n : operation.name;\n const activator = (0, global_attributes_1.getActivator)();\n const seq = activator.nextSeqs.nexusOperation++;\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startNexusOperation', startNexusOperationNextHandler);\n // The interceptor returns a Promise<StartNexusOperationOutput>, with the result promise contained\n // in that Output object. As a consequence of this, the result promise/completion does not exist\n // until the StartNexusOperation event is received. This is totally different from what we did in\n // ChildWorkflow, but is much cleaner from the interceptors point of view.\n const { token, result: resultPromise } = await execute({\n endpoint: options.endpoint,\n service: options.service.name,\n operation: opName,\n options: {\n ...operationOptions,\n cancellationType: operationOptions?.cancellationType ?? 'WAIT_CANCELLATION_COMPLETED',\n },\n headers: {},\n seq,\n input,\n });\n return {\n service: options.service.name,\n operation: opName,\n token,\n async result() {\n return resultPromise;\n },\n };\n }\n }\n return new NexusServiceClientImpl();\n}\nfunction startNexusOperationNextHandler({ input, endpoint, service, options, operation, seq, headers, }) {\n const activator = (0, global_attributes_1.getActivator)();\n const context = {\n type: 'workflow',\n namespace: activator.info.namespace,\n workflowId: activator.info.workflowId,\n };\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n const completed = !activator.completions.nexusOperationStart.has(seq) &&\n !activator.completions.nexusOperationComplete.has(seq);\n if (!completed) {\n activator.pushCommand({\n requestCancelNexusOperation: { seq },\n });\n }\n // Nothing to cancel otherwise\n }));\n }\n activator.pushCommand({\n scheduleNexusOperation: {\n seq,\n endpoint,\n service,\n operation,\n nexusHeader: headers,\n input: activator.payloadConverter.toPayload(input, context),\n scheduleToCloseTimeout: (0, time_1.msOptionalToTs)(options?.scheduleToCloseTimeout),\n scheduleToStartTimeout: (0, time_1.msOptionalToTs)(options?.scheduleToStartTimeout),\n startToCloseTimeout: (0, time_1.msOptionalToTs)(options?.startToCloseTimeout),\n cancellationType: encodeNexusOperationCancellationType(options?.cancellationType),\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options?.summary, undefined, context),\n });\n activator.completions.nexusOperationStart.set(seq, {\n resolve,\n reject,\n });\n });\n}\n/**\n * Determines:\n * - whether cancellation requests should be propagated from the Workflow to the Nexus Operation\n * - whether and when should the Operation's cancellation be reported back to the Workflow\n * (i.e. at which moment should the operation's result promise fail with a `NexusOperationFailure`,\n * with `cause` set to a `CancelledFailure`).\n *\n * Note that this setting only applies to cancellation originating from an external request for the\n * Workflow itself, or from internal cancellation of the `CancellationScope` in which the\n * Operation call was made.\n *\n * @experimental Nexus support in Temporal SDK is experimental.\n */\n// MAINTENANCE: Keep this typedoc in sync with the `StartNexusOperationOptions.cancellationType` field\nexports.NexusOperationCancellationType = {\n /**\n * Do not propagate cancellation requests to the Nexus Operation, and immediately report\n * cancellation to the caller.\n */\n ABANDON: 'ABANDON',\n /**\n * Initiate a cancellation request for the Nexus operation and immediately report cancellation to\n * the caller. Note that it doesn't guarantee that cancellation is delivered to the operation if\n * calling workflow exits before the delivery is done. If you want to ensure that cancellation is\n * delivered to the operation, use {@link WAIT_CANCELLATION_REQUESTED}.\n *\n * Propagate cancellation request from the Workflow to the Operation, yet _immediately_ report\n * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation\n * request.\n *\n * Note that this cancellation type provides no guarantee, from the Workflow-side, that the\n * cancellation request will be delivered to the Operation Handler. In particular, either the\n * Operation or the Workflow may complete (either successfully or uncessfully) before the\n * cancellation request is delivered, resulting in a situation where the Operation completed\n * successfully, but the Workflow thinks it was cancelled.\n *\n * To guarantee that the Operation will eventually be notified of the cancellation request,\n * use {@link WAIT_CANCELLATION_REQUESTED}.\n */\n TRY_CANCEL: 'TRY_CANCEL',\n /**\n * Propagate cancellation request from the Workflow to the Operation, then wait for the server\n * to confirm that the Operation cancellation request was delivered to the Operation Handler.\n */\n WAIT_CANCELLATION_REQUESTED: 'WAIT_CANCELLATION_REQUESTED',\n /**\n * Propagate cancellation request from the Workflow to the Operation, then wait for completion\n * of the Operation.\n */\n WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED',\n};\nconst [encodeNexusOperationCancellationType, _] = (0, enums_helpers_1.makeProtoEnumConverters)({\n [exports.NexusOperationCancellationType.WAIT_CANCELLATION_COMPLETED]: 0,\n [exports.NexusOperationCancellationType.ABANDON]: 1,\n [exports.NexusOperationCancellationType.TRY_CANCEL]: 2,\n [exports.NexusOperationCancellationType.WAIT_CANCELLATION_REQUESTED]: 3,\n}, '');\n//# sourceMappingURL=nexus.js.map","\"use strict\";\n/**\n * This library provides tools required for authoring workflows.\n *\n * ## Usage\n * See the {@link https://docs.temporal.io/typescript/hello-world#workflows | tutorial} for writing your first workflow.\n *\n * ### Timers\n *\n * The recommended way of scheduling timers is by using the {@link sleep} function. We've replaced `setTimeout` and\n * `clearTimeout` with deterministic versions so these are also usable but have a limitation that they don't play well\n * with {@link https://docs.temporal.io/typescript/cancellation-scopes | cancellation scopes}.\n *\n * ```ts\n * import { sleep } from '@temporalio/workflow';\n *\n * export async function sleeper(ms = 100): Promise<void> {\n * await sleep(ms);\n * console.log('slept');\n * }\n * ```\n *\n * ### Activities\n *\n * To schedule Activities, use {@link proxyActivities} to obtain an Activity function and call.\n *\n * ```ts\n * import { proxyActivities } from '@temporalio/workflow';\n * import type * as activities from './activities';\n *\n * const { sendEmail } = proxyActivities<typeof activities>({\n * startToCloseTimeout: '1 minute',\n * });\n\nexport async function sampleWorkflow(): Promise<string> {\n await sendEmail(\"to@example.com\",\"Hello, Temporal!\");\n}\n\n * ```\n *\n * ### Updates, Signals and Queries\n *\n * Use {@link setHandler} to set handlers for Updates, Signals, and Queries.\n *\n * Update and Signal handlers can be either async or non-async functions. Update handlers may return a value, but signal\n * handlers may not (return `void` or `Promise<void>`). You may use Activities, Timers, child Workflows, etc in Update\n * and Signal handlers, but this should be done cautiously: for example, note that if you await async operations such as\n * these in an Update or Signal handler, then you are responsible for ensuring that the workflow does not complete first.\n *\n * Query handlers may **not** be async functions, and may **not** mutate any variables or use Activities, Timers,\n * child Workflows, etc.\n *\n * #### Implementation\n *\n * ```ts\n * export const incrementSignal = wf.defineSignal<[number]>('increment');\n * export const getValueQuery = wf.defineQuery<number>('getValue');\n * export const incrementAndGetValueUpdate = wf.defineUpdate<number, [number]>('incrementAndGetValue');\n *\n * export async function counterWorkflow(initialValue: number): Promise<void> {\n * let count = initialValue;\n * wf.setHandler(incrementSignal, (arg: number) => {\n * count += arg;\n * });\n * wf.setHandler(getValueQuery, () => count);\n * wf.setHandler(incrementAndGetValueUpdate, (arg: number): number => {\n * count += arg;\n * return count;\n * });\n * await wf.condition(() => false);\n * }\n * ```\n *\n * ### More\n *\n * - [Deterministic built-ins](https://docs.temporal.io/typescript/determinism#sources-of-non-determinism)\n * - [Cancellation and scopes](https://docs.temporal.io/typescript/cancellation-scopes)\n * - {@link CancellationScope}\n * - {@link Trigger}\n * - [Sinks](https://docs.temporal.io/application-development/observability/?lang=ts#logging)\n * - {@link Sinks}\n *\n * @module\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NexusOperationCancellationType = exports.createNexusServiceClient = exports.metricMeter = exports.Trigger = exports.log = exports.workflowRandom = exports.getRandomStream = exports.proxySinks = exports.ParentClosePolicy = exports.ContinueAsNew = exports.ChildWorkflowCancellationType = exports.CancellationScope = exports.AsyncLocalStorage = exports.TimeoutFailure = exports.TerminatedFailure = exports.TemporalFailure = exports.ServerFailure = exports.rootCause = exports.defaultPayloadConverter = exports.ChildWorkflowFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ActivityFailure = exports.ActivityCancellationType = void 0;\nvar common_1 = require(\"@temporalio/common\");\nObject.defineProperty(exports, \"ActivityCancellationType\", { enumerable: true, get: function () { return common_1.ActivityCancellationType; } });\nObject.defineProperty(exports, \"ActivityFailure\", { enumerable: true, get: function () { return common_1.ActivityFailure; } });\nObject.defineProperty(exports, \"ApplicationFailure\", { enumerable: true, get: function () { return common_1.ApplicationFailure; } });\nObject.defineProperty(exports, \"CancelledFailure\", { enumerable: true, get: function () { return common_1.CancelledFailure; } });\nObject.defineProperty(exports, \"ChildWorkflowFailure\", { enumerable: true, get: function () { return common_1.ChildWorkflowFailure; } });\nObject.defineProperty(exports, \"defaultPayloadConverter\", { enumerable: true, get: function () { return common_1.defaultPayloadConverter; } });\nObject.defineProperty(exports, \"rootCause\", { enumerable: true, get: function () { return common_1.rootCause; } });\nObject.defineProperty(exports, \"ServerFailure\", { enumerable: true, get: function () { return common_1.ServerFailure; } });\nObject.defineProperty(exports, \"TemporalFailure\", { enumerable: true, get: function () { return common_1.TemporalFailure; } });\nObject.defineProperty(exports, \"TerminatedFailure\", { enumerable: true, get: function () { return common_1.TerminatedFailure; } });\nObject.defineProperty(exports, \"TimeoutFailure\", { enumerable: true, get: function () { return common_1.TimeoutFailure; } });\n__exportStar(require(\"@temporalio/common/lib/errors\"), exports);\n__exportStar(require(\"@temporalio/common/lib/workflow-handle\"), exports);\n__exportStar(require(\"@temporalio/common/lib/workflow-options\"), exports);\nvar cancellation_scope_1 = require(\"./cancellation-scope\");\nObject.defineProperty(exports, \"AsyncLocalStorage\", { enumerable: true, get: function () { return cancellation_scope_1.AsyncLocalStorage; } });\nObject.defineProperty(exports, \"CancellationScope\", { enumerable: true, get: function () { return cancellation_scope_1.CancellationScope; } });\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./interceptors\"), exports);\nvar interfaces_1 = require(\"./interfaces\");\nObject.defineProperty(exports, \"ChildWorkflowCancellationType\", { enumerable: true, get: function () { return interfaces_1.ChildWorkflowCancellationType; } });\nObject.defineProperty(exports, \"ContinueAsNew\", { enumerable: true, get: function () { return interfaces_1.ContinueAsNew; } });\nObject.defineProperty(exports, \"ParentClosePolicy\", { enumerable: true, get: function () { return interfaces_1.ParentClosePolicy; } });\nvar sinks_1 = require(\"./sinks\");\nObject.defineProperty(exports, \"proxySinks\", { enumerable: true, get: function () { return sinks_1.proxySinks; } });\nvar random_streams_1 = require(\"./random-streams\");\nObject.defineProperty(exports, \"getRandomStream\", { enumerable: true, get: function () { return random_streams_1.getRandomStream; } });\nObject.defineProperty(exports, \"workflowRandom\", { enumerable: true, get: function () { return random_streams_1.workflowRandom; } });\nvar logs_1 = require(\"./logs\");\nObject.defineProperty(exports, \"log\", { enumerable: true, get: function () { return logs_1.log; } });\nvar trigger_1 = require(\"./trigger\");\nObject.defineProperty(exports, \"Trigger\", { enumerable: true, get: function () { return trigger_1.Trigger; } });\n__exportStar(require(\"./workflow\"), exports);\nvar metrics_1 = require(\"./metrics\");\nObject.defineProperty(exports, \"metricMeter\", { enumerable: true, get: function () { return metrics_1.metricMeter; } });\nvar nexus_1 = require(\"./nexus\");\nObject.defineProperty(exports, \"createNexusServiceClient\", { enumerable: true, get: function () { return nexus_1.createNexusServiceClient; } });\nObject.defineProperty(exports, \"NexusOperationCancellationType\", { enumerable: true, get: function () { return nexus_1.NexusOperationCancellationType; } });\n//# sourceMappingURL=index.js.map","// This file runs inside the Temporal workflow V8 sandbox.\n// Constraints: no I/O, no crypto.randomUUID(), no Date.now(), no require().\n// It must be a standalone entry point so Temporal can bundle it separately.\n// Temporal injects a deterministic AsyncLocalStorage into the sandbox global\n// scope and re-exports it here (the same one its own UpdateScope/CancellationScope\n// rely on), so this import is replay-safe — unlike node:async_hooks directly.\nimport {\n AsyncLocalStorage,\n type Headers,\n type WorkflowInterceptors,\n} from \"@temporalio/workflow\";\n\nimport { LAMINAR_SPAN_CONTEXT_HEADER, TRACEPARENT_HEADER } from \"./consts\";\n\n// True when the headers map actually carries an injected Laminar / W3C trace\n// context. A signal or update may arrive with no injected context (empty or\n// undefined headers); in that case we must NOT enter the handler-headers scope,\n// or `activeHeaders()` would resolve to that empty map and drop the\n// workflow-start trace from any activity / child-workflow scheduled inside the\n// handler.\nconst hasTraceHeaders = (headers: Headers): boolean =>\n headers[LAMINAR_SPAN_CONTEXT_HEADER] != null ||\n headers[TRACEPARENT_HEADER] != null;\n\n// Trace headers from the workflow-start call. Module-level storage is\n// per-workflow-sandbox — each workflow execution gets its own V8 module\n// instance, so there is no cross-contamination between concurrent workflows on\n// the same worker.\nlet _startHeaders: Headers = {};\n\n// Trace headers scoped to the currently-running signal/update handler\n// coroutine. The client `signal` / `startUpdate` interceptors inject their own\n// context, distinct from the workflow-start trace; activities scheduled from\n// inside such a handler must be parented to the handler's trace, not the\n// workflow-start one. Each handler runs as its own coroutine, so\n// AsyncLocalStorage keeps its headers isolated from the main workflow path and\n// from other concurrent handlers — overwriting the shared `_startHeaders` would\n// corrupt those interleaved paths.\nconst _handlerHeaders = new AsyncLocalStorage<Headers>();\n\n// The trace headers that outbound calls should propagate from: the active\n// signal/update handler's headers when one is running, otherwise the\n// workflow-start headers.\nconst activeHeaders = (): Headers =>\n _handlerHeaders.getStore() ?? _startHeaders;\n\n\nexport const interceptors = (): WorkflowInterceptors => ({\n inbound: [\n {\n execute: async (input, next) => {\n _startHeaders = input.headers ?? {};\n return next(input);\n },\n handleSignal: async (input, next) => {\n const headers = input.headers ?? {};\n // Only override the active trace when the signal carried its own\n // context — otherwise fall through to the workflow-start headers.\n return hasTraceHeaders(headers)\n ? _handlerHeaders.run(headers, () => next(input))\n : next(input);\n },\n handleUpdate: async (input, next) => {\n const headers = input.headers ?? {};\n // Only override the active trace when the update carried its own\n // context — otherwise fall through to the workflow-start headers.\n return hasTraceHeaders(headers)\n ? _handlerHeaders.run(headers, () => next(input))\n : next(input);\n },\n },\n ],\n outbound: [\n {\n scheduleActivity: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n scheduleLocalActivity: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n startChildWorkflowExecution: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n continueAsNew: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n },\n ],\n});\n\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],"mappings":";;;;;CAGA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,cAAc,QAAQ,cAAc,KAAK;CACjD,QAAQ,SAAS;CACjB,QAAQ,SAAS;CACjB,MAAM,eAAe,OAAO;CAC5B,MAAM,gBAAgB;CACtB,MAAM,eAAe,IAAI,YAAY,EAAE;CACvC,IAAM,cAAN,MAAkB;EACd,OAAO,oBAAoB;GACvB,MAAM,WAAW,8BAA8B,aAAa,qBAAqB,IAAI,WAAW,kBAAkB;GAClH,IAAI,kBAAkB,IAAI,SAAS,IAAI,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM;GAC5H,MAAM,MAAM,SAAS,SAAS;GAC9B,MAAM,aAAc,MAAM,KAAM;GAEhC,OAAO,QAAQ,MAAM;IACjB,UAAU,SAAS,aAAa,KAAM,MAAM,QAAS;IACrD,OAAO,MAAM,SAAS,QAAS,QAAQ,IAAK,GAAG,MAAO,MAAM,IAAK,GAAG;KAEhE,MAAM,SAAS,SAAS;KACxB,QAAQ,OAAO,GAAf;MACI,KAAK;OAED,MAAM,SAAU,QAAS,QAAQ,IAAK,KAAM;OAC5C,IAAI,OAAO,MAAM,KAAQ,MAAa,KAAK;QACvC,QAAS,QAAQ,IAAK;QACtB;OACJ;OACA,aAAc,MAAM,MAAU,IAAM,MAAM;OAC1C,UAAU;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AAO,IAC1B,gBAAgB,IAAI,eAAe,KAAK,KAAK,CAAC,IAC9C,KAAK,KAAK;EAChB;CACF,CACF;CACA,UAAU,CACR;EACE,kBAAkB,OAAO,OAAO,SAC9B,KAAK;GACH,GAAG;GACH,SAAS;IAAE,GAAG,cAAc;IAAG,GAAG,MAAM;GAAQ;EAClD,CAAC;EACH,uBAAuB,OAAO,OAAO,SACnC,KAAK;GACH,GAAG;GACH,SAAS;IAAE,GAAG,cAAc;IAAG,GAAG,MAAM;GAAQ;EAClD,CAAC;EACH,6BAA6B,OAAO,OAAO,SACzC,KAAK;GACH,GAAG;GACH,SAAS;IAAE,GAAG,cAAc;IAAG,GAAG,MAAM;GAAQ;EAClD,CAAC;EACH,eAAe,OAAO,OAAO,SAC3B,KAAK;GACH,GAAG;GACH,SAAS;IAAE,GAAG,cAAc;IAAG,GAAG,MAAM;GAAQ;EAClD,CAAC;CACL,CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"workflow-interceptors.cjs","names":["exports","exports","exports","exports","#cancelRequested","signalOptions","exports","AsyncLocalStorage"],"sources":["../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/encoding.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/type-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/errors.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/internal-workflow/enums-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/internal-workflow/objects-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/internal-workflow/index.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/activity-options.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/activity-cancellation-details.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/continue-as-new.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/internal/symbol-instanceof.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/common/handler-error.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/common/operation-error.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/common/index.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/internal/object-utils.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/service/service-definition.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/service/helpers.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/service/index.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/start-operation-result.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/operation-handler.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/service-handler.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/handler/index.js","../../../../../../node_modules/.pnpm/nexus-rpc@0.0.2/node_modules/nexus-rpc/lib/index.js","../../../../../../node_modules/.pnpm/long@5.3.2/node_modules/long/umd/index.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/failure.js","../../../../../../node_modules/.pnpm/ms@3.0.0-canary.1/node_modules/ms/dist/index.cjs","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/time.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/converter/types.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/converter/payload-converter.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/converter/failure-converter.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/converter/data-converter.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/converter/payload-codec.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/deprecated-time.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/interfaces.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/logger.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/priority.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/metrics.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/retry-policy.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/worker-deployments.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/workflow-definition-options.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/workflow-handle.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/workflow-options.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/versioning-intent.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/search-attributes.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/index.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/global-attributes.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/stack-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/flags.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/cancellation-scope.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/errors.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/interceptors.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/interfaces.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/sinks.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/random-helpers.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/random-streams.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/interceptors.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/interceptor-composition.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/user-metadata.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/converter/payload-search-attributes.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/versioning-intent-enum.js","../../../../../../node_modules/.pnpm/@temporalio+common@1.20.0/node_modules/@temporalio/common/lib/reserved.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/update-scope.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/workflow.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/logs.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/trigger.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/metrics.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/nexus.js","../../../../../../node_modules/.pnpm/@temporalio+workflow@1.20.0/node_modules/@temporalio/workflow/lib/index.js","../../../../src/opentelemetry-lib/instrumentation/temporal/workflow-interceptors.ts"],"sourcesContent":["\"use strict\";\n// Pasted with modifications from: https://raw.githubusercontent.com/anonyco/FastestSmallestTextEncoderDecoder/master/EncoderDecoderTogether.src.js\n/* eslint no-fallthrough: 0 */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextEncoder = exports.TextDecoder = void 0;\nexports.encode = encode;\nexports.decode = decode;\nconst fromCharCode = String.fromCharCode;\nconst encoderRegexp = /[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g;\nconst tmpBufferU16 = new Uint16Array(32);\nclass TextDecoder {\n decode(inputArrayOrBuffer) {\n const inputAs8 = inputArrayOrBuffer instanceof Uint8Array ? inputArrayOrBuffer : new Uint8Array(inputArrayOrBuffer);\n let resultingString = '', tmpStr = '', index = 0, nextEnd = 0, cp0 = 0, codePoint = 0, minBits = 0, cp1 = 0, pos = 0, tmp = -1;\n const len = inputAs8.length | 0;\n const lenMinus32 = (len - 32) | 0;\n // Note that tmp represents the 2nd half of a surrogate pair incase a surrogate gets divided between blocks\n for (; index < len;) {\n nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0;\n for (; pos < nextEnd; index = (index + 1) | 0, pos = (pos + 1) | 0) {\n // @ts-expect-error ignoring unchecked index\n cp0 = inputAs8[index] & 0xff;\n switch (cp0 >> 4) {\n case 15:\n // @ts-expect-error ignoring unchecked index\n cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff;\n if (cp1 >> 6 !== 0b10 || 0b11110111 < cp0) {\n index = (index - 1) | 0;\n break;\n }\n codePoint = ((cp0 & 0b111) << 6) | (cp1 & 0b00111111);\n minBits = 5; // 20 ensures it never passes -> all invalid replacements\n cp0 = 0x100; // keep track of th bit size\n case 14:\n // @ts-expect-error ignoring unchecked index\n cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff;\n codePoint <<= 6;\n codePoint |= ((cp0 & 0b1111) << 6) | (cp1 & 0b00111111);\n minBits = cp1 >> 6 === 0b10 ? (minBits + 4) | 0 : 24; // 24 ensures it never passes -> all invalid replacements\n cp0 = (cp0 + 0x100) & 0x300; // keep track of th bit size\n case 13:\n case 12:\n // @ts-expect-error ignoring unchecked index\n cp1 = inputAs8[(index = (index + 1) | 0)] & 0xff;\n codePoint <<= 6;\n codePoint |= ((cp0 & 0b11111) << 6) | (cp1 & 0b00111111);\n minBits = (minBits + 7) | 0;\n // Now, process the code point\n if (index < len && cp1 >> 6 === 0b10 && codePoint >> minBits && codePoint < 0x110000) {\n cp0 = codePoint;\n codePoint = (codePoint - 0x10000) | 0;\n if (0 <= codePoint /*0xffff < codePoint*/) {\n // BMP code point\n //nextEnd = nextEnd - 1|0;\n tmp = ((codePoint >> 10) + 0xd800) | 0; // highSurrogate\n cp0 = ((codePoint & 0x3ff) + 0xdc00) | 0; // lowSurrogate (will be inserted later in the switch-statement)\n if (pos < 31) {\n // notice 31 instead of 32\n tmpBufferU16[pos] = tmp;\n pos = (pos + 1) | 0;\n tmp = -1;\n }\n else {\n // else, we are at the end of the inputAs8 and let tmp0 be filled in later on\n // NOTE that cp1 is being used as a temporary variable for the swapping of tmp with cp0\n cp1 = tmp;\n tmp = cp0;\n cp0 = cp1;\n }\n }\n else\n nextEnd = (nextEnd + 1) | 0; // because we are advancing i without advancing pos\n }\n else {\n // invalid code point means replacing the whole thing with null replacement characters\n cp0 >>= 8;\n index = (index - cp0 - 1) | 0; // reset index back to what it was before\n cp0 = 0xfffd;\n }\n // Finally, reset the variables for the next go-around\n minBits = 0;\n codePoint = 0;\n nextEnd = index <= lenMinus32 ? 32 : (len - index) | 0;\n /*case 11:\n case 10:\n case 9:\n case 8:\n codePoint ? codePoint = 0 : cp0 = 0xfffd; // fill with invalid replacement character\n case 7:\n case 6:\n case 5:\n case 4:\n case 3:\n case 2:\n case 1:\n case 0:\n tmpBufferU16[pos] = cp0;\n continue;*/\n default: // fill with invalid replacement character\n tmpBufferU16[pos] = cp0;\n continue;\n case 11:\n case 10:\n case 9:\n case 8:\n }\n tmpBufferU16[pos] = 0xfffd; // fill with invalid replacement character\n }\n tmpStr += fromCharCode(\n // @ts-expect-error ignoring unchecked index\n tmpBufferU16[0], tmpBufferU16[1], tmpBufferU16[2], tmpBufferU16[3], tmpBufferU16[4], tmpBufferU16[5], tmpBufferU16[6], tmpBufferU16[7], tmpBufferU16[8], tmpBufferU16[9], tmpBufferU16[10], tmpBufferU16[11], tmpBufferU16[12], tmpBufferU16[13], tmpBufferU16[14], tmpBufferU16[15], tmpBufferU16[16], tmpBufferU16[17], tmpBufferU16[18], tmpBufferU16[19], tmpBufferU16[20], tmpBufferU16[21], tmpBufferU16[22], tmpBufferU16[23], tmpBufferU16[24], tmpBufferU16[25], tmpBufferU16[26], tmpBufferU16[27], tmpBufferU16[28], tmpBufferU16[29], tmpBufferU16[30], tmpBufferU16[31]);\n if (pos < 32)\n tmpStr = tmpStr.slice(0, (pos - 32) | 0); //-(32-pos));\n if (index < len) {\n //fromCharCode.apply(0, tmpBufferU16 : Uint8Array ? tmpBufferU16.subarray(0,pos) : tmpBufferU16.slice(0,pos));\n tmpBufferU16[0] = tmp;\n pos = ~tmp >>> 31; //tmp !== -1 ? 1 : 0;\n tmp = -1;\n if (tmpStr.length < resultingString.length)\n continue;\n }\n else if (tmp !== -1) {\n tmpStr += fromCharCode(tmp);\n }\n resultingString += tmpStr;\n tmpStr = '';\n }\n return resultingString;\n }\n}\nexports.TextDecoder = TextDecoder;\n//////////////////////////////////////////////////////////////////////////////////////\nfunction encoderReplacer(nonAsciiChars) {\n // make the UTF string into a binary UTF-8 encoded string\n let point = nonAsciiChars.charCodeAt(0) | 0;\n if (0xd800 <= point) {\n if (point <= 0xdbff) {\n const nextcode = nonAsciiChars.charCodeAt(1) | 0; // defaults to 0 when NaN, causing null replacement character\n if (0xdc00 <= nextcode && nextcode <= 0xdfff) {\n //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0;\n point = ((point << 10) + nextcode - 0x35fdc00) | 0;\n if (point > 0xffff)\n return fromCharCode((0x1e /*0b11110*/ << 3) | (point >> 18), (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/);\n }\n else\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n else if (point <= 0xdfff) {\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n }\n /*if (point <= 0x007f) return nonAsciiChars;\n else */ if (point <= 0x07ff) {\n return fromCharCode((0x6 << 5) | (point >> 6), (0x2 << 6) | (point & 0x3f));\n }\n else\n return fromCharCode((0xe /*0b1110*/ << 4) | (point >> 12), (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/, (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/);\n}\nclass TextEncoder {\n encode(inputString) {\n // 0xc0 => 0b11000000; 0xff => 0b11111111; 0xc0-0xff => 0b11xxxxxx\n // 0x80 => 0b10000000; 0xbf => 0b10111111; 0x80-0xbf => 0b10xxxxxx\n const encodedString = inputString === void 0 ? '' : '' + inputString, len = encodedString.length | 0;\n let result = new Uint8Array(((len << 1) + 8) | 0);\n let tmpResult;\n let i = 0, pos = 0, point = 0, nextcode = 0;\n let upgradededArraySize = !Uint8Array; // normal arrays are auto-expanding\n for (i = 0; i < len; i = (i + 1) | 0, pos = (pos + 1) | 0) {\n point = encodedString.charCodeAt(i) | 0;\n if (point <= 0x007f) {\n result[pos] = point;\n }\n else if (point <= 0x07ff) {\n result[pos] = (0x6 << 5) | (point >> 6);\n result[(pos = (pos + 1) | 0)] = (0x2 << 6) | (point & 0x3f);\n }\n else {\n widenCheck: {\n if (0xd800 <= point) {\n if (point <= 0xdbff) {\n nextcode = encodedString.charCodeAt((i = (i + 1) | 0)) | 0; // defaults to 0 when NaN, causing null replacement character\n if (0xdc00 <= nextcode && nextcode <= 0xdfff) {\n //point = ((point - 0xD800)<<10) + nextcode - 0xDC00 + 0x10000|0;\n point = ((point << 10) + nextcode - 0x35fdc00) | 0;\n if (point > 0xffff) {\n result[pos] = (0x1e /*0b11110*/ << 3) | (point >> 18);\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 12) & 0x3f) /*0b00111111*/;\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/;\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/;\n continue;\n }\n break widenCheck;\n }\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n else if (point <= 0xdfff) {\n point = 65533 /*0b1111111111111101*/; //return '\\xEF\\xBF\\xBD';//fromCharCode(0xef, 0xbf, 0xbd);\n }\n }\n if (!upgradededArraySize && i << 1 < pos && i << 1 < ((pos - 7) | 0)) {\n upgradededArraySize = true;\n tmpResult = new Uint8Array(len * 3);\n tmpResult.set(result);\n result = tmpResult;\n }\n }\n result[pos] = (0xe /*0b1110*/ << 4) | (point >> 12);\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | ((point >> 6) & 0x3f) /*0b00111111*/;\n result[(pos = (pos + 1) | 0)] = (0x2 /*0b10*/ << 6) | (point & 0x3f) /*0b00111111*/;\n }\n }\n return Uint8Array ? result.subarray(0, pos) : result.slice(0, pos);\n }\n encodeInto(inputString, u8Arr) {\n const encodedString = inputString === void 0 ? '' : ('' + inputString).replace(encoderRegexp, encoderReplacer);\n let len = encodedString.length | 0, i = 0, char = 0, read = 0;\n const u8ArrLen = u8Arr.length | 0;\n const inputLength = inputString.length | 0;\n if (u8ArrLen < len)\n len = u8ArrLen;\n putChars: {\n for (; i < len; i = (i + 1) | 0) {\n char = encodedString.charCodeAt(i) | 0;\n switch (char >> 4) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n read = (read + 1) | 0;\n // extension points:\n case 8:\n case 9:\n case 10:\n case 11:\n break;\n case 12:\n case 13:\n if (((i + 1) | 0) < u8ArrLen) {\n read = (read + 1) | 0;\n break;\n }\n case 14:\n if (((i + 2) | 0) < u8ArrLen) {\n //if (!(char === 0xEF && encodedString.substr(i+1|0,2) === \"\\xBF\\xBD\"))\n read = (read + 1) | 0;\n break;\n }\n case 15:\n if (((i + 3) | 0) < u8ArrLen) {\n read = (read + 1) | 0;\n break;\n }\n default:\n break putChars;\n }\n //read = read + ((char >> 6) !== 2) |0;\n u8Arr[i] = char;\n }\n }\n return { written: i, read: inputLength < read ? inputLength : read };\n }\n}\nexports.TextEncoder = TextEncoder;\n/**\n * Encode a UTF-8 string into a Uint8Array\n */\nfunction encode(s) {\n return TextEncoder.prototype.encode(s);\n}\n/**\n * Decode a Uint8Array into a UTF-8 string\n */\nfunction decode(a) {\n return TextDecoder.prototype.decode(a);\n}\n//# sourceMappingURL=encoding.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkExtends = checkExtends;\nexports.isRecord = isRecord;\nexports.hasOwnProperty = hasOwnProperty;\nexports.hasOwnProperties = hasOwnProperties;\nexports.isError = isError;\nexports.isAbortError = isAbortError;\nexports.errorMessage = errorMessage;\nexports.errorCode = errorCode;\nexports.assertNever = assertNever;\nexports.SymbolBasedInstanceOfError = SymbolBasedInstanceOfError;\n/** Verify that an type _Copy extends _Orig */\nfunction checkExtends() {\n // noop, just type check\n}\nfunction isRecord(value) {\n return typeof value === 'object' && value !== null;\n}\nfunction hasOwnProperty(record, prop) {\n return prop in record;\n}\nfunction hasOwnProperties(record, props) {\n return props.every((prop) => prop in record);\n}\nfunction isError(error) {\n return (isRecord(error) &&\n typeof error.name === 'string' &&\n typeof error.message === 'string' &&\n (error.stack == null || typeof error.stack === 'string'));\n}\nfunction isAbortError(error) {\n return isError(error) && error.name === 'AbortError';\n}\n/**\n * Get `error.message` (or `undefined` if not present)\n */\nfunction errorMessage(error) {\n if (isError(error)) {\n return error.message;\n }\n else if (typeof error === 'string') {\n return error;\n }\n return undefined;\n}\nfunction isErrorWithCode(error) {\n return isRecord(error) && typeof error.code === 'string';\n}\n/**\n * Get `error.code` (or `undefined` if not present)\n */\nfunction errorCode(error) {\n if (isErrorWithCode(error)) {\n return error.code;\n }\n return undefined;\n}\n/**\n * Asserts that some type is the never type\n */\nfunction assertNever(msg, x) {\n throw new TypeError(msg + ': ' + x);\n}\n/**\n * A decorator to be used on error classes. It adds the 'name' property AND provides a custom\n * 'instanceof' handler that works correctly across execution contexts.\n *\n * ### Details ###\n *\n * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the\n * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the\n * constructor function 'Y'.\n *\n * Unfortunately, it happens in various situations that different constructor function objects get created for what\n * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is\n * known that the object is indeed an instance of that class. One particular case where this happens is when constructor\n * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies\n * of the same library gets loaded in the same realm.\n *\n * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module\n * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549\n * for some details on that one).\n *\n * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and\n * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then\n * checking for the presence of that symbol.\n */\nfunction SymbolBasedInstanceOfError(markerName) {\n return (clazz) => {\n const marker = Symbol.for(`__temporal_is${markerName}`);\n Object.defineProperty(clazz.prototype, 'name', { value: markerName, enumerable: true });\n Object.defineProperty(clazz.prototype, marker, { value: true, enumerable: false });\n Object.defineProperty(clazz, Symbol.hasInstance, {\n // eslint-disable-next-line object-shorthand\n value: function (error) {\n if (this === clazz) {\n return isRecord(error) && error[marker] === true;\n }\n else {\n // 'this' must be a _subclass_ of clazz that doesn't redefined [Symbol.hasInstance], so that it inherited\n // from clazz's [Symbol.hasInstance]. If we don't handle this particular situation, then\n // `x instanceof SubclassOfParent` would return true for any instance of 'Parent', which is clearly wrong.\n //\n // Ideally, it'd be preferable to avoid this case entirely, by making sure that all subclasses of 'clazz'\n // redefine [Symbol.hasInstance], but we can't enforce that. We therefore fallback to the default instanceof\n // behavior (which is NOT cross-realm safe).\n return this.prototype.isPrototypeOf(error); // eslint-disable-line no-prototype-builtins\n }\n },\n });\n };\n}\n//# sourceMappingURL=type-helpers.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompleteAsyncError = exports.NamespaceNotFoundError = exports.WorkflowNotFoundError = exports.IllegalStateError = exports.PayloadConverterError = exports.ValueError = void 0;\nconst type_helpers_1 = require(\"./type-helpers\");\n/**\n * Thrown from code that receives a value that is unexpected or that it's unable to handle.\n */\nlet ValueError = class ValueError extends Error {\n cause;\n constructor(message, cause) {\n super(message ?? undefined);\n this.cause = cause;\n }\n};\nexports.ValueError = ValueError;\nexports.ValueError = ValueError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ValueError')\n], ValueError);\n/**\n * Thrown when a Payload Converter is misconfigured.\n */\nlet PayloadConverterError = class PayloadConverterError extends ValueError {\n};\nexports.PayloadConverterError = PayloadConverterError;\nexports.PayloadConverterError = PayloadConverterError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('PayloadConverterError')\n], PayloadConverterError);\n/**\n * Signals that a requested operation can't be completed because it is illegal given the\n * current state of the object; e.g. trying to use a resource after it has been closed.\n */\nlet IllegalStateError = class IllegalStateError extends Error {\n};\nexports.IllegalStateError = IllegalStateError;\nexports.IllegalStateError = IllegalStateError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('IllegalStateError')\n], IllegalStateError);\n/**\n * Thrown when a Workflow with the given Id is not known to Temporal Server.\n * It could be because:\n * - Id passed is incorrect\n * - Workflow is closed (for some calls, e.g. `terminate`)\n * - Workflow was deleted from the Server after reaching its retention limit\n */\nlet WorkflowNotFoundError = class WorkflowNotFoundError extends Error {\n workflowId;\n runId;\n constructor(message, workflowId, runId) {\n super(message);\n this.workflowId = workflowId;\n this.runId = runId;\n }\n};\nexports.WorkflowNotFoundError = WorkflowNotFoundError;\nexports.WorkflowNotFoundError = WorkflowNotFoundError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowNotFoundError')\n], WorkflowNotFoundError);\n/**\n * Thrown when the specified namespace is not known to Temporal Server.\n */\nlet NamespaceNotFoundError = class NamespaceNotFoundError extends Error {\n namespace;\n constructor(namespace) {\n super(`Namespace not found: '${namespace}'`);\n this.namespace = namespace;\n }\n};\nexports.NamespaceNotFoundError = NamespaceNotFoundError;\nexports.NamespaceNotFoundError = NamespaceNotFoundError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('NamespaceNotFoundError')\n], NamespaceNotFoundError);\n/**\n * Throw this error from an Activity in order to make the Worker forget about this Activity.\n *\n * The Activity can then be completed asynchronously (from anywhere—usually outside the Worker) using\n * the Client's activity handle.\n *\n * @example\n *\n * ```ts\n *import { CompleteAsyncError } from '@temporalio/activity';\n *\n *export async function myActivity(): Promise<never> {\n * // ...\n * throw new CompleteAsyncError();\n *}\n * ```\n */\nlet CompleteAsyncError = class CompleteAsyncError extends Error {\n};\nexports.CompleteAsyncError = CompleteAsyncError;\nexports.CompleteAsyncError = CompleteAsyncError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('CompleteAsyncError')\n], CompleteAsyncError);\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeProtoEnumConverters = makeProtoEnumConverters;\nconst errors_1 = require(\"../errors\");\n/**\n * Create encoding and decoding functions to convert between the numeric `enum` types produced by our\n * Protobuf compiler and \"const object of strings\" enum values that we expose in our public APIs.\n *\n * ### Usage\n *\n * Newly introduced enums should follow the following pattern:\n *\n * ```ts\n * const ParentClosePolicy = {\n * TERMINATE: 'TERMINATE',\n * ABANDON: 'ABANDON',\n * REQUEST_CANCEL: 'REQUEST_CANCEL',\n * } as const;\n * type ParentClosePolicy = (typeof ParentClosePolicy)[keyof typeof ParentClosePolicy];\n *\n * const [encodeParentClosePolicy, decodeParentClosePolicy] = //\n * makeProtoEnumConverters<\n * coresdk.child_workflow.ParentClosePolicy,\n * typeof coresdk.child_workflow.ParentClosePolicy,\n * keyof typeof coresdk.child_workflow.ParentClosePolicy,\n * typeof ParentClosePolicy,\n * 'PARENT_CLOSE_POLICY_' // This may be an empty string if the proto enum doesn't add a repeated prefix on values\n * >(\n * {\n * [ParentClosePolicy.TERMINATE]: 1, // These numbers must match the ones in the proto enum\n * [ParentClosePolicy.ABANDON]: 2,\n * [ParentClosePolicy.REQUEST_CANCEL]: 3,\n *\n * UNSPECIFIED: 0,\n * } as const,\n * 'PARENT_CLOSE_POLICY_'\n * );\n * ```\n *\n * `makeProtoEnumConverters` supports other usage patterns, but they are only meant for\n * backward compatibility with former enum definitions and should not be used for new enums.\n *\n * ### Context\n *\n * Temporal's Protobuf APIs define several `enum` types; our Protobuf compiler transforms these to\n * traditional (i.e. non-const) [TypeScript numeric `enum`s](https://www.typescriptlang.org/docs/handbook/enums.html#numeric-enums).\n *\n * For various reasons, this is far from ideal:\n *\n * - Due to the dual nature of non-const TypeScript `enum`s (they are both a type and a value),\n * it is not possible to refer to an enum value from code without a \"real\" import of the enum type\n * (i.e. can't simply do `import type ...`). In Workflow code, such an import would result in\n * loading our entire Protobuf definitions into the workflow sandbox, adding several megabytes to\n * the per-workflow memory footprint, which is unacceptable; to avoid that, we need to maintain\n * a mirror copy of each enum types used by in-workflow APIs, and export these from either\n * `@temporalio/common` or `@temporalio/workflow`.\n * - It is not desirable for users to need an explicit dependency on `@temporalio/proto` just to\n * get access to these enum types; we therefore made it a common practice to reexport these enums\n * from our public facing packages. However, experience demontrated that these reexports effectively\n * resulted in poor and inconsistent documentation coverage compared to mirrored enums types.\n * - Our Protobuf enum types tend to follow a verbose and redundant naming convention, which feels\n * unatural and excessive according to most TypeScript style guides; e.g. instead of\n * `workflowIdReusePolicy: WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`,\n * a TypeScript developer would generally expect to be able to write something similar to\n * `workflowIdReusePolicy: 'REJECT_DUPLICATE'`.\n * - Because of the way Protobuf works, many of our enum types contain an `UNSPECIFIED` value, which\n * is used to explicitly identify a value that is unset. In TypeScript code, the `undefined` value\n * already serves that purpose, and is definitely more idiomatic to TS developers, whereas these\n * `UNSPECIFIED` values create noise and confusion in our APIs.\n * - TypeScript editors generally do a very bad job at providing autocompletion that implies reaching\n * for values of a TypeScript enum type, forcing developers to explicitly type in at least part\n * of the name of the enum type before they can get autocompletion for its values. On the other\n * hand, all TS editors immediately provide autocompletion for string union types.\n * - The [TypeScript's official documentation](https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)\n * itself suggests that, in modern TypeScript, the use of `as const` objects may generally suffice\n * and may be advantageous over the use of `enum` types.\n *\n * A const object of strings, combined with a union type of possible string values, provides a much\n * more idiomatic syntax and a better DX for TypeScript developers. This however requires a way to\n * convert back and forth between the `enum` values produced by the Protobuf compiler and the\n * equivalent string values.\n *\n * This helper dynamically creates these conversion functions for a given Protobuf enum type,\n * strongly building upon specific conventions that we have adopted in our Protobuf definitions.\n *\n * ### Validations\n *\n * The complex type signature of this helper is there to prevent most potential incoherencies\n * that could result from having to manually synchronize the const object of strings enum and the\n * conversion table with the proto enum, while not requiring a regular import on the Protobuf enum\n * itself (so it can be used safely for enums meant to be used from workflow code).\n *\n * In particular, failing any of the following invariants will result in build time errors:\n *\n * - For every key of the form `PREFIX_KEY: number` in the proto enum, excluding the `UNSPECIFIED` key:\n * - There MUST be a corresponding `KEY: 'KEY'` entry in the const object of strings enum;\n * - There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum\n * (this is meant to preserve backward compatibility with the former syntax; such aliases should\n * not be added for new enums and enum entries introduced going forward);\n * - There MUST be a corresponding `KEY: number` in the mapping table.\n * - If the proto enum contains a `PREFIX_UNSPECIFIED` entry, then:\n * - There MAY be a corresponding `PREFIX_UNSPECIFIED: undefined` and/or `UNSPECIFIED: undefined`\n * entries in the const object of strings enum — this is meant to preserve backward compatibility\n * with the former syntax; this alias should not be added for new enums introduced going forward;\n * - There MUST be an `UNSPECIFIED: 0` in the mapping table.\n * - The const object of strings enum MUST NOT contain any other keys than the ones mandated or\n * optionally allowed be the preceeding rules.\n * - The mapping table MUST NOT contain any other keys than the ones mandated above.\n *\n * These rules notably ensure that whenever a new value is added to an existing Proto enum, the code\n * will fail to compile until the corresponding entry is added on the const object of strings enum\n * and the mapping table.\n *\n * @internal\n */\nfunction makeProtoEnumConverters(mapTable, prefix) {\n const reverseTable = Object.fromEntries(Object.entries(mapTable).map(([k, v]) => [v, k]));\n const hasUnspecified = mapTable['UNSPECIFIED'] === 0 || mapTable[`${prefix}UNSPECIFIED`] === 0;\n function isShortStringEnumKeys(x) {\n return typeof x === 'string' && x in mapTable;\n }\n function isNumericEnumValue(x) {\n return typeof x === 'number' && x in reverseTable;\n }\n function encode(input) {\n if (input == null) {\n return undefined;\n }\n else if (typeof input === 'string') {\n let shorten = input;\n if (shorten.startsWith(prefix)) {\n shorten = shorten.slice(prefix.length);\n }\n if (isShortStringEnumKeys(shorten)) {\n return mapTable[shorten];\n }\n throw new errors_1.ValueError(`Invalid enum value: '${input}'`);\n }\n else if (typeof input === 'number') {\n return input;\n }\n else {\n throw new errors_1.ValueError(`Invalid enum value: '${input}' of type ${typeof input}`);\n }\n }\n function decode(input) {\n if (input == null) {\n return undefined;\n }\n else if (typeof input === 'number') {\n if (hasUnspecified && input === 0) {\n return undefined;\n }\n if (isNumericEnumValue(input)) {\n return reverseTable[input];\n }\n // We got a proto enum value that we don't yet know about (i.e. it didn't exist when this code\n // was compiled). This is certainly a possibility, but given how our APIs evolve, this is is\n // unlikely to be a terribly bad thing by itself (we avoid adding new enum values in places\n // that would break backward compatibility with existing deployed code). Therefore, throwing\n // on \"unexpected\" values is likely to end up causing more problems than it might avoid,\n // especially given that the decoded value may actually never get read anwyay.\n //\n // Therefore, we instead cheat on type constraints and return a string of the form \"unknown_23\".\n // That somewhat mirrors the behavior we'd get with the pure numerical approach.\n return `unknown_${input}`;\n }\n throw new errors_1.ValueError(`Invalid proto enum value: '${input}' of type ${typeof input}`);\n }\n return [encode, decode];\n}\n//# sourceMappingURL=enums-helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterNullAndUndefined = filterNullAndUndefined;\nexports.mergeObjects = mergeObjects;\nexports.deepMerge = deepMerge;\n/**\n * Helper to prevent `undefined` and `null` values overriding defaults when merging maps.\n */\nfunction filterNullAndUndefined(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([_k, v]) => v != null));\n}\nfunction mergeObjects(original, delta) {\n if (original == null)\n return delta;\n if (delta == null)\n return original;\n const merged = { ...original };\n let changed = false;\n for (const [k, v] of Object.entries(delta)) {\n if (v !== merged[k]) {\n if (v == null)\n delete merged[k];\n else\n merged[k] = v;\n changed = true;\n }\n }\n return changed ? merged : original;\n}\nfunction isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n/**\n * Recursively merges two objects, returning a new object.\n *\n * Properties from `source` will overwrite properties on `target`.\n * Nested objects are merged recursively.\n *\n * Object fields in the returned object are references, as in,\n * the returned object is not completely fresh.\n */\nfunction deepMerge(target, source) {\n const output = { ...target };\n if (isObject(target) && isObject(source)) {\n for (const key of Object.keys(source)) {\n const sourceValue = source[key];\n if (isObject(sourceValue) && key in target && isObject(target[key])) {\n output[key] = deepMerge(target[key], sourceValue);\n }\n else {\n output[key] = sourceValue;\n }\n }\n }\n return output;\n}\n//# sourceMappingURL=objects-helpers.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deepMerge = exports.mergeObjects = exports.filterNullAndUndefined = void 0;\n__exportStar(require(\"./enums-helpers\"), exports);\nvar objects_helpers_1 = require(\"./objects-helpers\");\nObject.defineProperty(exports, \"filterNullAndUndefined\", { enumerable: true, get: function () { return objects_helpers_1.filterNullAndUndefined; } });\nObject.defineProperty(exports, \"mergeObjects\", { enumerable: true, get: function () { return objects_helpers_1.mergeObjects; } });\n// ts-prune-ignore-next\nObject.defineProperty(exports, \"deepMerge\", { enumerable: true, get: function () { return objects_helpers_1.deepMerge; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeActivityCancellationType = exports.encodeActivityCancellationType = exports.ActivityCancellationType = void 0;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n// Note: The types defined in this file are here for legacy reasons. They should have been defined\n// in the 'workflow' package, instead of 'common'. They are now reexported from the 'workflow'\n// package, which is the preferred way to import them, but we unfortunately can't remove them from\n// here as that would be a breaking change.\n/**\n * Determines:\n * - whether cancellation requests should be propagated from the current Workflow to the Activity; and\n * - when should the Activity cancellation be reported to Workflow (i.e. at which moment should the\n * Activity call's promise fail with an `ActivityFailure`, with `cause` set to a `CancelledFailure`).\n *\n * Note that this setting only applies to cancellation originating from cancellation being\n * externally requested on the Workflow itself, or from internal cancellation of the\n * `CancellationScope` in which the Activity call was made. Termination of a Workflow Execution\n * always results in cancellation of its outstanding Activity executions, regardless of those\n * Activities' {@link ActivityCancellationType} settings.\n *\n * @default ActivityCancellationType.WAIT_CANCELLATION_COMPLETED\n */\n// MAINTENANCE: Keep this typedoc in sync with the `ActivityOptions.cancellationType` and\n// `LocalActivityOptions.cancellationType` fields later in this file.\nexports.ActivityCancellationType = {\n /**\n * Do not propagate cancellation requests to the Activity, and immediately report cancellation\n * to the caller.\n */\n ABANDON: 'ABANDON',\n /**\n * Propagate cancellation request from the Workflow to the Activity, yet _immediately_ report\n * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation\n * request.\n *\n * Note that this cancellation type provides no guarantee, from the Workflow-side, that the\n * cancellation request will actually be delivered to the Activity; e.g. the calling Workflow\n * may exit before the delivery is completed, or the Activity may complete (either successfully\n * or uncessfully) before the cancellation is delivered, resulting in a situation where the\n * workflow thinks the activity was cancelled, but the activity actually completed successfully.\n *\n * To ensure that the Workflow is properly informed of the Activity's final state (i.e. either\n * completion or cancellation), use {@link WAIT_CANCELLATION_COMPLETED}.\n */\n TRY_CANCEL: 'TRY_CANCEL',\n /**\n * Propagate cancellation request from the Workflow to the Activity, and wait for the activity\n * to complete its execution (either successfully, uncessfully, or as cancelled).\n *\n * Note that the Activity must heartbeat to receive a cancellation notification. This can block\n * the Workflow's cancellation for a long time if the Activity doesn't heartbeat or chooses to\n * ignore the cancellation request.\n */\n WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED',\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.ActivityCancellationType.TRY_CANCEL]: 0,\n [exports.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED]: 1,\n [exports.ActivityCancellationType.ABANDON]: 2,\n}, ''), exports.encodeActivityCancellationType = _a[0], exports.decodeActivityCancellationType = _a[1];\n//# sourceMappingURL=activity-options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ActivityCancellationDetails = void 0;\n/**\n * Provides the reasons for the activity's cancellation. Cancellation details are set once and do not change once set.\n */\nclass ActivityCancellationDetails {\n notFound;\n cancelRequested;\n paused;\n timedOut;\n workerShutdown;\n reset;\n constructor(options = {}) {\n this.notFound = options.notFound ?? false;\n this.cancelRequested = options.cancelRequested ?? false;\n this.paused = options.paused ?? false;\n this.timedOut = options.timedOut ?? false;\n this.workerShutdown = options.workerShutdown ?? false;\n this.reset = options.reset ?? false;\n }\n static fromProto(proto) {\n if (proto == null) {\n return new ActivityCancellationDetails();\n }\n return new ActivityCancellationDetails({\n notFound: proto.isNotFound ?? false,\n cancelRequested: proto.isCancelled ?? false,\n paused: proto.isPaused ?? false,\n timedOut: proto.isTimedOut ?? false,\n workerShutdown: proto.isWorkerShutdown ?? false,\n reset: proto.isReset ?? false,\n });\n }\n}\nexports.ActivityCancellationDetails = ActivityCancellationDetails;\n//# sourceMappingURL=activity-cancellation-details.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeSuggestContinueAsNewReason = exports.encodeSuggestContinueAsNewReason = exports.SuggestContinueAsNewReason = void 0;\nexports.suggestContinueAsNewReasonsFromProto = suggestContinueAsNewReasonsFromProto;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * Reason(s) why continue as new is suggested. Can potentially be multiple reasons.\n *\n * @experimental May be removed or changed in the future.\n */\nexports.SuggestContinueAsNewReason = {\n HISTORY_SIZE_TOO_LARGE: 'HISTORY_SIZE_TOO_LARGE',\n TOO_MANY_HISTORY_EVENTS: 'TOO_MANY_HISTORY_EVENTS',\n TOO_MANY_UPDATES: 'TOO_MANY_UPDATES',\n};\n// ts-prune-ignore-next\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.SuggestContinueAsNewReason.HISTORY_SIZE_TOO_LARGE]: 1,\n [exports.SuggestContinueAsNewReason.TOO_MANY_HISTORY_EVENTS]: 2,\n [exports.SuggestContinueAsNewReason.TOO_MANY_UPDATES]: 3,\n UNSPECIFIED: 0,\n}, 'SUGGEST_CONTINUE_AS_NEW_REASON_'), exports.encodeSuggestContinueAsNewReason = _a[0], exports.decodeSuggestContinueAsNewReason = _a[1];\n// ts-prune-ignore-next\nfunction suggestContinueAsNewReasonsFromProto(reasons) {\n if (reasons == null) {\n return undefined;\n }\n const res = [];\n for (const r of reasons) {\n const decoded = (0, exports.decodeSuggestContinueAsNewReason)(r);\n if (decoded !== undefined) {\n res.push(decoded);\n }\n }\n if (res.length === 0) {\n return undefined;\n }\n return res;\n}\n//# sourceMappingURL=continue-as-new.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.injectSymbolBasedInstanceOf = injectSymbolBasedInstanceOf;\n/**\n * Inject a custom 'instanceof' handler on the given class, that works correctly across execution contexts.\n *\n * ### Details ###\n *\n * According to the EcmaScript's spec, the default behavior of JavaScript's `x instanceof Y` operator is to walk up the\n * prototype chain of object 'x', checking if any constructor in that hierarchy is _exactly the same object_ as the\n * constructor function 'Y'.\n *\n * Unfortunately, it happens in various situations that different constructor function objects get created for what\n * appears to be the very same class. This leads to surprising behavior where `instanceof` returns false though it is\n * known that the object is indeed an instance of that class. One particular case where this happens is when constructor\n * 'Y' belongs to a different realm than the constuctor with which 'x' was instantiated. Another case is when two copies\n * of the same library gets loaded in the same realm.\n *\n * In practice, this tends to cause issues when crossing the workflow-sandboxing boundary (since Node's vm module\n * really creates new execution realms), as well as when running tests using Jest (see https://github.com/jestjs/jest/issues/2549\n * for some details on that one).\n *\n * This function injects a custom 'instanceof' handler into the prototype of 'clazz', which is both cross-realm safe and\n * cross-copies-of-the-same-lib safe. It works by adding a special symbol property to the prototype of 'clazz', and then\n * checking for the presence of that symbol.\n *\n * @internal\n * @hidden\n */\nfunction injectSymbolBasedInstanceOf(clazz, markerName) {\n // It may seem redundant to have an explicit markerName argument here. Can't we simply use the class\n // function name for that? Unfortunately, no, as the class name may get mangled if the file gets minified.\n const marker = Symbol.for(`__nexus_is${markerName}`);\n Object.defineProperty(clazz.prototype, \"name\", { value: markerName, enumerable: true });\n Object.defineProperty(clazz.prototype, marker, { value: true, enumerable: false });\n Object.defineProperty(clazz, Symbol.hasInstance, {\n value: function (value) {\n if (this === clazz) {\n return typeof value === \"object\" && value !== null && value[marker] === true;\n }\n else {\n // 'this' must be a _subclass_ of clazz that doesn't redefined [Symbol.hasInstance], so that it inherited\n // from clazz's [Symbol.hasInstance]. If we don't handle this particular situation, then\n // `x instanceof SubclassOfParent` would return true for any instance of 'Parent', which is clearly wrong.\n //\n // Ideally, it'd be preferable to avoid this case entirely, by making sure that all subclasses of 'clazz'\n // redefine [Symbol.hasInstance], but we can't enforce that. We therefore fallback to the default instanceof\n // behavior (which is NOT cross-realm safe).\n return this.prototype.isPrototypeOf(value); // eslint-disable-line no-prototype-builtins\n }\n },\n });\n}\n//# sourceMappingURL=symbol-instanceof.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandlerErrorType = exports.HandlerError = void 0;\nconst symbol_instanceof_1 = require(\"../internal/symbol-instanceof\");\n/**\n * A Nexus handler error.\n *\n * This error class represents an error that occurred during the handling of a\n * Nexus operation that should be reported to the caller as a handler error.\n *\n * Example:\n *\n * ```ts\n * import { HandlerError } from \"nexus-rpc\";\n *\n * // Throw a bad request error\n * throw new HandlerError(\"BAD_REQUEST\", \"Invalid input provided\");\n *\n * // Throw a bad request error, with a cause\n * throw new HandlerError(\"BAD_REQUEST\", \"Invalid input provided\", { cause });\n *\n * // Throw a retryable internal error\n * throw new HandlerError(\"INTERNAL\", \"Database unavailable\", { retryableOverride: true });\n *\n * ```\n *\n * @experimental\n */\nclass HandlerError extends Error {\n /**\n * One of the predefined error types.\n *\n * If the constructor received an unknown string, this will be `\"UNKNOWN\"`.\n * Use {@link rawErrorType} to access the original string.\n *\n * @see {@link HandlerErrorType}\n */\n type;\n /**\n * The raw error type string.\n *\n * For known types, this equals {@link type}. For unknown types, this preserves\n * the original wire string while {@link type} is set to `\"UNKNOWN\"`.\n */\n rawErrorType;\n /**\n * Whether this error should be considered retryable.\n *\n * By default, the retry behavior is determined from the error type.\n * For example, by default, `INTERNAL` is retryable, but `UNAVAILABLE` is non-retryable.\n *\n * If specified, `retryableOverride` overrides the default retry behavior determined based on\n * the error type. Use {@link retryable} to determine the effective retry behavior.\n *\n * @see {@link retryable}.\n */\n retryableOverride;\n /**\n * Set if this error was constructed from a {@link Failure} object.\n *\n * Preserves the original failure for round-tripping through the wire format.\n */\n originalFailure;\n /**\n * Constructs a new {@link HandlerError}.\n *\n * @param type - The type of the error. Must be a known {@link HandlerErrorType}.\n * @param message - The message of the error.\n * @param options - Extra options for the error, including the cause and retryable override.\n *\n * @experimental\n */\n constructor(type, message, options) {\n const actualMessage = message || `Handler error: ${type}`;\n super(actualMessage, { cause: options?.cause });\n if (!Object.hasOwn(exports.HandlerErrorType, type)) {\n throw new TypeError(`Invalid HandlerErrorType: ${type}`);\n }\n this.type = type;\n this.rawErrorType = type === \"UNKNOWN\" ? (options?.rawErrorType ?? type) : type;\n this.retryableOverride = options?.retryableOverride;\n this.originalFailure = options?.originalFailure;\n if (options?.stackTrace !== undefined) {\n this.stack = options.stackTrace;\n }\n }\n /**\n * Whether this error is retryable.\n *\n * This differs from the {@link retryableOverride} property in that `retryable` takes into\n * account the default behavior resulting from the error type, if no override is provided.\n *\n * @see {@link retryableOverride}.\n */\n get retryable() {\n if (typeof this.retryableOverride === \"boolean\")\n return this.retryableOverride;\n switch (this.type) {\n case \"BAD_REQUEST\":\n case \"UNAUTHENTICATED\":\n case \"UNAUTHORIZED\":\n case \"NOT_FOUND\":\n case \"NOT_IMPLEMENTED\":\n case \"CONFLICT\":\n return false;\n case \"UNAVAILABLE\":\n case \"UPSTREAM_TIMEOUT\":\n case \"RESOURCE_EXHAUSTED\":\n case \"INTERNAL\":\n case \"REQUEST_TIMEOUT\":\n case \"UNKNOWN\":\n return true;\n default: {\n // Force a compile time error if missing a case\n const _noMissingCase = this.type;\n return true;\n }\n }\n }\n}\nexports.HandlerError = HandlerError;\n(0, symbol_instanceof_1.injectSymbolBasedInstanceOf)(HandlerError, \"HandlerError\");\nexports.HandlerErrorType = {\n /**\n * The error type is unknown.\n *\n * Subsequent requests by the client are permissible.\n */\n UNKNOWN: \"UNKNOWN\",\n /**\n * The handler cannot or will not process the request due to an apparent client error.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n BAD_REQUEST: \"BAD_REQUEST\",\n /**\n * The client did not supply valid authentication credentials for this request.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n UNAUTHENTICATED: \"UNAUTHENTICATED\",\n /**\n * The caller does not have permission to execute the specified operation.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n UNAUTHORIZED: \"UNAUTHORIZED\",\n /**\n * The requested resource could not be found but may be available in the future.\n */\n NOT_FOUND: \"NOT_FOUND\",\n /**\n * Returned by the server when it has given up handling a request. This may occur by enforcing\n * a client provided `Request-Timeout` or for any arbitrary reason such as enforcing some\n * configurable limit.\n *\n * Subsequent requests by the client are permissible.\n */\n REQUEST_TIMEOUT: \"REQUEST_TIMEOUT\",\n /**\n * The request could not be made due to a conflict. This may happen when trying to create an\n * operation that has already been started.\n *\n * Clients should not retry this request unless advised otherwise.\n */\n CONFLICT: \"CONFLICT\",\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system\n * is out of space.\n *\n * Subsequent requests by the client are permissible.\n */\n RESOURCE_EXHAUSTED: \"RESOURCE_EXHAUSTED\",\n /**\n * An internal error occurred.\n *\n * Subsequent requests by the client are permissible.\n */\n INTERNAL: \"INTERNAL\",\n /**\n * The server either does not recognize the request method, or it lacks the ability to fulfill the\n * request. Clients should not retry this request unless advised otherwise.\n */\n NOT_IMPLEMENTED: \"NOT_IMPLEMENTED\",\n /**\n * The service is currently unavailable.\n *\n * Subsequent requests by the client are permissible.\n */\n UNAVAILABLE: \"UNAVAILABLE\",\n /**\n * Used by gateways to report that a request to an upstream server has timed out.\n *\n * Subsequent requests by the client are permissible.\n */\n UPSTREAM_TIMEOUT: \"UPSTREAM_TIMEOUT\",\n};\n//# sourceMappingURL=handler-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationError = void 0;\nconst symbol_instanceof_1 = require(\"../internal/symbol-instanceof\");\n/**\n * A Nexus operation error.\n *\n * This error class represents the abnormal completion of a Nexus operation,\n * that should be reported to the caller as an operation error.\n *\n * Example:\n *\n * ```ts\n * import { OperationError } from \"nexus-rpc\";\n *\n * // Throw a failed operation error\n * throw new OperationError(\"failed\", \"Not enough inventory\");\n *\n * // Throw a failed operation error, with a cause\n * throw new OperationError(\"failed\", \"Not enough inventory\", { cause });\n *\n * // Throw a canceled operation error\n * throw new OperationError(\"canceled\", \"User canceled the operation\");\n * ```\n *\n * @experimental\n */\nclass OperationError extends Error {\n /**\n * State of the operation.\n */\n state;\n /**\n * Set if this error was constructed from a {@link Failure} object.\n *\n * Preserves the original failure for round-tripping through the wire format.\n */\n originalFailure;\n /**\n * Constructs a new {@link OperationError}.\n *\n * @param state - The state of the operation.\n * @param message - The message of the error.\n * @param options - Extra options for the error, e.g. the cause.\n *\n * @experimental\n */\n constructor(state, message, options) {\n const defaultMessage = state === \"canceled\" ? `Operation canceled` : `Operation failed`;\n const actualMessage = message || defaultMessage;\n super(actualMessage, { cause: options?.cause });\n this.state = state;\n this.originalFailure = options?.originalFailure;\n if (options?.stackTrace !== undefined) {\n this.stack = options.stackTrace;\n }\n }\n}\nexports.OperationError = OperationError;\n(0, symbol_instanceof_1.injectSymbolBasedInstanceOf)(OperationError, \"OperationError\");\n//# sourceMappingURL=operation-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationError = exports.HandlerErrorType = exports.HandlerError = void 0;\nvar handler_error_1 = require(\"./handler-error\");\nObject.defineProperty(exports, \"HandlerError\", { enumerable: true, get: function () { return handler_error_1.HandlerError; } });\nObject.defineProperty(exports, \"HandlerErrorType\", { enumerable: true, get: function () { return handler_error_1.HandlerErrorType; } });\nvar operation_error_1 = require(\"./operation-error\");\nObject.defineProperty(exports, \"OperationError\", { enumerable: true, get: function () { return operation_error_1.OperationError; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapKeyValues = mapKeyValues;\n/**\n * Creates a new object by mapping all string properties (keys and values) of an existing object\n * through a mapper function.\n *\n * @param obj - The source object, whose properties will be mapped.\n * @param fn - The mapper function.\n *\n * @returns A new object with the properties mapped to the new type.\n *\n * @internal\n * @hidden\n */\nfunction mapKeyValues(obj, fn) {\n return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(key, value)]));\n}\n//# sourceMappingURL=object-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateServiceDefinition = validateServiceDefinition;\n/**\n * Confirm that a service definition is valid.\n *\n * @param service - The service definition to validate.\n *\n * @throws {TypeError} If the service definition is invalid.\n *\n * @experimental\n */\nfunction validateServiceDefinition(service) {\n if (typeof service.name !== \"string\" || !service.name) {\n throw new TypeError(\"Service name must be a non-empty string\");\n }\n const operationNames = new Set();\n for (const [propName, operation] of Object.entries(service.operations)) {\n const operationName = operation.name;\n if (typeof operationName !== \"string\" || !operationName) {\n throw new TypeError(`Operation name must be a non-empty string, for property '${propName}'`);\n }\n if (operationNames.has(operationName)) {\n throw new TypeError(`Duplicate operation definition for name: '${operationName}'`);\n }\n operationNames.add(operationName);\n }\n}\n//# sourceMappingURL=service-definition.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.service = service;\nexports.operation = operation;\nconst object_utils_1 = require(\"../internal/object-utils\");\nconst service_definition_1 = require(\"./service-definition\");\n/**\n * Construct a service definition for a collection of operations.\n *\n * @experimental\n */\nfunction service(name, operations) {\n const service = {\n name,\n operations: (0, object_utils_1.mapKeyValues)(operations, (key, op) => ({\n ...op,\n name: op.name || key,\n })),\n };\n (0, service_definition_1.validateServiceDefinition)(service);\n return service;\n}\n/**\n * Construct an operation definition as part of a service contract.\n *\n * @experimental\n */\nfunction operation(op) {\n return { ...op };\n}\n//# sourceMappingURL=helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.operation = exports.service = void 0;\nvar helpers_1 = require(\"./helpers\");\nObject.defineProperty(exports, \"service\", { enumerable: true, get: function () { return helpers_1.service; } });\nObject.defineProperty(exports, \"operation\", { enumerable: true, get: function () { return helpers_1.operation; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/** @import { OperationHandler } from \"./operation-handler\" */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandlerStartOperationResult = void 0;\n/**\n * An internal symbol, used to prevent direct implementation of interfaces.\n *\n * @hidden\n * @internal\n */\nconst isHandlerStartOperationResultSymbol = Symbol(\"__nexus_isHandlerStartOperationResult\");\n/**\n * The return type from the {@link OperationHandler.start} method.\n *\n * Use either {@link HandlerStartOperationResult.sync} or {@link HandlerStartOperationResult.async}\n * to create a result object. Do not implement this interface directly.\n *\n * @experimental\n */\nexports.HandlerStartOperationResult = {\n /**\n * Create a result that indicates that an operation has been accepted and will complete asynchronously.\n */\n async(token) {\n return {\n isAsync: true,\n token,\n [isHandlerStartOperationResultSymbol]: true,\n };\n },\n /**\n * Create a result that indicates that an operation completed successfully.\n */\n sync(value) {\n return {\n isAsync: false,\n value,\n [isHandlerStartOperationResultSymbol]: true,\n };\n },\n [Symbol.hasInstance]: function (value) {\n return (typeof value === \"object\" &&\n value !== null &&\n value[isHandlerStartOperationResultSymbol] === true);\n },\n};\n//# sourceMappingURL=start-operation-result.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compileOperationHandler = compileOperationHandler;\nconst common_1 = require(\"../common\");\nconst start_operation_result_1 = require(\"./start-operation-result\");\n/**\n * Compiles an operation handler into a {@link CompiledOperationHandler}. A compiled operation\n * handler is a single object that is both an operation definition and a full-fledged operation\n * handler for that operation.\n *\n * @hidden\n * @internal\n */\nfunction compileOperationHandler(definition, handler) {\n if (handler == null) {\n throw new TypeError(`No handler registered for operation '${definition.name}' (expected property name '${definition.name}')`);\n }\n if (typeof handler === \"function\") {\n // Operation handler is declared using the shortcut syntax. Wrap it into a full-fledged handler.\n return {\n ...definition,\n start: async (ctx, input) => {\n return start_operation_result_1.HandlerStartOperationResult.sync(await handler(ctx, input));\n },\n cancel: notImplemented,\n };\n }\n if (typeof handler.start !== \"function\") {\n throw new TypeError(`Handler for operation '${definition.name}' has no start method`);\n }\n return {\n ...definition,\n // Defensively ensure that the handler has all the required methods,\n // defaulting to throwing a not implemented error if some methods are missing.\n start: handler.start.bind(handler),\n cancel: handler.cancel?.bind(handler) ?? notImplemented,\n };\n}\n/**\n * @internal\n * @hidden\n */\nfunction notImplemented() {\n throw new common_1.HandlerError(\"NOT_IMPLEMENTED\", \"Not implemented\");\n}\n//# sourceMappingURL=operation-handler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceHandler = void 0;\nexports.serviceHandler = serviceHandler;\nconst common_1 = require(\"../common\");\nconst operation_handler_1 = require(\"./operation-handler\");\n/**\n * A Nexus Service implementation, that provides handlers for each of its operations.\n *\n * @experimental\n */\nclass ServiceHandler {\n definition;\n handlers;\n operationsMap;\n /**\n * Build a `ServiceHandler` from a service definition and a collection of operation handlers.\n *\n * There must be an operation handler for every operation in the service definition.\n *\n * @param service The service definition\n * @param handlers The collection of handlers\n * @returns The compiled service handler\n *\n * @internal\n * @hidden\n */\n static build(service, handlers) {\n const operations = new Map();\n for (const [propName, definition] of Object.entries(service.operations)) {\n const compiledOpHandler = (0, operation_handler_1.compileOperationHandler)(definition, handlers[propName]);\n const operationName = compiledOpHandler.name;\n if (operations.has(operationName)) {\n throw new TypeError(`Operation with name '${operationName}' already registered for service '${service.name}'`);\n }\n operations.set(operationName, compiledOpHandler);\n }\n return new ServiceHandler(service, handlers, operations);\n }\n constructor(definition, handlers, operationsMap) {\n this.definition = definition;\n this.handlers = handlers;\n this.operationsMap = operationsMap;\n }\n /**\n * Returns the definition and handler for a given operation.\n *\n * @param operationName\n */\n getOperationHandler(operationName) {\n const entry = this.operationsMap.get(operationName);\n if (entry == null) {\n throw new common_1.HandlerError(\"NOT_FOUND\", `Operation handler not registered for operation '${operationName}' in service '${this.definition.name}'`);\n }\n return entry;\n }\n}\nexports.ServiceHandler = ServiceHandler;\n/**\n * Constructs a service handler for a given service contract.\n *\n * @experimental\n */\nfunction serviceHandler(service, handlers) {\n return ServiceHandler.build(service, handlers);\n}\n//# sourceMappingURL=service-handler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serviceHandler = exports.ServiceHandler = exports.HandlerStartOperationResult = void 0;\nvar start_operation_result_1 = require(\"./start-operation-result\");\nObject.defineProperty(exports, \"HandlerStartOperationResult\", { enumerable: true, get: function () { return start_operation_result_1.HandlerStartOperationResult; } });\nvar service_handler_1 = require(\"./service-handler\");\nObject.defineProperty(exports, \"ServiceHandler\", { enumerable: true, get: function () { return service_handler_1.ServiceHandler; } });\nObject.defineProperty(exports, \"serviceHandler\", { enumerable: true, get: function () { return service_handler_1.serviceHandler; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./common\"), exports);\n__exportStar(require(\"./service\"), exports);\n__exportStar(require(\"./handler\"), exports);\n//# sourceMappingURL=index.js.map","// GENERATED FILE. DO NOT EDIT.\n(function (global, factory) {\n function preferDefault(exports) {\n return exports.default || exports;\n }\n if (typeof define === \"function\" && define.amd) {\n define([], function () {\n var exports = {};\n factory(exports);\n return preferDefault(exports);\n });\n } else if (typeof exports === \"object\") {\n factory(exports);\n if (typeof module === \"object\") module.exports = preferDefault(exports);\n } else {\n (function () {\n var exports = {};\n factory(exports);\n global.Long = preferDefault(exports);\n })();\n }\n})(\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : this,\n function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true,\n });\n _exports.default = void 0;\n /**\n * @license\n * Copyright 2009 The Closure Library Authors\n * Copyright 2020 Daniel Wirtz / The long.js Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n // WebAssembly optimizations to do native i64 multiplication and divide\n var wasm = null;\n try {\n wasm = new WebAssembly.Instance(\n new WebAssembly.Module(\n new Uint8Array([\n // \\0asm\n 0, 97, 115, 109,\n // version 1\n 1, 0, 0, 0,\n // section \"type\"\n 1, 13, 2,\n // 0, () => i32\n 96, 0, 1, 127,\n // 1, (i32, i32, i32, i32) => i32\n 96, 4, 127, 127, 127, 127, 1, 127,\n // section \"function\"\n 3, 7, 6,\n // 0, type 0\n 0,\n // 1, type 1\n 1,\n // 2, type 1\n 1,\n // 3, type 1\n 1,\n // 4, type 1\n 1,\n // 5, type 1\n 1,\n // section \"global\"\n 6, 6, 1,\n // 0, \"high\", mutable i32\n 127, 1, 65, 0, 11,\n // section \"export\"\n 7, 50, 6,\n // 0, \"mul\"\n 3, 109, 117, 108, 0, 1,\n // 1, \"div_s\"\n 5, 100, 105, 118, 95, 115, 0, 2,\n // 2, \"div_u\"\n 5, 100, 105, 118, 95, 117, 0, 3,\n // 3, \"rem_s\"\n 5, 114, 101, 109, 95, 115, 0, 4,\n // 4, \"rem_u\"\n 5, 114, 101, 109, 95, 117, 0, 5,\n // 5, \"get_high\"\n 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,\n // section \"code\"\n 10, 191, 1, 6,\n // 0, \"get_high\"\n 4, 0, 35, 0, 11,\n // 1, \"mul\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 2, \"div_s\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 3, \"div_u\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 4, \"rem_s\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n // 5, \"rem_u\"\n 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,\n 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0,\n 32, 4, 167, 11,\n ]),\n ),\n {},\n ).exports;\n } catch {\n // no wasm support :(\n }\n\n /**\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\n * See the from* functions below for more convenient ways of constructing Longs.\n * @exports Long\n * @class A Long class for representing a 64 bit two's-complement integer value.\n * @param {number} low The low (signed) 32 bits of the long\n * @param {number} high The high (signed) 32 bits of the long\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @constructor\n */\n function Long(low, high, unsigned) {\n /**\n * The low 32 bits as a signed value.\n * @type {number}\n */\n this.low = low | 0;\n\n /**\n * The high 32 bits as a signed value.\n * @type {number}\n */\n this.high = high | 0;\n\n /**\n * Whether unsigned or not.\n * @type {boolean}\n */\n this.unsigned = !!unsigned;\n }\n\n // The internal representation of a long is the two given signed, 32-bit values.\n // We use 32-bit pieces because these are the size of integers on which\n // Javascript performs bit-operations. For operations like addition and\n // multiplication, we split each number into 16 bit pieces, which can easily be\n // multiplied within Javascript's floating-point representation without overflow\n // or change in sign.\n //\n // In the algorithms below, we frequently reduce the negative case to the\n // positive case by negating the input(s) and then post-processing the result.\n // Note that we must ALWAYS check specially whether those values are MIN_VALUE\n // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n // a positive number, it overflows back into a negative). Not handling this\n // case would often result in infinite recursion.\n //\n // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\n // methods on which they depend.\n\n /**\n * An indicator used to reliably determine if an object is a Long or not.\n * @type {boolean}\n * @const\n * @private\n */\n Long.prototype.__isLong__;\n Object.defineProperty(Long.prototype, \"__isLong__\", {\n value: true,\n });\n\n /**\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n * @inner\n */\n function isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n }\n\n /**\n * @function\n * @param {*} value number\n * @returns {number}\n * @inner\n */\n function ctz32(value) {\n var c = Math.clz32(value & -value);\n return value ? 31 - c : c;\n }\n\n /**\n * Tests if the specified object is a Long.\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n */\n Long.isLong = isLong;\n\n /**\n * A cache of the Long representations of small integer values.\n * @type {!Object}\n * @inner\n */\n var INT_CACHE = {};\n\n /**\n * A cache of the Long representations of small unsigned integer values.\n * @type {!Object}\n * @inner\n */\n var UINT_CACHE = {};\n\n /**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if ((cache = 0 <= value && value < 256)) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj) return cachedObj;\n }\n obj = fromBits(value, 0, true);\n if (cache) UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if ((cache = -128 <= value && value < 128)) {\n cachedObj = INT_CACHE[value];\n if (cachedObj) return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache) INT_CACHE[value] = obj;\n return obj;\n }\n }\n\n /**\n * Returns a Long representing the given 32 bit integer value.\n * @function\n * @param {number} value The 32 bit integer in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromInt = fromInt;\n\n /**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromNumber(value, unsigned) {\n if (isNaN(value)) return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0) return UZERO;\n if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;\n }\n if (value < 0) return fromNumber(-value, unsigned).neg();\n return fromBits(\n value % TWO_PWR_32_DBL | 0,\n (value / TWO_PWR_32_DBL) | 0,\n unsigned,\n );\n }\n\n /**\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\n * @function\n * @param {number} value The number in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromNumber = fromNumber;\n\n /**\n * @param {number} lowBits\n * @param {number} highBits\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromBits(lowBits, highBits, unsigned) {\n return new Long(lowBits, highBits, unsigned);\n }\n\n /**\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\n * assumed to use 32 bits.\n * @function\n * @param {number} lowBits The low 32 bits\n * @param {number} highBits The high 32 bits\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromBits = fromBits;\n\n /**\n * @function\n * @param {number} base\n * @param {number} exponent\n * @returns {number}\n * @inner\n */\n var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\n\n /**\n * @param {string} str\n * @param {(boolean|number)=} unsigned\n * @param {number=} radix\n * @returns {!Long}\n * @inner\n */\n function fromString(str, unsigned, radix) {\n if (str.length === 0) throw Error(\"empty string\");\n if (typeof unsigned === \"number\") {\n // For goog.math.long compatibility\n radix = unsigned;\n unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n if (\n str === \"NaN\" ||\n str === \"Infinity\" ||\n str === \"+Infinity\" ||\n str === \"-Infinity\"\n )\n return unsigned ? UZERO : ZERO;\n radix = radix || 10;\n if (radix < 2 || 36 < radix) throw RangeError(\"radix\");\n var p;\n if ((p = str.indexOf(\"-\")) > 0) throw Error(\"interior hyphen\");\n else if (p === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n\n // Do several (8) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i),\n value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n }\n\n /**\n * Returns a Long representation of the given string, written using the specified radix.\n * @function\n * @param {string} str The textual representation of the Long\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\n * @returns {!Long} The corresponding Long value\n */\n Long.fromString = fromString;\n\n /**\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\n function fromValue(val, unsigned) {\n if (typeof val === \"number\") return fromNumber(val, unsigned);\n if (typeof val === \"string\") return fromString(val, unsigned);\n // Throws for non-objects, converts non-instanceof Long:\n return fromBits(\n val.low,\n val.high,\n typeof unsigned === \"boolean\" ? unsigned : val.unsigned,\n );\n }\n\n /**\n * Converts the specified value to a Long using the appropriate from* function for its type.\n * @function\n * @param {!Long|number|bigint|string|!{low: number, high: number, unsigned: boolean}} val Value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long}\n */\n Long.fromValue = fromValue;\n\n // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\n // no runtime penalty for these.\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_16_DBL = 1 << 16;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_24_DBL = 1 << 24;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n\n /**\n * @type {number}\n * @const\n * @inner\n */\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n\n /**\n * @type {!Long}\n * @const\n * @inner\n */\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n\n /**\n * @type {!Long}\n * @inner\n */\n var ZERO = fromInt(0);\n\n /**\n * Signed zero.\n * @type {!Long}\n */\n Long.ZERO = ZERO;\n\n /**\n * @type {!Long}\n * @inner\n */\n var UZERO = fromInt(0, true);\n\n /**\n * Unsigned zero.\n * @type {!Long}\n */\n Long.UZERO = UZERO;\n\n /**\n * @type {!Long}\n * @inner\n */\n var ONE = fromInt(1);\n\n /**\n * Signed one.\n * @type {!Long}\n */\n Long.ONE = ONE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var UONE = fromInt(1, true);\n\n /**\n * Unsigned one.\n * @type {!Long}\n */\n Long.UONE = UONE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var NEG_ONE = fromInt(-1);\n\n /**\n * Signed negative one.\n * @type {!Long}\n */\n Long.NEG_ONE = NEG_ONE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var MAX_VALUE = fromBits(0xffffffff | 0, 0x7fffffff | 0, false);\n\n /**\n * Maximum signed value.\n * @type {!Long}\n */\n Long.MAX_VALUE = MAX_VALUE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var MAX_UNSIGNED_VALUE = fromBits(0xffffffff | 0, 0xffffffff | 0, true);\n\n /**\n * Maximum unsigned value.\n * @type {!Long}\n */\n Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n\n /**\n * @type {!Long}\n * @inner\n */\n var MIN_VALUE = fromBits(0, 0x80000000 | 0, false);\n\n /**\n * Minimum signed value.\n * @type {!Long}\n */\n Long.MIN_VALUE = MIN_VALUE;\n\n /**\n * @alias Long.prototype\n * @inner\n */\n var LongPrototype = Long.prototype;\n\n /**\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\n * @this {!Long}\n * @returns {number}\n */\n LongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n };\n\n /**\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\n * @this {!Long}\n * @returns {number}\n */\n LongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n };\n\n /**\n * Converts the Long to a string written in the specified radix.\n * @this {!Long}\n * @param {number=} radix Radix (2-36), defaults to 10\n * @returns {string}\n * @override\n * @throws {RangeError} If `radix` is out of range\n */\n LongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix) throw RangeError(\"radix\");\n if (this.isZero()) return \"0\";\n if (this.isNegative()) {\n // Unsigned Longs are never negative\n if (this.eq(MIN_VALUE)) {\n // We need to change the Long value before it can be negated, so we remove\n // the bottom-most digit in this base and then recurse to do the rest.\n var radixLong = fromNumber(radix),\n div = this.div(radixLong),\n rem1 = div.mul(radixLong).sub(this);\n return div.toString(radix) + rem1.toInt().toString(radix);\n } else return \"-\" + this.neg().toString(radix);\n }\n\n // Do several (6) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\n rem = this;\n var result = \"\";\n while (true) {\n var remDiv = rem.div(radixToPower),\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\n digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero()) return digits + result;\n else {\n while (digits.length < 6) digits = \"0\" + digits;\n result = \"\" + digits + result;\n }\n }\n };\n\n /**\n * Gets the high 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed high bits\n */\n LongPrototype.getHighBits = function getHighBits() {\n return this.high;\n };\n\n /**\n * Gets the high 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned high bits\n */\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n };\n\n /**\n * Gets the low 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed low bits\n */\n LongPrototype.getLowBits = function getLowBits() {\n return this.low;\n };\n\n /**\n * Gets the low 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned low bits\n */\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n };\n\n /**\n * Gets the number of bits needed to represent the absolute value of this Long.\n * @this {!Long}\n * @returns {number}\n */\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative())\n // Unsigned Longs are never negative\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--) if ((val & (1 << bit)) != 0) break;\n return this.high != 0 ? bit + 33 : bit + 1;\n };\n\n /**\n * Tests if this Long can be safely represented as a JavaScript number.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isSafeInteger = function isSafeInteger() {\n // 2^53-1 is the maximum safe value\n var top11Bits = this.high >> 21;\n // [0, 2^53-1]\n if (!top11Bits) return true;\n // > 2^53-1\n if (this.unsigned) return false;\n // [-2^53, -1] except -2^53\n return top11Bits === -1 && !(this.low === 0 && this.high === -0x200000);\n };\n\n /**\n * Tests if this Long's value equals zero.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n };\n\n /**\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\n * @returns {boolean}\n */\n LongPrototype.eqz = LongPrototype.isZero;\n\n /**\n * Tests if this Long's value is negative.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n };\n\n /**\n * Tests if this Long's value is positive or zero.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n };\n\n /**\n * Tests if this Long's value is odd.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n };\n\n /**\n * Tests if this Long's value is even.\n * @this {!Long}\n * @returns {boolean}\n */\n LongPrototype.isEven = function isEven() {\n return (this.low & 1) === 0;\n };\n\n /**\n * Tests if this Long's value equals the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.equals = function equals(other) {\n if (!isLong(other)) other = fromValue(other);\n if (\n this.unsigned !== other.unsigned &&\n this.high >>> 31 === 1 &&\n other.high >>> 31 === 1\n )\n return false;\n return this.high === other.high && this.low === other.low;\n };\n\n /**\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.eq = LongPrototype.equals;\n\n /**\n * Tests if this Long's value differs from the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.notEquals = function notEquals(other) {\n return !this.eq(/* validates */ other);\n };\n\n /**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.neq = LongPrototype.notEquals;\n\n /**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.ne = LongPrototype.notEquals;\n\n /**\n * Tests if this Long's value is less than the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lessThan = function lessThan(other) {\n return this.comp(/* validates */ other) < 0;\n };\n\n /**\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lt = LongPrototype.lessThan;\n\n /**\n * Tests if this Long's value is less than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(/* validates */ other) <= 0;\n };\n\n /**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\n\n /**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.le = LongPrototype.lessThanOrEqual;\n\n /**\n * Tests if this Long's value is greater than the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(/* validates */ other) > 0;\n };\n\n /**\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.gt = LongPrototype.greaterThan;\n\n /**\n * Tests if this Long's value is greater than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(/* validates */ other) >= 0;\n };\n\n /**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\n\n /**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {boolean}\n */\n LongPrototype.ge = LongPrototype.greaterThanOrEqual;\n\n /**\n * Compares this Long's value with the specified's.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\n LongPrototype.compare = function compare(other) {\n if (!isLong(other)) other = fromValue(other);\n if (this.eq(other)) return 0;\n var thisNeg = this.isNegative(),\n otherNeg = other.isNegative();\n if (thisNeg && !otherNeg) return -1;\n if (!thisNeg && otherNeg) return 1;\n // At this point the sign bits are the same\n if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;\n // Both are positive if at least one is unsigned\n return other.high >>> 0 > this.high >>> 0 ||\n (other.high === this.high && other.low >>> 0 > this.low >>> 0)\n ? -1\n : 1;\n };\n\n /**\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\n * @function\n * @param {!Long|number|bigint|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\n LongPrototype.comp = LongPrototype.compare;\n\n /**\n * Negates this Long's value.\n * @this {!Long}\n * @returns {!Long} Negated Long\n */\n LongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;\n return this.not().add(ONE);\n };\n\n /**\n * Negates this Long's value. This is an alias of {@link Long#negate}.\n * @function\n * @returns {!Long} Negated Long\n */\n LongPrototype.neg = LongPrototype.negate;\n\n /**\n * Returns the sum of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|bigint|string} addend Addend\n * @returns {!Long} Sum\n */\n LongPrototype.add = function add(addend) {\n if (!isLong(addend)) addend = fromValue(addend);\n\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xffff;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xffff;\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 0xffff;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 0xffff;\n var c48 = 0,\n c32 = 0,\n c16 = 0,\n c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xffff;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c48 += a48 + b48;\n c48 &= 0xffff;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n };\n\n /**\n * Returns the difference of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|bigint|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\n LongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n };\n\n /**\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\n * @function\n * @param {!Long|number|bigint|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\n LongPrototype.sub = LongPrototype.subtract;\n\n /**\n * Returns the product of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|bigint|string} multiplier Multiplier\n * @returns {!Long} Product\n */\n LongPrototype.multiply = function multiply(multiplier) {\n if (this.isZero()) return this;\n if (!isLong(multiplier)) multiplier = fromValue(multiplier);\n\n // use wasm support if present\n if (wasm) {\n var low = wasm[\"mul\"](\n this.low,\n this.high,\n multiplier.low,\n multiplier.high,\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;\n if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;\n if (this.isNegative()) {\n if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());\n else return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n\n // If both longs are small, use float multiplication\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(\n this.toNumber() * multiplier.toNumber(),\n this.unsigned,\n );\n\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n // We can skip products that would overflow.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xffff;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xffff;\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 0xffff;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 0xffff;\n var c48 = 0,\n c32 = 0,\n c16 = 0,\n c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 0xffff;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 0xffff;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 0xffff;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 0xffff;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n };\n\n /**\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\n * @function\n * @param {!Long|number|bigint|string} multiplier Multiplier\n * @returns {!Long} Product\n */\n LongPrototype.mul = LongPrototype.multiply;\n\n /**\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\n * unsigned if this Long is unsigned.\n * @this {!Long}\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Quotient\n */\n LongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor)) divisor = fromValue(divisor);\n if (divisor.isZero()) throw Error(\"division by zero\");\n\n // use wasm support if present\n if (wasm) {\n // guard against signed division overflow: the largest\n // negative number / -1 would be 1 larger than the largest\n // positive number, due to two's complement.\n if (\n !this.unsigned &&\n this.high === -0x80000000 &&\n divisor.low === -1 &&\n divisor.high === -1\n ) {\n // be consistent with non-wasm code path\n return this;\n }\n var low = (this.unsigned ? wasm[\"div_u\"] : wasm[\"div_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high,\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n if (this.isZero()) return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n // This section is only relevant for signed longs and is derived from the\n // closure library as a whole.\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\n else if (divisor.eq(MIN_VALUE)) return ONE;\n else {\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative()) return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n // The algorithm below has not been made for unsigned longs. It's therefore\n // required to take special care of the MSB prior to running it.\n if (!divisor.unsigned) divisor = divisor.toUnsigned();\n if (divisor.gt(this)) return UZERO;\n if (divisor.gt(this.shru(1)))\n // 15 >>> 1 = 7 ; with divisor = 8 ; true\n return UONE;\n res = UZERO;\n }\n\n // Repeat the following until the remainder is less than other: find a\n // floating-point that approximates remainder / other *from below*, add this\n // into the result, and subtract it from the remainder. It is critical that\n // the approximate value is less than or equal to the real value so that the\n // remainder never becomes negative.\n rem = this;\n while (rem.gte(divisor)) {\n // Approximate the result of division. This may be a little greater or\n // smaller than the actual value.\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n\n // We will tweak the approximate result by changing it in the 48-th digit or\n // the smallest non-fractional digit, whichever is larger.\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\n delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48),\n // Decrease the approximation until it is smaller than the remainder. Note\n // that if it is too large, the product overflows and is negative.\n approxRes = fromNumber(approx),\n approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n\n // We know the answer can't be zero... and actually, zero would cause\n // infinite recursion since we would make no progress.\n if (approxRes.isZero()) approxRes = ONE;\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n };\n\n /**\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\n * @function\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Quotient\n */\n LongPrototype.div = LongPrototype.divide;\n\n /**\n * Returns this Long modulo the specified.\n * @this {!Long}\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n LongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor)) divisor = fromValue(divisor);\n\n // use wasm support if present\n if (wasm) {\n var low = (this.unsigned ? wasm[\"rem_u\"] : wasm[\"rem_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high,\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n return this.sub(this.div(divisor).mul(divisor));\n };\n\n /**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n LongPrototype.mod = LongPrototype.modulo;\n\n /**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|bigint|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n LongPrototype.rem = LongPrototype.modulo;\n\n /**\n * Returns the bitwise NOT of this Long.\n * @this {!Long}\n * @returns {!Long}\n */\n LongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n };\n\n /**\n * Returns count leading zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\n LongPrototype.countLeadingZeros = function countLeadingZeros() {\n return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;\n };\n\n /**\n * Returns count leading zeros. This is an alias of {@link Long#countLeadingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\n LongPrototype.clz = LongPrototype.countLeadingZeros;\n\n /**\n * Returns count trailing zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\n LongPrototype.countTrailingZeros = function countTrailingZeros() {\n return this.low ? ctz32(this.low) : ctz32(this.high) + 32;\n };\n\n /**\n * Returns count trailing zeros. This is an alias of {@link Long#countTrailingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\n LongPrototype.ctz = LongPrototype.countTrailingZeros;\n\n /**\n * Returns the bitwise AND of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other Long\n * @returns {!Long}\n */\n LongPrototype.and = function and(other) {\n if (!isLong(other)) other = fromValue(other);\n return fromBits(\n this.low & other.low,\n this.high & other.high,\n this.unsigned,\n );\n };\n\n /**\n * Returns the bitwise OR of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other Long\n * @returns {!Long}\n */\n LongPrototype.or = function or(other) {\n if (!isLong(other)) other = fromValue(other);\n return fromBits(\n this.low | other.low,\n this.high | other.high,\n this.unsigned,\n );\n };\n\n /**\n * Returns the bitwise XOR of this Long and the given one.\n * @this {!Long}\n * @param {!Long|number|bigint|string} other Other Long\n * @returns {!Long}\n */\n LongPrototype.xor = function xor(other) {\n if (!isLong(other)) other = fromValue(other);\n return fromBits(\n this.low ^ other.low,\n this.high ^ other.high,\n this.unsigned,\n );\n };\n\n /**\n * Returns this Long with bits shifted to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n else if (numBits < 32)\n return fromBits(\n this.low << numBits,\n (this.high << numBits) | (this.low >>> (32 - numBits)),\n this.unsigned,\n );\n else return fromBits(0, this.low << (numBits - 32), this.unsigned);\n };\n\n /**\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shl = LongPrototype.shiftLeft;\n\n /**\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n else if (numBits < 32)\n return fromBits(\n (this.low >>> numBits) | (this.high << (32 - numBits)),\n this.high >> numBits,\n this.unsigned,\n );\n else\n return fromBits(\n this.high >> (numBits - 32),\n this.high >= 0 ? 0 : -1,\n this.unsigned,\n );\n };\n\n /**\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shr = LongPrototype.shiftRight;\n\n /**\n * Returns this Long with bits logically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits < 32)\n return fromBits(\n (this.low >>> numBits) | (this.high << (32 - numBits)),\n this.high >>> numBits,\n this.unsigned,\n );\n if (numBits === 32) return fromBits(this.high, 0, this.unsigned);\n return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);\n };\n\n /**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\n\n /**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n\n /**\n * Returns this Long with bits rotated to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotateLeft = function rotateLeft(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = 32 - numBits;\n return fromBits(\n (this.low << numBits) | (this.high >>> b),\n (this.high << numBits) | (this.low >>> b),\n this.unsigned,\n );\n }\n numBits -= 32;\n b = 32 - numBits;\n return fromBits(\n (this.high << numBits) | (this.low >>> b),\n (this.low << numBits) | (this.high >>> b),\n this.unsigned,\n );\n };\n /**\n * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotl = LongPrototype.rotateLeft;\n\n /**\n * Returns this Long with bits rotated to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotateRight = function rotateRight(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = 32 - numBits;\n return fromBits(\n (this.high << b) | (this.low >>> numBits),\n (this.low << b) | (this.high >>> numBits),\n this.unsigned,\n );\n }\n numBits -= 32;\n b = 32 - numBits;\n return fromBits(\n (this.low << b) | (this.high >>> numBits),\n (this.high << b) | (this.low >>> numBits),\n this.unsigned,\n );\n };\n /**\n * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n LongPrototype.rotr = LongPrototype.rotateRight;\n\n /**\n * Converts this Long to signed.\n * @this {!Long}\n * @returns {!Long} Signed long\n */\n LongPrototype.toSigned = function toSigned() {\n if (!this.unsigned) return this;\n return fromBits(this.low, this.high, false);\n };\n\n /**\n * Converts this Long to unsigned.\n * @this {!Long}\n * @returns {!Long} Unsigned long\n */\n LongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned) return this;\n return fromBits(this.low, this.high, true);\n };\n\n /**\n * Converts this Long to its byte representation.\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @this {!Long}\n * @returns {!Array.<number>} Byte representation\n */\n LongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n };\n\n /**\n * Converts this Long to its little endian byte representation.\n * @this {!Long}\n * @returns {!Array.<number>} Little endian byte representation\n */\n LongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high,\n lo = this.low;\n return [\n lo & 0xff,\n (lo >>> 8) & 0xff,\n (lo >>> 16) & 0xff,\n lo >>> 24,\n hi & 0xff,\n (hi >>> 8) & 0xff,\n (hi >>> 16) & 0xff,\n hi >>> 24,\n ];\n };\n\n /**\n * Converts this Long to its big endian byte representation.\n * @this {!Long}\n * @returns {!Array.<number>} Big endian byte representation\n */\n LongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high,\n lo = this.low;\n return [\n hi >>> 24,\n (hi >>> 16) & 0xff,\n (hi >>> 8) & 0xff,\n hi & 0xff,\n lo >>> 24,\n (lo >>> 16) & 0xff,\n (lo >>> 8) & 0xff,\n lo & 0xff,\n ];\n };\n\n /**\n * Creates a Long from its byte representation.\n * @param {!Array.<number>} bytes Byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @returns {Long} The corresponding Long value\n */\n Long.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le\n ? Long.fromBytesLE(bytes, unsigned)\n : Long.fromBytesBE(bytes, unsigned);\n };\n\n /**\n * Creates a Long from its little endian byte representation.\n * @param {!Array.<number>} bytes Little endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\n Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long(\n bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24),\n bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24),\n unsigned,\n );\n };\n\n /**\n * Creates a Long from its big endian byte representation.\n * @param {!Array.<number>} bytes Big endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\n Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long(\n (bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7],\n (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3],\n unsigned,\n );\n };\n\n // Support conversion to/from BigInt where available\n if (typeof BigInt === \"function\") {\n /**\n * Returns a Long representing the given big integer.\n * @function\n * @param {number} value The big integer value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n Long.fromBigInt = function fromBigInt(value, unsigned) {\n var lowBits = Number(BigInt.asIntN(32, value));\n var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));\n return fromBits(lowBits, highBits, unsigned);\n };\n\n // Override\n Long.fromValue = function fromValueWithBigInt(value, unsigned) {\n if (typeof value === \"bigint\") return Long.fromBigInt(value, unsigned);\n return fromValue(value, unsigned);\n };\n\n /**\n * Converts the Long to its big integer representation.\n * @this {!Long}\n * @returns {bigint}\n */\n LongPrototype.toBigInt = function toBigInt() {\n var lowBigInt = BigInt(this.low >>> 0);\n var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);\n return (highBigInt << BigInt(32)) | lowBigInt;\n };\n }\n var _default = (_exports.default = Long);\n },\n);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar _a, _b, _c;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkflowExecutionAlreadyStartedError = exports.NexusOperationFailure = exports.ChildWorkflowFailure = exports.ActivityFailure = exports.TimeoutFailure = exports.TerminatedFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ServerFailure = exports.TemporalFailure = exports.decodeApplicationFailureCategory = exports.encodeApplicationFailureCategory = exports.ApplicationFailureCategory = exports.decodeRetryState = exports.encodeRetryState = exports.RetryState = exports.decodeTimeoutType = exports.encodeTimeoutType = exports.TimeoutType = exports.FAILURE_SOURCE = void 0;\nexports.ensureApplicationFailure = ensureApplicationFailure;\nexports.ensureTemporalFailure = ensureTemporalFailure;\nexports.rootCause = rootCause;\nconst type_helpers_1 = require(\"./type-helpers\");\nconst internal_workflow_1 = require(\"./internal-workflow\");\nexports.FAILURE_SOURCE = 'TypeScriptSDK';\nexports.TimeoutType = {\n START_TO_CLOSE: 'START_TO_CLOSE',\n SCHEDULE_TO_START: 'SCHEDULE_TO_START',\n SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE',\n HEARTBEAT: 'HEARTBEAT',\n /** @deprecated Use {@link START_TO_CLOSE} instead. */\n TIMEOUT_TYPE_START_TO_CLOSE: 'START_TO_CLOSE',\n /** @deprecated Use {@link SCHEDULE_TO_START} instead. */\n TIMEOUT_TYPE_SCHEDULE_TO_START: 'SCHEDULE_TO_START',\n /** @deprecated Use {@link SCHEDULE_TO_CLOSE} instead. */\n TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: 'SCHEDULE_TO_CLOSE',\n /** @deprecated Use {@link HEARTBEAT} instead. */\n TIMEOUT_TYPE_HEARTBEAT: 'HEARTBEAT',\n /** @deprecated Use `undefined` instead. */\n TIMEOUT_TYPE_UNSPECIFIED: undefined,\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.TimeoutType.START_TO_CLOSE]: 1,\n [exports.TimeoutType.SCHEDULE_TO_START]: 2,\n [exports.TimeoutType.SCHEDULE_TO_CLOSE]: 3,\n [exports.TimeoutType.HEARTBEAT]: 4,\n UNSPECIFIED: 0,\n}, 'TIMEOUT_TYPE_'), exports.encodeTimeoutType = _a[0], exports.decodeTimeoutType = _a[1];\nexports.RetryState = {\n IN_PROGRESS: 'IN_PROGRESS',\n NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE',\n TIMEOUT: 'TIMEOUT',\n MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED',\n RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET',\n INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',\n CANCEL_REQUESTED: 'CANCEL_REQUESTED',\n /** @deprecated Use {@link IN_PROGRESS} instead. */\n RETRY_STATE_IN_PROGRESS: 'IN_PROGRESS',\n /** @deprecated Use {@link NON_RETRYABLE_FAILURE} instead. */\n RETRY_STATE_NON_RETRYABLE_FAILURE: 'NON_RETRYABLE_FAILURE',\n /** @deprecated Use {@link TIMEOUT} instead. */\n RETRY_STATE_TIMEOUT: 'TIMEOUT',\n /** @deprecated Use {@link MAXIMUM_ATTEMPTS_REACHED} instead. */\n RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED: 'MAXIMUM_ATTEMPTS_REACHED',\n /** @deprecated Use {@link RETRY_POLICY_NOT_SET} instead. */\n RETRY_STATE_RETRY_POLICY_NOT_SET: 'RETRY_POLICY_NOT_SET',\n /** @deprecated Use {@link INTERNAL_SERVER_ERROR} instead. */\n RETRY_STATE_INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',\n /** @deprecated Use {@link CANCEL_REQUESTED} instead. */\n RETRY_STATE_CANCEL_REQUESTED: 'CANCEL_REQUESTED',\n /** @deprecated Use `undefined` instead. */\n RETRY_STATE_UNSPECIFIED: undefined,\n};\n_b = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.RetryState.IN_PROGRESS]: 1,\n [exports.RetryState.NON_RETRYABLE_FAILURE]: 2,\n [exports.RetryState.TIMEOUT]: 3,\n [exports.RetryState.MAXIMUM_ATTEMPTS_REACHED]: 4,\n [exports.RetryState.RETRY_POLICY_NOT_SET]: 5,\n [exports.RetryState.INTERNAL_SERVER_ERROR]: 6,\n [exports.RetryState.CANCEL_REQUESTED]: 7,\n UNSPECIFIED: 0,\n}, 'RETRY_STATE_'), exports.encodeRetryState = _b[0], exports.decodeRetryState = _b[1];\n/**\n * A category to describe the severity and change the observability behavior of an application failure.\n *\n * Currently, observability behavior changes are limited to:\n * - activities that fail due to a BENIGN application failure emit DEBUG level logs and do not record metrics\n *\n * @experimental Category is a new feature and may be subject to change.\n */\nexports.ApplicationFailureCategory = {\n BENIGN: 'BENIGN',\n};\n_c = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.ApplicationFailureCategory.BENIGN]: 1,\n UNSPECIFIED: 0,\n}, 'APPLICATION_ERROR_CATEGORY_'), exports.encodeApplicationFailureCategory = _c[0], exports.decodeApplicationFailureCategory = _c[1];\n/**\n * Represents failures that can cross Workflow and Activity boundaries.\n *\n * **Never extend this class or any of its children.**\n *\n * The only child class you should ever throw from your code is {@link ApplicationFailure}.\n */\nlet TemporalFailure = class TemporalFailure extends Error {\n cause;\n /**\n * The original failure that constructed this error.\n *\n * Only present if this error was generated from an external operation.\n */\n failure;\n constructor(message, cause) {\n super(message ?? undefined);\n this.cause = cause;\n }\n};\nexports.TemporalFailure = TemporalFailure;\nexports.TemporalFailure = TemporalFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('TemporalFailure')\n], TemporalFailure);\n/** Exceptions originated at the Temporal service. */\nlet ServerFailure = class ServerFailure extends TemporalFailure {\n nonRetryable;\n constructor(message, nonRetryable, cause) {\n super(message, cause);\n this.nonRetryable = nonRetryable;\n }\n};\nexports.ServerFailure = ServerFailure;\nexports.ServerFailure = ServerFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ServerFailure')\n], ServerFailure);\n/**\n * `ApplicationFailure`s are used to communicate application-specific failures in Workflows and Activities.\n *\n * The {@link type} property is matched against {@link RetryPolicy.nonRetryableErrorTypes} to determine if an instance\n * of this error is retryable. Another way to avoid retrying is by setting the {@link nonRetryable} flag to `true`.\n *\n * In Workflows, if you throw a non-`ApplicationFailure`, the Workflow Task will fail and be retried. If you throw an\n * `ApplicationFailure`, the Workflow Execution will fail.\n *\n * In Activities, you can either throw an `ApplicationFailure` or another `Error` to fail the Activity Task. In the\n * latter case, the `Error` will be converted to an `ApplicationFailure`. The conversion is done as following:\n *\n * - `type` is set to `error.constructor?.name ?? error.name`\n * - `message` is set to `error.message`\n * - `nonRetryable` is set to false\n * - `details` are set to null\n * - stack trace is copied from the original error\n *\n * When an {@link https://docs.temporal.io/activity-execution#activity-execution | Activity Execution} fails, the\n * `ApplicationFailure` from the last Activity Task will be the `cause` of the {@link ActivityFailure} thrown in the\n * Workflow.\n */\nlet ApplicationFailure = class ApplicationFailure extends TemporalFailure {\n type;\n nonRetryable;\n details;\n nextRetryDelay;\n category;\n /**\n * Alternatively, use {@link fromError} or {@link create}.\n */\n constructor(message, type, nonRetryable, details, cause, nextRetryDelay, category) {\n super(message, cause);\n this.type = type;\n this.nonRetryable = nonRetryable;\n this.details = details;\n this.nextRetryDelay = nextRetryDelay;\n this.category = category;\n }\n /**\n * Create a new `ApplicationFailure` from an Error object.\n *\n * First calls {@link ensureApplicationFailure | `ensureApplicationFailure(error)`} and then overrides any fields\n * provided in `overrides`.\n */\n static fromError(error, overrides) {\n const failure = ensureApplicationFailure(error);\n Object.assign(failure, overrides);\n return failure;\n }\n /**\n * Create a new `ApplicationFailure`.\n *\n * By default, will be retryable (unless its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}).\n */\n static create(options) {\n const { message, type, nonRetryable = false, details, nextRetryDelay, cause, category } = options;\n return new this(message, type, nonRetryable, details, cause, nextRetryDelay, category);\n }\n /**\n * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to false. Note that this error will still\n * not be retried if its `type` is included in {@link RetryPolicy.nonRetryableErrorTypes}.\n *\n * @param message Optional error message\n * @param type Optional error type (used by {@link RetryPolicy.nonRetryableErrorTypes})\n * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}.\n */\n static retryable(message, type, ...details) {\n return new this(message, type ?? 'Error', false, details);\n }\n /**\n * Get a new `ApplicationFailure` with the {@link nonRetryable} flag set to true.\n *\n * When thrown from an Activity or Workflow, the Activity or Workflow will not be retried (even if `type` is not\n * listed in {@link RetryPolicy.nonRetryableErrorTypes}).\n *\n * @param message Optional error message\n * @param type Optional error type\n * @param details Optional details about the failure. Serialized by the Worker's {@link PayloadConverter}.\n */\n static nonRetryable(message, type, ...details) {\n return new this(message, type ?? 'Error', true, details);\n }\n};\nexports.ApplicationFailure = ApplicationFailure;\nexports.ApplicationFailure = ApplicationFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ApplicationFailure')\n], ApplicationFailure);\n/**\n * This error is thrown when Cancellation has been requested. To allow Cancellation to happen, let it propagate. To\n * ignore Cancellation, catch it and continue executing. Note that Cancellation can only be requested a single time, so\n * your Workflow/Activity Execution will not receive further Cancellation requests.\n *\n * When a Workflow or Activity has been successfully cancelled, a `CancelledFailure` will be the `cause`.\n */\nlet CancelledFailure = class CancelledFailure extends TemporalFailure {\n details;\n constructor(message, details = [], cause) {\n super(message, cause);\n this.details = details;\n }\n};\nexports.CancelledFailure = CancelledFailure;\nexports.CancelledFailure = CancelledFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('CancelledFailure')\n], CancelledFailure);\n/**\n * Used as the `cause` when a Workflow has been terminated\n */\nlet TerminatedFailure = class TerminatedFailure extends TemporalFailure {\n constructor(message, cause) {\n super(message, cause);\n }\n};\nexports.TerminatedFailure = TerminatedFailure;\nexports.TerminatedFailure = TerminatedFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('TerminatedFailure')\n], TerminatedFailure);\n/**\n * Used to represent timeouts of Activities and Workflows\n */\nlet TimeoutFailure = class TimeoutFailure extends TemporalFailure {\n lastHeartbeatDetails;\n timeoutType;\n constructor(message, lastHeartbeatDetails, timeoutType) {\n super(message);\n this.lastHeartbeatDetails = lastHeartbeatDetails;\n this.timeoutType = timeoutType;\n }\n};\nexports.TimeoutFailure = TimeoutFailure;\nexports.TimeoutFailure = TimeoutFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('TimeoutFailure')\n], TimeoutFailure);\n/**\n * Contains information about an Activity failure. Always contains the original reason for the failure as its `cause`.\n * For example, if an Activity timed out, the cause will be a {@link TimeoutFailure}.\n *\n * This exception is expected to be thrown only by the framework code.\n */\nlet ActivityFailure = class ActivityFailure extends TemporalFailure {\n activityType;\n activityId;\n retryState;\n identity;\n constructor(message, activityType, activityId, retryState, identity, cause) {\n super(message, cause);\n this.activityType = activityType;\n this.activityId = activityId;\n this.retryState = retryState;\n this.identity = identity;\n }\n};\nexports.ActivityFailure = ActivityFailure;\nexports.ActivityFailure = ActivityFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityFailure')\n], ActivityFailure);\n/**\n * Contains information about a Child Workflow failure. Always contains the reason for the failure as its {@link cause}.\n * For example, if the Child was Terminated, the `cause` is a {@link TerminatedFailure}.\n *\n * This exception is expected to be thrown only by the framework code.\n */\nlet ChildWorkflowFailure = class ChildWorkflowFailure extends TemporalFailure {\n namespace;\n execution;\n workflowType;\n retryState;\n constructor(namespace, execution, workflowType, retryState, cause) {\n super('Child Workflow execution failed', cause);\n this.namespace = namespace;\n this.execution = execution;\n this.workflowType = workflowType;\n this.retryState = retryState;\n }\n};\nexports.ChildWorkflowFailure = ChildWorkflowFailure;\nexports.ChildWorkflowFailure = ChildWorkflowFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ChildWorkflowFailure')\n], ChildWorkflowFailure);\n/**\n * Thrown when a Nexus Operation executed inside a Workflow fails.\n *\n * @experimental Nexus support in Temporal SDK is experimental.\n */\nlet NexusOperationFailure = class NexusOperationFailure extends TemporalFailure {\n scheduledEventId;\n endpoint;\n service;\n operation;\n operationToken;\n constructor(message, scheduledEventId, endpoint, service, operation, operationToken, cause) {\n super(message, cause);\n this.scheduledEventId = scheduledEventId;\n this.endpoint = endpoint;\n this.service = service;\n this.operation = operation;\n this.operationToken = operationToken;\n }\n};\nexports.NexusOperationFailure = NexusOperationFailure;\nexports.NexusOperationFailure = NexusOperationFailure = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('NexusOperationFailure')\n], NexusOperationFailure);\n// TODO(nexus/error): Maybe add a NexusHandlerFailure class here, once we've decided on error handling.\n/**\n * This exception is thrown in the following cases:\n * - Workflow with the same Workflow ID is currently running and the {@link WorkflowOptions.workflowIdConflictPolicy} is `WORKFLOW_ID_CONFLICT_POLICY_FAIL`\n * - There is a closed Workflow with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy}\n * is `WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE`\n * - There is closed Workflow in the `Completed` state with the same Workflow Id and the {@link WorkflowOptions.workflowIdReusePolicy}\n * is `WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY`\n */\nlet WorkflowExecutionAlreadyStartedError = class WorkflowExecutionAlreadyStartedError extends TemporalFailure {\n workflowId;\n workflowType;\n constructor(message, workflowId, workflowType) {\n super(message);\n this.workflowId = workflowId;\n this.workflowType = workflowType;\n }\n};\nexports.WorkflowExecutionAlreadyStartedError = WorkflowExecutionAlreadyStartedError;\nexports.WorkflowExecutionAlreadyStartedError = WorkflowExecutionAlreadyStartedError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowExecutionAlreadyStartedError')\n], WorkflowExecutionAlreadyStartedError);\n/**\n * If `error` is already an `ApplicationFailure`, returns `error`.\n *\n * Otherwise, converts `error` into an `ApplicationFailure` with:\n *\n * - `message`: `error.message` or `String(error)`\n * - `type`: `error.constructor.name` or `error.name`\n * - `stack`: `error.stack` or `''`\n */\nfunction ensureApplicationFailure(error) {\n if (error instanceof ApplicationFailure) {\n return error;\n }\n const message = ((0, type_helpers_1.isRecord)(error) && String(error.message)) || String(error);\n const type = ((0, type_helpers_1.isRecord)(error) && (error.constructor?.name ?? error.name)) || undefined;\n const failure = ApplicationFailure.create({ message, type, nonRetryable: false });\n failure.stack = ((0, type_helpers_1.isRecord)(error) && String(error.stack)) || '';\n return failure;\n}\n/**\n * If `err` is an Error it is turned into an `ApplicationFailure`.\n *\n * If `err` was already a `TemporalFailure`, returns the original error.\n *\n * Otherwise returns an `ApplicationFailure` with `String(err)` as the message.\n */\nfunction ensureTemporalFailure(err) {\n if (err instanceof TemporalFailure) {\n return err;\n }\n return ensureApplicationFailure(err);\n}\n/**\n * Get the root cause message of given `error`.\n *\n * In case `error` is a {@link TemporalFailure}, recurse the `cause` chain and return the root `cause.message`.\n * Otherwise, return `error.message`.\n */\nfunction rootCause(error) {\n if (error instanceof TemporalFailure) {\n return error.cause ? rootCause(error.cause) : error.message;\n }\n return (0, type_helpers_1.errorMessage)(error);\n}\n//# sourceMappingURL=failure.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Helpers.\nconst s = 1000;\nconst m = s * 60;\nconst h = m * 60;\nconst d = h * 24;\nconst w = d * 7;\nconst y = d * 365.25;\nfunction ms(value, options) {\n try {\n if (typeof value === 'string' && value.length > 0) {\n return parse(value);\n }\n else if (typeof value === 'number' && isFinite(value)) {\n return options?.long ? fmtLong(value) : fmtShort(value);\n }\n throw new Error('Value is not a string or number.');\n }\n catch (error) {\n const message = isError(error)\n ? `${error.message}. value=${JSON.stringify(value)}`\n : 'An unknown error has occured.';\n throw new Error(message);\n }\n}\n/**\n * Parse the given `str` and return milliseconds.\n */\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n throw new Error('Value exceeds the maximum length of 100 characters.');\n }\n const match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n if (!match) {\n return NaN;\n }\n const n = parseFloat(match[1]);\n const type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n // This should never occur.\n throw new Error(`The unit ${type} was matched, but no matching case exists.`);\n }\n}\nexports.default = ms;\n/**\n * Short format for `ms`.\n */\nfunction fmtShort(ms) {\n const msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return `${Math.round(ms / d)}d`;\n }\n if (msAbs >= h) {\n return `${Math.round(ms / h)}h`;\n }\n if (msAbs >= m) {\n return `${Math.round(ms / m)}m`;\n }\n if (msAbs >= s) {\n return `${Math.round(ms / s)}s`;\n }\n return `${ms}ms`;\n}\n/**\n * Long format for `ms`.\n */\nfunction fmtLong(ms) {\n const msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return `${ms} ms`;\n}\n/**\n * Pluralization helper.\n */\nfunction plural(ms, msAbs, n, name) {\n const isPlural = msAbs >= n * 1.5;\n return `${Math.round(ms / n)} ${name}${isPlural ? 's' : ''}`;\n}\n/**\n * A type guard for errors.\n */\nfunction isError(error) {\n return typeof error === 'object' && error !== null && 'message' in error;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.optionalTsToMs = optionalTsToMs;\nexports.requiredTsToMs = requiredTsToMs;\nexports.tsToMs = tsToMs;\nexports.msNumberToTs = msNumberToTs;\nexports.msToTs = msToTs;\nexports.msOptionalToTs = msOptionalToTs;\nexports.msOptionalToNumber = msOptionalToNumber;\nexports.msToNumber = msToNumber;\nexports.tsToDate = tsToDate;\nexports.requiredTsToDate = requiredTsToDate;\nexports.optionalTsToDate = optionalTsToDate;\nexports.optionalDateToTs = optionalDateToTs;\nconst long_1 = __importDefault(require(\"long\"));\nconst ms_1 = __importDefault(require(\"ms\"));\nconst errors_1 = require(\"./errors\");\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow.\n * If ts is null or undefined returns undefined.\n */\nfunction optionalTsToMs(ts) {\n if (ts === undefined || ts === null) {\n return undefined;\n }\n return tsToMs(ts);\n}\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow.\n * If ts is null or undefined, throws a TypeError, with error message including the name of the field.\n */\nfunction requiredTsToMs(ts, fieldName) {\n if (ts === undefined || ts === null) {\n throw new TypeError(`Expected ${fieldName} to be a timestamp, got ${ts}`);\n }\n return tsToMs(ts);\n}\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow\n */\nfunction tsToMs(ts) {\n if (ts === undefined || ts === null) {\n throw new Error(`Expected timestamp, got ${ts}`);\n }\n const { seconds, nanos } = ts;\n return (seconds || long_1.default.UZERO)\n .mul(1000)\n .add(Math.floor((nanos || 0) / 1000000))\n .toNumber();\n}\nfunction msNumberToTs(millis) {\n const seconds = Math.floor(millis / 1000);\n const nanos = (millis % 1000) * 1000000;\n if (Number.isNaN(seconds) || Number.isNaN(nanos)) {\n throw new errors_1.ValueError(`Invalid millis ${millis}`);\n }\n return { seconds: long_1.default.fromNumber(seconds), nanos };\n}\nfunction msToTs(str) {\n return msNumberToTs(msToNumber(str));\n}\nfunction msOptionalToTs(str) {\n return str ? msToTs(str) : undefined;\n}\nfunction msOptionalToNumber(val) {\n if (val === undefined)\n return undefined;\n return msToNumber(val);\n}\nfunction msToNumber(val) {\n if (typeof val === 'number') {\n return val;\n }\n return msWithValidation(val);\n}\nfunction msWithValidation(str) {\n const millis = (0, ms_1.default)(str);\n if (millis == null || isNaN(millis)) {\n throw new TypeError(`Invalid duration string: '${str}'`);\n }\n return millis;\n}\nfunction tsToDate(ts) {\n return new Date(tsToMs(ts));\n}\n// ts-prune-ignore-next\nfunction requiredTsToDate(ts, fieldName) {\n return new Date(requiredTsToMs(ts, fieldName));\n}\nfunction optionalTsToDate(ts) {\n if (ts === undefined || ts === null) {\n return undefined;\n }\n return new Date(tsToMs(ts));\n}\n// ts-prune-ignore-next (imported via schedule-helpers.ts)\nfunction optionalDateToTs(date) {\n if (date === undefined || date === null) {\n return undefined;\n }\n return msToTs(date.getTime());\n}\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.METADATA_MESSAGE_TYPE_KEY = exports.encodingKeys = exports.encodingTypes = exports.METADATA_ENCODING_KEY = void 0;\nconst encoding_1 = require(\"../encoding\");\nexports.METADATA_ENCODING_KEY = 'encoding';\nexports.encodingTypes = {\n METADATA_ENCODING_NULL: 'binary/null',\n METADATA_ENCODING_RAW: 'binary/plain',\n METADATA_ENCODING_JSON: 'json/plain',\n METADATA_ENCODING_PROTOBUF_JSON: 'json/protobuf',\n METADATA_ENCODING_PROTOBUF: 'binary/protobuf',\n};\nexports.encodingKeys = {\n METADATA_ENCODING_NULL: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_NULL),\n METADATA_ENCODING_RAW: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_RAW),\n METADATA_ENCODING_JSON: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_JSON),\n METADATA_ENCODING_PROTOBUF_JSON: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_PROTOBUF_JSON),\n METADATA_ENCODING_PROTOBUF: (0, encoding_1.encode)(exports.encodingTypes.METADATA_ENCODING_PROTOBUF),\n};\nexports.METADATA_MESSAGE_TYPE_KEY = 'messageType';\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultPayloadConverter = exports.DefaultPayloadConverter = exports.JsonPayloadConverter = exports.BinaryPayloadConverter = exports.UndefinedPayloadConverter = exports.CompositePayloadConverter = exports.RawValue = void 0;\nexports.toPayloads = toPayloads;\nexports.toPayloadsWithContext = toPayloadsWithContext;\nexports.convertOptionalToPayload = convertOptionalToPayload;\nexports.mapToPayloads = mapToPayloads;\nexports.fromPayloadsAtIndex = fromPayloadsAtIndex;\nexports.arrayFromPayloads = arrayFromPayloads;\nexports.mapFromPayloads = mapFromPayloads;\nconst encoding_1 = require(\"../encoding\");\nconst errors_1 = require(\"../errors\");\nconst types_1 = require(\"./types\");\n/**\n * Implements conversion of a list of values.\n *\n * @param converter\n * @param values JS values to convert to Payloads\n * @return list of {@link Payload}s\n * @throws {@link ValueError} if conversion of the value passed as parameter failed for any\n * reason.\n */\nfunction toPayloads(converter, ...values) {\n return toPayloadsWithContext(converter, undefined, values);\n}\n/**\n * Implements conversion of a list of values with an optional serialization context.\n *\n * @hidden\n */\nfunction toPayloadsWithContext(converter, context, values) {\n if (values.length === 0) {\n return undefined;\n }\n return values.map((value) => converter.toPayload(value, context));\n}\n/**\n * Run {@link PayloadConverter.toPayload} on an optional value, and then encode it.\n */\nfunction convertOptionalToPayload(payloadConverter, value, context) {\n if (value == null)\n return value;\n return payloadConverter.toPayload(value, context);\n}\n/**\n * Run {@link PayloadConverter.toPayload} on each value in the map.\n *\n * @throws {@link ValueError} if conversion of any value in the map fails\n */\nfunction mapToPayloads(converter, map, context) {\n return Object.fromEntries(Object.entries(map).map(([k, v]) => [k, converter.toPayload(v, context)]));\n}\n/**\n * Implements conversion of an array of values of different types. Useful for deserializing\n * arguments of function invocations.\n *\n * @param converter\n * @param index index of the value in the payloads\n * @param payloads serialized value to convert to JS values.\n * @return converted JS value\n * @throws {@link PayloadConverterError} if conversion of the data passed as parameter failed for any\n * reason.\n */\nfunction fromPayloadsAtIndex(converter, index, payloads, context) {\n // To make adding arguments a backwards compatible change\n if (payloads === undefined || payloads === null || index >= payloads.length) {\n return undefined;\n }\n const payload = payloads?.[index];\n if (!payload) {\n return undefined;\n }\n return converter.fromPayload(payload, context);\n}\n/**\n * Run {@link PayloadConverter.fromPayload} on each value in the array.\n */\nfunction arrayFromPayloads(converter, payloads, context) {\n if (!payloads) {\n return [];\n }\n return payloads.map((payload) => converter.fromPayload(payload, context));\n}\nfunction mapFromPayloads(converter, map, context) {\n if (map == null)\n return undefined;\n return Object.fromEntries(Object.entries(map).map(([k, payload]) => {\n const value = converter.fromPayload(payload, context);\n return [k, value];\n }));\n}\n/**\n * RawValue is a wrapper over a payload.\n * A payload that belongs to a RawValue is special in that it bypasses user-defined payload converters,\n * instead using the default payload converter. The payload still undergoes codec conversion.\n */\nclass RawValue {\n _payload;\n [exports.rawPayloadTypeBrand] = undefined;\n constructor(value, payloadConverter = exports.defaultPayloadConverter, context) {\n this._payload = payloadConverter.toPayload(value, context);\n }\n static fromPayload(p) {\n return new RawValue(p, identityPayloadConverter);\n }\n get payload() {\n return this._payload;\n }\n}\nexports.RawValue = RawValue;\n/**\n * Tries to convert values to {@link Payload}s using the {@link PayloadConverterWithEncoding}s provided to the constructor, in the order provided.\n *\n * Converts Payloads to values based on the `Payload.metadata.encoding` field, which matches the {@link PayloadConverterWithEncoding.encodingType}\n * of the converter that created the Payload.\n */\nclass CompositePayloadConverter {\n converters;\n converterByEncoding = new Map();\n constructor(...converters) {\n if (converters.length === 0) {\n throw new errors_1.PayloadConverterError('Must provide at least one PayloadConverterWithEncoding');\n }\n this.converters = converters;\n for (const converter of converters) {\n this.converterByEncoding.set(converter.encodingType, converter);\n }\n }\n /**\n * Tries to run `.toPayload(value)` on each converter in the order provided at construction.\n * Returns the first successful result, throws {@link ValueError} if there is no converter that can handle the value.\n */\n toPayload(value, context) {\n if (value instanceof RawValue) {\n return value.payload;\n }\n for (const converter of this.converters) {\n const result = converter.toPayload(value, context);\n if (result !== undefined) {\n return result;\n }\n }\n throw new errors_1.ValueError(`Unable to convert ${value} to payload`);\n }\n /**\n * Run {@link PayloadConverterWithEncoding.fromPayload} based on the `encoding` metadata of the {@link Payload}.\n */\n fromPayload(payload, context) {\n if (payload.metadata === undefined || payload.metadata === null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n const encoding = (0, encoding_1.decode)(payload.metadata[types_1.METADATA_ENCODING_KEY]);\n const converter = this.converterByEncoding.get(encoding);\n if (converter === undefined) {\n throw new errors_1.ValueError(`Unknown encoding: ${encoding}`);\n }\n return converter.fromPayload(payload, context);\n }\n}\nexports.CompositePayloadConverter = CompositePayloadConverter;\n/**\n * Converts between JS undefined and NULL Payload\n */\nclass UndefinedPayloadConverter {\n encodingType = types_1.encodingTypes.METADATA_ENCODING_NULL;\n toPayload(value) {\n if (value !== undefined) {\n return undefined;\n }\n return {\n metadata: {\n [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_NULL,\n },\n };\n }\n fromPayload(_content) {\n return undefined; // Just return undefined\n }\n}\nexports.UndefinedPayloadConverter = UndefinedPayloadConverter;\n/**\n * Converts between binary data types and RAW Payload\n */\nclass BinaryPayloadConverter {\n encodingType = types_1.encodingTypes.METADATA_ENCODING_RAW;\n toPayload(value) {\n if (!(value instanceof Uint8Array)) {\n return undefined;\n }\n return {\n metadata: {\n [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_RAW,\n },\n data: value,\n };\n }\n fromPayload(content) {\n return (\n // Wrap with Uint8Array from this context to ensure `instanceof` works\n (content.data ? new Uint8Array(content.data.buffer, content.data.byteOffset, content.data.length) : content.data));\n }\n}\nexports.BinaryPayloadConverter = BinaryPayloadConverter;\n/**\n * Converts between non-undefined values and serialized JSON Payload\n */\nclass JsonPayloadConverter {\n encodingType = types_1.encodingTypes.METADATA_ENCODING_JSON;\n toPayload(value) {\n if (value === undefined) {\n return undefined;\n }\n let json;\n try {\n json = JSON.stringify(value);\n }\n catch (_err) {\n return undefined;\n }\n return {\n metadata: {\n [types_1.METADATA_ENCODING_KEY]: types_1.encodingKeys.METADATA_ENCODING_JSON,\n },\n data: (0, encoding_1.encode)(json),\n };\n }\n fromPayload(content) {\n if (content.data === undefined || content.data === null) {\n throw new errors_1.ValueError('Got payload with no data');\n }\n return JSON.parse((0, encoding_1.decode)(content.data));\n }\n}\nexports.JsonPayloadConverter = JsonPayloadConverter;\nclass DefaultPayloadConverter extends CompositePayloadConverter {\n // Match the order used in other SDKs, but exclude Protobuf converters so that the code, including\n // `proto3-json-serializer`, doesn't take space in Workflow bundles that don't use Protobufs. To use Protobufs, use\n // {@link DefaultPayloadConverterWithProtobufs}.\n //\n // Go SDK:\n // https://github.com/temporalio/sdk-go/blob/5e5645f0c550dcf717c095ae32c76a7087d2e985/converter/default_data_converter.go#L28\n constructor() {\n super(new UndefinedPayloadConverter(), new BinaryPayloadConverter(), new JsonPayloadConverter());\n }\n}\nexports.DefaultPayloadConverter = DefaultPayloadConverter;\n/**\n * The default {@link PayloadConverter} used by the SDK. Supports `Uint8Array` and JSON serializables (so if\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description | `JSON.stringify(yourArgOrRetval)`}\n * works, the default payload converter will work).\n *\n * To also support Protobufs, create a custom payload converter with {@link DefaultPayloadConverter}:\n *\n * `const myConverter = new DefaultPayloadConverter({ protobufRoot })`\n */\nexports.defaultPayloadConverter = new DefaultPayloadConverter();\n/**\n * The identity payload converter returns the inputs it was given.\n */\nclass IdentityPayloadConverter {\n toPayload(value) {\n return value;\n }\n fromPayload(payload) {\n return payload;\n }\n}\nconst identityPayloadConverter = new IdentityPayloadConverter();\n//# sourceMappingURL=payload-converter.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultFailureConverter = void 0;\nexports.cutoffStackTrace = cutoffStackTrace;\nconst nexus = __importStar(require(\"nexus-rpc\"));\nconst long_1 = __importDefault(require(\"long\"));\nconst failure_1 = require(\"../failure\");\nconst internal_workflow_1 = require(\"../internal-workflow\");\nconst type_helpers_1 = require(\"../type-helpers\");\nconst time_1 = require(\"../time\");\nconst encoding_1 = require(\"../encoding\");\nconst payload_converter_1 = require(\"./payload-converter\");\n// Can't import proto enums into the workflow sandbox, use this helper type and enum converter instead.\nconst NexusHandlerErrorRetryBehavior = {\n RETRYABLE: 'RETRYABLE',\n NON_RETRYABLE: 'NON_RETRYABLE',\n};\nconst [encodeNexusHandlerErrorRetryBehavior, decodeNexusHandlerErrorRetryBehavior] = (0, internal_workflow_1.makeProtoEnumConverters)({\n UNSPECIFIED: 0,\n [NexusHandlerErrorRetryBehavior.RETRYABLE]: 1,\n [NexusHandlerErrorRetryBehavior.NON_RETRYABLE]: 2,\n}, 'NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_');\nfunction combineRegExp(...regexps) {\n return new RegExp(regexps.map((x) => `(?:${x.source})`).join('|'));\n}\n/**\n * Stack traces will be cutoff when on of these patterns is matched\n */\nconst CUTOFF_STACK_PATTERNS = combineRegExp(\n/** Activity execution */\n/\\s+at (Activity\\.)?execute \\(.*[\\\\/]worker[\\\\/](?:src|lib)[\\\\/]activity\\.[jt]s:\\d+:\\d+\\)/, \n/** Nexus execution */\n/\\s+at( async)? (NexusHandler\\.)?invokeUserCode \\(.*[\\\\/]worker[\\\\/](?:src|lib)[\\\\/]nexus[\\\\/]index\\.[jt]s:\\d+:\\d+\\)/, \n/** Workflow activation (inbound handlers only) */\n/\\s+at( async)? (Activator\\.)?(startWorkflow|queryWorkflow|signalWorkflow|update|validateUpdate)NextHandler \\(.*\\.[jt]s:\\d+:\\d+\\)/, \n/** Workflow run anything in context */\n/\\s+at (Script\\.)?runInContext \\(native|unknown|(?:(?:node:vm|vm\\.js):\\d+:\\d+)\\)/);\n/**\n * Any stack trace frames that match any of those wil be dopped.\n * The \"null.\" prefix on some cases is to avoid https://github.com/nodejs/node/issues/42417\n */\nconst DROPPED_STACK_FRAMES_PATTERNS = combineRegExp(\n/** Internal functions used to recursively chain interceptors */\n/\\s+at (null\\.)?next \\(.*[\\\\/]common[\\\\/](?:src|lib)[\\\\/]interceptors\\.[jt]s:\\d+:\\d+\\)/, \n/** Internal functions used to recursively chain interceptors */\n/\\s+at (null\\.)?executeNextHandler \\(.*[\\\\/]worker[\\\\/](?:src|lib)[\\\\/]activity\\.[jt]s:\\d+:\\d+\\)/);\n/**\n * Cuts out the framework part of a stack trace, leaving only user code entries\n */\nfunction cutoffStackTrace(stack) {\n const lines = (stack ?? '').split(/\\r?\\n/);\n const acc = Array();\n for (const line of lines) {\n if (CUTOFF_STACK_PATTERNS.test(line))\n break;\n if (!DROPPED_STACK_FRAMES_PATTERNS.test(line))\n acc.push(line);\n }\n return acc.join('\\n');\n}\n/**\n * Default, cross-language-compatible Failure converter.\n *\n * By default, it will leave error messages and stack traces as plain text. In order to encrypt them, set\n * `encodeCommonAttributes` to `true` in the constructor options and use a {@link PayloadCodec} that can encrypt /\n * decrypt Payloads in your {@link WorkerOptions.dataConverter | Worker} and\n * {@link ClientOptions.dataConverter | Client options}.\n */\nclass DefaultFailureConverter {\n options;\n constructor(options) {\n const { encodeCommonAttributes } = options ?? {};\n this.options = {\n encodeCommonAttributes: encodeCommonAttributes ?? false,\n };\n }\n /**\n * Converts a Failure proto message to a JS Error object.\n *\n * Does not set common properties, that is done in {@link failureToError}.\n */\n failureToErrorInner(failure, payloadConverter, context) {\n if (failure.applicationFailureInfo) {\n return new failure_1.ApplicationFailure(failure.message ?? undefined, failure.applicationFailureInfo.type, Boolean(failure.applicationFailureInfo.nonRetryable), (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.applicationFailureInfo.details?.payloads, context), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context), undefined, (0, failure_1.decodeApplicationFailureCategory)(failure.applicationFailureInfo.category));\n }\n if (failure.serverFailureInfo) {\n return new failure_1.ServerFailure(failure.message ?? undefined, Boolean(failure.serverFailureInfo.nonRetryable), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.timeoutFailureInfo) {\n return new failure_1.TimeoutFailure(failure.message ?? undefined, (0, payload_converter_1.fromPayloadsAtIndex)(payloadConverter, 0, failure.timeoutFailureInfo.lastHeartbeatDetails?.payloads, context), (0, failure_1.decodeTimeoutType)(failure.timeoutFailureInfo.timeoutType));\n }\n if (failure.terminatedFailureInfo) {\n return new failure_1.TerminatedFailure(failure.message ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.canceledFailureInfo) {\n return new failure_1.CancelledFailure(failure.message ?? undefined, (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.canceledFailureInfo.details?.payloads, context), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.resetWorkflowFailureInfo) {\n return new failure_1.ApplicationFailure(failure.message ?? undefined, 'ResetWorkflow', false, (0, payload_converter_1.arrayFromPayloads)(payloadConverter, failure.resetWorkflowFailureInfo.lastHeartbeatDetails?.payloads, context), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.childWorkflowExecutionFailureInfo) {\n const { namespace, workflowType, workflowExecution, retryState } = failure.childWorkflowExecutionFailureInfo;\n if (!(workflowType?.name && workflowExecution)) {\n throw new TypeError('Missing attributes on childWorkflowExecutionFailureInfo');\n }\n return new failure_1.ChildWorkflowFailure(namespace ?? undefined, workflowExecution, workflowType.name, (0, failure_1.decodeRetryState)(retryState), this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.activityFailureInfo) {\n if (!failure.activityFailureInfo.activityType?.name) {\n throw new TypeError('Missing activityType?.name on activityFailureInfo');\n }\n return new failure_1.ActivityFailure(failure.message ?? undefined, failure.activityFailureInfo.activityType.name, failure.activityFailureInfo.activityId ?? undefined, (0, failure_1.decodeRetryState)(failure.activityFailureInfo.retryState), failure.activityFailureInfo.identity ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n if (failure.nexusHandlerFailureInfo) {\n let retryableOverride = undefined;\n const retryBehavior = decodeNexusHandlerErrorRetryBehavior(failure.nexusHandlerFailureInfo.retryBehavior);\n switch (retryBehavior) {\n case 'RETRYABLE':\n retryableOverride = true;\n break;\n case 'NON_RETRYABLE':\n retryableOverride = false;\n break;\n }\n const rawErrorType = failure.nexusHandlerFailureInfo.type || '';\n const resolvedType = Object.hasOwn(nexus.HandlerErrorType, rawErrorType)\n ? nexus.HandlerErrorType[rawErrorType]\n : 'UNKNOWN';\n return new nexus.HandlerError(resolvedType, failure.message ?? 'Nexus handler error', {\n cause: this.optionalFailureToOptionalError(failure.cause, payloadConverter, context),\n retryableOverride,\n rawErrorType,\n originalFailure: this.temporalFailureToNexusFailure(failure),\n });\n }\n if (failure.nexusOperationExecutionFailureInfo) {\n return new failure_1.NexusOperationFailure(\n // TODO(nexus/error): Maybe set a default message here, once we've decided on error handling.\n failure.message ?? undefined, failure.nexusOperationExecutionFailureInfo.scheduledEventId?.toNumber(), \n // We assume these will always be set or gracefully set to empty strings.\n failure.nexusOperationExecutionFailureInfo.endpoint ?? '', failure.nexusOperationExecutionFailureInfo.service ?? '', failure.nexusOperationExecutionFailureInfo.operation ?? '', failure.nexusOperationExecutionFailureInfo.operationToken ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n return new failure_1.TemporalFailure(failure.message ?? undefined, this.optionalFailureToOptionalError(failure.cause, payloadConverter, context));\n }\n failureToError(failure, payloadConverter, context) {\n if (failure.encodedAttributes) {\n const attrs = payloadConverter.fromPayload(failure.encodedAttributes, context);\n // Don't apply encodedAttributes unless they conform to an expected schema\n if (typeof attrs === 'object' && attrs !== null) {\n const { message, stack_trace } = attrs;\n // Avoid mutating the argument\n failure = { ...failure };\n if (typeof message === 'string') {\n failure.message = message;\n }\n if (typeof stack_trace === 'string') {\n failure.stackTrace = stack_trace;\n }\n }\n }\n const err = this.failureToErrorInner(failure, payloadConverter, context);\n err.stack = failure.stackTrace ?? '';\n if (err instanceof failure_1.TemporalFailure) {\n err.failure = failure;\n }\n return err;\n }\n errorToFailure(err, payloadConverter, context) {\n const failure = this.errorToFailureInner(err, payloadConverter, context);\n if (this.options.encodeCommonAttributes) {\n const { message, stackTrace } = failure;\n failure.message = 'Encoded failure';\n failure.stackTrace = '';\n failure.encodedAttributes = payloadConverter.toPayload({ message, stack_trace: stackTrace }, context);\n }\n return failure;\n }\n errorToFailureInner(err, payloadConverter, context) {\n if (err instanceof failure_1.TemporalFailure || err instanceof nexus.HandlerError) {\n if (err instanceof failure_1.TemporalFailure && err.failure)\n return err.failure;\n const base = {\n message: err.message,\n stackTrace: cutoffStackTrace(err.stack),\n cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter, context),\n source: failure_1.FAILURE_SOURCE,\n };\n if (err instanceof failure_1.ActivityFailure) {\n return {\n ...base,\n activityFailureInfo: {\n ...err,\n retryState: (0, failure_1.encodeRetryState)(err.retryState),\n activityType: { name: err.activityType },\n },\n };\n }\n if (err instanceof failure_1.ChildWorkflowFailure) {\n return {\n ...base,\n childWorkflowExecutionFailureInfo: {\n ...err,\n retryState: (0, failure_1.encodeRetryState)(err.retryState),\n workflowExecution: err.execution,\n workflowType: { name: err.workflowType },\n },\n };\n }\n if (err instanceof failure_1.ApplicationFailure) {\n return {\n ...base,\n applicationFailureInfo: {\n type: err.type,\n nonRetryable: err.nonRetryable,\n details: err.details && err.details.length\n ? { payloads: (0, payload_converter_1.toPayloadsWithContext)(payloadConverter, context, err.details) }\n : undefined,\n nextRetryDelay: (0, time_1.msOptionalToTs)(err.nextRetryDelay),\n category: (0, failure_1.encodeApplicationFailureCategory)(err.category),\n },\n };\n }\n if (err instanceof failure_1.CancelledFailure) {\n return {\n ...base,\n canceledFailureInfo: {\n details: err.details && err.details.length\n ? { payloads: (0, payload_converter_1.toPayloadsWithContext)(payloadConverter, context, err.details) }\n : undefined,\n },\n };\n }\n if (err instanceof failure_1.TimeoutFailure) {\n return {\n ...base,\n timeoutFailureInfo: {\n timeoutType: (0, failure_1.encodeTimeoutType)(err.timeoutType),\n lastHeartbeatDetails: err.lastHeartbeatDetails\n ? { payloads: (0, payload_converter_1.toPayloadsWithContext)(payloadConverter, context, [err.lastHeartbeatDetails]) }\n : undefined,\n },\n };\n }\n if (err instanceof failure_1.ServerFailure) {\n return {\n ...base,\n serverFailureInfo: { nonRetryable: err.nonRetryable },\n };\n }\n if (err instanceof failure_1.TerminatedFailure) {\n return {\n ...base,\n terminatedFailureInfo: {},\n };\n }\n if (err instanceof nexus.HandlerError) {\n if (err.originalFailure) {\n return this.nexusFailureToTemporalFailure(err.originalFailure, err.retryable);\n }\n else {\n let retryBehavior = undefined;\n switch (err.retryableOverride) {\n case true:\n retryBehavior = encodeNexusHandlerErrorRetryBehavior('RETRYABLE');\n break;\n case false:\n retryBehavior = encodeNexusHandlerErrorRetryBehavior('NON_RETRYABLE');\n break;\n }\n return {\n ...base,\n nexusHandlerFailureInfo: {\n type: err.type,\n retryBehavior,\n },\n };\n }\n }\n if (err instanceof failure_1.NexusOperationFailure) {\n return {\n ...base,\n nexusOperationExecutionFailureInfo: {\n scheduledEventId: err.scheduledEventId ? long_1.default.fromNumber(err.scheduledEventId) : undefined,\n endpoint: err.endpoint,\n service: err.service,\n operation: err.operation,\n operationToken: err.operationToken,\n },\n };\n }\n // Just a TemporalFailure\n return base;\n }\n const base = {\n source: failure_1.FAILURE_SOURCE,\n };\n if ((0, type_helpers_1.isError)(err)) {\n return {\n ...base,\n message: String(err.message ?? ''),\n stackTrace: cutoffStackTrace(err.stack),\n cause: this.optionalErrorToOptionalFailure(err.cause, payloadConverter, context),\n };\n }\n const recommendation = ` [A non-Error value was thrown from your code. We recommend throwing Error objects so that we can provide a stack trace]`;\n if (typeof err === 'string') {\n return { ...base, message: err + recommendation };\n }\n if (typeof err === 'object') {\n let message = '';\n try {\n message = JSON.stringify(err);\n }\n catch (_err) {\n message = String(err);\n }\n return { ...base, message: message + recommendation };\n }\n return { ...base, message: String(err) + recommendation };\n }\n /**\n * Converts a Failure proto message to a JS Error object if defined or returns undefined.\n */\n optionalFailureToOptionalError(failure, payloadConverter, context) {\n return failure ? this.failureToError(failure, payloadConverter, context) : undefined;\n }\n /**\n * Converts an error to a Failure proto message if defined or returns undefined\n */\n optionalErrorToOptionalFailure(err, payloadConverter, context) {\n return err ? this.errorToFailure(err, payloadConverter, context) : undefined;\n }\n nexusFailureToTemporalFailure(failure, retryable) {\n if (failure.metadata?.type === 'temporal.api.failure.v1.Failure') {\n if (failure.details == null) {\n throw new TypeError(\"missing details for Nexus Failure of type 'temporal.api.failure.v1.Failure'\");\n }\n return failure.details;\n }\n else {\n const temporalFailure = {};\n temporalFailure.applicationFailureInfo = {\n type: 'NexusFailure',\n nonRetryable: !retryable,\n details: {\n payloads: [\n {\n metadata: { encoding: (0, encoding_1.encode)('json/plain') },\n data: (0, encoding_1.encode)(JSON.stringify({ ...failure, message: '' })),\n },\n ],\n },\n };\n temporalFailure.message = failure.message;\n temporalFailure.stackTrace = failure.stackTrace ?? '';\n return temporalFailure;\n }\n }\n temporalFailureToNexusFailure(failure) {\n return {\n message: failure.message ?? '',\n metadata: { type: 'temporal.api.failure.v1.Failure' },\n // Store the full ProtoFailure as the Nexus failure details so it can be round-tripped\n // losslessly back to a ProtoFailure via nexusFailureToTemporalFailure.\n details: { ...failure },\n };\n }\n}\nexports.DefaultFailureConverter = DefaultFailureConverter;\n//# sourceMappingURL=failure-converter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultDataConverter = exports.defaultFailureConverter = void 0;\nconst failure_converter_1 = require(\"./failure-converter\");\nconst payload_converter_1 = require(\"./payload-converter\");\n/**\n * The default {@link FailureConverter} used by the SDK.\n *\n * Error messages and stack traces are serialized as plain text.\n */\nexports.defaultFailureConverter = new failure_converter_1.DefaultFailureConverter();\n/**\n * A \"loaded\" data converter that uses the default set of failure and payload converters.\n */\nexports.defaultDataConverter = {\n payloadConverter: payload_converter_1.defaultPayloadConverter,\n failureConverter: exports.defaultFailureConverter,\n payloadCodecs: [],\n};\n//# sourceMappingURL=data-converter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=payload-codec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.optionalTsToMs = optionalTsToMs;\nexports.tsToMs = tsToMs;\nexports.msNumberToTs = msNumberToTs;\nexports.msToTs = msToTs;\nexports.msOptionalToTs = msOptionalToTs;\nexports.msOptionalToNumber = msOptionalToNumber;\nexports.msToNumber = msToNumber;\nexports.tsToDate = tsToDate;\nexports.optionalTsToDate = optionalTsToDate;\nconst time = __importStar(require(\"./time\"));\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow.\n * If ts is null or undefined returns undefined.\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction optionalTsToMs(ts) {\n return time.optionalTsToMs(ts);\n}\n/**\n * Lossy conversion function from Timestamp to number due to possible overflow\n *\n * @hidden\n * @deprecated - meant for internal use only\n * @deprecated - meant for internal use only\n */\nfunction tsToMs(ts) {\n return time.tsToMs(ts);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msNumberToTs(millis) {\n return time.msNumberToTs(millis);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msToTs(str) {\n return time.msToTs(str);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msOptionalToTs(str) {\n return time.msOptionalToTs(str);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msOptionalToNumber(val) {\n return time.msOptionalToNumber(val);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction msToNumber(val) {\n return time.msToNumber(val);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction tsToDate(ts) {\n return time.tsToDate(ts);\n}\n/**\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction optionalTsToDate(ts) {\n return time.optionalTsToDate(ts);\n}\n//# sourceMappingURL=deprecated-time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandlerUnfinishedPolicy = void 0;\n/**\n * Policy defining actions taken when a workflow exits while update or signal handlers are running.\n * The workflow exit may be due to successful return, failure, cancellation, or continue-as-new.\n */\nexports.HandlerUnfinishedPolicy = {\n /**\n * Issue a warning in addition to abandoning the handler execution. The warning will not be issued if the workflow fails.\n */\n WARN_AND_ABANDON: 'WARN_AND_ABANDON',\n /**\n * Abandon the handler execution.\n *\n * In the case of an update handler this means that the client will receive an error rather than\n * the update result.\n */\n ABANDON: 'ABANDON',\n};\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LoggerWithComposedMetadata = exports.SdkComponent = void 0;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * Possible values of the `sdkComponent` meta attributes on log messages. This\n * attribute indicates which subsystem emitted the log message; this may for\n * example be used to implement fine-grained filtering of log messages.\n *\n * Note that there is no guarantee that this list will remain stable in the\n * future; values may be added or removed, and messages that are currently\n * emitted with some `sdkComponent` value may use a different value in the future.\n */\nvar SdkComponent;\n(function (SdkComponent) {\n /**\n * Component name for messages emited from Workflow code, using the {@link Workflow context logger|workflow.log}.\n * The SDK itself never publishes messages with this component name.\n */\n SdkComponent[\"workflow\"] = \"workflow\";\n /**\n * Component name for messages emited from an activity, using the {@link activity context logger|Context.log}.\n * The SDK itself never publishes messages with this component name.\n */\n SdkComponent[\"activity\"] = \"activity\";\n /**\n * Component name for messages emited from a Nexus Operation Handler, using the Nexus context logger.\n * The SDK itself never publishes messages with this component name.\n */\n SdkComponent[\"nexus\"] = \"nexus\";\n /**\n * Component name for messages emited from a Temporal Worker instance.\n *\n * This notably includes:\n * - Issues with Worker or runtime configuration, or the JS execution environment;\n * - Worker's, Activity's, and Workflow's lifecycle events;\n * - Workflow Activation and Activity Task processing events;\n * - Workflow bundling messages;\n * - Sink processing issues.\n */\n SdkComponent[\"worker\"] = \"worker\";\n /**\n * Component name for all messages emitted by the Rust Core SDK library.\n */\n SdkComponent[\"core\"] = \"core\";\n})(SdkComponent || (exports.SdkComponent = SdkComponent = {}));\n/**\n * A logger implementation that adds metadata before delegating calls to a parent logger.\n *\n * @internal\n * @hidden\n */\nclass LoggerWithComposedMetadata {\n parentLogger;\n contributors;\n /**\n * Return a {@link Logger} that adds metadata before delegating calls to a parent logger.\n *\n * New metadata may either be specified statically as a delta object, or as a function evaluated\n * every time a log is emitted that will return a delta object.\n *\n * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime\n * overhead associated with resolving metadata as low as possible.\n */\n static compose(logger, metaOrFunc) {\n // Flatten recursive LoggerWithComposedMetadata instances\n if (logger instanceof LoggerWithComposedMetadata) {\n const contributors = appendToChain(logger.contributors, metaOrFunc);\n // If the new contributor results in no actual change to the chain, then we don't need a new logger\n if (contributors === undefined)\n return logger;\n return new LoggerWithComposedMetadata(logger.parentLogger, contributors);\n }\n else {\n const contributors = appendToChain(undefined, metaOrFunc);\n if (contributors === undefined)\n return logger;\n return new LoggerWithComposedMetadata(logger, contributors);\n }\n }\n constructor(parentLogger, contributors) {\n this.parentLogger = parentLogger;\n this.contributors = contributors;\n }\n log(level, message, extraMeta) {\n this.parentLogger.log(level, message, resolveMetadata(this.contributors, extraMeta));\n }\n trace(message, extraMeta) {\n this.parentLogger.trace(message, resolveMetadata(this.contributors, extraMeta));\n }\n debug(message, extraMeta) {\n this.parentLogger.debug(message, resolveMetadata(this.contributors, extraMeta));\n }\n info(message, extraMeta) {\n this.parentLogger.info(message, resolveMetadata(this.contributors, extraMeta));\n }\n warn(message, extraMeta) {\n this.parentLogger.warn(message, resolveMetadata(this.contributors, extraMeta));\n }\n error(message, extraMeta) {\n this.parentLogger.error(message, resolveMetadata(this.contributors, extraMeta));\n }\n}\nexports.LoggerWithComposedMetadata = LoggerWithComposedMetadata;\nfunction resolveMetadata(contributors, extraMeta) {\n const resolved = {};\n for (const contributor of contributors) {\n Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor);\n }\n Object.assign(resolved, extraMeta);\n return (0, internal_workflow_1.filterNullAndUndefined)(resolved);\n}\n/**\n * Append a metadata contributor to the chain, merging it with the former last contributor if both are plain objects\n */\nfunction appendToChain(existingContributors, newContributor) {\n // If the new contributor is an empty object, then it results in no actual change to the chain\n if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) {\n return existingContributors;\n }\n // If existing chain is empty, then the new contributor is the chain\n if (existingContributors == null || existingContributors.length === 0) {\n return [newContributor];\n }\n // If both last contributor and new contributor are plain objects, merge them to a single object.\n const last = existingContributors[existingContributors.length - 1];\n if (typeof last === 'object' && typeof newContributor === 'object') {\n const merged = (0, internal_workflow_1.mergeObjects)(last, newContributor);\n if (merged === last)\n return existingContributors;\n return [...existingContributors.slice(0, -1), merged];\n }\n // Otherwise, just append the new contributor to the chain.\n return [...existingContributors, newContributor];\n}\n//# sourceMappingURL=logger.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodePriority = decodePriority;\nexports.compilePriority = compilePriority;\n/**\n * Turn a proto compatible Priority into a TS Priority\n */\nfunction decodePriority(priority) {\n return {\n priorityKey: priority?.priorityKey ?? undefined,\n fairnessKey: priority?.fairnessKey ?? undefined,\n fairnessWeight: priority?.fairnessWeight ?? undefined,\n };\n}\n/**\n * Turn a TS Priority into a proto compatible Priority\n */\nfunction compilePriority(priority) {\n if (priority.priorityKey !== undefined && priority.priorityKey !== null) {\n if (!Number.isInteger(priority.priorityKey)) {\n throw new TypeError('priorityKey must be an integer');\n }\n if (priority.priorityKey < 0) {\n throw new RangeError('priorityKey must be a positive integer');\n }\n }\n return {\n priorityKey: priority.priorityKey ?? 0,\n fairnessKey: priority.fairnessKey ?? '',\n fairnessWeight: priority.fairnessWeight ?? 0,\n };\n}\n//# sourceMappingURL=priority.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricMeterWithComposedTags = exports.noopMetricMeter = void 0;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n////////////////////////////////////////////////////////////////////////////////////////////////////\n/**\n * A meter implementation that does nothing.\n */\nclass NoopMetricMeter {\n createCounter(name, unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'counter',\n valueType: 'int',\n add(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n createHistogram(name, valueType = 'int', unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'histogram',\n valueType,\n record(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n createGauge(name, valueType = 'int', unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'gauge',\n valueType,\n set(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n createUpDownCounter(name, unit, description) {\n return {\n name,\n unit,\n description,\n kind: 'up-down-counter',\n valueType: 'int',\n add(_value, _extraTags) { },\n withTags(_extraTags) {\n return this;\n },\n };\n }\n withTags(_extraTags) {\n return this;\n }\n}\nexports.noopMetricMeter = new NoopMetricMeter();\n/**\n * A meter implementation that adds tags before delegating calls to a parent meter.\n *\n * @experimental The Metric API is an experimental feature and may be subject to change.\n * @internal\n * @hidden\n */\nclass MetricMeterWithComposedTags {\n parentMeter;\n contributors;\n /**\n * Return a {@link MetricMeter} that adds tags before delegating calls to a parent meter.\n *\n * New tags may either be specified statically as a delta object, or as a function evaluated\n * every time a metric is recorded that will return a delta object.\n *\n * Some optimizations are performed to avoid creating unnecessary objects and to keep runtime\n * overhead associated with resolving tags as low as possible.\n *\n * @param meter The parent meter to delegate calls to.\n * @param tagsOrFunc New tags may either be specified statically as a delta object, or as a function\n * evaluated every time a metric is recorded that will return a delta object.\n * @param force if `true`, then a `MetricMeterWithComposedTags` will be created even if there\n * is no tags to add. This is useful to add tags support to an underlying meter\n * implementation that does not support tags directly.\n */\n static compose(meter, tagsOrFunc, force = false) {\n if (meter instanceof MetricMeterWithComposedTags) {\n const contributors = appendToChain(meter.contributors, tagsOrFunc);\n // If the new contributor results in no actual change to the chain, then we don't need a new meter\n if (contributors === undefined && !force)\n return meter;\n return new MetricMeterWithComposedTags(meter.parentMeter, contributors ?? []);\n }\n else {\n const contributors = appendToChain(undefined, tagsOrFunc);\n if (contributors === undefined && !force)\n return meter;\n return new MetricMeterWithComposedTags(meter, contributors ?? []);\n }\n }\n constructor(parentMeter, contributors) {\n this.parentMeter = parentMeter;\n this.contributors = contributors;\n }\n createCounter(name, unit, description) {\n const parentCounter = this.parentMeter.createCounter(name, unit, description);\n return new MetricCounterWithComposedTags(parentCounter, this.contributors);\n }\n createHistogram(name, valueType = 'int', unit, description) {\n const parentHistogram = this.parentMeter.createHistogram(name, valueType, unit, description);\n return new MetricHistogramWithComposedTags(parentHistogram, this.contributors);\n }\n createGauge(name, valueType = 'int', unit, description) {\n const parentGauge = this.parentMeter.createGauge(name, valueType, unit, description);\n return new MetricGaugeWithComposedTags(parentGauge, this.contributors);\n }\n createUpDownCounter(name, unit, description) {\n // FIXME: Remove this guard once up-down-counter support is complete on all MetricMeter\n // implementations and `createUpDownCounter` is no longer optional on MetricMeter.\n if (!this.parentMeter.createUpDownCounter) {\n throw new Error('createUpDownCounter is not supported by the underlying meter');\n }\n const parentCounter = this.parentMeter.createUpDownCounter(name, unit, description);\n return new MetricUpDownCounterWithComposedTags(parentCounter, this.contributors);\n }\n withTags(tags) {\n return MetricMeterWithComposedTags.compose(this, tags);\n }\n}\nexports.MetricMeterWithComposedTags = MetricMeterWithComposedTags;\n/**\n * @experimental The Metric API is an experimental feature and may be subject to change.\n */\nclass MetricCounterWithComposedTags {\n parentCounter;\n contributors;\n kind = 'counter';\n valueType = 'int';\n constructor(parentCounter, contributors) {\n this.parentCounter = parentCounter;\n this.contributors = contributors;\n }\n add(value, extraTags) {\n this.parentCounter.add(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricCounterWithComposedTags(this.parentCounter, contributors);\n }\n get name() {\n return this.parentCounter.name;\n }\n get unit() {\n return this.parentCounter.unit;\n }\n get description() {\n return this.parentCounter.description;\n }\n}\n/**\n * @experimental The Metric API is an experimental feature and may be subject to change.\n */\nclass MetricHistogramWithComposedTags {\n parentHistogram;\n contributors;\n kind = 'histogram';\n constructor(parentHistogram, contributors) {\n this.parentHistogram = parentHistogram;\n this.contributors = contributors;\n }\n record(value, extraTags) {\n this.parentHistogram.record(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricHistogramWithComposedTags(this.parentHistogram, contributors);\n }\n get name() {\n return this.parentHistogram.name;\n }\n get valueType() {\n return this.parentHistogram.valueType;\n }\n get unit() {\n return this.parentHistogram.unit;\n }\n get description() {\n return this.parentHistogram.description;\n }\n}\n/**\n * @internal\n * @hidden\n */\nclass MetricGaugeWithComposedTags {\n parentGauge;\n contributors;\n kind = 'gauge';\n constructor(parentGauge, contributors) {\n this.parentGauge = parentGauge;\n this.contributors = contributors;\n }\n set(value, extraTags) {\n this.parentGauge.set(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricGaugeWithComposedTags(this.parentGauge, contributors);\n }\n get name() {\n return this.parentGauge.name;\n }\n get valueType() {\n return this.parentGauge.valueType;\n }\n get unit() {\n return this.parentGauge.unit;\n }\n get description() {\n return this.parentGauge.description;\n }\n}\n/**\n * @internal\n * @hidden\n */\nclass MetricUpDownCounterWithComposedTags {\n parentCounter;\n contributors;\n kind = 'up-down-counter';\n valueType = 'int';\n constructor(parentCounter, contributors) {\n this.parentCounter = parentCounter;\n this.contributors = contributors;\n }\n add(value, extraTags) {\n this.parentCounter.add(value, resolveTags(this.contributors, extraTags));\n }\n withTags(extraTags) {\n const contributors = appendToChain(this.contributors, extraTags);\n if (contributors === undefined)\n return this;\n return new MetricUpDownCounterWithComposedTags(this.parentCounter, contributors);\n }\n get name() {\n return this.parentCounter.name;\n }\n get unit() {\n return this.parentCounter.unit;\n }\n get description() {\n return this.parentCounter.description;\n }\n}\nfunction resolveTags(contributors, extraTags) {\n const resolved = {};\n for (const contributor of contributors) {\n Object.assign(resolved, typeof contributor === 'function' ? contributor() : contributor);\n }\n Object.assign(resolved, extraTags);\n return (0, internal_workflow_1.filterNullAndUndefined)(resolved);\n}\n/**\n * Append a tags contributor to the chain, merging it with the former last contributor if possible.\n *\n * If appending the new contributor results in no actual change to the chain of contributors, return\n * `existingContributors`; in that case, the caller should avoid creating a new object if possible.\n */\nfunction appendToChain(existingContributors, newContributor) {\n // If the new contributor is an empty object, then it results in no actual change to the chain\n if (typeof newContributor === 'object' && Object.keys(newContributor).length === 0) {\n return existingContributors;\n }\n // If existing chain is empty, then the new contributor is the chain\n if (existingContributors == null || existingContributors.length === 0) {\n return [newContributor];\n }\n // If both last contributor and new contributor are plain objects, merge them to a single object.\n const last = existingContributors[existingContributors.length - 1];\n if (typeof last === 'object' && typeof newContributor === 'object') {\n const merged = (0, internal_workflow_1.mergeObjects)(last, newContributor);\n if (merged === last)\n return existingContributors;\n return [...existingContributors.slice(0, -1), merged];\n }\n // Otherwise, just append the new contributor to the chain.\n return [...existingContributors, newContributor];\n}\n//# sourceMappingURL=metrics.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compileRetryPolicy = compileRetryPolicy;\nexports.decompileRetryPolicy = decompileRetryPolicy;\nconst errors_1 = require(\"./errors\");\nconst time_1 = require(\"./time\");\n/**\n * Turn a TS RetryPolicy into a proto compatible RetryPolicy\n */\nfunction compileRetryPolicy(retryPolicy) {\n if (retryPolicy.backoffCoefficient != null && retryPolicy.backoffCoefficient <= 0) {\n throw new errors_1.ValueError('RetryPolicy.backoffCoefficient must be greater than 0');\n }\n if (retryPolicy.maximumAttempts != null) {\n if (retryPolicy.maximumAttempts === Number.POSITIVE_INFINITY) {\n // drop field (Infinity is the default)\n const { maximumAttempts: _, ...without } = retryPolicy;\n retryPolicy = without;\n }\n else if (retryPolicy.maximumAttempts <= 0) {\n throw new errors_1.ValueError('RetryPolicy.maximumAttempts must be a positive integer');\n }\n else if (!Number.isInteger(retryPolicy.maximumAttempts)) {\n throw new errors_1.ValueError('RetryPolicy.maximumAttempts must be an integer');\n }\n }\n const maximumInterval = (0, time_1.msOptionalToNumber)(retryPolicy.maximumInterval);\n const initialInterval = (0, time_1.msToNumber)(retryPolicy.initialInterval ?? 1000);\n if (maximumInterval === 0) {\n throw new errors_1.ValueError('RetryPolicy.maximumInterval cannot be 0');\n }\n if (initialInterval === 0) {\n throw new errors_1.ValueError('RetryPolicy.initialInterval cannot be 0');\n }\n if (maximumInterval != null && maximumInterval < initialInterval) {\n throw new errors_1.ValueError('RetryPolicy.maximumInterval cannot be less than its initialInterval');\n }\n return {\n maximumAttempts: retryPolicy.maximumAttempts,\n initialInterval: (0, time_1.msToTs)(initialInterval),\n maximumInterval: (0, time_1.msOptionalToTs)(maximumInterval),\n backoffCoefficient: retryPolicy.backoffCoefficient,\n nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes,\n };\n}\n/**\n * Turn a proto compatible RetryPolicy into a TS RetryPolicy\n */\nfunction decompileRetryPolicy(retryPolicy) {\n if (!retryPolicy) {\n return undefined;\n }\n return {\n backoffCoefficient: retryPolicy.backoffCoefficient ?? undefined,\n maximumAttempts: retryPolicy.maximumAttempts ?? undefined,\n maximumInterval: (0, time_1.optionalTsToMs)(retryPolicy.maximumInterval),\n initialInterval: (0, time_1.optionalTsToMs)(retryPolicy.initialInterval),\n nonRetryableErrorTypes: retryPolicy.nonRetryableErrorTypes ?? undefined,\n };\n}\n//# sourceMappingURL=retry-policy.js.map","\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeInitialVersioningBehavior = exports.encodeInitialVersioningBehavior = exports.InitialVersioningBehavior = exports.decodeVersioningBehavior = exports.encodeVersioningBehavior = exports.VersioningBehavior = void 0;\nexports.toCanonicalString = toCanonicalString;\nexports.convertDeploymentVersion = convertDeploymentVersion;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * @returns The canonical representation of a deployment version, which is a string in the format\n * `deploymentName.buildId`.\n */\nfunction toCanonicalString(version) {\n return `${version.deploymentName}.${version.buildId}`;\n}\n/**\n * Specifies when a workflow might move from a worker of one Build Id to another.\n *\n * * 'PINNED' - The workflow will be pinned to the current Build ID unless manually moved.\n * * 'AUTO_UPGRADE' - The workflow will automatically move to the latest version (default Build ID\n * of the task queue) when the next task is dispatched.\n */\nexports.VersioningBehavior = {\n PINNED: 'PINNED',\n AUTO_UPGRADE: 'AUTO_UPGRADE',\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.VersioningBehavior.PINNED]: 1,\n [exports.VersioningBehavior.AUTO_UPGRADE]: 2,\n UNSPECIFIED: 0,\n}, 'VERSIONING_BEHAVIOR_'), exports.encodeVersioningBehavior = _a[0], exports.decodeVersioningBehavior = _a[1];\n/**\n * Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.\n *\n * AUTO_UPGRADE - Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at\n * start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever\n * Versioning Behavior the workflow is annotated with in the workflow code.\n *\n * Note that if the previous workflow had a Pinned override, that override will be inherited by the\n * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\n * command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade\n * behavior, the base version of the new run will be the Target Version as described above, but the\n * effective version will be whatever is specified by the Versioning Override until the override is removed.\n *\n * USE_RAMPING_VERSION - Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's\n * Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes,\n * the workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping\n * Version by the time that the first workflow task is dispatched, it will be sent to the Current Version.\n *\n * It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because\n * this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow\n * is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which\n * may be the Current Version instead of the Ramping Version.\n *\n * Note that if the workflow being continued has a Pinned override, that override will be inherited by the\n * new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new\n * command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions.\n *\n * @experimental Versioning semantics with continue-as-new are experimental and may change in the future.\n */\nexports.InitialVersioningBehavior = {\n AUTO_UPGRADE: 'AUTO_UPGRADE',\n USE_RAMPING_VERSION: 'USE_RAMPING_VERSION',\n};\n_b = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.InitialVersioningBehavior.AUTO_UPGRADE]: 1,\n [exports.InitialVersioningBehavior.USE_RAMPING_VERSION]: 2,\n UNSPECIFIED: 0,\n}, 'CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_'), exports.encodeInitialVersioningBehavior = _b[0], exports.decodeInitialVersioningBehavior = _b[1];\n/**\n * @internal\n */\nfunction convertDeploymentVersion(v) {\n if (!v || !v.buildId) {\n return undefined;\n }\n return {\n buildId: v.buildId,\n deploymentName: v.deploymentName ?? '',\n };\n}\n//# sourceMappingURL=worker-deployments.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=workflow-definition-options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=workflow-handle.js.map","\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeWorkflowIdConflictPolicy = exports.encodeWorkflowIdConflictPolicy = exports.WorkflowIdConflictPolicy = exports.decodeWorkflowIdReusePolicy = exports.encodeWorkflowIdReusePolicy = exports.WorkflowIdReusePolicy = void 0;\nexports.extractWorkflowType = extractWorkflowType;\nconst internal_workflow_1 = require(\"./internal-workflow\");\n/**\n * Defines what happens when trying to start a Workflow with the same ID as a *Closed* Workflow.\n *\n * See {@link WorkflowOptions.workflowIdConflictPolicy} for what happens when trying to start a\n * Workflow with the same ID as a *Running* Workflow.\n *\n * Concept: {@link https://docs.temporal.io/workflow-execution/workflowid-runid#workflow-id-reuse-policy | Workflow Id Reuse Policy}\n *\n * *Note: It is not possible to have two actively running Workflows with the same ID.*\n *\n */\nexports.WorkflowIdReusePolicy = {\n /**\n * The Workflow can be started if the previous Workflow is in a Closed state.\n * @default\n */\n ALLOW_DUPLICATE: 'ALLOW_DUPLICATE',\n /**\n * The Workflow can be started if the previous Workflow is in a Closed state that is not Completed.\n */\n ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY',\n /**\n * The Workflow cannot be started.\n */\n REJECT_DUPLICATE: 'REJECT_DUPLICATE',\n /**\n * Terminate the current Workflow if one is already running; otherwise allow reusing the Workflow ID.\n *\n * @deprecated Use {@link WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE} instead, and\n * set `WorkflowOptions.workflowIdConflictPolicy` to\n * {@link WorkflowIdConflictPolicy.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING}.\n * When using this option, `WorkflowOptions.workflowIdConflictPolicy` must be left unspecified.\n */\n TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING',\n /// Anything below this line has been deprecated\n /**\n * No need to use this. If a `WorkflowIdReusePolicy` is set to this, or is not set at all, the default value will be used.\n *\n * @deprecated Either leave property `undefined`, or use {@link ALLOW_DUPLICATE} instead.\n */\n WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: undefined,\n /** @deprecated Use {@link ALLOW_DUPLICATE} instead. */\n WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: 'ALLOW_DUPLICATE',\n /** @deprecated Use {@link ALLOW_DUPLICATE_FAILED_ONLY} instead. */\n WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: 'ALLOW_DUPLICATE_FAILED_ONLY',\n /** @deprecated Use {@link REJECT_DUPLICATE} instead. */\n WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: 'REJECT_DUPLICATE',\n /** @deprecated Use {@link TERMINATE_IF_RUNNING} instead. */\n WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: 'TERMINATE_IF_RUNNING',\n};\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.WorkflowIdReusePolicy.ALLOW_DUPLICATE]: 1,\n [exports.WorkflowIdReusePolicy.ALLOW_DUPLICATE_FAILED_ONLY]: 2,\n [exports.WorkflowIdReusePolicy.REJECT_DUPLICATE]: 3,\n [exports.WorkflowIdReusePolicy.TERMINATE_IF_RUNNING]: 4, // eslint-disable-line @typescript-eslint/no-deprecated\n UNSPECIFIED: 0,\n}, 'WORKFLOW_ID_REUSE_POLICY_'), exports.encodeWorkflowIdReusePolicy = _a[0], exports.decodeWorkflowIdReusePolicy = _a[1];\n/**\n * Defines what happens when trying to start a Workflow with the same ID as a *Running* Workflow.\n *\n * See {@link WorkflowOptions.workflowIdReusePolicy} for what happens when trying to start a Workflow\n * with the same ID as a *Closed* Workflow.\n *\n * *Note: It is never possible to have two _actively running_ Workflows with the same ID.*\n */\nexports.WorkflowIdConflictPolicy = {\n /**\n * Do not start a new Workflow. Instead raise a `WorkflowExecutionAlreadyStartedError`.\n */\n FAIL: 'FAIL',\n /**\n * Do not start a new Workflow. Instead return a Workflow Handle for the already Running Workflow.\n */\n USE_EXISTING: 'USE_EXISTING',\n /**\n * Start a new Workflow, terminating the current workflow if one is already running.\n */\n TERMINATE_EXISTING: 'TERMINATE_EXISTING',\n};\n_b = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.WorkflowIdConflictPolicy.FAIL]: 1,\n [exports.WorkflowIdConflictPolicy.USE_EXISTING]: 2,\n [exports.WorkflowIdConflictPolicy.TERMINATE_EXISTING]: 3,\n UNSPECIFIED: 0,\n}, 'WORKFLOW_ID_CONFLICT_POLICY_'), exports.encodeWorkflowIdConflictPolicy = _b[0], exports.decodeWorkflowIdConflictPolicy = _b[1];\nfunction extractWorkflowType(workflowTypeOrFunc) {\n if (typeof workflowTypeOrFunc === 'string')\n return workflowTypeOrFunc;\n if (typeof workflowTypeOrFunc === 'function') {\n if (workflowTypeOrFunc?.name)\n return workflowTypeOrFunc.name;\n throw new TypeError('Invalid workflow type: the workflow function is anonymous');\n }\n throw new TypeError(`Invalid workflow type: expected either a string or a function, got '${typeof workflowTypeOrFunc}'`);\n}\n//# sourceMappingURL=workflow-options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=versioning-intent.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypedSearchAttributes = exports.TypedSearchAttributeUpdateValue = exports.TypedSearchAttributeValue = exports._ = exports.encodeSearchAttributeIndexedValueType = exports.SearchAttributeType = void 0;\nexports.isValidValueForType = isValidValueForType;\nexports.defineSearchAttributeKey = defineSearchAttributeKey;\nconst internal_workflow_1 = require(\"./internal-workflow\");\nexports.SearchAttributeType = {\n TEXT: 'TEXT',\n KEYWORD: 'KEYWORD',\n INT: 'INT',\n DOUBLE: 'DOUBLE',\n BOOL: 'BOOL',\n DATETIME: 'DATETIME',\n KEYWORD_LIST: 'KEYWORD_LIST',\n};\n// Note: encodeSearchAttributeIndexedValueType exported for use in tests to register search attributes\n// ts-prune-ignore-next\n_a = (0, internal_workflow_1.makeProtoEnumConverters)({\n [exports.SearchAttributeType.TEXT]: 1,\n [exports.SearchAttributeType.KEYWORD]: 2,\n [exports.SearchAttributeType.INT]: 3,\n [exports.SearchAttributeType.DOUBLE]: 4,\n [exports.SearchAttributeType.BOOL]: 5,\n [exports.SearchAttributeType.DATETIME]: 6,\n [exports.SearchAttributeType.KEYWORD_LIST]: 7,\n UNSPECIFIED: 0,\n}, 'INDEXED_VALUE_TYPE_'), exports.encodeSearchAttributeIndexedValueType = _a[0], exports._ = _a[1];\nfunction isValidValueForType(type, value) {\n switch (type) {\n case exports.SearchAttributeType.TEXT:\n case exports.SearchAttributeType.KEYWORD:\n return typeof value === 'string';\n case exports.SearchAttributeType.INT:\n return Number.isInteger(value);\n case exports.SearchAttributeType.DOUBLE:\n return typeof value === 'number';\n case exports.SearchAttributeType.BOOL:\n return typeof value === 'boolean';\n case exports.SearchAttributeType.DATETIME:\n return value instanceof Date;\n case exports.SearchAttributeType.KEYWORD_LIST:\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n default:\n return false;\n }\n}\nfunction defineSearchAttributeKey(name, type) {\n return { name, type };\n}\nclass BaseSearchAttributeValue {\n _type;\n _value;\n constructor(type, value) {\n this._type = type;\n this._value = value;\n }\n get type() {\n return this._type;\n }\n get value() {\n return this._value;\n }\n}\n// Internal type for class private data.\n// Exported for use in payload conversion.\nclass TypedSearchAttributeValue extends BaseSearchAttributeValue {\n}\nexports.TypedSearchAttributeValue = TypedSearchAttributeValue;\n// ts-prune-ignore-next\nclass TypedSearchAttributeUpdateValue extends BaseSearchAttributeValue {\n}\nexports.TypedSearchAttributeUpdateValue = TypedSearchAttributeUpdateValue;\nclass TypedSearchAttributes {\n searchAttributes = {};\n constructor(initialAttributes) {\n if (initialAttributes === undefined)\n return;\n for (const pair of initialAttributes) {\n if (pair.key.name in this.searchAttributes) {\n throw new Error(`Duplicate search attribute key: ${pair.key.name}`);\n }\n this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value);\n }\n }\n get(key) {\n const attr = this.searchAttributes[key.name];\n // Key not found or type mismatch.\n if (attr === undefined || !isValidValueForType(key.type, attr.value)) {\n return undefined;\n }\n return attr.value;\n }\n /** Returns a deep copy of the given TypedSearchAttributes instance */\n copy() {\n const state = {};\n for (const [key, attr] of Object.entries(this.searchAttributes)) {\n // Create a new instance with the same properties\n let value = attr.value;\n // For non-primitive types, create a deep copy\n if (attr.value instanceof Date) {\n value = new Date(attr.value);\n }\n else if (Array.isArray(attr.value)) {\n value = [...attr.value];\n }\n state[key] = new TypedSearchAttributeValue(attr.type, value);\n }\n // Create return value with manually assigned state.\n const res = new TypedSearchAttributes();\n res.searchAttributes = state;\n return res;\n }\n /**\n * @hidden\n * Return JSON representation of this class as SearchAttributePair[]\n * Default toJSON method is not used because it's JSON representation includes private state.\n */\n toJSON() {\n return this.getAll();\n }\n /** Returns a copy of the current TypedSearchAttributes instance with the updated attributes. */\n updateCopy(updates) {\n // Create a deep copy of the current instance.\n const res = this.copy();\n // Apply updates.\n res.update(updates);\n return res;\n }\n // Performs direct mutation on the current instance.\n update(updates) {\n // Apply updates.\n for (const pair of updates) {\n // Delete attribute.\n if (pair.value === null) {\n // Delete only if the update matches a key and type.\n const attrVal = this.searchAttributes[pair.key.name];\n if (attrVal && attrVal.type === pair.key.type) {\n delete this.searchAttributes[pair.key.name];\n }\n continue;\n }\n // Add or update attribute.\n this.searchAttributes[pair.key.name] = new TypedSearchAttributeValue(pair.key.type, pair.value);\n }\n }\n getAll() {\n const res = [];\n for (const [key, attr] of Object.entries(this.searchAttributes)) {\n const attrKey = { name: key, type: attr.type };\n // Sanity check, should always be legal.\n if (isValidValueForType(attrKey.type, attr.value)) {\n res.push({ key: attrKey, value: attr.value });\n }\n }\n return res;\n }\n static getKeyFromUntyped(key, value) {\n if (value == null) {\n return;\n }\n // Unpack single-element arrays.\n const val = value.length === 1 ? value[0] : value;\n switch (typeof val) {\n case 'string':\n // Check if val is an ISO string, if so, return a DATETIME key.\n if (!isNaN(Date.parse(val)) && Date.parse(val) === new Date(val).getTime()) {\n return { name: key, type: exports.SearchAttributeType.DATETIME };\n }\n return { name: key, type: exports.SearchAttributeType.TEXT };\n case 'number':\n return {\n name: key,\n type: Number.isInteger(val) ? exports.SearchAttributeType.INT : exports.SearchAttributeType.DOUBLE,\n };\n case 'boolean':\n return { name: key, type: exports.SearchAttributeType.BOOL };\n case 'object':\n if (val instanceof Date) {\n return { name: key, type: exports.SearchAttributeType.DATETIME };\n }\n if (Array.isArray(val) && val.every((item) => typeof item === 'string')) {\n return { name: key, type: exports.SearchAttributeType.KEYWORD_LIST };\n }\n return;\n default:\n return;\n }\n }\n static toMetadataType(type) {\n switch (type) {\n case exports.SearchAttributeType.TEXT:\n return 'Text';\n case exports.SearchAttributeType.KEYWORD:\n return 'Keyword';\n case exports.SearchAttributeType.INT:\n return 'Int';\n case exports.SearchAttributeType.DOUBLE:\n return 'Double';\n case exports.SearchAttributeType.BOOL:\n return 'Bool';\n case exports.SearchAttributeType.DATETIME:\n return 'Datetime';\n case exports.SearchAttributeType.KEYWORD_LIST:\n return 'KeywordList';\n default:\n throw new Error(`Unknown search attribute type: ${type}`);\n }\n }\n static toSearchAttributeType(type) {\n // The type metadata is usually in PascalCase (e.g. \"KeywordList\") but in\n // rare cases may be in SCREAMING_SNAKE_CASE (e.g. \"INDEXED_VALUE_TYPE_KEYWORD_LIST\").\n switch (type) {\n case 'Text':\n case 'INDEXED_VALUE_TYPE_TEXT':\n return exports.SearchAttributeType.TEXT;\n case 'Keyword':\n case 'INDEXED_VALUE_TYPE_KEYWORD':\n return exports.SearchAttributeType.KEYWORD;\n case 'Int':\n case 'INDEXED_VALUE_TYPE_INT':\n return exports.SearchAttributeType.INT;\n case 'Double':\n case 'INDEXED_VALUE_TYPE_DOUBLE':\n return exports.SearchAttributeType.DOUBLE;\n case 'Bool':\n case 'INDEXED_VALUE_TYPE_BOOL':\n return exports.SearchAttributeType.BOOL;\n case 'Datetime':\n case 'INDEXED_VALUE_TYPE_DATETIME':\n return exports.SearchAttributeType.DATETIME;\n case 'KeywordList':\n case 'INDEXED_VALUE_TYPE_KEYWORD_LIST':\n return exports.SearchAttributeType.KEYWORD_LIST;\n default:\n return;\n }\n }\n}\nexports.TypedSearchAttributes = TypedSearchAttributes;\n//# sourceMappingURL=search-attributes.js.map","\"use strict\";\n/**\n * Common library for code that's used across the Client, Worker, and/or Workflow\n *\n * @module\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defineSearchAttributeKey = exports.TypedSearchAttributes = exports.SearchAttributeType = exports.SuggestContinueAsNewReason = exports.ActivityCancellationDetails = void 0;\nexports.u8 = u8;\nexports.str = str;\nexports.errorMessage = errorMessage;\nexports.errorCode = errorCode;\nconst encoding = __importStar(require(\"./encoding\"));\nconst helpers = __importStar(require(\"./type-helpers\"));\n__exportStar(require(\"./activity-options\"), exports);\nvar activity_cancellation_details_1 = require(\"./activity-cancellation-details\");\nObject.defineProperty(exports, \"ActivityCancellationDetails\", { enumerable: true, get: function () { return activity_cancellation_details_1.ActivityCancellationDetails; } });\nvar continue_as_new_1 = require(\"./continue-as-new\");\nObject.defineProperty(exports, \"SuggestContinueAsNewReason\", { enumerable: true, get: function () { return continue_as_new_1.SuggestContinueAsNewReason; } });\n__exportStar(require(\"./converter/data-converter\"), exports);\n__exportStar(require(\"./converter/failure-converter\"), exports);\n__exportStar(require(\"./converter/payload-codec\"), exports);\n__exportStar(require(\"./converter/payload-converter\"), exports);\n__exportStar(require(\"./converter/types\"), exports);\n__exportStar(require(\"./deprecated-time\"), exports);\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./failure\"), exports);\n__exportStar(require(\"./interfaces\"), exports);\n__exportStar(require(\"./logger\"), exports);\n__exportStar(require(\"./priority\"), exports);\n__exportStar(require(\"./metrics\"), exports);\n__exportStar(require(\"./retry-policy\"), exports);\n__exportStar(require(\"./worker-deployments\"), exports);\n__exportStar(require(\"./workflow-definition-options\"), exports);\n__exportStar(require(\"./workflow-handle\"), exports);\n__exportStar(require(\"./workflow-options\"), exports);\n__exportStar(require(\"./versioning-intent\"), exports);\nvar search_attributes_1 = require(\"./search-attributes\");\nObject.defineProperty(exports, \"SearchAttributeType\", { enumerable: true, get: function () { return search_attributes_1.SearchAttributeType; } });\nObject.defineProperty(exports, \"TypedSearchAttributes\", { enumerable: true, get: function () { return search_attributes_1.TypedSearchAttributes; } });\nObject.defineProperty(exports, \"defineSearchAttributeKey\", { enumerable: true, get: function () { return search_attributes_1.defineSearchAttributeKey; } });\n/**\n * Encode a UTF-8 string into a Uint8Array\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction u8(s) {\n return encoding.encode(s);\n}\n/**\n * Decode a Uint8Array into a UTF-8 string\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction str(arr) {\n return encoding.decode(arr);\n}\n/**\n * Get `error.message` (or `undefined` if not present)\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction errorMessage(error) {\n return helpers.errorMessage(error);\n}\n/**\n * Get `error.code` (or `undefined` if not present)\n *\n * @hidden\n * @deprecated - meant for internal use only\n */\nfunction errorCode(error) {\n return helpers.errorCode(error);\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getActivator = void 0;\nexports.setActivator = setActivator;\nexports.maybeGetActivator = maybeGetActivator;\nexports.assertInWorkflowContext = assertInWorkflowContext;\nconst common_1 = require(\"@temporalio/common\");\nfunction setActivator(activator) {\n globalThis.__TEMPORAL_ACTIVATOR__ = activator;\n}\nfunction maybeGetActivator() {\n return globalThis.__TEMPORAL_ACTIVATOR__;\n}\nfunction assertInWorkflowContext(uninitializedErrorMessage) {\n const activator = maybeGetActivator();\n if (activator == null)\n throw new common_1.IllegalStateError(uninitializedErrorMessage);\n return activator;\n}\n// This is really just an alias for `assertInWorkflowContext` with a default error message,\n// because that name better conveys the intent in some very common use cases.\nexports.getActivator = assertInWorkflowContext.bind(null, 'Workflow uninitialized');\n//# sourceMappingURL=global-attributes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.untrackPromise = untrackPromise;\nconst global_attributes_1 = require(\"./global-attributes\");\n/**\n * Helper function to remove a promise from being tracked for stack trace query purposes\n */\nfunction untrackPromise(promise) {\n const store = (0, global_attributes_1.maybeGetActivator)()?.promiseStackStore;\n if (!store)\n return;\n store.childToParent.delete(promise);\n store.promiseToStack.delete(promise);\n}\n//# sourceMappingURL=stack-helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SdkFlags = void 0;\nexports.assertValidFlag = assertValidFlag;\nconst flagsRegistry = new Map();\nexports.SdkFlags = {\n /**\n * This flag gates multiple fixes related to cancellation scopes and timers introduced in 1.10.2/1.11.0:\n * - Cancellation of a non-cancellable scope no longer propagates to children scopes\n * (see https://github.com/temporalio/sdk-typescript/issues/1423).\n * - CancellationScope.withTimeout(fn) now cancel the timer if `fn` completes before expiration\n * of the timeout, similar to how `condition(fn, timeout)` works.\n * - Timers created using setTimeout can now be intercepted.\n *\n * @since Introduced in 1.10.2/1.11.0. However, due to an SDK bug, SDKs v1.11.0 and v1.11.1 were not\n * properly writing back the flags to history, possibly resulting in NDE on replay. We therefore\n * consider that a WFT emitted by Worker v1.11.0 or v1.11.1 to implicitly have this flag on.\n */\n NonCancellableScopesAreShieldedFromPropagation: defineFlag(1, true, [buildIdSdkVersionMatches(/1\\.11\\.[01]/)]),\n /**\n * Prior to 1.11.0, when processing a Workflow activation, the SDK would execute `notifyHasPatch`\n * and `signalWorkflow` jobs in distinct phases, before other types of jobs. The primary reason\n * behind that multi-phase algorithm was to avoid the possibility that a Workflow execution might\n * complete before all incoming signals have been dispatched (at least to the point that the\n * _synchronous_ part of the handler function has been executed).\n *\n * This flag replaces that multi-phase algorithm with a simpler one where jobs are simply sorted as\n * `(signals and updates) -> others`, but without processing them as distinct batches (i.e. without\n * leaving/reentering the VM context between each group, which automatically triggers the execution\n * of all outstanding microtasks). That single-phase approach resolves a number of quirks of the\n * former algorithm, and yet still satisfies to the original requirement of ensuring that every\n * `signalWorkflow` jobs - and now `doUpdate` jobs as well - have been given a proper chance to\n * execute before the Workflow main function might completes.\n *\n * @since Introduced in 1.11.0. This change is not rollback-safe. However, due to an SDK bug, SDKs\n * v1.11.0 and v1.11.1 were not properly writing back the flags to history, possibly resulting\n * in NDE on replay. We therefore consider that a WFT emitted by Worker v1.11.0 or v1.11.1\n * to implicitely have this flag on.\n */\n ProcessWorkflowActivationJobsAsSingleBatch: defineFlag(2, true, [buildIdSdkVersionMatches(/1\\.11\\.[01]/)]),\n /**\n * In 1.11.5 the `handleSignal` interceptor was added to @temporalio/interceptors-opentelemetry\n * which added a yield point. The added yield point can cause NDE if there was a signal handler and\n * the workflow was started with a signal.\n *\n * This yield point was removed in 1.13.2, but in order to prevent workflows from the\n * affected versions resulting in NDE, we have to inject the yield point on replay.\n * @since Introduced in 1.13.2.\n */\n OpenTelemetryInterceptorsTracesInboundSignals: defineFlag(3, true, [isAtLeast({ major: 1, minor: 11, patch: 5 })]),\n /**\n * In 1.11.6, the `scheduleLocalActivity` interceptor was added to\n * `@temporalio/interceptors-opentelemetry` which added a yield point to the\n * outbound interceptor. This yield point was removed in 1.13.2.\n *\n * @since Introduced in 1.13.2\n */\n OpenTelemetryInterceptorsTracesLocalActivities: defineFlag(4, true, [isAtLeast({ major: 1, minor: 11, patch: 6 })]),\n /**\n * The interceptors provided by @temporalio/interceptors-opentelemetry initially had unnecessary\n * yield points on calling to `extractContextFromHeaders`.\n * If replaying a workflow created from these versions a yield point is injected to prevent any NDE.\n *\n * If the history does not include the SDK version, default to extra yields since the yields were present since the OTEL\n * package was created.\n *\n * @since Introduced in 1.13.2\n */\n OpenTelemetryInterceporsAvoidsExtraYields: defineFlag(5, true, [isAtLeast({ major: 1, minor: 13, patch: 2 })]),\n /**\n * In 1.13.3, all remaining interceptor methods were implemented in @temporalio/interceptors-opentelemetry\n * including `handleUpdate`, `validateUpdate`, `handleQuery`, `startTimer`, and `startNexusOperation`.\n * These add instrumentation and yield points that were not present in earlier versions.\n * This flag gates these new interceptor methods to prevent NDE on replay of workflows from earlier versions.\n *\n * @since Introduced in 1.13.3\n */\n OpenTelemetryInterceptorsInstrumentsAllMethods: defineFlag(6, true),\n};\nfunction defineFlag(id, def, alternativeConditions) {\n const flag = { id, default: def, alternativeConditions };\n flagsRegistry.set(id, flag);\n return flag;\n}\nfunction assertValidFlag(id) {\n if (!flagsRegistry.has(id))\n throw new TypeError(`Unknown SDK flag: ${id}`);\n}\nfunction buildIdSdkVersionMatches(version) {\n const regex = new RegExp(`^@temporalio/worker@(${version.source})[+]`);\n return ({ info }) => info.currentBuildId != null && regex.test(info.currentBuildId);\n}\n/**\n * Creates an `AltConditionFn` that checks if the SDK version is equal to or after the provided version.\n * An optional default can be provided in case the SDK version is not available.\n */\nfunction isAtLeast(compare, missingDefault) {\n return (ctx) => {\n return isCompared(compare, -1, missingDefault)(ctx) || isCompared(compare, 0, missingDefault)(ctx);\n };\n}\nfunction isCompared(compare, comparison, missingDefault = false) {\n return ({ sdkVersion }) => {\n if (!sdkVersion)\n return missingDefault;\n const version = parseSemver(sdkVersion);\n if (!version)\n return missingDefault;\n return compareSemver(compare, version) === comparison;\n };\n}\nfunction parseSemver(version) {\n try {\n const [_, major, minor, patch] = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n return {\n major: Number.parseInt(major),\n minor: Number.parseInt(minor),\n patch: Number.parseInt(patch),\n };\n }\n catch {\n return undefined;\n }\n}\nfunction compareSemver(a, b) {\n if (a.major < b.major)\n return -1;\n if (a.major > b.major)\n return +1;\n if (a.minor < b.minor)\n return -1;\n if (a.minor > b.minor)\n return +1;\n if (a.patch < b.patch)\n return -1;\n if (a.patch > b.patch)\n return +1;\n return 0;\n}\n//# sourceMappingURL=flags.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RootCancellationScope = exports.CancellationScope = exports.AsyncLocalStorage = void 0;\nexports.registerSleepImplementation = registerSleepImplementation;\nconst common_1 = require(\"@temporalio/common\");\nconst time_1 = require(\"@temporalio/common/lib/time\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst flags_1 = require(\"./flags\");\n// AsyncLocalStorage is injected via vm module into global scope.\n// In case Workflow code is imported in Node.js context, replace with an empty class.\nexports.AsyncLocalStorage = globalThis.AsyncLocalStorage ?? class {\n};\n/** Magic symbol used to create the root scope - intentionally not exported */\nconst NO_PARENT = Symbol('NO_PARENT');\n/**\n * Cancellation Scopes provide the mechanic by which a Workflow may gracefully handle incoming requests for cancellation\n * (e.g. in response to {@link WorkflowHandle.cancel} or through the UI or CLI), as well as request cancellation of\n * cancellable operations it owns (e.g. Activities, Timers, Child Workflows, etc).\n *\n * Cancellation Scopes form a tree, with the Workflow's main function running in the root scope of that tree.\n * By default, cancellation propagates down from a parent scope to its children and its cancellable operations.\n * A non-cancellable scope can receive cancellation requests, but is never effectively considered as cancelled,\n * thus shieldding its children and cancellable operations from propagation of cancellation requests it receives.\n *\n * Scopes are created using the `CancellationScope` constructor or the static helper methods {@link cancellable},\n * {@link nonCancellable} and {@link withTimeout}. `withTimeout` creates a scope that automatically cancels itself after\n * some duration.\n *\n * Cancellation of a cancellable scope results in all operations created directly in that scope to throw a\n * {@link CancelledFailure} (either directly, or as the `cause` of an {@link ActivityFailure} or a\n * {@link ChildWorkflowFailure}). Further attempt to create new cancellable scopes or cancellable operations within a\n * scope that has already been cancelled will also immediately throw a {@link CancelledFailure} exception. It is however\n * possible to create a non-cancellable scope at that point; this is often used to execute rollback or cleanup\n * operations. For example:\n *\n * ```ts\n * async function myWorkflow(...): Promise<void> {\n * try {\n * // This activity runs in the root cancellation scope. Therefore, a cancellation request on\n * // the Workflow execution (e.g. through the UI or CLI) automatically propagates to this\n * // activity. Assuming that the activity properly handle the cancellation request, then the\n * // call below will throw an `ActivityFailure` exception, with `cause` sets to an\n * // instance of `CancelledFailure`.\n * await someActivity();\n * } catch (e) {\n * if (isCancellation(e)) {\n * // Run cleanup activity in a non-cancellable scope\n * await CancellationScope.nonCancellable(async () => {\n * await cleanupActivity();\n * }\n * } else {\n * throw e;\n * }\n * }\n * }\n * ```\n *\n * A cancellable scope may be programatically cancelled by calling {@link cancel|`scope.cancel()`}`. This may be used,\n * for example, to explicitly request cancellation of an Activity or Child Workflow:\n *\n * ```ts\n * const cancellableActivityScope = new CancellationScope();\n * const activityPromise = cancellableActivityScope.run(() => someActivity());\n * cancellableActivityScope.cancel(); // Cancels the activity\n * await activityPromise; // Throws `ActivityFailure` with `cause` set to `CancelledFailure`\n * ```\n */\nclass CancellationScope {\n /**\n * Time in milliseconds before the scope cancellation is automatically requested\n */\n timeout;\n /**\n * If false, then this scope will never be considered cancelled, even if a cancellation request is received (either\n * directly by calling `scope.cancel()` or indirectly by cancelling a cancellable parent scope). This effectively\n * shields the scope's children and cancellable operations from propagation of cancellation requests made on the\n * non-cancellable scope.\n *\n * Note that the Promise returned by the `run` function of non-cancellable scope may still throw a `CancelledFailure`\n * if such an exception is thrown from within that scope (e.g. by directly cancelling a cancellable child scope).\n */\n cancellable;\n /**\n * An optional CancellationScope (useful for running background tasks), defaults to {@link CancellationScope.current}()\n */\n parent;\n /**\n * A Promise that throws when a cancellable scope receives a cancellation request, either directly\n * (i.e. `scope.cancel()`), or indirectly (by cancelling a cancellable parent scope).\n *\n * Note that a non-cancellable scope may receive cancellation requests, resulting in the `cancelRequested` promise for\n * that scope to throw, though the scope will not effectively get cancelled (i.e. `consideredCancelled` will still\n * return `false`, and cancellation will not be propagated to child scopes and contained operations).\n */\n cancelRequested;\n #cancelRequested = false;\n // Typescript does not understand that the Promise executor runs synchronously in the constructor\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n reject;\n constructor(options) {\n this.timeout = (0, time_1.msOptionalToNumber)(options?.timeout);\n this.cancellable = options?.cancellable ?? true;\n this.cancelRequested = new Promise((_, reject) => {\n // @ts-expect-error TSC doesn't understand that the Promise executor runs synchronously\n this.reject = (err) => {\n this.#cancelRequested = true;\n reject(err);\n };\n });\n (0, stack_helpers_1.untrackPromise)(this.cancelRequested);\n // Avoid unhandled rejections\n (0, stack_helpers_1.untrackPromise)(this.cancelRequested.catch(() => undefined));\n if (options?.parent !== NO_PARENT) {\n this.parent = options?.parent || CancellationScope.current();\n if (this.parent.cancellable ||\n (this.parent.#cancelRequested &&\n !(0, global_attributes_1.getActivator)().hasFlag(flags_1.SdkFlags.NonCancellableScopesAreShieldedFromPropagation))) {\n this.#cancelRequested = this.parent.#cancelRequested;\n (0, stack_helpers_1.untrackPromise)(this.parent.cancelRequested.catch((err) => {\n this.reject(err);\n }));\n }\n else {\n (0, stack_helpers_1.untrackPromise)(this.parent.cancelRequested.catch((err) => {\n if (!(0, global_attributes_1.getActivator)().hasFlag(flags_1.SdkFlags.NonCancellableScopesAreShieldedFromPropagation)) {\n this.reject(err);\n }\n }));\n }\n }\n }\n /**\n * Whether the scope was effectively cancelled. A non-cancellable scope can never be considered cancelled.\n */\n get consideredCancelled() {\n return this.#cancelRequested && this.cancellable;\n }\n /**\n * Activate the scope as current and run `fn`\n *\n * Any timers, Activities, Triggers and CancellationScopes created in the body of `fn`\n * automatically link their cancellation to this scope.\n *\n * @return the result of `fn`\n */\n run(fn) {\n return storage.run(this, this.runInContext.bind(this, fn));\n }\n /**\n * Method that runs a function in AsyncLocalStorage context.\n *\n * Could have been written as anonymous function, made into a method for improved stack traces.\n */\n async runInContext(fn) {\n let timerScope;\n if (this.timeout) {\n timerScope = new CancellationScope();\n (0, stack_helpers_1.untrackPromise)(timerScope\n .run(() => sleep(this.timeout))\n .then(() => this.cancel(), () => {\n // scope was already cancelled, ignore\n }));\n }\n try {\n return await fn();\n }\n finally {\n if (timerScope &&\n !timerScope.consideredCancelled &&\n (0, global_attributes_1.getActivator)().hasFlag(flags_1.SdkFlags.NonCancellableScopesAreShieldedFromPropagation)) {\n timerScope.cancel();\n }\n }\n }\n /**\n * Request to cancel the scope and linked children\n */\n cancel() {\n this.reject(new common_1.CancelledFailure('Cancellation scope cancelled'));\n }\n /**\n * Get the current \"active\" scope\n */\n static current() {\n // Using globals directly instead of a helper function to avoid circular import\n return storage.getStore() ?? globalThis.__TEMPORAL_ACTIVATOR__.rootScope;\n }\n /** Alias to `new CancellationScope({ cancellable: true }).run(fn)` */\n static cancellable(fn) {\n return new this({ cancellable: true }).run(fn);\n }\n /** Alias to `new CancellationScope({ cancellable: false }).run(fn)` */\n static nonCancellable(fn) {\n return new this({ cancellable: false }).run(fn);\n }\n /** Alias to `new CancellationScope({ cancellable: true, timeout }).run(fn)` */\n static withTimeout(timeout, fn) {\n return new this({ cancellable: true, timeout }).run(fn);\n }\n}\nexports.CancellationScope = CancellationScope;\nconst storage = new exports.AsyncLocalStorage();\nclass RootCancellationScope extends CancellationScope {\n constructor() {\n super({ cancellable: true, parent: NO_PARENT });\n }\n cancel() {\n this.reject(new common_1.CancelledFailure('Workflow cancelled'));\n }\n}\nexports.RootCancellationScope = RootCancellationScope;\n/** This function is here to avoid a circular dependency between this module and workflow.ts */\nlet sleep = (_) => {\n throw new common_1.IllegalStateError('Workflow has not been properly initialized');\n};\nfunction registerSleepImplementation(fn) {\n sleep = fn;\n}\n//# sourceMappingURL=cancellation-scope.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LocalActivityDoBackoff = exports.DeterminismViolationError = exports.WorkflowError = void 0;\nexports.isCancellation = isCancellation;\nconst common_1 = require(\"@temporalio/common\");\nconst type_helpers_1 = require(\"@temporalio/common/lib/type-helpers\");\n/**\n * Base class for all workflow errors\n */\nlet WorkflowError = class WorkflowError extends Error {\n};\nexports.WorkflowError = WorkflowError;\nexports.WorkflowError = WorkflowError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowError')\n], WorkflowError);\n/**\n * Thrown in workflow when it tries to do something that non-deterministic such as construct a WeakRef()\n */\nlet DeterminismViolationError = class DeterminismViolationError extends WorkflowError {\n};\nexports.DeterminismViolationError = DeterminismViolationError;\nexports.DeterminismViolationError = DeterminismViolationError = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('DeterminismViolationError')\n], DeterminismViolationError);\n/**\n * A class that acts as a marker for this special result type\n */\nlet LocalActivityDoBackoff = class LocalActivityDoBackoff extends Error {\n backoff;\n constructor(backoff) {\n super();\n this.backoff = backoff;\n }\n};\nexports.LocalActivityDoBackoff = LocalActivityDoBackoff;\nexports.LocalActivityDoBackoff = LocalActivityDoBackoff = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('LocalActivityDoBackoff')\n], LocalActivityDoBackoff);\n/**\n * Returns whether provided `err` is caused by cancellation\n */\nfunction isCancellation(err) {\n return (err instanceof common_1.CancelledFailure ||\n ((err instanceof common_1.ActivityFailure || err instanceof common_1.ChildWorkflowFailure || err instanceof common_1.NexusOperationFailure) &&\n err.cause instanceof common_1.CancelledFailure));\n}\n//# sourceMappingURL=errors.js.map","\"use strict\";\n/**\n * Type definitions for Workflow interceptors.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interceptors.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeParentClosePolicy = exports.encodeParentClosePolicy = exports.ParentClosePolicy = exports.decodeChildWorkflowCancellationType = exports.encodeChildWorkflowCancellationType = exports.ChildWorkflowCancellationType = exports.ContinueAsNew = void 0;\nconst type_helpers_1 = require(\"@temporalio/common/lib/type-helpers\");\nconst enums_helpers_1 = require(\"@temporalio/common/lib/internal-workflow/enums-helpers\");\n/**\n * Not an actual error, used by the Workflow runtime to abort execution when {@link continueAsNew} is called\n */\nlet ContinueAsNew = class ContinueAsNew extends Error {\n command;\n constructor(command) {\n super('Workflow continued as new');\n this.command = command;\n }\n};\nexports.ContinueAsNew = ContinueAsNew;\nexports.ContinueAsNew = ContinueAsNew = __decorate([\n (0, type_helpers_1.SymbolBasedInstanceOfError)('ContinueAsNew')\n], ContinueAsNew);\n/**\n * Determines:\n * - whether cancellation requests should be propagated from the Parent Workflow to the Child, and\n * - whether and when should the Child's cancellation be reported back to the Parent Workflow\n * (i.e. at which moment should the {@link executeChild}'s or {@link ChildWorkflowHandle.result}'s\n * promise fail with a `ChildWorkflowFailure`, with `cause` set to a `CancelledFailure`).\n *\n * Note that this setting only applies to cancellation originating from an external request for the\n * Parent Workflow itself, or from internal cancellation of the `CancellationScope` in which the\n * Child Workflow call was made. Eventual Cancellation of a Child Workflow on completion of the\n * Parent Workflow is controlled by the {@link ParentClosePolicy} setting.\n *\n * @default ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED\n */\n// MAINTENANCE: Keep this typedoc in sync with the `ChildWorkflowOptions.cancellationType` field\nexports.ChildWorkflowCancellationType = {\n /**\n * Do not propagate cancellation requests to the Child, and immediately report cancellation\n * to the caller.\n */\n ABANDON: 'ABANDON',\n /**\n * Propagate cancellation request from the Parent Workflow to the Child, yet _immediately_ report\n * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation\n * request.\n *\n * Note that this cancellation type provides no guarantee, from the Parent-side, that the\n * cancellation request will actually be atomically added to the Child workflow's history.\n * In particular, the Child may complete (either successfully or uncessfully) before the\n * cancellation is delivered, resulting in a situation where the Parent workflow thinks its child\n * was cancelled, but the child actually completed successfully.\n *\n * To guarantee that the Child will eventually be notified of the cancellation request,\n * use {@link WAIT_CANCELLATION_REQUESTED}.\n */\n TRY_CANCEL: 'TRY_CANCEL',\n /**\n * Propagate cancellation request from the Parent Workflow to the Child, then wait for the server\n * to confirm that the Child Workflow cancellation request was recorded in its history.\n *\n * This cancellation type guarantees that the Child will eventually be notified of the\n * cancellation request (that is, unless the Child terminates inbetween due to unexpected causes).\n */\n WAIT_CANCELLATION_REQUESTED: 'WAIT_CANCELLATION_REQUESTED',\n /**\n * Propagate cancellation request from the Parent Workflow to the Child, then wait for completion\n * of the Child Workflow.\n *\n * The Child may respect cancellation, in which case the Parent's `executeChild` or\n * `ChildWorkflowHandle.result` promise will fail with a `ChildWorkflowFailure`, with `cause`\n * set to a `CancelledFailure`. On the other hand, the Child may ignore the cancellation request,\n * in which case the corresponding promise will either resolve with a result (if Child completed\n * successfully) or reject with a different cause (if Child completed uncessfully).\n *\n * @default\n */\n WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED',\n};\n// ts-prune-ignore-next\n_a = (0, enums_helpers_1.makeProtoEnumConverters)({\n [exports.ChildWorkflowCancellationType.ABANDON]: 0,\n [exports.ChildWorkflowCancellationType.TRY_CANCEL]: 1,\n [exports.ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED]: 2,\n [exports.ChildWorkflowCancellationType.WAIT_CANCELLATION_REQUESTED]: 3,\n}, ''), exports.encodeChildWorkflowCancellationType = _a[0], exports.decodeChildWorkflowCancellationType = _a[1];\n/**\n * How a Child Workflow reacts to the Parent Workflow reaching a Closed state.\n *\n * @see {@link https://docs.temporal.io/concepts/what-is-a-parent-close-policy/ | Parent Close Policy}\n */\nexports.ParentClosePolicy = {\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @default\n */\n TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n */\n ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n */\n REQUEST_CANCEL: 'REQUEST_CANCEL',\n /// Anything below this line has been deprecated\n /**\n * If a `ParentClosePolicy` is set to this, or is not set at all, the server default value will be used.\n *\n * @deprecated Either leave property `undefined`, or set an explicit policy instead.\n */\n PARENT_CLOSE_POLICY_UNSPECIFIED: undefined,\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @deprecated Use {@link ParentClosePolicy.TERMINATE} instead.\n */\n PARENT_CLOSE_POLICY_TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n *\n * @deprecated Use {@link ParentClosePolicy.ABANDON} instead.\n */\n PARENT_CLOSE_POLICY_ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n *\n * @deprecated Use {@link ParentClosePolicy.REQUEST_CANCEL} instead.\n */\n PARENT_CLOSE_POLICY_REQUEST_CANCEL: 'REQUEST_CANCEL',\n};\n// ts-prune-ignore-next\n_b = (0, enums_helpers_1.makeProtoEnumConverters)({\n [exports.ParentClosePolicy.TERMINATE]: 1,\n [exports.ParentClosePolicy.ABANDON]: 2,\n [exports.ParentClosePolicy.REQUEST_CANCEL]: 3,\n UNSPECIFIED: 0,\n}, 'PARENT_CLOSE_POLICY_'), exports.encodeParentClosePolicy = _b[0], exports.decodeParentClosePolicy = _b[1];\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\n/**\n * Type definitions for the Workflow end of the sinks mechanism.\n *\n * Sinks are a mechanism for exporting data from the Workflow isolate to the\n * Node.js environment, they are necessary because the Workflow has no way to\n * communicate with the outside World.\n *\n * Sinks are typically used for exporting logs, metrics and traces out from the\n * Workflow.\n *\n * Sink functions may not return values to the Workflow in order to prevent\n * breaking determinism.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.proxySinks = proxySinks;\nconst global_attributes_1 = require(\"./global-attributes\");\n/**\n * Get a reference to Sinks for exporting data out of the Workflow.\n *\n * These Sinks **must** be registered with the Worker in order for this\n * mechanism to work.\n *\n * @example\n * ```ts\n * import { proxySinks, Sinks } from '@temporalio/workflow';\n *\n * interface MySinks extends Sinks {\n * logger: {\n * info(message: string): void;\n * error(message: string): void;\n * };\n * }\n *\n * const { logger } = proxySinks<MyDependencies>();\n * logger.info('setting up');\n *\n * export function myWorkflow() {\n * return {\n * async execute() {\n * logger.info(\"hey ho\");\n * logger.error(\"lets go\");\n * }\n * };\n * }\n * ```\n */\nfunction proxySinks() {\n return new Proxy({}, {\n get(_, ifaceName) {\n return new Proxy({}, {\n get(_, fnName) {\n return (...args) => {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Proxied sinks functions may only be used from a Workflow Execution.');\n activator.sinkCalls.push({\n ifaceName: ifaceName,\n fnName: fnName,\n // Sink function doesn't get called immediately. Make a clone of the sink's args, so that further mutations\n // to these objects don't corrupt the args that the sink function will receive. Only available from node 17.\n args: globalThis.structuredClone ? globalThis.structuredClone(args) : args,\n // activator.info is internally copy-on-write. This ensure that any further mutations\n // to the workflow state in the context of the present activation will not corrupt the\n // workflowInfo state that gets passed when the sink function actually gets called.\n workflowInfo: activator.info,\n });\n };\n },\n });\n },\n });\n}\n//# sourceMappingURL=sinks.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fillWithRandom = fillWithRandom;\nexports.uuid4FromRandom = uuid4FromRandom;\nexports.createUnsafeRandomSource = createUnsafeRandomSource;\nfunction fillWithRandom(random, bytes) {\n for (let i = 0; i < bytes.length; ++i) {\n bytes[i] = Math.floor(random() * 0x100);\n }\n return bytes;\n}\nfunction uuid4FromRandom(random) {\n const ho = (n, p) => n.toString(16).padStart(p, '0');\n const view = new DataView(new ArrayBuffer(16));\n view.setUint32(0, (random() * 0x100000000) >>> 0);\n view.setUint32(4, (random() * 0x100000000) >>> 0);\n view.setUint32(8, (random() * 0x100000000) >>> 0);\n view.setUint32(12, (random() * 0x100000000) >>> 0);\n view.setUint8(6, (view.getUint8(6) & 0xf) | 0x40);\n view.setUint8(8, (view.getUint8(8) & 0x3f) | 0x80);\n return `${ho(view.getUint32(0), 8)}-${ho(view.getUint16(4), 4)}-${ho(view.getUint16(6), 4)}-${ho(view.getUint16(8), 4)}-${ho(view.getUint32(10), 8)}${ho(view.getUint16(14), 4)}`;\n}\nfunction createUnsafeRandomSource(random) {\n const source = {\n random,\n uuid4: () => uuid4FromRandom(random),\n fillRandom: (bytes) => fillWithRandom(random, bytes),\n };\n // Omit from JSON like `now`: the methods otherwise stringify to a misleading empty {}.\n Object.defineProperty(source, 'toJSON', { value: () => undefined, enumerable: true });\n return source;\n}\n//# sourceMappingURL=random-helpers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.workflowRandom = void 0;\nexports.getRandomStream = getRandomStream;\nconst global_attributes_1 = require(\"./global-attributes\");\nconst random_helpers_1 = require(\"./random-helpers\");\nclass ActivatorRandomStream {\n activator;\n name;\n constructor(activator, name) {\n this.activator = activator;\n this.name = name;\n }\n random() {\n return this.activator.getNamedRandom(this.name)();\n }\n uuid4() {\n return (0, random_helpers_1.uuid4FromRandom)(() => this.random());\n }\n fill(bytes) {\n return (0, random_helpers_1.fillWithRandom)(() => this.random(), bytes);\n }\n with(fn) {\n return this.activator.withCurrentRandom(this, fn);\n }\n}\nclass DefaultWorkflowRandomStream {\n random() {\n return (0, global_attributes_1.assertInWorkflowContext)('Workflow.workflowRandom may only be used from workflow context.').random();\n }\n uuid4() {\n return (0, random_helpers_1.uuid4FromRandom)(() => this.random());\n }\n fill(bytes) {\n return (0, random_helpers_1.fillWithRandom)(() => this.random(), bytes);\n }\n with(fn) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.workflowRandom may only be used from workflow context.');\n return activator.withCurrentRandom(this, fn);\n }\n}\n/**\n * The default deterministic random stream for the current workflow execution.\n *\n * This exposes the same underlying sequence used by workflow-level `Math.random()`\n * when no named override is active. It can be useful for plugin/interceptor code\n * that wants an explicit handle to the main workflow random stream, including from\n * inside a temporary named scope established by another `WorkflowRandomStream`.\n *\n * @experimental This API may be removed or changed in the future.\n */\nexports.workflowRandom = new DefaultWorkflowRandomStream();\n/**\n * Get a named deterministic random stream for the current workflow execution.\n *\n * Named streams are derived from the workflow seed and a stable stream name,\n * without consuming the workflow's default `Math.random()` stream. Repeated\n * calls with the same `name` within a workflow execution refer to the same\n * logical stream state, including across activations.\n *\n * This is the preferred entry point for workflow plugins and interceptors that\n * need their own deterministic entropy. Use stable package- or module-style\n * names so the stream identity remains replay-safe, then keep the returned\n * `WorkflowRandomStream` around and call its methods directly.\n *\n * @experimental This API may be removed or changed in the future.\n */\nfunction getRandomStream(name) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.getRandomStream(...) may only be used from workflow context.');\n return new ActivatorRandomStream(activator, name);\n}\n//# sourceMappingURL=random-streams.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.composeInterceptorsWith = composeInterceptorsWith;\nexports.composeInterceptors = composeInterceptors;\n/**\n * Shared implementation for interceptor chaining.\n *\n * The workflow package needs one small behavioral extension over the generic interceptor\n * semantics: every `next(...)` continuation it hands to workflow interceptors must first\n * restore the workflow random scope that was current when that continuation was created.\n *\n * We keep the chain-construction loop here as the single source of truth so ordering and\n * basic composition behavior cannot drift between the generic implementation used by client,\n * worker, activity, and nexus code and the workflow-specific implementation that decorates\n * `next(...)` at each boundary. The only behavior that varies between callers is the\n * `wrapNext` hook: most packages use the identity wrapper, while workflow code supplies a\n * wrapper that re-enters the captured workflow async-local random scope.\n */\nfunction composeInterceptorsWith(interceptors, method, next, wrapNext) {\n let composedNext = next;\n for (let i = interceptors.length - 1; i >= 0; --i) {\n const interceptor = interceptors[i];\n if (interceptor?.[method] !== undefined) {\n const prev = wrapNext(composedNext);\n // We lose type safety here because Typescript can't deduce that interceptor[method] is a function that returns\n // the same type as Next<I, M>\n composedNext = ((input) => interceptor[method](input, prev));\n }\n }\n return composedNext;\n}\n/**\n * Compose all interceptor methods into a single function.\n *\n * Calling the composed function results in calling each of the provided interceptor, in order (from the first to\n * the last), followed by the original function provided as argument to `composeInterceptors()`.\n *\n * @param interceptors a list of interceptors\n * @param method the name of the interceptor method to compose\n * @param next the original function to be executed at the end of the interception chain\n */\n// ts-prune-ignore-next (imported via lib/interceptors)\nfunction composeInterceptors(interceptors, method, next) {\n return composeInterceptorsWith(interceptors, method, next, ((wrappedNext) => wrappedNext));\n}\n//# sourceMappingURL=interceptors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.composeInterceptors = composeInterceptors;\nconst interceptors_1 = require(\"@temporalio/common/lib/interceptors\");\nconst global_attributes_1 = require(\"./global-attributes\");\n/**\n * Compose workflow interceptors while making every `next(...)` continuation re-enter\n * the workflow-random scope that was current when that continuation was created.\n *\n * This is intentionally a thin wrapper over the shared interceptor composition helper\n * in `packages/common`. The shared helper owns the actual chain-construction algorithm,\n * ordering, and `next(...)` wiring so workflow code cannot silently drift away from the\n * semantics used by the rest of the SDK.\n *\n * The workflow-specific behavior lives entirely in the `wrapNext` hook we pass into that\n * shared helper. Each `next(...)` continuation handed to a workflow interceptor is wrapped\n * with `Activator.bindCurrentRandom(...)`, which captures the currently active workflow\n * random scope, including the absence of any scoped override. When the interceptor later\n * calls `next(...)`, the wrapper restores that captured scope before entering the rest of\n * the interceptor chain or the base workflow/runtime handler.\n *\n * That is the behavior we need for `WorkflowRandomStream.with(...)`: a temporary\n * plugin/interceptor scope should apply to the plugin's own code, but it must not\n * leak through `next(...)` into downstream workflow code unless that downstream code\n * explicitly establishes its own scope.\n */\nfunction composeInterceptors(interceptors, method, next) {\n const activator = (0, global_attributes_1.getActivator)();\n return (0, interceptors_1.composeInterceptorsWith)(interceptors, method, next, ((wrappedNext) => activator.bindCurrentRandom(wrappedNext)));\n}\n//# sourceMappingURL=interceptor-composition.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.userMetadataToPayload = userMetadataToPayload;\nconst payload_converter_1 = require(\"./converter/payload-converter\");\nfunction userMetadataToPayload(payloadConverter, staticSummary, staticDetails, context) {\n if (staticSummary == null && staticDetails == null)\n return undefined;\n const summary = (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticSummary, context);\n const details = (0, payload_converter_1.convertOptionalToPayload)(payloadConverter, staticDetails, context);\n if (summary == null && details == null)\n return undefined;\n return { summary, details };\n}\n//# sourceMappingURL=user-metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.typedSearchAttributePayloadConverter = exports.TypedSearchAttributePayloadConverter = exports.searchAttributePayloadConverter = exports.SearchAttributePayloadConverter = void 0;\nexports.encodeUnifiedSearchAttributes = encodeUnifiedSearchAttributes;\nexports.decodeSearchAttributes = decodeSearchAttributes;\nexports.decodeTypedSearchAttributes = decodeTypedSearchAttributes;\nconst encoding_1 = require(\"../encoding\");\nconst errors_1 = require(\"../errors\");\nconst search_attributes_1 = require(\"../search-attributes\");\nconst payload_converter_1 = require(\"./payload-converter\");\n/**\n * Converts Search Attribute values using JsonPayloadConverter\n */\nclass SearchAttributePayloadConverter {\n jsonConverter = new payload_converter_1.JsonPayloadConverter();\n validNonDateTypes = ['string', 'number', 'boolean'];\n toPayload(values) {\n if (!Array.isArray(values)) {\n throw new errors_1.ValueError(`SearchAttribute value must be an array`);\n }\n if (values.length > 0) {\n const firstValue = values[0];\n const firstType = typeof firstValue;\n if (firstType === 'object') {\n for (const [idx, value] of values.entries()) {\n if (!(value instanceof Date)) {\n throw new errors_1.ValueError(`SearchAttribute values must arrays of strings, numbers, booleans, or Dates. The value ${value} at index ${idx} is of type ${typeof value}`);\n }\n }\n }\n else {\n if (!this.validNonDateTypes.includes(firstType)) {\n throw new errors_1.ValueError(`SearchAttribute array values must be: string | number | boolean | Date`);\n }\n for (const [idx, value] of values.entries()) {\n if (typeof value !== firstType) {\n throw new errors_1.ValueError(`All SearchAttribute array values must be of the same type. The first value ${firstValue} of type ${firstType} doesn't match value ${value} of type ${typeof value} at index ${idx}`);\n }\n }\n }\n }\n // JSON.stringify takes care of converting Dates to ISO strings\n const ret = this.jsonConverter.toPayload(values);\n if (ret === undefined) {\n throw new errors_1.ValueError('Could not convert search attributes to payloads');\n }\n return ret;\n }\n /**\n * Datetime Search Attribute values are converted to `Date`s\n */\n fromPayload(payload) {\n if (payload.metadata == null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n const value = this.jsonConverter.fromPayload(payload);\n let arrayWrappedValue = Array.isArray(value) ? value : [value];\n const searchAttributeType = payload.metadata.type ? (0, encoding_1.decode)(payload.metadata.type) : undefined;\n if (searchAttributeType === 'Datetime') {\n arrayWrappedValue = arrayWrappedValue.map((dateString) => new Date(dateString));\n }\n return arrayWrappedValue;\n }\n}\nexports.SearchAttributePayloadConverter = SearchAttributePayloadConverter;\nexports.searchAttributePayloadConverter = new SearchAttributePayloadConverter();\nclass TypedSearchAttributePayloadConverter {\n jsonConverter = new payload_converter_1.JsonPayloadConverter();\n toPayload(attr) {\n if (!(attr instanceof search_attributes_1.TypedSearchAttributeValue || attr instanceof search_attributes_1.TypedSearchAttributeUpdateValue)) {\n throw new errors_1.ValueError(`Expect input to be instance of TypedSearchAttributeValue or TypedSearchAttributeUpdateValue, got: ${JSON.stringify(attr)}`);\n }\n // We check for deletion as well as regular typed search attributes.\n if (attr.value !== null && !(0, search_attributes_1.isValidValueForType)(attr.type, attr.value)) {\n throw new errors_1.ValueError(`Invalid search attribute value ${attr.value} for given type ${attr.type}`);\n }\n // For server search attributes to work properly, we cannot set the metadata\n // type when we set null\n if (attr.value === null) {\n const payload = this.jsonConverter.toPayload(attr.value);\n if (payload === undefined) {\n throw new errors_1.ValueError('Could not convert typed search attribute to payload');\n }\n return payload;\n }\n // JSON.stringify takes care of converting Dates to ISO strings\n const payload = this.jsonConverter.toPayload(attr.value);\n if (payload === undefined) {\n throw new errors_1.ValueError('Could not convert typed search attribute to payload');\n }\n // Note: this shouldn't be the case but the compiler complains without this check.\n if (payload.metadata == null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n // Add encoded type of search attribute to metatdata\n payload.metadata['type'] = (0, encoding_1.encode)(search_attributes_1.TypedSearchAttributes.toMetadataType(attr.type));\n return payload;\n }\n // Note: type casting undefined values is not clear to caller.\n // We can't change the typing of the method to return undefined, it's not allowed by the interface.\n fromPayload(payload) {\n if (payload.metadata == null) {\n throw new errors_1.ValueError('Missing payload metadata');\n }\n // If no 'type' metadata field or no given value, we skip.\n if (payload.metadata.type == null) {\n return undefined;\n }\n const type = search_attributes_1.TypedSearchAttributes.toSearchAttributeType((0, encoding_1.decode)(payload.metadata.type));\n // Unrecognized metadata type (sanity check).\n if (type === undefined) {\n return undefined;\n }\n let value = this.jsonConverter.fromPayload(payload);\n // Handle legacy values without KEYWORD_LIST type.\n if (type !== search_attributes_1.SearchAttributeType.KEYWORD_LIST && Array.isArray(value)) {\n // Cannot have an array with multiple values for non-KEYWORD_LIST type.\n if (value.length > 1) {\n return undefined;\n }\n // Unpack single value array.\n value = value[0];\n }\n if (type === search_attributes_1.SearchAttributeType.DATETIME && value) {\n value = new Date(value);\n }\n // Check if the value is a valid for the given type. If not, skip.\n if (!(0, search_attributes_1.isValidValueForType)(type, value)) {\n return undefined;\n }\n return new search_attributes_1.TypedSearchAttributeValue(type, value);\n }\n}\nexports.TypedSearchAttributePayloadConverter = TypedSearchAttributePayloadConverter;\nexports.typedSearchAttributePayloadConverter = new TypedSearchAttributePayloadConverter();\n// If both params are provided, conflicting keys will be overwritten by typedSearchAttributes.\nfunction encodeUnifiedSearchAttributes(searchAttributes, typedSearchAttributes) {\n return {\n ...(searchAttributes ? (0, payload_converter_1.mapToPayloads)(exports.searchAttributePayloadConverter, searchAttributes) : {}),\n ...(typedSearchAttributes\n ? (0, payload_converter_1.mapToPayloads)(exports.typedSearchAttributePayloadConverter, Object.fromEntries((Array.isArray(typedSearchAttributes) ? typedSearchAttributes : typedSearchAttributes.getAll()).map((pair) => {\n return [pair.key.name, new search_attributes_1.TypedSearchAttributeUpdateValue(pair.key.type, pair.value)];\n })))\n : {}),\n };\n}\nfunction decodeSearchAttributes(indexedFields) {\n if (!indexedFields)\n return {};\n return Object.fromEntries(Object.entries((0, payload_converter_1.mapFromPayloads)(exports.searchAttributePayloadConverter, indexedFields)).filter(([_, v]) => v && v.length > 0) // Filter out empty arrays returned by pre 1.18 servers\n );\n}\nfunction decodeTypedSearchAttributes(indexedFields) {\n return new search_attributes_1.TypedSearchAttributes(Object.entries((0, payload_converter_1.mapFromPayloads)(exports.typedSearchAttributePayloadConverter, indexedFields) ?? {}).reduce((acc, [k, attr]) => {\n // Filter out undefined values from converter.\n if (!attr) {\n return acc;\n }\n const key = { name: k, type: attr.type };\n // Ensure is valid pair.\n if ((0, search_attributes_1.isValidValueForType)(key.type, attr.value)) {\n acc.push({ key, value: attr.value });\n }\n return acc;\n }, []));\n}\n//# sourceMappingURL=payload-search-attributes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VersioningIntent = void 0;\nexports.versioningIntentToProto = versioningIntentToProto;\nconst type_helpers_1 = require(\"./type-helpers\");\n// Avoid importing the proto implementation to reduce workflow bundle size\n// Copied from coresdk.common.VersioningIntent\n/**\n * Protobuf enum representation of {@link VersioningIntentString}.\n *\n * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments\n */\nvar VersioningIntent;\n(function (VersioningIntent) {\n VersioningIntent[VersioningIntent[\"UNSPECIFIED\"] = 0] = \"UNSPECIFIED\";\n VersioningIntent[VersioningIntent[\"COMPATIBLE\"] = 1] = \"COMPATIBLE\";\n VersioningIntent[VersioningIntent[\"DEFAULT\"] = 2] = \"DEFAULT\";\n})(VersioningIntent || (exports.VersioningIntent = VersioningIntent = {}));\n(0, type_helpers_1.checkExtends)();\n(0, type_helpers_1.checkExtends)();\n/**\n * @deprecated Worker Versioning is now deprecated. Please use the Worker Deployment API instead: https://docs.temporal.io/worker-deployments\n */\nfunction versioningIntentToProto(intent) {\n switch (intent) {\n case 'DEFAULT':\n return VersioningIntent.DEFAULT;\n case 'COMPATIBLE':\n return VersioningIntent.COMPATIBLE;\n case undefined:\n return VersioningIntent.UNSPECIFIED;\n default:\n (0, type_helpers_1.assertNever)('Unexpected VersioningIntent', intent);\n }\n}\n//# sourceMappingURL=versioning-intent-enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ENHANCED_STACK_TRACE_QUERY_NAME = exports.STACK_TRACE_QUERY_NAME = exports.TEMPORAL_RESERVED_PREFIX = void 0;\nexports.throwIfReservedName = throwIfReservedName;\nexports.TEMPORAL_RESERVED_PREFIX = '__temporal_';\nexports.STACK_TRACE_QUERY_NAME = '__stack_trace';\nexports.ENHANCED_STACK_TRACE_QUERY_NAME = '__enhanced_stack_trace';\n/**\n * Wire identifiers used by first-party SDK contrib packages. Each entry pairs\n * a name with the entity type it's allowed to register as; that pair bypasses\n * the {@link TEMPORAL_RESERVED_PREFIX} check at registration time. Registering\n * the same name as a different entity type is still rejected.\n */\nconst INTERNAL_RESERVED_NAME_ALLOWLIST = new Map([\n // @temporalio/workflow-streams\n ['__temporal_workflow_stream_publish', 'signal'],\n ['__temporal_workflow_stream_poll', 'update'],\n ['__temporal_workflow_stream_offset', 'query'],\n // @temporalio/openai-agents\n ['__temporal_openai_agents_tracing', 'sink'],\n // @temporalio/langsmith\n ['__temporal_langsmith', 'sink'],\n]);\n/**\n * Validates if the provided name contains any reserved prefixes or matches any reserved names.\n * Throws a TypeError if validation fails, with a specific message indicating whether the issue\n * is with a reserved prefix or an exact match to a reserved name.\n *\n * @param type The entity type being checked\n * @param name The name to check against reserved prefixes/names\n */\nfunction throwIfReservedName(type, name) {\n if (name.startsWith(exports.TEMPORAL_RESERVED_PREFIX) && INTERNAL_RESERVED_NAME_ALLOWLIST.get(name) !== type) {\n throw new TypeError(`Cannot use ${type} name: '${name}', with reserved prefix: '${exports.TEMPORAL_RESERVED_PREFIX}'`);\n }\n if (name === exports.STACK_TRACE_QUERY_NAME || name === exports.ENHANCED_STACK_TRACE_QUERY_NAME) {\n throw new TypeError(`Cannot use ${type} name: '${name}', which is a reserved name`);\n }\n}\n//# sourceMappingURL=reserved.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UpdateScope = exports.AsyncLocalStorage = void 0;\n// AsyncLocalStorage is injected via vm module into global scope.\n// In case Workflow code is imported in Node.js context, replace with an empty class.\nexports.AsyncLocalStorage = globalThis.AsyncLocalStorage ?? class {\n};\nclass UpdateScope {\n /**\n * A workflow-unique identifier for this update.\n */\n id;\n /**\n * The update type name.\n */\n name;\n constructor(options) {\n this.id = options.id;\n this.name = options.name;\n }\n /**\n * Activate the scope as current and run the update handler `fn`.\n *\n * @return the result of `fn`\n */\n run(fn) {\n return storage.run(this, fn);\n }\n /**\n * Get the current \"active\" update scope.\n */\n static current() {\n return storage.getStore();\n }\n /** Alias to `new UpdateScope({ id, name }).run(fn)` */\n static updateWithInfo(id, name, fn) {\n return new this({ id, name }).run(fn);\n }\n}\nexports.UpdateScope = UpdateScope;\nconst storage = new exports.AsyncLocalStorage();\n//# sourceMappingURL=update-scope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.workflowMetadataQuery = exports.enhancedStackTraceQuery = exports.stackTraceQuery = exports.NotAnActivityMethod = void 0;\nexports.addDefaultWorkflowOptions = addDefaultWorkflowOptions;\nexports.sleep = sleep;\nexports.scheduleActivity = scheduleActivity;\nexports.scheduleLocalActivity = scheduleLocalActivity;\nexports.proxyActivities = proxyActivities;\nexports.proxyLocalActivities = proxyLocalActivities;\nexports.getExternalWorkflowHandle = getExternalWorkflowHandle;\nexports.startChild = startChild;\nexports.executeChild = executeChild;\nexports.workflowInfo = workflowInfo;\nexports.currentUpdateInfo = currentUpdateInfo;\nexports.inWorkflowContext = inWorkflowContext;\nexports.makeContinueAsNewFunc = makeContinueAsNewFunc;\nexports.continueAsNew = continueAsNew;\nexports.uuid4 = uuid4;\nexports.patched = patched;\nexports.deprecatePatch = deprecatePatch;\nexports.condition = condition;\nexports.defineUpdate = defineUpdate;\nexports.defineSignal = defineSignal;\nexports.defineQuery = defineQuery;\nexports.setHandler = setHandler;\nexports.setDefaultSignalHandler = setDefaultSignalHandler;\nexports.setDefaultUpdateHandler = setDefaultUpdateHandler;\nexports.setDefaultQueryHandler = setDefaultQueryHandler;\nexports.upsertSearchAttributes = upsertSearchAttributes;\nexports.upsertMemo = upsertMemo;\nexports.allHandlersFinished = allHandlersFinished;\nexports.setWorkflowOptions = setWorkflowOptions;\nexports.getCurrentDetails = getCurrentDetails;\nexports.setCurrentDetails = setCurrentDetails;\nconst common_1 = require(\"@temporalio/common\");\nconst user_metadata_1 = require(\"@temporalio/common/lib/user-metadata\");\nconst payload_search_attributes_1 = require(\"@temporalio/common/lib/converter/payload-search-attributes\");\nconst versioning_intent_enum_1 = require(\"@temporalio/common/lib/versioning-intent-enum\");\nconst time_1 = require(\"@temporalio/common/lib/time\");\nconst internal_workflow_1 = require(\"@temporalio/common/lib/internal-workflow\");\nconst reserved_1 = require(\"@temporalio/common/lib/reserved\");\nconst cancellation_scope_1 = require(\"./cancellation-scope\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst update_scope_1 = require(\"./update-scope\");\nconst interfaces_1 = require(\"./interfaces\");\nconst errors_1 = require(\"./errors\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst random_helpers_1 = require(\"./random-helpers\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\n// Avoid a circular dependency\n(0, cancellation_scope_1.registerSleepImplementation)(sleep);\nfunction currentWorkflowSerializationContext(info) {\n return {\n type: 'workflow',\n namespace: info.namespace,\n workflowId: info.workflowId,\n };\n}\nfunction targetWorkflowSerializationContext(info, workflowId) {\n return {\n type: 'workflow',\n namespace: info.namespace,\n workflowId,\n };\n}\nfunction activitySerializationContext(info, activityId, isLocal) {\n return {\n type: 'activity',\n namespace: info.namespace,\n activityId,\n workflowId: info.workflowId,\n isLocal,\n };\n}\n/**\n * Adds default values of `workflowId` and `cancellationType` to given workflow options.\n */\nfunction addDefaultWorkflowOptions(opts) {\n const { args, workflowId, ...rest } = opts;\n return {\n workflowId: workflowId ?? uuid4(),\n args: (args ?? []),\n cancellationType: interfaces_1.ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED,\n ...rest,\n };\n}\n/**\n * Push a startTimer command into state accumulator and register completion\n */\nfunction timerNextHandler({ seq, durationMs, options }) {\n const activator = (0, global_attributes_1.getActivator)();\n const context = currentWorkflowSerializationContext(activator.info);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch((err) => {\n if (!activator.completions.timer.delete(seq)) {\n return; // Already resolved or never scheduled\n }\n activator.pushCommand({\n cancelTimer: {\n seq,\n },\n });\n reject(err);\n }));\n }\n activator.pushCommand({\n startTimer: {\n seq,\n startToFireTimeout: (0, time_1.msToTs)(durationMs),\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options?.summary, undefined, context),\n });\n activator.completions.timer.set(seq, {\n resolve,\n reject,\n });\n });\n}\n/**\n * Asynchronous sleep.\n *\n * Schedules a timer on the Temporal service.\n *\n * @param ms sleep duration - number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string}.\n * If given a negative number or 0, value will be set to 1.\n * @param options optional timer options for additional configuration\n */\nfunction sleep(ms, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.sleep(...) may only be used from a Workflow Execution');\n const seq = activator.nextSeqs.timer++;\n const durationMs = Math.max(1, (0, time_1.msToNumber)(ms));\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startTimer', timerNextHandler);\n return execute({\n durationMs,\n seq,\n options,\n });\n}\nfunction validateActivityOptions(options) {\n if (options.scheduleToCloseTimeout === undefined && options.startToCloseTimeout === undefined) {\n throw new TypeError('Required either scheduleToCloseTimeout or startToCloseTimeout');\n }\n}\n// Use same validation we use for normal activities\nconst validateLocalActivityOptions = validateActivityOptions;\n/**\n * Push a scheduleActivity command into activator accumulator and register completion\n */\nfunction scheduleActivityNextHandler({ options, args, headers, seq, activityType }) {\n const activator = (0, global_attributes_1.getActivator)();\n validateActivityOptions(options);\n const activityId = options.activityId ?? `${seq}`;\n const context = activitySerializationContext(activator.info, activityId, false);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n if (!activator.completions.activity.has(seq)) {\n return; // Already resolved or never scheduled\n }\n activator.pushCommand({\n requestCancelActivity: {\n seq,\n },\n });\n }));\n }\n activator.pushCommand({\n scheduleActivity: {\n seq,\n activityId,\n activityType,\n arguments: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,\n taskQueue: options.taskQueue || activator.info.taskQueue,\n heartbeatTimeout: (0, time_1.msOptionalToTs)(options.heartbeatTimeout),\n scheduleToCloseTimeout: (0, time_1.msOptionalToTs)(options.scheduleToCloseTimeout),\n startToCloseTimeout: (0, time_1.msOptionalToTs)(options.startToCloseTimeout),\n scheduleToStartTimeout: (0, time_1.msOptionalToTs)(options.scheduleToStartTimeout),\n headers,\n cancellationType: (0, common_1.encodeActivityCancellationType)(options.cancellationType),\n doNotEagerlyExecute: !(options.allowEagerDispatch ?? true),\n versioningIntent: (0, versioning_intent_enum_1.versioningIntentToProto)(options.versioningIntent),\n priority: options.priority ? (0, common_1.compilePriority)(options.priority) : undefined,\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options.summary, undefined, context),\n });\n activator.completions.activity.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n}\n/**\n * Push a scheduleActivity command into state accumulator and register completion\n */\nasync function scheduleLocalActivityNextHandler({ options, args, headers, seq, activityType, attempt, originalScheduleTime, }) {\n const activator = (0, global_attributes_1.getActivator)();\n const activityId = `${seq}`;\n const context = activitySerializationContext(activator.info, activityId, true);\n // Eagerly fail the local activity (which will in turn fail the workflow task.\n // Do not fail on replay where the local activities may not be registered on the replay worker.\n if (!activator.info.unsafe.isReplaying && !activator.registeredActivityNames.has(activityType)) {\n throw new ReferenceError(`Local activity of type '${activityType}' not registered on worker`);\n }\n validateLocalActivityOptions(options);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n if (!activator.completions.activity.has(seq)) {\n return; // Already resolved or never scheduled\n }\n activator.pushCommand({\n requestCancelLocalActivity: {\n seq,\n },\n });\n }));\n }\n activator.pushCommand({\n scheduleLocalActivity: {\n seq,\n attempt,\n originalScheduleTime,\n activityId,\n activityType,\n arguments: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,\n scheduleToCloseTimeout: (0, time_1.msOptionalToTs)(options.scheduleToCloseTimeout),\n startToCloseTimeout: (0, time_1.msOptionalToTs)(options.startToCloseTimeout),\n scheduleToStartTimeout: (0, time_1.msOptionalToTs)(options.scheduleToStartTimeout),\n localRetryThreshold: (0, time_1.msOptionalToTs)(options.localRetryThreshold),\n headers,\n cancellationType: (0, common_1.encodeActivityCancellationType)(options.cancellationType),\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options.summary, undefined, context),\n });\n activator.completions.activity.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n}\n/**\n * Schedule an activity and run outbound interceptors\n * @hidden\n */\nfunction scheduleActivity(activityType, args, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.scheduleActivity(...) may only be used from a Workflow Execution');\n if (options === undefined) {\n throw new TypeError('Got empty activity options');\n }\n const seq = activator.nextSeqs.activity++;\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'scheduleActivity', scheduleActivityNextHandler);\n return execute({\n activityType,\n headers: {},\n options,\n args,\n seq,\n });\n}\n/**\n * Schedule an activity and run outbound interceptors\n * @hidden\n */\nasync function scheduleLocalActivity(activityType, args, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.scheduleLocalActivity(...) may only be used from a Workflow Execution');\n if (options === undefined) {\n throw new TypeError('Got empty activity options');\n }\n let attempt = 1;\n let originalScheduleTime = undefined;\n for (;;) {\n const seq = activator.nextSeqs.activity++;\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'scheduleLocalActivity', scheduleLocalActivityNextHandler);\n try {\n return (await execute({\n activityType,\n headers: {},\n options,\n args,\n seq,\n attempt,\n originalScheduleTime,\n }));\n }\n catch (err) {\n if (err instanceof errors_1.LocalActivityDoBackoff) {\n await sleep((0, time_1.requiredTsToMs)(err.backoff.backoffDuration, 'backoffDuration'));\n if (typeof err.backoff.attempt !== 'number') {\n throw new TypeError('Invalid backoff attempt type');\n }\n attempt = err.backoff.attempt;\n originalScheduleTime = err.backoff.originalScheduleTime ?? undefined;\n }\n else {\n throw err;\n }\n }\n }\n}\nfunction startChildWorkflowExecutionNextHandler({ options, headers, workflowType, seq, }) {\n const activator = (0, global_attributes_1.getActivator)();\n const workflowId = options.workflowId ?? uuid4();\n const context = targetWorkflowSerializationContext(activator.info, workflowId);\n const startPromise = new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n const complete = !activator.completions.childWorkflowComplete.has(seq);\n if (!complete) {\n activator.pushCommand({\n cancelChildWorkflowExecution: { childWorkflowSeq: seq },\n });\n }\n // Nothing to cancel otherwise\n }));\n }\n activator.pushCommand({\n startChildWorkflowExecution: {\n seq,\n workflowId,\n workflowType,\n input: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, options.args),\n retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,\n taskQueue: options.taskQueue || activator.info.taskQueue,\n workflowExecutionTimeout: (0, time_1.msOptionalToTs)(options.workflowExecutionTimeout),\n workflowRunTimeout: (0, time_1.msOptionalToTs)(options.workflowRunTimeout),\n workflowTaskTimeout: (0, time_1.msOptionalToTs)(options.workflowTaskTimeout),\n namespace: activator.info.namespace, // Not configurable\n headers,\n cancellationType: (0, interfaces_1.encodeChildWorkflowCancellationType)(options.cancellationType),\n workflowIdReusePolicy: (0, common_1.encodeWorkflowIdReusePolicy)(options.workflowIdReusePolicy),\n parentClosePolicy: (0, interfaces_1.encodeParentClosePolicy)(options.parentClosePolicy),\n cronSchedule: options.cronSchedule,\n searchAttributes: options.searchAttributes || options.typedSearchAttributes\n ? { indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(options.searchAttributes, options.typedSearchAttributes) }\n : undefined,\n memo: options.memo && (0, common_1.mapToPayloads)(activator.payloadConverter, options.memo, context),\n versioningIntent: (0, versioning_intent_enum_1.versioningIntentToProto)(options.versioningIntent),\n priority: options.priority ? (0, common_1.compilePriority)(options.priority) : undefined,\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options?.staticSummary, options?.staticDetails, context),\n });\n activator.completions.childWorkflowStart.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n // We construct a Promise for the completion of the child Workflow before we know\n // if the Workflow code will await it to capture the result in case it does.\n const completePromise = new Promise((resolve, reject) => {\n // Chain start Promise rejection to the complete Promise.\n (0, stack_helpers_1.untrackPromise)(startPromise.catch(reject));\n activator.completions.childWorkflowComplete.set(seq, {\n resolve,\n reject,\n context,\n });\n });\n (0, stack_helpers_1.untrackPromise)(startPromise);\n (0, stack_helpers_1.untrackPromise)(completePromise);\n // Prevent unhandled rejection because the completion might not be awaited\n (0, stack_helpers_1.untrackPromise)(completePromise.catch(() => undefined));\n const ret = new Promise((resolve) => resolve([startPromise, completePromise]));\n (0, stack_helpers_1.untrackPromise)(ret);\n return ret;\n}\nfunction signalWorkflowNextHandler({ seq, signalName, args, target, headers }) {\n const activator = (0, global_attributes_1.getActivator)();\n const targetWorkflowId = target.type === 'external' ? target.workflowExecution.workflowId : target.childWorkflowId;\n const context = targetWorkflowSerializationContext(activator.info, targetWorkflowId);\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n if (!activator.completions.signalWorkflow.has(seq)) {\n return;\n }\n activator.pushCommand({ cancelSignalWorkflow: { seq } });\n }));\n }\n activator.pushCommand({\n signalExternalWorkflowExecution: {\n seq,\n args: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n headers,\n signalName,\n ...(target.type === 'external'\n ? {\n workflowExecution: {\n namespace: activator.info.namespace,\n ...target.workflowExecution,\n },\n }\n : {\n childWorkflowId: target.childWorkflowId,\n }),\n },\n });\n activator.completions.signalWorkflow.set(seq, { resolve, reject, context });\n });\n}\n/**\n * Symbol used in the return type of proxy methods to mark that an attribute on the source type is not a method.\n *\n * @see {@link ActivityInterfaceFor}\n * @see {@link proxyActivities}\n * @see {@link proxyLocalActivities}\n */\nexports.NotAnActivityMethod = Symbol.for('__TEMPORAL_NOT_AN_ACTIVITY_METHOD');\n/**\n * Configure Activity functions with given {@link ActivityOptions}.\n *\n * This method may be called multiple times to setup Activities with different options.\n *\n * @return a {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy | Proxy} for\n * which each attribute is a callable Activity function\n *\n * @example\n * ```ts\n * import { proxyActivities } from '@temporalio/workflow';\n * import * as activities from '../activities';\n *\n * // Setup Activities from module exports\n * const { httpGet, otherActivity } = proxyActivities<typeof activities>({\n * startToCloseTimeout: '30 minutes',\n * });\n *\n * // Use activities with default options\n * const result1 = await httpGet('http://example.com');\n *\n * // Override options for specific activity calls\n * const result2 = await httpGet.executeWithOptions({\n * staticSummary: 'Fetches data from external API',\n * scheduleToCloseTimeout: '5m'\n * }, ['http://api.example.com']);\n *\n * const result3 = await otherActivity.executeWithOptions({\n * staticSummary: 'Processes the fetched data',\n * taskQueue: 'special-task-queue'\n * }, [data]);\n *\n * // Setup Activities from an explicit interface (e.g. when defined by another SDK)\n * interface JavaActivities {\n * httpGetFromJava(url: string): Promise<string>\n * someOtherJavaActivity(arg1: number, arg2: string): Promise<string>;\n * }\n *\n * const {\n * httpGetFromJava,\n * someOtherJavaActivity\n * } = proxyActivities<JavaActivities>({\n * taskQueue: 'java-worker-taskQueue',\n * startToCloseTimeout: '5m',\n * });\n *\n * export function execute(): Promise<void> {\n * const response = await httpGet(\"http://example.com\");\n * // Or with custom options:\n * const response2 = await httpGetFromJava.executeWithOptions({\n * staticSummary: 'Java HTTP call with timeout override',\n * startToCloseTimeout: '2m'\n * }, [\"http://fast-api.example.com\"]);\n * // ...\n * }\n * ```\n */\nfunction proxyActivities(options) {\n if (options === undefined) {\n throw new TypeError('options must be defined');\n }\n // Validate as early as possible for immediate user feedback\n validateActivityOptions(options);\n return new Proxy({}, {\n get(_, activityType) {\n if (typeof activityType !== 'string') {\n throw new TypeError(`Only strings are supported for Activity types, got: ${String(activityType)}`);\n }\n function activityProxyFunction(...args) {\n return scheduleActivity(activityType, args, options);\n }\n activityProxyFunction.executeWithOptions = function (overrideOptions, args) {\n return scheduleActivity(activityType, args, (0, internal_workflow_1.deepMerge)(options, overrideOptions));\n };\n return activityProxyFunction;\n },\n });\n}\n/**\n * Configure Local Activity functions with given {@link LocalActivityOptions}.\n *\n * This method may be called multiple times to setup Activities with different options.\n *\n * @return a {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy | Proxy}\n * for which each attribute is a callable Activity function\n *\n * @see {@link proxyActivities} for examples\n */\nfunction proxyLocalActivities(options) {\n if (options === undefined) {\n throw new TypeError('options must be defined');\n }\n // Validate as early as possible for immediate user feedback\n validateLocalActivityOptions(options);\n return new Proxy({}, {\n get(_, activityType) {\n if (typeof activityType !== 'string') {\n throw new TypeError(`Only strings are supported for Activity types, got: ${String(activityType)}`);\n }\n function localActivityProxyFunction(...args) {\n return scheduleLocalActivity(activityType, args, options);\n }\n localActivityProxyFunction.executeWithOptions = function (overrideOptions, args) {\n return scheduleLocalActivity(activityType, args, (0, internal_workflow_1.deepMerge)(options, overrideOptions));\n };\n return localActivityProxyFunction;\n },\n });\n}\n// TODO: deprecate this patch after \"enough\" time has passed\nconst EXTERNAL_WF_CANCEL_PATCH = '__temporal_internal_connect_external_handle_cancel_to_scope';\n// The name of this patch comes from an attempt to build a generic internal patching mechanism.\n// That effort has been abandoned in favor of a newer WorkflowTaskCompletedMetadata based mechanism.\nconst CONDITION_0_PATCH = '__sdk_internal_patch_number:1';\n/**\n * Returns a client-side handle that can be used to signal and cancel an existing Workflow execution.\n * It takes a Workflow ID and optional run ID.\n */\nfunction getExternalWorkflowHandle(workflowId, runId) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.getExternalWorkflowHandle(...) may only be used from a Workflow Execution. Consider using Client.workflow.getHandle(...) instead.)');\n return {\n workflowId,\n runId,\n cancel() {\n return new Promise((resolve, reject) => {\n // Connect this cancel operation to the current cancellation scope.\n // This is behavior was introduced after v0.22.0 and is incompatible\n // with histories generated with previous SDK versions and thus requires\n // patching.\n //\n // We try to delay patching as much as possible to avoid polluting\n // histories unless strictly required.\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch((err) => {\n if (patched(EXTERNAL_WF_CANCEL_PATCH)) {\n reject(err);\n }\n }));\n }\n if (scope.consideredCancelled) {\n if (patched(EXTERNAL_WF_CANCEL_PATCH)) {\n return;\n }\n }\n const seq = activator.nextSeqs.cancelWorkflow++;\n activator.pushCommand({\n requestCancelExternalWorkflowExecution: {\n seq,\n workflowExecution: {\n namespace: activator.info.namespace,\n workflowId,\n runId,\n },\n },\n });\n activator.completions.cancelWorkflow.set(seq, {\n resolve,\n reject,\n context: targetWorkflowSerializationContext(activator.info, workflowId),\n });\n });\n },\n signal(def, ...args) {\n return (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'signalWorkflow', signalWorkflowNextHandler)({\n seq: activator.nextSeqs.signalWorkflow++,\n signalName: typeof def === 'string' ? def : def.name,\n args,\n target: {\n type: 'external',\n workflowExecution: { workflowId, runId },\n },\n headers: {},\n });\n },\n };\n}\nasync function startChild(workflowTypeOrFunc, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.startChild(...) may only be used from a Workflow Execution. Consider using Client.workflow.start(...) instead.)');\n const optionsWithDefaults = addDefaultWorkflowOptions(options ?? {});\n const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc);\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startChildWorkflowExecution', startChildWorkflowExecutionNextHandler);\n const [started, completed] = await execute({\n seq: activator.nextSeqs.childWorkflow++,\n options: optionsWithDefaults,\n headers: {},\n workflowType,\n });\n const firstExecutionRunId = await started;\n return {\n workflowId: optionsWithDefaults.workflowId,\n firstExecutionRunId,\n async result() {\n return (await completed);\n },\n async signal(def, ...args) {\n return (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'signalWorkflow', signalWorkflowNextHandler)({\n seq: activator.nextSeqs.signalWorkflow++,\n signalName: typeof def === 'string' ? def : def.name,\n args,\n target: {\n type: 'child',\n childWorkflowId: optionsWithDefaults.workflowId,\n },\n headers: {},\n });\n },\n };\n}\nasync function executeChild(workflowTypeOrFunc, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.executeChild(...) may only be used from a Workflow Execution. Consider using Client.workflow.execute(...) instead.');\n const optionsWithDefaults = addDefaultWorkflowOptions(options ?? {});\n const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc);\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startChildWorkflowExecution', startChildWorkflowExecutionNextHandler);\n const execPromise = execute({\n seq: activator.nextSeqs.childWorkflow++,\n options: optionsWithDefaults,\n headers: {},\n workflowType,\n });\n (0, stack_helpers_1.untrackPromise)(execPromise);\n const completedPromise = execPromise.then(([_started, completed]) => completed);\n (0, stack_helpers_1.untrackPromise)(completedPromise);\n return completedPromise;\n}\n/**\n * Get information about the current Workflow.\n *\n * WARNING: This function returns a frozen copy of WorkflowInfo, at the point where this method has been called.\n * Changes happening at later point in workflow execution will not be reflected in the returned object.\n *\n * For this reason, we recommend calling `workflowInfo()` on every access to {@link WorkflowInfo}'s fields,\n * rather than caching the `WorkflowInfo` object (or part of it) in a local variable. For example:\n *\n * ```ts\n * // GOOD\n * function myWorkflow() {\n * doSomething(workflowInfo().searchAttributes)\n * ...\n * doSomethingElse(workflowInfo().searchAttributes)\n * }\n * ```\n *\n * vs\n *\n * ```ts\n * // BAD\n * function myWorkflow() {\n * const attributes = workflowInfo().searchAttributes\n * doSomething(attributes)\n * ...\n * doSomethingElse(attributes)\n * }\n * ```\n */\nfunction workflowInfo() {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.workflowInfo(...) may only be used from a Workflow Execution.');\n return activator.info;\n}\n/**\n * Get information about the current update if any.\n *\n * @return Info for the current update handler the code calling this is executing\n * within if any.\n */\nfunction currentUpdateInfo() {\n (0, global_attributes_1.assertInWorkflowContext)('Workflow.currentUpdateInfo(...) may only be used from a Workflow Execution.');\n return update_scope_1.UpdateScope.current();\n}\n/**\n * Returns whether or not code is executing in workflow context\n */\nfunction inWorkflowContext() {\n return (0, global_attributes_1.maybeGetActivator)() !== undefined;\n}\n/**\n * Returns a function `f` that will cause the current Workflow to ContinueAsNew when called.\n *\n * `f` takes the same arguments as the Workflow function supplied to typeparam `F`.\n *\n * Once `f` is called, Workflow Execution immediately completes.\n */\nfunction makeContinueAsNewFunc(options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.continueAsNew(...) and Workflow.makeContinueAsNewFunc(...) may only be used from a Workflow Execution.');\n const info = activator.info;\n const { workflowType, taskQueue, ...rest } = options ?? {};\n const requiredOptions = {\n workflowType: workflowType ?? info.workflowType,\n taskQueue: taskQueue ?? info.taskQueue,\n ...rest,\n };\n return (...args) => {\n const context = currentWorkflowSerializationContext(info);\n const fn = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'continueAsNew', async (input) => {\n const { headers, args, options } = input;\n throw new interfaces_1.ContinueAsNew({\n workflowType: options.workflowType,\n arguments: (0, common_1.toPayloadsWithContext)(activator.payloadConverter, context, args),\n headers,\n taskQueue: options.taskQueue,\n memo: options.memo && (0, common_1.mapToPayloads)(activator.payloadConverter, options.memo, context),\n searchAttributes: options.searchAttributes || options.typedSearchAttributes\n ? { indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(options.searchAttributes, options.typedSearchAttributes) }\n : undefined,\n workflowRunTimeout: (0, time_1.msOptionalToTs)(options.workflowRunTimeout),\n workflowTaskTimeout: (0, time_1.msOptionalToTs)(options.workflowTaskTimeout),\n backoffStartInterval: (0, time_1.msOptionalToTs)(options.backoffStartInterval),\n versioningIntent: (0, versioning_intent_enum_1.versioningIntentToProto)(options.versioningIntent),\n initialVersioningBehavior: (0, common_1.encodeInitialVersioningBehavior)(options.initialVersioningBehavior),\n });\n });\n return fn({\n args,\n headers: {},\n options: requiredOptions,\n });\n };\n}\n/**\n * {@link https://docs.temporal.io/workflow-execution/continue-as-new#continue-as-new | Continues-As-New} the current Workflow Execution\n * with default options.\n *\n * Shorthand for `makeContinueAsNewFunc<F>()(...args)`. (See: {@link makeContinueAsNewFunc}.)\n *\n * @example\n *\n * ```ts\n * import { continueAsNew } from '@temporalio/workflow';\n * import { SearchAttributeType } from '@temporalio/common';\n *\n * export async function myWorkflow(n: number): Promise<void> {\n * // ... Workflow logic\n * await continueAsNew<typeof myWorkflow>(n + 1);\n * }\n * ```\n */\nfunction continueAsNew(...args) {\n return makeContinueAsNewFunc()(...args);\n}\n/**\n * Generate an RFC compliant V4 uuid.\n * Uses the workflow's deterministic PRNG making it safe for use within a workflow.\n * This function is cryptographically insecure.\n * See the {@link https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid | stackoverflow discussion}.\n */\nfunction uuid4() {\n const activator = (0, global_attributes_1.maybeGetActivator)();\n return (0, random_helpers_1.uuid4FromRandom)(activator ? () => activator.currentRandom() : Math.random);\n}\n/**\n * Patch or upgrade workflow code by checking or stating that this workflow has a certain patch.\n *\n * See {@link https://docs.temporal.io/typescript/versioning | docs page} for info.\n *\n * If the workflow is replaying an existing history, then this function returns true if that\n * history was produced by a worker which also had a `patched` call with the same `patchId`.\n * If the history was produced by a worker *without* such a call, then it will return false.\n *\n * If the workflow is not currently replaying, then this call *always* returns true.\n *\n * Your workflow code should run the \"new\" code if this returns true, if it returns false, you\n * should run the \"old\" code. By doing this, you can maintain determinism.\n *\n * @param patchId An identifier that should be unique to this patch. It is OK to use multiple\n * calls with the same ID, which means all such calls will always return the same value.\n */\nfunction patched(patchId) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.patch(...) and Workflow.deprecatePatch may only be used from a Workflow Execution.');\n return activator.patchInternal(patchId, false);\n}\n/**\n * Indicate that a patch is being phased out.\n *\n * See {@link https://docs.temporal.io/typescript/versioning | docs page} for info.\n *\n * Workflows with this call may be deployed alongside workflows with a {@link patched} call, but\n * they must *not* be deployed while any workers still exist running old code without a\n * {@link patched} call, or any runs with histories produced by such workers exist. If either kind\n * of worker encounters a history produced by the other, their behavior is undefined.\n *\n * Once all live workflow runs have been produced by workers with this call, you can deploy workers\n * which are free of either kind of patch call for this ID. Workers with and without this call\n * may coexist, as long as they are both running the \"new\" code.\n *\n * @param patchId An identifier that should be unique to this patch. It is OK to use multiple\n * calls with the same ID, which means all such calls will always return the same value.\n */\nfunction deprecatePatch(patchId) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.patch(...) and Workflow.deprecatePatch may only be used from a Workflow Execution.');\n activator.patchInternal(patchId, true);\n}\nasync function condition(fn, timeout, opts) {\n (0, global_attributes_1.assertInWorkflowContext)('Workflow.condition(...) may only be used from a Workflow Execution.');\n // Prior to 1.5.0, `condition(fn, 0)` was treated as equivalent to `condition(fn, undefined)`\n if (timeout === 0 && !patched(CONDITION_0_PATCH)) {\n return conditionInner(fn);\n }\n if (typeof timeout === 'number' || typeof timeout === 'string') {\n return cancellation_scope_1.CancellationScope.cancellable(async () => {\n try {\n return await Promise.race([sleep(timeout, opts).then(() => false), conditionInner(fn).then(() => true)]);\n }\n finally {\n cancellation_scope_1.CancellationScope.current().cancel();\n }\n });\n }\n return conditionInner(fn);\n}\nfunction conditionInner(fn) {\n const activator = (0, global_attributes_1.getActivator)();\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n const seq = activator.nextSeqs.condition++;\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch((err) => {\n activator.blockedConditions.delete(seq);\n reject(err);\n }));\n }\n // Eager evaluation\n if (fn()) {\n resolve();\n return;\n }\n activator.blockedConditions.set(seq, { fn, resolve });\n });\n}\n/**\n * Define an update method for a Workflow.\n *\n * A definition is used to register a handler in the Workflow via {@link setHandler} and to update a Workflow using a {@link WorkflowHandle}, {@link ChildWorkflowHandle} or {@link ExternalWorkflowHandle}.\n * A definition can be reused in multiple Workflows.\n */\nfunction defineUpdate(name) {\n return {\n type: 'update',\n name,\n };\n}\n/**\n * Define a signal method for a Workflow.\n *\n * A definition is used to register a handler in the Workflow via {@link setHandler} and to signal a Workflow using a {@link WorkflowHandle}, {@link ChildWorkflowHandle} or {@link ExternalWorkflowHandle}.\n * A definition can be reused in multiple Workflows.\n */\nfunction defineSignal(name) {\n return {\n type: 'signal',\n name,\n };\n}\n/**\n * Define a query method for a Workflow.\n *\n * A definition is used to register a handler in the Workflow via {@link setHandler} and to query a Workflow using a {@link WorkflowHandle}.\n * A definition can be reused in multiple Workflows.\n */\nfunction defineQuery(name) {\n return {\n type: 'query',\n name,\n };\n}\n// For Updates and Signals we want to make a public guarantee something like the\n// following:\n//\n// \"If a WFT contains a Signal/Update, and if a handler is available for that\n// Signal/Update, then the handler will be executed.\"\"\n//\n// However, that statement is not well-defined, leaving several questions open:\n//\n// 1. What does it mean for a handler to be \"available\"? What happens if the\n// handler is not present initially but is set at some point during the\n// Workflow code that is executed in that WFT? What happens if the handler is\n// set and then deleted, or replaced with a different handler?\n//\n// 2. When is the handler executed? (When it first becomes available? At the end\n// of the activation?) What are the execution semantics of Workflow and\n// Signal/Update handler code given that they are concurrent? Can the user\n// rely on Signal/Update side effects being reflected in the Workflow return\n// value, or in the value passed to Continue-As-New? If the handler is an\n// async function / coroutine, how much of it is executed and when is the\n// rest executed?\n//\n// 3. What happens if the handler is not executed? (i.e. because it wasn't\n// available in the sense defined by (1))\n//\n// 4. In the case of Update, when is the validation function executed?\n//\n// The implementation for Typescript is as follows:\n//\n// 1. sdk-core sorts Signal and Update jobs (and Patches) ahead of all other\n// jobs. Thus if the handler is available at the start of the Activation then\n// the Signal/Update will be executed before Workflow code is executed. If it\n// is not, then the Signal/Update calls are pushed to a buffer.\n//\n// 2. On each call to setHandler for a given Signal/Update, we make a pass\n// through the buffer list. If a buffered job is associated with the just-set\n// handler, then the job is removed from the buffer and the initial\n// synchronous portion of the handler is invoked on that input (i.e.\n// preempting workflow code).\n//\n// Thus in the case of Typescript the questions above are answered as follows:\n//\n// 1. A handler is \"available\" if it is set at the start of the Activation or\n// becomes set at any point during the Activation. If the handler is not set\n// initially then it is executed as soon as it is set. Subsequent deletion or\n// replacement by a different handler has no impact because the jobs it was\n// handling have already been handled and are no longer in the buffer.\n//\n// 2. The handler is executed as soon as it becomes available. I.e. if the\n// handler is set at the start of the Activation then it is executed when\n// first attempting to process the Signal/Update job; alternatively, if it is\n// set by a setHandler call made by Workflow code, then it is executed as\n// part of that call (preempting Workflow code). Therefore, a user can rely\n// on Signal/Update side effects being reflected in e.g. the Workflow return\n// value, and in the value passed to Continue-As-New. Activation jobs are\n// processed in the order supplied by sdk-core, i.e. Signals, then Updates,\n// then other jobs. Within each group, the order sent by the server is\n// preserved. If the handler is async, it is executed up to its first yield\n// point.\n//\n// 3. Signal case: If a handler does not become available for a Signal job then\n// the job remains in the buffer. If a handler for the Signal becomes\n// available in a subsequent Activation (of the same or a subsequent WFT)\n// then the handler will be executed. If not, then the Signal will never be\n// responded to and this causes no error.\n//\n// Update case: If a handler does not become available for an Update job then\n// the Update is rejected at the end of the Activation. Thus, if a user does\n// not want an Update to be rejected for this reason, then it is their\n// responsibility to ensure that their application and workflow code interact\n// such that a handler is available for the Update during any Activation\n// which might contain their Update job. (Note that the user often has\n// uncertainty about which WFT their Signal/Update will appear in. For\n// example, if they call startWorkflow() followed by startUpdate(), then they\n// will typically not know whether these will be delivered in one or two\n// WFTs. On the other hand there are situations where they would have reason\n// to believe they are in the same WFT, for example if they do not start\n// Worker polling until after they have verified that both requests have\n// succeeded.)\n//\n// 4. If an Update has a validation function then it is executed immediately\n// prior to the handler. (Note that the validation function is required to be\n// synchronous).\nfunction setHandler(def, handler, options) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setHandler(...) may only be used from a Workflow Execution.');\n // Cannot register handler for reserved names\n (0, reserved_1.throwIfReservedName)(def.type, def.name);\n const description = options?.description;\n if (def.type === 'update') {\n if (typeof handler === 'function') {\n const updateOptions = options;\n const validator = updateOptions?.validator;\n const unfinishedPolicy = updateOptions?.unfinishedPolicy ?? common_1.HandlerUnfinishedPolicy.WARN_AND_ABANDON;\n activator.updateHandlers.set(def.name, { handler, validator, description, unfinishedPolicy });\n activator.dispatchBufferedUpdates();\n }\n else if (handler == null) {\n activator.updateHandlers.delete(def.name);\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n }\n else if (def.type === 'signal') {\n if (typeof handler === 'function') {\n const signalOptions = options;\n const unfinishedPolicy = signalOptions?.unfinishedPolicy ?? common_1.HandlerUnfinishedPolicy.WARN_AND_ABANDON;\n activator.signalHandlers.set(def.name, { handler: handler, description, unfinishedPolicy });\n activator.dispatchBufferedSignals();\n }\n else if (handler == null) {\n activator.signalHandlers.delete(def.name);\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n }\n else if (def.type === 'query') {\n if (typeof handler === 'function') {\n activator.queryHandlers.set(def.name, { handler: handler, description });\n }\n else if (handler == null) {\n activator.queryHandlers.delete(def.name);\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n }\n else {\n throw new TypeError(`Invalid definition type: ${def.type}`);\n }\n}\n/**\n * Set a signal handler function that will handle signals calls for non-registered signal names.\n *\n * Signals are dispatched to the default signal handler in the order that they were accepted by the server.\n *\n * If this function is called multiple times for a given signal name the last handler will overwrite any previous calls.\n *\n * @param handler a function that will handle signals for non-registered signal names, or `undefined` to unset the handler.\n */\nfunction setDefaultSignalHandler(handler) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setDefaultSignalHandler(...) may only be used from a Workflow Execution.');\n if (typeof handler === 'function') {\n activator.defaultSignalHandler = handler;\n activator.dispatchBufferedSignals();\n }\n else if (handler == null) {\n activator.defaultSignalHandler = undefined;\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n}\n/**\n * Set a update handler function that will handle updates calls for non-registered update names.\n *\n * Updates are dispatched to the default update handler in the order that they were accepted by the server.\n *\n * If this function is called multiple times for a given update name the last handler will overwrite any previous calls.\n *\n * @param handler a function that will handle updates for non-registered update names, or `undefined` to unset the handler.\n */\nfunction setDefaultUpdateHandler(handler) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setDefaultUpdateHandler(...) may only be used from a Workflow Execution.');\n if (typeof handler === 'function') {\n activator.defaultUpdateHandler = handler;\n activator.dispatchBufferedUpdates();\n }\n else if (handler == null) {\n activator.defaultUpdateHandler = undefined;\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n}\n/**\n * Set a query handler function that will handle query calls for non-registered query names.\n *\n * Queries are dispatched to the default query handler in the order that they were accepted by the server.\n *\n * If this function is called multiple times for a given query name the last handler will overwrite any previous calls.\n *\n * @param handler a function that will handle queries for non-registered query names, or `undefined` to unset the handler.\n */\nfunction setDefaultQueryHandler(handler) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.setDefaultQueryHandler(...) may only be used from a Workflow Execution.');\n if (typeof handler === 'function' || handler === undefined) {\n activator.defaultQueryHandler = handler;\n }\n else {\n throw new TypeError(`Expected handler to be either a function or 'undefined'. Got: '${typeof handler}'`);\n }\n}\n/**\n * Updates this Workflow's Search Attributes by merging the provided `searchAttributes` with the existing Search\n * Attributes, `workflowInfo().searchAttributes`.\n *\n * Search attributes can be upserted using either SearchAttributes (deprecated) or SearchAttributeUpdatePair[] (preferred)\n *\n * Upserting a workflow's search attributes using SearchAttributeUpdatePair[]:\n *\n * ```ts\n * const intKey = defineSearchKey('CustomIntField', 'INT');\n * const boolKey = defineSearchKey('CustomBoolField', 'BOOL');\n * const keywordListKey = defineSearchKey('CustomKeywordField', 'KEYWORD_LIST');\n *\n * upsertSearchAttributes([\n * defineSearchAttribute(intKey, 1),\n * defineSearchAttribute(boolKey, true)\n * ]);\n * upsertSearchAttributes([\n * defineSearchAttribute(intKey, 42),\n * defineSearchAttribute(keywordListKey, ['durable code', 'is great'])\n * ]);\n * ```\n *\n * Would result in the Workflow having these Search Attributes:\n *\n * ```ts\n * {\n * CustomIntField: [42],\n * CustomBoolField: [true],\n * CustomKeywordField: ['durable code', 'is great']\n * }\n * ```\n *\n * @param searchAttributes The Record to merge.\n * If using SearchAttributeUpdatePair[] (preferred), set a value to null to remove the search attribute.\n * If using SearchAttributes (deprecated), set a value to undefined or an empty list to remove the search attribute.\n */\nfunction upsertSearchAttributes(searchAttributes) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.upsertSearchAttributes(...) may only be used from a Workflow Execution.');\n if (searchAttributes == null) {\n throw new Error('searchAttributes must be a non-null SearchAttributes');\n }\n if (Array.isArray(searchAttributes)) {\n // Typed search attributes\n activator.pushCommand({\n upsertWorkflowSearchAttributes: {\n searchAttributes: {\n indexedFields: (0, payload_search_attributes_1.encodeUnifiedSearchAttributes)(undefined, searchAttributes),\n },\n },\n });\n activator.mutateWorkflowInfo((info) => {\n // Create a copy of the current state.\n const newSearchAttributes = { ...info.searchAttributes };\n for (const pair of searchAttributes) {\n if (pair.value == null) {\n // If the value is null, remove the search attribute.\n // We don't mutate the existing state (just the new map) so this is safe.\n delete newSearchAttributes[pair.key.name];\n }\n else {\n newSearchAttributes[pair.key.name] = Array.isArray(pair.value)\n ? pair.value\n : [pair.value];\n }\n }\n return {\n ...info,\n searchAttributes: newSearchAttributes,\n // Create an empty copy and apply existing and new updates. Keep in mind the order matters here (existing first, new second - to possibly overwrite existing).\n typedSearchAttributes: info.typedSearchAttributes.updateCopy([...searchAttributes]),\n };\n });\n }\n else {\n // Legacy search attributes\n activator.pushCommand({\n upsertWorkflowSearchAttributes: {\n searchAttributes: {\n indexedFields: (0, common_1.mapToPayloads)(payload_search_attributes_1.searchAttributePayloadConverter, searchAttributes),\n },\n },\n });\n activator.mutateWorkflowInfo((info) => {\n // Create a new copy of the current state.\n let typedSearchAttributes = info.typedSearchAttributes.updateCopy([]);\n const newSearchAttributes = { ...info.searchAttributes };\n // Upsert legacy search attributes into typedSearchAttributes.\n for (const [k, v] of Object.entries(searchAttributes)) {\n if (v !== undefined && !Array.isArray(v)) {\n throw new Error(`Search attribute value must be an array or undefined, got ${v}`);\n }\n // The value is undefined or an empty list, this signifies deletion.\n // Remove from both untyped & typed search attributes.\n if (v == null || (Array.isArray(v) && v.length === 0)) {\n // We cannot discern a valid key typing from these values.\n // Instead, we do a \"best effort\" deletion from typed search attributes:\n // - check if a matching key name exists, if so, remove it.\n const matchingPair = typedSearchAttributes.getAll().find((pair) => pair.key.name === k);\n if (matchingPair) {\n typedSearchAttributes = typedSearchAttributes.updateCopy([\n { key: matchingPair.key, value: null },\n ]);\n }\n delete newSearchAttributes[k];\n continue;\n }\n // Attempt to discern a valid key typing for the update.\n const typedKey = common_1.TypedSearchAttributes.getKeyFromUntyped(k, v);\n // Unable to discern a valid key typing (no valid type for defined value).\n // Skip applying this update (no-op).\n if (typedKey === undefined) {\n continue;\n }\n // TEXT type is inferred from a string value, but it could also be KEYWORD.\n // If a matching pair exists with KEYWORD type, use that instead.\n if (typedKey.type === 'TEXT') {\n const matchingPair = typedSearchAttributes.getAll().find((pair) => pair.key.name === typedKey.name);\n if (matchingPair) {\n typedKey.type = matchingPair.key.type;\n }\n }\n let newValue = v;\n // Unpack value if it is a single-element array.\n if (v.length === 1) {\n newValue = v[0];\n // Convert value back to Date.\n if (typedKey.type === 'DATETIME') {\n newValue = new Date(newValue);\n }\n }\n // We have a defined value with valid type. Apply the update.\n typedSearchAttributes = typedSearchAttributes.updateCopy([\n { key: typedKey, value: newValue },\n ]);\n newSearchAttributes[k] = v;\n }\n return {\n ...info,\n searchAttributes: newSearchAttributes,\n typedSearchAttributes,\n };\n });\n }\n}\n/**\n * Updates this Workflow's Memos by merging the provided `memo` with existing\n * Memos (as returned by `workflowInfo().memo`).\n *\n * New memo is merged by replacing properties of the same name _at the first\n * level only_. Setting a property to value `undefined` or `null` clears that\n * key from the Memo.\n *\n * For example:\n *\n * ```ts\n * upsertMemo({\n * key1: value,\n * key3: { subkey1: value }\n * key4: value,\n * });\n * upsertMemo({\n * key2: value\n * key3: { subkey2: value }\n * key4: undefined,\n * });\n * ```\n *\n * would result in the Workflow having these Memo:\n *\n * ```ts\n * {\n * key1: value,\n * key2: value,\n * key3: { subkey2: value } // Note this object was completely replaced\n * // Note that key4 was completely removed\n * }\n * ```\n *\n * @param memo The Record to merge.\n */\nfunction upsertMemo(memo) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.upsertMemo(...) may only be used from a Workflow Execution.');\n const context = currentWorkflowSerializationContext(activator.info);\n if (memo == null) {\n throw new Error('memo must be a non-null Record');\n }\n activator.pushCommand({\n modifyWorkflowProperties: {\n upsertedMemo: {\n fields: (0, common_1.mapToPayloads)(activator.payloadConverter, \n // Convert null to undefined\n Object.fromEntries(Object.entries(memo).map(([k, v]) => [k, v ?? undefined])), context),\n },\n },\n });\n activator.mutateWorkflowInfo((info) => {\n return {\n ...info,\n memo: Object.fromEntries(Object.entries({\n ...info.memo,\n ...memo,\n }).filter(([_, v]) => v != null)),\n };\n });\n}\n/**\n * Whether update and signal handlers have finished executing.\n *\n * Consider waiting on this condition before workflow return or continue-as-new, to prevent\n * interruption of in-progress handlers by workflow exit:\n *\n * ```ts\n * await workflow.condition(workflow.allHandlersFinished)\n * ```\n *\n * @returns true if there are no in-progress update or signal handler executions.\n */\nfunction allHandlersFinished() {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('allHandlersFinished() may only be used from a Workflow Execution.');\n return activator.inProgressSignals.size === 0 && activator.inProgressUpdates.size === 0;\n}\n/**\n * Can be used to alter workflow functions with certain options specified at definition time.\n *\n * @example\n * For example:\n * ```ts\n * setWorkflowOptions({\n * versioningBehavior: 'PINNED',\n * failureExceptionTypes: [CustomWorkflowError]\n * }, myWorkflow);\n * export async function myWorkflow(): Promise<string> {\n * // Workflow code here\n * return \"hi\";\n * }\n * ```\n *\n * @example\n * To annotate a default or dynamic workflow:\n * ```ts\n * export default async function (): Promise<string> {\n * // Workflow code here\n * return \"hi\";\n * }\n * setWorkflowOptions({\n * versioningBehavior: 'PINNED',\n * failureExceptionTypes: [CustomWorkflowError]\n * }, module.exports.default);\n * ```\n *\n * @param options Options for the workflow defintion, or a function that returns options. If a\n * function is provided, it will be called once just before the workflow function is called for the\n * first time. It is safe to call {@link workflowInfo} inside such a function.\n * @param fn The workflow function.\n */\nfunction setWorkflowOptions(options, fn) {\n Object.assign(fn, {\n workflowDefinitionOptions: options,\n });\n}\nexports.stackTraceQuery = defineQuery('__stack_trace');\nexports.enhancedStackTraceQuery = defineQuery('__enhanced_stack_trace');\nexports.workflowMetadataQuery = defineQuery('__temporal_workflow_metadata');\nfunction getCurrentDetails() {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('getCurrentDetails() may only be used from a Workflow Execution.');\n return activator.currentDetails;\n}\nfunction setCurrentDetails(details) {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('getCurrentDetails() may only be used from a Workflow Execution.');\n activator.currentDetails = details;\n}\n//# sourceMappingURL=workflow.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.log = void 0;\nexports.executeWithLifecycleLogging = executeWithLifecycleLogging;\nexports.workflowLogAttributes = workflowLogAttributes;\nconst common_1 = require(\"@temporalio/common\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\nconst sinks_1 = require(\"./sinks\");\nconst errors_1 = require(\"./errors\");\nconst interfaces_1 = require(\"./interfaces\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst workflow_1 = require(\"./workflow\");\nconst loggerSink = (0, sinks_1.proxySinks)().__temporal_logger;\n/**\n * Symbol used by the SDK logger to extract a timestamp from log attributes.\n * Also defined in `worker/logger.ts` - intentionally not shared.\n */\nconst LogTimestamp = Symbol.for('log_timestamp');\n/**\n * Default workflow logger.\n *\n * This logger is replay-aware and will omit log messages on workflow replay. Messages emitted by this logger are\n * funnelled through a sink that forwards them to the logger registered on {@link Runtime.logger}.\n *\n * Attributes from the current Workflow Execution context are automatically included as metadata on every log\n * entries. An extra `sdkComponent` metadata attribute is also added, with value `workflow`; this can be used for\n * fine-grained filtering of log entries further downstream.\n *\n * To customize log attributes, register a {@link WorkflowOutboundCallsInterceptor} that intercepts the\n * `getLogAttributes()` method.\n *\n * Notice that since sinks are used to power this logger, any log attributes must be transferable via the\n * {@link https://nodejs.org/api/worker_threads.html#worker_threads_port_postmessage_value_transferlist | postMessage}\n * API.\n *\n * NOTE: Specifying a custom logger through {@link defaultSink} or by manually registering a sink named\n * `defaultWorkerLogger` has been deprecated. Please use {@link Runtime.logger} instead.\n */\nexports.log = Object.fromEntries(['trace', 'debug', 'info', 'warn', 'error'].map((level) => {\n return [\n level,\n (message, attrs) => {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.log(...) may only be used from workflow context.');\n const getLogAttributes = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'getLogAttributes', (a) => a);\n return loggerSink[level](message, {\n // Inject the call time in nanosecond resolution as expected by the worker logger.\n [LogTimestamp]: activator.getTimeOfDay(),\n sdkComponent: common_1.SdkComponent.workflow,\n ...getLogAttributes(workflowLogAttributes(activator.info)),\n ...attrs,\n });\n },\n ];\n}));\nfunction executeWithLifecycleLogging(fn) {\n exports.log.debug('Workflow started', { sdkComponent: common_1.SdkComponent.worker });\n const p = fn().then((res) => {\n exports.log.debug('Workflow completed', { sdkComponent: common_1.SdkComponent.worker });\n return res;\n }, (error) => {\n // Avoid using instanceof checks in case the modules they're defined in loaded more than once,\n // e.g. by jest or when multiple versions are installed.\n if (typeof error === 'object' && error != null) {\n if ((0, errors_1.isCancellation)(error)) {\n exports.log.debug('Workflow completed as cancelled', { sdkComponent: common_1.SdkComponent.worker });\n throw error;\n }\n else if (error instanceof interfaces_1.ContinueAsNew) {\n exports.log.debug('Workflow continued as new', { sdkComponent: common_1.SdkComponent.worker });\n throw error;\n }\n }\n exports.log.warn('Workflow failed', { error, sdkComponent: common_1.SdkComponent.worker });\n throw error;\n });\n // Avoid showing this interceptor in stack trace query\n (0, stack_helpers_1.untrackPromise)(p);\n return p;\n}\n/**\n * Returns a map of attributes to be set _by default_ on log messages for a given Workflow.\n * Note that this function may be called from outside of the Workflow context (eg. by the worker itself).\n */\nfunction workflowLogAttributes(info) {\n const attributes = {\n namespace: info.namespace,\n taskQueue: info.taskQueue,\n workflowId: info.workflowId,\n runId: info.runId,\n workflowType: info.workflowType,\n };\n if ((0, workflow_1.inWorkflowContext)()) {\n const updateInfo = (0, workflow_1.currentUpdateInfo)();\n if (updateInfo) {\n // Add update info if it exists\n attributes['updateId'] = updateInfo.id;\n attributes['updateName'] = updateInfo.name;\n }\n }\n return attributes;\n}\n//# sourceMappingURL=logs.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Trigger = void 0;\nconst cancellation_scope_1 = require(\"./cancellation-scope\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\n/**\n * A `PromiseLike` helper which exposes its `resolve` and `reject` methods.\n *\n * Trigger is CancellationScope-aware: it is linked to the current scope on\n * construction and throws when that scope is cancelled.\n *\n * Useful for e.g. waiting for unblocking a Workflow from a Signal.\n *\n * @example\n * ```ts\n * import { defineSignal, setHandler, sleep, Trigger } from '@temporalio/workflow';\n *\n * const completeUserInteraction = defineSignal('completeUserInteraction');\n *\n * export async function waitOnUser(userId: string): Promise<void> {\n * const userInteraction = new Trigger<boolean>();\n *\n * // programmatically resolve Trigger\n * setHandler(completeUserInteraction, () => userInteraction.resolve(true));\n *\n * const userInteracted = await Promise.race([userInteraction, sleep('30 days')]);\n * if (!userInteracted) {\n * await sendReminderEmail(userId);\n * }\n * }\n * ```\n */\nclass Trigger {\n // Typescript does not realize that the promise executor is run synchronously in the constructor\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n resolve;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n reject;\n promise;\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.resolve = resolve;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.reject = reject;\n });\n // Avoid unhandled rejections\n (0, stack_helpers_1.untrackPromise)(this.promise.catch(() => undefined));\n }\n then(onfulfilled, onrejected) {\n return this.promise.then(onfulfilled, onrejected);\n }\n}\nexports.Trigger = Trigger;\n//# sourceMappingURL=trigger.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.metricMeter = void 0;\nconst common_1 = require(\"@temporalio/common\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst sinks_1 = require(\"./sinks\");\nconst workflow_1 = require(\"./workflow\");\nconst global_attributes_1 = require(\"./global-attributes\");\nclass WorkflowMetricMeterImpl {\n constructor() { }\n createCounter(name, unit, description) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n return new WorkflowMetricCounter(name, unit, description);\n }\n createHistogram(name, valueType = 'int', unit, description) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n return new WorkflowMetricHistogram(name, valueType, unit, description);\n }\n createGauge(name, valueType = 'int', unit, description) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n return new WorkflowMetricGauge(name, valueType, unit, description);\n }\n withTags(_tags) {\n (0, global_attributes_1.assertInWorkflowContext)(\"Workflow's `metricMeter` can only be used while in Workflow Context\");\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricMeter`);\n }\n}\nclass WorkflowMetricCounter {\n name;\n unit;\n description;\n kind = 'counter';\n valueType = 'int';\n constructor(name, unit, description) {\n this.name = name;\n this.unit = unit;\n this.description = description;\n }\n add(value, extraTags = {}) {\n if (value < 0) {\n throw new Error(`MetricCounter value must be non-negative (got ${value})`);\n }\n if (!(0, workflow_1.workflowInfo)().unsafe.isReplaying) {\n metricSink.addMetricCounterValue(this.name, this.unit, this.description, value, extraTags);\n }\n }\n withTags(_tags) {\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricCounter`);\n }\n}\nclass WorkflowMetricHistogram {\n name;\n valueType;\n unit;\n description;\n kind = 'histogram';\n constructor(name, valueType, unit, description) {\n this.name = name;\n this.valueType = valueType;\n this.unit = unit;\n this.description = description;\n }\n record(value, extraTags = {}) {\n if (value < 0) {\n throw new Error(`MetricHistogram value must be non-negative (got ${value})`);\n }\n if (!(0, workflow_1.workflowInfo)().unsafe.isReplaying) {\n metricSink.recordMetricHistogramValue(this.name, this.valueType, this.unit, this.description, value, extraTags);\n }\n }\n withTags(_tags) {\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricHistogram`);\n }\n}\nclass WorkflowMetricGauge {\n name;\n valueType;\n unit;\n description;\n kind = 'gauge';\n constructor(name, valueType, unit, description) {\n this.name = name;\n this.valueType = valueType;\n this.unit = unit;\n this.description = description;\n }\n set(value, tags) {\n if (value < 0) {\n throw new Error(`MetricGauge value must be non-negative (got ${value})`);\n }\n if (!(0, workflow_1.workflowInfo)().unsafe.isReplaying) {\n metricSink.setMetricGaugeValue(this.name, this.valueType, this.unit, this.description, value, tags ?? {});\n }\n }\n withTags(_tags) {\n // Tags composition is handled by a MetricMeterWithComposedTags wrapper over this one\n throw new Error(`withTags is not supported directly on WorkflowMetricGauge`);\n }\n}\n////////////////////////////////////////////////////////////////////////////////////////////////////\n// Note: given that forwarding metrics outside of the sanbox can be quite chatty and add non\n// negligeable overhead, we eagerly check for `isReplaying` and completely skip doing sink\n// calls if we are replaying.\nconst metricSink = (0, sinks_1.proxySinks)().__temporal_metrics;\n/**\n * A MetricMeter that can be used to emit metrics from within a Workflow.\n *\n * @experimental The Metric API is an experimental feature and may be subject to change.\n */\nexports.metricMeter = common_1.MetricMeterWithComposedTags.compose(new WorkflowMetricMeterImpl(), () => {\n const activator = (0, global_attributes_1.assertInWorkflowContext)('Workflow.metricMeter may only be used from workflow context.');\n const getMetricTags = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'getMetricTags', (a) => a);\n const info = activator.info;\n return getMetricTags({\n // namespace and taskQueue will be added by the Worker\n workflowType: info.workflowType,\n });\n}, true);\n//# sourceMappingURL=metrics.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NexusOperationCancellationType = void 0;\nexports.createNexusServiceClient = createNexusServiceClient;\nconst time_1 = require(\"@temporalio/common/lib/time\");\nconst user_metadata_1 = require(\"@temporalio/common/lib/user-metadata\");\nconst enums_helpers_1 = require(\"@temporalio/common/lib/internal-workflow/enums-helpers\");\nconst cancellation_scope_1 = require(\"./cancellation-scope\");\nconst global_attributes_1 = require(\"./global-attributes\");\nconst interceptor_composition_1 = require(\"./interceptor-composition\");\nconst stack_helpers_1 = require(\"./stack-helpers\");\n/**\n * Create a Nexus client for invoking Nexus Operations from a Workflow.\n *\n * @experimental Nexus support in Temporal SDK is experimental.\n */\nfunction createNexusServiceClient(options) {\n class NexusServiceClientImpl {\n async executeOperation(operation, input, operationOptions) {\n const handle = await this.startOperation(operation, input, operationOptions);\n return await handle.result();\n }\n async startOperation(operation, input, operationOptions) {\n const opName = typeof operation === 'string'\n ? // Casting as string to cover up the fact that `opName` might be undefined.\n // If this happens, then `execute` will produce a `NexusOperationFailure.NOT_FOUND`.\n options.service.operations[operation]?.name\n : operation.name;\n const activator = (0, global_attributes_1.getActivator)();\n const seq = activator.nextSeqs.nexusOperation++;\n const execute = (0, interceptor_composition_1.composeInterceptors)(activator.interceptors.outbound, 'startNexusOperation', startNexusOperationNextHandler);\n // The interceptor returns a Promise<StartNexusOperationOutput>, with the result promise contained\n // in that Output object. As a consequence of this, the result promise/completion does not exist\n // until the StartNexusOperation event is received. This is totally different from what we did in\n // ChildWorkflow, but is much cleaner from the interceptors point of view.\n const { token, result: resultPromise } = await execute({\n endpoint: options.endpoint,\n service: options.service.name,\n operation: opName,\n options: {\n ...operationOptions,\n cancellationType: operationOptions?.cancellationType ?? 'WAIT_CANCELLATION_COMPLETED',\n },\n headers: {},\n seq,\n input,\n });\n return {\n service: options.service.name,\n operation: opName,\n token,\n async result() {\n return resultPromise;\n },\n };\n }\n }\n return new NexusServiceClientImpl();\n}\nfunction startNexusOperationNextHandler({ input, endpoint, service, options, operation, seq, headers, }) {\n const activator = (0, global_attributes_1.getActivator)();\n const context = {\n type: 'workflow',\n namespace: activator.info.namespace,\n workflowId: activator.info.workflowId,\n };\n return new Promise((resolve, reject) => {\n const scope = cancellation_scope_1.CancellationScope.current();\n if (scope.consideredCancelled) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(reject));\n return;\n }\n if (scope.cancellable) {\n (0, stack_helpers_1.untrackPromise)(scope.cancelRequested.catch(() => {\n const completed = !activator.completions.nexusOperationStart.has(seq) &&\n !activator.completions.nexusOperationComplete.has(seq);\n if (!completed) {\n activator.pushCommand({\n requestCancelNexusOperation: { seq },\n });\n }\n // Nothing to cancel otherwise\n }));\n }\n activator.pushCommand({\n scheduleNexusOperation: {\n seq,\n endpoint,\n service,\n operation,\n nexusHeader: headers,\n input: activator.payloadConverter.toPayload(input, context),\n scheduleToCloseTimeout: (0, time_1.msOptionalToTs)(options?.scheduleToCloseTimeout),\n scheduleToStartTimeout: (0, time_1.msOptionalToTs)(options?.scheduleToStartTimeout),\n startToCloseTimeout: (0, time_1.msOptionalToTs)(options?.startToCloseTimeout),\n cancellationType: encodeNexusOperationCancellationType(options?.cancellationType),\n },\n userMetadata: (0, user_metadata_1.userMetadataToPayload)(activator.payloadConverter, options?.summary, undefined, context),\n });\n activator.completions.nexusOperationStart.set(seq, {\n resolve,\n reject,\n });\n });\n}\n/**\n * Determines:\n * - whether cancellation requests should be propagated from the Workflow to the Nexus Operation\n * - whether and when should the Operation's cancellation be reported back to the Workflow\n * (i.e. at which moment should the operation's result promise fail with a `NexusOperationFailure`,\n * with `cause` set to a `CancelledFailure`).\n *\n * Note that this setting only applies to cancellation originating from an external request for the\n * Workflow itself, or from internal cancellation of the `CancellationScope` in which the\n * Operation call was made.\n *\n * @experimental Nexus support in Temporal SDK is experimental.\n */\n// MAINTENANCE: Keep this typedoc in sync with the `StartNexusOperationOptions.cancellationType` field\nexports.NexusOperationCancellationType = {\n /**\n * Do not propagate cancellation requests to the Nexus Operation, and immediately report\n * cancellation to the caller.\n */\n ABANDON: 'ABANDON',\n /**\n * Initiate a cancellation request for the Nexus operation and immediately report cancellation to\n * the caller. Note that it doesn't guarantee that cancellation is delivered to the operation if\n * calling workflow exits before the delivery is done. If you want to ensure that cancellation is\n * delivered to the operation, use {@link WAIT_CANCELLATION_REQUESTED}.\n *\n * Propagate cancellation request from the Workflow to the Operation, yet _immediately_ report\n * cancellation to the caller, i.e. without waiting for the server to confirm the cancellation\n * request.\n *\n * Note that this cancellation type provides no guarantee, from the Workflow-side, that the\n * cancellation request will be delivered to the Operation Handler. In particular, either the\n * Operation or the Workflow may complete (either successfully or uncessfully) before the\n * cancellation request is delivered, resulting in a situation where the Operation completed\n * successfully, but the Workflow thinks it was cancelled.\n *\n * To guarantee that the Operation will eventually be notified of the cancellation request,\n * use {@link WAIT_CANCELLATION_REQUESTED}.\n */\n TRY_CANCEL: 'TRY_CANCEL',\n /**\n * Propagate cancellation request from the Workflow to the Operation, then wait for the server\n * to confirm that the Operation cancellation request was delivered to the Operation Handler.\n */\n WAIT_CANCELLATION_REQUESTED: 'WAIT_CANCELLATION_REQUESTED',\n /**\n * Propagate cancellation request from the Workflow to the Operation, then wait for completion\n * of the Operation.\n */\n WAIT_CANCELLATION_COMPLETED: 'WAIT_CANCELLATION_COMPLETED',\n};\nconst [encodeNexusOperationCancellationType, _] = (0, enums_helpers_1.makeProtoEnumConverters)({\n [exports.NexusOperationCancellationType.WAIT_CANCELLATION_COMPLETED]: 0,\n [exports.NexusOperationCancellationType.ABANDON]: 1,\n [exports.NexusOperationCancellationType.TRY_CANCEL]: 2,\n [exports.NexusOperationCancellationType.WAIT_CANCELLATION_REQUESTED]: 3,\n}, '');\n//# sourceMappingURL=nexus.js.map","\"use strict\";\n/**\n * This library provides tools required for authoring workflows.\n *\n * ## Usage\n * See the {@link https://docs.temporal.io/typescript/hello-world#workflows | tutorial} for writing your first workflow.\n *\n * ### Timers\n *\n * The recommended way of scheduling timers is by using the {@link sleep} function. We've replaced `setTimeout` and\n * `clearTimeout` with deterministic versions so these are also usable but have a limitation that they don't play well\n * with {@link https://docs.temporal.io/typescript/cancellation-scopes | cancellation scopes}.\n *\n * ```ts\n * import { sleep } from '@temporalio/workflow';\n *\n * export async function sleeper(ms = 100): Promise<void> {\n * await sleep(ms);\n * console.log('slept');\n * }\n * ```\n *\n * ### Activities\n *\n * To schedule Activities, use {@link proxyActivities} to obtain an Activity function and call.\n *\n * ```ts\n * import { proxyActivities } from '@temporalio/workflow';\n * import type * as activities from './activities';\n *\n * const { sendEmail } = proxyActivities<typeof activities>({\n * startToCloseTimeout: '1 minute',\n * });\n\nexport async function sampleWorkflow(): Promise<string> {\n await sendEmail(\"to@example.com\",\"Hello, Temporal!\");\n}\n\n * ```\n *\n * ### Updates, Signals and Queries\n *\n * Use {@link setHandler} to set handlers for Updates, Signals, and Queries.\n *\n * Update and Signal handlers can be either async or non-async functions. Update handlers may return a value, but signal\n * handlers may not (return `void` or `Promise<void>`). You may use Activities, Timers, child Workflows, etc in Update\n * and Signal handlers, but this should be done cautiously: for example, note that if you await async operations such as\n * these in an Update or Signal handler, then you are responsible for ensuring that the workflow does not complete first.\n *\n * Query handlers may **not** be async functions, and may **not** mutate any variables or use Activities, Timers,\n * child Workflows, etc.\n *\n * #### Implementation\n *\n * ```ts\n * export const incrementSignal = wf.defineSignal<[number]>('increment');\n * export const getValueQuery = wf.defineQuery<number>('getValue');\n * export const incrementAndGetValueUpdate = wf.defineUpdate<number, [number]>('incrementAndGetValue');\n *\n * export async function counterWorkflow(initialValue: number): Promise<void> {\n * let count = initialValue;\n * wf.setHandler(incrementSignal, (arg: number) => {\n * count += arg;\n * });\n * wf.setHandler(getValueQuery, () => count);\n * wf.setHandler(incrementAndGetValueUpdate, (arg: number): number => {\n * count += arg;\n * return count;\n * });\n * await wf.condition(() => false);\n * }\n * ```\n *\n * ### More\n *\n * - [Deterministic built-ins](https://docs.temporal.io/typescript/determinism#sources-of-non-determinism)\n * - [Cancellation and scopes](https://docs.temporal.io/typescript/cancellation-scopes)\n * - {@link CancellationScope}\n * - {@link Trigger}\n * - [Sinks](https://docs.temporal.io/application-development/observability/?lang=ts#logging)\n * - {@link Sinks}\n *\n * @module\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NexusOperationCancellationType = exports.createNexusServiceClient = exports.metricMeter = exports.Trigger = exports.log = exports.workflowRandom = exports.getRandomStream = exports.proxySinks = exports.ParentClosePolicy = exports.ContinueAsNew = exports.ChildWorkflowCancellationType = exports.CancellationScope = exports.AsyncLocalStorage = exports.TimeoutFailure = exports.TerminatedFailure = exports.TemporalFailure = exports.ServerFailure = exports.rootCause = exports.defaultPayloadConverter = exports.ChildWorkflowFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ActivityFailure = exports.ActivityCancellationType = void 0;\nvar common_1 = require(\"@temporalio/common\");\nObject.defineProperty(exports, \"ActivityCancellationType\", { enumerable: true, get: function () { return common_1.ActivityCancellationType; } });\nObject.defineProperty(exports, \"ActivityFailure\", { enumerable: true, get: function () { return common_1.ActivityFailure; } });\nObject.defineProperty(exports, \"ApplicationFailure\", { enumerable: true, get: function () { return common_1.ApplicationFailure; } });\nObject.defineProperty(exports, \"CancelledFailure\", { enumerable: true, get: function () { return common_1.CancelledFailure; } });\nObject.defineProperty(exports, \"ChildWorkflowFailure\", { enumerable: true, get: function () { return common_1.ChildWorkflowFailure; } });\nObject.defineProperty(exports, \"defaultPayloadConverter\", { enumerable: true, get: function () { return common_1.defaultPayloadConverter; } });\nObject.defineProperty(exports, \"rootCause\", { enumerable: true, get: function () { return common_1.rootCause; } });\nObject.defineProperty(exports, \"ServerFailure\", { enumerable: true, get: function () { return common_1.ServerFailure; } });\nObject.defineProperty(exports, \"TemporalFailure\", { enumerable: true, get: function () { return common_1.TemporalFailure; } });\nObject.defineProperty(exports, \"TerminatedFailure\", { enumerable: true, get: function () { return common_1.TerminatedFailure; } });\nObject.defineProperty(exports, \"TimeoutFailure\", { enumerable: true, get: function () { return common_1.TimeoutFailure; } });\n__exportStar(require(\"@temporalio/common/lib/errors\"), exports);\n__exportStar(require(\"@temporalio/common/lib/workflow-handle\"), exports);\n__exportStar(require(\"@temporalio/common/lib/workflow-options\"), exports);\nvar cancellation_scope_1 = require(\"./cancellation-scope\");\nObject.defineProperty(exports, \"AsyncLocalStorage\", { enumerable: true, get: function () { return cancellation_scope_1.AsyncLocalStorage; } });\nObject.defineProperty(exports, \"CancellationScope\", { enumerable: true, get: function () { return cancellation_scope_1.CancellationScope; } });\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./interceptors\"), exports);\nvar interfaces_1 = require(\"./interfaces\");\nObject.defineProperty(exports, \"ChildWorkflowCancellationType\", { enumerable: true, get: function () { return interfaces_1.ChildWorkflowCancellationType; } });\nObject.defineProperty(exports, \"ContinueAsNew\", { enumerable: true, get: function () { return interfaces_1.ContinueAsNew; } });\nObject.defineProperty(exports, \"ParentClosePolicy\", { enumerable: true, get: function () { return interfaces_1.ParentClosePolicy; } });\nvar sinks_1 = require(\"./sinks\");\nObject.defineProperty(exports, \"proxySinks\", { enumerable: true, get: function () { return sinks_1.proxySinks; } });\nvar random_streams_1 = require(\"./random-streams\");\nObject.defineProperty(exports, \"getRandomStream\", { enumerable: true, get: function () { return random_streams_1.getRandomStream; } });\nObject.defineProperty(exports, \"workflowRandom\", { enumerable: true, get: function () { return random_streams_1.workflowRandom; } });\nvar logs_1 = require(\"./logs\");\nObject.defineProperty(exports, \"log\", { enumerable: true, get: function () { return logs_1.log; } });\nvar trigger_1 = require(\"./trigger\");\nObject.defineProperty(exports, \"Trigger\", { enumerable: true, get: function () { return trigger_1.Trigger; } });\n__exportStar(require(\"./workflow\"), exports);\nvar metrics_1 = require(\"./metrics\");\nObject.defineProperty(exports, \"metricMeter\", { enumerable: true, get: function () { return metrics_1.metricMeter; } });\nvar nexus_1 = require(\"./nexus\");\nObject.defineProperty(exports, \"createNexusServiceClient\", { enumerable: true, get: function () { return nexus_1.createNexusServiceClient; } });\nObject.defineProperty(exports, \"NexusOperationCancellationType\", { enumerable: true, get: function () { return nexus_1.NexusOperationCancellationType; } });\n//# sourceMappingURL=index.js.map","// This file runs inside the Temporal workflow V8 sandbox.\n// Constraints: no I/O, no crypto.randomUUID(), no Date.now(), no require().\n// It must be a standalone entry point so Temporal can bundle it separately.\n// Temporal injects a deterministic AsyncLocalStorage into the sandbox global\n// scope and re-exports it here (the same one its own UpdateScope/CancellationScope\n// rely on), so this import is replay-safe — unlike node:async_hooks directly.\nimport {\n AsyncLocalStorage,\n type Headers,\n type WorkflowInterceptors,\n} from \"@temporalio/workflow\";\n\nimport { LAMINAR_SPAN_CONTEXT_HEADER, TRACEPARENT_HEADER } from \"./consts\";\n\n// True when the headers map actually carries an injected Laminar / W3C trace\n// context. A signal or update may arrive with no injected context (empty or\n// undefined headers); in that case we must NOT enter the handler-headers scope,\n// or `activeHeaders()` would resolve to that empty map and drop the\n// workflow-start trace from any activity / child-workflow scheduled inside the\n// handler.\nconst hasTraceHeaders = (headers: Headers): boolean =>\n headers[LAMINAR_SPAN_CONTEXT_HEADER] != null ||\n headers[TRACEPARENT_HEADER] != null;\n\n// Trace headers from the workflow-start call. Module-level storage is\n// per-workflow-sandbox — each workflow execution gets its own V8 module\n// instance, so there is no cross-contamination between concurrent workflows on\n// the same worker.\nlet _startHeaders: Headers = {};\n\n// Trace headers scoped to the currently-running signal/update handler\n// coroutine. The client `signal` / `startUpdate` interceptors inject their own\n// context, distinct from the workflow-start trace; activities scheduled from\n// inside such a handler must be parented to the handler's trace, not the\n// workflow-start one. Each handler runs as its own coroutine, so\n// AsyncLocalStorage keeps its headers isolated from the main workflow path and\n// from other concurrent handlers — overwriting the shared `_startHeaders` would\n// corrupt those interleaved paths.\nconst _handlerHeaders = new AsyncLocalStorage<Headers>();\n\n// The trace headers that outbound calls should propagate from: the active\n// signal/update handler's headers when one is running, otherwise the\n// workflow-start headers.\nconst activeHeaders = (): Headers =>\n _handlerHeaders.getStore() ?? _startHeaders;\n\n\nexport const interceptors = (): WorkflowInterceptors => ({\n inbound: [\n {\n execute: async (input, next) => {\n _startHeaders = input.headers ?? {};\n return next(input);\n },\n handleSignal: async (input, next) => {\n const headers = input.headers ?? {};\n // Only override the active trace when the signal carried its own\n // context — otherwise fall through to the workflow-start headers.\n return hasTraceHeaders(headers)\n ? _handlerHeaders.run(headers, () => next(input))\n : next(input);\n },\n handleUpdate: async (input, next) => {\n const headers = input.headers ?? {};\n // Only override the active trace when the update carried its own\n // context — otherwise fall through to the workflow-start headers.\n return hasTraceHeaders(headers)\n ? _handlerHeaders.run(headers, () => next(input))\n : next(input);\n },\n },\n ],\n outbound: [\n {\n scheduleActivity: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n scheduleLocalActivity: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n startChildWorkflowExecution: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n continueAsNew: async (input, next) =>\n next({\n ...input,\n headers: { ...activeHeaders(), ...input.headers },\n }),\n },\n ],\n});\n\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],"mappings":";;;;;CAGA,OAAO,eAAe,SAAS,cAAc,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