react-server-dom-turbopack 19.2.7 → 19.2.9

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.
@@ -11,12 +11,17 @@
11
11
  "use strict";
12
12
  var ReactDOM = require("react-dom"),
13
13
  React = require("react"),
14
+ hasOwnProperty = Object.prototype.hasOwnProperty,
14
15
  channel = new MessageChannel(),
15
16
  taskQueue = [];
16
17
  channel.port1.onmessage = function () {
17
18
  var task = taskQueue.shift();
18
19
  task && task();
19
20
  };
21
+ var supportsArrayBufferDetached = hasOwnProperty.call(
22
+ ArrayBuffer.prototype,
23
+ "detached"
24
+ );
20
25
  function scheduleWork(callback) {
21
26
  taskQueue.push(callback);
22
27
  channel.port2.postMessage(null);
@@ -38,28 +43,30 @@ var LocalPromise = Promise,
38
43
  currentView = null,
39
44
  writtenBytes = 0;
40
45
  function writeChunkAndReturn(destination, chunk) {
41
- if (0 !== chunk.byteLength)
42
- if (2048 < chunk.byteLength)
43
- 0 < writtenBytes &&
44
- (destination.enqueue(
45
- new Uint8Array(currentView.buffer, 0, writtenBytes)
46
- ),
47
- (currentView = new Uint8Array(2048)),
48
- (writtenBytes = 0)),
49
- destination.enqueue(chunk);
50
- else {
51
- var allowableBytes = currentView.length - writtenBytes;
52
- allowableBytes < chunk.byteLength &&
53
- (0 === allowableBytes
54
- ? destination.enqueue(currentView)
55
- : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
56
- destination.enqueue(currentView),
57
- (chunk = chunk.subarray(allowableBytes))),
58
- (currentView = new Uint8Array(2048)),
59
- (writtenBytes = 0));
60
- currentView.set(chunk, writtenBytes);
61
- writtenBytes += chunk.byteLength;
62
- }
46
+ if (0 === chunk.byteLength) {
47
+ if (supportsArrayBufferDetached && chunk.buffer.detached)
48
+ throw Error(
49
+ "Cannot transport a detached buffer. This usually happens when trying to transport multiple buffer-spanning views on the same underyling buffer. Either reuse the exact same view by identity or copy the underlying buffer manually via `view.slice()`."
50
+ );
51
+ } else if (2048 < chunk.byteLength)
52
+ 0 < writtenBytes &&
53
+ (destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)),
54
+ (currentView = new Uint8Array(2048)),
55
+ (writtenBytes = 0)),
56
+ destination.enqueue(chunk);
57
+ else {
58
+ var allowableBytes = currentView.length - writtenBytes;
59
+ allowableBytes < chunk.byteLength &&
60
+ (0 === allowableBytes
61
+ ? destination.enqueue(currentView)
62
+ : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
63
+ destination.enqueue(currentView),
64
+ (chunk = chunk.subarray(allowableBytes))),
65
+ (currentView = new Uint8Array(2048)),
66
+ (writtenBytes = 0));
67
+ currentView.set(chunk, writtenBytes);
68
+ writtenBytes += chunk.byteLength;
69
+ }
63
70
  return !0;
64
71
  }
65
72
  var textEncoder = new TextEncoder();
@@ -823,8 +830,7 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) {
823
830
  "\n " + str + "\n " + objectOrArray)
824
831
  : "\n " + str;
825
832
  }
826
- var hasOwnProperty = Object.prototype.hasOwnProperty,
827
- ObjectPrototype$1 = Object.prototype,
833
+ var ObjectPrototype$1 = Object.prototype,
828
834
  stringify = JSON.stringify;
829
835
  function defaultErrorHandler(error) {
830
836
  console.error(error);
@@ -1052,7 +1058,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
1052
1058
  erroredTask(request, streamTask, reason),
1053
1059
  enqueueFlush(request),
1054
1060
  "function" === typeof iterator.throw &&
1055
- iterator.throw(reason).then(error, error));
1061
+ iterator.throw(reason).then(noop, noop));
1056
1062
  }
