/** vim: et:ts=4:sw=4:sts=4 * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors. * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE */ /*! * Calcite Web - Calcite Design Components in CSS, JS and HTML * @version v1.2.5 * @license Apache-2.0 * @copyright 2018 Esri * @link https://github.com/Esri/calcite-web */ /*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ /** * @license text 2.0.16 Copyright jQuery Foundation and other contributors. * Released under MIT license, http://github.com/requirejs/text/LICENSE */ /** * @license i18n 2.0.6 Copyright jQuery Foundation and other contributors. * Released under MIT license, http://github.com/requirejs/i18n/LICENSE */ var requirejs,require,define;!function(global,setTimeout){function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var n;for(n=0;n-1&&(!e[n]||!t(e[n],n,e));n-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,i){return t&&eachProp(t,function(t,a){!n&&hasProp(e,a)||(!i||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[a]=t:(e[a]||(e[a]={}),mixin(e[a],t,n,i)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,i){var a=new Error(t+"\nhttps://requirejs.org/docs/errors.html#"+e);return a.requireType=e,a.requireModules=i,n&&(a.originalError=n),a}function newContext(e){function t(e){var t,n;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function n(e,n,i){var a,s,r,o,c,l,d,u,h,f,p,m=n&&n.split("/"),v=k.map,g=v&&v["*"];if(e&&(e=e.split("/"),l=e.length-1,k.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(p=m.slice(0,m.length-1),e=p.concat(e)),t(e),e=e.join("/")),i&&v&&(m||g)){s=e.split("/");e:for(r=s.length;r>0;r-=1){if(c=s.slice(0,r).join("/"),m)for(o=m.length;o>0;o-=1)if((a=getOwn(v,m.slice(0,o).join("/")))&&(a=getOwn(a,c))){d=a,u=r;break e}!h&&g&&getOwn(g,c)&&(h=getOwn(g,c),f=r)}!d&&h&&(d=h,u=f),d&&(s.splice(0,u,d),e=s.join("/"))}return getOwn(k.pkgs,e)||e}function i(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===w.contextName)return t.parentNode.removeChild(t),!0})}function a(e){var t=getOwn(k.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),w.require.undef(e),w.makeRequire(null,{skipMap:!0})([e]),!0}function s(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function r(e,t,i,a){var r,o,c,l,d=null,u=t?t.name:null,h=e,f=!0,p="";return e||(f=!1,e="_@r"+(q+=1)),l=s(e),d=l[0],e=l[1],d&&(d=n(d,u,a),o=getOwn(j,d)),e&&(d?p=i?e:o&&o.normalize?o.normalize(e,function(e){return n(e,u,a)}):-1===e.indexOf("!")?n(e,u,a):e:(p=n(e,u,a),l=s(p),d=l[0],p=l[1],i=!0,r=w.nameToUrl(p))),c=!d||o||i?"":"_unnormalized"+(O+=1),{prefix:d,name:p,parentMap:t,unnormalized:!!c,url:r,originalName:h,isDefine:f,id:(d?d+"!"+p:p)+c}}function o(e){var t=e.id,n=getOwn(A,t);return n||(n=A[t]=new w.Module(e)),n}function c(e,t,n){var i=e.id,a=getOwn(A,i);!hasProp(j,i)||a&&!a.defineEmitComplete?(a=o(e),a.error&&"error"===t?n(a.error):a.on(t,n)):"defined"===t&&n(j[i])}function l(e,t){var n=e.requireModules,i=!1;t?t(e):(each(n,function(t){var n=getOwn(A,t);n&&(n.error=e,n.events.error&&(i=!0,n.emit("error",e)))}),i||req.onError(e))}function d(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(w.defQueueMap[t]=!0),_.push(e)}),globalDefQueue=[])}function u(e){delete A[e],delete I[e]}function h(e,t,n){var i=e.map.id;e.error?e.emit("error",e.error):(t[i]=!0,each(e.depMaps,function(i,a){var s=i.id,r=getOwn(A,s);!r||e.depMatched[a]||n[s]||(getOwn(t,s)?(e.defineDep(a,j[s]),e.check()):h(r,t,n))}),n[i]=!0)}function f(){var e,t,n=1e3*k.waitSeconds,s=n&&w.startTime+n<(new Date).getTime(),r=[],o=[],c=!1,d=!0;if(!b){if(b=!0,eachProp(I,function(e){var n=e.map,l=n.id;if(e.enabled&&(n.isDefine||o.push(e),!e.error))if(!e.inited&&s)a(l)?(t=!0,c=!0):(r.push(l),i(l));else if(!e.inited&&e.fetched&&n.isDefine&&(c=!0,!n.prefix))return d=!1}),s&&r.length)return e=makeError("timeout","Load timeout for modules: "+r,null,r),e.contextName=w.contextName,l(e);d&&each(o,function(e){h(e,{},{})}),s&&!t||!c||!isBrowser&&!isWebWorker||x||(x=setTimeout(function(){x=0,f()},50)),b=!1}}function p(e){hasProp(j,e[0])||o(r(e[0],null,!0)).init(e[1],e[2])}function m(e,t,n,i){e.detachEvent&&!isOpera?i&&e.detachEvent(i,t):e.removeEventListener(n,t,!1)}function v(e){var t=e.currentTarget||e.srcElement;return m(t,w.onScriptLoad,"load","onreadystatechange"),m(t,w.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function g(){var e;for(d();_.length;){if(e=_.shift(),null===e[0])return l(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));p(e)}w.defQueueMap={}}var b,y,w,C,x,k={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},A={},I={},E={},_=[],j={},P={},T={},q=1,O=1;return C={require:function(e){return e.require?e.require:e.require=w.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?j[e.map.id]=e.exports:e.exports=j[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(k.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},y=function(e){this.events=getOwn(E,e.id)||{},this.map=e,this.shim=getOwn(k.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},y.prototype={init:function(e,t,n,i){i=i||{},this.inited||(this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=i.ignore,i.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,w.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();w.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;P[e]||(P[e]=!0,w.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id,i=this.depExports,a=this.exports,s=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(s)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{a=w.execCb(n,s,i,a)}catch(t){e=t}else a=w.execCb(n,s,i,a);if(this.map.isDefine&&void 0===a&&(t=this.module,t?a=t.exports:this.usingExports&&(a=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",l(this.error=e)}else a=s;if(this.exports=a,this.map.isDefine&&!this.ignore&&(j[n]=a,req.onResourceLoad)){var r=[];each(this.depMaps,function(e){r.push(e.normalizedMap||e)}),req.onResourceLoad(w,this.map,r)}u(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(w.defQueueMap,n)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=r(e.prefix);this.depMaps.push(i),c(i,"defined",bind(this,function(i){var a,s,d,h=getOwn(T,this.map.id),f=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,m=w.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(f=i.normalize(f,function(e){return n(e,p,!0)})||""),s=r(e.prefix+"!"+f,this.map.parentMap,!0),c(s,"defined",bind(this,function(e){this.map.normalizedMap=s,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((d=getOwn(A,s.id))&&(this.depMaps.push(s),this.events.error&&d.on("error",bind(this,function(e){this.emit("error",e)})),d.enable()))):h?(this.map.url=w.nameToUrl(h),void this.load()):(a=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),a.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(A,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&u(e.map.id)}),l(e)}),a.fromText=bind(this,function(n,i){var s=e.name,c=r(s),d=useInteractive;i&&(n=i),d&&(useInteractive=!1),o(c),hasProp(k.config,t)&&(k.config[s]=k.config[t]);try{req.exec(n)}catch(e){return l(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}d&&(useInteractive=!0),this.depMaps.push(c),w.completeLoad(s),m([s],a)}),void i.load(e.name,m,a,k))})),w.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){I[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,i,a;if("string"==typeof e){if(e=r(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(C,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,c(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?c(e,"error",bind(this,this.errback)):this.events.error&&c(e,"error",bind(this,function(e){this.emit("error",e)}))}n=e.id,i=A[n],hasProp(C,n)||!i||i.enabled||w.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(A,e.id);t&&!t.enabled&&w.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},w={config:k,contextName:e,registry:A,defined:j,urlFetched:P,defQueue:_,defQueueMap:{},Module:y,makeModuleMap:r,nextTick:req.nextTick,onError:l,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,n){return(-1===n.indexOf("?")?"?":"&")+t}}var n=k.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){i[t]?(k[t]||(k[t]={}),mixin(k[t],e,!0,!0)):k[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(T[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=w.makeShimExports(e)),n[t]=e}),k.shim=n),e.packages&&each(e.packages,function(e){var t,n;e="string"==typeof e?{name:e}:e,n=e.name,t=e.location,t&&(k.paths[n]=e.location),k.pkgs[n]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(A,function(e,t){e.inited||e.map.unnormalized||(e.map=r(t,null,!0))}),(e.deps||e.callback)&&w.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,a){function s(n,i,c){var d,u,h;return a.enableBuildCallback&&i&&isFunction(i)&&(i.__requireJsBuild=!0),"string"==typeof n?isFunction(i)?l(makeError("requireargs","Invalid require call"),c):t&&hasProp(C,n)?C[n](A[t.id]):req.get?req.get(w,n,t,s):(u=r(n,t,!1,!0),d=u.id,hasProp(j,d)?j[d]:l(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(g(),w.nextTick(function(){g(),h=o(r(null,t)),h.skipMap=a.skipMap,h.init(n,i,c,{enabled:!0}),f()}),s)}return a=a||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var i,a=e.lastIndexOf("."),s=e.split("/")[0],r="."===s||".."===s;return-1!==a&&(!r||a>1)&&(i=e.substring(a,e.length),e=e.substring(0,a)),w.nameToUrl(n(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(j,r(e,t,!1,!0).id)},specified:function(e){return e=r(e,t,!1,!0).id,hasProp(j,e)||hasProp(A,e)}}),t||(s.undef=function(e){d();var n=r(e,t,!0),a=getOwn(A,e);a.undefed=!0,i(e),delete j[e],delete P[n.url],delete E[e],eachReverse(_,function(t,n){t[0]===e&&_.splice(n,1)}),delete w.defQueueMap[e],a&&(a.events.defined&&(E[e]=a.events),u(e))}),s},enable:function(e){getOwn(A,e.id)&&o(e).enable()},completeLoad:function(e){var t,n,i,s=getOwn(k.shim,e)||{},r=s.exports;for(d();_.length;){if(n=_.shift(),null===n[0]){if(n[0]=e,t)break;t=!0}else n[0]===e&&(t=!0);p(n)}if(w.defQueueMap={},i=getOwn(A,e),!t&&!hasProp(j,e)&&i&&!i.inited){if(!(!k.enforceDefine||r&&getGlobal(r)))return a(e)?void 0:l(makeError("nodefine","No define call for "+e,null,[e]));p([e,s.deps||[],s.exportsFn])}f()},nameToUrl:function(e,t,n){var i,a,s,r,o,c,l,d=getOwn(k.pkgs,e);if(d&&(e=d),l=getOwn(T,e))return w.nameToUrl(l,t,n);if(req.jsExtRegExp.test(e))o=e+(t||"");else{for(i=k.paths,a=e.split("/"),s=a.length;s>0;s-=1)if(r=a.slice(0,s).join("/"),c=getOwn(i,r)){isArray(c)&&(c=c[0]),a.splice(0,s,c);break}o=a.join("/"),o+=t||(/^data\:|^blob\:|\?/.test(o)||n?"":".js"),o=("/"===o.charAt(0)||o.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+o}return k.urlArgs&&!/^blob\:/.test(o)?o+k.urlArgs(e,o):o},load:function(e,t){req.load(w,e,t)},execCb:function(e,t,n,i){return t.apply(i,n)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=v(e);w.completeLoad(t.id)}},onScriptError:function(e){var t=v(e);if(!a(t.id)){var n=[];return eachProp(A,function(e,i){0!==i.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return n.push(i),!0})}),l(makeError("scripterror",'Script error for "'+t.id+(n.length?'", needed by: '+n.join(", "):'"'),e,[t.id]))}}},w.require=w.makeRequire(),w}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,n,i){var a,s,r=defContextName;return isArray(e)||"string"==typeof e||(s=e,isArray(t)?(e=t,t=n,n=i):e=[]),s&&s.context&&(r=s.context),a=getOwn(contexts,r),a||(a=contexts[r]=req.s.newContext(r)),s&&a.configure(s),a.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],(baseElement=document.getElementsByTagName("base")[0])&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,n){var i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return i.type=e.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i},req.load=function(e,t,n){var i,a=e&&e.config||{};if(isBrowser)return i=req.createNode(a,t,n),i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),!i.attachEvent||i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0||isOpera?(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)),i.src=n,a.onNodeCreated&&a.onNodeCreated(i,a,t,n),currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{setTimeout(function(){},0),importScripts(n),e.completeLoad(t)}catch(i){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,i,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,n){var i,a;"string"!=typeof e&&(n=t,t=e,e=null),isArray(t)||(n=t,t=null),!t&&isFunction(n)&&(t=[],n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(i=currentlyAddingScript||getInteractiveScript())&&(e||(e=i.getAttribute("data-requiremodule")),a=contexts[i.getAttribute("data-requirecontext")]),a?(a.defQueue.push([e,t,n]),a.defQueueMap[e]=!0):globalDefQueue.push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout),define("requireLib",function(){}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("calcite-web",t):e.calcite=t()}(this,function(){"use strict";function e(e,t){var n;for(n=t;n;n=n.parentNode){var i=n&&n.getAttribute&&n.getAttribute("class")||"",a=new RegExp("(\\s|^)"+e+"(\\s|$)").test(i);if(1===n.nodeType&&a)break}return n}function t(e){return Array.isArray(e)?e:Array.prototype.slice.call(e)}function n(e,n){return t((n||document).querySelectorAll(e))}function i(e,t){return t.filter(function(t){var n=e.toLowerCase();return-1!==t.innerHTML.toLowerCase().indexOf(n)})}function a(e,t){return new RegExp("(\\s|^)"+t+"(\\s|$)").test(e.getAttribute("class"))}function s(e,t){t.split(" ").forEach(function(t){if(!a(e,t)){var n=e.getAttribute("class")||"";e.setAttribute("class",n+" "+t)}})}function r(e,t){t.split(" ").forEach(function(t){var n=(e.getAttribute("class")||"").replace(new RegExp("(\\s|^)"+t+"(\\s|$)","g"),"$2");a(e,t)&&e.setAttribute("class",n)})}function o(e,t){a(e,t)?r(e,t):s(e,t)}function c(e){e=t(e),e.forEach(function(e){r(e,"is-active")})}function l(e){e=t(e),e.forEach(function(e){s(e,"is-active")})}function d(e,t){c(e),s(t,"is-active")}function u(e){e.forEach(function(e){if(e){"true"!==e.getAttribute("aria-hidden")?e.setAttribute("aria-hidden",!0):e.removeAttribute("aria-hidden")}})}function h(e){e.forEach(function(e){e&&e.setAttribute("aria-hidden",!0)})}function f(e){e.forEach(function(e){e&&e.removeAttribute("aria-hidden")})}function p(e){if(e){e.getAttribute("aria-expanded")?e.removeAttribute("aria-expanded"):e.setAttribute("aria-expanded","true")}}function m(){return"click"}function v(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):void 0}function g(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):void 0}function b(e){return e.target||e.srcElement}function y(e){if(e.preventDefault)return e.preventDefault();e.returnValue&&(e.returnValue=!1)}function w(e){if(e=e||window.event,e.stopPropagation)return e.stopPropagation();e.cancelBubble&&(e.cancelBubble=!0)}function C(e,t,n){var i,a,s,r;return r=function(){i=!1,a&&(s.apply(n,a),a=!1)},s=function(){i?a=arguments:(e.apply(n,arguments),setTimeout(r,t),i=!0)}}function x(){}function k(){function e(e){e?v(e.node,"click",t):i.forEach(function(e){v(e,"click",t)})}function t(e){e.preventDefault();var t=e.target.getAttribute("data-clipboard-target");document.querySelector(t).select(),document.execCommand("copy")}var i=n(".js-copy-to-clipboard");ae.on("clipboard:bind",e),ae.emit("clipboard:bind")}function A(e){for(var t="",n=0;nu.clientHeight&&s(p,"overflow-scroll"),h([b,w]),v(t,m(),l),v(document,"focusin",o)}function i(e){if(!e||e.all)x.forEach(function(e){e.removeAttribute("tabindex"),r(e,"is-active")});else{var t=document.querySelector('.js-drawer[data-drawer="'+e.id+'"]');t&&(t.removeAttribute("tabindex"),r(t,"is-active"))}f([b,w]),g(document,"focusin",o),r(document.documentElement,"drawer-no-overflow"),e&&!e.fromOpen&&setTimeout(function(){r(u,"overflow-hidden"),r(p,"overflow-scroll")},300)}function o(t){e("js-drawer",t.target)||x.forEach(function(e){a(e,"is-active")&&e.focus()})}function c(e){e?v(e.node,m(),d):C.forEach(function(e){v(e,m(),d)})}function l(e){a(e.target,"js-drawer")&&ae.emit("drawer:close",{fromOpen:!1,all:!0})}function d(e){y(e);var t=e.target.getAttribute("data-drawer");ae.emit("drawer:open",{id:t})}var u=document.documentElement,p=document.body,b=document.querySelector(".wrapper"),w=document.querySelector(".footer"),C=n(".js-drawer-toggle"),x=n(".js-drawer");ae.on("drawer:open",t),ae.on("keyboard:escape",i),ae.on("drawer:close",i),ae.on("drawer:bind",c),ae.emit("drawer:bind")}function K(){function l(){n(".js-filter-dropdown").forEach(function(e){var n=e.getAttribute("data-filter-dropdown"),a=e.querySelector(".filter-dropdown-input");v(a,"focus",u);for(var o=e.querySelectorAll(".js-filter-dropdown-open"),c=0;c0?s(t,"hide"):r(t,"hide");for(var n=0;n\n '+i.innerHTML+'\n \n \n \n ';e.parent.insertAdjacentHTML("beforeend",a);v(e.parent.querySelector('.filter-dropdown-remove[data-item-id="'+n+'"]'),m(),I)}}function I(e){e.preventDefault();var t=d(e);t.i=e.target.getAttribute("data-item-id"),ae.emit("filterDropdown:select:remove",t)}function E(e){for(var t=e.parent.querySelectorAll(".filter-dropdown-active"),n=0;nu.clientHeight&&s(p,"overflow-scroll"),h(e());var a=n("button, [href], input, select, textarea, [tabindex]",i).filter(function(e){return!e.disabled&&-1!==e.tabIndex&&e.offsetHeight>0});l=a.shift(),d=a.pop(),l&&l.focus()}}function i(t){if(t&&t.id){var n=document.querySelector('.js-modal[data-modal="'+t.id+'"]');r(n,"is-active"),n.setAttribute("tabindex",0),g(document,"keydown",o),f(e())}else c(C);t&&t.fromOpen||setTimeout(function(){r(u,"overflow-hidden"),r(p,"overflow-scroll")},300)}function a(e){e?v(e,m(),Q):w.forEach(function(e){var t=!1;ie.modals.forEach(function(n){n.target===e&&n.event===m()&&n.fn===Q&&(t=!0)}),t||(ie.modals.push({target:e,event:m(),fn:Q}),v(e,m(),Q))})}function o(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===l&&(d&&d.focus(),e.preventDefault()):document.activeElement===d&&(l&&l.focus(),e.preventDefault()))}var l,d,u=document.documentElement,p=document.body,b=document.querySelector(".wrapper"),y=document.querySelector(".footer"),w=n(".js-modal-toggle"),C=n(".js-modal");ae.on("modal:open",t),ae.on("keyboard:escape",i),ae.on("modal:close",i),ae.on("modal:bind",a),ae.emit("modal:bind")}function Q(t){y(t);var n=e("js-modal-toggle",t.target),i=n.getAttribute("data-modal"),s=document.querySelector('.js-modal[data-modal="'+i+'"]');s&&!a(s,"is-active")?ae.emit("modal:open",{id:i}):ae.emit("modal:close")}function W(){function e(e){e?v(e,m(),l):d.forEach(function(e){v(e,m(),l)})}function i(e){var t=e.querySelector(".js-search-icon"),n=e.querySelector(".js-close-icon");o(t,"hide"),o(n,"hide"),o(u,"is-active"),o(document.body,"overflow-hidden"),ae.emit("search:focus")}function s(){document.querySelector(".js-search-input").focus()}function c(){if(u&&a(u,"is-active")){r(u,"is-active"),r(document.body,"overflow-hidden");t(d).forEach(i);var e=document.querySelector(".js-search-input");e&&e.blur()}}function l(e){y(e),ae.emit("search:toggle",e.target)}var d=n(".js-search-toggle"),u=n(".js-search")[0];ae.on("search:bind",e),ae.on("search:toggle",i),ae.on("keyboard:escape",c),ae.on("search:focus",s),ae.emit("search:bind")}function Y(){function e(){i.forEach(function(e){v(e,"change",t)})}function t(e){window.location.assign(e.currentTarget.value)}ae.on("selectnav:bind",e);var i=n(".js-select-nav");ae.emit("selectnav:bind")}function X(){function e(e){var t=I.raw();e.setAttribute("data-sticky-id",t);var n=e.parentNode,i=e.cloneNode("deep");s(i,"js-shim"),r(i,"js-sticky"),i.setAttribute("data-sticky-id",t),i.style.visibility="hidden",i.style.display="none",n.insertBefore(i,e)}function t(e){var t=e.element.getAttribute("data-sticky-id"),n=document.querySelector('.js-shim[data-sticky-id="'+t+'"]');t&&n&&(s(e.element,"is-sticky"),n.style.display="")}function i(e){var t=e.element.getAttribute("data-sticky-id"),n=document.querySelector('.js-shim[data-sticky-id="'+t+'"]');t&&n&&(r(e.element,"is-sticky"),n.style.display="none")}function o(e){l.forEach(function(t){var n=t.element;if(a(t.element,"is-sticky")){var i=t.element.getAttribute("data-sticky-id");n=document.querySelector('.js-shim[data-sticky-id="'+i+'"]')}if(n){var s=n.getAttribute("data-top")||0;t.top=n.offsetTop-parseInt(s,0)}t.top-1&&a(document.activeElement,"js-tab")){var r=i[s+1]||i[0],c=i[s-1]||i[i.length-1];(39===e.keyCode?r:c).focus()}}}ae.on("tabs:bind",i),ae.on("tabs:active",r),ae.emit("tabs:bind")}function $(e){27===e.keyCode?ae.emit("keyboard:escape"):13===e.keyCode?ae.emit("keyboard:return"):32===e.keyCode?ae.emit("keyboard:space"):38===e.keyCode?ae.emit("keyboard:arrow:up"):40===e.keyCode?ae.emit("keyboard:arrow:down"):37===e.keyCode?ae.emit("keyboard:arrow:left"):39===e.keyCode&&ae.emit("keyboard:arrow:right")}function ee(){ae.emit("scrolling:at",window.pageYOffset)}function te(){ce.forEach(function(e){e()})}function ne(e){"function"!=typeof Object.assign&&(Object.assign=function(e){var t=arguments;if(null==e)throw new TypeError("Cannot convert undefined or null to object");e=Object(e);for(var n=1;n-1,a&&(document.documentElement.dir="rtl",t.dir="rtl",t.className="rtl"),window.oAuthInfo.parsedLocale=n},trimString:function(e){var t="";return void 0!==e&&(t=e.replace(/(^\s+|\s+$)/g,"")),t},setFocus:function(e){"string"==typeof e&&(e=this.byId(e)||this.queryOne(e));try{e.focus()}catch(e){}},getCookieItem:function(e){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},sub:function(e,t){return e.replace(/{([^{}]*)}/g,function(e,n){var i=t[n];return"string"==typeof i||"number"==typeof i?i:e})},extend:function(e,t){return"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i"'`=\/]/g,function(e){return b[e]})}function c(e,t){function i(){if(g&&!b)for(;v.length;)delete p[v.pop()];else v=[];g=!1,b=!1}function a(e){if("string"==typeof e&&(e=e.split(w,2)),!m(e)||2!==e.length)throw new Error("Invalid tags: "+e);s=new RegExp(n(e[0])+"\\s*"),o=new RegExp("\\s*"+n(e[1])),c=new RegExp("\\s*"+n("}"+e[1]))}if(!e)return[];var s,o,c,h=!1,f=[],p=[],v=[],g=!1,b=!1,I="",E=0;a(t||A.tags);for(var _,j,P,T,q,O,S=new u(e);!S.eos();){if(_=S.pos,P=S.scanUntil(s))for(var L=0,M=P.length;L0?s[s.length-1][4]:i;break;default:a.push(t)}return i}function u(e){this.string=e,this.tail=e,this.pos=0}function h(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function f(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}var p=Object.prototype.toString,m=Array.isArray||function(e){return"[object Array]"===p.call(e)},v=RegExp.prototype.test,g=/\S/,b={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},y=/\s*/,w=/\s+/,C=/\s*=/,x=/\s*\}/,k=/#|\^|\/|>|\{|&|=|!/;u.prototype.eos=function(){return""===this.tail},u.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},u.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},h.prototype.push=function(e){return new h(e,this)},h.prototype.lookup=function(t){var n,s=this.cache;if(s.hasOwnProperty(t))n=s[t];else{for(var r,o,c,l=this,d=!1;l;){if(t.indexOf(".")>0)for(r=l.view,o=t.split("."),c=0;null!=r&&c"===r?o=this.renderPartial(s,t,n,a):"&"===r?o=this.unescapedValue(s,t):"name"===r?o=this.escapedValue(s,t,a):"text"===r&&(o=this.rawValue(s)),void 0!==o&&(c+=o);return c},f.prototype.renderSection=function(t,n,i,a,s){function r(e){return o.render(e,n,i,s)}var o=this,c="",l=n.lookup(t[1]);if(l){if(m(l))for(var d=0,u=l.length;d0||!n)&&(a[s]=i+a[s]);return a.join("\n")},f.prototype.renderPartial=function(t,n,i,a){if(i){var s=this.getConfigTags(a),r=e(i)?i(t[1]):i[t[1]];if(null!=r){var o=t[6],c=t[5],l=t[4],d=r;0==c&&l&&(d=this.indentPartial(r,l,o));var u=this.parse(d,s);return this.renderTokens(u,n,i,d,a)}}},f.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},f.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||A.escape,a=t.lookup(e[1]);if(null!=a)return"number"==typeof a&&i===A.escape?String(a):i(a)},f.prototype.rawValue=function(e){return e[1]},f.prototype.getConfigTags=function(e){return m(e)?e:e&&"object"==typeof e?e.tags:void 0},f.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!m(e)?e.escape:void 0};var A={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){I.templateCache=e},get templateCache(){return I.templateCache}},I=new f;return A.clearCache=function(){return I.clearCache()},A.parse=function(e,t){return I.parse(e,t)},A.render=function(e,n,i,a){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+t(e)+'" was given as the first argument for mustache#render(template, view, partials)');return I.render(e,n,i,a)},A.escape=o,A.Scanner=u,A.Context=h,A.Writer=f,A}),define("config",[],function(){return{hideAppInfo:["arcgisonline","arcgisWebApps","mapsForCreativeCloud","esriapps","esri_es","esri_de","esri_cl","esriuk_com","esri_se","esri_ca","esri_ch","esri_nl","storymapsexpress","pythonapi","indoorsonline"]}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("icons",t):e.icons=t()}(this,function(){"use strict";return{esri:'Esri',esriSvg:'Esri', gaeSvg:'',user:'',help:'',close:'',chevronUp:'',lock:'',trash:'',info:'',google:'',facebook:'',apple_old:'',apple:'',github:'',organization:'',hourglass:'',user32:'',arrowRight:'',chevronRight:'',edit:'',check16:'',launch16:'',circleNo24:'',securityKey32:'',fingerprint32:'',smartphone32:'',faceid32:'', storymapsExpress:''}}),define("components/Section",["helpers","mustache","icons"],function(e,t,n){var i=function(t){this.parent=t.parent||document.body,this.authInfo=t.info||{},this.i18n=t.i18n||{},this.template=t.template||"",this.root=e.createRootElement({parent:this.parent,className:t.className||this.defaultClass,id:t.id,type:t.type||"div"}),this.startup()};return i.prototype={defaultClass:null,root:null,parent:null,authinfo:null,template:null,constructor:i,startup:function(){this.render(),this.addEventHandlers()},render:function(){var e=this.authInfo;this.root.innerHTML=t.render(this.template,{info:e,i18n:this.i18n,icons:n})},addEventHandlers:function(){}},i}),define("text",["module"],function(e){"use strict";function t(e,t){return void 0===e||""===e?t:e}function n(e,n,i,a){if(n===a)return!0;if(e===i){if("http"===e)return t(n,"80")===t(a,"80");if("https"===e)return t(n,"443")===t(a,"443")}return!1}var i,a,s,r,o,c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],l=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,d=/]*>\s*([\s\S]+)\s*<\/body>/im,u="undefined"!=typeof location&&location.href,h=u&&location.protocol&&location.protocol.replace(/\:/,""),f=u&&location.hostname,p=u&&(location.port||void 0),m={},v=e.config&&e.config()||{};return i={version:"2.0.16",strip:function(e){if(e){e=e.replace(l,"");var t=e.match(d);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:v.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;t<3;t+=1){n=c[t];try{e=new ActiveXObject(n)}catch(e){}if(e){c=[n];break}}return e},parseName:function(e){var t,n,i,a=!1,s=e.lastIndexOf("."),r=0===e.indexOf("./")||0===e.indexOf("../");return-1!==s&&(!r||s>1)?(t=e.substring(0,s),n=e.substring(s+1)):t=e,i=n||t,s=i.indexOf("!"),-1!==s&&(a="strip"===i.substring(s+1),i=i.substring(0,s),n?n=i:t=i),{moduleName:t,ext:n,strip:a}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,t,a,s){var r,o,c,l=i.xdRegExp.exec(e);return!l||(r=l[2],o=l[3],o=o.split(":"),c=o[1],o=o[0],(!r||r===t)&&(!o||o.toLowerCase()===a.toLowerCase())&&(!c&&!o||n(r,c,t,s)))},finishLoad:function(e,t,n,a){n=t?i.strip(n):n,v.isBuild&&(m[e]=n),a(n)},load:function(e,t,n,a){if(a&&a.isBuild&&!a.inlineText)return void n();v.isBuild=a&&a.isBuild;var s=i.parseName(e),r=s.moduleName+(s.ext?"."+s.ext:""),o=t.toUrl(r),c=v.useXhr||i.useXhr;if(0===o.indexOf("empty:"))return void n();!u||c(o,h,f,p)?i.get(o,function(t){i.finishLoad(e,s.strip,t,n)},function(e){n.error&&n.error(e)}):t([r],function(e){i.finishLoad(s.moduleName+"."+s.ext,s.strip,e,n)},function(e){n.error&&n.error(e)})},write:function(e,t,n,a){if(m.hasOwnProperty(t)){var s=i.jsEscape(m[t]);n.asModule(e+"!"+t,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,t,n,a,s){var r=i.parseName(t),o=r.ext?"."+r.ext:"",c=r.moduleName+o,l=n.toUrl(r.moduleName+o)+".js";i.load(c,n,function(t){var n=function(e){return a(l,e)};n.asModule=function(e,t){return a.asModule(e,l,t)},i.write(e,c,n,s)},s)}},"node"===v.env||!v.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]&&!process.versions["atom-shell"]?(a=require.nodeRequire("fs"),i.get=function(e,t,n){try{var i=a.readFileSync(e,"utf8");"\ufeff"===i[0]&&(i=i.substring(1)),t(i)}catch(e){n&&n(e)}}):"xhr"===v.env||!v.env&&i.createXhr()?i.get=function(e,t,n,a){var s,r=i.createXhr();if(r.open("GET",e,!0),a)for(s in a)a.hasOwnProperty(s)&&r.setRequestHeader(s.toLowerCase(),a[s]);v.onXhr&&v.onXhr(r,e),r.onreadystatechange=function(i){var a,s;4===r.readyState&&(a=r.status||0,a>399&&a<600?(s=new Error(e+" HTTP status: "+a),s.xhr=r,n&&n(s)):t(r.responseText),v.onXhrComplete&&v.onXhrComplete(r,e))},r.send(null)}:"rhino"===v.env||!v.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?i.get=function(e,t){var n,i,a=new java.io.File(e),s=java.lang.System.getProperty("line.separator"),r=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(a),"utf-8")),o="";try{for(n=new java.lang.StringBuffer,i=r.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=r.readLine());)n.append(s),n.append(i);o=String(n.toString())}finally{r.close()}t(o)}:("xpconnect"===v.env||!v.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(s=Components.classes,r=Components.interfaces,Components.utils.import("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in s,i.get=function(e,t){var n,i,a,c={};o&&(e=e.replace(/\//g,"\\")),a=new FileUtils.File(e);try{n=s["@mozilla.org/network/file-input-stream;1"].createInstance(r.nsIFileInputStream),n.init(a,1,0,!1),i=s["@mozilla.org/intl/converter-input-stream;1"].createInstance(r.nsIConverterInputStream),i.init(n,"utf-8",n.available(),r.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),i.readString(n.available(),c),i.close(),n.close(),t(c.value)}catch(e){throw new Error((a&&a.path||"")+": "+e)}}),i}),define("text!components/../../contents/privacyLink.html",[],function(){return'\n'}),define("components/PrivacyLink",["helpers","./Section","text!../../contents/privacyLink.html"],function(e,t,n){function i(e){e.template=n,e.type="div",t.call(this,e)}return i.prototype=Object.create(t.prototype),e.extend(i.prototype,{defaultClass:"privacy-link",constructor:i}),i}),define("components/ExpandSection",["calcite-web","helpers","./Section"],function(e,t,n){function i(e){this.exclusive=e.exclusive,"expanded"in e&&(this.expanded=e.expanded),"collapsible"in e&&(this.collapsible=e.collapsible),n.call(this,e)}return i.prototype=Object.create(n.prototype),t.extend(i.prototype,{expanded:!0,expander:null,constructor:i,render:function(){if(n.prototype.render.call(this),this.expander=t.queryOne(".accordion-title",this.root),!1===this.collapsible){this.expand(!0),this.expander&&(this.expander.removeChild(t.queryOne(".accordion-icon",this.expander)),e.removeClass(t.queryOne(".js-accordion",this.root),"js-accordion"),e.nodeListToArray(t.query("[class*='accordion-']")).forEach(function(e){e.className=e.className.replace(/accordion/g,"flat")}));var i=t.queryOne(".flat-title",this.root);i&&(e.addClass(i,"font-size--1 trailer-quarter"),i.setAttribute("role","heading"),i.setAttribute("aria-level","4"))}else{!1===this.expanded&&this.expand(!1);var a=this.getSavedState();a&&this.expand(a.expanded)}},expand:function(n){var i=t.queryOne(".accordion-section",this.root);if(i){var a=t.queryOne(".accordion-title",i);!1===n?(e.removeClass(i,"is-active"),a.getAttribute("aria-expanded")&&e.toggleAriaExpanded(a)):(e.addClass(i,"is-active"),!a.getAttribute("aria-expanded")&&e.toggleAriaExpanded(a))}},addEventHandlers:function(){e.bus.on("accordion:toggle",function(n){var i=n.node,a=this.expander&&i==this.expander.parentElement,s=!e.hasClass(i,"is-active");a&&(this.exclusive&&s&&e.nodeListToArray(t.query(".accordion-section.is-active")).forEach(function(t){e.bus.emit("accordion:toggle",{node:t})}),this.expanded=!!s,this.saveState(this.expanded))},this)},getSavedState:function(){var e;try{e=window.localStorage.getItem(this.defaultClass)}catch(e){return!1}return JSON.parse(e)},saveState:function(e){try{window.localStorage.setItem(this.defaultClass,JSON.stringify({expanded:!!e}))}catch(e){return!1}}}),i}),define("text!components/../../contents/arcgisLogin.html",[],function(){return'
\n
\n
\n \n \n {{&icons.chevronUp}}\n \n \n \n {{^info.gaeFocus}}{{i18n.arcgisLogin}}{{/info.gaeFocus}}\n \n
\n
\n
\n \n \n \n \n \n
\n \n \n
\n
\n
\n {{^info.isPortal}}\n {{i18n.needHelpUsername}}\n  {{i18n.or}} \n {{i18n.needHelpPassword}}\n {{/info.isPortal}}\n {{#info.isPortal}}\n {{i18n.needHelpPassword}}\n {{/info.isPortal}}\n
\n
\n
\n
\n'}),define("components/ArcgisLogin",["calcite-web","helpers","./ExpandSection","text!../../contents/arcgisLogin.html"],function(e,t,n,i){function a(e){e.template=i,n.call(this,e)}return a.prototype=Object.create(n.prototype),t.extend(a.prototype,{defaultClass:"arcgis-login",constructor:a,render:function(){if(this.authInfo.isPortal&&(this.authInfo.portalhost=t.getPortal()),n.prototype.render.call(this),t.byId("oauth_state").setAttribute("value",this.authInfo.oauth_state),this.authInfo.username&&(t.byId("user_username").value=this.authInfo.username),this.authInfo.prePopulatedUsername){var i=t.byId("user_username");i.value=this.authInfo.prePopulatedUsername,i.setAttribute("readonly",!0)}!0===this.authInfo.persistOption&&e.removeClass(t.byId("persistUserLabel"),"hide"),!0!==this.authInfo.hideCancel&&e.removeClass(t.byId("cancel"),"hide")},addEventHandlers:function(){n.prototype.addEventHandlers.call(this),e.addEvent(t.byId("user_password"),"blur",this.verifyInput.bind(this)),e.addEvent(t.byId("user_username"),"blur",this.verifyInput.bind(this)),e.addEvent(t.byId("cancel"),"click",this.cancelForm.bind(this)),e.addEvent(t.byId("oauth"),"submit",this.validateForm.bind(this))},verifyInput:function(n){var i=n.target,a=t.queryOne(".js-"+i.id.split("user_")[1]+"-error");i.value.length>0&&("user_username"==i.id&&(i.value=i.value.trim()),e.removeClass(i,"input-error"),e.removeClass(a,"is-active"))},cancelForm:function(e){e.preventDefault();var n=t.byId("oauth");if(this.authInfo.join){var i=this.reverseSwizzle(this.authInfo.hostname)+"/sharing/rest/oauth2/join?join="+this.authInfo.join+"&oauth_state="+this.authInfo.oauth_state;window.location.href=i}else t.byId("authorize").setAttribute("value","false"),n.submit()},validateForm:function(n){n.preventDefault();var i=!0;if(e.nodeListToArray(t.query("input[required]",this.root)).forEach(function(n){var a=n.id.indexOf("user_")>-1?n.id.split("user_")[1]:n.id,s=t.queryOne(".js-"+a+"-error");0==n.value.length&&(i=!1,s.innerHTML=this.i18n.createAccount.errors["missing_"+a],e.addClass(n,"input-error"),e.addClass(s,"is-active"))}.bind(this)),i){if(!0===this.authInfo.persistOption){var a=t.byId("persistUser");a.value=a.checked}n.target.submit()}},reverseSwizzle:function(e){var t=e.split(".").slice(1),n=t.shift(),i="";switch(n){case"arcgis":return e;case"mapsdevext":i="devext";break;case"mapsqa":i="qaext";break;default:i="www"}return t.unshift("https://"+i),t.join(".")}}),a}),define("text!components/../../contents/myOrgs.html",[],function(){return'
\n
\n
\n \n \n {{&icons.chevronUp}}\n \n \n \n {{i18n.yourOrgUrl}}\n \n
\n
\n
\n {{#info.savedOrgs}}\n {{#.}}\n
\n
\n
{{key}}
\n
\n \n {{&icons.close}}\n \n
\n
\n
\n {{/.}}\n {{/info.savedOrgs}}\n {{i18n.addOrgUrl}}\n
\n
\n
\n \n \n
\n

{{i18n.maxSavedOrgs}}

\n
\n \n \n
\n
\n
\n
\n
\n'}),define("components/MyOrgs",["calcite-web","helpers","./ExpandSection","text!../../contents/myOrgs.html"],function(e,t,n,i){function a(e){e.template=i,this.hasStorage=this._checkStorage(),n.call(this,e)}return a.prototype=Object.create(n.prototype),t.extend(a.prototype,{defaultClass:"my-orgs",hasStorage:!1,constructor:a,render:function(){var i=this.authInfo;this.setRootEnterpriseInfo(i),n.prototype.render.call(this),this.hasStorage||e.addClass(t.byId("remOrgLabel"),"hide"),i.hasOrgs?(e.removeClass(t.byId("addOrgLink"),"hide"),this.getFilteredKeys().length>2&&e.removeClass(t.byId("maxOrgsNotice"),"hide")):(e.removeClass(t.queryOne(".js-add-enterprise"),"hide"),e.addClass(t.byId("backLink"),"invisible"))},addEventHandlers:function(){n.prototype.addEventHandlers.call(this),e.nodeListToArray(t.query(".js-entlogin")).forEach(function(t){e.addEvent(t,"click",this.doEnterpriseLogin.bind(this))}.bind(this)),e.nodeListToArray(t.query(".js-entpanel")).forEach(function(n){e.addEvent(n,"keyup",this.keyEnterprisePanel.bind(this)),e.addEvent(n,"click",function(n){e.hasClass(n.currentTarget,"js-trash-org")||t.queryOne(".js-entlogin",n.currentTarget).click()})}.bind(this)),e.addEvent(t.byId("orgContinue"),"click",this.submitOrg.bind(this)),e.addEvent(t.byId("addOrgLink"),"click",this.showAddOrg.bind(this)),e.addEvent(t.byId("backLink"),"click",this.hideAddOrg.bind(this)),e.addEvent(t.byId("orgKey"),"keyup",this.keyOrgInput.bind(this)),e.addEvent(t.byId("orgKey"),"blur",function(e){var t=e.target.value;[/^http[s]*:\/\//i,/\.$/].forEach(function(e){t=t.replace(e,"")}),e.target.value=t,t.length>0&&this.validateOrgKey(t)}.bind(this)),e.nodeListToArray(t.query(".js-trash-org")).forEach(function(t){e.addEvent(t,"click",this.removeSavedOrg.bind(this))}.bind(this))},setRootEnterpriseInfo:function(e){this.storedKeys=this.hasStorage&&this.readOrgKeys()||[];var t=e.orgUrlBase,n=e.contextPath,i=this.storedKeys.map(function(e,i){var a=e+"."+t;return{index:i+1,key:e,title:a,url:"https://"+a+n+"/rest/oauth2/authorize"}});i.length&&(e.hasOrgs=!0,e.savedOrgs=i)},doEnterpriseLogin:function(e){e.preventDefault();var n=e.target,i=n.getAttribute("data-url"),a=t.byId("oauth");a.action=i,a.submit()},overEnterprisePanel:function(t){var n=t.target;e.toggleClass(n,"panel-off-white","panel-white")},keyEnterprisePanel:function(n){var i=n.keyCode;0!=i&&13!=i&&32!=i||(e.hasClass(n.target,"js-trash-org")?n.target.click():t.queryOne(".js-entlogin",n.target).click())},showAddOrg:function(){e.removeClass(t.queryOne(".js-add-enterprise"),"hide"),e.addClass(t.queryOne(".js-info-enterprise"),"hide"),e.addClass(t.byId("addOrgLink"),"hide"),this.getFilteredKeys().length>=3&&e.addClass(t.byId("remOrgLabel"),"hide"),t.byId("orgKey").focus()},hideAddOrg:function(){e.addClass(t.queryOne(".js-add-enterprise"),"hide"),e.removeClass(t.queryOne(".js-info-enterprise"),"hide"),e.removeClass(t.byId("addOrgLink"),"hide")},keyOrgInput:function(n){var i=n.keyCode,a=n.target,s=t.byId("orgKey-error");if("Enter"==n.key||13==i)t.byId("orgContinue",n.target).click();else if(a.value.length>36){var r=a.value;a.value=r.slice(0,36),s.innerHTML=this.i18n.tooManyCharacters,e.addClass(a,"input-error"),e.addClass(s,"is-active")}else e.removeClass(a,"input-error"),e.removeClass(s,"is-active")},submitOrg:function(e){e.preventDefault();var n=t.byId("orgKey").value,i=t.byId("oauth"),a=t.byId("remOrg");if(this.validateOrgKey(n)){a.checked&&this.hasStorage&&this.storeOrgKey(n);var s=location.protocol+"//"+n+"."+this.authInfo.orgUrlBase+this.authInfo.contextPath+"/rest/oauth2/authorize";i.action=s,i.submit()}},validateOrgKey:function(n){var i,a=!0,s=t.byId("orgKey-error"),r=t.byId("orgKey");return 0==n.length?(a=!1,i=this.i18n.orgUrlRequired):/[^A-Za-z0-9_-]/.test(n)?(a=!1,i=this.i18n.invalidCharacters):n.length>36&&(a=!1,i=this.i18n.tooManyCharacters),a?(e.removeClass(r,"input-error"),e.removeClass(s,"is-active")):(s.innerHTML=i,e.addClass(r,"input-error"),e.addClass(s,"is-active")),a},removeSavedOrg:function(n){n.preventDefault(),n.stopImmediatePropagation();var i=n.currentTarget,a=e.closest("entpanel",i),s=i.getAttribute("data-index");if(s&&this.hasStorage){var r="orgKey"+s;localStorage.removeItem(r),this.storedKeys[s-1]=void 0,e.addClass(a,"hide");var o=this.getFilteredKeys();0===o.length&&(e.removeClass(t.queryOne(".js-add-enterprise"),"hide"),e.addClass(t.byId("addOrgLink"),"hide"),e.addClass(t.byId("backLink"),"invisible")),o.length<3&&(e.removeClass(t.byId("remOrgLabel"),"hide"),e.addClass(t.byId("maxOrgsNotice"),"hide"))}},storeOrgKey:function(e){for(var t=this.storedKeys,n=0;n<3;n++)if(!t[n]){localStorage.setItem("orgKey"+(n+1),e),this.storedKeys[n]=e;break}},readOrgKeys:function(){for(var e=[],t=1,n=null;t<4;t++)(n=localStorage.getItem("orgKey"+t))&&(e[t-1]=n);return e},getFilteredKeys:function(){return this.storedKeys.filter(function(e){return e})},_checkStorage:function(){var e=!0;try{e=window.localStorage&&"function"==typeof window.localStorage.getItem,localStorage.setItem("testitem","true"),e="true"==localStorage.getItem("testitem"),localStorage.removeItem("testitem")}catch(t){e=!1}return e}}),a}),define("text!components/../../contents/enterpriseInfo.html",[],function(){return'
\n
\n
\n
\n {{info.login.name}}{{#info.hubRelated}}
{{info.login.orgName}}{{/info.hubRelated}}\n
\n
\n {{^info.canSignInArcGIS}}\n
\n \n
\n {{/info.canSignInArcGIS}}\n
\n
\n'}),define("components/EnterpriseInfo",["calcite-web","helpers","./ExpandSection","text!../../contents/enterpriseInfo.html"],function(e,t,n,i){function a(e){e.template=i,e.info=t.extend({login:e.login},e.info),n.call(this,e)}return a.prototype=Object.create(n.prototype),t.extend(a.prototype,{defaultClass:"enterprise-info",constructor:a,render:function(){n.prototype.render.call(this),this.authInfo&&(this.authInfo.hubRelated||e.nodeListToArray(t.query(".btn.text-left",this.root)).forEach(function(t){e.removeClass(t,"text-left")}))},addEventHandlers:function(){n.prototype.addEventHandlers.call(this),e.nodeListToArray(t.query(".js-entlogin")).forEach(function(t){e.addEvent(t,"click",this.doEnterpriseLogin.bind(this)) }.bind(this)),e.nodeListToArray(t.query(".js-entpanel")).forEach(function(n){e.addEvent(n,"keyup",this.keyEnterprisePanel.bind(this)),e.addEvent(n,"click",function(e){t.queryOne(".js-entlogin",e.currentTarget).click()})}.bind(this))},doEnterpriseLogin:function(e){e.preventDefault();var n=e.target,i=n.getAttribute("data-url"),a=t.byId("oauth");a&&(a.action=i,a.submit())},keyEnterprisePanel:function(e){var n=e.keyCode;0!=n&&13!=n&&32!=n||t.queryOne(".js-entlogin",e.target).click()}}),a}),function(){"use strict";function e(e,t,n,i,a,s){t[e]&&(n.push(e),!0!==t[e]&&1!==t[e]||i.push(a+e+"/"+s))}function t(e,t,n,i,a){var s=i+t+"/"+a;require._fileExists(e.toUrl(s+".js"))&&n.push(s)}function n(e,t,i){var a;for(a in t)!t.hasOwnProperty(a)||e.hasOwnProperty(a)&&!i?"object"==typeof t[a]&&(!e[a]&&t[a]&&(e[a]={}),n(e[a],t[a],i)):e[a]=t[a]}var i=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(a){var s=a.config?a.config():{};return{version:"2.0.6",load:function(a,r,o,c){c=c||{},c.locale&&(s.locale=c.locale);var l,d,u,h=i.exec(a),f=h[1],p=h[4],m=h[5],v=p.split("-"),g=[],b={},y="";if(h[5]?(f=h[1],l=f+m):(l=a,m=h[4],p=s.locale,p||(p=s.locale="undefined"==typeof navigator?"root":(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||"root").toLowerCase()),v=p.split("-")),c.isBuild){for(g.push(l),t(r,"root",g,f,m),d=0;d-1&&a[e];e--)s=a[e],i=t[s],!0!==i&&1!==i||(i=r(f+s+"/"+m)),n(b,i);o(b)})})}}})}(),define("../nls/oauth",{root:{signInTo:"Sign in to",arcgis:"ArcGIS",arcgisLogin:"ArcGIS login",online:"Online",enterprise:"Enterprise",enterpriseLogin:"Enterprise login",signInUsing:"Using",signingIn:"Signing in",accessAccountInfo:"wants to access your ArcGIS Online account information",accessPortalAccountInfo:"wants to access your {portalName} account information",accessEnterpriseInfo:"wants to access your ArcGIS Enterprise account information",account:"account",username:"Username",password:"Password",keepMeSignedIn:"Keep me signed in",signIn:"Sign In",title:"Sign In",cancel:"Cancel",allow:"Allow",recoverUnPwd:"Recover username or password",needHelp:"Forgot username or password?",needHelpPassword:"Forgot password?",needHelpUsername:"Forgot username?",or:"or",invalidSignin:"Invalid username or password.",expiredSession:"Unable to sign in. Make sure you type in your username and password correctly. Your password is case sensitive.",sessionTimedOut:"Your session has timed out. Please try again.",passwordErrorLines:"Unable to sign in
Make sure you type in your username and password correctly.
Your password is case sensitive.",toManyLogins:"Too many invalid logins. Please try again in approximately {duration} minutes.",invalidResetLink:"Your Password reset request has expired. Please try again.",invalidInvitation:"Your invitation code has expired or is not valid. Please refer to your invitation email for further information.",passwordRequired:"Password is required",approve:"Approve",deny:"No Thanks",signInAs:"Sign in with another account",developedBy:"developed by:",developedBy2:"Developed by",developedByOrg:"Developed by {orgname}",googleLogin:"Sign in with Google",facebookLogin:"Sign in with Facebook",esriLogin:"Sign in with Esri",google:"Google",facebook:"Facebook",github:"GitHub",apple:"Apple",signInWithSocial:"Sign in",signInWithEnt:"Sign in",signInWithOrg:"Sign in to {orgname}",orgkeylabel:".maps.arcgis.com",continue:"Continue",backBtn:"< Back",organization:"Organization",myorg:"My Organization",myorgs:"My Organizations",myorgmsg:"Enter your ArcGIS organization's URL below.",yourOrgUrl:"Your ArcGIS organization's URL",addOrgUrl:"Enter another organization",rememberUrl:"Remember this URL",addUrl:"Enter another URL",approvalTitle:"Request for Permission",orgUrlRequired:"A valid organization URL is required.",invalidCharacters:"Invalid characters in organization URL.",tooManyCharacters:"Organization URL is too long.",maxSavedOrgs:"Only 3 URL's can be saved at a time. You can remove a saved URL to remember another.",protocol:"https://",signOutMsg:"You've been successfully signed out.",signOutTitle:"Sign Out",resetPasswordSuccessMsg:"You can now sign in using your new password, and can close this browser window.",resetPasswordSuccessTitle:"Password successfully changed",resetPasswordLinkExpiredOrInvalid:"The Change Password link has expired. Please submit a new request by clicking the Forgot password link on the Sign In page.",resetPasswordLinkExpiredOrInvalidTitle:"Expired / Invalid Change Password Link",userNotMemberOfOrg:"The username you entered is not a member of this organization.",portalUserCantReset:"Please contact your administrator to reset your password.",signinArcgis:"Sign in on ArcGIS Online.",userDisabled:"Your account has been disabled by your organization.",userBlocked:"Your account has been blocked from logging in. Please contact Customer Service for the status of your account.",userExpired:"Your subscription has been cancelled. Please contact Customer Service for assistance.",userInsufficient:"You do not have sufficient user privileges to access this application.",noMsg:"No","or-social":"OR",disabledAccount:"Unable to sign you in. Please contact Customer Service for assistance.",noAccount:"No account?",createPublic:"Create an ArcGIS public account.",createHubAcct:"Create a {hubname} account.",createPortalAcct:"Create an account",createDeveloperAcct:"Create an ArcGIS developer account",notMember:"Not a member of this organization?",signInAgol:"Sign in to your account on ArcGIS Online",signInOrgAcct:"Sign in to your ArcGIS organizational account.",passwordStrength:"Password strength",weakPassword:"Password is too weak.",learnMore:"Click to learn more.",none:"None",weak:"Weak",fair:"Fair",good:"Good",secure:"Strong",privacy:"Privacy",resetPage:{passwordsMust:"Passwords must:",resetTitle:"Reset Password",changeTitle:"Change your password",title:"Reset your password",setTitle:"Set your password",resetPasswordMsg:"It's time to change your password.",resetPasswordPolicyMsg:"It's time to change your password.",showRules:"Follow these rules.",policyMsg:"Follow these rules.",changePasswordBtn:"Change Password",setNewPassword:"Set a new password",oldPasswordLbl:"Old password",newPasswordLbl:"New password",confirmPasswordLbl:"Confirm new password",passwordsMustMatch:"New password and confirm new password values must match.",passwordsMustExist:"Passwords may not be blank.",minimumStrengthRequirement:"Your new password did not meet the minimum strength requirements. Click the link below to learn more about password rules.",minimumStrengthRequirementLink:"Your new password did not meet the minimum strength requirements. Learn more about the password requirements",minimumStrengthRequirementEsri:"The new password must be at least 8 characters and have at least one number and one letter.",unableToReset:"Unable to reset your password. Please try again.",oldPasswordNewPasswordSame:"The new password cannot be the same as the old password.",invalidOldPassword:"The old password was not correct. Please re-enter your old password.",updateOldPassword:"Your password does not meet the ArcGIS Online password requirements. Please update your password.",accountDisabled:"This account has been disabled by your organization.",accountBlocked:"This account has been blocked from logging in. Please contact Customer Service for the status of this account.",incorrectSecurityResponse:"Invalid security response for resetting password.",invalidAnswerOrg:"Invalid security question response. Please contact your organization's administrator for help in resetting your password.",invalidAnswerPublic:"Invalid security question response. Contact Esri Customer Service.",noSecurityPortal:"Either you are using an enterprise account which does not support resetting the password, or the security question and answer has not been configured for your account. Without a valid security question and answer, your password cannot be reset at this time. Please contact your portal administrator to reset your password.",minLength:"Be at least {minLength} characters long",minUpper:"Contain at least {minUpper} upper case letter(s) (A-Z)",minLower:"Contain at least {minLower} lower case letter(s) (a-z)",minLetter:"Contain at least {minLetter} letter(s) (A-Z, a-z)",minDigit:"Contain at least {minDigit} number(s) (0-9)",minOther:"Contain at least {minOther} special (!\"#$%&'()*+,-./\\:;<=>?@[]^_`{|}~) character(s)",historySize:"New Password must be different than the last {historySize} password(s)",cantMatchUsername:"Not match username",weakPassword:"Be hard to guess and not a common word",backBtn:"< Back"},mfaEnablePage:{title:"Multifactor Authentication",step1Title:"Enhance your login security",step1ForcedMfa:"Your organization requires Multifactor Authentication (MFA)",expectAdditionalSteps:"After completing the configuration, expect to complete additional security steps whenever you sign in.",installAuthenticatorApp:"Install a supported authenticator app to your device. This will enable you to receive verification codes.Follow these steps to add an extra level of security to your account. Once you're finished, you'll be asked for additional security information each time you sign in to your account from any computer or device.",esriSupportsApps:"Esri supports authenticator apps using a Time-based One Time Password (TOTP) algorithm.",learnMore:"Learn more",helpLinkMfa:"Learn more about multifactor authentication",step1:"1. Install a supported authenticator app on your phone.",step2:"2. Use the app to scan this QR code:",step3:"3. Once you've scanned the QR code or entered the verification code, enter the six-digit code the app provides.",installApp:"Install a supported authenticator app on your device. Esri supports all authenticator apps that use the Time-based One Time Password (TOTP) algorithm. Search for TOTP authenticator apps in the app store of your choice. A few of the supported apps are listed below.",connectApp:"Connect your authenticator app",scanCode:"Use the installed authenticator app to scan this QR code from your phone or tablet.",qrCodeAlt:"QR Code for multifactor authentication",qrHelpLink:"Can't scan the code?",enterMfaCode:"Enter this verification code into the authenticator app.",enterVerifyCode:"Enter verification code",seedMsg:"Enter the following verification code in the appropriate location of the authenticator app.",mfaVerifyMsg:"Use your authenticator app to generate a six-digit code in order to complete the sign in process.",authCodeLbl:"Enter code:",authCodeLbl2:"Enter the code your authenticator app provided:",enterCode:"Enter the six-digit verification code the authenticator app provides.",sixdigitcode:"6 digit code",prevBtn:"Back",nextBtn:"Next",doneBtn:"Done",finishBtn:"Finish",verifyBtn:"Verify",verifying:"Verifying",invalidVerificationCode:"Invalid verification code",invalidRecoveryCode:"Invalid recovery code",invalidSecurityKey:"Invalid security key",havingTrouble:"Still having trouble signing in?",exitMfa:"Exit multifactor setup",exitMfaSetup:"If you exit the setup, you will not be asked to enter a verification code when you sign in.",cancelMfa:"Yes",cancelMfaSetup:"Are you sure you want to proceed without enabling multifactor authentication?",continueSetup:"Stay",exitSetup:"Leave",missingCode:"A valid 6 character code is required",missingRecoveryCode:"A valid recovery code is required",authenticateWith:"Authenticate with",securityKey:"Security key",authenticatorApp:"Authenticator app",lostAccess:"Lost access? Use recovery code",useRecoveryCode:"Use a recovery code",enterRecoveryCode:"Enter one of your saved recovery codes to access your account",recoveryCode:"Recovery code",verifyingKey:"Verifying security key",rememberChoice:"Remember my choice?",returnToSignIn:"Return to sign in",verifyingKeyCancelled:"Verifying security key cancelled",tooManyAttempts:"Too many invalid attempts",lockoutMessage:"Please close this page and try again in 15 minutes."},securityKeysPage:{title:"Security Keys",lastUsed:"Last used",edit:"Edit",remove:"Remove",registerKey:"Register security key",manageKeys:"Manage security keys",registerNewKey:"Register new security key",keyName:"Security key alias",aliasIsPrivate:"Security key alias is only visible to you",cancel:"Cancel",register:"Register a key",securityKeys:"Security keys",registerNew:"Register new key",completeRegistration:"Complete registration",close:"Close",editKeyName:"Edit security key alias",updateKey:"Update key",save:"Save",deleteKey:"Delete security key",deleteConfirm:'Are you sure you want to delete "{keyname}"?',delete:"Delete",securityKeyDesc:"Security keys allow you to complete second step verification more securely and conveniently.",singleKeyWarning:"Only one security key is registered.
We recommend adding at least two in case one is lost or stolen.",expiredSession:"Your session has expired. You can not add, update, or remove keys at this time. Please close this window and try again.",noPermission:"You do not have permission to perform this action at this time.",alreadyRegistered:"This security key is already registered in your account.",aliasInUse:"This security key alias is already registered in your account. Each security key alias must be unique within your account.",timedOutOrCancel:"The operation timed out or you canceled the registration.",serverError:"The server could not be reached to complete the operation at this time. Please try again later.",keynameRequired:"The security key alias is required",keyRegistered:"Security Key registered",keyRegisteredDesc:"You have successfully registered a security key. From now on, you may use it to sign in with 2-step verification."},recoveryCodesPage:{title:"Recovery Codes",saveRecoveryCodes:"Save recovery codes",saveCodesReason:'Keep these codes safe, but accessible. They won\'t be shown again. These are one-time passcodes that will allow you to log in when you are away from your device.',print:"Print",download:"Download",saveCodesCheck:"I have saved the recovery codes",mustSaveCodes:"You must save the recovery codes to continue.",continue:"Continue",done:"Done",skip:"Skip for now",mfaActivated:"Multifactor authentication activated",mfaNextStep:"You've just added a second-step verification. Adding an additional security key can be more secure and convenient.",securityKeyDesc:"Security keys can include USB security keys, Face ID, fingerprint readers, or your phone.",securityRec:"Security recommendation"},forgotPassword:{title:"Request for Assistance",forgotUsernameMsg:"Please provide the information requested below associated with your login. We'll send you an email with a way to resolve the issue.",forgotUserPass:"Forgot username or password?",forgotPass:"Forgot password",retrieveUser:"Retrieve username",emailLbl:"Email",sendBtn:"Send",usernameLbl:"Username",continueBtn:"Continue",passwordLbl:"Password",forgotMyLbl:"I forgot my",finishedMsg:"Please check your email for a message that will help you resolve this issue.",backBtn:"< Back",okBtn:"OK",back:"Back",continue:"Continue",provideInformation:"Provide the information requested below associated with your login.",provideEmail:"Please provide the email address associated with your ArcGIS account.",provideUsername:"Please provide the username associated with your ArcGIS account.",missingInformation:"Please provide the information below.",invalidEmail:"Email does not appear to be valid.",inputError:"Please provide the information requested"},termsOfUse:{approve:"Accept",deny:"Do Not Accept",termsConditions:"Terms and Conditions",decline:"Decline",ok:"OK"},createAccount:{title:"Create ArcGIS Account",title_smx:"Create Account",titleJoin:"Join {orgname}",windowTitle:"Create Account",joinWindowTitle:"Join Organization",acceptTermsTitle:"Accept Terms and Conditions",createPublic:"Create an ArcGIS Public Account",setupPublic:"Set up your ArcGIS Public Account",readTermsOfUseMsg:'Review the Esri Master Agreement and Privacy Policy',touOtherLanguages:"Review the Esri Master Agreement and Privacy Policy in other select languages",acceptTermsOfUse:"I accept and agree to be legally bound by the Esri ArcGIS Online Terms of Use and Privacy Policy.",acceptTermsOfUse1:'I agree to Esri\'s Terms of Use. Review the Terms of Use in other select languages.',acceptTermsOfUse2:'I agree to Esri\'s Esri\'s Privacy Statement. Learn more about privacy at Esri.',acceptLegal:"I accept and agree to be legally bound by",arcgisTou:"Esri Master Agreement",arcgisPrivacy:"Esri ArcGIS Online Privacy Policy",arcgisPrivacy_gae:"Esri Privacy Policy",hubTou:"{hubname} Terms of Use and Privacy Policy",createAccountBtn:"Create account",createNewAccount:"Create a new account",cancelBtn:"Cancel",noAccountMsg:"We just need you to create an ArcGIS Public Account associated with your {provider} credentials.",createNewAccountBtn:"Continue",createAccountOptions:"You can either:",createAccountOption1:"Create a new ArcGIS Public Account that you can sign in to with your {provider} credentials.",createAccountOption2:"Sign in to your existing account using the credentials you have already established for it.",useOtherCredentialsBtn:"Cancel",google:"Google",facebook:"Facebook",social:"providers",signInFailed:"You're Almost Done",createNewAccountMsg:"An ArcGIS Public Account is a personal account with limited usage and capabilities and is meant for non-commercial use only.",publicAcctLimit:"An ArcGIS public account is a free account designed for personal, non-commercial use.",publicAcctCanDo:"With a public account you can",publicAcctCan1:"Create, store, and manage maps, scenes, layers, apps, and other geospatial content.",publicAcctCan2:"Share content with others.",publicAcctCan3:"Access content shared by Esri and GIS users around the world.",createHubAcct:"Create a {hubname} account",setupHubAcct:"Set up your {hubname} account",hubAcctCanDo:"A {hubname} account allows you to",hubAcctCan1:"Follow initiatives and events for updates",hubAcctCan2:"Sign up to attend events",hubAcctCan3:"Create web maps and story maps",firstName:"First name",lastName:"Last name",nameLbl:"Name",email:"Email",confirmEmail:"Confirm email",promptEmailMsg:"Please enter your email address",promptUsernameMsg:"We've selected this username for you. You can change it if you want.",promptUsernameTitle:"Here's your username",cancelUsernameBtn:"Cancel",usernameLbl:"Username",passwordLbl:"Password",usernameHelpTip:"Usernames must be between 6 and 128 characters in length.",usernameTakenError:"The username {username} is not available. Please select another username.",cancelEmailBtn:"Cancel",nextBtn:"Next",missingEmail:"Please provide an email below.",missingUsername:"Please provide a username below.",or:"OR",createAcctWith:"Create account with",usernameMust:"The username must",usernameReq1:"Be between 6 and 128 characters in length",usernameReq2:"Not include special characters other than . (dot), _ (underscore), @ (at sign), and - (hyphen)",usernameReq3:"Not include non-alphanumeric characters",usernameReq4:"Not include spaces",usernameReq5:"Not include a . (dot), - (hyphen), _ (underscore) or @ (at sign) as the first or last character of the username",passwordMust:"The password must",passwordReq1:"Not match the username",passwordReq2:"Be at least 8 characters in length",passwordReq3:"Have at least one letter",passwordReq4:"Have at least one number",retypePassword:"Retype password",confirmPassword:"Confirm password",securityQuestion:"Security question",selectOne:"Select one",answer:"Answer",joiningOrg:"By joining {organization}:",invalidSignupTitle:"Activation Expired",invalidSignup:"Account Activation Expired",invalidSignupMsg:"The activation link to create your account has expired. Return to the Sign In page to try again.",itemsMsg:"Any items you have in the account you sign in with will become part of the organization's content and can be modified or deleted by the administrator.",accountManagedMsg:"Your account will be managed by the administrator who may reset your password, change your email address, and determine access to My Esri and Community and Forums.",leaveOrganization:"If you leave the organization your username may be removed from ArcGIS Online. Your access to Esri websites may be disabled as well, which can include training classes and support incidents.",convertPublic:"Convert your ArcGIS Public Account",transferItems:"Choosing this option will make {orgname} the owner of your account.",createAccountUsing:"Create an account using",usernamePassword:"A username and password",joinTransferTitle:"Join and transfer ownership of {username} to {orgname}",transferPoint1:"You are transferring ownership of this account to {orgname}.",transferPoint2:"All the content in your account will transfer to the organization.",transferPoint3:"The administrators of the organization will have complete access to modify items and groups, change passwords, control access to Esri websites, and to delete the account completely.",transferPoint4:"All your shared items will become private.",transferPoint5:"You will be removed from all groups except your own. Any members in your groups will be removed.",transferPoint6:"If you leave the organization you will not be able to use this account to access any Esri websites, including training classes and support incidents.",joinTransfer:"Join and transfer",errors:{missing_firstName:"First name is required.",missing_lastName:"Last name is required.",missing_email:"Email is required.",missing_confirm:"Email is required.",missing_username:"A valid username is required.",missing_password:"A valid password is required.",missing_confirmPass:"A matching password is required.",missing_oldPassword:"Must provide a password.",missing_answer:"Must provide an answer to security question.",missing_question:"A security question is required.",missing_terms:"Must agree to Master Agreement.",missing_hubterms:"Must agree to Terms of Use.",missing_smxterms:"Must agree to Terms and Conditions.",missing_privacy:"Must agree to Privacy Policy.",missing_conduct:"Must agree to the Code of Conduct.",missing_orgName:"Must provide a valid organization name.",missing_orgKey:"Must provide a valid short name.",missing_profile:"A profile handle is required.",invalid_email:"Email address is not valid.",invalid_username:"Must provide a valid username.",invalid_password:"Must provide a valid password.",invalid_confirmPass:"Passwords must match.",invalid_firstName:"Name can not be over 40 characters.",invalid_lastName:"Name can not be over 40 characters.",unmatched_email:"Emails must match.",taken_username:"This username is already taken. Please select another username.",taken_shortname:"This short name is already taken. Please select another short name.",invalid_answer:"Answer is not valid or contains invalid characters.",common_password:"Password is too commonly used or easily guessed.",weak_password:"Password doesn't meet the minimum strength requirements.",long_name:"Name can not be over 40 characters.",long_firstName:"First name can not be over 40 characters.",long_lastName:"Last name can not be over 40 characters.",long_orgName:"The organization name can not be over 55 characters.",long_orgKey:"The organization short name can not be over 16 characters.",long_username:"The username can not be over 128 characters.",short_username:"The username must be at least 6 characters."}},securityQuestion:{title:"Change your password",windowTitle:"Update security question",securityQuestionMsg:"First, please answer your security question.",securityQuestionMfaMsg:"Please answer your security question. If you answer it correctly, your organization's administrator will receive a request to disable your multifactor authentication setting, allowing you to sign in with just your username and password. You'll receive an email letting you know when you can do so.",securityQuestionMfaMsg2:"Request that your administrator disable multifactor authentication for your account, allowing you to sign in with just your username and password. You'll receive an email letting you know when you can sign in.",securityQuestion:"Email:",securityQuestionPrompt:"Security answer is not case sensitive.",securityQuestionPromptEnt:"Security answer is case sensitive.",continueBtn:"Continue",backBtn:"< Back",answerMustExist:"Security answer may not be blank.",answerSecurityQuestion:"To reset your password, first answer your security question. The answer is not case-sensitive.",answerSecurityQuestionEnt:"To reset your password, first answer your security question. The answer is case-sensitive.",noSecurityQuestionTitle:"No security question",noSecurityQuestion:"There is not a security question set for your account. Please contact your ArcGIS Online Administrator for assistance.",setSecurityQuestionTitle:"You must set up a security question and answer to continue signing in. The security question will be used to identify and recover your password if you ever forget it",yourAnswer:"Your answer",finishedTitle:"Password Changed",finishedTitleMfa:"Disable MFA Request Sent",finishedMessage:"Your password has been successfully changed.",finishedMfaMessage:"Your organization's administrators will receive a request to disable your multifactor authentication setting, allowing you to sign in with just your username and password. You'll receive an email letting you know when you can do so.",okBtn:"OK",securityQuestionHelp:"Security answer is not case sensitive.",securityQuestionHelpEnt:"Security answer is case sensitive.",newPasswordHelp:"Now supply a new password.",disableMfa:"Disable multifactor authentication"},selectUser:{windowTitle:"Select Account",tutorialPanel:"Please select the account you'd like to use.",titleTemplate:"You have multiple accounts that use your {providerName} credentials.",altText:"Profile image for {username}",signInToOrg:"Sign in to an organization",signInToAcct:"Sign in to an account",userProfileImg:"User profile image"},updateProfile:{windowTitle:"Select Account",tutorialPanel:"Please select the account you'd like to use.",titleTemplate:"You have multiple accounts that use your {providerName} credentials.",altText:"Profile image for {username}",securityQuestionMessage:"A security question has not been set for your account. Setting a security question and answer allows you to reset your password if needed. Choose a question from the drop down menu below and enter your answer in the input box provided.",notRightNow:"Not right now",okBtn:"OK",answerLbl:"Answer:",securityQuestionLbl:"Security Question:",securityQuestionTitle:"Security Question and Answer",missingAnswer:"Please provide an answer to the selected security question.",identityAnswerTooLong:"The answer to your security question may not be more than 60 characters."},email:{title:"Email sent",emailSent:"An email has been sent to you.",activationSent:"An activation link has been sent to your email.",furtherInstructions:"Check the email associated with your account for further instructions.",passwordInstructions:"You will receive an email with further instructions to reset your password if this username exists in ArcGIS Online.",usernameInstructions:"You will receive an email with your username if this email address is associated with an ArcGIS Online Account.",passwordInstructionsEnt:"You will receive an email with further instructions to reset your password if this username exists.",usernameInstructionsEnt:"You will receive an email with your username if this email address is associated with an account.",clickLink:"Click the link in the email to complete account activation.",returnSignIn:"Return to sign in",returnArcgis:"Return to ArcGIS.com"},verify:{title:"Email verification",notVerified:"Your email has not been verified.",sendVerificationEmail:"Send a verification email to {userEmail}",verifyYourEmail:"Verify your email",verifyEmail:"Send verification email",skipForNow:"Skip for now",emailSent:"An email has been sent to you.",checkEmailForCode:"Check the email that's associated with your account for the verification code.",sixDigitCode:"Verification code",verify:"Verify",sendAnotherCode:"Send me another code",codeInvalid:"Code is invalid or expired.",emailVerified:"Your email has been verified.",continue:"Continue",codeRequired:"Verification code is required",sendMeCode:"Send me a code",haveCode:"I have a code",emailSentDesc:"An email has been sent to {userEmail} with a verification code.",verifyJustification:"Ensuring that you have a valid email address helps you receive important information from ArcGIS Online, such as password resets and account changes.",checkSpamFolder:"Email may be treated as spam. Check spam folder.",checkAllFolders:"Make sure to check all email folders."},activate:{activateOrg:"Activate your organization",setupOrg:"Set up your organization",setupUser:"Set up your account",chooseMethod:"Choose a method to activate your organization subscription.",createNew:"Create a new ArcGIS organization",convertTrial:"Convert your Organization trial to a subscription",convertPublic:"Convert your public account to an organization subscription",chooseAuthMethod:"Choose your sign in method for this account",basicOrgSettings:"Provide the basic settings for your organization.",orgName:"Organization name",orgNameDesc:"Your organization's name appears on your home page and any correspondence with members of your organization.",orgNameDesc_gae:"Your organization's name appears on your dashboard.",orgKey:"Organization short name",orgKeyDesc:"This is a name for your organization that uniquely defines its URL. Carefully consider the name you want to use.",region:"Region",regionDesc:"This determines your organization's basemap and extent defaults, which can be customized in the Map tab under Organization Settings.",eueip:"Esri User Experience Improvement Program",eueipDesc:"ArcGIS Online works continuously to improve our products and one of the best ways to find out what needs improvement is through customer feedback. The Esri User Experience Improvement program (EUEI) allows your organization to contribute to the design and development of ArcGIS Online. The program collects information about the usage of ArcGIS Online including hardware and browser characteristics, without interrupting work. The program is completely optional and anonymous; none of the information collected is used to identify or contact members of your organization.", eueipDesc_gae:"Esri works continuously to improve our products and one of the best ways to find out what needs improvement is through customer feedback. The Esri User Experience Improvement program (EUEI) allows your organization to contribute to the design and development of Esri products. The program collects information about the usage of Esri products including hardware and browser characteristics, without interrupting work. The program is completely optional and anonymous; none of the information collected is used to identify or contact members of your organization.",sendData:"Send anonymous usage data",accountDetails:"Provide your account details",setupLogin:"Setup your login",userType:"User type",finishSetup:"Finish setup",showMore:"Show more",showLess:"Show less",title:"Activate",convertHeading:"Convert your Account?",convertTitle:"Converting an ArcGIS Public Account",convertWarning:"By converting your ArcGIS Public Account to a Personal Use subscription, all of your data and groups associated with your public account will now be included with the personal use subscription. This cannot be reverted.",convertBtn:"Upgrade account",convertError:"Your user is already associated with another organization. Use an ArcGIS Public Account to activate your subscription.",missingSocialEmail:"Unable to activate subscription. Unable to retrieve the email address associated with your social account. Please check your social account settings."},securityQuestions:{1:"What city were you born in?",2:"What was your high school mascot?",3:"What is your mother's maiden name?",4:"What was the make of your first car?",5:"What high school did you go to?",6:"What is the last name of your best friend?",7:"What is the middle name of your youngest sibling?",8:"What is the name of the street on which you grew up?",9:"What is the name of your favorite fictional character?",10:"What is the name of your favorite pet?",11:"What is the name of your favorite restaurant?",12:"What is the title of your favorite book?",13:"What is your dream job?",14:"Where did you go on your first date?"},smx:{back:"Back",signinEmail:"Sign in with email",emailLbl:"Email",password:"Password",signin:"Sign in",signupSignin:"Sign up or Sign in",continue_facebook:"Continue with Facebook",continue_google:"Continue with Google",continue_apple:"Continue with Apple",continue_linkedin:"Continue with LinkedIn",continue_email:"Continue with email",or:"Or",enterEmail:"Enter your email",next:"Next",forgotPass:"Forgot your password?",invalidSignin:"Invalid username or password.",expiredSession:"Unable to sign in. Make sure you type in your username and password correctly. Your password is case sensitive.",sessionTimedOut:"Your session has timed out. Please try again.",passwordErrorLines:"Unable to sign in
Make sure you type in your username and password correctly.
Your password is case sensitive.",toManyLogins:"Too many invalid logins. Please try again in approximately {duration} minutes.",invalidResetLink:"Your Password reset request has expired. Please try again.",invalidInvitation:"Your invitation code has expired or is not valid. Please refer to your invitation email for further information.",userNotMemberOfOrg:"The username you entered is not a member of this organization.",userDisabled:"Your account has been disabled by your organization.",userBlocked:"Your account has been blocked from logging in. Please contact Customer Service for the status of your account.",userExpired:"Your subscription has been cancelled. Please contact Customer Service for assistance.",userInsufficient:"You do not have sufficient user privileges to access this application.",disabledAccount:"Unable to sign you in. Please contact Customer Service for assistance.",signupSuccess:"Your account has been activated!
Sign in to get started.",arcgisStorymapsLink:"Looking for ArcGIS StoryMaps?
Go to storymaps.arcgis.com",securityQuestions:{1:"What city were you born in?",2:"What was your high school mascot?",3:"What is your mother's maiden name?",4:"What was the make of your first car?",5:"What high school did you go to?",6:"What is the last name of your best friend?",7:"What is the middle name of your youngest sibling?",8:"What is the name of the street on which you grew up?",9:"What is the name of your favorite fictional character?",10:"What is the name of your favorite pet?",11:"What is the name of your favorite restaurant?",12:"What is the title of your favorite book?",13:"What is your dream job?",14:"Where did you go on your first date?"},footer:{privacy:"Privacy",contact:"Contact us",terms:"Terms of Use"},forgotPassword:{title:"Request for Assistance",forgotPass:"Forgot your password?",email:"Email",enterEmail:"Enter your email",sendRecovery:"Send recovery email",invalidEmail:"Email does not appear to be valid.",inputError:"Please provide the information requested."},email:{title:"Email sent",emailSent:"An email has been sent to you.",activationSent:"Your account activation email has been sent to you.",furtherInstructions:"Check the email associated with your account for further instructions.",clickLink:"Click the link in the email to get started with StoryMaps.",returnSignIn:"Return to Sign in"},securityQuestion:{finishedMfaMessage:"Your organization's administrators will receive a request to disable your multifactor authentication setting, allowing you to sign in with just your username and password. You'll receive an email letting you know when you can do so.",answerSecurityQuestion:"To reset your password, first answer your security question. The answer is not case-sensitive.",disableMfa:"Disable multifactor authentication",securityQuestionMfaMsg2:"Answer your security question to request that your administrator disable multifactor authentication for your account. This will enable you to sign in with just your user name and password. You'll receive an email letting you know when you can do so.",continueBtn:"Continue"},resetPage:{title:"Reset your password",changePasswordBtn:"Change password",setNewPassword:"Set a new password",oldPasswordLbl:"Old password",newPasswordLbl:"New password",confirmPasswordLbl:"Confirm new password",cantMatchUsername:"Not match email",minLength:"Be at least {minLength} characters long",minUpper:"Contain at least {minUpper} upper case letter(s) (A-Z)",minLower:"Contain at least {minLower} lower case letter(s) (a-z)",minLetter:"Contain at least {minLetter} letter(s) (A-Z, a-z)",minDigit:"Contain at least {minDigit} number(s) (0-9)",minOther:"Contain at least {minOther} special (!\"#$%&'()*+,-./\\:;<=>?@[]^_`{|}~) character(s)",historySize:"New password must be different than the last {historySize} password(s)",oldPasswordNewPasswordSame:"The new password cannot be the same as the old password.",minimumStrengthRequirementLink:"Your new password did not meet the minimum strength requirements. Learn more about the password requirements",unableToReset:"Unable to reset your password. Please try again.",passwordsMustMatch:"New password and confirm new password values must match.",incorrectSecurityResponse:"Invalid security response for resetting password.",invalidPassword:"Invalid password",updateOldPassword:"Your password does not meet the ArcGIS Online password requirements. Please update your password."},updateProfile:{securityQuestionMessage:"A security question has not been set for your account. Setting a security question and answer allows you to reset your password if needed. Choose a question from the drop-down menu below and enter your answer in the field that follows.",answerLbl:"Answer:",okBtn:"OK",securityQuestionLbl:"Security Question:",securityQuestionTitle:"Security Question and Answer",missingAnswer:"Provide an answer to the selected security question.",identityAnswerTooLong:"The answer to your security question may not be more than 60 characters."},createAccount:{confirmDetails:"Confirm account details",email:"Email",createdWithEmail:"Your account will be created with this email",imported_facebook:"This email was imported from your Facebook account and cannot be changed",imported_google:"This email was imported from your Google account and cannot be changed",imported_apple:"This email was imported from your Apple account and cannot be changed",imported_linkedin:"This email was imported from your LinkedIn account and cannot be changed",passwordLbl:"Password",createPassword:"Create a password",passwordMust:"The password must",passwordReq1:"Not match your email",passwordReq2:"Be at least 8 characters in length",passwordReq3:"Have at least one letter",passwordReq4:"Have at least one number",confirmPassword:"Confirm password",securityQuestion:"Security question",selectOne:"Select one",answer:"Answer",firstName:"First name",lastName:"Last name",enterFirstName:"Enter your first name",enterLastName:"Enter your last name",enterAnswer:"Enter your answer",profileUrl:"Public Profile URL",learnMore:"Learn more",profileUrlPermanent:"This profile URL cannot be changed after your account is created",acceptSmxTandC:"I accept the terms of use and privacy policy",acceptConduct:"I accept the code of conduct",receiveNewsletter:"I want to receive the newsletter",createAccountBtn:"Create account",cancelEmailBtn:"Cancel",creatingAccount:"Creating account...",errors:{missing_firstName:"First name is required.",missing_lastName:"Last name is required.",missing_email:"Email is required.",missing_confirm:"Email is required.",missing_username:"A valid email address is required.",missing_password:"A valid password is required.",missing_confirmPass:"A matching password is required.",missing_oldPassword:"Must provide a password.",missing_answer:"Must provide an answer to security question.",missing_question:"A security question is required.",missing_terms:"Must agree to Master Agreement.",missing_hubterms:"Must agree to Terms of Use.",missing_smxterms:"Must agree to Terms and Conditions.",missing_privacy:"Must agree to Privacy Policy.",missing_conduct:"Must agree to the Code of Conduct.",missing_orgName:"Must provide a valid organization name.",missing_orgKey:"Must provide a valid short name.",missing_profile:"A profile handle is required.",invalid_email:"Email address is not valid.",invalid_email_chars:"The email cannot contain special characters other than . (dot), _ (underscore), @ (at sign), and - (hyphen).",invalid_username:"Must provide a valid email address.",invalid_username_chars:"The email cannot contain special characters other than . (dot), _ (underscore), @ (at sign), and - (hyphen).",invalid_password:"Must provide a valid password.",invalid_confirmPass:"Passwords must match.",invalid_firstName:"Name can not be over 40 characters.",invalid_lastName:"Name can not be over 40 characters.",invalid_profile:"The profile handle cannot include spaces or special characters other than . (dot), _ (underscore), @ (at sign), and - (hyphen) and must start with an alphanumeric character.",unmatched_email:"Emails must match.",taken_username:"This email address is already taken. Please select another email.",taken_shortname:"This short name is already taken. Please select another short name.",taken_profile:"This profile URL is already taken. Please select another URL.",invalid_answer:"Answer is not valid or contains invalid characters.",common_password:"Password is too commonly used or easily guessed.",weak_password:"Password doesn't meet the minimum strength requirements.",long_email:"The email can not be over 128 characters.",long_name:"Name can not be over 40 characters.",long_firstName:"First name can not be over 40 characters.",long_lastName:"Last name can not be over 40 characters.",long_orgName:"The organization name can not be over 55 characters.",long_orgKey:"The organization short name can not be over 16 characters.",long_profile:"The profile handle can not be over 128 characters.",long_username:"The email can not be over 128 characters.",short_email:"The email must be at least 6 characters.",short_profile:"The profile handle must be at least 6 characters.",short_username:"The email must be at least 6 characters."}},verify:{title:"Email verification",notVerified:"Your email has not been verified.",sendVerificationEmail:"Send a verification email to {userEmail}",verifyYourEmail:"Verify your email",verifyEmail:"Send verification email",skipForNow:"Skip for now",emailSent:"An email has been sent to you.",checkEmailForCode:"Check the email that's associated with your account for the verification code.",sixDigitCode:"Verification code",verify:"Verify",sendAnotherCode:"Send me another code",codeInvalid:"Code is invalid or expired.",emailVerified:"Your email has been verified.",continue:"Continue",codeRequired:"Verification code is required",sendMeCode:"Send me a code",haveCode:"I have a code",emailSentDesc:"An email has been sent to {userEmail} with a verification code.",verifyJustification:"Ensuring that you have a valid email address helps you receive important information from StoryMaps, such as password resets and account changes.",checkSpamFolder:"Email may be treated as spam. Check spam folder.",checkAllFolders:"Make sure to check all email folders."}}},ar:1,bg:1,bs:1,ca:1,cs:1,da:1,de:1,el:1,es:1,et:1,fi:1,fr:1,he:1,hi:0,hr:1,hu:1,id:1,it:1,ja:1,ko:1,lt:1,lv:1,nl:1,nb:1,pl:1,"pt-br":1,"pt-pt":1,ro:1,ru:1,sk:1,sl:1,sr:1,sv:1,tr:1,th:1,uk:1,vi:1,"zh-cn":1,"zh-hk":1,"zh-tw":1}),define("socialHelper",["./icons","i18n!../nls/oauth"],function(e,t){return{addSocialInfo:function(n){n.getSocialIcon=function(){return e[this]},n.capitalize=function(){var e=this;return e&&e.length&&(e=t[e]),e},n.continueWith=function(){var e=this;return e&&e.length&&(e=t.smx["continue_"+e]),e},n.socialProviders&&n.socialProviders.length&&n.socialProviders.length>3&&(n.socialIconsOnly=!0)}}}),define("text!components/../../contents/socialLogin.html",[],function(){return'\n'}),define("components/SocialLogin",["helpers","../socialHelper","./Section","text!../../contents/socialLogin.html"],function(e,t,n,i){function a(e){e.template=i,n.call(this,e)}return a.prototype=Object.create(n.prototype),e.extend(a.prototype,{defaultClass:"social-login",constructor:a,render:function(){t.addSocialInfo(this.authInfo),n.prototype.render.call(this)},addEventHandlers:function(){n.prototype.addEventHandlers.call(this)}}),a}),define("text!components/../../contents/createAcctLink.html",[],function(){return'
\n {{i18n.noAccount}} \n {{^info.isPortal}}\n {{#info.publicSignup}}\n \n {{#info.hubRelated}}{{i18n.createHubAcct}}{{/info.hubRelated}}\n {{^info.hubRelated}}{{i18n.createPublic}}{{/info.hubRelated}}\n \n {{/info.publicSignup}}\n {{#info.esriSignup}}\n {{i18n.createPortalAcct}}\n {{/info.esriSignup}}\n {{#info.developerSignup}}\n {{i18n.createDeveloperAcct}}\n {{/info.developerSignup}}\n {{/info.isPortal}}\n {{#info.isPortal}}\n {{i18n.createPortalAcct}}\n {{/info.isPortal}}\n
\n'}),define("components/CreateAcctLink",["calcite-web","helpers","./Section","text!../../contents/createAcctLink.html"],function(e,t,n,i){function a(e){this.hubRelated=e.info&&(e.info.hubEnabled||e.info.isCommunity),e.template=i,n.call(this,e)}return a.prototype=Object.create(n.prototype),t.extend(a.prototype,{defaultClass:"create-acct",constructor:a,render:function(){if(this.hubRelated&&(this.authInfo.hubRelated=!0,this.setHubInfo()),this.authInfo.isPortal&&(this.authInfo.portalhost=t.getPortal()),n.prototype.render.call(this),this.hubRelated){var e=t.byId("createAcctLink");e&&(e.innerHTML=t.sub(e.innerHTML,{hubname:this.authInfo.hubname}))}},addEventHandlers:function(){n.prototype.addEventHandlers.call(this)},setHubInfo:function(){var e=this.authInfo,t=e.isCommunity?e.orgName:e.companionOrganizations&&e.companionOrganizations[0]&&e.companionOrganizations[0].orgName;e.hubname=t}}),a}),define("text!components/../../contents/appInfo.html",[],function(){return'
\n {{^info.isPortal}}\n {{info.appTitle}} {{i18n.accessAccountInfo}} \n {{/info.isPortal}}\n {{#info.isPortal}}\n {{info.appTitle}} {{i18n.accessPortalAccountInfo}}\n {{/info.isPortal}}\n {{#info.appOrgInfo}}\n \n \n {{&icons.help}}\n \n \n {{/info.appOrgInfo}}\n
\n'}),define("text!components/../../contents/appInfoModal.html",[],function(){return'{{#info.appOrgInfo}}\n\n{{/info.appOrgInfo}}\n'}),define("components/AppInfo",["helpers","calcite-web","./Section","text!../../contents/appInfo.html","text!../../contents/appInfoModal.html"],function(e,t,n,i,a){function s(t){t.template=i+a,t.type="div",t.parent=e.byId("appInfo"),n.call(this,t)}return s.prototype=Object.create(n.prototype),e.extend(s.prototype,{defaultClass:"app-info",constructor:s,render:function(){n.prototype.render.call(this),this.authInfo.isPortal&&(this.parent.innerHTML=e.sub(this.parent.innerHTML,{portalName:this.authInfo.orgName}))},addEventHandlers:function(){n.prototype.addEventHandlers.call(this),t.nodeListToArray(e.query(".js-modal-toggle")).forEach(function(e){t.addEvent(e,"keydown",function(e){"Tab"!==e.key&&9!==e.keyCode&&(e.preventDefault(),"Space"!=e.key&&"Enter"!=e.key&&0!=e.keyCode&&13!=e.keyCode&&32!=e.keyCode||e.target.click())})})}}),s}),define("text!components/../../contents/arcgisLinkback.html",[],function(){return'
\n {{i18n.notMember}}
\n \n {{i18n.signInAgol}}\n \n
\n'}),define("components/ArcgisLinkback",["calcite-web","helpers","./Section","text!../../contents/arcgisLinkback.html"],function(e,t,n,i){function a(e){e.template=i,n.call(this,e)}return a.prototype=Object.create(n.prototype),t.extend(a.prototype,{defaultClass:"agol-linkback",constructor:a,render:function(){this.authInfo.linkbackUrl=this._getAgolLink(),n.prototype.render.call(this)},addEventHandlers:function(){n.prototype.addEventHandlers.call(this)},_getAgolLink:function(){var e=this.authInfo,t=this.authInfo.refUrl&&"function"==typeof URL&&new URL(this.authInfo.refUrl)||window.location,n=e.orgUrlBase.split("."),i=n.shift();i=i.replace("maps",""),0===i.length?i="www":"qa"==i&&(i="qaext"),n.unshift(i);var a=t.protocol+"//"+n.join(".")+this.authInfo.contextPath+"/rest/oauth2/authorize";if(t.search.length){var s=window.opener?t.search:this._replaceOrgKey(t.search,n.join("."));s=this._stripResourceItem(s),a+=s+t.hash}else a+="?oauth_state="+this.authInfo.oauth_state;return a},_replaceOrgKey:function(e,t){var n="%2F([A-Za-z0-9_\\-]+\\."+this.authInfo.orgUrlBase.split(".").join("\\.")+")",i=e.match(new RegExp(n));if(i&&i[1]){var a=new RegExp(i[1],"g");e=e.replace(a,t)}return e},_stripResourceItem:function(e){return e=e.slice(1),"?"+e.split("&").filter(function(e){return-1==e.indexOf("resourceItemId")}).join("&")}}),a}),define("text!../contents/signin.html",[],function(){return'
\n
\n
\n
\n
\n

\n {{^info.orgName}}\n {{#info.join}}{{i18n.createAccount.joinWindowTitle}}{{/info.join}}\n {{^info.join}}\n {{^info.gaeFocus}}{{i18n.signInWithEnt}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{i18n.signIn}}{{/info.gaeFocus}}\n {{/info.join}}\n {{/info.orgName}}\n {{#info.orgName}}\n {{#info.join}}{{i18n.createAccount.titleJoin}}{{/info.join}}\n {{^info.join}}{{i18n.signInWithOrg}}{{/info.join}}\n {{/info.orgName}}\n

\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n
\n {{#info.join}}\n

{{i18n.createAccount.convertPublic}}

\n {{/info.join}}\n
\n
\n
\n
\n'}),define("text!../contents/signin_smx.html",[],function(){return'
\n {{> header}}\n
\n \n {{#info.username}}\n

{{i18n.signinEmail}}

\n
\n
\n \n \n \n \n \n
\n \n
\n {{/info.username}}\n {{^info.username}}\n

{{i18n.signupSignin}}

\n
\n
\n \n \n
{{i18n.or}}
\n
\n \n
\n \n \n
\n
\n
\n
\n {{/info.username}}\n \n
\n {{&i18n.arcgisStorymapsLink}}\n
\n \n
\n {{> footer}}\n
\n'}),define("text!../contents/header_smx.html",[],function(){return'\n'}),define("text!../contents/footer_smx.html",[],function(){return'\n'}),define("signIn",["calcite-web","helpers","mustache","config","components/PrivacyLink","components/ArcgisLogin","components/MyOrgs","components/EnterpriseInfo","components/SocialLogin","components/CreateAcctLink","components/AppInfo","components/ArcgisLinkback","socialHelper","icons","i18n!../nls/oauth","text!../contents/signin.html","text!../contents/signin_smx.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r,o,c,l,d,u,h,f,p,m,v,g,b){return{hubRelated:!1,smxFocus:!1,startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,t.setTitle(p.title||p.windowTitle),t.checkRTL(n.locale),this.smxFocus="storymapsexpress"==n.client_id.toLowerCase(),this.gaeFocus="geoanalyticsengine"==n.client_id.toLowerCase(),n.prePopulatedUsername&&(n.username=n.prePopulatedUsername),this.render(n),this.compose(n),e.init(),t.setContrastInfo()},render:function(e){var i=t.queryOne(".content-container");e.hostname=t.getPortalHostname(e,e.refUrl);var a=m;this.smxFocus&&(a=v,h.addSocialInfo(e),p=p.smx),this.gaeFocus&&(e.gaeFocus=!0),i.innerHTML=n.render(a,{info:e,i18n:p,icons:f},{header:g,footer:b})},orderMethods:function(e){var t=e.socialProviders?e.socialProviders.slice():[],n=this.hubRelated?["social","enterprise","arcgis"]:["enterprise","arcgis","social"];return e.signinOptionsOrder&&(e.signinOptionsOrder.social&&(e.socialProviders=e.signinOptionsOrder.social.slice().filter(function(e){return t.indexOf(e)>-1})),e.signinOptionsOrder.logins)?e.signinOptionsOrder.logins:(e.orgName||!0===e.hideEnterpriseLogins||e.join||e.activationCode||n.splice(2,0,"myorgs"),n)},compose:function(n){if(this.smxFocus)return this.displayMessage(n),void this.addSmxEvents();var r=[];if(n.hideAppInfo=n.hideAppInfo||i.hideAppInfo.indexOf(n.client_id)>-1,this.gaeFocus)r=[{type:s,config:{expanded:!0,collapsible:!1}},a];else{this.hubRelated=n.hubRelated=n.hubEnabled||n.isCommunity,this.setEnterpriseInfo(n),n.hideAppInfo||r.push(d);var o=this.orderMethods(n),c=n.companionOrganizations&&n.companionOrganizations[0];c&&(n.canSignInArcGIS=!1!==n.canSignInArcGIS||!1!==c.canSignInArcGIS,n.canSignInSocial=!1!==n.canSignInSocial||!1!==c.canSignInSocial),c&&n.canSignInSocial&&-1==o.indexOf("social")&&o.splice(o.length,0,"social"),c&&n.canSignInArcGIS&&-1==o.indexOf("arcgis")&&o.splice(o.length,0,"arcgis"),o.indexOf("enterprise")>-1?this.composeDefault(n,o,r):this.composeCustom(n,o,r),n.join||(this.hubRelated&&(n.isEnableArcGISAutoSignups||n.isAccountSocialAutoJoins)?(n.publicSignup=!0, r.push(l)):(n.showSignupOption||n.isPortal&&!1===n.isPortalSignupDisabled&&"arcgisonline"==n.client_id)&&(n.showSignupOption&&("esri"==n.signupType?n.esriSignup=!0:"developers"==n.signupType?n.developerSignup=!0:n.publicSignup=!0),r.push(l))),n.join||n.isPortal||!n.orgName||!0===n.hideCrossOrgSigninLink||r.push(u);var h=r.filter(function(e){return"expander"in("function"==typeof e?e:e.type).prototype});1===h.length&&h[0].config&&(h[0].config.collapsible=!1),n.isPortal||r.push(a)}var f={parent:t.byId("loginComponents"),info:n,i18n:p,type:"section",exclusive:!0,expanded:!1};this.components=this.buildComponents(r,f),this.displayMessage(n),n.orgName&&e.nodeListToArray(t.query(".js-orgname")).forEach(function(e){e.innerHTML=t.sub(e.innerHTML,{orgname:n.orgName})});var m,v;if(m=n.messageCode||n.messages&&n.messages.length?"errMessage":n.username?"user_password":"user_username",v=t.byId(m),v&&v.focus(),e.addEvent(window,"beforeunload",this._clearFields),n.resourceAccountUrlKey&&!n.join){e.nodeListToArray(t.query("a[href]")).forEach(function(e){e.href.indexOf("oauth2")>=0&&-1==e.href.indexOf("authorize")&&(e.href=this.swizzleUrl(e.href,n.resourceAccountUrlKey))}.bind(this));var g=t.queryOne("form");g.action=this.swizzleUrl(g.action,n.resourceAccountUrlKey)}else if(n.join&&(n.canSignInSocial&&n.socialProviders&&e.nodeListToArray(t.query("a[class*=js-provider]")).forEach(function(e){e.href=this.reverseSwizzle(e.href)}.bind(this)),n.canSignInArcGIS)){var b=t.byId("oauth");b.action=this.reverseSwizzle(b.action)}},composeDefault:function(e,t,n){t.forEach(function(t){if("social"==t)e.socialProviders&&e.showSocialLogins&&!1!==e.canSignInSocial&&n.push(c);else if("arcgis"==t)!1!==e.canSignInArcGIS&&n.push({type:s,config:{expanded:!e.expandEnterprise}});else if("myorgs"==t)n.push(r);else if("enterprise"==t&&e.hasEnterprise&&!e.join){var i=Object.keys(e.enterpriseLogins);i.forEach(function(t){t.indexOf("oidc")>-1&&n.push({type:o,config:{expanded:!0,collapsible:!1,login:e.enterpriseLogins[t]}})}),i.forEach(function(t){t.indexOf("saml")>-1&&n.push({type:o,config:{expanded:!0,collapsible:!1,login:e.enterpriseLogins[t]}})})}})},composeCustom:function(e,t,n){t.forEach(function(t){if(t.indexOf("oidc")>-1&&e.enterpriseLogins[t])n.push({type:o,config:{expanded:!0,collapsible:!1,login:e.enterpriseLogins[t]}});else if(t.indexOf("saml")>-1){var i="";e.enterpriseLogins[t]?i=t:"saml"==t&&(i=e.enterpriseLogins["saml_"+e.orgId]?"saml_"+e.orgId:e.companionOrganizations&&e.companionOrganizations.length&&e.enterpriseLogins["saml_"+e.companionOrganizations[0].orgId]?"saml_"+e.companionOrganizations[0].orgId:"saml_e"),i&&e.enterpriseLogins[i]&&n.push({type:o,config:{expanded:!0,collapsible:!1,login:e.enterpriseLogins[i]}})}else"social"==t?e.socialProviders&&e.showSocialLogins&&!1!==e.canSignInSocial&&n.push(c):"arcgis"==t&&!1!==e.canSignInArcGIS&&n.push({type:s,config:{expanded:!e.expandEnterprise}})})},displayMessage:function(n){var i="",a=t.queryOne(".js-message");if(n.messages&&n.messages[0]){if(n.messages[0].indexOf("Invalid username or password")>-1)i=p.invalidSignin;else if("OAUTH_0012"===n.messageCode)i=p.sessionTimedOut;else if(n.messages[0].indexOf("Your login session has been reset")>-1)i=p.expiredSession;else if("OAUTH_0007"===n.messageCode){var s=n.lockoutPeriod?Math.round(n.lockoutPeriod/60):15;i=t.sub(p.toManyLogins,{duration:s})}else n.messages[0].indexOf("User is not a member of this account")>-1?(i=p.userNotMemberOfOrg,n.linkbackUrl&&(i+=" "+t.sub(p.signinArcgis,{rootLogin:n.linkbackUrl}))):n.messages[0].indexOf("Your account has been disabled by your organization")>-1?i=p.userDisabled:"SB_0009"===n.messageCode?i=p.userBlocked:"SB_0010"===n.messageCode?i=p.disabledAccount:"SB_0002"===n.messageCode?i=p.userExpired:"OAUTH_0057"===n.messageCode?i=p.portalUserCantReset:"OAUTH_0023"===n.messageCode||"OAUTH_0021"===n.messageCode?i=p.userInsufficient:n.messages[0].indexOf("Your password reset request")>-1?i=p.invalidResetLink:"OAUTH_0072"===n.messageCode?(e.removeClass(a,"alert-red"),e.addClass(a,"alert-green"),i=p.signupSuccess):i=n.messages[0];a.innerHTML=i||n.messages[0],e.addClass(a,"is-active")}},setEnterpriseInfo:function(e){var n,i,a={},s=/oidc\/(\w+)\/auth/;e.isCommunity?(e.oidcFederationInfo&&!1!==e.canSignInOIDC&&e.oidcFederationInfo.forEach(function(n){var i=n.oidcAuthorizeUrl.match(s);n.name=n.oidcName,n.authorizeUrl=n.oidcAuthorizeUrl,n.id=i?i[1]:"unknown",a["oidc_"+n.id]=t.extend({orgName:e.orgName,type:"community"},n)}),e.federationInfo&&!1!==e.canSignInIDP&&(e.federationInfo.name=e.federationInfo.idpName,e.federationInfo.authorizeUrl=e.federationInfo.idpAuthorizeUrl,i=e.orgId||"c",a["saml_"+i]=t.extend({orgName:e.orgName,type:"community"},e.federationInfo)),n=e.companionOrganizations&&e.companionOrganizations[0]||!1,n.oidcFederationInfo&&!1!==n.canSignInOIDC&&n.oidcFederationInfo.forEach(function(e){var i=e.oidcAuthorizeUrl.match(s);e.name=e.oidcName,e.authorizeUrl=e.oidcAuthorizeUrl,e.id=i?i[1]:"unknown",a["oidc_"+e.id]=t.extend({orgName:n.orgName,type:n.type},e)}),n.federationInfo&&!1!==n.canSignInIDP&&(n.federationInfo.name=n.federationInfo.idpName,n.federationInfo.authorizeUrl=n.federationInfo.idpAuthorizeUrl,i=n.orgId||"e",a["saml_"+i]=t.extend({orgName:n.orgName,type:n.type},n.federationInfo))):(n=e.companionOrganizations&&e.companionOrganizations[0]||!1,n.oidcFederationInfo&&!1!==n.canSignInOIDC&&n.oidcFederationInfo.forEach(function(e){var i=e.oidcAuthorizeUrl.match(s);e.name=e.oidcName,e.authorizeUrl=e.oidcAuthorizeUrl,e.id=i?i[1]:"unknown",a["oidc_"+e.id]=t.extend({orgName:n.orgName,type:n.type},e)}),n.federationInfo&&!1!==n.canSignInIDP&&(n.federationInfo.name=n.federationInfo.idpName,n.federationInfo.authorizeUrl=n.federationInfo.idpAuthorizeUrl,i=n.orgId||"c",a["saml_"+i]=t.extend({orgName:n.orgName,type:n.type},n.federationInfo)),e.oidcFederationInfo&&!1!==e.canSignInOIDC&&e.oidcFederationInfo.forEach(function(n){var i=n.oidcAuthorizeUrl.match(s);n.name=n.oidcName,n.authorizeUrl=n.oidcAuthorizeUrl,n.id=i?i[1]:"unknown",a["oidc_"+n.id]=t.extend({orgName:e.orgName,type:"hub"},n)}),e.federationInfo&&!1!==e.canSignInIDP&&(e.federationInfo.name=e.federationInfo.idpName,e.federationInfo.authorizeUrl=e.federationInfo.idpAuthorizeUrl,i=e.orgId||"e",a["saml_"+i]=t.extend({orgName:e.orgName,type:"hub"},e.federationInfo))),Object.keys(a).length>0&&(e.hasEnterprise=!0,e.expandEnterprise=!0),e.enterpriseLogins=a},buildComponents:function(e,n){var i=this.components||[];return e.forEach(function(e){"function"==typeof e?i.push(new e(t.extend({},n))):"object"==typeof e&&e.type&&i.push(new e.type(t.extend({},n,e.config)))}),i},addSmxEvents:function(){e.addEvent(t.byId("oauth"),"submit",function(n){n.preventDefault();var i=n.target,a=!0;e.nodeListToArray(t.query("input[required]",i)).forEach(function(n){var i=n.id.indexOf("user_")>-1?n.id.split("user_")[1]:n.id,s=t.queryOne(".js-"+i+"-error");if(0==n.value.length)a=!1,s.innerHTML=p.createAccount.errors["missing_"+i],e.addClass(n,"input-error"),e.addClass(s,"is-active");else if("username"==i&&0==n.checkValidity()){a=!1;var r=n.validity,o=p.createAccount.errors.invalid_email;r.tooShort?o=p.createAccount.errors.short_email:r.tooLong?o=p.createAccount.errors.long_email:/[^\w\.@\-\s]/.test(n.value)&&(o=p.createAccount.errors.invalid_email_chars),s.innerHTML=o,e.addClass(n,"input-error"),e.addClass(s,"is-active")}}.bind(this)),a&&i.submit()}.bind(this))},_clearFields:function(){var e=t.byId("user_username"),n=t.byId("user_password");e&&(e.value=""),n&&(n.value="")},swizzleUrl:function(e,t){var n=e.split("."),i=n.shift().split("//"),a=i.pop();switch(i[1]=t,a){case"devext":a="maps"+a;break;case"qaext":a="mapsqa";break;case"www":a="maps"}return n.unshift(i.join("//"),a),n.join(".")},reverseSwizzle:function(e){var t=e.split(".").slice(1),n=t.shift(),i="";switch(n){case"mapsdevext":i="devext";break;case"mapsqa":i="qaext";break;default:i="www"}return t.unshift("https://"+i),t.join(".")}}}),define("text!../contents/troubleshoot.html",[],function(){return'
\n
\n

{{i18n.forgotPassword.forgotPass}}

\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n
\n
\n

\n {{^info.gaeFocus}}{{i18n.forgotPassword.provideUsername}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{i18n.forgotPassword.provideInformation}}{{/info.gaeFocus}}\n

\n \n \n \n
\n \n \n
\n
\n
\n
\n
\n {{i18n.email.emailSent}}\n
\n
\n {{#info.smxFocus}}\n

{{i18n.email.emailSent}}

\n
{{i18n.email.furtherInstructions}}
\n {{/info.smxFocus}}\n {{^info.smxFocus}}\n

\n {{#info.gaeFocus}}\n {{i18n.email.furtherInstructions}}\n {{/info.gaeFocus}}\n {{^info.gaeFocus}}\n {{#info.forgotPassword}}\n {{^info.isPortal}}{{i18n.email.passwordInstructions}}{{/info.isPortal}}\n {{#info.isPortal}}{{i18n.email.passwordInstructionsEnt}}{{/info.isPortal}}\n {{/info.forgotPassword}}\n {{#info.forgotUsername}}\n {{^info.isPortal}}{{i18n.email.usernameInstructions}}{{/info.isPortal}}\n {{#info.isPortal}}{{i18n.email.usernameInstructionsEnt}}{{/info.isPortal}}\n {{/info.forgotUsername}}\n {{/info.gaeFocus}}\n

\n {{/info.smxFocus}}\n {{i18n.email.returnSignIn}}\n
\n
\n
\n
\n {{i18n.securityQuestion.finishedMfaMessage}}\n
\n
\n
\n'}),define("text!../contents/troubleshoot_smx.html",[],function(){return'
\n {{> header}}\n
\n

{{i18n.forgotPassword.forgotPass}}

\n
\n
\n \n \n \n \n
\n \n
\n
\n
\n
\n Email sent\n
\n
\n

{{i18n.email.emailSent}}

\n
{{i18n.email.furtherInstructions}}
\n {{i18n.email.returnSignIn}}\n
\n
\n
\n
\n {{i18n.securityQuestion.finishedMfaMessage}}\n
\n
\n {{> footer}}\n
\n'}),define("forgot",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/troubleshoot.html","text!../contents/troubleshoot_smx.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r,o,c){return{smxFocus:!1,startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,this.checkForRedirect(n),t.setTitle(a.forgotPassword.title||a.forgotPassword.windowTitle),this.smxFocus="storymapsexpress"==n.client_id.toLowerCase(),n.gaeFocus="geoanalyticsengine"==n.client_id.toLowerCase(),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(e){t.checkRTL(e.locale);var l=t.queryOne(".content");e.hostname=t.getPortalHostname(e,e.refUrl);var d=s,u="",h="";this.smxFocus&&(a=a.smx,d=r,u=o,h=c),e.forgotMy&&e.troubleshootComplete&&("password"==e.forgotMy?e.forgotPassword=!0:"username"==e.forgotMy&&(e.forgotUsername=!0)),l.innerHTML=n.render(d,{info:e,icons:i,i18n:a},{header:u,footer:h}),e.troubleshootComplete?"mfa"==e.forgotMy?this.showMfaMsg():this.showEmailMsg():"username"==e.forgotMy&&this.swapForgot("username");var f=t.byId("user");f&&f.focus(),this.displayMessage(e)},addEventHandlers:function(){var n=t.queryOne(".js-next"),i=t.queryOne(".js-back"),a=t.queryOne(".js-submit");n&&e.addEvent(n,"click",this.onContinue.bind(this)),a&&e.addEvent(a,"click",this.onContinue.bind(this)),i&&e.addEvent(i,"click",this.onBackBtn.bind(this))},checkForRedirect:function(e){if(e.isPortal&&e.troubleshootComplete&&!e.isPortalEmailSupported){var t=e.contextPath+"/rest/oauth2/authorize?oauth_state="+e.oauth_state;window.location.href=t}},swapForgot:function(n){e.removeClass(t.queryOne(".js-message"),"is-active"),e.removeClass(t.queryOne(".js-user-error"),"is-active"),e.removeClass(t.byId("user"),"input-error"),t.byId("user").value="","username"==n?(t.byId("pageTitle").innerHTML=a.forgotPassword.retrieveUser,t.byId("provideInfo").innerHTML=this.authInfo.gaeFocus?a.forgotPassword.provideInformation:a.forgotPassword.provideEmail,t.byId("user").setAttribute("aria-label",a.forgotPassword.emailLbl),t.queryOne(".js-input-label").innerHTML=a.forgotPassword.emailLbl,t.byId("forgotMy").value="username",t.queryOne(".js-back").setAttribute("data-state","username")):"password"==n&&(!this.smxFocus&&(t.byId("pageTitle").innerHTML=a.forgotPassword.forgotPass),t.byId("provideInfo").innerHTML=this.authInfo.gaeFocus?a.forgotPassword.provideInformation:a.forgotPassword.provideUsername,t.byId("user").setAttribute("aria-label",a.forgotPassword.usernameLbl),t.queryOne(".js-input-label").innerHTML=a.forgotPassword.usernameLbl,t.byId("forgotMy").value="password",t.queryOne(".js-back").setAttribute("data-state","password"))},showEmailMsg:function(){e.addClass(t.queryOne(".js-action-pane"),"hide"),!this.smxFocus&&(t.byId("pageTitle").innerHTML=a.email.title),e.removeClass(t.queryOne(".js-email-pane"),"hide")},showMfaMsg:function(){e.addClass(t.queryOne(".js-action-pane"),"hide"),!this.smxFocus&&(t.byId("pageTitle").innerHTML=a.securityQuestion.finishedTitleMfa),e.removeClass(t.queryOne(".js-mfa-pane"),"hide")},onBackBtn:function(){window.location=this.authInfo.hostname+this.authInfo.contextPath+"/oauth2/authorize?oauth_state="+this.authInfo.oauth_state},onContinue:function(n){n.preventDefault();var i=t.byId("oauth"),s=t.byId("user"),r=t.queryOne(".js-user-error"),o=t.byId("forgotMy").value,c=s.value&&s.value.trim();c.length?"username"!=o||/@/.test(c)?this.smxFocus&&"password"==o&&!s.checkValidity()?(e.addClass(s,"input-error"),r.innerHTML=a.forgotPassword.invalidEmail,e.addClass(r,"is-active")):i.submit():(e.addClass(s,"input-error"),r.innerHTML=a.forgotPassword.invalidEmail,e.addClass(r,"is-active")):(e.addClass(s,"input-error"),r.innerHTML=a.forgotPassword.inputError,e.addClass(r,"is-active"))},displayMessage:function(n){var i="",s=t.queryOne(".js-message");n.messages&&n.messages[0]&&(i=n.messages[0].toLowerCase().indexOf("unable to reset your password")>-1?a.resetPage.unableToReset:n.messages[0].toLowerCase().indexOf("your login session has been reset")>-1?a.expiredSession:n.messages[0],s.innerHTML=i||n.messages[0],e.addClass(s,"is-active"),s.focus())}}}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("qwest",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.qwest=e()}}(function(){var e;return function e(t,n,i){function a(r,o){if(!n[r]){if(!t[r]){var c="function"==typeof require&&require;if(!o&&c)return c(r,!0);if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[r]={exports:{}};t[r][0].call(d.exports,function(e){var n=t[r][1][e];return a(n||e)},d,d.exports,e,t,n,i)}return n[r].exports}for(var s="function"==typeof require&&require,r=0;r-1?"json":n.indexOf(j.xml)>-1?"xml":"text"}switch(e){case"json":if(y.responseText.length)try{x="JSON"in t?JSON.parse(y.responseText):new Function("return ("+y.responseText+")")()}catch(e){throw"Error while parsing JSON body : "+e}break;case"xml":try{t.DOMParser?x=(new DOMParser).parseFromString(y.responseText,"text/xml"):(x=new ActiveXObject("Microsoft.XMLDOM"),x.async="false",x.loadXML(y.responseText))}catch(e){x=void 0}if(!x||!x.documentElement||x.getElementsByTagName("parsererror").length)throw"Invalid XML";break;default:x=y.responseText}}if("status"in y&&!/^2|1223/.test(y.status))throw y.status+" ("+y.statusText+")";q(!0,[y,x])}catch(e){q(!1,[e,y,x])}}},S=function(e){I||(e="string"==typeof e?e:"Connection aborted",q.abort(),q(!1,[new Error(e),y,null]))},L=function(){I||(p.attempts&&++E==p.attempts?S("Timeout ("+h+")"):(y.abort(),T=!1,q.send()))};if(p.async=!("async"in p&&!p.async),p.cache="cache"in p&&!!p.cache,p.dataType="dataType"in p?p.dataType.toLowerCase():r,p.responseType="responseType"in p?p.responseType.toLowerCase():"auto",p.user=p.user||"",p.password=p.password||"",p.withCredentials=!!p.withCredentials,p.timeout="timeout"in p?parseInt(p.timeout,10):3e4,p.attempts="attempts"in p?parseInt(p.attempts,10):1,C=h.match(/\/\/(.+?)\//),b=C&&!!C[1]&&C[1]!=location.host,"ArrayBuffer"in t&&f instanceof ArrayBuffer?p.dataType="arraybuffer":"Blob"in t&&f instanceof Blob?p.dataType="blob":"Document"in t&&f instanceof Document?p.dataType="document":"FormData"in t&&f instanceof FormData&&(p.dataType="formdata"),null!==f)switch(p.dataType){case"json":f=JSON.stringify(f);break;case"post":case"queryString":f=i(f)}if(p.headers){var M=function(e,t,n){return t+n.toUpperCase()};for(C in p.headers)_[C.replace(/(^|-)([^-])/g,M)]=p.headers[C]}return"Content-Type"in _||"GET"==e||p.dataType in j&&j[p.dataType]&&(_["Content-Type"]=j[p.dataType]),_.Accept||(_.Accept=p.responseType in P?P[p.responseType]:"*/*"),b||"X-Requested-With"in _||(_["X-Requested-With"]="XMLHttpRequest"),p.cache||"Cache-Control"in _||(_["Cache-Control"]="no-cache"),"GET"!=e&&"queryString"!=p.dataType||!f||"string"!=typeof f||(h+=(/\?/.test(h)?"&":"?")+f),p.async&&q.send(),q},f=function(e){var t=[],i=0,a=[];return n(function(n){var s=-1,r=function(e){return function(r,o,c,l){var d=++s;return++i,t.push(h(e,n.base+r,o,c,l).then(function(e,t){a[d]=arguments,--i||n(!0,1==a.length?a[0]:[a])},function(){n(!1,arguments)})),n}};n.get=r("GET"),n.post=r("POST"),n.put=r("PUT"),n.delete=r("DELETE"),n.catch=function(e){return n.then(null,e)},n.complete=function(e){var t=function(){e()};return n.then(t,t)},n.map=function(e,t,n,i,a){return r(e.toUpperCase()).call(this,t,n,i,a)};for(var o in e)o in n||(n[o]=e[o]);return n.send=function(){for(var e=0,i=t.length;e\n
\n
\n
\n
\n {{i18n.passwordStrength}}: {{i18n.none}} \n \n \n \n {{&icons.help}}\n \n \n \n
\n\n'}),define("PasswordMeter",["helpers","calcite-web","mustache","qwest","icons","i18n!../nls/oauth","text!../contents/passwordMeter.html"],function(e,t,n,i,a,s,r){function o(e){this.input=e.input,this.attach=e.attach,this.authInfo=e.authInfo}return o.prototype={active:!0,strength:0,wait:!0,handle:null,constructor:o,startup:function(){this.render(),this.addEventHandlers()},render:function(){this.attach.innerHTML=n.render(r,{i18n:s,info:this.authInfo,icons:a})},addEventHandlers:function(){t.addEvent(this.input,"input",function(){this.active&&this.input.value.length>0?(this.handle&&clearTimeout(this.handle),this.handle=setTimeout(function(){i.post(this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/checkPasswordStrength",{f:"json",password:this.input.value},{responseType:"json",cache:!0}).then(this._updateMeter.bind(this)),this.handle=null}.bind(this),350)):this._updateMeter(null,{strength:0})}.bind(this))},_updateMeter:function(n,i){var a,r=this.input,o=e.queryOne(".password-bar",this.attach),c=e.queryOne(".password-strength",this.attach),l=e.queryOne(".password-help",this.attach),d=o.getAttribute("data-strength");if(r.value.length>0){switch(i.strength){case 2:a="fair";break;case 3:a="good";break;case 4:a="secure";break;default:a="weak"}this.strength=i.strength}else a="none",this.strength=0;d!=a&&(t.removeClass(o,d),t.addClass(o,a),o.setAttribute("data-strength",a),c.innerHTML=s[a],t.removeClass(c,d),t.addClass(c,a),"weak"==a?t.removeClass(l,"hide"):t.addClass(l,"hide")),t.bus.emit("meter:update",{strength:this.strength,input:this.input})}},o}),define("text!../contents/reset-question.html",[],function(){ return'
\n {{> header}}\n {{^info.smxFocus}}\n

\n
{{i18n.resetPage.title}}
\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n

\n {{/info.smxFocus}}\n
\n
\n
\n \n
\n {{i18n.securityQuestion.answerSecurityQuestion}}\n
\n \n \n
\n\n
\n\n \n \n
\n\n
\n
\n {{i18n.createAccount.passwordMust}}:\n
    \n {{#rules}}\n
  • {{label}}
  • \n {{/rules}}\n
\n
\n \n \n
\n\n \n
\n
\n {{> footer}}\n
\n'}),define("text!../contents/reset-password.html",[],function(){return'
\n {{> header}}\n {{^info.smxFocus}}\n
\n

\n {{#info.join}}{{i18n.resetPage.setTitle}}{{/info.join}}\n {{^info.join}}{{i18n.resetPage.changeTitle}}{{/info.join}}\n

\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n {{/info.smxFocus}}\n
\n
\n
\n \n\n {{#info.join}}\n \n {{/info.join}}\n\n {{^info.join}}\n \n \n
\n {{/info.join}}\n\n \n \n
\n\n
\n
\n {{i18n.createAccount.passwordMust}}:\n
    \n {{#rules}}\n
  • {{label}}
  • \n {{/rules}}\n
\n
\n\n \n \n
\n\n \n
\n
\n {{> footer}}\n
\n'}),define("text!../contents/reset-mfa.html",[],function(){return'
\n {{> header}}\n {{^info.smxFocus}}\n
\n

{{i18n.securityQuestion.disableMfa}}

\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n {{/info.smxFocus}}\n
\n
\n
\n \n

{{i18n.securityQuestion.securityQuestionMfaMsg2}}

\n \n
\n \n \n
\n
\n
\n {{> footer}}\n
\n'}),define("reset-new",["calcite-web","helpers","mustache","qwest","PasswordMeter","icons","i18n!../nls/oauth","text!../contents/reset-question.html","text!../contents/reset-password.html","text!../contents/reset-mfa.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r,o,c,l,d,u){return{options:null,rules:null,meter:null,valid_password:!1,valid_confirmPass:!1,forgotChange:!1,startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,this.smxFocus=n.smxFocus="storymapsexpress"==n.client_id.toLowerCase(),this.gaeFocus=n.gaeFocus="geoanalyticsengine"==n.client_id.toLowerCase(),this.options=this._setOptions(n),t.setTitle(this.options.title),t.checkRTL(n.locale),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(o){e.addClass(document.body,"top-align"),o.hostname=t.getPortalHostname(o,o.refUrl),o.securityQuestion=r.securityQuestions[o.securityQuestionIdx],this.smxFocus&&(r=r.smx),this._setRules(o);var c=this.options.template;t.queryOne(".content").innerHTML=n.render(c,{info:o,rules:this.rules,icons:s,i18n:r},{header:this.options.header,footer:this.options.footer}),t.byId("oauth_state").setAttribute("value",o.oauth_state),"mfa"==o.forgotMy?this.valid_password=this.valid_confirmPass=!0:(this.meter=new a({attach:t.queryOne(".js-password-meter"),input:t.byId("password"),authInfo:o}),this.meter.startup());var l=t.queryOne("input[autofocus]");l&&l.focus(),i.get(this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/helpMap",{f:"json"},{responseType:"json",cache:!0}).then(function(n){var i=n.response,a=this.authInfo.isPortal?"120001688":"120001811",s=i.helpMap.m[a],r=this.authInfo.helpBase+s;e.nodeListToArray(t.query(".js-password-link")).forEach(function(e){e.setAttribute("href",r)})}.bind(this)),this.displayMessage(o)},addEventHandlers:function(){var n=t.byId("password"),i=t.byId("confirmPass"),a=t.byId("backLink"),s=this.options.elementId&&t.byId(this.options.elementId);n&&(e.addEvent(n,"focus",function(){e.addClass(t.queryOne(".js-password-alert"),"is-active")}),e.addEvent(n,"input",this._validateInput.bind(this)),e.addEvent(n,"blur",function(e){n.value.length&&i&&i.value.length&&this._checkConfirmMatch({target:i}),this._validateInput(e),this._checkFieldValid(e)}.bind(this)),e.bus.on("meter:update",function(e){var t={target:e.input};this._validateInput(t),this._checkFieldValid(t)}.bind(this))),i&&e.addEvent(t.byId("confirmPass"),"blur",this._checkConfirmMatch.bind(this)),s&&e.addEvent(s,"blur",function(e){var t=e.target;t.value.length>0&&this._checkRequiredField(t)}.bind(this)),a&&e.addEvent(a,"click",function(){window.location=this.authInfo.hostname+this.authInfo.contextPath+"/oauth2/mfa?oauth_state="+this.authInfo.oauth_state}.bind(this)),e.addEvent(t.byId("oauth"),"submit",function(e){e.preventDefault();var n=this._checkRequired(e),i=t.byId("confirmPass");i&&this._checkConfirmMatch({target:i}),0==n&&1==this.valid_confirmPass&&(!0!==this.valid_password&&this.meter&&(this.valid_password=this.meter.strength>=2),this.valid_password&&e.target.submit())}.bind(this))},_setOptions:function(e){var t={template:null,title:"",elementId:"",header:"",footer:""};return e.securityQuestionIdx?"mfa"==e.forgotMy?(t.template=l,t.title=r.securityQuestion.disableMfa):(t.template=o,t.title=r.resetPage.resetTitle,t.elementId="answer"):(t.template=c,t.title=r.resetPage.changeTitle,t.elementId="oldPassword"),this.smxFocus&&(t.header=d,t.footer=u),t},_setRules:function(e){var n=[{label:r.resetPage.cantMatchUsername,rule:function(e){return e!=(this.authInfo.troubleshootUsername||this.authInfo.username)}.bind(this)}];this.authInfo.forgotMy||this.authInfo.join||n.push({label:r.resetPage.oldPasswordNewPasswordSame,rule:function(e){return e!=t.byId("oldPassword").value}});var i=e.passwordPolicy;i&&i.type&&(i.minLength>0&&n.push({label:t.sub(r.resetPage.minLength,i),rule:function(e){return e.length>=this.authInfo.passwordPolicy.minLength}.bind(this)}),i.minUpper>0&&n.push({label:t.sub(r.resetPage.minUpper,i),rule:function(e){var t=e.match(/([A-Z])/g);return t&&t.length>=this.authInfo.passwordPolicy.minUpper}.bind(this)}),i.minLower>0&&n.push({label:t.sub(r.resetPage.minLower,i),rule:function(e){var t=e.match(/([a-z])/g);return t&&t.length>=this.authInfo.passwordPolicy.minLower}.bind(this)}),i.minLetter>0&&n.push({label:t.sub(r.resetPage.minLetter,i),rule:function(e){var t=e.match(/([A-Za-z])/g);return t&&t.length>=this.authInfo.passwordPolicy.minLetter}.bind(this)}),i.minDigit>0&&n.push({label:t.sub(r.resetPage.minDigit,i),rule:function(e){var t=e.match(/([0-9])/g);return t&&t.length>=this.authInfo.passwordPolicy.minDigit}.bind(this)}),i.minOther>0&&n.push({label:t.sub(r.resetPage.minOther,i),rule:function(e){var t=e.match(/([!"#$%&'()*+,-.\/:;<=>?@[\]^_`{|}~])/g);return t&&t.length>=this.authInfo.passwordPolicy.minOther}.bind(this)}),i.historySize>0&&n.push({label:t.sub(r.resetPage.historySize,i),rule:function(){return!0}})),this.rules=n},_validateInput:function(n){var i=n.target,a=this.rules,s=t.queryOne(".js-password-reqs"),r=0;a.forEach(function(t,n){var a=s.children[n];i.value&&t.rule(i.value)?(r++,e.removeClass(a,"icon-ui-red icon-ui-notice-round"),e.addClass(a,"icon-ui-green icon-ui-check-mark")):(r--,e.removeClass(a,"icon-ui-green icon-ui-check-mark"),0===i.value.length&&e.removeClass(a,"icon-ui-red icon-ui-notice-round"))});var o=r==a.length;this.meter&&this.meter.strength<2&&o&&(o=!1),this.valid_password=o,0===i.value.length&&(e.removeClass(this.findLabel(i.id,i),"field-suffix icon-ui-check-mark icon-ui-green"),e.removeClass(i,"input-error"),e.removeClass(t.byId("passwordError"),"is-active"))},_checkConfirmMatch:function(n){var i=n.target.value,a=t.byId("password").value,s=this.findLabel(n.target.id,n.target);this.valid_confirmPass=(i.length>0||a.length>0)&&i==a,i.length>0?this._checkFieldValid(n):e.removeClass(s,"icon-ui-green icon-ui-check-mark")},_checkFieldValid:function(n){var i=n.target,a=i.id,s=t.queryOne(".js-"+a+"-error");!this["valid_"+a]&&i.value.length>0?(s.innerHTML=r.createAccount.errors["invalid_"+a],e.addClass(i,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(s,"is-active"),e.removeClass(this.findLabel(a,i),"field-suffix icon-ui-check-mark icon-ui-green"),"password"==a&&this.rules&&this.rules.length&&this.rules.forEach(function(n,s){var r=t.queryOne(".js-"+a+"-reqs").children[s];n.rule(i.value)?(e.removeClass(r,"icon-ui-red icon-ui-notice-round"),e.addClass(r,"icon-ui-green icon-ui-check-mark")):(e.removeClass(r,"icon-ui-green icon-ui-check-mark"),e.addClass(r,"icon-ui-red icon-ui-notice-round"))})):(e.removeClass(i,"input-error"),e.removeClass(s,"is-active"),i.value.length>0&&this._markFieldValid(i))},_markFieldValid:function(t){var n=this.findLabel(t.id,t);e.addClass(n,"field-suffix icon-ui-check-mark icon-ui-green")},_checkRequiredField:function(n){var i=n.tagName.toLowerCase(),a=t.queryOne(".js-"+n.id+"-error"),s=!1;return"input"==i&&"checkbox"!=n.type&&"radio"!=n.type?s=n.value.length>0:"checkbox"==n.type?s=n.checked:"select"==i&&(s=n.selectedIndex>0),s&&!("valid_"+n.id in this)||s&&this["valid_"+n.id]?(e.removeClass(n,"input-error"),e.removeClass(a,"is-active")):e.hasClass(a,"is-active")||(a.innerHTML=r.createAccount.errors["missing_"+n.id],e.addClass(n,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(a,"is-active")),s||n.focus(),s},_checkRequired:function(n){n.preventDefault();var i=n.target,a=0;return e.nodeListToArray(t.query("input[required], .required",i)).forEach(function(e){this._checkRequiredField(e)||(a++,e.focus())}.bind(this)),a},findLabel:function(e,n){var i=t.findLabel(e);return i||(i=t.findPreviousSibling("label",n)),i||(i=t.findParentNode("label",n)),i},displayMessage:function(n){var i="",a=n.passwordPolicy&&n.passwordPolicy.type,s=t.queryOne(".js-message");n.messages&&n.messages[0]&&(i=n.messages[0],i.toLowerCase().indexOf("minimum strength requirement")>-1?i=a?r.resetPage.minimumStrengthRequirementLink:r.resetPage.minimumStrengthRequirementEsri:i.toLowerCase().indexOf("must not be similiar to the ")>-1?i=t.sub(r.resetPage.historySize,n.passwordPolicy):i.toLowerCase().indexOf("unable to reset your password")>-1?i=r.resetPage.unableToReset:i.toLowerCase().indexOf("new password cannot be same")>-1?i=r.resetPage.oldPasswordNewPasswordSame:i.toLowerCase().indexOf("new passwords don't match")>-1?i=r.resetPage.passwordsMustMatch:i.toLowerCase().indexOf("your login session has been reset")>-1?i=r.expiredSession:i.toLowerCase().indexOf("invalid credentials for reset user")>-1?i="mfa"==n.forgotMy?r.forgotPassword.inputError:n.securityQuestionIdx?r.resetPage.incorrectSecurityResponse:r.resetPage.invalidOldPassword:i.toLowerCase().indexOf("your password does not meet the arcgis online password requirements. please update your password.")>-1&&(i=r.resetPage.updateOldPassword),s.innerHTML=i||n.messages[0],e.addClass(s,"is-active"),s.focus())}}}),define("text!../contents/selectUser.html",[],function(){return'
\n
\n

{{i18n.selectUser.signInToAcct}}

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n

{{i18n.selectUser.titleTemplate}}

{{i18n.selectUser.tutorialPanel}}

\n {{#info.linkedUsers}}{{^disabled}}\n \n {{/disabled}}{{/info.linkedUsers}}\n
\n
\n \n \n
\n
\n'}),define("selectUser-new",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/selectUser.html"],function(e,t,n,i,a,s){return{startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,t.setTitle(a.selectUser.title||a.selectUser.windowTitle),t.checkRTL(n.locale),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(e){t.checkRTL(e.locale);var r=t.queryOne(".content");e.hostname=t.getPortalHostname(e,e.refUrl),e.providerIcon=i[e.socialLoginProviderName],r.innerHTML=n.render(s,{info:e,i18n:a,icons:i});var o=t.byId("titleText"),c=a[e.socialLoginProviderName];o.innerHTML=t.sub(o.innerHTML,{providerName:c})},addEventHandlers:function(){e.nodeListToArray(t.query(".js-account")).forEach(function(t){e.addEvent(t,"click",this.onAcctClick.bind(this)),e.addEvent(t,"keyup",this.onPanelKey.bind(this))}.bind(this))},onAcctClick:function(e){var n=e.currentTarget,i=t.byId("oauth"),a=n.getAttribute("data-username");t.byId("selectedUser").value=a,i.submit()},onPanelKey:function(e){0!=e.keyCode&&13!=e.keyCode&&32!=e.keyCode||this.onAcctClick(e)}}}),define("text!../contents/setupSocial.html",[],function(){return'
\n

\n
{{i18n.createAccount.title}}
\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n

\n
\n
\n
\n \n \n {{#info.promptSocialUserFirstLastNames}}\n \n \n {{/info.promptSocialUserFirstLastNames}}\n {{#info.promptSocialEmail}}\n \n {{/info.promptSocialEmail}}\n \n
\n {{i18n.createAccount.usernameMust}}:\n
    \n
  • {{i18n.createAccount.usernameReq1}}
  • \n
  • {{i18n.createAccount.usernameReq2}}
  • \n
  • {{i18n.createAccount.usernameReq5}}
  • \n
  • {{i18n.createAccount.usernameReq4}}
  • \n
\n
\n
\n
\n
{{&i18n.createAccount.readTermsOfUseMsg}}
\n \n
\n {{i18n.createAccount.acceptLegal}}\n {{#info.termsAndConditions}}\n \n {{/info.termsAndConditions}}\n \n
\n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n

{{i18n.createAccount.signInFailed}}

\n

{{i18n.createAccount.noAccountMsg}}

\n

{{i18n.createAccount.createNewAccountMsg}}

\n
\n \n \n
\n
\n {{#info.termsAndConditions}}\n \n {{/info.termsAndConditions}}\n
\n'}),define("text!../contents/setupAccount_smx.html",[],function(){ return'
\n {{> header}}\n
\n

{{i18n.createAccount.confirmDetails}}

\n
\n
\n \n \n \n \x3c!-- Username --\x3e\n {{^info.suggestedUsername}}\n \n \n
\n {{/info.suggestedUsername}}\n {{#info.suggestedUsername}}\n \n
{{info.suggestedUsername}}
\n \n {{/info.suggestedUsername}}\n
\n {{#info.socialLoginProviderName}}\n {{info.importedFromSocial}}\n {{/info.socialLoginProviderName}}\n
\n {{^info.socialLoginProviderName}}\n \x3c!-- Password --\x3e\n \n \n
\n
\n
\n {{i18n.createAccount.passwordMust}}:\n
    \n {{#rules}}\n
  • {{label}}
  • \n {{/rules}}\n
\n
\n \x3c!-- Confirm Password --\x3e\n \n \n
\n {{/info.socialLoginProviderName}}\n \x3c!-- First and last name --\x3e\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n {{^info.socialLoginProviderName}}\n \x3c!-- Security question --\x3e\n \n \n
\n \x3c!-- Security answer --\x3e\n \n \n
\n {{/info.socialLoginProviderName}}\n \x3c!-- Profile URL --\x3e\n \n
\n
storymaps.com/profile/
\n \n
\n
\n
{{i18n.createAccount.profileUrlPermanent}}
\n \x3c!-- T&C, etc... --\x3e\n
\n \n
\n \n
\n \n
\n {{> footer}}\n
\n'}),define("setupSocial",["calcite-web","helpers","mustache","qwest","icons","i18n!../nls/oauth","text!../contents/setupSocial.html","text!../contents/setupAccount_smx.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r,o,c,l){return{social:!1,rules:null,valid_username:!1,valid_email:!0,valid_terms:!1,valid_privacy:!1,valid_hubterms:!0,valid_smxterms:!0,valid_conduct:!0,emailRE:/@/,smxFocus:!1,startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,this.smxFocus="storymapsexpress"==n.client_id.toLowerCase(),t.setTitle(this.smxFocus?s.createAccount.title_smx:s.createAccount.title||s.createAccount.windowTitle),n.hostname=t.getPortalHostname(n,n.refUrl),this.render(n),e.init(),this.rules=this._setRules(),this.addEventHandlers(),t.setContrastInfo()},render:function(i){t.checkRTL(i.locale),e.addClass(document.body,"top-align"),!0!==i.activateOrg&&!1===i.socialUserEmailAvailable&&(i.promptSocialEmail=!0,this.valid_email=!1),this.smxFocus&&(s=s.smx,i.importedFromSocial=function(){var e=this;return e&&e.length&&(e=s.createAccount["imported_"+e]),e},i.suggestedSocialUsername&&(i.suggestedUsername=i.suggestedSocialUsername));var d=t.queryOne(".content"),u=this.smxFocus?o:r;if(d.innerHTML=n.render(u,{info:i,icons:a,i18n:s},{header:c,footer:l}),t.byId("oauth_state").setAttribute("value",i.oauth_state),this.smxFocus){if(t.byId("TCLink").setAttribute("href","https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf"),this.valid_privacy=!0,this.valid_terms=!0,this.valid_smxterms=!1,this.valid_conduct=!1,this.valid_username=Boolean(i.suggestedUsername),!this.valid_username){var h=t.queryOne("label[for=username]"),f=t.byId("username"),p=t.byId("usernameDesc");e.removeClass(h,"text-light-gray"),f.removeAttribute("disabled"),p.innerHTML=""}}else{if(1!=i.autoAccountCreateForSocial&&!i.socialUserAccountId){e.addClass(t.byId("setupSocial"),"hide"),e.removeClass(t.byId("warnPublic"),"hide");var m=t.byId("acctFromSocial");m.innerHTML=t.sub(m.innerHTML,{provider:this._capitalize(i.socialLoginProviderName)})}i.suggestedSocialUsername?(t.byId("username").value=i.suggestedSocialUsername,this.valid_username=!0):e.addClass(t.queryOne(".js-username-alert"),"is-active");var v=t.byId("readTou");v.innerHTML=t.sub(v.innerHTML,{touHref:"https://www.esri.com/en-us/legal/terms/master-agreement-product",privacyHref:"https://www.esri.com/legal/privacy"}),e.nodeListToArray(t.query(".js-orgname")).forEach(function(e){e.innerHTML=t.sub(e.innerHTML,{hubname:i.orgName})})}},addEventHandlers:function(){var n=t.byId("username"),i=t.queryOne(".js-username-alert"),a=t.byId("email"),s=t.byId("lastName"),r=t.byId("firstName");if(e.addEvent(n,"input",function(t){this.smxFocus||(e.hasClass(i,"is-active")||e.addClass(i,"is-active"),this._validateInput(t))}.bind(this)),e.addEvent(n,"blur",(this.smxFocus?this._validateSmxUser:this._checkFieldValid).bind(this)),a&&(this.valid_email=!1,e.addEvent(a,"blur",function(e){this.valid_email=this.emailRE.test(a.value),a.value.length&&this._checkFieldValid(e)}.bind(this))),s&&r){this.valid_firstName=Boolean(this.authInfo.newUserFirstname),this.valid_lastName=Boolean(this.authInfo.newUserLastname);var o=function(e){var t=e.target;this["valid_"+t.id]=t.value.length<=40,t.value.length&&this._checkFieldValid(e)}.bind(this);[s,r].forEach(function(t){e.addEvent(t,"blur",o)})}this.authInfo.termsAndConditions&&(this.valid_hubterms=!1),e.nodeListToArray(t.query("#privacy, #terms, #hubterms, #smxterms, #conduct")).forEach(function(t){e.addEvent(t,"change",function(e){var t=e.target;this["valid_"+t.id]=t.checked}.bind(this))}.bind(this));var c=t.byId("continueBtn");if(c&&e.addEvent(c,"click",function(){e.addClass(t.byId("warnPublic"),"hide"),e.removeClass(t.byId("setupSocial"),"hide")}),e.addEvent(t.byId("oauth"),"submit",this._checkRequired.bind(this)),e.nodeListToArray(t.query("#cancelBtn, #cancelWarnBtn")).forEach(function(n){e.addEvent(n,"click",function(){t.byId("accept").value="false",t.byId("oauth").submit()})}),this.smxFocus){var l=t.byId("profile");l&&(e.addEvent(l,"input",function(e){this.valid_profile=e.target.value.length>0}.bind(this)),e.addEvent(l,"blur",this._checkFieldValid.bind(this)))}e.nodeListToArray(t.query(".js-modal-toggle")).forEach(function(t){e.addEvent(t,"keydown",function(e){"Tab"!==e.key&&9!==e.keyCode&&(e.preventDefault(),"Space"!=e.key&&"Enter"!=e.key&&0!=e.keyCode&&13!=e.keyCode&&32!=e.keyCode||e.target.click())})})},_setRules:function(){return{password:[function(e){return e!=t.byId("username").value},function(e){return e.length>=8},function(e){return/[A-Za-z]/.test(e)},function(e){return/[0-9]/.test(e)}],username:[function(e){return e.length>5&&e.length<129},function(e){return!/[^\w\.@\-\s]/.test(e)},function(e){return!/[_\.@\-]/.test(e.slice(0,1))&&!/[_\.@\-]/.test(e.slice(-1))},function(e){return!/\s/.test(e)}]}},_validateInput:function(n){var i=n.target,a=i.id,s=this.rules[a]||[],r=0;s.forEach(function(n,s){var o=t.queryOne(".js-"+a+"-reqs").children[s];i.value&&n(i.value)?(r++,e.removeClass(o,"icon-ui-red icon-ui-notice-round"),e.addClass(o,"icon-ui-green icon-ui-check-mark")):(r--,e.removeClass(o,"icon-ui-green icon-ui-check-mark"),0===i.value.length&&e.removeClass(o,"icon-ui-red icon-ui-notice-round"))}),"email"==a?this.valid_email=this.emailRE.test(i.value):this["valid_"+a]=r==s.length},_validateSmxUser:function(e){var t=e.target;this.valid_username=t.checkValidity(),this._checkFieldValid(e)},_checkFieldValid:function(n){var i=n.target,a=i.id,r=t.queryOne(".js-"+a+"-error");this["valid_"+a]?(e.removeClass(i,"input-error"),e.removeClass(r,"is-active"),"username"==a||"profile"==a?this._checkUsernameExist(i):this._markFieldValid(i)):(r.innerHTML=s.createAccount.errors["invalid_"+a],e.addClass(i,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(r,"is-active"),e.removeClass(this._findLabel(i),"field-suffix icon-ui-check-mark icon-ui-green"),this.rules[a]&&this.rules[a].forEach(function(n,s){var r=t.queryOne(".js-"+a+"-reqs");if(r){var o=r.children[s];n(i.value)?(e.removeClass(o,"icon-ui-red icon-ui-notice-round"),e.addClass(o,"icon-ui-green icon-ui-check-mark")):(e.removeClass(o,"icon-ui-green icon-ui-check-mark"),e.addClass(o,"icon-ui-red icon-ui-notice-round"))}}))},_checkUsernameExist:function(n){var a=n.value,r=this._findLabel(n),o=t.queryOne(".js-"+n.id+"-error"),c=this.authInfo.hostname+this.authInfo.contextPath+"/rest/community/checkUsernames";e.addClass(r,"field-suffix icon-ui-loading-indicator icon-ui-blue"),i.post(c,{usernames:a,f:"json"},{cache:!0,responseType:"json"}).then(function(i,a){if(e.removeClass(r,"icon-ui-loading-indicator icon-ui-blue"),a&&a.usernames){var c=a.usernames[0];c&&c.requested==c.suggested?this._markFieldValid(n):(this["valid_"+n.id]=!1,o.innerHTML=s.createAccount.errors["taken_"+n.id],e.removeClass(r,"icon-ui-check-mark icon-ui-green"),e.addClass(n,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(o,"is-active"))}}.bind(this))},_markFieldValid:function(n){var i=n.id,a=t.queryOne(".js-"+i+"-alert"),s=this._findLabel(n);a&&"username"!=i&&e.removeClass(a,"is-active"),"firstName"!=i&&"lastName"!=i&&e.addClass(s,"field-suffix icon-ui-check-mark icon-ui-green")},_checkRequired:function(n){n.preventDefault();var i=n.target,a=t.queryOne(".input-error-message.is-active");a&&e.removeClass(a,"is-active");var r=0;e.nodeListToArray(t.query("input[required], .required",i)).every(function(n){var i=n.tagName.toLowerCase(),a=t.queryOne(".js-"+n.id+"-error"),o=!1;return"input"==i&&"checkbox"!=n.type&&"radio"!=n.type?n.value.length>0&&!1!==this["valid_"+n.id]?o=!0:0==n.value.length&&(o=!1):"checkbox"==n.type?o=n.checked:"select"==i&&(o=n.selectedIndex>0),o?(e.removeClass(n,"input-error"),e.removeClass(a,"is-active")):e.hasClass(a,"is-active")||(a.innerHTML=s.createAccount.errors["missing_"+n.id],e.addClass(n,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(a,"is-active"),r++),o},this),0==r&&1==this.valid_username&&1==this.valid_terms&&1==this.valid_privacy&&1==this.valid_hubterms&&1==this.valid_smxterms&&1==this.valid_conduct&&!1!==this.valid_profile&&(t.byId("accept").value="true",i.submit())},_findLabel:function(e){var n;return this.smxFocus?(n=t.queryOne("label[for="+e.id+"]"))||(n=t.findPreviousSibling("label",e)):n=t.findParentNode("label",e),n},_capitalize:function(e){var t=[e.slice(0,1),e.slice(1)];return t[0].toUpperCase()+t[1]}}}),define("text!../contents/acceptTerms.html",[],function(){return'\n'}),define("acceptTerms",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/acceptTerms.html"],function(e,t,n,i,a,s){return{startup:function(e){this.authInfo=e,document.documentElement.lang=e.locale,t.setTitle(a.createAccount.acceptTermsTitle),t.checkRTL(e.locale),this.render(e),this.addEventHandlers(),t.setContrastInfo()},render:function(r){r.orgAuthenticatedUserAccessNotice&&"okOnly"==r.orgAuthenticatedUserAccessNotice.buttons&&(r.orgAuthenticatedUserAccessNotice.okOnly=!0),r.orgAuthenticatedUserAccessNotice&&r.orgAuthenticatedUserAccessNotice.text&&(r.orgAuthenticatedUserAccessNotice.text=r.orgAuthenticatedUserAccessNotice.text.replace(/\n/g,"
")),t.checkRTL(r.locale);var o=t.queryOne("body");if(r.hostname=t.getPortalHostname(r,r.refUrl),o.innerHTML=n.render(s,{info:r,i18n:a,icons:i}),r.orgAuthenticatedUserAccessNotice&&!1!==r.orgAuthenticatedUserAccessNotice.enabled)e.removeClass(t.queryOne(".terms-container"),"hide");else{var c=t.byId("oauth");t.byId("accept").value="true",c.submit()}t.queryOne("button[autofocus]").focus()},addEventHandlers:function(){e.nodeListToArray(t.query(".js-terms-submit")).forEach(function(t){e.addEvent(t,"click",this._handleSubmitBtn)}.bind(this))},_handleSubmitBtn:function(e){e.preventDefault();var n=t.byId("oauth"),i=t.byId("accept");"yes"==e.target.getAttribute("data-accept")&&(i.value="true"),n.submit()}}}),define("termsConditions",["setupSocial","acceptTerms"],function(e,t){return{startup:function(n){n.isAcceptOrgAccessNotice?t.startup(n):e.startup(n)}}}),define("text!../contents/createAccount.html",[],function(){return'
\n
\n

\n {{#info.isHubRelated}}{{i18n.createHubAcct}}{{/info.isHubRelated}}\n {{^info.isHubRelated}}{{i18n.createPublic}}{{/info.isHubRelated}}\n

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n {{#info.isHubRelated}}\n
\n {{^info.customSignupText}}\n {{i18n.hubAcctCanDo}}:
\n
    \n
  • {{i18n.hubAcctCan1}}
  • \n
  • {{i18n.hubAcctCan2}}
  • \n
  • {{i18n.hubAcctCan3}}
  • \n
\n {{/info.customSignupText}}\n {{#info.customSignupText}}\n

{{&.}}

\n {{/info.customSignupText}}\n
\n {{/info.isHubRelated}}\n {{^info.isHubRelated}}\n
\n {{i18n.publicAcctLimit}}
\n {{i18n.publicAcctCanDo}}:
\n
    \n
  • {{i18n.publicAcctCan1}}
  • \n
  • {{i18n.publicAcctCan2}}
  • \n
  • {{i18n.publicAcctCan3}}
  • \n
\n
\n {{/info.isHubRelated}}\n {{#info.showEmail}}\n
\n
\n \n \n \n \n \n \n
\n
\n
{{&i18n.readTermsOfUseMsg}}
\n \n
\n {{i18n.acceptLegal}}\n {{#info.termsAndConditions}}\n \n {{/info.termsAndConditions}}\n \n
\n \n
\n \n
\n
\n
\n
\n {{/info.showEmail}}\n {{#info.showSocial}}\n
\n \n
\n {{/info.showSocial}}\n
\n{{#info.termsAndConditions}}\n\n{{/info.termsAndConditions}}\n'}),define("createAccount",["calcite-web","helpers","mustache","icons","socialHelper","i18n!../nls/oauth","text!../contents/createAccount.html"],function(e,t,n,i,a,s,r){return{emailRe:/@/,error:null,startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,t.setTitle(s.createAccount.title||s.createAccount.windowTitle),t.checkRTL(n.locale),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(o){t.checkRTL(o.locale),e.addClass(document.body,"top-align");var c=o.hubEnabled||o.isCommunity;if(o.isHubRelated=c,o.hostname=t.getPortalHostname(o,o.refUrl),o.showBoth=!c||o.isAccountSocialAutoJoins&&o.isEnableArcGISAutoSignups,o.showEmail=!c||o.isEnableArcGISAutoSignups,o.showSocial=!c||o.isAccountSocialAutoJoins,(o.showBoth||o.showSocial)&&a.addSocialInfo(o),o.customSignupText&&(o.customSignupText=o.customSignupText.replace(/\n/g,"
")),t.queryOne(".content").innerHTML=n.render(r,{info:o,i18n:t.extend({ok:s.securityQuestion.okBtn},s.createAccount),icons:i}),c){var l=o.isCommunity?o.orgName:o.companionOrganizations&&o.companionOrganizations[0]&&o.companionOrganizations[0].orgName;e.nodeListToArray(t.query(".js-hubname")).forEach(function(e){e.innerHTML=t.sub(e.innerHTML,{hubname:l})})}if(!c||o.showEmail){var d=t.byId("readTou");d.innerHTML=t.sub(d.innerHTML,{touHref:"https://www.esri.com/en-us/legal/terms/master-agreement-product",privacyHref:"https://www.esri.com/legal/privacy"})}},addEventHandlers:function(){this.authInfo.showEmail&&(e.addEvent(t.byId("email"),"blur",this._checkValidEmail.bind(this)),e.addEvent(t.byId("email"),"blur",this._checkMatchEmail.bind(this)),e.addEvent(t.byId("confirm"),"blur",this._checkMatchEmail.bind(this)),e.addEvent(t.byId("firstName"),"blur",this._checkName.bind(this)),e.addEvent(t.byId("lastName"),"blur",this._checkName.bind(this)),e.nodeListToArray(t.query("#privacy, #terms, #hubterms")).forEach(function(t){e.addEvent(t,"change",function(e){var t=e.target;this.error&&this.error.id==t.id&&t.checked&&(this.error=null,this._clearErrors())}.bind(this))}.bind(this)),e.addEvent(t.byId("create"),"submit",function(n){n.preventDefault(),this.error=null,this._clearErrors(),e.nodeListToArray(t.query("input[required]")).every(function(e){return this._checkEmpty({target:e})}.bind(this)),null==this.error&&(this.authInfo.showEmail&&(t.byId("accept").value=!0),n.target.submit())}.bind(this)),e.nodeListToArray(t.query(".js-modal-toggle")).forEach(function(t){e.addEvent(t,"keydown",function(e){"Tab"!==e.key&&9!==e.keyCode&&(e.preventDefault(),"Space"!=e.key&&"Enter"!=e.key&&0!=e.keyCode&&13!=e.keyCode&&32!=e.keyCode||e.target.click())})}))},_checkEmpty:function(e){var n=e.target,i=t.queryOne(".js-"+n.id+"-error"),a=0==n.value.length||"checkbox"==n.type.toLowerCase()&&!0!==n.checked;return a&&this._reportError({el:n,errEl:i,valid:!a,msg:s.createAccount.errors["missing_"+n.id]}),!a},_checkName:function(e){var n=e.target,i=t.queryOne(".js-"+n.id+"-error"),a=n.value.length>0,r=n.value.length>40;return this._clearErrors(),r?(this._reportError({el:n,errEl:i,valid:!1,msg:s.createAccount.errors.long_name,focus:!1}),!1):(a&&this._reportError({el:n,errEl:i,valid:!0,msg:""}),!0)},_checkValidEmail:function(e){var n=e.target,i=n.value,a=t.queryOne(".js-"+n.id+"-error"),r=this.emailRe.test(i);if(this._clearErrors(),i.length>0)return this._reportError({el:n,errEl:a,valid:r,msg:s.createAccount.errors.invalid_email,focus:!1}),r},_checkMatchEmail:function(e){var n=e.target,i="email"==n.id?t.byId("confirm"):t.byId("email"),a=n.value,r=i.value,o=t.queryOne(".js-confirm-error"),c=a!=r;if(this._clearErrors(),a.length>0&&r.length>0)return this._reportError({valid:!c,el:n,errEl:o,msg:s.createAccount.errors.unmatched_email,focus:!1}),!c},_reportError:function(t){var n="";t.valid||e.hasClass(t.errEl,"is-active")?t.valid&&(n="removeClass",this.error&&this.error.id==t.el.id&&(this.error=null)):(n="addClass",t.errEl.innerHTML=t.msg,this.error={id:t.el.id,focusEl:t.el},!1!==t.focus&&t.el.focus()),n&&(e[n](t.el,"input-error"),e[n](t.errEl,"is-active"))},_clearErrors:function(){e.nodeListToArray(t.query(".input-error-message.is-active")).forEach(function(t){e.removeClass(t,"is-active")}),e.nodeListToArray(t.query(".input-error")).forEach(function(t){e.removeClass(t,"input-error")})}}}),define("text!../contents/setupAccount.html",[],function(){ return'
\n
\n

\n {{^info.join}}\n {{^info.isCommunity}}{{i18n.createAccount.setupPublic}}{{/info.isCommunity}}\n {{#info.isCommunity}}{{i18n.createAccount.setupHubAcct}}{{/info.isCommunity}}\n {{/info.join}}\n {{#info.join}}\n {{i18n.createAccount.titleJoin}}\n {{/info.join}}\n

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n
\n
\n \n \n
\n {{i18n.createAccount.usernameMust}}:\n
    \n
  • {{i18n.createAccount.usernameReq1}}
  • \n
  • {{i18n.createAccount.usernameReq2}}
  • \n
  • {{i18n.createAccount.usernameReq5}}
  • \n
  • {{i18n.createAccount.usernameReq4}}
  • \n
\n
\n \n
\n
\n {{i18n.createAccount.passwordMust}}:\n
    \n {{#rules}}\n
  • {{label}}
  • \n {{/rules}}\n
\n
\n \n {{#info.join}}\n
\n \n \n \n \n {{/info.join}}\n
\n \n \n {{#info.join}}\n
\n \n \n
\n {{/info.join}}\n {{^info.join}}\n \n {{/info.join}}\n
\n
\n
\n'}),define("setupAccount",["calcite-web","helpers","mustache","qwest","PasswordMeter","icons","i18n!../nls/oauth","text!../contents/setupAccount.html","text!../contents/setupAccount_smx.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r,o,c,l,d){return{social:!1,rules:null,meter:null,valid_username:!1,valid_password:!1,valid_confirmPass:!1,valid_firstName:!0,valid_lastName:!0,valid_email:!0,valid_confirm:!0,smxFocus:!1,startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,this.smxFocus="storymapsexpress"==n.client_id.toLowerCase(),this.social=Boolean(n.socialLoginProviderName),t.setTitle(this.smxFocus?r.createAccount.title_smx:r.createAccount.title||r.createAccount.windowTitle),t.checkRTL(n.locale),n.hostname=t.getPortalHostname(n,n.refUrl),this.smxFocus&&(r=r.smx),this.rules=this._setRules(),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(u){t.checkRTL(u.locale),e.addClass(document.body,"top-align"),this.smxFocus&&(u.username?u.suggestedUsername=u.username:u.prePopulatedUsername?u.suggestedUsername=u.prePopulatedUsername:u.suggestedSocialUsername&&(u.suggestedUsername=u.suggestedSocialUsername),this.valid_username=Boolean(u.suggestedUsername),u.importedFromSocial=function(){var e=this;return e&&e.length&&(e=r.createAccount["imported_"+e]),e});var h=t.queryOne(".content"),f=this.smxFocus?c:o;if(h.innerHTML=n.render(f,{info:u,i18n:r,icons:s,rules:this.rules.password},{header:l,footer:d}),t.byId("oauth_state").setAttribute("value",u.oauth_state),!this.social&&this._buildQuestions(),u.isCommunity||u.hubEnabled){var p=u.isCommunity?u.orgName:u.companionOganizations&&u.companionOganizations[0]&&u.companionOganizations[0].orgName;e.nodeListToArray(t.query(".js-hubname")).forEach(function(e){e.innerHTML=t.sub(e.innerHTML,{hubname:p})})}if(u.join&&e.nodeListToArray(t.query(".js-orgname")).forEach(function(e){e.innerHTML=t.sub(e.innerHTML,{orgname:u.orgName})}),this.smxFocus){if(t.byId("TCLink").setAttribute("href","https://storymaps.com/legal"),t.byId("PLink").setAttribute("href","https://storymaps.com/privacy"),!this.valid_username){var m=t.queryOne("label[for=username]"),v=t.byId("username"),g=t.byId("usernameDesc");e.removeClass(m,"text-light"),v.removeAttribute("disabled"),g.innerHTML=""}if(this.social)return this.valid_password=!0,this.valid_confirmPass=!0,this.valid_confirm=!0,void this._populateProfileUrl()}this.meter=new a({attach:t.queryOne(".js-password-meter"),input:t.byId("password"),authInfo:u}),this.meter.startup(),i.get(this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/helpMap",{f:"json"},{responseType:"json",cache:!0}).then(function(n){var i=n.response,a=this.authInfo.isPortal?"120001688":"120001811",s=i.helpMap.m[a],r=this.authInfo.helpBase+s;e.nodeListToArray(t.query(".js-password-link")).forEach(function(e){e.setAttribute("href",r)})}.bind(this))},addEventHandlers:function(){if(this.social){var n=t.byId("username"),i=t.queryOne(".js-username-alert");e.addEvent(n,"input",function(t){this.smxFocus||(e.hasClass(i,"is-active")||e.addClass(i,"is-active"),this.valid_username=!1,this._validateInput(t))}.bind(this)),e.addEvent(n,"blur",(this.smxFocus?this._validateSmxUser:this._checkFieldValid).bind(this)),this.valid_firstName=Boolean(this.authInfo.newUserFirstname),this.valid_lastName=Boolean(this.authInfo.newUserLastname),e.nodeListToArray(t.query("#firstName, #lastName")).forEach(function(t){e.addEvent(t,"blur",this._checkNameLength.bind(this))}.bind(this))}else{e.addEvent(t.byId("password"),"focus",function(){e.addClass(t.queryOne(".js-password-alert"),"is-active")}),e.addEvent(t.byId("username"),"focus",function(){e.addClass(t.queryOne(".js-username-alert"),"is-active")}),e.nodeListToArray(t.query("#password, #username")).forEach(function(t){e.addEvent(t,"input",this._validateInput.bind(this)),e.addEvent(t,"blur",this._checkFieldValid.bind(this))}.bind(this)),e.addEvent(t.byId("question"),"change",function(n){var i=n.target,a=t.queryOne(".js-"+i.id+"-error");"-1"!=i.value&&(e.removeClass(i,"input-error"),e.removeClass(a,"is-active"))}),e.addEvent(t.byId("password"),"blur",function(e){var n=t.byId("password"),i=t.byId("confirmPass");n.value.length&&i&&i.value.length&&(this.valid_confirmPass=i.value==n.value,this._checkFieldValid({target:i})),this._validateInput(e)&&this._checkFieldValid(e)}.bind(this)),e.bus.on("meter:update",function(e){var t={target:e.input};this._validateInput(t),this._checkFieldValid(t)}.bind(this)),e.addEvent(t.byId("confirmPass"),"blur",function(e){var n=e.target,i=n.value,a=t.byId("password").value;this.valid_confirmPass=i==a,i.length>0&&this._checkFieldValid(e)}.bind(this)),e.addEvent(t.byId("confirmPass"),"input",function(n){var i=n.target;0==i.value.length&&(e.removeClass(this.findLabel(i),"field-suffix icon-ui-check-mark svg-icon-green"),e.removeClass(i,"input-error"),e.removeClass(t.queryOne(".js-"+i.id+"-error"),"is-active"))}.bind(this)),e.nodeListToArray(t.query("#email, #confirm")).forEach(function(t){e.addEvent(t,"blur",this._checkEmailMatch.bind(this))}.bind(this)),e.nodeListToArray(t.query("#firstName, #lastName")).forEach(function(t){e.addEvent(t,"blur",this._checkNameLength.bind(this))}.bind(this));var a=t.byId("cancelBtn");this.authInfo.join&&a&&e.addEvent(a,"click",function(e){e.preventDefault();var t=this.authInfo.hostname+this.authInfo.contextPath+"/oauth2/join?join="+this.authInfo.join+"&oauth_state="+this.authInfo.oauth_state;window.location.href=t}.bind(this))}if(this.smxFocus){var s=t.byId("profile"),r=t.byId("firstName"),o=t.byId("lastName");s&&(e.addEvent(s,"input",function(){this.valid_profile=s.checkValidity()}.bind(this)),e.addEvent(s,"blur",this._checkFieldValid.bind(this))),r&&o&&(e.addEvent(r,"blur",this._populateProfileUrl.bind(this)),e.addEvent(o,"blur",this._populateProfileUrl.bind(this)))}e.addEvent(t.byId("oauth"),"submit",this._checkRequired.bind(this))},_buildQuestions:function(){var e=t.byId("question"),n=[];Object.keys(r.securityQuestions).forEach(function(e){n[~~e-1]=r.securityQuestions[e]}),n.forEach(function(t,n){var i=document.createElement("option");i.innerHTML=t,i.setAttribute("value",n+1),e.appendChild(i)})},_setRules:function(){return{password:this._setPasswordRules(),username:[function(e){return e.length>5&&e.length<129},function(e){return!/[^\w\.@\-\s]/.test(e)},function(e){return!/[_\.@\-]/.test(e.slice(0,1))&&!/[_\.@\-]/.test(e.slice(-1))},function(e){return!/\s/.test(e)}]}},_setPasswordRules:function(){var e=[];e.push({label:r.createAccount.passwordReq1,rule:function(e){return e!=t.byId("username").value}});var n=this.authInfo.passwordPolicy;return n&&n.type?(n.minLength>0&&e.push({label:t.sub(r.resetPage.minLength,n),rule:function(e){return e.length>=this.authInfo.passwordPolicy.minLength}.bind(this)}),n.minUpper>0&&e.push({label:t.sub(r.resetPage.minUpper,n),rule:function(e){var t=e.match(/([A-Z])/g);return t&&t.length>=this.authInfo.passwordPolicy.minUpper}.bind(this)}),n.minLower>0&&e.push({label:t.sub(r.resetPage.minLower,n),rule:function(e){var t=e.match(/([a-z])/g);return t&&t.length>=this.authInfo.passwordPolicy.minLower}.bind(this)}),n.minLetter>0&&e.push({label:t.sub(r.resetPage.minLetter,n),rule:function(e){var t=e.match(/([A-Za-z])/g);return t&&t.length>=this.authInfo.passwordPolicy.minLetter}.bind(this)}),n.minDigit>0&&e.push({label:t.sub(r.resetPage.minDigit,n),rule:function(e){var t=e.match(/([0-9])/g);return t&&t.length>=this.authInfo.passwordPolicy.minDigit}.bind(this)}),n.minOther>0&&e.push({label:t.sub(r.resetPage.minOther,n),rule:function(e){var t=e.match(/([!"#$%&'()*+,-.\/:;<=>?@[\]^_`{|}~])/g);return t&&t.length>=this.authInfo.passwordPolicy.minOther}.bind(this)}),n.historySize>0&&e.push({label:t.sub(r.resetPage.historySize,n),rule:function(){return!0}})):e=e.concat([{label:r.createAccount.passwordReq2,rule:function(e){return e.length>=8}},{label:r.createAccount.passwordReq3,rule:function(e){return/[A-Za-z]/.test(e)}},{label:r.createAccount.passwordReq4,rule:function(e){return/[0-9]/.test(e)}}]),e},_validateInput:function(n){var i=n.target,a=i.id,s=this.rules[a]||[],r=0;0==i.value.length&&(e.removeClass(this.findLabel(i),"field-suffix icon-ui-check-mark svg-icon-green"),e.removeClass(i,"input-error"),e.removeClass(t.queryOne(".js-"+a+"-error"),"is-active")),s.forEach(function(n,s){n.rule&&(n=n.rule);var o=t.queryOne(".js-"+a+"-reqs").children[s];i.value.length&&n(i.value)?(r++,e.removeClass(o,"svg-icon-red icon-ui-notice-round"),e.addClass(o,"svg-icon-green icon-ui-check-mark")):(r--,e.removeClass(o,"svg-icon-green icon-ui-check-mark"),0===i.value.length&&e.removeClass(o,"svg-icon-red icon-ui-notice-round"))});var o=r==s.length;return"password"==a&&this.meter&&this.meter.strength<2&&o&&(o=!1,this.weakPassword=!0),this["valid_"+a]=o,o},_validateSmxUser:function(e){var t=e.target;this.valid_username=t.checkValidity(),this._checkFieldValid(e)},_populateProfileUrl:function(){var e=t.byId("profile"),n=t.byId("firstName"),a=t.byId("lastName");if(n&&n.value.length&&a&&a.value.length&&e&&0===e.value.length){var s=n.value.charAt(0).toUpperCase(),r=a.value.charAt(0).toUpperCase(),o=s+r+a.value.substring(1),c=this.authInfo.hostname+this.authInfo.contextPath+"/rest/community/checkUserDefinedNames";i.post(c,{udns:o,f:"json"},{cache:!0,responseType:"json"}).then(function(t,n){if(n&&n.udns){var i=n.udns[0];e.value=i.suggested,this.valid_profile=!0}}.bind(this))}},_checkFieldValid:function(n){var i=n.target,a=i.id,s=t.queryOne(".js-"+a+"-error");!this["valid_"+a]&&i.value.length>0?(s.innerHTML=this._getErrorMessage(i),e.addClass(i,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(s,"is-active"),e.removeClass(this.findLabel(i),"field-suffix icon-ui-check-mark svg-icon-green"),this.rules[a]&&t.queryOne(".js-"+a+"-reqs")&&this.rules[a].forEach(function(n,s){n.rule&&(n=n.rule);var r=t.queryOne(".js-"+a+"-reqs").children[s];n(i.value)?(e.removeClass(r,"svg-icon-red icon-ui-notice-round"),e.addClass(r,"svg-icon-green icon-ui-check-mark")):(e.removeClass(r,"svg-icon-green icon-ui-check-mark"),e.addClass(r,"svg-icon-red icon-ui-notice-round"))})):(e.removeClass(i,"input-error"),e.removeClass(s,"is-active"),"username"==a&&i.value.length>0?this._checkUsernameExist(i):"profile"==a&&i.value.length>0?this._checkUdnExist(i):this._markFieldValid(i))},_checkUsernameExist:function(n){var a=n.value,s=n.id,o=this.findLabel(n),c=t.queryOne(".js-"+n.id+"-error"),l=this.authInfo.hostname+this.authInfo.contextPath+"/rest/community/checkUsernames";e.addClass(o,"field-suffix icon-ui-loading-indicator svg-icon-blue"),i.post(l,{usernames:a,f:"json"},{cache:!0,responseType:"json"}).then(function(i,a){if(e.removeClass(o,"icon-ui-loading-indicator svg-icon-blue"),a&&a.usernames){var l=a.usernames[0];l&&l.requested==l.suggested?this._markFieldValid(n):(this["valid_"+s]=!1,c.innerHTML=r.createAccount.errors["taken_"+s],e.removeClass(o,"icon-ui-check-mark svg-icon-green"),e.addClass(n,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(c,"is-active"))}}.bind(this))},_checkUdnExist:function(n){var a=n.value,s=n.id,o=this.findLabel(n),c=t.queryOne(".js-"+n.id+"-error"),l=this.authInfo.hostname+this.authInfo.contextPath+"/rest/community/checkUserDefinedNames";e.addClass(o,"field-suffix icon-ui-loading-indicator svg-icon-blue"),i.post(l,{udns:a,f:"json"},{cache:!0,responseType:"json"}).then(function(i,a){if(e.removeClass(o,"icon-ui-loading-indicator svg-icon-blue"),a&&a.udns){var l=a.udns[0];l&&l.requested==l.suggested?this._markFieldValid(n):(this["valid_"+s]=!1,c.innerHTML=r.createAccount.errors["taken_"+s],e.removeClass(o,"icon-ui-check-mark svg-icon-green"),e.addClass(n,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(c,"is-active"))}}.bind(this))},_checkEmailMatch:function(){var n=t.byId("email"),i=t.byId("confirm"),a=t.queryOne(".js-confirm-error"),s=t.queryOne(".js-email-error"),o=n.value,c=i.value;if(o.length&&c.length){this.valid_email=n.validity.valid;var l=o==c;this.valid_confirm=l,l?(e.removeClass(i,"input-error"),e.removeClass(a,"is-active")):(e.addClass(i,"input-error"),a.textContent=r.createAccount.errors.unmatched_email,e.addClass(a,"is-active")),this.valid_email?(e.removeClass(n,"input-error"),e.removeClass(s,"is-active")):(e.addClass(n,"input-error"),s.textContent=r.createAccount.errors.invalid_email,e.addClass(s,"is-active"))}},_checkNameLength:function(n){var i=n.target,a=i.id,s=t.queryOne(".js-"+a+"-error"),o=i.value;o.length>40?(this["valid_"+a]=!1,e.addClass(i,"input-error"),s.textContent=r.createAccount.errors.long_name,e.addClass(s,"is-active")):(o.length&&(this["valid_"+a]=!0),e.removeClass(i,"input-error"),e.removeClass(s,"is-active"))},_markFieldValid:function(t){var n=t.id,i=this.findLabel(t);"firstName"!=n&&"lastName"!=n&&t.value.length>0&&e.addClass(i,"field-suffix icon-ui-check-mark svg-icon-green")},findLabel:function(e){var n;return this.smxFocus?(n=t.queryOne("label[for="+e.id+"]"))||(n=t.findPreviousSibling("label",e)):n=t.findParentNode("label",e),n},_getErrorMessage:function(e){var t=e.id,n=r.createAccount.errors,i="";switch(t){case"profile":case"username":i=e.validity.tooShort?n["short_"+t]:e.validity.tooLong?n["long_"+t]:e.validity.patternMismatch?"username"==t&&this.smxFocus&&/[^\w\.@\-\s]/.test(e.value)?n.invalid_username_chars:n["invalid_"+t]:n["taken_"+t];break;case"password":i=this.weakPassword?n.common_password:n.weak_password;break;default:i=n["invalid_"+t]}return i},_showLoader:function(){e.bus.emit("modal:open",{id:"smxloader"})},_checkRequired:function(n){n.preventDefault();var i=n.target,a=0;if(e.nodeListToArray(t.query("input[required], .required",i)).every(function(n){var i=n.tagName.toLowerCase(),s=t.queryOne(".js-"+n.id+"-error"),o=!1;return"input"==i&&"checkbox"!=n.type&&"radio"!=n.type?n.value.length>0&&!1!==this["valid_"+n.id]?o=!0:0==n.value.length&&(o=!1):"checkbox"==n.type?o=n.checked:"select"==i&&(o=n.selectedIndex>0),o?(e.removeClass(n,"input-error"),e.removeClass(s,"is-active")):e.hasClass(s,"is-active")||(s.innerHTML=r.createAccount.errors["missing_"+n.id],e.addClass(n,"input-error"),!t.queryOne(".input-error-message.is-active")&&e.addClass(s,"is-active")),o||a++,o},this),0===a&&this.valid_username&&this.valid_confirmPass&&this.valid_email&&this.valid_confirm&&this.valid_firstName&&this.valid_lastName&&!1!==this.valid_profile){var s=t.byId("accept");if(s){if(0==t.byId("smxterms").checked)return;s.value="true"}this.social&&this.smxFocus&&(t.byId("email").value=t.byId("username").value),!0!==this.valid_password?this.meter&&this.meter.state>=2?(this.valid_password=!0,this.smxFocus&&this._showLoader(),i.submit()):t.byId("password").focus():(this.smxFocus&&this._showLoader(),i.submit())}else{var o=t.queryOne(".input-error");o&&o.focus()}}}}),define("text!../contents/emailSent.html",[],function(){return'
\n {{> header}}\n {{^info.smxFocus}}\n
\n
\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n {{/info.smxFocus}}\n
\n
\n {{i18n.email.title}}\n
\n
\n
{{i18n.email.activationSent}}\n
{{i18n.email.clickLink}}
\n
\n
\n
\n {{> footer}}\n
\n'}),define("emailSent",["helpers","mustache","icons","i18n!../nls/oauth","text!../contents/emailSent.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r){return{startup:function(t){this.authInfo=t,document.documentElement.lang=t.locale,"storymapsexpress"==t.client_id&&(t.smxFocus=!0,i=i.smx),e.setTitle(i.email.title||i.email.windowTitle),e.checkRTL(t.locale),this.render(t),e.setContrastInfo()},render:function(o){e.checkRTL(o.locale);var c=e.queryOne(".content");o.hostname=e.getPortalHostname(o,o.refUrl);var l=o.smxFocus?s:"",d=o.smxFocus?r:"";c.innerHTML=t.render(a,{info:o,i18n:i,icons:n},{header:l,footer:d})}}}),define("text!../contents/invalidSignup.html",[],function(){return'
\n
\n

{{i18n.invalidSignup}}

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n {{i18n.invalidSignupMsg}}\n
\n
\n'}),define("invalidSignup",["helpers","mustache","icons","i18n!../nls/oauth","text!../contents/invalidSignup.html"],function(e,t,n,i,a){return{startup:function(t){this.authInfo=t,document.documentElement.lang=t.locale,e.setTitle(i.createAccount.invalidLinkTitle),e.checkRTL(t.locale),this.render(t),e.setContrastInfo()},render:function(s){e.checkRTL(s.locale);var r=e.queryOne(".content");s.hostname=e.getPortalHostname(s,s.refUrl),r.innerHTML=t.render(a,{info:s,i18n:i.createAccount,icons:n})}}}),define("signUp",["createAccount","setupAccount","emailSent","invalidSignup"],function(e,t,n,i){return{startup:function(a){a.signupLinkExpiredOrInvalid?i.startup(a):void 0!==a.newUserEmailValidated||void 0!==a.socialUserEmailAvailable||a.join?t.startup(a):a.newUserSignupEmailSent?n.startup(a):e.startup(a)}}}),define("text!../contents/signout.html",[],function(){return'
\n
\n

{{i18n.signOutTitle}}

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n {{i18n.signOutMsg}}\n
\n
\n'}),define("signout-new",["helpers","mustache","icons","i18n!../nls/oauth","text!../contents/signout.html"],function(e,t,n,i,a){return{startup:function(t){this.authInfo=t,document.documentElement.lang=t.locale,e.setTitle(i.signOutTitle),this.render(t),e.setContrastInfo()},render:function(s){e.checkRTL(s.locale);var r=e.queryOne(".content");s.hostname=e.getPortalHostname(s,s.refUrl),r.innerHTML=t.render(a,{info:s,i18n:i,icons:n})}}}),define("text!../contents/approve.html",[],function(){return'
\n
\n

{{i18n.approvalTitle}}

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n
\n \n
\n
\n \n {{&icons.user}}\n {{info.username}}\n
\n \n
\n
\n
\n

{{info.appTitle}}\n {{#info.appOrgInfo}}({{i18n.developedByOrg}}){{/info.appOrgInfo}}\n {{^info.isPortal}}{{i18n.accessAccountInfo}}{{/info.isPortal}}\n {{#info.isPortal}}{{i18n.accessEnterpriseInfo}}{{/info.isPortal}}\n

\n {{#info.appOrgInfo}}\n \n \n {{&icons.help}}\n \n \n {{/info.appOrgInfo}}\n
\n
\n
\n \n \n
\n
\n
\n
\n'}),define("text!../contents/appInfoModal.html",[],function(){return'{{#info.appOrgInfo}}\n\n{{/info.appOrgInfo}}\n'}),define("approve",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/approve.html","text!../contents/appInfoModal.html"],function(e,t,n,i,a,s,r){return{startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,t.setTitle(a.approvalTitle),t.checkRTL(n.locale),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(e){t.checkRTL(e.locale);var o=t.queryOne(".content");e.hostname=t.getPortalHostname(e,e.refUrl),o.innerHTML=n.render(s+r,{info:e,i18n:a,icons:i}),t.byId("anotherLink").href=window.location.href.replace("approve","authorize")+(e.redirect_uri?"&redirect_uri=":"");var c=t.queryOne(".js-org-info");c&&(c.innerHTML=t.sub(c.innerHTML,{orgname:e.appOrgInfo?e.appOrgInfo.name:"",portalName:e.orgName}))},addEventHandlers:function(){e.nodeListToArray(t.query(".js-modal-toggle")).forEach(function(t){e.addEvent(t,"keydown",function(e){"Tab"!==e.key&&9!==e.keyCode&&(e.preventDefault(),"Space"!=e.key&&"Enter"!=e.key&&0!=e.keyCode&&13!=e.keyCode&&32!=e.keyCode||e.target.click())})})}}}),define("text!../contents/mfa.html",[],function(){ return'
\n \n
\n

{{i18n.mfaEnablePage.title}}

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n

\n {{#info.enforceMfa}}{{i18n.mfaEnablePage.step1ForcedMfa}}{{/info.enforceMfa}}\n {{^info.enforceMfa}}{{i18n.mfaEnablePage.step1Title}}{{/info.enforceMfa}}\n

\n

{{i18n.mfaEnablePage.expectAdditionalSteps}}

\n

{{i18n.mfaEnablePage.installAuthenticatorApp}}

\n

{{i18n.mfaEnablePage.esriSupportsApps}}

\n {{i18n.mfaEnablePage.learnMore}}\n\n \n\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n

\n {{i18n.mfaEnablePage.enterVerifyCode}}\n

\n
\n \n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
{{i18n.mfaEnablePage.exitMfa}}
\n

{{i18n.mfaEnablePage.exitMfaSetup}}

\n
\n
\n \n \n
\n
\n \n
\n'}),define("mfa",["calcite-web","qwest","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/mfa.html"],function(e,t,n,i,a,s,r){return{currentTab:0,startup:function(t){this.authInfo=t,document.documentElement.lang=t.locale,n.setTitle(s.mfaEnablePage.title||s.mfaEnablePage.windowTitle),n.checkRTL(t.locale),t.hostname=n.getPortalHostname(t,t.refUrl),t.mfaSecretKey=t.mfaSecretKey&&t.mfaSecretKey.match(/.{1,4}/g),this.render(t),e.init(),this.addEventHandlers(),n.setContrastInfo()},render:function(o){n.checkRTL(o.locale),n.queryOne(".content").innerHTML=i.render(r,{info:o,i18n:s,icons:a});var c=n.queryOne("input[autofocus]");c&&c.focus(),this._displayMessage(o),"OAUTH_0018"==this.authInfo.messageCode&&(this._stepWizard({target:{className:"next"}}),this._stepWizard({target:{className:"next"}})),t.get(this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/helpMap",{f:"json"},{responseType:"json",cache:!0}).then(function(t){var i=t.response,a=this.authInfo.isPortal?"120004644":"120000980",s=i.helpMap.m[a],r=this.authInfo.helpBase+s;e.nodeListToArray(n.query(".js-mfa-learn-more")).forEach(function(e){e.setAttribute("href",r)})}.bind(this))},addEventHandlers:function(){e.nodeListToArray(n.query(".js-btn-cancel, .js-btn-return")).forEach(function(t){e.addEvent(t,"click",this._toggleWizard.bind(this))}.bind(this)),e.nodeListToArray(n.query(".js-btn-next, .js-btn-back")).forEach(function(t){e.addEvent(t,"click",this._stepWizard.bind(this))}.bind(this)),e.addEvent(n.queryOne(".js-no-scan-link"),"click",this._showVerCode.bind(this)),e.addEvent(n.byId("oauth"),"submit",this._validateForm.bind(this)),e.addEvent(n.byId("mfa_code"),"blur",this._blurMfaCode.bind(this)),e.addEvent(n.queryOne(".js-btn-exit"),"click",this._exitMfaForm.bind(this))},_toggleWizard:function(){e.removeClass(n.queryOne(".js-message"),"is-active"),this._toggleList(n.query(".js-tab-group, .js-exit"),"hide")},_showVerCode:function(){e.removeClass(n.queryOne(".js-verify-code"),"hide")},_stepWizard:function(t){e.removeClass(n.queryOne(".js-message"),"is-active");var i=t.target,a=i.className.indexOf("next")>-1,s=a?1:-1,r=this.currentTab+s,o=".js-step-"+this.currentTab+", .js-step-"+r;if(e.nodeListToArray(n.query(o)).forEach(function(t){e.toggleClass(t,"is-active")}),this.currentTab=r,2==this.currentTab)"OAUTH_0018"==this.authInfo.messageCode&&(this._displayMessage(this.authInfo),this.authInfo.messageCode=""),n.byId("mfa_code").focus();else{var c=n.byId("mfa_code"),l=n.queryOne(".js-mfa_code-error");l&&e.removeClass(l,"is-active"),c&&e.removeClass(c,"input-error"),c.value=""}},_validateForm:function(t){t.preventDefault();var i=t.target,a=n.byId("mfa_code"),r=n.queryOne(".js-mfa_code-error");6!=a.value.length?(r.innerHTML=s.mfaEnablePage.missingCode,e.addClass(r,"is-active"),e.addClass(a,"input-error")):i.submit()},_exitMfaForm:function(e){e.preventDefault();var t=n.byId("oauth"),i=n.queryOne("[name=cancelMfa]");i.removeAttribute("disabled"),i.disabled=!1,t.submit()},_blurMfaCode:function(t){var i=t.target,a=n.queryOne(".js-mfa_code-error");6==i.value.length&&e.hasClass(a,"is-active")&&(e.removeClass(a,"is-active"),e.removeClass(i,"input-error"))},_toggleList:function(t,n){t=e.nodeListToArray(t),t.forEach(function(t){e.toggleClass(t,n)})},_displayMessage:function(t){var i=t.messages&&t.messages.length&&t.messages[0];if(i){var a=i;i.toLowerCase().indexOf("your login session has been reset")>-1?a=s.expiredSession:i.toLowerCase().indexOf("invalid credentials for reset user")>-1?a=s.resetPage.invalidOldPassword:i.toLowerCase().indexOf("invalid verification code")>-1?a=s.mfaEnablePage.invalidVerificationCode:i.toLowerCase().indexOf("too many invalid attempts")>-1&&(a=s.mfaEnablePage.tooManyAttempts+"
"+s.mfaEnablePage.lockoutMessage);var r=n.queryOne(".js-message");r.innerHTML=a,e.addClass(r,"is-active"),r.focus()}}}}),define("text!../contents/mfaCheck.html",[],function(){return'
\n
\n

\n {{i18n.mfaEnablePage.title}}\n

\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}\n \n {{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n
\n \n \n \n
\n
\n
\n

{{i18n.mfaEnablePage.authenticateWith}}

\n \n \n
\n
\n \n \n
\n {{#info.isMfaRecoveryCodesEnabled}}\n \n {{/info.isMfaRecoveryCodesEnabled}}\n
\n
\n

{{i18n.mfaEnablePage.mfaVerifyMsg}}

\n \n \n

\n {{#info.isMfaRecoveryCodesEnabled}}\n \n {{/info.isMfaRecoveryCodesEnabled}}\n \n {{i18n.mfaEnablePage.havingTrouble}}\n \n

\n {{#info.isUserSecurityKeysEnabled}}{{#info.webauthnRequest}}{{#info.webauthnRequest.publicKey.allowCredentials.length}}\n \n {{/info.webauthnRequest.publicKey.allowCredentials.length}}{{/info.webauthnRequest}}{{/info.isUserSecurityKeysEnabled}}\n
\n
\n

{{i18n.mfaEnablePage.useRecoveryCode}}

\n

{{i18n.mfaEnablePage.enterRecoveryCodes}}

\n \n
\n \n \n
\n
\n
\n
\n

{{i18n.mfaEnablePage.verifyingKey}}

\n
\n
\n
{{i18n.mfaEnablePage.verifying}}...
\n
\n
\n \n \n
\n
\n
\n
\n
\n

{{i18n.mfaEnablePage.tooManyAttempts}}

\n

{{i18n.mfaEnablePage.lockoutMessage}}

\n
\n
\n
\n
\n
\n'}),define("mfaCheck",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/mfaCheck.html"],function(e,t,n,i,a,s){return{sourceScreen:"js-choices",codeType:"mfa",startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,t.setTitle(a.signIn),t.checkRTL(n.locale),n.hostname=t.getPortalHostname(n,n.refUrl),n.gaeFocus="geoanalyticsengine"==n.client_id.toLowerCase(),n.isUserSecurityKeysEnabled=!0===n.isUserSecurityKeysEnabled,n.isMfaRecoveryCodesEnabled=!0===n.isMfaRecoveryCodesEnabled,this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo();var i=t.queryOne("input[autofocus]");i&&i.focus(),this.showFirstScreen(n)},render:function(e){t.checkRTL(e.locale),t.queryOne(".content").innerHTML=n.render(s,{info:e,i18n:a,icons:i}),this._displayMessage(e)},addEventHandlers:function(){e.addEvent(t.byId("oauth"),"submit",this._validateCode.bind(this)),e.addEvent(t.byId("mfa_code"),"blur",this._blurMfaCode.bind(this)),e.addEvent(t.byId("mfa_code"),"keydown",this._handleMfaKeyup.bind(this)),e.addEvent(t.byId("recovery_code"),"blur",this._blurRecoveryCode.bind(this)),e.addEvent(t.queryOne(".js-btn-app"),"click",function(e){t.byId("storeChoiceCheck").checked?this._storeChoice("app"):this._clearChoice(),this._showAuthenticator(e)}.bind(this)),e.addEvent(t.queryOne(".js-btn-back-choices"),"click",this._showChoices.bind(this)),e.addEvent(t.queryOne(".js-btn-key"),"click",function(e){t.byId("storeChoiceCheck").checked?this._storeChoice("key"):this._clearChoice(),this._validateSecurityKey(e)}.bind(this)),e.addEvent(t.queryOne(".js-keys-back"),"click",function(n){this._showChoices(n);var i=t.queryOne(".js-keys-title"),s=t.queryOne(".js-keys .loader"),r=t.queryOne(".js-keys-actions");i.innerText=a.mfaEnablePage.verifyingKey,e.addClass(s,"is-active"),e.addClass(r,"hide")}.bind(this)),e.addEvent(t.queryOne(".js-keys-signin"),"click",function(){var e=t.byId("oauth");e.totp.value="true",e.submit()}),this.authInfo.isMfaRecoveryCodesEnabled&&e.nodeListToArray(t.query(".js-btn-recovery")).forEach(function(t){e.addEvent(t,"click",this._showRecovery.bind(this))}.bind(this));var n=t.queryOne(".js-btn-back-app");n&&e.addEvent(n,"click",function(e){this.sourceScreen="js-choices",this._showChoices(e)}.bind(this))},showFirstScreen:function(e){var t;if(e.messageCode)if("OAUTH_0018"==e.messageCode)this.codeType="mfa",t="js-authenticator",this.sourceScreen=t;else{if("OAUTH_00181"==e.messageCode)return void this._validateSecurityKey(new Event("click"));"OAUTH_00182"==e.messageCode?(this.codeType="recovery",t="js-recovery",this.sourceScreen=e.isUserSecurityKeysEnabled&&e.webauthnRequest?"js-choices":"js-authenticator"):"OAUTH_0007"==e.messageCode&&(t="js-lockout")}else if(e.isUserSecurityKeysEnabled&&e.webauthnRequest&&e.webauthnRequest.publicKey.allowCredentials&&e.webauthnRequest.publicKey.allowCredentials.length){t="js-choices";try{var n=localStorage.getItem("mfa_validator");if(n)if("app"==n)this.codeType="mfa",t="js-authenticator",this.sourceScreen=t;else if("key"==n)return void this._validateSecurityKey(new Event("click"))}catch(e){}}else this.codeType="mfa",t="js-authenticator",this.sourceScreen=t;this._show(t)},_show:function(e){t.query(".js-tab-section").forEach(function(t){t.classList.contains(e)?t.classList.add("is-active"):t.classList.remove("is-active")})},_showValidation:function(){this._show("js-keys")},_showAuthenticator:function(n){if(n.preventDefault(),this.codeType="mfa",this.sourceScreen="js-authenticator",e.removeClass(t.queryOne(".js-message"),"is-active"),this._show("js-authenticator"),t.byId("storeChoiceCheck").checked)try{localStorage.setItem("mfa_validator","app")}catch(e){}},_showRecovery:function(n){n.preventDefault(),this.codeType="recovery",e.removeClass(t.queryOne(".js-message"),"is-active"),this._show("js-recovery")},_showChoices:function(n){n.preventDefault(),e.removeClass(t.queryOne(".js-message"),"is-active"),e.removeClass(t.byId("recovery_code"),"input-error"),e.removeClass(t.queryOne(".js-recovery_code-error"),"is-active"),"js-authenticator"==this.sourceScreen?this._showAuthenticator(n):this._show("js-choices")},_validateCredentials:function(e){this._finishValidation(e,this.authInfo.webauthnRequest.publicKey)},_finishValidation:function(n,i){var s=new AbortController,r=s.signal;r.onabort=function(){var n=t.queryOne(".js-keys-title"),i=t.queryOne(".js-keys .loader"),s=t.queryOne(".js-keys-actions");n.innerText=a.mfaEnablePage.verifyingKeyCancelled,e.removeClass(i,"is-active"),e.removeClass(s,"hide"),this.sourceScreen="js-choices"},navigator.credentials.get({publicKey:this._formatCredentialsRequest(i),signal:r}).then(function(e){this._submitValidateCredentials(n,e)}.bind(this)).catch(function(e){console.error(e),s.abort()})},_submitValidateCredentials:function(e,t){var n=this._formatValidationResponse(t);e.authResponse.value=JSON.stringify(n),e.submit()},_formatCredentialsRequest:function(e){return e.challenge=t.fromBase64(e.challenge),e.allowCredentials&&e.allowCredentials.forEach(function(e){e.id=t.fromBase64(e.id)}),e},_formatValidationResponse:function(e){return{id:e.id,type:e.type,response:{authenticatorData:t.toBase64Str(e.response.authenticatorData),clientDataJSON:t.toBase64Str(e.response.clientDataJSON),signature:t.toBase64Str(e.response.signature),userHandle:t.toBase64Str(e.response.userHandle)},clientExtensionResults:e.getClientExtensionResults()}},_validateSecurityKey:function(e){e.preventDefault();var n=t.byId("oauth");navigator.credentials?(this._showValidation(),this._validateCredentials(n)):(n.totp.value="true",n.submit())},_validateCode:function(e){e.preventDefault();var t=e.target;"mfa"===this.codeType?this._validateMfaCode(t):"recovery"===this.codeType&&this._validateRecoveryCode(t)},_validateMfaCode:function(n){var i=t.byId("mfa_code"),a=t.queryOne(".js-mfa_code-error");6!=i.value.length?(e.addClass(a,"is-active"),e.addClass(i,"input-error"),i.focus()):n.submit()},_validateRecoveryCode:function(n){var i=t.byId("recovery_code"),a=t.queryOne(".js-recovery_code-error");i.value.length?n.submit():(e.addClass(a,"is-active"),e.addClass(i,"input-error"),i.focus())},_blurMfaCode:function(n){var i=n.target,a=t.queryOne(".js-mfa_code-error");6==i.value.length&&e.hasClass(a,"is-active")&&(e.removeClass(a,"is-active"),e.removeClass(i,"input-error"))},_blurRecoveryCode:function(n){var i=n.target,a=t.queryOne(".js-recovery_code-error");i.value.length&&e.hasClass(a,"is-active")&&(e.removeClass(a,"is-active"),e.removeClass(i,"input-error"))},_storeChoice:function(e){try{localStorage.setItem("mfa_validator",e)}catch(e){}},_clearChoice:function(){try{localStorage.removeItem("mfa_validator")}catch(e){}},_handleMfaKeyup:function(e){var t=e.target,n=parseInt(e.key,10);5==t.value.length&&n&&(e.preventDefault(),t.value+=n,this._validateMfaCode(t.form))},_displayMessage:function(n){var i=n.messages&&n.messages.length&&n.messages[0];if(i){var s=i;if(i.toLowerCase().indexOf("your login session has been reset")>-1)s=a.expiredSession;else if(i.toLowerCase().indexOf("invalid credentials for reset user")>-1)s=a.resetPage.invalidOldPassword;else if("OAUTH_0018"==n.messageCode)s=a.mfaEnablePage.invalidVerificationCode;else if("OAUTH_00181"==n.messageCode)s=a.mfaEnablePage.invalidSecurityKey;else if("OAUTH_00182"==n.messageCode)s=a.mfaEnablePage.invalidRecoveryCode;else if("OAUTH_0007"==n.messageCode)return;var r=t.queryOne(".js-message");r.innerHTML=s,e.addClass(r,"is-active")}}}}),define("text!../contents/updateSecurity.html",[],function(){ return'
\n {{> header}}\n {{^info.smxFocus}}\n
\n

{{i18n.updateProfile.securityQuestionTitle}}

\n {{^info.signinThumbnail}}\n {{^info.gaeFocus}}{{&icons.esriSvg}}{{/info.gaeFocus}}\n {{#info.gaeFocus}}{{/info.gaeFocus}}\n {{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n {{/info.smxFocus}}\n
\n
\n
\n \n
{{i18n.updateProfile.securityQuestionMessage}}
\n \n \n
\n\n \n \n
\n\n
\n \n
\n
\n
\n {{> footer}}\n
\n'}),define("updateSecurity",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/updateSecurity.html","text!../contents/header_smx.html","text!../contents/footer_smx.html"],function(e,t,n,i,a,s,r,o){return{startup:function(n){this.authInfo=n,document.documentElement.lang=n.locale,this.smxFocus=n.smxFocus="storymapsexpress"==n.client_id.toLowerCase(),n.gaeFocus="geoanalyticsengine"==n.client_id.toLowerCase(),t.setTitle(a.updateProfile.securityQuestionTitle),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(c){t.checkRTL(c.locale),e.addClass(document.body,"top-align");var l=t.queryOne(".content");c.hostname=t.getPortalHostname(c,c.refUrl),this.smxFocus&&(a=a.smx),l.innerHTML=n.render(s,{info:c,i18n:a,icons:i},{header:this.smxFocus?r:"",footer:this.smxFocus?o:""}),this._buildQuestionList(),this.displayMessage(c)},addEventHandlers:function(){e.addEvent(t.byId("question"),"change",this._validateQuestion.bind(this)),e.addEvent(t.byId("answer"),"blur",this._validateAnswer.bind(this)),e.addEvent(t.byId("oauth"),"submit",this._validateForm.bind(this))},displayMessage:function(n){var i=n.messages&&n.messages[0]||"";if(i){var s=i.toLowerCase()||"",r=i,o=t.queryOne(".js-message");s.indexOf("your login session has been reset")>-1?r=a.expiredSession:s.indexOf("unable to update user's profile")>-1&&(r=a.updateProfile.identityAnswerTooLong),o.innerHTML=r,e.addClass(o,"is-active"),o.focus()}},_buildQuestionList:function(){var e=t.byId("question"),n=[];Object.keys(a.securityQuestions).forEach(function(e){n[~~e-1]=a.securityQuestions[e]}),n.forEach(function(t,n){var i=document.createElement("option");i.innerHTML=t,i.setAttribute("value",n+1),e.appendChild(i)})},_validateQuestion:function(n){var i=n.target;if(e.hasClass(i,"input-error")&&-1!=i.value){var a=t.queryOne(".js-question-error");e.removeClass(a,"is-active"),e.removeClass(i,"input-error")}},_validateAnswer:function(n){var i=n.target,s=i.value,r=t.queryOne(".js-answer-error");s.length>60?(r.innerHTML=a.updateProfile.identityAnswerTooLong,!t.queryOne(".input-error-message.is-active")&&e.addClass(r,"is-active"),e.addClass(i,"input-error")):e.hasClass(i,"input-error")&&(e.removeClass(r,"is-active"),e.removeClass(i,"input-error"))},_validateForm:function(n){n.preventDefault();var i=t.byId("question"),s=t.byId("answer"),r=!0;if(-1==i.value){var o=t.queryOne(".js-question-error");r=!1,o.innerHTML=a.createAccount.errors.missing_question,!t.queryOne(".input-error-message.is-active")&&e.addClass(o,"is-active"),e.addClass(i,"input-error")}if(0===s.value.length||s.value.length>60){var c=t.queryOne(".js-answer-error");r=!1,c.innerHTML=0===s.value.length?a.updateProfile.missingAnswer:a.updateProfile.identityAnswerTooLong,!t.queryOne(".input-error-message.is-active")&&e.addClass(c,"is-active"),e.addClass(s,"input-error")}r&&n.target.submit()}}}),define("text!../contents/joinOrg.html",[],function(){return'
\n
\n

\n {{#info.joinInfo}}{{i18n.createAccount.titleJoin}}{{/info.joinInfo}}\n {{^info.joinInfo}}{{i18n.createAccount.joinWindowTitle}}{{/info.joinInfo}}\n

\n {{^info.signinThumbnail}}{{&icons.esriSvg}}{{/info.signinThumbnail}}\n {{#info.signinThumbnail}}\n \n {{/info.signinThumbnail}}\n
\n
\n {{#info.joinInfo}}\n
\n \n \n
\n
\n
\n
\n

{{i18n.createAccount.createNewAccount}}

\n \n
\n
\n
\n
\n
\n
{{i18n.createAccount.or}}
\n
\n
\n
\n
\n
\n

{{i18n.createAccount.convertPublic}}

\n
{{i18n.createAccount.transferItems}}
\n
\n
\n
\n

{{i18n.createAccount.createAccountUsing}}

\n {{#info.joinInfo.hasEnterprise}}\n
\n {{#info.joinInfo.oidcFederationInfo}}{{#info.joinInfo.canSignInOIDC}}\n \n {{/info.joinInfo.canSignInOIDC}}{{/info.joinInfo.oidcFederationInfo}}\n {{#info.joinInfo.idpName}}{{#info.joinInfo.canSignInIDP}}\n \n {{/info.joinInfo.canSignInIDP}}{{/info.joinInfo.idpName}}\n
\n {{/info.joinInfo.hasEnterprise}}\n {{^enterpriseOnly}}\n {{#info.joinInfo.hasSocial}}{{#info.joinInfo.canSignInSocial}}\n
\n \n \n \n \n
\n {{/info.joinInfo.canSignInSocial}}{{/info.joinInfo.hasSocial}}\n {{#info.joinInfo.canSignInArcGIS}}\n
\n \n
\n {{/info.joinInfo.canSignInArcGIS}}\n {{/enterpriseOnly}}\n
\n {{^enterpriseOnly}}\n \n {{/enterpriseOnly}}\n \n
\n
\n
\n \n {{/info.joinInfo}}\n
\n'}),define("joinOrg",["calcite-web","helpers","mustache","qwest","icons","./socialHelper","i18n!../nls/oauth","text!../contents/joinOrg.html"],function(e,t,n,i,a,s,r,o){return{startup:function(e){this.authInfo=e,document.documentElement.lang=e.locale,t.setTitle(r.createAccount.joinWindowTitle),t.checkRTL(e.locale),e.hostname=t.getPortalHostname(e,e.refUrl),i.get(this.authInfo.hostname+this.authInfo.contextPath+"/community/invitations/"+this.authInfo.join,{f:"json"},{responseType:"json",cache:!0}).then(this._handleJoinInfo.bind(this))},_handleJoinInfo:function(n,i){!i.error&&i.account?(this.authInfo.joinInfo=this.authInfo.joinInfo||i.account,this.authInfo.joinInfo.targetProviderAll="all"==this.authInfo.joinInfo.targetUserProvider,this.authInfo.joinInfo.hasEnterprise=this.authInfo.joinInfo.oidcFederationInfo||this.authInfo.joinInfo.idpName,this.authInfo.joinInfo.hasSocial=this.authInfo.joinInfo.socialProviders&&this.authInfo.joinInfo.socialProviders.length,this.authInfo.joinInfo.hasSocial&&s.addSocialInfo(this.authInfo),this.render(this.authInfo),e.init(),this.addEventHandlers()):(this.authInfo.messageCode=i.error.messageCode,this.authInfo.messages=[i.error.message],this.authInfo.joinInfo=!1,this.render(this.authInfo)),t.setContrastInfo()},render:function(i){t.queryOne(".content").innerHTML=n.render(o,{info:i,i18n:r,icons:a,enterpriseOnly:!i.joinInfo.targetProviderAll}),this._displayMessage(i),e.nodeListToArray(t.query(".js-orgname")).forEach(function(e){e.innerHTML=t.sub(e.innerHTML,{orgname:i.orgName||i.joinInfo.name})});var s=t.query("input[name=provider]");if(1===s.length){if(i.singleOption=!0,s[0].checked=!0,"info"!=s[0].value){t.queryOne(".js-new-title").textContent=r.createAccount.createAccountUsing;var c=t.queryOne(".js-new-method"),l=s[0].parentElement.querySelectorAll("input ~ *");e.nodeListToArray(l).forEach(function(e){c.appendChild(e)})}if(!i.joinInfo.targetProviderAll){e.addClass(t.queryOne(".js-convert-or"),"hide"),e.addClass(t.queryOne(".js-convert-acct"),"hide");var d=t.queryOne(".js-new-acct");e.addClass(d,"btn btn-fill"),e.removeClass(d,"panel panel-white")}}else i.joinInfo.targetProviderAll||this._showAccounts()},addEventHandlers:function(){var n=t.queryOne(".js-new-acct");this.authInfo.joinInfo.targetProviderAll&&(!this.authInfo.singleOption&&e.addEvent(n,"click",this._showAccounts.bind(this)),e.addEvent(t.queryOne(".js-convert-acct"),"click",this._authPublicAcct.bind(this)));var i=t.queryOne(".js-back");i&&e.addEvent(i,"click",this._showMain.bind(this)),e.addEvent(t.queryOne(".js-next"),"click",this._authAccount.bind(this)),this.authInfo.singleOption&&e.addEvent(n,"click",this._authAccount.bind(this))},_showAccounts:function(){var n=t.queryOne(".js-join-options"),i=t.queryOne(".js-join-methods");e.addClass(n,"hide"),e.removeClass(i,"hide")},_showMain:function(){var n=t.queryOne(".js-join-options"),i=t.queryOne(".js-join-methods");e.addClass(i,"hide"),e.removeClass(n,"hide")},_authPublicAcct:function(){var e=t.byId("oauth");e.action+="authorize",e.submit()},_authAccount:function(){var e=t.queryOne("input[name=provider]:checked"),n=t.byId("oauth");if(e){var i=e.value,a="";if("saml"==i)n.action+="saml/authorize";else if(i.indexOf("oidc")>-1)a=i.split("-")[1],n.action+="oidc/"+a+"/authorize";else if(i.indexOf("social")>-1){a=i.split("-")[1];var s=t.byId("social_provider"),r=t.byId("social_create_new"),o=t.byId("social_auto_create");s.setAttribute("value",a),[s,r,o].forEach(function(e){n.appendChild(e)}),n.action=this.authInfo.hostname+this.authInfo.contextPath+"/rest/oauth2/social/authorize"}else n.action=this.authInfo.hostname+this.authInfo.contextPath+"/rest/oauth2/signup";n.submit()}},_displayMessage:function(n){var i=n.messages&&n.messages.length&&n.messages[0];if(i){var a=i;i.toLowerCase().indexOf("your login session has been reset")>-1?a=r.expiredSession:"COM_0005"==n.messageCode&&(a=r.invalidInvitation);var s=t.queryOne(".js-message");s.innerHTML=a,e.addClass(s,"is-active"),s.focus()}}}}),define("text!../contents/joinNotice.html",[],function(){return'\n'}),define("joinNotice",["calcite-web","helpers","mustache","icons","i18n!../nls/oauth","text!../contents/joinNotice.html"],function(e,t,n,i,a,s){return{startup:function(e){this.authInfo=e,document.documentElement.lang=e.locale,t.setTitle(a.createAccount.joinWindowTitle),t.checkRTL(e.locale),this.render(e),this.addEventHandlers(e),t.setContrastInfo()},render:function(r){var o=document.body;r.hostname=t.getPortalHostname(r,r.refUrl),o.innerHTML=n.render(s,{info:r,i18n:a,icons:i}),e.nodeListToArray(t.query(".js-orgname")).forEach(function(e){e.textContent=t.sub(e.textContent,{orgname:r.orgName})}),e.nodeListToArray(t.query(".js-username")).forEach(function(e){e.textContent=t.sub(e.textContent,r)})},addEventHandlers:function(n){e.addEvent(t.queryOne(".js-submit"),"click",function(){t.byId("accept_notice").value=!0,t.byId("oauth").submit()}),e.addEvent(t.queryOne(".js-cancel"),"click",function(){var e=t.byId("oauth");e.action=n.hostname+n.contextPath+"/oauth2/join",e.submit()})}}}),define("text!../contents/activateOrg.html",[],function(){ return'
\n
\n

\n {{i18n.activate.activateOrg}}\n

\n {{&icons.esriSvg}}\n
\n
\n
\n \n \n
\n
\n
\n

{{i18n.activate.chooseMethod}}

\n
\n
\n
\n
\n {{&icons.organization}}\n
\n
{{i18n.activate.createNew}}
\n
\n {{&icons.chevronUp}}\n
\n
\n
\n
\n
\n
\n {{&icons.user32}}\n {{&icons.arrowRight}}\n {{&icons.organization}}\n
\n
{{i18n.activate.convertPublic}}
\n
\n {{&icons.chevronUp}}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

{{i18n.activate.basicOrgSettings}}

\n \n

\n {{#info.gaeFocus}}\n {{i18n.activate.orgNameDesc_gae}}\n {{/info.gaeFocus}}\n {{^info.gaeFocus}}\n {{i18n.activate.orgNameDesc}}\n {{/info.gaeFocus}}\n

\n \n
\n {{^info.gaeFocus}}\n \n

{{i18n.activate.orgKeyDesc}}

\n \n
\n \n

{{i18n.activate.regionDesc}}

\n \n {{/info.gaeFocus}}\n \n

\n {{#info.gaeFocus}}\n {{i18n.activate.eueipDesc_gae}}\n {{/info.gaeFocus}}\n {{^info.gaeFocus}}\n {{i18n.activate.eueipDesc}}\n {{/info.gaeFocus}}\n

\n \n \n
\n
\n \n {{i18n.mfaEnablePage.prevBtn}}\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n

{{i18n.activate.accountDetails}}

\n \n \n \n \n {{#info.showUserTypes}}\n
\n
\n \n
\n {{/info.showUserTypes}}\n {{^info.showUserTypes}}\n {{#info.userTypes}}{{/info.userTypes}}\n {{/info.showUserTypes}}\n
\n
\n
{{&i18n.createAccount.readTermsOfUseMsg}}
\n \n
\n {{i18n.createAccount.acceptLegal}}\n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n

{{i18n.activate.setupLogin}}

\n \n
\n {{i18n.createAccount.usernameMust}}:\n
    \n
  • {{i18n.createAccount.usernameReq1}}
  • \n
  • {{i18n.createAccount.usernameReq2}}
  • \n
  • {{i18n.createAccount.usernameReq5}}
  • \n
  • {{i18n.createAccount.usernameReq4}}
  • \n
\n
\n \n
\n
\n {{i18n.createAccount.passwordMust}}:\n
    \n {{#rules.password}}\n
  • {{label}}
  • \n {{/rules.password}}\n
\n
\n \n
\n \n \n
\n \n \n
\n
\n
\n
\n {{i18n.activate.convertTitle}}\n
\n
\n
{{i18n.activate.convertWarning}}
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n

{{i18n.activate.chooseAuthMethod}}

\n {{#info.showSocialLogins}}\n
\n \n
\n {{/info.showSocialLogins}}\n
\n \n
\n
\n \n \n
\n
\n
\n \n
\n'}),define("activateOrg",["calcite-web","helpers","mustache","qwest","icons","socialHelper","PasswordMeter","i18n!../nls/oauth","text!../contents/activateOrg.html"],function(e,t,n,i,a,s,r,o,c){return{emailRe:/@/,errors:null,socialProviders:["google","apple","facebook","github"],startup:function(n){this.authInfo=n,this.errors={},this.errorMessage="",this.focusEl=null,document.documentElement.lang=n.locale,t.setTitle(o.activate.title),t.checkRTL(n.locale),this.gaeFocus=n.gaeFocus="geoanalyticsengine"==n.client_id.toLowerCase(),this.personalUse="Personal Use"==n.subscriptionType,this.rules=this._setRules(),this.render(n),e.init(),this.addEventHandlers(),t.setContrastInfo()},render:function(l){e.addClass(document.body,"top-align");var d=l.hubEnabled||l.isCommunity;if(l.isHubRelated=d,l.hostname=t.getPortalHostname(l,l.refUrl),l.userTypes=this._calculateUserTypes(l),l.showUserTypes=l.userTypes.length>1,this.personalUse&&(l.showSocialLogins=!0,l.socialProviders=this.socialProviders,s.addSocialInfo(l)),t.queryOne(".content").innerHTML=n.render(c,{info:l,i18n:o,icons:a,rules:this.rules}),this._displayMessage(l),!this.gaeFocus&&this._fetchRegions(),this._buildQuestions(),l.showUserTypes){var u=t.byId("userType");u.value=u.options[0].value}if(!d||l.showEmail){var h=t.byId("readTou");h.innerHTML=t.sub(h.innerHTML,{touHref:"https://www.esri.com/en-us/legal/terms/master-agreement-product",privacyHref:"https://www.esri.com/legal/privacy"}),this.meter=new r({attach:t.queryOne(".js-password-meter"),input:t.byId("password"),authInfo:l}),this.meter.startup(),i.get(this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/helpMap",{f:"json"},{responseType:"json",cache:!0}).then(function(n){var i=n.response,a=this.authInfo.isPortal?"120001688":"120001811",s=i.helpMap.m[a],r=this.authInfo.helpBase+s;e.nodeListToArray(t.query(".js-password-link")).forEach(function(e){e.setAttribute("href",r)})}.bind(this))}this.gaeFocus&&this._showNewOrg({preventDefault:function(){}})},addEventHandlers:function(){e.addEvent(t.queryOne(".js-new-org"),"click",this._showNewOrg.bind(this)),"Personal Use"==this.authInfo.subscriptionType?(e.addEvent(t.queryOne(".js-convert-public"),"click",this._showConvertWarning.bind(this)),e.addEvent(t.queryOne(".js-warning-finish"),"click",this._showConvertPublic.bind(this)),e.addEvent(t.queryOne(".js-warning-back"),"click",this._showMethods.bind(this)),e.addEvent(t.queryOne(".js-auth-methods-next"),"click",this._useAuthChoice.bind(this)),e.addEvent(t.queryOne(".js-auth-methods-back"),"click",this._showNewOrg.bind(this))):e.addEvent(t.queryOne(".js-convert-public"),"click",this._showConvertPublic.bind(this)),e.addEvent(t.queryOne(".js-basic-next"),"click",this._validateOrg.bind(this)),e.addEvent(t.queryOne(".js-basic-back"),"click",this._showMethods.bind(this)),e.addEvent(t.queryOne(".js-toggle-euei"),"click",this._toggleEueiSize.bind(this)),e.addEvent(t.queryOne(".js-user-back"),"click",this._showOrg.bind(this)),e.addEvent(t.queryOne(".js-user-next"),"click",this._validateUser.bind(this)),!this.gaeFocus&&e.addEvent(t.byId("orgKey"),"blur",this._checkOrgKeyExist.bind(this)),e.addEvent(t.queryOne(".js-pwd-back"),"click",this._showUser.bind(this)),e.addEvent(t.queryOne(".js-pwd-finish"),"click",this._validateSecurity.bind(this)),e.addEvent(t.byId("email"),"blur",this._checkValidEmail.bind(this)),e.addEvent(t.byId("confirm"),"blur",this._checkMatchEmail.bind(this)),e.addEvent(t.byId("password"),"focus",function(){e.addClass(t.queryOne(".js-password-alert"),"is-active")}),e.addEvent(t.byId("username"),"focus",function(){e.addClass(t.queryOne(".js-username-alert"),"is-active")}),e.nodeListToArray(t.query("#password, #username")).forEach(function(t){e.addEvent(t,"input",this._validateInput.bind(this)),e.addEvent(t,"blur",this._checkFieldValid.bind(this))}.bind(this)),e.addEvent(t.byId("question"),"change",this._checkRequired.bind(this)),e.addEvent(t.byId("answer"),"blur",this._checkRequired.bind(this)),e.addEvent(t.byId("password"),"blur",function(e){var n=t.byId("password"),i=t.byId("confirmPass");n.value.length&&i&&i.value.length&&(i.value!=n.value?(this.errors.confirmPass=!0,this.focusEl=i):this.errors.confirmPass=void 0,this._checkFieldValid({target:i})),this._validateInput(e)&&this._checkFieldValid(e)}.bind(this)),e.bus.on("meter:update",function(e){var t={target:e.input};this._validateInput(t),this._checkFieldValid(t)}.bind(this)),e.addEvent(t.byId("confirmPass"),"blur",function(e){var n=e.target,i=n.value;i!=t.byId("password").value?(this.errors.confirmPass=!0,this.focusEl=n):this.errors.confirmPass=void 0,i.length>0&&this._checkFieldValid(e)}.bind(this))},_calculateUserTypes:function(e){var t=[];return e.userLicenseTypes&&e.userLicenseTypes.length?t=e.userLicenseTypes.filter(function(e){return"2"==e.level&&!e.supportsSignInOnlyFromUTApps&&"active"==e.state}).map(function(e){return{id:e.id,name:e.name,description:e.description}}):t.push({id:"creatorUT",name:"Creator",description:"Creator"}),t},_showNewOrg:function(n){n.preventDefault(),e.addClass(t.queryOne(".js-message"),"hide"),e.addClass(t.queryOne(".js-activate-options"),"hide"),e.addClass(t.queryOne(".js-choose-auth-method"),"hide"),e.removeClass(t.queryOne(".js-setup-org"),"hide"),t.byId("headerTitle").innerText=o.activate.setupOrg;var i=t.byId("orgKey");i&&i.value.length&&this._checkOrgKeyExist({target:i})},_showConvertWarning:function(n){n.preventDefault(),e.addClass(t.queryOne(".js-message"),"hide"),e.addClass(t.queryOne(".js-activate-options"),"hide"),e.removeClass(t.queryOne(".js-convert-warning"),"hide"),t.byId("headerTitle").innerText=o.activate.convertHeading},_showConvertPublic:function(n){n.preventDefault(),e.addClass(t.queryOne(".js-message"),"hide");var i=t.byId("orgSetupNextBtn");i.innerText=o.activate.finishSetup,i.setAttribute("type","submit"),e.nodeListToArray(t.query(".progress-bar-container")).forEach(function(t){e.addClass(t,"hide")});var a=t.byId("newUserTypesWrapper"),s=t.byId("publicUserTypesWrapper");a&&(s.innerHTML=a.innerHTML,a.innerHTML=""),this.authInfo.convertPublic=!0,e.addClass(t.queryOne(".js-convert-warning"),"hide"),this._showNewOrg(n)},_toggleEueiSize:function(n){n.preventDefault();var i=n.target,a=t.byId("eueipDesc"),s="addClass",r=o.activate.showMore;e.hasClass(a,"truncate-overflow")&&(s="removeClass",r=o.activate.showLess),e[s](a,"truncate-overflow"),i.innerText=r},_showOrg:function(n){n.preventDefault(),this._resetErrors(),e.addClass(t.queryOne(".js-setup-user"),"hide"),e.removeClass(t.queryOne(".js-setup-org"),"hide"),t.byId("headerTitle").innerText=o.activate.setupOrg;var i=t.byId("orgKey");i&&i.value.length&&this._checkOrgKeyExist({target:i})},_showMethods:function(n){n.preventDefault(),this._resetErrors(),e.addClass(t.queryOne(".js-setup-org"),"hide"),e.addClass(t.queryOne(".js-convert-warning"),"hide"),e.addClass(t.queryOne(".js-choose-auth-method"),"hide"),e.removeClass(t.queryOne(".js-activate-options"),"hide"),e.nodeListToArray(t.query(".progress-bar-container")).forEach(function(t){e.removeClass(t,"hide")});var i=t.byId("orgSetupNextBtn"),a=t.byId("newUserTypesWrapper"),s=t.byId("publicUserTypesWrapper");a&&s&&s.children.length>0&&(a.innerHTML=s.innerHTML,s.innerHTML=""),i.innerText=o.mfaEnablePage.nextBtn,i.setAttribute("type","button"),this.authInfo.convertPublic=!1,t.byId("headerTitle").innerText=o.activate.activateOrg},_showUser:function(n){n.preventDefault(),this._resetErrors(),e.removeClass(t.queryOne(".js-setup-user"),"hide"),e.addClass(t.queryOne(".js-setup-pwd"),"hide"),t.byId("headerTitle").innerText=o.activate.setupUser},_useAuthChoice:function(n){n.preventDefault();var i=t.queryOne("[name=provider]:checked");if("info"===i.value)e.addClass(t.queryOne(".js-choose-auth-method"),"hide"),e.removeClass(t.queryOne(".js-setup-user"),"hide");else{var a=i.value.split("social-")[1],s=t.byId("oauth").action.replace("activateOrg","social/authorize"),r=new URLSearchParams({socialLoginProviderName:a,oauth_state:encodeURIComponent(this.authInfo.oauth_state),activationCode:this.authInfo.activationCode,orgName:t.queryOne("[name=orgName]").value,orgUrl:t.queryOne("[name=orgUrl]").value,orgRegion:t.queryOne("[name=orgRegion]").value,orgEuei:t.queryOne("[name=orgEuei]").value});location.href=s+"?"+r.toString()}},_validateOrg:function(n){n.preventDefault();var i=this.gaeFocus?Promise.resolve(!0):this._checkOrgKeyExist({target:t.byId("orgKey")});!1!==i&&i.then(function(n){!1!==n&&(!0!==this.errors.orgKey&&(this._resetErrors(),e.nodeListToArray(t.query(".js-setup-org input[required]")).every(function(e){return this._checkRequired({target:e})}.bind(this))),Object.keys(this.errors).length&&this.focusEl?this.focusEl.focus():!0===this.authInfo.convertPublic?(this._suspendButton(t.byId("orgSetupNextBtn")),t.queryOne("form#oauth").submit()):!0===this.personalUse?(e.addClass(t.queryOne(".js-setup-org"),"hide"),e.removeClass(t.queryOne(".js-choose-auth-method"),"hide")):(e.addClass(t.queryOne(".js-setup-org"),"hide"),e.removeClass(t.queryOne(".js-setup-user"),"hide"),t.byId("headerTitle").innerText=o.activate.setupUser))}.bind(this))},_validateUser:function(n){n.preventDefault(),this._resetErrors(),e.nodeListToArray(t.query(".js-setup-user input[required]")).every(function(e){return this._checkRequired({target:e})}.bind(this)),0===Object.keys(this.errors).length&&this._checkValidEmail({target:t.byId("email")}),Object.keys(this.errors).length&&this.focusEl?this.focusEl.focus():(e.addClass(t.queryOne(".js-setup-user"),"hide"),e.removeClass(t.queryOne(".js-setup-pwd"),"hide"))},_validateSecurity:function(n){if(n.preventDefault(),!0!==this.errors.confirmPass)this._resetErrors(),e.nodeListToArray(t.query(".js-setup-pwd input[required], .js-setup-pwd .required:not(input)")).every(function(e){return this._checkRequired({target:e})}.bind(this)),["username","password"].forEach(function(e){var n=t.byId(e);this._validateInput({target:n}),this._checkFieldValid({target:n})}.bind(this)),0===Object.keys(this.errors).length&&this._checkUsernameExist(t.byId("username")).then(function(){Object.keys(this.errors).length&&this.focusEl?this.focusEl.focus():(this._suspendButton(n.target),t.byId("oauth").submit())}.bind(this));else{this.errorMessage=null;var i=t.byId("confirmPass");0==i.value.length?this._checkRequired({target:i}):this._checkFieldValid({target:i}),Object.keys(this.errors).length&&this.focusEl?this.focusEl.focus():(this._suspendButton(n.target),t.byId("oauth").submit())}},_checkRequired:function(n){var i=n.target,a="",s=t.queryOne(".js-"+i.id+"-error"),r=0==i.value.length||"checkbox"==i.type.toLowerCase()&&!0!==i.checked||"select"==i.localName.toLowerCase()&&"-1"==i.value;return r?(this.errors[i.id]=!0,a=o.createAccount.errors["missing_"+i.id]):i.maxLength&&i.maxLength>0&&(r=i.value.length>i.maxLength)&&(this.errors[i.id]=!0,a=o.createAccount.errors["long_"+i.id]),r&&!this.errorMessage?(this.errorMessage=a,s.innerText=a,e.addClass(i,"input-error"),e.addClass(s,"is-active"),this.focusEl=i):!r&&this.errors[i.id]&&1===Object.keys(this.errors).length&&this._resetErrors(),!r},_resetErrors:function(n){n||(this.errors={}),this.errorMessage="",this.focusEl=null;var i=t.queryOne("input.input-error, select.input-error"),a=t.queryOne(".input-error-message.is-active");i&&e.removeClass(i,"input-error"),a&&e.removeClass(a,"is-active")},_checkValidEmail:function(n){var i=n.target,a=i.value,s=t.queryOne(".js-"+i.id+"-error"),r=a.length&&this.emailRe.test(a);!("email"in this.errors)&&Object.keys(this.errors).length>0||(r?(this._checkMatchEmail(),(this.errors.email||0===Object.keys(this.errors).length)&&this._resetErrors()):(this._resetErrors(),this.errors.email=!0,this.errorMessage=o.createAccount.errors.invalid_email,this.focusEl=i,s.innerText=this.errorMessage,e.addClass(i,"input-error"),e.addClass(s,"is-active")))},_checkMatchEmail:function(){var n=t.byId("confirm"),i=t.byId("email"),a=t.queryOne(".js-confirm-error"),s=i.value,r=n.value;!("confirm"in this.errors)&&Object.keys(this.errors).length>0||(s.length&&r.length&&s!=r?(this._resetErrors(),this.errors.confirm=!0,this.errorMessage=o.createAccount.errors.unmatched_email,this.focusEl=n,a.innerText=this.errorMessage,e.addClass(n,"input-error"),e.addClass(a,"is-active")):(this.errors.confirm||0===Object.keys(this.errors).length)&&this._resetErrors())},_setLoadingStatus:function(t,n){n?e.addClass(t,"field-suffix icon-ui-loading-indicator svg-icon-blue"):e.removeClass(t,"icon-ui-loading-indicator svg-icon-blue")},_suspendButton:function(t){e.addClass(t,"icon-ui-loading-indicator svg-icon-blue btn-disabled")},_checkOrgKeyExist:function(e){var t=e.target,n=t.value,a=t.parentElement;if(0===n.length)return!1;if(n[0].match(/[^a-zA-Z0-9]/)||n.match(/[^a-zA-Z0-9\-]/))return this._resetErrors(),this._markFieldInvalid(t,o.invalidCharacters),!1;var s=this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/isUrlKeyAvailable";return this._setLoadingStatus(a,!0),i.get(s,{urlKey:n,activationCode:this.authInfo.activationCode,f:"json"},{cache:!0,responseType:"json"}).then(function(e,n){return this._setLoadingStatus(a,!1),this._resetErrors(),!n||n.error?(console.log("Org Key checking service not available"),n&&n.error&&console.log(n.error),!1):n&&n.available?(this._markFieldValid(t),!0):(this._markFieldInvalid(t,o.createAccount.errors.taken_shortname),!1)}.bind(this))},_fetchRegions:function(){var e=this.authInfo.hostname+this.authInfo.contextPath+"/rest/portals/regions";i.get(e,{culture:this.authInfo.locale,f:"json"},{cache:!0,responseType:"json"}).then(this._buildRegions.bind(this))},_buildRegions:function(e,n){var i=t.byId("orgRegion"),a="";n.forEach(function(e){a+='"}),i.innerHTML=a},_buildQuestions:function(){var e=t.byId("question"),n=[];Object.keys(o.securityQuestions).forEach(function(e){n[~~e-1]=o.securityQuestions[e]}),n.forEach(function(t,n){var i=document.createElement("option");i.innerText=t,i.setAttribute("value",n+1),e.appendChild(i)})},_setRules:function(){return{password:this._setPasswordRules(),username:[function(e){return e.length>5&&e.length<129},function(e){return!/[^\w\.@\-\s]/.test(e)},function(e){return!/[_\.@\-]/.test(e.slice(0,1))&&!/[_\.@\-]/.test(e.slice(-1))},function(e){return!/\s/.test(e)}]}},_setPasswordRules:function(){return[{label:o.createAccount.passwordReq1,rule:function(e){return e!=t.byId("username").value}},{label:o.createAccount.passwordReq2,rule:function(e){return e.length>=8}},{label:o.createAccount.passwordReq3,rule:function(e){return/[A-Za-z]/.test(e)}},{label:o.createAccount.passwordReq4,rule:function(e){return/[0-9]/.test(e)}}]},_validateInput:function(n){var i=n.target,a=i.id,s=this.rules[a]||[],r=0;if(0===i.value.length)return!0;s.forEach(function(n,s){n.rule&&(n=n.rule);var o=t.queryOne(".js-"+a+"-reqs").children[s];i.value.length&&n(i.value)?(r++,e.removeClass(o,"svg-icon-red icon-ui-notice-round"),e.addClass(o,"svg-icon-green icon-ui-check-mark")):(r--,e.removeClass(o,"svg-icon-green icon-ui-check-mark"),0===i.value.length&&e.removeClass(o,"icon-ui-red icon-ui-notice-round"))});var o=r==s.length;return"password"==a&&this.meter&&this.meter.strength<2&&o&&(o=!1),o?delete this.errors[a]:this.errors[a]=!0,o},_checkFieldValid:function(n){var i=n.target,a=i.id,s=t.queryOne(".js-"+a+"-error");if(0!==i.value.length)if(this.errors[a]){this._resetErrors(!0),this.errorMessage=o.createAccount.errors["invalid_"+a];var r=this._findLabel(i);s.innerText=this.errorMessage,e.addClass(i,"input-error"),e.addClass(s,"is-active"),r&&e.removeClass(r,"field-suffix icon-ui-check-mark svg-icon-green"),this.focusEl=i,this.rules[a]&&this.rules[a].forEach(function(n,s){n.rule&&(n=n.rule);var r=t.queryOne(".js-"+a+"-reqs").children[s];n(i.value)?(e.removeClass(r,"svg-icon-red icon-ui-notice-round"),e.addClass(r,"svg-icon-green icon-ui-check-mark")):(e.removeClass(r,"svg-icon-green icon-ui-check-mark"),e.addClass(r,"svg-icon-red icon-ui-notice-round"),this.errors[a]=!0)}.bind(this))}else 0===Object.keys(this.errors).length&&this._resetErrors(),"username"==a&&i.value.length>0?this._checkUsernameExist(i):this._markFieldValid(i)},_checkUsernameExist:function(e){var t=e.value,n=this._findLabel(e),a=this.authInfo.hostname+this.authInfo.contextPath+"/rest/community/checkUsernames";return n&&this._setLoadingStatus(n,!0),i.post(a,{usernames:t,f:"json"},{cache:!0,responseType:"json"}).then(function(t,i){if(n&&this._setLoadingStatus(n,!1),i&&i.usernames){var a=i.usernames[0];a&&a.requested==a.suggested?this._markFieldValid(e):this._markFieldInvalid(e,o.createAccount.errors.taken_username)}}.bind(this))},_markFieldValid:function(n){var i=n.id,a=this._findLabel(n),s=t.queryOne(".js-"+i+"-error");e.removeClass(s,"is-active"),e.removeClass(n,"input-error"),n.value.length>0&&a&&e.addClass(a,"field-suffix icon-ui-check-mark svg-icon-green")},_markFieldInvalid:function(n,i){if(0!==n.value.length){var a=n.id,s=this._findLabel(n),r=t.queryOne(".js-"+a+"-error");this.errors[a]=!0,this.focusEl=n,this.errorMessage=i,r.innerText=this.errorMessage,s&&e.removeClass(s,"icon-ui-check-mark svg-icon-green"),e.addClass(n,"input-error"),e.addClass(r,"is-active")}},_reportError:function(n){var i="";if(n.valid||e.hasClass(n.errEl,"is-active")?n.valid&&(i="removeClass",this.errors[n.el.id]=!1):(i="addClass",n.errEl.innerHTML=n.msg,this.errors[n.el.id]=!0,n.el.focus()),i){e[i](n.el,"input-error") ;var a=t.query(".input-error-message.is-active");if("addClass"==i&&a.length>0)return;e[i](n.errEl,"is-active")}},_findLabel:function(e){var n=e.id,i=t.findLabel(n);return i||((i=t.findParentNode("label",e))||((i=t.findPreviousSibling("label",e))||null))},_displayMessage:function(n){var i=n.messages&&n.messages.length&&n.messages[0];if(i){var a=i;"OAUTH_0076"==n.messageCode?a=o.activate.convertError:"OAUTH_0058"==n.messageCode&&(a=o.activate.missingSocialEmail);var s=t.queryOne(".js-message");s.innerHTML=a,e.addClass(s,"is-active"),s.focus()}}}});