@arcgis/portal-components 5.2.0-next.57 → 5.2.0-next.59

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 (167) hide show
  1. package/dist/cdn/2H7Y7RJV.js +2 -0
  2. package/dist/cdn/32FQ7WJE.js +2 -0
  3. package/dist/cdn/3Q3EP3BN.js +2 -0
  4. package/dist/cdn/3VDVNPZ7.js +2 -0
  5. package/dist/cdn/3WH3ENZP.js +2 -0
  6. package/dist/cdn/4QA4AYHJ.js +3 -0
  7. package/dist/cdn/{LDCSQHZX.js → 55FL7WQV.js} +1 -1
  8. package/dist/cdn/5CT433EX.js +2 -0
  9. package/dist/cdn/6ROVXNLV.js +2 -0
  10. package/dist/cdn/7JQ6D224.js +2 -0
  11. package/dist/cdn/B36VBHAI.js +2 -0
  12. package/dist/cdn/CFBSBZSS.js +2 -0
  13. package/dist/cdn/CYEC77HO.js +2 -0
  14. package/dist/cdn/E6STCC7O.js +2 -0
  15. package/dist/cdn/EYTAC4Z4.js +2 -0
  16. package/dist/cdn/{NWIIOJEG.js → FGJNEKPQ.js} +1 -1
  17. package/dist/cdn/{TUQSWB7B.js → FPYIRCJO.js} +1 -1
  18. package/dist/cdn/{C4UBEDKI.js → G2NXASJO.js} +1 -1
  19. package/dist/cdn/{DNMB343K.js → GLDJPWRZ.js} +1 -1
  20. package/dist/cdn/HHA5STNZ.js +2 -0
  21. package/dist/cdn/HV3BRK66.js +2 -0
  22. package/dist/cdn/I5GDSNYE.js +2 -0
  23. package/dist/cdn/IRK4UW2F.js +2 -0
  24. package/dist/cdn/IVATGXII.js +2 -0
  25. package/dist/cdn/IXATTQKO.js +2 -0
  26. package/dist/cdn/JCIDQZ6X.js +2 -0
  27. package/dist/cdn/{R3VY2KZV.js → LDRIWXTO.js} +1 -1
  28. package/dist/cdn/{3PWVEX4V.js → ODJRHB2N.js} +1 -1
  29. package/dist/cdn/{EJZ55DVU.js → OK75ZZ2M.js} +1 -1
  30. package/dist/cdn/{DHMH2XFA.js → OTC37DGK.js} +1 -1
  31. package/dist/cdn/OYX64HG5.js +2 -0
  32. package/dist/cdn/QS3GXAIH.js +2 -0
  33. package/dist/cdn/RKT7WCDH.js +2 -0
  34. package/dist/cdn/RL7X3ACG.js +2 -0
  35. package/dist/cdn/RZPKVJMB.js +2 -0
  36. package/dist/cdn/S2JZ5KTI.js +2 -0
  37. package/dist/cdn/SJGVHRK2.js +2 -0
  38. package/dist/cdn/SUBBPVRW.js +2 -0
  39. package/dist/cdn/T7GD53BL.js +2 -0
  40. package/dist/cdn/{2VLAJOZX.js → TFFZ425X.js} +1 -1
  41. package/dist/cdn/UDTQ7U6L.js +2 -0
  42. package/dist/cdn/UPSYDUD6.js +2 -0
  43. package/dist/cdn/UUSJCAH5.js +2 -0
  44. package/dist/cdn/UXLENIDB.js +2 -0
  45. package/dist/cdn/UZCHLKLO.js +2 -0
  46. package/dist/cdn/VMQIDO4Z.js +2 -0
  47. package/dist/cdn/WBNJYBQD.js +2 -0
  48. package/dist/cdn/XSUXR4WJ.js +2 -0
  49. package/dist/cdn/Z2ZW4FY2.js +2 -0
  50. package/dist/cdn/ZP6MVFXR.js +2 -0
  51. package/dist/cdn/{U2QZZSPC.js → ZV4GLQQG.js} +1 -1
  52. package/dist/cdn/assets/portal-group-browser/t9n/messages.en.json +1 -0
  53. package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -1
  54. package/dist/cdn/index.js +1 -1
  55. package/dist/cdn/main.css +1 -1
  56. package/dist/chunks/fieldAddDelete.js +1 -1
  57. package/dist/chunks/groups.js +61 -7
  58. package/dist/chunks/groups2.js +8 -61
  59. package/dist/chunks/item.js +123 -29
  60. package/dist/chunks/item2.js +29 -123
  61. package/dist/chunks/loadClassificationData.js +1 -1
  62. package/dist/chunks/portal-browser.js +223 -0
  63. package/dist/chunks/portal.js +48 -40
  64. package/dist/chunks/portal2.js +50 -24
  65. package/dist/chunks/query.js +159 -0
  66. package/dist/chunks/request.js +87 -0
  67. package/dist/chunks/requests.js +4 -4
  68. package/dist/chunks/store.js +1 -5
  69. package/dist/chunks/string.js +19 -14
  70. package/dist/chunks/thumbnail.js +189 -0
  71. package/dist/chunks/ui.js +2 -3
  72. package/dist/chunks/url.js +17 -0
  73. package/dist/chunks/user.js +96 -13
  74. package/dist/chunks/user2.js +13 -178
  75. package/dist/chunks/utils.js +1 -1
  76. package/dist/components/arcgis-portal-account-switcher/customElement.js +1 -1
  77. package/dist/components/arcgis-portal-ai-assistant/customElement.js +3 -3
  78. package/dist/components/arcgis-portal-browser/customElement.d.ts +15 -7
  79. package/dist/components/arcgis-portal-browser/customElement.js +14 -196
  80. package/dist/components/arcgis-portal-browser/utils/store.d.ts +4 -4
  81. package/dist/components/arcgis-portal-browser/utils/types.d.ts +6 -0
  82. package/dist/components/arcgis-portal-browser-actions/customElement.d.ts +2 -4
  83. package/dist/components/arcgis-portal-browser-actions/customElement.js +12 -9
  84. package/dist/components/arcgis-portal-browser-filter/customElement.js +5 -5
  85. package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +5 -5
  86. package/dist/components/arcgis-portal-browser-filter-date/customElement.js +13 -12
  87. package/dist/components/arcgis-portal-browser-filter-status/customElement.js +1 -1
  88. package/dist/components/arcgis-portal-browser-pagination/customElement.js +25 -27
  89. package/dist/components/arcgis-portal-browser-search/customElement.js +1 -4
  90. package/dist/components/arcgis-portal-browser-top-bar/customElement.d.ts +6 -0
  91. package/dist/components/arcgis-portal-browser-top-bar/customElement.js +15 -16
  92. package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
  93. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  94. package/dist/components/arcgis-portal-group-badges/customElement.d.ts +0 -1
  95. package/dist/components/arcgis-portal-group-badges/customElement.js +21 -20
  96. package/dist/components/arcgis-portal-group-browser/customElement.d.ts +301 -0
  97. package/dist/components/arcgis-portal-group-browser/customElement.js +494 -0
  98. package/dist/components/arcgis-portal-group-browser/index.d.ts +1 -0
  99. package/dist/components/arcgis-portal-group-browser/index.js +6 -0
  100. package/dist/components/arcgis-portal-group-browser/types.d.ts +193 -0
  101. package/dist/components/arcgis-portal-group-browser-preview/customElement.d.ts +225 -0
  102. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +150 -0
  103. package/dist/components/arcgis-portal-group-browser-preview/index.d.ts +1 -0
  104. package/dist/components/arcgis-portal-group-browser-preview/index.js +12 -0
  105. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.d.ts +82 -0
  106. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +92 -0
  107. package/dist/components/arcgis-portal-group-browser-preview-card/index.d.ts +1 -0
  108. package/dist/components/arcgis-portal-group-browser-preview-card/index.js +6 -0
  109. package/dist/components/arcgis-portal-group-card/customElement.d.ts +3 -1
  110. package/dist/components/arcgis-portal-group-card/customElement.js +71 -91
  111. package/dist/components/arcgis-portal-group-card/index.js +3 -3
  112. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +40 -39
  113. package/dist/components/arcgis-portal-navigation/customElement.js +418 -411
  114. package/dist/components/arcgis-portal-navigation/index.js +1 -1
  115. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +68 -249
  116. package/dist/components/arcgis-portal-user-avatar/customElement.js +2 -2
  117. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +5 -2
  118. package/dist/components/arcgis-portal-user-popup/customElement.js +4 -3
  119. package/dist/components/portal-group-browser-filters/customElement.js +104 -0
  120. package/dist/components/portal-group-browser-filters/index.js +8 -0
  121. package/dist/components/portal-group-browser-pagination/customElement.js +13 -0
  122. package/dist/components/portal-group-browser-pagination/index.js +2 -0
  123. package/dist/components/portal-group-browser-sort/customElement.js +16 -0
  124. package/dist/components/portal-group-browser-sort/index.js +2 -0
  125. package/dist/docs/api.json +1 -1
  126. package/dist/docs/docs.json +1 -1
  127. package/dist/docs/vscode.html-custom-data.json +1 -1
  128. package/dist/docs/web-types.json +1 -1
  129. package/dist/index.d.ts +36 -0
  130. package/dist/loader.js +5 -2
  131. package/dist/types/group.d.ts +6 -8
  132. package/dist/types/item.d.ts +1 -1
  133. package/dist/types/lumina.d.ts +32 -0
  134. package/dist/types/preact.d.ts +35 -0
  135. package/dist/types/react.d.ts +38 -0
  136. package/dist/types/search.d.ts +2 -2
  137. package/dist/types/stencil.d.ts +32 -0
  138. package/dist/types/user.d.ts +2 -2
  139. package/package.json +4 -4
  140. package/dist/cdn/2EJG4DOC.js +0 -2
  141. package/dist/cdn/2JCFEF3J.js +0 -2
  142. package/dist/cdn/2WEWH5G3.js +0 -2
  143. package/dist/cdn/6AGZRMJC.js +0 -2
  144. package/dist/cdn/6D3PU4ZT.js +0 -2
  145. package/dist/cdn/7QXIBQV7.js +0 -2
  146. package/dist/cdn/BJTJP57C.js +0 -2
  147. package/dist/cdn/BZRM2V6V.js +0 -2
  148. package/dist/cdn/C2DREZD4.js +0 -2
  149. package/dist/cdn/CSH3WCYD.js +0 -2
  150. package/dist/cdn/GKBK32VH.js +0 -2
  151. package/dist/cdn/GYFQDPCN.js +0 -2
  152. package/dist/cdn/J46I5HEQ.js +0 -2
  153. package/dist/cdn/JJ7P5JJ3.js +0 -2
  154. package/dist/cdn/JZ2ZI5WO.js +0 -2
  155. package/dist/cdn/LTQA5JRV.js +0 -2
  156. package/dist/cdn/M5MGOBU3.js +0 -2
  157. package/dist/cdn/M6X5KCWL.js +0 -2
  158. package/dist/cdn/OBVMQ64S.js +0 -2
  159. package/dist/cdn/OGC5YU6V.js +0 -2
  160. package/dist/cdn/OUN473QW.js +0 -2
  161. package/dist/cdn/QPFPNUHH.js +0 -2
  162. package/dist/cdn/R6SSAPLB.js +0 -3
  163. package/dist/cdn/SJDQS32I.js +0 -2
  164. package/dist/cdn/UQWELJR5.js +0 -2
  165. package/dist/cdn/Y4YNN6DS.js +0 -2
  166. package/dist/cdn/Y5CRBUVL.js +0 -2
  167. /package/dist/cdn/{AWIVXH7M.js → 5KDFY5KE.js} +0 -0
