| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 | import {  s as s2} from "./chunk-PDKDCAAD.js";import {  M,  M2} from "./chunk-ECW2QABR.js";import {  k2 as k} from "./chunk-MRJEICT6.js";import {  d,  e,  l3 as l,  n2 as n,  y3 as y} from "./chunk-Y3WMVFTW.js";import {  b} from "./chunk-IHXECKQQ.js";import {  s3 as s} from "./chunk-EMJ4ZSM2.js";import {  m} from "./chunk-IKP3YN53.js";import {  r} from "./chunk-GZT4BVFP.js";// node_modules/@arcgis/core/portal/PortalQueryParams.jsvar u;var m2 = new s2({ avgRating: "avg-rating", numRatings: "num-ratings", numComments: "num-comments", numViews: "num-views" });var c = u = class extends y {  constructor(t) {    super(t), this.categories = null, this.disableExtraQuery = false, this.extent = null, this.filter = null, this.num = 10, this.query = null, this.sortField = null, this.start = 1;  }  get sortOrder() {    return this._get("sortOrder") || "asc";  }  set sortOrder(t) {    t !== "asc" && t !== "desc" || this._set("sortOrder", t);  }  clone() {    return new u({ categories: this.categories ? m(this.categories) : null, disableExtraQuery: this.disableExtraQuery, extent: this.extent ? this.extent.clone() : null, filter: this.filter, num: this.num, query: this.query, sortField: this.sortField, sortOrder: this.sortOrder, start: this.start });  }  toRequestOptions(t, r2) {    let e2, s3;    if (this.categories && (e2 = this.categories.map((t2) => Array.isArray(t2) ? JSON.stringify(t2) : t2)), this.extent) {      const t2 = M(this.extent, k.WGS84);      r(t2) && (s3 = `${t2.xmin},${t2.ymin},${t2.xmax},${t2.ymax}`);    }    let i = this.query;    !this.disableExtraQuery && t.extraQuery && (i = "(" + i + ")" + t.extraQuery);    const a = { categories: e2, bbox: s3, q: i, filter: this.filter, num: this.num, sortField: null, sortOrder: null, start: this.start };    return this.sortField && (a.sortField = this.sortField.split(",").map((t2) => m2.toJSON(t2.trim())).join(","), a.sortOrder = this.sortOrder), { query: { ...r2, ...a } };  }};e([d()], c.prototype, "categories", void 0), e([d()], c.prototype, "disableExtraQuery", void 0), e([d({ type: M2 })], c.prototype, "extent", void 0), e([d()], c.prototype, "filter", void 0), e([d()], c.prototype, "num", void 0), e([d()], c.prototype, "query", void 0), e([d()], c.prototype, "sortField", void 0), e([d()], c.prototype, "sortOrder", null), e([d()], c.prototype, "start", void 0), c = u = e([n("esri.portal.PortalQueryParams")], c);var d2 = c;// node_modules/@arcgis/core/portal/PortalGroup.jsvar l2 = class extends l {  constructor(t) {    super(t), this.access = null, this.created = null, this.description = null, this.id = null, this.isInvitationOnly = false, this.modified = null, this.owner = null, this.portal = null, this.snippet = null, this.sortField = null, this.sortOrder = null, this.tags = null, this.title = null;  }  get thumbnailUrl() {    const t = this.url, r2 = this.thumbnail;    return t && r2 ? this.portal._normalizeUrl(`${t}/info/${r2}?f=json`) : null;  }  get url() {    const t = this.get("portal.restUrl");    return t ? t + "/community/groups/" + this.id : null;  }  fetchCategorySchema(t) {    return this.portal._request(this.url + "/categorySchema", t).then((r2) => {      const e2 = r2.categorySchema || [];      return e2.some((t2) => t2.source === "contentCategorySetsGroupQuery.LivingAtlas") ? this._fetchCategorySchemaSet("LivingAtlas", t) : e2;    });  }  fetchMembers(t) {    return this.portal._request(this.url + "/users", t);  }  getThumbnailUrl(t) {    let r2 = this.thumbnailUrl;    return r2 && t && (r2 += `&w=${t}`), r2;  }  toJSON() {    throw new s("internal:not-yet-implemented", "PortalGroup.toJSON is not yet implemented");  }  queryItems(t, r2) {    let e2 = b(d2, t);    return parseFloat(this.portal.currentVersion) > 5 ? (e2 = e2 || new d2(), this.portal._queryPortal(`/content/groups/${this.id}/search`, e2, "PortalItem", r2)) : (e2 = e2 ? e2.clone() : new d2(), e2.query = "group:" + this.id + (e2.query ? " " + e2.query : ""), this.portal.queryItems(e2, r2));  }  _fetchCategorySchemaSet(t, e2) {    return this.portal._fetchSelf(this.portal.authMode, true, e2).then((t2) => {      const o = t2.contentCategorySetsGroupQuery;      if (o) {        const t3 = new d2();        return t3.disableExtraQuery = true, t3.num = 1, t3.query = o, this.portal.queryGroups(t3, e2);      }      throw new s("portal-group:fetchCategorySchema", "contentCategorySetsGroupQuery value not found");    }).then((o) => {      if (o.total) {        const r2 = o.results[0], s3 = new d2();        return s3.num = 1, s3.query = `typekeywords:"${t}"`, r2.queryItems(s3, e2);      }      throw new s("portal-group:fetchCategorySchema", "contentCategorySetsGroupQuery group not found");    }).then((t2) => {      if (t2.total) {        return t2.results[0].fetchData("json", e2).then((t3) => {          const r2 = t3 && t3.categorySchema;          return r2 && r2.length ? r2 : [];        });      }      return [];    });  }};e([d()], l2.prototype, "access", void 0), e([d({ type: Date })], l2.prototype, "created", void 0), e([d()], l2.prototype, "description", void 0), e([d()], l2.prototype, "id", void 0), e([d()], l2.prototype, "isInvitationOnly", void 0), e([d({ type: Date })], l2.prototype, "modified", void 0), e([d()], l2.prototype, "owner", void 0), e([d()], l2.prototype, "portal", void 0), e([d()], l2.prototype, "snippet", void 0), e([d()], l2.prototype, "sortField", void 0), e([d()], l2.prototype, "sortOrder", void 0), e([d()], l2.prototype, "tags", void 0), e([d()], l2.prototype, "thumbnail", void 0), e([d({ readOnly: true })], l2.prototype, "thumbnailUrl", null), e([d()], l2.prototype, "title", void 0), e([d({ readOnly: true })], l2.prototype, "url", null), l2 = e([n("esri.portal.PortalGroup")], l2);var p = l2;export {  d2 as d,  p};//# sourceMappingURL=chunk-ATPLLI5W.js.map
 |