1057
1063
  function abortIterable() {
1058
1064
  if (0 === streamTask.status) {
@@ -1066,7 +1072,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
1066
1072
  : (erroredTask(request, streamTask, signal.reason),
1067
1073
  enqueueFlush(request));
1068
1074
  "function" === typeof iterator.throw &&
1069
- iterator.throw(reason).then(error, error);
1075
+ iterator.throw(reason).then(noop, noop);
1070
1076
  }
1071
1077
  }
1072
1078
  iterable = iterable === iterator;
@@ -1845,12 +1851,28 @@ function emitModelChunk(request, id, json) {
1845
1851
  }
1846
1852
  function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
1847
1853
  debug ? request.pendingDebugChunks++ : request.pendingChunks++;
1848
- debug = new Uint8Array(
1849
- typedArray.buffer,
1850
- typedArray.byteOffset,
1851
- typedArray.byteLength
1852
- );
1853
- typedArray = 2048 < typedArray.byteLength ? debug.slice() : debug;
1854
+ a: {
1855
+ debug = new Uint8Array(
1856
+ typedArray.buffer,
1857
+ typedArray.byteOffset,
1858
+ typedArray.byteLength
1859
+ );
1860
+ if (2048 < typedArray.byteLength) {
1861
+ if (
1862
+ 0 !== typedArray.byteOffset ||
1863
+ typedArray.byteLength !== typedArray.buffer.byteLength ||
1864
+ typedArray.buffer.resizable
1865
+ ) {
1866
+ typedArray = debug.slice();
1867
+ break a;
1868
+ }
1869
+ if (!supportsArrayBufferDetached) {
1870
+ typedArray = debug.slice();
1871
+ break a;
1872
+ }
1873
+ }
1874
+ typedArray = debug;
1875
+ }
1854
1876
  debug = typedArray.byteLength;
1855
1877
  id = id.toString(16) + ":" + tag + debug.toString(16) + ",";
1856
1878
  id = stringToChunk(id);
@@ -2241,6 +2263,38 @@ function requireModule(metadata) {
2241
2263
  if (hasOwnProperty.call(moduleExports, metadata[2]))
2242
2264
  return moduleExports[metadata[2]];
2243
2265
  }
2266
+ function appendBackingEntry(backingStore, value, key) {
2267
+ var prefix = backingStore.prefix;
2268
+ if (key.startsWith(prefix)) {
2269
+ switch (key[prefix.length]) {
2270
+ case "_":
2271
+ prefix = backingStore.referencedEntries;
2272
+ null === prefix && (prefix = backingStore.referencedEntries = []);
2273
+ prefix.push([key, value]);
2274
+ return;
2275
+ case "S":
2276
+ "string" === typeof value &&
2277
+ ((prefix = backingStore.streamChunks),
2278
+ null === prefix && (prefix = backingStore.streamChunks = new Map()),
2279
+ (backingStore = prefix.get(key)),
2280
+ void 0 === backingStore
2281
+ ? prefix.set(key, [value])
2282
+ : backingStore.push(value));
2283
+ return;
2284
+ }
2285
+ "string" === typeof value
2286
+ ? ((prefix = backingStore.stringChunks),
2287
+ null === prefix && (prefix = backingStore.stringChunks = new Map()),
2288
+ prefix.set(key, value))
2289
+ : ((prefix = backingStore.blobs),
2290
+ null === prefix && (prefix = backingStore.blobs = new Map()),
2291
+ prefix.set(key, value));
2292
+ }
2293
+ }
2294
+ function getBackingBlob(backingStore, key) {
2295
+ backingStore = backingStore.blobs;
2296
+ return null === backingStore ? void 0 : backingStore.get(key);
2297
+ }
2244
2298
  var RESPONSE_SYMBOL = Symbol();