@@ -0,0 +1,223 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as F } from "./runtime.js";
3
+ import { watch as l } from "@arcgis/core/core/reactiveUtils.js";
4
+ import * as p from "@arcgis/core/intl.js";
5
+ import { substitute as g } from "@arcgis/core/intl.js";
6
+ import { LitElement as S, createEvent as m, safeClassMap as s, safeStyleMap as w } from "@arcgis/lumina";
7
+ import { css as B, html as r } from "lit";
8
+ import { createRef as P, ref as k } from "lit/directives/ref.js";
9
+ import { u as R } from "./useT9n.js";
10
+ import { c as u } from "./dom.js";
11
+ import { i as C } from "./functionalities.js";
12
+ import "../components/arcgis-portal-browser-filter-date/customElement.js";
13
+ import "../components/arcgis-portal-browser-filter-status/customElement.js";
14
+ import "../components/arcgis-portal-browser-filter/customElement.js";
15
+ import "../components/arcgis-portal-browser-filters/customElement.js";
16
+ import { c as E, o as T, a as W, i as z } from "./store.js";
17
+ const I = B`:host{position:relative;display:flex;height:100%;flex-direction:column;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-color-background);--arcgis-browser-max-width: 100%;--arcgis-browser-pane-width: 18.75rem;--arcgis-browser-pane-z-index: 11;container-type:inline-size;container-name:portal-browser}:host([height="auto"]){height:auto;min-height:100%;flex:1 1 100%}.wrapper{display:flex;height:100%;flex-direction:column;overflow:hidden}.wrapper--fixed{overflow:hidden}.wrapper--auto{flex:1 1 100%}.wrapper--full{transform:translate(0)}.panel{display:flex;height:100%;flex-direction:column;overflow:hidden}.panel--fixed{transform:translateZ(0)}.top-bar{position:sticky;top:0;right:0;left:0;z-index:20;flex-shrink:0;flex-grow:0;border-bottom:1px solid var(--calcite-color-border-3)}.scrolling{position:relative;display:flex;min-height:0px;width:100%;flex:1 1 0%;flex-direction:column}.scrolling--panel{overflow-y:scroll}@supports (scrollbar-gutter: stable){.scrolling--panel{scrollbar-gutter:stable;overflow-y:auto}}.scrolling--full{overflow:hidden}.preview-position{position:absolute;inset:0;margin-inline:auto;width:100%;max-width:var(--arcgis-browser-max-width)}.preview-position--with-top-bar{top:3rem}.preview-desktop{width:100%}.two-up{margin-left:auto;margin-right:auto;display:flex;width:100%;flex:1 1 auto;flex-direction:row;max-width:var(--arcgis-browser-max-width)}.two-up.small{margin-top:-1px}.two-up--fullscreen{height:100%;overflow:hidden}.content__start{margin-inline-end:.25rem;padding-inline:1rem}.content{position:relative;display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}.content--full{overflow-y:scroll}@supports (scrollbar-gutter: stable){.content--full{scrollbar-gutter:stable;overflow-y:auto}}.content__top{position:relative;display:flex;height:1.5rem;flex-grow:0;align-items:center;justify-content:space-between;padding-top:1.25rem;padding-bottom:.75rem;font-size:1.125rem;color:var(--calcite-color-text-1);z-index:2}.content__top__end{margin-inline-start:auto;display:grid;gap:.5rem;grid-auto-flow:column}.actions,.filter-status{flex:1 1 0%}.content__view{margin-inline-end:.25rem;min-width:0px;flex:1 1 0%;padding-inline:var(--arcgis-browser-content-padding, 1rem)}.content__view--padded-bottom{padding-bottom:1rem}.content__view--no-filters{margin-inline-start:.25rem;padding-inline-start:var(--arcgis-browser-content-padding, 1rem)}.pane{pointer-events:none;visibility:hidden;display:flex;height:100%;background-color:var(--calcite-color-background);opacity:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:transform,visibility,opacity;border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.pane--open{pointer-events:auto;visibility:visible;opacity:1;transform:translate(0);box-shadow:4px 0 16px #0000000f}.preview{width:0px;flex-shrink:0;flex-grow:0;position:absolute;top:0;bottom:0;inset-inline-start:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:width;z-index:var(--arcgis-browser-pane-z-index)}.preview--fixed{position:fixed}.preview--active{overflow:auto;width:var(--arcgis-browser-pane-width);box-shadow:#0000000f 4px 0 16px}.filter-panel,.preview-panel{position:relative;height:100%;background-color:var(--calcite-color-background)}.filter-panel__content{padding:.75rem 1rem 0}.filter-status--mobile{width:100%}.filter-status--active{display:block}.popover-contents{width:var(--arcgis-browser-popover-width);height:var(--arcgis-browser-popover-height)}.sheet{pointer-events:none;position:fixed;inset:0;z-index:110}.sheet--top-bar{top:3rem;overflow:hidden}.sheet__background{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;background-color:#0003}.sheet__background--hidden{display:none}.sheet--active .sheet__background{opacity:1}.sheet--active{pointer-events:auto;opacity:1}.sheet__contents{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;top:3rem;transform:translate3d(0,24px,0)}.sheet__contents--full{top:0;--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-inline-end:0;width:100%;border:1px solid var(--calcite-color-border-3);border-inline-start:1px solid var(--calcite-color-border-3);transform:translate3d(0,24px,0)}.sheet--active .sheet__contents{opacity:1;transform:translateZ(0)}.hide{display:none}.aria-hidden{height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;position:absolute;top:0;bottom:0;width:0px;inset-inline-end:0}.content__view--flex{display:flex;flex-direction:column}.cover{display:flex;flex:1 1 0%;align-items:flex-start;justify-content:center;overflow:auto;padding-bottom:1rem;padding-top:.25rem}.no-results{height:100%;width:100%;flex:1 1 0%;text-align:center;font-size:.875rem;color:var(--calcite-color-text-2)}::slotted([slot="no-results"]){width:100%}::slotted([slot="no-content"]){width:100%}.results-wrapper{flex:1 1 0%}.results-wrapper--spaced{padding-top:1.5rem}.loader{margin-top:min(8rem,30vh);--calcite-loader-padding: 0}.filters{box-sizing:border-box;flex-grow:0;padding-inline:1.5rem 0;width:var(--arcgis-browser-pane-width)}.filters--sticky{position:sticky;top:0;height:100%}.filters__content{overflow-y:auto;height:100%;padding-top:1.5rem;box-sizing:border-box;scrollbar-gutter:stable}.filters--empty{display:none}.filters--active{opacity:1;transform:translateZ(0)}.filters__title{margin:0 0 1rem;padding:0 0 1rem;font-size:1.125rem;font-weight:500;color:var(--calcite-color-text-1);padding-inline-start:.75rem;border-bottom:1px solid var(--calcite-color-border-3)}.range{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;color:var(--calcite-color-text-1)}.container{display:flex;height:100%;width:100%;flex-direction:column;background-color:var(--calcite-color-background)}.container__header{display:flex;flex:0 1 auto;flex-direction:row;background-color:var(--calcite-color-foreground-1);border-bottom:1px solid var(--calcite-color-border-3)}.container__header__text{margin:0;flex:1 1 0%;padding:.875rem .75rem;font-size:1rem;font-weight:500;color:var(--calcite-color-text-2)}.container__content{flex:1 1 0%;overflow:auto}.container__footer{box-sizing:border-box;width:100%;flex:0 1 auto;background-color:var(--calcite-color-foreground-1);padding:.5rem}.small .filters{padding:0}.small .filters__content{padding-left:1rem;padding-right:1rem}.small .content__view{padding-inline:.5rem;margin-inline:0}.small .content__view--panel{padding-inline:0}.small .content__start{margin-inline:0;padding-inline:.5rem}@container portal-browser (max-width: 640px){:host{--arcgis-browser-pane-width: 100%}}.scrim__find{margin-top:3.5rem;opacity:.6;transition-property:opacity;transition-duration:.15s;--calcite-scrim-background: rgba(0, 0, 0, .6)}`;
18
+ function f(c) {
19
+ return {
20
+ ...c,
21
+ value: void 0,
22
+ ..."additionalParams" in c ? { additionalParams: void 0 } : {}
23
+ };
24
+ }
25
+ function U(c, t = {}) {
26
+ const { hiddenFilterIds: e, preservedFilterIds: i } = t, o = /* @__PURE__ */ new Set([...e || [], ...i || []]);
27
+ return Object.entries(c).reduce(
28
+ (n, [a, d]) => o.has(a) ? (n[a] = d, n) : (n[a] = f(d), n),
29
+ {}
30
+ );
31
+ }
32
+ function q(c) {
33
+ const t = Math.max(c?.total ?? 0, 0), e = c?.results?.length ?? 0;
34
+ if (!t || !e)
35
+ return { start: 0, end: 0, total: t };
36
+ const i = Math.max(c?.start ?? 1, 1), o = Math.min(i + e - 1, t);
37
+ return { start: i, end: o, total: t };
38
+ }
39
+ const A = 49;
40
+ class H extends S {
41
+ constructor() {
42
+ super(...arguments), this._messages = R({ blocking: !0 }), this._previewContainer = P(), this.toggleScrim = (t) => {
43
+ this.scrimActive = t.detail;
44
+ }, this.checkFlowItem = () => {
45
+ this.flowItem = u(this.el, "calcite-flow-item");
46
+ }, this.handleResize = () => {
47
+ requestAnimationFrame(this.updatePreviewPosition);
48
+ }, this.updatePreviewPosition = () => {
49
+ if (this.formFactor === "small" || this.height !== "auto" || !this._previewContainer)
50
+ return;
51
+ this.checkFlowItem();
52
+ const t = this._previewContainer.value?.getBoundingClientRect();
53
+ if (!t)
54
+ return;
55
+ const { x: e, y: i, height: o, right: n, width: a } = t, d = o + i, h = window.innerWidth - document.body.offsetWidth, v = window.innerWidth < a || window.innerWidth < window.outerWidth && window.innerWidth <= a + h;
56
+ this.previewBoundingBox = {
57
+ top: Math.max(i, 0),
58
+ left: e,
59
+ right: v ? 0 : window.outerWidth - n - h,
60
+ bottom: d > window.innerHeight ? 0 : window.innerHeight - d
61
+ };
62
+ }, this.pageRangeText = "", this.noResults = !1, this.initialHide = !0, this.scrimActive = !1, this.panel = !1, this.preview = !1, this.loading = !1, this.hideContentTop = !1, this.alwaysShowSelection = !1, this.alwaysShowContent = !1, this.response = {
63
+ nextStart: -1,
64
+ num: 0,
65
+ results: [],
66
+ start: 1,
67
+ total: 0
68
+ }, this.store = E(), this.formFactor = "large", this.searchTerm = "", this.height = "full", this.api = 4, this.arcgisAriaUpdate = m(), this.arcgisBrowserFilterClear = m(), this.arcgisBrowserFilterRemove = m(), this.ariaUpdate = m();
69
+ }
70
+ static {
71
+ this.properties = { pageRangeText: 16, noResults: 16, previewBoundingBox: 16, initialHide: 16, scrimActive: 16, flowItem: 16, panel: 5, preview: 5, loading: 5, hideContentTop: 5, hideTopBar: 5, selected: 0, alwaysShowSelection: 5, alwaysShowContent: 5, response: 0, store: 0, formFactor: 1, searchTerm: 1, height: 3, hideFilters: 5, showPreSearch: 5, rangeFormatter: 0, alwaysShowPagination: 5, api: 9 };
72
+ }
73
+ static {
74
+ this.styles = I;
75
+ }
76
+ async scrollToTop() {
77
+ this.renderRoot.querySelector(".top-bar")?.scrollIntoView({ behavior: "smooth", block: "nearest" });
78
+ }
79
+ connectedCallback() {
80
+ super.connectedCallback(), window.addEventListener("scroll", this.handleResize), window.addEventListener("resize", this.handleResize), this.el.addEventListener("arcgisItemBrowserScrimToggle", this.toggleScrim), this.checkFlowItem(), this.attachStoreWatchers();
81
+ }
82
+ willUpdate(t) {
83
+ t.has("store") && this.attachStoreWatchers(), t.has("response") && this.updatePage(this.response);
84
+ }
85
+ firstUpdated() {
86
+ requestAnimationFrame(this.updatePreviewPosition);
87
+ }
88
+ disconnectedCallback() {
89
+ this.removePreviewWatcher?.(), this.removeStoreWatcher?.(), window.removeEventListener("resize", this.handleResize), window.removeEventListener("scroll", this.handleResize), this.el.removeEventListener("arcgisItemBrowserScrimToggle", this.toggleScrim), super.disconnectedCallback();
90
+ }
91
+ attachStoreWatchers() {
92
+ if (this.removePreviewWatcher?.(), this.removeStoreWatcher?.(), !this.store)
93
+ return;
94
+ this.removePreviewWatcher = T(this.store, this.updatePreviewPosition);
95
+ const t = [
96
+ l(() => this.store.type, () => this.requestUpdate()),
97
+ l(() => this.store.width, () => this.requestUpdate()),
98
+ l(() => this.store.height, () => this.requestUpdate()),
99
+ l(() => this.store.filtersEmpty, () => this.requestUpdate()),
100
+ l(() => this.store.topbarEmpty, () => this.requestUpdate()),
101
+ l(() => this.store.sortEmpty, () => this.requestUpdate()),
102
+ l(() => this.store.filtersExpanded, () => this.requestUpdate()),
103
+ l(() => this.store.panel, () => this.requestUpdate()),
104
+ l(() => this.store.preview, () => this.requestUpdate()),
105
+ l(() => this.store.searchTerm, () => this.requestUpdate()),
106
+ l(() => this.store.hiddenFilters, () => this.requestUpdate()),
107
+ l(() => this.store.filters, () => this.requestUpdate()),
108
+ l(() => this.store.recycleBin, () => this.requestUpdate())
109
+ ];
110
+ this.removeStoreWatcher = () => {
111
+ t.forEach((e) => e.remove());
112
+ };
113
+ }
114
+ async updatePage(t) {
115
+ const [e, i] = await this.updatePageRange(t);
116
+ this.pageRangeText = e, this.arcgisAriaUpdate.emit(i), this.el.dispatchEvent(new CustomEvent("ariaUpdate", { detail: i })), this.noResults = W(this.store) && this.store.recycleBin ? t.results.length === 0 : (t?.total ?? 0) === 0, this.initialHide = !1;
117
+ }
118
+ async updatePageRange(t) {
119
+ const { start: e, end: i, total: o } = q(t), n = p.formatNumber(e, { maximumFractionDigits: 0 }), a = p.formatNumber(i, { maximumFractionDigits: 0 }), h = `${p.formatNumber(o, { maximumFractionDigits: 0 })}${o >= 1e4 ? "+" : ""}`, v = p.formatNumber(t.results?.length ?? 0, { maximumFractionDigits: 0 }), x = p.formatNumber(Math.max(Math.ceil(e / Math.max(t.num || 1, 1)), 1), {
120
+ maximumFractionDigits: 0
121
+ });
122
+ if (this.rangeFormatter)
123
+ return await this.rangeFormatter({
124
+ start: n,
125
+ end: a,
126
+ total: h,
127
+ results: { items: v, page: x }
128
+ });
129
+ const b = this._messages.browser.pageRange, _ = this._messages.browser.pageRangeAria, y = g(b, {
130
+ start: n,
131
+ end: a,
132
+ total: h
133
+ }), $ = g(_, {
134
+ start: n,
135
+ end: a,
136
+ total: h
137
+ });
138
+ return [y, $];
139
+ }
140
+ hasActiveFilter(t) {
141
+ return Object.values(t.filters).filter(({ id: e }) => !C(z, e)).some((e) => !!e.value || e.id === "collaborations");
142
+ }
143
+ removeFilter(t) {
144
+ const e = this.store.filters[t];
145
+ if (!e)
146
+ return;
147
+ const i = f(e), o = { ...this.store.filters, [t]: i };
148
+ this.store.filters = o, this.arcgisBrowserFilterRemove.emit(t);
149
+ }
150
+ clearFilters() {
151
+ const t = U(this.store.filters, {
152
+ hiddenFilterIds: this.store.hiddenFilters,
153
+ preservedFilterIds: ["folder", "group", "contentType"]
154
+ });
155
+ this.store.filters = t, this.arcgisBrowserFilterClear.emit(null);
156
+ }
157
+ renderNoResults() {
158
+ const t = this.noResults && !this.loading && !this.showPreSearch, e = this.hasActiveFilter(this.store) || !!this.searchTerm;
159
+ return t ? r`<div class="cover"><div class="no-results">${e ? r`<slot name=no-results></slot>` : r`<slot name=no-content></slot>`}</div></div>` : null;
160
+ }
161
+ renderPopoverContents(t, e, i) {
162
+ const o = this.flowItem ? this.flowItem.offsetHeight : this.store.height, n = this.formFactor === "small" && this.hasActiveFilter(this.store) && !this.hideFilters;
163
+ return this.el.style.setProperty("--arcgis-browser-popover-width", i ? "100%" : `${this.store.width || 0}px`), this.el.style.setProperty("--arcgis-browser-popover-height", i ? "100%" : `${o || 0}px`), r`<div class="popover-contents"><div class=${s({ hide: !e, "preview-panel": !0 })}><slot name=preview></slot></div><div class=${s({ hide: !t, "filter-panel": !0 })}><article class="container"><header class="container__header"><h2 class="container__header__text">${this._messages.browser?.refineContent}</h2><calcite-action .text=${this._messages.browser?.close} scale=m icon=x @click=${() => {
164
+ this.store.filtersExpanded = !1;
165
+ }}></calcite-action></header><div class="container__content"><div class="container__content__scroll"><slot name=filters-top></slot>${(this.store.panel || i) && r`<div class="filter-container__content"><slot name=sort></slot></div>` || ""}<slot name=filters></slot></div></div><div class=${s({ "filter-status--mobile": !0, container__footer: !0, hide: !n })}><arcgis-portal-browser-filter-status class="filter-status" .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters || []} .componentWidth=${this.store.width || this.flowItem?.offsetWidth || window.innerWidth} .browserWidth=${window.innerWidth} @arcgisBrowserFilterClear=${() => this.clearFilters()} @arcgisBrowserFilterRemove=${(a) => this.removeFilter(a.detail)}></arcgis-portal-browser-filter-status></div></article></div></div>`;
166
+ }
167
+ renderFlow() {
168
+ const t = !!this.store.panel, e = !!this.store.filtersExpanded && (!this.store.filtersEmpty || !this.store.sortEmpty && t), i = !!this.store.preview, o = !this.store.panel && document.documentElement.clientWidth > (this.store.width || 0);
169
+ return r`<div class=${s({ panel: !0, "panel--fixed": o })}>${!this.hideTopBar && r`<div class=${s({ "top-bar": !0, "top-bar--small": this.formFactor === "small" })}><slot name=top-bar></slot></div>` || ""}<div class="scrolling scrolling--panel"><div class=${s({ "two-up": !0, [this.formFactor]: !0 })}><div class="content"><div><slot name=primary-filter></slot></div><div class="content__start"><slot name=content-start></slot></div>${this.loading && !this.alwaysShowContent && r`<div class="content__view content__view--flex"><div class="cover"><calcite-loader class="loader" label></calcite-loader></div></div>` || ""}${this.noResults && !this.loading && r`<div class="content__view content__view--flex"><div class="cover">${this.renderNoResults()}</div></div>` || ""}<div class=${s({
170
+ hide: this.loading || this.noResults,
171
+ // eslint-disable-next-line @typescript-eslint/naming-convention
172
+ content__view: !0,
173
+ "content__view--panel": !!this.store.panel,
174
+ "content__view--flex": !this.loading && !this.noResults
175
+ })}>${!this.store.panel && !this.hideContentTop && r`<div class="content__top"><span class=${s({ selection: !0, hide: !this.alwaysShowSelection })}><slot name=selection></slot></span>${!this.loading && r`<span class="range">${this.pageRangeText}</span>` || ""}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot>${!t && r`<slot name=sort></slot>` || ""}</div></div>` || ""}<div class="flow-content"><slot name=content></slot></div><slot name=pagination></slot><slot name=content-end></slot></div></div></div><slot name=scroll-end></slot></div>${!this.store.panel || window.innerWidth < (this.store.width || 0) * 2 ? r`<div class=${s({
176
+ sheet: !0,
177
+ "sheet--active": e || i,
178
+ "sheet--top-bar": o
179
+ })}><div class=${s({ sheet__background: !0, "sheet__background--hidden": o })}></div><div class=${s({ sheet__contents: !0, "sheet__contents--full": o })}>${this.renderPopoverContents(e, i, !0)}</div></div>` : r`<calcite-popover overlay-positioning=fixed .open=${i || e} label=filters .referenceElement=${this.flowItem || this.el} offset-skidding=0 offset-distance=0 trigger-disabled pointer-disabled .placement=${this.store.panel ? "trailing" : "auto"} @calcitePopoverOpen=${(n) => {
180
+ (!this.store.panel || window.innerWidth < (this.store.width || 0) * 2) && (n.currentTarget.style.transform = "none");
181
+ }} .focusTrapOptions=${{
182
+ setReturnFocus: (n) => {
183
+ if (!(n instanceof HTMLElement))
184
+ return n;
185
+ const a = u(n, "arcgis-portal-item-card, arcgis-portal-group-card");
186
+ return a?.restoreFocus ? (a.restoreFocus(), !1) : n;
187
+ }
188
+ }}>${this.renderPopoverContents(e, i)}</calcite-popover>`}</div>`;
189
+ }
190
+ render() {
191
+ const t = this.height === "auto", e = this.height === "full", i = `${(this.store.height || window.innerHeight) - A}px`, o = t ? {} : { maxHeight: i };
192
+ return this.formFactor === "small" ? this.renderFlow() : r`<div class=${s({
193
+ wrapper: !0,
194
+ "wrapper--fixed": !!this.store.filtersExpanded,
195
+ "wrapper--auto": t,
196
+ "wrapper--full": e
197
+ })}>${!this.hideTopBar && r`<div class="top-bar"><slot name=top-bar></slot></div>` || ""}<slot name=top-bar-end></slot><div class=${s({ "preview-position": !0, "preview-position--with-top-bar": !this.store.topbarEmpty })} ${k(this._previewContainer)}><div class=${s({ preview: !0, "preview--active": !!this.store.preview, "preview--fixed": t })} style=${w(t && this.previewBoundingBox ? {
198
+ top: `${this.previewBoundingBox.top || 0}px`,
199
+ ...document.dir === "rtl" ? { right: `${this.previewBoundingBox.right || 0}px` } : { left: `${this.previewBoundingBox.left || 0}px` },
200
+ bottom: `${this.previewBoundingBox.bottom || 0}px`
201
+ } : {})}><div class=${s({ pane: !0, "pane--open": !!this.store.preview })}><div class="preview-desktop"><slot name=preview></slot></div></div></div></div><div class=${s({ scrolling: !0, "scrolling--full": !t || this.panel })}>${this.scrimActive && r`<calcite-scrim class="scrim__find"></calcite-scrim>` || ""}<div class=${s({ "two-up": !0, "two-up--fullscreen": e, [this.formFactor]: !0 })}><div class=${s({
202
+ filters: !0,
203
+ "filters--sticky": !t,
204
+ "filters--empty": this.store.filtersEmpty && !this.store.preview,
205
+ "filters--active": !!this.store.filtersExpanded
206
+ })} style=${w(e ? {} : o)}><div class="filters__content" style=${w(e ? {} : o)}><slot name=filters></slot></div></div><div class=${s({ content: !0, "content--full": e })}><div class="content__start"><slot name=content-start></slot></div><div class=${s({
207
+ // eslint-disable-next-line @typescript-eslint/naming-convention
208
+ content__view: !0,
209
+ "content__view--no-filters": this.store.filtersEmpty && !this.store.preview,
210
+ "content__view--flex": !0
211
+ })}>${!this.hideContentTop && r`<div class="content__top">${this.showPreSearch ? null : r`<div class="content__top__summary"><span class=${s({ selection: !0, hide: !this.alwaysShowSelection })}><slot name=selection></slot></span>${!this.loading && r`<span class="range">${this.pageRangeText}<slot name=range-end></slot></span>` || ""}</div>`}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot><slot name=sort></slot></div></div>` || ""}${this.loading && (!this.alwaysShowContent || this.initialHide) && r`<div class="cover"><calcite-loader class="loader" .label=${this._messages.browser?.loading ?? ""}></calcite-loader></div>` || ""}${this.renderNoResults()}${!this.loading && this.showPreSearch && r`<div class="cover"><div class="no-results"><slot name=pre-search></slot></div></div>` || ""}<div class=${s({
212
+ hide: !!this.showPreSearch || this.loading && !this.alwaysShowContent || !this.loading && this.noResults || this.initialHide,
213
+ "results-wrapper--spaced": this.hideContentTop,
214
+ "results-wrapper": !0
215
+ })}><slot name=content></slot></div><div class=${s({ hide: this.loading || this.noResults && !this.alwaysShowPagination })}><slot name=pagination></slot><slot name=content-end></slot></div></div></div></div><slot name=scroll-end></slot></div></div>`;
216
+ }
217
+ }
218
+ F("arcgis-portal-browser", H);
219
+ export {
220
+ H as A,
221
+ U as a,
222
+ f as c
223
+ };
@@ -1,50 +1,41 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const a = (e) => e && !e.endsWith("/") ? `${e}/` : e;
3
- function o({
4
- portal: e,
5
- usePortalHostname: t
6
- }) {
7
- const { customBaseUrl: r, portalHostname: s, urlKey: n } = e, { protocol: i } = window.location, c = !t && n ? `${n}.${r}` : s;
8
- return `${i}//${c}`;
9
- }
10
- function b({ portal: e }) {
11
- return `${o({ portal: e, usePortalHostname: !e.user })}/home`;
12
- }
13
- function f(e) {
2
+ import { i } from "./functionalities.js";
3
+ import { a, g as c } from "./url.js";
4
+ function y(e) {
14
5
  return a(e.restUrl);
15
6
  }
16
7
  function u(e, t) {
17
- const r = o({ portal: t }), s = new URL(e, r);
18
- return s.protocol = "https:", t?.httpsPort && t.httpsPort !== 80 && t.httpsPort !== 443 && (s.port = `${t.httpsPort}`), s.href;
8
+ const n = c({ portal: t }), r = new URL(e, n);
9
+ return r.protocol = "https:", t?.httpsPort && t.httpsPort !== 80 && t.httpsPort !== 443 && (r.port = `${t.httpsPort}`), r.href;
19
10
  }
20
11
  function p(e) {
21
- const t = e?.sourceJSON.helpBase;
22
- if (t?.startsWith("https://enterprise.arcgis.com/"))
23
- return `${t}portal/`;
24
- let r = t;
25
- return e?.sourceJSON.portalDeploymentType !== "ArcGISEnterpriseOnKubernetes" && (r += "portal/"), e.allSSL || window.location.protocol === "https:" || l(e) || window.location.port === "7443" ? u(`${window.location.protocol}//${window.location.host}${r}`, e) : r;
12
+ const t = s(e), n = t?.helpBase;
13
+ if (n?.startsWith("https://enterprise.arcgis.com/"))
14
+ return `${n}portal/`;
15
+ let r = n;
16
+ return t?.portalDeploymentType !== "ArcGISEnterpriseOnKubernetes" && (r += "portal/"), e.allSSL || window.location.protocol === "https:" || l(e) || window.location.port === "7443" ? u(`${window.location.protocol}//${window.location.host}${r}`, e) : r;
26
17
  }
27
- function h(e) {
28
- return e.isPortal ? p(e) : e?.sourceJSON.helpBase || "support.html";
18
+ function P(e) {
19
+ return e.isPortal ? p(e) : s(e).helpBase || "support.html";
29
20
  }
30
21
  function l(e) {
31
22
  return !!(e?.isPortal && e?.portalHostname && !e.portalHostname.match(/:7080\//u) && e.httpPort !== 80 && e.httpsPort !== 443 && window.location.protocol === "https:");
32
23
  }
33
- function y(e) {
24
+ function S(e) {
34
25
  return e.credential?.token || e.token || e.user?.credential?.token || e.portalUser?.token || "";
35
26
  }
36
- function g(e) {
27
+ function T(e) {
37
28
  return e.sourceJSON?.isWebTierAuth;
38
29
  }
39
- function d(e, t, r) {
30
+ function d(e, t, n) {
40
31
  if (!t?.type)
41
32
  return !1;
42
- const s = t.typeKeywords ?? [];
33
+ const r = t.typeKeywords ?? [];
43
34
  switch (e) {
44
35
  case "arcgisinstantapps":
45
- return t.type === "Web Mapping Application" && s.includes("configurableApp");
36
+ return t.type === "Web Mapping Application" && r.includes("configurableApp");
46
37
  case "arcgis360vr":
47
- return !r && t.type === "360 VR Experience";
38
+ return !n && t.type === "360 VR Experience";
48
39
  case "survey123":
49
40
  return t.type === "Form";
50
41
  case "datapipelines":
@@ -54,7 +45,7 @@ function d(e, t, r) {
54
45
  case "experienceBuilder":
55
46
  return t.type === "Web Experience" || t.type === "Web Experience Template";
56
47
  case "webappbuilder":
57
- return t.type === "Web Mapping Application" && (s.includes("Web AppBuilder") || s.includes("WebAppBuilder"));
48
+ return t.type === "Web Mapping Application" && (r.includes("Web AppBuilder") || r.includes("WebAppBuilder"));
58
49
  case "fieldmaps":
59
50
  return t.type === "Web Map";
60
51
  case "arcgisnotebooks":
@@ -72,20 +63,37 @@ function d(e, t, r) {
72
63
  return !1;
73
64
  }
74
65
  }
75
- function w(e, t, r) {
76
- return (t ?? []).some((s) => d(s, e, r));
66
+ function m(e, t, n) {
67
+ return (t ?? []).some((r) => d(r, e, n));
77
68
  }
78
- function P(e) {
79
- return e?.isPortal ? e?.sourceJSON.supportsHostedNotebooks : !(["Trial Developer", "Trial", "Trial Press"].includes(e?.sourceJSON.subscriptionInfo?.type) || e?.sourceJSON.subscriptionInfo?.options?.includes("Developer"));
69
+ const s = (e) => e.sourceJSON, o = (e) => e.portalProperties ?? {};
70
+ function w(e) {
71
+ const t = o(e).homePage === "modern";
72
+ return e.isPortal ? t || g(e) : t || f(e);
73
+ }
74
+ function f(e) {
75
+ const t = (/* @__PURE__ */ new Date("June 30, 2020")).getTime();
76
+ return !e.isPortal && e.created ? e.created.getTime() >= t : !1;
77
+ }
78
+ function g(e) {
79
+ return e.isPortal && o(e).homePage === "modernOnly";
80
+ }
81
+ function H(e) {
82
+ return e.type === "gallery" && !!e.groupId;
83
+ }
84
+ function k(e) {
85
+ const t = s(e);
86
+ return e?.isPortal ? t.supportsHostedNotebooks : !(i(["Trial Developer", "Trial", "Trial Press"], t.subscriptionInfo?.type) || t.subscriptionInfo?.options?.includes("Developer"));
80
87
  }
81
88
  export {
82
- y as a,
83
- o as b,
84
- w as c,
85
- b as d,
86
- h as e,
89
+ S as a,
90
+ s as b,
91
+ H as c,
92
+ m as d,
93
+ P as e,
87
94
  u as f,
88
- f as g,
89
- g as i,
90
- P as n
95
+ y as g,
96
+ w as h,
97
+ T as i,
98
+ k as n
91
99
  };
@@ -1,33 +1,59 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { r } from "./requests.js";
3
- async function i(s) {
4
- const t = `${s.restUrl}/portals/${s.id}/approvedApps`;
5
- return await r(t, { query: { returnAllApps: !1 } });
2
+ import o from "@arcgis/core/request.js";
3
+ import { f as n, r as i } from "./request.js";
4
+ import { g as a } from "./portal.js";
5
+ import { a as r } from "./requests.js";
6
+ async function p(e) {
7
+ const s = `${e.restUrl}/portals/${e.id}/approvedApps`;
8
+ return await r(s, { query: { returnAllApps: !1 } });
6
9
  }
7
- async function o(s) {
8
- const t = `${s.restUrl}/portals/self/subscriptionInfo`, { result: e } = await r(t);
9
- return e?.orgCapabilities || [];
10
+ async function m(e) {
11
+ const s = `${e.restUrl}/portals/self/subscriptionInfo`, { result: t } = await r(s);
12
+ return t?.orgCapabilities || [];
10
13
  }
11
- async function l(s) {
12
- const t = `${s.restUrl}/portals/self/settings`, { result: e } = await r(t);
13
- return e;
14
+ async function y(e) {
15
+ const s = `${e.restUrl}/portals/self/settings`, { result: t } = await r(s);
16
+ return t;
14
17
  }
15
- async function u(s) {
16
- const t = `${s.restUrl}/portals/self/servers`;
17
- return (await r(t))?.result?.servers || [];
18
+ async function d(e) {
19
+ const s = `${e.restUrl}/portals/self/servers`;
20
+ return (await r(s))?.result?.servers || [];
18
21
  }
19
- async function n(s) {
20
- const t = `${s.restUrl}/portals/self/signinSettings`;
21
- return (await r(t)).result || {};
22
+ async function u(e) {
23
+ const s = `${e.restUrl}/portals/self/signinSettings`;
24
+ return (await r(s)).result || {};
22
25
  }
23
- async function c(s) {
24
- return s?.user ? (await n(s))?.blockedApps || [] : [];
26
+ async function w(e) {
27
+ return e?.user ? (await u(e))?.blockedApps || [] : [];
28
+ }
29
+ async function S(e) {
30
+ return (await n({
31
+ requester: async () => await o(`${a(e)}portals/self/userDefaultSettings`, { query: { f: "json" } }),
32
+ key: "memberDefaults",
33
+ id: e.id
34
+ })).data;
35
+ }
36
+ async function $(e) {
37
+ try {
38
+ return { result: await n({
39
+ requester: async () => await i({
40
+ url: `${a(e)}portals/self/resources/home.page.json`,
41
+ portal: e
42
+ }),
43
+ key: "homePageConfig",
44
+ id: e.id
45
+ }) };
46
+ } catch {
47
+ return { result: void 0 };
48
+ }
25
49
  }
26
50
  export {
27
- i as a,
28
- o as b,
29
- n as c,
30
- u as d,
31
- l as e,
32
- c as g
51
+ S as a,
52
+ w as b,
53
+ p as c,
54
+ m as d,
55
+ u as e,
56
+ d as f,
57
+ $ as g,
58
+ y as h
33
59
  };
@@ -0,0 +1,159 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { a as p } from "./functionalities.js";
3
+ import { g as y } from "./groups2.js";
4
+ import { g as l } from "./url.js";
5
+ import { g as O, a as g } from "./portal2.js";
6
+ import { b as R, h as m, c as d } from "./portal.js";
7
+ const f = '-typekeywords:("MapAreaPackage") -type:("Map Area" OR "Indoors Map Configuration" OR "Code Attachment")';
8
+ async function b(e) {
9
+ const t = R(e);
10
+ let r = [];
11
+ const s = [
12
+ // Org Settings > Gallery
13
+ e.featuredItemsGroupQuery,
14
+ // Org Settings > Map
15
+ e.basemapGalleryGroupQuery,
16
+ e.basemapGalleryGroupQuery3D,
17
+ e.templatesGroupQuery,
18
+ t["2DStylesGroupQuery"],
19
+ t.stylesGroupQuery,
20
+ t.analysisLayersGroupQuery,
21
+ // Org Settings > Groups > Configuriable Apps
22
+ e.galleryTemplatesGroupQuery
23
+ ].filter((a) => !!a), u = e.homePageFeaturedContent;
24
+ if (m(e)) {
25
+ const a = await O(e), o = [];
26
+ a?.result?.content?.forEach((i) => {
27
+ d(i) && o.push(i);
28
+ }), o.length > 0 && o.forEach(({ groupId: i }) => {
29
+ const c = `id:${i}`;
30
+ r = n(c, r);
31
+ });
32
+ } else u && s.push(u);
33
+ s.forEach((a) => {
34
+ r = n(a, r);
35
+ }), e.featuredGroups?.forEach((a) => {
36
+ if ("id" in a && a.id) {
37
+ const o = `id:${a.id}`;
38
+ r = n(o, r);
39
+ } else {
40
+ const i = `(${Object.entries(a).map((c) => `${c[0]}:"${c[1]}"`).join(" ")})`;
41
+ r = n(i, r, !0);
42
+ }
43
+ });
44
+ try {
45
+ (await g(e))?.groups?.forEach((o) => {
46
+ const i = `id:${o}`;
47
+ r = n(i, r);
48
+ });
49
+ } catch (a) {
50
+ console.warn("Error fetching member defaults:", a);
51
+ }
52
+ return r.length > 0 ? `(${r.join(" OR ")})` : "";
53
+ }
54
+ function n(e, t, r) {
55
+ return !e?.startsWith("id:") && !r || t.includes(e) ? [...t] : [...t, e];
56
+ }
57
+ function M(e, t) {
58
+ const s = `${l({ portal: e })}/home/group.html?id=${encodeURIComponent(t.id)}`;
59
+ return {
60
+ group: s,
61
+ content: `${s}&view=list#content`,
62
+ members: `${s}#members`,
63
+ settings: `${s}#settings`
64
+ };
65
+ }
66
+ function k(e, t, r) {
67
+ if (!e || !t)
68
+ return "";
69
+ switch (e) {
70
+ case "owner":
71
+ return `owner:${t}`;
72
+ case "inOrg":
73
+ return `-owner:${t} orgid:${r.orgId || ""}`;
74
+ case "outsideOrg":
75
+ return r.isPublicUser ? `-owner:${t}` : `(orgid: [0 TO \\{]) -orgid:${r.orgId || ""}`;
76
+ case null:
77
+ return "";
78
+ default:
79
+ return p(e);
80
+ }
81
+ }
82
+ function $(e, t) {
83
+ if (t)
84
+ return "membershipaccess:org";
85
+ switch (e) {
86
+ case "org":
87
+ return "membershipaccess:org";
88
+ case "collaboration":
89
+ return "membershipaccess:collaboration";
90
+ case "anyOrg":
91
+ return "membershipaccess:NULL";
92
+ case null:
93
+ return "";
94
+ default:
95
+ return p(e);
96
+ }
97
+ }
98
+ function C(e, t) {
99
+ switch (e) {
100
+ case "myOrg":
101
+ return "memberorgids:NULL";
102
+ case "anotherOrg":
103
+ return t ? `(memberorgids:${t} OR orgid:${t})` : "-memberorgids:NULL";
104
+ case null:
105
+ return "";
106
+ default:
107
+ return p(e);
108
+ }
109
+ }
110
+ async function D(e, t) {
111
+ switch (e) {
112
+ case "openData":
113
+ return "isopendata:true";
114
+ case "sharedUpdate":
115
+ return "capabilities:updateitemcontrol";
116
+ case "distributed":
117
+ return "capabilities:distributed";
118
+ case "admin":
119
+ return "isleavingdisallowed:true";
120
+ case "settings":
121
+ return await b(t);
122
+ case null:
123
+ return "";
124
+ default:
125
+ return p(e);
126
+ }
127
+ }
128
+ function L(e) {
129
+ return e ? `access: ${e}` : "";
130
+ }
131
+ function v(e) {
132
+ switch (y(e).displaySettings?.itemTypes?.split(",")[0]?.toLowerCase()) {
133
+ case "application":
134
+ return 'type:("Curated Collection" OR "GeoBIM Application" OR "Data Pipeline" OR "GeoBIM Project" OR "Code Sample" OR "Web Mapping Application" OR "Mobile Application" OR "Application" OR "Desktop Application Template" OR "Desktop Application" OR "Operation View" OR "Dashboard" OR "Operations Dashboard Extension" OR "Workforce Project" OR "Insights Workbook" OR "Insights Page" OR "Insights Model" OR "Hub Page" OR "Hub Initiative" OR "Hub Site Application" OR "StoryMap" OR "Web Experience" OR "Web Experience Template" OR "Form" OR "Map Showcase") -typekeywords: "Story Map"';
135
+ case "web map":
136
+ return 'type:("Web Map" OR "CityEngine Web Scene")';
137
+ case "web scene":
138
+ return 'type:"Web Scene"';
139
+ case "locator package":
140
+ return 'type:("Geocoding Service" OR "Locator Package")';
141
+ case "csv":
142
+ return 'type:("CSV" OR "Microsoft Excel" OR "PDF" OR "Image" OR "Document Link" OR "Report Template" OR "Style")';
143
+ case "layer":
144
+ return '(type:"Parquet Feature Layer" OR type:"Scene Service" OR type:"Feature Collection" OR type:"Route Layer" OR type:"Layer" OR type:"Explorer Layer" OR type:"Tile Package" OR type:"Compact Tile Package" OR type:"Vector Tile Package" OR type:"Scene Package" OR type:"Layer Package" OR type:"Feature Service" OR type:"Stream Service" OR type:"Feed" OR type:"Map Service" OR type:"Vector Tile Service" OR type:"Media Layer" OR type:"Image Service" OR type:"WMS" OR type:"WFS" OR type:"WMTS" OR type:"KML" OR type:"Group Layer" OR type:"Knowledge Graph Layer" OR typekeywords:"OGC" OR typekeywords:"Geodata Service" OR type:"Globe Service" OR type:"CSV" OR type:"Shapefile" OR type:"GeoJson" OR type:"Service Definition" OR type:"File Geodatabase" OR type:"CAD Drawing" OR type:"Relational Database Connection" OR type:"GeoPackage" OR "3DTiles Service") -type:("Web Mapping Application" OR "Geodata Service" OR "3DTiles Package")';
145
+ default:
146
+ return f;
147
+ }
148
+ }
149
+ export {
150
+ $ as a,
151
+ C as b,
152
+ D as c,
153
+ L as d,
154
+ v as e,
155
+ M as f,
156
+ k as g,
157
+ f as h,
158
+ b as i
159
+ };