houdini-svelte 2.1.0 → 2.1.1

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.
@@ -89817,7 +89817,18 @@ var ListManager = class {
89817
89817
  }
89818
89818
  lists = /* @__PURE__ */ new Map();
89819
89819
  listsByField = /* @__PURE__ */ new Map();
89820
- get(listName, id2, allLists) {
89820
+ get(listName, id2, allLists, skipMatches) {
89821
+ const lists = this.getLists(listName, id2, allLists);
89822
+ if (!lists) {
89823
+ return null;
89824
+ }
89825
+ if (skipMatches) {
89826
+ return new ListCollection(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
89827
+ } else {
89828
+ return lists;
89829
+ }
89830
+ }
89831
+ getLists(listName, id2, allLists) {
89821
89832
  const matches = this.lists.get(listName);
89822
89833
  if (!matches || matches.size === 0) {
89823
89834
  return null;
@@ -89939,6 +89950,9 @@ var List = class {
89939
89950
  this.manager = manager;
89940
89951
  this.abstract = abstract;
89941
89952
  }
89953
+ get fieldRef() {
89954
+ return `${this.recordID}.${this.key}`;
89955
+ }
89942
89956
  when(when) {
89943
89957
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
89944
89958
  }
@@ -91083,8 +91097,8 @@ var Cache = class {
91083
91097
  variables
91084
91098
  );
91085
91099
  }
91086
- list(name, parentID, allLists) {
91087
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
91100
+ list(name, parentID, allLists, skipMatches) {
91101
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
91088
91102
  if (!handler) {
91089
91103
  throw new Error(
91090
91104
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -91499,6 +91513,7 @@ var CacheInternal = class {
91499
91513
  });
91500
91514
  }
91501
91515
  }
91516
+ const processedOperations = /* @__PURE__ */ new Set();
91502
91517
  for (const operation of operations || []) {
91503
91518
  let parentID;
91504
91519
  if (operation.parentID) {
@@ -91518,7 +91533,12 @@ var CacheInternal = class {
91518
91533
  const targets = Array.isArray(value) ? value : [value];
91519
91534
  for (const target of targets) {
91520
91535
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
91521
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
91536
+ this.cache.list(
91537
+ operation.list,
91538
+ parentID,
91539
+ operation.target === "all",
91540
+ processedOperations
91541
+ ).when(operation.when).addToList(
91522
91542
  fieldSelection,
91523
91543
  target,
91524
91544
  variables,
@@ -91526,7 +91546,12 @@ var CacheInternal = class {
91526
91546
  layer
91527
91547
  );
91528
91548
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
91529
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
91549
+ this.cache.list(
91550
+ operation.list,
91551
+ parentID,
91552
+ operation.target === "all",
91553
+ processedOperations
91554
+ ).when(operation.when).toggleElement({
91530
91555
  selection: fieldSelection,
91531
91556
  data: target,
91532
91557
  variables,
@@ -91534,7 +91559,12 @@ var CacheInternal = class {
91534
91559
  layer
91535
91560
  });
91536
91561
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
91537
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
91562
+ this.cache.list(
91563
+ operation.list,
91564
+ parentID,
91565
+ operation.target === "all",
91566
+ processedOperations
91567
+ ).when(operation.when).remove(target, variables, layer);
91538
91568
  } else if (operation.action === "delete" && operation.type && target) {
91539
91569
  const targetID = this.id(operation.type, target);
91540
91570
  if (!targetID) {
@@ -91546,6 +91576,16 @@ var CacheInternal = class {
91546
91576
  this.cache.delete(targetID, layer);
91547
91577
  }
91548
91578
  }
91579
+ if (operation.list) {
91580
+ const matchingLists = this.cache.list(
91581
+ operation.list,
91582
+ parentID,
91583
+ operation.target === "all"
91584
+ );
91585
+ for (const list3 of matchingLists.lists) {
91586
+ processedOperations.add(list3.fieldRef);
91587
+ }
91588
+ }
91549
91589
  }
91550
91590
  }
91551
91591
  return toNotify;
@@ -93353,7 +93393,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
93353
93393
  }
93354
93394
 
93355
93395
  // src/plugin/transforms/index.ts
93356
- var recast20 = __toESM(require_main4(), 1);
93396
+ var recast21 = __toESM(require_main4(), 1);
93357
93397
 
93358
93398
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
93359
93399
  var WalkerBase2 = class {
@@ -129067,30 +129107,30 @@ var require_utils5 = __commonJS3({
129067
129107
  validate3.oneOf = values;
129068
129108
  return validate3;
129069
129109
  }
129070
- function assertNodeType(...types17) {
129110
+ function assertNodeType(...types18) {
129071
129111
  function validate3(node, key2, val) {
129072
- for (const type of types17) {
129112
+ for (const type of types18) {
129073
129113
  if ((0, _is.default)(type, val)) {
129074
129114
  (0, _validate.validateChild)(node, key2, val);
129075
129115
  return;
129076
129116
  }
129077
129117
  }
129078
- throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types17)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129118
+ throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129079
129119
  }
129080
- validate3.oneOfNodeTypes = types17;
129120
+ validate3.oneOfNodeTypes = types18;
129081
129121
  return validate3;
129082
129122
  }
129083
- function assertNodeOrValueType(...types17) {
129123
+ function assertNodeOrValueType(...types18) {
129084
129124
  function validate3(node, key2, val) {
129085
- for (const type of types17) {
129125
+ for (const type of types18) {
129086
129126
  if (getType(val) === type || (0, _is.default)(type, val)) {
129087
129127
  (0, _validate.validateChild)(node, key2, val);
129088
129128
  return;
129089
129129
  }
129090
129130
  }
129091
- throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types17)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129131
+ throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
129092
129132
  }
129093
- validate3.oneOfNodeOrValueTypes = types17;
129133
+ validate3.oneOfNodeOrValueTypes = types18;
129094
129134
  return validate3;
129095
129135
  }
129096
129136
  function assertValueType(type) {
@@ -133494,10 +133534,10 @@ var require_generated22 = __commonJS3({
133494
133534
  body
133495
133535
  });
133496
133536
  }
133497
- function intersectionTypeAnnotation(types17) {
133537
+ function intersectionTypeAnnotation(types18) {
133498
133538
  return (0, _validateNode.default)({
133499
133539
  type: "IntersectionTypeAnnotation",
133500
- types: types17
133540
+ types: types18
133501
133541
  });
133502
133542
  }
133503
133543
  function mixedTypeAnnotation() {
@@ -133620,10 +133660,10 @@ var require_generated22 = __commonJS3({
133620
133660
  type: "ThisTypeAnnotation"
133621
133661
  };
133622
133662
  }
133623
- function tupleTypeAnnotation(types17) {
133663
+ function tupleTypeAnnotation(types18) {
133624
133664
  return (0, _validateNode.default)({
133625
133665
  type: "TupleTypeAnnotation",
133626
- types: types17
133666
+ types: types18
133627
133667
  });
133628
133668
  }
133629
133669
  function typeofTypeAnnotation(argument) {
@@ -133674,10 +133714,10 @@ var require_generated22 = __commonJS3({
133674
133714
  params
133675
133715
  });
133676
133716
  }
133677
- function unionTypeAnnotation(types17) {
133717
+ function unionTypeAnnotation(types18) {
133678
133718
  return (0, _validateNode.default)({
133679
133719
  type: "UnionTypeAnnotation",
133680
- types: types17
133720
+ types: types18
133681
133721
  });
133682
133722
  }
133683
133723
  function variance(kind) {
@@ -134190,16 +134230,16 @@ var require_generated22 = __commonJS3({
134190
134230
  optional
134191
134231
  });
134192
134232
  }
134193
- function tsUnionType(types17) {
134233
+ function tsUnionType(types18) {
134194
134234
  return (0, _validateNode.default)({
134195
134235
  type: "TSUnionType",
134196
- types: types17
134236
+ types: types18
134197
134237
  });
134198
134238
  }
134199
- function tsIntersectionType(types17) {
134239
+ function tsIntersectionType(types18) {
134200
134240
  return (0, _validateNode.default)({
134201
134241
  type: "TSIntersectionType",
134202
- types: types17
134242
+ types: types18
134203
134243
  });
134204
134244
  }
134205
134245
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -135800,12 +135840,12 @@ var require_removeTypeDuplicates3 = __commonJS3({
135800
135840
  const generics = /* @__PURE__ */ new Map();
135801
135841
  const bases = /* @__PURE__ */ new Map();
135802
135842
  const typeGroups = /* @__PURE__ */ new Set();
135803
- const types17 = [];
135843
+ const types18 = [];
135804
135844
  for (let i22 = 0; i22 < nodes.length; i22++) {
135805
135845
  const node = nodes[i22];
135806
135846
  if (!node)
135807
135847
  continue;
135808
- if (types17.indexOf(node) >= 0) {
135848
+ if (types18.indexOf(node) >= 0) {
135809
135849
  continue;
135810
135850
  }
135811
135851
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -135839,15 +135879,15 @@ var require_removeTypeDuplicates3 = __commonJS3({
135839
135879
  }
135840
135880
  continue;
135841
135881
  }
135842
- types17.push(node);
135882
+ types18.push(node);
135843
135883
  }
135844
135884
  for (const [, baseType] of bases) {
135845
- types17.push(baseType);
135885
+ types18.push(baseType);
135846
135886
  }
135847
135887
  for (const [, genericName] of generics) {
135848
- types17.push(genericName);
135888
+ types18.push(genericName);
135849
135889
  }
135850
- return types17;
135890
+ return types18;
135851
135891
  }
135852
135892
  }
135853
135893
  });
@@ -135860,8 +135900,8 @@ var require_createFlowUnionType2 = __commonJS3({
135860
135900
  exports.default = createFlowUnionType;
135861
135901
  var _generated = require_generated22();
135862
135902
  var _removeTypeDuplicates = require_removeTypeDuplicates3();
135863
- function createFlowUnionType(types17) {
135864
- const flattened = (0, _removeTypeDuplicates.default)(types17);
135903
+ function createFlowUnionType(types18) {
135904
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
135865
135905
  if (flattened.length === 1) {
135866
135906
  return flattened[0];
135867
135907
  } else {
@@ -135886,12 +135926,12 @@ var require_removeTypeDuplicates22 = __commonJS3({
135886
135926
  const generics = /* @__PURE__ */ new Map();
135887
135927
  const bases = /* @__PURE__ */ new Map();
135888
135928
  const typeGroups = /* @__PURE__ */ new Set();
135889
- const types17 = [];
135929
+ const types18 = [];
135890
135930
  for (let i22 = 0; i22 < nodes.length; i22++) {
135891
135931
  const node = nodes[i22];
135892
135932
  if (!node)
135893
135933
  continue;
135894
- if (types17.indexOf(node) >= 0) {
135934
+ if (types18.indexOf(node) >= 0) {
135895
135935
  continue;
135896
135936
  }
135897
135937
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -135925,15 +135965,15 @@ var require_removeTypeDuplicates22 = __commonJS3({
135925
135965
  }
135926
135966
  continue;
135927
135967
  }
135928
- types17.push(node);
135968
+ types18.push(node);
135929
135969
  }
135930
135970
  for (const [, baseType] of bases) {
135931
- types17.push(baseType);
135971
+ types18.push(baseType);
135932
135972
  }
135933
135973
  for (const [, genericName] of generics) {
135934
- types17.push(genericName);
135974
+ types18.push(genericName);
135935
135975
  }
135936
- return types17;
135976
+ return types18;
135937
135977
  }
135938
135978
  }
135939
135979
  });
@@ -135948,10 +135988,10 @@ var require_createTSUnionType2 = __commonJS3({
135948
135988
  var _removeTypeDuplicates = require_removeTypeDuplicates22();
135949
135989
  var _index = require_generated5();
135950
135990
  function createTSUnionType(typeAnnotations) {
135951
- const types17 = typeAnnotations.map((type) => {
135991
+ const types18 = typeAnnotations.map((type) => {
135952
135992
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
135953
135993
  });
135954
- const flattened = (0, _removeTypeDuplicates.default)(types17);
135994
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
135955
135995
  if (flattened.length === 1) {
135956
135996
  return flattened[0];
135957
135997
  } else {
@@ -140215,14 +140255,14 @@ var require_lib62 = __commonJS3({
140215
140255
  this.preserveSpace = !!preserveSpace;
140216
140256
  }
140217
140257
  };
140218
- var types17 = {
140258
+ var types18 = {
140219
140259
  brace: new TokContext3("{"),
140220
140260
  j_oTag: new TokContext3("<tag"),
140221
140261
  j_cTag: new TokContext3("</tag"),
140222
140262
  j_expr: new TokContext3("<tag>...</tag>", true)
140223
140263
  };
140224
140264
  {
140225
- types17.template = new TokContext3("`", true);
140265
+ types18.template = new TokContext3("`", true);
140226
140266
  }
140227
140267
  var beforeExpr2 = true;
140228
140268
  var startsExpr2 = true;
@@ -140760,17 +140800,17 @@ var require_lib62 = __commonJS3({
140760
140800
  context.pop();
140761
140801
  };
140762
140802
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
140763
- context.push(types17.brace);
140803
+ context.push(types18.brace);
140764
140804
  };
140765
140805
  tokenTypes[22].updateContext = (context) => {
140766
- if (context[context.length - 1] === types17.template) {
140806
+ if (context[context.length - 1] === types18.template) {
140767
140807
  context.pop();
140768
140808
  } else {
140769
- context.push(types17.template);
140809
+ context.push(types18.template);
140770
140810
  }
140771
140811
  };
140772
140812
  tokenTypes[142].updateContext = (context) => {
140773
- context.push(types17.j_expr, types17.j_oTag);
140813
+ context.push(types18.j_expr, types18.j_oTag);
140774
140814
  };
140775
140815
  }
140776
140816
  var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -141330,7 +141370,7 @@ var require_lib62 = __commonJS3({
141330
141370
  this.end = 0;
141331
141371
  this.lastTokEndLoc = null;
141332
141372
  this.lastTokStartLoc = null;
141333
- this.context = [types17.brace];
141373
+ this.context = [types18.brace];
141334
141374
  this.firstInvalidTemplateEscapePos = null;
141335
141375
  this.strictErrors = /* @__PURE__ */ new Map();
141336
141376
  this.tokensLength = 0;
@@ -145157,7 +145197,7 @@ var require_lib62 = __commonJS3({
145157
145197
  context
145158
145198
  } = this.state;
145159
145199
  const currentContext = context[context.length - 1];
145160
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
145200
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
145161
145201
  context.pop();
145162
145202
  }
145163
145203
  }
@@ -146179,9 +146219,9 @@ var require_lib62 = __commonJS3({
146179
146219
  switch (this.state.type) {
146180
146220
  case 5:
146181
146221
  node = this.startNode();
146182
- this.setContext(types17.brace);
146222
+ this.setContext(types18.brace);
146183
146223
  this.next();
146184
- node = this.jsxParseExpressionContainer(node, types17.j_oTag);
146224
+ node = this.jsxParseExpressionContainer(node, types18.j_oTag);
146185
146225
  if (node.expression.type === "JSXEmptyExpression") {
146186
146226
  this.raise(JsxErrors.AttributeIsEmpty, node);
146187
146227
  }
@@ -146200,7 +146240,7 @@ var require_lib62 = __commonJS3({
146200
146240
  jsxParseSpreadChild(node) {
146201
146241
  this.next();
146202
146242
  node.expression = this.parseExpression();
146203
- this.setContext(types17.j_expr);
146243
+ this.setContext(types18.j_expr);
146204
146244
  this.state.canStartJSXElement = true;
146205
146245
  this.expect(8);
146206
146246
  return this.finishNode(node, "JSXSpreadChild");
@@ -146220,11 +146260,11 @@ var require_lib62 = __commonJS3({
146220
146260
  jsxParseAttribute() {
146221
146261
  const node = this.startNode();
146222
146262
  if (this.match(5)) {
146223
- this.setContext(types17.brace);
146263
+ this.setContext(types18.brace);
146224
146264
  this.next();
146225
146265
  this.expect(21);
146226
146266
  node.argument = this.parseMaybeAssignAllowIn();
146227
- this.setContext(types17.j_oTag);
146267
+ this.setContext(types18.j_oTag);
146228
146268
  this.state.canStartJSXElement = true;
146229
146269
  this.expect(8);
146230
146270
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -146283,12 +146323,12 @@ var require_lib62 = __commonJS3({
146283
146323
  break;
146284
146324
  case 5: {
146285
146325
  const node2 = this.startNode();
146286
- this.setContext(types17.brace);
146326
+ this.setContext(types18.brace);
146287
146327
  this.next();
146288
146328
  if (this.match(21)) {
146289
146329
  children.push(this.jsxParseSpreadChild(node2));
146290
146330
  } else {
146291
- children.push(this.jsxParseExpressionContainer(node2, types17.j_expr));
146331
+ children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
146292
146332
  }
146293
146333
  break;
146294
146334
  }
@@ -146353,11 +146393,11 @@ var require_lib62 = __commonJS3({
146353
146393
  }
146354
146394
  getTokenFromCode(code2) {
146355
146395
  const context = this.curContext();
146356
- if (context === types17.j_expr) {
146396
+ if (context === types18.j_expr) {
146357
146397
  this.jsxReadToken();
146358
146398
  return;
146359
146399
  }
146360
- if (context === types17.j_oTag || context === types17.j_cTag) {
146400
+ if (context === types18.j_oTag || context === types18.j_cTag) {
146361
146401
  if (isIdentifierStart2(code2)) {
146362
146402
  this.jsxReadWord();
146363
146403
  return;
@@ -146367,7 +146407,7 @@ var require_lib62 = __commonJS3({
146367
146407
  this.finishToken(143);
146368
146408
  return;
146369
146409
  }
146370
- if ((code2 === 34 || code2 === 39) && context === types17.j_oTag) {
146410
+ if ((code2 === 34 || code2 === 39) && context === types18.j_oTag) {
146371
146411
  this.jsxReadString(code2);
146372
146412
  return;
146373
146413
  }
@@ -146385,17 +146425,17 @@ var require_lib62 = __commonJS3({
146385
146425
  type
146386
146426
  } = this.state;
146387
146427
  if (type === 56 && prevType === 142) {
146388
- context.splice(-2, 2, types17.j_cTag);
146428
+ context.splice(-2, 2, types18.j_cTag);
146389
146429
  this.state.canStartJSXElement = false;
146390
146430
  } else if (type === 142) {
146391
- context.push(types17.j_oTag);
146431
+ context.push(types18.j_oTag);
146392
146432
  } else if (type === 143) {
146393
146433
  const out = context[context.length - 1];
146394
- if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
146434
+ if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
146395
146435
  context.pop();
146396
- this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
146436
+ this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
146397
146437
  } else {
146398
- this.setContext(types17.j_expr);
146438
+ this.setContext(types18.j_expr);
146399
146439
  this.state.canStartJSXElement = true;
146400
146440
  }
146401
146441
  } else {
@@ -147770,14 +147810,14 @@ var require_lib62 = __commonJS3({
147770
147810
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
147771
147811
  const node = this.startNode();
147772
147812
  const hasLeadingOperator = this.eat(operator);
147773
- const types18 = [];
147813
+ const types19 = [];
147774
147814
  do {
147775
- types18.push(parseConstituentType());
147815
+ types19.push(parseConstituentType());
147776
147816
  } while (this.eat(operator));
147777
- if (types18.length === 1 && !hasLeadingOperator) {
147778
- return types18[0];
147817
+ if (types19.length === 1 && !hasLeadingOperator) {
147818
+ return types19[0];
147779
147819
  }
147780
- node.types = types18;
147820
+ node.types = types19;
147781
147821
  return this.finishNode(node, kind);
147782
147822
  }
147783
147823
  tsParseIntersectionTypeOrHigher() {
@@ -148341,7 +148381,7 @@ var require_lib62 = __commonJS3({
148341
148381
  }));
148342
148382
  if (node.params.length === 0) {
148343
148383
  this.raise(TSErrors.EmptyTypeArguments, node);
148344
- } else if (!this.state.inType && this.curContext() === types17.brace) {
148384
+ } else if (!this.state.inType && this.curContext() === types18.brace) {
148345
148385
  this.reScan_lt_gt();
148346
148386
  }
148347
148387
  this.expect(48);
@@ -148967,7 +149007,7 @@ var require_lib62 = __commonJS3({
148967
149007
  context
148968
149008
  } = this.state;
148969
149009
  const currentContext = context[context.length - 1];
148970
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
149010
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
148971
149011
  context.pop();
148972
149012
  }
148973
149013
  }
@@ -154095,9 +154135,9 @@ var require_shared3 = __commonJS3({
154095
154135
  var tslib_1 = require_tslib3();
154096
154136
  var types_1 = tslib_1.__importDefault(require_types3());
154097
154137
  function default_1(fork) {
154098
- var types17 = fork.use(types_1.default);
154099
- var Type = types17.Type;
154100
- var builtin = types17.builtInTypes;
154138
+ var types18 = fork.use(types_1.default);
154139
+ var Type = types18.Type;
154140
+ var builtin = types18.builtInTypes;
154101
154141
  var isNumber = builtin.number;
154102
154142
  function geq(than) {
154103
154143
  return Type.from(function(value) {
@@ -154245,9 +154285,9 @@ var require_types3 = __commonJS3({
154245
154285
  }(BaseType);
154246
154286
  var OrType = function(_super) {
154247
154287
  tslib_1.__extends(OrType2, _super);
154248
- function OrType2(types17) {
154288
+ function OrType2(types18) {
154249
154289
  var _this = _super.call(this) || this;
154250
- _this.types = types17;
154290
+ _this.types = types18;
154251
154291
  _this.kind = "OrType";
154252
154292
  return _this;
154253
154293
  }
@@ -154388,11 +154428,11 @@ var require_types3 = __commonJS3({
154388
154428
  function typesPlugin(_fork) {
154389
154429
  var Type = {
154390
154430
  or: function() {
154391
- var types17 = [];
154431
+ var types18 = [];
154392
154432
  for (var _i = 0; _i < arguments.length; _i++) {
154393
- types17[_i] = arguments[_i];
154433
+ types18[_i] = arguments[_i];
154394
154434
  }
154395
- return new OrType(types17.map(function(type) {
154435
+ return new OrType(types18.map(function(type) {
154396
154436
  return Type.from(type);
154397
154437
  }));
154398
154438
  },
@@ -154835,9 +154875,9 @@ var require_path22 = __commonJS3({
154835
154875
  var Op = Object.prototype;
154836
154876
  var hasOwn2 = Op.hasOwnProperty;
154837
154877
  function pathPlugin(fork) {
154838
- var types17 = fork.use(types_1.default);
154839
- var isArray2 = types17.builtInTypes.array;
154840
- var isNumber = types17.builtInTypes.number;
154878
+ var types18 = fork.use(types_1.default);
154879
+ var isArray2 = types18.builtInTypes.array;
154880
+ var isNumber = types18.builtInTypes.number;
154841
154881
  var Path = function Path2(value, parentPath, name) {
154842
154882
  if (!(this instanceof Path2)) {
154843
154883
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -155137,13 +155177,13 @@ var require_scope3 = __commonJS3({
155137
155177
  var types_1 = tslib_1.__importDefault(require_types3());
155138
155178
  var hasOwn2 = Object.prototype.hasOwnProperty;
155139
155179
  function scopePlugin(fork) {
155140
- var types17 = fork.use(types_1.default);
155141
- var Type = types17.Type;
155142
- var namedTypes = types17.namedTypes;
155180
+ var types18 = fork.use(types_1.default);
155181
+ var Type = types18.Type;
155182
+ var namedTypes = types18.namedTypes;
155143
155183
  var Node3 = namedTypes.Node;
155144
155184
  var Expression = namedTypes.Expression;
155145
- var isArray2 = types17.builtInTypes.array;
155146
- var b2 = types17.builders;
155185
+ var isArray2 = types18.builtInTypes.array;
155186
+ var b2 = types18.builders;
155147
155187
  var Scope4 = function Scope22(path32, parentScope) {
155148
155188
  if (!(this instanceof Scope22)) {
155149
155189
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -155206,7 +155246,7 @@ var require_scope3 = __commonJS3({
155206
155246
  ++index;
155207
155247
  }
155208
155248
  var name = prefix + index;
155209
- return this.bindings[name] = types17.builders.identifier(name);
155249
+ return this.bindings[name] = types18.builders.identifier(name);
155210
155250
  };
155211
155251
  Sp.injectTemporary = function(identifier, init2) {
155212
155252
  identifier || (identifier = this.declareTemporary());
@@ -155282,7 +155322,7 @@ var require_scope3 = __commonJS3({
155282
155322
  bindings
155283
155323
  );
155284
155324
  } else if (Node3.check(node) && !Expression.check(node)) {
155285
- types17.eachField(node, function(name, child) {
155325
+ types18.eachField(node, function(name, child) {
155286
155326
  var childPath = path32.get(name);
155287
155327
  if (!pathHasValue(childPath, child)) {
155288
155328
  throw new Error("");
@@ -155360,24 +155400,24 @@ var require_scope3 = __commonJS3({
155360
155400
  addPattern(patternPath.get("argument"), bindings);
155361
155401
  }
155362
155402
  }
155363
- function addTypePattern(patternPath, types18) {
155403
+ function addTypePattern(patternPath, types19) {
155364
155404
  var pattern = patternPath.value;
155365
155405
  namedTypes.Pattern.assert(pattern);
155366
155406
  if (namedTypes.Identifier.check(pattern)) {
155367
- if (hasOwn2.call(types18, pattern.name)) {
155368
- types18[pattern.name].push(patternPath);
155407
+ if (hasOwn2.call(types19, pattern.name)) {
155408
+ types19[pattern.name].push(patternPath);
155369
155409
  } else {
155370
- types18[pattern.name] = [patternPath];
155410
+ types19[pattern.name] = [patternPath];
155371
155411
  }
155372
155412
  }
155373
155413
  }
155374
- function addTypeParameter(parameterPath, types18) {
155414
+ function addTypeParameter(parameterPath, types19) {
155375
155415
  var parameter = parameterPath.value;
155376
155416
  FlowOrTSTypeParameterType.assert(parameter);
155377
- if (hasOwn2.call(types18, parameter.name)) {
155378
- types18[parameter.name].push(parameterPath);
155417
+ if (hasOwn2.call(types19, parameter.name)) {
155418
+ types19[parameter.name].push(parameterPath);
155379
155419
  } else {
155380
- types18[parameter.name] = [parameterPath];
155420
+ types19[parameter.name] = [parameterPath];
155381
155421
  }
155382
155422
  }
155383
155423
  Sp.lookup = function(name) {
@@ -155416,11 +155456,11 @@ var require_node_path3 = __commonJS3({
155416
155456
  var scope_1 = tslib_1.__importDefault(require_scope3());
155417
155457
  var shared_1 = require_shared3();
155418
155458
  function nodePathPlugin(fork) {
155419
- var types17 = fork.use(types_1.default);
155420
- var n2 = types17.namedTypes;
155421
- var b2 = types17.builders;
155422
- var isNumber = types17.builtInTypes.number;
155423
- var isArray2 = types17.builtInTypes.array;
155459
+ var types18 = fork.use(types_1.default);
155460
+ var n2 = types18.namedTypes;
155461
+ var b2 = types18.builders;
155462
+ var isNumber = types18.builtInTypes.number;
155463
+ var isArray2 = types18.builtInTypes.array;
155424
155464
  var Path = fork.use(path_1.default);
155425
155465
  var Scope4 = fork.use(scope_1.default);
155426
155466
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -155511,7 +155551,7 @@ var require_node_path3 = __commonJS3({
155511
155551
  return scope || null;
155512
155552
  };
155513
155553
  NPp.getValueProperty = function(name) {
155514
- return types17.getFieldValue(this.value, name);
155554
+ return types18.getFieldValue(this.value, name);
155515
155555
  };
155516
155556
  NPp.needsParens = function(assumeExpressionContext) {
155517
155557
  var pp2 = this.parentPath;
@@ -155653,7 +155693,7 @@ var require_node_path3 = __commonJS3({
155653
155693
  return node.some(containsCallExpression);
155654
155694
  }
155655
155695
  if (n2.Node.check(node)) {
155656
- return types17.someField(node, function(_name, child) {
155696
+ return types18.someField(node, function(_name, child) {
155657
155697
  return containsCallExpression(child);
155658
155698
  });
155659
155699
  }
@@ -155772,11 +155812,11 @@ var require_path_visitor3 = __commonJS3({
155772
155812
  var shared_1 = require_shared3();
155773
155813
  var hasOwn2 = Object.prototype.hasOwnProperty;
155774
155814
  function pathVisitorPlugin(fork) {
155775
- var types17 = fork.use(types_1.default);
155815
+ var types18 = fork.use(types_1.default);
155776
155816
  var NodePath = fork.use(node_path_1.default);
155777
- var isArray2 = types17.builtInTypes.array;
155778
- var isObject2 = types17.builtInTypes.object;
155779
- var isFunction = types17.builtInTypes.function;
155817
+ var isArray2 = types18.builtInTypes.array;
155818
+ var isObject2 = types18.builtInTypes.object;
155819
+ var isFunction = types18.builtInTypes.function;
155780
155820
  var undefined2;
155781
155821
  var PathVisitor = function PathVisitor2() {
155782
155822
  if (!(this instanceof PathVisitor2)) {
@@ -155796,7 +155836,7 @@ var require_path_visitor3 = __commonJS3({
155796
155836
  typeNames[methodName.slice("visit".length)] = true;
155797
155837
  }
155798
155838
  }
155799
- var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
155839
+ var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
155800
155840
  var methodNameTable = /* @__PURE__ */ Object.create(null);
155801
155841
  var typeNameKeys = Object.keys(supertypeTable);
155802
155842
  var typeNameCount = typeNameKeys.length;
@@ -155915,7 +155955,7 @@ var require_path_visitor3 = __commonJS3({
155915
155955
  path32.each(visitor.visitWithoutReset, visitor);
155916
155956
  } else if (!isObject2.check(value)) {
155917
155957
  } else {
155918
- var childNames = types17.getFieldNames(value);
155958
+ var childNames = types18.getFieldNames(value);
155919
155959
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
155920
155960
  childNames.push("comments");
155921
155961
  }
@@ -155924,7 +155964,7 @@ var require_path_visitor3 = __commonJS3({
155924
155964
  for (var i22 = 0; i22 < childCount; ++i22) {
155925
155965
  var childName = childNames[i22];
155926
155966
  if (!hasOwn2.call(value, childName)) {
155927
- value[childName] = types17.getFieldValue(value, childName);
155967
+ value[childName] = types18.getFieldValue(value, childName);
155928
155968
  }
155929
155969
  childPaths.push(path32.get(childName));
155930
155970
  }
@@ -156065,13 +156105,13 @@ var require_equiv3 = __commonJS3({
156065
156105
  var shared_1 = require_shared3();
156066
156106
  var types_1 = tslib_1.__importDefault(require_types3());
156067
156107
  function default_1(fork) {
156068
- var types17 = fork.use(types_1.default);
156069
- var getFieldNames = types17.getFieldNames;
156070
- var getFieldValue = types17.getFieldValue;
156071
- var isArray2 = types17.builtInTypes.array;
156072
- var isObject2 = types17.builtInTypes.object;
156073
- var isDate = types17.builtInTypes.Date;
156074
- var isRegExp = types17.builtInTypes.RegExp;
156108
+ var types18 = fork.use(types_1.default);
156109
+ var getFieldNames = types18.getFieldNames;
156110
+ var getFieldValue = types18.getFieldValue;
156111
+ var isArray2 = types18.builtInTypes.array;
156112
+ var isObject2 = types18.builtInTypes.object;
156113
+ var isDate = types18.builtInTypes.Date;
156114
+ var isRegExp = types18.builtInTypes.RegExp;
156075
156115
  var hasOwn2 = Object.prototype.hasOwnProperty;
156076
156116
  function astNodesAreEquivalent(a2, b2, problemPath) {
156077
156117
  if (isArray2.check(problemPath)) {
@@ -156222,24 +156262,24 @@ var require_fork3 = __commonJS3({
156222
156262
  var shared_1 = require_shared3();
156223
156263
  function default_1(plugins) {
156224
156264
  var fork = createFork();
156225
- var types17 = fork.use(types_1.default);
156265
+ var types18 = fork.use(types_1.default);
156226
156266
  plugins.forEach(fork.use);
156227
- types17.finalize();
156267
+ types18.finalize();
156228
156268
  var PathVisitor = fork.use(path_visitor_1.default);
156229
156269
  return {
156230
- Type: types17.Type,
156231
- builtInTypes: types17.builtInTypes,
156232
- namedTypes: types17.namedTypes,
156233
- builders: types17.builders,
156234
- defineMethod: types17.defineMethod,
156235
- getFieldNames: types17.getFieldNames,
156236
- getFieldValue: types17.getFieldValue,
156237
- eachField: types17.eachField,
156238
- someField: types17.someField,
156239
- getSupertypeNames: types17.getSupertypeNames,
156240
- getBuilderName: types17.getBuilderName,
156270
+ Type: types18.Type,
156271
+ builtInTypes: types18.builtInTypes,
156272
+ namedTypes: types18.namedTypes,
156273
+ builders: types18.builders,
156274
+ defineMethod: types18.defineMethod,
156275
+ getFieldNames: types18.getFieldNames,
156276
+ getFieldValue: types18.getFieldValue,
156277
+ eachField: types18.eachField,
156278
+ someField: types18.someField,
156279
+ getSupertypeNames: types18.getSupertypeNames,
156280
+ getBuilderName: types18.getBuilderName,
156241
156281
  astNodesAreEquivalent: fork.use(equiv_1.default),
156242
- finalize: types17.finalize,
156282
+ finalize: types18.finalize,
156243
156283
  Path: fork.use(path_1.default),
156244
156284
  NodePath: fork.use(node_path_1.default),
156245
156285
  PathVisitor,
@@ -156399,8 +156439,8 @@ var require_core32 = __commonJS3({
156399
156439
  var types_1 = tslib_1.__importDefault(require_types3());
156400
156440
  var shared_1 = tslib_1.__importStar(require_shared3());
156401
156441
  function default_1(fork) {
156402
- var types17 = fork.use(types_1.default);
156403
- var Type = types17.Type;
156442
+ var types18 = fork.use(types_1.default);
156443
+ var Type = types18.Type;
156404
156444
  var def = Type.def;
156405
156445
  var or = Type.or;
156406
156446
  var shared2 = fork.use(shared_1.default);
@@ -156490,9 +156530,9 @@ var require_es63 = __commonJS3({
156490
156530
  var shared_1 = tslib_1.__importStar(require_shared3());
156491
156531
  function default_1(fork) {
156492
156532
  fork.use(core_1.default);
156493
- var types17 = fork.use(types_1.default);
156494
- var def = types17.Type.def;
156495
- var or = types17.Type.or;
156533
+ var types18 = fork.use(types_1.default);
156534
+ var def = types18.Type.def;
156535
+ var or = types18.Type.or;
156496
156536
  var defaults = fork.use(shared_1.default).defaults;
156497
156537
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
156498
156538
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -156578,8 +156618,8 @@ var require_es20173 = __commonJS3({
156578
156618
  var shared_1 = tslib_1.__importStar(require_shared3());
156579
156619
  function default_1(fork) {
156580
156620
  fork.use(es2016_1.default);
156581
- var types17 = fork.use(types_1.default);
156582
- var def = types17.Type.def;
156621
+ var types18 = fork.use(types_1.default);
156622
+ var def = types18.Type.def;
156583
156623
  var defaults = fork.use(shared_1.default).defaults;
156584
156624
  def("Function").field("async", Boolean, defaults["false"]);
156585
156625
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -156600,9 +156640,9 @@ var require_es20183 = __commonJS3({
156600
156640
  var shared_1 = tslib_1.__importStar(require_shared3());
156601
156641
  function default_1(fork) {
156602
156642
  fork.use(es2017_1.default);
156603
- var types17 = fork.use(types_1.default);
156604
- var def = types17.Type.def;
156605
- var or = types17.Type.or;
156643
+ var types18 = fork.use(types_1.default);
156644
+ var def = types18.Type.def;
156645
+ var or = types18.Type.or;
156606
156646
  var defaults = fork.use(shared_1.default).defaults;
156607
156647
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
156608
156648
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -156631,9 +156671,9 @@ var require_es20193 = __commonJS3({
156631
156671
  var shared_1 = tslib_1.__importStar(require_shared3());
156632
156672
  function default_1(fork) {
156633
156673
  fork.use(es2018_1.default);
156634
- var types17 = fork.use(types_1.default);
156635
- var def = types17.Type.def;
156636
- var or = types17.Type.or;
156674
+ var types18 = fork.use(types_1.default);
156675
+ var def = types18.Type.def;
156676
+ var or = types18.Type.or;
156637
156677
  var defaults = fork.use(shared_1.default).defaults;
156638
156678
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
156639
156679
  }
@@ -156655,9 +156695,9 @@ var require_es202022 = __commonJS3({
156655
156695
  function default_1(fork) {
156656
156696
  fork.use(es2020_1.default);
156657
156697
  fork.use(es2019_1.default);
156658
- var types17 = fork.use(types_1.default);
156659
- var def = types17.Type.def;
156660
- var or = types17.Type.or;
156698
+ var types18 = fork.use(types_1.default);
156699
+ var def = types18.Type.def;
156700
+ var or = types18.Type.or;
156661
156701
  var shared2 = fork.use(shared_1.default);
156662
156702
  var defaults = shared2.defaults;
156663
156703
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -156703,8 +156743,8 @@ var require_es20223 = __commonJS3({
156703
156743
  var shared_1 = require_shared3();
156704
156744
  function default_1(fork) {
156705
156745
  fork.use(es2021_1.default);
156706
- var types17 = fork.use(types_1.default);
156707
- var def = types17.Type.def;
156746
+ var types18 = fork.use(types_1.default);
156747
+ var def = types18.Type.def;
156708
156748
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
156709
156749
  }
156710
156750
  exports.default = default_1;
@@ -156723,9 +156763,9 @@ var require_es_proposals3 = __commonJS3({
156723
156763
  var es2022_1 = tslib_1.__importDefault(require_es20223());
156724
156764
  function default_1(fork) {
156725
156765
  fork.use(es2022_1.default);
156726
- var types17 = fork.use(types_1.default);
156727
- var Type = types17.Type;
156728
- var def = types17.Type.def;
156766
+ var types18 = fork.use(types_1.default);
156767
+ var Type = types18.Type;
156768
+ var def = types18.Type.def;
156729
156769
  var or = Type.or;
156730
156770
  var shared2 = fork.use(shared_1.default);
156731
156771
  var defaults = shared2.defaults;
@@ -156763,9 +156803,9 @@ var require_jsx22 = __commonJS3({
156763
156803
  var shared_1 = tslib_1.__importStar(require_shared3());
156764
156804
  function default_1(fork) {
156765
156805
  fork.use(es_proposals_1.default);
156766
- var types17 = fork.use(types_1.default);
156767
- var def = types17.Type.def;
156768
- var or = types17.Type.or;
156806
+ var types18 = fork.use(types_1.default);
156807
+ var def = types18.Type.def;
156808
+ var or = types18.Type.or;
156769
156809
  var defaults = fork.use(shared_1.default).defaults;
156770
156810
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
156771
156811
  def("Literal"),
@@ -156821,9 +156861,9 @@ var require_type_annotations3 = __commonJS3({
156821
156861
  var types_1 = tslib_1.__importDefault(require_types3());
156822
156862
  var shared_1 = tslib_1.__importStar(require_shared3());
156823
156863
  function default_1(fork) {
156824
- var types17 = fork.use(types_1.default);
156825
- var def = types17.Type.def;
156826
- var or = types17.Type.or;
156864
+ var types18 = fork.use(types_1.default);
156865
+ var def = types18.Type.def;
156866
+ var or = types18.Type.or;
156827
156867
  var defaults = fork.use(shared_1.default).defaults;
156828
156868
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
156829
156869
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -156856,9 +156896,9 @@ var require_flow22 = __commonJS3({
156856
156896
  function default_1(fork) {
156857
156897
  fork.use(es_proposals_1.default);
156858
156898
  fork.use(type_annotations_1.default);
156859
- var types17 = fork.use(types_1.default);
156860
- var def = types17.Type.def;
156861
- var or = types17.Type.or;
156899
+ var types18 = fork.use(types_1.default);
156900
+ var def = types18.Type.def;
156901
+ var or = types18.Type.or;
156862
156902
  var defaults = fork.use(shared_1.default).defaults;
156863
156903
  def("Flow").bases("Node");
156864
156904
  def("FlowType").bases("Flow");
@@ -156970,10 +157010,10 @@ var require_esprima7 = __commonJS3({
156970
157010
  var shared_1 = tslib_1.__importStar(require_shared3());
156971
157011
  function default_1(fork) {
156972
157012
  fork.use(es_proposals_1.default);
156973
- var types17 = fork.use(types_1.default);
157013
+ var types18 = fork.use(types_1.default);
156974
157014
  var defaults = fork.use(shared_1.default).defaults;
156975
- var def = types17.Type.def;
156976
- var or = types17.Type.or;
157015
+ var def = types18.Type.def;
157016
+ var or = types18.Type.or;
156977
157017
  def("VariableDeclaration").field("declarations", [or(
156978
157018
  def("VariableDeclarator"),
156979
157019
  def("Identifier")
@@ -157016,11 +157056,11 @@ var require_babel_core3 = __commonJS3({
157016
157056
  function default_1(fork) {
157017
157057
  var _a, _b, _c, _d, _e;
157018
157058
  fork.use(es_proposals_1.default);
157019
- var types17 = fork.use(types_1.default);
157059
+ var types18 = fork.use(types_1.default);
157020
157060
  var defaults = fork.use(shared_1.default).defaults;
157021
- var def = types17.Type.def;
157022
- var or = types17.Type.or;
157023
- var isUndefined = types17.builtInTypes.undefined;
157061
+ var def = types18.Type.def;
157062
+ var or = types18.Type.or;
157063
+ var isUndefined = types18.builtInTypes.undefined;
157024
157064
  def("Noop").bases("Statement").build();
157025
157065
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
157026
157066
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -157045,7 +157085,7 @@ var require_babel_core3 = __commonJS3({
157045
157085
  raw: String
157046
157086
  },
157047
157087
  function getDefault() {
157048
- var value = types17.getFieldValue(this, "value");
157088
+ var value = types18.getFieldValue(this, "value");
157049
157089
  return {
157050
157090
  rawValue: value,
157051
157091
  raw: toRaw ? toRaw(value) : String(value)
@@ -157146,8 +157186,8 @@ var require_babel3 = __commonJS3({
157146
157186
  var flow_1 = tslib_1.__importDefault(require_flow22());
157147
157187
  var shared_1 = require_shared3();
157148
157188
  function default_1(fork) {
157149
- var types17 = fork.use(types_1.default);
157150
- var def = types17.Type.def;
157189
+ var types18 = fork.use(types_1.default);
157190
+ var def = types18.Type.def;
157151
157191
  fork.use(babel_core_1.default);
157152
157192
  fork.use(flow_1.default);
157153
157193
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -157171,12 +157211,12 @@ var require_typescript22 = __commonJS3({
157171
157211
  function default_1(fork) {
157172
157212
  fork.use(babel_core_1.default);
157173
157213
  fork.use(type_annotations_1.default);
157174
- var types17 = fork.use(types_1.default);
157175
- var n2 = types17.namedTypes;
157176
- var def = types17.Type.def;
157177
- var or = types17.Type.or;
157214
+ var types18 = fork.use(types_1.default);
157215
+ var n2 = types18.namedTypes;
157216
+ var def = types18.Type.def;
157217
+ var or = types18.Type.or;
157178
157218
  var defaults = fork.use(shared_1.default).defaults;
157179
- var StringLiteral = types17.Type.from(function(value, deep) {
157219
+ var StringLiteral = types18.Type.from(function(value, deep) {
157180
157220
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
157181
157221
  return true;
157182
157222
  }
@@ -159124,8 +159164,8 @@ var require_util22 = __commonJS3({
159124
159164
  exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
159125
159165
  var tslib_1 = require_tslib3();
159126
159166
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
159127
- var types17 = tslib_1.__importStar(require_main5());
159128
- var n2 = types17.namedTypes;
159167
+ var types18 = tslib_1.__importStar(require_main5());
159168
+ var n2 = types18.namedTypes;
159129
159169
  var source_map_1 = tslib_1.__importDefault(require_source_map3());
159130
159170
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
159131
159171
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -166431,10 +166471,10 @@ var require_comments3 = __commonJS3({
166431
166471
  exports.printComments = exports.attach = void 0;
166432
166472
  var tslib_1 = require_tslib3();
166433
166473
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
166434
- var types17 = tslib_1.__importStar(require_main5());
166435
- var n2 = types17.namedTypes;
166436
- var isArray2 = types17.builtInTypes.array;
166437
- var isObject2 = types17.builtInTypes.object;
166474
+ var types18 = tslib_1.__importStar(require_main5());
166475
+ var n2 = types18.namedTypes;
166476
+ var isArray2 = types18.builtInTypes.array;
166477
+ var isObject2 = types18.builtInTypes.object;
166438
166478
  var lines_1 = require_lines3();
166439
166479
  var util_1 = require_util22();
166440
166480
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -166465,7 +166505,7 @@ var require_comments3 = __commonJS3({
166465
166505
  if (isArray2.check(node)) {
166466
166506
  names = Object.keys(node);
166467
166507
  } else if (isObject2.check(node)) {
166468
- names = types17.getFieldNames(node);
166508
+ names = types18.getFieldNames(node);
166469
166509
  } else {
166470
166510
  return resultArray;
166471
166511
  }
@@ -166643,7 +166683,7 @@ var require_comments3 = __commonJS3({
166643
166683
  function printComments(path32, print132) {
166644
166684
  var value = path32.getValue();
166645
166685
  var innerLines = print132(path32);
166646
- var comments = n2.Node.check(value) && types17.getFieldValue(value, "comments");
166686
+ var comments = n2.Node.check(value) && types18.getFieldValue(value, "comments");
166647
166687
  if (!comments || comments.length === 0) {
166648
166688
  return innerLines;
166649
166689
  }
@@ -166651,8 +166691,8 @@ var require_comments3 = __commonJS3({
166651
166691
  var trailingParts = [innerLines];
166652
166692
  path32.each(function(commentPath) {
166653
166693
  var comment = commentPath.getValue();
166654
- var leading = types17.getFieldValue(comment, "leading");
166655
- var trailing = types17.getFieldValue(comment, "trailing");
166694
+ var leading = types18.getFieldValue(comment, "leading");
166695
+ var trailing = types18.getFieldValue(comment, "trailing");
166656
166696
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
166657
166697
  leadingParts.push(printLeadingComment(commentPath, print132));
166658
166698
  } else if (trailing) {
@@ -166672,10 +166712,10 @@ var require_parser3 = __commonJS3({
166672
166712
  exports.parse = void 0;
166673
166713
  var tslib_1 = require_tslib3();
166674
166714
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
166675
- var types17 = tslib_1.__importStar(require_main5());
166676
- var b2 = types17.builders;
166677
- var isObject2 = types17.builtInTypes.object;
166678
- var isArray2 = types17.builtInTypes.array;
166715
+ var types18 = tslib_1.__importStar(require_main5());
166716
+ var b2 = types18.builders;
166717
+ var isObject2 = types18.builtInTypes.object;
166718
+ var isArray2 = types18.builtInTypes.array;
166679
166719
  var options_1 = require_options3();
166680
166720
  var lines_1 = require_lines3();
166681
166721
  var comments_1 = require_comments3();
@@ -166859,11 +166899,11 @@ var require_fast_path3 = __commonJS3({
166859
166899
  Object.defineProperty(exports, "__esModule", { value: true });
166860
166900
  var tslib_1 = require_tslib3();
166861
166901
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
166862
- var types17 = tslib_1.__importStar(require_main5());
166902
+ var types18 = tslib_1.__importStar(require_main5());
166863
166903
  var util = tslib_1.__importStar(require_util22());
166864
- var n2 = types17.namedTypes;
166865
- var isArray2 = types17.builtInTypes.array;
166866
- var isNumber = types17.builtInTypes.number;
166904
+ var n2 = types18.namedTypes;
166905
+ var isArray2 = types18.builtInTypes.array;
166906
+ var isNumber = types18.builtInTypes.number;
166867
166907
  var PRECEDENCE = {};
166868
166908
  [
166869
166909
  ["??"],
@@ -166892,7 +166932,7 @@ var require_fast_path3 = __commonJS3({
166892
166932
  if (obj instanceof FastPath) {
166893
166933
  return obj.copy();
166894
166934
  }
166895
- if (obj instanceof types17.NodePath) {
166935
+ if (obj instanceof types18.NodePath) {
166896
166936
  var copy = Object.create(FastPath.prototype);
166897
166937
  var stack = [obj.value];
166898
166938
  for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
@@ -167203,7 +167243,7 @@ var require_fast_path3 = __commonJS3({
167203
167243
  return node.some(containsCallExpression);
167204
167244
  }
167205
167245
  if (n2.Node.check(node)) {
167206
- return types17.someField(node, function(_name, child) {
167246
+ return types18.someField(node, function(_name, child) {
167207
167247
  return containsCallExpression(child);
167208
167248
  });
167209
167249
  }
@@ -167291,16 +167331,16 @@ var require_patcher3 = __commonJS3({
167291
167331
  var tslib_1 = require_tslib3();
167292
167332
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
167293
167333
  var linesModule = tslib_1.__importStar(require_lines3());
167294
- var types17 = tslib_1.__importStar(require_main5());
167295
- var Printable = types17.namedTypes.Printable;
167296
- var Expression = types17.namedTypes.Expression;
167297
- var ReturnStatement = types17.namedTypes.ReturnStatement;
167298
- var SourceLocation3 = types17.namedTypes.SourceLocation;
167334
+ var types18 = tslib_1.__importStar(require_main5());
167335
+ var Printable = types18.namedTypes.Printable;
167336
+ var Expression = types18.namedTypes.Expression;
167337
+ var ReturnStatement = types18.namedTypes.ReturnStatement;
167338
+ var SourceLocation3 = types18.namedTypes.SourceLocation;
167299
167339
  var util_1 = require_util22();
167300
167340
  var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
167301
- var isObject2 = types17.builtInTypes.object;
167302
- var isArray2 = types17.builtInTypes.array;
167303
- var isString = types17.builtInTypes.string;
167341
+ var isObject2 = types18.builtInTypes.object;
167342
+ var isArray2 = types18.builtInTypes.array;
167343
+ var isString = types18.builtInTypes.string;
167304
167344
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
167305
167345
  var Patcher = function Patcher2(lines) {
167306
167346
  assert_1.default.ok(this instanceof Patcher2);
@@ -167570,8 +167610,8 @@ var require_patcher3 = __commonJS3({
167570
167610
  if (k2.charAt(0) === "_") {
167571
167611
  continue;
167572
167612
  }
167573
- newPath.stack.push(k2, types17.getFieldValue(newNode, k2));
167574
- oldPath.stack.push(k2, types17.getFieldValue(oldNode, k2));
167613
+ newPath.stack.push(k2, types18.getFieldValue(newNode, k2));
167614
+ oldPath.stack.push(k2, types18.getFieldValue(oldNode, k2));
167575
167615
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
167576
167616
  newPath.stack.length -= 2;
167577
167617
  oldPath.stack.length -= 2;
@@ -167593,16 +167633,16 @@ var require_printer3 = __commonJS3({
167593
167633
  exports.Printer = void 0;
167594
167634
  var tslib_1 = require_tslib3();
167595
167635
  var assert_1 = tslib_1.__importDefault(__require3("assert"));
167596
- var types17 = tslib_1.__importStar(require_main5());
167636
+ var types18 = tslib_1.__importStar(require_main5());
167597
167637
  var comments_1 = require_comments3();
167598
167638
  var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
167599
167639
  var lines_1 = require_lines3();
167600
167640
  var options_1 = require_options3();
167601
167641
  var patcher_1 = require_patcher3();
167602
167642
  var util = tslib_1.__importStar(require_util22());
167603
- var namedTypes = types17.namedTypes;
167604
- var isString = types17.builtInTypes.string;
167605
- var isObject2 = types17.builtInTypes.object;
167643
+ var namedTypes = types18.namedTypes;
167644
+ var isString = types18.builtInTypes.string;
167645
+ var isObject2 = types18.builtInTypes.object;
167606
167646
  var PrintResult = function PrintResult2(code, sourceMap) {
167607
167647
  assert_1.default.ok(this instanceof PrintResult2);
167608
167648
  isString.assert(code);
@@ -167764,7 +167804,7 @@ var require_printer3 = __commonJS3({
167764
167804
  case "OptionalMemberExpression": {
167765
167805
  parts.push(path32.call(print132, "object"));
167766
167806
  var property = path32.call(print132, "property");
167767
- var optional = types17.getFieldValue(n2, "optional");
167807
+ var optional = types18.getFieldValue(n2, "optional");
167768
167808
  if (n2.computed) {
167769
167809
  parts.push(optional ? "?.[" : "[", property, "]");
167770
167810
  } else {
@@ -168035,7 +168075,7 @@ var require_printer3 = __commonJS3({
168035
168075
  if (n2.typeArguments) {
168036
168076
  parts.push(path32.call(print132, "typeArguments"));
168037
168077
  }
168038
- if (types17.getFieldValue(n2, "optional")) {
168078
+ if (types18.getFieldValue(n2, "optional")) {
168039
168079
  parts.push("?.");
168040
168080
  }
168041
168081
  parts.push(printArgumentsList(path32, options, print132));
@@ -169714,8 +169754,8 @@ var require_printer3 = __commonJS3({
169714
169754
  });
169715
169755
  }
169716
169756
  function getPossibleRaw(node) {
169717
- var value = types17.getFieldValue(node, "value");
169718
- var extra = types17.getFieldValue(node, "extra");
169757
+ var value = types18.getFieldValue(node, "value");
169758
+ var extra = types18.getFieldValue(node, "extra");
169719
169759
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
169720
169760
  return extra.raw;
169721
169761
  }
@@ -169761,8 +169801,8 @@ var require_main22 = __commonJS3({
169761
169801
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
169762
169802
  var tslib_1 = require_tslib3();
169763
169803
  var fs_1 = tslib_1.__importDefault(__require3("fs"));
169764
- var types17 = tslib_1.__importStar(require_main5());
169765
- exports.types = types17;
169804
+ var types18 = tslib_1.__importStar(require_main5());
169805
+ exports.types = types18;
169766
169806
  var parser_1 = require_parser3();
169767
169807
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
169768
169808
  return parser_1.parse;
@@ -170422,7 +170462,7 @@ var printDocASTReducer2 = {
170422
170462
  leave: ({ name, interfaces, directives, fields }) => join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block3(fields)], " ")
170423
170463
  },
170424
170464
  UnionTypeDefinition: {
170425
- leave: ({ name, directives, types: types17 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
170465
+ leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
170426
170466
  },
170427
170467
  EnumTypeDefinition: {
170428
170468
  leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block3(values)], " ")
@@ -170449,7 +170489,7 @@ var printDocASTReducer2 = {
170449
170489
  leave: ({ name, interfaces, directives, fields }) => join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block3(fields)], " ")
170450
170490
  },
170451
170491
  UnionTypeExtension: {
170452
- leave: ({ name, directives, types: types17 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
170492
+ leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
170453
170493
  },
170454
170494
  EnumTypeExtension: {
170455
170495
  leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block3(values)], " ")
@@ -171864,7 +171904,18 @@ var ListManager2 = class {
171864
171904
  }
171865
171905
  lists = /* @__PURE__ */ new Map();
171866
171906
  listsByField = /* @__PURE__ */ new Map();
171867
- get(listName, id2, allLists) {
171907
+ get(listName, id2, allLists, skipMatches) {
171908
+ const lists = this.getLists(listName, id2, allLists);
171909
+ if (!lists) {
171910
+ return null;
171911
+ }
171912
+ if (skipMatches) {
171913
+ return new ListCollection2(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
171914
+ } else {
171915
+ return lists;
171916
+ }
171917
+ }
171918
+ getLists(listName, id2, allLists) {
171868
171919
  const matches = this.lists.get(listName);
171869
171920
  if (!matches || matches.size === 0) {
171870
171921
  return null;
@@ -171986,6 +172037,9 @@ var List2 = class {
171986
172037
  this.manager = manager;
171987
172038
  this.abstract = abstract;
171988
172039
  }
172040
+ get fieldRef() {
172041
+ return `${this.recordID}.${this.key}`;
172042
+ }
171989
172043
  when(when) {
171990
172044
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
171991
172045
  }
@@ -173130,8 +173184,8 @@ var Cache2 = class {
173130
173184
  variables
173131
173185
  );
173132
173186
  }
173133
- list(name, parentID, allLists) {
173134
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
173187
+ list(name, parentID, allLists, skipMatches) {
173188
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
173135
173189
  if (!handler) {
173136
173190
  throw new Error(
173137
173191
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -173546,6 +173600,7 @@ var CacheInternal2 = class {
173546
173600
  });
173547
173601
  }
173548
173602
  }
173603
+ const processedOperations = /* @__PURE__ */ new Set();
173549
173604
  for (const operation of operations || []) {
173550
173605
  let parentID;
173551
173606
  if (operation.parentID) {
@@ -173565,7 +173620,12 @@ var CacheInternal2 = class {
173565
173620
  const targets = Array.isArray(value) ? value : [value];
173566
173621
  for (const target of targets) {
173567
173622
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
173568
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
173623
+ this.cache.list(
173624
+ operation.list,
173625
+ parentID,
173626
+ operation.target === "all",
173627
+ processedOperations
173628
+ ).when(operation.when).addToList(
173569
173629
  fieldSelection,
173570
173630
  target,
173571
173631
  variables,
@@ -173573,7 +173633,12 @@ var CacheInternal2 = class {
173573
173633
  layer
173574
173634
  );
173575
173635
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
173576
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
173636
+ this.cache.list(
173637
+ operation.list,
173638
+ parentID,
173639
+ operation.target === "all",
173640
+ processedOperations
173641
+ ).when(operation.when).toggleElement({
173577
173642
  selection: fieldSelection,
173578
173643
  data: target,
173579
173644
  variables,
@@ -173581,7 +173646,12 @@ var CacheInternal2 = class {
173581
173646
  layer
173582
173647
  });
173583
173648
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
173584
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
173649
+ this.cache.list(
173650
+ operation.list,
173651
+ parentID,
173652
+ operation.target === "all",
173653
+ processedOperations
173654
+ ).when(operation.when).remove(target, variables, layer);
173585
173655
  } else if (operation.action === "delete" && operation.type && target) {
173586
173656
  const targetID = this.id(operation.type, target);
173587
173657
  if (!targetID) {
@@ -173593,6 +173663,16 @@ var CacheInternal2 = class {
173593
173663
  this.cache.delete(targetID, layer);
173594
173664
  }
173595
173665
  }
173666
+ if (operation.list) {
173667
+ const matchingLists = this.cache.list(
173668
+ operation.list,
173669
+ parentID,
173670
+ operation.target === "all"
173671
+ );
173672
+ for (const list3 of matchingLists.lists) {
173673
+ processedOperations.add(list3.fieldRef);
173674
+ }
173675
+ }
173596
173676
  }
173597
173677
  }
173598
173678
  return toNotify;
@@ -174058,6 +174138,46 @@ var { keys } = Object;
174058
174138
  var recast4 = __toESM3(require_main22(), 1);
174059
174139
  var AST4 = recast4.types.builders;
174060
174140
  var pageInfoSelection = [
174141
+ {
174142
+ kind: graphql13.Kind.FIELD,
174143
+ name: {
174144
+ kind: graphql13.Kind.NAME,
174145
+ value: "pageInfo"
174146
+ },
174147
+ selectionSet: {
174148
+ kind: graphql13.Kind.SELECTION_SET,
174149
+ selections: [
174150
+ {
174151
+ kind: graphql13.Kind.FIELD,
174152
+ name: {
174153
+ kind: graphql13.Kind.NAME,
174154
+ value: "hasPreviousPage"
174155
+ }
174156
+ },
174157
+ {
174158
+ kind: graphql13.Kind.FIELD,
174159
+ name: {
174160
+ kind: graphql13.Kind.NAME,
174161
+ value: "hasNextPage"
174162
+ }
174163
+ },
174164
+ {
174165
+ kind: graphql13.Kind.FIELD,
174166
+ name: {
174167
+ kind: graphql13.Kind.NAME,
174168
+ value: "startCursor"
174169
+ }
174170
+ },
174171
+ {
174172
+ kind: graphql13.Kind.FIELD,
174173
+ name: {
174174
+ kind: graphql13.Kind.NAME,
174175
+ value: "endCursor"
174176
+ }
174177
+ }
174178
+ ]
174179
+ }
174180
+ },
174061
174181
  {
174062
174182
  kind: graphql13.Kind.FIELD,
174063
174183
  name: {
@@ -174328,7 +174448,7 @@ var printDocASTReducer22 = {
174328
174448
  ], " ")
174329
174449
  },
174330
174450
  UnionTypeDefinition: {
174331
- leave: ({ name, directives, types: types17 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
174451
+ leave: ({ name, directives, types: types18 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
174332
174452
  },
174333
174453
  EnumTypeDefinition: {
174334
174454
  leave: ({ name, directives, values }) => join32(["enum", name, join32(directives, " "), block22(values)], " ")
@@ -174367,7 +174487,7 @@ var printDocASTReducer22 = {
174367
174487
  ], " ")
174368
174488
  },
174369
174489
  UnionTypeExtension: {
174370
- leave: ({ name, directives, types: types17 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
174490
+ leave: ({ name, directives, types: types18 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
174371
174491
  },
174372
174492
  EnumTypeExtension: {
174373
174493
  leave: ({ name, directives, values }) => join32(["extend enum", name, join32(directives, " "), block22(values)], " ")
@@ -174404,6 +174524,8 @@ For more information, please visit these links:
174404
174524
  - https://graphql.org/learn/global-object-identification/
174405
174525
  - ${siteURL}/guides/caching-data#custom-ids
174406
174526
  `;
174527
+ var recast14 = __toESM3(require_main22(), 1);
174528
+ var AST14 = recast14.types.builders;
174407
174529
  function find_insert_index(script) {
174408
174530
  let insert_index = script.body.findIndex((statement) => {
174409
174531
  return statement.type !== "ImportDeclaration";
@@ -174422,7 +174544,7 @@ function find_exported_fn(body, name) {
174422
174544
  if (exportDeclaration.declaration?.type === "FunctionDeclaration") {
174423
174545
  const value = exportDeclaration.declaration;
174424
174546
  if (value.id?.name === name) {
174425
- return exportDeclaration.declaration;
174547
+ return { declaration: exportDeclaration.declaration, export: exportDeclaration };
174426
174548
  }
174427
174549
  } else if (exportDeclaration.declaration?.type === "VariableDeclaration") {
174428
174550
  const value = exportDeclaration.declaration;
@@ -174441,7 +174563,10 @@ function find_exported_fn(body, name) {
174441
174563
  init2 = init2.arguments[0];
174442
174564
  }
174443
174565
  if (init2.type === "FunctionExpression" || init2.type === "ArrowFunctionExpression") {
174444
- return init2;
174566
+ return { declaration: init2, export: exportDeclaration };
174567
+ }
174568
+ if (init2.type === "Identifier" || init2.type === "CallExpression") {
174569
+ return { declaration: init2, export: exportDeclaration };
174445
174570
  }
174446
174571
  } else {
174447
174572
  continue;
@@ -174453,10 +174578,10 @@ function find_exported_fn(body, name) {
174453
174578
  if (!exported) {
174454
174579
  return null;
174455
174580
  }
174456
- return exported.declaration;
174581
+ return { declaration: exported.declaration, export: exported };
174457
174582
  }
174458
- var recast14 = __toESM3(require_main22(), 1);
174459
- var AST14 = recast14.types.builders;
174583
+ var recast15 = __toESM3(require_main22(), 1);
174584
+ var AST15 = recast15.types.builders;
174460
174585
  function ensure_imports({
174461
174586
  config: config2,
174462
174587
  script,
@@ -174472,13 +174597,13 @@ function ensure_imports({
174472
174597
  if (!has_import) {
174473
174598
  script.body.unshift({
174474
174599
  type: "ImportDeclaration",
174475
- source: AST14.stringLiteral(sourceModule),
174600
+ source: AST15.stringLiteral(sourceModule),
174476
174601
  importKind
174477
174602
  });
174478
174603
  }
174479
174604
  return { ids: [], added: has_import ? 0 : 1 };
174480
174605
  }
174481
- const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST14.identifier(id2));
174606
+ const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST15.identifier(id2));
174482
174607
  const toImport = idList.filter(
174483
174608
  (identifier) => !script.body.find(
174484
174609
  (statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
@@ -174489,16 +174614,16 @@ function ensure_imports({
174489
174614
  if (toImport.length > 0) {
174490
174615
  script.body.unshift({
174491
174616
  type: "ImportDeclaration",
174492
- source: AST14.stringLiteral(sourceModule),
174617
+ source: AST15.stringLiteral(sourceModule),
174493
174618
  specifiers: toImport.map(
174494
- (identifier, i22) => !Array.isArray(importID) ? AST14.importDefaultSpecifier(identifier) : AST14.importSpecifier(identifier, as?.[i22] ? AST14.identifier(as[i22]) : identifier)
174619
+ (identifier, i22) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i22] ? AST15.identifier(as[i22]) : identifier)
174495
174620
  ),
174496
174621
  importKind
174497
174622
  });
174498
174623
  }
174499
174624
  for (const [i22, target] of (as ?? []).entries()) {
174500
174625
  if (target) {
174501
- idList[i22] = AST14.identifier(target);
174626
+ idList[i22] = AST15.identifier(target);
174502
174627
  }
174503
174628
  }
174504
174629
  return {
@@ -175041,14 +175166,14 @@ function findScriptInnerBounds({
175041
175166
  }
175042
175167
 
175043
175168
  // src/plugin/transforms/componentQuery.ts
175044
- var recast15 = __toESM(require_main4(), 1);
175045
- var AST15 = recast15.types.builders;
175169
+ var recast16 = __toESM(require_main4(), 1);
175170
+ var AST16 = recast16.types.builders;
175046
175171
  async function QueryProcessor(config, page) {
175047
175172
  if (!is_component(config, page.framework, page.filepath)) {
175048
175173
  return;
175049
175174
  }
175050
175175
  const store_id = (name) => {
175051
- return AST15.identifier(`_houdini_` + name);
175176
+ return AST16.identifier(`_houdini_` + name);
175052
175177
  };
175053
175178
  const queries = await find_inline_queries(page, page.script, store_id);
175054
175179
  if (queries.length === 0) {
@@ -175118,8 +175243,8 @@ async function QueryProcessor(config, page) {
175118
175243
  page.script.body.splice(
175119
175244
  find_insert_index(page.script),
175120
175245
  0,
175121
- AST15.variableDeclaration("const", [
175122
- AST15.variableDeclarator(store_id(query.name.value), AST15.newExpression(factory, []))
175246
+ AST16.variableDeclaration("const", [
175247
+ AST16.variableDeclarator(store_id(query.name.value), AST16.newExpression(factory, []))
175123
175248
  ])
175124
175249
  );
175125
175250
  }
@@ -175135,47 +175260,47 @@ async function QueryProcessor(config, page) {
175135
175260
  )}. maybe its not exported? `
175136
175261
  });
175137
175262
  }
175138
- const queryLoadExpression = AST15.callExpression(
175139
- AST15.memberExpression(store_id(query.name.value), AST15.identifier("fetch")),
175263
+ const queryLoadExpression = AST16.callExpression(
175264
+ AST16.memberExpression(store_id(query.name.value), AST16.identifier("fetch")),
175140
175265
  [
175141
- AST15.objectExpression([
175142
- AST15.objectProperty(
175143
- AST15.identifier("variables"),
175144
- AST15.callExpression(AST15.identifier("marshalInputs"), [
175145
- AST15.objectExpression([
175146
- AST15.objectProperty(
175147
- AST15.identifier("config"),
175148
- AST15.callExpression(AST15.identifier("getCurrentConfig"), [])
175266
+ AST16.objectExpression([
175267
+ AST16.objectProperty(
175268
+ AST16.identifier("variables"),
175269
+ AST16.callExpression(AST16.identifier("marshalInputs"), [
175270
+ AST16.objectExpression([
175271
+ AST16.objectProperty(
175272
+ AST16.identifier("config"),
175273
+ AST16.callExpression(AST16.identifier("getCurrentConfig"), [])
175149
175274
  ),
175150
- AST15.objectProperty(
175151
- AST15.identifier("artifact"),
175152
- AST15.memberExpression(
175275
+ AST16.objectProperty(
175276
+ AST16.identifier("artifact"),
175277
+ AST16.memberExpression(
175153
175278
  store_id(query.name.value),
175154
- AST15.identifier("artifact")
175279
+ AST16.identifier("artifact")
175155
175280
  )
175156
175281
  ),
175157
- AST15.objectProperty(
175158
- AST15.identifier("input"),
175159
- has_variables ? AST15.callExpression(
175160
- AST15.memberExpression(
175161
- AST15.identifier(variable_fn),
175162
- AST15.identifier("call")
175282
+ AST16.objectProperty(
175283
+ AST16.identifier("input"),
175284
+ has_variables ? AST16.callExpression(
175285
+ AST16.memberExpression(
175286
+ AST16.identifier(variable_fn),
175287
+ AST16.identifier("call")
175163
175288
  ),
175164
175289
  [
175165
- AST15.newExpression(
175166
- AST15.identifier("RequestContext"),
175290
+ AST16.newExpression(
175291
+ AST16.identifier("RequestContext"),
175167
175292
  []
175168
175293
  ),
175169
- AST15.objectExpression([
175170
- AST15.objectProperty(
175171
- AST15.identifier("props"),
175172
- AST15.objectExpression(
175294
+ AST16.objectExpression([
175295
+ AST16.objectProperty(
175296
+ AST16.identifier("props"),
175297
+ AST16.objectExpression(
175173
175298
  props.map(
175174
- (prop2) => AST15.objectProperty(
175175
- AST15.identifier(
175299
+ (prop2) => AST16.objectProperty(
175300
+ AST16.identifier(
175176
175301
  prop2
175177
175302
  ),
175178
- AST15.identifier(
175303
+ AST16.identifier(
175179
175304
  prop2
175180
175305
  )
175181
175306
  )
@@ -175184,7 +175309,7 @@ async function QueryProcessor(config, page) {
175184
175309
  )
175185
175310
  ])
175186
175311
  ]
175187
- ) : AST15.objectExpression([])
175312
+ ) : AST16.objectExpression([])
175188
175313
  )
175189
175314
  ])
175190
175315
  ])
@@ -175195,23 +175320,23 @@ async function QueryProcessor(config, page) {
175195
175320
  let finalExpression = [];
175196
175321
  if (page.svelte5Runes) {
175197
175322
  finalExpression = [
175198
- AST15.expressionStatement(
175199
- AST15.callExpression(AST15.identifier("$effect"), [
175200
- AST15.arrowFunctionExpression(
175323
+ AST16.expressionStatement(
175324
+ AST16.callExpression(AST16.identifier("$effect"), [
175325
+ AST16.arrowFunctionExpression(
175201
175326
  [],
175202
- AST15.blockStatement([AST15.expressionStatement(queryLoadExpression)])
175327
+ AST16.blockStatement([AST16.expressionStatement(queryLoadExpression)])
175203
175328
  )
175204
175329
  ])
175205
175330
  )
175206
175331
  ];
175207
175332
  } else {
175208
175333
  finalExpression = [
175209
- AST15.labeledStatement(
175210
- AST15.identifier("$"),
175211
- AST15.expressionStatement(
175212
- AST15.logicalExpression(
175334
+ AST16.labeledStatement(
175335
+ AST16.identifier("$"),
175336
+ AST16.expressionStatement(
175337
+ AST16.logicalExpression(
175213
175338
  "&&",
175214
- AST15.identifier("isBrowser"),
175339
+ AST16.identifier("isBrowser"),
175215
175340
  queryLoadExpression
175216
175341
  )
175217
175342
  )
@@ -175253,8 +175378,8 @@ async function find_inline_queries(page, parsed, store_id) {
175253
175378
  }
175254
175379
 
175255
175380
  // src/plugin/transforms/kit/init.ts
175256
- var recast16 = __toESM(require_main4(), 1);
175257
- var AST16 = recast16.types.builders;
175381
+ var recast17 = __toESM(require_main4(), 1);
175382
+ var AST17 = recast17.types.builders;
175258
175383
  async function kit_init(page) {
175259
175384
  if (!is_root_layout(page.config, page.filepath)) {
175260
175385
  return;
@@ -175278,9 +175403,9 @@ async function kit_init(page) {
175278
175403
  import: ["extractSession", "setClientSession"]
175279
175404
  }).ids;
175280
175405
  page.script.body.push(
175281
- AST16.expressionStatement(
175282
- AST16.callExpression(on_mount, [
175283
- AST16.arrowFunctionExpression([], AST16.callExpression(set_client_started, []))
175406
+ AST17.expressionStatement(
175407
+ AST17.callExpression(on_mount, [
175408
+ AST17.arrowFunctionExpression([], AST17.callExpression(set_client_started, []))
175284
175409
  ])
175285
175410
  )
175286
175411
  );
@@ -175291,17 +175416,17 @@ async function kit_init(page) {
175291
175416
  import: ["page"]
175292
175417
  }).ids[0];
175293
175418
  page.script.body.push(
175294
- AST16.expressionStatement(
175295
- AST16.callExpression(AST16.memberExpression(store_id, AST16.identifier("subscribe")), [
175296
- AST16.arrowFunctionExpression(
175297
- [AST16.identifier("val")],
175298
- AST16.blockStatement([
175299
- AST16.expressionStatement(
175300
- AST16.callExpression(set_session, [
175301
- AST16.callExpression(extract_session, [
175302
- AST16.memberExpression(
175303
- AST16.identifier("val"),
175304
- AST16.identifier("data")
175419
+ AST17.expressionStatement(
175420
+ AST17.callExpression(AST17.memberExpression(store_id, AST17.identifier("subscribe")), [
175421
+ AST17.arrowFunctionExpression(
175422
+ [AST17.identifier("val")],
175423
+ AST17.blockStatement([
175424
+ AST17.expressionStatement(
175425
+ AST17.callExpression(set_session, [
175426
+ AST17.callExpression(extract_session, [
175427
+ AST17.memberExpression(
175428
+ AST17.identifier("val"),
175429
+ AST17.identifier("data")
175305
175430
  )
175306
175431
  ])
175307
175432
  ])
@@ -175315,7 +175440,7 @@ async function kit_init(page) {
175315
175440
 
175316
175441
  // src/plugin/transforms/kit/load.ts
175317
175442
  import * as graphql36 from "graphql";
175318
- var recast17 = __toESM(require_main4(), 1);
175443
+ var recast18 = __toESM(require_main4(), 1);
175319
175444
 
175320
175445
  // src/plugin/routing.ts
175321
175446
  var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
@@ -175397,14 +175522,14 @@ function escape2(str) {
175397
175522
  }
175398
175523
 
175399
175524
  // src/plugin/transforms/kit/load.ts
175400
- var AST17 = recast17.types.builders;
175525
+ var AST18 = recast18.types.builders;
175401
175526
  async function kit_load_generator(page) {
175402
175527
  const route = is_route(page.config, page.framework, page.filepath);
175403
175528
  const script = is_route_script(page.framework, page.filepath);
175404
175529
  if (!route && !script) {
175405
175530
  return;
175406
175531
  }
175407
- const inline_query_store = (name) => route ? AST17.memberExpression(AST17.identifier("data"), AST17.identifier(name)) : artifact_import({
175532
+ const inline_query_store = (name) => route ? AST18.memberExpression(AST18.identifier("data"), AST18.identifier(name)) : artifact_import({
175408
175533
  config: page.config,
175409
175534
  script: page.script,
175410
175535
  page,
@@ -175456,8 +175581,8 @@ async function kit_load_generator(page) {
175456
175581
  find_insert_index(page.script),
175457
175582
  0,
175458
175583
  ...!has_data ? [
175459
- AST17.exportNamedDeclaration(
175460
- AST17.variableDeclaration("let", [AST17.identifier("data")])
175584
+ AST18.exportNamedDeclaration(
175585
+ AST18.variableDeclaration("let", [AST18.identifier("data")])
175461
175586
  )
175462
175587
  ] : []
175463
175588
  );
@@ -175504,43 +175629,43 @@ function add_load({
175504
175629
  let before_load = page_info.exports.includes(houdini_before_load_fn);
175505
175630
  let afterLoad = page_info.exports.includes(houdini_afterLoad_fn);
175506
175631
  let on_error = page_info.exports.includes(houdini_on_error_fn);
175507
- const request_context = AST17.identifier("houdini_context");
175508
- const promise_list = AST17.identifier("promises");
175509
- const return_value = AST17.memberExpression(request_context, AST17.identifier("returnValue"));
175510
- const result_obj = AST17.identifier("result");
175511
- const input_obj = AST17.identifier("inputs");
175512
- const preload_fn = AST17.functionDeclaration(
175513
- AST17.identifier("load"),
175514
- [AST17.identifier("context")],
175515
- AST17.blockStatement([
175516
- AST17.variableDeclaration("const", [
175517
- AST17.variableDeclarator(
175632
+ const request_context = AST18.identifier("houdini_context");
175633
+ const promise_list = AST18.identifier("promises");
175634
+ const return_value = AST18.memberExpression(request_context, AST18.identifier("returnValue"));
175635
+ const result_obj = AST18.identifier("result");
175636
+ const input_obj = AST18.identifier("inputs");
175637
+ const preload_fn = AST18.functionDeclaration(
175638
+ AST18.identifier("load"),
175639
+ [AST18.identifier("context")],
175640
+ AST18.blockStatement([
175641
+ AST18.variableDeclaration("const", [
175642
+ AST18.variableDeclarator(
175518
175643
  request_context,
175519
- AST17.newExpression(AST17.identifier("RequestContext"), [AST17.identifier("context")])
175644
+ AST18.newExpression(AST18.identifier("RequestContext"), [AST18.identifier("context")])
175520
175645
  )
175521
175646
  ]),
175522
- AST17.variableDeclaration("const", [
175523
- AST17.variableDeclarator(
175524
- AST17.identifier("houdiniConfig"),
175525
- AST17.callExpression(AST17.identifier("getCurrentConfig"), [])
175647
+ AST18.variableDeclaration("const", [
175648
+ AST18.variableDeclarator(
175649
+ AST18.identifier("houdiniConfig"),
175650
+ AST18.callExpression(AST18.identifier("getCurrentConfig"), [])
175526
175651
  )
175527
175652
  ]),
175528
- AST17.variableDeclaration("const", [
175529
- AST17.variableDeclarator(promise_list, AST17.arrayExpression([]))
175653
+ AST18.variableDeclaration("const", [
175654
+ AST18.variableDeclarator(promise_list, AST18.arrayExpression([]))
175530
175655
  ]),
175531
- AST17.variableDeclaration("const", [
175532
- AST17.variableDeclarator(input_obj, AST17.objectExpression([]))
175656
+ AST18.variableDeclaration("const", [
175657
+ AST18.variableDeclarator(input_obj, AST18.objectExpression([]))
175533
175658
  ]),
175534
- AST17.returnStatement(
175535
- AST17.objectExpression([
175536
- AST17.spreadElement(return_value),
175537
- AST17.spreadElement(result_obj)
175659
+ AST18.returnStatement(
175660
+ AST18.objectExpression([
175661
+ AST18.spreadElement(return_value),
175662
+ AST18.spreadElement(result_obj)
175538
175663
  ])
175539
175664
  )
175540
175665
  ])
175541
175666
  );
175542
175667
  preload_fn.async = true;
175543
- page.script.body.push(AST17.exportNamedDeclaration(preload_fn));
175668
+ page.script.body.push(AST18.exportNamedDeclaration(preload_fn));
175544
175669
  let insert_index = 4;
175545
175670
  for (const query of queries) {
175546
175671
  const { ids } = ensure_imports({
@@ -175550,19 +175675,19 @@ function add_load({
175550
175675
  sourceModule: store_import_path({ config: page.config, name: query.name.value })
175551
175676
  });
175552
175677
  const load_fn = ids[0];
175553
- const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST17.awaitExpression(
175554
- AST17.callExpression(AST17.identifier(__variable_fn_name(query.name.value)), [
175555
- AST17.identifier("houdiniConfig"),
175556
- AST17.identifier("context")
175678
+ const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST18.awaitExpression(
175679
+ AST18.callExpression(AST18.identifier(__variable_fn_name(query.name.value)), [
175680
+ AST18.identifier("houdiniConfig"),
175681
+ AST18.identifier("context")
175557
175682
  ])
175558
- ) : AST17.objectExpression([]);
175683
+ ) : AST18.objectExpression([]);
175559
175684
  preload_fn.body.body.splice(
175560
175685
  insert_index++,
175561
175686
  0,
175562
- AST17.expressionStatement(
175563
- AST17.assignmentExpression(
175687
+ AST18.expressionStatement(
175688
+ AST18.assignmentExpression(
175564
175689
  "=",
175565
- AST17.memberExpression(input_obj, AST17.literal(query.name.value)),
175690
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value)),
175566
175691
  variables
175567
175692
  )
175568
175693
  )
@@ -175570,18 +175695,18 @@ function add_load({
175570
175695
  preload_fn.body.body.splice(
175571
175696
  insert_index++,
175572
175697
  0,
175573
- AST17.expressionStatement(
175574
- AST17.callExpression(AST17.memberExpression(promise_list, AST17.identifier("push")), [
175575
- AST17.callExpression(load_fn, [
175576
- AST17.objectExpression([
175577
- AST17.objectProperty(
175578
- AST17.literal("variables"),
175579
- AST17.memberExpression(input_obj, AST17.literal(query.name.value))
175698
+ AST18.expressionStatement(
175699
+ AST18.callExpression(AST18.memberExpression(promise_list, AST18.identifier("push")), [
175700
+ AST18.callExpression(load_fn, [
175701
+ AST18.objectExpression([
175702
+ AST18.objectProperty(
175703
+ AST18.literal("variables"),
175704
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value))
175580
175705
  ),
175581
- AST17.objectProperty(AST17.literal("event"), AST17.identifier("context")),
175582
- AST17.objectProperty(
175583
- AST17.literal("blocking"),
175584
- afterLoad || on_error ? AST17.booleanLiteral(true) : AST17.identifier("undefined")
175706
+ AST18.objectProperty(AST18.literal("event"), AST18.identifier("context")),
175707
+ AST18.objectProperty(
175708
+ AST18.literal("blocking"),
175709
+ afterLoad || on_error ? AST18.booleanLiteral(true) : AST18.identifier("undefined")
175585
175710
  )
175586
175711
  ])
175587
175712
  ])
@@ -175593,28 +175718,28 @@ function add_load({
175593
175718
  preload_fn.body.body.splice(
175594
175719
  insert_index++,
175595
175720
  0,
175596
- AST17.variableDeclaration("let", [
175597
- AST17.variableDeclarator(result_obj, AST17.objectExpression([]))
175721
+ AST18.variableDeclaration("let", [
175722
+ AST18.variableDeclarator(result_obj, AST18.objectExpression([]))
175598
175723
  ]),
175599
- AST17.tryStatement(
175600
- AST17.blockStatement([
175601
- AST17.expressionStatement(
175602
- AST17.assignmentExpression(
175724
+ AST18.tryStatement(
175725
+ AST18.blockStatement([
175726
+ AST18.expressionStatement(
175727
+ AST18.assignmentExpression(
175603
175728
  "=",
175604
175729
  result_obj,
175605
- AST17.callExpression(
175606
- AST17.memberExpression(
175607
- AST17.identifier("Object"),
175608
- AST17.identifier("assign")
175730
+ AST18.callExpression(
175731
+ AST18.memberExpression(
175732
+ AST18.identifier("Object"),
175733
+ AST18.identifier("assign")
175609
175734
  ),
175610
175735
  [
175611
- AST17.objectExpression([]),
175612
- AST17.spreadElement(
175613
- AST17.awaitExpression(
175614
- AST17.callExpression(
175615
- AST17.memberExpression(
175616
- AST17.identifier("Promise"),
175617
- AST17.identifier("all")
175736
+ AST18.objectExpression([]),
175737
+ AST18.spreadElement(
175738
+ AST18.awaitExpression(
175739
+ AST18.callExpression(
175740
+ AST18.memberExpression(
175741
+ AST18.identifier("Promise"),
175742
+ AST18.identifier("all")
175618
175743
  ),
175619
175744
  [promise_list]
175620
175745
  )
@@ -175625,37 +175750,37 @@ function add_load({
175625
175750
  )
175626
175751
  )
175627
175752
  ]),
175628
- AST17.catchClause(
175629
- AST17.identifier("err"),
175753
+ AST18.catchClause(
175754
+ AST18.identifier("err"),
175630
175755
  null,
175631
- AST17.blockStatement([
175632
- on_error ? AST17.expressionStatement(
175633
- AST17.awaitExpression(
175634
- AST17.callExpression(
175635
- AST17.memberExpression(
175756
+ AST18.blockStatement([
175757
+ on_error ? AST18.expressionStatement(
175758
+ AST18.awaitExpression(
175759
+ AST18.callExpression(
175760
+ AST18.memberExpression(
175636
175761
  request_context,
175637
- AST17.identifier("invokeLoadHook")
175762
+ AST18.identifier("invokeLoadHook")
175638
175763
  ),
175639
175764
  [
175640
- AST17.objectExpression([
175641
- AST17.objectProperty(
175642
- AST17.literal("variant"),
175643
- AST17.stringLiteral("error")
175765
+ AST18.objectExpression([
175766
+ AST18.objectProperty(
175767
+ AST18.literal("variant"),
175768
+ AST18.stringLiteral("error")
175644
175769
  ),
175645
- AST17.objectProperty(
175646
- AST17.literal("hookFn"),
175647
- AST17.identifier(houdini_on_error_fn)
175770
+ AST18.objectProperty(
175771
+ AST18.literal("hookFn"),
175772
+ AST18.identifier(houdini_on_error_fn)
175648
175773
  ),
175649
- AST17.objectProperty(
175650
- AST17.literal("error"),
175651
- AST17.identifier("err")
175774
+ AST18.objectProperty(
175775
+ AST18.literal("error"),
175776
+ AST18.identifier("err")
175652
175777
  ),
175653
- AST17.objectProperty(AST17.literal("input"), input_obj)
175778
+ AST18.objectProperty(AST18.literal("input"), input_obj)
175654
175779
  ])
175655
175780
  ]
175656
175781
  )
175657
175782
  )
175658
- ) : AST17.throwStatement(AST17.identifier("err"))
175783
+ ) : AST18.throwStatement(AST18.identifier("err"))
175659
175784
  ])
175660
175785
  )
175661
175786
  )
@@ -175690,22 +175815,22 @@ async function find_special_query(type, page) {
175690
175815
  return definition;
175691
175816
  }
175692
175817
  function load_hook_statements(name, request_context, input_id, result_id) {
175693
- return AST17.expressionStatement(
175694
- AST17.awaitExpression(
175695
- AST17.callExpression(
175696
- AST17.memberExpression(request_context, AST17.identifier("invokeLoadHook")),
175818
+ return AST18.expressionStatement(
175819
+ AST18.awaitExpression(
175820
+ AST18.callExpression(
175821
+ AST18.memberExpression(request_context, AST18.identifier("invokeLoadHook")),
175697
175822
  [
175698
- AST17.objectExpression([
175699
- AST17.objectProperty(AST17.literal("variant"), AST17.stringLiteral(name)),
175700
- AST17.objectProperty(
175701
- AST17.literal("hookFn"),
175702
- AST17.identifier(
175823
+ AST18.objectExpression([
175824
+ AST18.objectProperty(AST18.literal("variant"), AST18.stringLiteral(name)),
175825
+ AST18.objectProperty(
175826
+ AST18.literal("hookFn"),
175827
+ AST18.identifier(
175703
175828
  name === "before" ? houdini_before_load_fn : houdini_afterLoad_fn
175704
175829
  )
175705
175830
  ),
175706
175831
  ...name === "after" ? [
175707
- AST17.objectProperty(AST17.literal("input"), input_id),
175708
- AST17.objectProperty(AST17.literal("data"), result_id)
175832
+ AST18.objectProperty(AST18.literal("input"), input_id),
175833
+ AST18.objectProperty(AST18.literal("data"), result_id)
175709
175834
  ] : []
175710
175835
  ])
175711
175836
  ]
@@ -175767,22 +175892,22 @@ function variable_function_for_query(page, query, has_local) {
175767
175892
  };
175768
175893
  }
175769
175894
  const fn_body = [
175770
- AST17.variableDeclaration("const", [
175771
- AST17.variableDeclarator(
175772
- AST17.identifier("result"),
175773
- AST17.objectExpression(
175895
+ AST18.variableDeclaration("const", [
175896
+ AST18.variableDeclarator(
175897
+ AST18.identifier("result"),
175898
+ AST18.objectExpression(
175774
175899
  Object.entries(has_args).map(([arg, type]) => {
175775
- return AST17.objectProperty(
175776
- AST17.identifier(arg),
175777
- AST17.callExpression(AST17.identifier("parseScalar"), [
175778
- AST17.identifier("config"),
175779
- AST17.stringLiteral(type),
175780
- AST17.memberExpression(
175781
- AST17.memberExpression(
175782
- AST17.identifier("event"),
175783
- AST17.identifier("params")
175900
+ return AST18.objectProperty(
175901
+ AST18.identifier(arg),
175902
+ AST18.callExpression(AST18.identifier("parseScalar"), [
175903
+ AST18.identifier("config"),
175904
+ AST18.stringLiteral(type),
175905
+ AST18.memberExpression(
175906
+ AST18.memberExpression(
175907
+ AST18.identifier("event"),
175908
+ AST18.identifier("params")
175784
175909
  ),
175785
- AST17.identifier(arg)
175910
+ AST18.identifier(arg)
175786
175911
  )
175787
175912
  ])
175788
175913
  );
@@ -175793,28 +175918,28 @@ function variable_function_for_query(page, query, has_local) {
175793
175918
  ];
175794
175919
  if (has_local) {
175795
175920
  fn_body.push(
175796
- AST17.expressionStatement(
175797
- AST17.callExpression(
175798
- AST17.memberExpression(AST17.identifier("Object"), AST17.identifier("assign")),
175921
+ AST18.expressionStatement(
175922
+ AST18.callExpression(
175923
+ AST18.memberExpression(AST18.identifier("Object"), AST18.identifier("assign")),
175799
175924
  [
175800
- AST17.identifier("result"),
175801
- AST17.callExpression(AST17.identifier("marshalInputs"), [
175802
- AST17.objectExpression([
175803
- AST17.objectProperty(
175804
- AST17.identifier("config"),
175805
- AST17.identifier("config")
175925
+ AST18.identifier("result"),
175926
+ AST18.callExpression(AST18.identifier("marshalInputs"), [
175927
+ AST18.objectExpression([
175928
+ AST18.objectProperty(
175929
+ AST18.identifier("config"),
175930
+ AST18.identifier("config")
175806
175931
  ),
175807
- AST17.objectProperty(
175808
- AST17.identifier("input"),
175809
- AST17.awaitExpression(
175810
- AST17.callExpression(
175811
- AST17.identifier(query_variable_fn(query.name.value)),
175812
- [AST17.identifier("event")]
175932
+ AST18.objectProperty(
175933
+ AST18.identifier("input"),
175934
+ AST18.awaitExpression(
175935
+ AST18.callExpression(
175936
+ AST18.identifier(query_variable_fn(query.name.value)),
175937
+ [AST18.identifier("event")]
175813
175938
  )
175814
175939
  )
175815
175940
  ),
175816
- AST17.objectProperty(
175817
- AST17.identifier("artifact"),
175941
+ AST18.objectProperty(
175942
+ AST18.identifier("artifact"),
175818
175943
  artifact_import({
175819
175944
  config: page.config,
175820
175945
  script: page.script,
@@ -175829,11 +175954,11 @@ function variable_function_for_query(page, query, has_local) {
175829
175954
  )
175830
175955
  );
175831
175956
  }
175832
- fn_body.push(AST17.returnStatement(AST17.identifier("result")));
175833
- const declaration2 = AST17.functionDeclaration(
175834
- AST17.identifier(__variable_fn_name(query.name.value)),
175835
- [AST17.identifier("config"), AST17.identifier("event")],
175836
- AST17.blockStatement(fn_body)
175957
+ fn_body.push(AST18.returnStatement(AST18.identifier("result")));
175958
+ const declaration2 = AST18.functionDeclaration(
175959
+ AST18.identifier(__variable_fn_name(query.name.value)),
175960
+ [AST18.identifier("config"), AST18.identifier("event")],
175961
+ AST18.blockStatement(fn_body)
175837
175962
  );
175838
175963
  declaration2.async = true;
175839
175964
  return declaration2;
@@ -175843,8 +175968,8 @@ function __variable_fn_name(name) {
175843
175968
  }
175844
175969
 
175845
175970
  // src/plugin/transforms/kit/session.ts
175846
- var recast18 = __toESM(require_main4(), 1);
175847
- var AST18 = recast18.types.builders;
175971
+ var recast19 = __toESM(require_main4(), 1);
175972
+ var AST19 = recast19.types.builders;
175848
175973
  function session_default(page) {
175849
175974
  if (is_root_layout_server(page.config, page.filepath)) {
175850
175975
  process_root_layout_server(page);
@@ -175860,12 +175985,12 @@ function process_root_layout_server(page) {
175860
175985
  sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
175861
175986
  }).ids[0];
175862
175987
  add_load_return(page, (event_id) => [
175863
- AST18.spreadElement(AST18.callExpression(build_session_object, [event_id]))
175988
+ AST19.spreadElement(AST19.callExpression(build_session_object, [event_id]))
175864
175989
  ]);
175865
175990
  }
175866
175991
  function process_root_layout_script(page) {
175867
175992
  add_load_return(page, (event_id) => [
175868
- AST18.spreadElement(AST18.memberExpression(event_id, AST18.identifier("data")))
175993
+ AST19.spreadElement(AST19.memberExpression(event_id, AST19.identifier("data")))
175869
175994
  ]);
175870
175995
  }
175871
175996
  function add_load_return(page, properties) {
@@ -175877,50 +176002,78 @@ function add_load_return(page, properties) {
175877
176002
  if (return_statement_index !== -1) {
175878
176003
  return_statement = body.body[return_statement_index];
175879
176004
  } else {
175880
- return_statement = AST18.returnStatement(AST18.objectExpression([]));
176005
+ return_statement = AST19.returnStatement(AST19.objectExpression([]));
175881
176006
  body.body.push(return_statement);
175882
- return_statement_index = body.body.length - 1;
175883
176007
  }
175884
- const local_return_var = AST18.identifier("__houdini__vite__plugin__return__value__");
175885
- body.body[return_statement_index] = AST18.variableDeclaration("const", [
175886
- AST18.variableDeclarator(local_return_var, return_statement.argument)
175887
- ]);
175888
- body.body.splice(
175889
- return_statement_index + 1,
175890
- 0,
175891
- AST18.returnStatement(
175892
- AST18.objectExpression([...properties(event_id), AST18.spreadElement(local_return_var)])
175893
- )
175894
- );
176008
+ return walk(body, {
176009
+ enter(node) {
176010
+ if (node.type === "ReturnStatement") {
176011
+ const returnedValue = node.argument;
176012
+ this.replace(
176013
+ AST19.returnStatement(
176014
+ AST19.objectExpression([
176015
+ ...properties(event_id),
176016
+ AST19.spreadElement(returnedValue ?? AST19.objectExpression([]))
176017
+ ])
176018
+ )
176019
+ );
176020
+ }
176021
+ }
176022
+ });
175895
176023
  });
175896
176024
  }
175897
176025
  function modify_load(page, cb) {
175898
- let load_fn = find_exported_fn(page.script.body, "load");
175899
- let event_id = AST18.identifier("event");
175900
- let body = AST18.blockStatement([]);
176026
+ let exported = find_exported_fn(page.script.body, "load");
176027
+ let event_id = AST19.identifier("event");
176028
+ let load_fn = exported?.declaration || null;
176029
+ let body = AST19.blockStatement([]);
175901
176030
  if (load_fn?.type === "ArrowFunctionExpression") {
175902
176031
  if (load_fn.body.type === "BlockStatement") {
175903
176032
  body = load_fn.body;
175904
176033
  } else {
175905
- body = AST18.blockStatement([AST18.returnStatement(load_fn.body)]);
176034
+ body = AST19.blockStatement([AST19.returnStatement(load_fn.body)]);
175906
176035
  load_fn.body = body;
175907
176036
  }
175908
- } else if (load_fn) {
176037
+ } else if (load_fn && "body" in load_fn) {
175909
176038
  body = load_fn.body;
175910
176039
  }
175911
176040
  if (!load_fn) {
175912
- load_fn = AST18.functionDeclaration(
175913
- AST18.identifier("load"),
176041
+ load_fn = AST19.functionDeclaration(
176042
+ AST19.identifier("load"),
175914
176043
  [event_id],
175915
- AST18.blockStatement([])
176044
+ AST19.blockStatement([])
175916
176045
  );
175917
176046
  load_fn.async = true;
175918
176047
  page.script.body.splice(
175919
176048
  find_insert_index(page.script),
175920
176049
  0,
175921
- AST18.exportNamedDeclaration(load_fn)
176050
+ AST19.exportNamedDeclaration(load_fn)
175922
176051
  );
175923
176052
  body = load_fn.body;
176053
+ } else if (load_fn.type === "CallExpression" || load_fn.type === "Identifier") {
176054
+ const exportStatement = exported?.export;
176055
+ if (!exportStatement) {
176056
+ return;
176057
+ }
176058
+ const intermediateID = AST19.identifier("houdini__intermediate__load__");
176059
+ page.script.body.push(
176060
+ AST19.variableDeclaration("const", [AST19.variableDeclarator(intermediateID, load_fn)])
176061
+ );
176062
+ const newLoad = AST19.arrowFunctionExpression(
176063
+ [AST19.identifier("event")],
176064
+ AST19.blockStatement([
176065
+ AST19.variableDeclaration("const", [
176066
+ AST19.variableDeclarator(
176067
+ AST19.identifier("result"),
176068
+ AST19.callExpression(intermediateID, [AST19.identifier("event")])
176069
+ )
176070
+ ]),
176071
+ AST19.returnStatement(AST19.identifier("result"))
176072
+ ])
176073
+ );
176074
+ exportStatement.declaration.declarations[0].init = newLoad;
176075
+ load_fn = newLoad;
176076
+ body = newLoad.body;
175924
176077
  } else {
175925
176078
  if (load_fn.params.length === 0) {
175926
176079
  load_fn.params.push(event_id);
@@ -175930,7 +176083,7 @@ function modify_load(page, cb) {
175930
176083
  const pattern = load_fn.params[0];
175931
176084
  load_fn.params[0] = event_id;
175932
176085
  body.body.unshift(
175933
- AST18.variableDeclaration("let", [AST18.variableDeclarator(pattern, event_id)])
176086
+ AST19.variableDeclaration("let", [AST19.variableDeclarator(pattern, event_id)])
175934
176087
  );
175935
176088
  } else {
175936
176089
  throw new Error(
@@ -175938,7 +176091,7 @@ function modify_load(page, cb) {
175938
176091
  );
175939
176092
  }
175940
176093
  }
175941
- cb(body, event_id);
176094
+ load_fn.body = cb(body, event_id);
175942
176095
  }
175943
176096
 
175944
176097
  // src/plugin/transforms/kit/index.ts
@@ -175951,8 +176104,8 @@ async function SvelteKitProcessor(config, page) {
175951
176104
  }
175952
176105
 
175953
176106
  // src/plugin/transforms/tags.ts
175954
- var recast19 = __toESM(require_main4(), 1);
175955
- var AST19 = recast19.types.builders;
176107
+ var recast20 = __toESM(require_main4(), 1);
176108
+ var AST20 = recast20.types.builders;
175956
176109
  async function GraphQLTagProcessor(config, page) {
175957
176110
  await find_graphql(config, page.script, {
175958
176111
  dependency: page.watch_file,
@@ -175960,7 +176113,7 @@ async function GraphQLTagProcessor(config, page) {
175960
176113
  const { node, parsedDocument } = tag2;
175961
176114
  const operation = config.extractDefinition(parsedDocument);
175962
176115
  const { id: id2 } = store_import({ page, artifact: { name: operation.name.value } });
175963
- node.replaceWith(AST19.newExpression(id2, []));
176116
+ node.replaceWith(AST20.newExpression(id2, []));
175964
176117
  }
175965
176118
  });
175966
176119
  }
@@ -175979,7 +176132,7 @@ async function apply_transforms(framework, page) {
175979
176132
  position = res.position;
175980
176133
  useRunes = res.useRunes;
175981
176134
  } else {
175982
- script = recast20.types.builders.program([]);
176135
+ script = recast21.types.builders.program([]);
175983
176136
  position = { start: 0, end: 0 };
175984
176137
  }
175985
176138
  } else {