2245
2299
  function ReactPromise(status, value, reason) {
2246
2300
  this.status = status;
@@ -2612,15 +2666,18 @@ function reportGlobalError(response, error) {
2612
2666
  function getChunk(response, id) {
2613
2667
  var chunks = response._chunks,
2614
2668
  chunk = chunks.get(id);
2615
- chunk ||
2616
- ((chunk = response._formData.data.get(response._prefix + id)),
2617
- (chunk =
2669
+ if (!chunk) {
2670
+ chunk = response._prefix;
2671
+ var stringChunks = response._formData.stringChunks;
2672
+ chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
2673
+ chunk =
2618
2674
  "string" === typeof chunk
2619
2675
  ? createResolvedModelChunk(response, chunk, id)
2620
2676
  : response._closed
2621
2677
  ? new ReactPromise("rejected", null, response._closedReason)
2622
- : new ReactPromise("pending", null, null)),
2623
- chunks.set(id, chunk));
2678
+ : new ReactPromise("pending", null, null);
2679
+ chunks.set(id, chunk);
2680
+ }
2624
2681
  return chunk;
2625
2682
  }
2626
2683
  function fulfillReference(response, reference, value, arrayRoot) {
@@ -2851,7 +2908,7 @@ function parseTypedArray(
2851
2908
  Error("Already initialized typed array.")
2852
2909
  )
2853
2910
  );
2854
- reference = response._formData.data.get(key).arrayBuffer();
2911
+ reference = getBackingBlob(response._formData, key).arrayBuffer();
2855
2912
  if (initializingHandler) {
2856
2913
  var handler = initializingHandler;
2857
2914
  handler.deps++;
@@ -2895,13 +2952,15 @@ function resolveStream(response, id, stream, controller) {
2895
2952
  var chunks = response._chunks;
2896
2953
  stream = new ReactPromise("fulfilled", stream, controller);
2897
2954
  chunks.set(id, stream);
2898
- response = response._formData.data.getAll(response._prefix + id);
2899
- for (id = 0; id < response.length; id++)
2900
- (chunks = response[id]),
2901
- "string" === typeof chunks &&
2902
- ("C" === chunks[0]
2955
+ chunks = response._prefix;
2956
+ response = response._formData.streamChunks;
2957
+ id = null === response ? void 0 : response.get(chunks + "S" + id);
2958
+ if (void 0 !== id)
2959
+ for (response = 0; response < id.length; response++)
2960
+ (chunks = id[response]),
2961
+ "C" === chunks[0]
2903
2962
  ? controller.close("C" === chunks ? '"$undefined"' : chunks.slice(1))
2904
- : controller.enqueueModel(chunks));
2963
+ : controller.enqueueModel(chunks);
2905
2964
  }
2906
2965
  function parseReadableStream(response, reference, type) {
2907
2966
  function enqueue(value) {
@@ -3067,7 +3126,14 @@ function parseAsyncIterable(response, reference, iterator) {
3067
3126
  });
3068
3127
  return iterator;
3069
3128
  }
3070
- function parseModelString(response, obj, key, value, reference, arrayRoot) {
3129
+ function parseModelString(
3130
+ response,
3131
+ obj,
3132
+ key$jscomp$0,
3133
+ value,
3134
+ reference,
3135
+ arrayRoot
3136
+ ) {
3071
3137
  if ("$" === value[0]) {
3072
3138
  switch (value[1]) {
3073
3139
  case "$":
@@ -3085,7 +3151,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3085
3151
  response,
3086
3152
  arrayRoot,
3087
3153
  obj,
3088
- key,
3154
+ key$jscomp$0,
3089
3155
  null,
3090
3156
  loadServerReference$1
3091
3157
  )
@@ -3102,43 +3168,55 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3102
3168
  case "Q":
3103
3169
  return (
3104
3170
  (arrayRoot = value.slice(2)),
3105
- getOutlinedModel(response, arrayRoot, obj, key, null, createMap)
3171
+ getOutlinedModel(
3172
+ response,
3173
+ arrayRoot,
3174
+ obj,
3175
+ key$jscomp$0,
3176
+ null,
3177
+ createMap
3178
+ )
3106
3179
  );
3107
3180
  case "W":
3108
3181
  return (
3109
3182
  (arrayRoot = value.slice(2)),
3110
- getOutlinedModel(response, arrayRoot, obj, key, null, createSet)
3183
+ getOutlinedModel(
3184
+ response,
3185
+ arrayRoot,
3186
+ obj,
3187
+ key$jscomp$0,
3188
+ null,
3189
+ createSet
3190
+ )
3111
3191
  );
3112
3192
  case "K":
3113
- key = value.slice(2);
3114
- obj = response._prefix + "_";
3115
- key = obj + key + "_";
3116
- arrayRoot = new FormData();
3117
- for (response = response._formData; ; ) {
3118
- value = response.keys;
3119
- null === value &&
3120
- ((value = response.keys = Array.from(response.data.keys())),
3121
- (response.keyPointer = 0));
3122
- value = value[response.keyPointer];
3123
- if (void 0 === value) break;
3124
- if (value.startsWith(key)) {
3125
- reference = response.data.getAll(value);
3126
- for (
3127
- var referencedFormDataKey = value.slice(key.length), i = 0;
3128
- i < reference.length;
3129
- i++
3130
- )
3131
- arrayRoot.append(referencedFormDataKey, reference[i]);
3132
- response.data.delete(value);
3133
- response.keyPointer++;
3134
- } else if (value.startsWith(obj)) break;
3135
- else response.keyPointer++;
3193
+ obj = value.slice(2);
3194
+ obj = response._prefix + "_" + obj + "_";
3195
+ response = response._formData;
3196
+ key$jscomp$0 = new FormData();
3197
+ arrayRoot = response.referencedEntries;
3198
+ if (null !== arrayRoot) {
3199
+ for (value = response.keyPointer; value < arrayRoot.length; ) {
3200
+ reference = arrayRoot[value];
3201
+ var key = reference[0];
3202
+ if (!key.startsWith(obj)) break;
3203
+ key$jscomp$0.append(key.slice(obj.length), reference[1]);
3204
+ value++;
3205
+ }
3206
+ response.keyPointer = value;
3136
3207
  }
3137
- return arrayRoot;
3208
+ return key$jscomp$0;
3138
3209
  case "i":
3139
3210
  return (
3140
3211
  (arrayRoot = value.slice(2)),
3141
- getOutlinedModel(response, arrayRoot, obj, key, null, extractIterator)
3212
+ getOutlinedModel(
3213
+ response,
3214
+ arrayRoot,
3215
+ obj,
3216
+ key$jscomp$0,
3217
+ null,
3218
+ extractIterator
3219
+ )
3142
3220
  );
3143
3221
  case "I":
3144
3222
  return Infinity;
@@ -3167,7 +3245,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3167
3245
  ArrayBuffer,
3168
3246
  1,
3169
3247
  obj,
3170
- key,
3248
+ key$jscomp$0,
3171
3249
  arrayRoot
3172
3250
  );
3173
3251
  case "O":
@@ -3177,7 +3255,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3177
3255
  Int8Array,
3178
3256
  1,
3179
3257
  obj,
3180
- key,
3258
+ key$jscomp$0,
3181
3259
  arrayRoot
3182
3260
  );
3183
3261
  case "o":
@@ -3187,7 +3265,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3187
3265
  Uint8Array,
3188
3266
  1,
3189
3267
  obj,
3190
- key,
3268
+ key$jscomp$0,
3191
3269
  arrayRoot
3192
3270
  );
3193
3271
  case "U":
@@ -3197,7 +3275,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3197
3275
  Uint8ClampedArray,
3198
3276
  1,
3199
3277
  obj,
3200
- key,
3278
+ key$jscomp$0,
3201
3279
  arrayRoot
3202
3280
  );
3203
3281
  case "S":
@@ -3207,7 +3285,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3207
3285
  Int16Array,
3208
3286
  2,
3209
3287
  obj,
3210
- key,
3288
+ key$jscomp$0,
3211
3289
  arrayRoot
3212
3290
  );
3213
3291
  case "s":
@@ -3217,7 +3295,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3217
3295
  Uint16Array,
3218
3296
  2,
3219
3297
  obj,
3220
- key,
3298
+ key$jscomp$0,
3221
3299
  arrayRoot
3222
3300
  );
3223
3301
  case "L":
@@ -3227,7 +3305,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3227
3305
  Int32Array,
3228
3306
  4,
3229
3307
  obj,
3230
- key,
3308
+ key$jscomp$0,
3231
3309
  arrayRoot
3232
3310
  );
