strapi-plugin-comments 3.1.1-beta.1 → 3.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.
Files changed (47) hide show
  1. package/dist/_chunks/{en-DeZtLd2b.mjs → en-Cbt6CXo1.mjs} +1 -0
  2. package/dist/_chunks/{en-Ca05D1aN.js → en-DalOPLjA.js} +1 -1
  3. package/dist/_chunks/fr-C4_v32Lz.js +1 -0
  4. package/dist/_chunks/{fr-xcXYnLl6.mjs → fr-CztE_B7U.mjs} +1 -0
  5. package/dist/_chunks/{index-Bd1INOJR.mjs → index-B7COUj1E.mjs} +2 -2
  6. package/dist/_chunks/{index-CtUXr7rK.js → index-BUbb2WGh.js} +264 -264
  7. package/dist/_chunks/index-CL3ZQ5c8.js +18 -0
  8. package/dist/_chunks/{index-BvE3I2WB.mjs → index-CoArx2AB.mjs} +28 -28
  9. package/dist/_chunks/{index-BzZk45CE.js → index-Cpp_f9wq.js} +3 -3
  10. package/dist/_chunks/{index-C9YD28U_.mjs → index-D7OmqK1F.mjs} +4 -4
  11. package/dist/_chunks/{index-DHYGkXW6.js → index-ZS4k_B_E.js} +1 -1
  12. package/dist/_chunks/{index-DcdRh9F7.mjs → index-s3cDVDHP.mjs} +7428 -7281
  13. package/dist/_chunks/pl-D2JXVqZi.js +1 -0
  14. package/dist/_chunks/{pl-B2Il0b0-.mjs → pl-DBv6tBP6.mjs} +1 -0
  15. package/dist/_chunks/pt-BR-CCBBpLDV.js +1 -0
  16. package/dist/_chunks/{pt-BR-KCmyuDgJ.mjs → pt-BR-VqNYQ17j.mjs} +1 -0
  17. package/dist/_chunks/{ru-Bykkb95a.mjs → ru-DHi8VpMQ.mjs} +1 -0
  18. package/dist/_chunks/ru-DUiPYaBn.js +1 -0
  19. package/dist/_chunks/{tr-Cv3hH0Rh.js → tr-D_0EQ9aV.js} +1 -1
  20. package/dist/_chunks/{tr-BW_iq8S7.mjs → tr-ZRzw4I-8.mjs} +1 -0
  21. package/dist/_chunks/{zh-Hans-DixVuF8_.mjs → zh-Hans-Bz2wrwoC.mjs} +1 -0
  22. package/dist/_chunks/zh-Hans-D1xXhhCe.js +1 -0
  23. package/dist/admin/index.js +1 -1
  24. package/dist/admin/index.mjs +1 -1
  25. package/dist/admin/src/api/client.d.ts +5 -5
  26. package/dist/admin/src/api/schemas.d.ts +63 -63
  27. package/dist/admin/src/hooks/useAPI.d.ts +5 -5
  28. package/dist/admin/src/hooks/useCommentsAll.d.ts +1 -1
  29. package/dist/admin/src/hooks/useReports.d.ts +1 -1
  30. package/dist/admin/src/translations/en.d.ts +1 -0
  31. package/dist/admin/src/translations/fr.d.ts +1 -0
  32. package/dist/admin/src/translations/pl.d.ts +1 -0
  33. package/dist/admin/src/translations/pt-BR.d.ts +1 -0
  34. package/dist/admin/src/translations/ru.d.ts +1 -0
  35. package/dist/admin/src/translations/tr.d.ts +1 -0
  36. package/dist/admin/src/translations/zh-Hans.d.ts +1 -0
  37. package/dist/server/index.js +20 -20
  38. package/dist/server/index.mjs +357 -342
  39. package/dist/server/src/validators/api/controllers/admin.controller.validator.d.ts +36 -36
  40. package/dist/server/src/validators/utils.d.ts +60 -60
  41. package/package.json +1 -1
  42. package/dist/_chunks/fr-DvC8Kjh_.js +0 -1
  43. package/dist/_chunks/index-C5ADhjCF.js +0 -18
  44. package/dist/_chunks/pl-DthJf26N.js +0 -1
  45. package/dist/_chunks/pt-BR-ByULlOKU.js +0 -1
  46. package/dist/_chunks/ru-DOajpZMF.js +0 -1
  47. package/dist/_chunks/zh-Hans-P1iGqMnb.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { z as v } from "zod";
2
- import { isProfane as Ev, replaceProfanities as Tv } from "no-profanity";
2
+ import { isProfane as Tv, replaceProfanities as Ov } from "no-profanity";
3
3
  import "fs";
4
4
  import "path";
