1234567 |
- import{_ as g,$ as m,ef as Pe,a0 as Y,eg as De,eh as x,ei as Ke,ej as we,R as ge,ek as Ye,el as Qe,cp as Ne,N as Ee,dA as T,em as Fe,bP as ce,D as Q,v as W,g as U,bV as Xe,en as V,eo as M,U as q,dx as X,ep as he,Q as ue,dz as Se,eq as Ze,y as de,er as $e,es as et,et as Z,eu as Ie,dB as tt,ev as rt}from"./index.6c049565.js";const P={base:"esri-identity-form",group:"esri-identity-form__group",label:"esri-identity-form__label",footer:"esri-identity-form__footer",esriInput:"esri-input",esriButton:"esri-button",esriButtonSecondary:"esri-button--secondary"},st="ArcGIS Online";let L=class extends De{constructor(n,e){super(n,e),this._usernameInputNode=null,this._passwordInputNode=null,this.signingIn=!1,this.server=null,this.resource=null,this.error=null,this.oAuthPrompt=!1}render(){const{error:n,server:e,resource:t,signingIn:r,oAuthPrompt:i,messages:s}=this,o=x("div",{class:P.group},Ke(i?s.oAuthInfo:s.info,{server:e&&/\.arcgis\.com/i.test(e)?st:e,resource:`(${t||s.lblItem})`})),l=i?null:x("div",{class:P.group,key:"username"},x("label",{class:P.label},s.lblUser,x("input",{value:"",required:!0,autocomplete:"off",spellcheck:!1,type:"text",bind:this,afterCreate:we,"data-node-ref":"_usernameInputNode",class:P.esriInput}))),d=i?null:x("div",{class:P.group,key:"password"},x("label",{class:P.label},s.lblPwd,x("input",{value:"",required:!0,type:"password",bind:this,afterCreate:we,"data-node-ref":"_passwordInputNode",class:P.esriInput}))),a=x("div",{class:this.classes(P.group,P.footer)},x("input",{type:"submit",disabled:!!r,value:r?s.lblSigning:s.lblOk,class:P.esriButton}),x("input",{type:"button",value:s.lblCancel,bind:this,onclick:this._cancel,class:this.classes(P.esriButton,P.esriButtonSecondary)})),p=n?x("div",null,n.details&&n.details.httpStatus?s.invalidUser:s.noAuthService):null;return x("form",{class:P.base,bind:this,onsubmit:this._submit},o,p,l,d,a)}_cancel(){this._set("signingIn",!1),this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(n){n.preventDefault(),this._set("signingIn",!0);const e=this.oAuthPrompt?{}:{username:this._usernameInputNode&&this._usernameInputNode.value,password:this._passwordInputNode&&this._passwordInputNode.value};this.emit("submit",e)}};g([m(),Pe("esri/identity/t9n/identity")],L.prototype,"messages",void 0),g([m()],L.prototype,"signingIn",void 0),g([m()],L.prototype,"server",void 0),g([m()],L.prototype,"resource",void 0),g([m()],L.prototype,"error",void 0),g([m()],L.prototype,"oAuthPrompt",void 0),L=g([Y("esri.identity.IdentityForm")],L);const it=L;/*!
- * tabbable 6.0.1
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
- */var qe=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],ie=qe.join(","),Le=typeof Element=="undefined",z=Le?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ne=!Le&&Element.prototype.getRootNode?function(n){return n.getRootNode()}:function(n){return n.ownerDocument},je=function(e,t,r){var i=Array.prototype.slice.apply(e.querySelectorAll(ie));return t&&z.call(e,ie)&&i.unshift(e),i=i.filter(r),i},Ve=function n(e,t,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(o.tagName==="SLOT"){var l=o.assignedElements(),d=l.length?l:o.children,a=n(d,!0,r);r.flatten?i.push.apply(i,a):i.push({scopeParent:o,candidates:a})}else{var p=z.call(o,ie);p&&r.filter(o)&&(t||!e.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),u=!r.shadowRootFilter||r.shadowRootFilter(o);if(f&&u){var v=n(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scopeParent:o,candidates:v})}else s.unshift.apply(s,o.children)}}return i},Be=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},nt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Me=function(e){return e.tagName==="INPUT"},ot=function(e){return Me(e)&&e.type==="hidden"},at=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},lt=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},ct=function(e){if(!e.name)return!0;var t=e.form||ne(e),r=function(l){return t.querySelectorAll('input[type="radio"][name="'+l+'"]')},i;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=lt(i,e.form);return!s||s===e},ht=function(e){return Me(e)&&e.type==="radio"},ut=function(e){return ht(e)&&!ct(e)},dt=function(e){for(var t,r=ne(e).host,i=!!((t=r)!==null&&t!==void 0&&t.ownerDocument.contains(r)||e.ownerDocument.contains(e));!i&&r;){var s;r=ne(r).host,i=!!((s=r)!==null&&s!==void 0&&s.ownerDocument.contains(r))}return i},ke=function(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;return r===0&&i===0},pt=function(e,t){var r=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=z.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(z.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var d=e.parentElement,a=ne(e);if(d&&!d.shadowRoot&&i(d)===!0)return ke(e);e.assignedSlot?e=e.assignedSlot:!d&&a!==e.ownerDocument?e=a.host:e=d}e=l}if(dt(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ke(e);return!1},ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var i=t.children.item(r);if(i.tagName==="LEGEND")return z.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},oe=function(e,t){return!(t.disabled||ot(t)||pt(t,e)||at(t)||ft(t))},_e=function(e,t){return!(ut(t)||Be(t)<0||!oe(e,t))},vt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},gt=function n(e){var t=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,l=o?i.scopeParent:i,d=Be(l,o),a=o?n(i.candidates):l;d===0?o?t.push.apply(t,a):t.push(l):r.push({documentOrder:s,tabIndex:d,item:i,isScope:o,content:a})}),r.sort(nt).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(t)},_t=function(e,t){t=t||{};var r;return t.getShadowRoot?r=Ve([e],t.includeContainer,{filter:_e.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:vt}):r=je(e,t.includeContainer,_e.bind(null,t)),gt(r)},mt=function(e,t){t=t||{};var r;return t.getShadowRoot?r=Ve([e],t.includeContainer,{filter:oe.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=je(e,t.includeContainer,oe.bind(null,t)),r},$=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return z.call(e,ie)===!1?!1:_e(t,e)},bt=qe.concat("iframe").join(","),pe=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return z.call(e,bt)===!1?!1:oe(t,e)};/*!
- * focus-trap 7.0.0
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
- */function Ae(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Te(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(t),!0).forEach(function(r){yt(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function yt(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Ue=function(){var n=[];return{activateTrap:function(t){if(n.length>0){var r=n[n.length-1];r!==t&&r.pause()}var i=n.indexOf(t);i===-1||n.splice(i,1),n.push(t)},deactivateTrap:function(t){var r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length>0&&n[n.length-1].unpause()}}}(),wt=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},St=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},It=function(e){return e.key==="Tab"||e.keyCode===9},xe=function(e){return setTimeout(e,0)},Oe=function(e,t){var r=-1;return e.every(function(i,s){return t(i)?(r=s,!1):!0}),r},K=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},ee=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},kt=function(e,t){var r=(t==null?void 0:t.document)||document,i=Te({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},o,l=function(c,h,w){return c&&c[h]!==void 0?c[h]:i[w||h]},d=function(c){return s.containerGroups.findIndex(function(h){var w=h.container,O=h.tabbableNodes;return w.contains(c)||O.find(function(A){return A===c})})},a=function(c){var h=i[c];if(typeof h=="function"){for(var w=arguments.length,O=new Array(w>1?w-1:0),A=1;A<w;A++)O[A-1]=arguments[A];h=h.apply(void 0,O)}if(h===!0&&(h=void 0),!h){if(h===void 0||h===!1)return h;throw new Error("`".concat(c,"` was specified but was not a node, or did not return a node"))}var C=h;if(typeof h=="string"&&(C=r.querySelector(h),!C))throw new Error("`".concat(c,"` as selector refers to no known node"));return C},p=function(){var c=a("initialFocus");if(c===!1)return!1;if(c===void 0)if(d(r.activeElement)>=0)c=r.activeElement;else{var h=s.tabbableGroups[0],w=h&&h.firstTabbableNode;c=w||a("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},f=function(){if(s.containerGroups=s.containers.map(function(c){var h=_t(c,i.tabbableOptions),w=mt(c,i.tabbableOptions);return{container:c,tabbableNodes:h,focusableNodes:w,firstTabbableNode:h.length>0?h[0]:null,lastTabbableNode:h.length>0?h[h.length-1]:null,nextTabbableNode:function(A){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=w.findIndex(function(j){return j===A});if(!(F<0))return C?w.slice(F+1).find(function(j){return $(j,i.tabbableOptions)}):w.slice(0,F).reverse().find(function(j){return $(j,i.tabbableOptions)})}}}),s.tabbableGroups=s.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!a("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function _(c){if(c!==!1&&c!==r.activeElement){if(!c||!c.focus){_(p());return}c.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=c,wt(c)&&c.select()}},v=function(c){var h=a("setReturnFocus",c);return h||(h===!1?!1:c)},b=function(c){var h=ee(c);if(!(d(h)>=0)){if(K(i.clickOutsideDeactivates,c)){o.deactivate({returnFocus:i.returnFocusOnDeactivate&&!pe(h,i.tabbableOptions)});return}K(i.allowOutsideClick,c)||c.preventDefault()}},y=function(c){var h=ee(c),w=d(h)>=0;w||h instanceof Document?w&&(s.mostRecentlyFocusedNode=h):(c.stopImmediatePropagation(),u(s.mostRecentlyFocusedNode||p()))},S=function(c){var h=ee(c);f();var w=null;if(s.tabbableGroups.length>0){var O=d(h),A=O>=0?s.containerGroups[O]:void 0;if(O<0)c.shiftKey?w=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:w=s.tabbableGroups[0].firstTabbableNode;else if(c.shiftKey){var C=Oe(s.tabbableGroups,function(ae){var le=ae.firstTabbableNode;return h===le});if(C<0&&(A.container===h||pe(h,i.tabbableOptions)&&!$(h,i.tabbableOptions)&&!A.nextTabbableNode(h,!1))&&(C=O),C>=0){var F=C===0?s.tabbableGroups.length-1:C-1,j=s.tabbableGroups[F];w=j.lastTabbableNode}}else{var J=Oe(s.tabbableGroups,function(ae){var le=ae.lastTabbableNode;return h===le});if(J<0&&(A.container===h||pe(h,i.tabbableOptions)&&!$(h,i.tabbableOptions)&&!A.nextTabbableNode(h))&&(J=O),J>=0){var Je=J===s.tabbableGroups.length-1?0:J+1,We=s.tabbableGroups[Je];w=We.firstTabbableNode}}}else w=a("fallbackFocus");w&&(c.preventDefault(),u(w))},I=function(c){if(St(c)&&K(i.escapeDeactivates,c)!==!1){c.preventDefault(),o.deactivate();return}if(It(c)){S(c);return}},E=function(c){var h=ee(c);d(h)>=0||K(i.clickOutsideDeactivates,c)||K(i.allowOutsideClick,c)||(c.preventDefault(),c.stopImmediatePropagation())},H=function(){if(!!s.active)return Ue.activateTrap(o),s.delayInitialFocusTimer=i.delayInitialFocus?xe(function(){u(p())}):u(p()),r.addEventListener("focusin",y,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",E,{capture:!0,passive:!1}),r.addEventListener("keydown",I,{capture:!0,passive:!1}),o},G=function(){if(!!s.active)return r.removeEventListener("focusin",y,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",E,!0),r.removeEventListener("keydown",I,!0),o};return o={get active(){return s.active},get paused(){return s.paused},activate:function(c){if(s.active)return this;var h=l(c,"onActivate"),w=l(c,"onPostActivate"),O=l(c,"checkCanFocusTrap");O||f(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,h&&h();var A=function(){O&&f(),H(),w&&w()};return O?(O(s.containers.concat()).then(A,A),this):(A(),this)},deactivate:function(c){if(!s.active)return this;var h=Te({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},c);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,G(),s.active=!1,s.paused=!1,Ue.deactivateTrap(o);var w=l(h,"onDeactivate"),O=l(h,"onPostDeactivate"),A=l(h,"checkCanReturnFocus"),C=l(h,"returnFocus","returnFocusOnDeactivate");w&&w();var F=function(){xe(function(){C&&u(v(s.nodeFocusedBeforeActivation)),O&&O()})};return C&&A?(A(v(s.nodeFocusedBeforeActivation)).then(F,F),this):(F(),this)},pause:function(){return s.paused||!s.active?this:(s.paused=!0,G(),this)},unpause:function(){return!s.paused||!s.active?this:(s.paused=!1,f(),H(),this)},updateContainerElements:function(c){var h=[].concat(c).filter(Boolean);return s.containers=h.map(function(w){return typeof w=="string"?r.querySelector(w):w}),s.active&&f(),this}},o.updateContainerElements(e),o};const N={base:"esri-identity-modal",open:"esri-identity-modal--open",closed:"esri-identity-modal--closed",title:"esri-identity-modal__title",dialog:"esri-identity-modal__dialog",content:"esri-identity-modal__content",closeButton:"esri-identity-modal__close-button",iconClose:"esri-icon-close"};let B=class extends De{constructor(n,e){super(n,e),this.container=document.createElement("div"),this.content=null,this.open=!1,this._focusTrap=null,this._close=()=>{this.open=!1},document.body.appendChild(this.container),this.addHandles(ge(()=>this.open,()=>this._toggleFocusTrap()))}destroy(){this._destroyFocusTrap()}get title(){var n;return(n=this.messages)==null?void 0:n.auth.signIn}render(){const n=this.id,{open:e,content:t,title:r,messages:i}=this,s=e&&!!t,o={[N.open]:s,[N.closed]:!s},l=x("button",{class:N.closeButton,"aria-label":i.close,title:i.close,bind:this,onclick:this._close,type:"button"},x("span",{"aria-hidden":"true",class:N.iconClose})),d=`${n}_title`,a=`${n}_content`,p=r?x("h1",{id:d,class:N.title},r):null,f=s?x("div",{bind:this,class:N.dialog,role:"dialog","aria-labelledby":d,"aria-describedby":a,afterCreate:this._createFocusTrap},l,p,this._renderContent(a)):null;return x("div",{tabIndex:-1,class:this.classes(N.base,o)},f)}_destroyFocusTrap(){var n;(n=this._focusTrap)==null||n.deactivate({onDeactivate:()=>{}}),this._focusTrap=null}_toggleFocusTrap(){const{_focusTrap:n,open:e}=this;n&&(e?n.activate():n.deactivate())}_createFocusTrap(n){this._destroyFocusTrap();const e=requestAnimationFrame(()=>{this._focusTrap=kt(n,{initialFocus:"input",onDeactivate:this._close}),this._toggleFocusTrap()});this.addHandles(Ye(()=>cancelAnimationFrame(e)))}_renderContent(n){const e=this.content;return typeof e=="string"?x("div",{class:N.content,id:n,innerHTML:e}):Qe(e)?x("div",{class:N.content,id:n},e.render()):e instanceof HTMLElement?x("div",{class:N.content,id:n,bind:e,afterCreate:this._attachToNode}):null}_attachToNode(n){const e=this;n.appendChild(e)}};g([m({readOnly:!0})],B.prototype,"container",void 0),g([m()],B.prototype,"content",void 0),g([m()],B.prototype,"open",void 0),g([m(),Pe("esri/t9n/common")],B.prototype,"messages",void 0),g([m()],B.prototype,"title",null),B=g([Y("esri.identity.IdentityModal")],B);const Re=B,fe="esriJSAPIOAuth";class me{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token)){if(this.expires==null&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t&&t.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(fe,JSON.stringify(e))}catch(i){return console.warn(i),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t&&t.appId&&t.portalUrl&&(this.expires==null||this.expires>Date.now())&&(this.refreshToken||this.token)){const r=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",i=new FormData;if(i.append("f","json"),i.append("auth_token",this.refreshToken||this.token),i.append("client_id",t.appId),i.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),typeof navigator.sendBeacon=="function")navigator.sendBeacon(r,i);else{const s=new XMLHttpRequest;s.open("POST",r),s.send(i)}}if(t&&t.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(fe,JSON.stringify(e))}catch(i){console.log(i)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t&&t.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(fe);if(t)try{e=JSON.parse(t)}catch(r){console.warn(r)}}return e}}me.prototype.declaredClass="esri.identity.OAuthCredential";var be;let R=be=class extends Ne{constructor(n){super(n),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return be.fromJSON(this.toJSON())}};g([m({json:{write:!0}})],R.prototype,"appId",void 0),g([m({json:{write:!0}})],R.prototype,"authNamespace",void 0),g([m({json:{write:!0}})],R.prototype,"expiration",void 0),g([m({json:{write:!0}})],R.prototype,"flowType",void 0),g([m({json:{write:!0}})],R.prototype,"forceLogin",void 0),g([m({json:{write:!0}})],R.prototype,"forceUserId",void 0),g([m({json:{write:!0}})],R.prototype,"locale",void 0),g([m({json:{write:!0}})],R.prototype,"minTimeUntilExpiration",void 0),g([m({json:{write:!0}})],R.prototype,"popup",void 0),g([m({json:{write:!0}})],R.prototype,"popupCallbackUrl",void 0),g([m({json:{write:!0}})],R.prototype,"popupWindowFeatures",void 0),g([m({json:{write:!0}})],R.prototype,"portalUrl",void 0),g([m({json:{write:!0}})],R.prototype,"preserveUrlHash",void 0),g([m({json:{write:!0}})],R.prototype,"userId",void 0),R=be=g([Y("esri.identity.OAuthInfo")],R);const Ce=R;let D=class extends Ne{constructor(n){super(n),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};g([m({json:{write:!0}})],D.prototype,"adminTokenServiceUrl",void 0),g([m({json:{write:!0}})],D.prototype,"currentVersion",void 0),g([m({json:{write:!0}})],D.prototype,"hasPortal",void 0),g([m({json:{write:!0}})],D.prototype,"hasServer",void 0),g([m({json:{write:!0}})],D.prototype,"owningSystemUrl",void 0),g([m({json:{write:!0}})],D.prototype,"owningTenant",void 0),g([m({json:{write:!0}})],D.prototype,"server",void 0),g([m({json:{write:!0}})],D.prototype,"shortLivedTokenValidity",void 0),g([m({json:{write:!0}})],D.prototype,"tokenServiceUrl",void 0),g([m({json:{write:!0}})],D.prototype,"webTierAuth",void 0),D=g([Y("esri.identity.ServerInfo")],D);const ve=D,te={},ze=n=>{const e=new M(n.owningSystemUrl).host,t=new M(n.server).host,r=/.+\.arcgis\.com$/i;return r.test(e)&&r.test(t)},ye=(n,e)=>!!(ze(n)&&e&&e.some(t=>t.test(n.server)));let re=null,se=null;try{re=window.localStorage,se=window.sessionStorage}catch{}class He extends Ee{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.formConstructor=it,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin=window.origin!=="null"?window.origin:window.location.origin,this._appUrlObj=ce(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^\/]+\/[^\/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer)).*/gi,this._gwUser=/http.+\/users\/([^\/]+)\/?.*/i,this._gwItem=/http.+\/items\/([^\/]+)\/?.*/i,this._gwGroup=/http.+\/groups\/([^\/]+)\/?.*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(r=>!this.findServerInfo(r.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(r=>{r.owningSystemUrl&&this._portals.push(r.owningSystemUrl),r.hasPortal&&this._portals.push(r.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const i=this.findOAuthInfo(r.portalUrl);i&&t.splice(t.indexOf(i),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let i,s=this.findServerInfo(t),o=!0;s||(s=new ve,s.server=this._getServerInstanceRoot(t),r?s.hasServer=!0:(s.tokenServiceUrl=this._getTokenSvcUrl(t),s.hasPortal=!0),this.registerServers([s])),i=this._findCredential(t),i?(delete e.server,Object.assign(i,e),o=!1):(i=new k({userId:e.userId,server:s.server,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),i.resources=[t],this.credentials.push(i)),i.emitTokenChange(!1),o||i.refreshServerTokens()}toJSON(){return Fe({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;typeof e=="string"&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,i=e.credentials;if(t){const s=[];t.forEach(o=>{o.server&&o.tokenServiceUrl&&s.push(o.declaredClass?o:new ve(o))}),s.length&&this.registerServers(s)}if(r){const s=[];r.forEach(o=>{o.appId&&s.push(o.declaredClass?o:new Ce(o))}),s.length&&this.registerOAuthInfos(s)}i&&i.forEach(s=>{s.server&&s.token&&s.expires&&s.expires>Date.now()&&((s=s.declaredClass?s:new k(s)).emitTokenChange(),this.credentials.push(s))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const i=this._isServerRsrc(e)?"server":"portal";if(t){for(const s of this.credentials)if(this._hasSameServerInstance(s.server,e)&&t===s.userId&&s.scope===i){r=s;break}}else for(const s of this.credentials)if(this._hasSameServerInstance(s.server,e)&&this._getIdenticalSvcIdx(e,s)!==-1&&s.scope===i){r=s;break}return r}getCredential(e,t){let r,i,s=!0;t&&(r=!!t.token,i=t.error,s=t.prompt!==!1),t={...t},e=this._sanitizeUrl(e);const o=new AbortController,l=Q();if(t.signal&&W(t.signal,()=>{o.abort()}),W(o,()=>{l.reject(new U("identity-manager:user-aborted","ABORTED"))}),Xe(o))return l.promise;t.signal=o.signal;const d=this._isAdminResource(e),a=r?this.findCredential(e):null;let p;if(a&&i&&i.details&&i.details.httpStatus===498)a.destroy();else if(a)return p=new U("identity-manager:not-authorized","You are currently signed in as: '"+a.userId+"'. You do not have access to this resource: "+e,{error:i}),l.reject(p),l.promise;const f=this._findCredential(e,t);if(f)return l.resolve(f),l.promise;let u=this.findServerInfo(e);if(u)!u.hasServer&&this._isServerRsrc(e)&&(u._restInfoPms=this._getTokenSvcUrl(e),u.hasServer=!0);else{const v=this._getTokenSvcUrl(e);if(!v)return p=new U("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),l.reject(p),l.promise;u=new ve,u.server=this._getServerInstanceRoot(e),typeof v=="string"?(u.tokenServiceUrl=v,u.hasPortal=!0):(u._restInfoPms=v,u.hasServer=!0),this.registerServers([u])}return u.hasPortal&&u._selfReq===void 0&&(s||V(u.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(v=>v.tokenServiceUrl===u.tokenServiceUrl))&&(u._selfReq={owningTenant:t&&t.owningTenant,selfDfd:this._getPortalSelf(u.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,u,t,l,d)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const i=this._rePortalTokenSvc.test(e.tokenServiceUrl),s=new M(this._appOrigin),o=e.shortLivedTokenValidity;let l,d,a,p,f,u,v,b;t&&(b=this.tokenValidity||o||this._defaultTokenValidity,b>o&&o>0&&(b=o)),r&&(l=r.isAdmin,d=r.serverUrl,a=r.token,u=r.signal,v=r.ssl,e.customParameters=r.customParameters),l?p=e.adminTokenServiceUrl:(p=e.tokenServiceUrl,f=new M(p.toLowerCase()),e.webTierAuth&&(r==null?void 0:r.serverUrl)&&!v&&s.scheme==="http"&&(V(s.uri,p,!0)||f.scheme==="https"&&s.host===f.host&&s.port==="7080"&&f.port==="7443")&&(p=p.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const y={query:{request:"getToken",username:t==null?void 0:t.username,password:t==null?void 0:t.password,serverUrl:d,token:a,expiration:b,referer:l||i?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:u,...r==null?void 0:r.ioArgs};return i||(y.withCredentials=!1),q(p,y).then(S=>{const I=S.data;if(!I||!I.token)return new U("identity-manager:authentication-failed","Unable to generate token");const E=e.server;return te[E]||(te[E]={}),t&&(te[E][t.username]=t.password),I.validity=b,I})}isBusy(){return!!this._busy}checkSignInStatus(e){return this.checkAppAccess(e,"").then(t=>t.credential)}checkAppAccess(e,t,r){let i=!1;return this.getCredential(e,{prompt:!1}).then(s=>{let o;const l={f:"json"};if(s.scope==="portal")if(t&&(this._doPortalSignIn(e)||r&&r.force))o=s.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!s.token)return{credential:s};o=s.server+"/sharing/rest"}else{if(!s.token)return{credential:s};o=s.server+"/rest/services"}return s.token&&(l.token=s.token),q(o,{query:l,authMode:"anonymous"}).then(d=>{if(d.data.valid===!1)throw new U("identity-manager:not-authorized",`You are currently signed in as: '${s.userId}'.`,d.data);return i=!!d.data.viewOnlyUserTypeApp,{credential:s}}).catch(d=>{if(d.name==="identity-manager:not-authorized")throw d;const a=d.details&&d.details.httpStatus;if(a===498)throw s.destroy(),new U("identity-manager:not-authenticated","User is not signed in.");if(a===400)throw new U("identity-manager:invalid-request");return{credential:s}})}).then(s=>({credential:s.credential,viewOnly:i}))}setOAuthResponseHash(e){e&&(e.charAt(0)==="#"&&(e=e.substring(1)),this._processOAuthPopupParams(X(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const i=Q(),s=()=>{var f;d==null||d.remove(),a==null||a.remove(),p==null||p.remove(),l==null||l.destroy(),(f=this.dialog)==null||f.destroy(),this.dialog=l=d=a=p=null},o=()=>{s(),this._oAuthDfd=null,i.reject(new U("identity-manager:user-aborted","ABORTED"))};r.signal&&W(r.signal,()=>{o()});let l=new this.formConstructor;l.resource=this.getResourceName(e),l.server=t.server,this.dialog=new Re,this.dialog.content=l,this.dialog.open=!0,this.emit("dialog-create");let d=l.on("cancel",o),a=ge(()=>this.dialog.open,o),p=l.on("submit",f=>{this.generateToken(t,f,{isAdmin:r.isAdmin,signal:r.signal}).then(u=>{s();const v=new k({userId:f.username,server:t.server,token:u.token,expires:u.expires!=null?Number(u.expires):null,ssl:!!u.ssl,isAdmin:r.isAdmin,validity:u.validity});i.resolve(v)}).catch(u=>{l.error=u,l.signingIn=!1})});return i.promise}oAuthSignIn(e,t,r,i){this._oAuthDfd=Q();const s=this._oAuthDfd;let o;i!=null&&i.signal&&W(i.signal,()=>{const b=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;b&&!b.closed?b.close():this.dialog&&u()}),s.resUrl_=e,s.sinfo_=t,s.oinfo_=r;const l=r._oAuthCred;if(l.storage&&(r.flowType==="authorization-code"||r.flowType==="auto"&&!r.popup&&t.currentVersion>=8.4)){let b=crypto.getRandomValues(new Uint8Array(32));o=he(b),l.codeVerifier=o,b=crypto.getRandomValues(new Uint8Array(32)),l.stateUID=he(b),l.save()||(l.codeVerifier=o=null)}else l.codeVerifier=null;let d,a,p,f;this._getCodeChallenge(o).then(b=>{const y=!i||i.oAuthPopupConfirmation!==!1;r.popup&&y?(d=new this.formConstructor,d.oAuthPrompt=!0,d.server=t.server,this.dialog=new Re,this.dialog.content=d,this.dialog.open=!0,this.emit("dialog-create"),a=d.on("cancel",u),p=ge(()=>this.dialog.open,u),f=d.on("submit",()=>{v(),this._doOAuthSignIn(e,t,r,b)})):this._doOAuthSignIn(e,t,r,b)});const u=()=>{v(),this._oAuthDfd=null,s.reject(new U("identity-manager:user-aborted","ABORTED"))},v=()=>{var b;a==null||a.remove(),p==null||p.remove(),f==null||f.remove(),d==null||d.destroy(),(b=this.dialog)==null||b.destroy(),this.dialog=null};return s.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=ue(window,"message",t=>{var r;if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&((r=t.data)==null?void 0:r.type)==="arcgis:auth:requestCredential"){const i=t.source;this.getCredential(e).then(s=>{i.postMessage({type:"arcgis:auth:credential",credential:{expires:s.expires,server:s.server,ssl:s.ssl,token:s.token,userId:s.userId}},t.origin)}).catch(s=>{i.postMessage({type:"arcgis:auth:error",error:{name:s.name,message:s.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){var r,i;let e=window.location.hash;if(e){e.charAt(0)==="#"&&(e=e.substring(1));const s=X(e);let o=!1;if(s.access_token&&s.expires_in&&s.state&&s.hasOwnProperty("username"))try{s.state=JSON.parse(s.state),s.state.portalUrl&&(this._oAuthLocationParams=s,o=!0)}catch{}else if(s.error&&s.error_description&&(console.log("IdentityManager OAuth Error: ",s.error," - ",s.error_description),s.error==="access_denied"&&(o=!0,s.state)))try{s.state=JSON.parse(s.state)}catch{}o&&(window.location.hash=((r=s.state)==null?void 0:r.hash)||"")}let t=window.location.search;if(t){t.charAt(0)==="?"&&(t=t.substring(1));const s=X(t);let o=!1;if(s.code&&s.state)try{s.state=JSON.parse(s.state),s.state.portalUrl&&s.state.uid&&(this._oAuthLocationParams=s,o=!0)}catch{}else if(s.error&&s.error_description&&(console.log("IdentityManager OAuth Error: ",s.error," - ",s.error_description),s.error==="access_denied"&&(o=!0,s.state)))try{s.state=JSON.parse(s.state)}catch{}if(o){const l={...s};["code","error","error_description","message_code","persist","state"].forEach(p=>{delete l[p]});const d=Se(l),a=window.location.pathname+(d?`?${d}`:"")+(((i=s.state)==null?void 0:i.hash)||"");window.history.replaceState(window.history.state,"",a)}}}_getOAuthToken(e,t,r,i,s){return e=e.replace(/^http:/i,"https:"),q(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:i&&s?{grant_type:"authorization_code",code:t,redirect_uri:i,client_id:r,code_verifier:s}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(o=>o.data)}_getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=new TextEncoder().encode(e);return crypto.subtle.digest("SHA-256",t).then(r=>he(new Uint8Array(r)))}return Promise.resolve(null)}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const t=new U("identity-manager:user-aborted","ABORTED");this._errbackFunc(t)}}_findCredential(e,t){let r,i,s,o,l=-1;const d=t&&t.token,a=t&&t.resource,p=this._isServerRsrc(e)?"server":"portal",f=this.credentials.filter(u=>this._hasSameServerInstance(u.server,e)&&u.scope===p);if(e=a||e,f.length)if(f.length===1){if(r=f[0],s=this.findServerInfo(r.server),i=s&&s.owningSystemUrl,o=i?this.findCredential(i,r.userId):void 0,l=this._getIdenticalSvcIdx(e,r),!d)return l===-1&&r.resources.push(e),this._addResource(e,o),r;l!==-1&&(r.resources.splice(l,1),this._removeResource(e,o))}else{let u,v;if(f.some(b=>(v=this._getIdenticalSvcIdx(e,b),v!==-1&&(u=b,s=this.findServerInfo(u.server),i=s&&s.owningSystemUrl,o=i?this.findCredential(i,u.userId):void 0,l=v,!0))),d)u&&(u.resources.splice(l,1),this._removeResource(e,o));else if(u)return this._addResource(e,o),u}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t){for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}}return t}_addResource(e,t){t&&this._getIdenticalSvcIdx(e,t)===-1&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t&&t.isAdmin&&!V(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&String(e.currentVersion)==="10.1"&&!V(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new M(e);return t.scheme+"://"+t.host+(t.port!=null?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return r===-1&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),r!==-1||Ze(t)||(r=t.indexOf("/sharing")),r===-1&&t.substr(-1)==="/"&&(r=t.length-1),r>-1?e.substring(0,r):e}_hasSameServerInstance(e,t){return e.substr(-1)==="/"&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=this._normalizeAGOLorgDomain(e),t=this._normalizeAGOLorgDomain(t),(e=e.substr(e.indexOf(":")))===(t=t.substr(t.indexOf(":")))}_normalizeAGOLorgDomain(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,i=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):i.test(e)&&(e=e.replace(i,"https://qaext.arcgis.com")),e}_sanitizeUrl(e){const t=(de.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return r!==-1&&(e=e.substring(r+t.length+1)),e=$e(e),ce(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const i=this._getSuffix(e).toLowerCase(),s=this._getSuffix(t).toLowerCase();if(r=i===s,!r){const o=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=i.replace(o,"$1")===s.replace(o,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new M(e.toLowerCase()),r=this._portalConfig;let i=this._gwDomains.some(s=>s.regex.test(t.uri));return!i&&r&&(i=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),i||de.portalUrl&&(i=V(t,de.portalUrl,!0)),i||(i=this._portals.some(s=>this._hasSameServerInstance(s,t.uri))),i=i||this._agsPortal.test(t.path),i}_isIdProvider(e,t){let r=-1,i=-1;this._gwDomains.forEach((o,l)=>{r===-1&&o.regex.test(e)&&(r=l),i===-1&&o.regex.test(t)&&(i=l)});let s=!1;if(r>-1&&i>-1&&(r===0||r===4?i!==0&&i!==4||(s=!0):r===1?i!==1&&i!==2||(s=!0):r===2?i===2&&(s=!0):r===3&&i===3&&(s=!0)),!s){const o=this.findServerInfo(t),l=o&&o.owningSystemUrl;l&&ze(o)&&this._isPortalDomain(l)&&this._isIdProvider(e,l)&&(s=!0)}return s}_getIdenticalSvcIdx(e,t){let r=-1;for(let i=0;i<t.resources.length;i++){const s=t.resources[i];if(this._isIdenticalService(e,s)){r=i;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,i;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=q(e=s+"/rest/info",{query:{f:"json"}}).then(o=>o.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let s="";if(this._gwDomains.some(o=>(o.regex.test(e)&&(s=o.tokenServiceUrl),!!s)),s||this._portals.some(o=>(this._hasSameServerInstance(o,e)&&(s=o+this._gwTokenUrl),!!s)),s||(i=e.toLowerCase().indexOf("/sharing"),i!==-1&&(s=e.substring(0,i)+this._gwTokenUrl)),s||(s=this._getOrigin(e)+this._gwTokenUrl),s){const o=new M(e).port;/^http:\/\//i.test(e)&&o==="7080"&&(s=s.replace(/:7080/i,":7443")),s=s.replace(/http:/i,"https:")}return s}if(e.toLowerCase().includes("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"}_processOAuthResponseParams(e,t,r){const i=t._oAuthCred;if(e.code){const o=i.codeVerifier;return i.codeVerifier=null,i.stateUID=null,i.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),o).then(l=>{const d=new k({userId:l.username,server:r.server,token:l.access_token,expires:Date.now()+1e3*l.expires_in,ssl:l.ssl,oAuthState:e.state,_oAuthCred:i});return t.userId=d.userId,i.storage=l.persist?re:se,i.refreshToken=l.refresh_token,i.token=null,i.expires=l.refresh_token_expires_in?Date.now()+1e3*l.refresh_token_expires_in:null,i.userId=d.userId,i.ssl=d.ssl,i.save(),d})}const s=new k({userId:e.username,server:r.server,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:e.ssl==="true",oAuthState:e.state,_oAuthCred:i});return t.userId=s.userId,i.storage=e.persist?re:se,i.refreshToken=null,i.token=s.token,i.expires=s.expires,i.userId=s.userId,i.ssl=s.ssl,i.save(),Promise.resolve(s)}_processOAuthPopupParams(e){var r;const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),(r=this._oAuthOnPopupHandle)==null||r.remove(),e.error){const i=e.error==="access_denied",s=new U(i?"identity-manager:user-aborted":"identity-manager:authentication-failed",i?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(i=>{t.resolve(i)}).catch(i=>{t.reject(i)})}_setOAuthResponseQueryString(e){e&&(e.charAt(0)==="?"&&(e=e.substring(1)),this._processOAuthPopupParams(X(e)))}_exchangeToken(e,t,r){return q(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}}).then(i=>i.data.token)}_getPlatformSelf(e,t){return e=e.replace(/^http:/i,"https:"),q(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0}).then(r=>r.data)}_getPortalSelf(e,t){let r;return this._gwDomains.some(i=>(i.regex.test(e)&&(r=i.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),q(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(i=>i.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,i=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(i?i.hasPortal||i.owningSystemUrl&&this._isPortalDomain(i.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||V(r,e,!0)))}_checkProtocol(e,t,r,i){let s=!0;const o=i?t.adminTokenServiceUrl:t.tokenServiceUrl;return o.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&et(o)&&(s=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!s)&&r(new U("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),s}_enqueue(e,t,r,i,s,o){return i||(i=Q()),i.resUrl_=e,i.sinfo_=t,i.options_=r,i.admin_=s,i.refresh_=o,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(i)):this._xoReqs.push(i):this._doSignIn(i),i.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=a=>{const p=e.options_&&e.options_.resource,f=e.resUrl_,u=e.refresh_;let v=!1;this.credentials.includes(a)||(u&&this.credentials.includes(u)?(u.userId=a.userId,u.token=a.token,u.expires=a.expires,u.validity=a.validity,u.ssl=a.ssl,u.creationTime=a.creationTime,v=!0,a=u):this.credentials.push(a)),a.resources||(a.resources=[]),a.resources.includes(p||f)||a.resources.push(p||f),a.scope=this._isServerRsrc(f)?"server":"portal",a.emitTokenChange();const b=this._soReqs,y={};this._soReqs=[],b.forEach(S=>{if(!this._isIdenticalService(f,S.resUrl_)){const I=this._getSuffix(S.resUrl_);y[I]||(y[I]=!0,a.resources.push(S.resUrl_))}}),e.resolve(a),b.forEach(S=>{this._hasSameServerInstance(this._getServerInstanceRoot(f),S.resUrl_)?S.resolve(a):this._soReqs.push(S)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,v||this.emit("credential-create",{credential:a}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=a=>{e.reject(a),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},i=(a,p,f,u)=>{var E,H,G;const v=e.sinfo_,b=!e.options_||e.options_.prompt!==!1,y=v.hasPortal&&this._findOAuthInfo(e.resUrl_);let S,I;if(a)t(new k({userId:a,server:v.server,token:f||null,expires:u!=null?Number(u):null,ssl:!!p}));else if(window!==window.parent&&((E=this._appUrlObj.query)==null?void 0:E["arcgis-auth-origin"])&&((H=this._appUrlObj.query)==null?void 0:H["arcgis-auth-portal"])&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const _=ue(window,"message",c=>{c.source===window.parent&&c.data&&(c.data.type==="arcgis:auth:credential"?(_.remove(),c.data.credential.expires<Date.now()?r(new U("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new k(c.data.credential))):c.data.type==="arcgis:auth:error"&&(_.remove(),c.data.error.name==="tokenExpiredError"?r(new U("identity-manager:credential-request-failed","Parent application's token has expired.")):r(U.fromJSON(c.data.error))))});W((G=e.options_)==null?void 0:G.signal,()=>{_.remove()})}else if(y){let _=y._oAuthCred;if(!_){const c=new me(y,re),h=new me(y,se);c.isValid()&&h.isValid()?c.expires>h.expires?(_=c,h.destroy()):(_=h,c.destroy()):_=c.isValid()?c:h,y._oAuthCred=_}if(_.isValid()){S=new k({userId:_.userId,server:v.server,token:_.token,expires:_.expires,ssl:_.ssl,_oAuthCred:_});const c=y.appId!==_.appId&&this._doPortalSignIn(e.resUrl_);c||_.refreshToken?(e._pendingDfd=_.refreshToken?this._getOAuthToken(v.server,_.refreshToken,_.appId).then(h=>(S.expires=Date.now()+1e3*h.expires_in,S.token=h.access_token,S)):Promise.resolve(S),e._pendingDfd.then(h=>c?this._exchangeToken(h.server,y.appId,h.token).then(w=>(h.token=w,h)).catch(()=>h):h).then(h=>{t(h)}).catch(()=>{_==null||_.destroy(),i()})):t(S)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(y.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===_.stateUID&&_.codeVerifier)){const c=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(c,y,v).then(h=>{t(h)}).catch(r)}else{const c=()=>{b?e._pendingDfd=this.oAuthSignIn(e.resUrl_,v,y,e.options_).then(t,r):(I=new U("identity-manager:not-authenticated","User is not signed in."),r(I))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(v.server,y.appId).then(h=>{V(h.portalUrl,this._appOrigin,!0)?(S=new k({userId:h.username,server:v.server,expires:Date.now()+1e3*h.expires_in,token:h.token}),t(S)):c()}).catch(c):c()}}else if(b){if(this._checkProtocol(e.resUrl_,v,r,e.admin_)){let _=e.options_;e.admin_&&(_=_||{},_.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,v,_).then(t,r)}}else I=new U("identity-manager:not-authenticated","User is not signed in."),r(I)},s=()=>{const a=e.sinfo_,p=a.owningSystemUrl,f=e.options_;let u,v,b,y;if(f&&(u=f.token,v=f.error,b=f.prompt),y=this._findCredential(p,{token:u,resource:e.resUrl_}),!y){for(const S of this.credentials)if(this._isIdProvider(p,S.server)){y=S;break}}if(y){const S=this.findCredential(e.resUrl_,y.userId);if(S)t(S);else if(ye(a,this._legacyFed)){const I=y.toJSON();I.server=a.server,I.resources=null,t(new k(I))}else(e._pendingDfd=this.generateToken(this.findServerInfo(y.server),null,{serverUrl:e.resUrl_,token:y.token,signal:e.options_.signal,ssl:y.ssl})).then(I=>{t(new k({userId:y==null?void 0:y.userId,server:a.server,token:I.token,expires:I.expires!=null?Number(I.expires):null,ssl:!!I.ssl,isAdmin:e.admin_,validity:I.validity}))},r)}else this._busy=null,u&&(e.options_.token=null),(e._pendingDfd=this.getCredential(p.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:a.owningTenant,signal:e.options_.signal,token:u,error:v,prompt:b})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},S=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(S)})};this._errbackFunc=r;const o=e.sinfo_.owningSystemUrl,l=this._isServerRsrc(e.resUrl_),d=e.sinfo_._restInfoPms;d?d.promise.then(a=>{var f,u;const p=e.sinfo_;if(p._restInfoPms){p.adminTokenServiceUrl=p._restInfoPms.adminUrl,p._restInfoPms=null,p.tokenServiceUrl=(f=Z("authInfo.tokenServicesUrl",a)||Z("authInfo.tokenServiceUrl",a)||Z("tokenServiceUrl",a))!=null?f:null,p.shortLivedTokenValidity=(u=Z("authInfo.shortLivedTokenValidity",a))!=null?u:null,p.currentVersion=a.currentVersion,p.owningTenant=a.owningTenant;const v=p.owningSystemUrl=a.owningSystemUrl;v&&this._portals.push(v)}l&&p.owningSystemUrl?s():i()},()=>{e.sinfo_._restInfoPms=null;const a=new U("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(a)}):l&&o?s():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(a=>{const p={};let f,u,v,b;return a&&(f=a.user&&a.user.username,p.username=f,p.allSSL=a.allSSL,u=a.supportsOAuth,b=parseFloat(a.currentVersion),a.portalMode==="multitenant"&&(v=a.customBaseUrl),e.sinfo_.currentVersion=b),e.sinfo_.webTierAuth=!!f,f&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:p.allSSL}).catch(()=>null).then(y=>(p.portalToken=y&&y.token,p.tokenExpiration=y&&y.expires,p)):!f&&u&&b>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:v,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>p):p}).catch(()=>null).then(a=>{e.sinfo_._selfReq=null,a?i(a.username,a.allSSL,a.portalToken,a.tokenExpiration):i()}):i()}_generateOAuthInfo(e){let t,r=null,i=e.portalUrl;const s=e.customBaseUrl,o=e.owningTenant,l=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(l){r=window.location.href;let d=r.indexOf("?");d>-1&&(r=r.slice(0,d)),d=r.search(/\/(apps|home)\//),r=d>-1?r.slice(0,d):null}return l&&r?(this._hasTestedIfAppIsOnPortal=!0,t=q(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Ce({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return i=i.replace(/^http:/i,"https:"),q(i+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:Ie(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(d=>{if(d.data.valid){const a=this._defaultOAuthInfo.clone();d.data.urlKey&&s?a.portalUrl="https://"+d.data.urlKey.toLowerCase()+"."+s:a.portalUrl=i,a.popup=window!==window.top||!(V(i,this._appOrigin)||this._gwDomains.some(p=>p.regex.test(i)&&p.regex.test(this._appOrigin))),this.oAuthInfos.push(a)}})})}_doOAuthSignIn(e,t,r,i){const s=r._oAuthCred,o={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(o.hash=window.location.hash),s.stateUID&&(o.uid=s.stateUID);const l={client_id:r.appId,response_type:s.codeVerifier?"code":"token",state:JSON.stringify(o),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!s.codeVerifier)};r.forceLogin&&(l.force_login=!0),r.forceUserId&&r.userId&&(l.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(l.redirectToUserOrgUrl=!0),s.codeVerifier&&(l.code_challenge=i||s.codeVerifier,l.code_challenge_method=i?"S256":"plain");const d=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",a=d+"?"+Se(l);if(r.popup){const p=window.open(a,"esriJSAPIOAuth",r.popupWindowFeatures);if(p)p.focus(),this._oAuthDfd.oAuthWin_=p,this._oAuthIntervalId=setInterval(()=>{if(p.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const f=this._oAuthDfd;if(f){const u=new U("identity-manager:user-aborted","ABORTED");f.reject(u)}}},500),this._oAuthOnPopupHandle=ue(window,["arcgis:auth:hash","arcgis:auth:location:search"],f=>{f.type==="arcgis:auth:hash"?this.setOAuthResponseHash(f.detail):this._setOAuthResponseQueryString(f.detail)});else{const f=new U("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(f)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:l,authorizeUrl:d,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=a}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return Ie(e.popupCallbackUrl);if(t){const i=ce(r);return i.query&&["code","error","error_description","message_code","persist","state"].forEach(s=>{delete i.query[s]}),tt(i.path,i.query)}return r}}He.prototype.declaredClass="esri.identity.IdentityManagerBase";let k=class extends Ee.EventedAccessor{constructor(n){super(n),this._oAuthCred=null,this.tokenRefreshBuffer=2,n&&n._oAuthCred&&(this._oAuthCred=n._oAuthCred)}initialize(){this.resources=this.resources||[],this.creationTime==null&&(this.creationTime=Date.now())}refreshToken(){const n=T.findServerInfo(this.server),e=n&&n.owningSystemUrl,t=!!e&&this.scope==="server",r=t&&ye(n,T._legacyFed),i=n.webTierAuth,s=i&&T.normalizeWebTierAuth,o=te[this.server],l=o&&o[this.userId];let d,a=this.resources&&this.resources[0],p=t?T.findServerInfo(e):null,f={username:this.userId,password:l};if(i&&!s)return;t&&!p&&T.serverInfos.some(v=>(T._isIdProvider(e,v.server)&&(p=v),!!p));const u=p?T.findCredential(p.server,this.userId):null;if(!t||u){if(!r){if(t)d={serverUrl:a,token:u&&u.token,ssl:u&&u.ssl};else if(s)f=null,d={ssl:this.ssl};else{if(!l){let v;return a&&(a=T._sanitizeUrl(a),this._enqueued=1,v=T._enqueue(a,n,null,null,this.isAdmin,this),v.then(()=>{this._enqueued=0,this.refreshServerTokens()}).catch(()=>{this._enqueued=0})),v}this.isAdmin&&(d={isAdmin:!0})}return T.generateToken(t?p:n,t?null:f,d).then(v=>{this.token=v.token,this.expires=v.expires!=null?Number(v.expires):null,this.creationTime=Date.now(),this.validity=v.validity,this.emitTokenChange(),this.refreshServerTokens()}).catch(()=>{})}u==null||u.refreshToken()}}refreshServerTokens(){this.scope==="portal"&&T.credentials.forEach(n=>{const e=T.findServerInfo(n.server),t=e&&e.owningSystemUrl;n!==this&&n.userId===this.userId&&t&&n.scope==="server"&&(T._hasSameServerInstance(this.server,t)||T._isIdProvider(t,this.server))&&(ye(e,T._legacyFed)?(n.token=this.token,n.expires=this.expires,n.creationTime=this.creationTime,n.validity=this.validity,n.emitTokenChange()):n.refreshToken())})}emitTokenChange(n){clearTimeout(this._refreshTimer);const e=this.server&&T.findServerInfo(this.server),t=e&&e.owningSystemUrl,r=t&&T.findServerInfo(t);n===!1||t&&this.scope!=="portal"&&(!r||!r.webTierAuth||T.normalizeWebTierAuth)||this.expires==null&&this.validity==null||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const n=T.credentials.indexOf(this);n>-1&&T.credentials.splice(n,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const n=Fe({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),e=this.resources;return e&&e.length>0&&(n.resources=e.slice()),n}_startRefreshTimer(){clearTimeout(this._refreshTimer);const n=6e4*this.tokenRefreshBuffer,e=2**31-1;let t=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();t<0?t=0:t>e&&(t=e),this._refreshTimer=setTimeout(this.refreshToken.bind(this),t>n?t-n:t)}};g([m()],k.prototype,"creationTime",void 0),g([m()],k.prototype,"expires",void 0),g([m()],k.prototype,"isAdmin",void 0),g([m()],k.prototype,"oAuthState",void 0),g([m()],k.prototype,"resources",void 0),g([m()],k.prototype,"scope",void 0),g([m()],k.prototype,"server",void 0),g([m()],k.prototype,"ssl",void 0),g([m()],k.prototype,"token",void 0),g([m()],k.prototype,"tokenRefreshBuffer",void 0),g([m()],k.prototype,"userId",void 0),g([m()],k.prototype,"validity",void 0),k=g([Y("esri.identity.Credential")],k);class Ge extends He{}Ge.prototype.declaredClass="esri.identity.IdentityManager";const At=new Ge;rt(At);export{At as default};
|