3233
3311
  case "l":
@@ -3237,7 +3315,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3237
3315
  Uint32Array,
3238
3316
  4,
3239
3317
  obj,
3240
- key,
3318
+ key$jscomp$0,
3241
3319
  arrayRoot
3242
3320
  );
3243
3321
  case "G":
@@ -3247,7 +3325,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3247
3325
  Float32Array,
3248
3326
  4,
3249
3327
  obj,
3250
- key,
3328
+ key$jscomp$0,
3251
3329
  arrayRoot
3252
3330
  );
3253
3331
  case "g":
@@ -3257,7 +3335,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3257
3335
  Float64Array,
3258
3336
  8,
3259
3337
  obj,
3260
- key,
3338
+ key$jscomp$0,
3261
3339
  arrayRoot
3262
3340
  );
3263
3341
  case "M":
@@ -3267,7 +3345,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3267
3345
  BigInt64Array,
3268
3346
  8,
3269
3347
  obj,
3270
- key,
3348
+ key$jscomp$0,
3271
3349
  arrayRoot
3272
3350
  );
3273
3351
  case "m":
@@ -3277,7 +3355,7 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3277
3355
  BigUint64Array,
3278
3356
  8,
3279
3357
  obj,
3280
- key,
3358
+ key$jscomp$0,
3281
3359
  arrayRoot