5
5
  const mm = {
@@ -16,7 +16,7 @@ const mm = {
16
16
  AUTHOR_BLOCKED_PROPS: "blockedAuthorProps"
17
17
  };
18
18
  var Ui = /* @__PURE__ */ ((i) => (i.PENDING = "PENDING", i.APPROVED = "APPROVED", i.REJECTED = "REJECTED", i))(Ui || {}), Zt = /* @__PURE__ */ ((i) => (i.BAD_LANGUAGE = "BAD_LANGUAGE", i.DISCRIMINATION = "DISCRIMINATION", i.OTHER = "OTHER", i))(Zt || {});
19
- const Ov = "plugin::comments", Cv = {
19
+ const Cv = "plugin::comments", Iv = {
20
20
  collectionName: "plugin_comments_comments",
21
21
  info: {
22
22
  tableName: "plugin-comments-comments",
@@ -110,9 +110,9 @@ const Ov = "plugin::comments", Cv = {
110
110
  configurable: !1
111
111
  }
112
112
  }
113
- }, Iv = {
114
- schema: Cv
115
113
  }, xv = {
114
+ schema: Iv
115
+ }, Rv = {
116
116
  collectionName: "plugin_comments_reports",
117
117
  info: {
118
118
  tableName: "plugin-comments-reports",
@@ -158,25 +158,25 @@ const Ov = "plugin::comments", Cv = {
158
158
  configurable: !1
159
159
  }
160
160
  }
161
- }, Rv = {
162
- schema: xv
163
161
  }, Nv = {
164
- comment: Iv,
165
- "comment-report": Rv
162
+ schema: Rv
166
163
  }, Lv = {
164
+ comment: xv,
165
+ "comment-report": Nv
166
+ }, Pv = {
167
167
  name: "comments",
168
168
  plugin: "comments",
169
169
  type: "json"
170
- }, Pv = ({ strapi: i }) => {
171
- if (!Dv({ strapi: i })) {
170
+ }, Dv = ({ strapi: i }) => {
171
+ if (!Fv({ strapi: i })) {
172
172
  i.log.warn(
173
173
  "[Comments Plugin] Custom fields disabled. Upgrade Strapi to use custom fields."
174
174
  );
175
175
  return;
176
176
  }
177
- i.customFields.register(Lv);
178
- }, Dv = ({ strapi: i }) => !!i.customFields, ft = (i, u) => i.plugin("comments").service(u), Fv = (i) => {
179
- Pv(i);
177
+ i.customFields.register(Pv);
178
+ }, Fv = ({ strapi: i }) => !!i.customFields, ft = (i, u) => i.plugin("comments").service(u), Uv = (i) => {
179
+ Dv(i);
180
180
  const u = ft(i.strapi, "common");
181
181
  i.strapi.documents.use(async (o, h) => {
182
182
  if (o.action === "delete" && o.uid.startsWith("api::")) {
@@ -196,7 +196,7 @@ const Ov = "plugin::comments", Cv = {
196
196
  function vm(i) {
197
197
  return typeof i == "string" ? i.split(":") : "createdAt:desc".split(":");
198
198
  }
199
- const Uv = (i) => {
199
+ const Mv = (i) => {
200
200
  const { gql: { auth: u = !1 } = {} } = i;
201
201
  return {
202
202
  "Query.findAllFlat": { auth: u },
@@ -206,7 +206,7 @@ const Uv = (i) => {
206
206
  "Mutation.getRemoveComment": { auth: u },
207
207
  "Mutation.getCreateAbuseReport": { auth: u }
208
208
  };
209
- }, Mv = (i, u) => {
209
+ }, Wv = (i, u) => {
210
210
  const { nonNull: o } = u;
211
211
  return {
212
212
  type: o("Report"),
@@ -225,7 +225,7 @@ const Uv = (i) => {
225
225
  }
226
226
  }
227
227
  };
228
- }, Wv = (i, u) => {
228
+ }, Bv = (i, u) => {
229
229
  const { nonNull: o } = u;
230
230
  return {
231
231
  type: o("CommentSingle"),
@@ -244,7 +244,7 @@ const Uv = (i) => {
244
244
  }
245
245
  }
246
246
  };
247
- }, Bv = (i, u) => {
247
+ }, $v = (i, u) => {
248
248
  const { nonNull: o } = u;
249
249
  return {
250
250
  type: o("CommentSingle"),
@@ -263,7 +263,7 @@ const Uv = (i) => {
263
263
  }
264
264
  }
265
265
  };
266
- }, $v = (i, u) => {
266
+ }, jv = (i, u) => {
267
267
  const { nonNull: o } = u;
268
268
  return {
269
269
  type: o("CommentSingle"),
@@ -282,12 +282,12 @@ const Uv = (i) => {
282
282
  }
283
283
  }
284
284
  };
285
- }, jv = (i, u) => {
285
+ }, kv = (i, u) => {
286
286
  const o = {
287
- getCreateComment: Wv,
288
- getUpdateComment: $v,
289
- getRemoveComment: Bv,
290
- getCreateAbuseReport: Mv
287
+ getCreateComment: Bv,
288
+ getUpdateComment: jv,
289
+ getRemoveComment: $v,
290
+ getCreateAbuseReport: Wv
291
291
  };
292
292
  return u.extendType({
293
293
  type: "Mutation",
@@ -4057,7 +4057,7 @@ const ua = (i) => {
4057
4057
  fields: o,
4058
4058
  omit: h
4059
4059
  };
4060
- }, kv = (i, u) => {
4060
+ }, Vv = (i, u) => {
4061
4061
  const { nonNull: o, stringArg: h } = u, { service: m } = i.plugin("graphql"), { args: A } = m("internals"), E = i.contentType(lr(i, "comment"));
4062
4062
  return {
4063
4063
  type: "ResponseFindAll",
@@ -4080,7 +4080,7 @@ const ua = (i) => {
4080
4080
  );
4081
4081
  }
4082
4082
  };
4083
- }, Vv = (i, u) => {
4083
+ }, Gv = (i, u) => {
4084
4084
  const { nonNull: o, list: h, stringArg: m } = u, { service: A } = i.plugin("graphql"), { args: E } = A("internals"), { naming: { getFiltersInputTypeName: C } } = A("utils"), x = i.contentType(lr(i, "comment"));
4085
4085
  return {
4086
4086
  type: o(h("CommentNested")),
@@ -4111,9 +4111,9 @@ const ua = (i) => {
4111
4111
  }, ul = {
4112
4112
  GENERIC: "GENERIC",
4113
4113
  STRAPI: "STRAPI"
4114
- }, Gv = {
4114
+ }, zv = {
4115
4115
  relatedUid: /^(?<uid>[a-z0-9-]+\:{2}[a-z0-9-]+\.[a-z0-9-]+)\:{1}(?<id>[a-z0-9-]+)$/i
4116
- }, zv = (i, u) => {
4116
+ }, qv = (i, u) => {
4117
4117
  const { nonNull: o, intArg: h, arg: m } = u, { service: A } = i.plugin("graphql"), { args: E } = A("internals"), { naming: { getFiltersInputTypeName: C } } = A("utils"), x = i.contentType(lr(i, "comment"));
4118
4118
  return {
4119
4119
  type: "ResponseFindAllPerAuthor",
@@ -4138,11 +4138,11 @@ const ua = (i) => {
4138
4138
  );
4139
4139
  }
4140
4140
  };
4141
- }, qv = (i, u) => {
4141
+ }, Hv = (i, u) => {
4142
4142
  const o = {
4143
- findAllFlat: kv,
4144
- findAllInHierarchy: Vv,
4145
- findAllPerAuthor: zv
4143
+ findAllFlat: Vv,
4144
+ findAllInHierarchy: Gv,
4145
+ findAllPerAuthor: qv
4146
4146
  };
4147
4147
  return u.extendType({
4148
4148
  type: "Query",
@@ -4153,36 +4153,36 @@ const ua = (i) => {
4153
4153
  }
4154
4154
  }
4155
4155
  });
4156
- }, Hv = (i) => i.objectType({
4156
+ }, Yv = (i) => i.objectType({
4157
4157
  name: "CommentSingle",
4158
4158
  definition(u) {
4159
4159
  u.id("id"), u.string("documentId"), u.nonNull.string("content"), u.boolean("blocked"), u.boolean("blockedThread"), u.boolean("removed"), u.string("approvalStatus"), u.field("threadOf", { type: "CommentSingle" }), u.field("author", { type: "CommentAuthor" }), u.string("createdAt"), u.string("updatedAt");
4160
4160
  }
4161
- }), Yv = (i) => i.objectType({
4161
+ }), Qv = (i) => i.objectType({
4162
4162
  name: "CommentAuthor",
4163
4163
  definition(u) {
4164
4164
  u.id("id"), u.nonNull.string("name"), u.nonNull.string("email"), u.string("avatar");
4165
4165
  }
4166
- }), Qv = (i) => i.enumType({
4166
+ }), Jv = (i) => i.enumType({
4167
4167
  name: "CommentAuthorType",
4168
4168
  description: "User type which was the author of comment - Strapi built-in or generic",
4169
4169
  members: Object.values(ul)
4170
- }), Jv = (i) => i.objectType({
4170
+ }), Xv = (i) => i.objectType({
4171
4171
  name: "CommentNested",
4172
4172
  definition(u) {
4173
4173
  u.id("id"), u.string("documentId"), u.nonNull.string("content"), u.boolean("blocked"), u.boolean("blockedThread"), u.string("approvalStatus"), u.boolean("removed"), u.field("threadOf", { type: "CommentSingle" }), u.list.field("children", { type: "CommentNested" }), u.field("author", { type: "CommentAuthor" }), u.string("createdAt"), u.string("updatedAt");
4174
4174
  }
4175
- }), Xv = (i) => i.inputObjectType({
4175
+ }), Zv = (i) => i.inputObjectType({
4176
4176
  name: "CreateComment",
4177
4177
  definition(u) {
4178
4178
  u.nonNull.string("content"), u.nonNull.string("relation"), u.id("threadOf"), u.field("author", { type: "CreateCommentAuthor" });
4179
4179
  }
4180
- }), Zv = (i) => i.inputObjectType({
4180
+ }), Kv = (i) => i.inputObjectType({
4181
4181
  name: "CreateCommentAuthor",
4182
4182
  definition(u) {
4183
4183
  u.nonNull.id("id"), u.nonNull.string("name"), u.string("email"), u.string("avatar");
4184
4184
  }
4185
- }), Kv = (i) => i.inputObjectType({
4185
+ }), e0 = (i) => i.inputObjectType({
4186
4186
  name: "CreateReport",
4187
4187
  definition(u) {
4188
4188
  u.id("commentId"), u.nonNull.string("relation"), u.nonNull.string("content"), u.field("reason", { type: "ReportReason" });
@@ -4192,20 +4192,20 @@ function He(i, u) {
4192
4192
  if (!!!i)
4193
4193
  throw new Error(u);
4194
4194
  }
4195
- function Hm(i) {
4195
+ function Ym(i) {
4196
4196
  return typeof i == "object" && i !== null;
4197
4197
  }
4198
- function e0(i, u) {
4198
+ function t0(i, u) {
4199
4199
  if (!!!i)
4200
4200
  throw new Error(
4201
4201
  "Unexpected invariant triggered."
4202
4202
  );
4203
4203
  }
4204
- const t0 = /\r\n|[\n\r]/g;
4204
+ const n0 = /\r\n|[\n\r]/g;
4205
4205
  function ym(i, u) {
4206
4206
  let o = 0, h = 1;
4207
- for (const m of i.body.matchAll(t0)) {
4208
- if (typeof m.index == "number" || e0(!1), m.index >= u)
4207
+ for (const m of i.body.matchAll(n0)) {
4208
+ if (typeof m.index == "number" || t0(!1), m.index >= u)
4209
4209
  break;
4210
4210
  o = m.index + m[0].length, h += 1;
4211
4211
  }
@@ -4214,27 +4214,27 @@ function ym(i, u) {
4214
4214
  column: u + 1 - o
4215
4215
  };
4216
4216
  }
4217
- function n0(i) {
4218
- return Ym(
4217
+ function r0(i) {
4218
+ return Qm(
4219
4219
  i.source,
4220
4220
  ym(i.source, i.start)
4221
4221
  );
4222
4222
  }
4223
- function Ym(i, u) {
4223
+ function Qm(i, u) {
4224
4224
  const o = i.locationOffset.column - 1, h = "".padStart(o) + i.body, m = u.line - 1, A = i.locationOffset.line - 1, E = u.line + A, C = u.line === 1 ? o : 0, x = u.column + C, N = `${i.name}:${E}:${x}
4225
4225
  `, O = h.split(/\r\n|[\n\r]/g), U = O[m];
4226
4226
  if (U.length > 120) {
4227
4227
  const M = Math.floor(x / 80), Q = x % 80, j = [];
4228
4228
  for (let J = 0; J < U.length; J += 80)
4229
4229
  j.push(U.slice(J, J + 80));
4230
- return N + Rm([
4230
+ return N + Nm([
4231
4231
  [`${E} |`, j[0]],
4232
4232
  ...j.slice(1, M + 1).map((J) => ["|", J]),
4233
4233
  ["|", "^".padStart(Q)],
4234
4234
  ["|", j[M + 1]]
4235
4235
  ]);
4236
4236
  }
4237
- return N + Rm([
4237
+ return N + Nm([
4238
4238
  // Lines specified like this: ["prefix", "string"],
4239
4239
  [`${E - 1} |`, O[m - 1]],
4240
4240
  [`${E} |`, U],
@@ -4242,12 +4242,12 @@ function Ym(i, u) {
4242
4242
  [`${E + 1} |`, O[m + 1]]
4243
4243
  ]);
4244
4244
  }
4245
- function Rm(i) {
4245
+ function Nm(i) {
4246
4246
  const u = i.filter(([h, m]) => m !== void 0), o = Math.max(...u.map(([h]) => h.length));
4247
4247
  return u.map(([h, m]) => h.padStart(o) + (m ? " " + m : "")).join(`
4248
4248
  `);
4249
4249
  }
4250
- function r0(i) {
4250
+ function i0(i) {
4251
4251
  const u = i[0];
4252
4252
  return u == null || "kind" in u || "length" in u ? {
4253
4253
  nodes: u,
@@ -4299,15 +4299,15 @@ class $n extends Error {
4299
4299
  */
4300
4300
  constructor(u, ...o) {
4301
4301
  var h, m, A;
4302
- const { nodes: E, source: C, positions: x, path: N, originalError: O, extensions: U } = r0(o);
4303
- super(u), this.name = "GraphQLError", this.path = N ?? void 0, this.originalError = O ?? void 0, this.nodes = Nm(
4302
+ const { nodes: E, source: C, positions: x, path: N, originalError: O, extensions: U } = i0(o);
4303
+ super(u), this.name = "GraphQLError", this.path = N ?? void 0, this.originalError = O ?? void 0, this.nodes = Lm(
4304
4304
  Array.isArray(E) ? E : E ? [E] : void 0
4305
4305
  );
4306
- const M = Nm(
4306
+ const M = Lm(
4307
4307
  (h = this.nodes) === null || h === void 0 ? void 0 : h.map((j) => j.loc).filter((j) => j != null)
4308
4308
  );
4309
4309
  this.source = C ?? (M == null || (m = M[0]) === null || m === void 0 ? void 0 : m.source), this.positions = x ?? M?.map((j) => j.start), this.locations = x && C ? x.map((j) => ym(C, j)) : M?.map((j) => ym(j.source, j.start));
4310
- const Q = Hm(
4310
+ const Q = Ym(
4311
4311
  O?.extensions
4312
4312
  ) ? O?.extensions : void 0;
4313
4313
  this.extensions = (A = U ?? Q) !== null && A !== void 0 ? A : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
@@ -4349,12 +4349,12 @@ class $n extends Error {
4349
4349
  for (const o of this.nodes)
4350
4350
  o.loc && (u += `
4351
4351
 
4352
- ` + n0(o.loc));
4352
+ ` + r0(o.loc));
4353
4353
  else if (this.source && this.locations)
4354
4354
  for (const o of this.locations)
4355
4355
  u += `
4356
4356
 
4357
- ` + Ym(this.source, o);
4357
+ ` + Qm(this.source, o);
4358
4358
  return u;
4359
4359
  }
4360
4360
  toJSON() {
@@ -4364,10 +4364,10 @@ class $n extends Error {
4364
4364
  return this.locations != null && (u.locations = this.locations), this.path != null && (u.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (u.extensions = this.extensions), u;
4365
4365
  }
4366
4366
  }
4367
- function Nm(i) {
4367
+ function Lm(i) {
4368
4368
  return i === void 0 || i.length === 0 ? void 0 : i;
4369
4369
  }
4370
- const Qm = {
4370
+ const Jm = {
4371
4371
  Name: [],
4372
4372
  Document: ["definitions"],
4373
4373
  OperationDefinition: [
@@ -4441,47 +4441,47 @@ const Qm = {
4441
4441
  UnionTypeExtension: ["name", "directives", "types"],
4442
4442
  EnumTypeExtension: ["name", "directives", "values"],
4443
4443
  InputObjectTypeExtension: ["name", "directives", "fields"]
4444
- }, i0 = new Set(Object.keys(Qm));
4445
- function Lm(i) {
4444
+ }, o0 = new Set(Object.keys(Jm));
4445
+ function Pm(i) {
4446
4446
  const u = i?.kind;
4447
- return typeof u == "string" && i0.has(u);
4447
+ return typeof u == "string" && o0.has(u);
4448
4448
  }
4449
- var Pm;
4449
+ var Dm;
4450
4450
  (function(i) {
4451
4451
  i.QUERY = "query", i.MUTATION = "mutation", i.SUBSCRIPTION = "subscription";
4452
- })(Pm || (Pm = {}));
4452
+ })(Dm || (Dm = {}));
4453
4453
  var Xt;
4454
4454
  (function(i) {
4455
4455
  i.NAME = "Name", i.DOCUMENT = "Document", i.OPERATION_DEFINITION = "OperationDefinition", i.VARIABLE_DEFINITION = "VariableDefinition", i.SELECTION_SET = "SelectionSet", i.FIELD = "Field", i.ARGUMENT = "Argument", i.FRAGMENT_SPREAD = "FragmentSpread", i.INLINE_FRAGMENT = "InlineFragment", i.FRAGMENT_DEFINITION = "FragmentDefinition", i.VARIABLE = "Variable", i.INT = "IntValue", i.FLOAT = "FloatValue", i.STRING = "StringValue", i.BOOLEAN = "BooleanValue", i.NULL = "NullValue", i.ENUM = "EnumValue", i.LIST = "ListValue", i.OBJECT = "ObjectValue", i.OBJECT_FIELD = "ObjectField", i.DIRECTIVE = "Directive", i.NAMED_TYPE = "NamedType", i.LIST_TYPE = "ListType", i.NON_NULL_TYPE = "NonNullType", i.SCHEMA_DEFINITION = "SchemaDefinition", i.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", i.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", i.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", i.FIELD_DEFINITION = "FieldDefinition", i.INPUT_VALUE_DEFINITION = "InputValueDefinition", i.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", i.UNION_TYPE_DEFINITION = "UnionTypeDefinition", i.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", i.ENUM_VALUE_DEFINITION = "EnumValueDefinition", i.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", i.DIRECTIVE_DEFINITION = "DirectiveDefinition", i.SCHEMA_EXTENSION = "SchemaExtension", i.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", i.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", i.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", i.UNION_TYPE_EXTENSION = "UnionTypeExtension", i.ENUM_TYPE_EXTENSION = "EnumTypeExtension", i.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension";
4456
4456
  })(Xt || (Xt = {}));
4457
- function Dm(i) {
4457
+ function Fm(i) {
4458
4458
  return i === 9 || i === 32;
4459
4459
  }
4460
- function o0(i) {
4460
+ function u0(i) {
4461
4461
  return i >= 48 && i <= 57;
4462
4462
  }
4463
- function Jm(i) {
4463
+ function Xm(i) {
4464
4464
  return i >= 97 && i <= 122 || // A-Z
4465
4465
  i >= 65 && i <= 90;
4466
4466
  }
4467
- function u0(i) {
4468
- return Jm(i) || i === 95;
4469
- }
4470
4467
  function a0(i) {
4471
- return Jm(i) || o0(i) || i === 95;
4468
+ return Xm(i) || i === 95;
4469
+ }
4470
+ function s0(i) {
4471
+ return Xm(i) || u0(i) || i === 95;
4472
4472
  }
4473
- function s0(i, u) {
4474
- const o = i.replace(/"""/g, '\\"""'), h = o.split(/\r\n|[\n\r]/g), m = h.length === 1, A = h.length > 1 && h.slice(1).every((Q) => Q.length === 0 || Dm(Q.charCodeAt(0))), E = o.endsWith('\\"""'), C = i.endsWith('"') && !E, x = i.endsWith("\\"), N = C || x, O = (
4473
+ function l0(i, u) {
4474
+ const o = i.replace(/"""/g, '\\"""'), h = o.split(/\r\n|[\n\r]/g), m = h.length === 1, A = h.length > 1 && h.slice(1).every((Q) => Q.length === 0 || Fm(Q.charCodeAt(0))), E = o.endsWith('\\"""'), C = i.endsWith('"') && !E, x = i.endsWith("\\"), N = C || x, O = (
4475
4475
  // add leading and trailing new lines only if it improves readability
4476
4476
  !m || i.length > 70 || N || A || E
4477
4477
  );
4478
4478
  let U = "";
4479
- const M = m && Dm(i.charCodeAt(0));
4479
+ const M = m && Fm(i.charCodeAt(0));
4480
4480
  return (O && !M || A) && (U += `
4481
4481
  `), U += o, (O || N) && (U += `
4482
4482
  `), '"""' + U + '"""';
4483
4483
  }
4484
- const l0 = 10, Xm = 2;
4484
+ const c0 = 10, Zm = 2;
4485
4485
  function jn(i) {
4486
4486
  return Df(i, []);
4487
4487
  }
@@ -4492,45 +4492,45 @@ function Df(i, u) {
4492
4492
  case "function":
4493
4493
  return i.name ? `[function ${i.name}]` : "[function]";
4494
4494
  case "object":
4495
- return c0(i, u);
4495
+ return f0(i, u);
4496
4496
  default:
4497
4497
  return String(i);
4498
4498
  }
4499
4499
  }
4500
- function c0(i, u) {
4500
+ function f0(i, u) {
4501
4501
  if (i === null)
4502
4502
  return "null";
4503
4503
  if (u.includes(i))
4504
4504
  return "[Circular]";
4505
4505
  const o = [...u, i];
4506
- if (f0(i)) {
4506
+ if (h0(i)) {
4507
4507
  const h = i.toJSON();
4508
4508
  if (h !== i)
4509
4509
  return typeof h == "string" ? h : Df(h, o);
4510
4510
  } else if (Array.isArray(i))
4511
- return p0(i, o);
4512
- return h0(i, o);
4511
+ return d0(i, o);
4512
+ return p0(i, o);
4513
4513
  }
4514
- function f0(i) {
4514
+ function h0(i) {
4515
4515
  return typeof i.toJSON == "function";
4516
4516
  }
4517
- function h0(i, u) {
4517
+ function p0(i, u) {
4518
4518
  const o = Object.entries(i);
4519
- return o.length === 0 ? "{}" : u.length > Xm ? "[" + d0(i) + "]" : "{ " + o.map(
4519
+ return o.length === 0 ? "{}" : u.length > Zm ? "[" + g0(i) + "]" : "{ " + o.map(
4520
4520
  ([m, A]) => m + ": " + Df(A, u)
4521
4521
  ).join(", ") + " }";
4522
4522
  }
4523
- function p0(i, u) {
4523
+ function d0(i, u) {
4524
4524
  if (i.length === 0)
4525
4525
  return "[]";
4526
- if (u.length > Xm)
4526
+ if (u.length > Zm)
4527
4527
  return "[Array]";
4528
- const o = Math.min(l0, i.length), h = i.length - o, m = [];
4528
+ const o = Math.min(c0, i.length), h = i.length - o, m = [];
4529
4529
  for (let A = 0; A < o; ++A)
4530
4530
  m.push(Df(i[A], u));
4531
4531
  return h === 1 ? m.push("... 1 more item") : h > 1 && m.push(`... ${h} more items`), "[" + m.join(", ") + "]";
4532
4532
  }
4533
- function d0(i) {
4533
+ function g0(i) {
4534
4534
  const u = Object.prototype.toString.call(i).replace(/^\[object /, "").replace(/]$/, "");
4535
4535
  if (u === "Object" && typeof i.constructor == "function") {
4536
4536
  const o = i.constructor.name;
@@ -4539,11 +4539,11 @@ function d0(i) {
4539
4539
  }
4540
4540
  return u;
4541
4541
  }
4542
- const g0 = globalThis.process && // eslint-disable-next-line no-undef
4542
+ const m0 = globalThis.process && // eslint-disable-next-line no-undef
4543
4543
  process.env.NODE_ENV === "production", Mi = (
4544
4544
  /* c8 ignore next 6 */
4545
4545
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
4546
- g0 ? function(u, o) {
4546
+ m0 ? function(u, o) {
4547
4547
  return u instanceof o;
4548
4548
  } : function(u, o) {
4549
4549
  if (u instanceof o)
@@ -4572,8 +4572,8 @@ spurious results.`);
4572
4572
  }
4573
4573
  return !1;
4574
4574
  }
4575
- ), m0 = 5;
4576
- function v0(i, u) {
4575
+ ), v0 = 5;
4576
+ function y0(i, u) {
4577
4577
  const [o, h] = u ? [i, u] : [void 0, i];
4578
4578
  let m = " Did you mean ";
4579
4579
  o && (m += o + " ");
@@ -4586,19 +4586,19 @@ function v0(i, u) {
4586
4586
  case 2:
4587
4587
  return m + A[0] + " or " + A[1] + "?";
4588
4588
  }
4589
- const E = A.slice(0, m0), C = E.pop();
4589
+ const E = A.slice(0, v0), C = E.pop();
4590
4590
  return m + E.join(", ") + ", or " + C + "?";
4591
4591
  }
4592
- function Fm(i) {
4592
+ function Um(i) {
4593
4593
  return i;
4594
4594
  }
4595
- function y0(i, u) {
4595
+ function _0(i, u) {
4596
4596
  const o = /* @__PURE__ */ Object.create(null);
4597
4597
  for (const h of i)
4598
4598
  o[u(h)] = h;
4599
4599
  return o;
4600
4600
  }
4601
- function Om(i, u, o) {
4601
+ function Cm(i, u, o) {
4602
4602
  const h = /* @__PURE__ */ Object.create(null);
4603
4603
  for (const m of i)
4604
4604
  h[u(m)] = o(m);
@@ -4610,7 +4610,7 @@ function Ff(i, u) {
4610
4610
  o[h] = u(i[h], h);
4611
4611
  return o;
4612
4612
  }
4613
- function _0(i, u) {
4613
+ function b0(i, u) {
4614
4614
  let o = 0, h = 0;
4615
4615
  for (; o < i.length && h < u.length; ) {
4616
4616
  let m = i.charCodeAt(o), A = u.charCodeAt(h);
@@ -4637,24 +4637,24 @@ function _0(i, u) {
4637
4637
  }
4638
4638
  return i.length - u.length;
4639
4639
  }
4640
- const _m = 48, b0 = 57;
4640
+ const _m = 48, w0 = 57;
4641
4641
  function Ef(i) {
4642
- return !isNaN(i) && _m <= i && i <= b0;
4642
+ return !isNaN(i) && _m <= i && i <= w0;
4643
4643
  }
4644
- function w0(i, u) {
4645
- const o = /* @__PURE__ */ Object.create(null), h = new A0(i), m = Math.floor(i.length * 0.4) + 1;
4644
+ function A0(i, u) {
4645
+ const o = /* @__PURE__ */ Object.create(null), h = new S0(i), m = Math.floor(i.length * 0.4) + 1;
4646
4646
  for (const A of u) {
4647
4647
  const E = h.measure(A, m);
4648
4648
  E !== void 0 && (o[A] = E);
4649
4649
  }
4650
4650
  return Object.keys(o).sort((A, E) => {
4651
4651
  const C = o[A] - o[E];
4652
- return C !== 0 ? C : _0(A, E);
4652
+ return C !== 0 ? C : b0(A, E);
4653
4653
  });
4654
4654
  }
4655
- class A0 {
4655
+ class S0 {
4656
4656
  constructor(u) {
4657
- this._input = u, this._inputLowerCase = u.toLowerCase(), this._inputArray = Um(this._inputLowerCase), this._rows = [
4657
+ this._input = u, this._inputLowerCase = u.toLowerCase(), this._inputArray = Mm(this._inputLowerCase), this._rows = [
4658
4658
  new Array(u.length + 1).fill(0),
4659
4659
  new Array(u.length + 1).fill(0),
4660
4660
  new Array(u.length + 1).fill(0)
@@ -4666,7 +4666,7 @@ class A0 {
4666
4666
  const h = u.toLowerCase();
4667
4667
  if (this._inputLowerCase === h)
4668
4668
  return 1;
4669
- let m = Um(h), A = this._inputArray;
4669
+ let m = Mm(h), A = this._inputArray;
4670
4670
  if (m.length < A.length) {
4671
4671
  const O = m;
4672
4672
  m = A, A = O;
@@ -4703,7 +4703,7 @@ class A0 {
4703
4703
  return N <= o ? N : void 0;
4704
4704
  }
4705
4705
  }
4706
- function Um(i) {
4706
+ function Mm(i) {
4707
4707
  const u = i.length, o = new Array(u);
4708
4708
  for (let h = 0; h < u; ++h)
4709
4709
  o[h] = i.charCodeAt(h);
@@ -4719,14 +4719,14 @@ function Rr(i) {
4719
4719
  u[o] = h;
4720
4720
  return u;
4721
4721
  }
4722
- function S0(i) {
4723
- return `"${i.replace(E0, T0)}"`;
4722
+ function E0(i) {
4723
+ return `"${i.replace(T0, O0)}"`;
4724
4724
  }
4725
- const E0 = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
4726
- function T0(i) {
4727
- return O0[i.charCodeAt(0)];
4725
+ const T0 = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
4726
+ function O0(i) {
4727
+ return C0[i.charCodeAt(0)];
4728
4728
  }
4729
- const O0 = [
4729
+ const C0 = [
4730
4730
  "\\u0000",
4731
4731
  "\\u0001",
4732
4732
  "\\u0002",
@@ -4892,11 +4892,11 @@ const O0 = [
4892
4892
  "\\u009D",
4893
4893
  "\\u009E",
4894
4894
  "\\u009F"
4895
- ], C0 = Object.freeze({});
4896
- function I0(i, u, o = Qm) {
4895
+ ], I0 = Object.freeze({});
4896
+ function x0(i, u, o = Jm) {
4897
4897
  const h = /* @__PURE__ */ new Map();
4898
4898
  for (const X of Object.values(Xt))
4899
- h.set(X, x0(u, X));
4899
+ h.set(X, R0(u, X));
4900
4900
  let m, A = Array.isArray(i), E = [i], C = -1, x = [], N = i, O, U;
4901
4901
  const M = [], Q = [];
4902
4902
  do {
@@ -4925,9 +4925,9 @@ function I0(i, u, o = Qm) {
4925
4925
  let ve;
4926
4926
  if (!Array.isArray(N)) {
4927
4927
  var j, J;
4928
- Lm(N) || He(!1, `Invalid AST Node: ${jn(N)}.`);
4928
+ Pm(N) || He(!1, `Invalid AST Node: ${jn(N)}.`);
4929
4929
  const Pe = X ? (j = h.get(N.kind)) === null || j === void 0 ? void 0 : j.leave : (J = h.get(N.kind)) === null || J === void 0 ? void 0 : J.enter;
4930
- if (ve = Pe?.call(u, N, O, U, M, Q), ve === C0)
4930
+ if (ve = Pe?.call(u, N, O, U, M, Q), ve === I0)
4931
4931
  break;
4932
4932
  if (ve === !1) {
4933
4933
  if (!X) {
@@ -4935,7 +4935,7 @@ function I0(i, u, o = Qm) {
4935
4935
  continue;
4936
4936
  }
4937
4937
  } else if (ve !== void 0 && (x.push([O, ve]), !X))
4938
- if (Lm(ve))
4938
+ if (Pm(ve))
4939
4939
  N = ve;
4940
4940
  else {
4941
4941
  M.pop();
@@ -4957,7 +4957,7 @@ function I0(i, u, o = Qm) {
4957
4957
  } while (m !== void 0);
4958
4958
  return x.length !== 0 ? x[x.length - 1][1] : i;
4959
4959
  }
4960
- function x0(i, u) {
4960
+ function R0(i, u) {
4961
4961
  const o = i[u];
4962
4962
  return typeof o == "object" ? o : typeof o == "function" ? {
4963
4963
  enter: o,
@@ -4967,10 +4967,10 @@ function x0(i, u) {
4967
4967
  leave: i.leave
4968
4968
  };
4969
4969
  }
4970
- function Mm(i) {
4971
- return I0(i, N0);
4970
+ function Wm(i) {
4971
+ return x0(i, L0);
4972
4972
  }
4973
- const R0 = 80, N0 = {
4973
+ const N0 = 80, L0 = {
4974
4974
  Name: {
4975
4975
  leave: (i) => i.value
4976
4976
  },
@@ -5006,7 +5006,7 @@ const R0 = 80, N0 = {
5006
5006
  leave({ alias: i, name: u, arguments: o, directives: h, selectionSet: m }) {
5007
5007
  const A = le("", i, ": ") + u;
5008
5008
  let E = A + le("(", G(o, ", "), ")");
5009
- return E.length > R0 && (E = A + le(`(
5009
+ return E.length > N0 && (E = A + le(`(
5010
5010
  `, If(G(o, `
5011
5011
  `)), `
5012
5012
  )`)), G([E, G(h, " "), m], " ");
@@ -5044,7 +5044,7 @@ const R0 = 80, N0 = {
5044
5044
  leave: ({ value: i }) => i
5045
5045
  },
5046
5046
  StringValue: {
5047
- leave: ({ value: i, block: u }) => u ? s0(i) : S0(i)
5047
+ leave: ({ value: i, block: u }) => u ? l0(i) : E0(i)
5048
5048
  },
5049
5049
  BooleanValue: {
5050
5050
  leave: ({ value: i }) => i ? "true" : "false"
@@ -5105,7 +5105,7 @@ const R0 = 80, N0 = {
5105
5105
  },
5106
5106
  FieldDefinition: {
5107
5107
  leave: ({ description: i, name: u, arguments: o, type: h, directives: m }) => le("", i, `
5108
- `) + u + (Wm(o) ? le(`(
5108
+ `) + u + (Bm(o) ? le(`(
5109
5109
  `, If(G(o, `
5110
5110
  `)), `
5111
5111
  )`) : le("(", G(o, ", "), ")")) + ": " + h + le(" ", G(m, " "))
@@ -5151,7 +5151,7 @@ const R0 = 80, N0 = {
5151
5151
  },
5152
5152
  DirectiveDefinition: {
5153
5153
  leave: ({ description: i, name: u, arguments: o, repeatable: h, locations: m }) => le("", i, `
5154
- `) + "directive @" + u + (Wm(o) ? le(`(
5154
+ `) + "directive @" + u + (Bm(o) ? le(`(
5155
5155
  `, If(G(o, `
5156
5156
  `)), `
5157
5157
  )`) : le("(", G(o, ", "), ")")) + (h ? " repeatable" : "") + " on " + G(m, " | ")
@@ -5224,7 +5224,7 @@ function If(i) {
5224
5224
  return le(" ", i.replace(/\n/g, `
5225
5225
  `));
5226
5226
  }
5227
- function Wm(i) {
5227
+ function Bm(i) {
5228
5228
  var u;
5229
5229
  return (u = i?.some((o) => o.includes(`
5230
5230
  `))) !== null && u !== void 0 ? u : !1;
@@ -5246,7 +5246,7 @@ function bm(i, u) {
5246
5246
  (o) => bm(o, u)
5247
5247
  );
5248
5248
  case Xt.OBJECT:
5249
- return Om(
5249
+ return Cm(
5250
5250
  i.fields,
5251
5251
  (o) => o.name.value,
5252
5252
  (o) => bm(o.value, u)
@@ -5259,49 +5259,49 @@ function cr(i) {
5259
5259
  if (i != null || He(!1, "Must provide name."), typeof i == "string" || He(!1, "Expected name to be a string."), i.length === 0)
5260
5260
  throw new $n("Expected name to be a non-empty string.");
5261
5261
  for (let u = 1; u < i.length; ++u)
5262
- if (!a0(i.charCodeAt(u)))
5262
+ if (!s0(i.charCodeAt(u)))
5263
5263
  throw new $n(
5264
5264
  `Names must only contain [_a-zA-Z0-9] but "${i}" does not.`
5265
5265
  );
5266
- if (!u0(i.charCodeAt(0)))
5266
+ if (!a0(i.charCodeAt(0)))
5267
5267
  throw new $n(
5268
5268
  `Names must start with [_a-zA-Z] but "${i}" does not.`
5269
5269
  );
5270
5270
  return i;
5271
5271
  }
5272
- function L0(i) {
5272
+ function P0(i) {
5273
5273
  if (i === "true" || i === "false" || i === "null")
5274
5274
  throw new $n(`Enum values cannot be named: ${i}`);
5275
5275
  return cr(i);
5276
5276
  }
5277
5277
  function ll(i) {
5278
- return P0(i) || D0(i) || F0(i) || U0(i) || M0(i) || W0(i) || B0(i) || Cm(i);
5279
- }
5280
- function P0(i) {
5281
- return Mi(i, ev);
5278
+ return D0(i) || F0(i) || U0(i) || M0(i) || W0(i) || B0(i) || $0(i) || Im(i);
5282
5279
  }
5283
5280
  function D0(i) {
5284
- return Mi(i, V0);
5281
+ return Mi(i, tv);
5285
5282
  }
5286
5283
  function F0(i) {
5287
- return Mi(i, q0);
5284
+ return Mi(i, G0);
5288
5285
  }
5289
5286
  function U0(i) {
5290
5287
  return Mi(i, H0);
5291
5288
  }
5292
5289
  function M0(i) {
5293
- return Mi(i, Q0);
5290
+ return Mi(i, Y0);
5294
5291
  }
5295
5292
  function W0(i) {
5296
5293
  return Mi(i, J0);
5297
5294
  }
5298
5295
  function B0(i) {
5299
- return Mi(i, $0);
5296
+ return Mi(i, X0);
5300
5297
  }
5301
- function Cm(i) {
5298
+ function $0(i) {
5302
5299
  return Mi(i, j0);
5303
5300
  }
5304
- class $0 {
5301
+ function Im(i) {
5302
+ return Mi(i, k0);
5303
+ }
5304
+ class j0 {
5305
5305
  constructor(u) {
5306
5306
  ll(u) || He(!1, `Expected ${jn(u)} to be a GraphQL type.`), this.ofType = u;
5307
5307
  }
@@ -5315,9 +5315,9 @@ class $0 {
5315
5315
  return this.toString();
5316
5316
  }
5317
5317
  }
5318
- class j0 {
5318
+ class k0 {
5319
5319
  constructor(u) {
5320
- k0(u) || He(
5320
+ V0(u) || He(
5321
5321
  !1,
5322
5322
  `Expected ${jn(u)} to be a GraphQL nullable type.`
5323
5323
  ), this.ofType = u;
@@ -5332,20 +5332,20 @@ class j0 {
5332
5332
  return this.toString();
5333
5333
  }
5334
5334
  }
5335
- function k0(i) {
5336
- return ll(i) && !Cm(i);
5335
+ function V0(i) {
5336
+ return ll(i) && !Im(i);
5337
5337
  }
5338
- function Zm(i) {
5338
+ function Km(i) {
5339
5339
  return typeof i == "function" ? i() : i;
5340
5340
  }
5341
- function Km(i) {
5341
+ function ev(i) {
5342
5342
  return typeof i == "function" ? i() : i;
5343
5343
  }
5344
- class ev {
5344
+ class tv {
5345
5345
  constructor(u) {
5346
5346
  var o, h, m, A;
5347
- const E = (o = u.parseValue) !== null && o !== void 0 ? o : Fm;
5348
- this.name = cr(u.name), this.description = u.description, this.specifiedByURL = u.specifiedByURL, this.serialize = (h = u.serialize) !== null && h !== void 0 ? h : Fm, this.parseValue = E, this.parseLiteral = (m = u.parseLiteral) !== null && m !== void 0 ? m : (C, x) => E(bm(C, x)), this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (A = u.extensionASTNodes) !== null && A !== void 0 ? A : [], u.specifiedByURL == null || typeof u.specifiedByURL == "string" || He(
5347
+ const E = (o = u.parseValue) !== null && o !== void 0 ? o : Um;
5348
+ this.name = cr(u.name), this.description = u.description, this.specifiedByURL = u.specifiedByURL, this.serialize = (h = u.serialize) !== null && h !== void 0 ? h : Um, this.parseValue = E, this.parseLiteral = (m = u.parseLiteral) !== null && m !== void 0 ? m : (C, x) => E(bm(C, x)), this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (A = u.extensionASTNodes) !== null && A !== void 0 ? A : [], u.specifiedByURL == null || typeof u.specifiedByURL == "string" || He(
5349
5349
  !1,
5350
5350
  `${this.name} must provide "specifiedByURL" as a string, but got: ${jn(u.specifiedByURL)}.`
5351
5351
  ), u.serialize == null || typeof u.serialize == "function" || He(
@@ -5379,10 +5379,10 @@ class ev {
5379
5379
  return this.toString();
5380
5380
  }
5381
5381
  }
5382
- class V0 {
5382
+ class G0 {
5383
5383
  constructor(u) {
5384
5384
  var o;
5385
- this.name = cr(u.name), this.description = u.description, this.isTypeOf = u.isTypeOf, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._fields = () => nv(u), this._interfaces = () => tv(u), u.isTypeOf == null || typeof u.isTypeOf == "function" || He(
5385
+ this.name = cr(u.name), this.description = u.description, this.isTypeOf = u.isTypeOf, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._fields = () => rv(u), this._interfaces = () => nv(u), u.isTypeOf == null || typeof u.isTypeOf == "function" || He(
5386
5386
  !1,
5387
5387
  `${this.name} must provide "isTypeOf" as a function, but got: ${jn(u.isTypeOf)}.`
5388
5388
  );
@@ -5401,7 +5401,7 @@ class V0 {
5401
5401
  name: this.name,
5402
5402
  description: this.description,
5403
5403
  interfaces: this.getInterfaces(),
5404
- fields: rv(this.getFields()),
5404
+ fields: iv(this.getFields()),
5405
5405
  isTypeOf: this.isTypeOf,
5406
5406
  extensions: this.extensions,
5407
5407
  astNode: this.astNode,
@@ -5415,9 +5415,9 @@ class V0 {
5415
5415
  return this.toString();
5416
5416
  }
5417
5417
  }
5418
- function tv(i) {
5418
+ function nv(i) {
5419
5419
  var u;
5420
- const o = Zm(
5420
+ const o = Km(
5421
5421
  (u = i.interfaces) !== null && u !== void 0 ? u : []
5422
5422
  );
5423
5423
  return Array.isArray(o) || He(
@@ -5425,8 +5425,8 @@ function tv(i) {
5425
5425
  `${i.name} interfaces must be an Array or a function which returns an Array.`
5426
5426
  ), o;
5427
5427
  }
5428
- function nv(i) {
5429
- const u = Km(i.fields);
5428
+ function rv(i) {
5429
+ const u = ev(i.fields);
5430
5430
  return aa(u) || He(
5431
5431
  !1,
5432
5432
  `${i.name} fields must be an object with field names as keys or a function which returns such an object.`
@@ -5447,7 +5447,7 @@ function nv(i) {
5447
5447
  name: cr(h),
5448
5448
  description: o.description,
5449
5449
  type: o.type,
5450
- args: G0(A),
5450
+ args: z0(A),
5451
5451
  resolve: o.resolve,
5452
5452
  subscribe: o.subscribe,
5453
5453
  deprecationReason: o.deprecationReason,
@@ -5456,7 +5456,7 @@ function nv(i) {
5456
5456
  };
5457
5457
  });
5458
5458
  }
5459
- function G0(i) {
5459
+ function z0(i) {
5460
5460
  return Object.entries(i).map(([u, o]) => ({
5461
5461
  name: cr(u),
5462
5462
  description: o.description,
@@ -5468,13 +5468,13 @@ function G0(i) {
5468
5468
  }));
5469
5469
  }
5470
5470
  function aa(i) {
5471
- return Hm(i) && !Array.isArray(i);
5471
+ return Ym(i) && !Array.isArray(i);
5472
5472
  }
5473
- function rv(i) {
5473
+ function iv(i) {
5474
5474
  return Ff(i, (u) => ({
5475
5475
  description: u.description,
5476
5476
  type: u.type,
5477
- args: z0(u.args),
5477
+ args: q0(u.args),
5478
5478
  resolve: u.resolve,
5479
5479
  subscribe: u.subscribe,
5480
5480
  deprecationReason: u.deprecationReason,
@@ -5482,8 +5482,8 @@ function rv(i) {
5482
5482
  astNode: u.astNode
5483
5483
  }));
5484
5484
  }
5485
- function z0(i) {
5486
- return Om(
5485
+ function q0(i) {
5486
+ return Cm(
5487
5487
  i,
5488
5488
  (u) => u.name,
5489
5489
  (u) => ({
@@ -5496,10 +5496,10 @@ function z0(i) {
5496
5496
  })
5497
5497
  );
5498
5498
  }
5499
- class q0 {
5499
+ class H0 {
5500
5500
  constructor(u) {
5501
5501
  var o;
5502
- this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._fields = nv.bind(void 0, u), this._interfaces = tv.bind(void 0, u), u.resolveType == null || typeof u.resolveType == "function" || He(
5502
+ this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._fields = rv.bind(void 0, u), this._interfaces = nv.bind(void 0, u), u.resolveType == null || typeof u.resolveType == "function" || He(
5503
5503
  !1,
5504
5504
  `${this.name} must provide "resolveType" as a function, but got: ${jn(u.resolveType)}.`
5505
5505
  );
@@ -5518,7 +5518,7 @@ class q0 {
5518
5518
  name: this.name,
5519
5519
  description: this.description,
5520
5520
  interfaces: this.getInterfaces(),
5521
- fields: rv(this.getFields()),
5521
+ fields: iv(this.getFields()),
5522
5522
  resolveType: this.resolveType,
5523
5523
  extensions: this.extensions,
5524
5524
  astNode: this.astNode,
@@ -5532,10 +5532,10 @@ class q0 {
5532
5532
  return this.toString();
5533
5533
  }
5534
5534
  }
5535
- class H0 {
5535
+ class Y0 {
5536
5536
  constructor(u) {
5537
5537
  var o;
5538
- this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._types = Y0.bind(void 0, u), u.resolveType == null || typeof u.resolveType == "function" || He(
5538
+ this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._types = Q0.bind(void 0, u), u.resolveType == null || typeof u.resolveType == "function" || He(
5539
5539
  !1,
5540
5540
  `${this.name} must provide "resolveType" as a function, but got: ${jn(u.resolveType)}.`
5541
5541
  );
@@ -5564,27 +5564,27 @@ class H0 {
5564
5564
  return this.toString();
5565
5565
  }
5566
5566
  }
5567
- function Y0(i) {
5568
- const u = Zm(i.types);
5567
+ function Q0(i) {
5568
+ const u = Km(i.types);
5569
5569
  return Array.isArray(u) || He(
5570
5570
  !1,
5571
5571
  `Must provide Array of types or a function which returns such an array for Union ${i.name}.`
5572
5572
  ), u;
5573
5573
  }
5574
- class Q0 {
5574
+ class J0 {
5575
5575
  /* <T> */
5576
5576
  constructor(u) {
5577
5577
  var o;
5578
- this.name = cr(u.name), this.description = u.description, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._values = typeof u.values == "function" ? u.values : Bm(this.name, u.values), this._valueLookup = null, this._nameLookup = null;
5578
+ this.name = cr(u.name), this.description = u.description, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._values = typeof u.values == "function" ? u.values : $m(this.name, u.values), this._valueLookup = null, this._nameLookup = null;
5579
5579
  }
5580
5580
  get [Symbol.toStringTag]() {
5581
5581
  return "GraphQLEnumType";
5582
5582
  }
5583
5583
  getValues() {
5584
- return typeof this._values == "function" && (this._values = Bm(this.name, this._values())), this._values;
5584
+ return typeof this._values == "function" && (this._values = $m(this.name, this._values())), this._values;
5585
5585
  }
5586
5586
  getValue(u) {
5587
- return this._nameLookup === null && (this._nameLookup = y0(this.getValues(), (o) => o.name)), this._nameLookup[u];
5587
+ return this._nameLookup === null && (this._nameLookup = _0(this.getValues(), (o) => o.name)), this._nameLookup[u];
5588
5588
  }
5589
5589
  serialize(u) {
5590
5590
  this._valueLookup === null && (this._valueLookup = new Map(
@@ -5613,7 +5613,7 @@ class Q0 {
5613
5613
  }
5614
5614
  parseLiteral(u, o) {
5615
5615
  if (u.kind !== Xt.ENUM) {
5616
- const m = Mm(u);
5616
+ const m = Wm(u);
5617
5617
  throw new $n(
5618
5618
  `Enum "${this.name}" cannot represent non-enum value: ${m}.` + Tf(this, m),
5619
5619
  {
@@ -5623,7 +5623,7 @@ class Q0 {
5623
5623
  }
5624
5624
  const h = this.getValue(u.value);
5625
5625
  if (h == null) {
5626
- const m = Mm(u);
5626
+ const m = Wm(u);
5627
5627
  throw new $n(
5628
5628
  `Value "${m}" does not exist in "${this.name}" enum.` + Tf(this, m),
5629
5629
  {
@@ -5634,7 +5634,7 @@ class Q0 {
5634
5634
  return h.value;
5635
5635
  }
5636
5636
  toConfig() {
5637
- const u = Om(
5637
+ const u = Cm(
5638
5638
  this.getValues(),
5639
5639
  (o) => o.name,
5640
5640
  (o) => ({
@@ -5662,10 +5662,10 @@ class Q0 {
5662
5662
  }
5663
5663
  }
5664
5664
  function Tf(i, u) {
5665
- const o = i.getValues().map((m) => m.name), h = w0(u, o);
5666
- return v0("the enum value", h);
5665
+ const o = i.getValues().map((m) => m.name), h = A0(u, o);
5666
+ return y0("the enum value", h);
5667
5667
  }
5668
- function Bm(i, u) {
5668
+ function $m(i, u) {
5669
5669
  return aa(u) || He(
5670
5670
  !1,
5671
5671
  `${i} values must be an object with value names as keys.`
@@ -5673,7 +5673,7 @@ function Bm(i, u) {
5673
5673
  !1,
5674
5674
  `${i}.${o} must refer to an object with a "value" key representing an internal value but got: ${jn(h)}.`
5675
5675
  ), {
5676
- name: L0(o),
5676
+ name: P0(o),
5677
5677
  description: h.description,
5678
5678
  value: h.value !== void 0 ? h.value : o,
5679
5679
  deprecationReason: h.deprecationReason,
@@ -5681,10 +5681,10 @@ function Bm(i, u) {
5681
5681
  astNode: h.astNode
5682
5682
  }));
5683
5683
  }
5684
- class J0 {
5684
+ class X0 {
5685
5685
  constructor(u) {
5686
5686
  var o, h;
5687
- this.name = cr(u.name), this.description = u.description, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this.isOneOf = (h = u.isOneOf) !== null && h !== void 0 ? h : !1, this._fields = X0.bind(void 0, u);
5687
+ this.name = cr(u.name), this.description = u.description, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this.isOneOf = (h = u.isOneOf) !== null && h !== void 0 ? h : !1, this._fields = Z0.bind(void 0, u);
5688
5688
  }
5689
5689
  get [Symbol.toStringTag]() {
5690
5690
  return "GraphQLInputObjectType";
@@ -5718,8 +5718,8 @@ class J0 {
5718
5718
  return this.toString();
5719
5719
  }
5720
5720
  }
5721
- function X0(i) {
5722
- const u = Km(i.fields);
5721
+ function Z0(i) {
5722
+ const u = ev(i.fields);
5723
5723
  return aa(u) || He(
5724
5724
  !1,
5725
5725
  `${i.name} fields must be an object with field names as keys or a function which returns such an object.`
@@ -5737,12 +5737,12 @@ function X0(i) {
5737
5737
  }));
5738
5738
  }
5739
5739
  function Wi(i) {
5740
- const u = Z0(i);
5740
+ const u = K0(i);
5741
5741
  if (u)
5742
5742
  throw u;
5743
5743
  return i;
5744
5744
  }
5745
- function Z0(i) {
5745
+ function K0(i) {
5746
5746
  if (typeof i == "string" || He(!1, "Expected name to be a string."), i.startsWith("__"))
5747
5747
  return new $n(
5748
5748
  `Name "${i}" must not begin with "__", which is reserved by GraphQL introspection.`
@@ -5753,7 +5753,7 @@ function Z0(i) {
5753
5753
  return u;
5754
5754
  }
5755
5755
  }
5756
- const K0 = (i) => i.scalarType({
5756
+ const ey = (i) => i.scalarType({
5757
5757
  name: "ID",
5758
5758
  asNexusMethod: "id",
5759
5759
  description: "id as string or integer",
@@ -5765,77 +5765,77 @@ const K0 = (i) => i.scalarType({
5765
5765
  parseLiteral(u) {
5766
5766
  return u.kind === Xt.INT || u.kind === Xt.STRING ? u.value : null;
5767
5767
  }
5768
- }), ey = (i) => i.inputObjectType({
5768
+ }), ty = (i) => i.inputObjectType({
5769
5769
  name: "IdentifyCommentAuthor",
5770
5770
  definition(u) {
5771
5771
  u.nonNull.id("id");
5772
5772
  }
5773
- }), ty = (i) => i.inputObjectType({
5773
+ }), ny = (i) => i.inputObjectType({
5774
5774
  name: "RemoveComment",
5775
5775
  definition(u) {
5776
5776
  u.id("id"), u.nonNull.string("relation"), u.field("author", { type: "IdentifyCommentAuthor" });
5777
5777
  }
5778
- }), ny = (i) => i.objectType({
5778
+ }), ry = (i) => i.objectType({
5779
5779
  name: "Report",
5780
5780
  definition(u) {
5781
5781
  u.id("id"), u.nonNull.string("content"), u.field("reason", { type: "ReportReason" }), u.field("related", { type: "CommentSingle" }), u.string("createdAt"), u.string("updatedAt");
5782
5782
  }
5783
- }), ry = (i, { reportReasons: u }) => i.enumType({
5783
+ }), iy = (i, { reportReasons: u }) => i.enumType({
5784
5784
  name: "ReportReason",
5785
5785
  description: "Reason of abuse report",
5786
5786
  members: Object.values(u)
5787
- }), iy = (i) => i.objectType({
5787
+ }), oy = (i) => i.objectType({
5788
5788
  name: "ResponseFindAll",
5789
5789
  definition(u) {
5790
5790
  u.nonNull.list.field("data", { type: "CommentSingle" }), u.field("meta", { type: "ResponseMeta" });
5791
5791
  }
5792
- }), oy = (i) => i.objectType({
5792
+ }), uy = (i) => i.objectType({
5793
5793
  name: "ResponseFindAllPerAuthor",
5794
5794
  definition(u) {
5795
5795
  u.nonNull.list.field("data", { type: "CommentSingle" }), u.field("meta", { type: "ResponseMeta" });
5796
5796
  }
5797
- }), uy = (i) => i.objectType({
5797
+ }), ay = (i) => i.objectType({
5798
5798
  name: "ResponseMeta",
5799
5799
  definition(u) {
5800
5800
  u.field("pagination", { type: "ResponsePagination" });
5801
5801
  }
5802
- }), ay = (i) => i.objectType({
5802
+ }), sy = (i) => i.objectType({
5803
5803
  name: "ResponsePagination",
5804
5804
  definition(u) {
5805
5805
  u.int("page"), u.int("pageSize"), u.int("pageCount"), u.int("total"), u.int("start"), u.int("limit");
5806
5806
  }
5807
- }), sy = (i) => i.inputObjectType({
5807
+ }), ly = (i) => i.inputObjectType({
5808
5808
  name: "UpdateComment",
5809
5809
  definition(u) {
5810
5810
  u.id("id"), u.nonNull.string("content"), u.nonNull.string("relation"), u.field("author", { type: "IdentifyCommentAuthor" });
5811
5811
  }
5812
- }), ly = [
5813
- Hv,
5812
+ }), cy = [
5814
5813
  Yv,
5815
5814
  Qv,
5816
5815
  Jv,
5817
5816
  Xv,
5818
5817
  Zv,
5819
5818
  Kv,
5820
- K0,
5819
+ e0,
5821
5820
  ey,
5822
5821
  ty,
5823
- ry,
5822
+ ny,
5824
5823
  iy,
5825
5824
  oy,
5826
5825
  uy,
5827
5826
  ay,
5828
5827
  sy,
5829
- ny
5830
- ], cy = (i, u) => ly.map((o) => o(u, i)), iv = (i) => i.plugin("graphql").service("extension"), fy = (i) => {
5831
- const u = iv(i);
5828
+ ly,
5829
+ ry
5830
+ ], fy = (i, u) => cy.map((o) => o(u, i)), ov = (i) => i.plugin("graphql").service("extension"), hy = (i) => {
5831
+ const u = ov(i);
5832
5832
  u.shadowCRUD(lr(i, "comment")).disable(), u.shadowCRUD(lr(i, "comment")).disableQueries(), u.shadowCRUD(lr(i, "comment")).disableMutations(), u.shadowCRUD(lr(i, "comment-report")).disable(), u.shadowCRUD(lr(i, "comment-report")).disableQueries(), u.shadowCRUD(lr(i, "comment-report")).disableMutations();
5833
- }, hy = async ({ strapi: i }) => {
5834
- i.plugin("graphql") && (fy(i), (await ft(i, "common").getConfig(oa.ENABLED_COLLECTIONS, [])).length && await py(i));
5835
- }, py = async (i) => {
5836
- const u = iv(i), o = await ft(i, "common").getConfig();
5833
+ }, py = async ({ strapi: i }) => {
5834
+ i.plugin("graphql") && (hy(i), (await ft(i, "common").getConfig(oa.ENABLED_COLLECTIONS, [])).length && await dy(i));
5835
+ }, dy = async (i) => {
5836
+ const u = ov(i), o = await ft(i, "common").getConfig();
5837
5837
  u.use(({ strapi: h, nexus: m }) => {
5838
- const A = cy(o, m), E = qv(h, m), C = jv(h, m), x = Uv(o);
5838
+ const A = fy(o, m), E = Hv(h, m), C = kv(h, m), x = Mv(o);
5839
5839
  return {
5840
5840
  types: [A, E, C],
5841
5841
  resolversConfig: x
@@ -5854,8 +5854,8 @@ const K0 = (i) => i.scalarType({
5854
5854
  read: "settings-read",
5855
5855
  change: "settings-change"
5856
5856
  }
5857
- }, dy = async ({ strapi: i }) => {
5858
- if (i.plugin("graphql") && await hy({ strapi: i }), Object.keys(i.plugins).indexOf("users-permissions") === -1)
5857
+ }, gy = async ({ strapi: i }) => {
5858
+ if (i.plugin("graphql") && await py({ strapi: i }), Object.keys(i.plugins).indexOf("users-permissions") === -1)
5859
5859
  throw new Error(
5860
5860
  "In order to make the comments plugin work the users-permissions plugin is required"
5861
5861
  );
@@ -5898,7 +5898,7 @@ const K0 = (i) => i.scalarType({
5898
5898
  }
5899
5899
  ];
5900
5900
  await i.admin.services.permission.actionProvider.registerMany(u);
5901
- }, gy = {
5901
+ }, my = {
5902
5902
  isValidationEnabled: !0,
5903
5903
  enabledCollections: [],
5904
5904
  moderatorRoles: [],
@@ -5912,13 +5912,13 @@ const K0 = (i) => i.scalarType({
5912
5912
  OTHER: Zt.OTHER
5913
5913
  },
5914
5914
  blockedAuthorProps: []
5915
- }, my = v.object({
5915
+ }, vy = v.object({
5916
5916
  [Zt.BAD_LANGUAGE]: v.literal(Zt.BAD_LANGUAGE),
5917
5917
  [Zt.OTHER]: v.literal(Zt.OTHER),
5918
5918
  [Zt.DISCRIMINATION]: v.literal(Zt.DISCRIMINATION)
5919
5919
  }), wm = v.object({
5920
5920
  isValidationEnabled: v.boolean().optional(),
5921
- reportReasons: my.optional(),
5921
+ reportReasons: vy.optional(),
5922
5922
  isGQLPluginEnabled: v.boolean().optional(),
5923
5923
  [Cr.ENABLED_COLLECTIONS]: v.array(v.string()),
5924
5924
  [Cr.MODERATOR_ROLES]: v.array(v.string()),
@@ -5933,8 +5933,8 @@ const K0 = (i) => i.scalarType({
5933
5933
  url: v.string().nullable(),
5934
5934
  contactEmail: v.string().nullable()
5935
5935
  }).default({ url: null, contactEmail: null })
5936
- }), vy = {
5937
- default: wm.parse(gy),
5936
+ }), yy = {
5937
+ default: wm.parse(my),
5938
5938
  validate: (i) => wm.safeParse(i)
5939
5939
  }, Y = ({
5940
5940
  left: i,
@@ -5953,10 +5953,10 @@ const K0 = (i) => i.scalarType({
5953
5953
  throw new Error(
5954
5954
  "Received no left or right values at runtime when opening Either"
5955
5955
  );
5956
- }, yy = (i) => i.left !== void 0, pe = (i) => i.right !== void 0, ov = (i) => ({ left: i }), ol = (i) => ({ right: i });
5957
- let An = class uv extends Error {
5956
+ }, _y = (i) => i.left !== void 0, pe = (i) => i.right !== void 0, uv = (i) => ({ left: i }), ol = (i) => ({ right: i });
5957
+ let An = class av extends Error {
5958
5958
  constructor(u, o, h = void 0) {
5959
- super(), this.name = "Strapi:Plugin:Comments", this.status = u || 500, this.message = o || "Internal error", this.payload = h, Object.setPrototypeOf(this, uv.prototype);
5959
+ super(), this.name = "Strapi:Plugin:Comments", this.status = u || 500, this.message = o || "Internal error", this.payload = h, Object.setPrototypeOf(this, av.prototype);
5960
5960
  }
5961
5961
  toString(u = this) {
5962
5962
  return `${u.name} - ${u.message}`;
@@ -5969,40 +5969,39 @@ let An = class uv extends Error {
5969
5969
  } : this;
5970
5970
  }
5971
5971
  };
5972
- const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u, _y = v.union([
5972
+ const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u, by = v.union([
5973
5973
  v.object({ $eq: v.string().min(1) }),
5974
5974
  v.object({ $eqi: v.string().min(1) })
5975
- ]), by = v.union([
5975
+ ]), wy = v.union([
5976
5976
  v.object({ $ne: v.string().min(1) }),
5977
5977
  v.object({ $nei: v.string().min(1) })
5978
- ]), wy = v.union([
5978
+ ]), Ay = v.union([
5979
5979
  v.object({ $gt: v.string().min(1) }),
5980
5980
  v.object({ $gte: v.string().min(1) })
5981
- ]), Ay = v.union([
5981
+ ]), Sy = v.union([
5982
5982
  v.object({ $lt: v.string().min(1) }),
5983
5983
  v.object({ $lte: v.string().min(1) })
5984
- ]), Sy = v.union([
5984
+ ]), Ey = v.union([
5985
5985
  v.object({ $startsWith: v.string().min(1) }),
5986
5986
  v.object({ $startsWithi: v.string().min(1) })
5987
- ]), Ey = v.union([
5987
+ ]), Ty = v.union([
5988
5988
  v.object({ $endsWith: v.string().min(1) }),
5989
5989
  v.object({ $endsWithi: v.string().min(1) })
5990
- ]), Ty = v.union([
5990
+ ]), Oy = v.union([
5991
5991
  v.object({ $contains: v.string().min(1) }),
5992
5992
  v.object({ $containsi: v.string().min(1) })
5993
- ]), Oy = v.union([
5993
+ ]), Cy = v.union([
5994
5994
  v.object({ $notContains: v.string().min(1) }),
5995
5995
  v.object({ $notContainsi: v.string().min(1) })
5996
- ]), Xr = v.union([v.string(), v.number()]).transform((i) => Number(i)).pipe(v.number()), Cy = v.union([v.string(), v.boolean()]).transform((i) => typeof i == "string" ? ["t", "true"].includes(i) : i).pipe(v.boolean()), Iy = v.object({
5996
+ ]), Xr = v.union([v.string(), v.number()]).transform((i) => Number(i)).pipe(v.number()), Am = v.union([v.string(), v.boolean()]).transform((i) => typeof i == "string" ? ["t", "true"].includes(i) : i).pipe(v.boolean()), Iy = v.object({
5997
5997
  _q: v.string().optional()
5998
- }), av = v.string().regex(
5998
+ }), sv = v.string().regex(
5999
5999
  // TODO: check sort options
6000
6000
  /^(content|createdAt|updatedAt|id):(desc|asc|ASC|DESC)$/,
6001
6001
  "Invalid orderBy options"
6002
6002
  ), xy = v.union([
6003
6003
  v.string(),
6004
6004
  v.number(),
6005
- _y,
6006
6005
  by,
6007
6006
  wy,
6008
6007
  Ay,
@@ -6010,41 +6009,57 @@ const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u,
6010
6009
  Ey,
6011
6010
  Ty,
6012
6011
  Oy,
6013
- v.object({ $null: v.boolean() }),
6014
- v.object({ $notNull: v.boolean() })
6015
- ]), Am = (i) => v.object(Object.keys(i).reduce((u, o) => ({
6016
- ...u,
6017
- [o]: xy.optional()
6018
- }), {})), Zr = {
6012
+ Cy,
6013
+ v.object({ $null: Am }),
6014
+ v.object({ $notNull: Am })
6015
+ ]), Sm = (i) => v.object(
6016
+ Object.keys(i).reduce(
6017
+ (u, o) => ({
6018
+ ...u,
6019
+ [o]: xy.optional()
6020
+ }),
6021
+ {}
6022
+ )
6023
+ ), Zr = {
6019
6024
  single: "single",
6020
6025
  array: "array"
6021
6026
  }, sa = (i) => {
6022
- const u = Object.entries(i).reduce((o, [h, m]) => ({
6023
- ...o,
6024
- [h]: m === Zr.single ? Xr : v.array(Xr)
6025
- }), {});
6027
+ const u = Object.entries(i).reduce(
6028
+ (o, [h, m]) => ({
6029
+ ...o,
6030
+ [h]: m === Zr.single ? Xr : v.array(Xr)
6031
+ }),
6032
+ {}
6033
+ );
6026
6034
  return v.object(u);
6027
- }, Ry = v.object({ pageSize: Xr.default(10), page: Xr.default(1) }).merge(Iy).merge(v.object({
6028
- orderBy: av.optional().nullable()
6029
- })).merge(v.object({
6030
- filters: Am({
6031
- removed: !0,
6032
- approvalStatus: !0
6033
- }).merge(
6034
- v.object({
6035
- $or: v.array(
6036
- Am({
6037
- blocked: !0,
6038
- blockedThread: !0
6039
- })
6040
- ).optional()
6041
- })
6042
- ).optional()
6043
- })), Nt = (i) => {
6035
+ }, Ry = v.object({
6036
+ pageSize: Xr.default(10),
6037
+ page: Xr.default(1)
6038
+ }).merge(Iy).merge(
6039
+ v.object({
6040
+ orderBy: sv.optional().nullable()
6041
+ })
6042
+ ).merge(
6043
+ v.object({
6044
+ filters: Sm({
6045
+ removed: !0,
6046
+ approvalStatus: !0
6047
+ }).merge(
6048
+ v.object({
6049
+ $or: v.array(
6050
+ Sm({
6051
+ blocked: !0,
6052
+ blockedThread: !0
6053
+ })
6054
+ ).optional()
6055
+ })
6056
+ ).optional()
6057
+ })
6058
+ ), Nt = (i) => {
6044
6059
  if (!i.success) {
6045
6060
  const u = i.error.issues.map((o) => `Path: ${o.path.join(".")} Code: ${o.code} Message: ${o.message}`).join(`
6046
6061
  `);
6047
- return ov(new An(400, u));
6062
+ return uv(new An(400, u));
6048
6063
  }
6049
6064
  return ol(i.data);
6050
6065
  }, Uf = (i) => v.string().regex(mm.relatedUid, {
@@ -6059,7 +6074,7 @@ const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u,
6059
6074
  avatar: v.string().url().optional()
6060
6075
  });
6061
6076
  v.union([v.string(), v.number(), v.boolean()]);
6062
- const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa({ id: Zr.single }).safeParse(i)), Ly = (i) => Nt(sv.safeParse(i)), Py = (i) => Nt(sv.safeParse(i)), Dy = (i, u) => {
6077
+ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa({ id: Zr.single }).safeParse(i)), Ly = (i) => Nt(lv.safeParse(i)), Py = (i) => Nt(lv.safeParse(i)), Dy = (i, u) => {
6063
6078
  const o = sa({ id: Zr.single }).merge(v.object({ removed: v.string().optional().transform((h) => h === "true") })).safeParse({ ...u, id: i });
6064
6079
  return Nt(o);
6065
6080
  }, Fy = (i) => Nt(sa({ id: Zr.single, reportId: Zr.single }).safeParse(i)), Uy = (i) => {
@@ -6074,29 +6089,29 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6074
6089
  lastname: v.string().nullable().optional(),
6075
6090
  username: v.string().nullable().optional(),
6076
6091
  firstname: v.string().nullable().optional()
6077
- }), lv = v.object({
6092
+ }), cv = v.object({
6078
6093
  id: v.union([v.string(), v.number()]),
6079
6094
  content: v.string(),
6080
6095
  author: Wy
6081
- }), By = (i) => Nt(lv.safeParse(i)), $y = (i) => Nt(lv.pick({ content: !0, id: !0 }).safeParse(i)), jy = (i) => Nt(wm.safeParse(i)), cv = (i) => v.object({
6096
+ }), By = (i) => Nt(cv.safeParse(i)), $y = (i) => Nt(cv.pick({ content: !0, id: !0 }).safeParse(i)), jy = (i) => Nt(wm.safeParse(i)), fv = (i) => v.object({
6082
6097
  relation: Uf(i),
6083
6098
  content: v.string().min(1),
6084
6099
  author: Ny.optional(),
6085
6100
  threadOf: v.union([v.string(), v.number()]).optional(),
6086
6101
  approvalStatus: v.nativeEnum(Ui).optional(),
6087
6102
  locale: v.string().optional()
6088
- }), ky = (i, u, o) => Nt(cv(i).safeParse({
6103
+ }), ky = (i, u, o) => Nt(fv(i).safeParse({
6089
6104
  ...o,
6090
6105
  relation: u
6091
6106
  })), Vy = (i, u) => Nt(
6092
- cv(i).pick({ content: !0, relation: !0, author: !0 }).merge(sa({ commentId: Zr.single })).safeParse(u)
6107
+ fv(i).pick({ content: !0, relation: !0, author: !0 }).merge(sa({ commentId: Zr.single })).safeParse(u)
6093
6108
  ), Gy = (i) => v.object({
6094
6109
  relation: Uf(i)
6095
6110
  }), zy = v.object({
6096
6111
  pagination: v.object({
6097
6112
  pageSize: Xr.default(10),
6098
6113
  page: Xr.default(1),
6099
- withCount: Cy.optional().default(!1)
6114
+ withCount: Am.optional().default(!1)
6100
6115
  }).optional()
6101
6116
  }), qy = v.record(v.union([
6102
6117
  v.union([
@@ -6106,8 +6121,8 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6106
6121
  v.literal("*")
6107
6122
  ]),
6108
6123
  v.record(v.any())
6109
- ])).optional(), Im = (i) => {
6110
- const u = Am({
6124
+ ])).optional(), xm = (i) => {
6125
+ const u = Sm({
6111
6126
  id: !0,
6112
6127
  content: !0,
6113
6128
  authorId: !0,
@@ -6123,7 +6138,7 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6123
6138
  threadOf: !0
6124
6139
  });
6125
6140
  return v.object({
6126
- sort: av.optional().nullable().default("createdAt:desc"),
6141
+ sort: sv.optional().nullable().default("createdAt:desc"),
6127
6142
  fields: v.string().array().optional(),
6128
6143
  omit: v.string().array().optional(),
6129
6144
  filters: u.merge(
@@ -6138,11 +6153,11 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6138
6153
  skip: Xr.optional(),
6139
6154
  locale: v.string().optional()
6140
6155
  }).merge(Gy(i)).merge(zy);
6141
- }, Hy = (i, u, o) => Nt(Im(i).safeParse({
6156
+ }, Hy = (i, u, o) => Nt(xm(i).safeParse({
6142
6157
  ...o,
6143
6158
  relation: u
6144
6159
  })), Yy = (i, u, o) => {
6145
- const h = Im(i).pick({
6160
+ const h = xm(i).pick({
6146
6161
  sort: !0,
6147
6162
  fields: !0,
6148
6163
  omit: !0,
@@ -6163,7 +6178,7 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6163
6178
  relation: u
6164
6179
  }));
6165
6180
  }, Qy = (i, u) => {
6166
- const o = Im([]).pick({
6181
+ const o = xm([]).pick({
6167
6182
  sort: !0,
6168
6183
  fields: !0,
6169
6184
  omit: !0,
@@ -6320,7 +6335,7 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6320
6335
  medium: nl.optional(),
6321
6336
  large: nl.optional()
6322
6337
  }).optional()
6323
- }).nullable().optional(), fv = v.object({
6338
+ }).nullable().optional(), hv = v.object({
6324
6339
  id: v.number(),
6325
6340
  documentId: v.string().nullable(),
6326
6341
  content: v.string(),
@@ -6348,12 +6363,12 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6348
6363
  })
6349
6364
  ]).optional().nullable(),
6350
6365
  locale: v.string().nullable()
6351
- }), hv = v.object({
6366
+ }), pv = v.object({
6352
6367
  page: v.number(),
6353
6368
  pageSize: v.number(),
6354
6369
  pageCount: v.number(),
6355
6370
  total: v.number()
6356
- }), Fi = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), pv = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), n_ = v.object({
6371
+ }), Fi = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), dv = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), n_ = v.object({
6357
6372
  id: v.number(),
6358
6373
  documentId: v.string().nullable(),
6359
6374
  content: v.string(),
@@ -6363,7 +6378,7 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6363
6378
  updatedAt: v.string(),
6364
6379
  publishedAt: v.string().nullable(),
6365
6380
  locale: v.string().nullable()
6366
- }), $m = fv.merge(
6381
+ }), jm = hv.merge(
6367
6382
  v.object(
6368
6383
  {
6369
6384
  gotThread: v.boolean().nullable().optional(),
@@ -6372,8 +6387,8 @@ const sv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6372
6387
  author: v.any()
6373
6388
  }
6374
6389
  )
6375
- ), al = $m.extend({
6376
- threadOf: v.lazy(() => v.union([v.number(), $m])).nullable().optional()
6390
+ ), al = jm.extend({
6391
+ threadOf: v.lazy(() => v.union([v.number(), jm])).nullable().optional()
6377
6392
  }), r_ = v.object({
6378
6393
  id: v.number(),
6379
6394
  uid: v.string(),
@@ -6385,7 +6400,7 @@ al.omit({ related: !0 }).extend({
6385
6400
  related: r_.nullable().optional()
6386
6401
  });
6387
6402
  const i_ = v.array(al), o_ = v.object({
6388
- pagination: hv,
6403
+ pagination: pv,
6389
6404
  results: v.array(al)
6390
6405
  }), ia = {
6391
6406
  findMany: i_,
@@ -6411,7 +6426,7 @@ const i_ = v.array(al), o_ = v.object({
6411
6426
  updatedAt: v.string(),
6412
6427
  publishedAt: v.string(),
6413
6428
  locale: v.string().nullable()
6414
- }), dv = v.object({
6429
+ }), gv = v.object({
6415
6430
  id: v.number(),
6416
6431
  documentId: v.string().nullable(),
6417
6432
  content: v.string(),
@@ -6423,8 +6438,8 @@ const i_ = v.array(al), o_ = v.object({
6423
6438
  locale: v.string().nullable(),
6424
6439
  related: u_.nullable().optional()
6425
6440
  }), a_ = v.object({
6426
- results: v.array(dv),
6427
- pagination: hv
6441
+ results: v.array(gv),
6442
+ pagination: pv
6428
6443
  }), s_ = v.object({
6429
6444
  id: v.number(),
6430
6445
  documentId: v.string().nullable(),
@@ -6445,12 +6460,12 @@ const i_ = v.array(al), o_ = v.object({
6445
6460
  updatedAt: v.string(),
6446
6461
  publishedAt: v.string().nullable(),
6447
6462
  locale: v.string().nullable(),
6448
- related: fv.nullable()
6463
+ related: hv.nullable()
6449
6464
  })), Of = {
6450
6465
  findMany: l_,
6451
6466
  findPage: a_,
6452
6467
  update: s_,
6453
- create: dv
6468
+ create: gv
6454
6469
  }, c_ = (i) => {
6455
6470
  const u = lr(i, "comment-report"), o = i.query(u);
6456
6471
  return {
@@ -6460,7 +6475,7 @@ const i_ = v.array(al), o_ = v.object({
6460
6475
  },
6461
6476
  async findMany(h) {
6462
6477
  const m = await Ir(i, "isValidationEnabled", !1);
6463
- return o.findMany(h).then(pv(m, Of.findMany));
6478
+ return o.findMany(h).then(dv(m, Of.findMany));
6464
6479
  },
6465
6480
  async update(h) {
6466
6481
  const m = await Ir(i, "isValidationEnabled", !1);
@@ -6479,7 +6494,7 @@ const i_ = v.array(al), o_ = v.object({
6479
6494
  return {
6480
6495
  async findMany(o) {
6481
6496
  const h = await Ir(i, "isValidationEnabled", !1);
6482
- return i.query(u).findMany(o).then(pv(h, ia.findMany));
6497
+ return i.query(u).findMany(o).then(dv(h, ia.findMany));
6483
6498
  },
6484
6499
  async findWithCount(o) {
6485
6500
  const h = await Ir(i, "isValidationEnabled", !1);
@@ -6510,7 +6525,7 @@ const i_ = v.array(al), o_ = v.object({
6510
6525
  };
6511
6526
  }, it = Le.once(f_), h_ = (i) => ({
6512
6527
  getLocalConfig(u, o) {
6513
- return i.config.get([Ov, u].filter(Boolean).join("."), o);
6528
+ return i.config.get([Cv, u].filter(Boolean).join("."), o);
6514
6529
  },
6515
6530
  async getStore() {
6516
6531
  return await i.store({ type: "plugin", name: "comments" });
@@ -7029,10 +7044,10 @@ class fn extends Error {
7029
7044
  } : this;
7030
7045
  }
7031
7046
  }
7032
- const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv = (i) => i && {
7047
+ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv = (i) => i && {
7033
7048
  ...i,
7034
7049
  reports: (i.reports || []).filter((u) => !u.resolved)
7035
- }, km = (i, u, o = []) => {
7050
+ }, Vm = (i, u, o = []) => {
7036
7051
  const {
7037
7052
  authorUser: h,
7038
7053
  authorId: m,
@@ -7207,7 +7222,7 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7207
7222
  []
7208
7223
  )
7209
7224
  }, me = typeof O != "boolean" ? O?.populate : {};
7210
- return gv(
7225
+ return mv(
7211
7226
  te.sanitizeCommentEntity(
7212
7227
  X,
7213
7228
  [],
@@ -7421,7 +7436,7 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7421
7436
  try {
7422
7437
  return ol(await i());
7423
7438
  } catch {
7424
- return ov(u);
7439
+ return uv(u);
7425
7440
  }
7426
7441
  }, T_ = ({ strapi: i }) => {
7427
7442
  const u = async (o, h) => {
@@ -7456,7 +7471,7 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7456
7471
  async () => m ? await this.getCommonService().findOne({ id: m, related: o, locale: C || null }) : null,
7457
7472
  new fn(400, "Thread does not exist")
7458
7473
  );
7459
- if (yy(J))
7474
+ if (_y(J))
7460
7475
  throw Y(J);
7461
7476
  const te = Y(J);
7462
7477
  if (!A && !this.getCommonService().isValidUserContext(x))
@@ -7663,7 +7678,7 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7663
7678
  return u && !h ? Le.get(A, u, o) : h ? m.getLocalConfig(u, o) : A;
7664
7679
  },
7665
7680
  parseRelationString(u) {
7666
- const [o, h] = jm(u);
7681
+ const [o, h] = km(u);
7667
7682
  return { uid: o, relatedId: h };
7668
7683
  },
7669
7684
  isValidUserContext(u) {
@@ -7672,10 +7687,10 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7672
7687
  sanitizeCommentEntity(u, o, h = [], m = {}) {
7673
7688
  const A = Array.isArray(m) ? m : Object.keys(m || {});
7674
7689
  return Le.omit({
7675
- ...km(
7690
+ ...Vm(
7676
7691
  {
7677
7692
  ...u,
7678
- threadOf: Le.isObject(u.threadOf) ? km(u.threadOf, o, A) : u.threadOf
7693
+ threadOf: Le.isObject(u.threadOf) ? Vm(u.threadOf, o, A) : u.threadOf
7679
7694
  },
7680
7695
  o,
7681
7696
  A
@@ -7871,7 +7886,7 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7871
7886
  if (!o)
7872
7887
  throw new An(400, "Comment does not exist. Check your payload please.");
7873
7888
  const h = await this.getConfig(Cr.AUTHOR_BLOCKED_PROPS, []), m = this.sanitizeCommentEntity(o, h);
7874
- return gv(m);
7889
+ return mv(m);
7875
7890
  },
7876
7891
  async findMany(u) {
7877
7892
  return it(i).findMany(u);
@@ -7921,7 +7936,7 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7921
7936
  async findRelatedEntitiesFor(u) {
7922
7937
  const o = u.reduce(
7923
7938
  (h, m) => {
7924
- const [A, E] = jm(m.related);
7939
+ const [A, E] = km(m.related);
7925
7940
  return {
7926
7941
  ...h,
7927
7942
  [A]: {
@@ -7978,14 +7993,14 @@ const jm = (i) => i.split(Gv.relatedUid).filter((u) => u && u.length > 0), gv =
7978
7993
  }
7979
7994
  },
7980
7995
  async checkBadWords(u) {
7981
- if (await this.getConfig(Cr.BAD_WORDS, !0) && u && Ev({ testString: u }))
7996
+ if (await this.getConfig(Cr.BAD_WORDS, !0) && u && Tv({ testString: u }))
7982
7997
  throw new An(
7983
7998
  400,
7984
7999
  "Bad language used! Please polite your comment...",
7985
8000
  {
7986
8001
  content: {
7987
8002
  original: u,
7988
- filtered: u && Tv({ testString: u })
8003
+ filtered: u && Ov({ testString: u })
7989
8004
  }
7990
8005
  }
7991
8006
  );
@@ -11133,7 +11148,7 @@ function print() { __p += __j.call(arguments, '') }
11133
11148
  Hn ? ((Hn.exports = mn)._ = mn, Da._ = mn) : at._ = mn;
11134
11149
  }).call(xr);
11135
11150
  })(Rf, Rf.exports);
11136
- var x_ = Rf.exports, mv = {};
11151
+ var x_ = Rf.exports, vv = {};
11137
11152
  (function(i) {
11138
11153
  i.aliasToReal = {
11139
11154
  // Lodash aliases.
@@ -11636,8 +11651,8 @@ var x_ = Rf.exports, mv = {};
11636
11651
  zipObject: !0,
11637
11652
  zipObjectDeep: !0
11638
11653
  };
11639
- })(mv);
11640
- var R_ = {}, ct = mv, N_ = R_, Vm = Array.prototype.push;
11654
+ })(vv);
11655
+ var R_ = {}, ct = vv, N_ = R_, Gm = Array.prototype.push;
11641
11656
  function L_(i, u) {
11642
11657
  return u == 2 ? function(o, h) {
11643
11658
  return i.apply(void 0, arguments);
@@ -11652,7 +11667,7 @@ function dm(i, u) {
11652
11667
  return i(o);
11653
11668
  };
11654
11669
  }
11655
- function Gm(i) {
11670
+ function zm(i) {
11656
11671
  for (var u = i ? i.length : 0, o = Array(u); u--; )
11657
11672
  o[u] = i[u];
11658
11673
  return o;
@@ -11667,7 +11682,7 @@ function D_(i, u) {
11667
11682
  for (var o = arguments.length, h = o - 1, m = Array(o); o--; )
11668
11683
  m[o] = arguments[o];
11669
11684
  var A = m[u], E = m.slice(0, u);
11670
- return A && Vm.apply(E, A), u != h && Vm.apply(E, m.slice(u + 1)), i.apply(this, E);
11685
+ return A && Gm.apply(E, A), u != h && Gm.apply(E, m.slice(u + 1)), i.apply(this, E);
11671
11686
  };
11672
11687
  }
11673
11688
  function gm(i, u) {
@@ -11681,7 +11696,7 @@ function gm(i, u) {
11681
11696
  }
11682
11697
  };
11683
11698
  }
11684
- function Sm(i, u, o, h) {
11699
+ function Em(i, u, o, h) {
11685
11700
  var m = typeof u == "function", A = u === Object(u);
11686
11701
  if (A && (h = o, o = u, u = void 0), o == null)
11687
11702
  throw new TypeError();
@@ -11711,7 +11726,7 @@ function Sm(i, u, o, h) {
11711
11726
  castArray: function(z) {
11712
11727
  return function() {
11713
11728
  var B = arguments[0];
11714
- return me(B) ? z(Gm(B)) : z.apply(void 0, arguments);
11729
+ return me(B) ? z(zm(B)) : z.apply(void 0, arguments);
11715
11730
  };
11716
11731
  },
11717
11732
  iteratee: function(z) {
@@ -11748,7 +11763,7 @@ function Sm(i, u, o, h) {
11748
11763
  },
11749
11764
  runInContext: function(z) {
11750
11765
  return function(B) {
11751
- return Sm(i, z(B), h);
11766
+ return Em(i, z(B), h);
11752
11767
  };
11753
11768
  }
11754
11769
  };
@@ -11791,7 +11806,7 @@ function Sm(i, u, o, h) {
11791
11806
  var V = ct.aliasToReal[z] || z, q = ct.remap[V] || V, re = h;
11792
11807
  return function(ot) {
11793
11808
  var wt = m ? U : M, ut = m ? U[q] : B, Ke = j(j({}, re), ot);
11794
- return Sm(wt, V, ut, Ke);
11809
+ return Em(wt, V, ut, Ke);
11795
11810
  };
11796
11811
  }
11797
11812
  function xo(z, B) {
@@ -11818,7 +11833,7 @@ function Sm(i, u, o, h) {
11818
11833
  }
11819
11834
  function Ro(z, B, V) {
11820
11835
  var q, re = ct.aliasToReal[z] || z, ot = B, wt = Sn[re];
11821
- return wt ? ot = wt(B) : E.immutable && (ct.mutate.array[re] ? ot = gm(B, Gm) : ct.mutate.object[re] ? ot = gm(B, P_(B)) : ct.mutate.set[re] && (ot = gm(B, Bi))), X(Qe, function(ut) {
11836
+ return wt ? ot = wt(B) : E.immutable && (ct.mutate.array[re] ? ot = gm(B, zm) : ct.mutate.object[re] ? ot = gm(B, P_(B)) : ct.mutate.set[re] && (ot = gm(B, Bi))), X(Qe, function(ut) {
11822
11837
  return X(ct.aryMethod[ut], function(Ke) {
11823
11838
  if (re == Ke) {
11824
11839
  var De = ct.methodSpread[re], hr = De && De.afterRearg;
@@ -11853,7 +11868,7 @@ function Sm(i, u, o, h) {
11853
11868
  });
11854
11869
  }), ze;
11855
11870
  }
11856
- var F_ = Sm, zm = x_.runInContext(), rl = F_(zm, zm), Ie;
11871
+ var F_ = Em, qm = x_.runInContext(), rl = F_(qm, qm), Ie;
11857
11872
  (function(i) {
11858
11873
  i.Arg = "Arg", i.DynamicInput = "DynamicInput", i.DynamicOutputMethod = "DynamicOutputMethod", i.DynamicOutputProperty = "DynamicOutputProperty", i.Enum = "Enum", i.ExtendInputObject = "ExtendInputObject", i.ExtendObject = "ExtendObject", i.InputField = "InputField", i.InputObject = "InputObject", i.Interface = "Interface", i.List = "List", i.NonNull = "NonNull", i.Null = "Null", i.Object = "Object", i.OutputField = "OutputField", i.Plugin = "Plugin", i.PrintedGenTyping = "PrintedGenTyping", i.PrintedGenTypingImport = "PrintedGenTypingImport", i.Scalar = "Scalar", i.Union = "Union";
11859
11874
  })(Ie || (Ie = {}));
@@ -11897,16 +11912,16 @@ function j_(i) {
11897
11912
  return !!(i && typeof sl.get(i, $_) == "function");
11898
11913
  }
11899
11914
  function k_(i) {
11900
- return V_(i) || vv(i);
11915
+ return V_(i) || yv(i);
11901
11916
  }
11902
11917
  function V_(i) {
11903
11918
  return !!(i && sl.has(i, Nf) && la(sl.get(i, Nf)));
11904
11919
  }
11905
- function vv(i) {
11920
+ function yv(i) {
11906
11921
  return !!(i && sl.has(i, Nf) && typeof sl.get(i, Nf) == "function");
11907
11922
  }
11908
- function xm(i) {
11909
- return j_(i) || k_(i) || vv(i);
11923
+ function Rm(i) {
11924
+ return j_(i) || k_(i) || yv(i);
11910
11925
  }
11911
11926
  class G_ {
11912
11927
  constructor(u) {
@@ -11934,7 +11949,7 @@ ${this.config.description.split(`
11934
11949
  }
11935
11950
  }
11936
11951
  bt(z_, Ie.PrintedGenTyping);
11937
- B_(new ev({
11952
+ B_(new tv({
11938
11953
  name: "NEXUS__UNKNOWN__TYPE",
11939
11954
  description: `
11940
11955
  This scalar should never make it into production. It is used as a placeholder for situations
@@ -11965,7 +11980,7 @@ const sl = {
11965
11980
  return (o = Object.getOwnPropertyDescriptor(i, u)) === null || o === void 0 ? void 0 : o.value;
11966
11981
  }
11967
11982
  };
11968
- class yv {
11983
+ class _v {
11969
11984
  constructor(u, o) {
11970
11985
  this.name = u, this.config = o;
11971
11986
  }
@@ -11973,13 +11988,13 @@ class yv {
11973
11988
  return this.config;
11974
11989
  }
11975
11990
  }
11976
- bt(yv, Ie.Arg);
11991
+ bt(_v, Ie.Arg);
11977
11992
  function Bf(i) {
11978
11993
  if (!i.type)
11979
11994
  throw new Error('You must provide a "type" for the arg()');
11980
- return new yv(typeof i.type == "string" ? i.type : i.type.name, i);
11995
+ return new _v(typeof i.type == "string" ? i.type : i.type.name, i);
11981
11996
  }
11982
- function _v(i) {
11997
+ function bv(i) {
11983
11998
  return Bf(Object.assign({ type: "String" }, i));
11984
11999
  }
11985
12000
  function $f(i) {
@@ -11987,39 +12002,39 @@ function $f(i) {
11987
12002
  }
11988
12003
  class q_ {
11989
12004
  constructor(u) {
11990
- if (this.ofNexusType = u, this._isNexusListDef = !0, typeof u != "string" && !la(u) && !xm(u) && !ll(u))
12005
+ if (this.ofNexusType = u, this._isNexusListDef = !0, typeof u != "string" && !la(u) && !Rm(u) && !ll(u))
11991
12006
  throw new Error("Cannot wrap unknown types in list(). Saw " + u);
11992
12007
  }
11993
12008
  }
11994
12009
  bt(q_, Ie.List);
11995
- class Em {
12010
+ class Tm {
11996
12011
  constructor(u) {
11997
- if (this.ofNexusType = u, this._isNexusNonNullDef = !0, typeof u != "string" && !la(u) && !xm(u) && !ll(u))
12012
+ if (this.ofNexusType = u, this._isNexusNonNullDef = !0, typeof u != "string" && !la(u) && !Rm(u) && !ll(u))
11998
12013
  throw new Error("Cannot wrap unknown types in a nonNull(). Saw " + u);
11999
12014
  }
12000
12015
  }
12001
- bt(Em, Ie.NonNull);
12002
- function bv(i) {
12003
- return wv(i) || Cm(i) ? i : Av(i) ? new Em(i.ofNexusType) : new Em(i);
12016
+ bt(Tm, Ie.NonNull);
12017
+ function wv(i) {
12018
+ return Av(i) || Im(i) ? i : Sv(i) ? new Tm(i.ofNexusType) : new Tm(i);
12004
12019
  }
12005
- class Tm {
12020
+ class Om {
12006
12021
  constructor(u) {
12007
- if (this.ofNexusType = u, this._isNexusNullDef = !0, typeof u != "string" && !la(u) && !xm(u) && !ll(u))
12022
+ if (this.ofNexusType = u, this._isNexusNullDef = !0, typeof u != "string" && !la(u) && !Rm(u) && !ll(u))
12008
12023
  throw new Error("Cannot wrap unknown types in nullable(). Saw " + u);
12009
12024
  }
12010
12025
  }
12011
- bt(Tm, Ie.Null);
12026
+ bt(Om, Ie.Null);
12012
12027
  function Lf(i) {
12013
- return wv(i) ? new Tm(i.ofNexusType) : Av(i) ? i : new Tm(i);
12028
+ return Av(i) ? new Om(i.ofNexusType) : Sv(i) ? i : new Om(i);
12014
12029
  }
12015
12030
  Ie.Enum, Ie.Object, Ie.Scalar, Ie.Union, Ie.Interface, Ie.InputObject;
12016
12031
  function la(i) {
12017
12032
  return i && !!i[Wf];
12018
12033
  }
12019
- function wv(i) {
12034
+ function Av(i) {
12020
12035
  return la(i) && i[Wf] === Ie.NonNull;
12021
12036
  }
12022
- function Av(i) {
12037
+ function Sv(i) {
12023
12038
  return la(i) && i[Wf] === Ie.Null;
12024
12039
  }
12025
12040
  class H_ {
@@ -12048,14 +12063,14 @@ class Q_ {
12048
12063
  bt(Q_, Ie.DynamicOutputMethod);
12049
12064
  const J_ = {
12050
12065
  first: Lf($f({ description: "Returns the first n elements from the list." })),
12051
- after: Lf(_v({ description: "Returns the elements in the list that come after the specified cursor" }))
12066
+ after: Lf(bv({ description: "Returns the elements in the list that come after the specified cursor" }))
12052
12067
  };
12053
- Object.assign(Object.assign({}, J_), { first: bv($f({ description: "Returns the first n elements from the list." })) });
12068
+ Object.assign(Object.assign({}, J_), { first: wv($f({ description: "Returns the first n elements from the list." })) });
12054
12069
  const X_ = {
12055
12070
  last: Lf($f({ description: "Returns the last n elements from the list." })),
12056
- before: Lf(_v({ description: "Returns the elements in the list that come before the specified cursor" }))
12071
+ before: Lf(bv({ description: "Returns the elements in the list that come before the specified cursor" }))
12057
12072
  };
12058
- Object.assign(Object.assign({}, X_), { last: bv($f({ description: "Returns the last n elements from the list." })) });
12073
+ Object.assign(Object.assign({}, X_), { last: wv($f({ description: "Returns the last n elements from the list." })) });
12059
12074
  var Pf = typeof Symbol == "function" ? Symbol : void 0;
12060
12075
  Pf && Pf.iterator;
12061
12076
  Pf && Pf.asyncIterator;
@@ -12079,7 +12094,7 @@ class Z_ {
12079
12094
  }
12080
12095
  }
12081
12096
  bt(Z_, Ie.Enum);
12082
- class Sv {
12097
+ class Ev {
12083
12098
  constructor(u, o) {
12084
12099
  this.name = u, this.config = o, Wi(u);
12085
12100
  }
@@ -12098,9 +12113,9 @@ class Sv {
12098
12113
  return Bf(Object.assign(Object.assign({}, u), { type: this }));
12099
12114
  }
12100
12115
  }
12101
- bt(Sv, Ie.InputObject);
12116
+ bt(Ev, Ie.InputObject);
12102
12117
  function K_(i) {
12103
- return new Sv(i.name, i);
12118
+ return new Ev(i.name, i);
12104
12119
  }
12105
12120
  class e1 {
12106
12121
  constructor(u, o) {
@@ -12138,7 +12153,7 @@ class r1 {
12138
12153
  }
12139
12154
  }
12140
12155
  bt(r1, Ie.DynamicOutputProperty);
12141
- const qm = ["id"], i1 = (i, u, o) => {
12156
+ const Hm = ["id"], i1 = (i, u, o) => {
12142
12157
  const { naming: h, mappers: m } = strapi.plugin("graphql").service("utils"), A = m.strapiScalarToGraphQLScalar(o.type);
12143
12158
  i.field(u, {
12144
12159
  type: h.getScalarFilterInputTypeName(A)
@@ -12168,11 +12183,11 @@ const qm = ["id"], i1 = (i, u, o) => {
12168
12183
  return {};
12169
12184
  if (Array.isArray(A))
12170
12185
  return A.reduce((J, te) => (J.push(m(te, E)), J), []);
12171
- const M = {}, { attributes: Q } = E, j = (J) => qm.includes(J) || rl.has(J, Q);
12186
+ const M = {}, { attributes: Q } = E, j = (J) => Hm.includes(J) || rl.has(J, Q);
12172
12187
  for (const [J, te] of Object.entries(A))
12173
12188
  if (j(J)) {
12174
12189
  const X = Q[J];
12175
- if (qm.includes(J) || C(X))
12190
+ if (Hm.includes(J) || C(X))
12176
12191
  M[J] = o(te);
12177
12192
  else if (N(X) || x(X)) {
12178
12193
  const me = i.getModel(X.target);
@@ -12241,13 +12256,13 @@ const qm = ["id"], i1 = (i, u, o) => {
12241
12256
  settings: a1,
12242
12257
  gql: u1
12243
12258
  }, p1 = {
12244
- register: Fv,
12245
- bootstrap: dy,
12246
- config: vy,
12259
+ register: Uv,
12260
+ bootstrap: gy,
12261
+ config: yy,
12247
12262
  controllers: g_,
12248
12263
  routes: b_,
12249
12264
  services: s1,
12250
- contentTypes: Nv
12265
+ contentTypes: Lv
12251
12266
  };
12252
12267
  export {
12253
12268
  p1 as default