3282
3360
  );
3283
3361
  case "V":
@@ -3287,13 +3365,13 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3287
3365
  DataView,
3288
3366
  1,
3289
3367
  obj,
3290
- key,
3368
+ key$jscomp$0,
3291
3369
  arrayRoot
3292
3370
  );
3293
3371
  case "B":
3294
3372
  return (
3295
3373
  (obj = parseInt(value.slice(2), 16)),
3296
- response._formData.data.get(response._prefix + obj)
3374
+ getBackingBlob(response._formData, response._prefix + obj)
3297
3375
  );
3298
3376
  case "R":
3299
3377
  return parseReadableStream(response, value, void 0);
@@ -3305,7 +3383,14 @@ function parseModelString(response, obj, key, value, reference, arrayRoot) {
3305
3383
  return parseAsyncIterable(response, value, !0);
3306
3384
  }
3307
3385
  value = value.slice(1);
3308
- return getOutlinedModel(response, value, obj, key, arrayRoot, createModel);
3386
+ return getOutlinedModel(
3387
+ response,
3388
+ value,
3389
+ obj,
3390
+ key$jscomp$0,
3391
+ arrayRoot,
3392
+ createModel
3393
+ );
3309
3394
  }
3310
3395
  null !== arrayRoot && bumpArrayCount(arrayRoot, value.length, response);
3311
3396
  return value;
@@ -3317,11 +3402,20 @@ function createResponse(bundlerConfig, formFieldPrefix, temporaryReferences) {
3317
3402
  : new FormData(),
3318
3403
  arraySizeLimit =
3319
3404
  4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
3320
- chunks = new Map();
3405
+ chunks = new Map(),
3406
+ backingStore = {
3407
+ prefix: formFieldPrefix,
3408
+ referencedEntries: null,
3409
+ keyPointer: 0,
3410
+ stringChunks: null,
3411
+ streamChunks: null,
3412
+ blobs: null
3413
+ };
3414
+ backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
3321
3415
  return {
3322
3416
  _bundlerConfig: bundlerConfig,
3323
3417
  _prefix: formFieldPrefix,
3324
- _formData: { data: backingFormData, keyPointer: -1, keys: null },
3418
+ _formData: backingStore,
3325
3419
  _chunks: chunks,
3326
3420
  _closed: !1,
3327
3421
  _closedReason: null,
@@ -3385,44 +3479,41 @@ exports.createTemporaryReferenceSet = function () {
3385
3479
  };
3386
3480
  exports.decodeAction = function (body, serverManifest) {
3387
3481
  var formData = new FormData(),
3388
- action = null,
3389
- seenActions = new Set();
3482
+ maybeActionKey = null;
3390
3483
  body.forEach(function (value, key) {
3391
3484
  key.startsWith("$ACTION_")
3392
3485
  ? key.startsWith("$ACTION_REF_")
3393
- ? seenActions.has(key) ||
3394
- (seenActions.add(key),
3395
- (value = "$ACTION_" + key.slice(12) + ":"),
3396
- (value = decodeBoundActionMetaData(body, serverManifest, value)),
3397
- (action = loadServerReference(serverManifest, value)))
3398
- : key.startsWith("$ACTION_ID_") &&
3399
- !seenActions.has(key) &&
3400
- (seenActions.add(key),
3401
- (value = key.slice(11)),
3402
- (action = loadServerReference(serverManifest, {
3403
- id: value,
3404
- bound: null
3405
- })))
3486
+ ? (maybeActionKey = key)
3487
+ : key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
3406
3488
  : formData.append(key, value);
3407
3489
  });
3408
- return null === action
3409
- ? null
3410
- : action.then(function (fn) {
3411
- return fn.bind(null, formData);
3412
- });
3490
+ if (null === maybeActionKey) return null;
3491
+ var actionKey = maybeActionKey,
3492
+ action = null;
3493
+ if (actionKey.startsWith("$ACTION_REF_"))
3494
+ (actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
3495
+ (body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
3496
+ (action = loadServerReference(serverManifest, body));
3497
+ else if (actionKey.startsWith("$ACTION_ID_"))
3498
+ (body = actionKey.slice(11)),
3499
+ (action = loadServerReference(serverManifest, { id: body, bound: null }));
3500
+ else throw Error("Cannot handle action key. This is a bug in React.");
3501
+ return action.then(function (fn) {
3502
+ return fn.bind(null, formData);
3503
+ });
3413
3504
  };
3414
3505
  exports.decodeFormState = function (actionResult, body, serverManifest) {
3415
3506
  var keyPath = body.get("$ACTION_KEY");
3416
3507
  if ("string" !== typeof keyPath) return Promise.resolve(null);
3417
- var metaData = null;
3508
+ var actionKey = null;
3418
3509
  body.forEach(function (value, key) {
3419
- key.startsWith("$ACTION_REF_") &&
3420
- ((value = "$ACTION_" + key.slice(12) + ":"),
3421
- (metaData = decodeBoundActionMetaData(body, serverManifest, value)));
3510
+ key.startsWith("$ACTION_REF_") && (actionKey = key);
3422
3511
  });
3423
- if (null === metaData) return Promise.resolve(null);
3424
- var referenceId = metaData.id;
3425
- return Promise.resolve(metaData.bound).then(function (bound) {
3512
+ if (null === actionKey) return Promise.resolve(null);
3513
+ var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
3514
+ body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
3515
+ var referenceId = body.id;
3516
+ return Promise.resolve(body.bound).then(function (bound) {
3426
3517
  return null === bound
3427
3518
  ? null
3428
3519
  : [actionResult, keyPath, referenceId, bound.length - 1];