// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
(function(b,g){var p,f=function(){return"undefined"!==typeof w&&"function"!==typeof w?w:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this}(),l=function(){},m=function(d){for(var n in d)return 0;return 1},h={}.toString,c=function(d){return"[object Function]"==h.call(d)},q=function(d){return"[object String]"==h.call(d)},e=function(d){return"[object Array]"==h.call(d)},a=function(d,n){if(d)for(var a=0;a<d.length;)n(d[a++])},k=function(d,n){for(var a in n)d[a]=n[a];return d},r=function(d,
n){return k(Error(d),{src:"dojoLoader",info:n})},u=1,z=function(){return"_"+u++},v=function(d,n,a){return na(d,n,a,0,v)},w=f,t=w.document,d=t&&t.createElement("DiV"),n=v.has=function(n){return c(x[n])?x[n]=x[n](w,t,d):x[n]},x=n.cache=g.hasCache;c(b)&&(b=b(f));n.add=function(d,a,c,e){(void 0===x[d]||e)&&(x[d]=a);return c&&n(d)};n.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);n("host-webworker")&&(k(g.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,
"dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1,"dojo-guarantee-console":0}),g.loaderPatch={injectUrl:function(d,n){try{importScripts(d),n()}catch(mb){console.info("failed to load resource ("+d+")"),console.error(mb)}}});for(var y in b.has)n.add(y,b.has[y],0,1);v.async=1;var A=n("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");v.eval=function(d,n){return A(d+"\r\n//# sourceURL\x3d"+n)};var D={},B=v.signal=function(d,n){d=D[d];a(d&&d.slice(0),function(d){d.apply(null,
e(n)?n:[n])})};y=v.on=function(d,n){var a=D[d]||(D[d]=[]);a.push(n);return{remove:function(){for(var d=0;d<a.length;d++)if(a[d]===n){a.splice(d,1);break}}}};var F=[],C={},G=[],ba={},Z=v.map={},V=[],I={},fa="",M={},W={},f={},N=0,H=function(d){var n,a,c,e;for(n in W)a=W[n],(c=n.match(/^url\:(.+)/))?M["url:"+Ya(c[1],d)]=a:"*now"==n?e=a:"*noref"!=n&&(c=Va(n,d,!0),M[c.mid]=M["url:"+c.url]=a);e&&e(wa(d));W={}},O=function(d){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){return"\\"+d})},J=function(d,
n){n.splice(0,n.length);for(var a in d)n.push([a,d[a],new RegExp("^"+O(a)+"(/|$)"),a.length]);n.sort(function(d,n){return n[3]-d[3]});return n},P=function(d,n){a(d,function(d){n.push([q(d[0])?new RegExp("^"+O(d[0])+"$"):d[0],d[1]])})},S=function(d){var n=d.name;n||(n=d,d={name:n});d=k({main:"main"},d);d.location=d.location?d.location:n;d.packageMap&&(Z[n]=d.packageMap);d.main.indexOf("./")||(d.main=d.main.substring(2));ba[n]=d},ca=[],Q=function(d,c,e){for(var t in d){"waitSeconds"==t&&(v.waitms=1E3*
(d[t]||0));"cacheBust"==t&&(fa=d[t]?q(d[t])?d[t]:(new Date).getTime()+"":"");if("baseUrl"==t||"combo"==t)v[t]=d[t];d[t]!==x&&(v.rawConfig[t]=d[t],"has"!=t&&n.add("config-"+t,d[t],0,c))}v.baseUrl||(v.baseUrl="./");/\/$/.test(v.baseUrl)||(v.baseUrl+="/");for(t in d.has)n.add(t,d.has[t],0,c);a(d.packages,S);for(var r in d.packagePaths)a(d.packagePaths[r],function(d){var n=r+"/"+d;q(d)&&(d={name:d});d.location=n;S(d)});J(k(Z,d.map),V);a(V,function(d){d[1]=J(d[1],[]);"*"==d[0]&&(V.star=d)});J(k(C,d.paths),
G);P(d.aliases,F);if(c)ca.push({config:d.config});else for(t in d.config)c=Ha(t,e),c.config=k(c.config||{},d.config[t]);d.cache&&(H(),W=d.cache,d.cache["*noref"]&&H());B("config",[d,v.rawConfig])};if(n("dojo-cdn")){var U=t.getElementsByTagName("script");p=0;for(var Y,ga,ka,ha;p<U.length;)if(Y=U[p++],(ka=Y.getAttribute("src"))&&(ha=ka.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(ga=ha[3]||"",g.baseUrl=g.baseUrl||ga,N=Y),ka=Y.getAttribute("data-dojo-config")||Y.getAttribute("djConfig"))f=v.eval("({ "+ka+
" })","data-dojo-config"),N=Y}v.rawConfig={};Q(g,1);n("dojo-cdn")&&((ba.dojo.location=ga)&&(ga+="/"),ba.dijit.location=ga+"../dijit/",ba.dojox.location=ga+"../dojox/");Q(b,1);Q(f,1);var qa=function(d){E(function(){a(d.deps,L)})},na=function(d,n,a,c,t){var x;if(q(d)){if((x=Ha(d,c,!0))&&x.executed)return x.result;throw r("undefinedModule",d);}e(d)||(Q(d,0,c),d=n,n=a);if(e(d))if(d.length){a="require*"+z();for(var b,f=[],h=0;h<d.length;)b=d[h++],f.push(Ha(b,c));x=k(Ia("",a,0,""),{injected:2,deps:f,def:n||
l,require:c?c.require:v,gc:1});I[x.mid]=x;qa(x);var u=ma&&!0;E(function(){K(x,u)});x.executed||ra.push(x);da()}else n&&n();return t},wa=function(d){if(!d)return v;var n=d.require;n||(n=function(a,c,e){return na(a,c,e,d,n)},d.require=k(n,v),n.module=d,n.toUrl=function(n){return Ya(n,d)},n.toAbsMid=function(n){return Fa(n,d)});return n},ra=[],za=[],sa={},ja=function(d){d.injected=1;sa[d.mid]=1;d.url&&(sa[d.url]=d.pack||1);wb()},Da=function(d){d.injected=2;delete sa[d.mid];d.url&&delete sa[d.url];m(sa)&&
Za()},Ma=v.idle=function(){return!za.length&&m(sa)&&!ra.length&&!ma},xa=function(d,n){if(n)for(var a=0;a<n.length;a++)if(n[a][2].test(d))return n[a];return 0},Aa=function(d){var n=[],a,c;for(d=d.replace(/\\/g,"/").split("/");d.length;)a=d.shift(),".."==a&&n.length&&".."!=c?(n.pop(),c=n[n.length-1]):"."!=a&&n.push(c=a);return n.join("/")},Ia=function(d,n,a,c){return{pid:d,mid:n,pack:a,url:c,executed:0,def:0}},hb=function(d,n,e,k,t,x,b,q,f){var h,u,m,l;l=/^\./.test(d);if(/(^\/)|(\:)|(\.js$)/.test(d)||
l&&!n)return Ia(0,d,0,d);d=Aa(l?n.mid+"/../"+d:d);if(/^\./.test(d))throw r("irrationalPath",d);n&&(m=xa(n.mid,x));(m=(m=m||x.star)&&xa(d,m[1]))&&(d=m[1]+d.substring(m[3]));n=(ha=d.match(/^([^\/]+)(\/(.+))?$/))?ha[1]:"";(h=e[n])?d=n+"/"+(u=ha[3]||h.main):n="";var z=0;a(q,function(n){var a=d.match(n[0]);a&&0<a.length&&(z=c(n[1])?d.replace(n[0],n[1]):n[1])});if(z)return hb(z,0,e,k,t,x,b,q,f);if(e=k[d])return f?Ia(e.pid,e.mid,e.pack,e.url):k[d];k=(m=xa(d,b))?m[1]+d.substring(m[3]):n?("/"===h.location.slice(-1)?
h.location.slice(0,-1):h.location)+"/"+u:d;/(^\/)|(\:)/.test(k)||(k=t+k);return Ia(n,d,h,Aa(k+".js"))},Va=function(d,n,a){return hb(d,n,ba,I,v.baseUrl,a?[]:V,a?[]:G,a?[]:F)},Ka=function(d,n,a){return d.normalize?d.normalize(n,function(d){return Fa(d,a)}):Fa(n,a)},La=0,Ha=function(d,n,a){var c,e;(c=d.match(/^(.+?)\!(.*)$/))?(e=Ha(c[1],n,a),5!==e.executed||e.load||Qa(e),e.load?(c=Ka(e,c[2],n),d=e.mid+"!"+(e.dynamic?++La+"!":"")+c):(c=c[2],d=e.mid+"!"+ ++La+"!waitingForPlugin"),d={plugin:e,mid:d,req:wa(n),
prid:c}):d=Va(d,n);return I[d.mid]||!a&&(I[d.mid]=d)},Fa=v.toAbsMid=function(d,n){return Va(d,n).mid},Ya=v.toUrl=function(d,n){n=Va(d+"/x",n);var a=n.url;return ia(0===n.pid?d:a.substring(0,a.length-5))},Ja={injected:2,executed:5,def:3,result:3};ga=function(d){return I[d]=k({mid:d},Ja)};var Ra=ga("require"),R=ga("exports"),Ga=ga("module"),va={},ea=0,Qa=function(d){var n=d.result;d.dynamic=n.dynamic;d.normalize=n.normalize;d.load=n.load;return d},Na=function(d){var n={};a(d.loadQ,function(a){var c=
Ka(d,a.prid,a.req.module),e=d.dynamic?a.mid.replace(/waitingForPlugin$/,c):d.mid+"!"+c,c=k(k({},a),{mid:e,prid:c,injected:0});I[e]&&I[e].injected||oa(I[e]=c);n[a.mid]=I[e];Da(a);delete I[a.mid]});d.loadQ=0;var c=function(d){for(var a=d.deps||[],c=0;c<a.length;c++)(d=n[a[c].mid])&&(a[c]=d)},e;for(e in I)c(I[e]);a(ra,c)},la=function(d){v.trace("loader-finish-exec",[d.mid]);d.executed=5;d.defOrder=ea++;d.loadQ&&(Qa(d),Na(d));for(p=0;p<ra.length;)ra[p]===d?ra.splice(p,1):p++;/^require\*/.test(d.mid)&&
delete I[d.mid]},db=[],K=function(d,n){if(4===d.executed)return v.trace("loader-circular-dependency",[db.concat(d.mid).join("-\x3e")]),!d.def||n?va:d.cjs&&d.cjs.exports;if(!d.executed){if(!d.def)return va;var a=d.mid,e=d.deps||[],k,t=[],r=0;for(d.executed=4;k=e[r++];){k=k===Ra?wa(d):k===R?d.cjs.exports:k===Ga?d.cjs:K(k,n);if(k===va)return d.executed=0,v.trace("loader-exec-module",["abort",a]),va;t.push(k)}v.trace("loader-run-factory",[d.mid]);n=d.def;t=c(n)?n.apply(null,t):n;d.result=void 0===t&&
d.cjs?d.cjs.exports:t;la(d)}return d.result},ma=0,E=function(d){try{ma++,d()}catch(ub){throw ub;}finally{ma--}Ma()&&B("idle",[])},da=function(){ma||E(function(){for(var d,n,a=0;a<ra.length;)d=ea,n=ra[a],K(n),d!=ea?a=0:a++})},ia="function"==typeof b.fixupUrl?b.fixupUrl:function(d){d+="";return d+(fa?(/\?/.test(d)?"\x26":"?")+fa:"")};void 0===n("dojo-loader-eval-hint-url")&&n.add("dojo-loader-eval-hint-url",1);var oa=function(d){var n=d.plugin;5!==n.executed||n.load||Qa(n);var a=function(n){d.result=
n;Da(d);la(d);da()};n.load?n.load(d.prid,d.req,a):n.loadQ?n.loadQ.push(d):(n.loadQ=[d],ra.unshift(n),L(n))},X=0,aa=function(d,a){n("config-stripStrict")&&(d=d.replace(/(["'])use strict\1/g,""));d===X?X.call(null):v.eval(d,n("dojo-loader-eval-hint-url")?a.url:a.mid)},L=function(d){var a=d.mid,c=d.url;if(!(d.executed||d.injected||sa[a]||d.url&&(d.pack&&sa[d.url]===d.pack||1==sa[d.url])))if(ja(d),d.plugin)oa(d);else{var e=function(){Oa(d);if(2!==d.injected){if(n("dojo-enforceDefine")){B("error",r("noDefine",
d));return}Da(d);k(d,Ja);v.trace("loader-define-nonmodule",[d.url])}da()};(X=M[a]||M["url:"+d.url])?(v.trace("loader-inject",["cache",d.mid,c]),aa(X,d),e()):(v.trace("loader-inject",["script",d.mid,c]),v.injectUrl(ia(c),e,d))}},nb=function(d,n,a){v.trace("loader-define-module",[d.mid,n]);if(2===d.injected)return B("error",r("multipleDefine",d)),d;k(d,{deps:n,def:a,cjs:{id:d.mid,uri:d.url,exports:d.result={},setExports:function(n){d.cjs.exports=n},config:function(){return d.config}}});for(var e=0;n[e];e++)n[e]=
Ha(n[e],d);Da(d);c(a)||n.length||(d.result=a,la(d));return d},Oa=function(d,n){for(var c=[],e,k;za.length;)k=za.shift(),n&&(k[0]=n.shift()),e=k[0]&&Ha(k[0])||d,c.push([e,k[1],k[2]]);H(d);a(c,function(d){qa(nb.apply(null,d))})},Za=l,wb=l;n("dom");if(n("dom")){var Sa=function(d,n,a,c){d.addEventListener(n,c,!1);return function(){d.removeEventListener(n,c,!1)}},xb=Sa(window,"load","onload",function(){v.pageLoaded=1;try{"complete"!=t.readyState&&(t.readyState="complete")}catch(tb){}xb()}),U=t.getElementsByTagName("script");
for(p=0;!N;)/^dojo/.test((Y=U[p++])&&Y.type)||(N=Y);v.injectUrl=function(d,n,a){a=a.node=t.createElement("script");var c=Sa(a,"load","onreadystatechange",function(d){d=d||window.event;var a=d.target||d.srcElement;if("load"===d.type||/complete|loaded/.test(a.readyState))c(),e(),n&&n()}),e=Sa(a,"error","onerror",function(n){c();e();B("error",r("scriptError",[d,n]))});a.type="text/javascript";a.charset="utf-8";a.src=d;N.parentNode.insertBefore(a,N);return a}}v.log=l;v.trace=l;Y=function(d,n,a){var e=
arguments.length,k=["require","exports","module"],t=[0,d,n];1==e?t=[0,c(d)?k:[],d]:2==e&&q(d)?t=[d,c(n)?k:[],n]:3==e&&(t=[d,n,a]);v.trace("loader-define",t.slice(0,2));(e=t[0]&&Ha(t[0]))&&!sa[e.mid]?qa(nb(e,t[1],t[2])):za.push(t)};Y.amd={vendor:"dojotoolkit.org"};k(k(v,g.loaderPatch),b.loaderPatch);y("error",function(d){try{if(console.error(d),d instanceof Error){for(var n in d)console.log(n+":",d[n]);console.log(".")}}catch(mb){}});k(v,{uid:z,cache:M,packs:ba});w.define||(w.define=Y,w.require=v,
a(ca,function(d){Q(d)}),Y=f.deps||b.deps||g.deps,b=f.callback||b.callback||g.callback,v.boot=Y||b?[Y||[],b]:0)})(function(b){return b.dojoConfig||b.djConfig||b.require||{}},{aliases:[[/^webgl-engine/,function(){return"esri/views/3d/webgl-engine"}],[/^engine/,function(){return"esri/views/3d/webgl-engine"}],[/^esri-hydra/,function(){return"esri"}]],async:1,baseUrl:"https://js.arcgis.com/4.8/dojo",hasCache:{"config-deferredInstrumentation":0,"config-selectorEngine":"lite","config-tlmSiblingOfDojo":1,
"dojo-built":1,"dojo-has-api":1,"dojo-loader":1,"dojo-undef-api":0,dom:1,"esri-built":1,"esri-featurelayer-webgl":0,"esri-promise-compatibility":1,"esri-promise-compatibility-deprecation-warnings":1,"host-browser":1},map:{globalize:{cldr:"cldrjs/dist/cldr","cldr/event":"cldrjs/dist/cldr/event","cldr/supplemental":"cldrjs/dist/cldr/supplemental","cldr/unresolved":"cldrjs/dist/cldr/unresolved"}},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},
{location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../esri",name:"esri"},{location:"../moment",main:"moment",name:"moment"},{location:"../@dojo",name:"@dojo"},{location:"../cldrjs",main:"dist/cldr",name:"cldrjs"},{location:"../globalize",main:"dist/globalize",name:"globalize"},{location:"../maquette",main:"dist/maquette.umd",name:"maquette"},{location:"../maquette-css-transitions",main:"dist/maquette-css-transitions.umd",name:"maquette-css-transitions"},
{location:"../maquette-jsx",main:"dist/maquette-jsx.umd",name:"maquette-jsx"},{location:"../tslib",main:"tslib",name:"tslib"}]});
require({cache:{"dojo/domReady":function(){define(["./global","./has"],function(b,g){function p(a){q.push(a);c&&f()}function f(){if(!e){for(e=!0;q.length;)try{q.shift()(l)}catch(u){console.error(u,"in domReady callback",u.stack)}e=!1;p._onQEmpty()}}var l=document,m={loaded:1,complete:1},h="string"!=typeof l.readyState,c=!!m[l.readyState],q=[],e;p.load=function(a,c,e){p(e)};p._Q=q;p._onQEmpty=function(){};h&&(l.readyState="loading");if(!c){var a=[],k=function(a){a=a||b.event;c||"readystatechange"==
a.type&&!m[l.readyState]||(h&&(l.readyState="complete"),c=1,f())};g=function(a,c){a.addEventListener(c,k,!1);q.push(function(){a.removeEventListener(c,k,!1)})};g(l,"DOMContentLoaded");g(b,"load");"onreadystatechange"in l?g(l,"readystatechange"):h||a.push(function(){return m[l.readyState]});if(a.length){var r=function(){if(!c){for(var e=a.length;e--;)if(a[e]()){k("poller");return}setTimeout(r,30)}};r()}}return p})},"dojo/global":function(){define(function(){return"undefined"!==typeof global&&"function"!==
typeof global?global:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this})},"dojo/has":function(){define(["./global","require","module"],function(b,g,p){var f=g.has||function(){};if(!f("dojo-has-api")){var l=(g="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document)&&document,m=l&&l.createElement("DiV"),h=p.config&&p.config()||{},f=function(c){return"function"==typeof h[c]?h[c]=h[c](b,l,m):h[c]};
f.cache=h;f.add=function(c,b,e,a){("undefined"==typeof h[c]||a)&&(h[c]=b);return e&&f(c)};f.add("host-browser",g);f.add("dom",g)}f("host-browser")&&(f.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),f.add("touch-events","ontouchstart"in document),f.add("pointer-events","pointerEnabled"in window.navigator?window.navigator.pointerEnabled:"PointerEvent"in window),f.add("device-width",screen.availWidth||innerWidth),p=document.createElement("form"),
f.add("dom-attributes-specified-flag",0<p.attributes.length&&40>p.attributes.length));f.clearElement=function(c){c.innerHTML="";return c};f.normalize=function(c,b){var e=c.match(/[\?:]|[^:\?]*/g),a=0,k=function(c){var r=e[a++];if(":"==r)return 0;if("?"==e[a++]){if(!c&&f(r))return k();k(!0);return k(c)}return r||0};return(c=k())&&b(c)};f.load=function(c,b,e){c?b([c],e):e()};return f})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "),
function(b){return b})},"dojo/ready":function(){define(["./_base/kernel","./has","require","./has!host-browser?./domReady","./_base/lang"],function(b,g,p,f,l){var m=0,h=[],c=0;g=function(){m=1;b._postLoad=b.config.afterOnLoad=!0;q()};var q=function(){if(!c){for(c=1;m&&(!f||0==f._Q.length)&&(p.idle?p.idle():1)&&h.length;){var a=h.shift();try{a()}catch(r){if(r.info=r.message,p.signal)p.signal("error",r);else throw r;}}c=0}};p.on&&p.on("idle",q);f&&(f._onQEmpty=q);var e=b.ready=b.addOnLoad=function(a,
c,e){var k=l._toArray(arguments);"number"!=typeof a?(e=c,c=a,a=1E3):k.shift();e=e?l.hitch.apply(b,k):function(){c()};e.priority=a;for(k=0;k<h.length&&a>=h[k].priority;k++);h.splice(k,0,e);q()},a=b.config.addOnLoad;if(a)e[l.isArray(a)?"apply":"call"](b,a);f?f(g):g();return e})},"dojo/_base/kernel":function(){define(["../global","../has","./config","require","module"],function(b,g,p,f,l){var m,h={},c={},q={config:p,global:b,dijit:h,dojox:c},h={dojo:["dojo",q],dijit:["dijit",h],dojox:["dojox",c]};l=
f.map&&f.map[l.id.match(/[^\/]+/)[0]];for(m in l)h[m]?h[m][0]=l[m]:h[m]=[l[m],{}];for(m in h)l=h[m],l[1]._scopeName=l[0],p.noGlobals||(b[l[0]]=l[1]);q.scopeMap=h;q.baseUrl=q.config.baseUrl=f.baseUrl;q.isAsync=f.async;q.locale=p.locale;b="$Rev: aaa6750 $".match(/[0-9a-f]{7,}/);q.version={major:1,minor:13,patch:0,flag:"",revision:b?b[0]:NaN,toString:function(){var a=q.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+")"}};g("csp-restrictions")||Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(q);
q.exit=function(){};g("host-webworker");"undefined"!=typeof console||(console={});b="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var e;for(g=0;e=b[g++];)console[e]?console[e]=Function.prototype.bind.call(console[e],console):function(){var a=e+"";console[a]="log"in console?function(){var c=Array.prototype.slice.call(arguments);c.unshift(a+":");console.log(c.join(" "))}:function(){};console[a]._fake=!0}();q.deprecated=q.experimental=
function(){};q._hasResource={};return q})},"dojo/_base/config":function(){define(["../global","../has","require"],function(b,g,p){b={};p=p.rawConfig;for(var f in p)b[f]=p[f];!b.locale&&"undefined"!=typeof navigator&&(f=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage)&&(b.locale=f.toLowerCase());return b})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(b,g){var p=function(c,q,e){e||(e=c[0]&&b.scopeMap[c[0]]?
b.scopeMap[c.shift()][1]:b.global);try{for(var a=0;a<c.length;a++){var k=c[a];if(!(k in e))if(q)e[k]={};else return;e=e[k]}return e}catch(r){}},f=Object.prototype.toString,l=function(c,b,e){return(e||[]).concat(Array.prototype.slice.call(c,b||0))},m=/\{([^\}]+)\}/g,h={_extraNames:[],_mixin:function(c,b,e){var a,k,r={};for(a in b)k=b[a],a in c&&(c[a]===k||a in r&&r[a]===k)||(c[a]=e?e(k):k);return c},mixin:function(c,b){c||(c={});for(var e=1,a=arguments.length;e<a;e++)h._mixin(c,arguments[e]);return c},
setObject:function(c,b,e){var a=c.split(".");c=a.pop();return(e=p(a,!0,e))&&c?e[c]=b:void 0},getObject:function(c,b,e){return c?p(c.split("."),b,e):e},exists:function(c,b){return void 0!==h.getObject(c,!1,b)},isString:function(c){return"string"==typeof c||c instanceof String},isArray:Array.isArray||function(c){return"[object Array]"==f.call(c)},isFunction:function(c){return"[object Function]"===f.call(c)},isObject:function(c){return void 0!==c&&(null===c||"object"==typeof c||h.isArray(c)||h.isFunction(c))},
isArrayLike:function(c){return!!c&&!h.isString(c)&&!h.isFunction(c)&&!(c.tagName&&"form"==c.tagName.toLowerCase())&&(h.isArray(c)||isFinite(c.length))},isAlien:function(c){return c&&!h.isFunction(c)&&/\{\s*\[native code\]\s*\}/.test(String(c))},extend:function(c,b){for(var e=1,a=arguments.length;e<a;e++)h._mixin(c.prototype,arguments[e]);return c},_hitchArgs:function(c,q){var e=h._toArray(arguments,2),a=h.isString(q);return function(){var k=h._toArray(arguments),r=a?(c||b.global)[q]:q;return r&&r.apply(c||
this,e.concat(k))}},hitch:function(c,q){if(2<arguments.length)return h._hitchArgs.apply(b,arguments);q||(q=c,c=null);if(h.isString(q)){c=c||b.global;if(!c[q])throw['lang.hitch: scope["',q,'"] is null (scope\x3d"',c,'")'].join("");return function(){return c[q].apply(c,arguments||[])}}return c?function(){return q.apply(c,arguments||[])}:q},delegate:function(){function c(){}return function(b,e){c.prototype=b;b=new c;c.prototype=null;e&&h._mixin(b,e);return b}}(),_toArray:g("ie")?function(){function c(c,
e,a){a=a||[];for(e=e||0;e<c.length;e++)a.push(c[e]);return a}return function(b){return(b.item?c:l).apply(this,arguments)}}():l,partial:function(c){return h.hitch.apply(b,[null].concat(h._toArray(arguments)))},clone:function(c){if(!c||"object"!=typeof c||h.isFunction(c))return c;if(c.nodeType&&"cloneNode"in c)return c.cloneNode(!0);if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp)return new RegExp(c);var b,e,a;if(h.isArray(c))for(b=[],e=0,a=c.length;e<a;++e)e in c&&(b[e]=h.clone(c[e]));
else b=c.constructor?new c.constructor:{};return h._mixin(b,c,h.clone)},trim:String.prototype.trim?function(c){return c.trim()}:function(c){return c.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(c,b,e){return c.replace(e||m,h.isFunction(b)?b:function(a,c){return h.getObject(c,!1,b)})}};h.mixin(b,h);return h})},"dojo/sniff":function(){define(["./has"],function(b){if(b("host-browser")){var g=navigator,p=g.userAgent,g=g.appVersion,f=parseFloat(g);b.add("edge",parseFloat(p.split("Edge/")[1])||
void 0);b.add("webkit",!b("edge")&&parseFloat(p.split("WebKit/")[1])||void 0);b.add("chrome",!b("edge")&&!0&&parseFloat(p.split("Chrome/")[1])||void 0);b.add("safari",0<=g.indexOf("Safari")&&!b("chrome")&&!b("edge")?parseFloat(g.split("Version/")[1]):void 0);b.add("mac",0<=g.indexOf("Macintosh"));if(p.match(/(iPhone|iPod|iPad)/)){var l=RegExp.$1.replace(/P/,"p"),m=p.match(/OS ([\d_]+)/)?RegExp.$1:"1",m=parseFloat(m.replace(/_/,".").replace(/_/g,""));b.add(l,m);b.add("ios",m)}b.add("trident",parseFloat(g.split("Trident/")[1])||
void 0);b("webkit")||(0<=p.indexOf("Opera")&&b.add("opera",9.8<=f?parseFloat(p.split("Version/")[1])||f:f),0<=p.indexOf("Gecko")&&!b("trident")&&!b("edge")&&b.add("mozilla",f),b("mozilla")&&b.add("ff",parseFloat(p.split("Firefox/")[1]||p.split("Minefield/")[1])||void 0),document.all&&!b("opera")&&(p=parseFloat(g.split("MSIE ")[1])||void 0,(g=document.documentMode)&&5!=g&&Math.floor(p)!=g&&(p=g),b.add("ie",p)))}return b})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),
function(b,g,p,f,l,m,h,c){function q(a,e,k,d,n){d=c.hitch(k,d);if(!a||!a.addEventListener&&!a.attachEvent)return f.after(a||b.global,e,d,!0);"string"==typeof e&&"on"==e.substring(0,2)&&(e=e.substring(2));a||(a=b.global);if(!n)switch(e){case "keypress":e=u;break;case "mouseenter":e=m.enter;break;case "mouseleave":e=m.leave}return g(a,e,d,n)}function e(a){a.keyChar=a.charCode?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode}h.add("events-keypress-typed",function(){var a={charCode:0};
try{a=document.createEvent("KeyboardEvent"),(a.initKeyboardEvent||a.initKeyEvent).call(a,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(w){}return 0==a.charCode&&!h("opera")});var a={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},k=h("mac")?"metaKey":"ctrlKey",r=function(a,k){k=c.mixin({},a,k);e(k);k.preventDefault=function(){a.preventDefault()};k.stopPropagation=function(){a.stopPropagation()};return k},u;u=h("events-keypress-typed")?function(c,
e){var k=g(c,"keydown",function(d){var n=d.keyCode,c=13!=n&&32!=n&&(27!=n||!h("ie"))&&(48>n||90<n)&&(96>n||111<n)&&(186>n||192<n)&&(219>n||222<n)&&229!=n;if(c||d.ctrlKey){c=c?0:n;if(d.ctrlKey){if(3==n||13==n)return e.call(d.currentTarget,d);c=95<c&&106>c?c-48:!d.shiftKey&&65<=c&&90>=c?c+32:a[c]||c}n=r(d,{type:"keypress",faux:!0,charCode:c});e.call(d.currentTarget,n);if(h("ie"))try{d.keyCode=n.keyCode}catch(A){}}}),d=g(c,"keypress",function(d){var n=d.charCode;d=r(d,{charCode:32<=n?n:0,faux:!0});return e.call(this,
d)});return{remove:function(){k.remove();d.remove()}}}:h("opera")?function(a,c){return g(a,"keypress",function(a){var d=a.which;3==d&&(d=99);d=32>d&&!a.shiftKey?0:d;a.ctrlKey&&!a.shiftKey&&65<=d&&90>=d&&(d+=32);return c.call(this,r(a,{charCode:d}))})}:function(a,c){return g(a,"keypress",function(a){e(a);return c.call(this,a)})};var z={_keypress:u,connect:function(a,c,e,d,n){var k=arguments,t=[],r=0;t.push("string"==typeof k[0]?null:k[r++],k[r++]);var b=k[r+1];t.push("string"==typeof b||"function"==
typeof b?k[r++]:null,k[r++]);for(b=k.length;r<b;r++)t.push(k[r]);return q.apply(this,t)},disconnect:function(a){a&&a.remove()},subscribe:function(a,e,k){return p.subscribe(a,c.hitch(e,k))},publish:function(a,c){return p.publish.apply(p,[a].concat(c))},connectPublisher:function(a,c,e){var d=function(){z.publish(a,arguments)};return e?z.connect(c,e,d):z.connect(c,d)},isCopyKey:function(a){return a[k]}};z.unsubscribe=z.disconnect;c.mixin(b,z);return z})},"dojo/on":function(){define(["require","./_base/kernel",
"./sniff"],function(b,g,p){function f(e,k,b,q,t){if(q=k.match(/(.*):(.*)/))return k=q[2],q=q[1],h.selector(q,k).call(t,e,b);p("touch")&&c.test(k)&&(b=r(b));if(e.addEventListener){var d=k in a,n=d?a[k]:k;e.addEventListener(n,b,d);return{remove:function(){e.removeEventListener(n,b,d)}}}throw Error("Target must be an event emitter");}function l(){this.cancelable=!1;this.defaultPrevented=!0}function m(){this.bubbles=!1}p("dom")&&p("touch");var h=function(a,c,e,k){return"function"!=typeof a.on||"function"==
typeof c||a.nodeType?h.parse(a,c,e,f,k,this):a.on(c,e)};h.pausable=function(a,c,e,k){var t;a=h(a,c,function(){if(!t)return e.apply(this,arguments)},k);a.pause=function(){t=!0};a.resume=function(){t=!1};return a};h.once=function(a,c,e,k){var t=h(a,c,function(){t.remove();return e.apply(this,arguments)});return t};h.parse=function(a,c,e,k,t,d){var n;if(c.call)return c.call(d,a,e);c instanceof Array?n=c:-1<c.indexOf(",")&&(n=c.split(/\s*,\s*/));if(n){var r=[];c=0;for(var b;b=n[c++];)r.push(h.parse(a,
b,e,k,t,d));r.remove=function(){for(var d=0;d<r.length;d++)r[d].remove()};return r}return k(a,c,e,t,d)};var c=/^touch/;h.matches=function(a,c,e,k,t){t=t&&"function"==typeof t.matches?t:g.query;k=!1!==k;1!=a.nodeType&&(a=a.parentNode);for(;!t.matches(a,c,e);)if(a==e||!1===k||!(a=a.parentNode)||1!=a.nodeType)return!1;return a};h.selector=function(a,c,e){return function(k,t){function d(d){return h.matches(d,a,k,e,n)}var n="function"==typeof a?{matches:a}:this,r=c.bubble;return r?h(k,r(d),t):h(k,c,function(n){var a=
d(n.target);if(a)return n.selectorTarget=a,t.call(a,n)})}};var q=[].slice,e=h.emit=function(a,c,e){var k=q.call(arguments,2),t="on"+c;if("parentNode"in a){var d=k[0]={},n;for(n in e)d[n]=e[n];d.preventDefault=l;d.stopPropagation=m;d.target=a;d.type=c;e=d}do a[t]&&a[t].apply(a,k);while(e&&e.bubbles&&(a=a.parentNode));return e&&e.cancelable&&e},a={};h.emit=function(a,c,k){if(a.dispatchEvent&&document.createEvent){var r=(a.ownerDocument||document).createEvent("HTMLEvents");r.initEvent(c,!!k.bubbles,
!!k.cancelable);for(var t in k)t in r||(r[t]=k[t]);return a.dispatchEvent(r)&&r}return e.apply(h,arguments)};if(p("touch"))var k=window.orientation,r=function(a){return function(c){var e=c.corrected;if(!e){var r=c.type;try{delete c.type}catch(n){}if(c.type){var e={},t;for(t in c)e[t]=c[t];e.preventDefault=function(){c.preventDefault()};e.stopPropagation=function(){c.stopPropagation()}}else e=c,e.type=r;c.corrected=e;if("resize"==r){if(k==window.orientation)return null;k=window.orientation;e.type=
"orientationchange";return a.call(this,e)}"rotation"in e||(e.rotation=0,e.scale=1);if(window.TouchEvent&&c instanceof TouchEvent){var r=e.changedTouches[0],d;for(d in r)delete e[d],e[d]=r[d]}}return a.call(this,e)}};return h})},"dojo/topic":function(){define(["./Evented"],function(b){var g=new b;return{publish:function(b,f){return g.emit.apply(g,arguments)},subscribe:function(b,f){return g.on.apply(g,arguments)}}})},"dojo/Evented":function(){define(["./aspect","./on"],function(b,g){function p(){}
var f=b.after;p.prototype={on:function(b,m){return g.parse(this,b,m,function(b,c){return f(b,"on"+c,m,!0)})},emit:function(b,f){var h=[this];h.push.apply(h,arguments);return g.emit.apply(g,h)}};return p})},"dojo/aspect":function(){define([],function(){function b(b,c,q,e){var a=b[c],k="around"==c,r;if(k){var f=q(function(){return a.advice(this,arguments)});r={remove:function(){f&&(f=b=q=null)},advice:function(c,e){return f?f.apply(c,e):a.advice(c,e)}}}else r={remove:function(){if(r.advice){var a=r.previous,
e=r.next;e||a?(a?a.next=e:b[c]=e,e&&(e.previous=a)):delete b[c];b=q=r.advice=null}},id:b.nextId++,advice:q,receiveArguments:e};if(a&&!k)if("after"==c){for(;a.next&&(a=a.next););a.next=r;r.previous=a}else"before"==c&&(b[c]=r,r.next=a,a.previous=r);else b[c]=r;return r}function g(f){return function(c,q,e,a){var k=c[q],r;k&&k.target==c||(c[q]=r=function(){for(var a=r.nextId,c=arguments,e=r.before;e;)e.advice&&(c=e.advice.apply(this,c)||c),e=e.next;if(r.around)var k=r.around.advice(this,c);for(e=r.after;e&&
e.id<a;){if(e.advice)if(e.receiveArguments)var t=e.advice.apply(this,c),k=t===p?k:t;else k=e.advice.call(this,k,c);e=e.next}return k},k&&(r.around={advice:function(a,e){return k.apply(a,e)}}),r.target=c,r.nextId=r.nextId||0);c=b(r||k,f,e,a);e=null;return c}}var p,f=g("after"),l=g("before"),m=g("around");return{before:l,around:m,after:f}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(b,g,p,f){if(g._fixEvent){var l=g._fixEvent;g._fixEvent=function(b,
h){(b=l(b,h))&&f.normalizeEvent(b);return b}}p={fix:function(b,f){return g._fixEvent?g._fixEvent(b,f):b},stop:function(b){b.preventDefault();b.stopPropagation()}};b.fixEvent=p.fix;b.stopEvent=p.stop;return p})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(b,g,p,f){function l(e,a,c,r,b,q){q=q||"px";e=e.style;isNaN(a)||(e.left=a+q);isNaN(c)||(e.top=c+q);0<=r&&(e.width=r+q);0<=b&&(e.height=b+q)}function m(e){return"button"==e.tagName.toLowerCase()||
"input"==e.tagName.toLowerCase()&&"button"==(e.getAttribute("type")||"").toLowerCase()}function h(e){return"border-box"==c.boxModel||"table"==e.tagName.toLowerCase()||m(e)}var c={boxModel:"content-box"};b("ie")&&(c.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");c.getPadExtents=function(e,a){e=p.byId(e);var c=a||f.getComputedStyle(e),r=f.toPixelValue;a=r(e,c.paddingLeft);var b=r(e,c.paddingTop),q=r(e,c.paddingRight);e=r(e,c.paddingBottom);return{l:a,t:b,r:q,b:e,w:a+q,h:b+e}};
c.getBorderExtents=function(c,a){c=p.byId(c);var e=f.toPixelValue,r=a||f.getComputedStyle(c);a="none"!=r.borderLeftStyle?e(c,r.borderLeftWidth):0;var b="none"!=r.borderTopStyle?e(c,r.borderTopWidth):0,q="none"!=r.borderRightStyle?e(c,r.borderRightWidth):0;c="none"!=r.borderBottomStyle?e(c,r.borderBottomWidth):0;return{l:a,t:b,r:q,b:c,w:a+q,h:b+c}};c.getPadBorderExtents=function(e,a){e=p.byId(e);var k=a||f.getComputedStyle(e);a=c.getPadExtents(e,k);e=c.getBorderExtents(e,k);return{l:a.l+e.l,t:a.t+
e.t,r:a.r+e.r,b:a.b+e.b,w:a.w+e.w,h:a.h+e.h}};c.getMarginExtents=function(c,a){c=p.byId(c);var e=a||f.getComputedStyle(c),r=f.toPixelValue;a=r(c,e.marginLeft);var b=r(c,e.marginTop),q=r(c,e.marginRight);c=r(c,e.marginBottom);return{l:a,t:b,r:q,b:c,w:a+q,h:b+c}};c.getMarginBox=function(e,a){e=p.byId(e);a=a||f.getComputedStyle(e);a=c.getMarginExtents(e,a);var k=e.offsetLeft-a.l,r=e.offsetTop-a.t,q=e.parentNode,h=f.toPixelValue;8==b("ie")&&q&&(q=f.getComputedStyle(q),k-="none"!=q.borderLeftStyle?h(e,
q.borderLeftWidth):0,r-="none"!=q.borderTopStyle?h(e,q.borderTopWidth):0);return{l:k,t:r,w:e.offsetWidth+a.w,h:e.offsetHeight+a.h}};c.getContentBox=function(e,a){e=p.byId(e);var k=a||f.getComputedStyle(e);a=e.clientWidth;var r,q=c.getPadExtents(e,k);r=c.getBorderExtents(e,k);var k=e.offsetLeft+q.l+r.l,h=e.offsetTop+q.t+r.t;a?r=e.clientHeight:(a=e.offsetWidth-r.w,r=e.offsetHeight-r.h);if(8==b("ie")){var m=e.parentNode,l=f.toPixelValue;m&&(m=f.getComputedStyle(m),k-="none"!=m.borderLeftStyle?l(e,m.borderLeftWidth):
0,h-="none"!=m.borderTopStyle?l(e,m.borderTopWidth):0)}return{l:k,t:h,w:a-q.w,h:r-q.h}};c.setContentSize=function(e,a,k){e=p.byId(e);var b=a.w;a=a.h;h(e)&&(k=c.getPadBorderExtents(e,k),0<=b&&(b+=k.w),0<=a&&(a+=k.h));l(e,NaN,NaN,b,a)};var q={l:0,t:0,w:0,h:0};c.setMarginBox=function(e,a,k){e=p.byId(e);var r=k||f.getComputedStyle(e);k=a.w;var u=a.h,g=h(e)?q:c.getPadBorderExtents(e,r),r=c.getMarginExtents(e,r);if(b("webkit")&&m(e)){var v=e.style;0<=k&&!v.width&&(v.width="4px");0<=u&&!v.height&&(v.height=
"4px")}0<=k&&(k=Math.max(k-g.w-r.w,0));0<=u&&(u=Math.max(u-g.h-r.h,0));l(e,a.l,a.t,k,u)};c.isBodyLtr=function(c){c=c||g.doc;return"ltr"==(g.body(c).dir||c.documentElement.dir||"ltr").toLowerCase()};c.docScroll=function(e){e=e||g.doc;var a=g.doc.parentWindow||g.doc.defaultView;return"pageXOffset"in a?{x:a.pageXOffset,y:a.pageYOffset}:(a=e.documentElement)&&{x:c.fixIeBiDiScrollLeft(a.scrollLeft||0,e),y:a.scrollTop||0}};c.getIeDocumentElementOffset=function(c){return{x:0,y:0}};c.fixIeBiDiScrollLeft=
function(e,a){a=a||g.doc;var k=b("ie");if(k&&!c.isBodyLtr(a)){a=a.documentElement;var r=g.global;6==k&&r.frameElement&&a.scrollHeight>a.clientHeight&&(e+=a.clientLeft);return 8>k?e+a.clientWidth-a.scrollWidth:-e}return e};c.position=function(e,a){e=p.byId(e);g.body(e.ownerDocument);var k=e.getBoundingClientRect(),k={x:k.left,y:k.top,w:k.right-k.left,h:k.bottom-k.top};9>b("ie")&&(k.x-=0,k.y-=0);a&&(e=c.docScroll(e.ownerDocument),k.x+=e.x,k.y+=e.y);return k};c.getMarginSize=function(e,a){e=p.byId(e);
a=c.getMarginExtents(e,a||f.getComputedStyle(e));e=e.getBoundingClientRect();return{w:e.right-e.left+a.w,h:e.bottom-e.top+a.h}};c.normalizeEvent=function(e){"layerX"in e||(e.layerX=e.offsetX,e.layerY=e.offsetY);if(!("pageX"in e)){var a=e.target,a=a&&a.ownerDocument||document,k=a.documentElement;e.pageX=e.clientX+c.fixIeBiDiScrollLeft(k.scrollLeft||0,a);e.pageY=e.clientY+(k.scrollTop||0)}};return c})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(b,g,p){var f={global:b.global,
doc:b.global.document||null,body:function(f){f=f||b.doc;return f.body||f.getElementsByTagName("body")[0]},setContext:function(l,m){b.global=f.global=l;b.doc=f.doc=m},withGlobal:function(l,m,h,c){var q=b.global;try{return b.global=f.global=l,f.withDoc.call(null,l.document,m,h,c)}finally{b.global=f.global=q}},withDoc:function(l,m,h,c){var q=f.doc,e=p("ie"),a,k,r;try{return b.doc=f.doc=l,b.isQuirks=0,p("ie")&&(r=l.parentWindow)&&r.navigator&&(a=parseFloat(r.navigator.appVersion.split("MSIE ")[1])||void 0,
(k=l.documentMode)&&5!=k&&Math.floor(a)!=k&&(a=k),b.isIE=p.add("ie",a,!0,!0)),h&&"string"==typeof m&&(m=h[m]),m.apply(h,c||[])}finally{b.doc=f.doc=q,b.isQuirks=0,b.isIE=p.add("ie",e,!0,!0)}}};g.mixin(b,f);return f})},"dojo/dom":function(){define(["./sniff","./_base/window","./_base/kernel"],function(b,g,p){if(7>=b("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(m){}var f={};b("ie")?f.byId=function(b,f){if("string"!=typeof b)return b;var c=f||g.doc;f=b&&c.getElementById(b);if(!f||
f.attributes.id.value!=b&&f.id!=b){c=c.all[b];if(!c||c.nodeName)c=[c];for(var q=0;f=c[q++];)if(f.attributes&&f.attributes.id&&f.attributes.id.value==b||f.id==b)return f}else return f}:f.byId=function(b,f){return("string"==typeof b?(f||g.doc).getElementById(b):b)||null};p=p.global.document||null;b.add("dom-contains",!(!p||!p.contains));f.isDescendant=b("dom-contains")?function(b,h){return!(!(h=f.byId(h))||!h.contains(f.byId(b)))}:function(b,h){try{for(b=f.byId(b),h=f.byId(h);b;){if(b==h)return!0;b=
b.parentNode}}catch(c){}return!1};b.add("css-user-select",function(b,f,c){if(!c)return!1;b=c.style;f=["Khtml","O","Moz","Webkit"];c=f.length;var q="userSelect";do if("undefined"!==typeof b[q])return q;while(c--&&(q=f[c]+"UserSelect"));return!1});var l=b("css-user-select");f.setSelectable=l?function(b,h){f.byId(b).style[l]=h?"":"none"}:function(b,h){b=f.byId(b);var c=b.getElementsByTagName("*"),q=c.length;if(h)for(b.removeAttribute("unselectable");q--;)c[q].removeAttribute("unselectable");else for(b.setAttribute("unselectable",
"on");q--;)c[q].setAttribute("unselectable","on")};return f})},"dojo/dom-style":function(){define(["./sniff","./dom","./_base/window"],function(b,g,p){function f(c,e,b){e=e.toLowerCase();if("auto"==b){if("height"==e)return c.offsetHeight;if("width"==e)return c.offsetWidth}if("fontweight"==e)switch(b){case 700:return"bold";default:return"normal"}e in a||(a[e]=k.test(e));return a[e]?h(c,b):b}var l,m={};l=b("webkit")?function(a){var c;if(1==a.nodeType){var e=a.ownerDocument.defaultView;c=e.getComputedStyle(a,
null);!c&&a.style&&(a.style.display="",c=e.getComputedStyle(a,null))}return c||{}}:b("ie")&&9>b("ie")?function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){if(1===a.nodeType){var c=a.ownerDocument.defaultView;return(c.opener?c:p.global.window).getComputedStyle(a,null)}return{}};m.getComputedStyle=l;var h;h=b("ie")?function(a,c){if(!c)return 0;if("medium"==c)return 4;if(c.slice&&"px"==c.slice(-2))return parseFloat(c);var e=a.style,k=a.runtimeStyle,t=e.left,d=k.left;k.left=
a.currentStyle.left;try{e.left=c,c=e.pixelLeft}catch(n){c=0}e.left=t;k.left=d;return c}:function(a,c){return parseFloat(c)||0};m.toPixelValue=h;var c=function(a,c){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(v){return c?{}:null}},q=9>b("ie")||(b("ie"),0)?function(a){try{return c(a).Opacity/100}catch(z){return 1}}:function(a){return l(a).opacity},e=9>b("ie")||(b("ie"),0)?function(a,k){""===k&&(k=1);var b=100*k;1===k?(a.style.zoom="",c(a)&&(a.style.filter=a.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,
""))):(a.style.zoom=1,c(a)?c(a,1).Opacity=b:a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+b+")",c(a,1).Enabled=!0);if("tr"==a.tagName.toLowerCase())for(a=a.firstChild;a;a=a.nextSibling)"td"==a.tagName.toLowerCase()&&e(a,k);return k}:function(a,c){return a.style.opacity=c},a={left:!0,top:!0},k=/margin|padding|width|height|max|min|offset/,r={cssFloat:1,styleFloat:1,"float":1};m.get=function(a,c){var e=g.byId(a),k=arguments.length;if(2==k&&"opacity"==c)return q(e);c=r[c]?"cssFloat"in
e.style?"cssFloat":"styleFloat":c;var b=m.getComputedStyle(e);return 1==k?b:f(e,c,b[c]||e.style[c])};m.set=function(a,c,k){var b=g.byId(a),t=arguments.length,d="opacity"==c;c=r[c]?"cssFloat"in b.style?"cssFloat":"styleFloat":c;if(3==t)return d?e(b,k):b.style[c]=k;for(var n in c)m.set(a,n,c[n]);return m.getComputedStyle(b)};return m})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(b,g,p,f,l){function m(b,c){var q=function(e,a){return g(e,b,function(k){if(c)return c(k,
a);if(!f.isDescendant(k.relatedTarget,e))return a.call(this,k)})};q.bubble=function(c){return m(b,function(a,e){var k=c(a.target),b=a.relatedTarget;if(k&&k!=(b&&1==b.nodeType&&c(b)))return e.call(k,a)})};return q}p={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(b,c){return b.button==c},isLeft:function(b){return 0==b.button},isMiddle:function(b){return 1==b.button},isRight:function(b){return 2==b.button}};b.mouseButtons=p;return{_eventHandler:m,enter:m("mouseover"),leave:m("mouseout"),wheel:"mousewheel",
isLeft:p.isLeft,isMiddle:p.isMiddle,isRight:p.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(b,g,p){if(!p("host-browser"))return p;b._name="browser";g.mixin(b,{isBrowser:!0,isFF:p("ff"),isIE:p("ie"),isKhtml:0,isWebKit:p("webkit"),isMozilla:p("mozilla"),isMoz:p("mozilla"),isOpera:p("opera"),isSafari:p("safari"),isChrome:p("chrome"),isMac:p("mac"),isIos:p("ios"),isAndroid:0,isWii:0,isQuirks:0,isAir:0});return p})},"dojo/keys":function(){define(["./_base/kernel",
"./sniff"],function(b,g){return b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:g("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,
NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:g("mac")?g("safari")?91:224:17}})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(b,g,p){var f=window,l={addOnWindowUnload:function(m,h){b.windowUnloaded||p(f,"unload",b.windowUnloaded=function(){});p(f,"unload",g.hitch(m,
h))},addOnUnload:function(b,h){p(f,"beforeunload",g.hitch(b,h))}};b.addOnWindowUnload=l.addOnWindowUnload;b.addOnUnload=l.addOnUnload;return l})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(b,g,p,f,l,m,h,c){b.byId=g.byId;b.isDescendant=g.isDescendant;b.setSelectable=g.setSelectable;b.getAttr=f.get;b.setAttr=f.set;b.hasAttr=f.has;b.removeAttr=f.remove;b.getNodeProp=f.getNodeProp;b.attr=
function(c,e,a){return 2==arguments.length?f["string"==typeof e?"get":"set"](c,e):f.set(c,e,a)};b.hasClass=m.contains;b.addClass=m.add;b.removeClass=m.remove;b.toggleClass=m.toggle;b.replaceClass=m.replace;b._toDom=b.toDom=h.toDom;b.place=h.place;b.create=h.create;b.empty=function(c){h.empty(c)};b._destroyElement=b.destroy=function(c){h.destroy(c)};b._getPadExtents=b.getPadExtents=c.getPadExtents;b._getBorderExtents=b.getBorderExtents=c.getBorderExtents;b._getPadBorderExtents=b.getPadBorderExtents=
c.getPadBorderExtents;b._getMarginExtents=b.getMarginExtents=c.getMarginExtents;b._getMarginSize=b.getMarginSize=c.getMarginSize;b._getMarginBox=b.getMarginBox=c.getMarginBox;b.setMarginBox=c.setMarginBox;b._getContentBox=b.getContentBox=c.getContentBox;b.setContentSize=c.setContentSize;b._isBodyLtr=b.isBodyLtr=c.isBodyLtr;b._docScroll=b.docScroll=c.docScroll;b._getIeDocumentElementOffset=b.getIeDocumentElementOffset=c.getIeDocumentElementOffset;b._fixIeBiDiScrollLeft=b.fixIeBiDiScrollLeft=c.fixIeBiDiScrollLeft;
b.position=c.position;b.marginBox=function(b,e){return e?c.setMarginBox(b,e):c.getMarginBox(b)};b.contentBox=function(b,e){return e?c.setContentSize(b,e):c.getContentBox(b)};b.coords=function(q,e){b.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");q=g.byId(q);var a=p.getComputedStyle(q),a=c.getMarginBox(q,a);q=c.position(q,e);a.x=q.x;a.y=q.y;return a};b.getProp=l.get;b.setProp=l.set;b.prop=function(c,e,a){return 2==arguments.length?l["string"==typeof e?"get":"set"](c,e):l.set(c,
e,a)};b.getStyle=p.get;b.setStyle=p.set;b.getComputedStyle=p.getComputedStyle;b.__toPixelValue=b.toPixelValue=p.toPixelValue;b.style=function(c,e,a){switch(arguments.length){case 1:return p.get(c);case 2:return p["string"==typeof e?"get":"set"](c,e)}return p.set(c,e,a)};return b})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(b,g,p,f,l,m){function h(c,a){c=c.getAttributeNode&&c.getAttributeNode(a);return!!c&&c.specified}var c={innerHTML:1,
textContent:1,className:1,htmlFor:g("ie"),value:1},q={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};b.has=function(e,a){var k=a.toLowerCase();return c[m.names[k]||a]||h(f.byId(e),q[k]||a)};b.get=function(e,a){e=f.byId(e);var k=a.toLowerCase(),b=m.names[k]||a,l=e[b];if(c[b]&&"undefined"!=typeof l)return l;if("textContent"==b)return m.get(e,b);if("href"!=b&&("boolean"==typeof l||p.isFunction(l)))return l;a=q[k]||a;return h(e,a)?e.getAttribute(a):null};b.set=function(e,a,k){e=
f.byId(e);if(2==arguments.length){for(var r in a)b.set(e,r,a[r]);return e}r=a.toLowerCase();var h=m.names[r]||a,g=c[h];if("style"==h&&"string"!=typeof k)return l.set(e,k),e;if(g||"boolean"==typeof k||p.isFunction(k))return m.set(e,a,k);e.setAttribute(q[r]||a,k);return e};b.remove=function(c,a){f.byId(c).removeAttribute(q[a.toLowerCase()]||a)};b.getNodeProp=function(c,a){c=f.byId(c);var e=a.toLowerCase(),b=m.names[e]||a;if(b in c&&"href"!=b)return c[b];a=q[e]||a;return h(c,a)?c.getAttribute(a):null}})},
"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(b,g,p,f,l,m,h,c){var q={},e=1,a=g._scopeName+"attrid";b.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};b.get=function(a,c){a=l.byId(a);var e=c.toLowerCase();return a[b.names[e]||c]};b.set=function(k,r,u){k=
l.byId(k);if(2==arguments.length&&"string"!=typeof r){for(var g in r)b.set(k,g,r[g]);return k}g=r.toLowerCase();g=b.names[g]||r;if("style"==g&&"string"!=typeof u)return m.set(k,u),k;if("innerHTML"==g)return p("ie")&&k.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(h.empty(k),k.appendChild(h.toDom(u,k.ownerDocument))):k[g]=u,k;if(f.isFunction(u)){var v=k[a];v||(v=e++,k[a]=v);q[v]||(q[v]={});var w=q[v][g];if(w)c.disconnect(w);else try{delete k[g]}catch(t){}u?
q[v][g]=c.connect(k,g,u):k[g]=null;return k}k[g]=u;return k}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(b,g,p,f,l,m){function h(a,d){var n=d.parentNode;n&&n.insertBefore(a,d)}function c(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(n){}for(var d;d=a.lastChild;)a.removeChild(d)}var q={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table",
"thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},e=/<\s*([\w\:]+)/,a={},k=0,r="__"+g._scopeName+"ToDomId",u;for(u in q)q.hasOwnProperty(u)&&(g=q[u],g.pre="option"==u?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+g.join("\x3e\x3c")+"\x3e",g.post="\x3c/"+g.reverse().join("\x3e\x3c/")+"\x3e");var z;8>=p("ie")&&(z=function(a){a.__dojo_html5_tested="yes";var d=v("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!==
d.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,function(d){a.createElement(d)});w(d)});b.toDom=function(c,d){d=d||f.doc;var n=d[r];n||(d[r]=n=++k+"",a[n]=d.createElement("div"));8>=p("ie")&&!d.__dojo_html5_tested&&d.body&&z(d);c+="";var b=c.match(e),t=b?b[1].toLowerCase():"",n=a[n];if(b&&q[t])for(b=q[t],n.innerHTML=b.pre+c+b.post,c=b.length;c;--c)n=n.firstChild;else n.innerHTML=
c;if(1==n.childNodes.length)return n.removeChild(n.firstChild);for(c=d.createDocumentFragment();d=n.firstChild;)c.appendChild(d);return c};b.place=function(a,d,n){d=l.byId(d);"string"==typeof a&&(a=/^\s*</.test(a)?b.toDom(a,d.ownerDocument):l.byId(a));if("number"==typeof n){var c=d.childNodes;!c.length||c.length<=n?d.appendChild(a):h(a,c[0>n?0:n])}else switch(n){case "before":h(a,d);break;case "after":n=a;(c=d.parentNode)&&(c.lastChild==d?c.appendChild(n):c.insertBefore(n,d.nextSibling));break;case "replace":d.parentNode.replaceChild(a,
d);break;case "only":b.empty(d);d.appendChild(a);break;case "first":if(d.firstChild){h(a,d.firstChild);break}default:d.appendChild(a)}return a};var v=b.create=function(a,d,n,c){var e=f.doc;n&&(n=l.byId(n),e=n.ownerDocument);"string"==typeof a&&(a=e.createElement(a));d&&m.set(a,d);n&&b.place(a,n,c);return a};b.empty=function(a){c(l.byId(a))};var w=b.destroy=function(a){if(a=l.byId(a)){var d=a;a=a.parentNode;d.firstChild&&c(d);a&&(p("ie")&&a.canHaveChildren&&"removeNode"in d?d.removeNode(!1):a.removeChild(d))}}})},
"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(b,g,p){function f(c){if("string"==typeof c||c instanceof String){if(c&&!m.test(c))return h[0]=c,h;c=c.split(m);c.length&&!c[0]&&c.shift();c.length&&!c[c.length-1]&&c.pop();return c}return c?g.filter(c,function(c){return c}):[]}var l,m=/\s+/,h=[""],c={};return l={contains:function(c,e){return 0<=(" "+p.byId(c).className+" ").indexOf(" "+e+" ")},add:function(c,e){c=p.byId(c);e=f(e);var a=c.className,k,a=a?" "+a+" ":
" ";k=a.length;for(var b=0,q=e.length,h;b<q;++b)(h=e[b])&&0>a.indexOf(" "+h+" ")&&(a+=h+" ");k<a.length&&(c.className=a.substr(1,a.length-2))},remove:function(c,e){c=p.byId(c);var a;if(void 0!==e){e=f(e);a=" "+c.className+" ";for(var k=0,r=e.length;k<r;++k)a=a.replace(" "+e[k]+" "," ");a=b.trim(a)}else a="";c.className!=a&&(c.className=a)},replace:function(b,e,a){b=p.byId(b);c.className=b.className;l.remove(c,a);l.add(c,e);b.className!==c.className&&(b.className=c.className)},toggle:function(c,e,
a){c=p.byId(c);if(void 0===a){e=f(e);for(var k=0,b=e.length,q;k<b;++k)q=e[k],l[l.contains(c,q)?"remove":"add"](c,q)}else l[a?"add":"remove"](c,e);return a}}})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(b,g,p){function f(c){return h[c]=new Function("item","index","array",c)}function l(c){var a=!c;return function(e,b,q){var k=0,r=e&&e.length||0,m;r&&"string"==typeof e&&(e=e.split(""));"string"==typeof b&&(b=h[b]||f(b));if(q)for(;k<r;++k){if(m=!b.call(q,e[k],k,e),c^
m)return!m}else for(;k<r;++k)if(m=!b(e[k],k,e),c^m)return!m;return a}}function m(e){var a=1,k=0,b=0;e||(a=k=b=-1);return function(r,f,h,m){if(m&&0<a)return q.lastIndexOf(r,f,h);m=r&&r.length||0;var t=e?m+b:k;h===c?h=e?k:m+b:0>h?(h=m+h,0>h&&(h=k)):h=h>=m?m+b:h;for(m&&"string"==typeof r&&(r=r.split(""));h!=t;h+=a)if(r[h]==f)return h;return-1}}var h={},c,q={every:l(!1),some:l(!0),indexOf:m(!0),lastIndexOf:m(!1),forEach:function(c,a,k){var e=0,b=c&&c.length||0;b&&"string"==typeof c&&(c=c.split(""));"string"==
typeof a&&(a=h[a]||f(a));if(k)for(;e<b;++e)a.call(k,c[e],e,c);else for(;e<b;++e)a(c[e],e,c)},map:function(c,a,k,b){var e=0,r=c&&c.length||0;b=new (b||Array)(r);r&&"string"==typeof c&&(c=c.split(""));"string"==typeof a&&(a=h[a]||f(a));if(k)for(;e<r;++e)b[e]=a.call(k,c[e],e,c);else for(;e<r;++e)b[e]=a(c[e],e,c);return b},filter:function(c,a,k){var e=0,b=c&&c.length||0,q=[],m;b&&"string"==typeof c&&(c=c.split(""));"string"==typeof a&&(a=h[a]||f(a));if(k)for(;e<b;++e)m=c[e],a.call(k,m,e,c)&&q.push(m);
else for(;e<b;++e)m=c[e],a(m,e,c)&&q.push(m);return q},clearCache:function(){h={}}};p.mixin(b,q);return q})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(b,g,p){g=g.NodeList;var f=g.prototype;f.connect=g._adaptAsForEach(function(){return b.connect.apply(this,arguments)});f.coords=g._adaptAsMap(b.coords);g.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");
p.forEach(g.events,function(b){var m="on"+b;f[m]=function(b,c){return this.connect(m,b,c)}});return b.NodeList=g})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),function(b,g,p,f,l,m,h,c){function q(d,a){var n=function(n,c){if("string"==typeof c&&(c=p.byId(c),!c))return new a([]);n="string"==typeof n?d(n,c):n?n.end&&n.on?n:[n]:[];return n.end&&n.on?n:new a(n)};n.matches=d.match||function(d,a,c){return 0<
n.filter([d],a,c).length};n.filter=d.filter||function(d,a,c){return n(a,c).filter(function(n){return-1<l.indexOf(d,n)})};if("function"!=typeof d){var c=d.search;d=function(d,n){return c(n||document,d)}}return n}var e=Array.prototype,a=e.slice,k=e.concat,r=l.forEach,u=function(d,n,c){n=[0].concat(a.call(n,0));c=c||b.global;return function(a){n[0]=a;return d.apply(c,n)}},z=function(d){var n=this instanceof v&&1;"number"==typeof d&&(d=Array(d));var a=d&&"length"in d?d:arguments;if(n||!a.sort){for(var c=
n?this:[],e=c.length=a.length,k=0;k<e;k++)c[k]=a[k];if(n)return c;a=c}m._mixin(a,w);a._NodeListCtor=function(d){return v(d)};return a},v=z,w=v.prototype=[];v._wrap=w._wrap=function(d,a,c){d=new (c||this._NodeListCtor||v)(d);return a?d._stash(a):d};v._adaptAsMap=function(d,a){return function(){return this.map(u(d,arguments,a))}};v._adaptAsForEach=function(d,a){return function(){this.forEach(u(d,arguments,a));return this}};v._adaptAsFilter=function(d,a){return function(){return this.filter(u(d,arguments,
a))}};v._adaptWithCondition=function(d,a,c){return function(){var n=arguments,e=u(d,n,c);if(a.call(c||b.global,n))return this.map(e);this.forEach(e);return this}};r(["slice","splice"],function(d){var a=e[d];w[d]=function(){return this._wrap(a.apply(this,arguments),"slice"==d?this:null)}});r(["indexOf","lastIndexOf","every","some"],function(d){var n=l[d];w[d]=function(){return n.apply(b,[this].concat(a.call(arguments,0)))}});m.extend(z,{constructor:v,_NodeListCtor:v,toString:function(){return this.join(",")},
_stash:function(d){this._parent=d;return this},on:function(d,a){var n=this.map(function(n){return f(n,d,a)});n.remove=function(){for(var d=0;d<n.length;d++)n[d].remove()};return n},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(d){var n=a.call(this,0),c=l.map(arguments,function(d){return a.call(d,0)});return this._wrap(k.apply(n,c),this)},map:function(d,a){return this._wrap(l.map(this,d,a),this)},forEach:function(d,a){r(this,d,a);return this},filter:function(d){var a=
arguments,c=this,e=0;if("string"==typeof d){c=t._filterResult(this,a[0]);if(1==a.length)return c._stash(this);e=1}return this._wrap(l.filter(c,a[e],a[e+1]),this)},instantiate:function(d,a){var n=m.isFunction(d)?d:m.getObject(d);a=a||{};return this.forEach(function(d){new n(a,d)})},at:function(){var d=new this._NodeListCtor(0);r(arguments,function(a){0>a&&(a=this.length+a);this[a]&&d.push(this[a])},this);return d._stash(this)}});var t=q(c,z);b.query=q(c,function(d){return z(d)});t.load=function(d,
a,c){h.load(d,a,function(d){c(q(d,z))})};b._filterQueryResult=t._filterResult=function(d,a,c){return new z(t.filter(d,a,c))};b.NodeList=t.NodeList=z;return t})},"dojo/selector/_loader":function(){define(["../has","require"],function(b,g){"undefined"!==typeof document&&document.createElement("div");var p;return{load:function(f,l,m,h){if(h&&h.isBuild)m();else{h=g;f="default"==f?b("config-selectorEngine")||"css3":f;f="css2"==f||"lite"==f?"./lite":"css2.1"==f?"./lite":"css3"==f?"./lite":"acme"==f?"./acme":
(h=l)&&f;if("?"==f.charAt(f.length-1)){f=f.substring(0,f.length-1);var c=!0}if(c&&(b("dom-compliant-qsa")||p))return m(p);h([f],function(c){"./lite"!=f&&(p=c);m(c)})}}}})},"dojo/selector/lite":function(){define(["../has","../_base/kernel"],function(b,g){var p=document.createElement("div"),f=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.msMatchesSelector||p.oMatchesSelector,l=p.querySelectorAll,m=/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g,h=function(f,e){var a=e?e.ownerDocument||
e:g.doc||document,k=(l?/^([\w]*)#([\w\-]+$)|^(\.)([\w\-\*]+$)|^(\w+$)/:/^([\w]*)#([\w\-]+)(?:\s+(.*))?$|(?:^|(>|.+\s+))([\w\-\*]+)(\S*$)/).exec(f);e=e||a;if(k){var r=(b("ie"),null!==e.parentNode&&9!==e.nodeType&&e.parentNode===a);if(k[2]&&r){var q=g.byId?g.byId(k[2],a):a.getElementById(k[2]);if(!q||k[1]&&k[1]!=q.tagName.toLowerCase())return[];if(e!=a)for(f=q;f!=e;)if(f=f.parentNode,!f)return[];return k[3]?h(k[3],q):[q]}if(k[3]&&e.getElementsByClassName)return e.getElementsByClassName(k[4]);if(k[5])if(q=
e.getElementsByTagName(k[5]),k[4]||k[6])f=(k[4]||"")+k[6];else return q}if(l)return 1===e.nodeType&&"object"!==e.nodeName.toLowerCase()?c(e,f,e.querySelectorAll):e.querySelectorAll(f);q||(q=e.getElementsByTagName("*"));k=[];a=0;for(r=q.length;a<r;a++){var m=q[a];1==m.nodeType&&(void 0)(m,f,e)&&k.push(m)}return k},c=function(c,e,a){var k=c,b=c.getAttribute("id"),f=b||"__dojo__",q=c.parentNode,h=/^\s*[+~]/.test(e);if(h&&!q)return[];b?f=f.replace(/'/g,"\\$\x26"):c.setAttribute("id",f);h&&q&&(c=c.parentNode);
e=e.match(m);for(q=0;q<e.length;q++)e[q]="[id\x3d'"+f+"'] "+e[q];e=e.join(",");try{return a.call(c,e)}finally{b||k.removeAttribute("id")}};h.match=f?function(b,e,a){return a&&9!=a.nodeType?c(a,e,function(a){return f.call(b,a)}):f.call(b,e)}:void 0;return h})},"dojo/NodeList-dom":function(){define("./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),function(b,g,p,f,l,m,h,c,q){function e(a){return function(c,d,n){return 2==
arguments.length?a["string"==typeof d?"get":"set"](c,d):a.set(c,d,n)}}var a=function(a){return 1==a.length&&"string"==typeof a[0]},k=function(a){var c=a.parentNode;c&&c.removeChild(a)},r=g.NodeList,u=r._adaptWithCondition,z=r._adaptAsForEach,v=r._adaptAsMap;f.extend(r,{_normalize:function(a,c){var d=!0===a.parse;if("string"==typeof a.template){var n=a.templateFunc||b.string&&b.string.substitute;a=n?n(a.template,a):a}n=typeof a;"string"==n||"number"==n?(a=m.toDom(a,c&&c.ownerDocument),a=11==a.nodeType?
f._toArray(a.childNodes):[a]):f.isArrayLike(a)?f.isArray(a)||(a=f._toArray(a)):a=[a];d&&(a._runParse=!0);return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,c,d,n){if(1==c.nodeType||"only"!=d)for(var e,k=a.length,t=k-1;0<=t;t--){var r=n?this._cloneNode(a[t]):a[t];if(a._runParse&&b.parser&&b.parser.parse)for(e||(e=c.ownerDocument.createElement("div")),e.appendChild(r),b.parser.parse(e),r=e.firstChild;e.firstChild;)e.removeChild(e.firstChild);t==k-1?m.place(r,c,d):c.parentNode.insertBefore(r,
c);c=r}},position:v(h.position),attr:u(e(c),a),style:u(e(q),a),addClass:z(l.add),removeClass:z(l.remove),toggleClass:z(l.toggle),replaceClass:z(l.replace),empty:z(m.empty),removeAttr:z(c.remove),marginBox:v(h.getMarginBox),place:function(a,c){var d=g(a)[0];return this.forEach(function(a){m.place(a,d,c)})},orphan:function(a){return(a?g._filterResult(this,a):this).forEach(k)},adopt:function(a,c){return g(a).place(this[0],c)._stash(this)},query:function(a){if(!a)return this;var c=new r;this.map(function(d){g(a,
d).forEach(function(d){void 0!==d&&c.push(d)})});return c._stash(this)},filter:function(a){var c=arguments,d=this,n=0;if("string"==typeof a){d=g._filterResult(this,c[0]);if(1==c.length)return d._stash(this);n=1}return this._wrap(p.filter(d,c[n],c[n+1]),this)},addContent:function(a,c){a=this._normalize(a,this[0]);for(var d=0,n;n=this[d];d++)a.length?this._place(a,n,c,0<d):m.empty(n);return this}});return r})},"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){b._xhrObj=z._create;var w=b.config;b.objectToQuery=f.objectToQuery;b.queryToObject=f.queryToObject;b.fieldToObject=m.fieldToObject;b.formToObject=m.toObject;b.formToQuery=m.toQuery;b.formToJson=m.toJson;b._blockAsync=!1;var t=b._contentHandlers=b.contentHandlers={text:function(d){return d.responseText},json:function(d){return q.fromJson(d.responseText||null)},"json-comment-filtered":function(d){c.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}\x26\x26\nUse djConfig.useCommentedJson\x3dtrue to turn off this message.");
d=d.responseText;var a=d.indexOf("/*"),n=d.lastIndexOf("*/");if(-1==a||-1==n)throw Error("JSON was not comment filtered");return q.fromJson(d.substring(a+2,n))},javascript:function(d){return b.eval(d.responseText)},xml:function(d){var n=d.responseXML;n&&!n.querySelectorAll&&(n=(new DOMParser).parseFromString(d.responseText,"application/xml"));if(g("ie")&&(!n||!n.documentElement)){var c=function(d){return"MSXML"+d+".DOMDocument"},c=["Microsoft.XMLDOM",c(6),c(4),c(3),c(2)];a.some(c,function(a){try{var c=
new ActiveXObject(a);c.async=!1;c.loadXML(d.responseText);n=c}catch(G){return!1}return!0})}return n},"json-comment-optional":function(d){return d.responseText&&/^[^{\[]*\/\*/.test(d.responseText)?t["json-comment-filtered"](d):t.json(d)}};t.arraybuffer=t.blob=t.document=function(d,a){return d.response};b._ioSetArgs=function(d,a,n,c){var k={args:d,url:d.url},t=null;if(d.form){var t=l.byId(d.form),r=t.getAttributeNode("action");k.url=k.url||(r?r.value:b.doc?b.doc.URL:null);t=m.toObject(t)}r={};t&&e.mixin(r,
t);d.content&&e.mixin(r,d.content);d.preventCache&&(r["dojo.preventCache"]=(new Date).valueOf());k.query=f.objectToQuery(r);k.handleAs=d.handleAs||"text";var x=new h(function(d){d.canceled=!0;a&&a(d);var n=d.ioArgs.error;n||(n=Error("request cancelled"),n.dojoType="cancel",d.ioArgs.error=n);return n});x.addCallback(n);var q=d.load;q&&e.isFunction(q)&&x.addCallback(function(a){return q.call(d,a,k)});var u=d.error;u&&e.isFunction(u)&&x.addErrback(function(a){return u.call(d,a,k)});var g=d.handle;g&&
e.isFunction(g)&&x.addBoth(function(a){return g.call(d,a,k)});x.addErrback(function(d){return c(d,x)});w.ioPublish&&b.publish&&!1!==k.args.ioPublish&&(x.addCallbacks(function(d){b.publish("/dojo/io/load",[x,d]);return d},function(d){b.publish("/dojo/io/error",[x,d]);return d}),x.addBoth(function(d){b.publish("/dojo/io/done",[x,d]);return d}));x.ioArgs=k;return x};var d=function(d){d=t[d.ioArgs.handleAs](d.ioArgs.xhr,d.ioArgs);return void 0===d?null:d},n=function(d,a){a.ioArgs.args.failOk||console.error(d);
return d},x=function(d){0>=y&&(y=0,w.ioPublish&&b.publish&&(!d||d&&!1!==d.ioArgs.args.ioPublish)&&b.publish("/dojo/io/stop"))},y=0;r.after(u,"_onAction",function(){--y});r.after(u,"_onInFlight",x);b._ioCancelAll=u.cancelAll;b._ioNotifyStart=function(d){w.ioPublish&&b.publish&&!1!==d.ioArgs.args.ioPublish&&(y||b.publish("/dojo/io/start"),y+=1,b.publish("/dojo/io/send",[d]))};b._ioWatch=function(d,a,n,c){d.ioArgs.options=d.ioArgs.args;e.mixin(d,{response:d.ioArgs,isValid:function(n){return a(d)},isReady:function(a){return n(d)},
handleResponse:function(a){return c(d)}});u(d);x(d)};b._ioAddQueryToUrl=function(d){d.query.length&&(d.url+=(-1==d.url.indexOf("?")?"?":"\x26")+d.query,d.query=null)};b.xhr=function(a,c,e){var k,t=b._ioSetArgs(c,function(d){k&&k.cancel()},d,n),r=t.ioArgs;"postData"in c?r.query=c.postData:"putData"in c?r.query=c.putData:"rawBody"in c?r.query=c.rawBody:(2<arguments.length&&!e||-1==="POST|PUT".indexOf(a.toUpperCase()))&&b._ioAddQueryToUrl(r);var f={method:a,handleAs:{arraybuffer:1,blob:1,document:1}[c.handleAs]?
c.handleAs:"text",responseType:c.responseType,timeout:c.timeout,withCredentials:c.withCredentials,ioArgs:r};"undefined"!==typeof c.headers&&(f.headers=c.headers);"undefined"!==typeof c.contentType&&(f.headers||(f.headers={}),f.headers["Content-Type"]=c.contentType);"undefined"!==typeof r.query&&(f.data=r.query);"undefined"!==typeof c.sync&&(f.sync=c.sync);b._ioNotifyStart(t);try{k=z(r.url,f,!0)}catch(Z){return t.cancel(),t}t.ioArgs.xhr=k.response.xhr;k.then(function(){t.resolve(t)}).otherwise(function(d){r.error=
d;d.response&&(d.status=d.response.status,d.responseText=d.response.text,d.xhr=d.response.xhr);t.reject(d)});return t};b.xhrGet=function(d){return b.xhr("GET",d)};b.rawXhrPost=b.xhrPost=function(d){return b.xhr("POST",d,!0)};b.rawXhrPut=b.xhrPut=function(d){return b.xhr("PUT",d,!0)};b.xhrDelete=function(d){return b.xhr("DELETE",d)};b._isDocumentOk=function(d){return v.checkStatus(d.status)};b._getText=function(d){var a;b.xhrGet({url:d,sync:!0,load:function(d){a=d}});return a};e.mixin(b.xhr,{_xhrObj:b._xhrObj,
fieldToObject:m.fieldToObject,formToObject:m.toObject,objectToQuery:f.objectToQuery,formToQuery:m.toQuery,formToJson:m.toJson,queryToObject:f.queryToObject,contentHandlers:t,_ioSetArgs:b._ioSetArgs,_ioCancelAll:b._ioCancelAll,_ioNotifyStart:b._ioNotifyStart,_ioWatch:b._ioWatch,_ioAddQueryToUrl:b._ioAddQueryToUrl,_isDocumentOk:b._isDocumentOk,_getText:b._getText,get:b.xhrGet,post:b.xhrPost,put:b.xhrPut,del:b.xhrDelete});return b.xhr})},"dojo/io-query":function(){define(["./_base/lang"],function(b){var g=
{};return{objectToQuery:function(p){var f=encodeURIComponent,l=[],m;for(m in p){var h=p[m];if(h!=g[m]){var c=f(m)+"\x3d";if(b.isArray(h))for(var q=0,e=h.length;q<e;++q)l.push(c+f(h[q]));else l.push(c+f(h))}}return l.join("\x26")},queryToObject:function(g){var f=decodeURIComponent;g=g.split("\x26");for(var l={},m,h,c=0,q=g.length;c<q;++c)if(h=g[c],h.length){var e=h.indexOf("\x3d");0>e?(m=f(h),h=""):(m=f(h.slice(0,e)),h=f(h.slice(e+1)));"string"==typeof l[m]&&(l[m]=[l[m]]);b.isArray(l[m])?l[m].push(h):
l[m]=h}return l}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(b,g,p,f){var l={fieldToObject:function(b){var f=null;if(b=g.byId(b)){var c=b.name,q=(b.type||"").toLowerCase();if(c&&q&&!b.disabled)if("radio"==q||"checkbox"==q)b.checked&&(f=b.value);else if(b.multiple)for(f=[],b=[b.firstChild];b.length;)for(c=b.pop();c;c=c.nextSibling)if(1==c.nodeType&&"option"==c.tagName.toLowerCase())c.selected&&f.push(c.value);else{c.nextSibling&&b.push(c.nextSibling);
c.firstChild&&b.push(c.firstChild);break}else f=b.value}return f},toObject:function(f){var h={};f=g.byId(f).elements;for(var c=0,q=f.length;c<q;++c){var e=f[c],a=e.name,k=(e.type||"").toLowerCase();if(a&&k&&0>"file|submit|image|reset|button".indexOf(k)&&!e.disabled){var r=h,m=a,e=l.fieldToObject(e);if(null!==e){var z=r[m];"string"==typeof z?r[m]=[z,e]:b.isArray(z)?z.push(e):r[m]=e}"image"==k&&(h[a+".x"]=h[a+".y"]=h[a].x=h[a].y=0)}}return h},toQuery:function(b){return p.objectToQuery(l.toObject(b))},
toJson:function(b,h){return f.stringify(l.toObject(b),null,h?4:0)}};return l})},"dojo/json":function(){define(["./has"],function(b){return JSON})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(b,g,p,f,l,m,h){var c=function(){},q=Object.freeze||function(){},e=b.Deferred=function(a){function k(d){if(z)throw Error("This deferred has already been resolved");h=d;z=!0;b()}function b(){for(var d;!d&&n;){var a=
n;n=n.next;if(d=a.progress==c)z=!1;var e=t?a.error:a.resolved;l("config-useDeferredInstrumentation")&&t&&g.instrumentRejected&&g.instrumentRejected(h,!!e);if(e)try{var k=e(h);k&&"function"===typeof k.then?k.then(m.hitch(a.deferred,"resolve"),m.hitch(a.deferred,"reject"),m.hitch(a.deferred,"progress")):(e=d&&void 0===k,d&&!e&&(t=k instanceof Error),a.deferred[e&&t?"reject":"resolve"](e?h:k))}catch(C){a.deferred.reject(C)}else t?a.deferred.reject(h):a.deferred.resolve(h)}}var h,z,v,w,t,d,n,x=this.promise=
new p;this.isResolved=x.isResolved=function(){return 0==w};this.isRejected=x.isRejected=function(){return 1==w};this.isFulfilled=x.isFulfilled=function(){return 0<=w};this.isCanceled=x.isCanceled=function(){return v};this.resolve=this.callback=function(d){this.fired=w=0;this.results=[d,null];k(d)};this.reject=this.errback=function(d){t=!0;this.fired=w=1;l("config-useDeferredInstrumentation")&&g.instrumentRejected&&g.instrumentRejected(d,!!n);k(d);this.results=[null,d]};this.progress=function(d){for(var a=
n;a;){var c=a.progress;c&&c(d);a=a.next}};this.addCallbacks=function(d,a){this.then(d,a,c);return this};x.then=this.then=function(a,k,t){var r=t==c?this:new e(x.cancel);a={resolved:a,error:k,progress:t,deferred:r};n?d=d.next=a:n=d=a;z&&b();return r.promise};var y=this;x.cancel=this.cancel=function(){if(!z){var d=a&&a(y);z||(d instanceof Error||(d=new f(d)),d.log=!1,y.reject(d))}v=!0};q(x)};m.extend(e,{addCallback:function(a){return this.addCallbacks(m.hitch.apply(b,arguments))},addErrback:function(a){return this.addCallbacks(null,
m.hitch.apply(b,arguments))},addBoth:function(a){var c=m.hitch.apply(b,arguments);return this.addCallbacks(c,c)},fired:-1});e.when=b.when=h;return e})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise","./has!config-deferredInstrumentation?./promise/instrumentation"],function(b,g,p,f,l){var m=Object.freeze||function(){},h=function(e,r,f,q,h){b("config-deferredInstrumentation")&&2===r&&a.instrumentRejected&&0===e.length&&a.instrumentRejected(f,!1,
q,h);for(h=0;h<e.length;h++)c(e[h],r,f,q)},c=function(c,r,f,h){var k=c[r],m=c.deferred;if(k)try{var t=k(f);if(0===r)"undefined"!==typeof t&&e(m,r,t);else{if(t&&"function"===typeof t.then){c.cancel=t.cancel;t.then(q(m,1),q(m,2),q(m,0));return}e(m,1,t)}}catch(d){e(m,2,d)}else e(m,r,f);b("config-deferredInstrumentation")&&2===r&&a.instrumentRejected&&a.instrumentRejected(f,!!k,h,m.promise)},q=function(a,c){return function(k){e(a,c,k)}},e=function(a,c,e){if(!a.isCanceled())switch(c){case 0:a.progress(e);
break;case 1:a.resolve(e);break;case 2:a.reject(e)}},a=function(e){var k=this.promise=new f,q=this,l,g,w,t=!1,d=[];b("config-deferredInstrumentation")&&Error.captureStackTrace&&(Error.captureStackTrace(q,a),Error.captureStackTrace(k,a));this.isResolved=k.isResolved=function(){return 1===l};this.isRejected=k.isRejected=function(){return 2===l};this.isFulfilled=k.isFulfilled=function(){return!!l};this.isCanceled=k.isCanceled=function(){return t};this.progress=function(a,n){if(l){if(!0===n)throw Error("This deferred has already been fulfilled.");
return k}h(d,0,a,null,q);return k};this.resolve=function(a,n){if(l){if(!0===n)throw Error("This deferred has already been fulfilled.");return k}h(d,l=1,g=a,null,q);d=null;return k};var n=this.reject=function(a,c){if(l){if(!0===c)throw Error("This deferred has already been fulfilled.");return k}b("config-deferredInstrumentation")&&Error.captureStackTrace&&Error.captureStackTrace(w={},n);h(d,l=2,g=a,w,q);d=null;return k};this.then=k.then=function(n,e,b){var t=[b,n,e];t.cancel=k.cancel;t.deferred=new a(function(d){return t.cancel&&
t.cancel(d)});l&&!d?c(t,l,g,w):d.push(t);return t.deferred.promise};this.cancel=k.cancel=function(d,a){if(!l){e&&(a=e(d),d="undefined"===typeof a?d:a);t=!0;if(!l)return"undefined"===typeof d&&(d=new p),n(d),d;if(2===l&&g===d)return d}else if(!0===a)throw Error("This deferred has already been fulfilled.");};m(k)};a.prototype.toString=function(){return"[object Deferred]"};l&&l(a);return a})},"dojo/errors/CancelError":function(){define(["./create"],function(b){return b("CancelError",null,null,{dojoType:"cancel",
log:!1})})},"dojo/errors/create":function(){define(["../_base/lang"],function(b){return function(g,p,f,l){f=f||Error;var m=function(b){if(f===Error){Error.captureStackTrace&&Error.captureStackTrace(this,m);var c=Error.call(this,b),q;for(q in c)c.hasOwnProperty(q)&&(this[q]=c[q]);this.message=b;this.stack=c.stack}else f.apply(this,arguments);p&&p.apply(this,arguments)};m.prototype=b.delegate(f.prototype,l);m.prototype.name=g;return m.prototype.constructor=m}})},"dojo/promise/Promise":function(){define(["../_base/lang"],
function(b){function g(){throw new TypeError("abstract");}return b.extend(function(){},{then:function(b,f,l){g()},cancel:function(b,f){g()},isResolved:function(){g()},isRejected:function(){g()},isFulfilled:function(){g()},isCanceled:function(){g()},always:function(b){return this.then(b,b)},"catch":function(b){return this.then(null,b)},otherwise:function(b){return this.then(null,b)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},
"dojo/when":function(){define(["./Deferred","./promise/Promise"],function(b,g){return function(p,f,l,m){var h=p&&"function"===typeof p.then,c=h&&p instanceof g;if(!h)return 1<arguments.length?f?f(p):p:(new b).resolve(p);c||(h=new b(p.cancel),p.then(h.resolve,h.reject,h.progress),p=h.promise);return f||l||m?p.then(f,l,m):p}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(b,g){b.fromJson=function(b){return eval("("+b+")")};b._escapeString=g.stringify;b.toJsonIndentStr="\t";b.toJson=
function(p,f){return g.stringify(p,function(b,f){return f&&(b=f.__json__||f.json,"function"==typeof b)?b.call(f):f},f&&b.toJsonIndentStr)};return b})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../has!host-browser?../_base/window: ../has!host-browser?dom-addeventlistener?:../on:".split(" "),function(b,g,p,f,l,m){function h(){for(var a=+new Date,k=0,b;k<e.length&&(b=e[k]);k++){var f=b.response,h=f.options;b.isCanceled&&b.isCanceled()||
b.isValid&&!b.isValid(f)?(e.splice(k--,1),c._onAction&&c._onAction()):b.isReady&&b.isReady(f)?(e.splice(k--,1),b.handleResponse(f),c._onAction&&c._onAction()):b.startTime&&b.startTime+(h.timeout||0)<a&&(e.splice(k--,1),b.cancel(new g("Timeout exceeded",f)),c._onAction&&c._onAction())}c._onInFlight&&c._onInFlight(b);e.length||(clearInterval(q),q=null)}function c(a){a.response.options.timeout&&(a.startTime=+new Date);a.isFulfilled()||(e.push(a),q||(q=setInterval(h,50)),a.response.options.sync&&h())}
var q=null,e=[];c.cancelAll=function(){try{f.forEach(e,function(a){try{a.cancel(new p("All requests canceled."))}catch(k){}})}catch(a){}};l&&m&&l.doc.attachEvent&&m(l.global,"unload",function(){c.cancelAll()});return c})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise ../has".split(" "),function(b,g,p,f,l,m,h,c,q){function e(a){return k(a)}function a(a){return void 0!==a.data?a.data:
a.text}b.deepCopy=function(a,c){for(var e in c){var k=a[e],r=c[e];k!==r&&(k&&"object"===typeof k&&r&&"object"===typeof r?r instanceof Date?a[e]=new Date(r):b.deepCopy(k,r):a[e]=r)}return a};b.deepCreate=function(a,c){c=c||{};var e=h.delegate(a),k,r;for(k in a)(r=a[k])&&"object"===typeof r&&(e[k]=b.deepCreate(r,c[k]));return b.deepCopy(e,c)};var k=Object.freeze||function(a){return a};b.deferred=function(r,q,m,l,w,t){var d=new f(function(a){q&&q(d,r);return a&&(a instanceof g||a instanceof p)?a:new p("Request canceled",
r)});d.response=r;d.isValid=m;d.isReady=l;d.handleResponse=w;m=d.then(e).otherwise(function(d){d.response=r;throw d;});b.notify&&m.then(h.hitch(b.notify,"emit","load"),h.hitch(b.notify,"emit","error"));l=m.then(a);w=new c;for(var n in l)l.hasOwnProperty(n)&&(w[n]=l[n]);w.response=m;k(w);t&&d.then(function(a){t.call(d,a)},function(a){t.call(d,r,a)});d.promise=w;d.then=w.then;return d};b.addCommonMethods=function(a,c){m.forEach(c||["GET","POST","PUT","DELETE"],function(c){a[("DELETE"===c?"DEL":c).toLowerCase()]=
function(e,k){k=h.delegate(k||{});k.method=c;return a(e,k)}})};b.parseArgs=function(a,c,e){var k=c.data,b=c.query;!k||e||"object"!==typeof k||k instanceof ArrayBuffer||k instanceof Blob||(c.data=l.objectToQuery(k));b?("object"===typeof b&&(b=l.objectToQuery(b)),c.preventCache&&(b+=(b?"\x26":"")+"request.preventCache\x3d"+ +new Date)):c.preventCache&&(b="request.preventCache\x3d"+ +new Date);a&&b&&(a+=(~a.indexOf("?")?"\x26":"?")+b);return{url:a,options:c,getHeader:function(a){return null}}};b.checkStatus=
function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||!a}})},"dojo/errors/RequestError":function(){define(["./create"],function(b){return b("RequestError",function(b,p){this.response=p})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(b,g){return b("RequestTimeoutError",null,g,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(b,g,p,f,l){function m(a,c){var e=
a.xhr;a.status=a.xhr.status;try{a.text=e.responseText}catch(n){}"xml"===a.options.handleAs&&(a.data=e.responseXML);var d;if(c)this.reject(c);else{try{p(a)}catch(n){d=n}f.checkStatus(e.status)?d?this.reject(d):this.resolve(a):(c=d?new b("Unable to load "+a.url+" status: "+e.status+" and an error in handleAs: transformation of response",a):new b("Unable to load "+a.url+" status: "+e.status,a),this.reject(c))}}function h(a){return this.xhr.getResponseHeader(a)}function c(v,w,t){var d=w&&w.data&&w.data instanceof
FormData,n=f.parseArgs(v,f.deepCreate(z,w),d);v=n.url;w=n.options;var x=!w.data&&"POST"!==w.method&&"PUT"!==w.method;10>=l("ie")&&(v=v.split("#")[0]);var y,A=f.deferred(n,r,e,a,m,function(){y&&y()}),p=n.xhr=c._create();if(!p)return A.cancel(new b("XHR was not created")),t?A:A.promise;n.getHeader=h;k&&(y=k(p,A,n,w.uploadProgress));var B="undefined"===typeof w.data?null:w.data,F=!w.sync,C=w.method;try{p.open(C,v,F,w.user||u,w.password||u);w.withCredentials&&(p.withCredentials=w.withCredentials);w.handleAs in
q&&(p.responseType=q[w.handleAs]);var G=w.headers;v=d||x?!1:"application/x-www-form-urlencoded";if(G)for(var ba in G)"content-type"===ba.toLowerCase()?v=G[ba]:G[ba]&&p.setRequestHeader(ba,G[ba]);v&&!1!==v&&p.setRequestHeader("Content-Type",v);G&&"X-Requested-With"in G||p.setRequestHeader("X-Requested-With","XMLHttpRequest");f.notify&&f.notify.emit("send",n,A.promise.cancel);p.send(B)}catch(Z){A.reject(Z)}g(A);p=null;return t?A:A.promise}l.add("dojo-force-activex-xhr",function(){return 0});var q={blob:"blob",
document:"document",arraybuffer:"arraybuffer"},e,a,k,r;e=function(a){return!this.isFulfilled()};r=function(a,c){c.xhr.abort()};k=function(a,c,e,d){function n(d){c.handleResponse(e)}function k(d){d=new b("Unable to load "+e.url+" status: "+d.target.status,e);c.handleResponse(e,d)}function t(d){d.lengthComputable?(e.loaded=d.loaded,e.total=d.total,c.progress(e)):3===e.xhr.readyState&&(e.loaded="loaded"in d?d.loaded:d.position,c.progress(e))}a.addEventListener("load",n,!1);a.addEventListener("error",
k,!1);a.addEventListener("progress",t,!1);d&&a.upload&&a.upload.addEventListener("progress",t,!1);return function(){a.removeEventListener("load",n,!1);a.removeEventListener("error",k,!1);a.removeEventListener("progress",t,!1);a.upload.removeEventListener("progress",t,!1);a=null}};var u,z={data:null,query:null,sync:!1,method:"GET"};c._create=function(){throw Error("XMLHTTP not available");};l("dojo-force-activex-xhr")||(c._create=function(){return new XMLHttpRequest});f.addCommonMethods(c);return c})},
"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../has!dom?../selector/_loader"],function(b,g,p,f){function l(b){var c=m[b.options.handleAs];b.data=c?c(b):b.data||b.text;return b}p=function(b){return b.xhr.response};var m={javascript:function(b){return g.eval(b.text||"")},json:function(f){return b.parse(f.text||null)},xml:void 0,blob:p,arraybuffer:p,document:p};l.register=function(b,c){m[b]=c};return l})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),
function(b,g,p,f,l,m,h,c,q){var e=p.mixin,a={},k=a._Line=function(d,a){this.start=d;this.end=a};k.prototype.getValue=function(d){return(this.end-this.start)*d+this.start};var r=a.Animation=function(d){e(this,d);p.isArray(this.curve)&&(this.curve=new k(this.curve[0],this.curve[1]))};r.prototype=new f;p.extend(r,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var d=this._percent,a=this.easing;return a?a(d):d},_fire:function(d,a){a=a||[];if(this[d])if(g.debugAtAllCosts)this[d].apply(this,
a);else try{this[d].apply(this,a)}catch(x){console.error("exception in animation handler for:",d),console.error(x)}return this},play:function(d,a){this._delayTimer&&this._clearTimer();if(a)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);d=d||this.delay;a=p.hitch(this,"_play",a);if(0<d)return this._delayTimer=setTimeout(a,d),this;a();return this},_play:function(d){this._delayTimer&&this._clearTimer();
this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;d=this.curve.getValue(this._getStep());this._percent||(this._startRepeatCount||(this._startRepeatCount=this.repeat),this._fire("onBegin",[d]));this._fire("onPlay",[d]);this._cycle();return this},pause:function(){this._delayTimer&&this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);
return this},gotoPercent:function(d,a){this._stopTimer();this._active=this._paused=!0;this._percent=d;a&&this.play();return this},stop:function(d){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();d&&(this._percent=1);this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},destroy:function(){this.stop()},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var d=
(new Date).valueOf(),d=0===this.duration?1:(d-this._startTime)/this.duration;1<=d&&(d=1);this._percent=d;this.easing&&(d=this.easing(d));this._fire("onAnimate",[this.curve.getValue(d)]);1>this._percent?this._startTimer():(this._active=!1,0<this.repeat?(this.repeat--,this.play(null,!0)):-1==this.repeat?this.play(null,!0):this._startRepeatCount&&(this.repeat=this._startRepeatCount,this._startRepeatCount=0),this._percent=0,this._fire("onEnd",[this.node]),!this.repeat&&this._stopTimer())}return this},
_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var u=0,z=null,v={run:function(){}};p.extend(r,{_startTimer:function(){this._timer||(this._timer=m.after(v,"run",p.hitch(this,"_cycle"),!0),u++);z||(z=setInterval(p.hitch(v,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,u--);0>=u&&(clearInterval(z),z=null,u=0)}});var w=h("ie")?function(d){var a=d.style;a.width.length||"auto"!=q.get(d,"width")||(a.width="auto")}:function(){};
a._fade=function(d){d.node=c.byId(d.node);var n=e({properties:{}},d);d=n.properties.opacity={};d.start="start"in n?n.start:function(){return+q.get(n.node,"opacity")||0};d.end=n.end;d=a.animateProperty(n);m.after(d,"beforeBegin",p.partial(w,n.node),!0);return d};a.fadeIn=function(d){return a._fade(e({end:1},d))};a.fadeOut=function(d){return a._fade(e({end:0},d))};a._defaultEasing=function(d){return.5+Math.sin((d+1.5)*Math.PI)/2};var t=function(d){this._properties=d;for(var a in d){var c=d[a];c.start instanceof
l&&(c.tempColor=new l)}};t.prototype.getValue=function(d){var a={},c;for(c in this._properties){var e=this._properties[c],k=e.start;k instanceof l?a[c]=l.blendColors(k,e.end,d,e.tempColor).toCss():p.isArray(k)||(a[c]=(e.end-k)*d+k+("opacity"!=c?e.units||"px":0))}return a};a.animateProperty=function(d){var a=d.node=c.byId(d.node);d.easing||(d.easing=b._defaultEasing);d=new r(d);m.after(d,"beforeBegin",p.hitch(d,function(){var d={},n;for(n in this.properties){var c=function(d,a){var n={height:d.offsetHeight,
width:d.offsetWidth}[a];if(void 0!==n)return n;n=q.get(d,a);return"opacity"==a?+n:b?n:parseFloat(n)};if("width"==n||"height"==n)this.node.display="block";var k=this.properties[n];p.isFunction(k)&&(k=k(a));k=d[n]=e({},p.isObject(k)?k:{end:k});p.isFunction(k.start)&&(k.start=k.start(a));p.isFunction(k.end)&&(k.end=k.end(a));var b=0<=n.toLowerCase().indexOf("color");"end"in k?"start"in k||(k.start=c(a,n)):k.end=c(a,n);b?(k.start=new l(k.start),k.end=new l(k.end)):k.start="opacity"==n?+k.start:parseFloat(k.start)}this.curve=
new t(d)}),!0);m.after(d,"onAnimate",p.hitch(q,"set",d.node),!0);return d};a.anim=function(d,n,c,e,k,b){return a.animateProperty({node:d,duration:c||r.prototype.duration,properties:n,easing:e,onEnd:k}).play(b||0)};e(b,a);b._Animation=r;return a})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(b,g,p,f){var l=b.Color=function(b){b&&this.setColor(b)};l.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,
0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:f.transparentColor||[0,0,0,0]};g.extend(l,{r:255,g:255,b:255,a:1,_set:function(b,f,c,q){this.r=b;this.g=f;this.b=c;this.a=q},setColor:function(b){g.isString(b)?l.fromString(b,this):g.isArray(b)?l.fromArray(b,this):(this._set(b.r,b.g,b.b,b.a),b instanceof l||this.sanitize());return this},sanitize:function(){return this},
toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+p.map(["r","g","b"],function(b){b=this[b].toString(16);return 2>b.length?"0"+b:b},this).join("")},toCss:function(b){var f=this.r+", "+this.g+", "+this.b;return(b?"rgba("+f+", "+this.a:"rgb("+f)+")"},toString:function(){return this.toCss(!0)}});l.blendColors=b.blendColors=function(b,f,c,q){var e=q||new l;p.forEach(["r","g","b","a"],function(a){e[a]=b[a]+(f[a]-b[a])*c;"a"!=
a&&(e[a]=Math.round(e[a]))});return e.sanitize()};l.fromRgb=b.colorFromRgb=function(b,f){return(b=b.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&l.fromArray(b[1].split(/\s*,\s*/),f)};l.fromHex=b.colorFromHex=function(b,f){var c=f||new l,q=4==b.length?4:8,e=(1<<q)-1;b=Number("0x"+b.substr(1));if(isNaN(b))return null;p.forEach(["b","g","r"],function(a){var k=b&e;b>>=q;c[a]=4==q?17*k:k});c.a=1;return c};l.fromArray=b.colorFromArray=function(b,f){f=f||new l;f._set(Number(b[0]),Number(b[1]),Number(b[2]),
Number(b[3]));isNaN(f.a)&&(f.a=1);return f.sanitize()};l.fromString=b.colorFromString=function(b,f){var c=l.named[b];return c&&l.fromArray(c,f)||l.fromRgb(b,f)||l.fromHex(b,f)};return l})},"esri/core/request/script":function(){define("require exports dojo/Deferred dojo/text!./iframe.html dojo/request/script ../sniff".split(" "),function(b,g,p,f,l,m){function h(){var a=document.createElement("iframe");a.name="esri_core_jsonp_iframe";a.style.display="none";a.setAttribute("sandbox","allow-scripts");
if(!m("ff")&&"srcdoc"in a){var c=m("esri-built")?"dojo/dojo-lite.js":"dojo/dojo.js",d=b.toUrl(c),c=f.replace("../../../dojo/dojo.js",d),d=d.slice(0,d.lastIndexOf("/")),c=c.replace("../../../dojo/",d);a.srcdoc=c}else c=b.toUrl("./iframe.html"),"http:"===window.location.protocol&&0===c.indexOf("https:")&&(c=c.replace("https:","http:")),a.src=c;document.body.appendChild(a);return a}function c(){var a=new MessageChannel;a.port1.addEventListener("message",q);a.port1.start();return a}function q(c){var e=
c.data;if("ready"===e){for(var e=0,d=z;e<d.length;e++)c=d[e],a(c,r);z=null}else if(c=v[e.id])delete v[e.id],e.isError?c.dfd.reject(Error(e.message)):c.dfd.resolve(e.response)}function e(a,c){a.addEventListener("load",function(){a.contentWindow.postMessage("init","*",[c.port2])})}function a(a,c){v[a.message.id]=a;c.port1.postMessage(a.message)}Object.defineProperty(g,"__esModule",{value:!0});var k,r,u=0,z=[],v={};g.get=function(b,t){if(!m("esri-script-sandbox"))return l.get(b,t);var d=null;t&&(d={jsonp:t.jsonp,
preventCache:t.preventCache,query:t.query,timeout:t.timeout});t=new p(function(){if(z){var d=z.indexOf(n);-1<d&&z.splice(d,1)}else n.message.id in v&&delete v[n.message.id]});var n={dfd:t,message:{id:"id"+(++u+Math.random()),url:b,options:d}};k||(k=h(),r=c(),e(k,r));z?z.push(n):a(n,r);return t.promise}})},"dojo/text":function(){define(["./_base/kernel","require","./has","./has!host-browser?./request"],function(b,g,p,f){var l;p("host-browser")?l=function(c,a,k){f(c,{sync:!!a,headers:{"X-Requested-With":null}}).then(k)}:
g.getText?l=g.getText:console.error("dojo/text plugin failed to load because loader does not support getText");var m={},h=function(c){if(c){c=c.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var a=c.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);a&&(c=a[1])}else c="";return c},c={},q={};b.cache=function(c,a,k){var e;"string"==typeof c?/\//.test(c)?(e=c,k=a):e=g.toUrl(c.replace(/\./g,"/")+(a?"/"+a:"")):(e=c+"",k=a);c=void 0!=k&&"string"!=typeof k?k.value:k;k=k&&k.sanitize;if("string"==
typeof c)return m[e]=c,k?h(c):c;if(null===c)return delete m[e],null;e in m||l(e,!0,function(a){m[e]=a});return k?h(m[e]):m[e]};return{dynamic:!0,normalize:function(c,a){c=c.split("!");var e=c[0];return(/^\./.test(e)?a(e):e)+(c[1]?"!"+c[1]:"")},load:function(e,a,k){e=e.split("!");var b=1<e.length,f=e[0],g=a.toUrl(e[0]);e="url:"+g;var v=c,w=function(d){k(b?h(d):d)};f in m?v=m[f]:a.cache&&e in a.cache?v=a.cache[e]:g in m&&(v=m[g]);if(v===c)if(q[g])q[g].push(w);else{var t=q[g]=[w];l(g,!a.async,function(d){m[f]=
m[g]=d;for(var a=0;a<t.length;)t[a++](d);delete q[g]})}else w(v)}}})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){function k(d,a){d.canDelete&&w._remove(d.id,a.options.frameDoc,!0)}function r(d){y&&y.length&&(l.forEach(y,function(d){w._remove(d.id,d.frameDoc);d.frameDoc=null}),y=[]);return d.options.jsonp?!d.data:!0}function u(d){return!!this.scriptLoaded}
function z(d){return(d=d.options.checkString)&&eval("typeof("+d+') !\x3d\x3d "undefined"')}function v(d,a){if(this.canDelete){var c=this.response.options;y.push({id:this.id,frameDoc:c.ioArgs?c.ioArgs.frameDoc:c.frameDoc});c.ioArgs&&(c.ioArgs.frameDoc=null);c.frameDoc=null}a?this.reject(a):this.resolve(d)}function w(a,c,e){var b=p.parseArgs(a,p.deepCopy({},c));a=b.url;c=b.options;var f=p.deferred(b,k,r,c.jsonp?null:c.checkString?z:u,v);m.mixin(f,{id:t+d++,canDelete:!1});c.jsonp&&((new RegExp("[?\x26]"+
c.jsonp+"\x3d")).test(a)||(a+=(~a.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+t+"_callbacks."+f.id),f.canDelete=!0,x[f.id]=function(d){b.data=d;f.handleResponse(b)});p.notify&&p.notify.emit("send",b,f.promise.cancel);if(!c.canAttach||c.canAttach(f)){var q=w._attach(f.id,a,c.frameDoc,function(d){if(!(d instanceof Error)){var a=Error("Error loading "+(d.target?d.target.src:"script"));a.source=d;d=a}f.reject(d);w._remove(f.id,c.frameDoc,!0)});if(!c.jsonp&&!c.checkString)var l=h(q,
"readystatechange",function(d){if("load"===d.type||n.test(q.readyState))l.remove(),f.scriptLoaded=d})}g(f);return e?f:f.promise}var t=b.id.replace(/[\/\.\-]/g,"_"),d=0,n=/complete|loaded/,x=f.global[t+"_callbacks"]={},y=[];w.get=w;w._attach=function(d,c,n,e){n=n||a.doc;var k=n.createElement("script");if(e)h.once(k,"error",e);k.type="text/javascript";try{k.src=c}catch(G){e&&e(k)}k.id=d;k.async=!0;k.charset="utf-8";return n.getElementsByTagName("head")[0].appendChild(k)};w._remove=function(d,a,n){q.destroy(c.byId(d,
a));x[d]&&(n?x[d]=function(){delete x[d]}:delete x[d])};w._callbacksProperty=t+"_callbacks";return w})},"esri/core/sniff":function(){define(["require","exports","dojo/sniff","./global","../views/webgl/context-util"],function(b,g,p,f,l){function m(){var c={available:!1,version:0,majorPerformanceCaveat:!1,supportsHighPrecisionFragment:!1,supportsVertexShaderSamplers:!1,supportsElementIndexUint:!1,supportsStandardDerivatives:!1},a=document.createElement("canvas");if(!a)return c;var k=l.createContext(a,
{failIfMajorPerformanceCaveat:!0},"webgl");!k&&(k=l.createContext(a,{},"webgl"))&&(c.majorPerformanceCaveat=!0);if(!k)return c;a=k.getParameter(k.VERSION);if(!a)return c;if(a=a.match(/^WebGL\s+([\d.]*)/))c.version=parseFloat(a[1]),c.available=.94<=c.version,a=k.getShaderPrecisionFormat(k.FRAGMENT_SHADER,k.HIGH_FLOAT),c.supportsHighPrecisionFragment=a&&0<a.precision,c.supportsVertexShaderSamplers=0<k.getParameter(k.MAX_VERTEX_TEXTURE_IMAGE_UNITS),c.supportsElementIndexUint=null!==k.getExtension("OES_element_index_uint"),
c.supportsStandardDerivatives=null!==k.getExtension("OES_standard_derivatives");return c}function h(){var c={available:!1,version:0},a=document.createElement("canvas");if(!a)return c;a=l.createContext(a,{},"webgl2");if(!a)return c;c.available=!0;a=a.getParameter(a.VERSION);if(!a)return c;if(a=a.match(/^WebGL\s+([\d.]*)/))c.version=parseFloat(a[1]);return c}var c=null,q=null;(function(){var e=navigator.userAgent,a=e.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i),e=e.match(/iPhone/i);
a&&p.add("esri-mobile",a);e&&p.add("esri-iPhone",e);p.add("esri-phonegap",!!f.cordova);p.add("esri-cors",p("esri-phonegap")||"XMLHttpRequest"in f&&"withCredentials"in new XMLHttpRequest);p.add("esri-geolocation",function(){return!!navigator.geolocation});p.add("esri-canvas-svg-support",function(){return!(p("trident")||p("ie"))});p.add("esri-secure-context",function(){if("isSecureContext"in f)return f.isSecureContext;if(f.location&&f.location.origin)return 0===f.location.origin.indexOf("https:")});
p.add("esri-wasm","WebAssembly"in f);p("host-webworker")||(p.add("esri-workers","Worker"in f),p.add("esri-script-sandbox",function(){return"MessageChannel"in f&&"HTMLIFrameElement"in f&&"sandbox"in HTMLIFrameElement.prototype}),p.add("esri-url-encodes-apostrophe",function(){var a=f.document.createElement("a");a.href="?'";return-1<a.href.indexOf("?%27")}),c||(c=m()),p.add("esri-webgl",c.available),p.add("esri-webgl-high-precision-fragment",c.supportsHighPrecisionFragment),p.add("esri-webgl-vertex-shader-samplers",
c.supportsVertexShaderSamplers),p.add("esri-webgl-element-index-uint",c.supportsElementIndexUint),p.add("esri-webgl-standard-derivatives",c.supportsStandardDerivatives),p.add("esri-webgl-major-performance-caveat",c.majorPerformanceCaveat),p.add("esri-featurelayer-webgl-labeling",!0),q||(q=h()),p.add("esri-webgl2",q.available))})();return p})},"esri/core/global":function(){define(["require","exports"],function(b,g){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;
if("undefined"!==typeof self)return self}()})},"esri/views/webgl/context-util":function(){define(["require","exports"],function(b,g){function p(b,c,f){void 0===c&&(c={});var e;switch(f){case "webgl":e=["webgl","experimental-webgl","webkit-3d","moz-webgl"];break;case "webgl2":e=["webgl2"];break;default:e=["webgl","experimental-webgl","webkit-3d","moz-webgl"]}f=null;for(var a=0;a<e.length;a++){var k=e[a];try{f=b.getContext(k,c)}catch(r){}if(f)break}return f}function f(b,c){(b=b.parentNode)&&(b.innerHTML=
'\x3ctable style\x3d"background-color: #8CE; width: 100%; height: 100%;"\x3e\x3ctr\x3e\x3ctd align\x3d"center"\x3e\x3cdiv style\x3d"display: table-cell; vertical-align: middle;"\x3e\x3cdiv style\x3d""\x3e'+c+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}Object.defineProperty(g,"__esModule",{value:!0});g.createContextOrErrorHTML=function(b,c,q){void 0===c&&(c={});if(!window.WebGLRenderingContext)return f(b,l),null;c=p(b,c,q);return c?c:(f(b,m),null)};g.createContext=p;var l='This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e',
m='It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'})},"esri/Map":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./Basemap ./Ground ./core/Accessor ./core/CollectionFlattener ./core/Evented ./core/Logger ./core/accessorSupport/decorators ./support/basemapUtils ./support/groundUtils ./support/LayersMixin".split(" "),function(b,g,
p,f,l,m,h,c,q,e,a,k,r,u){var z=e.getLogger("esri.Map");return function(e){function b(a){a=e.call(this)||this;a.basemap=null;a.ground=new m;a._basemapCache=k.createCache();return a}p(b,e);Object.defineProperty(b.prototype,"allLayers",{get:function(){return new c({root:this,rootCollectionNames:["basemap.baseLayers","ground.layers","layers","basemap.referenceLayers"],getChildrenFunction:function(a){return a.layers}})},enumerable:!0,configurable:!0});b.prototype.castBasemap=function(a){return k.ensureType(a,
this._basemapCache)};b.prototype.castGround=function(a){a=r.ensureType(a);return a?a:(z.error("Map.ground may not be set to null or undefined"),this._get("ground"))};f([a.property({readOnly:!0})],b.prototype,"allLayers",null);f([a.property({type:l})],b.prototype,"basemap",void 0);f([a.cast("basemap")],b.prototype,"castBasemap",null);f([a.property({type:m})],b.prototype,"ground",void 0);f([a.cast("ground")],b.prototype,"castGround",null);return b=f([a.subclass("esri.Map")],b)}(a.declared(h,q,u))})},
"esri/core/tsSupport/declareExtendsHelper":function(){define(["require","exports"],function(b,g){return function(b,f){b.__bases__=f.__bases__}})},"esri/core/tsSupport/decorateHelper":function(){define([],function(){return function(b,g,p,f){var l=arguments.length,m=3>l?g:null===f?f=Object.getOwnPropertyDescriptor(g,p):f,h;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)m=Reflect.decorate(b,g,p,f);else for(var c=b.length-1;0<=c;c--)if(h=b[c])m=(3>l?h(m):3<l?h(g,p,m):h(g,p))||m;return 3<
l&&m&&Object.defineProperty(g,p,m),m}})},"esri/Basemap":function(){define("require exports ./core/tsSupport/assignHelper ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/Collection ./core/collectionUtils ./core/Evented ./core/JSONSupport ./core/lang ./core/Loadable ./core/Logger ./core/promiseUtils ./core/urlUtils ./core/accessorSupport/decorators ./layers/Layer ./portal/Portal ./portal/PortalItem ./support/basemapDefinitions".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,
k,r,u,z,v,w,t,d){var n=0,x=m.ofType(v),y=k.getLogger("esri.Basemap");return function(a){function c(d){var c=a.call(this)||this;c.id=null;c.portalItem=null;c.thumbnailUrl=null;c.title="Basemap";c.id=Date.now().toString(16)+"-basemap-"+n++;c.baseLayers=new x;c.referenceLayers=new x;var e=function(d){d.parent&&d.parent!==c&&"remove"in d.parent&&d.parent.remove(d);d.parent=c;"elevation"===d.type&&y.error("Layer '"+d.title+", id:"+d.id+"' of type '"+d.type+"' is not supported as a basemap layer and will therefore be ignored.")};
c.baseLayers.on("after-add",function(d){return e(d.item)});c.referenceLayers.on("after-add",function(d){return e(d.item)});c.baseLayers.on("after-remove",function(d){d.item.parent=null});c.referenceLayers.on("after-remove",function(d){d.item.parent=null});return c}f(c,a);k=c;c.prototype.initialize=function(){var d=this;this.when().catch(function(a){y.error("#load()","Failed to load basemap (title: '"+d.title+"', id: '"+d.id+"')",a)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};
c.prototype.normalizeCtorArgs=function(d){d&&"resourceInfo"in d&&(this._set("resourceInfo",d.resourceInfo),d=p({},d),delete d.resourceInfo);return d};Object.defineProperty(c.prototype,"baseLayers",{set:function(d){this._set("baseLayers",h.referenceSetter(d,this._get("baseLayers"),x))},enumerable:!0,configurable:!0});c.prototype.writeBaseLayers=function(d,a,c,n){var e=[];d&&(n=p({},n,{layerContainerType:"basemap"}),this.baseLayers.forEach(function(d){if(d.write){var a={};d.write(a,n)&&e.push(a)}}),
this.referenceLayers.forEach(function(d){if(d.write){var a={isReference:!0};d.write(a,n)&&e.push(a)}}));a[c]=e};Object.defineProperty(c.prototype,"referenceLayers",{set:function(d){this._set("referenceLayers",h.referenceSetter(d,this._get("referenceLayers"),x))},enumerable:!0,configurable:!0});c.prototype.writeTitle=function(d,a){a.title=d||"Basemap"};c.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this.when()};c.prototype.clone=function(){var d={id:this.id,title:this.title,
portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};this.loaded&&(d.loadStatus="loaded");return(new k({resourceInfo:this.resourceInfo})).set(d)};c.prototype.read=function(d,a){this.resourceInfo||this._set("resourceInfo",{data:d,context:a});return this.inherited(arguments)};c.prototype.write=function(d,a){d=d||{};a&&a.origin||(a=p({origin:"web-map"},a));this.inherited(arguments,[d,a]);!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&
(d.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(function(d){d=e.clone(d);d.url&&u.isProtocolRelative(d.url)&&(d.url="https:"+d.url);d.templateUrl&&u.isProtocolRelative(d.templateUrl)&&(d.templateUrl="https:"+d.templateUrl);return d}));return d};c.prototype._loadFromSource=function(){var d=this.resourceInfo,a=this.portalItem;return d?this._loadLayersFromJSON(d.data,d.context?d.context.url:null):a?this._loadFromItem(a):r.resolve(null)};c.prototype._loadLayersFromJSON=function(d,a){var c=this,
n=this.resourceInfo&&this.resourceInfo.context,e=this.portalItem&&this.portalItem.portal||n&&n.portal||null,k=n&&"web-scene"===n.origin?"web-scene":"web-map";return r.create(function(d){return b(["./portal/support/layersCreator"],d)}).then(function(n){var b=[];if(d.baseMapLayers&&Array.isArray(d.baseMapLayers)){var f={context:{origin:k,url:a,portal:e,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},t=n.populateOperationalLayers(c.baseLayers,d.baseMapLayers.filter(function(d){return!d.isReference}),
f);b.push.apply(b,t);n=n.populateOperationalLayers(c.referenceLayers,d.baseMapLayers.filter(function(d){return d.isReference}),f);b.push.apply(b,n)}return r.eachAlways(b)}).then(function(){})};c.prototype._loadFromItem=function(d){var a=this;return d.load().then(function(d){return d.fetchData()}).then(function(c){var n=u.urlToObject(d.itemUrl);a._set("resourceInfo",{data:c.baseMap,context:{origin:"web-map",portal:d.portal||w.getDefault(),url:n}});a.read(a.resourceInfo.data,a.resourceInfo.context);
a.read({title:d.title,thumbnailUrl:d.thumbnailUrl},{origin:"portal-item",portal:d.portal||w.getDefault(),url:n});return a._loadLayersFromJSON(a.resourceInfo.data,n)})};c.fromId=function(a){return(a=d[a])?k.fromJSON(a):null};var k;l([z.property({type:x,json:{write:{ignoreOrigin:!0,target:"baseMapLayers"}}}),z.cast(h.castForReferenceSetter)],c.prototype,"baseLayers",null);l([z.writer("baseLayers")],c.prototype,"writeBaseLayers",null);l([z.property({type:String,json:{origins:{"web-scene":{write:!0}}}})],
c.prototype,"id",void 0);l([z.property({type:t})],c.prototype,"portalItem",void 0);l([z.property({type:x}),z.cast(h.castForReferenceSetter)],c.prototype,"referenceLayers",null);l([z.property({readOnly:!0})],c.prototype,"resourceInfo",void 0);l([z.property()],c.prototype,"thumbnailUrl",void 0);l([z.property({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],c.prototype,"title",void 0);l([z.writer("title")],c.prototype,"writeTitle",null);return c=k=l([z.subclass("esri.Basemap")],c)}(z.declared(q,
c,a))})},"esri/core/tsSupport/assignHelper":function(){define([],function(){return Object.assign||function(b){for(var g,p=1,f=arguments.length;p<f;p++){g=arguments[p];for(var l in g)Object.prototype.hasOwnProperty.call(g,l)&&(b[l]=g[l])}return b}})},"esri/core/Collection":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper dojo/aspect ./Accessor ./ArrayPool ./Evented ./lang ./ObjectPool ./scheduling ./accessorSupport/decorators ./accessorSupport/ensureType".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r){function u(d){return d?d.isInstanceOf&&d.isInstanceOf(B):!1}function z(d){return d?u(d)?d.toArray():d.length?Array.prototype.slice.apply(d):[]:[]}function v(d){if(d&&d.length)return d[0]}function w(d,a,c,n){a&&a.forEach(function(a,e,k){d.push(a);w(d,c.call(n,a,e,k),c,n)})}b=function(){function d(){this.target=null;this.defaultPrevented=this.cancellable=!1}d.prototype.preventDefault=function(){this.cancellable&&(this.defaultPrevented=!0)};d.prototype.reset=function(d){this.defaultPrevented=
!1;this.item=d};return d}();var t=function(){},d=new e(b,!0,function(d){d.item=null;d.target=null}),n=new Set,x=new Set,y=new Set,A=new Map,D=0,B=function(c){function e(d){d=c.call(this,d)||this;d._boundDispatch=d._dispatchColChange.bind(d);d._chgListeners=[];d._notifications=null;d._timer=null;d.length=0;d._items=[];Object.defineProperty(d,"uid",{value:D++});return d}p(e,c);b=e;e.ofType=function(d){if(!d)return b;if(A.has(d))return A.get(d);var a;if("function"===typeof d)a=d.prototype.declaredClass;
else if(d.base)a=d.base.prototype.declaredClass;else for(var c in d.typeMap){var n=d.typeMap[c].prototype.declaredClass;a=a?a+(" | "+n):n}a=b.createSubclass({declaredClass:"esri.core.Collection\x3c"+a+"\x3e"});c={Type:d,ensureType:"function"===typeof d?r.ensureType(d):r.ensureOneOfType(d)};Object.defineProperty(a.prototype,"itemType",{value:c});A.set(d,a);return a};e.prototype.normalizeCtorArgs=function(d){return d?Array.isArray(d)||u(d)?{items:d}:d:{}};Object.defineProperty(e.prototype,"items",{get:function(){return this._items},
set:function(d){this._emitBeforeChanges()||(this._splice.apply(this,[0,this.length].concat(z(d))),this._emitAfterChanges())},enumerable:!0,configurable:!0});e.prototype.on=function(d,a){var c;Array.isArray(d)?c=d:-1<d.indexOf(",")&&(c=d.split(/\s*,\s*/));if(c){var n=[];for(d=0;d<c.length;d++)n.push(this.on(c[d],a));n.remove=function(){for(var d=0;d<n.length;d++)n[d].remove()};return n}if("change"===d){var e=this._chgListeners,k={removed:!1,callback:a};e.push(k);this._notifications&&this._notifications.push({listeners:e.slice(),
items:this._items.slice(),changes:[]});return{remove:function(){this.remove=t;k.removed=!0;e.splice(e.indexOf(k),1)}}}return l.after(this,"on"+d,a,!0)};e.prototype.hasEventListener=function(d){return"change"===d?0<this._chgListeners.length:this.inherited(arguments)};e.prototype.add=function(d,a){if(this._emitBeforeChanges())return this;a=this.getNextIndex(a);this._splice(a,0,d);this._emitAfterChanges();return this};e.prototype.addMany=function(d,a){void 0===a&&(a=this._items.length);if(!d||!d.length||
this._emitBeforeChanges())return this;a=this.getNextIndex(a);this._splice.apply(this,[a,0].concat(z(d)));this._emitAfterChanges();return this};e.prototype.removeAll=function(){if(!this.length||this._emitBeforeChanges())return[];var d=this._splice(0,this.length)||[];this._emitAfterChanges();return d};e.prototype.clone=function(){return this._createNewInstance({items:this._items.map(q.clone)})};e.prototype.concat=function(){for(var d=[],a=0;a<arguments.length;a++)d[a]=arguments[a];var c,d=d.map(z);
return this._createNewInstance({items:(c=this._items).concat.apply(c,d)})};e.prototype.drain=function(d,a){if(this.length&&!this._emitBeforeChanges()){for(var c=this._splice(0,this.length),n=c.length,e=0;e<n;e++)d.call(a,c[e],e,c);this._emitAfterChanges()}};e.prototype.every=function(d,a){return this._items.every(d,a)};e.prototype.filter=function(d,a){var c;c=2===arguments.length?this._items.filter(d,a):this._items.filter(d);return this._createNewInstance({items:c})};e.prototype.find=function(d,a){if("function"!==
typeof d)throw new TypeError(d+" is not a function");for(var c=this._items,n=c.length,e=0;e<n;e++){var k=c[e];if(d.call(a,k,e,c))return k}};e.prototype.findIndex=function(d,a){if("function"!==typeof d)throw new TypeError(d+" is not a function");for(var c=this._items,n=c.length,e=0;e<n;e++)if(d.call(a,c[e],e,c))return e;return-1};e.prototype.flatten=function(d,a){var c=[];w(c,this,d,a);return new b(c)};e.prototype.forEach=function(d,a){for(var c=this._items,n=c.length,e=0;e<n;e++)d.call(a,c[e],e,c)};
e.prototype.getItemAt=function(d){return this._items[d]};e.prototype.getNextIndex=function(d){var a=this.length;d=null==d?a:d;0>d?d=0:d>a&&(d=a);return d};e.prototype.includes=function(d,a){void 0===a&&(a=0);return arguments.length?-1!==this._items.indexOf(d,a):!1};e.prototype.indexOf=function(d,a){void 0===a&&(a=0);return this._items.indexOf(d,a)};e.prototype.join=function(d){void 0===d&&(d=",");return this._items.join(d)};e.prototype.lastIndexOf=function(d,a){void 0===a&&(a=this.length-1);return this._items.lastIndexOf(d,
a)};e.prototype.map=function(d,a){d=this._items.map(d,a);return new b({items:d})};e.prototype.reorder=function(d,a){void 0===a&&(a=this.length-1);var c=this.indexOf(d);if(-1!==c){0>a?a=0:a>=this.length&&(a=this.length-1);if(c!==a){if(this._emitBeforeChanges())return d;this._splice(c,1);this._splice(a,0,d);this._emitAfterChanges()}return d}};e.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges()){var d=v(this._splice(this.length-1,1));this._emitAfterChanges();return d}};e.prototype.push=
function(){for(var d=[],a=0;a<arguments.length;a++)d[a]=arguments[a];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[this.length,0].concat(d));this._emitAfterChanges();return this.length};e.prototype.reduce=function(d,a){var c=this._items;return 2===arguments.length?c.reduce(d,a):c.reduce(d)};e.prototype.reduceRight=function(d,a){var c=this._items;return 2===arguments.length?c.reduceRight(d,a):c.reduceRight(d)};e.prototype.remove=function(d){return this.removeAt(this.indexOf(d))};
e.prototype.removeAt=function(d){if(!(0>d||d>=this.length||this._emitBeforeChanges()))return d=v(this._splice(d,1)),this._emitAfterChanges(),d};e.prototype.removeMany=function(d){if(!d||!d.length||this._emitBeforeChanges())return[];d=u(d)?d.toArray():d;for(var a=this._items,c=[],n=d.length,e=0;e<n;e++){var k=a.indexOf(d[e]);if(-1<k){for(var b=e+1,f=k+1,t=Math.min(d.length-b,a.length-f),r=0;r<t&&d[b+r]===a[f+r];)r++;b=1+r;(k=this._splice(k,b))&&0<k.length&&c.push.apply(c,k);e+=b-1}}this._emitAfterChanges();
return c};e.prototype.reverse=function(){if(this._emitBeforeChanges())return this;var d=this._splice(0,this.length);d&&(d.reverse(),this._splice.apply(this,[0,0].concat(d)));this._emitAfterChanges();return this};e.prototype.shift=function(){if(this.length&&!this._emitBeforeChanges()){var d=v(this._splice(0,1));this._emitAfterChanges();return d}};e.prototype.slice=function(d,a){void 0===d&&(d=0);void 0===a&&(a=this.length);return this._createNewInstance({items:this._items.slice(d,a)})};e.prototype.some=
function(d,a){return this._items.some(d,a)};e.prototype.sort=function(d){if(!this.length||this._emitBeforeChanges())return this;var a=this._splice(0,this.length);arguments.length?a.sort(d):a.sort();this._splice.apply(this,[0,0].concat(a));return this};e.prototype.splice=function(d,a){for(var c=[],n=2;n<arguments.length;n++)c[n-2]=arguments[n];if(this._emitBeforeChanges())return[];c=this._splice.apply(this,[d,a].concat(c))||[];this._emitAfterChanges();return c};e.prototype.toArray=function(){return this._items.slice()};
e.prototype.toJSON=function(){return this.toArray()};e.prototype.toLocaleString=function(){return this._items.toLocaleString()};e.prototype.toString=function(){return this._items.toString()};e.prototype.unshift=function(){for(var d=[],a=0;a<arguments.length;a++)d[a]=arguments[a];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[0,0].concat(d));this._emitAfterChanges();return this.length};e.prototype._createNewInstance=function(d){return new this.constructor(d)};e.prototype._splice=
function(c,n){for(var e=[],k=2;k<arguments.length;k++)e[k-2]=arguments[k];var k=this._items,b=this.constructor.prototype.itemType,f,t;!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=a.schedule(this._boundDispatch));if(n){t=k.splice(c,n);if(this.hasEventListener("before-remove")){var r=d.acquire();r.target=this;r.cancellable=!0;for(var q=0,x=t.length;q<
x;q++)f=t[q],r.reset(f),this.emit("before-remove",r),r.defaultPrevented&&(t.splice(q,1),k.splice(c,0,f),c+=1,--q,--x);d.release(r)}this.length=this._items.length;if(this.hasEventListener("after-remove")){f=d.acquire();f.target=this;f.cancellable=!1;x=t.length;for(q=0;q<x;q++)f.reset(t[q]),this.emit("after-remove",f);d.release(f)}}if(e&&e.length){if(b){q=[];for(x=0;x<e.length;x++)f=e[x],r=b.ensureType(f),null==r&&null!=f||q.push(r);e=q}b=this.hasEventListener("before-add");q=this.hasEventListener("after-add");
x=c===this.length;if(b||q){f=d.acquire();f.target=this;f.cancellable=!0;r=d.acquire();r.target=this;r.cancellable=!1;for(var h=0,l=e;h<l.length;h++){var m=l[h];b?(f.reset(m),this.emit("before-add",f),f.defaultPrevented||(x?k.push(m):k.splice(c++,0,m),this._set("length",k.length),q&&(r.reset(m),this.emit("after-add",r)))):(x?k.push(m):k.splice(c++,0,m),this._set("length",k.length),r.reset(m),this.emit("after-add",r))}d.release(f)}else x?k.push.apply(k,e):k.splice.apply(k,[c,0].concat(e)),this._set("length",
k.length)}(e&&e.length||t&&t.length)&&this._notifyChangeEvent(e,t);return t};e.prototype._emitBeforeChanges=function(){var a=!1;if(this.hasEventListener("before-changes")){var c=d.acquire();c.target=this;c.cancellable=!0;this.emit("before-changes",c);a=c.defaultPrevented;d.release(c)}return a};e.prototype._emitAfterChanges=function(){if(this.hasEventListener("after-changes")){var a=d.acquire();a.target=this;a.cancellable=!1;this.emit("after-changes",a);d.release(a)}};e.prototype._notifyChangeEvent=
function(d,a){this.hasEventListener("change")&&this._notifications[this._notifications.length-1].changes.push({added:d,removed:a})};e.prototype._dispatchColChange=function(){this._timer&&(this._timer.remove(),this._timer=null);if(this._notifications){var d=this._notifications;this._notifications=null;for(var a=function(d){var a=d.changes;n.clear();x.clear();y.clear();for(var e=0;e<a.length;e++){var k=a[e],b=k.added,k=k.removed;if(b)if(0===y.size&&0===x.size)for(var f=0,t=b;f<t.length;f++)b=t[f],n.add(b);
else for(f=0,t=b;f<t.length;f++)b=t[f],x.has(b)?(y.add(b),x.delete(b)):y.has(b)||n.add(b);if(k)if(0===y.size&&0===n.size)for(f=0;f<k.length;f++)b=k[f],x.add(b);else for(f=0;f<k.length;f++)b=k[f],n.has(b)?n.delete(b):(y.delete(b),x.add(b))}var r=h.acquire();n.forEach(function(d){r.push(d)});var q=h.acquire();x.forEach(function(d){q.push(d)});var l=c._items,m=d.items,g=h.acquire();y.forEach(function(d){m.indexOf(d)!==l.indexOf(d)&&g.push(d)});if(d.listeners&&(r.length||q.length||g.length))for(a={target:c,
added:r,removed:q,moved:g},e=d.listeners.length,b=0;b<e;b++)k=d.listeners[b],k.removed||k.callback.call(c,a);h.release(r);h.release(q);h.release(g)},c=this,e=0;e<d.length;e++)a(d[e]);n.clear();x.clear();y.clear()}};var b;e.isCollection=u;f([k.property()],e.prototype,"length",void 0);f([k.property()],e.prototype,"items",null);return e=b=f([k.subclass("esri.core.Collection")],e)}(k.declared(m,c));return B})},"esri/core/Accessor":function(){define("./declare ./accessorSupport/Properties ./accessorSupport/get ./accessorSupport/introspection ./accessorSupport/set ./accessorSupport/watch".split(" "),
function(b,g,p,f,l,m){g=g.default;b.before(function(c,q){b.hasMixin(c,h)&&f.processPrototype(q)});b.after(function(c){b.hasMixin(c,h)&&(f.processClass(c),Object.defineProperties(c.prototype,{initialized:{get:function(){return this.__accessor__&&this.__accessor__.initialized||!1}},constructed:{get:function(){return this.__accessor__&&2===this.__accessor__.lifecycle||!1}},destroyed:{get:function(){return this.__accessor__&&this.__accessor__.destroyed||!1}}}))});var h=b(null,{declaredClass:"esri.core.Accessor",
"-chains-":{initialize:"after",destroy:"before"},constructor:function(){if(this.constructor===h)throw Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{value:new g(this)});if(0<arguments.length&&this.normalizeCtorArgs){for(var c=[],b=0;b<arguments.length;b++)c.push(arguments[b]);this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,c)}},__accessor__:null,postscript:function(c){var b=this.__accessor__;
c=b.ctorArgs||c;var e;null!=this.getDefaults&&(e=this.getDefaults(c||{}),this.set(e));b.initialize();c&&(this.set(c),b.ctorArgs=null);b.constructed();this.initialize()},initialize:function(){},destroy:function(){if(this.destroyed)try{throw Error("instance is already destroyed");}catch(c){console.warn(c.stack)}else m.removeTarget(this),this.__accessor__.destroy()},get:function(c){return p.get(this,c)},hasOwnProperty:function(c){return this.__accessor__?this.__accessor__.has(c):Object.prototype.hasOwnProperty.call(this,
c)},keys:function(){return this.__accessor__?this.__accessor__.keys():[]},set:function(c,b){l.set(this,c,b);return this},watch:function(c,b,e){return m.watch(this,c,b,e)},_clearOverride:function(c){return this.__accessor__.clearOverride(c)},_override:function(c,b){return this.__accessor__.override(c,b)},_isOverridden:function(c){return this.__accessor__.isOverridden(c)},notifyChange:function(c){this.__accessor__.propertyInvalidated(c)},_get:function(c){return this.__accessor__.internalGet(c)},_set:function(c,
b){return this.__accessor__.internalSet(c,b)}});return h})},"esri/core/declare":function(){define(["require","exports","dojo/_base/declare"],function(b,g,p){function f(c,b){c&&!Array.isArray(c)&&"function"!==typeof c&&(b=c,c=null);c=c||[];b=b||{};return l([this].concat(c),b)}function l(c,b){c&&!Array.isArray(c)&&"function"!==typeof c&&(b=c,c=null);"function"===typeof c?c=[c]:c||(c=[]);b=b||{};var e,a;e=0;for(a=m.length;e<a;e++)m[e](c,b);c=p(c,b);c.createSubclass=f;e=0;for(a=h.length;e<a;e++)h[e](c);
return c}var m=[],h=[];(function(c){c.hasMixin=function(c,e){c=Array.isArray(c)?c.reduce(function(a,c){return c._meta?a.concat(c._meta.bases):a},[]):c._meta?c._meta.bases:c;if(!c)return!1;if("string"===typeof e)for(var a=c.length-1;0<=a;a--)if(c[a].prototype.declaredClass===e)return!0;return-1!==c.indexOf(e)};c.safeMixin=function(c,e){return p.safeMixin(c,e)};c.before=function(c){m.push(c)};c.after=function(c){h.push(c)}})(l||(l={}));return l})},"dojo/_base/declare":function(){define(["./kernel",
"../has","./lang"],function(b,g,p){function f(d,a){throw Error("declare"+(a?" "+a:"")+": "+d);}function l(d,a){for(var c=[],n=[{cls:0,refs:[]}],e={},k=1,b=d.length,t=0,r,x,q,h,l;t<b;++t){(r=d[t])?"[object Function]"!=y.call(r)&&f("mixin #"+t+" is not a callable constructor.",a):f("mixin #"+t+" is unknown. Did you use dojo.require to pull it in?",a);x=r._meta?r._meta.bases:[r];q=0;for(r=x.length-1;0<=r;--r)h=x[r].prototype,h.hasOwnProperty("declaredClass")||(h.declaredClass="uniqName_"+D++),h=h.declaredClass,
e.hasOwnProperty(h)||(e[h]={count:0,refs:[],cls:x[r]},++k),h=e[h],q&&q!==h&&(h.refs.push(q),++q.count),q=h;++q.count;n[0].refs.push(q)}for(;n.length;){q=n.pop();c.push(q.cls);for(--k;l=q.refs,1==l.length;){q=l[0];if(!q||--q.count){q=0;break}c.push(q.cls);--k}if(q)for(t=0,b=l.length;t<b;++t)q=l[t],--q.count||n.push(q)}k&&f("can't build consistent linearization",a);r=d[0];c[0]=r?r._meta&&r===c[c.length-r._meta.bases.length]?r._meta.bases.length:1:0;return c}function m(d,a,c,n){var e,k,b,t,r,q,h=this._inherited=
this._inherited||{};"string"===typeof d&&(e=d,d=a,a=c,c=n);if("function"===typeof d)b=d,d=a,a=c;else try{b=d.callee}catch(H){if(H instanceof TypeError)f("strict mode inherited() requires the caller function to be passed before arguments",this.declaredClass);else throw H;}(e=e||b.nom)||f("can't deduce a name to call inherited()",this.declaredClass);c=n=0;t=this.constructor._meta;n=t.bases;q=h.p;if("constructor"!=e){if(h.c!==b&&(q=0,r=n[0],t=r._meta,t.hidden[e]!==b)){(k=t.chains)&&"string"==typeof k[e]&&
f("calling chained method with inherited: "+e,this.declaredClass);do if(t=r._meta,k=r.prototype,t&&(k[e]===b&&k.hasOwnProperty(e)||t.hidden[e]===b))break;while(r=n[++q]);q=r?q:-1}if(r=n[++q])if(k=r.prototype,r._meta&&k.hasOwnProperty(e))c=k[e];else{b=x[e];do if(k=r.prototype,(c=k[e])&&(r._meta?k.hasOwnProperty(e):c!==b))break;while(r=n[++q])}c=r&&c||x[e]}else{if(h.c!==b&&(q=0,(t=n[0]._meta)&&t.ctor!==b)){for((k=t.chains)&&"manual"===k.constructor||f("calling chained constructor with inherited",this.declaredClass);(r=
n[++q])&&(!(t=r._meta)||t.ctor!==b););q=r?q:-1}for(;(r=n[++q])&&!(c=(t=r._meta)?t.ctor:r););c=r&&c}h.c=c;h.p=q;if(c)return!0===a?c:c.apply(this,a||d)}function h(d,a,c){return"string"===typeof d?"function"===typeof a?this.__inherited(d,a,c,!0):this.__inherited(d,a,!0):"function"===typeof d?this.__inherited(d,a,!0):this.__inherited(d,!0)}function c(d,a,c,n){var e=this.getInherited(d,a,c);if(e)return e.apply(this,n||c||a||d)}function q(d){for(var a=this.constructor._meta.bases,c=0,n=a.length;c<n;++c)if(a[c]===
d)return!0;return this instanceof d}function e(d,a){for(var c in a)"constructor"!=c&&a.hasOwnProperty(c)&&(d[c]=a[c])}function a(a){d.safeMixin(this.prototype,a);return this}function k(a,c){a instanceof Array||"function"===typeof a||(c=a,a=void 0);c=c||{};a=a||[];return d([this].concat(a),c)}function r(d,a){return function(){var c=arguments,n=c,e=c[0],k,b;b=d.length;var f;if(!(this instanceof c.callee))return t(c);if(a&&(e&&e.preamble||this.preamble))for(f=Array(d.length),f[0]=c,k=0;;){(e=c[0])&&
(e=e.preamble)&&(c=e.apply(this,c)||c);e=d[k].prototype;(e=e.hasOwnProperty("preamble")&&e.preamble)&&(c=e.apply(this,c)||c);if(++k==b)break;f[k]=c}for(k=b-1;0<=k;--k)e=d[k],(e=(b=e._meta)?b.ctor:e)&&e.apply(this,f?f[k]:c);(e=this.postscript)&&e.apply(this,n)}}function u(d,a){return function(){var c=arguments,n=c,e=c[0];if(!(this instanceof c.callee))return t(c);a&&(e&&(e=e.preamble)&&(n=e.apply(this,n)||n),(e=this.preamble)&&e.apply(this,n));d&&d.apply(this,c);(e=this.postscript)&&e.apply(this,c)}}
function z(d){return function(){var a=arguments,c=0,n,e;if(!(this instanceof a.callee))return t(a);for(;n=d[c];++c)if(n=(e=n._meta)?e.ctor:n){n.apply(this,a);break}(n=this.postscript)&&n.apply(this,a)}}function v(d,a,c){return function(){var n,e,k=0,b=1;c&&(k=a.length-1,b=-1);for(;n=a[k];k+=b)e=n._meta,(n=(e?e.hidden:n.prototype)[d])&&n.apply(this,arguments)}}function w(d){A.prototype=d.prototype;d=new A;A.prototype=null;return d}function t(d){var a=d.callee,c=w(a);a.apply(c,d);return c}function d(c,
b,t){"string"!=typeof c&&(t=b,b=c,c="");t=t||{};var A,D,C,F,G,M,W,N=1,H=b;"[object Array]"==y.call(b)?(M=l(b,c),C=M[0],N=M.length-C,b=M[N]):(M=[0],b?"[object Function]"==y.call(b)?(C=b._meta,M=M.concat(C?C.bases:b)):f("base class is not a callable constructor.",c):null!==b&&f("unknown base class. Did you use dojo.require to pull it in?",c));if(b)for(D=N-1;;--D){A=w(b);if(!D)break;C=M[D];(C._meta?e:n)(A,C.prototype);F=g("csp-restrictions")?function(){}:new Function;F.superclass=b;F.prototype=A;b=A.constructor=
F}else A={};d.safeMixin(A,t);C=t.constructor;C!==x.constructor&&(C.nom="constructor",A.constructor=C);for(D=N-1;D;--D)(C=M[D]._meta)&&C.chains&&(W=n(W||{},C.chains));A["-chains-"]&&(W=n(W||{},A["-chains-"]));b&&b.prototype&&b.prototype["-chains-"]&&(W=n(W||{},b.prototype["-chains-"]));C=!W||!W.hasOwnProperty("constructor");M[0]=F=W&&"manual"===W.constructor?z(M):1==M.length?u(t.constructor,C):r(M,C);F._meta={bases:M,hidden:t,chains:W,parents:H,ctor:t.constructor};F.superclass=b&&b.prototype;F.extend=
a;F.createSubclass=k;F.prototype=A;A.constructor=F;A.getInherited=h;A.isInstanceOf=q;A.inherited=B;A.__inherited=m;c&&(A.declaredClass=c,p.setObject(c,F));if(W)for(G in W)A[G]&&"string"==typeof W[G]&&"constructor"!=G&&(C=A[G]=v(G,M,"after"===W[G]),C.nom=G);return F}var n=p.mixin,x=Object.prototype,y=x.toString,A,D=0;A=g("csp-restrictions")?function(){}:new Function;var B=b.config.isDebug?c:m;b.safeMixin=d.safeMixin=function(d,a){var c,n;for(c in a)n=a[c],n===x[c]&&c in x||"constructor"==c||("[object Function]"==
y.call(n)&&(n.nom=c),d[c]=n);return d};return b.declare=d})},"esri/core/accessorSupport/Properties":function(){define("require exports dojo/has ../Logger ./extensions ./PropertyOrigin ./Store".split(" "),function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});f.getLogger("esri.core.accessorSupport.Properties");b=function(){function c(c){this.host=c;this._origin=m.OriginId.USER;this.ctorArgs=this.cursors=null;this.destroyed=!1;this.dirties={};this.lifecycle=0;this.overridden=null;
this.store=new h.default;c=this.host.constructor.__accessorMetadata__;this.metadatas=c.properties;this.autoDestroy=c.autoDestroy}c.prototype.initialize=function(){this.lifecycle=1;l.instanceCreated(this.host,this.metadatas)};c.prototype.constructed=function(){this.lifecycle=2};c.prototype.destroy=function(){this.destroyed=!0;var c=this.cursors;if(this.cursors)for(var e=0,a=Object.getOwnPropertyNames(c);e<a.length;e++){var k=a[e],b=c[k];if(b){for(;0<b.length;)b.pop().propertyDestroyed(this,k);c[k]=
null}}if(this.autoDestroy)for(k in this.metadatas)(c=this.internalGet(k))&&c&&"function"===typeof c.destroy&&(c.destroy(),this.metadatas[k].nonNullable||this.internalSet(k,null))};Object.defineProperty(c.prototype,"initialized",{get:function(){return 0!==this.lifecycle},enumerable:!0,configurable:!0});c.prototype.clearOverride=function(c){this.isOverridden(c)&&(this.overridden[c]=!1,this.propertyInvalidated(c))};c.prototype.get=function(c){var e=this.metadatas[c];if(this.store.has(c)&&!this.dirties[c])return this.store.get(c);
var a=e.get;return a?(e=a.call(this.host),this.store.set(c,e,m.OriginId.COMPUTED),this.propertyCommitted(c),e):e.value};c.prototype.originOf=function(c){var e=this.store.originOf(c);return void 0===e&&(c=this.metadatas[c])&&c.hasOwnProperty("value")?"defaults":m.idToName(e)};c.prototype.has=function(c){return this.metadatas[c]?this.store.has(c):!1};c.prototype.internalGet=function(c){if(this.metadatas[c]){var e=this.store;return e.has(c)?e.get(c):this.metadatas[c].value}};c.prototype.internalSet=
function(c,e){this.metadatas[c]&&(this.propertyInvalidated(c),this.initialized?this.store.set(c,e,this._origin):this.store.set(c,e,m.OriginId.DEFAULTS),this.propertyCommitted(c))};c.prototype.isOverridden=function(c){return null!=this.overridden&&!0===this.overridden[c]};c.prototype.keys=function(){return this.store.keys()};c.prototype.override=function(c,e){if(this.metadatas[c]){this.overridden||(this.overridden={});var a=this.metadatas[c];a.nonNullable&&null==e||((a=a.cast)&&(e=a.call(this.host,
e)),this.overridden[c]=!0,this.internalSet(c,e))}};c.prototype.set=function(c,e){if(this.metadatas[c]){var a=this.metadatas[c];if(!a.nonNullable||null!=e){var k=a.set;(a=a.cast)&&(e=a.call(this.host,e));k?k.call(this.host,e):this.internalSet(c,e)}}};c.prototype.setDefaultOrigin=function(c){this._origin=m.nameToId(c)};c.prototype.propertyInvalidated=function(c){var e=this.dirties,a=this.isOverridden(c),k=this.cursors&&this.cursors[c],b=this.metadatas[c].computes;if(k)for(var f=0;f<k.length;f++)k[f].propertyInvalidated(this,
c);a||(e[c]=!0);if(b)for(c=0;c<b.length;c++)this.propertyInvalidated(b[c])};c.prototype.propertyCommitted=function(c){var e=this.cursors&&this.cursors[c];this.dirties[c]=!1;if(e)for(var a=0;a<e.length;a++)e[a].propertyCommitted(this,c)};c.prototype.addCursor=function(c,e){this.cursors||(this.cursors={});var a=this.cursors[c];a||(this.cursors[c]=a=[]);a.push(e)};c.prototype.removeCursor=function(c,e){var a=this.cursors[c];this.cursors[c]&&(a.splice(a.indexOf(e),1),0===a.length&&(this.cursors[c]=null))};
return c}();g.default=b})},"esri/core/Logger":function(){define(["require","exports","dojo/has"],function(b,g,p){var f={info:0,warn:1,error:2};b=function(){function b(f){void 0===f&&(f={});this.module=f.module||"";this.writer=f.writer||null;this.level=f.level||null;null!=f.enabled&&(this.enabled=!!f.enabled);b._loggers[this.module]=this;f=this.module.lastIndexOf(".");-1!==f&&(this.parent=b.getLogger(this.module.slice(0,f)))}b.prototype.log=function(b){for(var f=[],c=1;c<arguments.length;c++)f[c-1]=
arguments[c];this._isEnabled()&&this._matchLevel(b)&&(c=this._inheritedWriter())&&c.apply(void 0,[b,this.module].concat(f))};b.prototype.error=function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];this.log.apply(this,["error"].concat(b))};b.prototype.warn=function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];this.log.apply(this,["warn"].concat(b))};b.prototype.info=function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];this.log.apply(this,["info"].concat(b))};
b.prototype.getLogger=function(f){return b.getLogger(this.module+"."+f)};b.getLogger=function(f){var h=b._loggers[f];h||(h=new b({module:f}));return h};b.prototype._parentWithMember=function(b,f){for(var c=this;c&&null==c[b];)c=c.parent;return c?c[b]:f};b.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};b.prototype._consoleWriter=function(b,f){for(var c=[],q=2;q<arguments.length;q++)c[q-2]=arguments[q];console[b].apply(console,["["+f+"]"].concat(c))};
b.prototype._matchLevel=function(b){return f[this._parentWithMember("level","error")]<=f[b]};b.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};b._loggers={};return b}();b.getLogger("esri").level="warn";return b})},"esri/core/accessorSupport/extensions":function(){define(["require","exports","./extensions/aliasedProperty","./extensions/computedProperty","./extensions/serializableProperty"],function(b,g,p,f,l){Object.defineProperty(g,"__esModule",{value:!0});var m=[p.default,
f.default,l.default];g.processPrototypeMetadatas=function(b,c){for(var f=Object.getOwnPropertyNames(b),e=0;e<m.length;e++){var a=m[e];if(a.processPrototypePropertyMetadata)for(var k=0,r=f;k<r.length;k++){var h=r[k];a.processPrototypePropertyMetadata(h,b[h],b,c)}}};g.processClassMetadatas=function(b,c){for(var f=Object.getOwnPropertyNames(b),e=0;e<m.length;e++){var a=m[e];if(a.processClassPropertyMetadata)for(var k=0,r=f;k<r.length;k++){var h=r[k];a.processClassPropertyMetadata(h,b[h],b,c)}}};g.instanceCreated=
function(b,c){for(var f=Object.getOwnPropertyNames(c),e=0;e<m.length;e++){var a=m[e];a.instanceCreated&&a.instanceCreated(b,c,f)}}})},"esri/core/accessorSupport/extensions/aliasedProperty":function(){define("require exports dojo/has ../get ../set ../utils ../wire".split(" "),function(b,g,p,f,l,m,h){function c(c,e,a){var b=m.getProperties(c);return h.wire(c,a.aliasOf,function(){b.propertyInvalidated(e)})}Object.defineProperty(g,"__esModule",{value:!0});g.AliasedPropertyExtension={processClassPropertyMetadata:function(c,
e,a,b){var k=e.aliasOf;if(k&&(c=k.split(".")[0],null!=a[c]&&!e.set&&!e.get)){var q;e.get=function(){var a=f.default(this,k);if("function"===typeof a){q||(q=k.split(".").slice(0,-1).join("."));var c=f.default(this,q);c&&(a=a.bind(c))}return a};e.readOnly||(e.set=function(a){return l.default(this,k,a)})}},instanceCreated:function(b,e,a){for(var k=0;k<a.length;k++){var f=a[k],q=e[f];q.aliasOf&&c(b,f,q)}}};g.default=g.AliasedPropertyExtension})},"esri/core/accessorSupport/get":function(){define(["require",
"exports","./utils"],function(b,g,p){function f(c,b,e){if(null!=e.getItemAt||Array.isArray(e)){var a=parseInt(c,10);if(!isNaN(a))return Array.isArray(e)?e[a]:e.getItemAt(a)}a=p.getProperties(e);return b?p.isPropertyDeclared(a,c)?a.get(c):e[c]:p.isPropertyDeclared(a,c)?a.internalGet(c):e[c]}function l(c,b,e,a){if(null==c)return c;if((c=f(b[a],e,c))||!(a<b.length-1))return a===b.length-1?c:l(c,b,e,a+1)}function m(c,b,e,a){void 0===e&&(e=!1);void 0===a&&(a=0);return"string"===typeof b&&-1===b.indexOf(".")?
f(b,e,c):l(c,p.pathToArray(b),e,a)}function h(c,b){return m(c,b,!0)}Object.defineProperty(g,"__esModule",{value:!0});g.valueOf=m;g.get=h;g.exists=function(c,b){return void 0!==m(b,c,!0)};g.default=h})},"esri/core/accessorSupport/utils":function(){define(["require","exports","../lang"],function(b,g,p){function f(c,b){return b?Object.keys(b).reduce(function(c,a){if("value"===a)return c[a]=b[a],c;if(void 0===c[a])return c[a]=p.clone(b[a]),c;var e=c[a],r=b[a];if(e===r)return c;if(Array.isArray(r)||Array.isArray(c))e=
e?Array.isArray(e)?c[a]=e.concat():c[a]=[e]:c[a]=[],r&&(Array.isArray(r)||(r=[r]),r.forEach(function(a){-1===e.indexOf(a)&&e.push(a)}));else if(r&&"object"===typeof r)c[a]=f(e,r);else if(!c.hasOwnProperty(a)||b.hasOwnProperty(a))c[a]=r;return c},c||{}):c}function l(c){return Array.isArray(c)?c:c.split(".")}function m(c){if(Array.isArray(c)||-1<c.indexOf(",")){c=Array.isArray(c)?c:c.split(",");for(var b=0;b<c.length;b++)c[b]=c[b].trim();return 1===c.length?c[0]:c}return c.trim()}function h(c){var b=
!1;return function(){b||(b=!0,c())}}Object.defineProperty(g,"__esModule",{value:!0});g.getProperties=function(c){return c?c.__accessor__?c.__accessor__:c.propertyInvalidated?c:null:null};g.isPropertyDeclared=function(c,b){return c&&c.metadatas&&null!=c.metadatas[b]};g.merge=f;g.pathToStringOrArray=function(c){return c?"string"===typeof c&&-1===c.indexOf(".")?c:l(c):c};g.pathToArray=l;g.splitPath=m;g.parse=function(c,b,e,a){b=m(b);if(Array.isArray(b)){var k=b.map(function(b){return a(c,b.trim(),e)});
return{remove:h(function(){return k.forEach(function(a){return a.remove()})})}}return a(c,b.trim(),e)};g.once=h})},"esri/core/lang":function(){define(["./global","dojo/date","dojo/number","dojo/date/locale","dojo/i18n!../nls/common"],function(b,g,p,f,l){function m(a,c,e){var b,k,f={};for(b in c){k=c[b];var d=!(b in f)||f[b]!==k;if(!(b in a)||a[b]!==k&&d)a[b]=e?e(k):k}return a}function h(a,c,h){var r=h.match(/([^\(]+)(\([^\)]+\))?/i),q=r[1].trim();h=c[a];var r=JSON.parse((r[2]?r[2].trim():"{}").replace(/^\(/,
"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z\_]+)\s*:/gi,'$1"$2":').replace(/\"\s*:\s*\'/gi,'":"').replace(/\'\s*(,|\})/gi,'"$1')),t=r.utcOffset;if(-1===e.indexOf(q))q=b[q],"function"===typeof q&&(h=q(h,a,c,r));else if("number"===typeof h||"string"===typeof h&&h&&!isNaN(Number(h)))switch(h=Number(h),q){case "NumberFormat":a=k.mixin({},r);c=parseFloat(a.places);if(isNaN(c)||0>c)a.places=Infinity;return p.format(h,a);case "DateString":h=new Date(h);if(r.local||r.systemLocale)return r.systemLocale?
h.toLocaleDateString()+(r.hideTime?"":" "+h.toLocaleTimeString()):h.toDateString()+(r.hideTime?"":" "+h.toTimeString());h=h.toUTCString();r.hideTime&&(h=h.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return h;case "DateFormat":return h=new Date(h),null!=t&&(h=g.add(h,"minute",h.getTimezoneOffset()-t)),f.format(h,r)}return null!=h?h:""}function c(a,e){var b;if(e)for(b in a)a.hasOwnProperty(b)&&(void 0===a[b]?delete a[b]:a[b]instanceof Object&&c(a[b],!0));else for(b in a)a.hasOwnProperty(b)&&void 0===
a[b]&&delete a[b];return a}function q(a){return a&&"object"==typeof a&&"function"!==typeof a?a instanceof Int8Array||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Int32Array||a instanceof Uint16Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array||a instanceof Date?new a.constructor(a):a instanceof ArrayBuffer?a.slice(0,a.byteLength):"function"===typeof a.clone?a.clone():"function"===typeof a.map&&"function"===typeof a.forEach?
a.map(q):"function"===typeof a.notifyChange&&"function"===typeof a.watch?a.clone():m({},a,q):a}var e=["NumberFormat","DateString","DateFormat"],a=/<\/?[^>]+>/g,k={equals:function(a,c){return a===c||"number"===typeof a&&isNaN(a)&&"number"===typeof c&&isNaN(c)||"function"===typeof(a||{}).getTime&&"function"===typeof(c||{}).getTime&&a.getTime()==c.getTime()||"function"===typeof(a||{}).equals&&a.equals(c)||"function"===typeof(c||{}).equals&&c.equals(a)||!1},mixin:function(a){a||(a={});for(var c=1,e=arguments.length;c<
e;c++)m(a,arguments[c]);return a},valueOf:function(a,c){for(var e in a)if(a[e]==c)return e;return null},stripTags:function(c){if(c){var e=typeof c;if("string"===e)c=c.replace(a,"");else if("object"===e)for(var b in c)(e=c[b])&&"string"===typeof e&&(e=e.replace(a,"")),c[b]=e}return c},substitute:function(a,c,e){var b,k,f;null!=e&&("object"===typeof e?(b=e.first,k=e.dateFormat,f=e.numberFormat):b=e);if(c&&"{*}"!==c)return c.replace(/\{([^\}]+)\}/g,function(d,a){d=a.split(":");if(1<d.length)return a=
d[0],d.shift(),h(a,this.obj,d.join(":"));if(k&&-1!==(k.properties||[]).indexOf(a))return h(a,this.obj,k.formatter||"DateString");if(f&&-1!==(f.properties||[]).indexOf(a))return h(a,this.obj,f.formatter||"NumberFormat");a=this.obj[a];return null!=a?a:""}.bind({obj:a}));c=[];var d;c.push('\x3ctable class\x3d"esri-widget__table" summary\x3d"'+l.fieldsSummary+'"\x3e\x3ctbody\x3e');for(d in a)if(e=a[d],k&&-1!==(k.properties||[]).indexOf(d)?e=h(d,a,k.formatter||"DateString"):f&&-1!==(f.properties||[]).indexOf(d)&&
(e=h(d,a,f.formatter||"NumberFormat")),c.push("\x3ctr\x3e\x3cth\x3e"+d+"\x3c/th\x3e\x3ctd\x3e"+(null!=e?e:"")+"\x3c/td\x3e\x3c/tr\x3e"),b)break;c.push("\x3c/tbody\x3e\x3c/table\x3e");return c.join("")},filter:function(a,c,e){c=["string"===typeof a?a.split(""):a,e||b,"string"===typeof c?new Function("item","index","array",c):c];e={};var k;a=c[0];for(k in a)c[2].call(c[k],a[k],k,a)&&(e[k]=a[k]);return e},startsWith:function(a,c,e){e=e||0;return a.indexOf(c,e)===e},endsWith:function(a,c,e){if("number"!==
typeof e||!isFinite(e)||Math.floor(e)!==e||e>a.length)e=a.length;e-=c.length;a=a.indexOf(c,e);return-1!==a&&a===e},isDefined:function(a){return void 0!==a&&null!==a},fixJson:c,clone:q};return k})},"dojo/date":function(){define(["./has","./_base/lang"],function(b,g){var p={getDaysInMonth:function(b){var f=b.getMonth();return 1==f&&p.isLeapYear(b)?29:[31,28,31,30,31,30,31,31,30,31,30,31][f]},isLeapYear:function(b){b=b.getFullYear();return!(b%400)||!(b%4)&&!!(b%100)},getTimezoneName:function(b){var f=
b.toString(),m="",h=f.indexOf("(");if(-1<h)m=f.substring(++h,f.indexOf(")"));else if(h=/([A-Z\/]+) \d{4}$/,f=f.match(h))m=f[1];else if(f=b.toLocaleString(),h=/ ([A-Z\/]+)$/,f=f.match(h))m=f[1];return"AM"==m||"PM"==m?"":m},compare:function(b,l,m){b=new Date(+b);l=new Date(+(l||new Date));"date"==m?(b.setHours(0,0,0,0),l.setHours(0,0,0,0)):"time"==m&&(b.setFullYear(0,0,0),l.setFullYear(0,0,0));return b>l?1:b<l?-1:0},add:function(b,l,m){var f=new Date(+b),c=!1,q="Date";switch(l){case "day":break;case "weekday":var e;
(l=m%5)?e=parseInt(m/5):(l=0<m?5:-5,e=0<m?(m-5)/5:(m+5)/5);var a=b.getDay(),k=0;6==a&&0<m?k=1:0==a&&0>m&&(k=-1);a+=l;if(0==a||6==a)k=0<m?2:-2;m=7*e+l+k;break;case "year":q="FullYear";c=!0;break;case "week":m*=7;break;case "quarter":m*=3;case "month":c=!0;q="Month";break;default:q="UTC"+l.charAt(0).toUpperCase()+l.substring(1)+"s"}if(q)f["set"+q](f["get"+q]()+m);c&&f.getDate()<b.getDate()&&f.setDate(0);return f},difference:function(b,l,m){l=l||new Date;m=m||"day";var f=l.getFullYear()-b.getFullYear(),
c=1;switch(m){case "quarter":b=b.getMonth();l=l.getMonth();c=Math.floor(l/3)+1+4*f-(Math.floor(b/3)+1);break;case "weekday":f=Math.round(p.difference(b,l,"day"));m=parseInt(p.difference(b,l,"week"));if(0==f%7)f=5*m;else{var c=0,q=b.getDay(),e=l.getDay();m=parseInt(f/7);l=f%7;b=new Date(b);b.setDate(b.getDate()+7*m);b=b.getDay();if(0<f)switch(!0){case 6==q:c=-1;break;case 0==q:c=0;break;case 6==e:c=-1;break;case 0==e:c=-2;break;case 5<b+l:c=-2}else if(0>f)switch(!0){case 6==q:c=0;break;case 0==q:c=
1;break;case 6==e:c=2;break;case 0==e:c=1;break;case 0>b+l:c=2}f=f+c-2*m}c=f;break;case "year":c=f;break;case "month":c=l.getMonth()-b.getMonth()+12*f;break;case "week":c=parseInt(p.difference(b,l,"day")/7);break;case "day":c/=24;case "hour":c/=60;case "minute":c/=60;case "second":c/=1E3;case "millisecond":c*=l.getTime()-b.getTime()}return Math.round(c)}};g.mixin(g.getObject("dojo.date",!0),p);return p})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string",
"./regexp"],function(b,g,p,f,l){var m={};b.setObject("dojo.number",m);m.format=function(c,f){f=b.mixin({},f||{});var e=g.normalizeLocale(f.locale),e=g.getLocalization("dojo.cldr","number",e);f.customs=e;e=f.pattern||e[(f.type||"decimal")+"Format"];return isNaN(c)||Infinity==Math.abs(c)?null:m._applyPattern(c,e,f)};m._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;m._applyPattern=function(c,b,e){e=e||{};var a=e.customs.group,k=e.customs.decimal;b=b.split(";");var f=b[0];b=b[0>c?1:0]||"-"+f;if(-1!=b.indexOf("%"))c*=
100;else if(-1!=b.indexOf("\u2030"))c*=1E3;else if(-1!=b.indexOf("\u00a4"))a=e.customs.currencyGroup||a,k=e.customs.currencyDecimal||k,b=b.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(a,c,b,k){return(a=e[["symbol","currency","displayName"][b.length-1]]||e.currency||"")?c+a+k:""});else if(-1!=b.indexOf("E"))throw Error("exponential notation not supported");var h=m._numberPatternRE,f=f.match(h);if(!f)throw Error("unable to find a number expression in pattern: "+b);!1===e.fractional&&(e.places=
0);return b.replace(h,m._formatAbsolute(c,f[0],{decimal:k,group:a,places:e.places,round:e.round}))};m.round=function(c,b,e){e=10/(e||10);return(e*+c).toFixed(b)/e};if(0==(.9).toFixed()){var h=m.round;m.round=function(c,b,e){var a=Math.pow(10,-b||0),k=Math.abs(c);if(!c||k>=a)a=0;else if(k/=a,.5>k||.95<=k)a=0;return h(c,b,e)+(0<c?a:-a)}}m._formatAbsolute=function(c,b,e){e=e||{};!0===e.places&&(e.places=0);Infinity===e.places&&(e.places=6);b=b.split(".");var a="string"==typeof e.places&&e.places.indexOf(","),
k=e.places;a?k=e.places.substring(a+1):0<=k||(k=(b[1]||[]).length);0>e.round||(c=m.round(c,k,e.round));c=String(Math.abs(c)).split(".");var r=c[1]||"";b[1]||e.places?(a&&(e.places=e.places.substring(0,a)),a=void 0!==e.places?e.places:b[1]&&b[1].lastIndexOf("0")+1,a>r.length&&(c[1]=f.pad(r,a,"0",!0)),k<r.length&&(c[1]=r.substr(0,k))):c[1]&&c.pop();k=b[0].replace(",","");a=k.indexOf("0");-1!=a&&(a=k.length-a,a>c[0].length&&(c[0]=f.pad(c[0],a)),-1==k.indexOf("#")&&(c[0]=c[0].substr(c[0].length-a)));
var k=b[0].lastIndexOf(","),h,q;-1!=k&&(h=b[0].length-k-1,b=b[0].substr(0,k),k=b.lastIndexOf(","),-1!=k&&(q=b.length-k-1));b=[];for(k=c[0];k;)a=k.length-h,b.push(0<a?k.substr(a):k),k=0<a?k.slice(0,a):"",q&&(h=q,q=void 0);c[0]=b.reverse().join(e.group||",");return c.join(e.decimal||".")};m.regexp=function(c){return m._parseInfo(c).regexp};m._parseInfo=function(c){c=c||{};var b=g.normalizeLocale(c.locale),b=g.getLocalization("dojo.cldr","number",b),e=c.pattern||b[(c.type||"decimal")+"Format"],a=b.group,
k=b.decimal,f=1;if(-1!=e.indexOf("%"))f/=100;else if(-1!=e.indexOf("\u2030"))f/=1E3;else{var h=-1!=e.indexOf("\u00a4");h&&(a=b.currencyGroup||a,k=b.currencyDecimal||k)}b=e.split(";");1==b.length&&b.push("-"+b[0]);b=l.buildGroupRE(b,function(e){e="(?:"+l.escapeString(e,".")+")";return e.replace(m._numberPatternRE,function(e){var b={signed:!1,separator:c.strict?a:[a,""],fractional:c.fractional,decimal:k,exponent:!1};e=e.split(".");var t=c.places;1==e.length&&1!=f&&(e[1]="###");1==e.length||0===t?b.fractional=
!1:(void 0===t&&(t=c.pattern?e[1].lastIndexOf("0")+1:Infinity),t&&void 0==c.fractional&&(b.fractional=!0),!c.places&&t<e[1].length&&(t+=","+e[1].length),b.places=t);e=e[0].split(",");1<e.length&&(b.groupSize=e.pop().length,1<e.length&&(b.groupSize2=e.pop().length));return"("+m._realNumberRegexp(b)+")"})},!0);h&&(b=b.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(a,e,b,k){a=l.escapeString(c[["symbol","currency","displayName"][b.length-1]]||c.currency||"");if(!a)return"";e=e?"[\\s\\xa0]":"";
k=k?"[\\s\\xa0]":"";return c.strict?e+a+k:(e&&(e+="*"),k&&(k+="*"),"(?:"+e+a+k+")?")}));return{regexp:b.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:a,decimal:k,factor:f}};m.parse=function(c,b){b=m._parseInfo(b);c=(new RegExp("^"+b.regexp+"$")).exec(c);if(!c)return NaN;var e=c[1];if(!c[1]){if(!c[2])return NaN;e=c[2];b.factor*=-1}e=e.replace(new RegExp("["+b.group+"\\s\\xa0]","g"),"").replace(b.decimal,".");return e*b.factor};m._realNumberRegexp=function(c){c=c||{};"places"in c||(c.places=Infinity);"string"!=
typeof c.decimal&&(c.decimal=".");"fractional"in c&&!/^0/.test(c.places)||(c.fractional=[!0,!1]);"exponent"in c||(c.exponent=[!0,!1]);"eSigned"in c||(c.eSigned=[!0,!1]);var b=m._integerRegexp(c),e=l.buildGroupRE(c.fractional,function(a){var e="";a&&0!==c.places&&(e="\\"+c.decimal,e=Infinity==c.places?"(?:"+e+"\\d+)?":e+("\\d{"+c.places+"}"));return e},!0),a=l.buildGroupRE(c.exponent,function(a){return a?"([eE]"+m._integerRegexp({signed:c.eSigned})+")":""}),b=b+e;e&&(b="(?:(?:"+b+")|(?:"+e+"))");return b+
a};m._integerRegexp=function(c){c=c||{};"signed"in c||(c.signed=[!0,!1]);"separator"in c?"groupSize"in c||(c.groupSize=3):c.separator="";var b=l.buildGroupRE(c.signed,function(a){return a?"[-+]":""},!0),e=l.buildGroupRE(c.separator,function(a){if(!a)return"(?:\\d+)";a=l.escapeString(a);" "==a?a="\\s":"\u00a0"==a&&(a="\\s\\xa0");var e=c.groupSize,b=c.groupSize2;return b?(a="(?:0|[1-9]\\d{0,"+(b-1)+"}(?:["+a+"]\\d{"+b+"})*["+a+"]\\d{"+e+"})",0<e-b?"(?:"+a+"|(?:0|[1-9]\\d{0,"+(e-1)+"}))":a):"(?:0|[1-9]\\d{0,"+
(e-1)+"}(?:["+a+"]\\d{"+e+"})*)"},!0);return b+e};return m})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./has!host-browser?./_base/xhr ./json module".split(" "),function(b,g,p,f,l,m,h,c,q){p.add("dojo-preload-i18n-Api",1);h=b.i18n={};var e=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,a=function(d,a,c,n){var e=[c+n];a=a.split("-");for(var b="",k=0;k<a.length;k++)if(b+=(b?"-":"")+a[k],!d||d[b])e.push(c+b+"/"+n),e.specificity=b;return e},k={},
r=function(d,a,c){c=c?c.toLowerCase():b.locale;d=d.replace(/\./g,"/");a=a.replace(/\./g,"/");return/root/i.test(c)?d+"/nls/"+a:d+"/nls/"+c+"/"+a},u=b.getL10nName=function(d,a,c){return d=q.id+"!"+r(d,a,c)},z=function(d,c,n,e,b,f){d([c],function(t){var r=m.clone(t.root||t.ROOT),x=a(!t._v1x&&t,b,n,e);d(x,function(){for(var d=1;d<x.length;d++)r=m.mixin(m.clone(r),arguments[d]);k[c+"/"+b]=r;r.$locale=x.specificity;f()})})},v=function(d){var a=l.extraLocale||[],a=m.isArray(a)?a:[a];a.push(d);return a},
w=function(a,t,r){var h=e.exec(a),q=h[1]+"/",l=h[5]||h[4],g=q+l,u=(h=h[5]&&h[4])||b.locale||"",A=g+"/"+u,h=h?[u]:v(u),w=h.length,B=function(){--w||r(m.delegate(k[A]))},u=a.split("*"),D="preload"==u[1];if(p("dojo-preload-i18n-Api")){if(D&&(k[a]||(k[a]=1,x(u[2],c.parse(u[3]),1,t)),r(1)),(u=D)||(d&&n.push([a,t,r]),u=d&&!k[A]),u)return}else if(D){r(1);return}f.forEach(h,function(d){var a=g+"/"+d;p("dojo-preload-i18n-Api")&&y(a);k[a]?B():z(t,g,q,l,d,B)})};p("dojo-preload-i18n-Api");var t=h.normalizeLocale=
function(d){d=d?d.toLowerCase():b.locale;return"root"==d?"ROOT":d},d=0,n=[],x=h._preloadLocalizations=function(a,c,e,r){function x(d,a){r([d],a)}function h(d,a){for(d=d.split("-");d.length;){if(a(d.join("-")))return;d.pop()}a("ROOT")}function q(){for(--d;!d&&n.length;)w.apply(null,n.shift())}function l(n){n=t(n);h(n,function(e){if(0<=f.indexOf(c,e)){var b=a.replace(/\./g,"/")+"_"+e;d++;x(b,function(a){for(var c in a){var b=a[c],f=c.match(/(.+)\/([^\/]+)$/),t;if(f&&(t=f[2],f=f[1]+"/",b._localized)){var x;
if("ROOT"===e){var l=x=b._localized;delete b._localized;l.root=b;k[g.toAbsMid(c)]=l}else x=b._localized,k[g.toAbsMid(f+t+"/"+e)]=b;e!==n&&function(a,c,e,b){var f=[],t=[];h(n,function(d){b[d]&&(f.push(g.toAbsMid(a+d+"/"+c)),t.push(g.toAbsMid(a+c+"/"+d)))});f.length?(d++,r(f,function(){for(var d=f.length-1;0<=d;d--)e=m.mixin(m.clone(e),arguments[d]),k[t[d]]=e;k[g.toAbsMid(a+c+"/"+n)]=m.clone(e);q()})):k[g.toAbsMid(a+c+"/"+n)]=e}(f,t,b,x)}}q()});return!0}return!1})}r=r||g;l();f.forEach(b.config.extraLocale,
l)},y=function(){},y=function(d){for(var a,c=d.split("/"),n=b.global[c[0]],e=1;n&&e<c.length-1;n=n[c[e++]]);n&&((a=n[c[e]])||(a=n[c[e].replace(/-/g,"_")]),a&&(k[d]=a));return a};h.getLocalization=function(d,a,c){var n;d=r(d,a,c);w(d,g,function(d){n=d});return n};return m.mixin(h,{dynamic:!0,normalize:function(d,a){return/^\./.test(d)?a(d):d},load:w,cache:k,getL10nName:u})})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(b,g){var p=/[&<>'"\/]/g,f={"\x26":"\x26amp;","\x3c":"\x26lt;",
"\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},l={};g.setObject("dojo.string",l);l.escape=function(b){return b?b.replace(p,function(b){return f[b]}):""};l.rep=function(b,f){if(0>=f||!b)return"";for(var c=[];;){f&1&&c.push(b);if(!(f>>=1))break;b+=b}return c.join("")};l.pad=function(b,f,c,q){c||(c="0");b=String(b);f=l.rep(c,Math.ceil((f-b.length)/c.length));return q?b+f:f+b};l.substitute=function(f,h,c,q){q=q||b.global;c=c?g.hitch(q,c):function(c){return c};return f.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,
function(e,a,b){if(""==a)return"$";e=g.getObject(a,!1,h);b&&(e=g.getObject(b,!1,q).call(q,e,a));b=c(e,a);if("undefined"===typeof b)throw Error('string.substitute could not find key "'+a+'" in template');return b.toString()})};l.trim=String.prototype.trim?g.trim:function(b){b=b.replace(/^\s+/,"");for(var f=b.length-1;0<=f;f--)if(/\S/.test(b.charAt(f))){b=b.substring(0,f+1);break}return b};return l})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(b,g){var p={};g.setObject("dojo.regexp",
p);p.escapeString=function(b,l){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(b){return l&&-1!=l.indexOf(b)?b:"\\"+b})};p.buildGroupRE=function(b,l,m){if(!(b instanceof Array))return l(b);for(var f=[],c=0;c<b.length;c++)f.push(l(b[c]));return p.group(f.join("|"),m)};p.group=function(b,l){return"("+(l?"?:":"")+b+")"};return p})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),
function(b,g,p,f,l,m,h,c,q){function e(a,c,d,n){return n.replace(/([a-z])\1*/ig,function(e){var b,k,t=e.charAt(0);e=e.length;var x=["abbr","wide","narrow"];switch(t){case "G":b=c[4>e?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":b=a.getFullYear();switch(e){case 1:break;case 2:if(!d.fullYear){b=String(b);b=b.substr(b.length-2);break}default:k=!0}break;case "Q":case "q":b=Math.ceil((a.getMonth()+1)/3);k=!0;break;case "M":case "L":b=a.getMonth();3>e?(b+=1,k=!0):(t=["months","L"==t?"standAlone":
"format",x[e-3]].join("-"),b=c[t][b]);break;case "w":b=r._getWeekOfYear(a,0);k=!0;break;case "d":b=a.getDate();k=!0;break;case "D":b=r._getDayOfYear(a);k=!0;break;case "e":case "c":if(b=a.getDay(),2>e){b=(b-f.getFirstDayOfWeek(d.locale)+8)%7;break}case "E":b=a.getDay();3>e?(b+=1,k=!0):(t=["days","c"==t?"standAlone":"format",x[e-3]].join("-"),b=c[t][b]);break;case "a":t=12>a.getHours()?"am":"pm";b=d[t]||c["dayPeriods-format-wide-"+t];break;case "h":case "H":case "K":case "k":k=a.getHours();switch(t){case "h":b=
k%12||12;break;case "H":b=k;break;case "K":b=k%12;break;case "k":b=k||24}k=!0;break;case "m":b=a.getMinutes();k=!0;break;case "s":b=a.getSeconds();k=!0;break;case "S":b=Math.round(a.getMilliseconds()*Math.pow(10,e-3));k=!0;break;case "v":case "z":if(b=r._getZone(a,!0,d))break;e=4;case "Z":t=r._getZone(a,!1,d);t=[0>=t?"+":"-",h.pad(Math.floor(Math.abs(t)/60),2),h.pad(Math.abs(t)%60,2)];4==e&&(t.splice(0,0,"GMT"),t.splice(3,0,":"));b=t.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+
n);}k&&(b=h.pad(b,e));return b})}function a(a,c,d,n){var e=function(d){return d};c=c||e;d=d||e;n=n||e;var b=a.match(/(''|[^'])+/g),k="'"==a.charAt(0);g.forEach(b,function(a,n){a?(b[n]=(k?d:c)(a.replace(/''/g,"'")),k=!k):b[n]=""});return n(b.join(""))}function k(a,c,d,n){n=m.escapeString(n);d.strict||(n=n.replace(" a"," ?a"));return n.replace(/([a-z])\1*/ig,function(n){var e;e=n.charAt(0);var b=n.length,k="",f="";d.strict?(1<b&&(k="0{"+(b-1)+"}"),2<b&&(f="0{"+(b-2)+"}")):(k="0?",f="0{0,2}");switch(e){case "y":e=
"\\d{2,4}";break;case "M":case "L":2<b?(e=c["months-"+("L"==e?"standAlone":"format")+"-"+u[b-3]].slice(0).join("|"),d.strict||(e=e.replace(/\./g,""),e="(?:"+e+")\\.?")):e="1[0-2]|"+k+"[1-9]";break;case "D":e="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+k+"[1-9][0-9]|"+f+"[1-9]";break;case "d":e="3[01]|[12]\\d|"+k+"[1-9]";break;case "w":e="[1-4][0-9]|5[0-3]|"+k+"[1-9]";break;case "E":case "e":case "c":e=".+?";break;case "h":e="1[0-2]|"+k+"[1-9]";break;case "k":e="1[01]|"+k+"\\d";break;case "H":e="1\\d|2[0-3]|"+
k+"\\d";break;case "K":e="1\\d|2[0-4]|"+k+"[1-9]";break;case "m":case "s":e="[0-5]\\d";break;case "S":e="\\d{"+b+"}";break;case "a":b=d.am||c["dayPeriods-format-wide-am"];k=d.pm||c["dayPeriods-format-wide-pm"];e=b+"|"+k;d.strict||(b!=b.toLowerCase()&&(e+="|"+b.toLowerCase()),k!=k.toLowerCase()&&(e+="|"+k.toLowerCase()),-1!=e.indexOf(".")&&(e+="|"+e.replace(/\./g,"")));e=e.replace(/\./g,"\\.");break;default:e=".*"}a&&a.push(n);return"("+e+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var r={};b.setObject(q.id.replace(/\//g,
"."),r);r._getZone=function(a,c,d){return c?p.getTimezoneName(a):a.getTimezoneOffset()};r.format=function(c,k){k=k||{};var d=l.normalizeLocale(k.locale),n=k.formatLength||"short",d=r._getGregorianBundle(d),f=[];c=b.hitch(this,e,c,d,k);if("year"==k.selector)return a(d["dateFormatItem-yyyy"]||"yyyy",c);var t;"date"!=k.selector&&(t=k.timePattern||d["timeFormat-"+n])&&f.push(a(t,c));"time"!=k.selector&&(t=k.datePattern||d["dateFormat-"+n])&&f.push(a(t,c));return 1==f.length?f[0]:d["dateTimeFormat-"+n].replace(/\'/g,
"").replace(/\{(\d+)\}/g,function(d,a){return f[a]})};r.regexp=function(a){return r._parseInfo(a).regexp};r._parseInfo=function(c){c=c||{};var e=l.normalizeLocale(c.locale),e=r._getGregorianBundle(e),d=c.formatLength||"short",n=c.datePattern||e["dateFormat-"+d],f=c.timePattern||e["timeFormat-"+d],d="date"==c.selector?n:"time"==c.selector?f:e["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(d,a){return[f,n][a]}),h=[];return{regexp:a(d,b.hitch(this,k,h,e,c)),tokens:h,bundle:e}};r.parse=function(a,
c){var d=/[\u200E\u200F\u202A\u202E]/g,n=r._parseInfo(c),e=n.tokens,b=n.bundle;a=(new RegExp("^"+n.regexp.replace(d,"")+"$",n.strict?"":"i")).exec(a&&a.replace(d,""));if(!a)return null;var k=["abbr","wide","narrow"],f=[1970,0,1,0,0,0,0],t="";a=g.every(a,function(d,a){if(!a)return!0;var n=e[a-1];a=n.length;n=n.charAt(0);switch(n){case "y":if(2!=a&&c.strict)f[0]=d;else if(100>d)d=Number(d),n=""+(new Date).getFullYear(),a=100*n.substring(0,2),n=Math.min(Number(n.substring(2,4))+20,99),f[0]=d<n?a+d:a-
100+d;else{if(c.strict)return!1;f[0]=d}break;case "M":case "L":if(2<a){if(a=b["months-"+("L"==n?"standAlone":"format")+"-"+k[a-3]].concat(),c.strict||(d=d.replace(".","").toLowerCase(),a=g.map(a,function(d){return d.replace(".","").toLowerCase()})),d=g.indexOf(a,d),-1==d)return!1}else d--;f[1]=d;break;case "E":case "e":case "c":a=b["days-"+("c"==n?"standAlone":"format")+"-"+k[a-3]].concat();c.strict||(d=d.toLowerCase(),a=g.map(a,function(d){return d.toLowerCase()}));d=g.indexOf(a,d);if(-1==d)return!1;
break;case "D":f[1]=0;case "d":f[2]=d;break;case "a":a=c.am||b["dayPeriods-format-wide-am"];n=c.pm||b["dayPeriods-format-wide-pm"];if(!c.strict){var r=/\./g;d=d.replace(r,"").toLowerCase();a=a.replace(r,"").toLowerCase();n=n.replace(r,"").toLowerCase()}if(c.strict&&d!=a&&d!=n)return!1;t=d==n?"p":d==a?"a":"";break;case "K":24==d&&(d=0);case "h":case "H":case "k":if(23<d)return!1;f[3]=d;break;case "m":f[4]=d;break;case "s":f[5]=d;break;case "S":f[6]=d}return!0});d=+f[3];"p"===t&&12>d?f[3]=d+12:"a"===
t&&12==d&&(f[3]=0);d=new Date(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);c.strict&&d.setFullYear(f[0]);var h=e.join(""),n=-1!=h.indexOf("d"),h=-1!=h.indexOf("M");if(!a||h&&d.getMonth()>f[1]||n&&d.getDate()>f[2])return null;if(h&&d.getMonth()<f[1]||n&&d.getDate()<f[2])d=p.add(d,"hour",1);return d};var u=["abbr","wide","narrow"],z=[],v={};r.addCustomFormats=function(a,c){z.push({pkg:a,name:c});v={}};r._getGregorianBundle=function(a){if(v[a])return v[a];var c={};g.forEach(z,function(d){d=l.getLocalization(d.pkg,
d.name,a);c=b.mixin(c,d)},this);return v[a]=c};r.addCustomFormats(q.id.replace(/\/date\/locale$/,".cldr"),"gregorian");r.getNames=function(a,c,d,n){var e;n=r._getGregorianBundle(n);a=[a,d,c];"standAlone"==d&&(d=a.join("-"),e=n[d],1==e[0]&&(e=void 0));a[1]="format";return(e||n[a.join("-")]).concat()};r.isWeekend=function(a,c){c=f.getWeekend(c);a=(a||new Date).getDay();c.end<c.start&&(c.end+=7,a<c.start&&(a+=7));return a>=c.start&&a<=c.end};r._getDayOfYear=function(a){return p.difference(new Date(a.getFullYear(),
0,1,a.getHours()),a)+1};r._getWeekOfYear=function(a,c){1==arguments.length&&(c=0);var d=(new Date(a.getFullYear(),0,1)).getDay(),n=(d-c+7)%7,n=Math.floor((r._getDayOfYear(a)+n-1)/7);d==c&&n++;return n};return r})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(b,g){var p={};b.setObject("dojo.cldr.supplemental",p);p.getFirstDayOfWeek=function(b){b={bd:5,mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,
br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,pr:0,py:0,sg:0,sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[p._region(b)];return void 0===b?1:b};p._region=function(b){b=g.normalizeLocale(b);b=b.split("-");var f=b[1];f?4==f.length&&(f=b[2]):f={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",
bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",fa:"ir",ff:"sn",fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb",ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",ik:"us","in":"id",is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",
kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",mn:"mn",mo:"ro",mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no",no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",qu:"pe",rm:"ch",rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",
sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",ur:"pk",uz:"uz",ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id",ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",bbc:"id",bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",
bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",crk:"ca",csb:"pl",dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf",ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",gez:"et",gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",
hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",khq:"ml",kht:"in",kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru",kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",lif:"np",lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",
mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",nds:"de","new":"np",niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph",pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",saf:"gh",sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",
ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",teo:"ug",tet:"tl",tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv",twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",wal:"et",war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[b[0]];return f};p.getWeekend=
function(b){var f=p._region(b);b={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[f];f={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[f];void 0===b&&(b=6);void 0===f&&(f=0);return{start:b,end:f}};return p})},"esri/core/accessorSupport/set":function(){define(["require","exports","dojo/has","../Logger","./get"],function(b,g,p,f,l){function m(b,c,f){if(b&&c)if("object"===typeof c){f=0;for(var e=Object.getOwnPropertyNames(c);f<
e.length;f++){var a=e[f];m(b,a,c[a])}}else"_"!==c[0]&&(-1!==c.indexOf(".")?(c=c.split("."),a=c.splice(c.length-1,1)[0],m(l.default(b,c),a,f)):b[c]=f)}Object.defineProperty(g,"__esModule",{value:!0});f.getLogger("esri.core.accessorSupport.set");g.set=m;g.default=m})},"esri/core/accessorSupport/wire":function(){define(["require","exports","./utils"],function(b,g,p){function f(e,a,b){a=p.splitPath(a);if(Array.isArray(a)){for(var k=[],f=0;f<a.length;f++)k.push((new l(a[f],b)).install(e));return new c(k)}e=
(new l(a,b)).install(e);return new q(e)}Object.defineProperty(g,"__esModule",{value:!0});var l=function(){function c(a,c){this.path=a;this.callback=c;this.chain=null;this.path=a;-1<a.indexOf(".")&&(this.chain=p.pathToArray(a));this.callback=c;return this}c.prototype.install=function(a){a=this.chain?new h(this,a):new m(this,a);return a};c.prototype.notify=function(a){this.callback(a,this.path)};return c}(),m=function(){function c(a,c){this.binding=a;this.target=c;p.getProperties(c).addCursor(this.binding.path,
this)}c.prototype.destroy=function(){this.target&&(p.getProperties(this.target).removeCursor(this.binding.path,this),this.target=this.binding=null)};c.prototype.propertyDestroyed=function(a,c){p.getProperties(this.target).removeCursor(c,this)};c.prototype.propertyInvalidated=function(a,c){this.binding&&this.binding.notify(this.target)};c.prototype.propertyCommitted=function(a,c){this.binding&&this.binding.notify(this.target)};return c}(),h=function(){function c(a,c){this.binding=a;this.target=c;this.stack=
[];this.properties=p.getProperties(c);this.stack.push({properties:this.properties,propertyName:a.chain[0]});this.properties.addCursor(a.chain[0],this);this.moveForward();return this}c.prototype.destroy=function(){for(;;){var a=this.stack.pop();if(null==a)break;a.properties.removeCursor(a.propertyName,this)}this.target=this.binding=null};c.prototype.propertyDestroyed=function(a,c){this.moveBackward(a,c)};c.prototype.propertyInvalidated=function(a,c){this.binding&&this.binding.notify(this.target)};
c.prototype.propertyCommitted=function(a,c){this.binding&&(this.moveBackward(a,c),this.moveForward(),this.binding.notify(this.target))};c.prototype.moveBackward=function(a,c){for(var e=this.stack,b=e[e.length-1];b.properties!==a&&b.propertyName!==c;)b.properties.removeCursor(b.propertyName,this),e.pop(),b=e[e.length-1]};c.prototype.moveForward=function(){var a=this.stack,c=a[a.length-1],c=c.properties.internalGet(c.propertyName);(c=p.getProperties(c))&&a.length<this.binding.chain.length&&(a=this.binding.chain[a.length],
this.stack.push({properties:c,propertyName:a}),c.addCursor(a,this),this.moveForward())};return c}(),c=function(){function c(a){this.cursors=a}c.prototype.remove=function(){for(var a=this.cursors;0<a.length;)a.pop().destroy();this.cursors=null};return c}(),q=function(){function c(a){this.cursor=a}c.prototype.remove=function(){this.cursor.destroy();this.cursor=null};return c}();g.create=function(e,a){e=p.splitPath(e);if(Array.isArray(e)){for(var b=[],f=0;f<e.length;f++)b.push(new l(e[f],a));return function(a){for(var e=
[],k=0;k<b.length;k++)e[k]=b[k].install(a);return new c(e)}}var h=new l(e,a);return function(a){return new q(h.install(a))}};g.wire=f;g.default=f})},"esri/core/accessorSupport/extensions/computedProperty":function(){define("require exports dojo/has ../../Logger ../utils ../wire".split(" "),function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});f.getLogger("esri.core.accessorSupport.extensions.computedProperty");g.ComputedPropertyExtension={processClassPropertyMetadata:function(b,c,
f,e){c.dependsOn&&(f=void 0,f=c.dependsOn.slice())&&(c.wire=m.create(f,function(a){return l.getProperties(a).propertyInvalidated(b)}))},instanceCreated:function(b,c,f){for(var e=0;e<f.length;e++){var a=c[f[e]];a.wire&&a.wire(b)}}};g.default=g.ComputedPropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty":function(){define("require exports ./serializableProperty/originAliases ./serializableProperty/reader ./serializableProperty/shorthands ./serializableProperty/writer".split(" "),
function(b,g,p,f,l,m){function h(c,b,e){var a=c&&c.json;c&&c.json&&c.json.origins&&e&&(c=c.json.origins[e.origin])&&b in c&&(a=c);return a}Object.defineProperty(g,"__esModule",{value:!0});g.originSpecificReadPropertyDefinition=function(c,b){return h(c,"read",b)};g.originSpecificWritePropertyDefinition=function(c,b){return h(c,"write",b)};g.SerializablePropertyExtension={processPrototypePropertyMetadata:function(c,b,e,a){if(l.process(b)){p.process(b);e=b.type;for(a=0;Array.isArray(e);)e=e[0],a++;if(b.json.origins)for(var k in b.json.origins){var r=
b.json.origins[k];f.create(e,a,c,r);m.create(e,a,c,r)}f.create(e,a,c,b.json);m.create(e,a,c,b.json)}}};g.default=g.SerializablePropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty/originAliases":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.process=function(b){if(b.json&&b.json.origins){var f=b.json.origins,l={"web-document":["web-scene","web-map"]};b=function(b){if(f[b]){var c=f[b];l[b].forEach(function(b){f[b]=
c});delete f[b]}};for(var m in l)b(m)}}})},"esri/core/accessorSupport/extensions/serializableProperty/reader":function(){define(["require","exports","../../../object","./type"],function(b,g,p,f){function l(a,b,f,h){if(1<b)return c(a,b);if(1===b)return q(a);if(e(a)){var k=q(a.prototype.itemType.Type);return function(c,e,d){return(c=k(c,e,d))?new a(c):c}}return m(a)}function m(a){return a.prototype.read?function(c,e,b){return null==c?c:(new a).read(c,b)}:a.fromJSON}function h(a,c,e,b){return 0!==b&&
Array.isArray(c)?c.map(function(c){return h(a,c,e,b-1)}):a(c,null,e)}function c(a,c){a=m(a);var e=h.bind(null,a);return function(a,b,k){if(null==a)return a;a=e(a,k,c);b=c;for(k=a;0<b&&Array.isArray(k);)b--,k=k[0];if(void 0!==k)for(k=0;k<b;k++)a=[a];return a}}function q(a){var c=m(a);return function(a,e,b){return null==a?a:Array.isArray(a)?a.map(function(a){return c(a,null,b)}):[c(a,null,b)]}}function e(c){return f.isCollection(c)?(c=c.prototype.itemType)&&c.Type&&"function"===typeof c.Type?a(c.Type):
!1:!1}function a(a){return!!a&&(!!a.prototype.read||!!a.fromJSON||e(a))}Object.defineProperty(g,"__esModule",{value:!0});g.create=function(c,e,b,f){(!f.read||!f.read.reader&&!1!==f.read.enabled)&&a(c)&&p.setDeepValue("read.reader",l(c,e,b,f),f)}})},"esri/core/object":function(){define(["require","exports"],function(b,g){function p(b,l,m){for(var f=0;f<b.length;f++){var c=b[f];if(!(c in m))if(l)m[c]={};else return;m=m[c]}return m}Object.defineProperty(g,"__esModule",{value:!0});g.getDeepValue=function(b,
l){return p(b.split("."),!1,l)};g.setDeepValue=function(b,l,m){var f=b.split(".");b=f.pop();(m=p(f,!0,m))&&b&&(m[b]=l)}})},"esri/core/accessorSupport/extensions/serializableProperty/type":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.isCollection=function(b){return!!b&&!!b.prototype.declaredClass&&0===b.prototype.declaredClass.indexOf("esri.core.Collection")}})},"esri/core/accessorSupport/extensions/serializableProperty/shorthands":function(){define(["require",
"exports"],function(b,g){function p(b){"boolean"===typeof b.read?b.read={enabled:b.read}:"function"===typeof b.read?b.read={enabled:!0,reader:b.read}:b.read&&"object"===typeof b.read&&void 0===b.read.enabled&&(b.read.enabled=!0)}function f(b){"boolean"===typeof b.write?b.write={enabled:b.write}:"function"===typeof b.write?b.write={enabled:!0,writer:b.write}:b.write&&"object"===typeof b.write&&void 0===b.write.enabled&&(b.write.enabled=!0)}Object.defineProperty(g,"__esModule",{value:!0});g.process=
function(b){b.json||(b.json={});p(b.json);f(b.json);if(b.json.origins)for(var l in b.json.origins)p(b.json.origins[l]),f(b.json.origins[l]);return!0}})},"esri/core/accessorSupport/extensions/serializableProperty/writer":function(){define(["require","exports","../../../object","./type"],function(b,g,p,f){function l(c,a,b,f){p.setDeepValue(b,m(c,f),a)}function m(c,a){return c&&"function"===typeof c.write?c.write({},a):c&&"function"===typeof c.toJSON?c.toJSON():"number"===typeof c?-Infinity===c?-Number.MAX_VALUE:
Infinity===c?Number.MAX_VALUE:isNaN(c)?null:c:c}function h(c,a,b,f){null===c?c=null:c&&"function"===typeof c.map?(c=c.map(function(a){return m(a,f)}),"function"===typeof c.toArray&&(c=c.toArray())):c=[m(c,f)];p.setDeepValue(b,c,a)}function c(b,a,k){return 0!==k&&Array.isArray(b)?b.map(function(b){return c(b,a,k-1)}):m(b,a)}function q(b){return function(a,e,f,h){if(null===a)a=null;else{a=c(a,h,b);h=b;for(var k=a;0<h&&Array.isArray(k);)h--,k=k[0];if(void 0!==k)for(k=0;k<h;k++)a=[a]}p.setDeepValue(f,
a,e)}}Object.defineProperty(g,"__esModule",{value:!0});g.create=function(c,a,b,r){r.write&&!r.write.writer&&!1!==r.write.enabled&&(1===a||f.isCollection(c)?r.write.writer=h:r.write.writer=1<a?q(a):l)}})},"esri/core/accessorSupport/PropertyOrigin":function(){define(["require","exports"],function(b,g){function p(b){switch(b){case "defaults":return l.DEFAULTS;case "service":return l.SERVICE;case "portal-item":return l.PORTAL_ITEM;case "web-scene":return l.WEB_SCENE;case "web-map":return l.WEB_MAP;case "user":return l.USER}}
function f(b){switch(b){case l.DEFAULTS:return"defaults";case l.SERVICE:return"service";case l.PORTAL_ITEM:return"portal-item";case l.WEB_SCENE:return"web-scene";case l.WEB_MAP:return"web-map";case l.USER:return"user"}}Object.defineProperty(g,"__esModule",{value:!0});var l;(function(b){b[b.DEFAULTS=0]="DEFAULTS";b[b.COMPUTED=1]="COMPUTED";b[b.SERVICE=2]="SERVICE";b[b.PORTAL_ITEM=3]="PORTAL_ITEM";b[b.WEB_SCENE=4]="WEB_SCENE";b[b.WEB_MAP=5]="WEB_MAP";b[b.USER=6]="USER";b[b.NUM=7]="NUM"})(l=g.OriginId||
(g.OriginId={}));g.nameToId=p;g.idToName=f;g.readableNameToId=function(b){return p(b)};g.idToReadableName=function(b){return f(b)};g.writableNameToId=function(b){return p(b)};g.idToWritableName=function(b){return f(b)}})},"esri/core/accessorSupport/Store":function(){define(["require","exports","./PropertyOrigin"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});b=function(){function b(){this._values={}}b.prototype.get=function(b){return this._values[b]};b.prototype.originOf=function(b){return p.OriginId.USER};
b.prototype.keys=function(){return Object.keys(this._values)};b.prototype.set=function(b,f){this._values[b]=f};b.prototype.clear=function(b){delete this._values[b]};b.prototype.has=function(b){return b in this._values};return b}();g.default=b})},"esri/core/accessorSupport/introspection":function(){define("require exports ../object ./ensureType ./extensions ./metadata ./utils ./decorators/cast".split(" "),function(b,g,p,f,l,m,h,c){Object.defineProperty(g,"__esModule",{value:!0});var q=Object.prototype.hasOwnProperty,
e=/^_([a-zA-Z0-9]+)(Getter|Setter|Reader|Writer|Caster)$/,a={Getter:"get",Setter:"set",Reader:"json.read.reader",Writer:"json.write.writer",Caster:"cast"},k=/^_(set|get)([a-zA-Z0-9]+)Attr$/;g.processPrototype=function(c){for(var b=c.declaredClass,r=c.properties||{},g=0,w=Object.getOwnPropertyNames(r);g<w.length;g++){var t=w[g],d=r[t],n=typeof d;null==d?m.setPropertyMetadata(c,t,{value:d}):Array.isArray(d)?m.setPropertyMetadata(c,t,{type:[d[0]],value:null}):"object"===n?h.getProperties(d)||d instanceof
Date?m.setPropertyMetadata(c,t,{type:d.constructor,value:d}):m.setPropertyMetadata(c,t,d):"boolean"===n?m.setPropertyMetadata(c,t,{type:Boolean,value:d}):"string"===n?m.setPropertyMetadata(c,t,{type:String,value:d}):"number"===n?m.setPropertyMetadata(c,t,{type:Number,value:d}):"function"===n&&m.setPropertyMetadata(c,t,{type:d,value:null})}g=0;for(w=Object.getOwnPropertyNames(c);g<w.length;g++){var n=w[g],d=c[n],r=t=void 0,x=e.exec(n);if(x)t=x[1],r=a[x[2]];else if(x=k.exec(n))t=x[2][0].toLowerCase()+
x[2].substr(1),r=x[1].toLowerCase();t&&r&&(t=m.getPropertyMetadata(c,t),p.setDeepValue(r,d,t))}g=0;for(w=Object.getOwnPropertyNames(m.getPropertiesMetadata(c));g<w.length;g++)if(t=w[g],d=m.getPropertyMetadata(c,t),r=d.type,n=d.types,void 0===d.value&&q.call(c,t)&&(d.value=c[t]),!d.cast&&r){t=d;d=0;for(n=r;Array.isArray(n);)n=n[0],d++;r=1===d?f.ensureArray(n):1<d?f.ensureNArray(n,d):f.ensureType(r);t.cast=r}else!d.cast&&n&&(Array.isArray(n)?d.cast=f.ensureArrayTyped(f.ensureOneOfType(n[0])):d.cast=
f.ensureOneOfType(n));l.processPrototypeMetadatas(m.getPropertiesMetadata(c),b);return m.getPropertiesMetadata(c)};g.processClass=function(a){for(var b=a.prototype,e=b.declaredClass,k=a._meta.bases,f={},t=k.length-1;0<=t;t--)h.merge(f,m.getMetadata(k[t].prototype));var d=f.properties;l.processClassMetadatas(d,e);Object.defineProperty(a,"__accessorMetadata__",{value:{properties:d,autoDestroy:!!f.autoDestroy}});for(var n={},e=function(a){var c=d[a];n[a]={enumerable:!0,configurable:!0,get:function(){return this.__accessor__?
this.__accessor__.get(a):c.value},set:function(d){var n=this.__accessor__;if(!n)Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:d});else if(!Object.isFrozen(this)){if(n.initialized&&c.readOnly)throw new TypeError("[accessor] cannot assign to read-only property '"+a+"' of "+this.declaredClass);if(2===n.lifecycle&&c.constructOnly)throw new TypeError("[accessor] cannot assign to construct-only property '"+a+"' of "+this.declaredClass);n.set(a,d)}}}},k=0,t=Object.getOwnPropertyNames(d);k<
t.length;k++)e(t[k]);Object.defineProperties(a.prototype,n);if(f.parameters)for(a=0,e=Object.getOwnPropertyNames(f.parameters);a<e.length;a++)k=e[a],t=Object.getOwnPropertyDescriptor(b,k)||{value:b[k]},(t=c.autocastMethod(b,k,t))&&Object.defineProperty(b,k,t);return f}})},"esri/core/accessorSupport/ensureType":function(){define(["require","exports","../Logger"],function(b,g,p){function f(d,a){return a.isInstanceOf?a.isInstanceOf(d):a instanceof d}function l(d){return null==d?d:new Date(d)}function m(d){return null==
d?d:!!d}function h(d){return null==d?d:d.toString()}function c(d){return null==d?d:parseFloat(d)}function q(d){return null==d?d:Math.round(parseFloat(d))}function e(d){return d&&d.constructor&&void 0!==d.constructor._meta}function a(d,a){return null!=a&&d&&!f(d,a)}function k(c,n){a(c,n)&&(e(n)?d.error("Accessor#set","Assigning an instance of '"+(n.declaredClass||"unknown")+"' which is not a subclass of '"+(c&&c.prototype&&c.prototype.declaredClass||"unknown")+"'"):n=new c(n));return n}function r(d){switch(d){case Number:return c;
case n:return q;case Boolean:return m;case String:return h;case Date:return l;default:return k.bind(null,d)}}function u(d,a){var c=r(d);return 1===arguments.length?c:c(a)}function z(d,a){return 1===arguments.length?z.bind(null,d):a?Array.isArray(a)?a.map(d):[d(a)]:a}function v(d,a,c){return 0!==a&&Array.isArray(c)?c.map(function(c){return v(d,a-1,c)}):d(c)}function w(d,a,c){if(2===arguments.length)return w.bind(null,d,a);if(!c)return c;c=v(d,a,c);for(var n=a,b=c;0<n&&Array.isArray(b);)n--,b=b[0];
if(void 0!==b)for(b=0;b<n;b++)c=[c];return c}function t(c,n){if(2===arguments.length)return t(c).call(null,n);var b={},k=[],f=[],r;for(r in c.typeMap){var h=c.typeMap[r];b[r]=u(h);k.push(h&&h.prototype&&h.prototype.declaredClass||"unknown");f.push(r)}var x="string"===typeof c.key?function(d){return d[c.key]}:c.key;return function(n){if(c.base&&!a(c.base,n))return n;var t=x(n)||c.defaultKeyValue,r=b[t];if(!r)return d.error("Accessor#set","Invalid property value, value needs to be one of "+("'"+k.join("', '")+
"'")+", or a plain object that can autocast (having .type \x3d "+("'"+f.join("', '")+"'")+")"),null;if(!a(c.typeMap[t],n))return n;if("string"!==typeof c.key||e(n))return r(n);var t={},h;for(h in n)h!==c.key&&(t[h]=n[h]);return r(t)}}Object.defineProperty(g,"__esModule",{value:!0});var d=p.getLogger("esri.core.Accessor");g.isInstanceOf=f;g.ensureDate=l;g.ensureBoolean=m;g.ensureString=h;g.ensureNumber=c;g.ensureInteger=q;g.isClassedType=e;g.requiresType=a;g.ensureClass=k;g.ensureType=u;g.ensureArrayTyped=
z;g.ensureArray=function(d,a){return 1===arguments.length?z(u.bind(null,d)):z(u.bind(null,d),a)};g.ensureNArrayTyped=w;g.ensureNArray=function(d,a,c){return 2===arguments.length?w(u.bind(null,d),a):w(u.bind(null,d),a,c)};g.ensureOneOfType=t;var n=function(){return function(){}}();g.Integer=n;g.default=u})},"esri/core/accessorSupport/metadata":function(){define(["require","exports"],function(b,g){function p(c){return null!=c.__accessorMetadata__}function f(c){return p(c)&&null!=l(c).properties}function l(c){c.__accessorMetadata__||
Object.defineProperty(c,"__accessorMetadata__",{value:{},enumerable:!0,configurable:!0,writable:!0});return c.__accessorMetadata__}function m(c){c=l(c);var b=c.properties;b||(b=c.properties={});return b}function h(c,b){var e=l(c);c=e.parameters;c||(c=e.parameters={});e=c[b];e||(e=[],c[b]=e);return e}Object.defineProperty(g,"__esModule",{value:!0});g.hasMetadata=p;g.hasPropertiesMetadata=f;g.hasPropertyMetadata=function(c,b){return f(c)&&null!=m(c)[b]};g.hasParametersMetadata=function(c,b){return p(c)&&
null!=l(c).parameters&&null!=l(c).parameters[b]};g.getMetadata=l;g.getPropertiesMetadata=m;g.getPropertyMetadata=function(c,b){c=m(c);var e=c[b];e||(e=c[b]={});return e};g.setPropertyMetadata=function(c,b,e){m(c)[b]=e};g.getParametersMetadata=h;g.getParameterMetadata=function(c,b,e){var a=h(c,b)[e];a||(h(c,b)[e]=a={index:e});return a}})},"esri/core/accessorSupport/decorators/cast":function(){define(["require","exports","../ensureType","../metadata"],function(b,g,p,f){function l(c){var a="_meta"in
c?p.ensureType(c):c;return function(){for(var c=[],b=0;b<arguments.length;b++)c[b]=arguments[b];c.push(a);return"number"===typeof c[2]?h.apply(this,c):m.apply(this,c)}}function m(c,a,b,r){f.getPropertyMetadata(c,a).cast=r}function h(c,a,b,r){f.getParameterMetadata(c,a,b).cast=r}function c(c){return function(a,b,e){f.getPropertyMetadata(a,c).cast=a[b]}}Object.defineProperty(g,"__esModule",{value:!0});var q=Object.prototype.toString;g.autocastMethod=function(c,a,b){if(f.hasParametersMetadata(c,a)){var e=
f.getParametersMetadata(c,a).filter(function(a){return null!=a.cast});if(e.length){var k=b.value;b.value=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];for(c=0;c<e.length;c++){var b=e[c];a[b.index]=b.cast(a[b.index])}return k.apply(this,a)};return b}console.warn("Method "+c.declaredClass+"::"+a+" is decorated with @cast but no parameters are decorated")}};g.cast=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];if(3!==b.length||"string"!==typeof b[1]){if(1===
b.length&&"[object Function]"===q.call(b[0]))return l(b[0]);if(1===b.length&&"string"===typeof b[0])return c(b[0])}}})},"esri/core/accessorSupport/watch":function(){define("require exports ../ArrayPool ../lang ../ObjectPool ../scheduling ./get ./utils ./wire".split(" "),function(b,g,p,f,l,m,h,c,q){function e(a){t.has(a)?d.splice(d.indexOf(a),1):t.add(a);d.push(a);n||(n=m.schedule(k))}function a(d){if(!d.removed){var a=d.callback,c=d.path,n=d.oldValue,b=d.target,e=h.valueOf(b,d.propertyPath,!0);f.equals(n,
e)||(d.oldValue=e,a.call(b,e,n,c,b))}}function k(){if(n){n=null;var c=d;d=w.acquire();t.clear();for(var b=w.acquire(),e=0;e<c.length;e++){var k=c[e];a(k);k.removed&&b.push(k)}for(e=0;e<d.length;e++)k=d[e],k.removed&&(b.push(k),t.delete(k),d.splice(e,1),--e);for(e=0;e<b.length;e++)v.pool.release(b[e]);w.release(c);w.release(b);x.forEach(function(d){return d()})}}function r(d,a,n){var b=c.parse(d,a,n,function(d,a,n){var k=h.valueOf(d,a,!0),f,t=q.wire(d,a,function(d,a){d.__accessor__.destroyed?b.remove():
(f||(f=v.pool.acquire(d,a,k,n),k=null),e(f))});return{remove:c.once(function(){t.remove();f&&(f.removed=!0,e(f),f=null);b=t=k=null})}});return b}function u(d,a,n){var b=c.parse(d,a,n,function(d,a,c){var n=h.valueOf(d,a,!0),e=!1;return q.wire(d,a,function(d,a){if(d.__accessor__.destroyed)b.remove();else if(!e){e=!0;var k=h.valueOf(d,a,!0);f.equals(n,k)||c.call(d,k,n,a,d);n=h.valueOf(d,a,!0);e=!1}})});return b}function z(d,a,c,n){void 0===n&&(n=!1);return!d.__accessor__||d.__accessor__.destroyed?{remove:function(){}}:
n?u(d,a,c):r(d,a,c)}Object.defineProperty(g,"__esModule",{value:!0});var v=function(){function d(d,a,n,b){this.target=d;this.path=a;this.oldValue=n;this.callback=b;this.removed=!1;this.propertyPath=c.pathToStringOrArray(a)}d.prototype.release=function(){this.target=this.path=this.propertyPath=this.callback=this.oldValue=null;this.removed=!0};d.pool=new l(d,!0);return d}(),w=new p,t=new Set,d=w.acquire(),n;g.dispatchTarget=function(c){for(var n=w.copy(d),b=0;b<n.length;b++){var e=n[b];e.target===c&&
(a(e),t.delete(e),d.splice(d.indexOf(e),1))}};g.removeTarget=function(a){for(var c=0;c<d.length;c++){var n=d[c];n.target===a&&(n.removed=!0)}};g.dispatch=k;var x=new Set;g.afterDispatch=function(d){x.add(d);return{remove:function(){x.delete(d)}}};g.watch=z;g.isValueInUse=function(a){return d.some(function(d){return d.oldValue===a})};g.default=z})},"esri/core/ArrayPool":function(){define(["require","exports","./ObjectPool"],function(b,g,p){function f(b){b.length=0}var l=Array.prototype.splice;b=function(){function b(c,
b){void 0===c&&(c=50);void 0===b&&(b=50);this._pool=new p(Array,!1,f,b,c)}b.prototype.acquire=function(){return this._pool.acquire()};b.prototype.copy=function(c){var b=this.acquire();c.unshift(0,0);l.apply(b,c);c.splice(0,2);return b};b.prototype.release=function(c){this._pool.release(c)};b.acquire=function(){return m.acquire()};b.copy=function(c){return m.copy(c)};b.release=function(c){return m.release(c)};return b}();var m=new b(100);return b})},"esri/core/ObjectPool":function(){define(["require",
"exports"],function(b,g){var p=function(){return function(){}}();return function(){function b(b,f,h,c,q){void 0===c&&(c=1);void 0===q&&(q=0);this.classConstructor=b;this.acquireFunctionOrWithConstructor=f;this.releaseFunction=h;this.growthSize=c;!0===f?this.acquireFunction=this._constructorAcquireFunction:"function"===typeof f&&(this.acquireFunction=f);this._pool=Array(q);this._set=new Set;this._initialSize=q;for(b=0;b<q;b++)this._pool[b]=new this.classConstructor;this.growthSize=Math.max(c,1)}b.prototype.acquire=
function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];f=this.classConstructor||p;if(0===this._pool.length)for(var h=this.growthSize,c=0;c<h;c++)this._pool[c]=new f;f=this._pool.pop();this.acquireFunction?this.acquireFunction.apply(this,[f].concat(b)):f&&f.acquire&&"function"===typeof f.acquire&&f.acquire.apply(f,b);this._set.delete(f);return f};b.prototype.release=function(b){b&&!this._set.has(b)&&(this.releaseFunction?this.releaseFunction(b):b&&b.release&&"function"===typeof b.release&&
b.release(),this._pool.push(b),this._set.add(b))};b.prototype.prune=function(b){void 0===b&&(b=this._initialSize);if(!(this._pool.length<=b))for(var f;b>this._pool.length;)f=this._pool.shift(),this._set.delete(f),f.dispose&&"function"===typeof f.dispose&&f.dispose()};b.prototype._constructorAcquireFunction=function(b){for(var f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];var c;(c=this.classConstructor).call.apply(c,[b].concat(f))};return b}()})},"esri/core/scheduling":function(){define(["require",
"exports","./nextTick","./now","./requestAnimationFrame"],function(b,g,p,f,l){function m(d){void 0===d&&(d=g.now());g.debug.rafId=null;0<n.length&&(g.debug.rafId=h());if(0<r){var a=d-r;v=Math.min(a,v);if(a<u)return}g.debug.executeFrameTasks(d)}function h(){return g.debug.requestNextFrame?g.debug.requestNextFrame(e):e()}function c(){for(var d=0;d<n.length;){var a=n[d];d++;if(a.removed){n.splice(d-1,1);for(var c=0;c<t.length;c++){var b=t[c];if(a.phases[b]){var b=x[b],e=b.indexOf(a);-1!==e&&b.splice(e,
1)}}}}}function q(){for(;d.length;){var a=d.shift();a.isActive&&(a.isActive=!1,a.callback())}g.debug.willDispatch=!1}function e(){return l(m)}Object.defineProperty(g,"__esModule",{value:!0});g.now=f;var a=function(){return function(d){this.phases=d;this.paused=!1;this.pausedAt=0;this.epoch=-1;this.dt=0;this.ticks=-1;this.removed=!1}}(),k=function(){function d(d){this.callback=d;this.isActive=!0}d.prototype.remove=function(){this.isActive=!1};return d}(),r=-1,u=0,z=0,v=Number.POSITIVE_INFINITY,w={time:0,
deltaTime:0,elapsedFrameTime:0,frameDuration:0,spendInTask:0},t=["prepare","preRender","render","postRender","update"],d=[],n=[],x={prepare:[],preRender:[],render:[],postRender:[],update:[]},y=function(){function d(d){this._task=d}d.prototype.remove=function(){this._task.removed=!0};d.prototype.pause=function(){this._task.paused||(this._task.paused=!0,this._task.pausedAt=g.now())};d.prototype.resume=function(){this._task.paused&&(this._task.paused=!1,-1!==this._task.epoch&&(this._task.epoch+=g.now()-
this._task.pausedAt))};return d}();g.FrameTaskHandle=y;g.debug={frameTasks:n,rafId:null,requestNextFrame:null,willDispatch:!1,clearFrameTasks:function(d){void 0===d&&(d=!1);for(var a=0;a<n.length;a++)n[a].removed=!0;d&&c()},dispatch:q,executeFrameTasks:function(d){void 0===d&&(d=g.now());0>r&&(r=d);var a=d-r;r=d;for(var b=0;b<n.length;b++){var e=n[b];-1!==e.epoch&&(e.dt=a)}for(b=0;b<t.length;b++)for(var a=t[b],k=x[a],f=0;f<k.length;f++)e=k[f],e.paused||e.removed||(0===b&&e.ticks++,-1===e.epoch&&(e.epoch=
d),w.time=d,w.deltaTime=e.dt,w.elapsedFrameTime=g.now()-d,w.frameDuration=0<z?z:v,w.spendInTask=d-e.epoch,e.phases[a].call(e,w));c()}};g.schedule=function(a){a=new k(a);d.push(a);g.debug.willDispatch||(g.debug.willDispatch=!0,p(q));return a};g.addFrameTask=function(d){var c=new a(d);n.push(c);for(var b=0,e=t;b<e.length;b++){var k=e[b];d[k]&&x[k].push(c)}g.debug.rafId||(r=-1,g.debug.rafId=h());return new y(c)};g.setFrameRate=function(d){if(0>=d)z=u=0;else{var a=1.05*v;d=Math.ceil(1E3/d/a);u=(d-1)*
a;z=d*v}};g.requestNextFrame=h})},"esri/core/nextTick":function(){define(["require","exports","./global"],function(b,g,p){function f(){if(p.postMessage&&!p.importScripts){var b=p.onmessage,f=!0;p.onmessage=function(){f=!1};p.postMessage("","*");p.onmessage=b;return f}return!1}var l=p.MutationObserver||p.WebKitMutationObserver;return function(){var b;if(p.process&&p.process.nextTick)b=function(c){p.process.nextTick(c)};else if(p.Promise)b=function(c){p.Promise.resolve().then(c)};else if(l){var h=[],
c=document.createElement("div");(new l(function(){for(;0<h.length;)h.shift()()})).observe(c,{attributes:!0});b=function(b){h.push(b);c.setAttribute("queueStatus","1")}}else if(f()){var q=[];p.addEventListener("message",function(c){if(c.source===p&&"esri-nexttick-message"===c.data)for(c.stopPropagation();q.length;)q.shift()()},!0);b=function(c){q.push(c);p.postMessage("esri-nexttick-message","*")}}else b=p.setImmediate?function(c){return p.setImmediate(c)}:function(c){return p.setTimeout(c,0)};return b}()})},
"esri/core/now":function(){define(["require","exports","./global"],function(b,g,p){return function(){var b=p.performance||{};if(b.now)return function(){return b.now()};if(b.webkitNow)return function(){return b.webkitNow()};if(b.mozNow)return function(){return b.mozNow()};if(b.msNow)return function(){return b.msNow()};if(b.oNow)return function(){return b.oNow()};var l;l=b.timing&&b.timing.navigationStart?b.timing.navigationStart:Date.now();return function(){return Date.now()-l}}()})},"esri/core/requestAnimationFrame":function(){define(["require",
"exports","./global","./now"],function(b,g,p,f){var l=f();b=p.requestAnimationFrame;if(!b){g=["ms","moz","webkit","o"];for(var m=0;m<g.length&&!b;++m)b=p[g[m]+"RequestAnimationFrame"];b||(b=function(b){var c=f(),h=Math.max(0,16-(c-l)),e=p.setTimeout(function(){b(f())},h);l=c+h;return e})}return b})},"esri/core/Evented":function(){define(["require","exports","dojo/aspect","dojo/on"],function(b,g,p,f){function l(b,f,c,q){var e;Array.isArray(f)?e=f:-1<f.indexOf(",")&&(e=f.split(/\s*,\s*/));if(e){var a=
[];for(f=0;f<e.length;f++)a.push(l(b,e[f],c,q));a.remove=function(){for(var c=0;c<a.length;c++)a[c].remove()};return a}return q(b,f)}return function(){function b(){}b.prototype.emit=function(b,c){if(this.hasEventListener(b))return c=c||{},c.target||(c.target=this),f.emit(this,b,c)};b.prototype.on=function(b,c){return l(this,b,c,function(b,e){return p.after(b,"on"+e,c,!0)})};b.prototype.hasEventListener=function(b){b="on"+b;return!(!this[b]||!this[b].after)};return b}()})},"esri/core/accessorSupport/decorators":function(){define("require exports ./decorators/aliasOf ./decorators/autoDestroy ./decorators/cast ./decorators/declared ./decorators/property ./decorators/reader ./decorators/shared ./decorators/subclass ./decorators/writer".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){function k(a){for(var c in a)g.hasOwnProperty(c)||(g[c]=a[c])}Object.defineProperty(g,"__esModule",{value:!0});k(p);k(f);k(l);k(m);k(h);k(c);k(q);k(e);k(a)})},"esri/core/accessorSupport/decorators/aliasOf":function(){define(["require","exports","../metadata"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.aliasOf=function(b){return function(f,g){p.getPropertyMetadata(f,g).aliasOf=b}}})},"esri/core/accessorSupport/decorators/autoDestroy":function(){define(["require",
"exports","../metadata"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.autoDestroy=function(){return function(b,l,g){p.getMetadata(b).autoDestroy=!0;return b[l]}}})},"esri/core/accessorSupport/decorators/declared":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.declared=function(b){for(var f=[],l=1;l<arguments.length;l++)f[l-1]=arguments[l];l=function(){return this||{}};l.__bases__=[b].concat(f);return l}})},"esri/core/accessorSupport/decorators/property":function(){define("require exports dojo/has ../../lang ../../Logger ../metadata".split(" "),
function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});l.getLogger("esri.core.accessorSupport.decorators.property");g.property=function(b){void 0===b&&(b={});return function(c,h){var e=c.constructor.prototype;if(e!==Function.prototype){(c=Object.getOwnPropertyDescriptor(c,h))&&(c.get||c.set)?(b=f.clone(b),c.set&&(b.set=c.set),c.get&&(b.get=c.get)):c&&c.hasOwnProperty("value")&&(b=f.clone(b),b.value=c.value);h=m.getPropertyMetadata(e,h);for(var a in b)e=b[a],Array.isArray(e)?h[a]=(h[a]||
[]).concat(e):h[a]=e}}};g.propertyJSONMeta=function(b,c,f){b=m.getPropertyMetadata(b.constructor.prototype,f);b.json||(b.json={});b=b.json;void 0!==c&&(b.origins||(b.origins={}),b.origins[c]||(b.origins[c]={}),b=b.origins[c]);return b}})},"esri/core/accessorSupport/decorators/reader":function(){define(["require","exports","../../object","./property"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.reader=function(b,g,h){var c,q;void 0===g||Array.isArray(g)?(q=b,h=g,c=[void 0]):
(q=g,c=Array.isArray(b)?b:[b]);return function(b,a,k){var e=b.constructor.prototype;c.forEach(function(c){c=f.propertyJSONMeta(b,c,q);c.read&&"object"!==typeof c.read&&(c.read={});p.setDeepValue("read.reader",e[a],c);h&&(c.read.source=(c.read.source||[]).concat(h))})}}})},"esri/core/accessorSupport/decorators/shared":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.shared=function(b){return function(f,l){f[l]=b}}})},"esri/core/accessorSupport/decorators/subclass":function(){define(["require",
"exports","../../declare","../metadata"],function(b,g,p,f){function l(a,c){a.read&&("function"===typeof a.read?c.push(a.read):"object"===typeof a.read&&a.read.reader&&c.push(a.read.reader))}function m(a,c){a.write&&("function"===typeof a.write?c.push(a.write):"object"===typeof a.write&&a.write.writer&&c.push(a.write.writer))}function h(a){var c=[];a=f.getPropertiesMetadata(a.prototype);if(!a)return c;for(var b in a){var e=a[b];e.cast&&c.push(e.cast);e.copy&&c.push(e.copy);if(e=e.json)if(l(e,c),m(e,
c),e=e.origins)for(var h in e){var q=e[h];l(q,c);m(q,c)}}return c}function c(a){var c={values:{},descriptors:{}},b=["__bases__"],q=f.getPropertiesMetadata(a.prototype),l=h(a);Object.getOwnPropertyNames(a.prototype).filter(function(c){return-1!==b.indexOf(c)||q&&q.hasOwnProperty(c)||!e(Object.getOwnPropertyDescriptor(a.prototype,c))&&-1!==l.indexOf(a.prototype[c])?!1:!0}).forEach(function(b){var k=Object.getOwnPropertyDescriptor(a.prototype,b);e(k)?c.descriptors[b]=k:c.values[b]=a.prototype[b]});return c}
function q(a){var c=Object.getOwnPropertyNames(a),b=Object.getPrototypeOf(a.prototype).constructor,f=Object.getOwnPropertyNames(Function);f.push("__bases__");var h=Object.getOwnPropertyNames(b),q={values:{},descriptors:{}};c.filter(function(c){return-1!==f.indexOf(c)?!1:-1===h.indexOf(c)||b[c]!==a[c]?!0:!1}).forEach(function(c){var b=Object.getOwnPropertyDescriptor(a,c);e(b)?q.descriptors[c]=b:q.values[c]=a[c]});return q}function e(a){return a&&!(!a.get&&!a.set)}Object.defineProperty(g,"__esModule",
{value:!0});g.subclass=function(a){return function(b){var e=c(b),k=q(b);null!=a&&(e.values.declaredClass=a);b=p(b.__bases__,e.values);Object.defineProperties(b.prototype,e.descriptors);for(var f in k.values)b[f]=k.values[f];Object.defineProperties(b,k.descriptors);return b}}})},"esri/core/accessorSupport/decorators/writer":function(){define(["require","exports","../../object","./property"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.writer=function(b,g,h){var c,q;void 0===
g?(q=b,c=[void 0]):"string"!==typeof g?(q=b,c=[void 0],h=g):(q=g,c=Array.isArray(b)?b:[b]);return function(b,a,k){var e=b.constructor.prototype;c.forEach(function(c){c=f.propertyJSONMeta(b,c,q);c.write&&"object"!==typeof c.write&&(c.write={});h&&p.setDeepValue("write.target",h,c);p.setDeepValue("write.writer",e[a],c)})}}})},"esri/core/collectionUtils":function(){define(["require","exports","./Collection"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.referenceSetter=function(b,
l,g){void 0===g&&(g=p);l||(l=new g);l.removeAll();b&&(Array.isArray(b)||b.isInstanceOf&&b.isInstanceOf(p))?l.addMany(b):l.add(b);return l};g.castForReferenceSetter=function(b){return b}})},"esri/core/JSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./declare ./accessorSupport/decorators ./accessorSupport/read ./accessorSupport/write".split(" "),function(b,g,p,f,l,m,h,c,q){function e(a,c){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");
var b=new this;b.read(a,c);return b}var a=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}p(b,a);b.prototype.read=function(a,b){c.default(this,a,b);return this};b.prototype.write=function(a,c){return q.default(this,a||{},c)};b.prototype.toJSON=function(a){return this.write(null,a)};b.fromJSON=function(a,c){return e.call(this,a,c)};return b=f([h.subclass("esri.core.JSONSupport")],b)}(h.declared(l));a.prototype.toJSON.isDefaultToJSON=!0;m.after(function(c){m.hasMixin(c,a)&&(c.fromJSON=
e.bind(c))});return a})},"esri/core/accessorSupport/read":function(){define("require exports ../tsSupport/assignHelper ./get ./utils ./extensions/serializableProperty".split(" "),function(b,g,p,f,l,m){function h(b,e,a){void 0===a&&(a=c);for(var k=l.getProperties(b),r=k.metadatas,h={},q=0,g=Object.getOwnPropertyNames(e);q<g.length;q++){var p=h,t=r,d=g[q],n=e,x=a,y=m.originSpecificReadPropertyDefinition(t[d],x);y&&(!y.read||!1!==y.read.enabled&&!y.read.source)&&(p[d]=!0);for(var A=0,D=Object.getOwnPropertyNames(t);A<
D.length;A++){var B=D[A],y=m.originSpecificReadPropertyDefinition(t[B],x),F;a:{F=d;var C=n;if(y&&y.read&&!1!==y.read.enabled&&y.read.source)if(y=y.read.source,"string"===typeof y){if(y===F||-1<y.indexOf(".")&&0===y.indexOf(F)&&f.exists(y,C)){F=!0;break a}}else for(var G=0;G<y.length;G++){var ba=y[G];if(ba===F||-1<ba.indexOf(".")&&0===ba.indexOf(F)&&f.exists(ba,C)){F=!0;break a}}F=!1}F&&(p[B]=!0)}}k.setDefaultOrigin(a.origin);g=0;for(p=Object.getOwnPropertyNames(h);g<p.length;g++)q=p[g],d=(t=m.originSpecificReadPropertyDefinition(r[q],
a).read)&&t.source,n=void 0,n=d&&"string"===typeof d?f.valueOf(e,d):e[q],t&&t.reader&&(n=t.reader.call(b,n,e,a)),void 0!==n&&k.set(q,n);e=0;for(r=Object.getOwnPropertyNames(r);e<r.length;e++)q=r[e],h[q]||(g=b,p=k,t=a,d=(d=m.originSpecificReadPropertyDefinition(p.metadatas[q],t))&&d.read&&d.read.default,void 0!==d&&(g="function"===typeof d?d.call(g,q,t):d,void 0!==g&&p.set(q,g)));k.setDefaultOrigin("user")}Object.defineProperty(g,"__esModule",{value:!0});var c={origin:"service"};g.read=h;g.readLoadable=
function(b,e,a,k){void 0===k&&(k=c);e=p({},k,{messages:[]});a(e);e.messages.forEach(function(a){"warning"!==a.type||b.loaded?k&&k.messages.push(a):b.loadWarnings.push(a)})};g.default=h})},"esri/core/accessorSupport/write":function(){define("require exports ../Error ../Logger ./PropertyOrigin ./utils ./extensions/serializableProperty".split(" "),function(b,g,p,f,l,m,h){function c(a,c,b,f,h,q){if(!f||!f.write)return!1;var k=a.get(b);if(void 0===k)return!1;if(!h&&f.write.overridePolicy){var t=f.write.overridePolicy.call(a,
k,b,q);void 0!==t&&(h=t)}h||(h=f.write);if(!h||!1===h.enabled)return!1;if(null===k){if(h.allowNull)return!0;h.isRequired&&((a=new p("web-document-write:property-required","Missing value for required property '"+b+"' on '"+a.declaredClass+"'",{propertyName:b,target:a}),q)&&q.messages?q.messages.push(a):a&&!q&&e.error(a.name,a.message));return!1}return!h.ignoreOrigin&&q&&q.origin&&c.store.originOf(b)<l.nameToId(q.origin)?!1:!0}function q(a,b,e){if(a&&"function"===typeof a.toJSON&&(!a.toJSON.isDefaultToJSON||
!a.write))return m.merge(b,a.toJSON());var k=m.getProperties(a),f=k.metadatas,r;for(r in f){var q=h.originSpecificWritePropertyDefinition(f[r],e);if(c(a,k,r,q,null,e)){var t=a.get(r),d={};q.write.writer.call(a,t,d,"string"===typeof q.write.target?q.write.target:r,e);q=d;0<Object.keys(q).length&&(b=m.merge(b,q),e&&e.writtenProperties&&e.writtenProperties.push({target:a,propName:r,oldOrigin:l.idToReadableName(k.store.originOf(r)),newOrigin:e.origin}))}}return b}Object.defineProperty(g,"__esModule",
{value:!0});var e=f.getLogger("esri.core.accessorSupport.write");g.willPropertyWrite=function(a,b,e,f){var k=m.getProperties(a),r=h.originSpecificWritePropertyDefinition(k.metadatas[b],f);return r?c(a,k,b,r,e,f):!1};g.write=q;g.disableWriteDefaultPolicy=function(a){return function(c){return{enabled:c!==a}}};g.default=q})},"esri/core/Error":function(){define(["require","exports","./tsSupport/extendsHelper","./lang","./Message"],function(b,g,p,f,l){b=function(b){function h(c,f,e){var a=b.call(this,
c,f,e)||this;return a instanceof h?a:new h(c,f,e)}p(h,b);h.prototype.toJSON=function(){return{name:this.name,message:this.message,details:f.clone(this.details),dojoType:this.dojoType}};h.fromJSON=function(c){var b=new h(c.name,c.message,c.details);null!=c.dojoType&&(b.dojoType=c.dojoType);return b};return h}(l);b.prototype.type="error";return b})},"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,
p){b.__proto__=p}||function(b,p){for(var f in p)p.hasOwnProperty(f)&&(b[f]=p[f])};return function(g,p){function f(){this.constructor=g}b(g,p);g.prototype=null===p?Object.create(p):(f.prototype=p.prototype,new f)}}()})},"esri/core/Message":function(){define(["require","exports","dojo/string"],function(b,g,p){return function(){function b(f,g,h){this instanceof b&&(this.name=f,this.message=g&&p.substitute(g,h,function(c){return null==c?"":c})||"",this.details=h)}b.prototype.toString=function(){return"["+
this.name+"]: "+this.message};return b}()})},"esri/core/Loadable":function(){define("./Promise ./Accessor ./Error ./Warning ./lang dojo/aspect dojo/Deferred".split(" "),function(b,g,p,f,l,m,h){return b.createSubclass([g],{declaredClass:"esri.core.Loadable","-chains-":l.mixin({},g._meta.chains,{load:"after"}),constructor:function(){this._set("loadWarnings",[]);var c=new h;this.addResolvingPromise(c.promise);m.around(this,"load",function(b){return function(){"not-loaded"===this.loadStatus&&(this.loadStatus=
"loading",b.apply(this));c&&(c.resolve(),c=null);return this.when()}});this.when(function(c){this.loadStatus="loaded"}.bind(this),function(c){this.loadStatus="failed";this.loadError=c}.bind(this))},properties:{loaded:{readOnly:!0,dependsOn:["loadStatus"],get:function(){return"loaded"===this.loadStatus}},loadError:null,loadStatus:"not-loaded",loadWarnings:{type:[f],readOnly:!0}},load:function(){},cancelLoad:function(){if(this.isFulfilled())return this;this.loadError=new p("load:cancelled","Cancelled");
this._promiseProps.cancel(this.loadError);return this}})})},"esri/core/Promise":function(){define("dojo/promise/all dojo/Deferred dojo/aspect dojo/has dojo/errors/create ./scheduling ./Logger ./declare ./lang".split(" "),function(b,g,p,f,l,m,h,c,q){function e(c,b){a.warn("DEPRECATED: "+c+"()"+(b?" -- use "+b+" instead":""))}f.add("esri-promise-compatibility",!0);f.add("esri-promise-compatibility-deprecation-warnings",!0);var a=h.getLogger("esri.core.Promise"),k=function(a){var c=a._promiseProps;if(!c.resolver.isFulfilled()){var e=
c.resolvingPromises,d,n;c.allPromise&&c.allPromise.cancel();var k=new g;for(d=e.length-1;0<=d;d--)n=e[d],n.isCanceled&&n.isCanceled()?e.splice(d,1):n.then(null,null,c.resolver.progress);n=null;(c.allPromise=b(e.concat([k.promise]))).then(function(){c.resolver.resolve(a);a=c=k=c.allPromise=c.resolvingPromises=null},function(d){c.allPromise=null;if(!d||"cancel"!==d.dojoType){var b=Array.prototype.slice.call(arguments,0);c.resolver.reject(b[0]);a=c=k=c.allPromise=c.resolvingPromises=null}});k&&m.schedule(function(){k&&
k.resolve()})}},r=l("CancelError",null,function(a){this.target=a}),u=function(a){return a||new r(this.instance)},z=function(a){this.instance=a;this.canceler=u.bind(this);this.resolver=new g;this.initialized=!1;this.resolvingPromises=[]};z.prototype={canceler:null,cancel:function(a){if(!this.resolver.isFulfilled()){this.allPromise.cancel();for(var c=this.resolvingPromises.concat(),b=c.length-1;0<=b;b--)c[b].cancel(a);this.resolver.cancel(a)}}};l={declaredClass:"esri.core.Promise",constructor:function(){Object.defineProperty(this,
"_promiseProps",{value:new z(this),enumerable:!1,configurable:!1,writable:!0});var a=p.after(this,"postscript",function(c,b){a.remove();a=null;k(this)},!0)},_promiseProps:null,always:function(a){f("esri-promise-compatibility-deprecation-warnings")&&e("always",".when(callbackOrErrback, callbackOrErrback)");return this.when(a,a)},isResolved:function(){return this._promiseProps.resolver.isResolved()},isRejected:function(){return this._promiseProps.resolver.isRejected()},isFulfilled:function(){return this._promiseProps.resolver.isFulfilled()},
otherwise:function(a){f("esri-promise-compatibility-deprecation-warnings")&&e("otherwise",".when().catch(errback)");return this.when(null,a)},catch:function(a){return this.when(null,a)},when:function(a,c,b){var d=new g(this._promiseProps.canceler);a=d.then(a,c,b);this._promiseProps.resolver.then(d.resolve,d.reject,d.progress);return a},addResolvingPromise:function(a){a&&!this._promiseProps.resolver.isFulfilled()&&(a._promiseProps&&(a=a.when()),this._promiseProps.resolvingPromises.push(a),k(this))}};
f("esri-promise-compatibility")||(l=q.mixin(l,{then:function(a,c,b){f("esri-promise-compatibility-deprecation-warnings")&&e("then",".when(callback, errback)");return this.when(a,c,b)},cancel:function(){f("esri-promise-compatibility-deprecation-warnings")&&e("cancel")},isCanceled:function(){f("esri-promise-compatibility-deprecation-warnings")&&e("isCanceled");return!1},trace:function(){f("esri-promise-compatibility-deprecation-warnings")&&e("trace");return this},traceRejected:function(){f("esri-promise-compatibility-deprecation-warnings")&&
e("traceRejected");return this}}));return c(null,l)})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(b,g,p){var f=b.some;return function(b){var l,h;b instanceof Array?h=b:b&&"object"===typeof b&&(l=b);var c,q=[];if(l){h=[];for(var e in l)Object.hasOwnProperty.call(l,e)&&(q.push(e),h.push(l[e]));c={}}else h&&(c=[]);if(!h||!h.length)return(new g).resolve(c);var a=new g;a.promise.always(function(){c=q=null});var k=h.length;f(h,function(b,e){l||q.push(e);p(b,
function(b){a.isFulfilled()||(c[q[e]]=b,0===--k&&a.resolve(c))},a.reject);return a.isFulfilled()});return a.promise}})},"esri/core/Warning":function(){define(["require","exports","./tsSupport/extendsHelper","./tsSupport/decorateHelper","./Message"],function(b,g,p,f,l){b=function(b){function f(c,h,e){var a=b.call(this,c,h,e)||this;return a instanceof f?a:new f(c,h,e)}p(f,b);return f}(l);b.prototype.type="warning";return b})},"esri/core/promiseUtils":function(){define("require exports dojo/Deferred dojo/when dojo/promise/all ./Error".split(" "),
function(b,g,p,f,l,m){function h(c){if(c){if("function"!==typeof c.forEach){var b=Object.keys(c),e=b.map(function(a){return c[a]});return h(e).then(function(a){var c={};b.forEach(function(b,e){return c[b]=a[e]});return c})}var a=new p,k=[],f=c.length;0===f&&a.resolve(k);c.forEach(function(c){var b={promise:c};k.push(b);c.then(function(a){b.value=a}).catch(function(a){b.error=a}).then(function(){--f;0===f&&a.resolve(k)})});return a.promise}}Object.defineProperty(g,"__esModule",{value:!0});g.all=function(c){return l(c)};
g.filter=function(c,b){var e=c.slice();return l(c.map(function(a,c){return b(a,c)})).then(function(a){return e.filter(function(c,b){return a[b]})})};g.eachAlways=h;g.create=function(c,b){var e=new p(b);c(function(a){void 0===a&&(a=null);return f(a).then(e.resolve)},e.reject);return e.promise};g.reject=function(c){var b=new p;b.reject(c);return b.promise};g.resolve=function(c){void 0===c&&(c=null);var b=new p;b.resolve(c);return b.promise};g.after=function(c,b){void 0===b&&(b=null);var e=0,a=new p(function(){e&&
(clearTimeout(e),e=0)}),e=setTimeout(function(){a.resolve(b)},c);return a.promise};g.timeout=function(c,b,e){var a=0,k=new p(c.cancel);c.then(function(c){k.isFulfilled()||(k.resolve(c),a&&(clearTimeout(a),a=0))});c.catch(function(c){k.isFulfilled()||(k.reject(c),a&&(clearTimeout(a),a=0))});a=setTimeout(function(){var a=e||new m("promiseUtils:timeout","The wrapped promise did not resolve within "+b+" ms");k.reject(a)},b);return k.promise};g.wrapCallback=function(c){var b=!1,e=new p(function(){return b=
!0});c(function(a){b||e.resolve(a)});return e.promise};g.isThenable=function(c){return c&&"function"===typeof c.then};g.when=function(c){return f(c)}})},"esri/core/urlUtils":function(){define("require exports ./tsSupport/assignHelper dojo/io-query dojo/_base/url ../config ./Error ./global ./lang ./Logger ./sniff".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){function k(d){var a={path:null,query:null},c=new l(d),b=d.indexOf("?");null===c.query?a.path=d:(a.path=d.substring(0,b),a.query=f.queryToObject(c.query));
c.fragment&&(a.hash=c.fragment,null===c.query&&(a.path=a.path.substring(0,a.path.length-(c.fragment.length+1))));return a}function r(c,b){void 0===c&&(c=!1);void 0===b&&(b=!0);var n,e=P.proxyUrl;if("string"===typeof c){if(n=I(c),c=v(c))e=c.proxyUrl}else n=!!c;if(!e)throw J.warn("esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers."),new h("urlutils:proxy-not-set","esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers.");
var f;n&&b&&a("esri-secure-context")&&(b=M(e),d(b)&&(e=b,f=1));e=k(e);e._xo=f;return e}function u(d){var a=d.indexOf("?");-1!==a?(ka.path=d.slice(0,a),ka.query=d.slice(a+1)):(ka.path=d,ka.query=null);return ka}function z(d){d=u(d).path;d&&"/"===d[d.length-1]||(d+="/");d=W(d,!0);return d=d.toLowerCase()}function v(d){var a=P.proxyRules;d=z(d);for(var c=0;c<a.length;c++)if(0===d.indexOf(a[c].urlPrefix))return a[c]}function w(d){d=D(d);var a=d.indexOf("/sharing");return 0<a?d.substring(0,a):d.replace(/\/+$/,
"")}function t(d,a,c){void 0===c&&(c=!1);d=O(d);a=O(a);return c||d.scheme===a.scheme?d.host.toLowerCase()===a.host.toLowerCase()&&d.port===a.port:!1}function d(d){return a("esri-phonegap")?!0:a("esri-cors")?null!=n(d):!1}function n(d,a){void 0===a&&(a=!1);"string"===typeof d&&(d=C(d)?O(d):g.appUrl);for(var c=P.corsEnabledServers||[],b=0;b<c.length;b++){var n=c[b],e=void 0,k=void 0;n instanceof RegExp?k=n:"string"===typeof n?e=x(n):n.host?n.host instanceof RegExp?k=n.host:e=x(n.host):e=[];if(k){if(k.test(d.uri))return a?
b:n}else for(k=0;k<e.length;k++)if(t(d,e[k]))return a?b:n}return a?-1:null}function x(d){g.corsServersUrlCache[d]||(V(d)||Z(d)?g.corsServersUrlCache[d]=[new l(y(d))]:g.corsServersUrlCache[d]=[new l("http://"+d),new l("https://"+d)]);return g.corsServersUrlCache[d]}function y(d,a,c){void 0===a&&(a=g.appBaseUrl);if(Z(d))return c&&c.preserveProtocolRelative?d:"http"===g.appUrl.scheme&&g.appUrl.authority===F(d).slice(2)?"http:"+d:"https:"+d;if(V(d))return d;c=B;if("/"===d[0]){var b=a.indexOf("//"),b=
a.indexOf("/",b+2);a=-1===b?a:a.slice(0,b)}return c(a,d)}function A(d,a,c){void 0===a&&(a=g.appBaseUrl);if(!C(d))return d;var b=D(d),n=b.toLowerCase();a=D(a).toLowerCase().replace(/\/+$/,"");if((c=c?D(c).toLowerCase().replace(/\/+$/,""):null)&&0!==a.indexOf(c))return d;for(var e=function(d,a,c){c=d.indexOf(a,c);return-1===c?d.length:c},k=e(n,"/",n.indexOf("//")+2),f=-1;n.slice(0,k+1)===a.slice(0,k)+"/";){f=k+1;if(k===n.length)break;k=e(n,"/",k+1)}if(-1===f||c&&f<c.length)return d;d=b.slice(f);b=a.slice(f-
1).replace(/[^/]+/g,"").length;if(0<b)for(n=0;n<b;n++)d="../"+d;else d="./"+d;return d}function D(a){a=a.trim();a=y(a);if(/^https?:\/\//i.test(a)){var c=u(a);a=c.path.replace(/\/{2,}/g,"/");a=a.replace("/","//");c.query&&(a+="?"+c.query)}a=a.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2");a="http"===g.appUrl.scheme&&I(a)&&t(g.appBaseUrl,a,!0)&&!d(a)?Z(a)?"http:"+a:a.replace(Q,"http:"):a;return a=N(a)}function B(){for(var d=[],a=0;a<arguments.length;a++)d[a]=arguments[a];if(d&&d.length){a=[];if(C(d[0])){var c=
d[0],b=c.indexOf("//");a.push(c.slice(0,b+1));U.test(d[0])&&(a[0]+="/");d[0]=c.slice(b+2)}else"/"===d[0][0]&&a.push("");d=d.reduce(function(d,a){return a?d.concat(a.split("/")):d},[]);for(c=0;c<d.length;c++)b=d[c],".."===b&&0<a.length?a.pop():!b||"."===b&&0!==a.length||a.push(b);return a.join("/")}}function F(d){if(G(d)||ba(d))return null;var a=d.indexOf("://");if(-1===a&&Z(d))a=2;else if(-1!==a)a+=3;else return null;a=d.indexOf("/",a);return-1===a?d:d.slice(0,a)}function C(d){return Z(d)||V(d)}function G(d){return"blob:"===
d.slice(0,5)}function ba(d){return"data:"===d.slice(0,5)}function Z(d){return d&&"/"===d[0]&&"/"===d[1]}function V(d){return S.test(d)}function I(d){return Q.test(d)||"https"===g.appUrl.scheme&&Z(d)}function fa(d){return ca.test(d)||"http"===g.appUrl.scheme&&Z(d)}function M(d){return Z(d)?"https:"+d:d.replace(ca,"https:")}function W(d,a){void 0===a&&(a=!1);if(Z(d))return d.slice(2);d=d.replace(S,"");a&&1<d.length&&"/"===d[0]&&"/"===d[1]&&(d=d.slice(2));return d}function N(c){var b=P.httpsDomains;
if(!fa(c))return c;var n=c.indexOf("/",7),e;e=-1===n?c:c.slice(0,n);e=e.toLowerCase().slice(7);if(Y.test(e))if(q.endsWith(e,":80"))e=e.slice(0,-3),c=c.replace(":80","");else return c;if(!("http"!==g.appUrl.scheme||e!==g.appUrl.authority||ga.test(c)&&d(c)))return c;if("https"===g.appUrl.scheme&&e===g.appUrl.authority||b&&b.some(function(d){return e===d||q.endsWith(e,"."+d)})||a("esri-secure-context")&&!P.forceProxy&&!v(c))c=M(c);return c}function H(d,a,c){if(!(a&&c&&d&&C(d)))return d;var b=d.indexOf("//"),
n=d.indexOf("/",b+2),e=d.indexOf(":",b+2),n=Math.min(0>n?d.length:n,0>e?d.length:e);if(d.slice(b+2,n).toLowerCase()!==a.toLowerCase())return d;a=d.slice(0,b+2);d=d.slice(n);return""+a+c+d}function O(d){if("string"===typeof d)return new l(y(d));d.scheme||(d.scheme=g.appUrl.scheme);return d}Object.defineProperty(g,"__esModule",{value:!0});var J=e.getLogger("esri.core.urlUtils"),P=m.request,S=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,ca=/^\s*http:/i,Q=/^\s*https:/i,U=/^\s*file:/i,Y=/:\d+$/,ga=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;
g.appUrl=new l(c.location);g.corsServersUrlCache={};g.appBaseUrl=function(){var d=g.appUrl.path,d=d.substring(0,d.lastIndexOf(d.split("/")[d.split("/").length-1]));return""+(g.appUrl.scheme+"://"+g.appUrl.host+(null!=g.appUrl.port?":"+g.appUrl.port:""))+d}();g.urlToObject=k;g.getProxyUrl=r;g.addProxy=function(d){var a=v(d),c,b;a?(b=u(a.proxyUrl),c=b.path,b=b.query?f.queryToObject(b.query):null):P.forceProxy&&(b=r(),c=b.path,b=b.query);c&&(a=k(d),d=c+"?"+a.path,(c=f.objectToQuery(p({},b,a.query)))&&
(d=d+"?"+c));return d};var ka={path:"",query:""};g.addProxyRule=function(d){d={proxyUrl:d.proxyUrl,urlPrefix:z(d.urlPrefix)};for(var a=P.proxyRules,c=d.urlPrefix,b=a.length,n=0;n<a.length;n++){var e=a[n].urlPrefix;if(0===c.indexOf(e)){if(c.length===e.length)return-1;b=n;break}0===e.indexOf(c)&&(b=n+1)}a.splice(b,0,d);return b};g.getProxyRule=v;g.hasSamePortal=function(d,a){d=w(d);a=w(a);return W(d)===W(a)};g.getInterceptor=function(d){var a=function(a){return null==a||a instanceof RegExp&&a.test(d)||
"string"===typeof a&&q.startsWith(d,a)},c=P.interceptors;if(c)for(var b=0;b<c.length;b++){var n=c[b];if(Array.isArray(n.urls)){if(n.urls.some(a))return n}else if(a(n.urls))return n}return null};g.hasSameOrigin=t;g.canUseXhr=d;g.getCorsConfig=n;g.makeAbsolute=y;g.makeRelative=A;g.normalize=D;g.join=B;g.getOrigin=F;g.isAbsolute=C;g.isBlobProtocol=G;g.isDataProtocol=ba;var ha=/^data:(.*?)(;base64)?,(.*)$/;g.dataComponents=function(d){return(d=d.match(ha))?{mediaType:d[1],isBase64:!!d[2],data:d[3]}:null};
g.makeData=function(d){return d.isBase64?"data:"+d.mediaType+";base64,"+d.data:"data:"+d.mediaType+","+d.data};g.isProtocolRelative=Z;g.hasProtocol=V;g.toHTTPS=M;g.removeFile=function(d){var a=0;if(C(d)){var c=d.indexOf("//");-1!==c&&(a=c+2)}c=d.lastIndexOf("/");return c<a?d:d.slice(0,c+1)};g.removeTrailingSlash=function(d){return d.replace(/\/+$/,"")};g.changeDomain=H;g.read=function(d,a){var c=a&&a.url&&a.url.path;d&&c&&(d=y(d,c,{preserveProtocolRelative:!0}));(a=a&&a.portal)&&!a.isPortal&&a.urlKey&&
a.customBaseUrl?(c=a.urlKey+"."+a.customBaseUrl,a=t(g.appUrl,g.appUrl.scheme+"://"+c)?H(d,a.portalHostname,c):H(d,c,a.portalHostname)):a=d;return a};g.write=function(d,a){if(!d)return d;!C(d)&&a&&a.blockedRelativeUrls&&a.blockedRelativeUrls.push(d);var c=y(d);if(a){var b=a.verifyItemRelativeUrls&&a.verifyItemRelativeUrls.rootPath||a.url&&a.url.path;b&&(c=A(c,b,b),c!==d&&a.verifyItemRelativeUrls&&a.verifyItemRelativeUrls.writtenUrls.push(c))}d=c;c=(a=a&&a.portal)&&!a.isPortal&&a.urlKey&&a.customBaseUrl?
H(d,a.urlKey+"."+a.customBaseUrl,a.portalHostname):d;return c};g.writeOperationalLayerUrl=function(d,a){d&&Z(d)&&(d="https:"+d);a.url=d?D(d):d};g.isSVG=function(d){return qa.test(d)};g.removeQueryParameters=function(d,a){d=k(d);var c=Object.keys(d.query||{});0<c.length&&a&&a.warn("removeQueryParameters()","Url query parameters are not supported, the following parameters have been removed: "+c.join(", ")+".");return d.path};var qa=/(^data:image\/svg|\.svg$)/i})},"dojo/_base/url":function(){define(["./kernel"],
function(b){var g=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,p=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,f=function(){for(var b=arguments,m=[b[0]],h=1;h<b.length;h++)if(b[h]){var c=new f(b[h]+""),m=new f(m[0]+"");if(""==c.path&&!c.scheme&&!c.authority&&!c.query)null!=c.fragment&&(m.fragment=c.fragment),c=m;else if(!c.scheme&&(c.scheme=m.scheme,!c.authority&&(c.authority=m.authority,"/"!=c.path.charAt(0)))){for(var m=(m.path.substring(0,m.path.lastIndexOf("/")+
1)+c.path).split("/"),q=0;q<m.length;q++)"."==m[q]?q==m.length-1?m[q]="":(m.splice(q,1),q--):0<q&&(1!=q||""!=m[0])&&".."==m[q]&&".."!=m[q-1]&&(q==m.length-1?(m.splice(q,1),m[q-1]=""):(m.splice(q-1,2),q-=2));c.path=m.join("/")}m=[];c.scheme&&m.push(c.scheme,":");c.authority&&m.push("//",c.authority);m.push(c.path);c.query&&m.push("?",c.query);c.fragment&&m.push("#",c.fragment)}this.uri=m.join("");b=this.uri.match(g);this.scheme=b[2]||(b[1]?"":null);this.authority=b[4]||(b[3]?"":null);this.path=b[5];
this.query=b[7]||(b[6]?"":null);this.fragment=b[9]||(b[8]?"":null);null!=this.authority&&(b=this.authority.match(p),this.user=b[3]||null,this.password=b[4]||null,this.host=b[6]||b[7],this.port=b[9]||null)};f.prototype.toString=function(){return this.uri};return b._Url=f})},"esri/config":function(){define(["require","exports","./core/global"],function(b,g,p){return{screenDPI:96,fontsUrl:"https://static.arcgis.com/fonts",geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",
geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{corsDetection:!(p&&p.cordova),corsDetectionTimeout:15,corsEnabledServers:[/^https?:\/\/.+\.arcgis\.com(\/|$)/i,"basemaps.arcgis.com","basemapsbeta.arcgis.com","basemapsbetadev.arcgis.com","basemapsdev.arcgis.com","cdn.arcgis.com","cdn-a.arcgis.com","cdn-b.arcgis.com","demographics1.arcgis.com",
"demographics2.arcgis.com","demographics3.arcgis.com","demographics4.arcgis.com","demographics5.arcgis.com","demographics6.arcgis.com","dev.arcgis.com","devext.arcgis.com","elevation3d.arcgis.com","elevation3ddev.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","geocode.arcgis.com","geocodedev.arcgis.com","geocodeqa.arcgis.com","geoenrich.arcgis.com","geoenrichdev.arcgis.com","geoenrichqa.arcgis.com","localvtiles.arcgis.com","qaext.arcgis.com","server.arcgisonline.com","services.arcgis.com",
"services.arcgisonline.com","services1.arcgis.com","services2.arcgis.com","services3.arcgis.com","services4.arcgis.com","services5.arcgis.com","services6.arcgis.com","services7.arcgis.com","services8.arcgis.com","services9.arcgis.com","servicesdev.arcgis.com","servicesdev1.arcgis.com","servicesdev2.arcgis.com","servicesdev3.arcgis.com","servicesqa.arcgis.com","servicesqa1.arcgis.com","servicesqa2.arcgis.com","servicesqa3.arcgis.com","static.arcgis.com","staticqa.arcgis.com","staticdev.arcgis.com",
"tiles.arcgis.com","tiles1.arcgis.com","tiles2.arcgis.com","tiles3.arcgis.com","tiles4.arcgis.com","tilesdevext.arcgis.com","tilesqa.arcgis.com","utility.arcgis.com","utility.arcgisonline.com","www.arcgis.com"],corsStatus:{},forceProxy:!1,interceptors:[],maxUrlLength:2E3,proxyRules:[],proxyUrl:null,timeout:6E4,useIdentity:!0,useCors:"with-credentials",httpsDomains:"arcgis.com arcgisonline.com esrikr.com premiumservices.blackbridge.com esripremium.accuweather.com gbm.digitalglobe.com firstlook.digitalglobe.com msi.digitalglobe.com".split(" ")}}})},
"esri/layers/Layer":function(){define("require dojo/Deferred ../core/Accessor ../core/Error ../core/Evented ../core/Identifiable ../core/Loadable ../core/urlUtils ../core/promiseUtils ../core/Logger ../config ../kernel ../request ../geometry/SpatialReference ../geometry/Extent".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z){var v=0,w=e.getLogger("esri.layers.Layer");p=p.createSubclass([l,m,h],{declaredClass:"esri.layers.Layer",properties:{attributionDataUrl:null,credential:{value:null,readOnly:!0,
dependsOn:["loaded","parsedUrl"],get:function(){return this.loaded&&this.parsedUrl&&k.id&&k.id.findCredential(this.parsedUrl.path)||null}},fullExtent:new z(-180,-90,180,90,u.WGS84),hasAttributionData:{readOnly:!0,dependsOn:["attributionDataUrl"],get:function(){return null!=this.attributionDataUrl}},id:{get:function(){return Date.now().toString(16)+"-layer-"+v++}},legendEnabled:!0,listMode:"show",opacity:{value:1,type:Number,cast:function(a){return 0>a?0:1<a?1:a}},parent:null,parsedUrl:{readOnly:!0,
dependsOn:["url"],get:function(){var a=this._get("url");return a?c.urlToObject(a):null}},popupEnabled:!0,attributionVisible:!0,spatialReference:u.WGS84,title:null,token:{dependsOn:["credential.token"],get:function(){var a=this.get("parsedUrl.query.token"),d=this.get("credential.token");return a||d||null},set:function(a){a?this._override("token",a):this._clearOverride("token")}},type:{type:String,readOnly:!0,value:null,json:{read:!1}},url:{value:null},visible:!0},initialize:function(){this.when().catch(function(a){e.getLogger(this.declaredClass).error("#load()",
"Failed to load layer (title: '"+this.title+"', id: '"+this.id+"')",a)}.bind(this))},createLayerView:function(a){return a?this.importLayerViewModule(a).then(function(d){d.default&&(d=d.default);return new d({layer:this,view:a})}.bind(this)):q.reject(new f("layerview:module-unavailable","No LayerView module available for layer '${layer.declaredClass}' and view type: '${view.type}'",{view:a,layer:this}))},destroyLayerView:function(a){a.destroy()},fetchAttributionData:function(){var a=this.attributionDataUrl;
this.hasAttributionData&&a?a=r(a,{query:{f:"json"},responseType:"json"}).then(function(d){return d.data}):(a=new g,a.reject(new f("layer:no-attribution-data","Layer does not have attribution data")),a=a.promise);return a},refresh:function(){this.emit("refresh")},importLayerViewModule:function(a){return q.reject(new f("layerview:override-method","Must provide implementation in '${layer.declaredClass}'",{view:a,layer:this}))}});p.fromArcGISServerUrl=function(a){"string"===typeof a&&(a={url:a});var d=
q.create(function(d){b(["./support/arcgisLayers"],d)}).then(function(d){return d.fromUrl(a)});d.catch(function(d){w.error("#fromArcGISServerUrl({ url: '"+a.url+"'})","Failed to create layer from arcgis server url",d)});return d};p.fromPortalItem=function(c){!c||c.portalItem||"object"!==typeof c||c.declaredClass&&"esri.portal.PortalItem"!==c.declaredClass||(c={portalItem:c});var d=q.create(function(d){b(["../portal/support/portalLayers"],d)}).then(function(d){return d.fromItem(c)});d.catch(function(d){var b=
c&&c.portalItem;w.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+(b&&b.portal&&b.portal.url||a.portalUrl)+"', id: '"+(b&&b.id||"unset")+"')",d)});return d};return p})},"esri/core/Identifiable":function(){define(["./declare"],function(b){var g=0;return b(null,{constructor:function(){Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+g++})}})})},"esri/kernel":function(){define(["require","./core/promiseUtils","dojo/main",
"dojo/has"],function(b,g,p,f){(function(){var b=p.config,g=b.has&&void 0!==b.has["config-deferredInstrumentation"],h=b.has&&void 0!==b.has["config-useDeferredInstrumentation"];void 0!==b.useDeferredInstrumentation||g||h||(f.add("config-deferredInstrumentation",!1,!0,!0),f.add("config-useDeferredInstrumentation",!1,!0,!0))})();return{version:"4.8",workerMessages:{request:function(f){return g.create(function(f){b(["./request"],f)}).then(function(b){var h=f.options||{};h.responseType="array-buffer";
return b(f.url,h)}).then(function(b){return{result:{data:b.data,ssl:b.ssl},transferList:[b.data]}})}}}})},"dojo/main":function(){define("./_base/kernel ./has require ./sniff ./_base/lang ./_base/array ./_base/config ./ready ./_base/declare ./_base/connect ./_base/Deferred ./_base/json ./_base/Color require ./has!host-browser?./_base/browser require".split(" "),function(b,g,p,f,l,m,h,c){h.isDebug&&p(["./_firebug/firebug"]);return b})},"esri/request":function(){define("require exports ./core/tsSupport/assignHelper dojo/Deferred dojo/has!host-browser?./core/request/script dojo/has!host-webworker?./core/workers/request dojo/io-query dojo/_base/url dojo/request/xhr ./config ./core/deferredUtils ./core/Error ./core/global ./core/lang ./core/promiseUtils ./core/sniff ./core/urlUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w){function t(d){var a=h.objectToQuery(d.content);a&&(d.url+=(-1===d.url.indexOf("?")?"?":"\x26")+a);if(!w.isDataProtocol(d.url)&&2E3<d.url.length)return z.reject(u.mixin(Error(),{message:"When using responseType 'image', URL length cannot exceed 2000 characters."}));var c=new Image;d.allowImageDataAccess&&(c.crossOrigin=d.withCredentials?"use-credentials":"anonymous");var b=!1,n=new f(function(){b=!0;c.onload=c.onerror=c.onabort=null;c.src=""}),a=function(){c.onload=
c.onerror=c.onabort=null;b||n.reject(Error("Unable to load the resource"))};c.onload=function(){c.onload=c.onerror=c.onabort=null;b||n.resolve(this)};c.onerror=a;c.onabort=a;c.alt="";c.src=d.url;return n.promise}function d(d){d=new c(d);return(d.host+(d.port?":"+d.port:"")).toLowerCase()}function n(){return fa?fa:fa=z.create(function(d){b(["./identity/IdentityManager"],d)}).then(function(d){I=d})}function x(d,a){var c=!!d.useProxy,b=d.method||"auto",n=u.isDefined(d.crossOrigin)?d.crossOrigin:C.useCors;
d=p({},d);d._ssl&&(d.url=d.url.replace(/^http:/i,"https:"));var e=d.content,k=d.url;d._token&&(d.content=d.content||{},d.content.token=d._token);var r=0,x;k&&(x=h.objectToQuery(e),r=x.length+k.length+1,v("esri-url-encodes-apostrophe")&&(r=x.replace(/'/g,"%27").length+k.length+1));d.timeout=u.isDefined(d.timeout)?d.timeout:C.timeout;d.handleAs=d.handleAs||"json";try{var g=x=void 0,m=n&&w.canUseXhr(d.urlObj)&&!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(d.url),y=w.hasSameOrigin(d.urlObj,w.appUrl)||
m,z="post"===b||!!d.body||r>C.maxUrlLength,A=!y&&-1!==d.handleAs.indexOf("json")&&d.callbackParamName&&!d.body,B=!!w.getProxyRule(d.url)||C.forceProxy||c||("image"!==d.handleAs||d.allowImageDataAccess)&&(!A||z)&&!y;B&&(w.isBlobProtocol(d.url)||w.isDataProtocol(d.url))&&(B=!1);if((v("host-browser")||v("host-webworker"))&&B)if(x=w.getProxyUrl(k,n),g=x.path,x._xo&&(m=!0),!z&&g.length+1+r>C.maxUrlLength&&(z=!0),d.url=g+"?"+k,z)d.content=u.mixin(x.query||{},e);else{var D=h.objectToQuery(u.mixin(x.query||
{},e));D&&(d.url+=(-1===k.indexOf("?")?"?":"\x26")+D);d.content=null}if(A&&!z&&!B&&v("host-browser"))return d.jsonp=d.callbackParamName,d.query=d.content,l.get(d.url,d);var F=d.headers;!v("host-browser")&&!v("host-webworker")||F&&F.hasOwnProperty("X-Requested-With")||(F=d.headers=F||{},F["X-Requested-With"]=null);if(v("host-browser")&&a){var G=d.content&&d.content.token;G&&(a.set?a.set("token",G):a.append("token",G));d.contentType=!1}if(m&&!d.hasOwnProperty("withCredentials")&&"with-credentials"===
C.useCors){var c=B?g:k,Z=w.getCorsConfig(c);if(Z&&Z.hasOwnProperty("withCredentials"))Z.withCredentials&&(d.withCredentials=!0);else if(I){var fa=I.findServerInfo(c);fa&&fa.webTierAuth&&(d.withCredentials=!0)}}if("image"===d.handleAs)return t(d);if(z)return d.body?(d.data=a||d.body,d.query=d.content):d.data=d.content,delete d.body,delete d.content,!B&&v("safari")&&(d.url+=(-1===d.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+ba++),q.post(d.url,d);d.query=d.content;delete d.content;return q.get(d.url,
d)}catch(sa){return d=new f,d.reject(sa),d.promise}}function y(d){d=d.toLowerCase();return-1!==d.indexOf("/rest/services")||-1!==d.indexOf("/rest/admin/services")}function A(a){var c=C.corsStatus;try{var b=d(a.url);if(C.corsDetection&&C.useCors&&v("esri-cors")&&a.url&&y(a.url)&&!w.hasSameOrigin(a.urlObj,w.appUrl)&&!w.canUseXhr(a.urlObj)){if(c[b])return c[b];var n=new f;c[b]=n.promise;var e=a.url.substring(0,a.url.toLowerCase().indexOf("/rest/")+6)+"info";q.get(e,{query:{f:"json"},handleAs:"json",
headers:{"X-Requested-With":null},timeout:1E3*C.corsDetectionTimeout}).then(function(d){d?(w.canUseXhr(a.url)||C.corsEnabledServers.push(b),n.resolve()):n.reject()},function(d){n.reject()});return n.promise}}catch(J){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}return V}function D(a,c,b,n){function e(a){a._pendingDfd=x(b,q);var c=!!a._pendingDfd.response;(a._pendingDfd.response||a._pendingDfd).then(function(d){if(!c||!d.data)return d;var a=d.getHeader("Content-Type");
if(a&&(a=a.toLowerCase(),-1===a.indexOf("text/plain")&&-1===a.indexOf("application/json")))return d;a=d.data;if(a instanceof ArrayBuffer&&750>=a.byteLength)a=new Blob([a]);else if(!(a instanceof Blob&&750>=a.size))return d;var b=new f,n=new FileReader;n.readAsText(a);n.onloadend=function(){if(!n.error)try{var a=JSON.parse(n.result);a.error&&(Object.isExtensible(d)||(d=p({},d)),d._jsonData=a)}catch(ra){}b.resolve(d)};return b.promise}).then(function(d){var b=c?d.data:d,e=c?d.getHeader.bind(d):Z;if(b&&
(d=c&&d._jsonData||b,d.error||"error"===d.status))throw b=u.mixin(Error(),d.error||d),b.getHeader=e,b;a.resolve({data:b,url:n.url,requestOptions:n.requestOptions,getHeader:e});a._pendingDfd=null}).catch(function(c){var e,t,r;c&&(e=Number(c.code),t=c.hasOwnProperty("subcode")?Number(c.subcode):null,r=(r=c.messageCode)&&r.toUpperCase());if(c&&403===e&&(4===t||c.message&&-1<c.message.toLowerCase().indexOf("ssl")&&-1===c.message.toLowerCase().indexOf("permission"))){if(!b._ssl){b._ssl=b._sslFromServer=
!0;D(a,!0,b,n);return}}else if(c&&415===c.status){if(e=b.url,t=C.corsStatus,r=w.getCorsConfig(e,!0),-1<r&&C.corsEnabledServers.splice(r,1),r=new f,r.reject(new k("disabled")),t[d(e)]=r.promise,!b._err415){b._err415=1;D(a,!0,b,n);return}}else if(h&&"no-prompt"!==b.authMode&&I._errorCodes&&-1!==I._errorCodes.indexOf(e)&&!I._isPublic(b.url)&&(403!==e||G&&-1===G.indexOf(r)&&(!u.isDefined(t)||2===t&&b._token))){B(a,b,n,F("request:server",c,n));return}a.reject(F("request:server",c,n));a._pendingDfd=null})}
var t=b.body,h=b.useIdentity,r,q=null,g=t instanceof FormData;if(g||t&&t.elements)q=g?t:new FormData(t);var l=!!(-1!==b.url.toLowerCase().indexOf("token\x3d")||b.content&&b.content.token||q&&q.get&&q.get("token")||t&&t.elements&&t.elements.token);c||(!h||l||b._token||I._isPublic(b.url)||(c=function(d){d&&(b._token=d.token,b._ssl=d.ssl)},"immediate"===b.authMode?r=I.getCredential(b.url).then(c):"no-prompt"===b.authMode?r=I.checkSignInStatus(b.url).then(c).catch(function(){}):c(I.findCredential(b.url))),
a.then(function(a){if((/\/sharing\/rest\/accounts\/self/i.test(b.url)||/\/sharing\/rest\/portals\/self/i.test(b.url))&&!l&&!b._token&&a.user&&a.user.username){var c=C.corsEnabledServers,n=w.getCorsConfig(b.url,!0),e={host:d(b.url),withCredentials:!0};if(-1===n)c.push(e);else{var k=c[n];k instanceof RegExp?(e.host=k,c.splice(n,1,e)):"object"===typeof k?k.withCredentials=!0:c.splice(n,1,e)}}if(c=b._credential)n=(n=I.findServerInfo(c.server))&&n.owningSystemUrl,e=void 0,n&&(n=n.replace(/\/?$/,"/sharing"),
(e=I.findCredential(n,c.userId))&&-1===I._getIdenticalSvcIdx(n,e)&&e.resources.splice(0,0,n));return a}).always(function(d){delete b._credential;if(d){var a=!!b._ssl;d instanceof k?d.details.ssl=a:d.ssl=a}}));r?r.then(function(){e(a)}).catch(function(d){a.reject(d)}):e(a);return a.promise}function B(d,a,c,b){d._pendingDfd=I.getCredential(a.url,{error:b,token:a._token});d._pendingDfd.then(function(b){a._token=b.token;a._credential=b;a._ssl=a._sslFromServer||b.ssl;D(d,!0,a,c)}).catch(function(a){d.reject(a);
d._pendingDfd=null})}function F(d,a,c){var b="Error",n={url:c.url,requestOptions:c.requestOptions,getHeader:Z};if(a instanceof k)return a.details?(a.details=u.clone(a.details),a.details.url=c.url,a.details.requestOptions=c.requestOptions):a.details=n,a;if(a){var e=a.response;c=e&&e.getHeader;var e=e&&e.status,f=a.message;c=a.getHeader||c;f&&(b=f);c&&(n.getHeader=c);n.httpStatus=(u.isDefined(a.httpCode)?a.httpCode:a.code)||e;n.subCode=a.subcode;n.messageCode=a.messageCode;n.messages="string"===typeof a.details?
[a.details]:a.details}d=new k(d,b,n);a&&"cancel"===a.dojoType&&(d.dojoType="cancel");return d}var C=e.request,G=["COM_0056","COM_0057"],ba=0,Z=function(){return null},V=(new f).resolve(),I,fa;return function(d,b){if(m&&r.invokeStaticMessage)return m.execute(d,b);w.isBlobProtocol(d)||w.isDataProtocol(d)||(d=w.normalize(d));var e={url:d,requestOptions:p({},b)},f=w.getInterceptor(d);if(f){if(null!=f.responseData)return z.resolve({data:f.responseData,requestOptions:e.requestOptions,getHeader:Z,url:d});
f.headers&&(e.requestOptions.headers=p({},e.requestOptions.headers,f.headers));f.query&&(e.requestOptions.query=p({},e.requestOptions.query,f.query));if(f.before&&(b=f.before(e),null!=b))return b instanceof Error||b instanceof k?z.reject(F("request:interceptor",b,e)):z.resolve({data:b,requestOptions:e.requestOptions,getHeader:Z,url:e.url})}var t=p({url:e.url},e.requestOptions);t.content=t.query;delete t.query;t.preventCache=!!t.cacheBust;delete t.cacheBust;t.handleAs=t.responseType;delete t.responseType;
"array-buffer"===t.handleAs&&(t.handleAs="arraybuffer");if("image"===t.handleAs){if(v("host-webworker"))return z.reject(F("request:invalid-parameters",Error("responseType 'image' is not supported in Web Workers or Node environment"),e));t.preventCache&&(t.content=t.content||{},t.content["request.preventCache"]=Date.now());t.method="auto"}else if(w.isDataProtocol(d))return z.reject(F("request:invalid-parameters",Error("Data URLs are not supported for responseType \x3d "+t.handleAs),e));var h=C.useIdentity;
"anonymous"===t.authMode&&(h=!1);t.useIdentity=h;t.urlObj=new c(t.url);var x=a.makeDeferredCancellingPending();A(t).always(function(){if(h&&!I)return n()}).always(function(){D(x,!1,t,e)});return x.then(function(d){f&&f.after&&f.after(d);return d})}})},"esri/core/deferredUtils":function(){define(["dojo/Deferred"],function(b){var g={makeDeferredCancellingPending:function(){var p={},f=g._dfdCanceller.bind(null,p),f=new b(f);return p.deferred=f},_dfdCanceller:function(b){b=b.deferred?b.deferred:b;b.canceled=
!0;var f=b._pendingDfd;b.isResolved()||!f||f.isResolved()||f.cancel();b._pendingDfd=null},_fixDfd:function(b){var f=b.then;b.then=function(b,g,h){if(b){var c=b;b=function(b){return b&&b._argsArray?c.apply(null,b):c(b)}}return f.call(this,b,g,h)};return b},_resDfd:function(b,f,g){var l=f.length;1===l?g?b.reject(f[0]):b.resolve(f[0]):1<l?(f._argsArray=!0,b.resolve(f)):b.resolve()}};return g})},"esri/geometry/SpatialReference":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ./support/spatialReferenceUtils".split(" "),
function(b,g,p,f,l,m,h,c){b=function(b){function e(a){a=b.call(this)||this;a.latestWkid=null;a.wkid=null;a.wkt=null;return a}p(e,b);a=e;e.fromJSON=function(c){if(!c)return null;if(c.wkid){if(102100===c.wkid)return a.WebMercator;if(4326===c.wkid)return a.WGS84}var b=new a;b.read(c);return b};e.prototype.normalizeCtorArgs=function(a){var c;return a&&"object"===typeof a?a:(c={},c["string"===typeof a?"wkt":"wkid"]=a,c)};Object.defineProperty(e.prototype,"isWGS84",{get:function(){return c.isWGS84(this)},
enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"isWebMercator",{get:function(){return c.isWebMercator(this)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"isGeographic",{get:function(){return c.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"isWrappable",{get:function(){return c.isWrappable(this)},enumerable:!0,configurable:!0});e.prototype.writeWkt=function(a,c){this.wkid||(c.wkt=a)};e.prototype.clone=function(){if(this===
a.WGS84)return a.WGS84;if(this===a.WebMercator)return a.WebMercator;var c=new a;null!=this.wkid?(c.wkid=this.wkid,null!=this.latestWkid&&(c.latestWkid=this.latestWkid),null!=this.vcsWkid&&(c.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(c.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(c.wkt=this.wkt);return c};e.prototype.equals=function(a){return c.equals(this,a)};e.prototype.toJSON=function(a){return this.write(null,a)};var a;e.GCS_NAD_1927=null;e.WGS84=null;e.WebMercator=null;f([h.property({dependsOn:["wkid"],
readOnly:!0})],e.prototype,"isWGS84",null);f([h.property({dependsOn:["wkid"],readOnly:!0})],e.prototype,"isWebMercator",null);f([h.property({dependsOn:["wkid","wkt"],readOnly:!0})],e.prototype,"isGeographic",null);f([h.property({dependsOn:["wkid"],readOnly:!0})],e.prototype,"isWrappable",null);f([h.property({type:Number,json:{write:!0}})],e.prototype,"latestWkid",void 0);f([h.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt?
!0:!1}}}}}}})],e.prototype,"wkid",void 0);f([h.property({type:String,json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid?!0:!1}}}}}}})],e.prototype,"wkt",void 0);f([h.writer("wkt"),h.writer("web-scene","wkt")],e.prototype,"writeWkt",null);f([h.property({type:Number,json:{write:!0}})],e.prototype,"vcsWkid",void 0);f([h.property({type:Number,json:{write:!0}})],e.prototype,"latestVcsWkid",void 0);return e=a=f([h.subclass("esri.geometry.SpatialReference")],
e)}(h.declared(l));b.prototype.toJSON.isDefaultToJSON=!0;b.GCS_NAD_1927=new b({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'});b.WGS84=new b(4326);b.WGS84.wkt=m.substitute({Central_Meridian:"0.0"},c.getInfo(b.WGS84).wkTemplate);b.WebMercator=new b({wkid:102100,latestWkid:3857});Object.freeze&&(Object.freeze(b.GCS_NAD_1927),Object.freeze(b.WGS84),Object.freeze(b.WebMercator));
return b})},"esri/geometry/support/spatialReferenceUtils":function(){define(["require","exports","./WKIDUnitConversion"],function(b,g,p){function f(c){return c.wkid&&!0===l[c.wkid]}Object.defineProperty(g,"__esModule",{value:!0});var l={102113:!0,102100:!0,3857:!0,3785:!0},m={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0};b=[-2.0037508342788905E7,2.0037508342788905E7];var h=[-2.0037508342787E7,2.0037508342787E7],c={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',
valid:b,origin:h,dx:1E-5},102100:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:b,origin:h,
dx:1E-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:b,origin:h,dx:1E-5},3857:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
valid:b,origin:h,dx:1E-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',
valid:[-180,180],origin:[-180,180],dx:1E-5}};g.equals=function(c,b){if(b){if(c===b)return!0;if(null!=c.wkid||null!=b.wkid)return c.wkid===b.wkid||f(c)&&f(b)||null!=b.latestWkid&&c.wkid===b.latestWkid||null!=c.latestWkid&&b.wkid===c.latestWkid;if(c.wkt&&b.wkt)return c.wkt.toUpperCase()===b.wkt.toUpperCase()}return!1};g.getInfo=function(b){return b.wkid?c[b.wkid]:null};g.isGeographic=function(c){return c.wkid?null==p[c.wkid]:c.wkt?!!/^\s*GEOGCS/i.test(c.wkt):!1};g.isWGS84=function(c){return 4326===
c.wkid};g.isWebMercator=f;g.isWrappable=function(c){return c.wkid&&!0===m[c.wkid]}})},"esri/geometry/support/WKIDUnitConversion":function(){define([],function(){var b,g={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],units:"Meter Foot Foot_US Foot_Clarke Yard_Clarke Link_Clarke Yard_Sears Foot_Sears Chain_Sears Chain_Benoit_1895_B Yard_Indian Yard_Indian_1937 Foot_Gold_Coast Chain_Sears_1922_Truncated 50_Kilometers 150_Kilometers".split(" "),
2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:13,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,
3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,
3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,
3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,
5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,
6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,
6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,
6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,
6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,
7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,
7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8058:0,8059:0,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,
8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,22391:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25E3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,
26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53034:0,53048:0,53049:0,
54034:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:14,102069:15,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,
103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,
103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,
103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,
103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103695:2};for(b=2E3;2045>=b;b++)g[b]=0;for(b=2056;2065>=b;b++)g[b]=0;for(b=2067;2135>=b;b++)g[b]=0;for(b=2137;2154>=b;b++)g[b]=0;for(b=2161;2170>=b;b++)g[b]=0;for(b=2172;2193>=b;b++)g[b]=0;for(b=2195;2198>=b;b++)g[b]=0;for(b=2200;2203>=b;b++)g[b]=0;for(b=2205;2217>=b;b++)g[b]=0;for(b=2222;2224>=b;b++)g[b]=1;for(b=2225;2250>=b;b++)g[b]=2;
for(b=2251;2253>=b;b++)g[b]=1;for(b=2257;2264>=b;b++)g[b]=2;for(b=2274;2279>=b;b++)g[b]=2;for(b=2280;2282>=b;b++)g[b]=1;for(b=2283;2289>=b;b++)g[b]=2;for(b=2290;2292>=b;b++)g[b]=0;for(b=2308;2313>=b;b++)g[b]=0;for(b=2315;2491>=b;b++)g[b]=0;for(b=2494;2866>=b;b++)g[b]=0;for(b=2867;2869>=b;b++)g[b]=1;for(b=2870;2888>=b;b++)g[b]=2;for(b=2891;2895>=b;b++)g[b]=2;for(b=2896;2898>=b;b++)g[b]=1;for(b=2902;2908>=b;b++)g[b]=2;for(b=2915;2920>=b;b++)g[b]=2;for(b=2921;2923>=b;b++)g[b]=1;for(b=2924;2930>=b;b++)g[b]=
2;for(b=2931;2962>=b;b++)g[b]=0;for(b=2964;2968>=b;b++)g[b]=2;for(b=2969;2973>=b;b++)g[b]=0;for(b=2975;2991>=b;b++)g[b]=0;for(b=2995;3051>=b;b++)g[b]=0;for(b=3054;3079>=b;b++)g[b]=0;for(b=3081;3088>=b;b++)g[b]=0;for(b=3092;3101>=b;b++)g[b]=0;for(b=3106;3138>=b;b++)g[b]=0;for(b=3146;3151>=b;b++)g[b]=0;for(b=3153;3166>=b;b++)g[b]=0;for(b=3168;3172>=b;b++)g[b]=0;for(b=3174;3203>=b;b++)g[b]=0;for(b=3294;3358>=b;b++)g[b]=0;for(b=3367;3403>=b;b++)g[b]=0;for(b=3408;3416>=b;b++)g[b]=0;for(b=3417;3438>=b;b++)g[b]=
2;for(b=3441;3446>=b;b++)g[b]=2;for(b=3447;3450>=b;b++)g[b]=0;for(b=3451;3459>=b;b++)g[b]=2;for(b=3460;3478>=b;b++)g[b]=0;for(b=3554;3559>=b;b++)g[b]=0;for(b=3560;3570>=b;b++)g[b]=2;for(b=3571;3581>=b;b++)g[b]=0;for(b=3594;3597>=b;b++)g[b]=0;for(b=3601;3604>=b;b++)g[b]=0;for(b=3637;3639>=b;b++)g[b]=0;for(b=3665;3667>=b;b++)g[b]=0;for(b=3693;3695>=b;b++)g[b]=0;for(b=3701;3727>=b;b++)g[b]=0;for(b=3728;3739>=b;b++)g[b]=2;for(b=3740;3751>=b;b++)g[b]=0;for(b=3753;3760>=b;b++)g[b]=2;for(b=3761;3773>=b;b++)g[b]=
0;for(b=3775;3777>=b;b++)g[b]=0;for(b=3779;3781>=b;b++)g[b]=0;for(b=3783;3785>=b;b++)g[b]=0;for(b=3788;3791>=b;b++)g[b]=0;for(b=3797;3802>=b;b++)g[b]=0;for(b=3814;3816>=b;b++)g[b]=0;for(b=3825;3829>=b;b++)g[b]=0;for(b=3832;3841>=b;b++)g[b]=0;for(b=3844;3852>=b;b++)g[b]=0;for(b=3873;3885>=b;b++)g[b]=0;for(b=3890;3893>=b;b++)g[b]=0;for(b=3907;3912>=b;b++)g[b]=0;for(b=3942;3950>=b;b++)g[b]=0;for(b=3968;3970>=b;b++)g[b]=0;for(b=3973;3976>=b;b++)g[b]=0;for(b=3986;3989>=b;b++)g[b]=0;for(b=3994;3997>=b;b++)g[b]=
0;for(b=4048;4051>=b;b++)g[b]=0;for(b=4056;4063>=b;b++)g[b]=0;for(b=4093;4096>=b;b++)g[b]=0;for(b=4390;4398>=b;b++)g[b]=0;for(b=4399;4413>=b;b++)g[b]=2;for(b=4418;4433>=b;b++)g[b]=2;for(b=4455;4457>=b;b++)g[b]=2;for(b=4484;4489>=b;b++)g[b]=0;for(b=4491;4554>=b;b++)g[b]=0;for(b=4568;4589>=b;b++)g[b]=0;for(b=4652;4656>=b;b++)g[b]=0;for(b=4766;4800>=b;b++)g[b]=0;for(b=5014;5016>=b;b++)g[b]=0;for(b=5069;5072>=b;b++)g[b]=0;for(b=5105;5130>=b;b++)g[b]=0;for(b=5173;5188>=b;b++)g[b]=0;for(b=5253;5259>=b;b++)g[b]=
0;for(b=5269;5275>=b;b++)g[b]=0;for(b=5292;5311>=b;b++)g[b]=0;for(b=5329;5331>=b;b++)g[b]=0;for(b=5343;5349>=b;b++)g[b]=0;for(b=5355;5357>=b;b++)g[b]=0;for(b=5387;5389>=b;b++)g[b]=0;for(b=5459;5463>=b;b++)g[b]=0;for(b=5479;5482>=b;b++)g[b]=0;for(b=5518;5520>=b;b++)g[b]=0;for(b=5530;5539>=b;b++)g[b]=0;for(b=5550;5552>=b;b++)g[b]=0;for(b=5562;5583>=b;b++)g[b]=0;for(b=5623;5625>=b;b++)g[b]=2;for(b=5631;5639>=b;b++)g[b]=0;for(b=5649;5653>=b;b++)g[b]=0;for(b=5663;5680>=b;b++)g[b]=0;for(b=5682;5685>=b;b++)g[b]=
0;for(b=5875;5877>=b;b++)g[b]=0;for(b=5921;5940>=b;b++)g[b]=0;for(b=6050;6125>=b;b++)g[b]=0;for(b=6244;6275>=b;b++)g[b]=0;for(b=6328;6348>=b;b++)g[b]=0;for(b=6350;6356>=b;b++)g[b]=0;for(b=6366;6372>=b;b++)g[b]=0;for(b=6381;6387>=b;b++)g[b]=0;for(b=6393;6404>=b;b++)g[b]=0;for(b=6480;6483>=b;b++)g[b]=0;for(b=6511;6514>=b;b++)g[b]=0;for(b=6579;6581>=b;b++)g[b]=0;for(b=6619;6624>=b;b++)g[b]=0;for(b=6625;6627>=b;b++)g[b]=2;for(b=6628;6632>=b;b++)g[b]=0;for(b=6634;6637>=b;b++)g[b]=0;for(b=6669;6692>=b;b++)g[b]=
0;for(b=6707;6709>=b;b++)g[b]=0;for(b=6720;6723>=b;b++)g[b]=0;for(b=6732;6738>=b;b++)g[b]=0;for(b=6931;6933>=b;b++)g[b]=0;for(b=6956;6959>=b;b++)g[b]=0;for(b=7005;7007>=b;b++)g[b]=0;for(b=7057;7070>=b;b++)g[b]=2;for(b=7074;7082>=b;b++)g[b]=0;for(b=7109;7118>=b;b++)g[b]=0;for(b=7119;7127>=b;b++)g[b]=1;for(b=7374;7376>=b;b++)g[b]=0;for(b=7528;7586>=b;b++)g[b]=0;for(b=7587;7645>=b;b++)g[b]=2;for(b=7755;7787>=b;b++)g[b]=0;for(b=7791;7795>=b;b++)g[b]=0;for(b=7799;7801>=b;b++)g[b]=0;for(b=7803;7805>=b;b++)g[b]=
0;for(b=7825;7831>=b;b++)g[b]=0;for(b=7845;7859>=b;b++)g[b]=0;for(b=8013;8032>=b;b++)g[b]=0;for(b=20002;20032>=b;b++)g[b]=0;for(b=20062;20092>=b;b++)g[b]=0;for(b=20135;20138>=b;b++)g[b]=0;for(b=20248;20258>=b;b++)g[b]=0;for(b=20348;20358>=b;b++)g[b]=0;for(b=20436;20440>=b;b++)g[b]=0;for(b=20822;20824>=b;b++)g[b]=0;for(b=20934;20936>=b;b++)g[b]=0;for(b=21035;21037>=b;b++)g[b]=0;for(b=21095;21097>=b;b++)g[b]=0;for(b=21148;21150>=b;b++)g[b]=0;for(b=21413;21423>=b;b++)g[b]=0;for(b=21473;21483>=b;b++)g[b]=
0;for(b=21780;21782>=b;b++)g[b]=0;for(b=21891;21894>=b;b++)g[b]=0;for(b=21896;21899>=b;b++)g[b]=0;for(b=22171;22177>=b;b++)g[b]=0;for(b=22181;22187>=b;b++)g[b]=0;for(b=22191;22197>=b;b++)g[b]=0;for(b=22234;22236>=b;b++)g[b]=0;for(b=22521;22525>=b;b++)g[b]=0;for(b=22991;22994>=b;b++)g[b]=0;for(b=23028;23038>=b;b++)g[b]=0;for(b=23830;23853>=b;b++)g[b]=0;for(b=23866;23872>=b;b++)g[b]=0;for(b=23877;23884>=b;b++)g[b]=0;for(b=23886;23894>=b;b++)g[b]=0;for(b=23946;23948>=b;b++)g[b]=0;for(b=24311;24313>=
b;b++)g[b]=0;for(b=24342;24347>=b;b++)g[b]=0;for(b=24370;24374>=b;b++)g[b]=10;for(b=24375;24381>=b;b++)g[b]=0;for(b=24718;24721>=b;b++)g[b]=0;for(b=24817;24821>=b;b++)g[b]=0;for(b=24877;24882>=b;b++)g[b]=0;for(b=24891;24893>=b;b++)g[b]=0;for(b=25391;25395>=b;b++)g[b]=0;for(b=25828;25838>=b;b++)g[b]=0;for(b=26191;26195>=b;b++)g[b]=0;for(b=26391;26393>=b;b++)g[b]=0;for(b=26701;26722>=b;b++)g[b]=0;for(b=26729;26799>=b;b++)g[b]=2;for(b=26801;26803>=b;b++)g[b]=2;for(b=26811;26813>=b;b++)g[b]=2;for(b=26847;26870>=
b;b++)g[b]=2;for(b=26891;26899>=b;b++)g[b]=0;for(b=26901;26923>=b;b++)g[b]=0;for(b=26929;26946>=b;b++)g[b]=0;for(b=26948;26998>=b;b++)g[b]=0;for(b=27037;27040>=b;b++)g[b]=0;for(b=27205;27232>=b;b++)g[b]=0;for(b=27258;27260>=b;b++)g[b]=0;for(b=27391;27398>=b;b++)g[b]=0;for(b=27561;27564>=b;b++)g[b]=0;for(b=27571;27574>=b;b++)g[b]=0;for(b=27581;27584>=b;b++)g[b]=0;for(b=27591;27594>=b;b++)g[b]=0;for(b=28191;28193>=b;b++)g[b]=0;for(b=28348;28358>=b;b++)g[b]=0;for(b=28402;28432>=b;b++)g[b]=0;for(b=28462;28492>=
b;b++)g[b]=0;for(b=29118;29122>=b;b++)g[b]=0;for(b=29168;29172>=b;b++)g[b]=0;for(b=29177;29185>=b;b++)g[b]=0;for(b=29187;29195>=b;b++)g[b]=0;for(b=29900;29903>=b;b++)g[b]=0;for(b=30161;30179>=b;b++)g[b]=0;for(b=30491;30494>=b;b++)g[b]=0;for(b=30729;30732>=b;b++)g[b]=0;for(b=31251;31259>=b;b++)g[b]=0;for(b=31265;31268>=b;b++)g[b]=0;for(b=31275;31279>=b;b++)g[b]=0;for(b=31281;31297>=b;b++)g[b]=0;for(b=31461;31469>=b;b++)g[b]=0;for(b=31491;31495>=b;b++)g[b]=0;for(b=31917;31922>=b;b++)g[b]=0;for(b=31965;32E3>=
b;b++)g[b]=0;for(b=32001;32003>=b;b++)g[b]=2;for(b=32005;32031>=b;b++)g[b]=2;for(b=32033;32060>=b;b++)g[b]=2;for(b=32064;32067>=b;b++)g[b]=2;for(b=32074;32077>=b;b++)g[b]=2;for(b=32081;32086>=b;b++)g[b]=0;for(b=32107;32130>=b;b++)g[b]=0;for(b=32133;32158>=b;b++)g[b]=0;for(b=32164;32167>=b;b++)g[b]=2;for(b=32180;32199>=b;b++)g[b]=0;for(b=32201;32260>=b;b++)g[b]=0;for(b=32301;32360>=b;b++)g[b]=0;for(b=32601;32662>=b;b++)g[b]=0;for(b=32664;32667>=b;b++)g[b]=2;for(b=32701;32761>=b;b++)g[b]=0;for(b=53001;53004>=
b;b++)g[b]=0;for(b=53008;53019>=b;b++)g[b]=0;for(b=53021;53032>=b;b++)g[b]=0;for(b=53042;53046>=b;b++)g[b]=0;for(b=53074;53080>=b;b++)g[b]=0;for(b=54001;54004>=b;b++)g[b]=0;for(b=54008;54019>=b;b++)g[b]=0;for(b=54021;54032>=b;b++)g[b]=0;for(b=54042;54046>=b;b++)g[b]=0;for(b=54048;54053>=b;b++)g[b]=0;for(b=54074;54080>=b;b++)g[b]=0;for(b=102001;102040>=b;b++)g[b]=0;for(b=102042;102063>=b;b++)g[b]=0;for(b=102065;102067>=b;b++)g[b]=0;for(b=102070;102117>=b;b++)g[b]=0;for(b=102122;102216>=b;b++)g[b]=
0;for(b=102221;102377>=b;b++)g[b]=0;for(b=102382;102388>=b;b++)g[b]=0;for(b=102389;102398>=b;b++)g[b]=2;for(b=102399;102444>=b;b++)g[b]=0;for(b=102445;102447>=b;b++)g[b]=2;for(b=102448;102458>=b;b++)g[b]=0;for(b=102459;102468>=b;b++)g[b]=2;for(b=102469;102497>=b;b++)g[b]=0;for(b=102500;102519>=b;b++)g[b]=1;for(b=102520;102524>=b;b++)g[b]=0;for(b=102525;102529>=b;b++)g[b]=2;for(b=102530;102568>=b;b++)g[b]=0;for(b=102570;102588>=b;b++)g[b]=0;for(b=102590;102598>=b;b++)g[b]=0;for(b=102601;102603>=b;b++)g[b]=
0;for(b=102605;102628>=b;b++)g[b]=0;for(b=102629;102646>=b;b++)g[b]=2;for(b=102648;102700>=b;b++)g[b]=2;for(b=102701;102703>=b;b++)g[b]=0;for(b=102707;102730>=b;b++)g[b]=2;for(b=102733;102758>=b;b++)g[b]=2;for(b=102767;102900>=b;b++)g[b]=0;for(b=102965;102969>=b;b++)g[b]=0;for(b=102971;102973>=b;b++)g[b]=0;for(b=102975;102989>=b;b++)g[b]=0;for(b=102990;102992>=b;b++)g[b]=1;for(b=102997;103002>=b;b++)g[b]=0;for(b=103003;103008>=b;b++)g[b]=2;for(b=103009;103011>=b;b++)g[b]=0;for(b=103012;103014>=b;b++)g[b]=
2;for(b=103019;103021>=b;b++)g[b]=0;for(b=103022;103024>=b;b++)g[b]=2;for(b=103029;103031>=b;b++)g[b]=0;for(b=103032;103034>=b;b++)g[b]=2;for(b=103065;103068>=b;b++)g[b]=0;for(b=103074;103076>=b;b++)g[b]=0;for(b=103077;103079>=b;b++)g[b]=1;for(b=103080;103082>=b;b++)g[b]=0;for(b=103083;103085>=b;b++)g[b]=2;for(b=103090;103093>=b;b++)g[b]=0;for(b=103097;103099>=b;b++)g[b]=0;for(b=103100;103102>=b;b++)g[b]=2;for(b=103107;103109>=b;b++)g[b]=0;for(b=103110;103112>=b;b++)g[b]=2;for(b=103113;103116>=b;b++)g[b]=
0;for(b=103117;103120>=b;b++)g[b]=2;for(b=103153;103157>=b;b++)g[b]=0;for(b=103158;103162>=b;b++)g[b]=2;for(b=103163;103165>=b;b++)g[b]=0;for(b=103166;103168>=b;b++)g[b]=1;for(b=103169;103171>=b;b++)g[b]=2;for(b=103186;103188>=b;b++)g[b]=0;for(b=103189;103191>=b;b++)g[b]=2;for(b=103192;103195>=b;b++)g[b]=0;for(b=103196;103199>=b;b++)g[b]=2;for(b=103200;103224>=b;b++)g[b]=0;for(b=103225;103227>=b;b++)g[b]=1;for(b=103232;103237>=b;b++)g[b]=0;for(b=103238;103243>=b;b++)g[b]=2;for(b=103244;103246>=b;b++)g[b]=
0;for(b=103247;103249>=b;b++)g[b]=2;for(b=103254;103256>=b;b++)g[b]=0;for(b=103257;103259>=b;b++)g[b]=2;for(b=103264;103266>=b;b++)g[b]=0;for(b=103267;103269>=b;b++)g[b]=2;for(b=103300;103375>=b;b++)g[b]=0;for(b=103381;103383>=b;b++)g[b]=0;for(b=103384;103386>=b;b++)g[b]=1;for(b=103387;103389>=b;b++)g[b]=0;for(b=103390;103392>=b;b++)g[b]=2;for(b=103397;103399>=b;b++)g[b]=0;for(b=103400;103471>=b;b++)g[b]=2;for(b=103476;103478>=b;b++)g[b]=0;for(b=103479;103481>=b;b++)g[b]=2;for(b=103486;103488>=b;b++)g[b]=
0;for(b=103489;103491>=b;b++)g[b]=2;for(b=103492;103495>=b;b++)g[b]=0;for(b=103496;103499>=b;b++)g[b]=2;for(b=103528;103543>=b;b++)g[b]=0;for(b=103544;103548>=b;b++)g[b]=2;for(b=103549;103551>=b;b++)g[b]=0;for(b=103552;103554>=b;b++)g[b]=1;for(b=103555;103557>=b;b++)g[b]=2;for(b=103558;103560>=b;b++)g[b]=0;for(b=103571;103573>=b;b++)g[b]=0;for(b=103574;103576>=b;b++)g[b]=2;for(b=103577;103580>=b;b++)g[b]=0;for(b=103581;103583>=b;b++)g[b]=2;for(b=103600;103694>=b;b++)g[b]=0;for(b=103700;103793>=b;b++)g[b]=
2;for(b=103794;103871>=b;b++)g[b]=0;for(b=103900;103971>=b;b++)g[b]=2;return g})},"esri/geometry/Extent":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Geometry ./Point ./SpatialReference ./support/contains ./support/intersects ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r){function u(a,c,b){return null==c?b:null==b?c:a(c,b)}b=function(b){function h(){for(var a=
0;a<arguments.length;a++);a=b.call(this)||this;a.type="extent";a.xmin=0;a.ymin=0;a.mmin=void 0;a.zmin=void 0;a.xmax=0;a.ymax=0;a.mmax=void 0;a.zmax=void 0;return a}p(h,b);g=h;h.prototype.normalizeCtorArgs=function(a,d,c,b,e){return!a||"esri.geometry.SpatialReference"!==a.declaredClass&&null==a.wkid?"object"===typeof a?(a.spatialReference=null!=a.spatialReference?a.spatialReference:q.WGS84,a):{xmin:a,ymin:d,xmax:c,ymax:b,spatialReference:null!=e?e:q.WGS84}:{spatialReference:a,xmin:0,ymin:0,xmax:0,
ymax:0}};Object.defineProperty(h.prototype,"center",{get:function(){var a=new c({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});this.hasZ&&(a.z=.5*(this.zmin+this.zmax));this.hasM&&(a.m=.5*(this.mmin+this.mmax));return a},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"extent",{get:function(){return this.clone()},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"hasM",{get:function(){return null!=this.mmin&&null!=
this.mmax},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"hasZ",{get:function(){return null!=this.zmin&&null!=this.zmax},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"height",{get:function(){return Math.abs(this.ymax-this.ymin)},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"width",{get:function(){return Math.abs(this.xmax-this.xmin)},enumerable:!0,configurable:!0});h.prototype.centerAt=function(a){var d=this.center;return null!=a.z&&this.hasZ?
this.offset(a.x-d.x,a.y-d.y,a.z-d.z):this.offset(a.x-d.x,a.y-d.y)};h.prototype.clone=function(){var a=new g;a.xmin=this.xmin;a.ymin=this.ymin;a.xmax=this.xmax;a.ymax=this.ymax;a.spatialReference=this.spatialReference;null!=this.zmin&&(a.zmin=this.zmin,a.zmax=this.zmax);null!=this.mmin&&(a.mmin=this.mmin,a.mmax=this.mmax);return a};h.prototype.contains=function(a){if(!a)return!1;var d=this.spatialReference,c=a.spatialReference;d&&c&&!d.equals(c)&&r.canProject(d,c)&&(a=d.isWebMercator?r.geographicToWebMercator(a):
r.webMercatorToGeographic(a,!0));return"point"===a.type?e.extentContainsPoint(this,a):"extent"===a.type?e.extentContainsExtent(this,a):!1};h.prototype.equals=function(a){if(!a)return!1;var d=this.spatialReference,c=a.spatialReference;d&&c&&!d.equals(c)&&r.canProject(d,c)&&(a=d.isWebMercator?r.geographicToWebMercator(a):r.webMercatorToGeographic(a,!0));return this.xmin===a.xmin&&this.ymin===a.ymin&&this.zmin===a.zmin&&this.mmin===a.mmin&&this.xmax===a.xmax&&this.ymax===a.ymax&&this.zmax===a.zmax&&
this.mmax===a.mmax};h.prototype.expand=function(a){a=.5*(1-a);var d=this.width*a,c=this.height*a;this.xmin+=d;this.ymin+=c;this.xmax-=d;this.ymax-=c;this.hasZ&&(d=(this.zmax-this.zmin)*a,this.zmin+=d,this.zmax-=d);this.hasM&&(a*=this.mmax-this.mmin,this.mmin+=a,this.mmax-=a);return this};h.prototype.intersects=function(c){if(!c)return!1;var d=this.spatialReference,b=c.spatialReference;d&&b&&!d.equals(b)&&r.canProject(d,b)&&(c=d.isWebMercator?r.geographicToWebMercator(c):r.webMercatorToGeographic(c,
!0));d=a.getExtentIntersector(c.type);return"mesh"!==c.type?d(this,c):d(this,c.extent)};h.prototype.normalize=function(){var a=this._normalize(!1,!0);return Array.isArray(a)?a:[a]};h.prototype.offset=function(a,d,c){this.xmin+=a;this.ymin+=d;this.xmax+=a;this.ymax+=d;null!=c&&(this.zmin+=c,this.zmax+=c);return this};h.prototype.shiftCentralMeridian=function(){return this._normalize(!0)};h.prototype.union=function(a){this.xmin=Math.min(this.xmin,a.xmin);this.ymin=Math.min(this.ymin,a.ymin);this.xmax=
Math.max(this.xmax,a.xmax);this.ymax=Math.max(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=u(Math.min,this.zmin,a.zmin),this.zmax=u(Math.max,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=u(Math.min,this.mmin,a.mmin),this.mmax=u(Math.max,this.mmax,a.mmax);return this};h.prototype.intersection=function(a){if(!this.intersects(a))return null;this.xmin=Math.max(this.xmin,a.xmin);this.ymin=Math.max(this.ymin,a.ymin);this.xmax=Math.min(this.xmax,a.xmax);this.ymax=Math.min(this.ymax,a.ymax);if(this.hasZ||
a.hasZ)this.zmin=u(Math.max,this.zmin,a.zmin),this.zmax=u(Math.min,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=u(Math.max,this.mmin,a.mmin),this.mmax=u(Math.min,this.mmax,a.mmax);return this};h.prototype.toJSON=function(a){return this.write(null,a)};h.prototype._shiftCM=function(a){void 0===a&&(a=k.getInfo(this.spatialReference));if(!a||!this.spatialReference)return this;var d=this.spatialReference,c=this._getCM(a);if(c){var b=d.isWebMercator?r.webMercatorToGeographic(c):c;this.xmin-=c.x;this.xmax-=
c.x;d.isWebMercator||(b.x=this._normalizeX(b.x,a).x);this.spatialReference=new q(l.substitute({Central_Meridian:b.x},d.isWGS84?a.altTemplate:a.wkTemplate))}return this};h.prototype._getCM=function(a){var d=null,c=a.valid;a=c[0];var c=c[1],b=this.xmin,e=this.xmax;b>=a&&b<=c&&e>=a&&e<=c||(d=this.center);return d};h.prototype._normalize=function(a,d,c){var b=this.spatialReference;if(!b)return this;c=c||k.getInfo(b);if(!c)return this;var n=this._getParts(c).map(function(d){return d.extent});if(2>n.length)return n[0]||
this;if(2<n.length)return a?this._shiftCM(c):this.set({xmin:c.valid[0],xmax:c.valid[1]});if(a)return this._shiftCM(c);if(d)return n;var e=!0,f=!0;n.forEach(function(d){d.hasZ||(e=!1);d.hasM||(f=!1)});return{rings:n.map(function(d){var a=[[d.xmin,d.ymin],[d.xmin,d.ymax],[d.xmax,d.ymax],[d.xmax,d.ymin],[d.xmin,d.ymin]];if(e)for(var c=(d.zmax-d.zmin)/2,b=0;b<a.length;b++)a[b].push(c);if(f)for(d=(d.mmax-d.mmin)/2,b=0;b<a.length;b++)a[b].push(d);return a}),hasZ:e,hasM:f,spatialReference:b}};h.prototype._getParts=
function(a){var d=this.cache._parts;if(!d){var d=[],c=this.ymin,b=this.ymax,e=this.spatialReference,f=this.width,h=this.xmin,t=this.xmax,r=void 0;a=a||k.getInfo(e);var q=a.valid,l=q[0],m=q[1],r=this._normalizeX(this.xmin,a),u=r.x,q=r.frameId,r=this._normalizeX(this.xmax,a),z=r.x;a=r.frameId;r=u===z&&0<f;if(f>2*m){f=new g(h<t?u:z,c,m,b,e);h=new g(l,c,h<t?z:u,b,e);t=new g(0,c,m,b,e);c=new g(l,c,0,b,e);b=[];e=[];f.contains(t)&&b.push(q);f.contains(c)&&e.push(q);h.contains(t)&&b.push(a);h.contains(c)&&
e.push(a);for(l=q+1;l<a;l++)b.push(l),e.push(l);d.push({extent:f,frameIds:[q]},{extent:h,frameIds:[a]},{extent:t,frameIds:b},{extent:c,frameIds:e})}else u>z||r?d.push({extent:new g(u,c,m,b,e),frameIds:[q]},{extent:new g(l,c,z,b,e),frameIds:[a]}):d.push({extent:new g(u,c,z,b,e),frameIds:[q]});this.cache._parts=d}a=this.hasZ;c=this.hasM;if(a||c)for(q={},a&&(q.zmin=this.zmin,q.zmax=this.zmax),c&&(q.mmin=this.mmin,q.mmax=this.mmax),a=0;a<d.length;a++)d[a].extent.set(q);return d};h.prototype._normalizeX=
function(a,d){var c=d.valid;d=c[0];var b=c[1],c=2*b,e=0;a>b?(d=Math.ceil(Math.abs(a-b)/c),a-=d*c,e=d):a<d&&(d=Math.ceil(Math.abs(a-d)/c),a+=d*c,e=-d);return{x:a,frameId:e}};var g;f([m.property({dependsOn:"xmin ymin zmin mmin xmax ymax zmax mmax spatialReference".split(" ")})],h.prototype,"cache",void 0);f([m.property({readOnly:!0,dependsOn:["cache"]})],h.prototype,"center",null);f([m.property({readOnly:!0,dependsOn:["cache"]})],h.prototype,"extent",null);f([m.property({readOnly:!0,dependsOn:["mmin",
"mmax"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasM",null);f([m.property({readOnly:!0,dependsOn:["zmin","zmax"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasZ",null);f([m.property({readOnly:!0,dependsOn:["ymin","ymax"]})],h.prototype,"height",null);f([m.property({readOnly:!0,dependsOn:["xmin","xmax"]})],h.prototype,"width",null);f([m.property({type:Number,json:{write:!0}})],h.prototype,"xmin",void 0);f([m.property({type:Number,json:{write:!0}})],h.prototype,
"ymin",void 0);f([m.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],h.prototype,"mmin",void 0);f([m.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],h.prototype,"zmin",void 0);f([m.property({type:Number,json:{write:!0}})],h.prototype,"xmax",void 0);f([m.property({type:Number,json:{write:!0}})],h.prototype,"ymax",void 0);f([m.property({type:Number,
json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],h.prototype,"mmax",void 0);f([m.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],h.prototype,"zmax",void 0);return h=g=f([m.subclass("esri.geometry.Extent")],h)}(m.declared(h));b.prototype.toJSON.isDefaultToJSON=!0;return b})},"esri/geometry/Geometry":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/accessorSupport/decorators ./SpatialReference".split(" "),
function(b,g,p,f,l,m,h){return function(c){function b(){var b=c.call(this)||this;b.type=null;b.extent=null;b.hasM=!1;b.hasZ=!1;b.spatialReference=h.WGS84;return b}p(b,c);Object.defineProperty(b.prototype,"cache",{get:function(){return{}},enumerable:!0,configurable:!0});b.prototype.readSpatialReference=function(c,a){if(c instanceof h)return c;if(null!=c){var b=new h;b.read(c,a);return b}return c};b.prototype.clone=function(){console.warn(".clone() is not implemented for "+this.declaredClass);return null};
b.prototype.clearCache=function(){this.notifyChange("cache")};b.prototype.getCacheValue=function(c){return this.cache[c]};b.prototype.setCacheValue=function(c,a){this.cache[c]=a};f([m.property()],b.prototype,"type",void 0);f([m.property({readOnly:!0,dependsOn:["spatialReference"]})],b.prototype,"cache",null);f([m.property({readOnly:!0,dependsOn:["spatialReference"]})],b.prototype,"extent",void 0);f([m.property({type:Boolean,json:{write:{overridePolicy:function(c){return{enabled:c}}}}})],b.prototype,
"hasM",void 0);f([m.property({type:Boolean,json:{write:{overridePolicy:function(c){return{enabled:c}}}}})],b.prototype,"hasZ",void 0);f([m.property({type:h,json:{write:!0}})],b.prototype,"spatialReference",void 0);f([m.reader("spatialReference")],b.prototype,"readSpatialReference",null);return b=f([m.subclass("esri.geometry.Geometry")],b)}(m.declared(l))})},"esri/geometry/Point":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Logger ../core/accessorSupport/decorators ./Geometry ./SpatialReference ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e){function a(a){return a&&("esri.geometry.SpatialReference"===a.declaredClass||null!=a.wkid)}var k=[0,0],r=l.getLogger("esri.geometry.Point");b=function(b){function h(a,c,d,n,e){a=b.call(this)||this;a.x=0;a.y=0;a.z=void 0;a.m=void 0;a.type="point";return a}p(h,b);g=h;h.copy=function(a,c){c.x=a.x;c.y=a.y;c.z=a.z;c.m=a.m;c.spatialReference=Object.isFrozen(a.spatialReference)?a.spatialReference:a.spatialReference.clone()};h.distance=function(a,c){var d=a.x-c.x,b=a.y-c.y;a=
a.hasZ&&c.hasZ?a.z-c.z:0;return Math.sqrt(d*d+b*b+a*a)};h.prototype.normalizeCtorArgs=function(b,f,d,n,h){var t;if(Array.isArray(b))t=b,h=f,b=t[0],f=t[1],d=t[2],n=t[3];else if(b&&"object"===typeof b){if(t=b,b=null!=t.x?t.x:t.longitude,f=null!=t.y?t.y:t.latitude,d=null!=t.z?t.z:t.altitude,n=t.m,(h=t.spatialReference)&&"esri.geometry.SpatialReference"!==h.declaredClass&&(h=new c(h)),null!=t.longitude||null!=t.latitude)null==t.longitude?r.warn(".longitude\x3d","Latitude was defined without longitude"):
null==t.latitude?r.warn(".latitude\x3d","Longitude was defined without latitude"):!t.declaredClass&&h&&h.isWebMercator&&(f=e.lngLatToXY(t.longitude,t.latitude,k),b=f[0],f=f[1])}else a(d)?(h=d,d=null):a(n)&&(h=n,n=null);b={x:b,y:f};null!=h&&(b.spatialReference=h);null!=d&&(b.z=d);null!=n&&(b.m=n);return b};Object.defineProperty(h.prototype,"hasM",{get:function(){return void 0!==this.m},set:function(a){var c=this._get("hasM");a!==c&&(this._set("m",a?0:void 0),this._set("hasM",a))},enumerable:!0,configurable:!0});
Object.defineProperty(h.prototype,"hasZ",{get:function(){return void 0!==this.z},set:function(a){var c=this._get("hasZ");a!==c&&(this._set("z",a?0:void 0),this._set("hasZ",a))},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"latitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return e.xyToLngLat(this.x,this.y,k)[1];if(a.isWGS84)return this._get("y")}return null},set:function(a){var c=this._get("spatialReference");c&&(c.isWebMercator?this._set("y",
e.lngLatToXY(this.x,a,k)[1]):c.isWGS84&&this._set("y",a),this._set("latitude",a))},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"longitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return e.xyToLngLat(this._get("x"),this._get("y"),k)[0];if(a.isWGS84)return this._get("x")}return null},set:function(a){var c=this._get("spatialReference");c&&(c.isWebMercator?this._set("x",e.lngLatToXY(a,this._get("y"),k)[0]):c.isWGS84&&this._set("x",a),this._set("longitude",
a))},enumerable:!0,configurable:!0});h.prototype.clone=function(){var a=new g;a.x=this.x;a.y=this.y;a.z=this.z;a.m=this.m;a.spatialReference=this.spatialReference;return a};h.prototype.copy=function(a){g.copy(a,this);return this};h.prototype.equals=function(a){var c;if(!a)return!1;var d=this.x,b=this.y,k=this.z,f=this.m,h=this.spatialReference,r=a.z,g=a.m,q=a.x;c=a.y;a=a.spatialReference;if(!h.equals(a))if(h.isWebMercator&&a.isWGS84)c=e.lngLatToXY(q,c),q=c[0],c=c[1],a=h;else if(h.isWGS84&&a.isWebMercator)c=
e.xyToLngLat(q,c),q=c[0],c=c[1],a=h;else return!1;return d===q&&b===c&&k===r&&f===g&&h.wkid===a.wkid};h.prototype.offset=function(a,c,d){this.x+=a;this.y+=c;null!=d&&this.hasZ&&(this.z+=d);return this};h.prototype.normalize=function(){if(!this.spatialReference)return this;var a=q.getInfo(this.spatialReference);if(!a)return this;var c=this.x,d=a.valid,a=d[0],b=d[1],d=2*b;c>b?(a=Math.ceil(Math.abs(c-b)/d),c-=a*d):c<a&&(a=Math.ceil(Math.abs(c-a)/d),c+=a*d);this._set("x",c);return this};h.prototype.distance=
function(a){return g.distance(this,a)};h.prototype.toArray=function(){var a=this.hasZ,c=this.hasM;return a&&c?[this.x,this.y,this.z,this.m]:a?[this.x,this.y,this.z]:c?[this.x,this.y,this.m]:[this.x,this.y]};h.prototype.toJSON=function(a){return this.write(null,a)};var g;f([m.property({dependsOn:["x","y","z","m","spatialReference"]})],h.prototype,"cache",void 0);f([m.property({type:Boolean,dependsOn:["m"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasM",null);f([m.property({type:Boolean,
dependsOn:["z"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasZ",null);f([m.property({type:Number,dependsOn:["y"]})],h.prototype,"latitude",null);f([m.property({type:Number,dependsOn:["x"]})],h.prototype,"longitude",null);f([m.property({type:Number,json:{write:{isRequired:!0}}})],h.prototype,"x",void 0);f([m.property({type:Number,json:{write:!0}})],h.prototype,"y",void 0);f([m.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],h.prototype,
"z",void 0);f([m.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],h.prototype,"m",void 0);return h=g=f([m.subclass("esri.geometry.Point")],h)}(m.declared(h));b.prototype.toJSON.isDefaultToJSON=!0;return b})},"esri/geometry/support/webMercatorUtils":function(){define(["require","exports","../../core/lang","../SpatialReference","./spatialReferenceUtils"],function(b,g,p,f,l){function m(a,c,b,f,h){var k;if("x"in a&&"x"in h)c=c(a.x,a.y,e,0,f),h.x=c[0],h.y=c[1];
else if("xmin"in a&&"xmin"in h)k=c(a.xmin,a.ymin,e,0,f),h.xmin=k[0],h.ymin=k[1],c=c(a.xmax,a.ymax,e,0,f),h.xmax=c[0],h.ymax=c[1];else if("paths"in a&&"paths"in h||"rings"in a&&"rings"in h){k="paths"in a?a.paths:a.rings;var r=[],t=void 0;for(a=0;a<k.length;a++){var d=k[a],t=[];r.push(t);for(var n=0;n<d.length;n++)t.push(c(d[n][0],d[n][1],[0,0],0,f)),2<d[n].length&&t[n].push(d[n][2]),3<d[n].length&&t[n].push(d[n][3])}"paths"in h?h.paths=r:h.rings=r}else if("points"in a&&"points"in h){k=a.points;r=[];
for(a=0;a<k.length;a++)r[a]=c(k[a][0],k[a][1],[0,0],0,f),2<k[a].length&&r[a].push(k[a][2]),3<k[a].length&&r[a].push(k[a][3]);h.points=r}else if("type"in a&&"mesh"===a.type&&"type"in h&&"mesh"===h.type&&(k=a.vertexAttributes&&a.vertexAttributes.position,r=h.vertexAttributes&&h.vertexAttributes.position,k))for(t=[0,0],a=0;a<k.length;a+=3)c(k[a],k[a+1],t,0,f),r[a]=t[0],r[a+1]=t[1];h.spatialReference=b;return h}function h(a,c){a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);c=c&&(null!=c.wkid||
null!=c.wkt?c:c.spatialReference);return a&&c?l.equals(c,a)?!0:l.isWebMercator(c)&&l.isWGS84(a)||l.isWebMercator(a)&&l.isWGS84(c):!1}function c(a,c,b,e){void 0===b&&(b=[0,0]);void 0===e&&(e=0);89.99999<c?c=89.99999:-89.99999>c&&(c=-89.99999);c*=.017453292519943;b[e]=111319.49079327169*a;b[e+1]=3189068.5*Math.log((1+Math.sin(c))/(1-Math.sin(c)));return b}function q(a,c,b,e,f){void 0===b&&(b=[0,0]);void 0===e&&(e=0);void 0===f&&(f=!1);a=a/6378137*57.29577951308232;b[e]=f?a:a-360*Math.floor((a+180)/
360);b[e+1]=57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*c/6378137)));return b}Object.defineProperty(g,"__esModule",{value:!0});var e=[0,0];g.canProject=h;g.project=function(a,b){var e=a&&a.spatialReference;b=b&&(null!=b.wkid||null!=b.wkt?b:b.spatialReference);return h(e,b)?l.equals(e,b)?p.clone(a):l.isWebMercator(b)?m(a,c,f.WebMercator,!1,p.clone(a)):l.isWGS84(b)?m(a,q,f.WGS84,!1,p.clone(a)):null:null};g.lngLatToXY=c;g.xyToLngLat=q;g.geographicToWebMercator=function(a,b,e){void 0===
b&&(b=!1);void 0===e&&(e=p.clone(a));return m(a,c,f.WebMercator,b,e)};g.webMercatorToGeographic=function(a,c,b){void 0===c&&(c=!1);void 0===b&&(b=p.clone(a));return m(a,q,f.WGS84,c,b)}})},"esri/geometry/support/contains":function(){define(["require","exports"],function(b,g){function p(b,f,c,g){return f>=b.xmin&&f<=b.xmax&&c>=b.ymin&&c<=b.ymax?null!=g&&b.hasZ?g>=b.zmin&&g<=b.zmax:!0:!1}function f(b,f){if(b=b.rings)if(Array.isArray(b[0][0])){for(var c=!1,h=0,e=b.length;h<e;h++)c=l(c,b[h],f);f=c}else f=
l(!1,b,f);else f=!1;return f}function l(b,f,c){var h=c[0];c=c[1];for(var e=0,a=0,k=f.length;a<k;a++){e++;e===k&&(e=0);var r=f[a],g=r[0],r=r[1],l=f[e],m=l[0],l=l[1];(r<c&&l>=c||l<c&&r>=c)&&g+(c-r)/(l-r)*(m-g)<h&&(b=!b)}return b}Object.defineProperty(g,"__esModule",{value:!0});g.extentContainsPoint=function(b,f){return p(b,f.x,f.y,f.z)};g.extentContainsExtent=function(b,f){var c=f.xmin,h=f.ymin,e=f.zmin,a=f.xmax,k=f.ymax,r=f.zmax;return b.hasZ&&f.hasZ?p(b,c,h,e)&&p(b,c,k,e)&&p(b,a,k,e)&&p(b,a,h,e)&&
p(b,c,h,r)&&p(b,c,k,r)&&p(b,a,k,r)&&p(b,a,h,r):p(b,c,h)&&p(b,c,k)&&p(b,a,k)&&p(b,a,h)};g.extentContainsCoords2D=function(b,f){return p(b,f[0],f[1])};g.extentContainsCoords3D=function(b,f){return p(b,f[0],f[1],f[2])};g.polygonContainsPoint=function(b,h){return f(b,[h.x,h.y])};g.polygonContainsCoords=f})},"esri/geometry/support/intersects":function(){define(["require","exports","./contains"],function(b,g,p){function f(a,d){return p.extentContainsPoint(a,d)}function l(a,d){var c=a.hasZ&&d.hasZ,b;if(a.xmin<=
d.xmin){if(b=d.xmin,a.xmax<b)return!1}else if(b=a.xmin,d.xmax<b)return!1;if(a.ymin<=d.ymin){if(b=d.ymin,a.ymax<b)return!1}else if(b=a.ymin,d.ymax<b)return!1;if(c&&d.hasZ)if(a.zmin<=d.zmin){if(c=d.zmin,a.zmax<c)return!1}else if(c=a.zmin,d.zmax<c)return!1;return!0}function m(a,d){var c=d.hasZ?p.extentContainsCoords3D:p.extentContainsCoords2D,b=0;for(d=d.points;b<d.length;b++)if(c(a,d[b]))return!0;return!1}function h(c,d){a[0]=c.xmin;a[1]=c.ymax;k[0]=c.xmax;k[1]=c.ymax;r[0]=c.xmin;r[1]=c.ymin;u[0]=c.xmax;
u[1]=c.ymin;for(var b=0,e=z;b<e.length;b++)if(p.polygonContainsCoords(d,e[b]))return!0;b=0;for(d=d.rings;b<d.length;b++)if(e=d[b],e.length){var f=e[0];if(p.extentContainsCoords2D(c,f))return!0;for(var h=1;h<e.length;h++){var t=e[h];if(p.extentContainsCoords2D(c,t)||q(f,t,v))return!0;f=t}}return!1}function c(c,d){a[0]=c.xmin;a[1]=c.ymax;k[0]=c.xmax;k[1]=c.ymax;r[0]=c.xmin;r[1]=c.ymin;u[0]=c.xmax;u[1]=c.ymin;d=d.paths;for(var b=0;b<d.length;b++){var e=d[b];if(d.length){var f=e[0];if(p.extentContainsCoords2D(c,
f))return!0;for(var h=1;h<e.length;h++){var t=e[h];if(p.extentContainsCoords2D(c,t)||q(f,t,v))return!0;f=t}}}return!1}function q(a,d,c){for(var b=0;b<c.length;b++)if(e(a,d,c[b][0],c[b][1]))return!0;return!1}function e(a,d,c,b,e){var n=a[0];a=a[1];var k=d[0];d=d[1];var f=c[0],h=c[1];c=b[0]-f;var f=n-f,r=k-n;b=b[1]-h;var h=a-h,t=d-a,x=b*r-c*t;if(0===x)return!1;c=(c*h-b*f)/x;f=(r*h-t*f)/x;return 0<=c&&1>=c&&0<=f&&1>=f?(e&&(e[0]=n+c*(k-n),e[1]=a+c*(d-a)),!0):!1}Object.defineProperty(g,"__esModule",{value:!0});
g.extentIntersectsPoint=f;g.extentIntersectsExtent=l;g.extentIntersectsMultipoint=m;var a=[0,0],k=[0,0],r=[0,0],u=[0,0],z=[a,k,r,u],v=[[r,a],[a,k],[k,u],[u,r]];g.extentIntersectsPolygon=h;g.extentIntersectsPolyline=c;var w=[0,0];g.isSelfIntersecting=function(a){for(var d=0;d<a.length;d++){for(var c=a[d],b=0;b<c.length-1;b++)for(var k=c[b],f=c[b+1],h=d+1;h<a.length;h++)for(var r=0;r<a[h].length-1;r++){var t=a[h][r],g=a[h][r+1],l=e(k,f,t,g,w);if(l&&!(w[0]===k[0]&&w[1]===k[1]||w[0]===t[0]&&w[1]===t[1]||
w[0]===f[0]&&w[1]===f[1]||w[0]===g[0]&&w[1]===g[1]))return!0}r=c.length;if(!(4>=r))for(b=0;b<r-3;b++){var q=r-1;0===b&&(q=r-2);k=c[b];f=c[b+1];for(h=b+2;h<q;h++)if(t=c[h],g=c[h+1],(l=e(k,f,t,g,w))&&!(w[0]===k[0]&&w[1]===k[1]||w[0]===t[0]&&w[1]===t[1]||w[0]===f[0]&&w[1]===f[1]||w[0]===g[0]&&w[1]===g[1]))return!0}}return!1};g.segmentIntersects=e;g.getExtentIntersector=function(a){switch(a){case "esriGeometryEnvelope":case "extent":return l;case "esriGeometryMultipoint":case "multipoint":return m;case "esriGeometryPoint":case "point":return f;
case "esriGeometryPolygon":case "polygon":return h;case "esriGeometryPolyline":case "polyline":return c;case "mesh":return l}}})},"esri/portal/Portal":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper dojo/_base/kernel dojo/_base/url dojo/promise/all ../config ../kernel ../request ../core/Error ../core/JSONSupport ../core/lang ../core/Loadable ../core/promiseUtils ../core/sniff ../core/urlUtils ../core/accessorSupport/decorators ../geometry/Extent ./PortalQueryParams ./PortalQueryResult ./PortalUser".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x,y,A,D){var B,F={Bookmark:function(){return w.create(function(d){return b(["./Bookmark"],d)})},Portal:function(){return w.create(function(d){return b(["./Portal"],d)})},PortalFolder:function(){return w.create(function(d){return b(["./PortalFolder"],d)})},PortalGroup:function(){return w.create(function(d){return b(["./PortalGroup"],d)})},PortalItem:function(){return w.create(function(d){return b(["./PortalItem"],d)})},PortalQueryParams:function(){return w.create(function(d){return b(["./PortalQueryParams"],
d)})},PortalQueryResult:function(){return w.create(function(d){return b(["./PortalQueryResult"],d)})},PortalRating:function(){return w.create(function(d){return b(["./PortalRating"],d)})},PortalUser:function(){return w.create(function(d){return b(["./PortalUser"],d)})}};return function(g){function u(d){d=g.call(this)||this;d.access=null;d.allSSL=!1;d.authMode="auto";d.authorizedCrossOriginDomains=null;d.basemapGalleryGroupQuery=null;d.bingKey=null;d.canListApps=!1;d.canListData=!1;d.canListPreProvisionedItems=
!1;d.canProvisionDirectPurchase=!1;d.canSearchPublic=!1;d.canShareBingPublic=!1;d.canSharePublic=!1;d.canSignInArcGIS=!1;d.canSignInIDP=!1;d.colorSetsGroupQuery=null;d.commentsEnabled=!1;d.created=null;d.culture=null;d.customBaseUrl=null;d.defaultBasemap=null;d.defaultExtent=null;d.defaultVectorBasemap=null;d.description=null;d.eueiEnabled=!1;d.featuredGroups=null;d.featuredItemsGroupQuery=null;d.galleryTemplatesGroupQuery=null;d.livingAtlasGroupQuery=null;d.hasCategorySchema=!1;d.helperServices=
null;d.homePageFeaturedContent=null;d.homePageFeaturedContentCount=null;d.httpPort=null;d.httpsPort=null;d.id=null;d.ipCntryCode=null;d.isPortal=!1;d.layerTemplatesGroupQuery=null;d.maxTokenExpirationMinutes=null;d.modified=null;d.name=null;d.portalHostname=null;d.portalMode=null;d.portalProperties=null;d.region=null;d.rotatorPanels=null;d.showHomePageDescription=!1;d.supportsHostedServices=!1;d.symbolSetsGroupQuery=null;d.templatesGroupQuery=null;d.units=null;d.url=e.portalUrl;d.urlKey=null;d.user=
null;d.useStandardizedQuery=!1;d.useVectorBasemaps=!1;d.vectorBasemapGalleryGroupQuery=null;return d}f(u,g);v=u;u.prototype.normalizeCtorArgs=function(d){return"string"===typeof d?{url:d}:d};u.prototype.destroy=function(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)};u.prototype.readAuthorizedCrossOriginDomains=function(a){if(a)for(var c=0;c<a.length;c++){var b=a[c],n=b;d.hasProtocol(n)||(n=d.appUrl.scheme+"://"+n);d.canUseXhr(n)||
e.request.corsEnabledServers.push({host:b,withCredentials:!0})}return a};u.prototype.readDefaultBasemap=function(d){return d?(d=B.fromJSON(d),d.portalItem={portal:this},d):null};u.prototype.readDefaultVectorBasemap=function(d){return d?(d=B.fromJSON(d),d.portalItem={portal:this},d):null};Object.defineProperty(u.prototype,"extraQuery",{get:function(){var d=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!d?" AND orgid:"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(u.prototype,
"isOrganization",{get:function(){return!!this.access},enumerable:!0,configurable:!0});Object.defineProperty(u.prototype,"restUrl",{get:function(){var d=this.url;if(d)var a=d.indexOf("/sharing"),d=0<a?d.substring(0,a):this.url.replace(/\/+$/,""),d=d+"/sharing/rest";return d},enumerable:!0,configurable:!0});Object.defineProperty(u.prototype,"thumbnailUrl",{get:function(){var d=this.restUrl,a=this.thumbnail;return d&&a?this._normalizeSSL(d+"/portals/self/resources/"+a):null},enumerable:!0,configurable:!0});
u.prototype.readUrlKey=function(d){return d?d.toLowerCase():d};u.prototype.readUser=function(d){var a=null;d&&(a=D.fromJSON(d),a.portal=this);return a};u.prototype.load=function(){var d=this,c=w.create(function(d){return b(["../Basemap"],d)}).then(function(d){B=d}).then(function(){return d._fetchSelf()}).then(function(c){if(a.id){var b=a.id;d.credential=b.findCredential(d.restUrl);d.credential||d.authMode!==v.AUTH_MODE_AUTO||(d._esriId_credentialCreateHandle=b.on("credential-create",function(){b.findCredential(d.restUrl)&&
d._signIn()}))}d.read(c)});this.addResolvingPromise(c);return this.when()};u.prototype.fetchBasemaps=function(d){var a=new y;a.query=d||(this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery);a.disableExtraQuery=!0;return this.queryGroups(a).then(function(d){a.num=100;a.query='type:"Web Map" -type:"Web Application"';return d.total?(d=d.results[0],a.sortField=d.sortField||"name",a.sortOrder=d.sortOrder||"desc",d.queryItems(a)):null}).then(function(d){return d&&d.total?
d.results.filter(function(d){return"Web Map"===d.type}).map(function(d){return new B({portalItem:d})}):[]})};u.prototype.fetchCategorySchema=function(){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema").then(function(d){return d.categorySchema}):w.resolve([])};u.prototype.fetchFeaturedGroups=function(){var d=this.featuredGroups,a=new y;a.num=100;a.sortField="title";if(d&&d.length){for(var c=[],b=0;b<d.length;b++){var n=d[b];c.push('(title:"'+n.title+'" AND owner:'+
n.owner+")")}a.query=c.join(" OR ");return this.queryGroups(a).then(function(d){return d.results})}return w.resolve([])};u.prototype.fetchRegions=function(){return this._request(this.restUrl+"/portals/regions",{query:{culture:this.user&&this.user.culture||this.culture||h.locale}})};u.getDefault=function(){v._default||(v._default=new v);return v._default};u.prototype.queryGroups=function(d){return this._queryPortal("/community/groups",d,"PortalGroup")};u.prototype.queryItems=function(d){return this._queryPortal("/search",
d,"PortalItem")};u.prototype.queryUsers=function(d){d.sortField||(d.sortField="username");return this._queryPortal("/community/users",d,"PortalUser")};u.prototype.toJSON=function(){throw new r("internal:not-yet-implemented","Portal.toJSON is not yet implemented");};u.prototype._fetchSelf=function(d,a){void 0===d&&(d=this.authMode);void 0===a&&(a=!1);var c=this.restUrl+"/portals/self";d={authMode:d,query:{culture:h.locale}};"auto"===d.authMode&&(d.authMode="no-prompt");a&&(d.query.default=!0);return this._request(c,
d)};u.prototype._queryPortal=function(d,a,c){var b=this,n=function(c){return b._request(b.restUrl+d,a.toRequestOptions(b)).then(function(d){var n=a.clone();n.start=d.nextStart;return new A({nextQueryParams:n,queryParams:a,total:d.total,results:v._resultsToTypedArray(c,{portal:b},d)})}).then(function(d){return q(d.results.map(function(a){return"function"===typeof a.when?a.when():d})).always(function(){return d})})};return c&&F[c]?F[c]().then(function(d){return n(d)}):n()};u.prototype._signIn=function(){var d=
this;if(this.authMode===v.AUTH_MODE_ANONYMOUS)return w.reject(new r("portal:invalid-auth-mode",'Current "authMode"\' is "'+this.authMode+'"'));if("failed"===this.loadStatus)return w.reject(this.loadError);var c=function(a){return w.resolve().then(function(){if("not-loaded"===d.loadStatus)return a||(d.authMode="immediate"),d.load().then(function(){return null});if("loading"===d.loadStatus)return d.load().then(function(){if(d.credential)return null;d.credential=a;return d._fetchSelf("immediate")});
if(d.user&&d.credential===a)return null;d.credential=a;return d._fetchSelf("immediate")}).then(function(a){a&&d.read(a)})};return a.id?a.id.getCredential(this.restUrl).then(function(d){return c(d)}):c(this.credential)};u.prototype._normalizeSSL=function(d){var a=this.allSSL;!a&&t("esri-secure-context")&&(a=!0);if(this.isPortal){var b=new c(d);return-1<this.portalHostname.toLowerCase().indexOf(b.host.toLowerCase())&&b.port&&"80"!==b.port&&"443"!==b.port?a?"https://"+b.host+(this.httpsPort&&443!==this.httpsPort?
":"+this.httpsPort:"")+b.path+"?"+b.query:"http://"+b.host+(this.httpPort&&80!==this.httpPort?":"+this.httpPort:"")+b.path+"?"+b.query:a?d.replace("http:","https:"):d}return a?d.replace("http:","https:"):d};u.prototype._normalizeUrl=function(d){var a=this.credential&&this.credential.token;return this._normalizeSSL(a?d+(-1<d.indexOf("?")?"\x26":"?")+"token\x3d"+a:d)};u.prototype._requestToTypedArray=function(d,a,c){var n=this,e=function(c){return n._request(d,a).then(function(d){var a=v._resultsToTypedArray(c,
{portal:n},d);return q(a.map(function(a){return"function"===typeof a.when?a.when():d})).always(function(){return a})})};return c?w.create(function(d){return b(["./"+c],d)}).then(function(d){return e(d)}):e()};u.prototype._request=function(d,a){var c=this.authMode===v.AUTH_MODE_ANONYMOUS?"anonymous":"auto",b=null,n="auto",e={f:"json"},f="json";a&&(a.authMode&&(c=a.authMode),a.body&&(b=a.body),a.method&&(n=a.method),a.query&&(e=p({},e,a.query)),a.responseType&&(f=a.responseType));a={authMode:c,body:b,
callbackParamName:"callback",method:n,query:e,responseType:f,timeout:0};return k(this._normalizeSSL(d),a).then(function(d){return d.data})};u._resultsToTypedArray=function(d,a,c){if(c){if(c=c.listings||c.notifications||c.userInvitations||c.tags||c.items||c.groups||c.comments||c.provisions||c.results||c.relatedItems||c,d||a)c=c.map(function(c){c=z.mixin(d?d.fromJSON(c):c,a);"function"===typeof c.load&&c.load();return c})}else c=[];return c};var v;u.AUTH_MODE_ANONYMOUS="anonymous";u.AUTH_MODE_AUTO=
"auto";u.AUTH_MODE_IMMEDIATE="immediate";l([n.property()],u.prototype,"access",void 0);l([n.property()],u.prototype,"allSSL",void 0);l([n.property()],u.prototype,"authMode",void 0);l([n.property()],u.prototype,"authorizedCrossOriginDomains",void 0);l([n.reader("authorizedCrossOriginDomains")],u.prototype,"readAuthorizedCrossOriginDomains",null);l([n.property()],u.prototype,"basemapGalleryGroupQuery",void 0);l([n.property()],u.prototype,"bingKey",void 0);l([n.property()],u.prototype,"canListApps",
void 0);l([n.property()],u.prototype,"canListData",void 0);l([n.property()],u.prototype,"canListPreProvisionedItems",void 0);l([n.property()],u.prototype,"canProvisionDirectPurchase",void 0);l([n.property()],u.prototype,"canSearchPublic",void 0);l([n.property()],u.prototype,"canShareBingPublic",void 0);l([n.property()],u.prototype,"canSharePublic",void 0);l([n.property()],u.prototype,"canSignInArcGIS",void 0);l([n.property()],u.prototype,"canSignInIDP",void 0);l([n.property()],u.prototype,"colorSetsGroupQuery",
void 0);l([n.property()],u.prototype,"commentsEnabled",void 0);l([n.property({type:Date})],u.prototype,"created",void 0);l([n.property()],u.prototype,"credential",void 0);l([n.property()],u.prototype,"culture",void 0);l([n.property()],u.prototype,"currentVersion",void 0);l([n.property()],u.prototype,"customBaseUrl",void 0);l([n.property()],u.prototype,"defaultBasemap",void 0);l([n.reader("defaultBasemap")],u.prototype,"readDefaultBasemap",null);l([n.property({type:x})],u.prototype,"defaultExtent",
void 0);l([n.property()],u.prototype,"defaultVectorBasemap",void 0);l([n.reader("defaultVectorBasemap")],u.prototype,"readDefaultVectorBasemap",null);l([n.property()],u.prototype,"description",void 0);l([n.property()],u.prototype,"eueiEnabled",void 0);l([n.property({dependsOn:["user","id","canSearchPublic"],readOnly:!0})],u.prototype,"extraQuery",null);l([n.property()],u.prototype,"featuredGroups",void 0);l([n.property()],u.prototype,"featuredItemsGroupQuery",void 0);l([n.property()],u.prototype,
"galleryTemplatesGroupQuery",void 0);l([n.property()],u.prototype,"livingAtlasGroupQuery",void 0);l([n.property()],u.prototype,"hasCategorySchema",void 0);l([n.property()],u.prototype,"helpBase",void 0);l([n.property()],u.prototype,"helperServices",void 0);l([n.property()],u.prototype,"helpMap",void 0);l([n.property()],u.prototype,"homePageFeaturedContent",void 0);l([n.property()],u.prototype,"homePageFeaturedContentCount",void 0);l([n.property()],u.prototype,"httpPort",void 0);l([n.property()],u.prototype,
"httpsPort",void 0);l([n.property()],u.prototype,"id",void 0);l([n.property()],u.prototype,"ipCntryCode",void 0);l([n.property({dependsOn:["access"],readOnly:!0})],u.prototype,"isOrganization",null);l([n.property()],u.prototype,"isPortal",void 0);l([n.property()],u.prototype,"layerTemplatesGroupQuery",void 0);l([n.property()],u.prototype,"maxTokenExpirationMinutes",void 0);l([n.property({type:Date})],u.prototype,"modified",void 0);l([n.property()],u.prototype,"name",void 0);l([n.property()],u.prototype,
"portalHostname",void 0);l([n.property()],u.prototype,"portalMode",void 0);l([n.property()],u.prototype,"portalProperties",void 0);l([n.property()],u.prototype,"region",void 0);l([n.property({dependsOn:["url"],readOnly:!0})],u.prototype,"restUrl",null);l([n.property()],u.prototype,"rotatorPanels",void 0);l([n.property()],u.prototype,"showHomePageDescription",void 0);l([n.property()],u.prototype,"staticImagesUrl",void 0);l([n.property()],u.prototype,"stylesGroupQuery",void 0);l([n.property()],u.prototype,
"supportsHostedServices",void 0);l([n.property()],u.prototype,"symbolSetsGroupQuery",void 0);l([n.property()],u.prototype,"templatesGroupQuery",void 0);l([n.property()],u.prototype,"thumbnail",void 0);l([n.property({dependsOn:["restUrl","thumbnail"],readOnly:!0})],u.prototype,"thumbnailUrl",null);l([n.property()],u.prototype,"units",void 0);l([n.property()],u.prototype,"url",void 0);l([n.property()],u.prototype,"urlKey",void 0);l([n.reader("urlKey")],u.prototype,"readUrlKey",null);l([n.property()],
u.prototype,"user",void 0);l([n.reader("user")],u.prototype,"readUser",null);l([n.property()],u.prototype,"useStandardizedQuery",void 0);l([n.property()],u.prototype,"useVectorBasemaps",void 0);l([n.property()],u.prototype,"vectorBasemapGalleryGroupQuery",void 0);l([m(1,n.cast(y))],u.prototype,"_queryPortal",null);return u=v=l([n.subclass("esri.portal.Portal")],u)}(n.declared(u,v))})},"esri/core/tsSupport/paramHelper":function(){define([],function(){return function(b,g){return function(p,f){g(p,f,
b)}}})},"esri/portal/PortalQueryParams":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/kebabDictionary ../core/lang ../core/accessorSupport/decorators ../geometry/Extent ../geometry/SpatialReference ../geometry/support/webMercatorUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k){var r=h({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});
return function(b){function h(a){a=b.call(this)||this;a.categories=null;a.disableExtraQuery=!1;a.extent=null;a.num=10;a.query=null;a.sortField=null;a.start=1;return a}f(h,b);g=h;Object.defineProperty(h.prototype,"sortOrder",{get:function(){return this._get("sortOrder")||"asc"},set:function(a){"asc"!==a&&"desc"!==a||this._set("sortOrder",a)},enumerable:!0,configurable:!0});h.prototype.clone=function(){return new g({categories:this.categories?c.clone(this.categories):null,disableExtraQuery:this.disableExtraQuery,
extent:this.extent?this.extent.clone():null,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})};h.prototype.toRequestOptions=function(c,b){var d;this.categories&&(d=this.categories.map(function(d){return Array.isArray(d)?JSON.stringify(d):d}));var n;if(this.extent){var e=k.project(this.extent,a.WGS84);e&&(n=e.xmin+","+e.ymin+","+e.xmax+","+e.ymax)}e=this.query;!this.disableExtraQuery&&c.extraQuery&&(e="("+e+")"+c.extraQuery);c={categories:d,bbox:n,q:e,
num:this.num,sortField:null,sortOrder:null,start:this.start};this.sortField&&(c.sortField=r.toJSON(this.sortField),c.sortOrder=this.sortOrder);return{query:p({},b,c)}};var g;l([q.property()],h.prototype,"categories",void 0);l([q.property()],h.prototype,"disableExtraQuery",void 0);l([q.property({type:e})],h.prototype,"extent",void 0);l([q.property()],h.prototype,"num",void 0);l([q.property()],h.prototype,"query",void 0);l([q.property()],h.prototype,"sortField",void 0);l([q.property()],h.prototype,
"sortOrder",null);l([q.property()],h.prototype,"start",void 0);return h=g=l([q.subclass("esri.portal.PortalQueryParams")],h)}(q.declared(m))})},"esri/core/kebabDictionary":function(){define(["require","exports"],function(b,g){return function(b,f){void 0===f&&(f={});var g=f.ignoreUnknown||!1,m={},h;for(h in b)m[b[h]]=h;var c=function(c){return m.hasOwnProperty(c)?m[c]:g?void 0:c},q=function(c){return b.hasOwnProperty(c)?b[c]:g?void 0:c};return{toJSON:c,fromJSON:q,read:function(c){return q(c)},write:function(b,
a,k){b=c(b);void 0!==b&&(a[k]=b)}}}})},"esri/portal/PortalQueryResult":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.nextQueryParams=null;c.queryParams=null;c.results=null;c.total=null;return c}p(c,b);f([m.property()],c.prototype,"nextQueryParams",void 0);f([m.property()],c.prototype,"queryParams",
void 0);f([m.property()],c.prototype,"results",void 0);f([m.property()],c.prototype,"total",void 0);return c=f([m.subclass("esri.portal.PortalQueryResult")],c)}(m.declared(l))})},"esri/portal/PortalUser":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/promise/all ../core/Error ../core/JSONSupport ../core/promiseUtils ../core/accessorSupport/decorators ./PortalFolder ./PortalGroup".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){return function(k){function h(){var a=
k.call(this)||this;a.access=null;a.created=null;a.culture=null;a.description=null;a.email=null;a.fullName=null;a.modified=null;a.orgId=null;a.portal=null;a.preferredView=null;a.privileges=null;a.region=null;a.role=null;a.roleId=null;a.units=null;a.username=null;a.userType=null;return a}p(h,k);Object.defineProperty(h.prototype,"thumbnailUrl",{get:function(){var a=this.url,c=this.thumbnail;return a&&c?this.portal._normalizeUrl(a+"/info/"+c+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,
"userContentUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username:null},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/users/"+this.username:null},enumerable:!0,configurable:!0});h.prototype.addItem=function(a){var c=this,b=a&&a.item,e=a&&a.data;a=a&&a.folder;var k={method:"post"};b&&(k.query=b._getPostQuery(),null!=e&&("string"===typeof e?k.query.text=e:"object"===
typeof e&&(k.query.text=JSON.stringify(e))));e=this.userContentUrl;a&&(e+="/"+a.id);return this.portal._request(e+"/addItem",k).then(function(d){b.id=d.id;b.portal=c.portal;return b.loaded?b._reload():b.load()})};h.prototype.deleteItem=function(a){var c=this.userContentUrl;a.ownerFolder&&(c+="/"+a.ownerFolder);return this.portal._request(c+("/items/"+a.id+"/delete"),{method:"post"}).then(function(){a.id=null;a.portal=null})};h.prototype.deleteItems=function(a){var b=this.userContentUrl+"/deleteItems",
e=a.map(function(a){return a.id});return e.length?(e={method:"post",query:{items:e.join(",")}},this.portal._request(b,e).then(function(){a.forEach(function(a){a.id=null;a.portal=null})})):c.resolve(void 0)};h.prototype.fetchFolders=function(){var a=this;return this.portal._request(this.userContentUrl,{query:{num:1}}).then(function(c){return c&&c.folders?c.folders.map(function(c){c=e.fromJSON(c);c.portal=a.portal;return c}):[]})};h.prototype.fetchGroups=function(){var c=this;return this.portal._request(this.url).then(function(b){return b&&
b.groups?b.groups.map(function(b){b=a.fromJSON(b);b.portal=c.portal;return b}):[]})};h.prototype.fetchItems=function(a){var e=this;a||(a={});var k=this.userContentUrl;a.folder&&(k+="/"+a.folder.id);var f;return c.create(function(a){return b(["./PortalItem"],a)}).then(function(c){f=c;return e.portal._request(k,{query:{folders:!1,num:a.num||10,start:a.start||1}})}).then(function(a){var d;return a&&a.items?(d=a.items.map(function(d){d=f.fromJSON(d);d.portal=e.portal;return d}),l(d.map(function(d){return d.load()})).always(function(){return{items:d,
nextStart:a.nextStart,total:a.total}})):{items:[],nextStart:-1,total:0}})};h.prototype.getThumbnailUrl=function(a){var c=this.thumbnailUrl;c&&a&&(c+="\x26w\x3d"+a);return c};h.prototype.queryFavorites=function(b){return this.favGroupId?(this._favGroup||(this._favGroup=new a({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(b)):c.reject(new m("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))};h.prototype.toJSON=function(){throw new m("internal:not-yet-implemented",
"PortalGroup.toJSON is not yet implemented");};f([q.property()],h.prototype,"access",void 0);f([q.property({type:Date})],h.prototype,"created",void 0);f([q.property()],h.prototype,"culture",void 0);f([q.property()],h.prototype,"description",void 0);f([q.property()],h.prototype,"email",void 0);f([q.property()],h.prototype,"favGroupId",void 0);f([q.property()],h.prototype,"fullName",void 0);f([q.property({type:Date})],h.prototype,"modified",void 0);f([q.property()],h.prototype,"orgId",void 0);f([q.property()],
h.prototype,"portal",void 0);f([q.property()],h.prototype,"preferredView",void 0);f([q.property()],h.prototype,"privileges",void 0);f([q.property()],h.prototype,"region",void 0);f([q.property()],h.prototype,"role",void 0);f([q.property()],h.prototype,"roleId",void 0);f([q.property()],h.prototype,"thumbnail",void 0);f([q.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],h.prototype,"thumbnailUrl",null);f([q.property()],h.prototype,"units",void 0);f([q.property({dependsOn:["portal.restUrl"],
readOnly:!0})],h.prototype,"userContentUrl",null);f([q.property({dependsOn:["portal.restUrl"],readOnly:!0})],h.prototype,"url",null);f([q.property()],h.prototype,"username",void 0);f([q.property()],h.prototype,"userType",void 0);return h=f([q.subclass("esri.portal.PortalUser")],h)}(q.declared(h))})},"esri/portal/PortalFolder":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Error ../core/JSONSupport ../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h){return function(c){function b(b){b=c.call(this)||this;b.created=null;b.id=null;b.portal=null;b.title=null;b.username=null;return b}p(b,c);Object.defineProperty(b.prototype,"url",{get:function(){var c=this.get("portal.restUrl");return c?c+"/content/users/"+this.username+"/"+this.id:null},enumerable:!0,configurable:!0});b.prototype.toJSON=function(){throw new l("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented");};f([h.property({type:Date})],b.prototype,
"created",void 0);f([h.property()],b.prototype,"id",void 0);f([h.property()],b.prototype,"portal",void 0);f([h.property()],b.prototype,"title",void 0);f([h.property({dependsOn:["portal.restUrl"],readOnly:!0})],b.prototype,"url",null);f([h.property()],b.prototype,"username",void 0);return b=f([h.subclass("esri.portal.PortalFolder")],b)}(h.declared(m))})},"esri/portal/PortalGroup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/Error ../core/JSONSupport ../core/accessorSupport/decorators ./PortalQueryParams".split(" "),
function(b,g,p,f,l,m,h,c,q){return function(b){function a(a){a=b.call(this)||this;a.access=null;a.created=null;a.description=null;a.id=null;a.isInvitationOnly=!1;a.modified=null;a.owner=null;a.portal=null;a.snippet=null;a.sortField=null;a.sortOrder=null;a.tags=null;a.title=null;return a}p(a,b);Object.defineProperty(a.prototype,"thumbnailUrl",{get:function(){var a=this.url,c=this.thumbnail;return a&&c?this.portal._normalizeUrl(a+"/info/"+c+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/groups/"+this.id:null},enumerable:!0,configurable:!0});a.prototype.fetchCategorySchema=function(){var a=this;return this.portal._request(this.url+"/categorySchema").then(function(c){c=c.categorySchema||[];return c.some(function(a){return"contentCategorySetsGroupQuery.LivingAtlas"===a.source})?a._fetchCategorySchemaSet("LivingAtlas"):c})};a.prototype.fetchMembers=function(){return this.portal._request(this.url+"/users")};
a.prototype.getThumbnailUrl=function(a){var c=this.thumbnailUrl;c&&a&&(c+="\x26w\x3d"+a);return c};a.prototype.toJSON=function(){throw new m("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};a.prototype.queryItems=function(a){if(5<parseFloat(this.portal.currentVersion))return a=a||new q,this.portal._queryPortal("/content/groups/"+this.id+"/search",a,"PortalItem");a=a?a.clone():new q;a.query="group:"+this.id+(a.query?" "+a.query:"");return this.portal.queryItems(a)};a.prototype._fetchCategorySchemaSet=
function(a){var c=this;return this.portal._fetchSelf(this.portal.authMode,!0).then(function(a){if(a=a.contentCategorySetsGroupQuery){var b=new q;b.disableExtraQuery=!0;b.num=1;b.query=a;return c.portal.queryGroups(b)}throw new m("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found");}).then(function(c){if(c.total){c=c.results[0];var b=new q;b.num=1;b.query='typekeywords:"'+a+'"';return c.queryItems(b)}throw new m("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found");
}).then(function(a){return a.total?a.results[0].fetchData().then(function(a){return(a=a&&a.categorySchema)&&a.length?a:[]}):[]})};f([c.property()],a.prototype,"access",void 0);f([c.property({type:Date})],a.prototype,"created",void 0);f([c.property()],a.prototype,"description",void 0);f([c.property()],a.prototype,"id",void 0);f([c.property()],a.prototype,"isInvitationOnly",void 0);f([c.property({type:Date})],a.prototype,"modified",void 0);f([c.property()],a.prototype,"owner",void 0);f([c.property()],
a.prototype,"portal",void 0);f([c.property()],a.prototype,"snippet",void 0);f([c.property()],a.prototype,"sortField",void 0);f([c.property()],a.prototype,"sortOrder",void 0);f([c.property()],a.prototype,"tags",void 0);f([c.property()],a.prototype,"thumbnail",void 0);f([c.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],a.prototype,"thumbnailUrl",null);f([c.property()],a.prototype,"title",void 0);f([c.property({dependsOn:["portal.restUrl"],readOnly:!0})],a.prototype,
"url",null);f([l(0,c.cast(q))],a.prototype,"queryItems",null);return a=f([c.subclass("esri.portal.PortalGroup")],a)}(c.declared(h))})},"esri/portal/PortalItem":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Error ../core/JSONSupport ../core/lang ../core/Loadable ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/Extent ./Portal ./PortalRating".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r,u){return function(c){function g(a){a=
c.call(this)||this;a.access=null;a.accessInformation=null;a.applicationProxies=null;a.avgRating=null;a.categories=null;a.created=null;a.culture=null;a.description=null;a.extent=null;a.groupCategories=null;a.id=null;a.itemControl=null;a.licenseInfo=null;a.modified=null;a.name=null;a.numComments=null;a.numRatings=null;a.numViews=null;a.owner=null;a.portal=null;a.screenshots=null;a.size=null;a.snippet=null;a.tags=null;a.title=null;a.type=null;a.typeKeywords=null;a.url=null;return a}p(g,c);m=g;Object.defineProperty(g.prototype,
"displayName",{get:function(){var a=this.type,d=this.typeKeywords||[],c=a;"Feature Service"===a||"Feature Collection"===a?c=-1<d.indexOf("Table")?"Table":-1<d.indexOf("Route Layer")?"Route Layer":-1<d.indexOf("Markup")?"Markup":"Feature Layer":"Image Service"===a?c=-1<d.indexOf("Elevation 3D Layer")?"Elevation Layer":"Imagery Layer":"Scene Service"===a?c="Scene Layer":"Scene Package"===a?c="Scene Layer Package":"Stream Service"===a?c="Feature Layer":"Geoprocessing Service"===a&&this.portal&&this.portal.isPortal?
c=-1<d.indexOf("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===a?c="Locator":"Microsoft Powerpoint"===a?c="Microsoft PowerPoint":"GeoJson"===a?c="GeoJSON":"Globe Service"===a?c="Globe Layer":"Vector Tile Service"===a?c="Tile Layer":"netCDF"===a?c="NetCDF":"Map Service"===a?c=-1===d.indexOf("Spatiotemporal")&&(-1<d.indexOf("Hosted Service")||-1<d.indexOf("Tiled"))?"Tile Layer":"Map Image Layer":a&&-1<a.toLowerCase().indexOf("add in")?c=a.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===
a&&(c="Big Data File Share");return c},enumerable:!0,configurable:!0});g.prototype.readExtent=function(a){return a&&a.length?new k(a[0][0],a[0][1],a[1][0],a[1][1]):null};Object.defineProperty(g.prototype,"iconUrl",{get:function(){var a=this.type&&this.type.toLowerCase()||"",d=this.typeKeywords||[],c=!1,e=!1,k=!1,f=!1,h=!1;0<a.indexOf("service")||"feature collection"===a||"kml"===a||"wms"===a||"wmts"===a||"wfs"===a?(c=-1<d.indexOf("Hosted Service"),"feature service"===a||"feature collection"===a||
"kml"===a||"wfs"===a?(e=-1<d.indexOf("Table"),k=-1<d.indexOf("Route Layer"),f=-1<d.indexOf("Markup"),a=(h=-1!==d.indexOf("Spatiotemporal"))&&e?"spatiotemporaltable":e?"table":k?"routelayer":f?"markup":h?"spatiotemporal":c?"featureshosted":"features"):a="map service"===a||"wms"===a||"wmts"===a?c||-1<d.indexOf("Tiled")||"wmts"===a?"maptiles":"mapimages":"scene service"===a?-1<d.indexOf("Line")?"sceneweblayerline":-1<d.indexOf("3DObject")?"sceneweblayermultipatch":-1<d.indexOf("Point")?"sceneweblayerpoint":
-1<d.indexOf("IntegratedMesh")?"sceneweblayermesh":-1<d.indexOf("PointCloud")?"sceneweblayerpointcloud":-1<d.indexOf("Polygon")?"sceneweblayerpolygon":"sceneweblayer":"image service"===a?-1<d.indexOf("Elevation 3D Layer")?"elevationlayer":"imagery":"stream service"===a?"streamlayer":"vector tile service"===a?"vectortile":"datastore catalog service"===a?"datastorecollection":"geocoding service"===a?"geocodeservice":"geoprocessing service"===a?-1<d.indexOf("Web Tool")&&this.portal&&this.portal.isPortal?
"tool":"layers":"layers"):a="web map"===a||"cityengine web scene"===a?"maps":"web scene"===a?-1<d.indexOf("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===a||"mobile application"===a||"application"===a||"operation view"===a||"desktop application"===a?"apps":"map document"===a||"map package"===a||"published map"===a||"scene document"===a||"globe document"===a||"basemap package"===a||"mobile basemap package"===a||"mobile map package"===a||"project package"===a||"project template"===
a||"pro map"===a||"layout"===a||"layer"===a&&-1<d.indexOf("ArcGIS Pro")||"explorer map"===a&&d.indexOf("Explorer Document")?"mapsgray":"service definition"===a||"csv"===a||"shapefile"===a||"cad drawing"===a||"geojson"===a||"360 vr experience"===a||"netcdf"===a?"datafiles":"explorer add in"===a||"desktop add in"===a||"windows viewer add in"===a||"windows viewer configuration"===a?"appsgray":"arcgis pro add in"===a||"arcgis pro configuration"===a?"addindesktop":"rule package"===a||"file geodatabase"===
a||"sqlite geodatabase"===a||"csv collection"===a||"kml collection"===a||"windows mobile package"===a||"map template"===a||"desktop application template"===a||"arcpad package"===a||"code sample"===a||"form"===a||"document link"===a||"operations dashboard add in"===a||"rules package"===a||"image"===a||"workflow manager package"===a||"explorer map"===a&&-1<d.indexOf("Explorer Mapping Application")||-1<d.indexOf("Document")?"datafilesgray":"network analysis service"===a||"geoprocessing service"===a||
"geodata service"===a||"geometry service"===a||"geoprocessing package"===a||"locator package"===a||"geoprocessing sample"===a||"workflow manager service"===a?"toolsgray":"layer"===a||"layer package"===a||"explorer layer"===a?"layersgray":"scene package"===a?"scenepackage":"mobile scene package"===a?"mobilescenepackage":"tile package"===a?"tilepackage":"task file"===a?"taskfile":"report template"===a?"report-template":"statistical data collection"===a?"statisticaldatacollection":"insights workbook"===
a?"workbook":"insights model"===a?"insightsmodel":"insights page"===a?"insightspage":"insights theme"===a?"insightstheme":"hub initiative"===a?"hubinitiative":"hubpage"===a?"hubpage":"hub site application"===a?"hubsite":"relational database connection"===a?"relationaldatabaseconnection":"big data file share"===a?"datastorecollection":"image collection"===a?"imagecollection":"style"===a?"style":"desktop style"===a?"desktopstyle":"dashboard"===a?"dashboard":"raster function template"===a?"rasterprocessingtemplate":
"vector tile package"===a?"vectortilepackage":"ortho mapping project"===a?"orthomappingproject":"ortho mapping template"===a?"orthomappingtemplate":"solution"===a?"solutions":"maps";return a?b.toUrl("../images/portal/"+a+"16.png"):null},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"isLayer",{get:function(){return-1<"Map Service;Feature Service;Feature Collection;Scene Service;Image Service;Stream Service;Vector Tile Service;WMTS;WMS".split(";").indexOf(this.type)},enumerable:!0,
configurable:!0});Object.defineProperty(g.prototype,"itemUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/items/"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"thumbnailUrl",{get:function(){var a=this.itemUrl,d=this.thumbnail;return a&&d?this.portal._normalizeUrl(a+"/info/"+d+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"userItemUrl",{get:function(){var a=this.get("portal.restUrl");if(!a)return null;
var d=this.owner||this.get("portal.user.username");return d?a+"/content/users/"+(this.ownerFolder?d+"/"+this.ownerFolder:d)+"/items/"+this.id:null},enumerable:!0,configurable:!0});g.prototype.load=function(){var a=this;this.portal||(this.portal=r.getDefault());var d=this.portal.load().then(function(){return a.resourceInfo?a.resourceInfo:a.id&&a.itemUrl?a.portal._request(a.itemUrl):{}}).then(function(d){a.resourceInfo=d;a.read(d)});this.addResolvingPromise(d);return this.when()};g.prototype.addRating=
function(a){var d={method:"post",query:{}};a instanceof u&&(a=a.rating);isNaN(a)||"number"!==typeof a||(d.query.rating=a);return this.portal._request(this.itemUrl+"/addRating",d).then(function(){return new u({rating:a,created:new Date})})};g.prototype.deleteRating=function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(function(){})};g.prototype.fetchData=function(a){void 0===a&&(a="json");return this.portal._request(this.itemUrl+"/data",{responseType:a})};g.prototype.fetchRating=
function(){return this.portal._request(this.itemUrl+"/rating").then(function(a){return null!=a.rating?(a.created=new Date(a.created),new u(a)):null})};g.prototype.fetchRelatedItems=function(a){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:a},"PortalItem")};g.prototype.getThumbnailUrl=function(a){var d=this.thumbnailUrl;d&&a&&(d+="\x26w\x3d"+a);return d};g.prototype.update=function(a){var d=this;return this.id?this.load().then(function(){return d.portal._signIn()}).then(function(){var c=
a&&a.data,b={method:"post"};b.query=d._getPostQuery();for(var e in b.query)null===b.query[e]&&(b.query[e]="");b.query.clearEmptyFields=!0;null!=c&&("string"===typeof c?b.query.text=c:"object"===typeof c&&(b.query.text=JSON.stringify(c)));return d.portal._request(d.userItemUrl+"/update",b).then(function(){return d._reload()})}):q.reject(new l("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};g.prototype.updateThumbnail=function(a){var d=this;return this.id?this.load().then(function(){return d.portal._signIn()}).then(function(){var c=
a.thumbnail,b={method:"post"};if("string"===typeof c)e.isDataProtocol(c)?b.query={data:c}:b.query={url:e.makeAbsolute(c)};else{var k=new FormData;k.append("file",c);b.body=k}return d.portal._request(d.userItemUrl+"/updateThumbnail",b).then(function(){return d._reload()})}):q.reject(new l("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};g.prototype.toJSON=function(){var a=this.extent,a={created:this.created&&this.created.getTime(),description:this.description,extent:a&&
[[a.xmin,a.ymin],[a.xmax,a.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return h.fixJson(a)};g.fromJSON=function(a){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");return new m({resourceInfo:a})};g.prototype._reload=function(){var a=this;return this.portal._request(this.itemUrl,
{query:{_ts:(new Date).getTime()}}).then(function(d){a.resourceInfo=d;a.read(d);return a})};g.prototype._getPostQuery=function(){var a=this.toJSON(),d;for(d in a)"tags"===d&&null!==a[d]&&(a[d]=a[d].join(", ")),"typeKeywords"===d&&null!==a[d]&&(a[d]=a[d].join(", "));return a};var m;f([a.property()],g.prototype,"access",void 0);f([a.property()],g.prototype,"accessInformation",void 0);f([a.property({json:{read:{source:"appProxies"}}})],g.prototype,"applicationProxies",void 0);f([a.property()],g.prototype,
"avgRating",void 0);f([a.property()],g.prototype,"categories",void 0);f([a.property({type:Date})],g.prototype,"created",void 0);f([a.property()],g.prototype,"culture",void 0);f([a.property()],g.prototype,"description",void 0);f([a.property({dependsOn:["type","typeKeywords"],readOnly:!0})],g.prototype,"displayName",null);f([a.property({type:k})],g.prototype,"extent",void 0);f([a.reader("extent")],g.prototype,"readExtent",null);f([a.property()],g.prototype,"groupCategories",void 0);f([a.property({dependsOn:["type",
"typeKeywords"],readOnly:!0})],g.prototype,"iconUrl",null);f([a.property()],g.prototype,"id",void 0);f([a.property({dependsOn:["type"],readOnly:!0})],g.prototype,"isLayer",null);f([a.property()],g.prototype,"itemControl",void 0);f([a.property({dependsOn:["portal.restUrl","id"],readOnly:!0})],g.prototype,"itemUrl",null);f([a.property()],g.prototype,"licenseInfo",void 0);f([a.property({type:Date})],g.prototype,"modified",void 0);f([a.property()],g.prototype,"name",void 0);f([a.property()],g.prototype,
"numComments",void 0);f([a.property()],g.prototype,"numRatings",void 0);f([a.property()],g.prototype,"numViews",void 0);f([a.property()],g.prototype,"owner",void 0);f([a.property()],g.prototype,"ownerFolder",void 0);f([a.property({type:r})],g.prototype,"portal",void 0);f([a.property()],g.prototype,"resourceInfo",void 0);f([a.property()],g.prototype,"screenshots",void 0);f([a.property()],g.prototype,"size",void 0);f([a.property()],g.prototype,"snippet",void 0);f([a.property()],g.prototype,"tags",void 0);
f([a.property()],g.prototype,"thumbnail",void 0);f([a.property({dependsOn:["itemUrl","thumbnail","portal.credential.token"],readOnly:!0})],g.prototype,"thumbnailUrl",null);f([a.property()],g.prototype,"title",void 0);f([a.property()],g.prototype,"type",void 0);f([a.property()],g.prototype,"typeKeywords",void 0);f([a.property()],g.prototype,"url",void 0);f([a.property({dependsOn:["portal.restUrl","portal.user.username","owner","ownerFolder","id"],readOnly:!0})],g.prototype,"userItemUrl",null);return g=
m=f([a.subclass("esri.portal.PortalItem")],g)}(a.declared(m,c))})},"esri/portal/PortalRating":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.created=null;c.rating=null;return c}p(c,b);f([m.property()],c.prototype,"created",void 0);f([m.property()],c.prototype,"rating",void 0);return c=f([m.subclass("esri.portal.PortalRating")],
c)}(m.declared(l))})},"esri/support/basemapDefinitions":function(){define(["require","exports","dojo/i18n!../nls/basemaps"],function(b,g,p){return{streets:{id:"streets",title:p.streets,thumbnailUrl:b.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Street Map",showLegend:!1,visibility:!0,opacity:1}]},satellite:{id:"satellite",title:p.satellite,
thumbnailUrl:b.toUrl("../images/basemap/satellite.jpg"),baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",title:p.hybrid,thumbnailUrl:b.toUrl("../images/basemap/hybrid.jpg"),baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",
title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Boundaries and Places",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",title:p.terrain,thumbnailUrl:b.toUrl("../images/basemap/terrain.jpg"),baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},topo:{id:"topo",title:p.topo,thumbnailUrl:b.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Topo Map",showLegend:!1,visibility:!0,opacity:1}]},gray:{id:"gray",title:p.gray,thumbnailUrl:b.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"dark-gray":{id:"dark-gray",title:p["dark-gray"],thumbnailUrl:b.toUrl("../images/basemap/dark-gray.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"dark-gray-reference-layer",
url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",title:p.oceans,thumbnailUrl:b.toUrl("../images/basemap/oceans.jpg"),baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",
showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"national-geographic":{id:"national-geographic",title:p["national-geographic"],thumbnailUrl:b.toUrl("../images/basemap/national-geographic.jpg"),baseMapLayers:[{id:"national-geographic-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",
title:"NatGeo World Map",showLegend:!1,layerType:"ArcGISTiledMapServiceLayer",visibility:!0,opacity:1}]},osm:{id:"osm",title:p.osm,thumbnailUrl:b.toUrl("../images/basemap/osm.jpg"),baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",title:p["dark-gray"],thumbnailUrl:b.toUrl("../images/basemap/dark-gray.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/c11ce4f7801740b2905eb03ddc963ac8/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Dark Gray",visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",title:p.gray,thumbnailUrl:b.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/8a2cba3b0ebf4140b7c0dc5ee149549a/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Light Gray",visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",title:p.streets,thumbnailUrl:b.toUrl("../images/basemap/streets.jpg"),
baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",title:p.topo,thumbnailUrl:b.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",
title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",title:p["streets-night-vector"],thumbnailUrl:b.toUrl("../images/basemap/streets-night.jpg"),baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",title:p["streets-relief-vector"],thumbnailUrl:b.toUrl("../images/basemap/streets-relief.jpg"),baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",
styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",showLegend:!1,visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",title:p["streets-navigation-vector"],thumbnailUrl:b.toUrl("../images/basemap/streets-navigation.jpg"),baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]}}})},"esri/Ground":function(){define("require exports ./core/tsSupport/assignHelper ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./Color ./core/Collection ./core/collectionUtils ./core/Error ./core/JSONSupport ./core/lang ./core/Loadable ./core/Logger ./core/promiseUtils ./core/accessorSupport/decorators ./ground/navigationConstraints ./layers/Layer ./layers/support/types ./webdoc/support/opacityUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d){var n=h.ofType(w),x=r.getLogger("esri.Ground");return function(e){function k(a){var d=e.call(this)||this;d.opacity=1;d.surfaceColor=null;d.navigationConstraint=null;d.layers=new n;d.layers.on("after-add",function(a){a=a.item;a.parent&&a.parent!==d&&"remove"in a.parent&&a.parent.remove(a);a.parent=d;t.isOfType(a,["elevation","base-elevation"])||x.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.")});
d.layers.on("after-remove",function(a){a.item.parent=null});return d}f(k,e);h=k;k.prototype.initialize=function(){this.when().catch(function(a){x.error("#load()","Failed to load ground",a)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};k.prototype.normalizeCtorArgs=function(a){a&&"resourceInfo"in a&&(this._set("resourceInfo",a.resourceInfo),a=p({},a),delete a.resourceInfo);return a};Object.defineProperty(k.prototype,"layers",{set:function(a){this._set("layers",c.referenceSetter(a,
this._get("layers"),n))},enumerable:!0,configurable:!0});k.prototype.writeLayers=function(a,d,c,b){var e=[];a&&(b=p({},b,{layerContainerType:"ground"}),a.forEach(function(a){if(a.write){var d={};a.write(d,b)&&e.push(d)}else b&&b.messages&&b.messages.push(new q("layer:unsupported","Layers ("+a.title+", "+a.id+") of type '"+a.declaredClass+"' cannot be persisted in the ground",{layer:a}))}));d.layers=e};k.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this.when()};
k.prototype.queryElevation=function(a,d){var c=this;return u.create(function(a){return b(["./layers/support/ElevationQuery"],a)}).then(function(b){b=new b.ElevationQuery;var e=c.layers.filter(function(a){return"elevation"===a.type}).toArray();return b.queryAll(e,a,d)})};k.prototype.createElevationSampler=function(a,d){var c=this;return u.create(function(a){return b(["./layers/support/ElevationQuery"],a)}).then(function(b){b=new b.ElevationQuery;var e=c.layers.filter(function(a){return"elevation"===
a.type}).toArray();return b.createSamplerAll(e,a,d)})};k.prototype.clone=function(){var d={opacity:this.opacity,surfaceColor:a.clone(this.surfaceColor),navigationConstraint:a.clone(this.navigationConstraint),layers:this.layers.slice()};this.loaded&&(d.loadStatus="loaded");return(new h({resourceInfo:this.resourceInfo})).set(d)};k.prototype.read=function(a,d){this.resourceInfo||this._set("resourceInfo",{data:a,context:d});return this.inherited(arguments)};k.prototype._loadFromSource=function(){var a=
this.resourceInfo;return a?this._loadLayersFromJSON(a.data,a.context):u.resolve(null)};k.prototype._loadLayersFromJSON=function(a,d){var c=this,e=d&&d.origin||"web-scene",n=d&&d.portal||null,k=d&&d.url||null;return u.create(function(a){return b(["./portal/support/layersCreator"],a)}).then(function(d){var b=[];a.layers&&Array.isArray(a.layers)&&b.push.apply(b,d.populateOperationalLayers(c.layers,a.layers,{context:{origin:e,url:k,portal:n,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"}));
return u.eachAlways(b)}).then(function(){})};var h;l([z.property({type:n,json:{read:!1}}),z.cast(c.castForReferenceSetter)],k.prototype,"layers",null);l([z.writer("layers")],k.prototype,"writeLayers",null);l([z.property({readOnly:!0})],k.prototype,"resourceInfo",void 0);l([z.property({type:Number,json:{read:{reader:d.transparencyToOpacity,source:"transparency"},write:{writer:function(a,c){c.transparency=d.opacityToTransparency(a)},target:"transparency"}}})],k.prototype,"opacity",void 0);l([z.property({type:m,
json:{write:function(a,d){d.surfaceColor=a.toJSON().slice(0,3)}}})],k.prototype,"surfaceColor",void 0);l([z.property({types:v.navigationConstraintTypes,json:{read:v.readNavigationConstraint,write:!0}})],k.prototype,"navigationConstraint",void 0);return k=h=l([z.subclass("esri.Ground")],k)}(z.declared(e,k))})},"esri/Color":function(){define(["./core/declare","./core/accessorSupport/ensureType","dojo/colors"],function(b,g,p){function f(b){return Math.max(0,Math.min(g.ensureInteger(b),255))}var l=b([p],
{declaredClass:"esri.Color",toJSON:function(){return[f(this.r),f(this.g),f(this.b),1<this.a?this.a:f(255*this.a)]},clone:function(){return new l(this.toRgba())}});l.toJSON=function(b){return b&&[f(b.r),f(b.g),f(b.b),1<b.a?b.a:f(255*b.a)]};l.fromJSON=function(b){return b&&new l([b[0],b[1],b[2],b[3]/255])};l.toUnitRGB=function(b){return[b.r/255,b.g/255,b.b/255]};l.toUnitRGBA=function(b){return[b.r/255,b.g/255,b.b/255,null!=b.a?b.a:1]};var m="named blendColors fromRgb fromHex fromArray fromString".split(" ");
for(b=0;b<m.length;b++)l[m[b]]=p[m[b]];l.named.rebeccapurple=[102,51,153];return l})},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(b,g,p,f){var l={};g.setObject("dojo.colors",l);var m=function(c,b,e){0>e&&++e;1<e&&--e;var a=6*e;return 1>a?c+(b-c)*a:1>2*e?b:2>3*e?c+(b-c)*(2/3-e)*6:c};b.colorFromRgb=p.fromRgb=function(c,b){var e=c.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(e){c=e[2].split(/\s*,\s*/);var a=c.length,e=e[1];
if("rgb"==e&&3==a||"rgba"==e&&4==a)return e=c[0],"%"==e.charAt(e.length-1)?(e=f.map(c,function(a){return 2.56*parseFloat(a)}),4==a&&(e[3]=c[3]),p.fromArray(e,b)):p.fromArray(c,b);if("hsl"==e&&3==a||"hsla"==e&&4==a){var e=(parseFloat(c[0])%360+360)%360/360,k=parseFloat(c[1])/100,h=parseFloat(c[2])/100,k=.5>=h?h*(k+1):h+k-h*k,h=2*h-k,e=[256*m(h,k,e+1/3),256*m(h,k,e),256*m(h,k,e-1/3),1];4==a&&(e[3]=c[3]);return p.fromArray(e,b)}}return null};var h=function(c,b,e){c=Number(c);return isNaN(c)?e:c<b?b:
c>e?e:c};p.prototype.sanitize=function(){this.r=Math.round(h(this.r,0,255));this.g=Math.round(h(this.g,0,255));this.b=Math.round(h(this.b,0,255));this.a=h(this.a,0,1);return this};l.makeGrey=p.makeGrey=function(c,b){return p.fromArray([c,c,c,b])};g.mixin(p.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,
158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,
61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,
0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,
196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,
142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,
235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return p})},"esri/ground/navigationConstraints":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/Warning ../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});b=function(c){function a(){return null!==c&&c.apply(this,arguments)||this}p(a,c);f([h.property()],a.prototype,"type",void 0);return a=f([h.subclass("esri.ground.NavigationConstraint")],a)}(h.declared(l));g.NavigationConstraint=b;l=function(c){function a(){var a=null!==c&&c.apply(this,arguments)||this;a.type="none";return a}p(a,c);b=a;a.prototype.clone=function(){return new b};var b;f([h.property({readOnly:!0,json:{read:!1,write:!0}})],
a.prototype,"type",void 0);return a=b=f([h.subclass("esri.ground.NoneNavigationConstraint")],a)}(h.declared(b));g.NoneNavigationConstraint=l;var c=function(c){function a(){var a=null!==c&&c.apply(this,arguments)||this;a.type="stay-above";return a}p(a,c);b=a;a.prototype.clone=function(){return new b};var b;f([h.property({readOnly:!0,json:{read:!1,write:function(a,c){c.type="stayAbove"}}})],a.prototype,"type",void 0);return a=b=f([h.subclass("esri.ground.StayAboveNavigationConstraint")],a)}(h.declared(b));
g.StayAboveNavigationConstraint=c;g.readNavigationConstraint=function(c,a,b){if(a=c&&q[c.type])return a=new a,a.read(c,b),a;b&&b.messages&&c&&b.messages.push(new m("navigationconstraint:unsupported","Navigation constraint of type '"+(c.type||"unknown")+"' is not supported",{definition:c,context:b}))};var q={none:l,stayAbove:c};g.navigationConstraintTypes={key:"type",base:b,typeMap:{none:l,"stay-above":c}}})},"esri/layers/support/types":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,
"__esModule",{value:!0});g.isOfType=function(b,f){b=b.constructor._meta;if(!b||!b.bases)return!1;b=b.bases;var g=Array.isArray(f);return b.some(function(b){b=b.__accessorMetadata__;if(!b)return!1;b=b.properties;if(!b||!b.type||!b.type.value)return!1;b=b.type.value;return g?-1!==f.indexOf(b):b===f})}})},"esri/webdoc/support/opacityUtils":function(){define(["require","exports","../../core/accessorSupport/ensureType"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.opacityToTransparency=
function(b){b=p.ensureInteger(100*(1-b));return Math.max(0,Math.min(b,100))};g.transparencyToOpacity=function(b){return Math.max(0,Math.min(1-b/100,1))}})},"esri/core/CollectionFlattener":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Collection ./Handles ./accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){return function(c){function b(b){b=c.call(this)||this;b._handles=new m;b.root=null;b.refresh=b.refresh.bind(b);b.updateCollections=
b.updateCollections.bind(b);return b}p(b,c);b.prototype.initialize=function(){var c=this;this._handles.add(this.rootCollectionNames.map(function(a){return c.watch("root."+a,c.updateCollections,!0)}));this.updateCollections()};b.prototype.destroy=function(){this.root=null;this.refresh();this._handles.destroy();this._handles=null};b.prototype.updateCollections=function(){var c=this;this._collections=this.rootCollectionNames.map(function(a){return c.get("root."+a)}).filter(function(a){return null!=a});
this.refresh()};b.prototype.refresh=function(){var c=this._handles;c.remove("collections");this.removeAll();for(var a=this._collections.slice(),b=0,f=this._collections;b<f.length;b++)this._processCollection(a,this,f[b]);for(b=0;b<a.length;b++)c.add(a[b].on("after-changes",this.refresh),"collections")};b.prototype._createNewInstance=function(c){return new l(c)};b.prototype._processCollection=function(c,a,b){var e=this;b&&(c.push(b),b.forEach(function(b){b&&(a.push(b),e._processCollection(c,a,e.getChildrenFunction(b)))}))};
f([h.property()],b.prototype,"rootCollectionNames",void 0);f([h.property()],b.prototype,"root",void 0);f([h.property()],b.prototype,"getChildrenFunction",void 0);return b=f([h.subclass("esri.core.CollectionFlattener")],b)}(h.declared(l))})},"esri/core/Handles":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Accessor ./Collection ./accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){return function(c){function b(b){b=c.call(this)||
this;b._groups=new Map;return b}p(b,c);b.prototype.destroy=function(){this.removeAll()};Object.defineProperty(b.prototype,"size",{get:function(){var c=0;this._groups.forEach(function(a){c+=a.length});return c},enumerable:!0,configurable:!0});b.prototype.add=function(c,a){if(!this._isHandle(c)&&!Array.isArray(c)&&!m.isCollection(c))return this;var b=this._getOrCreateGroup(a);Array.isArray(c)||m.isCollection(c)?c.forEach(function(a){return b.push(a)}):b.push(c);this.notifyChange("size");return this};
b.prototype.has=function(c){return this._groups.has(this._ensureGroupKey(c))};b.prototype.remove=function(c){if(Array.isArray(c)||m.isCollection(c))return c.forEach(this.remove,this),this;if(!this.has(c))return this;for(var a=this._getGroup(c),b=0;b<a.length;b++)a[b].remove();this._deleteGroup(c);this.notifyChange("size");return this};b.prototype.removeAll=function(){this._groups.forEach(function(c){for(var a=0;a<c.length;a++)c[a].remove()});this._groups.clear();this.notifyChange("size");return this};
b.prototype._isHandle=function(c){return c&&!!c.remove};b.prototype._getOrCreateGroup=function(c){if(this.has(c))return this._getGroup(c);var a=[];this._groups.set(this._ensureGroupKey(c),a);return a};b.prototype._getGroup=function(c){return this._groups.get(this._ensureGroupKey(c))};b.prototype._deleteGroup=function(c){return this._groups.delete(this._ensureGroupKey(c))};b.prototype._ensureGroupKey=function(c){return c||"_default_"};f([h.property({readOnly:!0})],b.prototype,"size",null);return b=
f([h.subclass("esri.core.Handles")],b)}(h.declared(l))})},"esri/support/basemapUtils":function(){define("require exports ../Basemap ../core/Collection ../core/Logger ../core/urlUtils ../core/accessorSupport/ensureType ./basemapDefinitions".split(" "),function(b,g,p,f,l,m,h,c){function q(a,b){var n;if("string"===typeof a){if(!(a in c))return b=Object.keys(c).map(function(a){return'"'+a+'"'}).join(", "),d.warn("Unable to find basemap definition for: "+a+". Try one of these: "+b),null;b&&(n=b[a]);n||
(n=p.fromId(a),b&&(b[a]=n))}else n=h.default(p,a);return n}function e(a,d){return a.map(function(a){return d.find(function(d){var c=r(a);d=r(d);return c.type===d.type&&c.url===d.url})||a})}function a(a){return a?!a.loaded&&a.resourceInfo?u(a.resourceInfo.data):{baseLayers:k(a.baseLayers),referenceLayers:k(a.referenceLayers)}:null}function k(a){return(f.isCollection(a)?a.toArray():a).map(r)}function r(a){return{type:a.type,url:t(a.urlTemplate||a.url||a.styleUrl)}}function u(a){return a?{baseLayers:z(a.baseMapLayers.filter(function(a){return!a.isReference})),
referenceLayers:z(a.baseMapLayers.filter(function(a){return a.isReference}))}:null}function z(a){return a.map(function(a){var d;switch(a.layerType){case "VectorTileLayer":d="vector-tile";break;case "ArcGISTiledMapServiceLayer":d="tile";break;default:d="unknown"}return{type:d,url:t(a.templateUrl||a.urlTemplate||a.styleUrl||a.url)}})}function v(a,d,c){return null!=a!==(null!=d)?"not-equal":a?w(a.baseLayers,d.baseLayers)?w(a.referenceLayers,d.referenceLayers)?"equal":c.mustMatchReferences?"not-equal":
"base-layers-equal":"not-equal":"equal"}function w(a,d){return a.length!==d.length?!1:!a.some(function(a){return!d.some(function(d){return a.type===d.type&&a.url===d.url})})}function t(a){return a?m.normalize(a).replace(/^\s*https?:/i,"").toLowerCase():""}Object.defineProperty(g,"__esModule",{value:!0});var d=l.getLogger("esri.support.basemapUtils");g.createCache=function(){return{}};g.ensureType=q;g.clonePreservingTiledLayers=function(a,d){void 0===d&&(d=null);a=q(a);if(!a)return null;var c=new p({id:a.id,
title:a.title,baseLayers:a.baseLayers.slice(),referenceLayers:a.referenceLayers.slice()});d&&(c.baseLayers=e(c.baseLayers,d.baseLayers),c.referenceLayers=e(c.referenceLayers,d.referenceLayers));c.load();c.portalItem=a.portalItem;return c};g.getWellKnownBasemapId=function(d){var b=null;d=a(d);for(var n in c){var e=u(c[n]),e=v(d,e,{mustMatchReferences:!1});if("equal"===e){b=n;break}else"base-layers-equal"===e&&(b=n)}return b};g.contentEquals=function(d,c){if(d===c)return!0;d=a(d);c=a(c);return"equal"===
v(d,c,{mustMatchReferences:!0})}})},"esri/support/groundUtils":function(){define("require exports ../Ground ../core/Logger ../core/accessorSupport/ensureType ../layers/ElevationLayer".split(" "),function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});var h=f.getLogger("esri.support.groundUtils");g.groundElevationLayers={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"}};g.ensureType=function(c){var b;"string"===
typeof c?c in g.groundElevationLayers?(c=g.groundElevationLayers[c],c=new m({id:c.id,url:c.url}),b=new p({layers:[c]})):h.warn("Unable to find ground definition for: "+c+'. Try "world-elevation"'):b=l.default(p,c);return b}})},"esri/layers/ElevationLayer":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/io-query dojo/_base/kernel ../request ../core/Error ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/HeightModelInfo ./Layer ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./support/rasterFormats/LercCodec".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t){return function(d){function n(a){a=d.call(this)||this;a.copyright=null;a.heightModelInfo=null;a.opacity=1;a.operationalLayerType="ArcGISTiledElevationServiceLayer";a.type="elevation";a.url=null;return a}f(n,d);n.prototype.normalizeCtorArgs=function(a,d){return"string"===typeof a?p({url:a},d):a};Object.defineProperty(n.prototype,"minScale",{get:function(){},set:function(a){this.constructed&&h.deprecated(this.declaredClass+".minScale support has been removed.",
"","4.5")},enumerable:!0,configurable:!0});Object.defineProperty(n.prototype,"maxScale",{get:function(){},set:function(a){this.constructed&&h.deprecated(this.declaredClass+".maxScale support has been removed.","","4.5")},enumerable:!0,configurable:!0});n.prototype.load=function(){var a=this;this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:function(a){for(var d=0;d<a.typeKeywords.length;d++)if("elevation 3d layer"===a.typeKeywords[d].toLowerCase())return!0;
throw new q("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"});}}).always(function(){return a._fetchImageService()}));return this.when()};n.prototype.fetchTile=function(a,d,b,n){var e=this;void 0===n&&(n=0);return this.load().then(function(){return e._fetchTileAvailability(a,d,b)}).then(function(){var n=e.getTileUrl(a,d,b);return c(n,{responseType:"array-buffer",failOk:!0})}).then(function(a){a=
t.decode(a.data,{noDataValue:n,returnFileInfo:!0});return{values:a.pixelData,width:a.width,height:a.height,maxZError:a.fileInfo.maxZError,noDataValue:a.noDataValue}})};n.prototype.getTileUrl=function(a,d,c){var b=m.objectToQuery(p({},this.parsedUrl.query,{blankTile:!this.tilemapCache&&this.supportsBlankTile?!1:null}));return this.parsedUrl.path+"/tile/"+a+"/"+d+"/"+c+(b?"?"+b:"")};n.prototype.queryElevation=function(a,d){var c=this;return e.create(function(a){return b(["./support/ElevationQuery"],
a)}).then(function(b){return(new b.ElevationQuery).query(c,a,d)})};n.prototype.createElevationSampler=function(a,d){var c=this;return e.create(function(a){return b(["./support/ElevationQuery"],a)}).then(function(b){return(new b.ElevationQuery).createSampler(c,a,d)})};n.prototype.importLayerViewModule=function(a){switch(a.type){case "2d":return e.reject(new q("elevation-layer:view-not-supported","ElevationLayer is only supported in 3D"));case "3d":return e.create(function(a){return b(["../views/3d/layers/ElevationLayerView3D"],
a)})}};n.prototype._fetchTileAvailability=function(a,d,c){return this.tilemapCache?this.tilemapCache.fetchAvailability(a,d,c):e.resolve("unknown")};n.prototype._fetchImageService=function(){var a=this;return e.resolve().then(function(){if(a.resourceInfo)return a.resourceInfo;var d={query:p({f:"json"},a.parsedUrl.query),responseType:"json",callbackParamName:"callback"};return c(a.parsedUrl.path,d)}).then(function(d){d.ssl&&(a.url=a.url.replace(/^http:/i,"https:"));a.read(d.data,{origin:"service",url:a.parsedUrl})})};
l([k.property({json:{read:{source:"copyrightText"}}})],n.prototype,"copyright",void 0);l([k.property({readOnly:!0,type:r})],n.prototype,"heightModelInfo",void 0);l([k.property({json:{read:!1,write:!1}})],n.prototype,"minScale",null);l([k.property({json:{read:!1,write:!1}})],n.prototype,"maxScale",null);l([k.property({json:{read:!1,write:!1}})],n.prototype,"opacity",void 0);l([k.property()],n.prototype,"operationalLayerType",void 0);l([k.property()],n.prototype,"resourceInfo",void 0);l([k.property({json:{read:!1},
value:"elevation",readOnly:!0})],n.prototype,"type",void 0);l([k.property({json:{origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writer:a.writeOperationalLayerUrl}}}}})],n.prototype,"url",void 0);return n=l([k.subclass("esri.layers.ElevationLayer")],n)}(k.declared(u,z,v,w))})},"esri/geometry/HeightModelInfo":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/kebabDictionary ../core/Warning ../core/accessorSupport/decorators ./support/scaleUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e){function a(a,b){return new c("height-unit:unsupported","Height unit of value '"+a+"' is not supported",b)}function k(a,b){return new c("height-model:unsupported","Height model of value '"+a+"' is not supported",b)}var r=h({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"},{ignoreUnknown:!0}),u=h({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links",
"sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"},{ignoreUnknown:!0});return function(c){function b(a){a=c.call(this)||this;a.heightModel="gravity-related-height";a.heightUnit="meters";a.vertCRS=
null;return a}f(b,c);h=b;b.prototype.writeHeightModel=function(a,d,c){return r.write(a,d,c)};b.prototype.readHeightModel=function(a,d,c){if(d=r.read(a))return d;c&&c.messages&&c.messages.push(k(a,{context:c}));return null};b.prototype.readHeightUnit=function(c,d,b){if(d=u.read(c))return d;b&&b.messages&&b.messages.push(a(c,{context:b}));return null};b.prototype.readHeightUnitService=function(c,d,b){if(d=e.unitFromRESTJSON(c)||u.read(c))return d;b&&b.messages&&b.messages.push(a(c,{context:b}));return null};
b.prototype.readVertCRS=function(a,d){return d.vertCRS||d.ellipsoid||d.geoid};b.prototype.clone=function(){return new h({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})};b.prototype.equals=function(a){return a?this===a?!0:this.heightModel===a.heightModel&&this.heightUnit===a.heightUnit&&this.vertCRS===a.vertCRS:!1};b.deriveUnitFromSR=function(a,d){d=e.getVerticalUnitStringForSR(d);return new h({heightModel:a.heightModel,heightUnit:d,vertCRS:a.vertCRS})};b.prototype.write=
function(a,d){d=p({origin:"web-scene"},d);return this.inherited(arguments,[a,d])};b.fromJSON=function(a){if(!a)return null;var d=new h;d.read(a,{origin:"web-scene"});return d};var h;l([q.property({type:String,constructOnly:!0})],b.prototype,"heightModel",void 0);l([q.writer("web-scene","heightModel")],b.prototype,"writeHeightModel",null);l([q.reader(["web-scene","service"],"heightModel")],b.prototype,"readHeightModel",null);l([q.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:u.write}}}})],
b.prototype,"heightUnit",void 0);l([q.reader("web-scene","heightUnit")],b.prototype,"readHeightUnit",null);l([q.reader("service","heightUnit")],b.prototype,"readHeightUnitService",null);l([q.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],b.prototype,"vertCRS",void 0);l([q.reader("service","vertCRS",["vertCRS","ellipsoid","geoid"])],b.prototype,"readVertCRS",null);return b=h=l([q.subclass("esri.geometry.HeightModelInfo")],b)}(q.declared(m))})},"esri/geometry/support/scaleUtils":function(){define(["require",
"exports","../../config","../../core/kebabDictionary","./WKIDUnitConversion"],function(b,g,p,f,l){function m(a){return r.fromJSON(a.toLowerCase())||null}function h(a){return c(a)||g.decDegToMeters}function c(c){var b,e,f;c&&("object"===typeof c?(b=c.wkid,e=c.wkt):"number"===typeof c?b=c:"string"===typeof c&&(e=c));b?f=k.values[k[b]]:e&&-1!==e.search(/^PROJCS/i)&&(c=a.exec(e))&&c[1]&&(f=parseFloat(c[1].split(",")[1]));return f}function q(c){var b,e,f;c&&("object"===typeof c?(b=c.wkid,e=c.wkt):"number"===
typeof c?b=c:"string"===typeof c&&(e=c));b?f=k.units[k[b]]:e&&-1!==e.search(/^PROJCS/i)&&(c=a.exec(e))&&c[1]&&(f=(c=/[\\"\\']{1}([^\\"\\']+)/.exec(c[1]))&&c[1]);return f?m(f):null}function e(a,c){c=h(c);return a/(c*g.inchesPerMeter*p.screenDPI)}Object.defineProperty(g,"__esModule",{value:!0});g.inchesPerMeter=39.37;g.decDegToMeters=20015077/180;var a=/UNIT\[([^\]]+)\]\]$/i,k=l,r=f({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",
yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"},{ignoreUnknown:!0});g.unitFromRESTJSON=m;g.unitToRESTJSON=function(a){return r.toJSON(a)||null};g.getMetersPerVerticalUnitForSR=function(a){a=h(a);return 1E5<a?
1:a};g.getVerticalUnitStringForSR=function(a){return 1E5<h(a)?"meters":q(a)};g.getMetersPerUnitForSR=h;g.getMetersPerUnit=c;g.getUnitString=q;g.getScale=function(a,b){b=b||a.extent;a=a.width;var e=c(b&&b.spatialReference);return b&&a?b.width/a*(e||g.decDegToMeters)*g.inchesPerMeter*p.screenDPI:0};g.getResolutionForScale=e;g.getExtentForScale=function(a,c){var b=a.extent;a=a.width;c=e(c,b.spatialReference);return b.clone().expand(c*a/b.width)}})},"esri/layers/mixins/ArcGISCachedService":function(){define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/accessorSupport/decorators ./ArcGISService ../support/TileInfo ../support/TilemapCache".split(" "),
function(b,g,p,f,l,m,h,c,q,e){return function(a){function c(){var c=null!==a&&a.apply(this,arguments)||this;c.copyright=null;c.minScale=0;c.maxScale=0;c.spatialReference=null;c.tileInfo=null;c.tilemapCache=null;return c}f(c,a);Object.defineProperty(c.prototype,"supportsBlankTile",{get:function(){return 10.2<=this.version},enumerable:!0,configurable:!0});c.prototype.readTileInfo=function(a,c){var b=c.minScale?Math.round(1E4*c.minScale)/1E4:Infinity,e=c.maxScale?Math.round(1E4*c.maxScale)/1E4:-Infinity;
return a?(a.lods=a.lods.filter(function(a){a=Math.round(1E4*a.scale)/1E4;return a<=b&&a>=e}),q.fromJSON(a)):null};c.prototype.readTilemapCache=function(a,c){return c.capabilities&&-1<c.capabilities.indexOf("Tilemap")?new e({layer:this}):null};l([h.property({json:{read:{source:"copyrightText"}}})],c.prototype,"copyright",void 0);l([h.property({json:{origins:{service:{read:!1}}}})],c.prototype,"minScale",void 0);l([h.property({json:{origins:{service:{read:!1}}}})],c.prototype,"maxScale",void 0);l([h.property({type:m.SpatialReference})],
c.prototype,"spatialReference",void 0);l([h.property({readOnly:!0,dependsOn:["version"]})],c.prototype,"supportsBlankTile",null);l([h.property({type:q})],c.prototype,"tileInfo",void 0);l([h.reader("service","tileInfo",["tileInfo","minScale","maxScale"])],c.prototype,"readTileInfo",null);l([h.property()],c.prototype,"tilemapCache",void 0);l([h.reader("service","tilemapCache",["capabilities"])],c.prototype,"readTilemapCache",null);l([h.property()],c.prototype,"version",void 0);return c=l([h.subclass("esri.layers.mixins.ArcGISCachedService")],
c)}(h.declared(c))})},"esri/geometry":function(){define("require exports ./geometry/Extent ./geometry/Geometry ./geometry/Mesh ./geometry/Multipoint ./geometry/Point ./geometry/Polygon ./geometry/Polyline ./geometry/ScreenPoint ./geometry/SpatialReference ./geometry/support/jsonUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k){Object.defineProperty(g,"__esModule",{value:!0});g.Extent=p;g.BaseGeometry=f;g.Mesh=l;g.Multipoint=m;g.Point=h;g.Polygon=c;g.Polyline=q;g.ScreenPoint=e;g.SpatialReference=
a;g.isGeometry=function(a){return a instanceof g.BaseGeometry};g.fromJSON=k.fromJSON})},"esri/geometry/Mesh":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/lang ../core/Logger ../core/accessorSupport/decorators ./Extent ./Geometry ./support/MeshComponent ./support/MeshVertexAttributes ./support/triangulationUtils ./support/meshUtils/centerAt ./support/meshUtils/offset ./support/meshUtils/primitives ./support/meshUtils/rotate".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w){var t=h.getLogger("esri.geometry.Mesh"),d=[1,0,0],n=[0,1,0],x=[0,0,1],y=[0,0,0],A=[0,0,0,0],D=[0,0,0,0],B=[0,0,0,0];return function(b){function e(a){a=b.call(this)||this;a.components=null;a.hasZ=!0;a.hasM=!1;a.vertexAttributes=null;a.type="mesh";return a}p(e,b);h=e;Object.defineProperty(e.prototype,"extent",{get:function(){var a=this.spatialReference,d=this.vertexAttributes&&this.vertexAttributes.position;if(!d||0===d.length||this.components&&0===this.components.length)return new q({xmin:0,
ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:a});a={xmin:Infinity,xmax:-Infinity,ymin:Infinity,ymax:-Infinity,zmin:Infinity,zmax:-Infinity,spatialReference:a};if(!this.components)return new q(this.extendExtent(a,d,null));for(var c=0,b=this.components;c<b.length;c++){var e=b[c];if(e.faces)this.extendExtent(a,d,e.faces);else{this.extendExtent(a,d,null);break}}return new q(a)},enumerable:!0,configurable:!0});e.prototype.addComponent=function(a){this.components||(this.components=[]);this.components.push(a);
this.clearCache()};e.prototype.removeComponent=function(a){if(this.components&&(a=this.components.indexOf(a),-1!==a)){this.components=this.components.splice(a,1);return}t.error("removeComponent()","Provided component is not part of the list of components")};e.prototype.rotate=function(a,c,b,e){w.axisAngleFrom(d,a/180*Math.PI,A);w.axisAngleFrom(n,c/180*Math.PI,D);w.axisAngleFrom(x,b/180*Math.PI,B);w.axisAngleMultiply(A,D,A);w.axisAngleMultiply(A,B,A);w.rotate(this,A,e);return this};e.prototype.offset=
function(a,d,c,b){y[0]=a;y[1]=d;y[2]=c;z.offset(this,y,b);return this};e.prototype.centerAt=function(a,d){u.centerAt(this,a,d);return this};e.prototype.clone=function(){return new h({components:m.clone(this.components),spatialReference:this.spatialReference,vertexAttributes:m.clone(this.vertexAttributes)})};e.prototype.vertexAttributesChanged=function(){this.clearCache()};e.prototype.toJSON=function(a){return this.write({},a)};e.prototype.forEachVertex=function(a,d,c){if(d)for(e=0;e<d.length;e++){var b=
3*d[e];c(a[b+0],a[b+1],a[b+2])}else for(var e=0;e<a.length;e+=3)c(a[e+0],a[e+1],a[e+2])};e.prototype.extendExtent=function(a,d,c){this.forEachVertex(d,c,function(d,c,b){a.xmin=Math.min(a.xmin,d);a.xmax=Math.max(a.xmax,d);a.ymin=Math.min(a.ymin,c);a.ymax=Math.max(a.ymax,c);a.zmin=Math.min(a.zmin,b);a.zmax=Math.max(a.zmax,b)});return a};e.createBox=function(d,c){d=v.convertUnitGeometry(v.createUnitSizeBox(),d,c);if(c&&c.imageFace&&"all"!==c.imageFace){var b=d.components[0],e=b.faces,n=v.boxFaceOrder[c.imageFace],
k=6*n;c=new Uint32Array(6);for(var f=new Uint32Array(e.length-6),h=0,g=0,r=0;r<e.length;r++)r>=k&&r<k+6?c[h++]=e[r]:f[g++]=e[r];e=new Float32Array(d.vertexAttributes.uv);n*=8;k=[0,1,1,1,1,0,0,0];for(r=0;r<k.length;r++)e[n+r]=k[r];d.vertexAttributes.uv=e;d.components=[new a({faces:c,material:b.material}),new a({faces:f})]}return d};e.createSphere=function(a,d){return v.convertUnitGeometry(v.createUnitSizeSphere(d&&d.densificationFactor||0),a,d)};e.createCylinder=function(a,d){return v.convertUnitGeometry(v.createUnitSizeCylinder(d&&
d.densificationFactor||0),a,d)};e.createPlane=function(a,d){return v.convertUnitGeometry(v.createUnitSizePlane(d&&d.facing||"up"),a,d)};e.createFromPolygon=function(a,d){var c=r.triangulate(a);return new h({vertexAttributes:{position:c.position},components:[{faces:c.faces,shading:"flat",material:d&&d.material||null}],spatialReference:a.spatialReference})};var h;f([c.property({dependsOn:["vertexAttributes","vertexAttributes.position","components"],json:{read:!1}})],e.prototype,"cache",void 0);f([c.property({type:[a]})],
e.prototype,"components",void 0);f([c.property({dependsOn:["cache"],readOnly:!0,json:{read:!1}})],e.prototype,"extent",null);f([c.property({readOnly:!0,json:{read:!1,write:!1}})],e.prototype,"hasZ",void 0);f([c.property({readOnly:!0,json:{read:!1,write:!1}})],e.prototype,"hasM",void 0);f([c.property({type:k.MeshVertexAttributes,json:{write:!0}})],e.prototype,"vertexAttributes",void 0);f([l(0,c.cast(a))],e.prototype,"addComponent",null);return e=h=f([c.subclass("esri.geometry.Mesh")],e)}(c.declared(e))})},
"esri/geometry/support/MeshComponent":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators ./MeshMaterial ./MeshVertexAttributes".split(" "),function(b,g,p,f,l,m,h,c,q,e){var a=h.getLogger("esri.geometry.support.MeshComponent");return function(b){function k(a){a=b.call(this)||this;a.faces=null;a.material=null;a.shading="source";return a}p(k,b);h=k;
k.prototype.castFaces=function(c){return e.castArray(c,Uint32Array,[Uint16Array],{loggerTag:".faces\x3d",stride:3},a)};k.prototype.clone=function(){return new h({faces:m.clone(this.faces),shading:this.shading,material:m.clone(this.material)})};var h;f([c.property({json:{write:!0}})],k.prototype,"faces",void 0);f([c.cast("faces")],k.prototype,"castFaces",null);f([c.property({type:q.MeshMaterial,json:{write:!0}})],k.prototype,"material",void 0);f([c.property({type:String,json:{write:!0}})],k.prototype,
"shading",void 0);return k=h=f([c.subclass("esri.geometry.support.MeshComponent")],k)}(c.declared(l))})},"esri/geometry/support/MeshMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./ImageMeshColor ./MeshColor ./ValueMeshColor".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k){Object.defineProperty(g,"__esModule",
{value:!0});var r={base:a.default,key:"type",defaultKeyValue:"value",typeMap:{value:k,image:e}};b=function(a){function b(c){c=a.call(this)||this;c.color=null;return c}p(b,a);g=b;b.prototype.castColor=function(a){return a?"string"===typeof a?u.test(a)||l.named[a]?new k({value:a}):new e({url:a}):Array.isArray(a)?new k({value:a}):a instanceof HTMLImageElement?new e({url:a.src}):a instanceof HTMLCanvasElement?new e({url:a.toDataURL()}):q.ensureOneOfType(r,a):a};b.prototype.readColor=function(a,d,c){if(a)switch(a.type){case "image":return new e(a);
case "value":return new k(a)}};b.prototype.clone=function(){return new g({color:h.clone(this.color)})};var g;f([c.property({types:r,json:{write:!0}})],b.prototype,"color",void 0);f([c.cast("color")],b.prototype,"castColor",null);f([c.reader("color")],b.prototype,"readColor",null);return b=g=f([c.subclass("esri.geometry.support.MeshResources")],b)}(c.declared(m));g.MeshMaterial=b;var u=/^\s*(#|rgba?\()/;g.default=b})},"esri/geometry/support/ImageMeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Identifiable ../../core/accessorSupport/decorators ./MeshColor".split(" "),
function(b,g,p,f,l,m,h){return function(c){function b(a){a=c.call(this)||this;a.type="image";a.url=null;return a}p(b,c);e=b;b.prototype.clone=function(){return new e({url:this.url})};var e;f([m.property()],b.prototype,"type",void 0);f([m.property({type:String,json:{write:{enabled:!0,isRequired:!0}}})],b.prototype,"url",void 0);return b=e=f([m.subclass("esri.geometry.support.ImageMeshColor")],b)}(m.declared(h.default,l))})},"esri/geometry/support/MeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(c){return b.call(this)||this}p(c,b);c.prototype.clone=function(){throw Error("not implemented");};f([m.property({readOnly:!0,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0,enabled:!0}}})],c.prototype,"type",void 0);return c=f([m.subclass("esri.geometry.support.MeshColor")],c)}(m.declared(l));g.MeshColor=b;g.default=b})},"esri/geometry/support/ValueMeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/accessorSupport/decorators ./MeshColor".split(" "),
function(b,g,p,f,l,m,h,c){return function(c){function b(a){a=c.call(this)||this;a.type="value";a.value=null;return a}p(b,c);a=b;b.prototype.clone=function(){return new a({value:m.clone(this.value)})};var a;f([h.property()],b.prototype,"type",void 0);f([h.property({type:l})],b.prototype,"value",void 0);return b=a=f([h.subclass("esri.geometry.support.ValueMeshColor")],b)}(h.declared(c.default))})},"esri/geometry/support/MeshVertexAttributes":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h,c){function q(a,c,b,e){var k=c.loggerTag;c=c.stride;return 0!==a.length%c?(e.error(k,"Invalid array length, expected a multiple of "+c),new b([])):a}function e(a,c,b,e,f){if(!a)return a;if(a instanceof c)return q(a,e,c,f);for(var k=0;k<b.length;k++)if(a instanceof b[k])return q(new c(a),e,c,f);if(Array.isArray(a))return q(new c(a),e,c,f);b=b.map(function(a){return"'"+a.name+"'"});f.error("Failed to set property, expected one of "+b+", but got "+a.constructor.name);return new c([])}
Object.defineProperty(g,"__esModule",{value:!0});var a=h.getLogger("esri.geometry.support.MeshVertexAttributes");b=function(b){function k(a){a=b.call(this)||this;a.position=null;a.uv=null;a.normal=null;return a}p(k,b);h=k;k.prototype.castPosition=function(c){c&&c instanceof Float32Array&&a.warn(".position\x3d","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array");return e(c,Float64Array,[Float32Array],{loggerTag:".position\x3d",
stride:3},a)};k.prototype.castUv=function(c){return e(c,Float32Array,[Float64Array],{loggerTag:".uv\x3d",stride:2},a)};k.prototype.castNormal=function(c){return e(c,Float32Array,[Float64Array],{loggerTag:".normal\x3d",stride:3},a)};k.prototype.clone=function(){return new h({position:m.clone(this.position),uv:m.clone(this.uv),normal:m.clone(this.normal)})};var h;f([c.property({json:{write:!0}})],k.prototype,"position",void 0);f([c.cast("position")],k.prototype,"castPosition",null);f([c.property({json:{write:!0}})],
k.prototype,"uv",void 0);f([c.cast("uv")],k.prototype,"castUv",null);f([c.property({json:{write:!0}})],k.prototype,"normal",void 0);f([c.cast("normal")],k.prototype,"castNormal",null);return k=h=f([c.subclass("esri.geometry.support.MeshVertexAttributes")],k)}(c.declared(l));g.MeshVertexAttributes=b;g.castArray=e;g.default=b})},"esri/geometry/support/triangulationUtils":function(){define(["require","exports","../../core/libs/earcut/earcut","./coordsUtils"],function(b,g,p,f){function l(c,b,e){if(1===
c.length)return c[0];b=new Float64Array(b);e=new Uint32Array(e);for(var a=0,k=0,f=0;f<c.length;f++){for(var h=c[f],g=0;g<h.position.length;g++)b[a++]=h.position[g];for(g=0;g<h.faces.length;g++)e[k++]=h.faces[g]}return{position:b,faces:e}}function m(c,b){for(var e=c.length,a=Array(e),k=Array(e),g=Array(e),l=0,q=0,m=0,p=0,t=0;t<e;++t)p+=c[t].length;for(var p=new Float64Array(3*p),d=0,n=e-1;0<=n;n--){var x=c[n];if(f.isClockwise(x,!1,!1)||1===e){for(var y=x.length,t=0;t<l;++t)y+=a[t].length;t={index:d,
pathLengths:Array(l+1),count:y,holeIndices:Array(l)};t.pathLengths[0]=x.length;0<x.length&&(g[m++]={index:d,count:x.length});d=h(x,0,p,d,x.length,b);for(x=0;x<l;++x)y=a[x],t.holeIndices[x]=d,t.pathLengths[x+1]=y.length,0<y.length&&(g[m++]={index:d,count:y.length}),d=h(y,0,p,d,y.length,b);l=0;0<t.count&&(k[q++]=t)}else a[l++]=x}for(x=0;x<l;++x)y=a[x],0<y.length&&(g[m++]={index:d,count:y.length}),d=h(y,0,p,d,y.length,b);q<e&&(k.length=q);m<e&&(g.length=m);return{position:p,polygons:k,outlines:g}}function h(c,
b,e,a,k,f){a*=3;for(var h=0;h<k;++h){var g=c[b++];e[a++]=g[0];e[a++]=g[1];e[a++]=f?g[2]:0}return a/3}Object.defineProperty(g,"__esModule",{value:!0});g.triangulate=function(c){var b=m(c.rings,c.hasZ),e=[],a=0,k=0;c=function(c){var f=c.index,h=new Float64Array(b.position.buffer,3*f*b.position.BYTES_PER_ELEMENT,3*c.count);c=c.holeIndices.map(function(a){return a-f});c=new Uint32Array(p(h,c,3));e.push({position:h,faces:c});a+=h.length;k+=c.length};for(var f=0,h=b.polygons;f<h.length;f++)c(h[f]);return l(e,
a,k)};g.pathsToTriangulationInfo=m})},"esri/core/libs/earcut/earcut":function(){define([],function(){function b(a,d,c){c=c||2;n=a.length/c+(d?2*d.length:0);x=!1;var b=d&&d.length,e=b?d[0]*c:a.length,k=g(a,0,e,c,!0),r=[];if(!k)return r;var l,t,u,y;if(b)a:{var v=c,b=[],A,w,D;y=0;for(A=d.length;y<A;y++)w=d[y]*v,D=y<A-1?d[y+1]*v:a.length,w=g(a,w,D,v,!1),w===w.next&&(w.steiner=!0),b.push(q(w));b.sort(m);for(y=0;y<b.length;y++){if(!k){k=null;break a}d=b[y];v=k;if(v=h(d,v))d=z(v,d),p(d,d.next);k=p(k,k.next)}}if(x)return r;
if(a.length>80*c){l=u=a[0];t=b=a[1];for(v=c;v<e;v+=c)y=a[v],d=a[v+1],y<l&&(l=y),d<t&&(t=d),y>u&&(u=y),d>b&&(b=d);u=Math.max(u-l,b-t)}f(k,r,c,l,t,u);return r}function g(a,c,b,e,n){var f;if(n===0<d(a,c,b,e))for(n=c;n<b;n+=e)f=v(n,a[n],a[n+1],f);else for(n=b-e;n>=c;n-=e)f=v(n,a[n],a[n+1],f);f&&k(f,f.next)&&(w(f),f=f.next);return f}function p(d,c){if(!d)return d;c||(c=d);var b,e=0,f=n*n/2;do{b=!1;if(d.steiner||!k(d,d.next)&&0!==a(d.prev,d,d.next))d=d.next;else{w(d);d=c=d.prev;if(d===d.next)return null;
b=!0}if(e++>f)return x=!0,null}while(b||d!==c);return c}function f(d,b,n,h,g,q,m){if(d){if(!m&&q){var t=d,y=t;do null===y.z&&(y.z=c(y.x,y.y,h,g,q)),y.prevZ=y.prev,y=y.nextZ=y.next;while(y!==t);y.prevZ.nextZ=null;y.prevZ=null;var t=y,v,A,B,D,C,F,H=1;do{y=t;B=t=null;for(D=0;y;){D++;A=y;for(v=C=0;v<H&&(C++,A=A.nextZ,A);v++);for(F=H;0<C||0<F&&A;)0===C?(v=A,A=A.nextZ,F--):0!==F&&A?y.z<=A.z?(v=y,y=y.nextZ,C--):(v=A,A=A.nextZ,F--):(v=y,y=y.nextZ,C--),B?B.nextZ=v:t=v,v.prevZ=B,B=v;y=A}B.nextZ=null;H*=2}while(1<
D)}for(t=d;d.prev!==d.next;){y=d.prev;A=d.next;if(q)a:{B=d;F=h;var G=g,J=q;D=B.prev;C=B;H=B.next;if(0<=a(D,C,H))B=!1;else{var P=D.x>C.x?D.x>H.x?D.x:H.x:C.x>H.x?C.x:H.x,S=D.y>C.y?D.y>H.y?D.y:H.y:C.y>H.y?C.y:H.y;v=c(D.x<C.x?D.x<H.x?D.x:H.x:C.x<H.x?C.x:H.x,D.y<C.y?D.y<H.y?D.y:H.y:C.y<H.y?C.y:H.y,F,G,J);F=c(P,S,F,G,J);for(G=B.nextZ;G&&G.z<=F;){if(G!==B.prev&&G!==B.next&&e(D.x,D.y,C.x,C.y,H.x,H.y,G.x,G.y)&&0<=a(G.prev,G,G.next)){B=!1;break a}G=G.nextZ}for(G=B.prevZ;G&&G.z>=v;){if(G!==B.prev&&G!==B.next&&
e(D.x,D.y,C.x,C.y,H.x,H.y,G.x,G.y)&&0<=a(G.prev,G,G.next)){B=!1;break a}G=G.prevZ}B=!0}}else B=l(d);if(B)b.push(y.i/n),b.push(d.i/n),b.push(A.i/n),w(d),t=d=A.next;else{if(x)break;d=A;if(d===t){if(!m)f(p(d),b,n,h,g,q,1);else if(1===m){m=b;t=n;y=d;do A=y.prev,B=y.next.next,!k(A,B)&&r(A,y,y.next,B)&&u(A,B)&&u(B,A)&&(m.push(A.i/t),m.push(y.i/t),m.push(B.i/t),w(y),w(y.next),y=d=B),y=y.next;while(y!==d);d=y;f(d,b,n,h,g,q,2)}else if(2===m)a:{m=d;do{for(t=m.next.next;t!==m.prev;){if(y=m.i!==t.i){y=m;A=t;
B=void 0;if(B=y.next.i!==A.i&&y.prev.i!==A.i){B=void 0;b:{B=y;do{if(B.i!==y.i&&B.next.i!==y.i&&B.i!==A.i&&B.next.i!==A.i&&r(B,B.next,y,A)){B=!0;break b}B=B.next}while(B!==y);B=!1}B=!B}D=void 0;if(D=B&&u(y,A)&&u(A,y)){B=y;D=!1;C=(y.x+A.x)/2;A=(y.y+A.y)/2;do B.y>A!==B.next.y>A&&C<(B.next.x-B.x)*(A-B.y)/(B.next.y-B.y)+B.x&&(D=!D),B=B.next;while(B!==y)}y=D}if(y){d=z(m,t);m=p(m,m.next);d=p(d,d.next);f(m,b,n,h,g,q);f(d,b,n,h,g,q);break a}t=t.next}m=m.next}while(m!==d)}break}}}}}function l(d){var c=d.prev,
b=d.next;if(0<=a(c,d,b))return!1;for(var f=d.next.next,k=0;f!==d.prev;){if(e(c.x,c.y,d.x,d.y,b.x,b.y,f.x,f.y)&&0<=a(f.prev,f,f.next))return!1;f=f.next;if(k++>n)return x=!0,!1}return!0}function m(a,d){return a.x-d.x}function h(a,d){var c=d,b=a.x,n=a.y,f=-Infinity,k;do{if(!c)return null;if(n<=c.y&&n>=c.next.y){var h=c.x+(n-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(h<=b&&h>f){f=h;if(h===b){if(n===c.y)return c;if(n===c.next.y)return c.next}k=c.x<c.next.x?c:c.next}}c=c.next}while(c!==d);if(!k)return null;
if(b===f)return k.prev;d=k;for(var h=k.x,g=k.y,r=Infinity,l,c=k.next;c!==d;)b>=c.x&&c.x>=h&&e(n<g?b:f,n,h,g,n<g?f:b,n,c.x,c.y)&&(l=Math.abs(n-c.y)/(b-c.x),(l<r||l===r&&c.x>k.x)&&u(c,a)&&(k=c,r=l)),c=c.next;return k}function c(a,d,c,b,e){a=32767*(a-c)/e;d=32767*(d-b)/e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;d=(d|d<<8)&16711935;d=(d|d<<4)&252645135;d=(d|d<<2)&858993459;return(a|a<<1)&1431655765|((d|d<<1)&1431655765)<<1}function q(a){var d=a,c=a;do d.x<c.x&&(c=d),d=d.next;while(d!==
a);return c}function e(a,d,c,b,e,n,f,k){return 0<=(e-f)*(d-k)-(a-f)*(n-k)&&0<=(a-f)*(b-k)-(c-f)*(d-k)&&0<=(c-f)*(n-k)-(e-f)*(b-k)}function a(a,d,c){return(d.y-a.y)*(c.x-d.x)-(d.x-a.x)*(c.y-d.y)}function k(a,d){return a.x===d.x&&a.y===d.y}function r(d,c,b,e){return k(d,c)&&k(b,e)||k(d,e)&&k(b,c)?!0:0<a(d,c,b)!==0<a(d,c,e)&&0<a(b,e,d)!==0<a(b,e,c)}function u(d,c){return 0>a(d.prev,d,d.next)?0<=a(d,c,d.next)&&0<=a(d,d.prev,c):0>a(d,c,d.prev)||0>a(d,d.next,c)}function z(a,d){var c=new t(a.i,a.x,a.y),
b=new t(d.i,d.x,d.y),e=a.next,n=d.prev;a.next=d;d.prev=a;c.next=e;e.prev=c;b.next=c;c.prev=b;n.next=b;b.prev=n;return b}function v(a,d,c,b){a=new t(a,d,c);b?(a.next=b.next,a.prev=b,b.next.prev=a,b.next=a):(a.prev=a,a.next=a);return a}function w(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function t(a,d,c){this.i=a;this.x=d;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function d(a,d,c,b){for(var e=0,n=
c-b;d<c;d+=b)e+=(a[n]-a[d])*(a[d+1]+a[n+1]),n=d;return e}var n,x;b.deviation=function(a,c,b,e){var n=c&&c.length,f=Math.abs(d(a,0,n?c[0]*b:a.length,b));if(n)for(var n=0,k=c.length;n<k;n++)f-=Math.abs(d(a,c[n]*b,n<k-1?c[n+1]*b:a.length,b));for(n=c=0;n<e.length;n+=3){var k=e[n]*b,h=e[n+1]*b,g=e[n+2]*b;c+=Math.abs((a[k]-a[g])*(a[h+1]-a[k+1])-(a[k]-a[h])*(a[g+1]-a[k+1]))}return 0===f&&0===c?0:Math.abs((c-f)/f)};b.flatten=function(a){for(var d=a[0][0].length,c={vertices:[],holes:[],dimensions:d},b=0,e=
0;e<a.length;e++){for(var n=0;n<a[e].length;n++)for(var f=0;f<d;f++)c.vertices.push(a[e][n][f]);0<e&&(b+=a[e-1].length,c.holes.push(b))}return c};return b})},"esri/geometry/support/coordsUtils":function(){define(["require","exports"],function(b,g){function p(b,f){var h=f[0]-b[0],c=f[1]-b[1];return 2<b.length&&2<f.length?(b=b[2]-f[2],Math.sqrt(h*h+c*c+b*b)):Math.sqrt(h*h+c*c)}function f(b,f,h){var c=b[0]+h*(f[0]-b[0]),g=b[1]+h*(f[1]-b[1]);return 2<b.length&&2<f.length?[c,g,b[2]+h*(f[2]-b[2])]:[c,g]}
Object.defineProperty(g,"__esModule",{value:!0});g.geometryToCoordinates=function(b){if(!b)return null;if(Array.isArray(b))return b;var f=b.hasZ,h=b.hasM;if("point"===b.type)return h&&f?[b.x,b.y,b.z,b.m]:f?[b.x,b.y,b.z]:h?[b.x,b.y,b.m]:[b.x,b.y];if("polygon"===b.type)return b.rings.slice(0);if("polyline"===b.type)return b.paths.slice(0);if("multipoint"===b.type)return b.points.slice(0);if("extent"===b.type){b=b.clone().normalize();if(!b)return null;var c=!1,g=!1;b.forEach(function(b){b.hasZ&&(c=!0);
b.hasM&&(g=!0)});return b.map(function(b){var a=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]];if(c&&b.hasZ)for(var e=.5*(b.zmax-b.zmin),f=0;f<a.length;f++)a[f].push(e);if(g&&b.hasM)for(b=.5*(b.mmax-b.mmin),f=0;f<a.length;f++)a[f].push(b);return a})}return null};g.getLength=p;g.getMidpoint=function(b,g){return f(b,g,.5)};g.getPathLength=function(b){for(var f=b.length,h=0,c=0;c<f-1;++c)h+=p(b[c],b[c+1]);return h};g.getPointOnPath=function(b,g){if(0>=g)return b[0];
for(var h=b.length,c=0,l=0;l<h-1;++l){var e=p(b[l],b[l+1]);if(g-c<e)return f(b[l],b[l+1],(g-c)/e);c+=e}return b[h-1]};g.isClockwise=function(b,f,h){for(var c=b.length,g=0,e=0,a=0,k=0;k<c;k++){var r=b[k],l=b[(k+1)%c],m=2,g=g+(r[0]*l[1]-l[0]*r[1]);2<r.length&&2<l.length&&h&&(e+=r[0]*l[2]-l[0]*r[2],m=3);r.length>m&&l.length>m&&f&&(a+=r[0]*l[m]-l[0]*r[m])}return 0>=g&&0>=e&&0>=a}})},"esri/geometry/support/meshUtils/centerAt":function(){define("require exports ../../../core/Logger ./projection ../../../views/3d/lib/glMatrix ../../../views/3d/support/projectionUtils".split(" "),
function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});var h=p.getLogger("esri.geometry.support.meshUtils.centerAt");g.centerAt=function(b,g,u){if(b.vertexAttributes&&b.vertexAttributes.position){var k=b.spatialReference,r=u&&u.origin||b.extent.center;if(k.isWGS84||k.isWebMercator&&(!u||!1!==u.geographic)){u=b.spatialReference;var k=q,p=c;if(m.pointToVector(g,p,m.SphericalECEFSpatialReference)){m.pointToVector(r,k,m.SphericalECEFSpatialReference)||m.pointToVector(b.extent.center,k,
m.SphericalECEFSpatialReference);r=b.vertexAttributes.position;g=b.vertexAttributes.normal;var t=new Float64Array(r.length),d=new Float32Array(g?g.length:0);f.projectToECEF(r,u,t);g&&f.projectNormalToECEF(g,r,t,u,d);m.computeLinearTransformation(m.SphericalECEFSpatialReference,k,e,m.SphericalECEFSpatialReference);m.computeLinearTransformation(m.SphericalECEFSpatialReference,p,a,m.SphericalECEFSpatialReference);l.mat4d.inverse(e);l.mat4d.multiply(a,e,a);f.transformBufferInPlace(t,a);l.mat4d.inverse(a);
l.mat4d.transpose(a);g&&f.transformBufferInPlace(d,a,!0);f.projectFromECEF(t,r,u);g&&f.projectNormalFromECEF(d,r,t,u,g);b.clearCache()}else h.error("Failed to project centerAt location (wkid:"+g.spatialReference.wkid+") to ECEF")}else if(u=q,k=c,m.pointToVector(g,k,b.spatialReference)){m.pointToVector(r,u,b.spatialReference)||(g=b.extent.center,u[0]=g.x,u[1]=g.y,u[2]=g.z,h.error("Failed to project specified origin (wkid:"+r.spatialReference.wkid+") to mesh spatial reference (wkid:"+b.spatialReference.wkid+
"). Using mesh extent.center instead"));if(r=b.vertexAttributes.position)for(g=0;g<r.length;g+=3)for(p=0;3>p;p++)r[g+p]+=k[p]-u[p];b.clearCache()}else h.error("Failed to project centerAt location (wkid:"+g.spatialReference.wkid+") to mesh spatial reference (wkid:"+b.spatialReference.wkid+")")}};var c=l.vec3d.create(),q=l.vec3d.create(),e=l.mat4d.create(),a=l.mat4d.create()})},"esri/geometry/support/meshUtils/projection":function(){define(["require","exports","../../../core/Logger","../../../views/3d/lib/glMatrix",
"../../../views/3d/support/projectionUtils"],function(b,g,p,f,l){function m(b,h,g,m,p,w){if(h){p=p.isWGS84;for(var k=0;k<h.length;k+=3){for(var d=0;3>d;d++)c[d]=m[k+d],q[d]=h[k+d];l.computeLinearTransformation(l.SphericalECEFSpatialReference,c,e,l.SphericalECEFSpatialReference);f.mat4d.toMat3(e,a);p?f.mat3d.multiplyVec3(a,q):(d=l.webMercator.y2lat(g[k+1]),d=Math.cos(d),0===b&&(d=1/d),a[0]*=d,a[1]*=d,a[2]*=d,a[3]*=d,a[4]*=d,a[5]*=d,1===b&&f.mat3d.transpose(a),f.mat3d.multiplyVec3(a,q),f.vec3d.normalize(q));
for(d=0;3>d;d++)w[k+d]=q[d]}return w}}Object.defineProperty(g,"__esModule",{value:!0});var h=p.getLogger("esri.geometry.support.meshUtils.normalProjection");g.projectNormalToECEF=function(a,c,b,e,f){return e.isWebMercator||e.isWGS84?m(0,a,c,b,e,f):(h.error("Cannot convert PCS spatial reference buffer to ECEF"),f)};g.projectNormalFromECEF=function(a,c,b,e,f){return e.isWebMercator||e.isWGS84?m(1,a,c,b,e,f):(h.error("Cannot convert to PCS spatial reference buffer from ECEF"),f)};g.projectToECEF=function(a,
c,b){l.bufferToBuffer(a,c,0,b,l.SphericalECEFSpatialReference,0,a.length/3);return b};g.projectFromECEF=function(a,c,b){l.bufferToBuffer(a,l.SphericalECEFSpatialReference,0,c,b,0,a.length/3);return c};g.transformBufferInPlace=function(a,b,e){void 0===e&&(e=!1);if(a)for(var k=0;k<a.length;k+=3){for(var h=0;3>h;h++)c[h]=a[k+h];f.mat4d.multiplyVec3(b,c);e&&f.vec3d.normalize(c);for(h=0;3>h;h++)a[k+h]=c[h]}};var c=f.vec3d.create(),q=f.vec3d.create(),e=f.mat4d.create(),a=f.mat3d.create()})},"esri/views/3d/lib/glMatrix":function(){define([],
function(){var b={};(function(b,p){p(b,!0);p(b,!1)})(b,function(b,p){var f={};(function(){if("undefined"!=typeof Float32Array){var a=new Float32Array(1),c=new Int32Array(a.buffer);f.invsqrt=function(d){a[0]=d;c[0]=1597463007-(c[0]>>1);var b=a[0];return b*(1.5-.5*d*b*b)}}else f.invsqrt=function(a){return 1/Math.sqrt(a)}})();var g=Array;"undefined"!=typeof Float32Array&&(g=p?Float32Array:Array);var m={create:function(a){var d=new g(3);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2]):d[0]=d[1]=d[2]=0;return d},createFrom:function(a,
c,b){var d=new g(3);d[0]=a;d[1]=c;d[2]=b;return d},set:function(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];return c},set3:function(a,c,b,e){e[0]=a;e[1]=c;e[2]=b;return e},add:function(a,c,b){if(!b||a===b)return a[0]+=c[0],a[1]+=c[1],a[2]+=c[2],a;b[0]=a[0]+c[0];b[1]=a[1]+c[1];b[2]=a[2]+c[2];return b},subtract:function(a,c,b){if(!b||a===b)return a[0]-=c[0],a[1]-=c[1],a[2]-=c[2],a;b[0]=a[0]-c[0];b[1]=a[1]-c[1];b[2]=a[2]-c[2];return b},multiply:function(a,c,b){if(!b||a===b)return a[0]*=c[0],a[1]*=c[1],a[2]*=
c[2],a;b[0]=a[0]*c[0];b[1]=a[1]*c[1];b[2]=a[2]*c[2];return b},max:function(a,c,b){b[0]=Math.max(a[0],c[0]);b[1]=Math.max(a[1],c[1]);b[2]=Math.max(a[2],c[2]);return b},min:function(a,c,b){b[0]=Math.min(a[0],c[0]);b[1]=Math.min(a[1],c[1]);b[2]=Math.min(a[2],c[2]);return b},negate:function(a,c){c||(c=a);c[0]=-a[0];c[1]=-a[1];c[2]=-a[2];return c},scale:function(a,c,b){if(!b||a===b)return a[0]*=c,a[1]*=c,a[2]*=c,a;b[0]=a[0]*c;b[1]=a[1]*c;b[2]=a[2]*c;return b},normalize:function(a,c){c||(c=a);var d=a[0],
b=a[1];a=a[2];var e=Math.sqrt(d*d+b*b+a*a);if(!e)return c[0]=0,c[1]=0,c[2]=0,c;if(1===e)return c[0]=d,c[1]=b,c[2]=a,c;e=1/e;c[0]=d*e;c[1]=b*e;c[2]=a*e;return c},cross:function(a,c,b){b||(b=a);var d=a[0],e=a[1];a=a[2];var n=c[0],f=c[1];c=c[2];b[0]=e*c-a*f;b[1]=a*n-d*c;b[2]=d*f-e*n;return b},length:function(a){var d=a[0],c=a[1];a=a[2];return Math.sqrt(d*d+c*c+a*a)},length2:function(a){var d=a[0],c=a[1];a=a[2];return d*d+c*c+a*a},dot:function(a,c){return a[0]*c[0]+a[1]*c[1]+a[2]*c[2]},direction:function(a,
c,b){b||(b=a);var d=a[0]-c[0],e=a[1]-c[1];a=a[2]-c[2];c=Math.sqrt(d*d+e*e+a*a);if(!c)return b[0]=0,b[1]=0,b[2]=0,b;c=1/c;b[0]=d*c;b[1]=e*c;b[2]=a*c;return b},lerp:function(a,c,b,e){e||(e=a);e[0]=a[0]+b*(c[0]-a[0]);e[1]=a[1]+b*(c[1]-a[1]);e[2]=a[2]+b*(c[2]-a[2]);return e},dist:function(a,c){var d=c[0]-a[0],b=c[1]-a[1];a=c[2]-a[2];return Math.sqrt(d*d+b*b+a*a)},dist2:function(a,c){var d=c[0]-a[0],b=c[1]-a[1];a=c[2]-a[2];return d*d+b*b+a*a}},h=null,c=new g(4);m.unproject=function(a,b,e,f,k){k||(k=a);
h||(h=z.create());var d=h;c[0]=2*(a[0]-f[0])/f[2]-1;c[1]=2*(a[1]-f[1])/f[3]-1;c[2]=2*a[2]-1;c[3]=1;z.multiply(e,b,d);if(!z.inverse(d))return null;z.multiplyVec4(d,c);if(0===c[3])return null;k[0]=c[0]/c[3];k[1]=c[1]/c[3];k[2]=c[2]/c[3];return k};var q=m.createFrom(1,0,0),e=m.createFrom(0,1,0),a=m.createFrom(0,0,1);m.rotationTo=function(d,c,b){b||(b=v.create());var n=m.dot(d,c),f=m.create();if(1<=n)v.set(w,b);else if(-.999999>n)m.cross(q,d,f),1E-6>f.length&&m.cross(e,d,f),1E-6>f.length&&m.cross(a,d,
f),m.normalize(f),v.fromAxisAngle(f,Math.PI,b);else{var n=Math.sqrt(2*(1+n)),k=1/n;m.cross(d,c,f);b[0]=f[0]*k;b[1]=f[1]*k;b[2]=f[2]*k;b[3]=.5*n;v.normalize(b)}1<b[3]?b[3]=1:-1>b[3]&&(b[3]=-1);return b};var k=m.create(),r=m.create();m.project=function(a,c,b,e){e||(e=a);m.direction(c,b,k);m.subtract(a,c,r);a=m.dot(k,r);m.scale(k,a,e);m.add(e,c,e)};m.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var u={create:function(a){var d=new g(9);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3],d[4]=a[4],d[5]=
a[5],d[6]=a[6],d[7]=a[7],d[8]=a[8]):d[0]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=0;return d},createFrom:function(a,c,b,e,f,k,h,r,l){var d=new g(9);d[0]=a;d[1]=c;d[2]=b;d[3]=e;d[4]=f;d[5]=k;d[6]=h;d[7]=r;d[8]=l;return d},determinant:function(a){var d=a[3],c=a[4],b=a[5],e=a[6],f=a[7],k=a[8];return a[0]*(k*c-b*f)+a[1]*(-k*d+b*e)+a[2]*(f*d-c*e)},inverse:function(a,c){var d=a[0],b=a[1],e=a[2],n=a[3],f=a[4],k=a[5],h=a[6],g=a[7];a=a[8];var r=a*f-k*g,l=-a*n+k*h,q=g*n-f*h,m=d*r+b*l+e*q;if(!m)return null;m=
1/m;c||(c=u.create());c[0]=r*m;c[1]=(-a*b+e*g)*m;c[2]=(k*b-e*f)*m;c[3]=l*m;c[4]=(a*d-e*h)*m;c[5]=(-k*d+e*n)*m;c[6]=q*m;c[7]=(-g*d+b*h)*m;c[8]=(f*d-b*n)*m;return c},multiply:function(a,c,b){b||(b=a);var d=a[0],e=a[1],n=a[2],f=a[3],k=a[4],h=a[5],g=a[6],r=a[7];a=a[8];var l=c[0],q=c[1],m=c[2],t=c[3],x=c[4],u=c[5],p=c[6],z=c[7];c=c[8];b[0]=l*d+q*f+m*g;b[1]=l*e+q*k+m*r;b[2]=l*n+q*h+m*a;b[3]=t*d+x*f+u*g;b[4]=t*e+x*k+u*r;b[5]=t*n+x*h+u*a;b[6]=p*d+z*f+c*g;b[7]=p*e+z*k+c*r;b[8]=p*n+z*h+c*a;return b},add:function(a,
c,b){b||(b=a);b[0]=a[0]+c[0];b[1]=a[1]+c[1];b[2]=a[2]+c[2];b[3]=a[3]+c[3];b[4]=a[4]+c[4];b[5]=a[5]+c[5];b[6]=a[6]+c[6];b[7]=a[7]+c[7];b[8]=a[8]+c[8];return b},subtract:function(a,c,b){b||(b=a);b[0]=a[0]-c[0];b[1]=a[1]-c[1];b[2]=a[2]-c[2];b[3]=a[3]-c[3];b[4]=a[4]-c[4];b[5]=a[5]-c[5];b[6]=a[6]-c[6];b[7]=a[7]-c[7];b[8]=a[8]-c[8];return b},multiplyVec2:function(a,c,b){b||(b=c);var d=c[0];c=c[1];b[0]=d*a[0]+c*a[3]+a[6];b[1]=d*a[1]+c*a[4]+a[7];return b},multiplyVec3:function(a,c,b){b||(b=c);var d=c[0],
e=c[1];c=c[2];b[0]=d*a[0]+e*a[3]+c*a[6];b[1]=d*a[1]+e*a[4]+c*a[7];b[2]=d*a[2]+e*a[5]+c*a[8];return b},set:function(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];return c},identity:function(a){a||(a=u.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,c){if(!c||a===c){c=a[1];var d=a[2],b=a[5];a[1]=a[3];a[2]=a[6];a[3]=c;a[5]=a[7];a[6]=d;a[7]=b;return a}c[0]=a[0];c[1]=a[3];c[2]=a[6];c[3]=a[1];c[4]=a[4];
c[5]=a[7];c[6]=a[2];c[7]=a[5];c[8]=a[8];return c},toMat4:function(a,c){c||(c=z.create());c[15]=1;c[14]=0;c[13]=0;c[12]=0;c[11]=0;c[10]=a[8];c[9]=a[7];c[8]=a[6];c[7]=0;c[6]=a[5];c[5]=a[4];c[4]=a[3];c[3]=0;c[2]=a[2];c[1]=a[1];c[0]=a[0];return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"}},z={create:function(a){var d=new g(16);4===arguments.length?(d[0]=arguments[0],d[1]=arguments[1],d[2]=arguments[2],d[3]=arguments[3],d[4]=arguments[4],
d[5]=arguments[5],d[6]=arguments[6],d[7]=arguments[7],d[8]=arguments[8],d[9]=arguments[9],d[10]=arguments[10],d[11]=arguments[11],d[12]=arguments[12],d[13]=arguments[13],d[14]=arguments[14],d[15]=arguments[15]):a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3],d[4]=a[4],d[5]=a[5],d[6]=a[6],d[7]=a[7],d[8]=a[8],d[9]=a[9],d[10]=a[10],d[11]=a[11],d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]);return d},createFrom:function(a,c,b,e,f,k,h,r,l,q,m,t,u,p,z,v){var d=new g(16);d[0]=a;d[1]=c;d[2]=b;d[3]=e;d[4]=f;
d[5]=k;d[6]=h;d[7]=r;d[8]=l;d[9]=q;d[10]=m;d[11]=t;d[12]=u;d[13]=p;d[14]=z;d[15]=v;return d},createFromMatrixRowMajor:function(a){var d=new g(16);d[0]=a[0];d[4]=a[1];d[8]=a[2];d[12]=a[3];d[1]=a[4];d[5]=a[5];d[9]=a[6];d[13]=a[7];d[2]=a[8];d[6]=a[9];d[10]=a[10];d[14]=a[11];d[3]=a[12];d[7]=a[13];d[11]=a[14];d[15]=a[15];return d},createFromMatrix:function(a){var d=new g(16);d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4];d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];d[9]=a[9];d[10]=a[10];d[11]=a[11];d[12]=
a[12];d[13]=a[13];d[14]=a[14];d[15]=a[15];return d},set:function(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c},setRowMajor:function(a,c){c[0]=a[0];c[4]=a[1];c[8]=a[2];c[12]=a[3];c[1]=a[4];c[5]=a[5];c[9]=a[6];c[13]=a[7];c[2]=a[8];c[6]=a[9];c[10]=a[10];c[14]=a[11];c[3]=a[12];c[7]=a[13];c[11]=a[14];c[15]=a[15];return c},identity:function(a){a||(a=z.create());a[0]=
1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,c){if(!c||a===c){c=a[1];var d=a[2],b=a[3],e=a[6],n=a[7],f=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=c;a[6]=a[9];a[7]=a[13];a[8]=d;a[9]=e;a[11]=a[14];a[12]=b;a[13]=n;a[14]=f;return a}c[0]=a[0];c[1]=a[4];c[2]=a[8];c[3]=a[12];c[4]=a[1];c[5]=a[5];c[6]=a[9];c[7]=a[13];c[8]=a[2];c[9]=a[6];c[10]=a[10];c[11]=a[14];c[12]=a[3];c[13]=a[7];c[14]=a[11];c[15]=a[15];return c},
determinant:function(a){var c=a[0],d=a[1],b=a[2],e=a[3],f=a[4],k=a[5],h=a[6],g=a[7],r=a[8],l=a[9],q=a[10],m=a[11],t=a[12],u=a[13],p=a[14];a=a[15];return t*l*h*e-r*u*h*e-t*k*q*e+f*u*q*e+r*k*p*e-f*l*p*e-t*l*b*g+r*u*b*g+t*d*q*g-c*u*q*g-r*d*p*g+c*l*p*g+t*k*b*m-f*u*b*m-t*d*h*m+c*u*h*m+f*d*p*m-c*k*p*m-r*k*b*a+f*l*b*a+r*d*h*a-c*l*h*a-f*d*q*a+c*k*q*a},inverse:function(a,c){c||(c=a);var d=a[0],b=a[1],e=a[2],n=a[3],f=a[4],k=a[5],h=a[6],g=a[7],r=a[8],l=a[9],q=a[10],m=a[11],t=a[12],u=a[13],p=a[14];a=a[15];var z=
d*k-b*f,v=d*h-e*f,w=d*g-n*f,J=b*h-e*k,P=b*g-n*k,S=e*g-n*h,ca=r*u-l*t,Q=r*p-q*t,U=r*a-m*t,Y=l*p-q*u,ga=l*a-m*u,ka=q*a-m*p,ha=z*ka-v*ga+w*Y+J*U-P*Q+S*ca;if(!ha)return null;ha=1/ha;c[0]=(k*ka-h*ga+g*Y)*ha;c[1]=(-b*ka+e*ga-n*Y)*ha;c[2]=(u*S-p*P+a*J)*ha;c[3]=(-l*S+q*P-m*J)*ha;c[4]=(-f*ka+h*U-g*Q)*ha;c[5]=(d*ka-e*U+n*Q)*ha;c[6]=(-t*S+p*w-a*v)*ha;c[7]=(r*S-q*w+m*v)*ha;c[8]=(f*ga-k*U+g*ca)*ha;c[9]=(-d*ga+b*U-n*ca)*ha;c[10]=(t*P-u*w+a*z)*ha;c[11]=(-r*P+l*w-m*z)*ha;c[12]=(-f*Y+k*Q-h*ca)*ha;c[13]=(d*Y-b*Q+e*
ca)*ha;c[14]=(-t*J+u*v-p*z)*ha;c[15]=(r*J-l*v+q*z)*ha;return c},toRotationMat:function(a,c){c||(c=z.create());c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=0;c[13]=0;c[14]=0;c[15]=1;return c},toMat3:function(a,c){c||(c=u.create());c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[4];c[4]=a[5];c[5]=a[6];c[6]=a[8];c[7]=a[9];c[8]=a[10];return c},toInverseMat3:function(a,c){var d=a[0],b=a[1],e=a[2],n=a[4],f=a[5],k=a[6],h=a[8],g=a[9];
a=a[10];var r=a*f-k*g,l=-a*n+k*h,q=g*n-f*h,m=d*r+b*l+e*q;if(!m)return null;m=1/m;c||(c=u.create());c[0]=r*m;c[1]=(-a*b+e*g)*m;c[2]=(k*b-e*f)*m;c[3]=l*m;c[4]=(a*d-e*h)*m;c[5]=(-k*d+e*n)*m;c[6]=q*m;c[7]=(-g*d+b*h)*m;c[8]=(f*d-b*n)*m;return c},multiply:function(a,c,b){b||(b=a);var d=a[0],e=a[1],n=a[2],f=a[3],k=a[4],h=a[5],g=a[6],r=a[7],l=a[8],m=a[9],q=a[10],t=a[11],x=a[12],u=a[13],p=a[14];a=a[15];var z=c[0],v=c[1],w=c[2],P=c[3],S=c[4],ca=c[5],Q=c[6],U=c[7],Y=c[8],ga=c[9],ka=c[10],ha=c[11],qa=c[12],na=
c[13],wa=c[14];c=c[15];b[0]=z*d+v*k+w*l+P*x;b[1]=z*e+v*h+w*m+P*u;b[2]=z*n+v*g+w*q+P*p;b[3]=z*f+v*r+w*t+P*a;b[4]=S*d+ca*k+Q*l+U*x;b[5]=S*e+ca*h+Q*m+U*u;b[6]=S*n+ca*g+Q*q+U*p;b[7]=S*f+ca*r+Q*t+U*a;b[8]=Y*d+ga*k+ka*l+ha*x;b[9]=Y*e+ga*h+ka*m+ha*u;b[10]=Y*n+ga*g+ka*q+ha*p;b[11]=Y*f+ga*r+ka*t+ha*a;b[12]=qa*d+na*k+wa*l+c*x;b[13]=qa*e+na*h+wa*m+c*u;b[14]=qa*n+na*g+wa*q+c*p;b[15]=qa*f+na*r+wa*t+c*a;return b},multiplyVec3:function(a,c,b){b||(b=c);var d=c[0],e=c[1];c=c[2];b[0]=a[0]*d+a[4]*e+a[8]*c+a[12];b[1]=
a[1]*d+a[5]*e+a[9]*c+a[13];b[2]=a[2]*d+a[6]*e+a[10]*c+a[14];return b},multiplyVec4:function(a,c,b){b||(b=c);var d=c[0],e=c[1],n=c[2];c=c[3];b[0]=a[0]*d+a[4]*e+a[8]*n+a[12]*c;b[1]=a[1]*d+a[5]*e+a[9]*n+a[13]*c;b[2]=a[2]*d+a[6]*e+a[10]*n+a[14]*c;b[3]=a[3]*d+a[7]*e+a[11]*n+a[15]*c;return b},translate:function(a,c,b){var d=c[0],e=c[1];c=c[2];var n,f,k,h,g,r,l,m,q,t,x,u;if(!b||a===b)return a[12]=a[0]*d+a[4]*e+a[8]*c+a[12],a[13]=a[1]*d+a[5]*e+a[9]*c+a[13],a[14]=a[2]*d+a[6]*e+a[10]*c+a[14],a[15]=a[3]*d+a[7]*
e+a[11]*c+a[15],a;n=a[0];f=a[1];k=a[2];h=a[3];g=a[4];r=a[5];l=a[6];m=a[7];q=a[8];t=a[9];x=a[10];u=a[11];b[0]=n;b[1]=f;b[2]=k;b[3]=h;b[4]=g;b[5]=r;b[6]=l;b[7]=m;b[8]=q;b[9]=t;b[10]=x;b[11]=u;b[12]=n*d+g*e+q*c+a[12];b[13]=f*d+r*e+t*c+a[13];b[14]=k*d+l*e+x*c+a[14];b[15]=h*d+m*e+u*c+a[15];return b},scale:function(a,c,b){var d=c[0],e=c[1];c=c[2];if(!b||a===b)return a[0]*=d,a[1]*=d,a[2]*=d,a[3]*=d,a[4]*=e,a[5]*=e,a[6]*=e,a[7]*=e,a[8]*=c,a[9]*=c,a[10]*=c,a[11]*=c,a;b[0]=a[0]*d;b[1]=a[1]*d;b[2]=a[2]*d;b[3]=
a[3]*d;b[4]=a[4]*e;b[5]=a[5]*e;b[6]=a[6]*e;b[7]=a[7]*e;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},maxScale:function(a){return Math.max(Math.max(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8]),Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])),Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))},rotate:function(a,c,b,e){var d=b[0],n=b[1];b=b[2];var f=Math.sqrt(d*d+n*n+b*b),k,h,g,r,l,m,q,t,x,u,p,z,y,v,w,S,ca,Q,U,Y;if(!f)return null;1!==f&&(f=1/f,d*=f,n*=f,
b*=f);k=Math.sin(c);h=Math.cos(c);g=1-h;c=a[0];f=a[1];r=a[2];l=a[3];m=a[4];q=a[5];t=a[6];x=a[7];u=a[8];p=a[9];z=a[10];y=a[11];v=d*d*g+h;w=n*d*g+b*k;S=b*d*g-n*k;ca=d*n*g-b*k;Q=n*n*g+h;U=b*n*g+d*k;Y=d*b*g+n*k;d=n*b*g-d*k;n=b*b*g+h;e?a!==e&&(e[12]=a[12],e[13]=a[13],e[14]=a[14],e[15]=a[15]):e=a;e[0]=c*v+m*w+u*S;e[1]=f*v+q*w+p*S;e[2]=r*v+t*w+z*S;e[3]=l*v+x*w+y*S;e[4]=c*ca+m*Q+u*U;e[5]=f*ca+q*Q+p*U;e[6]=r*ca+t*Q+z*U;e[7]=l*ca+x*Q+y*U;e[8]=c*Y+m*d+u*n;e[9]=f*Y+q*d+p*n;e[10]=r*Y+t*d+z*n;e[11]=l*Y+x*d+y*n;
return e},rotateX:function(a,c,b){var d=Math.sin(c);c=Math.cos(c);var e=a[4],n=a[5],f=a[6],k=a[7],h=a[8],g=a[9],r=a[10],l=a[11];b?a!==b&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[4]=e*c+h*d;b[5]=n*c+g*d;b[6]=f*c+r*d;b[7]=k*c+l*d;b[8]=e*-d+h*c;b[9]=n*-d+g*c;b[10]=f*-d+r*c;b[11]=k*-d+l*c;return b},rotateY:function(a,c,b){var d=Math.sin(c);c=Math.cos(c);var e=a[0],n=a[1],f=a[2],k=a[3],h=a[8],g=a[9],r=a[10],l=a[11];b?a!==b&&(b[4]=a[4],b[5]=a[5],b[6]=
a[6],b[7]=a[7],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[0]=e*c+h*-d;b[1]=n*c+g*-d;b[2]=f*c+r*-d;b[3]=k*c+l*-d;b[8]=e*d+h*c;b[9]=n*d+g*c;b[10]=f*d+r*c;b[11]=k*d+l*c;return b},rotateZ:function(a,c,b){var d=Math.sin(c);c=Math.cos(c);var e=a[0],n=a[1],f=a[2],k=a[3],h=a[4],g=a[5],r=a[6],l=a[7];b?a!==b&&(b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[0]=e*c+h*d;b[1]=n*c+g*d;b[2]=f*c+r*d;b[3]=k*c+l*d;b[4]=e*-d+h*c;b[5]=n*-d+g*c;b[6]=f*-d+
r*c;b[7]=k*-d+l*c;return b},frustum:function(a,c,b,e,f,k,h){h||(h=z.create());var d=c-a,n=e-b,g=k-f;h[0]=2*f/d;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2*f/n;h[6]=0;h[7]=0;h[8]=(c+a)/d;h[9]=(e+b)/n;h[10]=-(k+f)/g;h[11]=-1;h[12]=0;h[13]=0;h[14]=-(k*f*2)/g;h[15]=0;return h},perspective:function(a,c,b,e,f){a=b*Math.tan(a*Math.PI/360);c*=a;return z.frustum(-c,c,-a,a,b,e,f)},ortho:function(a,c,b,e,f,k,h){h||(h=z.create());var d=c-a,n=e-b,g=k-f;h[0]=2/d;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2/n;h[6]=0;h[7]=0;h[8]=0;
h[9]=0;h[10]=-2/g;h[11]=0;h[12]=-(a+c)/d;h[13]=-(e+b)/n;h[14]=-(k+f)/g;h[15]=1;return h},lookAt:function(a,c,b,e){e||(e=z.create());var d,n,f,k,h,g,r,l,m=a[0],q=a[1];a=a[2];f=b[0];k=b[1];n=b[2];r=c[0];b=c[1];d=c[2];if(m===r&&q===b&&a===d)return z.identity(e);c=m-r;b=q-b;r=a-d;l=1/Math.sqrt(c*c+b*b+r*r);c*=l;b*=l;r*=l;d=k*r-n*b;n=n*c-f*r;f=f*b-k*c;(l=Math.sqrt(d*d+n*n+f*f))?(l=1/l,d*=l,n*=l,f*=l):f=n=d=0;k=b*f-r*n;h=r*d-c*f;g=c*n-b*d;(l=Math.sqrt(k*k+h*h+g*g))?(l=1/l,k*=l,h*=l,g*=l):g=h=k=0;e[0]=d;
e[1]=k;e[2]=c;e[3]=0;e[4]=n;e[5]=h;e[6]=b;e[7]=0;e[8]=f;e[9]=g;e[10]=r;e[11]=0;e[12]=-(d*m+n*q+f*a);e[13]=-(k*m+h*q+g*a);e[14]=-(c*m+b*q+r*a);e[15]=1;return e},fromRotationTranslation:function(a,c,b){b||(b=z.create());var d=a[0],e=a[1],n=a[2],f=a[3],k=d+d,h=e+e,g=n+n;a=d*k;var r=d*h,d=d*g,l=e*h,e=e*g,n=n*g,k=f*k,h=f*h,f=f*g;b[0]=1-(l+n);b[1]=r+f;b[2]=d-h;b[3]=0;b[4]=r-f;b[5]=1-(a+n);b[6]=e+k;b[7]=0;b[8]=d+h;b[9]=e-k;b[10]=1-(a+l);b[11]=0;b[12]=c[0];b[13]=c[1];b[14]=c[2];b[15]=1;return b},str:function(a){return"["+
a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},v={create:function(a){var c=new g(4);a?(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3]):c[0]=c[1]=c[2]=c[3]=0;return c},createFrom:function(a,c,b,e){var d=new g(4);d[0]=a;d[1]=c;d[2]=b;d[3]=e;return d},set:function(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];return c},identity:function(a){a||(a=v.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},
w=v.identity();v.calculateW=function(a,c){var b=a[0],d=a[1],e=a[2];if(!c||a===c)return a[3]=-Math.sqrt(Math.abs(1-b*b-d*d-e*e)),a;c[0]=b;c[1]=d;c[2]=e;c[3]=-Math.sqrt(Math.abs(1-b*b-d*d-e*e));return c};v.dot=function(a,c){return a[0]*c[0]+a[1]*c[1]+a[2]*c[2]+a[3]*c[3]};v.inverse=function(a,c){var b=a[0],d=a[1],e=a[2],n=a[3],b=(b=b*b+d*d+e*e+n*n)?1/b:0;if(!c||a===c)return a[0]*=-b,a[1]*=-b,a[2]*=-b,a[3]*=b,a;c[0]=-a[0]*b;c[1]=-a[1]*b;c[2]=-a[2]*b;c[3]=a[3]*b;return c};v.conjugate=function(a,c){if(!c||
a===c)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;c[0]=-a[0];c[1]=-a[1];c[2]=-a[2];c[3]=a[3];return c};v.length=function(a){var c=a[0],b=a[1],d=a[2];a=a[3];return Math.sqrt(c*c+b*b+d*d+a*a)};v.normalize=function(a,c){c||(c=a);var b=a[0],d=a[1],e=a[2];a=a[3];var f=Math.sqrt(b*b+d*d+e*e+a*a);if(0===f)return c[0]=0,c[1]=0,c[2]=0,c[3]=0,c;f=1/f;c[0]=b*f;c[1]=d*f;c[2]=e*f;c[3]=a*f;return c};v.add=function(a,c,b){if(!b||a===b)return a[0]+=c[0],a[1]+=c[1],a[2]+=c[2],a[3]+=c[3],a;b[0]=a[0]+c[0];b[1]=a[1]+c[1];b[2]=
a[2]+c[2];b[3]=a[3]+c[3];return b};v.multiply=function(a,c,b){b||(b=a);var d=a[0],e=a[1],f=a[2];a=a[3];var n=c[0],k=c[1],h=c[2];c=c[3];b[0]=d*c+a*n+e*h-f*k;b[1]=e*c+a*k+f*n-d*h;b[2]=f*c+a*h+d*k-e*n;b[3]=a*c-d*n-e*k-f*h;return b};v.multiplyVec3=function(a,c,b){b||(b=c);var d=c[0],e=c[1],f=c[2];c=a[0];var n=a[1],k=a[2];a=a[3];var h=a*d+n*f-k*e,g=a*e+k*d-c*f,r=a*f+c*e-n*d,d=-c*d-n*e-k*f;b[0]=h*a+d*-c+g*-k-r*-n;b[1]=g*a+d*-n+r*-c-h*-k;b[2]=r*a+d*-k+h*-n-g*-c;return b};v.scale=function(a,c,b){if(!b||a===
b)return a[0]*=c,a[1]*=c,a[2]*=c,a[3]*=c,a;b[0]=a[0]*c;b[1]=a[1]*c;b[2]=a[2]*c;b[3]=a[3]*c;return b};v.toMat3=function(a,c){c||(c=u.create());var b=a[0],d=a[1],e=a[2],f=a[3],n=b+b,k=d+d,h=e+e;a=b*n;var g=b*k,b=b*h,r=d*k,d=d*h,e=e*h,n=f*n,k=f*k,f=f*h;c[0]=1-(r+e);c[1]=g+f;c[2]=b-k;c[3]=g-f;c[4]=1-(a+e);c[5]=d+n;c[6]=b+k;c[7]=d-n;c[8]=1-(a+r);return c};v.toMat4=function(a,c){c||(c=z.create());var b=a[0],d=a[1],e=a[2],f=a[3],k=b+b,n=d+d,h=e+e;a=b*k;var g=b*n,b=b*h,r=d*n,d=d*h,e=e*h,k=f*k,n=f*n,f=f*h;
c[0]=1-(r+e);c[1]=g+f;c[2]=b-n;c[3]=0;c[4]=g-f;c[5]=1-(a+e);c[6]=d+k;c[7]=0;c[8]=b+n;c[9]=d-k;c[10]=1-(a+r);c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[15]=1;return c};v.slerp=function(a,c,b,e){e||(e=a);var d=a[0]*c[0]+a[1]*c[1]+a[2]*c[2]+a[3]*c[3],f,k;if(1<=Math.abs(d))return e!==a&&(e[0]=a[0],e[1]=a[1],e[2]=a[2],e[3]=a[3]),e;f=Math.acos(d);k=Math.sqrt(1-d*d);if(.001>Math.abs(k))return e[0]=.5*a[0]+.5*c[0],e[1]=.5*a[1]+.5*c[1],e[2]=.5*a[2]+.5*c[2],e[3]=.5*a[3]+.5*c[3],e;d=Math.sin((1-b)*f)/k;b=Math.sin(b*
f)/k;e[0]=a[0]*d+c[0]*b;e[1]=a[1]*d+c[1]*b;e[2]=a[2]*d+c[2]*b;e[3]=a[3]*d+c[3]*b;return e};v.fromRotationMatrix=function(a,c){c||(c=v.create());var b=a[0]+a[4]+a[8],d;if(0<b)d=Math.sqrt(b+1),c[3]=.5*d,d=.5/d,c[0]=(a[7]-a[5])*d,c[1]=(a[2]-a[6])*d,c[2]=(a[3]-a[1])*d;else{d=v.fromRotationMatrix.s_iNext=v.fromRotationMatrix.s_iNext||[1,2,0];b=0;a[4]>a[0]&&(b=1);a[8]>a[3*b+b]&&(b=2);var e=d[b],f=d[e];d=Math.sqrt(a[3*b+b]-a[3*e+e]-a[3*f+f]+1);c[b]=.5*d;d=.5/d;c[3]=(a[3*f+e]-a[3*e+f])*d;c[e]=(a[3*e+b]+a[3*
b+e])*d;c[f]=(a[3*f+b]+a[3*b+f])*d}return c};u.toQuat4=v.fromRotationMatrix;(function(){var a=u.create();v.fromAxes=function(c,b,d,e){a[0]=b[0];a[3]=b[1];a[6]=b[2];a[1]=d[0];a[4]=d[1];a[7]=d[2];a[2]=c[0];a[5]=c[1];a[8]=c[2];return v.fromRotationMatrix(a,e)}})();v.identity=function(a){a||(a=v.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a};v.fromAngleAxis=function(a,c,b){b||(b=v.create());a*=.5;var d=Math.sin(a);b[3]=Math.cos(a);b[0]=d*c[0];b[1]=d*c[1];b[2]=d*c[2];return b};v.toAngleAxis=function(a,
c){c||(c=a);var b=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0<b?(c[3]=2*Math.acos(a[3]),b=f.invsqrt(b),c[0]=a[0]*b,c[1]=a[1]*b,c[2]=a[2]*b):(c[3]=0,c[0]=1,c[1]=0,c[2]=0);return c};v.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"};var t={create:function(a){var c=new g(4);a?(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3]):c[0]=c[1]=c[2]=c[3]=0;return c},createFrom:function(a,c,b,e){var d=new g(4);d[0]=a;d[1]=c;d[2]=b;d[3]=e;return d},set:function(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];return c},
identity:function(a){a||(a=t.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,c){if(!c||a===c)return c=a[1],a[1]=a[2],a[2]=c,a;c[0]=a[0];c[1]=a[2];c[2]=a[1];c[3]=a[3];return c},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,c){c||(c=a);var b=a[0],d=a[1],e=a[2];a=a[3];var f=b*a-e*d;if(!f)return null;f=1/f;c[0]=a*f;c[1]=-d*f;c[2]=-e*f;c[3]=b*f;return c},multiply:function(a,c,b){b||(b=a);var d=a[0],e=a[1],f=a[2];a=a[3];b[0]=d*c[0]+e*c[2];b[1]=d*c[1]+e*c[3];
b[2]=f*c[0]+a*c[2];b[3]=f*c[1]+a*c[3];return b},rotate:function(a,c,b){b||(b=a);var d=a[0],e=a[1],f=a[2];a=a[3];var k=Math.sin(c);c=Math.cos(c);b[0]=d*c+e*k;b[1]=d*-k+e*c;b[2]=f*c+a*k;b[3]=f*-k+a*c;return b},multiplyVec2:function(a,c,b){b||(b=c);var d=c[0];c=c[1];b[0]=d*a[0]+c*a[1];b[1]=d*a[2]+c*a[3];return b},scale:function(a,c,b){b||(b=a);var d=a[1],e=a[2],f=a[3],k=c[0];c=c[1];b[0]=a[0]*k;b[1]=d*c;b[2]=e*k;b[3]=f*c;return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};p=p?
"":"d";b["glMath"+p]=f;b["vec2"+p]={create:function(a){var c=new g(2);a?(c[0]=a[0],c[1]=a[1]):(c[0]=0,c[1]=0);return c},createFrom:function(a,c){var b=new g(2);b[0]=a;b[1]=c;return b},add:function(a,c,b){b||(b=c);b[0]=a[0]+c[0];b[1]=a[1]+c[1];return b},subtract:function(a,c,b){b||(b=c);b[0]=a[0]-c[0];b[1]=a[1]-c[1];return b},multiply:function(a,c,b){b||(b=c);b[0]=a[0]*c[0];b[1]=a[1]*c[1];return b},divide:function(a,c,b){b||(b=c);b[0]=a[0]/c[0];b[1]=a[1]/c[1];return b},scale:function(a,c,b){b||(b=
a);b[0]=a[0]*c;b[1]=a[1]*c;return b},dist:function(a,c){var b=c[0]-a[0];a=c[1]-a[1];return Math.sqrt(b*b+a*a)},dist2:function(a,c){var b=c[0]-a[0];a=c[1]-a[1];return b*b+a*a},set:function(a,c){c[0]=a[0];c[1]=a[1];return c},set2:function(a,c,b){b[0]=a;b[1]=c;return b},negate:function(a,c){c||(c=a);c[0]=-a[0];c[1]=-a[1];return c},normalize:function(a,c){c||(c=a);var b=a[0]*a[0]+a[1]*a[1];0<b?(b=Math.sqrt(b),c[0]=a[0]/b,c[1]=a[1]/b):c[0]=c[1]=0;return c},cross:function(a,c,b){a=a[0]*c[1]-a[1]*c[0];if(!b)return a;
b[0]=b[1]=0;b[2]=a;return b},length:function(a){var c=a[0];a=a[1];return Math.sqrt(c*c+a*a)},dot:function(a,c){return a[0]*c[0]+a[1]*c[1]},direction:function(a,c,b){b||(b=a);var d=a[0]-c[0];a=a[1]-c[1];c=d*d+a*a;if(!c)return b[0]=0,b[1]=0,b[2]=0,b;c=1/Math.sqrt(c);b[0]=d*c;b[1]=a*c;return b},lerp:function(a,c,b,e){e||(e=a);e[0]=a[0]+b*(c[0]-a[0]);e[1]=a[1]+b*(c[1]-a[1]);return e},str:function(a){return"["+a[0]+", "+a[1]+"]"}};b["vec3"+p]=m;b["vec4"+p]={create:function(a){var c=new g(4);a?(c[0]=a[0],
c[1]=a[1],c[2]=a[2],c[3]=a[3]):(c[0]=0,c[1]=0,c[2]=0,c[3]=0);return c},createFrom:function(a,c,b,e){var d=new g(4);d[0]=a;d[1]=c;d[2]=b;d[3]=e;return d},add:function(a,c,b){b||(b=c);b[0]=a[0]+c[0];b[1]=a[1]+c[1];b[2]=a[2]+c[2];b[3]=a[3]+c[3];return b},subtract:function(a,c,b){b||(b=c);b[0]=a[0]-c[0];b[1]=a[1]-c[1];b[2]=a[2]-c[2];b[3]=a[3]-c[3];return b},multiply:function(a,c,b){b||(b=c);b[0]=a[0]*c[0];b[1]=a[1]*c[1];b[2]=a[2]*c[2];b[3]=a[3]*c[3];return b},divide:function(a,c,b){b||(b=c);b[0]=a[0]/
c[0];b[1]=a[1]/c[1];b[2]=a[2]/c[2];b[3]=a[3]/c[3];return b},scale:function(a,c,b){b||(b=a);b[0]=a[0]*c;b[1]=a[1]*c;b[2]=a[2]*c;b[3]=a[3]*c;return b},dot:function(a,c){return a[0]*c[0]+a[1]*c[1]+a[2]*c[2]+a[3]*c[3]},set:function(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];return c},set4:function(a,c,b,e,f){f[0]=a;f[1]=c;f[2]=b;f[3]=e;return f},negate:function(a,c){c||(c=a);c[0]=-a[0];c[1]=-a[1];c[2]=-a[2];c[3]=-a[3];return c},lerp:function(a,c,b,e){e||(e=a);e[0]=a[0]+b*(c[0]-a[0]);e[1]=a[1]+b*(c[1]-
a[1]);e[2]=a[2]+b*(c[2]-a[2]);e[3]=a[3]+b*(c[3]-a[3]);return e},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};b["mat2"+p]=t;b["mat3"+p]=u;b["mat4"+p]=z;b["quat4"+p]=v});return b})},"esri/views/3d/support/projectionUtils":function(){define("require exports ../../../geometry/Point ../../../geometry/SpatialReference ../../../geometry/support/aaBoundingRect ../lib/glMatrix ./earthUtils ./mathUtils ../webgl-engine/lib/BufferVectorMath".split(" "),function(b,g,p,f,l,m,h,c,q){function e(c,
b,d,e){2===c.length?(C[0]=c[0],C[1]=c[1],C[2]=0,c=C):c===d&&(m.vec3d.set(c,C),c=C);return a(c,b,0,d,e,0,1)}function a(a,c,b,e,f,h,g){void 0===g&&(g=1);w!==c&&(t=k(c),w=c);d!==f&&(n=k(f),d=f);g=b+3*g;if(t!==n||t===v.UNKNOWN&&!c.equals(f))if(t>v.UNKNOWN&&n>v.UNKNOWN)if(n!==v.WGS84)if(c=x[n],t!==v.WGS84)for(f=y[t];b<g;b+=3,h+=3)f(a,b,G,0),c(G,0,e,h);else for(;b<g;b+=3,h+=3)c(a,b,e,h);else for(f=y[t];b<g;b+=3,h+=3)f(a,b,e,h);else return!1;else if(e!==a||b!==h)for(;b<g;b++,h++)e[h]=a[b];return!0}function k(a){return a.wkt===
g.SphericalECEFSpatialReference.wkt?v.SPHERICAL_ECEF:a.isWGS84?v.WGS84:a.isWebMercator?v.WEBMERC:a.wkt===g.WGS84ECEFSpatialReference.wkt?v.WGS84_ECEF:v.UNKNOWN}function r(a,c,b,d){b[d++]=a[c++];b[d++]=a[c++];b[d]=a[c]}function u(a,b,d,e){var f=.4999999*Math.PI,f=c.clamp(A*a[b+1],-f,f),f=Math.sin(f);d[e++]=A*a[b]*B;d[e++]=B/2*Math.log((1+f)/(1-f));d[e]=a[b+2]}function z(a,c,b,d){var e=B+a[c+2],f=A*a[c+1];a=A*a[c];c=Math.cos(f);b[d++]=Math.cos(a)*c*e;b[d++]=Math.sin(a)*c*e;b[d]=Math.sin(f)*e}Object.defineProperty(g,
"__esModule",{value:!0});g.SphericalECEFSpatialReference=new f({wkt:'GEOCCS["Spherical geocentric",\n  DATUM["Not specified",\n    SPHEROID["Sphere",\' + earthUtils.earthRadius + \',0]],\n  PRIMEM["Greenwich",0.0,\n    AUTHORITY["EPSG","8901"]],\n  UNIT["m",1.0],\n  AXIS["Geocentric X",OTHER],\n  AXIS["Geocentric Y",EAST],\n  AXIS["Geocentric Z",NORTH]\n]'});g.WGS84ECEFSpatialReference=new f({wkt:'GEOCCS["WGS 84",\n  DATUM["WGS_1984",\n    SPHEROID["WGS 84",6378137,298.257223563,\n      AUTHORITY["EPSG","7030"]],\n    AUTHORITY["EPSG","6326"]],\n  PRIMEM["Greenwich",0,\n    AUTHORITY["EPSG","8901"]],\n  UNIT["m",1.0,\n    AUTHORITY["EPSG","9001"]],\n  AXIS["Geocentric X",OTHER],\n  AXIS["Geocentric Y",OTHER],\n  AXIS["Geocentric Z",NORTH],\n  AUTHORITY["EPSG","4978"]\n]'});
var v;(function(a){a[a.UNKNOWN=0]="UNKNOWN";a[a.SPHERICAL_ECEF=1]="SPHERICAL_ECEF";a[a.WGS84=2]="WGS84";a[a.WEBMERC=3]="WEBMERC";a[a.WGS84_ECEF=4]="WGS84_ECEF"})(v||(v={}));var w,t,d,n;g.vectorToVector=e;g.pointToVector=function(c,b,d){C[0]=c.x;C[1]=c.y;var e=c.z;C[2]=void 0!==e?e:0;return a(C,c.spatialReference,0,b,d,0,1)};g.vectorToPoint=function(c,b,d,e){"esri.geometry.SpatialReference"===d.declaredClass?(e=d,d=new p({spatialReference:e})):e=e||d.spatialReference;return a(c,b,0,C,e,0,1)?(d.x=C[0],
d.y=C[1],d.z=C[2],d.spatialReference=e,d):null};g.xyzToVector=function(c,b,d,e,f,k){C[0]=c;C[1]=b;C[2]=d;return a(C,e,0,f,k,0,1)};g.bufferToBuffer=a;g.computeLinearTransformation=function(a,c,b,d){var e=k(a),f=k(d);if(e===f&&f!==v.SPHERICAL_ECEF&&(e!==v.UNKNOWN||a.equals(d)))return m.mat4d.identity(b),m.mat4d.translate(b,c),!0;if(f===v.SPHERICAL_ECEF){if(a=y[e])return a(c,0,G,0),z(G,0,ba,0),d=A*G[0],a=A*G[1],c=Math.sin(d),d=Math.cos(d),e=Math.sin(a),a=Math.cos(a),b[0]=-c,b[4]=-e*d,b[8]=a*d,b[12]=
ba[0],b[1]=d,b[5]=-e*c,b[9]=a*c,b[13]=ba[1],b[2]=0,b[6]=a,b[10]=e,b[14]=ba[2],b[3]=0,b[7]=0,b[11]=0,b[15]=1,!0}else if(f===v.WEBMERC&&(e===v.WGS84||e===v.SPHERICAL_ECEF))return y[e](c,0,G,0),c=A*G[1],u(G,0,ba,0),m.mat4d.identity(b),m.mat4d.translate(b,ba),c=1/Math.cos(c),m.mat4d.scale(b,[c,c,1]),!0;return!1};g.transformDirection=function(a,c,b,d,f){m.vec3d.set(a,Z);m.vec3d.add(a,c,V);e(Z,b,Z,f);e(V,b,V,f);m.vec3d.subtract(V,Z,d);m.vec3d.normalize(d)};g.mbsToMbs=function(a,c,b,d){var e=k(c),f=k(d);
if(e===f&&(e!==v.UNKNOWN||c.equals(d)))return b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],!0;if(f===v.SPHERICAL_ECEF){if(c=y[e])return c(a,0,G,0),z(G,0,b,0),b[3]=a[3],!0}else if(f===v.WEBMERC&&(e===v.WGS84||e===v.SPHERICAL_ECEF))return y[e](a,0,G,0),c=Math.abs(A*G[1])+Math.asin(a[3]/(B+a[2])),u(G,0,b,0),b[3]=c>.9999*Math.PI?Number.MAX_VALUE:1/Math.cos(c)*a[3],!0;return!1};g.extentToBoundingBox=function(c,b,d){if(null==c)return!1;var e;C[0]=null!=c.xmin?c.xmin:0;C[1]=null!=c.ymin?c.ymin:0;C[2]=null!=c.zmin?
c.zmin:0;e=a(C,c.spatialReference,0,b,d,0,1);C[0]=null!=c.xmax?c.xmax:0;C[1]=null!=c.ymax?c.ymax:0;C[2]=null!=c.zmax?c.zmax:0;e=e&&a(C,c.spatialReference,0,b,d,3,1);null==c.xmin&&(b[0]=-Infinity);null==c.ymin&&(b[1]=-Infinity);null==c.zmin&&(b[2]=-Infinity);null==c.xmax&&(b[3]=Infinity);null==c.ymax&&(b[4]=Infinity);null==c.zmax&&(b[5]=Infinity);return e};g.extentToBoundingRect=function(c,b,d){if(null==c)return!1;var e;C[0]=null!=c.xmin?c.xmin:0;C[1]=null!=c.ymin?c.ymin:0;C[2]=null!=c.zmin?c.zmin:
0;e=a(C,c.spatialReference,0,C,d,0,1);b[0]=C[0];b[1]=C[1];C[0]=null!=c.xmax?c.xmax:0;C[1]=null!=c.ymax?c.ymax:0;C[2]=null!=c.zmax?c.zmax:0;e=e&&a(C,c.spatialReference,0,C,d,0,1);b[2]=C[0];b[3]=C[1];null==c.xmin&&(b[0]=-Infinity);null==c.ymin&&(b[1]=-Infinity);null==c.xmax&&(b[2]=Infinity);null==c.ymax&&(b[3]=Infinity);return e};g.boundingRectToBoundingRect=function(c,b,d,e){if(null==c)return!1;if(b.equals(e))return l.set(d,c),!0;var f;C[0]=c[0];C[1]=c[1];C[2]=0;f=a(C,b,0,C,e,0,1);d[0]=C[0];d[1]=C[1];
C[0]=c[2];C[1]=c[3];C[2]=0;f=f&&a(C,b,0,C,e,0,1);d[2]=C[0];d[3]=C[1];return f};(function(a){a.x2lon=function(a){return a/B};a.y2lat=function(a){return Math.PI/2-2*Math.atan(Math.exp(-1*a/B))};a.lon2x=function(a){return a*B};a.lat2y=function(a){a=Math.sin(a);return B/2*Math.log((1+a)/(1-a))}})(g.webMercator||(g.webMercator={}));var x=[void 0,z,r,u,function(a,c,b,d){var e=F,f=A*a[c],k=A*a[c+1];a=a[c+2];c=Math.sin(k);var k=Math.cos(k),n=e.a/Math.sqrt(1-e.e2*c*c);b[d++]=(n+a)*k*Math.cos(f);b[d++]=(n+
a)*k*Math.sin(f);b[d++]=(n*(1-e.e2)+a)*c}],y=[void 0,function(a,b,d,e){var f=q.Vec3Compact.length(a,b),k=c.asin(a[b+2]/f);a=(0<a[b+1]?1:-1)*c.acos(a[b]/(Math.cos(k)*f));d[e++]=D*a;d[e++]=D*k;d[e]=f-B},r,function(a,c,b,d){b[d++]=D*(a[c++]/B);b[d++]=D*(Math.PI/2-2*Math.atan(Math.exp(-1*a[c++]/B)));b[d]=a[c]},function(a,c,b,d){var e=F,f=a[c],k=a[c+1];a=a[c+2];var n,h,g,r,l,m;c=Math.abs(a);n=f*f+k*k;h=Math.sqrt(n);g=n+a*a;r=Math.sqrt(g);f=Math.atan2(k,f);l=a*a/g;g=n/g;k=e.a2/r;n=e.a3-e.a4/r;.3<g?(l=c/
r*(1+g*(e.a1+k+l*n)/r),r=Math.asin(l),k=l*l,g=Math.sqrt(1-k)):(g=h/r*(1-l*(e.a5-k-g*n)/r),r=Math.acos(g),k=1-g*g,l=Math.sqrt(k));m=1-e.e2*k;k=e.a/Math.sqrt(m);e=e.a6*k;k=h-k*g;n=c-e*l;c=g*k+l*n;h=g*n-l*k;e=h/(e/m+c);r+=e;0>a&&(r=-r);b[d++]=D*f;b[d++]=D*r;b[d]=c+h*e/2}],A=c.deg2rad(1),D=c.rad2deg(1),B=h.earthRadius,F={a:6378137,e2:.006694379990137799,a1:42697.67270715754,a2:1.8230912546075456E9,a3:142.91722289812412,a4:4.557728136518864E9,a5:42840.589930055656,a6:.9933056200098622},C=m.vec3d.create(),
G=m.vec3d.create(),ba=m.vec3d.create(),Z=m.vec3d.create(),V=m.vec3d.create()})},"esri/geometry/support/aaBoundingRect":function(){define(["require","exports","../../geometry"],function(b,g,p){function f(c){void 0===c&&(c=g.ZERO);return[c[0],c[1],c[2],c[3]]}function l(c){return c[0]>=c[2]?0:c[2]-c[0]}function m(c){return c[1]>=c[3]?0:c[3]-c[1]}function h(c,a){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];return c}function c(c){return 4===c.length}function q(c,a,b){return c<a?a:c>b?b:c}Object.defineProperty(g,
"__esModule",{value:!0});g.create=f;g.clone=function(c){return[c[0],c[1],c[2],c[3]]};g.fromValues=function(c,a,b,h,g){void 0===g&&(g=f());g[0]=c;g[1]=a;g[2]=b;g[3]=h;return g};g.fromExtent=function(c,a){void 0===a&&(a=f());a[0]=c.xmin;a[1]=c.ymin;a[2]=c.xmax;a[3]=c.ymax;return a};g.toExtent=function(c,a){return new p.Extent({xmin:c[0],ymin:c[1],xmax:c[2],ymax:c[3],spatialReference:a})};g.expandPointInPlace=function(c,a){a[0]<c[0]&&(c[0]=a[0]);a[0]>c[2]&&(c[2]=a[0]);a[1]<c[1]&&(c[1]=a[1]);a[1]>c[3]&&
(c[3]=a[1])};g.expand=function(b,a,f){void 0===f&&(f=b);if("length"in a)if(c(a))f[0]=Math.min(b[0],a[0]),f[1]=Math.min(b[1],a[1]),f[2]=Math.max(b[2],a[2]),f[3]=Math.max(b[3],a[3]);else{if(2===a.length||3===a.length)f[0]=Math.min(b[0],a[0]),f[1]=Math.min(b[1],a[1]),f[2]=Math.max(b[2],a[0]),f[3]=Math.max(b[3],a[1])}else switch(a.type){case "extent":f[0]=Math.min(b[0],a.xmin);f[1]=Math.min(b[1],a.ymin);f[2]=Math.max(b[2],a.xmax);f[3]=Math.max(b[3],a.ymax);break;case "point":f[0]=Math.min(b[0],a.x),f[1]=
Math.min(b[1],a.y),f[2]=Math.max(b[2],a.x),f[3]=Math.max(b[3],a.y)}return f};g.expandWithNestedArray=function(c,a,b){void 0===b&&(b=c);var e=a.length,f=c[0],k=c[1],h=c[2];c=c[3];for(var g=0;g<e;g++){var l=a[g],f=Math.min(f,l[0]),k=Math.min(k,l[1]),h=Math.max(h,l[0]);c=Math.max(c,l[1])}b[0]=f;b[1]=k;b[2]=h;b[3]=c;return b};g.allFinite=function(c){for(var a=0;4>a;a++)if(!isFinite(c[a]))return!1;return!0};g.width=l;g.height=m;g.diameter=function(c){var a=l(c);c=m(c);return Math.sqrt(a*a+c*c)};g.area=
function(c){return l(c)*m(c)};g.center=function(c,a){void 0===a&&(a=[0,0]);a[0]=c[0]+l(c)/2;a[1]=c[1]+m(c)/2;return a};g.containsPoint=function(c,a){return a[0]>=c[0]&&a[1]>=c[1]&&a[0]<=c[2]&&a[1]<=c[3]};g.containsPointWithMargin=function(c,a,b){return a[0]>=c[0]-b&&a[1]>=c[1]-b&&a[0]<=c[2]+b&&a[1]<=c[3]+b};g.intersects=function(c,a){return Math.max(a[0],c[0])<=Math.min(a[2],c[2])&&Math.max(a[1],c[1])<=Math.min(a[3],c[3])};g.contains=function(c,a){return a[0]>=c[0]&&a[2]<=c[2]&&a[1]>=c[1]&&a[3]<=
c[3]};g.intersection=function(c,a,b){void 0===b&&(b=c);var e=a[0],f=a[1],k=a[2];a=a[3];b[0]=q(c[0],e,k);b[1]=q(c[1],f,a);b[2]=q(c[2],e,k);b[3]=q(c[3],f,a);return b};g.distance=function(c,a){var b=(c[1]+c[3])/2,e=Math.max(Math.abs(a[0]-(c[0]+c[2])/2)-l(c)/2,0);c=Math.max(Math.abs(a[1]-b)-m(c)/2,0);return Math.sqrt(e*e+c*c)};g.offset=function(c,a,b,f){void 0===f&&(f=c);f[0]=c[0]+a;f[1]=c[1]+b;f[2]=c[2]+a;f[3]=c[3]+b;return f};g.pad=function(c,a,b){void 0===b&&(b=c);b[0]=c[0]-a;b[1]=c[1]-a;b[2]=c[2]+
a;b[3]=c[3]+a;return b};g.setMin=function(c,a,b){void 0===b&&(b=c);b[0]=a[0];b[1]=a[1];b!==c&&(b[2]=c[2],b[3]=c[3]);return b};g.setMax=function(c,a,b){void 0===b&&(b=c);b[2]=a[0];b[3]=a[1];b!==c&&(b[0]=c[0],b[1]=c[1]);return c};g.set=h;g.empty=function(c){return c?h(c,g.NEGATIVE_INFINITY):f(g.NEGATIVE_INFINITY)};g.is=c;g.isPoint=function(c){return(0===l(c)||!isFinite(c[0]))&&(0===m(c)||!isFinite(c[1]))};g.equals=function(b,a,f){if(null==b||null==a)return b===a;if(!c(b)||!c(a))return!1;if(f)for(var e=
0;e<b.length;e++){if(!f(b[e],a[e]))return!1}else for(e=0;e<b.length;e++)if(b[e]!==a[e])return!1;return!0};g.POSITIVE_INFINITY=[-Infinity,-Infinity,Infinity,Infinity];g.NEGATIVE_INFINITY=[Infinity,Infinity,-Infinity,-Infinity];g.ZERO=[0,0,0,0]})},"esri/views/3d/support/earthUtils":function(){define("require exports ../../../geometry/Point ../../../geometry/SpatialReference ../../../geometry/support/webMercatorUtils ../lib/glMatrix ./mathUtils".split(" "),function(b,g,p,f,l,m,h){function c(a,c,b,e){var f,
k;a instanceof p&&c instanceof p&&(b=c.longitude,e=c.latitude,k=a.latitude,f=a.longitude);a=h.deg2rad(k);e=h.deg2rad(e);f=h.deg2rad(f);c=h.deg2rad(b);b=Math.sin((a-e)/2);f=Math.sin((f-c)/2);b=2*h.asin(Math.sqrt(b*b+Math.cos(a)*Math.cos(e)*f*f))*g.earthRadius;return Math.round(1E4*b)/1E4}function q(a,c,b){a=b/g.earthRadius;c=h.deg2rad(c);a=Math.sin(a/2);c=Math.cos(c);c=2*h.asin(Math.sqrt(a*a/(c*c)));return h.rad2deg(c)}function e(a,c,b){return h.rad2deg(b/g.earthRadius)}function a(a,c){a/=15;c||(a=
Math.round(a));return a}Object.defineProperty(g,"__esModule",{value:!0});g.wgs84Radius=6378137;g.wgs84InverseFlattening=298.257223563;g.wgs84Flattening=1/g.wgs84InverseFlattening;g.wgs84PolarRadius=g.wgs84Radius*(1-g.wgs84Flattening);g.wgs84Eccentricity=.0818191908426215;g.earthRadius=g.wgs84Radius;g.halfEarthCircumference=Math.PI*g.earthRadius;g.earthCircumference=2*g.halfEarthCircumference;g.metersPerDegree=g.halfEarthCircumference/180;var k=new p(0,0,f.WGS84);g.getGreatCircleDistance=c;g.getGreatCircleSpanAt=
function(a,b,e){var f=b.spatialReference,k=new p(b.x,a.y,f),h=new p(e.x,a.y,f);b=new p(a.x,b.y,f);a=new p(a.x,e.y,f);return{lon:c(k,h),lat:c(b,a)}};g.getLonDeltaForDistance=q;g.getLatDeltaForDistance=e;g.getLatLonDeltaForDistance=function(a,c,b){return{lat:e(a,c,b),lon:q(a,c,b)}};g.getMaxCameraAltitude=function(a){a=h.deg2rad(a/2);return(1-Math.sin(a))*g.earthRadius/Math.sin(a)};g.getViewExtentDistance=function(a,c){c=h.deg2rad(c/2);return 2*h.acos((Math.pow(a+g.earthRadius,2)+Math.pow(g.earthRadius,
2)-Math.pow((a+g.earthRadius)*Math.cos(c)-Math.sqrt(Math.pow(Math.cos(c)*(a+g.earthRadius),2)-a*a-2*a*g.earthRadius),2))/(2*(a+g.earthRadius)*g.earthRadius))*g.earthRadius};g.computeCarthesianDistance=function(a,c){function b(a){var c=h.deg2rad(a.latitude),b=h.deg2rad(a.longitude),d=Math.cos(c);a=g.earthRadius+(a.z||0);return[Math.cos(b)*d*a,Math.sin(c)*a,-Math.sin(b)*d*a]}a=b(a);c=b(c);c=[c[0]-a[0],c[1]-a[1],c[2]-a[2]];return Math.sqrt(c[0]*c[0]+c[1]*c[1]+c[2]*c[2])};g.longitudeToTimezone=a;g.positionToTimezone=
function(c,b){c.spatialReference.wkid!==f.WGS84.wkid?l.webMercatorToGeographic(c,!1,k):(k.x=c.x,k.y=c.y);k.z=c.z;b||(b={hours:0,minutes:0,seconds:0});b.hours=a(k.x,!0);c=b.hours%1;b.hours-=c;b.minutes=60*c;c=b.minutes%1;b.minutes-=c;b.seconds=Math.round(60*c);return b};g.distanceToIdealHorizon=function(a,c){c=c||g.earthRadius;a=m.vec3d.dot(a,a);return Math.sqrt(Math.abs(a-c*c))}})},"esri/views/3d/support/mathUtils":function(){define(["require","exports","../lib/glMatrix"],function(b,g,p){function f(a){return Math.asin(1<
a?1:-1>a?-1:a)}function l(a){return Math.acos(1<a?1:-1>a?-1:a)}function m(a,c,b){return a<c?c:a>b?b:a}function h(a){for(var c in a){var b=a[c];b instanceof Function&&(a[c]=b.bind(a))}return a}Object.defineProperty(g,"__esModule",{value:!0});g.deg2rad=function(a){return a*Math.PI/180};g.rad2deg=function(a){return 180*a/Math.PI};g.asin=f;g.acos=l;g.sign=Math.sign||function(a){return+(0<a)-+(0>a)||+a};g.log2=Math.log2||function(a){return Math.log(a)/Math.LN2};g.fovx2fovy=function(a,c,b){return 2*Math.atan(b*
Math.tan(.5*a)/c)};g.fovy2fovx=function(a,c,b){return 2*Math.atan(c*Math.tan(.5*a)/b)};g.makeOrthonormal=function(a,c,b){b=b||a;var e=p.vec3d.dot(a,c);p.vec3d.set3(a[0]-e*c[0],a[1]-e*c[1],a[2]-e*c[2],b);p.vec3d.normalize(b)};g.tangentFrame=function(a,c,b){Math.abs(a[0])>Math.abs(a[1])?p.vec3d.set3(0,1,0,c):p.vec3d.set3(1,0,0,c);p.vec3d.cross(a,c,b);p.vec3d.normalize(c);p.vec3d.cross(b,a,c);p.vec3d.normalize(b)};g.cartesianToSpherical=function(a,c){var b=p.vec3d.length(a),e=f(a[2]/b);p.vec3d.set3(b,
e,Math.atan2(a[1]/b,a[0]/b),c)};g.sphericalToCartesian=function(a,c){var b=a[0],e=a[1];a=a[2];var f=Math.cos(e);p.vec3d.set3(b*f*Math.cos(a),b*f*Math.sin(a),b*Math.sin(e),c)};g.lerp=function(a,c,b){return a+(c-a)*b};g.bilerp=function(a,c,b,e,f,h){a+=(c-a)*f;return a+(b+(e-b)*f-a)*h};g.slerp=function(a,c,b,f){void 0===f&&(f=a);var k=p.vec3d.length(a),h=p.vec3d.length(c),g=p.vec3d.dot(a,c)/(k*h);if(.9999999999999999>g){var g=Math.acos(g),l=((1-b)*k+b*h)/Math.sin(g),h=l/h*Math.sin(b*g);p.vec3d.scale(a,
l/k*Math.sin((1-b)*g),q);p.vec3d.scale(c,h,e);return p.vec3d.add(q,e,f)}return p.vec3d.lerp(a,c,b,f)};g.angle=function(a,b,f){a=p.vec3d.normalize(a,q);b=p.vec3d.normalize(b,e);var k=l(p.vec3d.dot(a,b));return f&&(a=p.vec3d.cross(a,b,c),0>p.vec3d.dot(a,f))?-k:k};g.clamp=m;g.isFinite=Number.isFinite||function(a){return"number"===typeof a&&window.isFinite(a)};g.isNaN=Number.isNaN||function(a){return a!==a};g.makePiecewiseLinearFunction=function(a){var c=a.length;return function(b){var e=0;if(b<=a[0][0])return a[0][1];
if(b>=a[c-1][0])return a[c-1][1];for(;b>a[e][0];)e++;var f=a[e][0];b=(f-b)/(f-a[e-1][0]);return b*a[e-1][1]+(1-b)*a[e][1]}};g.vectorEquals=function(a,c){if(null==a||null==c)return a!==c;if(a.length!==c.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!==c[b])return!1;return!0};g.floatEqualRelative=function(a,c,b){void 0===b&&(b=1E-6);if(g.isNaN(a)||g.isNaN(c))return!1;if(a===c)return!0;var e=Math.abs(a-c),f=Math.abs(a),k=Math.abs(c);if(0===a||0===c||1E-12>f&&1E-12>k){if(e>.01*b)return!1}else if(e/
(f+k)>b)return!1;return!0};g.floatEqualAbsolute=function(a,c,b){void 0===b&&(b=1E-6);return g.isNaN(a)||g.isNaN(c)?!1:(a>c?a-c:c-a)<=b};b=function(){function a(a,c){this.min=a;this.max=c;this.range=c-a}a.prototype.ndiff=function(a,c){void 0===c&&(c=0);return Math.ceil((a-c)/this.range)*this.range+c};a.prototype._normalize=function(a,c,b,e){void 0===e&&(e=0);b-=e;b<a?b+=this.ndiff(a-b):b>c&&(b-=this.ndiff(b-c));return b+e};a.prototype.normalize=function(a,c){return this._normalize(this.min,this.max,
a,c)};a.prototype.clamp=function(a,c){void 0===c&&(c=0);return m(a-c,this.min,this.max)+c};a.prototype.monotonic=function(a,c,b){return a<c?c:c+this.ndiff(a-c,b)};a.prototype.minimalMonotonic=function(a,c,b){return this._normalize(a,a+this.range,c,b)};a.prototype.center=function(a,c,b){c=this.monotonic(a,c,b);return this.normalize((a+c)/2,b)};a.prototype.diff=function(a,c,b){return this.monotonic(a,c,b)-a};a.prototype.contains=function(a,c,b){c=this.minimalMonotonic(a,c);b=this.minimalMonotonic(a,
b);return b>a&&b<c};return a}();g.Cyclical=b;g.cyclical2PI=h(new b(0,2*Math.PI));g.cyclicalPI=h(new b(-Math.PI,Math.PI));g.cyclicalDeg=h(new b(0,360));var c=p.vec3d.create(),q=p.vec3d.create(),e=p.vec3d.create()})},"esri/views/3d/webgl-engine/lib/BufferVectorMath":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});(function(b){b.length=function(b,g){var f=b[g],h=b[g+1];b=b[g+2];return Math.sqrt(f*f+h*h+b*b)};b.normalize=function(b,g){var f=b[g],
h=b[g+1],c=b[g+2],f=1/Math.sqrt(f*f+h*h+c*c);b[g]*=f;b[g+1]*=f;b[g+2]*=f};b.scale=function(b,g,m){b[g]*=m;b[g+1]*=m;b[g+2]*=m};b.add=function(b,g,m,h,c,q){void 0===q&&(q=g);c=c||b;c[q]=b[g]+m[h];c[q+1]=b[g+1]+m[h+1];c[q+2]=b[g+2]+m[h+2]};b.subtract=function(b,g,m,h,c,q){void 0===q&&(q=g);c=c||b;c[q]=b[g]-m[h];c[q+1]=b[g+1]-m[h+1];c[q+2]=b[g+2]-m[h+2]}})(g.Vec3Compact||(g.Vec3Compact={}))})},"esri/geometry/support/meshUtils/offset":function(){define(["require","exports","./projection","../../../views/3d/lib/glMatrix",
"../../../views/3d/support/projectionUtils"],function(b,g,p,f,l){function m(c,a){if(c)for(var b=0;b<c.length;b+=3)for(var e=0;3>e;e++)c[b+e]+=a[e]}Object.defineProperty(g,"__esModule",{value:!0});g.offset=function(b,a,k){if(b.vertexAttributes&&b.vertexAttributes.position){var e=b.spatialReference;if(e.isWGS84||e.isWebMercator&&(!k||!1!==k.geographic)){k=b.spatialReference;var e=b.vertexAttributes.position,g=b.vertexAttributes.normal,z=new Float64Array(e.length),v=new Float32Array(g?g.length:0),w=
b.extent.center,t=h;l.computeLinearTransformation(k,[w.x,w.y,w.z],c,l.SphericalECEFSpatialReference);f.mat4d.toMat3(c,q);f.mat3d.multiplyVec3(q,a,t);p.projectToECEF(e,k,z);g&&p.projectNormalToECEF(g,e,z,k,v);m(z,t);p.projectFromECEF(z,e,k);g&&p.projectNormalFromECEF(v,e,z,k,g)}else m(b.vertexAttributes.position,a);b.clearCache()}};var h=f.vec3d.create(),c=f.mat4d.create(),q=f.mat3d.create()})},"esri/geometry/support/meshUtils/primitives":function(){define(["require","exports","../../../geometry",
"./georeference","../../../views/3d/lib/glMatrix"],function(b,g,p,f,l){Object.defineProperty(g,"__esModule",{value:!0});g.createUnitSizeBox=function(){for(var c=h.faceDescriptions,a=h.faceVertexOffsets,b=h.uvScales,f=4*c.length,g=new Float64Array(3*f),l=new Float32Array(3*f),f=new Float32Array(2*f),m=new Uint32Array(6*c.length),q=0,t=0,d=0,n=0,x=0;x<c.length;x++){for(var p=c[x],A=q/3,D=0,B=a;D<B.length;D++){var F=B[D];m[n++]=A+F}A=p.corners;for(D=0;4>D;D++){B=A[D];F=0;f[d++]=.25*b[D][0]+p.uvOrigin[0];
f[d++]=p.uvOrigin[1]-.25*b[D][1];for(var C=0;3>C;C++)0!==p.axis[C]?(g[q++]=.5*p.axis[C],l[t++]=p.axis[C]):(g[q++]=.5*B[F++],l[t++]=0)}}return{position:g,normal:l,uv:f,faces:m}};g.createUnitSizeSphere=function(b){void 0===b&&(b=0);b=Math.round(8*Math.pow(2,b));for(var a=2*b,e=(b-1)*(a+1)+2*a,f=new Float64Array(3*e),h=new Float32Array(3*e),e=new Float32Array(2*e),g=new Uint32Array((b-1)*a*6),l=0,m=0,q=0,d=0,n=0,p=0;p<=b;p++){var y=p/b*Math.PI+.5*Math.PI,A=Math.cos(y);c[2]=Math.sin(y);for(var D=(y=0===
p||p===b)?a-1:a,B=0;B<=D;B++){var F=B/D*2*Math.PI;c[0]=-Math.sin(F)*A;c[1]=Math.cos(F)*A;for(F=0;3>F;F++)f[l++]=.5*c[F],h[m++]=c[F];e[q++]=(B+(y?.5:0))/a;e[q++]=p/b;0!==p&&B!==a&&(p!==b&&(g[d++]=n,g[d++]=n+1,g[d++]=n-a),1!==p&&(g[d++]=n,g[d++]=n-a,g[d++]=n-a-1));n++}}return{position:f,normal:h,uv:e,faces:g}};g.createUnitSizeCylinder=function(b){void 0===b&&(b=0);b=Math.round(16*Math.pow(2,b));for(var a=4*(b+1)+2*b,e=new Float64Array(3*a),f=new Float32Array(3*a),a=new Float32Array(2*a),h=new Uint32Array(12*
b),g=0,l=0,m=0,q=0,d=0,n=0;5>=n;n++)for(var p=0===n||5===n,y=1>=n||4<=n,A=2===n||4===n,D=p?b-1:b,B=0;B<=D;B++){var F=B/D*2*Math.PI,C=p?0:.5;c[0]=C*Math.sin(F);c[1]=C*-Math.cos(F);c[2]=2>=n?.5:-.5;for(F=0;3>F;F++)e[g++]=c[F],y?f[l++]=2===F?1>=n?1:-1:0:f[l++]=2===F?0:c[F]/C;a[m++]=(B+(p?.5:0))/b;1>=n?a[m++]=1*n/3:3>=n?a[m++]=1*(n-2)/3+1/3:a[m++]=1*(n-4)/3+2/3;A||0===n||B===b||(5!==n&&(h[q++]=d,h[q++]=d+1,h[q++]=d-b),1!==n&&(h[q++]=d,h[q++]=d-b,h[q++]=d-b-1));d++}return{position:e,normal:f,uv:a,faces:h}};
g.createUnitSizePlane=function(c){c=m.facingAxisOrderSwap[c];for(var a=m.position,b=m.normal,e=new Float64Array(a.length),f=new Float32Array(b.length),h=0,g=0;4>g;g++)for(var l=h,q=0;3>q;q++){var d=c[q],n=Math.abs(d)-1,d=0<=d?1:-1;e[h]=a[l+n]*d;f[h]=b[l+n]*d;h++}return{position:e,normal:f,uv:new Float32Array(m.uv),faces:new Uint32Array(m.faces)}};var m={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,
1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};g.convertUnitGeometry=function(b,a,k){for(var e=0;e<b.position.length;e+=3)b.position[e+2]+=.5;e=k&&k.size;if(null!=e){e="number"===typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];q[0]=e[0];q[4]=e[1];q[8]=e[2];for(var h=0;h<b.position.length;h+=3){for(var g=0;3>g;g++)c[g]=b.position[h+g];l.mat3d.multiplyVec3(q,c);for(g=0;3>g;g++)b.position[h+g]=c[g]}if(e[0]!==e[1]||e[1]!==e[2])for(q[0]=
1/e[0],q[4]=1/e[1],q[8]=1/e[2],h=0;h<b.normal.length;h+=3){for(g=0;3>g;g++)c[g]=b.normal[h+g];l.mat3d.multiplyVec3(q,c);l.vec3d.normalize(c);for(g=0;3>g;g++)b.normal[h+g]=c[g]}}e=f.georeference(b,a,k);return new p.Mesh({vertexAttributes:{position:e.position,normal:e.normal,uv:b.uv},components:[{faces:b.faces,material:k&&k.material||null}],spatialReference:a.spatialReference})};var h={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,
.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]};g.boxFaceOrder={south:0,east:1,north:2,west:3,up:4,down:5};var c=l.vec3d.create(),q=l.mat3d.identity()})},
"esri/geometry/support/meshUtils/georeference":function(){define(["require","exports","../../../views/3d/lib/glMatrix","../../../views/3d/support/projectionUtils"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.georeference=function(b,c,g){var e=c.spatialReference;if(e.isWGS84||e.isWebMercator&&(!g||!1!==g.geographic)){g=c.spatialReference;f.computeLinearTransformation(c.spatialReference,[c.x,c.y,c.z||0],l,f.SphericalECEFSpatialReference);var e=b.position,a=l,k=c.spatialReference,
h=new Float64Array(e.length);for(c=0;c<e.length;c+=3){for(var q=0;3>q;q++)m[q]=e[c+q];p.mat4d.multiplyVec3(a,m);for(q=0;3>q;q++)h[c+q]=m[q]}c=new Float64Array(e.length);f.bufferToBuffer(h,f.SphericalECEFSpatialReference,0,c,k,0,h.length/3);b=b.normal;if(g.isWebMercator&&b){g=new Float32Array(b.length);for(e=0;e<b.length;e+=3)for(a=f.webMercator.y2lat(c[e+1]),a=Math.cos(a),m[0]=b[e+0]*a,m[1]=b[e+1]*a,m[2]=b[e+2],p.vec3d.normalize(m),a=0;3>a;a++)g[e+a]=m[a];b=g}b={position:c,normal:b}}else{g=new Float64Array(b.position.length);
e=b.position;for(a=0;a<e.length;a+=3)g[a+0]=e[a+0]+c.x,g[a+1]=e[a+1]+c.y,g[a+2]=e[a+2]+(c.z||0);b={position:g,normal:b.normal}}return b};var l=p.mat4d.create(),m=p.vec3d.create()})},"esri/geometry/support/meshUtils/rotate":function(){define("require exports ../../../core/Logger ./projection ../../../views/3d/lib/glMatrix ../../../views/3d/support/projectionUtils".split(" "),function(b,g,p,f,l,m){function h(a,c,b){void 0===b&&(b=z);if(a)for(l.mat4d.identity(r),l.mat4d.rotate(r,c[3],c),c=0;c<a.length;c+=
3){for(var d=0;3>d;d++)q[d]=a[c+d]-b[d];l.mat4d.multiplyVec3(r,q);for(d=0;3>d;d++)a[c+d]=q[d]+b[d]}}Object.defineProperty(g,"__esModule",{value:!0});var c=p.getLogger("esri.geometry.support.meshUtils.rotate");g.rotate=function(a,b,d){if(a.vertexAttributes&&a.vertexAttributes.position&&0!==b[3]){var k=a.spatialReference,g=d&&d.origin||a.extent.center;if(k.isWGS84||k.isWebMercator&&(!d||!1!==d.geographic)){d=a.spatialReference;k=v;m.pointToVector(g,k,m.SphericalECEFSpatialReference)||m.pointToVector(a.extent.center,
k,m.SphericalECEFSpatialReference);var g=a.vertexAttributes.position,q=a.vertexAttributes.normal,t=new Float64Array(g.length),p=new Float32Array(q?q.length:0);m.computeLinearTransformation(m.SphericalECEFSpatialReference,k,r,m.SphericalECEFSpatialReference);l.mat4d.toMat3(r,u);var z=l.mat3d.multiplyVec3(u,b,e);z[3]=b[3];f.projectToECEF(g,d,t);q&&f.projectNormalToECEF(q,g,t,d,p);h(t,z,k);f.projectFromECEF(t,g,d);q&&(h(p,z),f.projectNormalFromECEF(p,g,t,d,q))}else d=v,m.pointToVector(g,d,a.spatialReference)||
(k=a.extent.center,d[0]=k.x,d[1]=k.y,d[2]=k.z,c.error("Failed to project specified origin (wkid:"+g.spatialReference.wkid+") to mesh spatial reference (wkid:"+a.spatialReference.wkid+"). Using mesh extent.center instead")),h(a.vertexAttributes.position,b,d),h(a.vertexAttributes.normal,b);a.clearCache()}};g.axisAngleFrom=function(a,c,b){l.vec3d.set(a,b);b[3]=c;return b};g.axisAngleMultiply=function(c,b,d){l.quat4d.fromAngleAxis(c[3],c,a);l.quat4d.fromAngleAxis(b[3],b,k);l.quat4d.multiply(k,a,a);l.quat4d.toAngleAxis(a,
d);return d};var q=l.vec3d.create(),e=l.vec4d.create(),a=l.quat4d.create(),k=l.quat4d.create(),r=l.mat4d.create(),u=l.mat3d.create(),z=[0,0,0],v=[0,0,0]})},"esri/geometry/Multipoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./support/zmUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e){function a(a){return function(c,b){return null==c?b:null==b?c:a(c,b)}}b=function(c){function b(){for(var a=
0;a<arguments.length;a++);a=c.call(this)||this;a.points=[];a.type="multipoint";return a}p(b,c);k=b;b.prototype.normalizeCtorArgs=function(a,c){if(!a&&!c)return null;var b={};Array.isArray(a)?(b.points=a,b.spatialReference=c):!a||"esri.geometry.SpatialReference"!==a.declaredClass&&null==a.wkid?(a.points&&(b.points=a.points),a.spatialReference&&(b.spatialReference=a.spatialReference),a.hasZ&&(b.hasZ=a.hasZ),a.hasM&&(b.hasM=a.hasM)):b.spatialReference=a;if(a=b.points&&b.points[0])void 0===b.hasZ&&void 0===
b.hasM?(b.hasZ=2<a.length,b.hasM=!1):void 0===b.hasZ?b.hasZ=3<a.length:void 0===b.hasM&&(b.hasM=3<a.length);return b};Object.defineProperty(b.prototype,"extent",{get:function(){var c=this.points;if(!c.length)return null;for(var b=new h,e=this.hasZ,f=this.hasM,d=e?3:2,k=c[0],g=a(Math.min),l=a(Math.max),q=k[0],m=k[1],r=k[0],k=k[1],u,p,G,ba,Z=0,V=c.length;Z<V;Z++){var I=c[Z],fa=I[0],M=I[1],q=g(q,fa),m=g(m,M),r=l(r,fa),k=l(k,M);e&&2<I.length&&(fa=I[2],u=g(u,fa),G=l(G,fa));f&&I.length>d&&(I=I[d],p=g(p,
I),ba=l(ba,I))}b.xmin=q;b.ymin=m;b.xmax=r;b.ymax=k;b.spatialReference=this.spatialReference;e?(b.zmin=u,b.zmax=G):(b.zmin=null,b.zmax=null);f?(b.mmin=p,b.mmax=ba):(b.mmin=null,b.mmax=null);return b},enumerable:!0,configurable:!0});b.prototype.writePoints=function(a,c,b,e){c.points=l.clone(this.points)};b.prototype.addPoint=function(a){this.clearCache();e.updateSupportFromPoint(this,a);Array.isArray(a)?this.points.push(a):this.points.push(a.toArray());return this};b.prototype.clone=function(){var a=
{points:l.clone(this.points),spatialReference:this.spatialReference};this.hasZ&&(a.hasZ=!0);this.hasM&&(a.hasM=!0);return new k(a)};b.prototype.getPoint=function(a){if(!this._validateInputs(a))return null;a=this.points[a];var c={x:a[0],y:a[1],spatialReference:this.spatialReference},b=2;this.hasZ&&(c.z=a[2],b=3);this.hasM&&(c.m=a[b]);return new q(c)};b.prototype.removePoint=function(a){if(!this._validateInputs(a))return null;this.clearCache();return new q(this.points.splice(a,1)[0],this.spatialReference)};
b.prototype.setPoint=function(a,c){if(!this._validateInputs(a))return this;this.clearCache();e.updateSupportFromPoint(c);this.points[a]=c.toArray();return this};b.prototype.toJSON=function(a){return this.write(null,a)};b.prototype._validateInputs=function(a){return null!=a&&0<=a&&a<this.points.length};var k;f([m.property({dependsOn:["points","hasZ","hasM","spatialReference"]})],b.prototype,"cache",void 0);f([m.property({dependsOn:["cache"]})],b.prototype,"extent",null);f([m.property({type:[[Number]],
json:{write:{isRequired:!0}}})],b.prototype,"points",void 0);f([m.writer("points")],b.prototype,"writePoints",null);return b=k=f([m.subclass("esri.geometry.Multipoint")],b)}(m.declared(c));b.prototype.toJSON.isDefaultToJSON=!0;return b})},"esri/geometry/support/zmUtils":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.updateSupportFromPoint=function(b,f,g){void 0===g&&(g=!1);var l=b.hasM,h=b.hasZ;Array.isArray(f)?4!==f.length||l||h?3===f.length&&
g&&!l?(h=!0,l=!1):3===f.length&&l&&h&&(h=l=!1):h=l=!0:(h=!h&&f.hasZ&&(!l||f.hasM),l=!l&&f.hasM&&(!h||f.hasZ));b.hasZ=h;b.hasM=l}})},"esri/geometry/Polygon":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./SpatialReference ./support/centroid ./support/contains ./support/coordsUtils ./support/intersects ./support/webMercatorUtils ./support/zmUtils".split(" "),function(b,
g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){function w(a){return function(c,b){return null==c?b:null==b?c:a(c,b)}}var t=w(Math.min),d=w(Math.max);b=function(c){function b(){for(var a=0;a<arguments.length;a++);a=c.call(this)||this;a.rings=[];a.type="polygon";return a}p(b,c);n=b;b.createEllipse=function(a){var c=a.center.x,b=a.center.y,d=a.center.z,e=a.center.m,f=a.center.hasZ,k=a.center.hasM,h=a.longAxis,g=a.shortAxis,l=a.numberOfPoints;a=a.view;for(var q=[],m=2*Math.PI/l,r=f?3:2,t=0;t<l;t++){var u=a.toMap(h*Math.cos(t*
m)+c,g*Math.sin(t*m)+b),u=[u.x,u.y];f&&(u[2]=d);k&&(u[r]=e);q.push(u)}q.push(q[0]);return new n({rings:[q],spatialReference:a.spatialReference})};b.createCircle=function(a){return n.createEllipse({center:a.center,longAxis:a.r,shortAxis:a.r,numberOfPoints:a.numberOfPoints,view:a.view})};b.fromExtent=function(a){var c=a.clone().normalize();a=a.spatialReference;var b=!1,d=!1;c.map(function(a){a.hasZ&&(b=!0);a.hasM&&(d=!0)});c={rings:c.map(function(a){var c=[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],
[a.xmax,a.ymin],[a.xmin,a.ymin]];if(b&&a.hasZ)for(var e=a.zmin+.5*(a.zmax-a.zmin),f=0;f<c.length;f++)c[f].push(e);if(d&&a.hasM)for(a=a.mmin+.5*(a.mmax-a.mmin),f=0;f<c.length;f++)c[f].push(a);return c}),spatialReference:a};b&&(c.hasZ=!0);d&&(c.hasM=!0);return new n(c)};b.prototype.normalizeCtorArgs=function(a,c){var b=null,d,f,k=null;a&&!Array.isArray(a)?(b=a.rings?a.rings:null,c||(a.spatialReference?c=a.spatialReference:a.rings||(c=a)),d=a.hasZ,f=a.hasM):b=a;b=b||[];c=c||e.WGS84;b.length&&b[0]&&null!=
b[0][0]&&"number"===typeof b[0][0]&&(b=[b]);if(k=b[0]&&b[0][0])void 0===d&&void 0===f?(d=2<k.length,f=!1):void 0===d?d=!f&&3<k.length:void 0===f&&(f=!d&&3<k.length);return{rings:b,spatialReference:c,hasZ:d,hasM:f}};Object.defineProperty(b.prototype,"centroid",{get:function(){var c=a.polygonCentroid(this);if(!c||isNaN(c[0])||isNaN(c[1])||this.hasZ&&isNaN(c[2]))return null;var b=new q;b.x=c[0];b.y=c[1];b.spatialReference=this.spatialReference;this.hasZ&&(b.z=c[2]);return b},enumerable:!0,configurable:!0});
Object.defineProperty(b.prototype,"extent",{get:function(){var a=this.hasZ,c=this.hasM,b=this.spatialReference,e=this.rings,f=a?3:2;if(!e.length||!e[0].length)return null;for(var k=e[0][0],n=k[0],k=k[1],g=e[0][0],l=g[0],g=g[1],q=void 0,m=void 0,r=void 0,u=void 0,p=[],x=0;x<e.length;x++){for(var z=e[x],v=z[0],y=v[0],v=v[1],w=z[0],ca=w[0],w=w[1],Q=void 0,U=void 0,Y=void 0,ga=void 0,ka=0;ka<z.length;ka++){var ha=z[ka],qa=ha[0],na=ha[1],n=t(n,qa),k=t(k,na),l=d(l,qa),g=d(g,na),y=t(y,qa),v=t(v,na),ca=d(ca,
qa),w=d(w,na);a&&2<ha.length&&(qa=ha[2],q=t(q,qa),m=d(m,qa),Q=t(Q,qa),U=d(U,qa));c&&ha.length>f&&(ga=ha[f],r=t(q,ga),u=d(m,ga),Y=t(Q,ga),ga=d(U,ga))}p.push(new h({xmin:y,ymin:v,zmin:Q,mmin:Y,xmax:ca,ymax:w,zmax:U,mmax:ga,spatialReference:b}))}e=new h;e.xmin=n;e.ymin=k;e.xmax=l;e.ymax=g;e.spatialReference=b;a&&(e.zmin=q,e.zmax=m);c&&(e.mmin=r,e.mmax=u);e.cache._partwise=1<p.length?p:null;return e},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isSelfIntersecting",{get:function(){return u.isSelfIntersecting(this.rings)},
enumerable:!0,configurable:!0});b.prototype.writePaths=function(a,c,b,d){c.rings=l.clone(this.rings)};b.prototype.addRing=function(a){if(a){this.clearCache();var c=this.rings,b=c.length;if(Array.isArray(a[0]))c[b]=a.concat();else{for(var d=[],e=0,f=a.length;e<f;e++)d[e]=a[e].toArray();c[b]=d}return this}};b.prototype.clone=function(){var a=new n;a.spatialReference=this.spatialReference;a.rings=l.clone(this.rings);a.hasZ=this.hasZ;a.hasM=this.hasM;return a};b.prototype.contains=function(a){if(!a)return!1;
z.canProject(a,this.spatialReference)&&(a=z.project(a,this.spatialReference));return k.polygonContainsPoint(this,a)};b.prototype.isClockwise=function(a){var c=this;a=Array.isArray(a[0])?a:a.map(function(a){return c.hasZ?c.hasM?[a.x,a.y,a.z,a.m]:[a.x,a.y,a.z]:[a.x,a.y]});return r.isClockwise(a,this.hasM,this.hasZ)};b.prototype.getPoint=function(a,c){if(!this._validateInputs(a,c))return null;a=this.rings[a][c];c=this.hasZ;var b=this.hasM;return c&&!b?new q(a[0],a[1],a[2],void 0,this.spatialReference):
b&&!c?new q(a[0],a[1],void 0,a[2],this.spatialReference):c&&b?new q(a[0],a[1],a[2],a[3],this.spatialReference):new q(a[0],a[1],this.spatialReference)};b.prototype.insertPoint=function(a,c,b){if(!this._validateInputs(a,c,!0))return this;this.clearCache();v.updateSupportFromPoint(this,b);Array.isArray(b)||(b=b.toArray());this.rings[a].splice(c,0,b);return this};b.prototype.removePoint=function(a,c){if(!this._validateInputs(a,c))return null;this.clearCache();return new q(this.rings[a].splice(c,1)[0],
this.spatialReference)};b.prototype.removeRing=function(a){if(!this._validateInputs(a,null))return null;this.clearCache();a=this.rings.splice(a,1)[0];var c=this.spatialReference;return a.map(function(a){return new q(a,c)})};b.prototype.setPoint=function(a,c,b){if(!this._validateInputs(a,c))return this;this.clearCache();v.updateSupportFromPoint(this,b);Array.isArray(b)||(b=b.toArray());this.rings[a][c]=b;return this};b.prototype._validateInputs=function(a,c,b){void 0===b&&(b=!1);return null==a||0>
a||a>=this.rings.length||null!=c&&(a=this.rings[a],b&&(0>c||c>a.length)||!b&&(0>c||c>=a.length))?!1:!0};b.prototype.toJSON=function(a){return this.write(null,a)};var n;f([m.property({dependsOn:["hasM","hasZ","rings"]})],b.prototype,"cache",void 0);f([m.property({readOnly:!0,dependsOn:["cache"]})],b.prototype,"centroid",null);f([m.property({dependsOn:["cache"],readOnly:!0})],b.prototype,"extent",null);f([m.property({dependsOn:["cache"],readOnly:!0})],b.prototype,"isSelfIntersecting",null);f([m.property({type:[[[Number]]],
json:{write:{isRequired:!0}}})],b.prototype,"rings",void 0);f([m.writer("rings")],b.prototype,"writePaths",null);return b=n=f([m.subclass("esri.geometry.Polygon")],b)}(m.declared(c));b.prototype.toJSON.isDefaultToJSON=!0;return b})},"esri/geometry/support/centroid":function(){define(["require","exports","../support/coordsUtils"],function(b,g,p){function f(b,c){if(!b||!b.length)return null;for(var f=[],e=[],a=c?[Infinity,-Infinity,Infinity,-Infinity,Infinity,-Infinity]:[Infinity,-Infinity,Infinity,
-Infinity],k=0,h=b.length;k<h;k++){var g=l(b[k],c,a);g&&e.push(g)}e.sort(function(a,b){var e=a[2]-b[2];0===e&&c&&(e=a[4]-b[4]);return e});e.length&&(k=6*e[0][2],f[0]=e[0][0]/k,f[1]=e[0][1]/k,c&&(k=6*e[0][4],f[2]=0!==k?e[0][3]/k:0),f[0]<a[0]||f[0]>a[1]||f[1]<a[2]||f[1]>a[3]||c&&(f[2]<a[4]||f[2]>a[5]))&&(f.length=0);if(!f.length)if(b=b[0]&&b[0].length?m(b[0],c):null)f[0]=b[0],f[1]=b[1],c&&2<b.length&&(f[2]=b[2]);else return null;return f}function l(b,c,f){for(var e=0,a=0,k=0,h=0,g=0,l=0,m=b.length-
1;l<m;l++){var q=b[l],t=q[0],d=q[1],n=q[2],p=b[l+1],y=p[0],A=p[1],D=p[2],B=t*A-y*d,h=h+B,e=e+(t+y)*B,a=a+(d+A)*B;c&&2<q.length&&2<p.length&&(B=t*D-y*n,k+=(n+D)*B,g+=B);t<f[0]&&(f[0]=t);t>f[1]&&(f[1]=t);d<f[2]&&(f[2]=d);d>f[3]&&(f[3]=d);c&&(n<f[4]&&(f[4]=n),n>f[5]&&(f[5]=n))}0<h&&(h*=-1);0<g&&(g*=-1);if(!h)return null;b=[e,a,.5*h];c&&(b[3]=k,b[4]=.5*g);return b}function m(b,c){for(var f=c?[0,0,0]:[0,0],e=c?[0,0,0]:[0,0],a=0,k=0,h=0,g=0,l=0,m=b.length;l<m-1;l++){var w=b[l],t=b[l+1];if(w&&t){f[0]=w[0];
f[1]=w[1];e[0]=t[0];e[1]=t[1];c&&2<w.length&&2<t.length&&(f[2]=w[2],e[2]=t[2]);var d=p.getLength(f,e);d&&(a+=d,w=p.getMidpoint(w,t),k+=d*w[0],h+=d*w[1],c&&2<w.length&&(g+=d*w[2]))}}return 0<a?c?[k/a,h/a,g/a]:[k/a,h/a]:b.length?b[0]:null}Object.defineProperty(g,"__esModule",{value:!0});g.extentCentroid=function(b){return b?b.hasZ?[b.xmax-b.xmin/2,b.ymax-b.ymin/2,b.zmax-b.zmin/2]:[b.xmax-b.xmin/2,b.ymax-b.ymin/2]:null};g.polygonCentroid=function(b){return b?f(b.rings,b.hasZ):null};g.ringsCentroid=f;
g.lineCentroid=m})},"esri/geometry/Polyline":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./SpatialReference ./support/zmUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){function k(a){return function(c,b){return null==c?b:null==b?c:a(c,b)}}var r=k(Math.min),u=k(Math.max);b=function(c){function b(){for(var a=0;a<arguments.length;a++);a=c.call(this)||this;a.paths=
[];a.type="polyline";return a}p(b,c);k=b;b.prototype.normalizeCtorArgs=function(a,c){var b=null,d,f,k=null;a&&!Array.isArray(a)?(b=a.paths?a.paths:null,c||(a.spatialReference?c=a.spatialReference:a.paths||(c=a)),d=a.hasZ,f=a.hasM):b=a;b=b||[];c=c||e.WGS84;b.length&&b[0]&&null!=b[0][0]&&"number"===typeof b[0][0]&&(b=[b]);if(k=b[0]&&b[0][0])void 0===d&&void 0===f?(d=2<k.length,f=!1):void 0===d?d=!f&&3<k.length:void 0===f&&(f=!d&&3<k.length);return{paths:b,spatialReference:c,hasZ:d,hasM:f}};Object.defineProperty(b.prototype,
"extent",{get:function(){var a=this.hasZ,c=this.hasM,b=this.spatialReference,e=this.paths,f=a?3:2;if(!e.length||!e[0].length)return null;for(var k=e[0][0],g=k[0],k=k[1],l=e[0][0],m=l[0],l=l[1],q=void 0,p=void 0,z=void 0,v=void 0,w=[],I=0;I<e.length;I++){for(var fa=e[I],M=fa[0],W=M[0],M=M[1],N=fa[0],H=N[0],N=N[1],O=void 0,J=void 0,P=void 0,S=void 0,ca=0;ca<fa.length;ca++){var Q=fa[ca],U=Q[0],Y=Q[1],g=r(g,U),k=r(k,Y),m=u(m,U),l=u(l,Y),W=r(W,U),M=r(M,Y),H=u(H,U),N=u(N,Y);a&&2<Q.length&&(U=Q[2],q=r(q,
U),p=u(p,U),O=r(O,U),J=u(J,U));c&&Q.length>f&&(S=Q[f],z=r(q,S),v=u(p,S),P=r(O,S),S=u(J,S))}w.push(new h({xmin:W,ymin:M,zmin:O,mmin:P,xmax:H,ymax:N,zmax:J,mmax:S,spatialReference:b}))}e=new h;e.xmin=g;e.ymin=k;e.xmax=m;e.ymax=l;e.spatialReference=b;a&&(e.zmin=q,e.zmax=p);c&&(e.mmin=z,e.mmax=v);e.cache._partwise=1<w.length?w:null;return e},enumerable:!0,configurable:!0});b.prototype.writePaths=function(a,c,b,e){c.paths=l.clone(this.paths)};b.prototype.addPath=function(a){if(a){this.clearCache();var c=
this.paths,b=c.length;if(Array.isArray(a[0]))c[b]=a.concat();else{for(var e=[],f=0,k=a.length;f<k;f++)e[f]=a[f].toArray();c[b]=e}return this}};b.prototype.clone=function(){var a=new k;a.spatialReference=this.spatialReference;a.paths=l.clone(this.paths);a.hasZ=this.hasZ;a.hasM=this.hasM;return a};b.prototype.getPoint=function(a,c){if(!this._validateInputs(a,c))return null;a=this.paths[a][c];c=this.hasZ;var b=this.hasM;return c&&!b?new q(a[0],a[1],a[2],void 0,this.spatialReference):b&&!c?new q(a[0],
a[1],void 0,a[2],this.spatialReference):c&&b?new q(a[0],a[1],a[2],a[3],this.spatialReference):new q(a[0],a[1],this.spatialReference)};b.prototype.insertPoint=function(c,b,e){if(!this._validateInputs(c,b,!0))return this;this.clearCache();a.updateSupportFromPoint(this,e);Array.isArray(e)||(e=e.toArray());this.paths[c].splice(b,0,e);return this};b.prototype.removePath=function(a){if(!this._validateInputs(a,null))return null;this.clearCache();a=this.paths.splice(a,1)[0];var c=this.spatialReference;return a.map(function(a){return new q(a,
c)})};b.prototype.removePoint=function(a,c){if(!this._validateInputs(a,c))return null;this.clearCache();return new q(this.paths[a].splice(c,1)[0],this.spatialReference)};b.prototype.setPoint=function(c,b,e){if(!this._validateInputs(c,b))return this;this.clearCache();a.updateSupportFromPoint(this,e);Array.isArray(e)||(e=e.toArray());this.paths[c][b]=e;return this};b.prototype._validateInputs=function(a,c,b){void 0===b&&(b=!1);return null==a||0>a||a>=this.paths.length||null!=c&&(a=this.paths[a],b&&
(0>c||c>a.length)||!b&&(0>c||c>=a.length))?!1:!0};b.prototype.toJSON=function(a){return this.write(null,a)};var k;f([m.property({dependsOn:["hasM","hasZ","paths"]})],b.prototype,"cache",void 0);f([m.property({dependsOn:["cache"],readOnly:!0})],b.prototype,"extent",null);f([m.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],b.prototype,"paths",void 0);f([m.writer("paths")],b.prototype,"writePaths",null);return b=k=f([m.subclass("esri.geometry.Polyline")],b)}(m.declared(c));b.prototype.toJSON.isDefaultToJSON=
!0;return b})},"esri/geometry/ScreenPoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){return function(b){function c(){for(var c=[],a=0;a<arguments.length;a++)c[a]=arguments[a];c=b.apply(this,c)||this;c.x=0;c.y=0;c.z=void 0;return c}p(c,b);h=c;c.prototype.normalizeCtorArgs=function(c,a){return"number"===typeof c?{x:c,y:a}:Array.isArray(c)?{x:c[0],y:c[1]}:
c};c.prototype.clone=function(){return new h({x:this.x,y:this.y,z:this.z})};c.prototype.toArray=function(){return null==this.z?[this.x,this.y]:[this.x,this.y,this.z]};var h;f([m.property({type:Number})],c.prototype,"x",void 0);f([m.property({type:Number})],c.prototype,"y",void 0);f([m.property({type:Number})],c.prototype,"z",void 0);return c=h=f([m.subclass("esri.geometry.ScreenPoint")],c)}(m.declared(l))})},"esri/geometry/support/jsonUtils":function(){define("require exports ../Extent ../Multipoint ../Point ../Polygon ../Polyline".split(" "),
function(b,g,p,f,l,m,h){function c(a){return void 0!==a.points}function q(a){return void 0!==a.x&&void 0!==a.y}function e(a){return void 0!==a.paths}function a(a){return void 0!==a.rings}function k(b){if(b){if(q(b))return l.fromJSON(b);if(e(b))return h.fromJSON(b);if(a(b))return m.fromJSON(b);if(c(b))return f.fromJSON(b);if(void 0!==b.xmin&&void 0!==b.ymin&&void 0!==b.xmax&&void 0!==b.ymax)return p.fromJSON(b)}return null}Object.defineProperty(g,"__esModule",{value:!0});g.fromJson=function(a){try{throw Error("fromJson is deprecated, use fromJSON instead");
}catch(z){console.warn(z.stack)}return k(a)};g.isMultipoint=c;g.isPoint=q;g.isPolyline=e;g.isPolygon=a;g.fromJSON=k;g.getJsonType=function(a){return a instanceof l?"esriGeometryPoint":a instanceof h?"esriGeometryPolyline":a instanceof m?"esriGeometryPolygon":a instanceof p?"esriGeometryEnvelope":a instanceof f?"esriGeometryMultipoint":null};var r={esriGeometryPoint:l,esriGeometryPolyline:h,esriGeometryPolygon:m,esriGeometryEnvelope:p,esriGeometryMultipoint:f};g.getGeometryType=function(a){return a&&
r[a]||null}})},"esri/layers/mixins/ArcGISService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Logger ../../core/MultiOriginJSONSupport ../../core/accessorSupport/decorators ../support/arcgisLayerUrl".split(" "),function(b,g,p,f,l,m,h,c){var q=l.getLogger("esri.layers.mixins.ArcGISService");return function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);Object.defineProperty(a.prototype,"title",{get:function(){if(this._get("title")&&
"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var a=c.parse(this.url);if(a&&a.title)return a.title}return this._get("title")||""},set:function(a){this._set("title",a)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"url",{set:function(a){this._set("url",c.sanitizeUrl(a,q))},enumerable:!0,configurable:!0});f([h.property({dependsOn:["url"]})],a.prototype,"title",null);f([h.property({type:String})],a.prototype,"url",null);return a=f([h.subclass("esri.layers.mixins.ArcGISService")],
a)}(h.declared(m))})},"esri/core/MultiOriginJSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./accessorSupport/decorators ./accessorSupport/MultiOriginStore ./accessorSupport/PropertyOrigin ./accessorSupport/read ./accessorSupport/utils ./accessorSupport/write".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){function k(a){return e.getProperties(a).store}return function(b){function g(){var a=b.call(this)||this,f=e.getProperties(a),k=
f.metadatas,g=f.store,d=new h.default;f.store=d;g.keys().forEach(function(a){d.set(a,g.get(a),c.OriginId.DEFAULTS)});Object.keys(k).forEach(function(a){f.internalGet(a)&&d.set(a,f.internalGet(a),c.OriginId.DEFAULTS)});return a}p(g,b);g.prototype.clear=function(a,b){void 0===b&&(b="user");return k(this).clear(a,c.nameToId(b))};g.prototype.read=function(a,c){q.default(this,a,c);return this};g.prototype.write=function(c,b){c=c||{};a.default(this,c,b);return c};g.prototype.getAtOrigin=function(a,b){var e=
k(this),f=c.nameToId(b);if("string"===typeof a)return e.get(a,f);var d={};a.forEach(function(a){d[a]=e.get(a,f)});return d};g.prototype.originOf=function(a){var b=k(this);if("string"===typeof a)return c.idToName(b.originOf(a));a.forEach(function(a){c.idToName(b.originOf(a))})};g.prototype.revert=function(a,b){var f=k(this),h=c.nameToId(b),d=e.getProperties(this);("string"===typeof a?"*"===a?Object.keys(f.getAll(h)):[a]:a).forEach(function(a){d.propertyInvalidated(a);f.revert(a,h);d.propertyCommitted(a)})};
g.prototype.removeOrigin=function(a){var b=k(this);a=c.nameToId(a);var e=b.getAll(a),f;for(f in e)b.originOf(f)===a&&b.set(f,e[f],c.OriginId.USER)};g.prototype.updateOrigin=function(a,b){var e=k(this);b=c.nameToId(b);var f=this.get(a);e.clear(a);e.set(a,f,b)};return g=f([m.subclass("esri.core.MultiOriginJSONSupport")],g)}(m.declared(l))})},"esri/core/accessorSupport/MultiOriginStore":function(){define(["require","exports","./PropertyOrigin"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});
b=function(){function b(){this._propertyOriginMap={};this._originStores=Array(p.OriginId.NUM);this._values={}}b.prototype.get=function(b,f){return(f=void 0===f?this._values:this._originStores[f])?f[b]:void 0};b.prototype.keys=function(){return Object.keys(this._values)};b.prototype.set=function(b,f,h){void 0===h&&(h=p.OriginId.USER);var c=this._originStores[h];c||(c={},this._originStores[h]=c);c[b]=f;return!(b in this._values)||this._propertyOriginMap[b]<=h?(c=this._values[b],this._values[b]=f,this._propertyOriginMap[b]=
h,c!==f):!1};b.prototype.clear=function(b,f){void 0===f&&(f=p.OriginId.USER);var h=this._originStores[f];if(h){var c=h[b];delete h[b];if(b in this._values&&this._propertyOriginMap[b]===f)for(delete this._values[b],--f;0<=f;f--)if((h=this._originStores[f])&&b in h){this._values[b]=h[b];this._propertyOriginMap[b]=f;break}return c}};b.prototype.has=function(b,f){return(f=void 0===f?this._values:this._originStores[f])?b in f:!1};b.prototype.revert=function(b,f){for(;0<f&&!this.has(b,f);)--f;var h=this._originStores[f],
h=h&&h[b],c=this._values[b];this._values[b]=h;this._propertyOriginMap[b]=f;return c!==h};b.prototype.originOf=function(b,f){return this._propertyOriginMap[b]||p.OriginId.DEFAULTS};b.prototype.getAll=function(b){return this._originStores[b]};return b}();g.default=b})},"esri/layers/support/arcgisLayerUrl":function(){define(["require","exports","../../core/urlUtils"],function(b,g,p){function f(b){var f=p.urlToObject(b).path.match(g.match);if(!f)return null;b=f[1];var c=f[2],q=f[3],f=f[4],e=c.indexOf("/");
return{title:l(-1!==e?c.slice(e+1):c),serverType:q,sublayer:null!=f&&""!==f?parseInt(f,10):null,url:{path:b}}}function l(b){b=b.replace(/\s*[/_]+\s*/g," ");return b[0].toUpperCase()+b.slice(1)}Object.defineProperty(g,"__esModule",{value:!0});g.serverTypes="MapServer ImageServer FeatureServer SceneServer StreamServer VectorTileServer".split(" ");g.match=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/("+g.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i");g.test=function(b){return!!g.match.test(b)};
g.parse=f;g.cleanTitle=l;g.titleFromUrlAndName=function(b,h){var c=[];b&&(b=f(b))&&b.title&&c.push(b.title);h&&(h=l(h),c.push(h));if(2===c.length){if(-1!==c[0].toLowerCase().indexOf(c[1].toLowerCase()))return c[0];if(-1!==c[1].toLowerCase().indexOf(c[0].toLowerCase()))return c[1]}return c.join(" - ")};g.isHostedAgolService=function(b){if(!b)return!1;b=b.toLowerCase();var f=-1!==b.indexOf(".arcgis.com/");b=-1!==b.indexOf("//services")||-1!==b.indexOf("//tiles")||-1!==b.indexOf("//features");return f&&
b};g.isHostedSecuredProxyService=function(b,f){return f&&b&&-1!==b.toLowerCase().indexOf(f.toLowerCase())};g.sanitizeUrl=function(b,f){return b?p.removeTrailingSlash(p.removeQueryParameters(b,f)):b};g.sanitizeUrlWithLayerId=function(b,h,c){if(!h)return{url:h};h=p.removeQueryParameters(h,c);c=p.urlToObject(h);c=f(c.path);var g;c&&null!=c.sublayer&&(null==b.layerId&&(g=c.sublayer),h=c.url.path);return{url:p.removeTrailingSlash(h),layerId:g}};g.writeUrlWithLayerId=function(b,f,c,g){var e=null;g?e=c:
g=c;p.writeOperationalLayerUrl(f,g);g.url&&null!=b.layerId&&(g.url=p.join(g.url,e,b.layerId.toString()))}})},"esri/layers/support/TileInfo":function(){define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ../../geometry/support/aaBoundingRect ../../geometry/support/scaleUtils ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ./LOD".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z){var v=c({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc"});return function(c){function b(a){a=c.call(this)||this;a.dpi=96;a.format=null;a.origin=null;a.minScale=0;a.maxScale=0;a.size=null;a.spatialReference=null;return a}f(b,c);d=b;b.create=function(a){void 0===a&&(a={size:256,spatialReference:m.SpatialReference.WebMercator});
var c=a.resolutionFactor||1,b=a.scales,e=a.size||256;a=a.spatialReference||m.SpatialReference.WebMercator;var f=r.getInfo(a),f=f?new m.Point(f.origin[0],f.origin[1],a):new m.Point(0,0,a),n=1/(39.37*k.getMetersPerUnitForSR(a)*96),h=[];if(b)for(var g=0;g<b.length;g++){var l=b[g],q=l*n;h.push({level:g,scale:l,resolution:q})}else for(l=r.isGeographic(a)?512/e*1.47748799285417E8:256/e*5.91657527591555E8,b=Math.ceil(24/c),h.push({level:0,scale:l,resolution:l*n}),g=1;g<b;g++)l/=Math.pow(2,c),q=l*n,h.push({level:g,
scale:l,resolution:q});return new d({dpi:96,lods:h,origin:f,size:e,spatialReference:a})};Object.defineProperty(b.prototype,"isWrappable",{get:function(){var a=this.spatialReference,c=this.origin;if(a&&c){var b=r.getInfo(a);return a.isWrappable&&Math.abs(b.origin[0]-c.x)<=b.dx}return!1},enumerable:!0,configurable:!0});b.prototype.readOrigin=function(a,c){return m.Point.fromJSON(p({spatialReference:c.spatialReference},a))};Object.defineProperty(b.prototype,"lods",{set:function(a){var c=this,b=0,d=0,
e=[];this._levelToLOD={};a&&(b=-Infinity,d=Infinity,a.forEach(function(a){e.push(a.scale);b=a.scale>b?a.scale:b;d=a.scale<d?a.scale:d;c._levelToLOD[a.level]=a}));this._set("scales",e);this._set("minScale",b);this._set("maxScale",d);this._set("lods",a);this._initializeUpsampleLevels()},enumerable:!0,configurable:!0});b.prototype.readSize=function(a,c){return[c.cols,c.rows]};b.prototype.writeSize=function(a,c){c.cols=a[0];c.rows=a[0]};b.prototype.zoomToScale=function(a){var c=this.scales;if(0>=a)return c[0];
if(a>=c.length)return c[c.length-1];var b=Math.round(a);return c[b]+(b-a)*(c[Math.round(a-.5)]-c[b])};b.prototype.scaleToZoom=function(a){for(var c=this.scales,b=c.length-1,d=0;d<b;d++){var e=c[d],f=c[d+1];if(e<=a)break;if(f===a)return d+1;if(e>a&&f<a)return d+1-(a-f)/(e-f)}return d};b.prototype.snapScale=function(a,c){void 0===c&&(c=.95);a=this.scaleToZoom(a);return a%Math.floor(a)>=c?this.zoomToScale(Math.ceil(a)):this.zoomToScale(Math.floor(a))};b.prototype.tileAt=function(c,b,d,e){var f=this.lodAt(c);
if(!f)return null;var k;if("number"===typeof b)k=b,b=d;else{if(r.equals(b.spatialReference,this.spatialReference))k=b.x,b=b.y;else{e=u.project(b,this.spatialReference);if(!e)return null;k=e.x;b=e.y}e=d}d=f.resolution*this.size[0];f=f.resolution*this.size[1];e||(e={id:null,level:0,row:0,col:0,extent:a.create()});e.level=c;e.row=Math.floor((this.origin.y-b)/f+.001);e.col=Math.floor((k-this.origin.x)/d+.001);this.updateTileInfo(e);return e};b.prototype.updateTileInfo=function(c){var b=this.lodAt(c.level),
d=b.resolution*this.size[0],b=b.resolution*this.size[1];c.id=c.level+"/"+c.row+"/"+c.col;c.extent||(c.extent=a.create());c.extent[0]=this.origin.x+c.col*d;c.extent[1]=this.origin.y-(c.row+1)*b;c.extent[2]=c.extent[0]+d;c.extent[3]=c.extent[1]+b};b.prototype.upsampleTile=function(a){var c=this._upsampleLevels[a.level];if(!c||-1===c.parentLevel)return!1;a.level=c.parentLevel;a.row=Math.floor(a.row/c.factor+.001);a.col=Math.floor(a.col/c.factor+.001);this.updateTileInfo(a);return!0};b.prototype.getTileBounds=
function(a,c){var b=this.lodAt(c.level).resolution,d=b*this.size[0],b=b*this.size[1];a[0]=this.origin.x+c.col*d;a[1]=this.origin.y-(c.row+1)*b;a[2]=a[0]+d;a[3]=a[1]+b;return a};b.prototype.lodAt=function(a){return this._levelToLOD&&this._levelToLOD[a]||null};b.prototype.clone=function(){return d.fromJSON(this.write({}))};b.prototype._initializeUpsampleLevels=function(){var a=this.lods;this._upsampleLevels=[];for(var c=null,b=0;b<a.length;b++){var d=a[b];this._upsampleLevels[d.level]={parentLevel:c?
c.level:-1,factor:c?c.resolution/d.resolution:0};c=d}};var d;l([q.property({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0);l([q.property({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0);l([q.property({type:String,json:{read:v.read,write:v.write}})],b.prototype,"format",void 0);l([q.property({readOnly:!0,dependsOn:["spatialReference","origin"]})],b.prototype,"isWrappable",null);l([q.property({type:m.Point,json:{write:!0}})],b.prototype,"origin",void 0);l([q.reader("origin")],
b.prototype,"readOrigin",null);l([q.property({type:[z],value:null,json:{write:!0}})],b.prototype,"lods",null);l([q.property({readOnly:!0})],b.prototype,"minScale",void 0);l([q.property({readOnly:!0})],b.prototype,"maxScale",void 0);l([q.property({readOnly:!0})],b.prototype,"scales",void 0);l([q.property({cast:function(a){return Array.isArray(a)?a:"number"===typeof a?[a,a]:[256,256]}})],b.prototype,"size",void 0);l([q.reader("size",["rows","cols"])],b.prototype,"readSize",null);l([q.writer("size",
{cols:{type:e.Integer},rows:{type:e.Integer}})],b.prototype,"writeSize",null);l([q.property({type:m.SpatialReference,json:{write:!0}})],b.prototype,"spatialReference",void 0);return b=d=l([q.subclass("esri.layers.support.TileInfo")],b)}(q.declared(h))})},"esri/layers/support/LOD":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType".split(" "),
function(b,g,p,f,l,m,h){return function(c){function b(a){a=c.call(this,a)||this;a.level=0;a.levelValue=null;a.resolution=0;a.scale=0;return a}p(b,c);e=b;b.prototype.clone=function(){return new e({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})};var e;f([m.property({type:h.Integer,json:{write:!0}})],b.prototype,"level",void 0);f([m.property({type:String,json:{write:!0}})],b.prototype,"levelValue",void 0);f([m.property({type:Number,json:{write:!0}})],b.prototype,
"resolution",void 0);f([m.property({type:Number,json:{write:!0}})],b.prototype,"scale",void 0);return b=e=f([m.subclass("esri.layers.support.LOD")],b)}(m.declared(l))})},"esri/layers/support/TilemapCache":function(){define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/io-query ../../request ../../core/Accessor ../../core/Error ../../core/Handles ../../core/Logger ../../core/LRUMap ../../core/promiseUtils ../../core/watchUtils ../../core/accessorSupport/decorators ./Tilemap".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){var w=a.getLogger("esri.layers.support.TilemapCache");return function(a){function c(c){c=a.call(this)||this;c._handles=new e;c._pendingTilemapRequests={};c._availableLevels={};c.levels=5;c.cacheByteSize=2097152;c.request=h;return c}f(c,a);c.prototype.initialize=function(){var a=this;this._tilemapCache=new k(this.cacheByteSize,{sizeOfFunction:function(a){return a.byteSize}});this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers"],function(){return a._initializeTilemapDefinition()}),
u.init(this,"layer.tileInfo.lods",function(c){return a._initializeAvailableLevels(c)},!0)]);this._initializeTilemapDefinition()};c.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null)};c.prototype.castLevels=function(a){return 2>=a?(w.error("Minimum levels for Tilemap is 3, but got ",a),3):a};Object.defineProperty(c.prototype,"size",{get:function(){return 1<<this.levels},enumerable:!0,configurable:!0});c.prototype.getTilemap=function(a,c,b){return this._tilemapFromCache(a,
c,b,this._tmpTilemapDefinition)};c.prototype.fetchTilemap=function(a,c,b,d){var e=this;if(!this._availableLevels[a])return r.reject(new q("tilemap-cache:level-unavailable","Level "+a+" is unavailable in the service"));var f=this._tmpTilemapDefinition;if(a=this._tilemapFromCache(a,c,b,f))return r.resolve(a);var k=v.tilemapDefinitionId(f),h=this._pendingTilemapRequests[k];h||(h=v.Tilemap.fromDefinition(f,d).then(function(a){e._tilemapCache.set(k,a);delete e._pendingTilemapRequests[k];return a}).catch(function(a){delete e._pendingTilemapRequests[k];
return r.reject(a)}),this._pendingTilemapRequests[k]=h);return r.create(function(a,c){h.then(a,c)})};c.prototype.getAvailability=function(a,c,b){return this._availableLevels[a]?(a=this.getTilemap(a,c,b))?a.getAvailability(c,b):"unknown":"unavailable"};c.prototype.getAvailabilityUpsample=function(a,c,b,d){d.level=a;d.row=c;d.col=b;a=this.layer.tileInfo;for(a.updateTileInfo(d);;)if(c=this.getAvailability(d.level,d.row,d.col),"unavailable"===c){if(!a.upsampleTile(d))return"unavailable"}else return c};
c.prototype.fetchAvailability=function(a,c,b,d){return this._availableLevels[a]?this.fetchTilemap(a,c,b,d).always(function(d){return d instanceof v.Tilemap?(d=d.getAvailability(c,b),"unavailable"===d?r.reject(new q("tile-map:tile-unavailable","Tile is not available",{level:a,row:c,col:b})):d):d&&"cancel"===d.dojoType?r.reject(d):"unknown"}):r.reject(new q("tilemap-cache:level-unavailable","Level "+a+" is unavailable in the service"))};c.prototype.fetchAvailabilityUpsample=function(a,c,b,d,e){var f=
this;d.level=a;d.row=c;d.col=b;var k=this.layer.tileInfo;k.updateTileInfo(d);return this.fetchAvailability(a,c,b,e).catch(function(a){return a&&"cancel"===a.dojoType?r.reject(a):k.upsampleTile(d)?f.fetchAvailabilityUpsample(d.level,d.row,d.col,d):r.reject(a)})};c.prototype._initializeTilemapDefinition=function(){if(this.layer.parsedUrl){var a=this.layer.parsedUrl,c=a.query;c&&c.token||!this.layer.token||(c=p({},c,{token:this.layer.token}));this._tilemapCache.clear();this._tmpTilemapDefinition={service:{url:a.path,
query:c?m.objectToQuery(c):null,tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}};c.prototype._tilemapFromCache=function(a,c,b,d){a=this._getTilemapDefinition(a,c,b,d);a=v.tilemapDefinitionId(a);return this._tilemapCache.get(a)};c.prototype._getTilemapDefinition=function(a,c,b,d){d.level=a;d.row=c-c%this.size;d.col=b-b%this.size;return d};c.prototype._initializeAvailableLevels=function(a){var c=this;this._availableLevels=
{};a&&a.forEach(function(a){return c._availableLevels[a.level]=!0})};l([z.property({constructOnly:!0,type:Number})],c.prototype,"levels",void 0);l([z.cast("levels")],c.prototype,"castLevels",null);l([z.property({readOnly:!0,dependsOn:["levels"],type:Number})],c.prototype,"size",null);l([z.property({constructOnly:!0,type:Number})],c.prototype,"cacheByteSize",void 0);l([z.property({constructOnly:!0})],c.prototype,"layer",void 0);l([z.property({constructOnly:!0})],c.prototype,"request",void 0);return c=
l([z.subclass("esri.layers.support.TilemapCache")],c)}(z.declared(c))})},"esri/core/LRUMap":function(){define(["require","exports"],function(b,g){return function(){function b(b,g){void 0===b&&(b=0);this.sizeOfFunction=function(){return 1};this._sizeOf=0;this._cache=new Map;this._queue=[];if(0>=b)throw Error("LRU cache size must be bigger than zero!");this._maxSize=b;g&&(g.disposeFunction&&(this.disposeFunction=g.disposeFunction),g.sizeOfFunction&&(this.sizeOfFunction=g.sizeOfFunction))}Object.defineProperty(b.prototype,
"length",{get:function(){return this._cache.size},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"size",{get:function(){return this._sizeOf},enumerable:!0,configurable:!0});b.prototype.clear=function(){var b=this;this._queue.length=0;this.disposeFunction&&this._cache.forEach(function(f,g){b.disposeFunction(g,f)});this._cache.clear();this._sizeOf=0};b.prototype.delete=function(b){var f=this._cache.get(b);return this._cache.delete(b)?(this._sizeOf-=this.sizeOfFunction(f),this._queue.splice(this._queue.indexOf(b),
1),this.disposeFunction&&this.disposeFunction(b,f),!0):!1};b.prototype.forEach=function(b,g){this._cache.forEach(b,g)};b.prototype.get=function(b){var f=this._cache.get(b);if(void 0!==f)return this._queue.splice(this._queue.indexOf(b),1),this._queue.unshift(b),f};b.prototype.has=function(b){return this._cache.has(b)};b.prototype.set=function(b,g){var f=this.get(b);void 0!==f?this._sizeOf-=this.sizeOfFunction(f):this._queue.unshift(b);this._sizeOf+=this.sizeOfFunction(g);this._cache.set(b,g);this._collect();
return this};b.prototype._collect=function(){for(;this._queue.length&&this._sizeOf>this._maxSize;){var b=this._queue.pop(),g=this._cache.get(b);this._cache.delete(b)&&(this._sizeOf-=this.sizeOfFunction(g),this.disposeFunction&&this.disposeFunction(b,g))}};return b}()})},"esri/core/watchUtils":function(){define(["require","exports","dojo/Deferred","dojo/promise/Promise"],function(b,g,p,f){function l(a,c,b,e,f){f=a.watch(c,function(c,d,f,k){e&&!e(c)||b.call(a,c,d,f,k)},f);if(Array.isArray(c))for(var d=
0;d<c.length;d++){var k=a.get(c[d]);e&&e(k)&&b.call(a,k,k,c,a)}else k=a.get(c),e&&e(k)&&b.call(a,k,k,c,a);return f}function m(a,c,b,e,k){function d(){g&&(g.remove(),g=null)}var h=!1,g,q=new p(d),m=new f;m.cancel=q.cancel;m.isCanceled=q.isCanceled;m.isFulfilled=q.isFulfilled;m.isRejected=q.isRejected;m.isResolved=q.isResolved;m.then=q.then;m.remove=d;Object.freeze(m);g=l(a,c,function(c,e,f,k){h=!0;d();b&&b.call(a,c,e,f,k);q.resolve({value:c,oldValue:e,propertyName:f,target:k})},e,k);h&&g.remove();
return m}function h(a){return!!a}function c(a){return!a}function q(a){return!0===a}function e(a){return!1===a}function a(a){return void 0!==a}function k(a){return void 0===a}function r(a,c,b,e){var f=Array.isArray(c)?c:-1<c.indexOf(",")?c.split(","):[c];c=a.watch(c,b,e);for(e=0;e<f.length;e++){var d=f[e].trim(),k=a.get(d);b.call(a,k,k,d,a)}return c}Object.defineProperty(g,"__esModule",{value:!0});g.init=r;g.watch=function(a,c,b,e){return a.watch(c,b,e)};g.once=function(a,c,b,e){return m(a,c,b,null,
e)};g.when=function(a,c,b,e){return l(a,c,b,h,e)};g.whenOnce=function(a,c,b,e){return m(a,c,b,h,e)};g.whenNot=function(a,b,e,f){return l(a,b,e,c,f)};g.whenNotOnce=function(a,b,e,f){return m(a,b,e,c,f)};g.whenTrue=function(a,c,b,e){return l(a,c,b,q,e)};g.whenTrueOnce=function(a,c,b,e){return m(a,c,b,q,e)};g.whenFalse=function(a,c,b,f){return l(a,c,b,e,f)};g.whenFalseOnce=function(a,c,b,f){return m(a,c,b,e,f)};g.whenDefined=function(c,b,e,f){return l(c,b,e,a,f)};g.whenDefinedOnce=function(c,b,e,f){return m(c,
b,e,a,f)};g.whenUndefined=function(a,c,b,e){return l(a,c,b,k,e)};g.whenUndefinedOnce=function(a,c,b,e){return m(a,c,b,k,e)};g.pausable=function(a,c,b,e){var f=!1,d=a.watch(c,function(c,d,e,k){f||b.call(a,c,d,e,k)},e);return{remove:function(){d.remove()},pause:function(){f=!0},resume:function(){f=!1}}};g.on=function(a,c,b,e,f,d,k){function h(c){var e=g[c];e&&(d&&d(e.target,c,a,b),e.handle.remove(),delete g[c])}var g={},n=r(a,c,function(c,d,k){h(k);c&&"function"===typeof c.on&&(g[k]={handle:c.on(b,
e),target:c},f&&f(c,k,a,b))},k);return{remove:function(){n.remove();for(var a in g)h(a)}}}})},"esri/layers/support/Tilemap":function(){define("require exports ../../core/tsSupport/assignHelper ../../request ../../core/Error ../../core/lang ../../core/promiseUtils".split(" "),function(b,g,p,f,l,m,h){function c(c){var b;"vector-tile"===c.service.type?b=c.service.url+"/tilemap/"+c.level+"/"+c.row+"/"+c.col+"/"+c.width+"/"+c.height:(b=c.service.tileServers,b=(b&&b.length?b[c.row%b.length]:c.service.url)+
"/tilemap/"+c.level+"/"+c.row+"/"+c.col+"/"+c.width+"/"+c.height);(c=c.service.query)&&(b=b+"?"+c);return b}Object.defineProperty(g,"__esModule",{value:!0});b=function(){function b(){this.location={left:0,top:0,width:0,height:0};this.byteSize=40}b.prototype.getAvailability=function(c,a){if(this._isAllAvailable)return"available";if(this._isAllUnvailable)return"unavailable";c=(c-this.location.top)*this.location.width+(a-this.location.left);a=c>>3;var b=this._tileAvailabilityBitSet;return 0>a||a>b.length?
"unknown":b[a]&1<<c%8?"available":"unavailable"};b.prototype._updateFromData=function(c){for(var a=!0,b=!0,e=new Uint8Array(Math.ceil(this.location.width*this.location.height/8)),f=0,h=0;h<c.length;h++){var g=h%8;c[h]?(b=!1,e[f]|=1<<g):a=!1;7===g&&++f}this._isAllUnvailable=b;this._isAllAvailable=a;this._isAllAvailable||this._isAllUnvailable||(this._tileAvailabilityBitSet=e,this.byteSize+=e.length)};b.fromDefinition=function(e,a){var k=e.service.request||f,g=e.row,q=e.col,m=e.width,v=e.height,w={query:{f:"json"},
callbackParamName:"callback"};a=a?p({},w,a):w;return k(c(e),a).then(function(a){return a.data}).catch(function(a){if(a&&a.details&&422===a.details.httpStatus){a=[];for(var c=0,b=m*v;c<b;c++)a[c]=0;return{location:{top:g,left:q,width:m,height:v},valid:!0,data:a}}return h.reject(a)}).then(function(a){if(a.location&&(a.location.top!==g||a.location.left!==q||a.location.width!==m||a.location.height!==v))throw new l("tilemap:location-mismatch","Tilemap response for different location than requested",{response:a,
definition:{top:g,left:q,width:m,height:v}});return b.fromJSON(a)})};b.fromJSON=function(c){b.validateJSON(c);var a=new b;a.location=Object.freeze(m.clone(c.location));a._updateFromData(c.data);return Object.freeze(a)};b.validateJSON=function(c){if(!c||!c.location)throw new l("tilemap:missing-location","Location missing from tilemap response");if(!1===c.valid)throw new l("tilemap:invalid","Tilemap response was marked as invalid");if(!c.data)throw new l("tilemap:missing-data","Data missing from tilemap response");
if(!Array.isArray(c.data))throw new l("tilemap:data-mismatch","Data must be an array of numbers");if(c.data.length!==c.location.width*c.location.height)throw new l("tilemap:data-mismatch","Number of data items does not match width/height of tilemap");};return b}();g.Tilemap=b;g.tilemapDefinitionId=function(c){return c.level+"/"+c.row+"/"+c.col+"/"+c.width+"/"+c.height};g.tilemapDefinitionUrl=c;g.default=b})},"esri/layers/mixins/OperationalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Error ../../core/MultiOriginJSONSupport ../../core/promiseUtils ../../core/urlUtils ../../core/accessorSupport/decorators ../../core/accessorSupport/read ../../core/accessorSupport/write ../../webdoc/support/opacityUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r){g=function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a.title="Layer";return a}p(b,c);h=b;b.prototype.writeListMode=function(a,c,b,e){e&&"ground"===e.layerContainerType?c[b]=a:a&&k.willPropertyWrite(this,b,{},e)&&(c[b]=a)};b.prototype.writeTitle=function(a,c){c.title=a||"Layer"};b.prototype.writeOperationalLayerType=function(a,c){a&&(c.layerType=a)};b.prototype.readOpacity=function(a,c,b){if(void 0!==c.opacity&&(!b||"web-map"===b.origin||"web-scene"===
b.origin))return c.opacity;if((!b||"service"===b.origin)&&c.drawingInfo&&void 0!==c.drawingInfo.transparency)return r.transparencyToOpacity(c.drawingInfo.transparency);if(c.layerDefinition&&c.layerDefinition.drawingInfo&&void 0!==c.layerDefinition.drawingInfo.transparency)return r.transparencyToOpacity(c.layerDefinition.drawingInfo.transparency)};b.prototype.readVisible=function(a,c){return!!c.visibility};b.prototype.read=function(c,b){var d=this,e=arguments;b&&(b.layer=this);a.readLoadable(this,
c,function(a){return d.inherited(e,[c,a])},b);return this};b.prototype.write=function(a,c){if(c&&c.origin){var b=c.origin+"/"+(c.layerContainerType||"operational-layers"),d=h.supportedTypes[b],d=d&&d[this.operationalLayerType];if("write"!==d&&"readwrite"!==d)return c.messages&&c.messages.push(new m("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' are not supported in the context of '"+b+"'",{layer:this})),null;if(!this.url&&!u[this.operationalLayerType])return c.messages&&
c.messages.push(new m("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to a '"+c.origin+"'",{layer:this})),null}return this.inherited(arguments,[a,c])};var h;f([e.property({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}}}}})],b.prototype,"id",void 0);f([e.property({type:String,json:{write:{ignoreOrigin:!0}}})],b.prototype,"listMode",void 0);f([e.writer("listMode")],
b.prototype,"writeListMode",null);f([e.property({type:String,json:{write:{ignoreOrigin:!0,allowNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}}}}})],b.prototype,"title",void 0);f([e.writer("title")],b.prototype,"writeTitle",null);f([e.property({type:String,json:{write:{ignoreOrigin:!0,writer:q.writeOperationalLayerUrl}}})],b.prototype,"url",void 0);f([e.property({type:String,json:{write:{target:"layerType",ignoreOrigin:!0}}})],b.prototype,"operationalLayerType",void 0);f([e.writer("operationalLayerType")],
b.prototype,"writeOperationalLayerType",null);f([e.property({type:Number,json:{write:{ignoreOrigin:!0}}})],b.prototype,"opacity",void 0);f([e.reader("opacity",["opacity","layerDefinition.drawingInfo.transparency","drawingInfo.transparency"])],b.prototype,"readOpacity",null);f([e.property({type:Boolean,json:{write:{target:"visibility",ignoreOrigin:!0}}})],b.prototype,"visible",void 0);f([e.reader("visible",["visibility"])],b.prototype,"readVisible",null);return b=h=f([e.subclass("esri.layers.mixins.OperationalLayer")],
b)}(e.declared(l,h));var u={GroupLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,ArcGISFeatureLayer:!0,CSV:!0,VectorTileLayer:!0,KML:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0};(function(a){a.typeModuleMap={ArcGISFeatureLayer:function(){return c.create(function(a){return b(["../FeatureLayer"],a)})},ArcGISImageServiceLayer:function(){return c.create(function(a){return b(["../ImageryLayer"],a)})},ArcGISImageServiceVectorLayer:function(){return c.resolve(null)},ArcGISMapServiceLayer:function(){return c.create(function(a){return b(["../MapImageLayer"],
a)})},ArcGISSceneServiceLayer:function(){return c.create(function(a){return b(["../SceneLayer"],a)})},ArcGISStreamLayer:function(){return c.create(function(a){return b(["../StreamLayer"],a)})},ArcGISTiledElevationServiceLayer:function(){return c.create(function(a){return b(["../ElevationLayer"],a)})},ArcGISTiledImageServiceLayer:function(){return c.create(function(a){return b(["../TileLayer"],a)})},ArcGISTiledMapServiceLayer:function(){return c.create(function(a){return b(["../TileLayer"],a)})},BingMapsAerial:function(){return c.create(function(a){return b(["../BingMapsLayer"],
a)})},BingMapsRoad:function(){return c.create(function(a){return b(["../BingMapsLayer"],a)})},BingMapsHybrid:function(){return c.create(function(a){return b(["../BingMapsLayer"],a)})},CSV:function(){return c.create(function(a){return b(["../CSVLayer"],a)})},GeoRSS:function(){return c.create(function(a){return b(["../GeoRSSLayer"],a)})},GroupLayer:function(){return c.create(function(a){return b(["../GroupLayer"],a)})},IntegratedMeshLayer:function(){return c.create(function(a){return b(["../IntegratedMeshLayer"],
a)})},KML:function(){return c.create(function(a){return b(["../KMLLayer"],a)})},OpenStreetMap:function(){return c.create(function(a){return b(["../OpenStreetMapLayer"],a)})},PointCloudLayer:function(){return c.create(function(a){return b(["../PointCloudLayer"],a)})},VectorTileLayer:function(){return c.create(function(a){return b(["../VectorTileLayer"],a)})},WebTiledLayer:function(){return c.create(function(a){return b(["../WebTileLayer"],a)})},WMS:function(){return c.create(function(a){return b(["../WMSLayer"],
a)})}};a.supportedTypes={"web-scene/operational-layers":{ArcGISFeatureLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISSceneServiceLayer:"readwrite",ArcGISTiledElevationServiceLayer:"read",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",GroupLayer:"readwrite",IntegratedMeshLayer:"readwrite",PointCloudLayer:"readwrite",WebTiledLayer:"readwrite",CSV:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite"},"web-scene/basemap":{ArcGISTiledImageServiceLayer:"readwrite",
ArcGISTiledMapServiceLayer:"readwrite",WebTiledLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",WMS:"readwrite",ArcGISMapServiceLayer:"readwrite"},"web-scene/ground":{ArcGISTiledElevationServiceLayer:"readwrite"},"web-map/operational-layers":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISStreamLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",
ArcGISFeatureLayer:"readwrite",BingMapsAerial:"readwrite",BingMapsRoad:"readwrite",BingMapsHybrid:"readwrite",CSV:"readwrite",GeoRSS:"readwrite",KML:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite"},"web-map/basemap":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",
WebTiledLayer:"readwrite",BingMapsAerial:"readwrite",BingMapsRoad:"readwrite",BingMapsHybrid:"readwrite"}}})(g||(g={}));return g})},"esri/layers/mixins/PortalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Error ../../core/Logger ../../core/promiseUtils ../../core/urlUtils ../../core/accessorSupport/decorators ../../portal/Portal ../../portal/PortalItem".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,
k){var r=h.getLogger("esri.layers.mixins.PortalLayer");return function(h){function g(){return null!==h&&h.apply(this,arguments)||this}p(g,h);Object.defineProperty(g.prototype,"portalItem",{set:function(a){a!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",a))},enumerable:!0,configurable:!0});g.prototype.writePortalItem=function(a,c,b){a&&a.id&&(c.itemId=a.id)};g.prototype.loadFromPortal=function(a){var e=this;return this.portalItem&&this.portalItem.id?c.create(function(a){return b(["../../portal/support/layersLoader"],
a)}).then(function(c){return c.load({instance:e,supportedTypes:a.supportedTypes,validateItem:a.validateItem,supportsData:a.supportsData}).catch(function(a){r.warn("Failed to load layer ("+e.title+", "+e.id+") portal item ("+e.portalItem.id+")\n  "+a);throw a;})}):c.resolve()};g.prototype.read=function(a,c){c&&(c.layer=this);return this.inherited(arguments)};g.prototype.write=function(c,b){var e=b&&b.portal,d=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||a.getDefault());return e&&d&&
!q.hasSamePortal(d.restUrl,e.restUrl)?(b.messages&&b.messages.push(new m("layer:cross-portal","The layer '"+this.title+" ("+this.id+")' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer",{layer:this})),null):this.inherited(arguments)};f([e.property({type:k})],g.prototype,"portalItem",null);f([e.writer("portalItem",{itemId:{type:String}})],
g.prototype,"writePortalItem",null);return g=f([e.subclass("esri.layers.mixins.PortalLayer")],g)}(e.declared(l))})},"esri/layers/support/rasterFormats/LercCodec":function(){define([],function(){var b={defaultNoDataValue:-3.4027999387901484E38,decode:function(p,f){var l;f=f||{};var m=f.inputOffset||0,h=f.encodedMaskData||null===f.encodedMaskData,c={},q=new Uint8Array(p,m,10);c.fileIdentifierString=String.fromCharCode.apply(null,q);if("CntZImage"!=c.fileIdentifierString.trim())throw"Unexpected file identifier string: "+
c.fileIdentifierString;m+=10;q=new DataView(p,m,24);c.fileVersion=q.getInt32(0,!0);c.imageType=q.getInt32(4,!0);c.height=q.getUint32(8,!0);c.width=q.getUint32(12,!0);c.maxZError=q.getFloat64(16,!0);m+=24;if(!h)if(q=new DataView(p,m,16),c.mask={},c.mask.numBlocksY=q.getUint32(0,!0),c.mask.numBlocksX=q.getUint32(4,!0),c.mask.numBytes=q.getUint32(8,!0),c.mask.maxValue=q.getFloat32(12,!0),m+=16,0<c.mask.numBytes){var h=new Uint8Array(Math.ceil(c.width*c.height/8)),q=new DataView(p,m,c.mask.numBytes),
e=q.getInt16(0,!0),a=2,k=0;do{if(0<e)for(;e--;)h[k++]=q.getUint8(a++);else for(var r=q.getUint8(a++),e=-e;e--;)h[k++]=r;e=q.getInt16(a,!0);a+=2}while(a<c.mask.numBytes);if(-32768!==e||k<h.length)throw"Unexpected end of mask RLE encoding";c.mask.bitset=h;m+=c.mask.numBytes}else 0===(c.mask.numBytes|c.mask.numBlocksY|c.mask.maxValue)&&(h=new Uint8Array(Math.ceil(c.width*c.height/8)),c.mask.bitset=h);q=new DataView(p,m,16);c.pixels={};c.pixels.numBlocksY=q.getUint32(0,!0);c.pixels.numBlocksX=q.getUint32(4,
!0);c.pixels.numBytes=q.getUint32(8,!0);c.pixels.maxValue=q.getFloat32(12,!0);m+=16;h=c.pixels.numBlocksX;q=c.pixels.numBlocksY;h+=0<c.width%h?1:0;e=q+(0<c.height%q?1:0);c.pixels.blocks=Array(h*e);a=1E9;for(r=k=0;r<e;r++)for(var u=0;u<h;u++){var z=0,q=new DataView(p,m,Math.min(10,p.byteLength-m)),v={};c.pixels.blocks[k++]=v;var w=q.getUint8(0);z++;v.encoding=w&63;if(3<v.encoding)throw"Invalid block encoding ("+v.encoding+")";if(2===v.encoding)m++,a=Math.min(a,0);else{if(0!==w&&2!==w){w>>=6;v.offsetType=
w;if(2===w)v.offset=q.getInt8(1),z++;else if(1===w)v.offset=q.getInt16(1,!0),z+=2;else if(0===w)v.offset=q.getFloat32(1,!0),z+=4;else throw"Invalid block offset type";a=Math.min(v.offset,a);if(1===v.encoding)if(w=q.getUint8(z),z++,v.bitsPerPixel=w&63,w>>=6,v.numValidPixelsType=w,2===w)v.numValidPixels=q.getUint8(z),z++;else if(1===w)v.numValidPixels=q.getUint16(z,!0),z+=2;else if(0===w)v.numValidPixels=q.getUint32(z,!0),z+=4;else throw"Invalid valid pixel count type";}m+=z;if(3!=v.encoding)if(0===
v.encoding){q=(c.pixels.numBytes-1)/4;if(q!==Math.floor(q))throw"uncompressed block has invalid length";z=new ArrayBuffer(4*q);w=new Uint8Array(z);w.set(new Uint8Array(p,m,4*q));z=new Float32Array(z);for(w=0;w<z.length;w++)a=Math.min(a,z[w]);v.rawData=z;m+=4*q}else 1===v.encoding&&(q=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),z=new ArrayBuffer(4*Math.ceil(q/4)),w=new Uint8Array(z),w.set(new Uint8Array(p,m,q)),v.stuffedData=new Uint32Array(z),m+=q)}}c.pixels.minValue=a;c.eofOffset=m;p=null!=f.noDataValue?
f.noDataValue:b.defaultNoDataValue;var h=f.encodedMaskData,v=f.returnMask,q=0,e=c.pixels.numBlocksX,a=c.pixels.numBlocksY,k=Math.floor(c.width/e),r=Math.floor(c.height/a),u=2*c.maxZError,h=h||(c.mask?c.mask.bitset:null),t,m=new (f.pixelType||Float32Array)(c.width*c.height);v&&h&&(t=new Uint8Array(c.width*c.height));for(var v=new Float32Array(k*r),d,n,z=0;z<=a;z++)if(w=z!==a?r:c.height%a,0!==w)for(var x=0;x<=e;x++){var y=x!==e?k:c.width%e;if(0!==y){var A=z*c.width*r+x*k,D=c.width-y,B=c.pixels.blocks[q],
F,C;if(2>B.encoding){if(0===B.encoding)F=B.rawData;else{F=B.stuffedData;C=B.bitsPerPixel;d=B.numValidPixels;n=B.offset;var G=u,ba=v,Z=c.pixels.maxValue,V=(1<<C)-1,I=0,fa=void 0,M=0,W=void 0,N=void 0,H=Math.ceil((Z-n)/G);F[F.length-1]<<=8*(4*F.length-Math.ceil(C*d/8));for(fa=0;fa<d;fa++)0===M&&(N=F[I++],M=32),M>=C?(W=N>>>M-C&V,M-=C):(M=C-M,W=(N&V)<<M&V,N=F[I++],M=32-M,W+=N>>>M),ba[fa]=W<H?n+W*G:Z;F=v}C=0}else l=2===B.encoding?0:B.offset;var O;if(h)for(n=0;n<w;n++){A&7&&(O=h[A>>3],O<<=A&7);for(d=0;d<
y;d++)A&7||(O=h[A>>3]),O&128?(t&&(t[A]=1),m[A++]=2>B.encoding?F[C++]:l):(t&&(t[A]=0),m[A++]=p),O<<=1;A+=D}else if(2>B.encoding)for(n=0;n<w;n++){for(d=0;d<y;d++)m[A++]=F[C++];A+=D}else for(n=0;n<w;n++){for(d=0;d<y;d++)m[A++]=l;A+=D}if(1===B.encoding&&C!==B.numValidPixels)throw"Block and Mask do not match";q++}}l=t;t={width:c.width,height:c.height,pixelData:m,minValue:c.pixels.minValue,maxValue:c.pixels.maxValue,noDataValue:p};l&&(t.maskData=l);f.returnEncodedMask&&c.mask&&(t.encodedMaskData=c.mask.bitset?
c.mask.bitset:null);if(f.returnFileInfo&&(t.fileInfo=g(c),f.computeUsedBitDepths)){f=t.fileInfo;l=c.pixels.numBlocksX*c.pixels.numBlocksY;O={};for(F=0;F<l;F++)C=c.pixels.blocks[F],0===C.encoding?O.float32=!0:1===C.encoding?O[C.bitsPerPixel]=!0:O[0]=!0;c=Object.keys(O);f.bitDepths=c}return t}},g=function(b){return{fileIdentifierString:b.fileIdentifierString,fileVersion:b.fileVersion,imageType:b.imageType,height:b.height,width:b.width,maxZError:b.maxZError,eofOffset:b.eofOffset,mask:b.mask?{numBlocksX:b.mask.numBlocksX,
numBlocksY:b.mask.numBlocksY,numBytes:b.mask.numBytes,maxValue:b.mask.maxValue}:null,pixels:{numBlocksX:b.pixels.numBlocksX,numBlocksY:b.pixels.numBlocksY,numBytes:b.pixels.numBytes,maxValue:b.pixels.maxValue,minValue:b.pixels.minValue,noDataValue:this.noDataValue}}};return b})},"esri/support/LayersMixin":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Collection ../core/collectionUtils ../core/Logger ../core/promiseUtils ../core/accessorSupport/decorators ../layers/Layer".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){function k(a,c,b){for(var e,d=0,f=a.length;d<f;d++)if(e=a.getItemAt(d),e[c]===b||e&&null!=e.layers&&(e=k(e.layers,c,b)))return e}var r=m.ofType(a),u=c.getLogger("esri.support.LayersMixin");return function(c){function b(a){var b=c.call(this,a)||this;b.layers=new r;b.layers.on("after-add",function(a){a=a.item;a.parent&&a.parent!==b&&"remove"in a.parent&&a.parent.remove(a);a.parent=b;b.layerAdded(a);"elevation"===a.type&&u.error("Layer '"+a.title+", id:"+a.id+"' of type '"+
a.type+"' is not supported as an operational layer and will therefore be ignored.")});b.layers.on("after-remove",function(a){a=a.item;a.parent=null;b.layerRemoved(a)});return b}p(b,c);b.prototype.destroy=function(){this.layers.drain(this.layerRemoved,this)};Object.defineProperty(b.prototype,"layers",{set:function(a){this._set("layers",h.referenceSetter(a,this._get("layers"),r))},enumerable:!0,configurable:!0});b.prototype.findLayerById=function(a){return k(this.layers,"id",a)};b.prototype.add=function(c,
b){var d=this,e=this.layers;b=e.getNextIndex(b);c instanceof a?(c.parent===this&&this.reorder(c,b),e.add(c,b)):q.isThenable(c)?c.then(function(a){d.destroyed||d.add(a,b)}):u.error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")};b.prototype.addMany=function(a,c){var b=this,e=this.layers;c=e.getNextIndex(c);a.slice().forEach(function(a){a.parent===b?b.reorder(a,c):(e.add(a,c),c+=1)})};b.prototype.findLayerByUid=function(a){return k(this.layers,"uid",a)};b.prototype.remove=
function(a){return this.layers.remove(a)};b.prototype.removeMany=function(a){return this.layers.removeMany(a)};b.prototype.removeAll=function(){return this.layers.removeAll()};b.prototype.reorder=function(a,c){return this.layers.reorder(a,c)};b.prototype.layerAdded=function(a){};b.prototype.layerRemoved=function(a){};f([e.property({type:r,cast:h.castForReferenceSetter})],b.prototype,"layers",null);return b=f([e.subclass("esri.support.LayersMixin")],b)}(e.declared(l))})},"esri/Viewpoint":function(){define(["./core/JSONSupport",
"./Camera","./geometry/support/typeUtils","./geometry/support/jsonUtils"],function(b,g,p,f){var l=b.createSubclass({declaredClass:"esri.Viewpoint",properties:{rotation:{type:Number,value:0,cast:function(b){b%=360;0>b&&(b+=360);return b},json:{write:!0}},scale:{type:Number,value:0,json:{write:!0}},targetGeometry:{value:null,types:p.types,json:{read:function(b){return f.fromJSON(b)},write:!0}},camera:{value:null,type:g,json:{write:!0}}},clone:function(){return new l({rotation:this.rotation,scale:this.scale,
targetGeometry:this.targetGeometry?this.targetGeometry.clone():null,camera:this.camera?this.camera.clone():null})}});return l})},"esri/Camera":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/accessorSupport/decorators ./geometry/Point ./views/3d/support/mathUtils".split(" "),function(b,g,p,f,l,m,h,c){return function(b){function e(a,c,e,f){a=b.call(this)||this;a.position=null;a.heading=0;a.tilt=0;a.fov=55;return a}p(e,
b);a=e;e.prototype.getDefaults=function(a){if(!a.position)return{position:new h([0,0,0])}};e.prototype.normalizeCtorArgs=function(a,c,b,e){a&&"object"===typeof a&&("x"in a||Array.isArray(a))&&(a={position:a},null!=c&&(a.heading=c),null!=b&&(a.tilt=b),null!=e&&(a.fov=e));return a};e.prototype.equals=function(a){return a?this.tilt===a.tilt&&this.heading===a.heading&&this.fov===a.fov&&this.position.equals(a.position):!1};e.prototype.clone=function(){return new a({position:this.position.clone(),heading:this.heading,
tilt:this.tilt,fov:this.fov})};var a;f([m.property({type:h,json:{write:{isRequired:!0}}})],e.prototype,"position",void 0);f([m.property({type:Number,json:{write:{isRequired:!0}}}),m.cast(c.cyclicalDeg.normalize)],e.prototype,"heading",void 0);f([m.property({type:Number,json:{write:{isRequired:!0}}}),m.cast(function(a){return c.clamp(a,-180,180)})],e.prototype,"tilt",void 0);f([m.property({json:{read:!1,write:!1}})],e.prototype,"fov",void 0);return e=a=f([m.subclass("esri.Camera")],e)}(m.declared(l))})},
"esri/geometry/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Extent ../Geometry ../Mesh ../Multipoint ../Point ../Polygon ../Polyline".split(" "),function(b,g,p,f,l,m,h,c,q,e){Object.defineProperty(g,"__esModule",{value:!0});g.types={base:l,key:"type",typeMap:{extent:f,multipoint:h,point:c,polyline:e,polygon:q,mesh:m}};g.ensureType=p.ensureOneOfType(g.types)})},"esri/layers/graphics/controllers/AutoController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../Graphic ../../../core/Accessor ../../../core/Collection ../../../core/Error ../../../core/Promise ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../tasks/QueryTask ../../../tasks/support/StatisticDefinition".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r){var u;(function(a){a[a.Snapshot=0]="Snapshot";a[a.OnDemand=1]="OnDemand"})(u||(u={}));return function(g){function q(){var a=null!==g&&g.apply(this,arguments)||this;a.maxPointCountForAuto=4E3;a.maxRecordCountForAuto=2E3;a.maxVertexCountForAuto=25E4;return a}p(q,g);q.prototype.initialize=function(){var a=this,c=this.layer.when(function(){a._verifyCapabilities()}).then(function(){return a._figureOutMode().then(function(c){return a._createController(c)})}).then(function(c){return a._set("activeController",
c)});this.addResolvingPromise(c)};q.prototype.destroy=function(){this.activeController&&(this.activeController.destroy(),this._set("activeController",null))};Object.defineProperty(q.prototype,"countThresholdForAuto",{get:function(){var a=this.layer.geometryType,c;"polyline"===a||"polygon"===a||"multipoint"===a?c=this.maxRecordCountForAuto:"point"===a&&(c=this.maxPointCountForAuto);return c},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"updating",{get:function(){return!1===this.isFulfilled()||
!0===this.get("activeController.updating")},enumerable:!0,configurable:!0});q.prototype._figureOutMode=function(){return this._isStatisticsSupported()?this._checkByStatistics():this._checkByCount()};q.prototype._isStatisticsSupported=function(){return this.layer.source.parsedUrl?/(https?:)?\/\/services.*\.arcgis\.com/i.test(this.layer.source.parsedUrl.path):!1};q.prototype._checkByStatistics=function(){var a=this,c=this.layer,b=c.source.parsedUrl.path,c=c.createQuery();c.outStatistics=[new r({statisticType:"exceedslimit",
maxPointCount:this.maxPointCountForAuto,maxRecordCount:this.maxRecordCountForAuto,maxVertexCount:this.maxVertexCountForAuto,outStatisticFieldName:"exceedslimit"})];return(new k({url:b+"/query"})).execute(c).then(function(c){c=c&&c.features&&c.features[0];if(0===(c&&c.attributes&&c.attributes.exceedslimit)){c=a.layer;var b=c.maxRecordCount;if(c.get("capabilities.query.supportsPagination")||b>=a.countThresholdForAuto)return u.Snapshot}return u.OnDemand})};q.prototype._checkByCount=function(){var a=
this,c=this.layer;return c.queryFeatureCount().then(function(b){return b<=a.countThresholdForAuto&&b<=c.maxRecordCount?u.Snapshot:u.OnDemand})};q.prototype._createController=function(a){var c=this;return(a===u.OnDemand?e.create(function(a){return b(["./OnDemandController2D"],a)}):e.create(function(a){return b(["./SnapshotController"],a)})).then(function(a){return new a({layer:c.layer,layerView:c.layerView,graphics:c.graphics})}).catch(function(c){throw Error("Module path not found for controller type: "+
(a===u.Snapshot?"snapshot":"on demand"));})};q.prototype._verifyCapabilities=function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new c("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:this.layer});};f([a.property()],q.prototype,"activeController",void 0);f([a.property({dependsOn:["layer.geometryType"]})],q.prototype,"countThresholdForAuto",null);f([a.property({type:h.ofType(l)})],q.prototype,"graphics",
void 0);f([a.property()],q.prototype,"layer",void 0);f([a.property()],q.prototype,"layerView",void 0);f([a.property({dependsOn:["activeController.updating"]})],q.prototype,"updating",null);f([a.aliasOf("activeController.update")],q.prototype,"update",void 0);return q=f([a.subclass("esri.layers.graphics.controllers.AutoController2D")],q)}(a.declared(m,q))})},"esri/Graphic":function(){define("require exports ./core/tsSupport/assignHelper ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./geometry ./PopupTemplate ./core/JSONSupport ./core/lang ./core/accessorSupport/decorators ./geometry/support/typeUtils ./symbols/support/jsonUtils ./symbols/support/typeUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r){b=function(c){function b(a,b,e,f){a=c.call(this,a,b,e,f)||this;a.layer=null;a.popupTemplate=null;a.sourceLayer=null;Object.defineProperty(a,"uid",{value:g.generateUID()});return a}f(b,c);g=b;b.prototype.normalizeCtorArgs=function(a,c,b,e){return a&&!a.declaredClass?a:{geometry:a,symbol:c,attributes:b,popupTemplate:e}};Object.defineProperty(b.prototype,"attributes",{set:function(a){var c=this._get("attributes");c!==a&&(this._set("attributes",a),this._notifyLayer("attributes",
c,a))},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"geometry",{set:function(a){var c=this._get("geometry");c!==a&&(this._set("geometry",a),this._notifyLayer("geometry",c,a))},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"symbol",{set:function(a){var c=this._get("symbol");c!==a&&(this._set("symbol",a),this._notifyLayer("symbol",c,a))},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"visible",{set:function(a){var c=this._get("visible");c!==
a&&(this._set("visible",a),this._notifyLayer("visible",c,a))},enumerable:!0,configurable:!0});b.prototype.getEffectivePopupTemplate=function(){return this.popupTemplate||this.sourceLayer&&this.sourceLayer.popupTemplate};b.prototype.getAttribute=function(a){return this.attributes&&this.attributes[a]};b.prototype.setAttribute=function(a,c){var b;this.attributes?(b=this.getAttribute(a),this.attributes[a]=c,this._notifyLayer("attributes",b,c,a)):(this.attributes=(b={},b[a]=c,b),this._notifyLayer("attributes",
void 0,c,a))};b.prototype.toJSON=function(){return{geometry:this.geometry&&this.geometry.toJSON(),symbol:this.symbol&&this.symbol.toJSON(),attributes:p({},this.attributes),popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}};b.prototype.clone=function(){return new g({attributes:q.clone(this.attributes),geometry:this.geometry&&this.geometry.clone()||null,layer:this.layer,popupTemplate:this.popupTemplate&&this.popupTemplate.clone(),sourceLayer:this.sourceLayer,symbol:this.symbol&&this.symbol.clone()||
null,visible:this.visible})};b.prototype._notifyLayer=function(a,c,b,e){this.layer&&(c={graphic:this,property:a,oldValue:c,newValue:b},"attributes"===a&&(c.attributeName=e),this.layer.graphicChanged(c))};var g;l([e.property({value:null})],b.prototype,"attributes",null);l([e.property({value:null,types:a.types,json:{read:m.fromJSON}})],b.prototype,"geometry",null);l([e.property()],b.prototype,"layer",void 0);l([e.property({type:h})],b.prototype,"popupTemplate",void 0);l([e.property()],b.prototype,"sourceLayer",
void 0);l([e.property({value:null,types:r.types,json:{read:k.read}})],b.prototype,"symbol",null);l([e.property({type:Boolean,value:!0,set:function(a){}})],b.prototype,"visible",null);return b=g=l([e.subclass("esri.Graphic")],b)}(e.declared(c));var u=0;(function(a){a.generateUID=function(){return u++}})(b||(b={}));return b})},"esri/PopupTemplate":function(){define("require exports ./core/tsSupport/assignHelper ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/Collection ./core/date ./core/JSONSupport ./core/kebabDictionary ./core/lang ./core/accessorSupport/decorators ./layers/support/fieldUtils ./support/arcadeUtils ./support/actions/ActionBase ./support/actions/ActionButton ./support/actions/ActionToggle".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){var w=m.ofType({key:"type",defaultKeyValue:"button",base:u,typeMap:{button:z,toggle:v}}),t=q({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),d=q({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});return function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a.actions=null;a.content="";a.expressionInfos=null;a.fieldInfos=null;a.layerOptions=null;a.overwriteActions=!1;a.title="";a.relatedRecordsInfo=
null;return a}f(b,c);g=b;b.prototype.readContent=function(a,c){var b=this,d=c.description,e=c.mediaInfos;a=c.showAttachments;if((c=c.popupElements)&&c.length)return c.map(function(a){"text"!==a.type||a.text?"media"===a.type&&(a.mediaInfos||e)&&(a.mediaInfos||(a.mediaInfos=e),a.mediaInfos=b._readMediaInfos(a.mediaInfos)):a.text=d;return a});c=[];d?c.push({type:"text",text:d}):c.push({type:"fields"});e&&e.length&&c.push({type:"media",mediaInfos:this._readMediaInfos(e)});a&&c.push({type:"attachments",
displayType:"list"});return c.length?c:d};b.prototype.writeContent=function(a,c){var b=this;c.showAttachments=!1;"string"===typeof a?c.description=a:Array.isArray(a)&&(c.popupElements=e.clone(a),c.popupElements.forEach(function(a){"attachments"!==a.type||c.showAttachments?"media"!==a.type||c.mediaInfos?"text"!==a.type||c.description?"fields"!==a.type||c.fieldInfos||(a.fieldInfos&&(c.fieldInfos=b._writeFieldInfos(e.clone(a.fieldInfos))),delete a.fieldInfos):(a.text&&(c.description=a.text),delete a.text):
(a.mediaInfos&&(c.mediaInfos=e.clone(a.mediaInfos),c.mediaInfos.forEach(function(a){a.type=d.toJSON(a.type)})),delete a.mediaInfos):c.showAttachments=!0;return a}))};b.prototype.writeExpressionInfos=function(a,c){c.expressionInfos=a||null};b.prototype.readFieldInfos=function(a){if(a)return a.forEach(function(a){var c=a.format&&a.format.dateFormat,b=a.stringFieldOption;c&&(a.format.dateFormat=h.fromJSON(c));b&&(a.stringFieldOption=t.fromJSON(b))}),a};b.prototype.writeFieldInfos=function(a,c){c.fieldInfos=
a?this._writeFieldInfos(e.clone(a)):a};b.prototype.writeLayerOptions=function(a,c){c.layerOptions=a||null};b.prototype.writeTitle=function(a,c){c.title=a||""};b.prototype.writeRelatedRecordsInfo=function(a,c){c.relatedRecordsInfo=a||null};Object.defineProperty(b.prototype,"requiredFields",{get:function(){return this.collectRequiredFields()},enumerable:!0,configurable:!0});b.prototype.clone=function(){var a=this.actions,a=a?e.clone(a.toArray()):[];return new g({actions:a,content:Array.isArray(this.content)?
e.clone(this.content):this.content,fieldInfos:this.fieldInfos?e.clone(this.fieldInfos):null,layerOptions:this.layerOptions?e.clone(this.layerOptions):null,overwriteActions:this.overwriteActions,relatedRecordsInfo:this.relatedRecordsInfo?e.clone(this.relatedRecordsInfo):null,title:this.title})};b.prototype.collectRequiredFields=function(){var a=this._getActionsFields(this.actions).concat(this._getTitleFields(this.title),this._getContentFields(this.content),this._getExpressionInfoFields(this.expressionInfos));
return-1!==a.indexOf("*")?["*"]:a.filter(function(a,c,b){return c===b.indexOf(a)})};b.prototype._getContentElementFields=function(a){var c=this;if(!a||"attachments"===a.type)return[];if("fields"===a.type)return this._getFieldInfoFields(a.fieldInfos||this.fieldInfos);if("media"===a.type)return(a.mediaInfos||[]).reduce(function(a,b){return a.concat(c._getMediaInfoFields(b))},[]);if("text"===a.type)return k.extractFieldNames(a.text)};b.prototype._getMediaInfoFields=function(a){var c=a.caption,b=a.value||
{},d=b.fields,e=void 0===d?[]:d,d=b.normalizeField,f=b.tooltipField,h=b.sourceURL,b=b.linkURL;a=k.extractFieldNames(a.title).concat(k.extractFieldNames(c),k.extractFieldNames(h),k.extractFieldNames(b),e);d&&a.push(d);f&&a.push(f);return a};b.prototype._getContentFields=function(a){var c=this;return"string"===typeof a?k.extractFieldNames(a):Array.isArray(a)?a.reduce(function(a,b){return a.concat(c._getContentElementFields(b))},[]):[]};b.prototype._getExpressionInfoFields=function(a){return a?a.reduce(function(a,
c){return a.concat(r.extractFieldNames(c.expression))},[]):[]};b.prototype._getFieldInfoFields=function(a){return a?a.filter(function(a){return"undefined"===typeof a.visible?!0:!!a.visible}).map(function(a){return a.fieldName}).filter(function(a){return-1===a.indexOf("relationships/")&&-1===a.indexOf("expression/")}):[]};b.prototype._getActionsFields=function(a){var c=this;return a?a.toArray().reduce(function(a,b){return a.concat(c._getActionFields(b))},[]):[]};b.prototype._getActionFields=function(a){var c=
a.className,b=a.type,b="button"===b||"toggle"===b?a.image:"";return k.extractFieldNames(a.title).concat(k.extractFieldNames(c),k.extractFieldNames(b))};b.prototype._getTitleFields=function(a){return"string"===typeof a?k.extractFieldNames(a):[]};b.prototype._readMediaInfos=function(a){a.forEach(function(a){a.type=d.fromJSON(a.type)});return a};b.prototype._writeFieldInfos=function(a){a.forEach(function(a){var c=a.format&&a.format.dateFormat,b=a.stringFieldOption;c&&(a.format.dateFormat=h.toJSON(c));
b&&(a.stringFieldOption=t.toJSON(b));a.format||delete a.format});return a};var g;l([a.property({type:w})],b.prototype,"actions",void 0);l([a.property()],b.prototype,"content",void 0);l([a.reader("content",["description","popupElements","mediaInfos","showAttachments"])],b.prototype,"readContent",null);l([a.writer("content")],b.prototype,"writeContent",null);l([a.property()],b.prototype,"expressionInfos",void 0);l([a.writer("expressionInfos")],b.prototype,"writeExpressionInfos",null);l([a.property()],
b.prototype,"fieldInfos",void 0);l([a.reader("fieldInfos")],b.prototype,"readFieldInfos",null);l([a.writer("fieldInfos")],b.prototype,"writeFieldInfos",null);l([a.property()],b.prototype,"layerOptions",void 0);l([a.writer("layerOptions")],b.prototype,"writeLayerOptions",null);l([a.property()],b.prototype,"overwriteActions",void 0);l([a.property()],b.prototype,"title",void 0);l([a.writer("title")],b.prototype,"writeTitle",null);l([a.property()],b.prototype,"relatedRecordsInfo",void 0);l([a.writer("relatedRecordsInfo")],
b.prototype,"writeRelatedRecordsInfo",null);l([a.property({dependsOn:["actions","title","content","fieldInfos","expressionInfos"],readOnly:!0})],b.prototype,"requiredFields",null);return b=g=l([a.subclass("esri.PopupTemplate")],b)}(a.declared(c))})},"esri/core/date":function(){define(["require","exports","./kebabDictionary"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});var f={"short-date":"(datePattern: 'M/d/y', selector: 'date')","short-date-le":"(datePattern: 'd/M/y', selector: 'date')",
"long-month-day-year":"(datePattern: 'MMMM d, y', selector: 'date')","day-short-month-year":"(datePattern: 'd MMM y', selector: 'date')","long-date":"(datePattern: 'EEEE, MMMM d, y', selector: 'date')","short-date-short-time":"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-le-short-time":"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-short-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')",
"short-date-le-short-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')","short-date-long-time":"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')","short-date-le-long-time":"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')","short-date-long-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')","short-date-le-long-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')",
"long-month-year":"(datePattern: 'MMMM y', selector: 'date')","short-month-year":"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"};b=p({shortDate:"short-date",shortDateLE:"short-date-le",longDate:"long-date",dayShortMonthYear:"day-short-month-year",longMonthDayYear:"long-month-day-year",shortDateLongTime:"short-date-long-time",shortDateLELongTime:"short-date-le-long-time",shortDateShortTime:"short-date-short-time",shortDateLEShortTime:"short-date-le-short-time",
shortDateShortTime24:"short-date-short-time-24",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLongTime24:"short-date-long-time-24",shortDateLELongTime24:"short-date-le-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year"});g.toJSON=b.toJSON;g.fromJSON=b.fromJSON;g.getFormat=function(b){return f[b]}})},"esri/layers/support/fieldUtils":function(){define(["require","exports","../../core/object"],function(b,g,p){function f(b,f,c){if(b)for(var h=0;h<b.length;h++){var e=
b[h],a=p.getDeepValue(e,f);(a=a&&"function"!==typeof a&&l(a,c))&&p.setDeepValue(e,a.name,f)}}function l(b,f){if("string"!==typeof b)return null;if(null!=f){b=b.toLowerCase();for(var c=0;c<f.length;c++){var h=f[c];if(h&&h.name.toLowerCase()===b)return h}}return null}Object.defineProperty(g,"__esModule",{value:!0});g.extractFieldNames=function(b){if(!b||"string"!==typeof b)return[];b=b.match(/{[^}]*}/g);if(!b)return[];var f=/\{(\w+):.+\}/;return(b=b.filter(function(c){return!(0===c.indexOf("{relationships/")||
0===c.indexOf("{expression/"))}).map(function(c){return c.replace(f,"{$1}")}))?b.map(function(c){return c.slice(1,-1)}):[]};g.fixRendererFields=function(b,h){if(null!=b&&null!=h){var c=0;for(b=Array.isArray(b)?b:[b];c<b.length;c++){var l=b[c];f(g.rendererFields,l,h);if(l.visualVariables)for(var e=0,l=l.visualVariables;e<l.length;e++)f(g.visualVariableFields,l[e],h)}}};g.getField=l;g.rendererFields="field field2 field3 normalizationField rotationInfo.field proportionalSymbolInfo.field proportionalSymbolInfo.normalizationField colorInfo.field colorInfo.normalizationField".split(" ");
g.visualVariableFields=["field","normalizationField"];g.numericTypes=["integer","small-integer","single","double"];g.isNumericField=function(b,f){return b?-1<g.numericTypes.indexOf(b.type)&&b.name!==f.objectIdField:!1};g.isStringField=function(b,f){return b?"string"===b.type&&b.name!==f.objectIdField:!1};g.isDateField=function(b){return b?"date"===b.type:!1}})},"esri/support/arcadeUtils":function(){define("require exports ../arcade/arcade ../arcade/Dictionary ../arcade/Feature ../core/lang".split(" "),
function(b,g,p,f,l,m){function h(c){var a;try{a=c?p.parseScript(c):null}catch(k){a=null}return a}Object.defineProperty(g,"__esModule",{value:!0});var c=/^\$feature\./i,q={vars:{$feature:"any",$view:"any"},spatialReference:null};g.createSyntaxTree=h;g.createFunction=function(c,a){a=a||m.clone(q);c="string"===typeof c?h(c):c;if(!c)return null;var b;try{b=c?p.compileScript(c,a):null}catch(r){b=null}return b};g.createExecContext=function(c,a){return{vars:{$feature:null==c?new l:l.createFromGraphic(c),
$view:a&&a.view},spatialReference:a&&a.sr}};g.createFeature=function(c,a,b){return l.createFromGraphicLikeObject(a,c,b)};g.updateExecContext=function(c,a){c.vars.$feature=a};g.evalSyntaxTree=function(c,a){var b;try{b=p.executeScript(c,a,a.spatialReference)}catch(r){b=null}return b};g.executeFunction=function(c,a){var b;try{b=c?c(a,a.spatialReference):null}catch(r){b=null}return b};g.extractFieldNames=function(b){if(!b)return[];b="string"===typeof b?h(b):b;if(!b)return[];var a=[];p.extractFieldLiterals(b).forEach(function(b){c.test(b)&&
(b=b.replace(c,""),a.push(b))});a.sort();return a.filter(function(c,b){return 0===b||a[b-1]!==c})};g.dependsOnView=function(c){return p.referencesMember(c,"$view")};g.getViewInfo=function(c){if(c&&c.viewingMode&&null!=c.scale&&c.spatialReference)return{view:new f({viewingMode:c.viewingMode,scale:c.scale}),sr:c.spatialReference}};g.hasGeometryOperations=function(c){return(c="string"===typeof c?h(c):c)&&p.scriptUsesGeometryEngine(c)};g.enableGeometryOperations=function(){return p.enableGeometrySupport()}})},
"esri/arcade/arcade":function(){define("require exports dojo/Deferred dojo/has ./arcadeCompiler ./arcadeRuntime ./parser".split(" "),function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});var c="disjoint intersects touches crosses within contains overlaps equals relate intersection union difference symmetricdifference clip cut area areageodetic length lengthgeodetic distance densify densifygeodetic generalize buffer buffergeodetic offset rotate issimple simplify multiparttosinglepart".split(" ");
g.compileScript=function(c,b){return f("csp-restrictions")?function(a,b){return m.executeScript(c,a,b)}:l.compileScript(c,b)};g.extend=function(c){m.extend(c);l.extend(c)};g.parseScript=function(c){return h.parseScript(c)};g.validateScript=function(c,b){return h.validateScript(c,b,"simple")};g.scriptCheck=function(c,b,a){return h.scriptCheck(c,b,a,"full")};g.parseAndExecuteScript=function(c,b,a){return m.executeScript(h.parseScript(c),b,a)};g.executeScript=function(c,b,a){return m.executeScript(c,
b,a)};g.referencesMember=function(c,b){return m.referencesMember(c,b)};g.referencesFunction=function(c,b){return m.referencesFunction(c,b)};g.extractFieldLiterals=function(c,b){void 0===b&&(b=!1);return h.extractFieldLiterals(c,b)};g.scriptUsesGeometryEngine=function(b){b=m.findFunctionCalls(b);for(var e=0;e<b.length;e++)if(-1<c.indexOf(b[e]))return!0;return!1};g.enableGeometrySupport=function(){var c=new p;b(["esri/geometry/geometryEngine","./functions/geomsync"],function(b,a){a.setGeometryEngine(b);
c.resolve(!0)},function(b){c.reject(b)});return c.promise}})},"esri/arcade/arcadeCompiler":function(){define("require exports ./Dictionary ./Feature ./ImmutablePathArray ./ImmutablePointArray ./languageUtils ./treeAnalysis ./functions/date ./functions/geometry ./functions/geomsync ./functions/maths ./functions/stats ./functions/string ../geometry/Extent ../geometry/Geometry ../geometry/Multipoint ../geometry/Point ../geometry/Polygon ../geometry/Polyline ../geometry/SpatialReference".split(" "),function(b,
g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x){function y(a,c,b){try{return b(a,null,c)}catch(ka){throw ka;}}function A(a,b){try{switch(b.type){case "EmptyStatement":return"lc.voidOperation";case "VariableDeclarator":return G(a,b);case "VariableDeclaration":for(var d=[],e=0;e<b.declarations.length;e++)d.push(A(a,b.declarations[e]));return d.join("\n")+" \n lastStatement\x3d  lc.voidOperation; \n";case "BlockStatement":return C(a,b);case "FunctionDeclaration":var e=b.id.name.toLowerCase(),f={applicationCache:void 0===
a.applicationCache?null:a.applicationCache,spatialReference:a.spatialReference,console:a.console,symbols:a.symbols,localScope:{_SymbolsMap:{}},depthCounter:a.depthCounter+1,globalScope:a.globalScope};if(64<f.depthCounter)throw Error("Exceeded maximum function depth");for(var k="new lc.SizzleFunction( lang.functionDepthchecker(function() { var lastStatement \x3d lc.voidOperation; var lscope \x3d [];\n ",h=0;h<b.params.length;h++){var g=b.params[h].name.toLowerCase(),n=W(g,a);f.localScope._SymbolsMap[g]=
n;k+="lscope['"+n+"']\x3darguments["+h.toString()+"];\n"}k+=C(f,b.body)+"\n return lastStatement; }, runtimeCtx))";k+="\n lastStatement \x3d lc.voidOperation; \n";void 0!==a.globalScope[e]?d="gscope['"+e+"']\x3d"+k:void 0!==a.globalScope._SymbolsMap[e]?d="gscope['"+a.globalScope._SymbolsMap[e]+"']\x3d"+k:(n=W(e,a),a.globalScope._SymbolsMap[e]=n,d="gscope['"+n+"']\x3d"+k);return d;case "ReturnStatement":var l;l=null===b.argument?"return lc.voidOperation;":"return "+A(a,b.argument)+";";return l;case "IfStatement":if("AssignmentExpression"===
b.test.type||"UpdateExpression"===b.test.type)throw Error(c.nodeErrorMessage(b.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var q=A(a,b.test),m=N(a),r="var "+m+" \x3d "+q+";\n if ("+m+" \x3d\x3d\x3d true) {\n"+F(a,b.consequent)+"\n }\n",r=null!==b.alternate?r+("else if ("+m+"\x3d\x3d\x3dfalse)   { \n"+F(a,b.alternate)+"}\n"):r+("else if ("+m+"\x3d\x3d\x3dfalse) { \n lastStatement \x3d lc.voidOperation;\n }\n");return r+="else { lang.error({type: '"+b.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); \n}\n";
case "ExpressionStatement":var t;t="AssignmentExpression"===b.expression.type?"lastStatement \x3d lc.voidOperation; "+A(a,b.expression)+" \n ":"lastStatement \x3d "+A(a,b.expression)+";";return t;case "AssignmentExpression":return B(a,b);case "UpdateExpression":return D(a,b);case "BreakStatement":return"break;";case "ContinueStatement":return"continue;";case "ForStatement":d="lastStatement \x3d lc.voidOperation; \n";null!==b.init&&(d+=A(a,b.init));var p=N(a),u=N(a),d=d+("var "+p+" \x3d true;")+"\n do { ";
null!==b.update&&(d+=" if ("+p+"\x3d\x3d\x3dfalse) {\n "+A(a,b.update)+"  \n}\n "+p+"\x3dfalse; \n");null!==b.test&&(d+="var "+u+" \x3d "+A(a,b.test)+";",d+="if ("+u+"\x3d\x3d\x3dfalse) { break; } else if ("+u+"!\x3d\x3dtrue) { lang.error({type: '"+b.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION');   }\n");d+=A(a,b.body);null!==b.update&&(d+="\n "+A(a,b.update));return d+("\n"+p+" \x3d true; \n} while(true);  lastStatement \x3d lc.voidOperation;");case "ForInStatement":var x=N(a),z=N(a),
y=N(a),v="var "+x+" \x3d "+A(a,b.right)+";\n";"VariableDeclaration"===b.left.type&&(v+=A(a,b.left));var w="VariableDeclaration"===b.left.type?b.left.declarations[0].id.name:b.left.name,w=w.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[w]?d="lscope['"+w+"']":void 0!==a.localScope._SymbolsMap[w]&&(d="lscope['"+a.localScope._SymbolsMap[w]+"']"));""===d&&(void 0!==a.globalScope[w]?d="gscope['"+w+"']":void 0!==a.globalScope._SymbolsMap[w]&&(d="gscope['"+a.globalScope._SymbolsMap[w]+"']"));
v=v+("if ("+x+"\x3d\x3d\x3dnull) {  lastStatement \x3d lc.voidOperation; }\n ")+("else if (lc.isArray("+x+") || lc.isString("+x+")) {")+("var "+z+"\x3d"+x+".length; \n")+("for(var "+y+"\x3d0; "+y+"\x3c"+z+"; "+y+"++) {\n");v+=d+"\x3d"+y+";\n";v+=A(a,b.body);v+="\n}\n";v+=" lastStatement \x3d lc.voidOperation; \n";v+=" \n}\n";v+="else if (lc.isImmutableArray("+x+")) {";v=v+("var "+z+"\x3d"+x+".length(); \n")+("for(var "+y+"\x3d0; "+y+"\x3c"+z+"; "+y+"++) {\n");v+=d+"\x3d"+y+";\n";v+=A(a,b.body);v+=
"\n}\n";v+=" lastStatement \x3d lc.voidOperation; \n";v+=" \n}\n";v+="else if (( "+x+" instanceof lang.Dictionary) || ( "+x+" instanceof lang.Feature)) {";v=v+("var "+z+"\x3d"+x+".keys(); \n")+("for(var "+y+"\x3d0; "+y+"\x3c"+z+".length; "+y+"++) {\n");v+=d+"\x3d"+z+"["+y+"];\n";v+=A(a,b.body);v+="\n}\n";v+=" lastStatement \x3d lc.voidOperation; \n";v+=" \n}\n";return v+"else { lastStatement \x3d lc.voidOperation; } \n";case "Identifier":return Z(a,b);case "MemberExpression":var H;try{d=void 0,d=
!0===b.computed?A(a,b.property):"'"+b.property.name+"'",H="lang.member("+A(a,b.object)+","+d+")"}catch(va){throw va;}return H;case "Literal":return null===b.value||void 0===b.value?"null":JSON.stringify(b.value);case "ThisExpression":throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));case "CallExpression":try{if("Identifier"!==b.callee.type)throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYNODESSUPPORTED"));var O=b.callee.name.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[O]?
d="lscope['"+O+"']":void 0!==a.localScope._SymbolsMap[O]&&(d="lscope['"+a.localScope._SymbolsMap[O]+"']"));""===d&&(void 0!==a.globalScope[O]?d="gscope['"+O+"']":void 0!==a.globalScope._SymbolsMap[O]&&(d="gscope['"+a.globalScope._SymbolsMap[O]+"']"));if(""!==d)for(e="[",f=0;f<b.arguments.length;f++)0<f&&(e+=", "),e+=A(a,b.arguments[f]);else throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTFOUND"));}catch(va){throw va;}return"lang.callfunc("+d+","+(e+"]")+",runtimeCtx)";case "UnaryExpression":var U;
try{U="lang.unary("+A(a,b.argument)+",'"+b.operator+"')"}catch(va){throw va;}return U;case "BinaryExpression":var Y;try{Y="lang.binary("+A(a,b.left)+","+A(a,b.right)+",'"+b.operator+"')"}catch(va){throw va;}return Y;case "LogicalExpression":var J;try{if("AssignmentExpression"===b.left.type||"UpdateExpression"===b.left.type)throw Error(c.nodeErrorMessage(b.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===b.right.type||"UpdateExpression"===b.right.type)throw Error(c.nodeErrorMessage(b.right,
"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("\x26\x26"===b.operator||"||"===b.operator)J="(lang.logicalCheck("+A(a,b.left)+") "+b.operator+" lang.logicalCheck("+A(a,b.right)+"))";else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}catch(va){throw va;}return J;case "ConditionalExpression":throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{d=[];for(e=0;e<b.elements.length;e++)"Literal"===b.elements[e].type?d.push(A(a,b.elements[e])):
d.push("lang.aCheck("+A(a,b.elements[e])+",'ArrayExpression')");k="["+d.join(",")+"]"}catch(va){throw va;}return k;case "ObjectExpression":d="lang.dictionary([";for(e=0;e<b.properties.length;e++){var h=b.properties[e],ba="Identifier"===h.key.type?"'"+h.key.name+"'":A(a,h.key),I=A(a,h.value);0<e&&(d+=",");d+="lang.strCheck("+ba+",'ObjectExpression'),lang.aCheck("+I+", 'ObjectExpression')"}return d+"])";case "Property":throw Error("Should not get here");case "Array":throw Error(c.nodeErrorMessage(b,
"RUNTIME","NOTSUPPORTED"));default:throw Error(c.nodeErrorMessage(b,"RUNTIME","UNREOGNISED"));}}catch(va){throw va;}}function D(a,c){var b=null,d="";if("MemberExpression"===c.argument.type)return b=A(a,c.argument.object),d=!0===c.argument.computed?A(a,c.argument.property):"'"+c.argument.property.name+"'","lang.memberupdate("+b+","+d+",'"+c.operator+"',"+c.prefix+")";b=c.argument.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[b])return"lang.update(lscope, '"+b+"','"+c.operator+
"',"+c.prefix+")";if(void 0!==a.localScope._SymbolsMap[b])return"lang.update(lscope, '"+a.localScope._SymbolsMap[b]+"','"+c.operator+"',"+c.prefix+")"}if(void 0!==a.globalScope[b])return"lang.update(gscope, '"+b+"','"+c.operator+"',"+c.prefix+")";if(void 0!==a.globalScope._SymbolsMap[b])return"lang.update(gscope, '"+a.globalScope._SymbolsMap[b]+"','"+c.operator+"',"+c.prefix+")";throw Error("Variable not recognised");}function B(a,c){var b=A(a,c.right),d=null,e="";if("MemberExpression"===c.left.type)return d=
A(a,c.left.object),e=!0===c.left.computed?A(a,c.left.property):"'"+c.left.property.name+"'","lang.assignmember("+d+","+e+",'"+c.operator+"',"+b+");";d=c.left.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[d])return"lscope['"+d+"']\x3dlang.assign("+b+",'"+c.operator+"', lscope['"+d+"']); ";if(void 0!==a.localScope._SymbolsMap[d])return"lscope['"+a.localScope._SymbolsMap[d]+"']\x3dlang.assign("+b+",'"+c.operator+"', lscope['"+a.localScope._SymbolsMap[d]+"']); "}if(void 0!==a.globalScope[d])return"gscope['"+
d+"']\x3dlang.assign("+b+",'"+c.operator+"', gscope['"+d+"']); ";if(void 0!==a.globalScope._SymbolsMap[d])return"gscope['"+a.globalScope._SymbolsMap[d]+"']\x3dlang.assign("+b+",'"+c.operator+"', gscope['"+a.globalScope._SymbolsMap[d]+"']); ";throw Error("Variable not recognised");}function F(a,c){return"BlockStatement"===c.type?A(a,c):"ReturnStatement"===c.type?A(a,c):"BreakStatement"===c.type?A(a,c):"ContinueStatement"===c.type?A(a,c):"UpdateExpression"===c.type?"lastStatement \x3d "+A(a,c)+";":
"ExpressionStatement"===c.type?A(a,c):"ObjectExpression"===c.type?"lastStatement \x3d "+A(a,c)+";":A(a,c)}function C(a,c){for(var b="",d=0;d<c.body.length;d++)b="ReturnStatement"===c.body[d].type?b+(A(a,c.body[d])+" \n"):"BreakStatement"===c.body[d].type?b+(A(a,c.body[d])+" \n"):"ContinueStatement"===c.body[d].type?b+(A(a,c.body[d])+" \n"):"UpdateExpression"===c.body[d].type?b+("lastStatement \x3d "+A(a,c.body[d])+"; \n"):"ObjectExpression"===c.body[d].type?b+("lastStatement \x3d "+A(a,c.body[d])+
"; \n"):b+(A(a,c.body[d])+" \n");return b}function G(a,c){var b=null===c.init?null:A(a,c.init);b===h.voidOperation&&(b=null);c=c.id.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[c])return"lscope['"+c+"']\x3d"+b+";";if(void 0!==a.localScope._SymbolsMap[c])return"lscope['"+a.localScope._SymbolsMap[c]+"']\x3d"+b+";";var d=W(c,a);a.localScope._SymbolsMap[c]=d;return"lscope['"+d+"']\x3d"+b+";"}if(void 0!==a.globalScope[c])return"gscope['"+c+"']\x3d"+b+";";if(void 0!==a.globalScope._SymbolsMap[c])return"gscope['"+
a.globalScope._SymbolsMap[c]+"']\x3d"+b+";";d=W(c,a);a.globalScope._SymbolsMap[c]=d;return"gscope['"+d+"']\x3d"+b+";"}function ba(a,b,d){b=b.toLowerCase();switch(b){case "hasz":return a=a.hasZ,void 0===a?!1:a;case "hasm":return a=a.hasM,void 0===a?!1:a;case "spatialreference":return b=a.spatialReference._arcadeCacheId,void 0===b&&(d=!0,Object.freeze&&Object.isFrozen(a.spatialReference)&&(d=!1),d&&(J++,b=a.spatialReference._arcadeCacheId=J)),a=new p({wkt:a.spatialReference.wkt,wkid:a.spatialReference.wkid}),
void 0!==b&&(a._arcadeCacheId="SPREF"+b.toString()),a}switch(a.type){case "extent":switch(b){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return a=a[b],void 0!==a?a:null;case "type":return"Extent"}break;case "polygon":switch(b){case "rings":return b=h.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===b&&(J++,b=J,h.isVersion4?a.cache._arcadeCacheId=b:a.setCacheValue("_arcadeCacheId",b)),a=new l(a.rings,a.spatialReference,
!0===a.hasZ,!0===a.hasM,b);case "type":return"Polygon"}break;case "point":switch(b){case "x":case "y":case "z":case "m":return void 0!==a[b]?a[b]:null;case "type":return"Point"}break;case "polyline":switch(b){case "paths":return b=h.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===b&&(J++,b=J,h.isVersion4?a.cache._arcadeCacheId=b:a.setCacheValue("_arcadeCacheId",b)),a=new l(a.paths,a.spatialReference,!0===a.hasZ,!0===a.hasM,b);case "type":return"Polyline"}break;case "multipoint":switch(b){case "points":return b=
h.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===b&&(J++,b=J,h.isVersion4?a.cache._arcadeCacheId=b:a.setCacheValue("_arcadeCacheId",b)),a=new m(a.points,a.spatialReference,!0===a.hasZ,!0===a.hasM,b,1);case "type":return"Multipoint"}}throw Error(c.nodeErrorMessage(d,"RUNTIME","PROPERTYNOTFOUND"));}function Z(a,b){try{var d=b.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[d])return"lscope['"+d+"']";if(void 0!==a.localScope._SymbolsMap[d])return"lscope['"+
a.localScope._SymbolsMap[d]+"']"}if(void 0!==a.globalScope[d])return"gscope['"+d+"']";if(void 0!==a.globalScope._SymbolsMap[d])return"gscope['"+a.globalScope._SymbolsMap[d]+"']";throw Error(c.nodeErrorMessage(b,"RUNTIME","VARIABLENOTFOUND"));}catch(ka){throw ka;}}function V(a){return null===a?"":h.isArray(a)||h.isImmutableArray(a)?"Array":h.isDate(a)?"Date":h.isString(a)?"String":h.isBoolean(a)?"Boolean":h.isNumber(a)?"Number":a instanceof p?"Dictionary":a instanceof f?"Feature":a instanceof t?"Point":
a instanceof d?"Polygon":a instanceof n?"Polyline":a instanceof w?"Multipoint":a instanceof z?"Extent":h.isFunctionParameter(a)?"Function":a===h.voidOperation?"":"number"===typeof a&&isNaN(a)?"Number":"Unrecognised Type"}function I(a,c,b,d){try{if(h.equalityTest(c[b],d))return c[b+1];var e=c.length-b;return 1===e?c[b]:2===e?null:3===e?c[b+2]:I(a,c,b+2,d)}catch(qa){throw qa;}}function fa(a,c,b,d){try{if(!0===d)return c[b+1];if(3===c.length-b)return c[b+2];var e=c[b+2];if(!1===h.isBoolean(e))throw Error("WHEN needs boolean test conditions");
return fa(a,c,b+2,e)}catch(qa){throw qa;}}function M(a,c){var b=a.length,d=Math.floor(b/2);if(0===b)return[];if(1===b)return[a[0]];var e=M(a.slice(0,d),c);a=M(a.slice(d,b),c);for(b=[];0<e.length||0<a.length;)0<e.length&&0<a.length?(d=c(e[0],a[0]),isNaN(d)&&(d=0),0>=d?(b.push(e[0]),e=e.slice(1)):(b.push(a[0]),a=a.slice(1))):0<e.length?(b.push(e[0]),e=e.slice(1)):0<a.length&&(b.push(a[0]),a=a.slice(1));return b}function W(a,c){c.symbols.symbolCounter++;return"_T"+c.symbols.symbolCounter.toString()}
function N(a){a.symbols.symbolCounter++;return"_Tvar"+a.symbols.symbolCounter.toString()}function H(a,c,b){var d={};a||(a={});b||(b={});d._SymbolsMap={};d.textformatting=1;d.infinity=1;d.pi=1;for(var e in c)d[e]=1;for(e in b)d[e]=1;for(e in a)d[e]=1;return d}function O(a){console.log(a)}Object.defineProperty(g,"__esModule",{value:!0});var J=0,P={};q.registerFunctions(P,y);u.registerFunctions(P,y);k.registerFunctions(P,y);e.registerFunctions(P,y);r.registerFunctions(P,y);a.registerFunctions(P,y);P["typeof"]=
function(a,c){return y(a,c,function(a,c,b){h.pcCheck(b,1,1);a=V(b[0]);if("Unrecognised Type"===a)throw Error("Unrecognised Type");return a})};P.iif=function(a,c){try{return y(a,c,function(a,c,b){h.pcCheck(b,3,3);if(!1===h.isBoolean(b[0]))throw Error("IF Function must have a boolean test condition");return b[0]?b[1]:b[2]})}catch(ga){throw ga;}};P.decode=function(a,c){try{return y(a,c,function(c,b,d){if(2>d.length)throw Error("Missing Parameters");if(2===d.length)return d[1];if(0===(d.length-1)%2)throw Error("Must have a default value result.");
return I(a,d,1,d[0])})}catch(ga){throw ga;}};P.when=function(a,c){try{return y(a,c,function(c,b,d){if(3>d.length)throw Error("Missing Parameters");if(0===d.length%2)throw Error("Must have a default value result.");c=d[0];if(!1===h.isBoolean(c))throw Error("WHEN needs boolean test conditions");return fa(a,d,0,c)})}catch(ga){throw ga;}};P.top=function(a,c){return y(a,c,function(a,c,b){h.pcCheck(b,2,2);if(h.isArray(b[0]))return h.toNumber(b[1])>=b[0].length?b[0].slice(0):b[0].slice(0,h.toNumber(b[1]));
if(h.isImmutableArray(b[0]))return h.toNumber(b[1])>=b[0].length()?b[0].slice(0):b[0].slice(0,h.toNumber(b[1]));throw Error("Top cannot accept this parameter type");})};P.first=function(a,c){return y(a,c,function(a,c,b){h.pcCheck(b,1,1);return h.isArray(b[0])?0===b[0].length?null:b[0][0]:h.isImmutableArray(b[0])?0===b[0].length()?null:b[0].get(0):null})};P.sort=function(a,c){return y(a,c,function(a,c,b){h.pcCheck(b,1,2);c=b[0];h.isImmutableArray(c)&&(c=c.toArray());if(!1===h.isArray(c))throw Error("Illegal Argument");
if(1<b.length){if(!1===h.isFunctionParameter(b[1]))throw Error("Illegal Argument");c=M(c,function(c,d){return Q.callfunc(b[1],[c,d],a)})}else{if(0===c.length)return[];for(var d={},e=0;e<c.length;e++){var f=V(c[e]);""!==f&&(d[f]=!0)}if(!0===d.Array||!0===d.Dictionary||!0===d.Feature||!0===d.Point||!0===d.Polygon||!0===d.Polyline||!0===d.Multipoint||!0===d.Extent||!0===d.Function)return c.slice(0);var e=0,f="",k;for(k in d)e++,f=k;c=1<e||"String"===f?M(c,function(a,c){if(null===a||void 0===a||a===h.voidOperation)return null===
c||void 0===c||c===h.voidOperation?0:1;if(null===c||void 0===c||c===h.voidOperation)return-1;a=h.toString(a);c=h.toString(c);return a<c?-1:a===c?0:1}):"Number"===f?M(c,function(a,c){return a-c}):"Boolean"===f?M(c,function(a,c){return a===c?0:c?-1:1}):"Date"===f?M(c,function(a,c){return c-a}):c.slice(0)}return c})};for(var S in P)P[S]=new h.NativeFunction(P[S]);var ca=function(){};ca.prototype=P;g.functionHelper={fixSpatialReference:h.fixSpatialReference,parseArguments:function(a,c){for(var b=[],d=
0;d<c.arguments.length;d++)b.push(A(a,c.arguments[d]));return b},standardFunction:y};g.extend=function(a){for(var b={mode:"sync",compiled:!0,functions:{},signatures:[],standardFunction:y},d=0;d<a.length;d++)a[d].registerFunctions(b);for(var e in b.functions)P[e]=new h.NativeFunction(b.functions[e]),ca.prototype[e]=P[e];for(d=0;d<b.signatures.length;d++)c.addFunctionDeclaration(b.signatures[d],"f")};g.executeScript=function(a,c,b){return a(c,b)};g.extractFieldLiterals=function(a,b){void 0===b&&(b=
!1);return c.findFieldLiterals(a,b)};g.validateScript=function(a,b){return c.validateScript(a,b,"simple")};g.referencesMember=function(a,b){return c.referencesMember(a,b)};g.referencesFunction=function(a,b){return c.referencesFunction(a,b)};var Q={error:function(a,b,d){throw Error(c.nodeErrorMessage(a,b,d));},functionDepthchecker:function(a,c){return function(){c.depthCounte++;if(64<c.depthCounter)throw Error("Exceeded maximum function depth");var b=a.apply(this,arguments);c.depthCounte--;return b}},
aCheck:function(a,b){if(h.isFunctionParameter(a))throw Error(c.nodeErrorMessage({type:b},"RUNTIME","FUNCTIONCONTEXTILLEGAL"));return a===h.voidOperation?null:a},Dictionary:p,Feature:f,dictionary:function(a){for(var c={},b=0;b<a.length;b+=2){if(h.isFunctionParameter(a[b+1]))throw Error("Illegal Argument");if(!1===h.isString(a[b]))throw Error("Illegal Argument");c[a[b].toString()]=a[b+1]===h.voidOperation?null:a[b+1]}a=new p(c);a.immutable=!1;return a},strCheck:function(a,c){if(!1===h.isString(a))throw Error("Illegal Argument");
return a},unary:function(a,b){if(h.isBoolean(a)){if("!"===b)return!a;if("-"===b)return-1*h.toNumber(a);if("+"===b)return 1*h.toNumber(a);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===b)return-1*h.toNumber(a);if("+"===b)return 1*h.toNumber(a);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));},logicalCheck:function(a){if(!1===h.isBoolean(a))throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME",
"ONLYORORAND"));return a},logical:function(a,b,d){if(h.isBoolean(a)&&h.isBoolean(b))switch(d){case "||":return a||b;case "\x26\x26":return a&&b;default:throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));},binary:function(a,b,d){switch(d){case "\x3d\x3d":return h.equalityTest(a,b);case "\x3d":return h.equalityTest(a,b);case "!\x3d":return!h.equalityTest(a,b);case "\x3c":return h.greaterThanLessThan(a,
b,d);case "\x3e":return h.greaterThanLessThan(a,b,d);case "\x3c\x3d":return h.greaterThanLessThan(a,b,d);case "\x3e\x3d":return h.greaterThanLessThan(a,b,d);case "+":return h.isString(a)||h.isString(b)?h.toString(a)+h.toString(b):h.toNumber(a)+h.toNumber(b);case "-":return h.toNumber(a)-h.toNumber(b);case "*":return h.toNumber(a)*h.toNumber(b);case "/":return h.toNumber(a)/h.toNumber(b);case "%":return h.toNumber(a)%h.toNumber(b);default:throw Error(c.nodeErrorMessage({type:"BinaryExpression"},"RUNTIME",
"OPERATORNOTRECOGNISED"));}},assign:function(a,b,d){switch(b){case "\x3d":return a===h.voidOperation?null:a;case "/\x3d":return h.toNumber(d)/h.toNumber(a);case "*\x3d":return h.toNumber(d)*h.toNumber(a);case "-\x3d":return h.toNumber(d)-h.toNumber(a);case "+\x3d":return h.isString(d)||h.isString(a)?h.toString(d)+h.toString(a):h.toNumber(d)+h.toNumber(a);case "%\x3d":return h.toNumber(d)%h.toNumber(a);default:throw Error(c.nodeErrorMessage("AssignmentExpression","RUNTIME","OPERATORNOTRECOGNISED"));
}},update:function(a,c,b,d){var e=h.toNumber(a[c]);a[c]="++"===b?e+1:e-1;return!1===d?e:"++"===b?e+1:e-1},memberupdate:function(a,c,b,d){var e;if(h.isArray(a))if(h.isNumber(c)){0>c&&(c=a.length+c);if(0>c||c>=a.length)throw Error("Assignment outside of array bounds");e=h.toNumber(a[c]);a[c]="++"===b?e+1:e-1}else throw Error("Invalid Parameter");else if(a instanceof p){if(!1===h.isString(c))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(c))e=h.toNumber(a.field(c)),a.setField(c,
"++"===b?e+1:e-1);else throw Error("Invalid Parameter");}else if(a instanceof f){if(!1===h.isString(c))throw Error("Feature accessor must be a string");if(!0===a.hasField(c))e=h.toNumber(a.field(c)),a.setField(c,"++"===b?e+1:e-1);else throw Error("Invalid Parameter");}else{if(h.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}return!1===d?e:"++"===b?e+1:e-1},assignmember:function(a,c,b,d){if(h.isArray(a))if(h.isNumber(c)){0>c&&(c=a.length+c);if(0>c||c>a.length)throw Error("Assignment outside of array bounds");
if(c===a.length&&"\x3d"!==b)throw Error("Invalid Parameter");a[c]=this.assign(d,b,a[c])}else throw Error("Invalid Parameter");else if(a instanceof p){if(!1===h.isString(c))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(c))a.setField(c,this.assign(d,b,a.field(c)));else{if("\x3d"!==b)throw Error("Invalid Parameter");a.setField(c,this.assign(d,b,null))}}else if(a instanceof f){if(!1===h.isString(c))throw Error("Feature accessor must be a string");if(!0===a.hasField(c))a.setField(c,
this.assign(d,b,a.field(c)));else{if("\x3d"!==b)throw Error("Invalid Parameter");a.setField(c,this.assign(d,b,null))}}else{if(h.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}},member:function(a,b){if(null===a)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","NOTFOUND"));if(a instanceof p||a instanceof f){if(h.isString(b))return a.field(b)}else if(a instanceof v){if(h.isString(b))return ba(a,b,"MemberExpression")}else if(h.isArray(a)){if(h.isNumber(b)&&
isFinite(b)&&Math.floor(b)===b){0>b&&(b=a.length+b);if(b>=a.length||0>b)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return a[b]}}else if(h.isString(a)){if(h.isNumber(b)&&isFinite(b)&&Math.floor(b)===b){0>b&&(b=a.length+b);if(b>=a.length||0>b)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return a[b]}}else if(h.isImmutableArray(a)&&h.isNumber(b)&&isFinite(b)&&Math.floor(b)===b){0>b&&(b=a.length()+b);if(b>=a.length()||0>b)throw Error(c.nodeErrorMessage("MemberExpression",
"RUNTIME","OUTOFBOUNDS"));return a.get(b)}throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","INVALIDTYPE"));},callfunc:function(a,c,b){return a instanceof h.NativeFunction?a.fn(b,c):a instanceof h.SizzleFunction?a.fn.apply(this,c):a.apply(this,c)}};g.compileScript=function(a,c){void 0===c&&(c=null);null===c&&(c={vars:{},customfunctions:{}});c={globalScope:H(c.vars,P,c.customfunctions),localScope:null,console:O,symbols:{symbolCounter:0}};a=A(c,a.body[0].body);""===a&&(a="lc.voidOperation;");
c={lc:h,lang:Q,postProcess:function(a){a instanceof h.ReturnResult&&(a=a.value);a instanceof h.ImplicitResult&&(a=a.value);a===h.voidOperation&&(a=null);if(a===h.breakResult)throw Error("Cannot return BREAK");if(a===h.continueResult)throw Error("Cannot return CONTINUE");if(h.isFunctionParameter(a))throw Error("Cannot return FUNCTION");return a},prepare:function(a,c){c||(c=new x({wkid:102100}));var b=a.vars,d=a.customfunctions,e=new ca;b||(b={});d||(d={});var k=new p({newline:"\n",tab:"\t",singlequote:"'",
doublequote:'"',forwardslash:"/",backwardslash:"\\"});k.immutable=!1;e._SymbolsMap={textformatting:1,infinity:1,pi:1};e.textformatting=k;e.infinity=Number.POSITIVE_INFINITY;e.pi=Math.PI;for(var h in d)e[h]=d[h],e._SymbolsMap[h]=1;for(h in b)e._SymbolsMap[h]=1,e[h]=b[h]&&"esri.Graphic"===b[h].declaredClass?f.createFromGraphic(b[h]):b[h];return{spatialReference:c,globalScope:e,localScope:null,console:a.console?a.console:O,symbols:{symbolCounter:0},depthCounter:1,applicationCache:void 0===a.applicationCache?
null:a.applicationCache}}};return(new Function("context","spatialReference","var runtimeCtx\x3dthis.prepare(context, spatialReference);\n var lc \x3d this.lc;  var lang \x3d this.lang; var gscope\x3druntimeCtx.globalScope; \n function mainBody() {\n var lastStatement\x3dlc.voidOperation;\n "+a+"\n return lastStatement; } \n return this.postProcess(mainBody());")).bind(c)}})},"esri/arcade/Dictionary":function(){define(["require","exports","./ImmutableArray","./languageUtils","../geometry/Geometry"],
function(b,g,p,f,l){return function(){function b(f){this.attributes=null;this.plain=!1;this.immutable=!0;this.attributes=f instanceof b?f.attributes:void 0===f?{}:null===f?{}:f}b.prototype.field=function(b){var c=b.toLowerCase();b=this.attributes[b];if(void 0!==b)return b;for(var f in this.attributes)if(f.toLowerCase()===c)return this.attributes[f];throw Error("Field not Found");};b.prototype.setField=function(b,c){if(this.immutable)throw Error("Dictionary is Immutable");var f=b.toLowerCase();if(void 0===
this.attributes[b])for(var e in this.attributes)if(e.toLowerCase()===f){this.attributes[e]=c;return}this.attributes[b]=c};b.prototype.hasField=function(b){var c=b.toLowerCase();if(void 0!==this.attributes[b])return!0;for(var f in this.attributes)if(f.toLowerCase()===c)return!0;return!1};b.prototype.keys=function(){var b=[],c;for(c in this.attributes)b.push(c);return b=b.sort()};b.prototype.castToText=function(){var b="",c;for(c in this.attributes){""!==b&&(b+=",");var g=this.attributes[c];null==g?
b+=JSON.stringify(c)+":null":f.isBoolean(g)||f.isNumber(g)||f.isString(g)?b+=JSON.stringify(c)+":"+JSON.stringify(g):g instanceof l?b+=JSON.stringify(c)+":"+f.toStringExplicit(g):g instanceof p?b+=JSON.stringify(c)+":"+f.toStringExplicit(g):g instanceof Array?b+=JSON.stringify(c)+":"+f.toStringExplicit(g):g instanceof Date?b+=JSON.stringify(c)+":"+JSON.stringify(g):null!==g&&"object"===typeof g&&void 0!==g.castToText&&(b+=JSON.stringify(c)+":"+g.castToText())}return"{"+b+"}"};return b}()})},"esri/arcade/ImmutableArray":function(){define(["require",
"exports"],function(b,g){return function(){function b(b){void 0===b&&(b=[]);this._elements=b}b.prototype.length=function(){return this._elements.length};b.prototype.get=function(b){return this._elements[b]};b.prototype.toArray=function(){for(var b=[],g=0;g<this.length();g++)b.push(this.get(g));return b};return b}()})},"esri/arcade/languageUtils":function(){define("require exports dojo/number ../kernel ../moment ./FunctionWrapper ./ImmutableArray ./ImmutablePathArray ./ImmutablePointArray ../geometry/Extent ../geometry/Geometry ../geometry/Multipoint ../geometry/Point ../geometry/Polygon ../geometry/Polyline".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z){function v(a,c,b){if(""===c||null===c||void 0===c||c===b||c===b)return a;do a=a.replace(c,b);while(-1!==a.indexOf(c));return a}function w(a){return a instanceof W||a instanceof m||a instanceof N}function t(a){return"string"===typeof a||a instanceof String}function d(a){return"boolean"===typeof a}function n(a){return"number"===typeof a}function x(a){return a instanceof Array}function y(a){return a instanceof Date}function A(a,c){if(!1===isNaN(a)){if(void 0===
c||null===c||""===c)return a.toString();c=v(c,"\u2030","");c=v(c,"\u00a4","");return p.format(a,{pattern:c})}return a.toString()}function D(a,c){a=l(a);return void 0===c||null===c||""===c?a.format():a.format(B(c))}function B(a){return a.replace(/(LTS)|L|l/g,function(a){return"["+a+"]"})}function F(a,c,b){switch(b){case "\x3e":return a>c;case "\x3c":return a<c;case "\x3e\x3d":return a>=c;case "\x3c\x3d":return a<=c}return!1}function C(a,b){if(a===b||null===a&&b===g.voidOperation||null===b&&a===g.voidOperation)return!0;
if(y(a)&&y(b))return a.getTime()===b.getTime();if(a instanceof c||a instanceof q)return a.equalityTest(b);if(a instanceof r&&b instanceof r){var d=void 0,e=void 0;g.isVersion4?(d=a.cache._arcadeCacheId,e=b.cache._arcadeCacheId):(d=a.getCacheValue("_arcadeCacheId"),e=b.getCacheValue("_arcadeCacheId"));if(void 0!==d&&null!==d)return d===e}return void 0!==a&&void 0!==b&&null!==a&&null!==b&&"object"===typeof a&&"object"===typeof b&&(a._arcadeCacheId===b._arcadeCacheId&&void 0!==a._arcadeCacheId&&null!==
a._arcadeCacheId||a._underlyingGraphic===b._underlyingGraphic&&void 0!==a._underlyingGraphic&&null!==a._underlyingGraphic)?!0:!1}function G(c,b){if(t(c))return c;if(null===c)return"";if(n(c))return A(c,b);if(d(c))return c.toString();if(y(c))return D(c,b);if(c instanceof a)return JSON.stringify(c.toJSON());if(x(c)){b=[];for(var e=0;e<c.length;e++)b[e]=Z(c[e]);return"["+b.join(",")+"]"}if(c instanceof h){b=[];for(e=0;e<c.length();e++)b[e]=Z(c.get(e));return"["+b.join(",")+"]"}return null!==c&&"object"===
typeof c&&void 0!==c.castToText?c.castToText():w(c)?"object, Function":""}function ba(c,b){if(t(c))return c;if(null===c)return"";if(n(c))return A(c,b);if(d(c))return c.toString();if(y(c))return D(c,b);if(c instanceof a)return c instanceof e?'{"xmin":'+c.xmin.toString()+',"ymin":'+c.ymin.toString()+","+(c.hasZ?'"zmin":'+c.zmin.toString()+",":"")+(c.hasM?'"mmin":'+c.mmin.toString()+",":"")+'"xmax":'+c.xmax.toString()+',"ymax":'+c.ymax.toString()+","+(c.hasZ?'"zmax":'+c.zmax.toString()+",":"")+(c.hasM?
'"mmax":'+c.mmax.toString()+",":"")+'"spatialReference":'+fa(c.spatialReference)+"}":fa(c.toJSON(),function(a,c){return a.key===c.key?0:"spatialReference"===a.key?1:"spatialReference"===c.key||a.key<c.key?-1:a.key>c.key?1:0});if(x(c)){b=[];for(var f=0;f<c.length;f++)b[f]=Z(c[f]);return"["+b.join(",")+"]"}if(c instanceof h){b=[];for(f=0;f<c.length();f++)b[f]=Z(c.get(f));return"["+b.join(",")+"]"}return null!==c&&"object"===typeof c&&void 0!==c.castToText?c.castToText():w(c)?"object, Function":""}function Z(c){if(null!==
c){if(d(c)||n(c)||t(c))return JSON.stringify(c);if(c instanceof a||c instanceof h||c instanceof Array)return ba(c);if(c instanceof Date)return JSON.stringify(D(c,""));if(null!==c&&"object"===typeof c&&void 0!==c.castToText)return c.castToText()}return"null"}function V(a,c){return n(a)?a:null===a||""===a?0:y(a)?NaN:d(a)?a?1:0:x(a)||""===a||void 0===a?NaN:void 0!==c&&t(a)?(c=v(c,"\u2030",""),c=v(c,"\u00a4",""),p.parse(a,{pattern:c})):a===g.voidOperation?0:Number(a)}function I(a,c){var b;c.fields.some(function(c){c.name===
a&&(b=c.domain);return!!b});return b}function fa(a,c){c||(c={});"function"===typeof c&&(c={cmp:c});var b="boolean"===typeof c.cycles?c.cycles:!1,d=c.cmp&&function(a){return function(c){return function(b,d){return a({key:b,value:c[b]},{key:d,value:c[d]})}}}(c.cmp),e=[];return function Q(a){a&&a.toJSON&&"function"===typeof a.toJSON&&(a=a.toJSON());if(void 0!==a){if("number"===typeof a)return isFinite(a)?""+a:"null";if("object"!==typeof a)return JSON.stringify(a);var c,f;if(Array.isArray(a)){f="[";for(c=
0;c<a.length;c++)c&&(f+=","),f+=Q(a[c])||"null";return f+"]"}if(null===a)return"null";if(-1!==e.indexOf(a)){if(b)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON");}var k=e.push(a)-1,g=Object.keys(a).sort(d&&d(a));f="";for(c=0;c<g.length;c++){var h=g[c],n=Q(a[h]);n&&(f&&(f+=","),f+=JSON.stringify(h)+":"+n)}e.splice(k,1);return"{"+f+"}"}}(a)}Object.defineProperty(g,"__esModule",{value:!0});b=function(){return function(a){this.value=a}}();var M=function(){return function(a){this.value=
a}}(),W=function(){return function(a){this.fn=a}}(),N=function(){return function(a){this.fn=a}}();g.NativeFunction=W;g.ImplicitResult=M;g.ReturnResult=b;g.SizzleFunction=N;g.isVersion4=0===f.version.indexOf("4.");g.voidOperation={type:"VOID"};g.breakResult={type:"BREAK"};g.continueResult={type:"CONTINUE"};g.multiReplace=v;g.isFunctionParameter=w;g.isSimpleType=function(a){return t(a)||n(a)||y(a)||d(a)||null===a||a===g.voidOperation||"number"===typeof a?!0:!1};g.defaultUndefined=function(a,c){return void 0===
a?c:a};g.isString=t;g.isBoolean=d;g.isNumber=n;g.isArray=x;g.isFeatureCursor=function(a){return a&&void 0!==a.isFeatureCursor};g.isImmutableArray=function(a){return a instanceof h};g.isDate=y;g.pcCheck=function(a,c,b){if(a.length<c||a.length>b)throw Error("Function called with wrong number of Parameters");};g.generateUUID=function(){var a=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var b=(a+16*Math.random())%16|0;a=Math.floor(a/16);return("x"===c?
b:b&3|8).toString(16)})};g.formatNumber=A;g.formatDate=D;g.standardiseDateFormat=B;g.greaterThanLessThan=function(a,c,b){if(null===a){if(null===c||c===g.voidOperation)return F(null,null,b);if(n(c))return F(0,c,b);if(t(c)||d(c))return F(0,V(c),b);if(y(c))return F(0,c.getTime(),b)}if(a===g.voidOperation){if(null===c||c===g.voidOperation)return F(null,null,b);if(n(c))return F(0,c,b);if(t(c)||d(c))return F(0,V(c),b);if(y(c))return F(0,c.getTime(),b)}else if(n(a)){if(n(c))return F(a,c,b);if(d(c))return F(a,
V(c),b);if(null===c||c===g.voidOperation)return F(a,0,b);if(t(c))return F(a,V(c),b);if(y(c))return F(a,c.getTime(),b)}else if(t(a)){if(t(c))return F(G(a),G(c),b);if(y(c))return F(V(a),c.getTime(),b);if(n(c))return F(V(a),c,b);if(null===c||c===g.voidOperation)return F(V(a),0,b);if(d(c))return F(V(a),V(c),b)}else if(y(a)){if(y(c))return F(a,c,b);if(null===c||c===g.voidOperation)return F(a.getTime(),0,b);if(n(c))return F(a.getTime(),c,b);if(d(c)||t(c))return F(a.getTime(),V(c),b)}else if(d(a)){if(d(c))return F(a,
c,b);if(n(c))return F(V(a),V(c),b);if(y(c))return F(V(a),c.getTime(),b);if(null===c||c===g.voidOperation)return F(V(a),0,b);if(t(c))return F(V(a),V(c),b)}return!C(a,c)||"\x3c\x3d"!==b&&"\x3e\x3d"!==b?!1:!0};g.equalityTest=C;g.toString=G;g.toNumberArray=function(a){var c=[];if(!1===x(a))return null;if(a instanceof h){for(var b=0;b<a.length();b++)c[b]=V(a.get(b));return c}for(b=0;b<a.length;b++)c[b]=V(a[b]);return c};g.toStringExplicit=ba;g.toNumber=V;g.toDate=function(a,c){return y(a)?a:t(a)&&(a=l(a,
[void 0===c||null===c||""===c?l.ISO_8601:c]),a.isValid())?a.toDate():null};g.toDateM=function(a,c){return y(a)?l(a):t(a)&&(a=l(a,[void 0===c||null===c||""===c?l.ISO_8601:c]),a.isValid())?a:null};g.toBoolean=function(a){if(d(a))return a;if(t(a)){if(a=a.toLowerCase(),"true"===a)return!0}else if(n(a))return 0===a||isNaN(a)?!1:!0;return!1};g.fixSpatialReference=function(a,c){if(null===a||void 0===a)return null;if(null===a.spatialReference||void 0===a.spatialReference)a.spatialReference=c;return a};g.fixNullGeometry=
function(a){return null===a?null:a instanceof r?"NaN"===a.x||null===a.x||isNaN(a.x)?null:a:a instanceof u?0===a.rings.length?null:a:a instanceof z?0===a.paths.length?null:a:a instanceof k?0===a.points.length?null:a:a instanceof e?"NaN"===a.xmin||null===a.xmin||isNaN(a.xmin)?null:a:null};g.getDomainValue=function(a,c){if(!a||!a.domain)return null;var b=null;c="string"===a.field.type||"esriFieldTypeString"===a.field.type?G(c):V(c);for(var d=0;d<a.domain.codedValues.length;d++){var e=a.domain.codedValues[d];
e.code===c&&(b=e)}return null===b?null:b.name};g.getDomainCode=function(a,c){if(!a||!a.domain)return null;var b=null;c=G(c);for(var d=0;d<a.domain.codedValues.length;d++){var e=a.domain.codedValues[d];e.name===c&&(b=e)}return null===b?null:b.code};g.getDomain=function(a,c,b,d){void 0===b&&(b=null);if(!c||!c.fields)return null;for(var e=null,f=0;f<c.fields.length;f++){var k=c.fields[f];k.name.toLowerCase()===a.toString().toLowerCase()&&(e=k)}if(null===e)return null;var g,h;d||(d=b&&c.typeIdField&&
b._field(c.typeIdField));null!=d&&c.types.some(function(a){return a.id===d?((g=a.domains&&a.domains[e.name])&&"inherited"===g.type&&(g=I(e.name,c),h=!0),!0):!1});h||g||(g=I(a,c));return{field:e,domain:g}};g.stableStringify=fa;g.autoCastFeatureToGeometry=function(a){if(null===a)return null;for(var c=[],b=0;b<a.length;b++){var d=a[b];d&&d.declaredClass&&"esri.arcade.Feature"===d.declaredClass?c.push(d.geometry()):c.push(d)}return c}})},"esri/moment":function(){define(["require","exports","./plugins/moment!"],
function(b,g,p){return p})},"esri/plugins/moment":function(){define(["require","exports","dojo/_base/kernel","moment/moment"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});var l={ar:1,"ar-dz":1,"ar-kw":1,"ar-ly":1,"ar-ma":1,"ar-sa":1,"ar-tn":1,bs:1,ca:1,cs:1,da:1,de:1,"de-at":1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,"en-ie":1,"en-il":1,"en-nz":1,es:1,"es-do":1,"es-us":1,et:1,fi:1,fr:1,"fr-ca":1,"fr-ch":1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,ko:1,lt:1,lv:1,nb:1,nl:1,"nl-be":1,
pl:1,pt:1,"pt-br":1,ro:1,ru:1,sl:1,sr:1,"sr-cyrl":1,sv:1,th:1,tr:1,vi:1,"zh-cn":1,"zh-hk":1,"zh-tw":1};g.load=function(b,g,c){b=p.locale;var h=b in l;if(!h){var e=b.split("-");1<e.length&&e[0]in l&&(b=e[0],h=!0)}h?g(["moment/locale/"+b],function(){c(f)}):c(f)}})},"moment/moment":function(){(function(b,g){"object"===typeof exports&&"undefined"!==typeof module?module.exports=g():"function"===typeof define&&define.amd?define(g):b.moment=g()})(this,function(){function b(){return Vb.apply(null,arguments)}
function g(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function p(a){return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function f(a){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(a).length;for(var c in a)if(a.hasOwnProperty(c))return!1;return!0}function l(a){return void 0===a}function m(a){return"number"===typeof a||"[object Number]"===Object.prototype.toString.call(a)}function h(a){return a instanceof Date||"[object Date]"===
Object.prototype.toString.call(a)}function c(a,c){var b=[],d;for(d=0;d<a.length;++d)b.push(c(a[d],d));return b}function q(a,c){return Object.prototype.hasOwnProperty.call(a,c)}function e(a,c){for(var b in c)q(c,b)&&(a[b]=c[b]);q(c,"toString")&&(a.toString=c.toString);q(c,"valueOf")&&(a.valueOf=c.valueOf);return a}function a(a,c,b,d){return db(a,c,b,d,!0).utc()}function k(a){null==a._pf&&(a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,
userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1});return a._pf}function r(a){if(null==a._isValid){var c=k(a),b=Wb.call(c.parsedDateParts,function(a){return null!=a}),b=!isNaN(a._d.getTime())&&0>c.overflow&&!c.empty&&!c.invalidMonth&&!c.invalidWeekday&&!c.weekdayMismatch&&!c.nullInput&&!c.invalidFormat&&!c.userInvalidated&&(!c.meridiem||c.meridiem&&b);a._strict&&(b=b&&0===c.charsLeftOver&&0===c.unusedTokens.length&&void 0===c.bigHour);if(null!=Object.isFrozen&&
Object.isFrozen(a))return b;a._isValid=b}return a._isValid}function u(c){var b=a(NaN);null!=c?e(k(b),c):k(b).userInvalidated=!0;return b}function z(a,c){var b,d,e;l(c._isAMomentObject)||(a._isAMomentObject=c._isAMomentObject);l(c._i)||(a._i=c._i);l(c._f)||(a._f=c._f);l(c._l)||(a._l=c._l);l(c._strict)||(a._strict=c._strict);l(c._tzm)||(a._tzm=c._tzm);l(c._isUTC)||(a._isUTC=c._isUTC);l(c._offset)||(a._offset=c._offset);l(c._pf)||(a._pf=k(c));l(c._locale)||(a._locale=c._locale);if(0<Hb.length)for(b=
0;b<Hb.length;b++)d=Hb[b],e=c[d],l(e)||(a[d]=e);return a}function v(a){z(this,a);this._d=new Date(null!=a._d?a._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));!1===Ib&&(Ib=!0,b.updateOffset(this),Ib=!1)}function w(a){return a instanceof v||null!=a&&null!=a._isAMomentObject}function t(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function d(a){a=+a;var c=0;0!==a&&isFinite(a)&&(c=t(a));return c}function n(a,c,b){var e=Math.min(a.length,c.length),f=Math.abs(a.length-c.length),k=0,g;for(g=0;g<
e;g++)(b&&a[g]!==c[g]||!b&&d(a[g])!==d(c[g]))&&k++;return k+f}function x(a){!1===b.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function y(a,c){var d=!0;return e(function(){null!=b.deprecationHandler&&b.deprecationHandler(null,a);if(d){for(var e=[],f,k=0;k<arguments.length;k++){f="";if("object"===typeof arguments[k]){f+="\n["+k+"] ";for(var g in arguments[0])f+=g+": "+arguments[0][g]+", ";f=f.slice(0,-2)}else f=arguments[k];e.push(f)}x(a+
"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+Error().stack);d=!1}return c.apply(this,arguments)},c)}function A(a,c){null!=b.deprecationHandler&&b.deprecationHandler(a,c);Xb[a]||(x(c),Xb[a]=!0)}function D(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function B(a,c){var b=e({},a),d;for(d in c)q(c,d)&&(p(a[d])&&p(c[d])?(b[d]={},e(b[d],a[d]),e(b[d],c[d])):null!=c[d]?b[d]=c[d]:delete b[d]);for(d in a)q(a,d)&&!q(c,d)&&p(a[d])&&(b[d]=e({},b[d]));
return b}function F(a){null!=a&&this.set(a)}function C(a,c){var b=a.toLowerCase();ob[b]=ob[b+"s"]=ob[c]=a}function G(a){return"string"===typeof a?ob[a]||ob[a.toLowerCase()]:void 0}function ba(a){var c={},b,d;for(d in a)q(a,d)&&(b=G(d))&&(c[b]=a[d]);return c}function Z(a){var c=[],b;for(b in a)c.push({unit:b,priority:Ea[b]});c.sort(function(a,c){return a.priority-c.priority});return c}function V(a,c,b){var d=""+Math.abs(a);return(0<=a?b?"+":"":"-")+Math.pow(10,Math.max(0,c-d.length)).toString().substr(1)+
d}function I(a,c,b,d){var e=d;"string"===typeof d&&(e=function(){return this[d]()});a&&(lb[a]=e);c&&(lb[c[0]]=function(){return V(e.apply(this,arguments),c[1],c[2])});b&&(lb[b]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function fa(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var c=a.match(Yb),b,d;b=0;for(d=c.length;b<d;b++)c[b]=lb[c[b]]?lb[c[b]]:fa(c[b]);return function(b){var e="",f;for(f=0;f<d;f++)e+=D(c[f])?c[f].call(b,
a):c[f];return e}}function W(a,c){if(!a.isValid())return a.localeData().invalidDate();c=N(c,a.localeData());Jb[c]=Jb[c]||M(c);return Jb[c](a)}function N(a,c){function b(a){return c.longDateFormat(a)||a}var d=5;for(yb.lastIndex=0;0<=d&&yb.test(a);)a=a.replace(yb,b),yb.lastIndex=0,--d;return a}function H(a,c,b){Kb[a]=D(c)?c:function(a,d){return a&&b?b:c}}function O(a,c){return q(Kb,a)?Kb[a](c._strict,c._locale):new RegExp(J(a))}function J(a){return P(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
function(a,c,b,d,e){return c||b||d||e}))}function P(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$\x26")}function S(a,c){var b,e=c;"string"===typeof a&&(a=[a]);m(c)&&(e=function(a,b){b[c]=d(a)});for(b=0;b<a.length;b++)Lb[a[b]]=e}function ca(a,c){S(a,function(a,b,d,e){d._w=d._w||{};c(a,d._w,d,e)})}function Q(a){return 0===a%4&&0!==a%100||0===a%400}function U(a,c){return function(d){return null!=d?(ga(this,a,d),b.updateOffset(this,c),this):Y(this,a)}}function Y(a,c){return a.isValid()?a._d["get"+
(a._isUTC?"UTC":"")+c]():NaN}function ga(a,c,b){if(a.isValid()&&!isNaN(b))if("FullYear"===c&&Q(a.year())&&1===a.month()&&29===a.date())a._d["set"+(a._isUTC?"UTC":"")+c](b,a.month(),ka(b,a.month()));else a._d["set"+(a._isUTC?"UTC":"")+c](b)}function ka(a,c){if(isNaN(a)||isNaN(c))return NaN;var b=(c%12+12)%12;return 1===b?Q(a+(c-b)/12)?29:28:31-b%7%2}function ha(a,c){var b;if(!a.isValid())return a;if("string"===typeof c)if(/^\d+$/.test(c))c=d(c);else if(c=a.localeData().monthsParse(c),!m(c))return a;
b=Math.min(a.date(),ka(a.year(),c));a._d["set"+(a._isUTC?"UTC":"")+"Month"](c,b);return a}function qa(a){return null!=a?(ha(this,a),b.updateOffset(this,!0),this):Y(this,"Month")}function na(){function c(a,c){return c.length-a.length}var b=[],d=[],e=[],f,k;for(f=0;12>f;f++)k=a([2E3,f]),b.push(this.monthsShort(k,"")),d.push(this.months(k,"")),e.push(this.months(k,"")),e.push(this.monthsShort(k,""));b.sort(c);d.sort(c);e.sort(c);for(f=0;12>f;f++)b[f]=P(b[f]),d[f]=P(d[f]);for(f=0;24>f;f++)e[f]=P(e[f]);
this._monthsShortRegex=this._monthsRegex=new RegExp("^("+e.join("|")+")","i");this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+b.join("|")+")","i")}function wa(a,c,b,d,e,f,k){c=new Date(a,c,b,d,e,f,k);100>a&&0<=a&&isFinite(c.getFullYear())&&c.setFullYear(a);return c}function ra(a){var c=new Date(Date.UTC.apply(null,arguments));100>a&&0<=a&&isFinite(c.getUTCFullYear())&&c.setUTCFullYear(a);return c}function za(a,c,b){b=7+c-b;return-((7+ra(a,
0,b).getUTCDay()-c)%7)+b-1}function sa(a,c,b,d,e){b=(7+b-d)%7;d=za(a,d,e);d=1+7*(c-1)+b+d;0>=d?(c=a-1,a=(Q(c)?366:365)+d):d>(Q(a)?366:365)?(c=a+1,a=d-(Q(a)?366:365)):(c=a,a=d);return{year:c,dayOfYear:a}}function ja(a,c,b){var d=za(a.year(),c,b),d=Math.floor((a.dayOfYear()-d-1)/7)+1;1>d?(a=a.year()-1,c=d+Da(a,c,b)):d>Da(a.year(),c,b)?(c=d-Da(a.year(),c,b),a=a.year()+1):(a=a.year(),c=d);return{week:c,year:a}}function Da(a,c,b){var d=za(a,c,b);c=za(a+1,c,b);return((Q(a)?366:365)-d+c)/7}function Ma(c,
b,d){var e,f;c=c.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],e=0;7>e;++e)f=a([2E3,1]).day(e),this._minWeekdaysParse[e]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[e]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[e]=this.weekdays(f,"").toLocaleLowerCase();if(d)b="dddd"===b?ya.call(this._weekdaysParse,c):"ddd"===b?ya.call(this._shortWeekdaysParse,c):ya.call(this._minWeekdaysParse,
c);else if("dddd"===b){b=ya.call(this._weekdaysParse,c);if(-1!==b)return b;b=ya.call(this._shortWeekdaysParse,c);if(-1!==b)return b;b=ya.call(this._minWeekdaysParse,c)}else if("ddd"===b){b=ya.call(this._shortWeekdaysParse,c);if(-1!==b)return b;b=ya.call(this._weekdaysParse,c);if(-1!==b)return b;b=ya.call(this._minWeekdaysParse,c)}else{b=ya.call(this._minWeekdaysParse,c);if(-1!==b)return b;b=ya.call(this._weekdaysParse,c);if(-1!==b)return b;b=ya.call(this._shortWeekdaysParse,c)}return-1!==b?b:null}
function xa(){function c(a,c){return c.length-a.length}var b=[],d=[],e=[],f=[],k,g,h,n;for(k=0;7>k;k++)g=a([2E3,1]).day(k),h=this.weekdaysMin(g,""),n=this.weekdaysShort(g,""),g=this.weekdays(g,""),b.push(h),d.push(n),e.push(g),f.push(h),f.push(n),f.push(g);b.sort(c);d.sort(c);e.sort(c);f.sort(c);for(k=0;7>k;k++)d[k]=P(d[k]),e[k]=P(e[k]),f[k]=P(f[k]);this._weekdaysMinRegex=this._weekdaysShortRegex=this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i");this._weekdaysStrictRegex=new RegExp("^("+e.join("|")+
")","i");this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+b.join("|")+")","i")}function Aa(){return this.hours()%12||12}function Ia(a,c){I(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),c)})}function hb(a,c){return c._meridiemParse}function Va(a){return a?a.toLowerCase().replace("_","-"):a}function Ka(a){var c=null;if(!Ba[a]&&"undefined"!==typeof module&&module&&module.exports)try{c=pb._abbr,require("./locale/"+
a),La(c)}catch(Wc){}return Ba[a]}function La(a,c){a&&((c=l(c)?Fa(a):Ha(a,c))?pb=c:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+a+" not found. Did you forget to load it?"));return pb._abbr}function Ha(a,c){if(null!==c){var b;b=Zb;c.abbr=a;if(null!=Ba[a])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),
b=Ba[a]._config;else if(null!=c.parentLocale)if(null!=Ba[c.parentLocale])b=Ba[c.parentLocale]._config;else if(b=Ka(c.parentLocale),null!=b)b=b._config;else return qb[c.parentLocale]||(qb[c.parentLocale]=[]),qb[c.parentLocale].push({name:a,config:c}),null;Ba[a]=new F(B(b,c));qb[a]&&qb[a].forEach(function(a){Ha(a.name,a.config)});La(a);return Ba[a]}delete Ba[a];return null}function Fa(a){var c;a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr);if(!a)return pb;if(!g(a)){if(c=Ka(a))return c;a=[a]}a:{c=
0;for(var b,d,e,f;c<a.length;){f=Va(a[c]).split("-");b=f.length;for(d=(d=Va(a[c+1]))?d.split("-"):null;0<b;){if(e=Ka(f.slice(0,b).join("-"))){a=e;break a}if(d&&d.length>=b&&n(f,d,!0)>=b-1)break;b--}c++}a=pb}return a}function Ya(a){var c;(c=a._a)&&-2===k(a).overflow&&(c=0>c[$a]||11<c[$a]?$a:1>c[Wa]||c[Wa]>ka(c[Ta],c[$a])?Wa:0>c[Ca]||24<c[Ca]||24===c[Ca]&&(0!==c[Ua]||0!==c[ab]||0!==c[ib])?Ca:0>c[Ua]||59<c[Ua]?Ua:0>c[ab]||59<c[ab]?ab:0>c[ib]||999<c[ib]?ib:-1,k(a)._overflowDayOfYear&&(c<Ta||c>Wa)&&(c=
Wa),k(a)._overflowWeeks&&-1===c&&(c=mc),k(a)._overflowWeekday&&-1===c&&(c=nc),k(a).overflow=c);return a}function Ja(a,c,b){return null!=a?a:null!=c?c:b}function Ra(a){var c,d=[],e;if(!a._d){e=new Date(b.now());e=a._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()];if(a._w&&null==a._a[Wa]&&null==a._a[$a]){var f,g,h,n,l,q;f=a._w;if(null!=f.GG||null!=f.W||null!=f.E){if(l=1,q=4,g=Ja(f.GG,a._a[Ta],ja(K(),1,4).year),h=Ja(f.W,1),n=Ja(f.E,1),1>n||7<n)c=
!0}else if(l=a._locale._week.dow,q=a._locale._week.doy,h=ja(K(),l,q),g=Ja(f.gg,a._a[Ta],h.year),h=Ja(f.w,h.week),null!=f.d){if(n=f.d,0>n||6<n)c=!0}else if(null!=f.e){if(n=f.e+l,0>f.e||6<f.e)c=!0}else n=l;1>h||h>Da(g,l,q)?k(a)._overflowWeeks=!0:null!=c?k(a)._overflowWeekday=!0:(c=sa(g,h,n,l,q),a._a[Ta]=c.year,a._dayOfYear=c.dayOfYear)}if(null!=a._dayOfYear){c=Ja(a._a[Ta],e[Ta]);if(a._dayOfYear>(Q(c)?366:365)||0===a._dayOfYear)k(a)._overflowDayOfYear=!0;c=ra(c,0,a._dayOfYear);a._a[$a]=c.getUTCMonth();
a._a[Wa]=c.getUTCDate()}for(c=0;3>c&&null==a._a[c];++c)a._a[c]=d[c]=e[c];for(;7>c;c++)a._a[c]=d[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Ca]&&0===a._a[Ua]&&0===a._a[ab]&&0===a._a[ib]&&(a._nextDay=!0,a._a[Ca]=0);a._d=(a._useUTC?ra:wa).apply(null,d);d=a._useUTC?a._d.getUTCDay():a._d.getDay();null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm);a._nextDay&&(a._a[Ca]=24);a._w&&"undefined"!==typeof a._w.d&&a._w.d!==d&&(k(a).weekdayMismatch=!0)}}function R(a){var c,b;c=a._i;var d=oc.exec(c)||
pc.exec(c),e,f,g,h;if(d){k(a).iso=!0;c=0;for(b=zb.length;c<b;c++)if(zb[c][1].exec(d[1])){f=zb[c][0];e=!1!==zb[c][2];break}if(null==f)a._isValid=!1;else{if(d[3]){c=0;for(b=Mb.length;c<b;c++)if(Mb[c][1].exec(d[3])){g=(d[2]||" ")+Mb[c][0];break}if(null==g){a._isValid=!1;return}}if(e||null==g){if(d[4])if(qc.exec(d[4]))h="Z";else{a._isValid=!1;return}a._f=f+(g||"")+(h||"");ea(a)}else a._isValid=!1}}else a._isValid=!1}function Ga(a){var c=rc.exec(a._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g,
" ").trim());if(c){var b=c[3],d=c[2],e=c[5],f=c[6],g=c[7],h=parseInt(c[4],10),b=[49>=h?2E3+h:999>=h?1900+h:h,$b.indexOf(b),parseInt(d,10),parseInt(e,10),parseInt(f,10)];g&&b.push(parseInt(g,10));a:{if(g=c[1])if(g=ac.indexOf(g),d=(new Date(b[0],b[1],b[2])).getDay(),g!==d){k(a).weekdayMismatch=!0;g=a._isValid=!1;break a}g=!0}g&&(a._a=b,(g=c[8])?c=sc[g]:c[9]?c=0:(c=parseInt(c[10],10),g=c%100,c=(c-g)/100*60+g),a._tzm=c,a._d=ra.apply(null,a._a),a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),k(a).rfc2822=
!0)}else a._isValid=!1}function va(a){var c=tc.exec(a._i);null!==c?a._d=new Date(+c[1]):(R(a),!1===a._isValid&&(delete a._isValid,Ga(a),!1===a._isValid&&(delete a._isValid,b.createFromInputFallback(a))))}function ea(a){if(a._f===b.ISO_8601)R(a);else if(a._f===b.RFC_2822)Ga(a);else{a._a=[];k(a).empty=!0;var c=""+a._i,d,e,f,g,h,n=c.length,l=0;f=N(a._f,a._locale).match(Yb)||[];for(d=0;d<f.length;d++){g=f[d];if(e=(c.match(O(g,a))||[])[0])h=c.substr(0,c.indexOf(e)),0<h.length&&k(a).unusedInput.push(h),
c=c.slice(c.indexOf(e)+e.length),l+=e.length;if(lb[g]){if(e?k(a).empty=!1:k(a).unusedTokens.push(g),h=a,null!=e&&q(Lb,g))Lb[g](e,h._a,h,g)}else a._strict&&!e&&k(a).unusedTokens.push(g)}k(a).charsLeftOver=n-l;0<c.length&&k(a).unusedInput.push(c);12>=a._a[Ca]&&!0===k(a).bigHour&&0<a._a[Ca]&&(k(a).bigHour=void 0);k(a).parsedDateParts=a._a.slice(0);k(a).meridiem=a._meridiem;c=a._a;d=Ca;n=a._locale;f=a._a[Ca];l=a._meridiem;null!=l&&(null!=n.meridiemHour?f=n.meridiemHour(f,l):null!=n.isPM&&((n=n.isPM(l))&&
12>f&&(f+=12),n||12!==f||(f=0)));c[d]=f;Ra(a);Ya(a)}}function Qa(a){if(!a._d){var b=ba(a._i);a._a=c([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)});Ra(a)}}function Na(a){var c=a._i,b=a._f;a._locale=a._locale||Fa(a._l);if(null===c||void 0===b&&""===c)return u({nullInput:!0});"string"===typeof c&&(a._i=c=a._locale.preparse(c));if(w(c))return new v(Ya(c));if(h(c))a._d=c;else if(g(b)){var d,f,n;if(0===a._f.length)k(a).invalidFormat=!0,a._d=
new Date(NaN);else{for(c=0;c<a._f.length;c++)if(b=0,d=z({},a),null!=a._useUTC&&(d._useUTC=a._useUTC),d._f=a._f[c],ea(d),r(d)&&(b+=k(d).charsLeftOver,b+=10*k(d).unusedTokens.length,k(d).score=b,null==n||b<n))n=b,f=d;e(a,f||d)}}else b?ea(a):la(a);r(a)||(a._d=null);return a}function la(a){var d=a._i;l(d)?a._d=new Date(b.now()):h(d)?a._d=new Date(d.valueOf()):"string"===typeof d?va(a):g(d)?(a._a=c(d.slice(0),function(a){return parseInt(a,10)}),Ra(a)):p(d)?Qa(a):m(d)?a._d=new Date(d):b.createFromInputFallback(a)}
function db(a,c,b,d,e){var k={};if(!0===b||!1===b)d=b,b=void 0;if(p(a)&&f(a)||g(a)&&0===a.length)a=void 0;k._isAMomentObject=!0;k._useUTC=k._isUTC=e;k._l=b;k._i=a;k._f=c;k._strict=d;a=new v(Ya(Na(k)));a._nextDay&&(a.add(1,"d"),a._nextDay=void 0);return a}function K(a,c,b,d){return db(a,c,b,d,!1)}function ma(a,c){var b,d;1===c.length&&g(c[0])&&(c=c[0]);if(!c.length)return K();b=c[0];for(d=1;d<c.length;++d)if(!c[d].isValid()||c[d][a](b))b=c[d];return b}function E(a){for(var c in a)if(-1===ya.call(rb,
c)||null!=a[c]&&isNaN(a[c]))return!1;c=!1;for(var b=0;b<rb.length;++b)if(a[rb[b]]){if(c)return!1;parseFloat(a[rb[b]])!==d(a[rb[b]])&&(c=!0)}return!0}function da(a){a=ba(a);var c=a.year||0,b=a.quarter||0,d=a.month||0,e=a.week||0,f=a.day||0,k=a.hour||0,g=a.minute||0,h=a.second||0,n=a.millisecond||0;this._isValid=E(a);this._milliseconds=+n+1E3*h+6E4*g+36E5*k;this._days=+f+7*e;this._months=+d+3*b+12*c;this._data={};this._locale=Fa();this._bubble()}function ia(a){return a instanceof da}function oa(a){return 0>
a?-1*Math.round(-1*a):Math.round(a)}function X(a,c){I(a,0,0,function(){var a=this.utcOffset(),b="+";0>a&&(a=-a,b="-");return b+V(~~(a/60),2)+c+V(~~a%60,2)})}function aa(a,c){a=(c||"").match(a);if(null===a)return null;a=((a[a.length-1]||[])+"").match(uc)||["-",0,0];c=+(60*a[1])+d(a[2]);return 0===c?0:"+"===a[0]?c:-c}function L(a,c){return c._isUTC?(c=c.clone(),a=(w(a)||h(a)?a.valueOf():K(a).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+a),b.updateOffset(c,!1),c):K(a).local()}function nb(){return this.isValid()?
this._isUTC&&0===this._offset:!1}function Oa(a,c){var b=a,e=null;ia(a)?b={ms:a._milliseconds,d:a._days,M:a._months}:m(a)?(b={},c?b[c]=a:b.milliseconds=a):(e=vc.exec(a))?(b="-"===e[1]?-1:1,b={y:0,d:d(e[Wa])*b,h:d(e[Ca])*b,m:d(e[Ua])*b,s:d(e[ab])*b,ms:d(oa(1E3*e[ib]))*b}):(e=wc.exec(a))?(b="-"===e[1]?-1:1,b={y:Za(e[2],b),M:Za(e[3],b),w:Za(e[4],b),d:Za(e[5],b),h:Za(e[6],b),m:Za(e[7],b),s:Za(e[8],b)}):null==b?b={}:"object"===typeof b&&("from"in b||"to"in b)&&(e=K(b.from),b=K(b.to),e.isValid()&&b.isValid()?
(b=L(b,e),e.isBefore(b)?b=wb(e,b):(b=wb(b,e),b.milliseconds=-b.milliseconds,b.months=-b.months),e=b):e={milliseconds:0,months:0},b={},b.ms=e.milliseconds,b.M=e.months);b=new da(b);ia(a)&&q(a,"_locale")&&(b._locale=a._locale);return b}function Za(a,c){a=a&&parseFloat(a.replace(",","."));return(isNaN(a)?0:a)*c}function wb(a,c){var b={milliseconds:0,months:0};b.months=c.month()-a.month()+12*(c.year()-a.year());a.clone().add(b.months,"M").isAfter(c)&&--b.months;b.milliseconds=+c-+a.clone().add(b.months,
"M");return b}function Sa(a,c){return function(b,d){var e;null===d||isNaN(+d)||(A(c,"moment()."+c+"(period, number) is deprecated. Please use moment()."+c+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),e=b,b=d,d=e);b=Oa("string"===typeof b?+b:b,d);xb(this,b,a);return this}}function xb(a,c,d,e){var f=c._milliseconds,k=oa(c._days);c=oa(c._months);a.isValid()&&(e=null==e?!0:e,c&&ha(a,Y(a,"Month")+c*d),k&&ga(a,"Date",Y(a,"Date")+k*d),f&&a._d.setTime(a._d.valueOf()+
f*d),e&&b.updateOffset(a,k||c))}function tb(a,c){var b=12*(c.year()-a.year())+(c.month()-a.month()),d=a.clone().add(b,"months");0>c-d?(a=a.clone().add(b-1,"months"),c=(c-d)/(d-a)):(a=a.clone().add(b+1,"months"),c=(c-d)/(a-d));return-(b+c)||0}function ub(a){if(void 0===a)return this._locale._abbr;a=Fa(a);null!=a&&(this._locale=a);return this}function mb(){return this._locale}function jb(a,c){I(0,[a,a.length],0,c)}function Qb(a,c,b,d,e){var f;if(null==a)return ja(this,d,e).year;f=Da(a,d,e);c>f&&(c=
f);a=sa(a,c,b,d,e);a=ra(a.year,0,a.dayOfYear);this.year(a.getUTCFullYear());this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function kc(a,c){c[ib]=d(1E3*("0."+a))}function Rb(a){return a}function vb(c,b,d,e){var f=Fa();b=a().set(e,b);return f[d](b,c)}function Sb(a,c,b){m(a)&&(c=a,a=void 0);a=a||"";if(null!=c)return vb(a,c,b,"month");var d=[];for(c=0;12>c;c++)d[c]=vb(a,c,b,"month");return d}function Gb(a,c,b,d){"boolean"!==typeof a&&(b=c=a,a=!1);m(c)&&(b=c,c=void 0);c=c||"";var e=
Fa();a=a?e._week.dow:0;if(null!=b)return vb(c,(b+a)%7,d,"day");e=[];for(b=0;7>b;b++)e[b]=vb(c,(b+a)%7,d,"day");return e}function Tb(a,c,b,d){c=Oa(c,b);a._milliseconds+=d*c._milliseconds;a._days+=d*c._days;a._months+=d*c._months;return a._bubble()}function Ub(a){return 0>a?Math.floor(a):Math.ceil(a)}function cb(a){return function(){return this.as(a)}}function gb(a){return function(){return this.isValid()?this._data[a]:NaN}}function lc(a,c,b,d,e){return e.relativeTime(c||1,!!b,a,d)}function kb(a){return(0<
a)-(0>a)||+a}function Ab(){if(!this.isValid())return this.localeData().invalidDate();var a=Nb(this._milliseconds)/1E3,c=Nb(this._days),b=Nb(this._months),d,e;d=t(a/60);e=t(d/60);a%=60;d%=60;var f=t(b/12),b=b%12,a=a?a.toFixed(3).replace(/\.?0+$/,""):"",k=this.asSeconds();if(!k)return"P0D";var g=0>k?"-":"",h=kb(this._months)!==kb(k)?"-":"",n=kb(this._days)!==kb(k)?"-":"",k=kb(this._milliseconds)!==kb(k)?"-":"";return g+"P"+(f?h+f+"Y":"")+(b?h+b+"M":"")+(c?n+c+"D":"")+(e||d||a?"T":"")+(e?k+e+"H":"")+
(d?k+d+"M":"")+(a?k+a+"S":"")}var Vb,Wb;Wb=Array.prototype.some?Array.prototype.some:function(a){for(var c=Object(this),b=c.length>>>0,d=0;d<b;d++)if(d in c&&a.call(this,c[d],d,c))return!0;return!1};var Hb=b.momentProperties=[],Ib=!1,Xb={};b.suppressDeprecationWarnings=!1;b.deprecationHandler=null;var bc;bc=Object.keys?Object.keys:function(a){var c,b=[];for(c in a)q(a,c)&&b.push(c);return b};var ob={},Ea={},Yb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
yb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Jb={},lb={},cc=/\d/,Pa=/\d\d/,dc=/\d{3}/,Ob=/\d{4}/,Bb=/[+-]?\d{6}/,ua=/\d\d?/,ec=/\d\d\d\d?/,fc=/\d\d\d\d\d\d?/,Cb=/\d{1,3}/,Pb=/\d{1,4}/,Db=/[+-]?\d{1,6}/,xc=/\d+/,Eb=/[+-]?\d+/,yc=/Z|[+-]\d\d:?\d\d/gi,Fb=/Z|[+-]\d\d(?::?\d\d)?/gi,sb=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Kb={},Lb={},Ta=0,$a=1,Wa=2,Ca=3,Ua=4,ab=5,ib=6,mc=7,nc=8;I("Y",0,
0,function(){var a=this.year();return 9999>=a?""+a:"+"+a});I(0,["YY",2],0,function(){return this.year()%100});I(0,["YYYY",4],0,"year");I(0,["YYYYY",5],0,"year");I(0,["YYYYYY",6,!0],0,"year");C("year","y");Ea.year=1;H("Y",Eb);H("YY",ua,Pa);H("YYYY",Pb,Ob);H("YYYYY",Db,Bb);H("YYYYYY",Db,Bb);S(["YYYYY","YYYYYY"],Ta);S("YYYY",function(a,c){c[Ta]=2===a.length?b.parseTwoDigitYear(a):d(a)});S("YY",function(a,c){c[Ta]=b.parseTwoDigitYear(a)});S("Y",function(a,c){c[Ta]=parseInt(a,10)});b.parseTwoDigitYear=
function(a){return d(a)+(68<d(a)?1900:2E3)};var gc=U("FullYear",!0),ya;ya=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var c;for(c=0;c<this.length;++c)if(this[c]===a)return c;return-1};I("M",["MM",2],"Mo",function(){return this.month()+1});I("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)});I("MMMM",0,0,function(a){return this.localeData().months(this,a)});C("month","M");Ea.month=8;H("M",ua);H("MM",ua,Pa);H("MMM",function(a,c){return c.monthsShortRegex(a)});H("MMMM",
function(a,c){return c.monthsRegex(a)});S(["M","MM"],function(a,c){c[$a]=d(a)-1});S(["MMM","MMMM"],function(a,c,b,d){d=b._locale.monthsParse(a,d,b._strict);null!=d?c[$a]=d:k(b).invalidMonth=a});var hc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$b="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");I("w",["ww",2],"wo","week");I("W",["WW",2],"Wo","isoWeek");C("week","w");C("isoWeek","W");Ea.week=5;Ea.isoWeek=5;H("w",ua);H("ww",ua,Pa);H("W",ua);H("WW",ua,Pa);ca(["w","ww","W","WW"],function(a,c,b,e){c[e.substr(0,
1)]=d(a)});I("d",0,"do","day");I("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)});I("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)});I("dddd",0,0,function(a){return this.localeData().weekdays(this,a)});I("e",0,0,"weekday");I("E",0,0,"isoWeekday");C("day","d");C("weekday","e");C("isoWeekday","E");Ea.day=11;Ea.weekday=11;Ea.isoWeekday=11;H("d",ua);H("e",ua);H("E",ua);H("dd",function(a,c){return c.weekdaysMinRegex(a)});H("ddd",function(a,c){return c.weekdaysShortRegex(a)});
H("dddd",function(a,c){return c.weekdaysRegex(a)});ca(["dd","ddd","dddd"],function(a,c,b,d){d=b._locale.weekdaysParse(a,d,b._strict);null!=d?c.d=d:k(b).invalidWeekday=a});ca(["d","e","E"],function(a,c,b,e){c[e]=d(a)});var ac="Sun Mon Tue Wed Thu Fri Sat".split(" ");I("H",["HH",2],0,"hour");I("h",["hh",2],0,Aa);I("k",["kk",2],0,function(){return this.hours()||24});I("hmm",0,0,function(){return""+Aa.apply(this)+V(this.minutes(),2)});I("hmmss",0,0,function(){return""+Aa.apply(this)+V(this.minutes(),
2)+V(this.seconds(),2)});I("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)});I("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)});Ia("a",!0);Ia("A",!1);C("hour","h");Ea.hour=13;H("a",hb);H("A",hb);H("H",ua);H("h",ua);H("k",ua);H("HH",ua,Pa);H("hh",ua,Pa);H("kk",ua,Pa);H("hmm",ec);H("hmmss",fc);H("Hmm",ec);H("Hmmss",fc);S(["H","HH"],Ca);S(["k","kk"],function(a,c,b){a=d(a);c[Ca]=24===a?0:a});S(["a","A"],function(a,c,b){b._isPm=b._locale.isPM(a);b._meridiem=
a});S(["h","hh"],function(a,c,b){c[Ca]=d(a);k(b).bigHour=!0});S("hmm",function(a,c,b){var e=a.length-2;c[Ca]=d(a.substr(0,e));c[Ua]=d(a.substr(e));k(b).bigHour=!0});S("hmmss",function(a,c,b){var e=a.length-4,f=a.length-2;c[Ca]=d(a.substr(0,e));c[Ua]=d(a.substr(e,2));c[ab]=d(a.substr(f));k(b).bigHour=!0});S("Hmm",function(a,c,b){b=a.length-2;c[Ca]=d(a.substr(0,b));c[Ua]=d(a.substr(b))});S("Hmmss",function(a,c,b){b=a.length-4;var e=a.length-2;c[Ca]=d(a.substr(0,b));c[Ua]=d(a.substr(b,2));c[ab]=d(a.substr(e))});
var zc=U("Hours",!0),Zb={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",
hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January February March April May June July August September October November December".split(" "),monthsShort:$b,week:{dow:0,doy:6},weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysShort:ac,meridiemParse:/[ap]\.?m?\.?/i},Ba={},qb={},pb,oc=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
pc=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qc=/Z|[+-]\d\d(?::?\d\d)?/,zb=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Mb=
[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],tc=/^\/?Date\((\-?\d+)/i,rc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,sc={UT:0,GMT:0,EDT:-240,
EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};b.createFromInputFallback=y("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))});b.ISO_8601=function(){};
b.RFC_2822=function(){};var Ac=y("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=K.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:u()}),Bc=y("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=K.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:u()}),rb="year quarter month week day hour minute second millisecond".split(" ");
X("Z",":");X("ZZ","");H("Z",Fb);H("ZZ",Fb);S(["Z","ZZ"],function(a,c,b){b._useUTC=!0;b._tzm=aa(Fb,a)});var uc=/([\+\-]|\d\d)/gi;b.updateOffset=function(){};var vc=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,wc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Oa.fn=da.prototype;Oa.invalid=function(){return Oa(NaN)};var Cc=Sa(1,"add"),Dc=Sa(-1,"subtract");b.defaultFormat=
"YYYY-MM-DDTHH:mm:ssZ";b.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ic=y("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});I(0,["gg",2],0,function(){return this.weekYear()%100});I(0,["GG",2],0,function(){return this.isoWeekYear()%100});jb("gggg","weekYear");jb("ggggg","weekYear");jb("GGGG","isoWeekYear");jb("GGGGG","isoWeekYear");C("weekYear",
"gg");C("isoWeekYear","GG");Ea.weekYear=1;Ea.isoWeekYear=1;H("G",Eb);H("g",Eb);H("GG",ua,Pa);H("gg",ua,Pa);H("GGGG",Pb,Ob);H("gggg",Pb,Ob);H("GGGGG",Db,Bb);H("ggggg",Db,Bb);ca(["gggg","ggggg","GGGG","GGGGG"],function(a,c,b,e){c[e.substr(0,2)]=d(a)});ca(["gg","GG"],function(a,c,d,e){c[e]=b.parseTwoDigitYear(a)});I("Q",0,"Qo","quarter");C("quarter","Q");Ea.quarter=7;H("Q",cc);S("Q",function(a,c){c[$a]=3*(d(a)-1)});I("D",["DD",2],"Do","date");C("date","D");Ea.date=9;H("D",ua);H("DD",ua,Pa);H("Do",function(a,
c){return a?c._dayOfMonthOrdinalParse||c._ordinalParse:c._dayOfMonthOrdinalParseLenient});S(["D","DD"],Wa);S("Do",function(a,c){c[Wa]=d(a.match(ua)[0])});var jc=U("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear");C("dayOfYear","DDD");Ea.dayOfYear=4;H("DDD",Cb);H("DDDD",dc);S(["DDD","DDDD"],function(a,c,b){b._dayOfYear=d(a)});I("m",["mm",2],0,"minute");C("minute","m");Ea.minute=14;H("m",ua);H("mm",ua,Pa);S(["m","mm"],Ua);var Ec=U("Minutes",!1);I("s",["ss",2],0,"second");C("second","s");Ea.second=15;
H("s",ua);H("ss",ua,Pa);S(["s","ss"],ab);var Fc=U("Seconds",!1);I("S",0,0,function(){return~~(this.millisecond()/100)});I(0,["SS",2],0,function(){return~~(this.millisecond()/10)});I(0,["SSS",3],0,"millisecond");I(0,["SSSS",4],0,function(){return 10*this.millisecond()});I(0,["SSSSS",5],0,function(){return 100*this.millisecond()});I(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});I(0,["SSSSSSS",7],0,function(){return 1E4*this.millisecond()});I(0,["SSSSSSSS",8],0,function(){return 1E5*this.millisecond()});
I(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});C("millisecond","ms");Ea.millisecond=16;H("S",Cb,cc);H("SS",Cb,Pa);H("SSS",Cb,dc);var eb;for(eb="SSSS";9>=eb.length;eb+="S")H(eb,xc);for(eb="S";9>=eb.length;eb+="S")S(eb,kc);var Gc=U("Milliseconds",!1);I("z",0,0,"zoneAbbr");I("zz",0,0,"zoneName");var T=v.prototype;T.add=Cc;T.calendar=function(a,c){a=a||K();var d=L(a,this).startOf("day"),d=b.calendarFormat(this,d)||"sameElse";c=c&&(D(c[d])?c[d].call(this,a):c[d]);return this.format(c||
this.localeData().calendar(d,this,K(a)))};T.clone=function(){return new v(this)};T.diff=function(a,c,b){var d;if(!this.isValid())return NaN;a=L(a,this);if(!a.isValid())return NaN;d=6E4*(a.utcOffset()-this.utcOffset());c=G(c);switch(c){case "year":c=tb(this,a)/12;break;case "month":c=tb(this,a);break;case "quarter":c=tb(this,a)/3;break;case "second":c=(this-a)/1E3;break;case "minute":c=(this-a)/6E4;break;case "hour":c=(this-a)/36E5;break;case "day":c=(this-a-d)/864E5;break;case "week":c=(this-a-d)/
6048E5;break;default:c=this-a}return b?c:t(c)};T.endOf=function(a){a=G(a);if(void 0===a||"millisecond"===a)return this;"date"===a&&(a="day");return this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")};T.format=function(a){a||(a=this.isUtc()?b.defaultFormatUtc:b.defaultFormat);a=W(this,a);return this.localeData().postformat(a)};T.from=function(a,c){return this.isValid()&&(w(a)&&a.isValid()||K(a).isValid())?Oa({to:this,from:a}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()};
T.fromNow=function(a){return this.from(K(),a)};T.to=function(a,c){return this.isValid()&&(w(a)&&a.isValid()||K(a).isValid())?Oa({from:this,to:a}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()};T.toNow=function(a){return this.to(K(),a)};T.get=function(a){a=G(a);return D(this[a])?this[a]():this};T.invalidAt=function(){return k(this).overflow};T.isAfter=function(a,c){a=w(a)?a:K(a);if(!this.isValid()||!a.isValid())return!1;c=G(l(c)?"millisecond":c);return"millisecond"===c?this.valueOf()>
a.valueOf():a.valueOf()<this.clone().startOf(c).valueOf()};T.isBefore=function(a,c){a=w(a)?a:K(a);if(!this.isValid()||!a.isValid())return!1;c=G(l(c)?"millisecond":c);return"millisecond"===c?this.valueOf()<a.valueOf():this.clone().endOf(c).valueOf()<a.valueOf()};T.isBetween=function(a,c,b,d){d=d||"()";return("("===d[0]?this.isAfter(a,b):!this.isBefore(a,b))&&(")"===d[1]?this.isBefore(c,b):!this.isAfter(c,b))};T.isSame=function(a,c){a=w(a)?a:K(a);if(!this.isValid()||!a.isValid())return!1;c=G(c||"millisecond");
if("millisecond"===c)return this.valueOf()===a.valueOf();a=a.valueOf();return this.clone().startOf(c).valueOf()<=a&&a<=this.clone().endOf(c).valueOf()};T.isSameOrAfter=function(a,c){return this.isSame(a,c)||this.isAfter(a,c)};T.isSameOrBefore=function(a,c){return this.isSame(a,c)||this.isBefore(a,c)};T.isValid=function(){return r(this)};T.lang=ic;T.locale=ub;T.localeData=mb;T.max=Bc;T.min=Ac;T.parsingFlags=function(){return e({},k(this))};T.set=function(a,c){if("object"===typeof a){a=ba(a);c=Z(a);
for(var b=0;b<c.length;b++)this[c[b].unit](a[c[b].unit])}else if(a=G(a),D(this[a]))return this[a](c);return this};T.startOf=function(a){a=G(a);switch(a){case "year":this.month(0);case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":case "date":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}"week"===a&&this.weekday(0);"isoWeek"===a&&this.isoWeekday(1);"quarter"===a&&this.month(3*Math.floor(this.month()/3));return this};
T.subtract=Dc;T.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]};T.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}};T.toDate=function(){return new Date(this.valueOf())};T.toISOString=function(a){if(!this.isValid())return null;var c=(a=!0!==a)?this.clone().utc():this;return 0>c.year()||9999<c.year()?
W(c,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?a?this.toDate().toISOString():(new Date(this.valueOf()+6E4*this.utcOffset())).toISOString().replace("Z",W(c,"Z")):W(c,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")};T.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",c="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",c="Z");var a="["+a+'("]',b=0<=this.year()&&9999>=
this.year()?"YYYY":"YYYYYY";return this.format(a+b+"-MM-DD[T]HH:mm:ss.SSS"+(c+'[")]'))};T.toJSON=function(){return this.isValid()?this.toISOString():null};T.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};T.unix=function(){return Math.floor(this.valueOf()/1E3)};T.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||0)};T.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};
T.year=gc;T.isLeapYear=function(){return Q(this.year())};T.weekYear=function(a){return Qb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};T.isoWeekYear=function(a){return Qb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)};T.quarter=T.quarters=function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)};T.month=qa;T.daysInMonth=function(){return ka(this.year(),this.month())};T.week=T.weeks=function(a){var c=this.localeData().week(this);
return null==a?c:this.add(7*(a-c),"d")};T.isoWeek=T.isoWeeks=function(a){var c=ja(this,1,4).week;return null==a?c:this.add(7*(a-c),"d")};T.weeksInYear=function(){var a=this.localeData()._week;return Da(this.year(),a.dow,a.doy)};T.isoWeeksInYear=function(){return Da(this.year(),1,4)};T.date=jc;T.day=T.days=function(a){if(!this.isValid())return null!=a?this:NaN;var c=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=a){var b=this.localeData();"string"===typeof a&&(isNaN(a)?(a=b.weekdaysParse(a),
a="number"===typeof a?a:null):a=parseInt(a,10));return this.add(a-c,"d")}return c};T.weekday=function(a){if(!this.isValid())return null!=a?this:NaN;var c=(this.day()+7-this.localeData()._week.dow)%7;return null==a?c:this.add(a-c,"d")};T.isoWeekday=function(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var c=this.localeData();a="string"===typeof a?c.weekdaysParse(a)%7||7:isNaN(a)?null:a;return this.day(this.day()%7?a:a-7)}return this.day()||7};T.dayOfYear=function(a){var c=Math.round((this.clone().startOf("day")-
this.clone().startOf("year"))/864E5)+1;return null==a?c:this.add(a-c,"d")};T.hour=T.hours=zc;T.minute=T.minutes=Ec;T.second=T.seconds=Fc;T.millisecond=T.milliseconds=Gc;T.utcOffset=function(a,c,d){var e=this._offset||0,f;if(!this.isValid())return null!=a?this:NaN;if(null!=a){if("string"===typeof a){if(a=aa(Fb,a),null===a)return this}else 16>Math.abs(a)&&!d&&(a*=60);!this._isUTC&&c&&(f=15*-Math.round(this._d.getTimezoneOffset()/15));this._offset=a;this._isUTC=!0;null!=f&&this.add(f,"m");e!==a&&(!c||
this._changeInProgress?xb(this,Oa(a-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,b.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?e:15*-Math.round(this._d.getTimezoneOffset()/15)};T.utc=function(a){return this.utcOffset(0,a)};T.local=function(a){this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(15*-Math.round(this._d.getTimezoneOffset()/15),"m"));return this};T.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,
!0);else if("string"===typeof this._i){var a=aa(yc,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this};T.hasAlignedHourOffset=function(a){if(!this.isValid())return!1;a=a?K(a).utcOffset():0;return 0===(this.utcOffset()-a)%60};T.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};T.isLocal=function(){return this.isValid()?!this._isUTC:!1};T.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};T.isUtc=
nb;T.isUTC=nb;T.zoneAbbr=function(){return this._isUTC?"UTC":""};T.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};T.dates=y("dates accessor is deprecated. Use date instead.",jc);T.months=y("months accessor is deprecated. Use month instead",qa);T.years=y("years accessor is deprecated. Use year instead",gc);T.zone=y("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(a,c){return null!=a?("string"!==typeof a&&(a=
-a),this.utcOffset(a,c),this):-this.utcOffset()});T.isDSTShifted=y("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var c={};z(c,this);c=Na(c);if(c._a){var b=c._isUTC?a(c._a):K(c._a);this._isDSTShifted=this.isValid()&&0<n(c._a,b.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var ta=F.prototype;ta.calendar=function(a,c,b){a=this._calendar[a]||this._calendar.sameElse;
return D(a)?a.call(c,b):a};ta.longDateFormat=function(a){var c=this._longDateFormat[a],b=this._longDateFormat[a.toUpperCase()];if(c||!b)return c;this._longDateFormat[a]=b.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)});return this._longDateFormat[a]};ta.invalidDate=function(){return this._invalidDate};ta.ordinal=function(a){return this._ordinal.replace("%d",a)};ta.preparse=Rb;ta.postformat=Rb;ta.relativeTime=function(a,c,b,d){var e=this._relativeTime[b];return D(e)?e(a,c,b,d):e.replace(/%d/i,
a)};ta.pastFuture=function(a,c){a=this._relativeTime[0<a?"future":"past"];return D(a)?a(c):a.replace(/%s/i,c)};ta.set=function(a){var c,b;for(b in a)c=a[b],D(c)?this[b]=c:this["_"+b]=c;this._config=a;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)};ta.months=function(a,c){return a?g(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||hc).test(c)?"format":"standalone"][a.month()]:g(this._months)?
this._months:this._months.standalone};ta.monthsShort=function(a,c){return a?g(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[hc.test(c)?"format":"standalone"][a.month()]:g(this._monthsShort)?this._monthsShort:this._monthsShort.standalone};ta.monthsParse=function(c,b,d){var e,f;if(this._monthsParseExact){a:{c=c.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],e=0;12>e;++e)f=a([2E3,e]),this._shortMonthsParse[e]=
this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[e]=this.months(f,"").toLocaleLowerCase();if(d)b="MMM"===b?ya.call(this._shortMonthsParse,c):ya.call(this._longMonthsParse,c);else if("MMM"===b){b=ya.call(this._shortMonthsParse,c);if(-1!==b)break a;b=ya.call(this._longMonthsParse,c)}else{b=ya.call(this._longMonthsParse,c);if(-1!==b)break a;b=ya.call(this._shortMonthsParse,c)}b=-1!==b?b:null}return b}this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=
[]);for(e=0;12>e;e++)if(f=a([2E3,e]),d&&!this._longMonthsParse[e]&&(this._longMonthsParse[e]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[e]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),d||this._monthsParse[e]||(f="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[e]=new RegExp(f.replace(".",""),"i")),d&&"MMMM"===b&&this._longMonthsParse[e].test(c)||d&&"MMM"===b&&this._shortMonthsParse[e].test(c)||!d&&this._monthsParse[e].test(c))return e};
ta.monthsRegex=function(a){if(this._monthsParseExact)return q(this,"_monthsRegex")||na.call(this),a?this._monthsStrictRegex:this._monthsRegex;q(this,"_monthsRegex")||(this._monthsRegex=sb);return this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex};ta.monthsShortRegex=function(a){if(this._monthsParseExact)return q(this,"_monthsRegex")||na.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex;q(this,"_monthsShortRegex")||(this._monthsShortRegex=sb);return this._monthsShortStrictRegex&&
a?this._monthsShortStrictRegex:this._monthsShortRegex};ta.week=function(a){return ja(a,this._week.dow,this._week.doy).week};ta.firstDayOfYear=function(){return this._week.doy};ta.firstDayOfWeek=function(){return this._week.dow};ta.weekdays=function(a,c){return a?g(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(c)?"format":"standalone"][a.day()]:g(this._weekdays)?this._weekdays:this._weekdays.standalone};ta.weekdaysMin=function(a){return a?this._weekdaysMin[a.day()]:
this._weekdaysMin};ta.weekdaysShort=function(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort};ta.weekdaysParse=function(c,b,d){var e,f;if(this._weekdaysParseExact)return Ma.call(this,c,b,d);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(e=0;7>e;e++)if(f=a([2E3,1]).day(e),d&&!this._fullWeekdaysParse[e]&&(this._fullWeekdaysParse[e]=new RegExp("^"+this.weekdays(f,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[e]=
new RegExp("^"+this.weekdaysShort(f,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[e]=new RegExp("^"+this.weekdaysMin(f,"").replace(".",".?")+"$","i")),this._weekdaysParse[e]||(f="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[e]=new RegExp(f.replace(".",""),"i")),d&&"dddd"===b&&this._fullWeekdaysParse[e].test(c)||d&&"ddd"===b&&this._shortWeekdaysParse[e].test(c)||d&&"dd"===b&&this._minWeekdaysParse[e].test(c)||!d&&this._weekdaysParse[e].test(c))return e};
ta.weekdaysRegex=function(a){if(this._weekdaysParseExact)return q(this,"_weekdaysRegex")||xa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex;q(this,"_weekdaysRegex")||(this._weekdaysRegex=sb);return this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex};ta.weekdaysShortRegex=function(a){if(this._weekdaysParseExact)return q(this,"_weekdaysRegex")||xa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;q(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=
sb);return this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex};ta.weekdaysMinRegex=function(a){if(this._weekdaysParseExact)return q(this,"_weekdaysRegex")||xa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;q(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=sb);return this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex};ta.isPM=function(a){return"p"===(a+"").toLowerCase().charAt(0)};ta.meridiem=function(a,c,
b){return 11<a?b?"pm":"PM":b?"am":"AM"};La("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var c=a%10,c=1===d(a%100/10)?"th":1===c?"st":2===c?"nd":3===c?"rd":"th";return a+c}});b.lang=y("moment.lang is deprecated. Use moment.locale instead.",La);b.langData=y("moment.langData is deprecated. Use moment.localeData instead.",Fa);var bb=Math.abs,Hc=cb("ms"),Ic=cb("s"),Jc=cb("m"),Kc=cb("h"),Lc=cb("d"),Mc=cb("w"),Nc=cb("M"),Oc=cb("y"),Pc=gb("milliseconds"),Qc=gb("seconds"),Rc=gb("minutes"),
Sc=gb("hours"),Tc=gb("days"),Uc=gb("months"),Vc=gb("years"),fb=Math.round,Xa={ss:44,s:45,m:45,h:22,d:26,M:11},Nb=Math.abs,pa=da.prototype;pa.isValid=function(){return this._isValid};pa.abs=function(){var a=this._data;this._milliseconds=bb(this._milliseconds);this._days=bb(this._days);this._months=bb(this._months);a.milliseconds=bb(a.milliseconds);a.seconds=bb(a.seconds);a.minutes=bb(a.minutes);a.hours=bb(a.hours);a.months=bb(a.months);a.years=bb(a.years);return this};pa.add=function(a,c){return Tb(this,
a,c,1)};pa.subtract=function(a,c){return Tb(this,a,c,-1)};pa.as=function(a){if(!this.isValid())return NaN;var c,b=this._milliseconds;a=G(a);if("month"===a||"year"===a)return c=this._days+b/864E5,c=this._months+4800*c/146097,"month"===a?c:c/12;c=this._days+Math.round(146097*this._months/4800);switch(a){case "week":return c/7+b/6048E5;case "day":return c+b/864E5;case "hour":return 24*c+b/36E5;case "minute":return 1440*c+b/6E4;case "second":return 86400*c+b/1E3;case "millisecond":return Math.floor(864E5*
c)+b;default:throw Error("Unknown unit "+a);}};pa.asMilliseconds=Hc;pa.asSeconds=Ic;pa.asMinutes=Jc;pa.asHours=Kc;pa.asDays=Lc;pa.asWeeks=Mc;pa.asMonths=Nc;pa.asYears=Oc;pa.valueOf=function(){return this.isValid()?this._milliseconds+864E5*this._days+this._months%12*2592E6+31536E6*d(this._months/12):NaN};pa._bubble=function(){var a=this._milliseconds,c=this._days,b=this._months,d=this._data;0<=a&&0<=c&&0<=b||0>=a&&0>=c&&0>=b||(a+=864E5*Ub(146097*b/4800+c),b=c=0);d.milliseconds=a%1E3;a=t(a/1E3);d.seconds=
a%60;a=t(a/60);d.minutes=a%60;a=t(a/60);d.hours=a%24;c+=t(a/24);a=t(4800*c/146097);b+=a;c-=Ub(146097*a/4800);a=t(b/12);d.days=c;d.months=b%12;d.years=a;return this};pa.clone=function(){return Oa(this)};pa.get=function(a){a=G(a);return this.isValid()?this[a+"s"]():NaN};pa.milliseconds=Pc;pa.seconds=Qc;pa.minutes=Rc;pa.hours=Sc;pa.days=Tc;pa.weeks=function(){return t(this.days()/7)};pa.months=Uc;pa.years=Vc;pa.humanize=function(a){if(!this.isValid())return this.localeData().invalidDate();var c=this.localeData(),
b;b=!a;var d=Oa(this).abs(),e=fb(d.as("s")),f=fb(d.as("m")),k=fb(d.as("h")),g=fb(d.as("d")),h=fb(d.as("M")),d=fb(d.as("y")),e=e<=Xa.ss&&["s",e]||e<Xa.s&&["ss",e]||1>=f&&["m"]||f<Xa.m&&["mm",f]||1>=k&&["h"]||k<Xa.h&&["hh",k]||1>=g&&["d"]||g<Xa.d&&["dd",g]||1>=h&&["M"]||h<Xa.M&&["MM",h]||1>=d&&["y"]||["yy",d];e[2]=b;e[3]=0<+this;e[4]=c;b=lc.apply(null,e);a&&(b=c.pastFuture(+this,b));return c.postformat(b)};pa.toISOString=Ab;pa.toString=Ab;pa.toJSON=Ab;pa.locale=ub;pa.localeData=mb;pa.toIsoString=y("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
Ab);pa.lang=ic;I("X",0,0,"unix");I("x",0,0,"valueOf");H("x",Eb);H("X",/[+-]?\d+(\.\d{1,3})?/);S("X",function(a,c,b){b._d=new Date(1E3*parseFloat(a,10))});S("x",function(a,c,b){b._d=new Date(d(a))});b.version="2.22.1";Vb=K;b.fn=T;b.min=function(){var a=[].slice.call(arguments,0);return ma("isBefore",a)};b.max=function(){var a=[].slice.call(arguments,0);return ma("isAfter",a)};b.now=function(){return Date.now?Date.now():+new Date};b.utc=a;b.unix=function(a){return K(1E3*a)};b.months=function(a,c){return Sb(a,
c,"months")};b.isDate=h;b.locale=La;b.invalid=u;b.duration=Oa;b.isMoment=w;b.weekdays=function(a,c,b){return Gb(a,c,b,"weekdays")};b.parseZone=function(){return K.apply(null,arguments).parseZone()};b.localeData=Fa;b.isDuration=ia;b.monthsShort=function(a,c){return Sb(a,c,"monthsShort")};b.weekdaysMin=function(a,c,b){return Gb(a,c,b,"weekdaysMin")};b.defineLocale=Ha;b.updateLocale=function(a,c){if(null!=c){var b,d=Zb;b=Ka(a);null!=b&&(d=b._config);c=B(d,c);c=new F(c);c.parentLocale=Ba[a];Ba[a]=c;La(a)}else null!=
Ba[a]&&(null!=Ba[a].parentLocale?Ba[a]=Ba[a].parentLocale:null!=Ba[a]&&delete Ba[a]);return Ba[a]};b.locales=function(){return bc(Ba)};b.weekdaysShort=function(a,c,b){return Gb(a,c,b,"weekdaysShort")};b.normalizeUnits=G;b.relativeTimeRounding=function(a){return void 0===a?fb:"function"===typeof a?(fb=a,!0):!1};b.relativeTimeThreshold=function(a,c){if(void 0===Xa[a])return!1;if(void 0===c)return Xa[a];Xa[a]=c;"s"===a&&(Xa.ss=c-1);return!0};b.calendarFormat=function(a,c){a=a.diff(c,"days",!0);return-6>
a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse"};b.prototype=T;b.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"};return b})},"esri/arcade/FunctionWrapper":function(){define(["require","exports"],function(b,g){return function(){return function(b,f){this.context=
this.definition=null;this.definition=b;this.context=f}}()})},"esri/arcade/ImmutablePathArray":function(){define(["require","exports","../core/tsSupport/extendsHelper","./ImmutableArray","./ImmutablePointArray"],function(b,g,p,f,l){return function(b){function f(c,f,e,a,k){c=b.call(this,c)||this;c._lazyPath=[];c._hasZ=!1;c._hasM=!1;c._hasZ=e;c._hasM=a;c._spRef=f;c._cacheId=k;return c}p(f,b);f.prototype.get=function(c){if(void 0===this._lazyPath[c]){var b=this._elements[c];if(void 0===b)return;this._lazyPath[c]=
new l(b,this._spRef,this._hasZ,this._hasM,this._cacheId,c)}return this._lazyPath[c]};f.prototype.equalityTest=function(c){return c===this?!0:null===c||!1===c instanceof f?!1:c.getUniqueHash()===this.getUniqueHash()};f.prototype.getUniqueHash=function(){return this._cacheId.toString()};return f}(f)})},"esri/arcade/ImmutablePointArray":function(){define("require exports ../core/tsSupport/extendsHelper ../kernel ./ImmutableArray ../geometry/Point".split(" "),function(b,g,p,f,l,m){var h=0===f.version.indexOf("4.");
return function(c){function b(b,a,f,g,h,l){b=c.call(this,b)||this;b._lazyPt=[];b._hasZ=!1;b._hasM=!1;b._spRef=a;b._hasZ=f;b._hasM=g;b._cacheId=h;b._partId=l;return b}p(b,c);b.prototype.get=function(c){if(void 0===this._lazyPt[c]){var a=this._elements[c];if(void 0===a)return;var b=this._hasZ,e=this._hasM,f=null,f=b&&!e?new m(a[0],a[1],a[2],void 0,this._spRef):e&&b?new m(a[0],a[1],void 0,a[2],this._spRef):b&&e?new m(a[0],a[1],a[2],a[3],this._spRef):new m(a[0],a[1],this._spRef);h?f.cache._arcadeCacheId=
this._cacheId.toString()+"-"+this._partId.toString()+"-"+c.toString():f.setCacheValue("_arcadeCacheId",this._cacheId.toString()+"-"+this._partId.toString()+"-"+c.toString());this._lazyPt[c]=f}return this._lazyPt[c]};b.prototype.equalityTest=function(c){return c===this?!0:null===c||!1===c instanceof b?!1:c.getUniqueHash()===this.getUniqueHash()};b.prototype.getUniqueHash=function(){return this._cacheId.toString()+"-"+this._partId.toString()};return b}(l)})},"esri/arcade/Feature":function(){define("require exports ../core/tsSupport/assignHelper ./Dictionary ./ImmutableArray ./languageUtils ../geometry/Geometry ../geometry/Point ../geometry/support/jsonUtils".split(" "),
function(b,g,p,f,l,m,h,c,q){return function(){function b(){this.declaredClass="esri.arcade.Feature";this._layer=this.attributes=this._geometry=null;this.immutable=this.immutable=this._datesfixed=!0}b.createFromGraphic=function(a){var c=new b;c._geometry=a.geometry;c.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes;a._sourceLayer?(c._layer=a._sourceLayer,c._datesfixed=!1):a._layer?(c._layer=a._layer,c._datesfixed=!1):a.layer&&(c._layer=a.layer,c._datesfixed=!1);return c};b.createFromArcadeFeature=
function(a){var c=new b;c._datesfixed=a._datesfixed;c.attributes=a.attributes;c._geometry=a._geometry;a._layer&&(c._layer=a._layer);return c};b.createFromArcadeDictionary=function(a){var c=new b;c.attributes=a.field("attributes");null!==c.attributes?c.attributes instanceof f?(c.attributes=c.attributes.attributes,null===c.attributes&&(c.attributes={})):c.attributes={}:c.attributes={};c._geometry=a.field("geometry");null!==c._geometry&&(c._geometry instanceof f?c._geometry=b.parseGeometryFromDictionary(c._geometry):
c._geometry instanceof h||(c._geometry=null));return c};b.createFromGraphicLikeObject=function(a,c,e){void 0===e&&(e=null);var f=new b;null===c&&(c={});f.attributes=c;f._geometry=a;f._layer=e;f._layer&&(f._datesfixed=!1);return f};b.prototype.repurposeFromGraphicLikeObject=function(a,c,b){void 0===b&&(b=null);null===c&&(c={});this.attributes=c;this._geometry=a;this._datesfixed=(this._layer=b)?!1:!0};b.prototype.castToText=function(){var a="",c;for(c in this.attributes){""!==a&&(a+=",");var b=this.attributes[c];
null==b?a+=JSON.stringify(c)+":null":m.isBoolean(b)||m.isNumber(b)||m.isString(b)?a+=JSON.stringify(c)+":"+JSON.stringify(b):b instanceof h?a+=JSON.stringify(c)+":"+m.toStringExplicit(b):b instanceof l?a+=JSON.stringify(c)+":"+m.toStringExplicit(b):b instanceof Array?a+=JSON.stringify(c)+":"+m.toStringExplicit(b):b instanceof Date?a+=JSON.stringify(c)+":"+JSON.stringify(b):null!==b&&"object"===typeof b&&void 0!==b.castToText&&(a+=JSON.stringify(c)+":"+b.castToText())}return'{"geometry":'+(null===
this.geometry()?"null":m.toStringExplicit(this.geometry()))+',"attributes":{'+a+"}}"};b.prototype._fixDates=function(){for(var a=[],c=0;c<this._layer.fields.length;c++){var b=this._layer.fields[c];"date"!==b.type&&"esriFieldTypeDate"!==b.type||a.push(b.name)}0<a.length&&this._fixDateFields(a);this._datesfixed=!0};b.prototype._fixDateFields=function(a){this.attributes=p({},this.attributes);for(var c=0;c<a.length;c++){var b=this.attributes[a[c]];if(null!==b)if(void 0===b)for(var e in this.attributes){if(e.toLowerCase()===
a[c]){b=this.attributes[e];null===b||b instanceof Date||(this.attributes[e]=new Date(b));break}}else b instanceof Date||(this.attributes[a[c]]=new Date(b))}};b.prototype.geometry=function(){return null===this._geometry||this._geometry instanceof h?this._geometry:this._geometry=q.fromJSON(this._geometry)};b.prototype.field=function(a){!1===this._datesfixed&&this._fixDates();var c=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var b in this.attributes)if(b.toLowerCase()===c)return this.attributes[b];
if(this._hasFieldDefinition(c))return null;throw Error("Field not Found");};b.prototype._hasFieldDefinition=function(a){if(null===this._layer)return!1;for(var c=0;c<this._layer.fields.length;c++)if(this._layer.fields[c].name.toLowerCase()===a)return!0;return!1};b.prototype._field=function(a){!1===this._datesfixed&&this._fixDates();var c=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var b in this.attributes)if(b.toLowerCase()===c)return this.attributes[b];return null};b.prototype.setField=
function(a,c){if(this.immutable)throw Error("Feature is Immutable");if(!1===m.isSimpleType(c))throw Error("Illegal Value Assignment to Feature");var b=a.toLowerCase();if(void 0===this.attributes[a])for(var e in this.attributes)if(e.toLowerCase()===b){this.attributes[e]=c;return}this.attributes[a]=c};b.prototype.hasField=function(a){var c=a.toLowerCase();if(void 0!==this.attributes[a])return!0;for(var b in this.attributes)if(b.toLowerCase()===c)return!0;return this._hasFieldDefinition(c)?!0:!1};b.prototype.keys=
function(){var a=[],c={},b;for(b in this.attributes)a.push(b),c[b.toLowerCase()]=1;if(null!==this._layer)for(b=0;b<this._layer.fields.length;b++){var e=this._layer.fields[b];1!==c[e.name.toLowerCase()]&&a.push(e.name)}return a=a.sort()};b.parseGeometryFromDictionary=function(a){a=b.convertDictionaryToJson(a,!0);void 0!==a.spatialreference&&(a.spatialReference=a.spatialreference,delete a.spatialreference);void 0!==a.rings&&(a.rings=this.fixPathArrays(a.rings,!0===a.hasZ,!0===a.hasM));void 0!==a.paths&&
(a.paths=this.fixPathArrays(a.paths,!0===a.hasZ,!0===a.hasM));void 0!==a.points&&(a.points=this.fixPointArrays(a.points,!0===a.hasZ,!0===a.hasM));return q.fromJSON(a)};b.fixPathArrays=function(a,c,b){var e=[];if(a instanceof Array)for(var f=0;f<a.length;f++)e.push(this.fixPointArrays(a[f],c,b));else if(a instanceof l)for(f=0;f<a.length();f++)e.push(this.fixPointArrays(a.get(f),c,b));return e};b.fixPointArrays=function(a,b,e){var f=[];if(a instanceof Array)for(var k=0;k<a.length;k++){var g=a[k];g instanceof
c?b&&e?f.push([g.x,g.y,g.z,g.m]):b?f.push([g.x,g.y,g.z]):e?f.push([g.x,g.y,g.m]):f.push([g.x,g.y]):f.push(g)}else if(a instanceof l)for(k=0;k<a.length();k++)g=a.get(k),g instanceof c?b&&e?f.push([g.x,g.y,g.z,g.m]):b?f.push([g.x,g.y,g.z]):e?f.push([g.x,g.y,g.m]):f.push([g.x,g.y]):f.push(g);return f};b.convertDictionaryToJson=function(a,c){void 0===c&&(c=!1);var e={},k;for(k in a.attributes){var g=a.attributes[k];g instanceof f&&(g=b.convertDictionaryToJson(g));c?e[k.toLowerCase()]=g:e[k]=g}return e};
b.parseAttributesFromDictionary=function(a){var c={},b;for(b in a.attributes){var e=a.attributes[b];if(m.isSimpleType(e))c[b]=e;else throw Error("Illegal Argument");}return c};b.fromJson=function(a){var c=null;null!==a.geometry&&void 0!==a.geometry&&(c=q.fromJSON(a.geometry));var e={};if(null!==a.attributes&&void 0!==a.attributes)for(var f in a.attributes){var g=a.attributes[f];if(m.isString(g)||m.isNumber(g)||m.isBoolean(g)||m.isDate(g))e[f]=g;else throw Error("Illegal Argument");}return b.createFromGraphicLikeObject(c,
e,null)};b.prototype.domainValueLookup=function(a,c,b){if(null===this._layer||!this._layer.fields)return null;b=m.getDomain(a,this._layer,this,b);if(void 0===c)try{c=this.field(a)}catch(u){return null}return m.getDomainValue(b,c)};b.prototype.domainCodeLookup=function(a,c,b){if(null===this._layer||!this._layer.fields)return null;a=m.getDomain(a,this._layer,this,b);return m.getDomainCode(a,c)};return b}()})},"esri/arcade/treeAnalysis":function(){define(["require","exports"],function(b,g){function p(a,
c,b,e){return"0"!==a.min&&b.length<Number(a.min)||"*"!==a.max&&b.length>Number(a.max)?-2:1}function f(a,c,b){if(null!==b.localScope&&void 0!==b.localScope[a.toLowerCase()]){var d=b.localScope[a.toLowerCase()];if("FormulaFunction"===d.type||"any"===d.type)return void 0===d.signature&&(d.signature={min:"0",max:"*"}),p(d.signature,a,c,b)}return void 0!==b.globalScope[a.toLowerCase()]&&(d=b.globalScope[a.toLowerCase()],"FormulaFunction"===d.type||"any"===d.type)?(void 0===d.signature&&(d.signature={min:"0",
max:"*"}),p(d.signature,a,c,b)):-1}function l(a,c){void 0===c&&(c=!0);var b=r(a,"SYNTAX","UNREOGNISED");try{switch(a.type){case "VariableDeclarator":return null!==a.init&&"FunctionExpression"===a.init.type?r(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"):"Identifier"!==a.id.type?r(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER"):null!==a.init?l(a.init,!1):"";case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(b=l(a.declarations[d],c),""!==b)return b;return"";case "ForInStatement":b=l(a.left,c);
if(""!==b)break;if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return r(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return r(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==a.left.type)return r(a,"SYNTAX","LEFTNOTVAR");b=l(a.right,c);if(""!==b)break;b=l(a.body,c);if(""!==b)break;return"";case "ForStatement":if(null!==a.test&&(b=l(a.test,c),""!==b))break;if(null!==a.init&&(b=l(a.init,c),""!==b))break;if(null!==a.update&&(b=l(a.update,c),""!==b))break;
if(null!==a.body&&(b=l(a.body,c),""!==b))break;return"";case "ContinueStatement":return"";case "EmptyStatement":return"";case "BreakStatement":return"";case "IfStatement":b=l(a.test,c);if(""!==b)break;if(null!==a.consequent&&(b=l(a.consequent,!1),""!==b))break;if(null!==a.alternate&&(b=l(a.alternate,!1),""!==b))break;return"";case "BlockStatement":for(var e=[],d=0;d<a.body.length;d++)"EmptyStatement"!==a.body[d].type&&e.push(a.body[d]);a.body=e;for(d=0;d<a.body.length;d++)if(b=l(a.body[d],c),""!==
b)return b;return"";case "FunctionDeclaration":return!1===c?r(a,"SYNTAX","GLOBALFUNCTIONSONLY"):"Identifier"!==a.id.type?r(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"):l(a.body,!1);case "ReturnStatement":return null!==a.argument?l(a.argument,c):"";case "UpdateExpression":return"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?r(a,"SYNTAX","ASSIGNMENTTOVARSONLY"):l(a.argument,c);case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return r(a,"SYNTAX",
"ASSIGNMENTTOVARSONLY");b=l(a.left,c);if(""!==b)break;switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:return r(a,"SYNTAX","OPERATORNOTRECOGNISED")}return l(a.right,!1);case "ExpressionStatement":return l(a.expression,!1);case "Identifier":b="";break;case "MemberExpression":b=l(a.object,c);if(""!==b)break;return!0===a.computed?l(a.property,c):"";case "Literal":return"";case "ThisExpression":return r(a,"SYNTAX","NOTSUPPORTED");case "CallExpression":if("Identifier"!==
a.callee.type)return r(a,"SYNTAX","ONLYNODESSUPPORTED");b="";for(d=0;d<a.arguments.length;d++)if(b=l(a.arguments[d],c),""!==b)return b;return"";case "UnaryExpression":b=l(a.argument,c);break;case "BinaryExpression":b=l(a.left,c);if(""!==b)break;b=l(a.right,c);if(""!==b)break;switch(a.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:return r(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "LogicalExpression":b=
l(a.left,c);if(""!==b)break;b=l(a.right);if(""!==b)break;switch(a.operator){case "\x26\x26":case "||":break;default:return r(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "ConditionalExpression":return r(a,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":b="";for(d=0;d<a.elements.length&&(b=l(a.elements[d],c),""===b);d++);break;case "Array":return r(a,"SYNTAX","NOTSUPPORTED");case "ObjectExpression":b="";for(d=0;d<a.properties.length&&(b="",null!==a.properties[d].key&&("Literal"!==a.properties[d].key.type&&
"Identifier"!==a.properties[d].key.type&&(b=r(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[d].key.type&&(e=a.properties[d].key.value,"string"===typeof e||e instanceof String||(b=r(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")))),""===b&&(b=l(a.properties[d],c)),""===b);d++);break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return r(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(b=l(a.key,c),""!==b))break;b=l(a.value,c)}return b}catch(A){throw A;
}}function m(c,b){var d=r(c,"SYNTAX","UNREOGNISED"),k=null,g="";try{switch(c.type){case "VariableDeclarator":if(null!==c.init&&"FunctionExpression"===c.init.type)return r(c,"SYNTAX","FUNCTIONVARIABLEDECLARATOR");c.id.name.toLowerCase();var h=null===c.init?"":m(c.init,b);if(""!==h)return h;null===b.localScope?b.globalScope[c.id.name.toLowerCase()]={type:"any"}:b.localScope[c.id.name.toLowerCase()]={type:"any"};return"";case "FunctionDeclaration":k=e(c.id.name.toLowerCase(),c,b);g=a(c,b);if(""!==g)return g;
if(null!==b.localScope)return r(c,"SYNTAX","GLOBALFUNCTIONSONLY");k.isnative=!1;b.globalScope[c.id.name.toLowerCase()]={type:"FormulaFunction",signature:[k]};return"";case "VariableDeclaration":for(var d="",l=0;l<c.declarations.length&&(d=m(c.declarations[l],b),""===d);l++);break;case "IfStatement":d=m(c.test,b);if(""!==d)break;if("AssignmentExpression"===c.test.type||"UpdateExpression"===c.test.type)return r(c.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");if(null!==c.consequent&&(d=m(c.consequent,
b),""!==d))break;if(null!==c.alternate&&(d=m(c.alternate,b),""!==d))break;return"";case "EmptyStatement":return"";case "BlockStatement":for(l=0;l<c.body.length;l++)if(d=m(c.body[l],b),""!==d)return d;return"";case "ReturnStatement":return null!==c.argument?m(c.argument,b):"";case "ForInStatement":if("VariableDeclaration"===c.left.type){if(1<c.left.declarations.length)return r(c,"SYNTAX","ONLY1VAR");if(null!==c.left.declarations[0].init)return r(c,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==
c.left.type)return r(c,"SYNTAX","LEFTNOTVAR");d=m(c.left,b);if(""!==d)break;d=m(c.right,b);if(""!==d)break;d=m(c.body,b);if(""!==d)break;return"";case "ForStatement":if(null!==c.init&&(d=m(c.init,b),""!==d))break;if(null!==c.test&&(d=m(c.test,b),""!==d))break;if(null!==c.body&&(d=m(c.body,b),""!==d))break;if(null!==c.update&&(d=m(c.update,b),""!==d))break;return"";case "BreakStatement":return"";case "ContinueStatement":return"";case "UpdateExpression":if("Identifier"!==c.argument.type&&"MemberExpression"!==
c.argument.type)return r(c,"SYNTAX","ASSIGNMENTTOVARSONLY");var q=!1;if("MemberExpression"===c.argument.type)return m(c.argument,b);null!==b.localScope&&void 0!==b.localScope[c.argument.name.toLowerCase()]&&(q=!0);void 0!==b.globalScope[c.argument.name.toLowerCase()]&&(q=!0);return!1===q?"Identifier "+c.argument.name+" has not been declared.":"";case "AssignmentExpression":if("Identifier"!==c.left.type&&"MemberExpression"!==c.left.type)return r(c,"SYNTAX","ASSIGNMENTTOVARSONLY");var t=m(c.right,b);
if(""!==t)return t;q=!1;if("MemberExpression"===c.left.type)return t=m(c.left,b),""!==t?t:"";null!==b.localScope&&void 0!==b.localScope[c.left.name.toLowerCase()]&&(q=!0);void 0!==b.globalScope[c.left.name.toLowerCase()]&&(q=!0);return!1===q?"Identifier "+c.left.name+" has not been declared.":"";case "ExpressionStatement":return m(c.expression,b);case "Identifier":var p=c.name.toLowerCase();if(null!==b.localScope&&void 0!==b.localScope[p])return"";d=void 0!==b.globalScope[p]?"":r(c,"SYNTAX","VARIABLENOTFOUND");
break;case "MemberExpression":d=m(c.object,b);if(""!==d)break;return!0===c.computed?m(c.property,b):"";case "Literal":return"";case "ThisExpression":d=r(c,"SYNTAX","NOTSUPPORTED");break;case "CallExpression":if("Identifier"!==c.callee.type)return r(c,"SYNTAX","ONLYNODESSUPPORTED");d="";for(l=0;l<c.arguments.length;l++)if(d=m(c.arguments[l],b),""!==d)return d;var u=f(c.callee.name,c.arguments,b);-1===u&&(d=r(c,"SYNTAX","NOTFOUND"));-2===u&&(d=r(c,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":d=
m(c.argument,b);break;case "BinaryExpression":d=m(c.left,b);if(""!==d)break;d=m(c.right,b);if(""!==d)break;return"";case "LogicalExpression":d=m(c.left,b);if(""!==d)break;if("AssignmentExpression"===c.left.type||"UpdateExpression"===c.left.type)return r(c.left,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");d=m(c.right,b);if(""!==d)break;return"AssignmentExpression"===c.right.type||"UpdateExpression"===c.right.type?r(c.right,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"):"";case "ConditionalExpression":return r(c,
"SYNTAX","NOTSUPPORTED");case "ArrayExpression":d="";for(l=0;l<c.elements.length&&(d=m(c.elements[l],b),""===d);l++);break;case "ObjectExpression":d="";for(l=0;l<c.properties.length;l++){d="";if(null!==c.properties[l].key&&("Literal"!==c.properties[l].key.type&&"Identifier"!==c.properties[l].key.type&&(d=r(c,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===c.properties[l].key.type)){var z=c.properties[l].key.value;"string"===typeof z||z instanceof String||(d=r(c,"SYNTAX","OBJECTPROPERTYMUSTBESTRING"))}""===
d&&(d=m(c.properties[l],b));if(""!==d)break}break;case "Property":if("Literal"!==c.key.type&&"Identifier"!==c.key.type)return r(c,"SYNTAX","ONLYLITERAL");if("Identifier"!==c.key.type&&(d=m(c.key,b),""!==d))break;d=m(c.value,b);break;case "Array":return r(c,"SYNTAX","NOTSUPPORTED")}return d}catch(Z){throw Z;}}function h(a,c){var b=!1;try{switch(a.type){case "VariableDeclarator":return null!==a.init?h(a.init,c):b;case "FunctionDeclaration":return h(a.body,c);case "VariableDeclaration":for(var d=0;d<
a.declarations.length;d++)if(h(a.declarations[d],c))return!0;return b;case "IfStatement":return h(a.test,c)||null!==a.consequent&&h(a.consequent,c)||null!==a.alternate&&h(a.alternate,c)?!0:b;case "EmptyStatement":return b;case "BlockStatement":for(d=0;d<a.body.length;d++)if(h(a.body[d],c))return!0;return b;case "ReturnStatement":return null!==a.argument?h(a.argument,c):b;case "UpdateExpression":return h(a.argument,c);case "AssignmentExpression":return(b=h(a.right,c))?b:h(a.left,c);case "ExpressionStatement":return h(a.expression,
c);case "ForInStatement":return(b=h(a.left,c))||(b=h(a.right,c))?b:b=h(a.body,c);case "ForStatement":if(null!==a.init&&(b=h(a.init,c))||null!==a.test&&(b=h(a.test,c))||null!==a.body&&(b=h(a.body,c)))return b;null!==a.update&&(b=h(a.update,c));return b;case "BreakStatement":return b;case "ContinueStatement":return b;case "Compound":return b;case "Identifier":return c.toLowerCase()===a.name.toLowerCase();case "MemberExpression":if(b=h(a.object,c))return b;!0===a.computed&&(b=h(a.property,c));return b;
case "Literal":return b;case "ThisExpression":return b;case "CallExpression":for(d=0;d<a.arguments.length;d++)h(a.arguments[d],c)&&(b=!0);return b;case "ArrayExpression":for(d=0;d<a.elements.length;d++)h(a.elements[d],c)&&(b=!0);return b;case "UnaryExpression":return h(a.argument,c);case "BinaryExpression":return(b=h(a.left,c))?b:b=h(a.right,c);case "LogicalExpression":return(b=h(a.left,c))?b:b=h(a.right,c);case "ObjectExpression":for(d=0;d<a.properties.length;d++)h(a.properties[d],c)&&(b=!0);return b;
case "Property":return b=h(a.value,c);case "ConditionalExpression":return b;case "Array":return b;default:return b}}catch(y){throw y;}}function c(a,b){var d=!1;try{switch(a.type){case "VariableDeclarator":return null!==a.init?c(a.init,b):d;case "FunctionDeclaration":return c(a.body,b);case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)if(c(a.declarations[e],b))return!0;return d;case "IfStatement":return c(a.test,b)||null!==a.consequent&&c(a.consequent,b)||null!==a.alternate&&c(a.alternate,
b)?!0:d;case "EmptyStatement":return d;case "BlockStatement":for(e=0;e<a.body.length;e++)if(c(a.body[e],b))return!0;return d;case "ReturnStatement":return null!==a.argument?c(a.argument,b):d;case "UpdateExpression":return c(a.argument,b);case "AssignmentExpression":return c(a.left,b)?!0:c(a.right,b);case "ExpressionStatement":return c(a.expression,b);case "ForInStatement":return(d=c(a.left,b))||(d=c(a.right,b))?d:d=c(a.body,b);case "ForStatement":if(null!==a.init&&(d=c(a.init,b))||null!==a.test&&
(d=c(a.test,b))||null!==a.body&&(d=c(a.body,b)))return d;null!==a.update&&(d=c(a.update,b));return d;case "BreakStatement":return d;case "ContinueStatement":return d;case "Compound":return d;case "Identifier":return d;case "MemberExpression":if(d=c(a.object,b))return d;!0===a.computed&&(d=c(a.property,b));return d;case "Literal":return d;case "ThisExpression":return d;case "CallExpression":if(a.callee.name.toLowerCase()===b.toLowerCase())return!0;for(e=0;e<a.arguments.length;e++)c(a.arguments[e],
b)&&(d=!0);return d;case "ArrayExpression":for(e=0;e<a.elements.length;e++)c(a.elements[e],b)&&(d=!0);return d;case "UnaryExpression":return c(a.argument,b);case "BinaryExpression":return(d=c(a.left,b))?d:d=c(a.right,b);case "LogicalExpression":return(d=c(a.left,b))?d:d=c(a.right,b);case "ConditionalExpression":return d;case "ObjectExpression":for(e=0;e<a.properties.length;e++)c(a.properties[e],b)&&(d=!0);return d;case "Property":return d=c(a.value,b);case "Array":return d;default:return d}}catch(y){throw y;
}}function q(a,c){var b=[],d;try{switch(a.type){case "VariableDeclarator":return null!==a.init?q(a.init,c):b;case "FunctionDeclaration":return q(a.body,c);case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)d=q(a.declarations[e],c),b=b.concat(d);return b;case "ForInStatement":return d=q(a.left,c),b=b.concat(d),d=q(a.right,c),b=b.concat(d),d=q(a.body,c),b=b.concat(d);case "ForStatement":return null!==a.init&&(d=q(a.init,c),b=b.concat(d)),null!==a.test&&(d=q(a.test,c),b=b.concat(d)),
null!==a.body&&(d=q(a.body,c),b=b.concat(d)),null!==a.update&&(d=q(a.update,c),b=b.concat(d)),b;case "IfStatement":return d=q(a.test,c),b=b.concat(d),null!==a.consequent&&(d=q(a.consequent,c),b=b.concat(d)),null!==a.alternate&&(d=q(a.alternate,c),b=b.concat(d)),b;case "EmptyStatement":return b;case "BlockStatement":for(e=0;e<a.body.length;e++)d=q(a.body[e],c),b=b.concat(d);return b;case "ReturnStatement":return null!==a.argument?q(a.argument,c):b;case "UpdateExpression":return q(a.argument,c);case "AssignmentExpression":return b=
q(a.left,c),b=b.concat(q(a.right,c));case "ExpressionStatement":return q(a.expression,c);case "BreakStatement":return b;case "ContinueStatement":return b;case "Compound":return b;case "Identifier":return b;case "MemberExpression":if("Identifier"!==a.object.type)return b;if(!1===a.computed)b.push(a.object.name.toLowerCase()+"."+a.property.name.toLowerCase());else try{"Literal"===a.property.type&&"string"===typeof a.property.value&&b.push(a.object.name.toLowerCase()+"."+a.property.value.toString().toLowerCase())}catch(A){}return b;
case "Literal":return b;case "ThisExpression":return b;case "CallExpression":for(e=0;e<a.arguments.length;e++)d=q(a.arguments[e],c),b=b.concat(d);return b;case "ArrayExpression":for(e=0;e<a.elements.length;e++)d=q(a.elements[e],c),b=b.concat(d);return b;case "UnaryExpression":return q(a.argument,c);case "ObjectExpression":for(e=0;e<a.properties.length;e++)d=q(a.properties[e],c),b=b.concat(d);return b;case "Property":return q(a.value,c);case "BinaryExpression":return d=q(a.left,c),b=b.concat(d),d=
q(a.right,c),b=b.concat(d);case "LogicalExpression":return d=q(a.left,c),b=b.concat(d),d=q(a.right,c),b=b.concat(d);case "ConditionalExpression":return b;case "Array":return b;default:return b}}catch(A){throw A;}}function e(a,c,b){b=[];if(void 0!==c.params&&null!==c.params)for(var d=0;d<c.params.length;d++)b.push("any");return{name:a,return:"any",params:b}}function a(a,c){c={globalScope:c.globalScope,localScope:{}};for(var b=0;b<a.params.length;b++)c.localScope[a.params[b].name.toLowerCase()]={type:"any"};
return m(a.body,c)}function k(a,c,b,e){var d={};if(void 0===a||null===a)a={};if(void 0===b||null===b)b={};d.infinity={type:"any"};d.textformatting={type:"any"};d.pi={type:"any"};for(var f in c)if("simple"!==e||"simple"===e&&"a"===c[f].av)d[f]={type:"FormulaFunction",signature:{min:c[f].min,max:c[f].max}},"simple"!==e&&(void 0!==c[f].fmin&&(d[f].signature.min=c[f].fmin),void 0!==c[f].fmax&&(d[f].signature.max=c[f].fmax));for(c=0;c<b.length;c++)f=b[c],d[f.name]={type:"FormulaFunction",signature:f};
for(f in a)d[f]=a[f],d[f].type="any";return d}function r(a,c,b){var d="";switch(c){case "SYNTAX":d="Syntax Error: ";break;case "RUNTIME":d="Runtime Error: ";break;default:d="Syntax Error: "}try{switch(a.type){case "IfStatement":switch(b){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=" Assignments not be made in logical tests";break;case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;case "UpdateExpression":case "AssignmentExpression":switch(b){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=
" Assignments not be made in logical tests";break;case "ASSIGNMENTTOVARSONLY":d+=" Assignments can only be made to identifiers"}break;case "ExpressionStatement":d+=" Assignments can only be made to identifiers";break;case "FunctionDeclaration":switch(b){case "GLOBALFUNCTIONSONLY":d+=" Functions cannot be declared as variables";break;case "FUNCTIONMUSTHAVEIDENTIFIER":d+=" Function Definition must have an identifier"}break;case "VariableDeclaration":d+=" Only 1 variable can be declared at a time";break;
case "VariableDeclarator":switch(b){case "FUNCTIONVARIABLEDECLARATOR":d+=" Functions cannot be declared as variables";break;case "VARIABLEMUSTHAVEIDENTIFIER":d+=" Variable Definition must have an identifier"}break;case "Identifier":d+=" Identifier Not Found. ";d+=a.name;break;case "ObjectExpression":switch(b){case "OBJECTPROPERTYMUSTBESTRING":d+=" Property name must be a string"}break;case "ForStatement":switch(b){case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;
case "ForInStatement":switch(b){case "ONLY1VAR":d+=" Can only declare 1 var for use with IN";break;case "CANNOTDECLAREVAL":d+=" Can only declare value for use with IN";break;case "LEFTNOVAR":d+="Must provide a variable to iterate with.";break;case "VARIABLENOTDECLARED":d+="Variable must be declared before it is used..";break;case "CANNOTITERATETHISTYPE":d+="This type cannot be used in an IN loop"}break;case "MemberExpression":switch(b){case "PROPERTYNOTFOUND":d+="Cannot find member property. ";d+=
!1===a.computed?a.property.name:"";break;case "OUTOFBOUNDS":d+="Out of Bounds. ";d+=!1===a.computed?a.property.name:"";break;case "NOTFOUND":d+="Cannot call member method on null. ";d+=!1===a.computed?a.property.name:"";break;case "INVALIDTYPE":d+="Cannot call member property on object of this type. ",d+=!1===a.computed?a.property.name:""}break;case "Property":switch(b){case "ONLYLITERAL":d+="Property names must be literals or identifiers"}break;case "Literal":break;case "ThisExpression":d+="THIS construct is not supported.";
case "CallExpression":switch(b){case "WRONGSIGNATURE":d+="Function signature does not match: ";d+=a.callee.name;break;case "ONLYNODESUPPORTED":d+="Functions must be declared.";d+=a.callee.name;break;case "NOTAFUNCTION":d+="Not a Function: ";d+=a.callee.name;break;case "NOTFOUND":d+="Function Not Found: "+a.callee.name}break;case "UnaryExpression":switch(b){case "NOTSUPPORTEDUNARYOPERATOR":d+="Operator "+a.operator+" not allowed in this context. Only ! can be used with boolean, and - with a number";
break;case "NOTSUPPORTEDTYPE":d+="Unary operator "+a.operator+" cannot be used with this argument."}case "BinaryExpression":switch(b){case "OPERATORNOTRECOGNISED":d+="Binary Operator not recognised "+a.operator}break;case "LogicalExpression":switch(b){case "ONLYBOOLEAN":d+="Operator "+a.operator+" cannot be used. Only || or \x26\x26 are allowed values";break;case "ONLYORORAND":d+="Logical Expression "+a.operator+" being applied to parameters that are not boolean."}break;case "ConditionalExpression":d+=
"Conditional statements not supported.";break;case "ArrayExpression":switch(b){case "FUNCTIONCONTEXTILLEGAL":d+=" Cannot Put Function inside Array."}break;case "Array":d+="Expression contains unrecognised array structure.";break;default:d+="Expression contains unrecognised code structures."}}catch(y){throw y;}return d}function u(a,c,b){return{line:a.loc.start.line,character:a.loc.start.column,reason:r(a,c,b)}}function z(a,c,b,e,f){void 0===f&&(f=!0);c={globalScope:c.globalScope,localScope:{}};for(f=
0;f<a.params.length;f++)c.localScope[a.params[f].name.toLowerCase()]={type:"any"};v(a.body,c,b,e,!1)}function v(a,c,b,k,g){void 0===g&&(g=!0);if(null===a)throw Error("Unnexpexted Expression Syntax");var d=null;try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type){k.push(u(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"));break}"Identifier"!==a.id.type?k.push(u(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER")):(a.id.name.toLowerCase(),null===c.localScope?c.globalScope[a.id.name.toLowerCase()]=
{type:"any"}:c.localScope[a.id.name.toLowerCase()]={type:"any"});null===a.init?"":v(a.init,c,b,k,g);break;case "FunctionDeclaration":!1===g&&k.push(u(a,"SYNTAX","GLOBALFUNCTIONSONLY"));"Identifier"!==a.id.type&&k.push(u(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"));d=e("",a,c);z(a,c,b,k,g);null!==c.localScope&&k.push(u(a,"SYNTAX","GLOBALFUNCTIONSONLY"));d.isnative=!1;"Identifier"===a.id.type&&(c.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[d]});break;case "VariableDeclaration":for(var h=
0;h<a.declarations.length;h++)v(a.declarations[h],c,b,k,g);break;case "IfStatement":null!==a.test&&(v(a.test,c,b,k,g),"AssignmentExpression"!==a.test.type&&"UpdateExpression"!==a.test.type||k.push(u(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION")));null!==a.consequent&&v(a.consequent,c,b,k,g);null!==a.alternate&&v(a.alternate,c,b,k,g);break;case "EmptyStatement":break;case "BlockStatement":if(null!==a.body)for(h=0;h<a.body.length;h++)v(a.body[h],c,b,k,g);break;case "ReturnStatement":null!==
a.argument&&v(a.argument,c,b,k,g);break;case "ForInStatement":"VariableDeclaration"===a.left.type?(1<a.left.declarations.length&&k.push(u(a,"SYNTAX","ONLY1VAR")),null!==a.left.declarations[0].init&&k.push(u(a,"SYNTAX","CANNOTDECLAREVAL"))):"Identifier"!==a.left.type&&k.push(u(a,"SYNTAX","LEFTNOTVAR"));v(a.left,c,b,k,g);v(a.right,c,b,k,g);v(a.body,c,b,k,g);break;case "ForStatement":null!==a.init&&v(a.init,c,b,k,g);null!==a.test&&v(a.test,c,b,k,g);null!==a.body&&v(a.body,c,b,k,g);null!==a.update&&v(a.update,
c,b,k,g);break;case "BreakStatement":break;case "ContinueStatement":break;case "UpdateExpression":"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?k.push(u(a,"SYNTAX","ASSIGNMENTTOVARSONLY")):("Identifier"===a.argument.type&&(d=!1,!1===b&&(null!==c.localScope&&void 0!==c.localScope[a.argument.name.toLowerCase()]&&(d=!0),void 0!==c.globalScope[a.argument.name.toLowerCase()]&&(d=!0),!1===d&&k.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+
a.argument.name+" has not been declared."}))),"MemberExpression"===a.argument.type&&v(a.argument,c,b,k,g));break;case "AssignmentExpression":"Identifier"!==a.left.type&&"MemberExpression"!==a.left.type&&k.push(u(a,"SYNTAX","ASSIGNMENTTOVARSONLY"));switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:k.push(u(a,"SYNTAX","OPERATORNOTRECOGNISED"))}v(a.right,c,b,k,g);d=!1;"Identifier"===a.left.type&&(null!==c.localScope&&void 0!==c.localScope[a.left.name.toLowerCase()]&&
(d=!0),void 0!==c.globalScope[a.left.name.toLowerCase()]&&(d=!0),!1===b&&!1===d&&k.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+a.argument.name+" has not been declared."}));"MemberExpression"===a.left.type&&v(a.left,c,b,k,g);break;case "ExpressionStatement":v(a.expression,c,b,k,g);break;case "Identifier":var n=a.name.toLowerCase();if(null!==c.localScope&&void 0!==c.localScope[n])break;void 0===c.globalScope[n]&&!1===b&&k.push(u(a,"SYNTAX","VARIABLENOTFOUND"));
break;case "MemberExpression":v(a.object,c,b,k,g);!0===a.computed&&v(a.property,c,b,k,g);break;case "Literal":return"";case "ThisExpression":k.push(u(a,"SYNTAX","NOTSUPPORTED"));break;case "CallExpression":"Identifier"!==a.callee.type&&k.push(u(a,"SYNTAX","ONLYNODESSUPPORTED"));for(h=0;h<a.arguments.length;h++)v(a.arguments[h],c,b,k,g);var l=f(a.callee.name,a.arguments,c);!1===b&&-1===l&&k.push(u(a,"SYNTAX","NOTFOUND"));-2===l&&k.push(u(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":v(a.argument,
c,b,k,g);break;case "BinaryExpression":v(a.left,c,b,k,g);v(a.right,c,b,k,g);switch(a.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:k.push(u(a,"SYNTAX","OPERATORNOTRECOGNISED"))}break;case "LogicalExpression":switch(a.operator){case "\x26\x26":case "||":break;default:k.push(u(a,"SYNTAX","OPERATORNOTRECOGNISED"))}v(a.left,c,b,k,g);"AssignmentExpression"!==a.left.type&&"UpdateExpression"!==a.left.type||
k.push(u(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));v(a.right,c,b,k,g);"AssignmentExpression"!==a.right.type&&"UpdateExpression"!==a.right.type||k.push(u(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));break;case "ConditionalExpression":k.push(u(a,"SYNTAX","NOTSUPPORTED"));break;case "ArrayExpression":for(h=0;h<a.elements.length;h++)v(a.elements[h],c,b,k,g);break;case "Array":k.push(u(a,"SYNTAX","NOTSUPPORTED"));case "ObjectExpression":for(h=0;h<a.properties.length;h++)v(a.properties[h],
c,b,k,g);break;case "Property":"Literal"!==a.key.type&&"Identifier"!==a.key.type&&k.push(u(a,"SYNTAX","ONLYLITERAL"));"Literal"===a.key.type&&v(a.key,c,b,k,g);v(a.value,c,b,k,g);break;default:k.push(u(a,"SYNTAX","UNRECOGNISED"))}}catch(C){k.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Unnexpected Syntax"})}}function w(a,c){var b=[],d;try{switch(a.type){case "VariableDeclarator":return null!==a.init?w(a.init,c):b;case "FunctionDeclaration":return w(a.body,
c);case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)d=w(a.declarations[e],c),b=b.concat(d);return b;case "ForInStatement":return d=w(a.left,c),b=b.concat(d),d=w(a.right,c),b=b.concat(d),d=w(a.body,c),b=b.concat(d);case "ForStatement":return null!==a.init&&(d=w(a.init,c),b=b.concat(d)),null!==a.test&&(d=w(a.test,c),b=b.concat(d)),null!==a.body&&(d=w(a.body,c),b=b.concat(d)),null!==a.update&&(d=w(a.update,c),b=b.concat(d)),b;case "IfStatement":return d=w(a.test,c),b=b.concat(d),null!==
a.consequent&&(d=w(a.consequent,c),b=b.concat(d)),null!==a.alternate&&(d=w(a.alternate,c),b=b.concat(d)),b;case "EmptyStatement":return b;case "BlockStatement":for(e=0;e<a.body.length;e++)d=w(a.body[e],c),b=b.concat(d);return b;case "ReturnStatement":return null!==a.argument?w(a.argument,c):b;case "UpdateExpression":return w(a.argument,c);case "AssignmentExpression":return b=w(a.left,c),b=b.concat(w(a.right,c));case "ExpressionStatement":return w(a.expression,c);case "BreakStatement":return b;case "ContinueStatement":return b;
case "Compound":return b;case "Identifier":return b;case "MemberExpression":return b;case "Literal":return b;case "ThisExpression":return b;case "CallExpression":for(e=0;e<a.arguments.length;e++)d=w(a.arguments[e],c),b=b.concat(d);b.push(a.callee.name.toLowerCase());return b;case "ArrayExpression":for(e=0;e<a.elements.length;e++)d=w(a.elements[e],c),b=b.concat(d);return b;case "UnaryExpression":return w(a.argument,c);case "ObjectExpression":for(e=0;e<a.properties.length;e++)d=w(a.properties[e],c),
b=b.concat(d);return b;case "Property":return w(a.value,c);case "BinaryExpression":return d=w(a.left,c),b=b.concat(d),d=w(a.right,c),b=b.concat(d);case "LogicalExpression":return d=w(a.left,c),b=b.concat(d),d=w(a.right,c),b=b.concat(d);case "ConditionalExpression":return b;case "Array":return b;default:return b}}catch(A){throw A;}}Object.defineProperty(g,"__esModule",{value:!0});g.functionDecls={concatenate:{min:"0",max:"*",av:"a"},split:{min:"2",max:"4",av:"a"},guid:{min:"0",max:"1",av:"a"},today:{min:"0",
max:"0",av:"a"},now:{min:"0",max:"0",av:"a"},timestamp:{min:"0",max:"0",av:"a"},day:{min:"1",max:"1",av:"a"},month:{min:"1",max:"1",av:"a"},year:{min:"1",max:"1",av:"a"},hour:{min:"1",max:"1",av:"a"},second:{min:"1",max:"1",av:"a"},millisecond:{min:"1",max:"1",av:"a"},minute:{min:"1",max:"1",av:"a"},weekday:{min:"1",max:"1",av:"a"},toutc:{min:"1",max:"1",av:"a"},tolocal:{min:"1",max:"1",av:"a"},date:{min:"0",max:"7",av:"a"},datediff:{min:"2",max:"3",av:"a"},dateadd:{min:"2",max:"3",av:"a"},trim:{min:"1",
max:"1",av:"a"},text:{min:"1",max:"2",av:"a"},left:{min:"2",max:"2",av:"a"},right:{min:"2",max:"2",av:"a"},mid:{min:"2",max:"3",av:"a"},upper:{min:"1",max:"1",av:"a"},proper:{min:"1",max:"2",av:"a"},lower:{min:"1",max:"1",av:"a"},find:{min:"2",max:"3",av:"a"},iif:{min:"3",max:"3",av:"a"},decode:{min:"2",max:"*",av:"a"},when:{min:"2",max:"*",av:"a"},defaultvalue:{min:"2",max:"2",av:"a"},isempty:{min:"1",max:"1",av:"a"},domaincode:{min:"3",max:"4",av:"a"},domainname:{min:"2",max:"4",av:"a"},polygon:{min:"1",
max:"1",av:"a"},point:{min:"1",max:"1",av:"a"},polyline:{min:"1",max:"1",av:"a"},extent:{min:"1",max:"1",av:"a"},multipoint:{min:"1",max:"1",av:"a"},geometry:{min:"1",max:"1",av:"a"},count:{min:"0",max:"*",av:"a"},number:{min:"1",max:"2",av:"a"},acos:{min:"1",max:"1",av:"a"},asin:{min:"1",max:"1",av:"a"},atan:{min:"1",max:"1",av:"a"},atan2:{min:"2",max:"2",av:"a"},ceil:{min:"1",max:"2",av:"a"},floor:{min:"1",max:"2",av:"a"},round:{min:"1",max:"2",av:"a"},cos:{min:"1",max:"1",av:"a"},exp:{min:"1",
max:"1",av:"a"},log:{min:"1",max:"1",av:"a"},min:{min:"0",max:"*",av:"a"},constrain:{min:"3",max:"3",av:"a"},console:{min:"0",max:"*",av:"a"},max:{min:"0",max:"*",av:"a"},pow:{min:"2",max:"2",av:"a"},random:{min:"0",max:"0",av:"a"},sqrt:{min:"1",max:"1",av:"a"},sin:{min:"1",max:"1",av:"a"},tan:{min:"1",max:"1",av:"a"},abs:{min:"1",max:"1",av:"a"},isnan:{min:"1",max:"1",av:"a"},stdev:{min:"0",max:"*",av:"a"},average:{min:"0",max:"*",av:"a"},mean:{min:"0",max:"*",av:"a"},sum:{min:"0",max:"*",av:"a"},
variance:{min:"0",max:"*",av:"a"},distinct:{min:"0",max:"*",av:"a"},first:{min:"1",max:"1",av:"a"},top:{min:"2",max:"2",av:"a"},boolean:{min:"1",max:"1",av:"a"},dictionary:{min:"0",max:"*",av:"a"},typeof:{min:"1",max:"1",av:"a"},reverse:{min:"1",max:"1",av:"a"},replace:{min:"3",max:"4",av:"a"},sort:{min:"1",max:"2",av:"a"},feature:{min:"1",max:"*",av:"a"},haskey:{min:"2",max:"2",av:"a"},indexof:{min:"2",max:"2",av:"a"},disjoint:{min:"2",max:"2",av:"a"},intersects:{min:"2",max:"2",av:"a"},touches:{min:"2",
max:"2",av:"a"},crosses:{min:"2",max:"2",av:"a"},within:{min:"2",max:"2",av:"a"},contains:{min:"2",max:"2",av:"a"},overlaps:{min:"2",max:"2",av:"a"},equals:{min:"2",max:"2",av:"a"},relate:{min:"3",max:"3",av:"a"},intersection:{min:"2",max:"2",av:"a"},union:{min:"1",max:"2",av:"a"},difference:{min:"2",max:"2",av:"a"},symmetricdifference:{min:"2",max:"2",av:"a"},clip:{min:"2",max:"2",av:"a"},cut:{min:"2",max:"2",av:"a"},area:{min:"1",max:"2",av:"a"},areageodetic:{min:"1",max:"2",av:"a"},length:{min:"1",
max:"2",av:"a"},lengthgeodetic:{min:"1",max:"2",av:"a"},distance:{min:"2",max:"3",av:"a"},densify:{min:"2",max:"3",av:"a"},densifygeodetic:{min:"2",max:"3",av:"a"},generalize:{min:"2",max:"4",av:"a"},buffer:{min:"2",max:"3",av:"a"},buffergeodetic:{min:"2",max:"3",av:"a"},offset:{min:"2",max:"6",av:"a"},rotate:{min:"2",max:"3",av:"a"},issimple:{min:"1",max:"1",av:"a"},simplify:{min:"1",max:"1",av:"a"},centroid:{min:"1",max:"1",av:"a"},multiparttosinglepart:{min:"1",max:"1",av:"a"},setgeometry:{min:"2",
max:"2",av:"a"}};g.addFunctionDeclaration=function(a,c){var b=g.functionDecls[a.name.toLowerCase()];void 0===b?g.functionDecls[a.name.toLowerCase()]={min:a.min,max:a.max,av:c}:"a"===b.av&&"f"===c?(void 0!==b.fmin&&delete b.fmin,void 0!==b.fmax&&delete b.fmax,b.fmin=a.min,b.fmax=a.max):"f"===b.av&&"a"===c?(void 0===b.fmin&&(b.fmin=b.min),void 0===b.fmax&&(b.fmax=b.max),b.min=a.min,b.max=a.max,b.av="a"):"f"===c?(b.fmin=a.min,b.fmax=a.max):"a"===c&&(b.min=a.min,b.max=a.max)};g.checkFunctionSignature=
p;g.findFunction=f;g.validateLanguageNode=l;g.testValidityOfExpression=m;g.referencesMemberImpl=h;g.referencesMember=function(a,c){return!0===h(a.body[0].body,c.toLowerCase())?!0:!1};g.referencesFunctionImpl=c;g.referencesFunction=function(a,b){return!0===c(a.body[0].body,b)?!0:!1};g.findFieldLiteralsImpl=q;g.findFieldLiterals=function(a,c){return q(a.body[0].body,c)};g.extractFunctionDeclaration=e;g.validateFunction=a;g.constructGlobalScope=k;g.validateScript=function(a,c,b){void 0===b&&(b="full");
c={globalScope:k(c.vars,g.functionDecls,c.customFunctions,b),localScope:null};return m(a.body[0].body,c)};g.validateLanguage=function(a){return"BlockStatement"!==a.body[0].body.type?"Invalid formula content.":l(a.body[0].body)};g.nodeErrorMessage=r;g.makeError=u;g.extractAllIssuesInFunction=z;g.extractAllIssues=v;g.checkScript=function(a,c,b,e){void 0===e&&(e="full");var d=[];if("BlockStatement"!==a.body[0].body.type)return[{line:0,character:0,reason:"Invalid Body"}];if(null===c||void 0===c)c={vars:{},
customFunctions:[]};c={globalScope:k(c.vars,g.functionDecls,c.customFunctions,e),localScope:null};try{v(a.body[0].body,c,b,d)}catch(A){}return d};g.findFunctionCallsImpl=w;g.findFunctionCalls=function(a,c){return w(a.body[0].body,c)}})},"esri/arcade/functions/date":function(){define(["require","exports","../../moment","../languageUtils"],function(b,g,p,f){function l(b){return null===b?b:isNaN(b.getTime())?null:b}Object.defineProperty(g,"__esModule",{value:!0});g.registerFunctions=function(b,g){b.today=
function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,0,0);c=new Date;c.setHours(0,0,0,0);return c})};b.now=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,0,0);return new Date})};b.timestamp=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,0,0);c=new Date;return c=new Date(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds())})};b.toutc=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);
return null===c?null:new Date(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds())})};b.tolocal=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?null:p.utc([c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds()]).toDate()})};b.day=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getDate()})};
b.month=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getMonth()})};b.year=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getFullYear()})};b.hour=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getHours()})};b.second=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getSeconds()})};b.millisecond=
function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getMilliseconds()})};b.minute=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getMinutes()})};b.weekday=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,1,1);c=f.toDate(b[0]);return null===c?NaN:c.getDay()})};b.date=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,0,7);if(3===b.length)return l(new Date(f.toNumber(b[0]),f.toNumber(b[1]),f.toNumber(b[2]),
0,0,0,0));if(4===b.length)return l(new Date(f.toNumber(b[0]),f.toNumber(b[1]),f.toNumber(b[2]),f.toNumber(b[3]),0,0,0));if(5===b.length)return l(new Date(f.toNumber(b[0]),f.toNumber(b[1]),f.toNumber(b[2]),f.toNumber(b[3]),f.toNumber(b[4]),0,0));if(6===b.length)return l(new Date(f.toNumber(b[0]),f.toNumber(b[1]),f.toNumber(b[2]),f.toNumber(b[3]),f.toNumber(b[4]),f.toNumber(b[5]),0));if(7===b.length)return l(new Date(f.toNumber(b[0]),f.toNumber(b[1]),f.toNumber(b[2]),f.toNumber(b[3]),f.toNumber(b[4]),
f.toNumber(b[5]),f.toNumber(b[6])));if(2===b.length){c=f.toString(b[1]);if(""===c)return null;c=f.standardiseDateFormat(c);b=p(f.toString(b[0]),c,!0);return!0===b.isValid()?b.toDate():null}if(1===b.length){if(f.isString(b[0])&&""===b[0].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;c=f.toNumber(b[0]);return!1===isNaN(c)?l(new Date(c)):f.toDate(b[0])}if(0===b.length)return new Date})};b.datediff=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,2,3);c=f.toDateM(b[0]);a=f.toDateM(b[1]);
if(null===c||null===a)return NaN;switch(f.toString(b[2]).toLowerCase()){case "days":case "day":case "d":return c.diff(a,"days",!0);case "months":case "month":return c.diff(a,"months",!0);case "minutes":case "minute":case "m":return"M"===b[2]?c.diff(a,"months",!0):c.diff(a,"minutes",!0);case "seconds":case "second":case "s":return c.diff(a,"seconds",!0);case "milliseconds":case "millisecond":case "ms":return c.diff(a);case "hours":case "hour":case "h":return c.diff(a,"hours",!0);case "years":case "year":case "y":return c.diff(a,
"years",!0);default:return c.diff(a)}})};b.dateadd=function(c,b){return g(c,b,function(c,a,b){f.pcCheck(b,2,3);c=f.toDateM(b[0]);if(null===c)return null;a="milliseconds";switch(f.toString(b[2]).toLowerCase()){case "days":case "day":case "d":a="days";break;case "months":case "month":a="months";break;case "minutes":case "minute":case "m":a="M"===b[2]?"months":"minutes";break;case "seconds":case "second":case "s":a="seconds";break;case "milliseconds":case "millisecond":case "ms":a="milliseconds";break;
case "hours":case "hour":case "h":a="hours";break;case "years":case "year":case "y":a="years"}c.add(f.toNumber(b[1]),a);return c.toDate()})}}})},"esri/arcade/functions/geometry":function(){define("require exports ../Dictionary ../Feature ../languageUtils ../../geometry/Extent ../../geometry/Geometry ../../geometry/Multipoint ../../geometry/Point ../../geometry/Polygon ../../geometry/Polyline ../../geometry/support/jsonUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k){Object.defineProperty(g,"__esModule",
{value:!0});g.registerFunctions=function(b,g){b.polygon=function(a,c){return g(a,c,function(c,b,d){l.pcCheck(d,1,1);c=null;if(d[0]instanceof p){if(c=l.fixSpatialReference(f.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===c instanceof e)throw Error("Illegal Parameter");}else c=d[0]instanceof e?k.fromJSON(d[0].toJSON()):l.fixSpatialReference(new e(JSON.parse(d[0])),a.spatialReference);if(null!==c&&!1===c.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return l.fixNullGeometry(c)})};b.polyline=function(c,b){return g(c,b,function(b,e,d){l.pcCheck(d,1,1);b=null;if(d[0]instanceof p){if(b=l.fixSpatialReference(f.parseGeometryFromDictionary(d[0]),c.spatialReference),!1===b instanceof a)throw Error("Illegal Parameter");}else b=d[0]instanceof a?k.fromJSON(d[0].toJSON()):l.fixSpatialReference(new a(JSON.parse(d[0])),c.spatialReference);if(null!==b&&!1===b.spatialReference.equals(c.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return l.fixNullGeometry(b)})};b.point=function(a,c){return g(a,c,function(c,b,d){l.pcCheck(d,1,1);c=null;if(d[0]instanceof p){if(c=l.fixSpatialReference(f.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===c instanceof q)throw Error("Illegal Parameter");}else c=d[0]instanceof q?k.fromJSON(d[0].toJSON()):l.fixSpatialReference(new q(JSON.parse(d[0])),a.spatialReference);if(null!==c&&!1===c.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return l.fixNullGeometry(c)})};b.multipoint=function(a,b){return g(a,b,function(b,e,d){l.pcCheck(d,1,1);b=null;if(d[0]instanceof p){if(b=l.fixSpatialReference(f.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===b instanceof c)throw Error("Illegal Parameter");}else b=d[0]instanceof c?k.fromJSON(d[0].toJSON()):l.fixSpatialReference(new c(JSON.parse(d[0])),a.spatialReference);if(null!==b&&!1===b.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return l.fixNullGeometry(b)})};b.extent=function(b,h){return g(b,h,function(g,h,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,1,1);g=null;d[0]instanceof p?g=l.fixSpatialReference(f.parseGeometryFromDictionary(d[0]),b.spatialReference):d[0]instanceof q?(g={xmin:d[0].x,ymin:d[0].y,xmax:d[0].x,ymax:d[0].y,spatialReference:d[0].spatialReference.toJSON()},d[0].hasZ?(g.zmin=d[0].z,g.zmax=d[0].z):d[0].hasM&&(g.mmin=d[0].m,g.mmax=d[0].m),g=k.fromJSON(g)):g=d[0]instanceof e?k.fromJSON(d[0].extent.toJSON()):
d[0]instanceof a?k.fromJSON(d[0].extent.toJSON()):d[0]instanceof c?k.fromJSON(d[0].extent.toJSON()):d[0]instanceof m?k.fromJSON(d[0].toJSON()):l.fixSpatialReference(new m(JSON.parse(d[0])),b.spatialReference);if(null!==g&&!1===g.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return l.fixNullGeometry(g)})};b.geometry=function(a,c){return g(a,c,function(c,b,d){l.pcCheck(d,1,1);c=null;c=d[0]instanceof
f?l.fixSpatialReference(d[0].geometry(),a.spatialReference):d[0]instanceof p?l.fixSpatialReference(f.parseGeometryFromDictionary(d[0]),a.spatialReference):l.fixSpatialReference(k.fromJSON(JSON.parse(d[0])),a.spatialReference);if(null!==c&&!1===c.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return l.fixNullGeometry(c)})};b.setgeometry=function(a,c){return g(a,c,function(a,c,b){l.pcCheck(b,
2,2);if(b[0]instanceof f){if(!0===b[0].immutable)throw Error("Feature is Immutable");if(b[1]instanceof h||null===b[1])b[0]._geometry=b[1];else throw Error("Illegal Argument");}else throw Error("Illegal Argument");return l.voidOperation})};b.feature=function(a,c){return g(a,c,function(c,b,d){if(0===d.length)throw Error("Missing Parameters");c=null;if(1===d.length)if(l.isString(d[0]))c=f.fromJson(JSON.parse(d[0]));else if(d[0]instanceof f)c=f.createFromArcadeFeature(d[0]);else if(d[0]instanceof h)c=
f.createFromGraphicLikeObject(d[0],null,null);else if(d[0]instanceof p)c=d[0].hasField("geometry")?d[0].field("geometry"):null,b=d[0].hasField("attributes")?d[0].field("attributes"):null,null!==c&&c instanceof p&&(c=f.parseGeometryFromDictionary(c)),null!==b&&(b=f.parseAttributesFromDictionary(b)),c=f.createFromGraphicLikeObject(c,b,null);else throw Error("Illegal Argument");else{if(2===d.length){b=c=null;if(null!==d[0])if(d[0]instanceof h)c=d[0];else if(c instanceof p)c=f.parseGeometryFromDictionary(d[0]);
else throw Error("Illegal Argument");if(null!==d[1])if(d[1]instanceof p)b=f.parseAttributesFromDictionary(d[1]);else throw Error("Illegal Argument");}else{c=null;b={};if(null!==d[0])if(d[0]instanceof h)c=d[0];else if(c instanceof p)c=f.parseGeometryFromDictionary(d[0]);else throw Error("Illegal Argument");for(var e=1;e<d.length;e+=2){var k=l.toString(d[e]),g=d[e+1];if(null===g||void 0===g||l.isString(g)||isNaN(g)||l.isDate(g)||l.isNumber(g)||l.isBoolean(g)){if(l.isFunctionParameter(g)||!1===l.isSimpleType(g))throw Error("Illegal Argument");
b[k]=g===l.voidOperation?null:g}else throw Error("Illegal Argument");}}c=f.createFromGraphicLikeObject(c,b,null)}c._geometry=l.fixSpatialReference(c.geometry(),a.spatialReference);c.immutable=!1;return c})};b.dictionary=function(a,c){return g(a,c,function(a,c,b){if(0===b.length)throw Error("Missing Parameters");if(0!==b.length%2)throw Error("Missing Parameters");a={};for(c=0;c<b.length;c+=2){var d=l.toString(b[c]),e=b[c+1];if(null===e||void 0===e||l.isString(e)||isNaN(e)||l.isDate(e)||l.isNumber(e)||
l.isBoolean(e)||l.isArray(e)||l.isImmutableArray(e)){if(l.isFunctionParameter(e))throw Error("Illegal Argument");a[d]=e===l.voidOperation?null:e}else throw Error("Illegal Argument");}b=new p(a);b.immutable=!1;return b})};b.haskey=function(a,c){return g(a,c,function(a,c,b){l.pcCheck(b,2,2);a=l.toString(b[1]);if(b[0]instanceof f||b[0]instanceof p)return b[0].hasField(a);throw Error("Illegal Argument");})};b.indexof=function(a,c){return g(a,c,function(a,c,b){l.pcCheck(b,2,2);a=b[1];if(l.isArray(b[0])){for(c=
0;c<b[0].length;c++)if(l.equalityTest(a,b[0][c]))return c;return-1}if(l.isImmutableArray(b[0])){var d=b[0].length();for(c=0;c<d;c++)if(l.equalityTest(a,b[0].get(c)))return c;return-1}throw Error("Illegal Argument");})}}})},"esri/arcade/functions/geomsync":function(){define("require exports ../../kernel ../kernel ../languageUtils ./centroid ../../geometry/Extent ../../geometry/Geometry ../../geometry/Multipoint ../../geometry/Point ../../geometry/Polygon ../../geometry/Polyline ../../geometry/support/jsonUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r){function u(a){return w?a.clone():r.fromJSON(a.toJSON())}function z(c){return 0===p.version.indexOf("4.")?a.fromExtent(c):new a({spatialReference:c.spatialReference,rings:[[[c.xmin,c.ymin],[c.xmin,c.ymax],[c.xmax,c.ymax],[c.xmax,c.ymin],[c.xmin,c.ymin]]]})}Object.defineProperty(g,"__esModule",{value:!0});var v=null,w=0===p.version.indexOf("4.");g.setGeometryEngine=function(a){v=a};g.registerFunctions=function(b,d){function g(a){l.pcCheck(a,2,2);if(!(a[0]instanceof
c&&a[1]instanceof c||a[0]instanceof c&&null===a[1]||a[1]instanceof c&&null===a[0]||null===a[0]&&null===a[1]))throw Error("Illegal Argument");}b.disjoint=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?!0:v.disjoint(b[0],b[1])})};b.intersects=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?!1:v.intersects(b[0],b[1])})};b.touches=function(a,c){return d(a,c,function(a,c,b){b=
l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?!1:v.touches(b[0],b[1])})};b.crosses=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?!1:v.crosses(b[0],b[1])})};b.within=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?!1:v.within(b[0],b[1])})};b.contains=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||
null===b[1]?!1:v.contains(b[0],b[1])})};b.overlaps=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?!1:v.overlaps(b[0],b[1])})};b.equals=function(a,b){return d(a,b,function(a,b,d){l.pcCheck(d,2,2);return d[0]===d[1]?!0:d[0]instanceof c&&d[1]instanceof c?v.equals(d[0],d[1]):l.isDate(d[0])&&l.isDate(d[1])?d[0].getTime()===d[1].getTime():!1})};b.relate=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,
3,3);if(d[0]instanceof c&&d[1]instanceof c)return v.relate(d[0],d[1],l.toString(d[2]));if(d[0]instanceof c&&null===d[1]||d[1]instanceof c&&null===d[0]||null===d[0]&&null===d[1])return!1;throw Error("Illegal Argument");})};b.intersection=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]||null===b[1]?null:v.intersect(b[0],b[1])})};b.union=function(a,b){return d(a,b,function(b,d,e){e=l.autoCastFeatureToGeometry(e);b=[];if(0===e.length)throw Error("Function called with wrong number of Parameters");
if(1===e.length)if(l.isArray(e[0]))for(e=l.autoCastFeatureToGeometry(e[0]),d=0;d<e.length;d++){if(null!==e[d])if(e[d]instanceof c)b.push(e[d]);else throw Error("Illegal Argument");}else if(l.isImmutableArray(e[0]))for(e=l.autoCastFeatureToGeometry(e[0].toArray()),d=0;d<e.length;d++){if(null!==e[d])if(e[d]instanceof c)b.push(e[d]);else throw Error("Illegal Argument");}else{if(e[0]instanceof c)return l.fixSpatialReference(u(e[0]),a.spatialReference);if(null===e[0])return null;throw Error("Illegal Argument");
}else for(d=0;d<e.length;d++)if(null!==e[d])if(e[d]instanceof c)b.push(e[d]);else throw Error("Illegal Argument");return 0===b.length?null:v.union(b)})};b.difference=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null!==b[0]&&null===b[1]?u(b[0]):null===b[0]?null:v.difference(b[0],b[1])})};b.symmetricdifference=function(a,c){return d(a,c,function(a,c,b){b=l.autoCastFeatureToGeometry(b);g(b);return null===b[0]&&null===b[1]?null:null===b[0]?u(b[1]):null===b[1]?
u(b[0]):v.symmetricDifference(b[0],b[1])})};b.clip=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,2);if(!(d[1]instanceof h)&&null!==d[1])throw Error("Illegal Argument");if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");return null===d[1]?null:v.clip(d[0],d[1])})};b.cut=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,2);if(!(d[1]instanceof k)&&null!==d[1])throw Error("Illegal Argument");
if(null===d[0])return[];if(!(d[0]instanceof c))throw Error("Illegal Argument");return null===d[1]?[u(d[0])]:v.cut(d[0],d[1])})};b.area=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return v.planarArea(d[0],f.convertSquareUnitsToCode(l.defaultUndefined(d[1],-1)))})};b.areageodetic=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,1,2);if(null===
d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return v.geodesicArea(d[0],f.convertSquareUnitsToCode(l.defaultUndefined(d[1],-1)))})};b.length=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return v.planarLength(d[0],f.convertLinearUnitsToCode(l.defaultUndefined(d[1],-1)))})};b.lengthgeodetic=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);
l.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return v.geodesicLength(d[0],f.convertLinearUnitsToCode(l.defaultUndefined(d[1],-1)))})};b.distance=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,3);if(!(d[0]instanceof c))throw Error("Illegal Argument");if(!(d[1]instanceof c))throw Error("Illegal Argument");return v.distance(d[0],d[1],f.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)))})};b.densify=function(b,
e){return d(b,e,function(b,d,e){e=l.autoCastFeatureToGeometry(e);l.pcCheck(e,2,3);if(null===e[0])return null;if(!(e[0]instanceof c))throw Error("Illegal Argument");b=l.toNumber(e[1]);if(isNaN(b))throw Error("Illegal Argument");if(0>=b)throw Error("Illegal Argument");return e[0]instanceof a||e[0]instanceof k?v.densify(e[0],b,f.convertLinearUnitsToCode(l.defaultUndefined(e[2],-1))):e[0]instanceof h?v.densify(z(e[0]),b,f.convertLinearUnitsToCode(l.defaultUndefined(e[2],-1))):e[0]})};b.densifygeodetic=
function(b,e){return d(b,e,function(b,d,e){e=l.autoCastFeatureToGeometry(e);l.pcCheck(e,2,3);if(null===e[0])return null;if(!(e[0]instanceof c))throw Error("Illegal Argument");b=l.toNumber(e[1]);if(isNaN(b))throw Error("Illegal Argument");if(0>=b)throw Error("Illegal Argument");return e[0]instanceof a||e[0]instanceof k?v.geodesicDensify(e[0],b,f.convertLinearUnitsToCode(l.defaultUndefined(e[2],-1))):e[0]instanceof h?v.geodesicDensify(z(e[0]),b,f.convertLinearUnitsToCode(l.defaultUndefined(e[2],-1))):
e[0]})};b.generalize=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,4);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");a=l.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");return v.generalize(d[0],a,l.toBoolean(l.defaultUndefined(d[2],!0)),f.convertLinearUnitsToCode(l.defaultUndefined(d[3],-1)))})};b.buffer=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,3);if(null===d[0])return null;
if(!(d[0]instanceof c))throw Error("Illegal Argument");a=l.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");return 0===a?u(d[0]):v.buffer(d[0],a,f.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)))})};b.buffergeodetic=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");a=l.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");return 0===a?u(d[0]):v.geodesicBuffer(d[0],
a,f.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)))})};b.offset=function(c,b){return d(c,b,function(c,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,6);if(null===d[0])return null;if(!(d[0]instanceof a||d[0]instanceof k))throw Error("Illegal Argument");c=l.toNumber(d[1]);if(isNaN(c))throw Error("Illegal Argument");b=l.toNumber(l.defaultUndefined(d[4],10));if(isNaN(b))throw Error("Illegal Argument");var e=l.toNumber(l.defaultUndefined(d[5],0));if(isNaN(e))throw Error("Illegal Argument");
return v.offset(d[0],c,f.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)),l.toString(l.defaultUndefined(d[3],"round")).toLowerCase(),b,e)})};b.rotate=function(b,f){return d(b,f,function(b,d,f){f=l.autoCastFeatureToGeometry(f);l.pcCheck(f,2,3);b=f[0];if(null===b)return null;if(!(b instanceof c))throw Error("Illegal Argument");b instanceof h&&(b=a.fromExtent(b));d=l.toNumber(f[1]);if(isNaN(d))throw Error("Illegal Argument");f=l.defaultUndefined(f[2],null);if(null===f)return v.rotate(b,d);if(f instanceof
e)return v.rotate(b,d,f);throw Error("Illegal Argument");})};b.centroid=function(b,f){return d(b,f,function(d,f,g){g=l.autoCastFeatureToGeometry(g);l.pcCheck(g,1,1);if(null===g[0])return null;if(!(g[0]instanceof c))throw Error("Illegal Argument");return g[0]instanceof e?l.fixSpatialReference(u(g[0]),b.spatialReference):g[0]instanceof a?w?g[0].centroid:g[0].getCentroid():g[0]instanceof k?m.centroidPolyline(g[0]):g[0]instanceof q?m.centroidMultiPoint(g[0]):g[0]instanceof h?w?g[0].center:g[0].getExtent().getCenter():
null})};b.multiparttosinglepart=function(b,f){return d(b,f,function(d,f,g){g=l.autoCastFeatureToGeometry(g);l.pcCheck(g,1,1);f=[];if(null===g[0])return null;if(!(g[0]instanceof c))throw Error("Illegal Argument");if(g[0]instanceof e||g[0]instanceof h)return[l.fixSpatialReference(u(g[0]),b.spatialReference)];d=v.simplify(g[0]);if(d instanceof a){f=[];var n=[];for(g=0;g<d.rings.length;g++)if(d.isClockwise(d.rings[g])){var m=r.fromJSON({rings:[d.rings[g]],hasZ:w?d.hasZ:!1,hasM:w?d.hasM:!1,spatialReference:w?
d.spatialReference.toJSON():d.spatialReference.toJson()});f.push(m)}else n.push({ring:d.rings[g],pt:d.getPoint(g,0)});for(d=0;d<n.length;d++)for(g=0;g<f.length;g++)if(f[g].contains(n[d].pt)){f[g].addRing(n[d].ring);break}return f}if(d instanceof k){f=[];for(g=0;g<d.paths.length;g++)n=r.fromJSON({paths:[d.paths[g]],hasZ:w?d.hasZ:!1,hasM:w?d.hasM:!1,spatialReference:w?d.spatialReference.toJSON():d.spatialReference.toJson()}),f.push(n);return f}if(g[0]instanceof q){d=l.fixSpatialReference(u(g[0]),b.spatialReference);
for(g=0;g<d.points.length;g++)f.push(d.getPoint(g));return f}return null})};b.issimple=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,1,1);if(null===d[0])return!0;if(d[0]instanceof c)return v.isSimple(d[0]);throw Error("Illegal Argument");})};b.simplify=function(a,b){return d(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,1,1);if(null===d[0])return null;if(d[0]instanceof c)return v.simplify(d[0]);throw Error("Illegal Argument");})}}})},"esri/arcade/kernel":function(){define(["require",
"exports","../geometry/Extent"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.errback=function(b){return function(f){b.reject(f)}};g.callback=function(b,g){return function(){try{b.apply(null,arguments)}catch(m){g.reject(m)}}};g.convertSquareUnitsToCode=function(b){if(void 0===b)return null;if("number"===typeof b)return b;switch(b.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square_meters":return 109404;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 109413;
case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 109414;case "acres":case "acre":case "ac":return 109402;case "hectares":case "hectare":case "ha":return 109401;case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 109442;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 109405}return null};
g.shapeExtent=function(b){if(null===b)return null;switch(b.type){case "polygon":case "multipoint":case "polyline":return b.extent;case "point":return new p({xmin:b.x,ymin:b.y,xmax:b.x,ymax:b.y,spatialReference:b.spatialReference});case "extent":return b}return null};g.convertLinearUnitsToCode=function(b){if(void 0===b)return null;if("number"===typeof b||"number"===typeof b)return b;switch(b.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square-meters":return 9001;
case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 9035;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 9036;case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 9096;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 9002}return null};
g.sameGeomType=function(b,g){return b===g||"point"===b&&"esriGeometryPoint"===g||"polyline"===b&&"esriGeometryPolyline"===g||"polygon"===b&&"esriGeometryPolygon"===g||"extent"===b&&"esriGeometryEnvelope"===g||"multipoint"===b&&"esriGeometryMultipoint"===g||"point"===g&&"esriGeometryPoint"===b||"polyline"===g&&"esriGeometryPolyline"===b||"polygon"===g&&"esriGeometryPolygon"===b||"extent"===g&&"esriGeometryEnvelope"===b||"multipoint"===g&&"esriGeometryMultipoint"===b?!0:!1}})},"esri/arcade/functions/centroid":function(){define(["require",
"exports","../../kernel","../../geometry/Point"],function(b,g,p,f){function l(c,b,e){var a={x:0,y:0};b&&(a.z=0);e&&(a.m=0);for(var f=0,g=c[0],h=0;h<c.length;h++){var l=c[h],q;a:if(l.length!==g.length)q=!1;else{for(q=0;q<l.length;q++)if(l[q]!==g[q]){q=!1;break a}q=!0}if(!1===q){q=m(g,l,b);var p=l,t=b,d=e,n={x:(g[0]+p[0])/2,y:(g[1]+p[1])/2};t&&(n.z=(g[2]+p[2])/2);t&&d?n.m=(g[3]+p[3])/2:d&&(n.m=(g[2]+p[2])/2);g=n;g.x*=q;g.y*=q;a.x+=g.x;a.y+=g.y;b&&(g.z*=q,a.z+=g.z);e&&(g.m*=q,a.m+=g.m);f+=q;g=l}}0<f?
(a.x/=f,a.y/=f,b&&(a.z/=f),e&&(a.m/=f)):(a.x=c[0][0],a.y=c[0][1],b&&(a.z=c[0][2]),e&&b?a.m=c[0][3]:e&&(a.m=c[0][2]));return a}function m(c,b,e){var a=b[0]-c[0];c=b[1]-c[1];return e?(b=b[2]-b[2],Math.sqrt(a*a+c*c+b*b)):Math.sqrt(a*a+c*c)}Object.defineProperty(g,"__esModule",{value:!0});var h=0===p.version.indexOf("4.");g.centroidPolyline=function(c){for(var b={x:0,y:0,spatialReference:h?c.spatialReference.toJSON():c.spatialReference.toJson()},e={x:0,y:0,spatialReference:h?c.spatialReference.toJSON():
c.spatialReference.toJson()},a=0,g=0,r=0;r<c.paths.length;r++)if(0!==c.paths[r].length){var p;p=c.paths[r];var z=!0===c.hasZ;if(1>=p.length)p=0;else{for(var v=0,w=1;w<p.length;w++)v+=m(p[w-1],p[w],z);p=v}0===p?(z=l(c.paths[r],!0===c.hasZ,!0===c.hasM),b.x+=z.x,b.y+=z.y,!0===c.hasZ&&(b.z+=z.z),!0===c.hasM&&(b.m+=z.m),++a):(z=l(c.paths[r],!0===c.hasZ,!0===c.hasM),e.x+=z.x*p,e.y+=z.y*p,!0===c.hasZ&&(e.z+=z.z*p),!0===c.hasM&&(e.m+=z.m*p),g+=p)}return 0<g?(e.x/=g,e.y/=g,!0===c.hasZ&&(e.z/=g),!0===c.hasM&&
(e.m/=g),new f(e)):0<a?(b.x/=a,b.y/=a,!0===c.hasZ&&(e.z/=a),!0===c.hasM&&(b.m/=a),new f(b)):null};g.centroidMultiPoint=function(c){if(0===c.points.length)return null;for(var b=0,e=0,a=0,g=0,l=0;l<c.points.length;l++){var m=c.getPoint(l);!0===m.hasZ&&(a+=m.z);!0===m.hasM&&(g+=m.m);b+=m.x;e+=m.y;g+=m.m}b={x:b/c.points.length,y:e/c.points.length,spatialReference:null};b.spatialReference=h?c.spatialReference.toJSON():c.spatialReference.toJson();!0===c.hasZ&&(b.z=a/c.points.length);!0===c.hasM&&(b.m=g/
c.points.length);return new f(b)}})},"esri/arcade/functions/maths":function(){define(["require","exports","dojo/number","../languageUtils"],function(b,g,p,f){function l(b,f,c){if("undefined"===typeof c||0===+c)return Math[b](f);f=+f;c=+c;if(isNaN(f)||"number"!==typeof c||0!==c%1)return NaN;f=f.toString().split("e");f=Math[b](+(f[0]+"e"+(f[1]?+f[1]-c:-c)));f=f.toString().split("e");return+(f[0]+"e"+(f[1]?+f[1]+c:c))}Object.defineProperty(g,"__esModule",{value:!0});g.registerFunctions=function(b,g){function c(c,
b,a){c=f.toNumber(c);return isNaN(c)?c:isNaN(b)||isNaN(a)||b>a?NaN:c<b?b:c>a?a:c}b.number=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,2);a=b[0];return f.isNumber(a)?a:null===a?0:f.isDate(a)||f.isBoolean(a)?Number(a):f.isArray(a)?NaN:""===a||void 0===a?Number(a):f.isString(a)?void 0!==b[1]?(b=f.multiReplace(b[1],"\u2030",""),b=f.multiReplace(b,"\u00a4",""),p.parse(a,{pattern:b})):Number(a.trim()):Number(a)})};b.abs=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.abs(f.toNumber(b[0]))})};
b.acos=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.acos(f.toNumber(b[0]))})};b.asin=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.asin(f.toNumber(b[0]))})};b.atan=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.atan(f.toNumber(b[0]))})};b.atan2=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,2,2);return Math.atan2(f.toNumber(b[0]),f.toNumber(b[1]))})};b.ceil=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,
1,2);return 2===b.length?(a=f.toNumber(b[1]),isNaN(a)&&(a=0),l("ceil",f.toNumber(b[0]),-1*a)):Math.ceil(f.toNumber(b[0]))})};b.round=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,2);return 2===b.length?(a=f.toNumber(b[1]),isNaN(a)&&(a=0),l("round",f.toNumber(b[0]),-1*a)):Math.round(f.toNumber(b[0]))})};b.floor=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,2);return 2===b.length?(a=f.toNumber(b[1]),isNaN(a)&&(a=0),l("floor",f.toNumber(b[0]),-1*a)):Math.floor(f.toNumber(b[0]))})};
b.cos=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.cos(f.toNumber(b[0]))})};b.isnan=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return"number"===typeof b[0]&&isNaN(b[0])})};b.exp=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.exp(f.toNumber(b[0]))})};b.log=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.log(f.toNumber(b[0]))})};b.pow=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,2,2);return Math.pow(f.toNumber(b[0]),
f.toNumber(b[1]))})};b.random=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,0,0);return Math.random()})};b.sin=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.sin(f.toNumber(b[0]))})};b.sqrt=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.sqrt(f.toNumber(b[0]))})};b.tan=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return Math.tan(f.toNumber(b[0]))})};b.defaultvalue=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,2,2);return null===
b[0]||""===b[0]||void 0===b[0]?b[1]:b[0]})};b.isempty=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return null===b[0]||""===b[0]||void 0===b[0]?!0:!1})};b["boolean"]=function(c,b){return g(c,b,function(a,c,b){f.pcCheck(b,1,1);return f.toBoolean(b[0])})};b.constrain=function(b,e){return g(b,e,function(a,b,e){f.pcCheck(e,3,3);a=f.toNumber(e[1]);b=f.toNumber(e[2]);if(f.isArray(e[0])){var g=[],k=0;for(e=e[0];k<e.length;k++)g.push(c(e[k],a,b));return g}if(f.isImmutableArray(e[0])){g=[];
for(k=0;k<e[0].length();k++)g.push(c(e[0].get(k),a,b));return g}return c(e[0],a,b)})}}})},"esri/arcade/functions/stats":function(){define(["require","exports","../languageUtils","./fieldStats"],function(b,g,p,f){function l(b,g,c,l){if(1===l.length){if(p.isArray(l[0]))return f.calculateStat(b,l[0],-1);if(p.isImmutableArray(l[0]))return f.calculateStat(b,l[0].toArray(),-1)}return f.calculateStat(b,l,-1)}Object.defineProperty(g,"__esModule",{value:!0});g.registerFunctions=function(b,f){b.stdev=function(c,
b){return f(c,b,function(c,a,b){return l("stdev",c,a,b)})};b.variance=function(c,b){return f(c,b,function(c,a,b){return l("variance",c,a,b)})};b.average=function(c,b){return f(c,b,function(c,a,b){return l("mean",c,a,b)})};b.mean=function(c,b){return f(c,b,function(c,a,b){return l("mean",c,a,b)})};b.sum=function(c,b){return f(c,b,function(c,a,b){return l("sum",c,a,b)})};b.min=function(c,b){return f(c,b,function(c,a,b){return l("min",c,a,b)})};b.max=function(c,b){return f(c,b,function(c,a,b){return l("max",
c,a,b)})};b.distinct=function(c,b){return f(c,b,function(c,a,b){return l("distinct",c,a,b)})};b.count=function(c,b){return f(c,b,function(c,a,b){p.pcCheck(b,1,1);if(p.isArray(b[0])||p.isString(b[0]))return b[0].length;if(p.isImmutableArray(b[0]))return b[0].length();throw Error("Invalid Parameters for Count");})}}})},"esri/arcade/functions/fieldStats":function(){define(["require","exports","../languageUtils"],function(b,g,p){function f(b){for(var f=0,c=0;c<b.length;c++)f+=b[c];return f/b.length}function l(b){for(var g=
f(b),c=0,l=0;l<b.length;l++)c+=Math.pow(g-b[l],2);return c/b.length}Object.defineProperty(g,"__esModule",{value:!0});g.decodeStatType=function(b){switch(b.toLowerCase()){case "distinct":return"distinct";case "avg":case "mean":return"avg";case "min":return"min";case "sum":return"sum";case "max":return"max";case "stdev":case "stddev":return"stddev";case "var":case "variance":return"var";case "count":return"count"}return""};g.calculateStat=function(b,g,c){void 0===c&&(c=1E3);switch(b.toLowerCase()){case "distinct":a:{b=
c;c=[];for(var h={},e=[],a=0;a<g.length;a++){if(void 0!==g[a]&&null!==g[a]&&g[a]!==p.voidOperation){var k=g[a];if(p.isNumber(k)||p.isString(k))void 0===h[k]&&(c.push(k),h[k]=1);else{for(var m=!1,u=0;u<e.length;u++)!0===p.equalityTest(e[u],k)&&(m=!0);!1===m&&(e.push(k),c.push(k))}}if(c.length>=b&&-1!==b){g=c;break a}}g=c}return g;case "avg":case "mean":return f(p.toNumberArray(g));case "min":return Math.min.apply(Math,p.toNumberArray(g));case "sum":g=p.toNumberArray(g);for(c=b=0;c<g.length;c++)b+=
g[c];return b;case "max":return Math.max.apply(Math,p.toNumberArray(g));case "stdev":case "stddev":return Math.sqrt(l(p.toNumberArray(g)));case "var":case "variance":return l(p.toNumberArray(g));case "count":return g.length}return 0}})},"esri/arcade/functions/string":function(){define(["require","exports","../Feature","../languageUtils"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.registerFunctions=function(b,g){b.trim=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,
1,1);return f.toString(a[0]).trim()})};b.upper=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,1,1);return f.toString(a[0]).toUpperCase()})};b.proper=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,1,2);c=1;2===a.length&&"firstword"===f.toString(a[1]).toLowerCase()&&(c=2);b=/\s/;a=f.toString(a[0]);for(var e="",g=!0,h=0;h<a.length;h++){var l=a[h];b.test(l)?1===c&&(g=!0):l.toUpperCase()!==l.toLowerCase()&&(g?(l=l.toUpperCase(),g=!1):l=l.toLowerCase());e+=l}return e})};b.lower=function(b,
c){return g(b,c,function(c,b,a){f.pcCheck(a,1,1);return f.toString(a[0]).toLowerCase()})};b.guid=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,0,1);if(0<a.length)switch(f.toString(a[0]).toLowerCase()){case "digits":return f.generateUUID().replace("-","").replace("-","").replace("-","").replace("-","");case "digits-hyphen":return f.generateUUID();case "digits-hyphen-parentheses":return"("+f.generateUUID()+")"}return"{"+f.generateUUID()+"}"})};b.console=function(b,c){return g(b,c,function(c,
e,a){0!==a.length&&(1===a.length?b.console(f.toString(a[0])):b.console(f.toString(a)));return f.voidOperation})};b.mid=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,2,3);c=f.toNumber(a[1]);if(isNaN(c))return"";0>c&&(c=0);if(2===a.length)return f.toString(a[0]).substr(c);b=f.toNumber(a[2]);if(isNaN(b))return"";0>b&&(b=0);return f.toString(a[0]).substr(c,b)})};b.find=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,2,3);c=0;if(2<a.length){c=f.toNumber(f.defaultUndefined(a[2],0));if(isNaN(c))return-1;
0>c&&(c=0)}return f.toString(a[1]).indexOf(f.toString(a[0]),c)})};b.left=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,2,2);c=f.toNumber(a[1]);if(isNaN(c))return"";0>c&&(c=0);return f.toString(a[0]).substr(0,c)})};b.right=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,2,2);c=f.toNumber(a[1]);if(isNaN(c))return"";0>c&&(c=0);return f.toString(a[0]).substr(-1*c,c)})};b.split=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,2,4);c=f.toNumber(f.defaultUndefined(a[2],-1));b=f.toBoolean(f.defaultUndefined(a[3],
!1));-1===c||null===c||!0===b?a=f.toString(a[0]).split(f.toString(a[1])):(isNaN(c)&&(c=-1),-1>c&&(c=-1),a=f.toString(a[0]).split(f.toString(a[1]),c));if(!1===b)return a;b=[];for(var e=0;e<a.length&&!(-1!==c&&b.length>=c);e++)""!==a[e]&&void 0!==a[e]&&b.push(a[e]);return b})};b.text=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,1,2);return f.toStringExplicit(a[0],a[1])})};b.concatenate=function(b,c){return g(b,c,function(c,b,a){c=[];if(1>a.length)return"";if(f.isArray(a[0])){b=f.defaultUndefined(a[2],
"");for(var e=0;e<a[0].length;e++)c[e]=f.toStringExplicit(a[0][e],b);return 1<a.length?c.join(a[1]):c.join("")}if(f.isImmutableArray(a[0])){b=f.defaultUndefined(a[2],"");for(e=0;e<a[0].length();e++)c[e]=f.toStringExplicit(a[0].get(e),b);return 1<a.length?c.join(a[1]):c.join("")}for(e=0;e<a.length;e++)c[e]=f.toStringExplicit(a[e]);return c.join("")})};b.reverse=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,1,1);if(f.isArray(a[0]))return c=a[0].slice(0),c.reverse(),c;if(f.isImmutableArray(a[0]))return c=
a[0].toArray().slice(0),c.reverse(),c;throw Error("Invalid Parameter");})};b.replace=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,3,4);c=f.toString(a[0]);b=f.toString(a[1]);var e=f.toString(a[2]);return(4===a.length?f.toBoolean(a[3]):1)?f.multiReplace(c,b,e):c.replace(b,e)})};b.domainname=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,2,4);if(a[0]instanceof p)return a[0].domainValueLookup(f.toString(a[1]),a[2],void 0===a[3]?void 0:f.toNumber(a[3]));throw Error("Invalid Parameter");
})};b.domaincode=function(b,c){return g(b,c,function(c,b,a){f.pcCheck(a,3,4);if(a[0]instanceof p)return a[0].domainCodeLookup(f.toString(a[1]),a[2],void 0===a[3]?void 0:f.toNumber(a[3]));throw Error("Invalid Parameter");})}}})},"esri/arcade/arcadeRuntime":function(){define("require exports ./Dictionary ./Feature ./FunctionWrapper ./ImmutablePathArray ./ImmutablePointArray ./languageUtils ./treeAnalysis ./functions/date ./functions/geometry ./functions/geomsync ./functions/maths ./functions/stats ./functions/string ../geometry/Extent ../geometry/Geometry ../geometry/Multipoint ../geometry/Point ../geometry/Polygon ../geometry/Polyline ../geometry/SpatialReference".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x,y){function A(a,c){for(var b=[],d=0;d<c.arguments.length;d++)b.push(B(a,c.arguments[d]));return b}function D(a,c,b){try{return b(a,c,A(a,c))}catch(na){throw na;}}function B(a,b){try{switch(b.type){case "EmptyStatement":return c.voidOperation;case "VariableDeclarator":var d=null===b.init?null:B(a,b.init);d===c.voidOperation&&(d=null);var e=b.id.name.toLowerCase();null!==a.localScope?a.localScope[e]={value:d,valueset:!0,node:b.init}:a.globalScope[e]=
{value:d,valueset:!0,node:b.init};return c.voidOperation;case "VariableDeclaration":for(var g=0;g<b.declarations.length;g++)B(a,b.declarations[g]);return c.voidOperation;case "BlockStatement":var k;a:{for(var h=c.voidOperation,g=0;g<b.body.length;g++)if(h=B(a,b.body[g]),h instanceof c.ReturnResult||h===c.breakResult||h===c.continueResult){k=h;break a}k=h}return k;case "FunctionDeclaration":var n=b.id.name.toLowerCase();a.globalScope[n]={valueset:!0,node:null,value:new l(b,a)};return c.voidOperation;
case "ReturnStatement":var m;if(null===b.argument)m=new c.ReturnResult(c.voidOperation);else{var r=B(a,b.argument);m=new c.ReturnResult(r)}return m;case "IfStatement":var u;if("AssignmentExpression"===b.test.type||"UpdateExpression"===b.test.type)throw Error(q.nodeErrorMessage(b.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var t=B(a,b.test);if(!0===t)u=B(a,b.consequent);else if(!1===t)u=null!==b.alternate?B(a,b.alternate):c.voidOperation;else throw Error(q.nodeErrorMessage(b,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));
return u;case "ExpressionStatement":var z;if("AssignmentExpression"===b.expression.type||"UpdateExpression"===b.expression.type)z=B(a,b.expression);else{var v=B(a,b.expression);z=v===c.voidOperation?c.voidOperation:new c.ImplicitResult(v)}return z;case "AssignmentExpression":var y;var x=B(a,b.right),g=null,w="";if("MemberExpression"===b.left.type){g=B(a,b.left.object);w=!0===b.left.computed?B(a,b.left.property):b.left.property.name;if(c.isArray(g))if(c.isNumber(w)){0>w&&(w=g.length+w);if(0>w||w>g.length)throw Error("Assignment outside of array bounds");
if(w===g.length&&"\x3d"!==b.operator)throw Error("Invalid Parameter");g[w]=C(x,b.operator,g[w],b)}else throw Error("Invalid Parameter");else if(g instanceof p){if(!1===c.isString(w))throw Error("Dictionary accessor must be a string");if(!0===g.hasField(w))g.setField(w,C(x,b.operator,g.field(w),b));else{if("\x3d"!==b.operator)throw Error("Invalid Parameter");g.setField(w,C(x,b.operator,null,b))}}else if(g instanceof f){if(!1===c.isString(w))throw Error("Feature accessor must be a string");if(!0===
g.hasField(w))g.setField(w,C(x,b.operator,g.field(w),b));else{if("\x3d"!==b.operator)throw Error("Invalid Parameter");g.setField(w,C(x,b.operator,null,b))}}else{if(c.isImmutableArray(g))throw Error("Array is Immutable");throw Error("Invalid Parameter");}y=c.voidOperation}else if(g=b.left.name.toLowerCase(),null!==a.localScope&&void 0!==a.localScope[g])a.localScope[g]={value:C(x,b.operator,a.localScope[g].value,b),valueset:!0,node:b.right},y=c.voidOperation;else if(void 0!==a.globalScope[g])a.globalScope[g]=
{value:C(x,b.operator,a.globalScope[g].value,b),valueset:!0,node:b.right},y=c.voidOperation;else throw Error("Variable not recognised");return y;case "UpdateExpression":var A;var G,g=null,w="";if("MemberExpression"===b.argument.type){g=B(a,b.argument.object);w=!0===b.argument.computed?B(a,b.argument.property):b.argument.property.name;if(c.isArray(g))if(c.isNumber(w)){0>w&&(w=g.length+w);if(0>w||w>=g.length)throw Error("Assignment outside of array bounds");G=c.toNumber(g[w]);g[w]="++"===b.operator?
G+1:G-1}else throw Error("Invalid Parameter");else if(g instanceof p){if(!1===c.isString(w))throw Error("Dictionary accessor must be a string");if(!0===g.hasField(w))G=c.toNumber(g.field(w)),g.setField(w,"++"===b.operator?G+1:G-1);else throw Error("Invalid Parameter");}else if(g instanceof f){if(!1===c.isString(w))throw Error("Feature accessor must be a string");if(!0===g.hasField(w))G=c.toNumber(g.field(w)),g.setField(w,"++"===b.operator?G+1:G-1);else throw Error("Invalid Parameter");}else{if(c.isImmutableArray(g))throw Error("Array is Immutable");
throw Error("Invalid Parameter");}A=!1===b.prefix?G:"++"===b.operator?G+1:G-1}else if(g=b.argument.name.toLowerCase(),null!==a.localScope&&void 0!==a.localScope[g])G=c.toNumber(a.localScope[g].value),a.localScope[g]={value:"++"===b.operator?G+1:G-1,valueset:!0,node:b},A=!1===b.prefix?G:"++"===b.operator?G+1:G-1;else if(void 0!==a.globalScope[g])G=c.toNumber(a.globalScope[g].value),a.globalScope[g]={value:"++"===b.operator?G+1:G-1,valueset:!0,node:b},A=!1===b.prefix?G:"++"===b.operator?G+1:G-1;else throw Error("Variable not recognised");
return A;case "BreakStatement":return c.breakResult;case "ContinueStatement":return c.continueResult;case "ForStatement":null!==b.init&&B(a,b.init);w={testResult:!0,lastAction:c.voidOperation};do b:{y=a;x=b;A=w;if(null!==x.test){A.testResult=B(y,x.test);if(!1===A.testResult)break b;if(!0!==A.testResult)throw Error(q.nodeErrorMessage(x,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));}A.lastAction=B(y,x.body);A.lastAction===c.breakResult?A.testResult=!1:A.lastAction instanceof c.ReturnResult?A.testResult=
!1:null!==x.update&&B(y,x.update)}while(!0===w.testResult);g=w.lastAction instanceof c.ReturnResult?w.lastAction:c.voidOperation;return g;case "ForInStatement":return F(a,b);case "Identifier":return fa(a,b);case "MemberExpression":return ba(a,b);case "Literal":return b.value;case "ThisExpression":throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));case "CallExpression":return M(a,b);case "UnaryExpression":return Z(a,b);case "BinaryExpression":return V(a,b);case "LogicalExpression":return I(a,
b);case "ConditionalExpression":throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{for(g=[],w=0;w<b.elements.length;w++){var D=B(a,b.elements[w]);if(c.isFunctionParameter(D))throw Error(q.nodeErrorMessage(b,"RUNTIME","FUNCTIONCONTEXTILLEGAL"));D===c.voidOperation?g.push(null):g.push(D)}}catch(Ra){throw Ra;}return g;case "ObjectExpression":g={};for(w=0;w<b.properties.length;w++){var H=B(a,b.properties[w]);if(c.isFunctionParameter(H.value))throw Error("Illegal Argument");
if(!1===c.isString(H.key))throw Error("Illegal Argument");g[H.key.toString()]=H.value===c.voidOperation?null:H.value}var O=new p(g);O.immutable=!1;return O;case "Property":return{key:"Identifier"===b.key.type?b.key.name:B(a,b.key),value:B(a,b.value)};case "Array":throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));default:throw Error(q.nodeErrorMessage(b,"RUNTIME","UNREOGNISED"));}}catch(Ra){throw Ra;}}function F(a,b){var d=B(a,b.right);"VariableDeclaration"===b.left.type&&B(a,b.left);var e=
null,g="VariableDeclaration"===b.left.type?b.left.declarations[0].id.name:b.left.name;null!==a.localScope&&void 0!==a.localScope[g]&&(e=a.localScope[g]);null===e&&void 0!==a.globalScope[g]&&(e=a.globalScope[g]);if(null===e)throw Error(q.nodeErrorMessage(b,"RUNTIME","VARIABLENOTDECLARED"));if(c.isArray(d)||c.isString(d)){for(var d=d.length,k=0;k<d&&(e.value=k,g=B(a,b.body),g!==c.breakResult);k++)if(g instanceof c.ReturnResult)return g;return c.voidOperation}if(c.isImmutableArray(d)){for(k=0;k<d.length()&&
(e.value=k,g=B(a,b.body),g!==c.breakResult);k++)if(g instanceof c.ReturnResult)return g;return c.voidOperation}if(d instanceof p||d instanceof f)for(d=d.keys(),k=0;k<d.length&&(e.value=d[k],g=B(a,b.body),g!==c.breakResult);k++){if(g instanceof c.ReturnResult)return g}else return c.voidOperation}function C(a,b,d,e){switch(b){case "\x3d":return a===c.voidOperation?null:a;case "/\x3d":return c.toNumber(d)/c.toNumber(a);case "*\x3d":return c.toNumber(d)*c.toNumber(a);case "-\x3d":return c.toNumber(d)-
c.toNumber(a);case "+\x3d":return c.isString(d)||c.isString(a)?c.toString(d)+c.toString(a):c.toNumber(d)+c.toNumber(a);case "%\x3d":return c.toNumber(d)%c.toNumber(a);default:throw Error(q.nodeErrorMessage(e,"RUNTIME","OPERATORNOTRECOGNISED"));}}function G(a,b,d,e){b=b.toLowerCase();switch(b){case "hasz":return a=a.hasZ,void 0===a?!1:a;case "hasm":return a=a.hasM,void 0===a?!1:a;case "spatialreference":return b=a.spatialReference._arcadeCacheId,void 0===b&&(d=!0,Object.freeze&&Object.isFrozen(a.spatialReference)&&
(d=!1),d&&(Q++,b=a.spatialReference._arcadeCacheId=Q)),a=new p({wkt:a.spatialReference.wkt,wkid:a.spatialReference.wkid}),void 0!==b&&(a._arcadeCacheId="SPREF"+b.toString()),a}switch(a.type){case "extent":switch(b){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return a=a[b],void 0!==a?a:null;case "type":return"Extent"}break;case "polygon":switch(b){case "rings":return b=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===
b&&(Q++,b=Q,c.isVersion4?a.cache._arcadeCacheId=b:a.setCacheValue("_arcadeCacheId",b)),a=new m(a.rings,a.spatialReference,!0===a.hasZ,!0===a.hasM,b);case "type":return"Polygon"}break;case "point":switch(b){case "x":case "y":case "z":case "m":return void 0!==a[b]?a[b]:null;case "type":return"Point"}break;case "polyline":switch(b){case "paths":return b=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===b&&(Q++,b=Q,c.isVersion4?a.cache._arcadeCacheId=b:a.setCacheValue("_arcadeCacheId",
b)),a=new m(a.paths,a.spatialReference,!0===a.hasZ,!0===a.hasM,b);case "type":return"Polyline"}break;case "multipoint":switch(b){case "points":return b=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===b&&(Q++,b=Q,c.isVersion4?a.cache._arcadeCacheId=b:a.setCacheValue("_arcadeCacheId",b)),a=new h(a.points,a.spatialReference,!0===a.hasZ,!0===a.hasM,b,1);case "type":return"Multipoint"}}throw Error(q.nodeErrorMessage(e,"RUNTIME","PROPERTYNOTFOUND"));}function ba(a,b){try{var d=
B(a,b.object);if(null===d)throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTFOUND"));if(!1===b.computed){if(d instanceof p||d instanceof f)return d.field(b.property.name);if(d instanceof w)return G(d,b.property.name,a,b);throw Error(q.nodeErrorMessage(b,"RUNTIME","INVALIDTYPE"));}var e=B(a,b.property);if(d instanceof p||d instanceof f){if(c.isString(e))return d.field(e)}else if(d instanceof w){if(c.isString(e))return G(d,e,a,b)}else if(c.isArray(d)){if(c.isNumber(e)&&isFinite(e)&&Math.floor(e)===e){0>
e&&(e=d.length+e);if(e>=d.length||0>e)throw Error(q.nodeErrorMessage(b,"RUNTIME","OUTOFBOUNDS"));return d[e]}}else if(c.isString(d)){if(c.isNumber(e)&&isFinite(e)&&Math.floor(e)===e){0>e&&(e=d.length+e);if(e>=d.length||0>e)throw Error(q.nodeErrorMessage(b,"RUNTIME","OUTOFBOUNDS"));return d[e]}}else if(c.isImmutableArray(d)&&c.isNumber(e)&&isFinite(e)&&Math.floor(e)===e){0>e&&(e=d.length()+e);if(e>=d.length()||0>e)throw Error(q.nodeErrorMessage(b,"RUNTIME","OUTOFBOUNDS"));return d.get(e)}throw Error(q.nodeErrorMessage(b,
"RUNTIME","INVALIDTYPE"));}catch(wa){throw wa;}}function Z(a,b){try{var d=B(a,b.argument);if(c.isBoolean(d)){if("!"===b.operator)return!d;if("-"===b.operator)return-1*c.toNumber(d);if("+"===b.operator)return 1*c.toNumber(d);throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===b.operator)return-1*c.toNumber(d);if("+"===b.operator)return 1*c.toNumber(d);throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}catch(na){throw na;}}function V(a,b){try{var d=
[B(a,b.left),B(a,b.right)],e=d[0],f=d[1];switch(b.operator){case "\x3d\x3d":return c.equalityTest(e,f);case "\x3d":return c.equalityTest(e,f);case "!\x3d":return!c.equalityTest(e,f);case "\x3c":return c.greaterThanLessThan(e,f,b.operator);case "\x3e":return c.greaterThanLessThan(e,f,b.operator);case "\x3c\x3d":return c.greaterThanLessThan(e,f,b.operator);case "\x3e\x3d":return c.greaterThanLessThan(e,f,b.operator);case "+":return c.isString(e)||c.isString(f)?c.toString(e)+c.toString(f):c.toNumber(e)+
c.toNumber(f);case "-":return c.toNumber(e)-c.toNumber(f);case "*":return c.toNumber(e)*c.toNumber(f);case "/":return c.toNumber(e)/c.toNumber(f);case "%":return c.toNumber(e)%c.toNumber(f);default:throw Error(q.nodeErrorMessage(b,"RUNTIME","OPERATORNOTRECOGNISED"));}}catch(ra){throw ra;}}function I(a,b){try{if("AssignmentExpression"===b.left.type||"UpdateExpression"===b.left.type)throw Error(q.nodeErrorMessage(b.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===b.right.type||
"UpdateExpression"===b.right.type)throw Error(q.nodeErrorMessage(b.right,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var d=B(a,b.left);if(c.isBoolean(d))switch(b.operator){case "||":if(!0===d)return d;var e=B(a,b.right);if(c.isBoolean(e))return e;throw Error(q.nodeErrorMessage(b,"RUNTIME","ONLYORORAND"));case "\x26\x26":if(!1===d)return d;e=B(a,b.right);if(c.isBoolean(e))return e;throw Error(q.nodeErrorMessage(b,"RUNTIME","ONLYORORAND"));default:throw Error(q.nodeErrorMessage(b,"RUNTIME","ONLYORORAND"));
}else throw Error(q.nodeErrorMessage(b,"RUNTIME","ONLYBOOLEAN"));}catch(wa){throw wa;}}function fa(a,b){var c;try{var d=b.name.toLowerCase();if(null!==a.localScope&&void 0!==a.localScope[d])return c=a.localScope[d],!0!==c.valueset&&(c.value=B(a,c.node),c.valueset=!0),c.value;if(void 0!==a.globalScope[d])return c=a.globalScope[d],!0!==c.valueset&&(c.value=B(a,c.node),c.valueset=!0),c.value;throw Error(q.nodeErrorMessage(b,"RUNTIME","VARIABLENOTFOUND"));}catch(wa){throw wa;}}function M(a,b){try{if("Identifier"!==
b.callee.type)throw Error(q.nodeErrorMessage(b,"RUNTIME","ONLYNODESSUPPORTED"));if(null!==a.localScope&&void 0!==a.localScope[b.callee.name.toLowerCase()]){var d=a.localScope[b.callee.name.toLowerCase()];if(d.value instanceof c.NativeFunction)return d.value.fn(a,b);if(d.value instanceof l)return P(a,b,d.value.definition);throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTAFUNCTION"));}if(void 0!==a.globalScope[b.callee.name.toLowerCase()]){d=a.globalScope[b.callee.name.toLowerCase()];if(d.value instanceof
c.NativeFunction)return d.value.fn(a,b);if(d.value instanceof l)return P(a,b,d.value.definition);throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTAFUNCTION"));}throw Error(q.nodeErrorMessage(b,"RUNTIME","NOTFOUND"));}catch(na){throw na;}}function W(a){return null==a?"":c.isArray(a)||c.isImmutableArray(a)?"Array":c.isDate(a)?"Date":c.isString(a)?"String":c.isBoolean(a)?"Boolean":c.isNumber(a)?"Number":a instanceof p?"Dictionary":a instanceof f?"Feature":a instanceof d?"Point":a instanceof n?"Polygon":
a instanceof x?"Polyline":a instanceof t?"Multipoint":a instanceof v?"Extent":c.isFunctionParameter(a)?"Function":a===c.voidOperation?"":"number"===typeof a&&isNaN(a)?"Number":"Unrecognised Type"}function N(a,b,d,e){try{var f=B(a,b.arguments[d]);if(c.equalityTest(f,e))return B(a,b.arguments[d+1]);var g=b.arguments.length-d;return 1===g?B(a,b.arguments[d]):2===g?null:3===g?B(a,b.arguments[d+2]):N(a,b,d+2,e)}catch(za){throw za;}}function H(a,b,d,e){try{if(!0===e)return B(a,b.arguments[d+1]);if(3===
b.arguments.length-d)return B(a,b.arguments[d+2]);var f=B(a,b.arguments[d+2]);if(!1===c.isBoolean(f))throw Error("WHEN needs boolean test conditions");return H(a,b,d+2,f)}catch(ra){throw ra;}}function O(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];var e=O(a.slice(0,d),b);a=O(a.slice(d,c),b);for(c=[];0<e.length||0<a.length;)0<e.length&&0<a.length?(d=b(e[0],a[0]),isNaN(d)&&(d=0),0>=d?(c.push(e[0]),e=e.slice(1)):(c.push(a[0]),a=a.slice(1))):0<e.length?(c.push(e[0]),e=
e.slice(1)):0<a.length&&(c.push(a[0]),a=a.slice(1));return c}function J(a,b,d){try{var e=a.body;if(d.length!==a.params.length)throw Error("Invalid Parameter calls to function.");for(var f=0;f<d.length;f++)b.localScope[a.params[f].name.toLowerCase()]={value:d[f],valueset:!0,node:null};var g=B(b,e);if(g instanceof c.ReturnResult)return g.value;if(g===c.breakResult)throw Error("Cannot Break from a Function");if(g===c.continueResult)throw Error("Cannot Continue from a Function");return g instanceof c.ImplicitResult?
g.value:g}catch(za){throw za;}}function P(a,b,c){return D(a,b,function(b,d,e){b={spatialReference:a.spatialReference,applicationCache:void 0===a.applicationCache?null:a.applicationCache,globalScope:a.globalScope,depthCounter:a.depthCounter+1,console:a.console,localScope:{}};if(64<b.depthCounter)throw Error("Exceeded maximum function depth");return J(c,b,e)})}function S(a){return function(){var b={applicationCache:void 0===a.context.applicationCache?null:a.context.applicationCache,spatialReference:a.context.spatialReference,
console:a.context.console,localScope:{},depthCounter:a.context.depthCounter+1,globalScope:a.context.globalScope};if(64<b.depthCounter)throw Error("Exceeded maximum function depth");return J(a.definition,b,arguments)}}function ca(a){console.log(a)}Object.defineProperty(g,"__esModule",{value:!0});var Q=0,U={};e.registerFunctions(U,D);z.registerFunctions(U,D);r.registerFunctions(U,D);a.registerFunctions(U,D);u.registerFunctions(U,D);k.registerFunctions(U,D);U["typeof"]=function(a,b){return D(a,b,function(a,
b,d){c.pcCheck(d,1,1);a=W(d[0]);if("Unrecognised Type"===a)throw Error("Unrecognised Type");return a})};U.iif=function(a,b){try{c.pcCheck(null===b.arguments?[]:b.arguments,3,3);var d=B(a,b.arguments[0]);if(!1===c.isBoolean(d))throw Error("IF Function must have a boolean test condition");return!0===d?B(a,b.arguments[1]):B(a,b.arguments[2])}catch(na){throw na;}};U.decode=function(a,b){try{if(2>b.arguments.length)throw Error("Missing Parameters");if(2===b.arguments.length)return B(a,b.arguments[1]);
if(0===(b.arguments.length-1)%2)throw Error("Must have a default value result.");var c=B(a,b.arguments[0]);return N(a,b,1,c)}catch(na){throw na;}};U.when=function(a,b){try{if(3>b.arguments.length)throw Error("Missing Parameters");if(0===b.arguments.length%2)throw Error("Must have a default value result.");var d=B(a,b.arguments[0]);if(!1===c.isBoolean(d))throw Error("WHEN needs boolean test conditions");return H(a,b,0,d)}catch(na){throw na;}};U.top=function(a,b){return D(a,b,function(a,b,d){c.pcCheck(d,
2,2);if(c.isArray(d[0]))return c.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));if(c.isImmutableArray(d[0]))return c.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};U.first=function(a,b){return D(a,b,function(a,b,d){c.pcCheck(d,1,1);return c.isArray(d[0])?0===d[0].length?null:d[0][0]:c.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};U.sort=function(a,b){return D(a,b,function(a,
b,d){c.pcCheck(d,1,2);a=d[0];c.isImmutableArray(a)&&(a=a.toArray());if(!1===c.isArray(a))throw Error("Illegal Argument");if(1<d.length){if(!1===c.isFunctionParameter(d[1]))throw Error("Illegal Argument");var e=S(d[1]);a=O(a,function(a,b){return e(a,b)})}else{if(0===a.length)return[];d={};for(b=0;b<a.length;b++){var f=W(a[b]);""!==f&&(d[f]=!0)}if(!0===d.Array||!0===d.Dictionary||!0===d.Feature||!0===d.Point||!0===d.Polygon||!0===d.Polyline||!0===d.Multipoint||!0===d.Extent||!0===d.Function)return a.slice(0);
b=0;var f="",g;for(g in d)b++,f=g;a=1<b||"String"===f?O(a,function(a,b){if(null===a||void 0===a||a===c.voidOperation)return null===b||void 0===b||b===c.voidOperation?0:1;if(null===b||void 0===b||b===c.voidOperation)return-1;a=c.toString(a);b=c.toString(b);return a<b?-1:a===b?0:1}):"Number"===f?O(a,function(a,b){return a-b}):"Boolean"===f?O(a,function(a,b){return a===b?0:b?-1:1}):"Date"===f?O(a,function(a,b){return b-a}):a.slice(0)}return a})};for(var Y in U)U[Y]={value:new c.NativeFunction(U[Y]),
valueset:!0,node:null};var ga=function(){};ga.prototype=U;ga.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null};ga.prototype.pi={value:Math.PI,valueset:!0,node:null};g.functionHelper={fixSpatialReference:c.fixSpatialReference,parseArguments:A,standardFunction:D};g.extend=function(a){for(var b={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:D,evaluateIdentifier:fa,arcadeCustomFunctionHandler:S},d=0;d<a.length;d++)a[d].registerFunctions(b);for(var e in b.functions)U[e]=
{value:new c.NativeFunction(b.functions[e]),valueset:!0,node:null},ga.prototype[e]=U[e];for(d=0;d<b.signatures.length;d++)q.addFunctionDeclaration(b.signatures[d],"f")};g.executeScript=function(a,b,d){d||(d=new y(102100));var e=b.vars,g=b.customfunctions,k=new ga;e||(e={});g||(g={});var h=new p({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});h.immutable=!1;k.textformatting={value:h,valueset:!0,node:null};for(var n in g)k[n]={value:new c.NativeFunction(g[n]),
native:!0,valueset:!0,node:null};for(n in e)k[n]=e[n]&&"esri.Graphic"===e[n].declaredClass?{value:f.createFromGraphic(e[n]),valueset:!0,node:null}:{value:e[n],valueset:!0,node:null};a=B({spatialReference:d,globalScope:k,localScope:null,console:b.console?b.console:ca,depthCounter:1,applicationCache:void 0===b.applicationCache?null:b.applicationCache},a.body[0].body);a instanceof c.ReturnResult&&(a=a.value);a instanceof c.ImplicitResult&&(a=a.value);a===c.voidOperation&&(a=null);if(a===c.breakResult)throw Error("Cannot return BREAK");
if(a===c.continueResult)throw Error("Cannot return CONTINUE");if(a instanceof l)throw Error("Cannot return FUNCTION");if(a instanceof c.NativeFunction)throw Error("Cannot return FUNCTION");return a};g.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return q.findFieldLiterals(a,b)};g.validateScript=function(a,b){return q.validateScript(a,b,"simple")};g.referencesMember=function(a,b){return q.referencesMember(a,b)};g.referencesFunction=function(a,b){return q.referencesFunction(a,b)};g.findFunctionCalls=
function(a){return q.findFunctionCalls(a,!1)}})},"esri/arcade/parser":function(){define(["require","exports","./treeAnalysis","./lib/esprima"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.parseScript=function(b){b=f.parse("function _() { "+b+"\n}");if(null===b.body||void 0===b.body)throw Error("No formula provided.");if(0===b.body.length)throw Error("No formula provided.");if(0===b.body.length)throw Error("No formula provided.");if("BlockStatement"!==b.body[0].body.type)throw Error("Invalid formula content.");
var g=p.validateLanguage(b);if(""!==g)throw Error(g);return b};g.scriptCheck=function(b,g,h,c){var l=[];try{var e=f.parse("function _() { "+b+"\n}",{tolerant:!0,loc:!0}),a=e.errors;if(0<a.length)for(var k=0;k<a.length;k++)l.push({line:a[k].lineNumber,character:a[k].column,reason:a[k].description});var m=p.checkScript(e,g,h,c);for(g=0;g<m.length;g++)l.push(m[g])}catch(u){try{"Unexpected token }"===u.description?(u.index=("function _() { "+b+"\n}").length-1,l.push({line:u.lineNumber,character:u.column,
reason:"Unexpected end of script"})):l.push({line:u.lineNumber,character:u.column,reason:u.description})}catch(z){}}return l};g.extractFieldLiterals=function(b,f){void 0===f&&(f=!1);return p.findFieldLiterals(b,f)};g.validateScript=function(b,f,g){void 0===g&&(g="full");return p.validateScript(b,f,g)};g.referencesMember=function(b,f){return p.referencesMember(b,f)};g.referencesFunction=function(b,f){return p.referencesFunction(b,f)}})},"esri/arcade/lib/esprima":function(){(function(b,g){"function"===
typeof define&&define.amd?define(["exports"],g):"undefined"!==typeof exports?g(exports):g(b.esprima={})})(this,function(b){function g(a,b){if(!a)throw Error("ASSERT: "+b);}function p(a){return 48<=a&&57>=a}function f(a){return 0<="0123456789abcdefABCDEF".indexOf(a)}function l(a){return 0<="01234567".indexOf(a)}function m(a){return 10===a||13===a||8232===a||8233===a}function h(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||92===a||128<=a&&db.NonAsciiIdentifierStart.test(String.fromCharCode(a))}
function c(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a||92===a||128<=a&&db.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function q(a){a=a.toLowerCase();switch(a.length){case 2:return"if"===a||"in"===a;case 3:return"var"===a||"for"===a;case 4:return"else"===a;case 5:return"break"===a;case 6:return"return"===a;case 8:return"function"===a.toLowerCase()||"continue"===a;default:return!1}}function e(a,b,c,d,e){g("number"===typeof c,"Comment must have valid position");aa.lastCommentStart>=
c||(aa.lastCommentStart=c,a={type:a,value:b},L.range&&(a.range=[c,d]),L.loc&&(a.loc=e),L.comments.push(a),L.attachComment&&(L.leadingComments.push(a),L.trailingComments.push(a)))}function a(a){var b,c,d;b=E-a;for(c={start:{line:da,column:E-ia-a}};E<oa;)if(d=K.charCodeAt(E),++E,m(d)){L.comments&&(a=K.slice(b+a,E-1),c.end={line:da,column:E-ia-1},e("Line",a,b,E-1,c));13===d&&10===K.charCodeAt(E)&&++E;++da;ia=E;return}L.comments&&(a=K.slice(b+a,E),c.end={line:da,column:E-ia},e("Line",a,b,E,c))}function k(){var b,
c;for(c=0===E;E<oa;)if(b=K.charCodeAt(E),32===b||9===b||11===b||12===b||160===b||5760<=b&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(b))++E;else if(m(b))++E,13===b&&10===K.charCodeAt(E)&&++E,++da,ia=E,c=!0;else if(47===b)if(b=K.charCodeAt(E+1),47===b)++E,++E,a(2),c=!0;else if(42===b){++E;++E;a:{var d=b=void 0,f=void 0,f=void 0;L.comments&&(b=E-2,d={start:{line:da,column:E-ia-2}});for(;E<oa;)if(f=K.charCodeAt(E),m(f))13===f&&10===K.charCodeAt(E+
1)&&++E,++da,++E,ia=E,E>=oa&&M();else{if(42===f&&47===K.charCodeAt(E+1)){++E;++E;L.comments&&(f=K.slice(b+2,E-2),d.end={line:da,column:E-ia},e("Block",f,b,E,d));break a}++E}M()}}else break;else if(c&&45===b)if(45===K.charCodeAt(E+1)&&62===K.charCodeAt(E+2))E+=3,a(3);else break;else if(60===b)if("!--"===K.slice(E+1,E+4))++E,++E,++E,++E,a(4);else break;else break}function r(a){var b,c,d=0;b="u"===a?4:2;for(a=0;a<b;++a)if(E<oa&&f(K[E]))c=K[E++],d=16*d+"0123456789abcdef".indexOf(c.toLowerCase());else return"";
return String.fromCharCode(d)}function u(){var a,b;a=K.charCodeAt(E++);b=String.fromCharCode(a);92===a&&(117!==K.charCodeAt(E)&&M(),++E,(a=r("u"))&&"\\"!==a&&h(a.charCodeAt(0))||M(),b=a);for(;E<oa;){a=K.charCodeAt(E);if(!c(a))break;++E;b+=String.fromCharCode(a);92===a&&(b=b.substr(0,b.length-1),117!==K.charCodeAt(E)&&M(),++E,(a=r("u"))&&"\\"!==a&&c(a.charCodeAt(0))||M(),b+=a)}return b}function z(){var a=E,b=K.charCodeAt(E),c,d=K[E];switch(b){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++E,
L.tokenize&&(40===b?L.openParenToken=L.tokens.length:123===b&&(L.openCurlyToken=L.tokens.length)),{type:R.Punctuator,value:String.fromCharCode(b),lineNumber:da,lineStart:ia,start:a,end:E};default:if(c=K.charCodeAt(E+1),61===c)switch(b){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return E+=2,{type:R.Punctuator,value:String.fromCharCode(b)+String.fromCharCode(c),lineNumber:da,lineStart:ia,start:a,end:E};case 33:case 61:return E+=2,61===K.charCodeAt(E)&&++E,{type:R.Punctuator,
value:K.slice(a,E),lineNumber:da,lineStart:ia,start:a,end:E}}}b=K.substr(E,4);if("\x3e\x3e\x3e\x3d"===b)return E+=4,{type:R.Punctuator,value:b,lineNumber:da,lineStart:ia,start:a,end:E};b=b.substr(0,3);if("\x3e\x3e\x3e"===b||"\x3c\x3c\x3d"===b||"\x3e\x3e\x3d"===b)return E+=3,{type:R.Punctuator,value:b,lineNumber:da,lineStart:ia,start:a,end:E};b=b.substr(0,2);if(d===b[1]&&0<="+-\x3c\x3e\x26|".indexOf(d)||"\x3d\x3e"===b)return E+=2,{type:R.Punctuator,value:b,lineNumber:da,lineStart:ia,start:a,end:E};
if(0<="\x3c\x3e\x3d!+-*%\x26|^/".indexOf(d))return++E,{type:R.Punctuator,value:d,lineNumber:da,lineStart:ia,start:a,end:E};M()}function v(){var a,b,c;c=K[E];g(p(c.charCodeAt(0))||"."===c,"Numeric literal must start with a decimal digit or a decimal point");b=E;a="";if("."!==c){a=K[E++];c=K[E];if("0"===a){if("x"===c||"X"===c){++E;for(a="";E<oa&&f(K[E]);)a+=K[E++];0===a.length&&M();h(K.charCodeAt(E))&&M();return{type:R.NumericLiteral,value:parseInt("0x"+a,16),lineNumber:da,lineStart:ia,start:b,end:E}}if("b"===
c||"B"===c){++E;for(c="";E<oa;){a=K[E];if("0"!==a&&"1"!==a)break;c+=K[E++]}0===c.length&&M();E<oa&&(a=K.charCodeAt(E),(h(a)||p(a))&&M());return{type:R.NumericLiteral,value:parseInt(c,2),lineNumber:da,lineStart:ia,start:b,end:E}}if("o"===c||"O"===c){l(c)?(c=!0,a="0"+K[E++]):(c=!1,++E,a="");for(;E<oa&&l(K[E]);)a+=K[E++];c||0!==a.length||M();(h(K.charCodeAt(E))||p(K.charCodeAt(E)))&&M();return{type:R.NumericLiteral,value:parseInt(a,8),octal:c,lineNumber:da,lineStart:ia,start:b,end:E}}}for(;p(K.charCodeAt(E));)a+=
K[E++];c=K[E]}if("."===c){for(a+=K[E++];p(K.charCodeAt(E));)a+=K[E++];c=K[E]}if("e"===c||"E"===c){a+=K[E++];c=K[E];if("+"===c||"-"===c)a+=K[E++];if(p(K.charCodeAt(E)))for(;p(K.charCodeAt(E));)a+=K[E++];else M()}h(K.charCodeAt(E))&&M();return{type:R.NumericLiteral,value:parseFloat(a),lineNumber:da,lineStart:ia,start:b,end:E}}function w(){X=null;k();V("Regular Expression language structures not supported")}function t(){k();w()}function d(){var a;a=L.tokens[L.tokens.length-1];if(!a)return t();if("Punctuator"===
a.type){if("]"===a.value)return z();if(")"===a.value)return a=L.tokens[L.openParenToken-1],!a||"Keyword"!==a.type||"if"!==a.value.toLowerCase()&&"while"!==a.value.toLowerCase()&&"for"!==a.value.toLowerCase()&&"with"!==a.value.toLowerCase()?z():t();if("}"===a.value){if(L.tokens[L.openCurlyToken-3]&&"Keyword"===L.tokens[L.openCurlyToken-3].type){if(a=L.tokens[L.openCurlyToken-4],!a)return z()}else if(L.tokens[L.openCurlyToken-4]&&"Keyword"===L.tokens[L.openCurlyToken-4].type){if(a=L.tokens[L.openCurlyToken-
5],!a)return t()}else return z();if(0<=va.indexOf(a.value))return z()}return t()}return"Keyword"===a.type&&"this"!==a.value?t():z()}function n(){var a;k();if(E>=oa)return{type:R.EOF,lineNumber:da,lineStart:ia,start:E,end:E};a=K.charCodeAt(E);if(h(a)){var b;a=E;if(92===K.charCodeAt(E))b=u();else a:{var e;for(b=E++;E<oa;){e=K.charCodeAt(E);if(92===e){E=b;b=u();break a}if(c(e))++E;else break}b=K.slice(b,E)}return{type:1===b.length?R.Identifier:q(b)?R.Keyword:"null"===b.toLowerCase()?R.NullLiteral:"true"===
b.toLowerCase()||"false"===b.toLowerCase()?R.BooleanLiteral:R.Identifier,value:b,lineNumber:da,lineStart:ia,start:a,end:E}}if(40===a||41===a||59===a)return z();if(39===a||34===a){var n="",t,y,w;e=!1;var x,C;x=da;C=ia;a=K[E];g("'"===a||'"'===a,"String literal must starts with a quote");b=E;for(++E;E<oa;)if(t=K[E++],t===a){a="";break}else if("\\"===t)if((t=K[E++])&&m(t.charCodeAt(0)))++da,"\r"===t&&"\n"===K[E]&&++E,ia=E;else switch(t){case "u":case "x":if("{"===K[E]){++E;y=t=void 0;t=K[E];y=0;for("}"===
t&&M();E<oa;){t=K[E++];if(!f(t))break;y=16*y+"0123456789abcdef".indexOf(t.toLowerCase())}(1114111<y||"}"!==t)&&M();t=65535>=y?String.fromCharCode(y):String.fromCharCode((y-65536>>10)+55296,(y-65536&1023)+56320);n+=t}else w=E,(y=r(t))?n+=y:(E=w,n+=t);break;case "n":n+="\n";break;case "r":n+="\r";break;case "t":n+="\t";break;case "b":n+="\b";break;case "f":n+="\f";break;case "v":n+="\x0B";break;default:l(t)?(y="01234567".indexOf(t),0!==y&&(e=!0),E<oa&&l(K[E])&&(e=!0,y=8*y+"01234567".indexOf(K[E++]),
0<="0123".indexOf(t)&&E<oa&&l(K[E])&&(y=8*y+"01234567".indexOf(K[E++]))),n+=String.fromCharCode(y)):n+=t}else if(m(t.charCodeAt(0)))break;else n+=t;""!==a&&M();return{type:R.StringLiteral,value:n,octal:e,startLineNumber:x,startLineStart:C,lineNumber:da,lineStart:ia,start:b,end:E}}return 46===a?p(K.charCodeAt(E+1))?v():z():p(a)?v():L.tokenize&&47===a?d():z()}function x(){var a,b,c;k();a={start:{line:da,column:E-ia}};b=n();a.end={line:da,column:E-ia};b.type!==R.EOF&&(c=K.slice(b.start,b.end),a={type:Ga[b.type],
value:c,range:[b.start,b.end],loc:a},b.regex&&(a.regex={pattern:b.regex.pattern,flags:b.regex.flags}),L.tokens.push(a));return b}function y(){var a;a=X;E=a.end;da=a.lineNumber;ia=a.lineStart;X="undefined"!==typeof L.tokens?x():n();E=a.end;da=a.lineNumber;ia=a.lineStart;return a}function A(){var a,b,c;a=E;b=da;c=ia;X="undefined"!==typeof L.tokens?x():n();E=a;da=b;ia=c}function D(){this.line=da;this.column=E-ia}function B(){this.start=new D;this.end=null}function F(a){this.start=a.type===R.StringLiteral?
{line:a.startLineNumber,column:a.start-a.startLineStart}:{line:a.lineNumber,column:a.start-a.lineStart};this.end=null}function C(){E=X.start;X.type===R.StringLiteral?(da=X.startLineNumber,ia=X.startLineStart):(da=X.lineNumber,ia=X.lineStart);L.range&&(this.range=[E,0]);L.loc&&(this.loc=new B)}function G(a){L.range&&(this.range=[a.start,0]);L.loc&&(this.loc=new F(a))}function ba(){var a,b,c,d;a=E;b=da;c=ia;k();d=da!==b;E=a;da=b;ia=c;return d}function Z(a,b,c){var d=Error("Line "+a+": "+c);d.index=
b;d.lineNumber=a;d.column=b-ia+1;d.description=c;return d}function V(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){g(c<b.length,"Message reference must be in range");return b[c]});throw Z(da,E,c);}function I(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){g(c<b.length,"Message reference must be in range");return b[c]});c=Z(da,E,c);if(L.errors)L.errors.push(c);else throw c;}function fa(a,b){var c=la.UnexpectedToken;a&&
(c=b?b:a.type===R.EOF?la.UnexpectedEOS:a.type===R.Identifier?la.UnexpectedIdentifier:a.type===R.NumericLiteral?la.UnexpectedNumber:a.type===R.StringLiteral?la.UnexpectedString:la.UnexpectedToken);c=c.replace("%0",a?a.value:"ILLEGAL");return a&&"number"===typeof a.lineNumber?Z(a.lineNumber,a.start,c):Z(da,E,c)}function M(a,b){throw fa(a,b);}function W(a,b){a=fa(a,b);if(L.errors)L.errors.push(a);else throw a;}function N(a){var b=y();b.type===R.Punctuator&&b.value===a||M(b)}function H(){var a;L.errors?
(a=X,a.type===R.Punctuator&&","===a.value?y():a.type===R.Punctuator&&";"===a.value?(y(),W(a)):W(a,la.UnexpectedToken)):N(",")}function O(a){var b=y();b.type===R.Keyword&&b.value.toLowerCase()===a.toLowerCase()||M(b)}function J(a){return X.type===R.Punctuator&&X.value===a}function P(a){return X.type===R.Keyword&&X.value.toLowerCase()===a.toLowerCase()}function S(){var a;59===K.charCodeAt(E)||J(";")?y():(a=da,k(),da===a&&(X.type===R.EOF||J("}")||M(X)))}function ca(a){return a.type===ea.Identifier||
a.type===ea.MemberExpression}function Q(a,b){var c,d=new C;b=ma;c=La();ma=b;return d.finishFunctionExpression(null,a,[],c)}function U(){var a,b;a=ma;ma=!0;b=Fa();b=Q(b.params);ma=a;return b}function Y(){var a,b=new C;a=y();return a.type===R.StringLiteral||a.type===R.NumericLiteral?(ma&&a.octal&&W(a,la.StrictOctalLiteral),b.finishLiteral(a)):b.finishIdentifier(a.value)}function ga(){var a,b,c,d=new C;a=X;if(a.type===R.Identifier)return b=Y(),"get"!==a.value||J(":")||J("(")?"set"!==a.value||J(":")||
J("(")?J(":")?(y(),a=xa(),d.finishProperty("init",b,a,!1,!1)):J("(")?(a=U(),d.finishProperty("init",b,a,!0,!1)):d.finishProperty("init",b,b,!1,!0):(b=Y(),N("("),a=X,a.type!==R.Identifier?(N(")"),W(a),a=Q([])):(c=[Ia()],N(")"),a=Q(c,a)),d.finishProperty("set",b,a,!1,!1)):(b=Y(),N("("),N(")"),a=Q([]),d.finishProperty("get",b,a,!1,!1));if(a.type===R.EOF||a.type===R.Punctuator)M(a);else{b=Y();if(J(":"))return y(),a=xa(),d.finishProperty("init",b,a,!1,!1);if(J("("))return a=U(),d.finishProperty("init",
b,a,!0,!1);M(y())}}function ka(a){var b=[],c,d,e={},f=String,g=new C;for(!0!==a&&N("{");!J("}");)a=ga(),c=a.key.type===ea.Identifier?a.key.name:f(a.key.value),d="init"===a.kind?Na.Data:"get"===a.kind?Na.Get:Na.Set,c="$"+c,Object.prototype.hasOwnProperty.call(e,c)?(e[c]===Na.Data?ma&&d===Na.Data?I(la.StrictDuplicateProperty):d!==Na.Data&&I(la.AccessorDataProperty):d===Na.Data?I(la.AccessorDataProperty):e[c]&d&&I(la.AccessorGetSet),e[c]|=d):e[c]=d,b.push(a),J("}")||H();N("}");return g.finishObjectExpression(b)}
function ha(){var a,b,c,d;if(J("("))return N("("),J(")")?(y(),b=Qa.ArrowParameterPlaceHolder):(++aa.parenthesisCount,b=Aa(),N(")")),b;if(J("[")){b=[];var e=new C;for(N("[");!J("]");)J(",")?(y(),b.push(null)):(b.push(xa()),J("]")||N(","));y();return e.finishArrayExpression(b)}if(J("{"))return ka();a=X.type;d=new C;if(a===R.Identifier)c=d.finishIdentifier(y().value);else if(a===R.StringLiteral||a===R.NumericLiteral)ma&&X.octal&&W(X,la.StrictOctalLiteral),c=d.finishLiteral(y());else if(a===R.Keyword){if(P("function")){d=
null;var f;c=[];var g=[],k,h=new C;O("function");J("(")||(d=Ia());f=Fa(b);c=f.params;g=f.defaults;a=f.stricted;b=f.firstRestricted;f.message&&(e=f.message);k=ma;f=La();ma&&b&&M(b,e);ma&&a&&W(a,e);ma=k;return h.finishFunctionExpression(d,c,g,f)}P("this")?(y(),c=d.finishThisExpression()):M(y())}else a===R.BooleanLiteral?(b=y(),b.value="true"===b.value.toLowerCase(),c=d.finishLiteral(b)):a===R.NullLiteral?(b=y(),b.value=null,c=d.finishLiteral(b)):J("/")||J("/\x3d")?(c="undefined"!==typeof L.tokens?d.finishLiteral(t()):
d.finishLiteral(w()),A()):M(y());return c}function qa(){var a=[];N("(");if(!J(")"))for(;E<oa;){a.push(xa());if(J(")"))break;H()}N(")");return a}function na(){N(".");var a,b=new C;a=y();a.type===R.Identifier||a.type===R.Keyword||a.type===R.BooleanLiteral||a.type===R.NullLiteral||M(a);return b.finishIdentifier(a.value)}function wa(){var a;N("[");a=Aa();N("]");return a}function ra(){var a,b,c=new C;O("new");var d;g(aa.allowIn,"callee of new expression always allow in keyword.");d=X;for(a=P("new")?ra():
ha();;)if(J("["))b=wa(),a=(new G(d)).finishMemberExpression("[",a,b);else if(J("."))b=na(),a=(new G(d)).finishMemberExpression(".",a,b);else break;b=J("(")?qa():[];return c.finishNewExpression(a,b)}function za(){var a,b,c=X,d,e=aa.allowIn;b=X;aa.allowIn=!0;for(a=P("new")?ra():ha();;)if(J("."))d=na(),a=(new G(b)).finishMemberExpression(".",a,d);else if(J("("))d=qa(),a=(new G(b)).finishCallExpression(a,d);else if(J("["))d=wa(),a=(new G(b)).finishMemberExpression("[",a,d);else break;aa.allowIn=e;X.type!==
R.Punctuator||!J("++")&&!J("--")||ba()||(ca(a)||I(la.InvalidLHSInAssignment),b=y(),a=(new G(c)).finishPostfixExpression(b.value,a));return a}function sa(){var a,b,c;X.type!==R.Punctuator&&X.type!==R.Keyword?b=za():J("++")||J("--")?(c=X,a=y(),b=sa(),ca(b)||I(la.InvalidLHSInAssignment),b=(new G(c)).finishUnaryExpression(a.value,b)):J("+")||J("-")||J("~")||J("!")?(c=X,a=y(),b=sa(),b=(new G(c)).finishUnaryExpression(a.value,b)):P("delete")||P("void")||P("typeof")?(c=X,a=y(),b=sa(),b=(new G(c)).finishUnaryExpression(a.value,
b),ma&&"delete"===b.operator&&b.argument.type===ea.Identifier&&I(la.StrictDelete)):b=za();return b}function ja(a,b){var c=0;if(a.type!==R.Punctuator&&a.type!==R.Keyword)return 0;switch(a.value){case "||":c=1;break;case "\x26\x26":c=2;break;case "|":c=3;break;case "^":c=4;break;case "\x26":c=5;break;case "\x3d\x3d":case "!\x3d":case "\x3d\x3d\x3d":case "!\x3d\x3d":c=6;break;case "\x3c":case "\x3e":case "\x3c\x3d":case "\x3e\x3d":case "instanceof":c=7;break;case "in":c=b?7:0;break;case "\x3c\x3c":case "\x3e\x3e":case "\x3e\x3e\x3e":c=
8;break;case "+":case "-":c=9;break;case "*":case "/":case "%":c=11}return c}function Da(){var a,b,c,d,e,f;a=X;b=sa();if(b===Qa.ArrowParameterPlaceHolder)return b;c=X;d=ja(c,aa.allowIn);if(0===d)return b;c.prec=d;y();a=[a,X];f=sa();for(e=[b,c,f];0<(d=ja(X,aa.allowIn));){for(;2<e.length&&d<=e[e.length-2].prec;)f=e.pop(),c=e.pop().value,b=e.pop(),a.pop(),b=(new G(a[a.length-1])).finishBinaryExpression(c,b,f),e.push(b);c=y();c.prec=d;e.push(c);a.push(X);b=sa();e.push(b)}d=e.length-1;b=e[d];for(a.pop();1<
d;)b=(new G(a.pop())).finishBinaryExpression(e[d-1].value,e[d-2],b),d-=2;return b}function Ma(a){var b,c,d,e,f,g,k;e=[];f=[];g=0;k={paramSet:{}};b=0;for(c=a.length;b<c;b+=1)if(d=a[b],d.type===ea.Identifier)e.push(d),f.push(null),Ha(k,d,d.name);else if(d.type===ea.AssignmentExpression)e.push(d.left),f.push(d.right),++g,Ha(k,d.left,d.left.name);else return null;k.message===la.StrictParamDupe&&(a=ma?k.stricted:k.firstRestricted,M(a,k.message));0===g&&(f=[]);return{params:e,defaults:f,rest:null,stricted:k.stricted,
firstRestricted:k.firstRestricted,message:k.message}}function xa(){var a,b,c,d,e;a=aa.parenthesisCount;b=e=X;var f,g;g=X;c=Da();c!==Qa.ArrowParameterPlaceHolder&&J("?")&&(y(),f=aa.allowIn,aa.allowIn=!0,b=xa(),aa.allowIn=f,N(":"),f=xa(),c=(new G(g)).finishConditionalExpression(c,b,f));if(c===Qa.ArrowParameterPlaceHolder||J("\x3d\x3e"))if(aa.parenthesisCount===a||aa.parenthesisCount===a+1)if(c.type===ea.Identifier?d=Ma([c]):c.type===ea.AssignmentExpression?d=Ma([c]):c.type===ea.SequenceExpression?d=
Ma(c.expressions):c===Qa.ArrowParameterPlaceHolder&&(d=Ma([])),d)return a=d,e=new G(e),N("\x3d\x3e"),d=ma,c=J("{")?La():xa(),ma&&a.firstRestricted&&M(a.firstRestricted,a.message),ma&&a.stricted&&W(a.stricted,a.message),ma=d,e.finishArrowFunctionExpression(a.params,a.defaults,c,c.type!==ea.BlockStatement);X.type!==R.Punctuator?a=!1:(a=X.value,a="\x3d"===a||"*\x3d"===a||"/\x3d"===a||"%\x3d"===a||"+\x3d"===a||"-\x3d"===a||"\x3c\x3c\x3d"===a||"\x3e\x3e\x3d"===a||"\x3e\x3e\x3e\x3d"===a||"\x26\x3d"===a||
"^\x3d"===a||"|\x3d"===a);a&&(ca(c)||I(la.InvalidLHSInAssignment),b=y(),a=xa(),c=(new G(e)).finishAssignmentExpression(b.value,c,a));return c}function Aa(){var a,b=X;a=xa();if(J(",")){for(a=[a];E<oa&&J(",");)y(),a.push(xa());a=(new G(b)).finishSequenceExpression(a)}return a}function Ia(){var a,b=new C;a=y();a.type!==R.Identifier&&M(a);return b.finishIdentifier(a.value)}function hb(a){var b=null,c,d=new C;c=Ia();"const"===a?(N("\x3d"),b=xa()):J("\x3d")&&(y(),b=xa());return d.finishVariableDeclarator(c,
b)}function Va(a){var b=[];do{b.push(hb(a));if(!J(","))break;y()}while(E<oa);return b}function Ka(a){var b=X.type,c,d;b===R.EOF&&M(X);if(b===R.Punctuator&&"{"===X.value){if(a){N("{");var e=X;a=E;c=da;d=ia;y();b=J(":");X=e;E=a;da=c;ia=d;if((X.type===R.Identifier||X.type===R.StringLiteral)&&b)return ka(!0);a=new C;for(c=[];E<oa&&!J("}");){d=Ja();if("undefined"===typeof d)break;c.push(d)}N("}");return a.finishBlockStatement(c)}return ka()}a=new C;if(b===R.Punctuator)switch(X.value){case ";":return a=
new C,N(";"),a.finishEmptyStatement();case "(":return c=Aa(),S(),a.finishExpressionStatement(c)}else if(b===R.Keyword)switch(X.value.toLowerCase()){case "break":return c=null,O("break"),59===K.charCodeAt(E)?(y(),aa.inIteration||aa.inSwitch||V(la.IllegalBreak),a=a.finishBreakStatement(null)):ba()?(aa.inIteration||aa.inSwitch||V(la.IllegalBreak),a=a.finishBreakStatement(null)):(X.type===R.Identifier&&(c=Ia(),d="$"+c.name,Object.prototype.hasOwnProperty.call(aa.labelSet,d)||V(la.UnknownLabel,c.name)),
S(),null!==c||aa.inIteration||aa.inSwitch||V(la.IllegalBreak),a=a.finishBreakStatement(c)),a;case "continue":return c=null,O("continue"),59===K.charCodeAt(E)?(y(),aa.inIteration||V(la.IllegalContinue),a=a.finishContinueStatement(null)):ba()?(aa.inIteration||V(la.IllegalContinue),a=a.finishContinueStatement(null)):(X.type===R.Identifier&&(c=Ia(),d="$"+c.name,Object.prototype.hasOwnProperty.call(aa.labelSet,d)||V(la.UnknownLabel,c.name)),S(),null!==c||aa.inIteration||V(la.IllegalContinue),a=a.finishContinueStatement(c)),
a;case "for":var f,g,k;g=aa.allowIn;f=b=e=null;O("for");N("(");if(J(";"))y();else{if(P("var")){aa.allowIn=!1;var l=new C;f=y();k=Va();f=l.finishVariableDeclaration(k,f.value);aa.allowIn=g;1===f.declarations.length&&P("in")&&(y(),c=f,d=Aa(),f=null)}else aa.allowIn=!1,f=Aa(),aa.allowIn=g,P("in")&&(ca(f)||I(la.InvalidLHSInForIn),y(),c=f,d=Aa(),f=null);"undefined"===typeof c&&N(";")}"undefined"===typeof c&&(J(";")||(b=Aa()),N(";"),J(")")||(e=Aa()));N(")");k=aa.inIteration;aa.inIteration=!0;g=Ka(!0);aa.inIteration=
k;return"undefined"===typeof c?a.finishForStatement(f,b,e,g):a.finishForInStatement(c,d,g);case "function":return Ya(a);case "if":return O("if"),N("("),c=Aa(),N(")"),d=Ka(!0),P("else")?(y(),b=Ka(!0)):b=null,a.finishIfStatement(c,d,b);case "return":return c=null,O("return"),aa.inFunctionBody||I(la.IllegalReturn),32===K.charCodeAt(E)&&h(K.charCodeAt(E+1))?(c=Aa(),S(),a=a.finishReturnStatement(c)):ba()?a=a.finishReturnStatement(null):(J(";")||J("}")||X.type===R.EOF||(c=Aa()),S(),a=a.finishReturnStatement(c)),
a;case "var":return O("var"),c=Va(),S(),a.finishVariableDeclaration(c,"var")}c=Aa();if(c.type===ea.Identifier&&J(":"))return y(),b="$"+c.name,Object.prototype.hasOwnProperty.call(aa.labelSet,b)&&V(la.Redeclaration,"Label",c.name),aa.labelSet[b]=!0,d=Ka(!1),delete aa.labelSet[b],a.finishLabeledStatement(c,d);S();return a.finishExpressionStatement(c)}function La(){var a,b=[],c,d,e,f,g,k=new C;for(N("{");E<oa&&X.type===R.StringLiteral;){c=X;a=Ja();b.push(a);if(a.expression.type!==ea.Literal)break;a=
K.slice(c.start+1,c.end-1);"use strict"===a?(ma=!0,d&&W(d,la.StrictOctalLiteral)):!d&&c.octal&&(d=c)}c=aa.labelSet;d=aa.inIteration;e=aa.inSwitch;f=aa.inFunctionBody;g=aa.parenthesizedCount;aa.labelSet={};aa.inIteration=!1;aa.inSwitch=!1;aa.inFunctionBody=!0;for(aa.parenthesizedCount=0;E<oa&&!J("}");){a=Ja();if("undefined"===typeof a)break;b.push(a)}N("}");aa.labelSet=c;aa.inIteration=d;aa.inSwitch=e;aa.inFunctionBody=f;aa.parenthesizedCount=g;return k.finishBlockStatement(b)}function Ha(a,b,c){c=
"$"+c;ma?Object.prototype.hasOwnProperty.call(a.paramSet,c)&&(a.stricted=b,a.message=la.StrictParamDupe):!a.firstRestricted&&Object.prototype.hasOwnProperty.call(a.paramSet,c)&&(a.firstRestricted=b,a.message=la.StrictParamDupe);a.paramSet[c]=!0}function Fa(a){a={params:[],defaultCount:0,defaults:[],firstRestricted:a};N("(");if(!J(")"))for(a.paramSet={};E<oa;){var b=a,c=void 0,d=void 0,e=void 0,c=X,d=Ia();Ha(b,c,c.value);J("\x3d")&&(y(),e=xa(),++b.defaultCount);b.params.push(d);b.defaults.push(e);
if(J(")"))break;N(",")}N(")");0===a.defaultCount&&(a.defaults=[]);return{params:a.params,defaults:a.defaults,stricted:a.stricted,firstRestricted:a.firstRestricted,message:a.message}}function Ya(){var a,b=[],c=[],d,e,f,g,k,h=new C;O("function");a=Ia();d=Fa(f);b=d.params;c=d.defaults;e=d.stricted;f=d.firstRestricted;d.message&&(g=d.message);k=ma;d=La();ma&&f&&M(f,g);ma&&e&&W(e,g);ma=k;return h.finishFunctionDeclaration(a,b,c,d)}function Ja(){if(X.type===R.Keyword)return"function"===X.value.toLowerCase()?
Ya():Ka(!1);if(X.type!==R.EOF)return Ka(!1)}function Ra(){var a,b,c,d=[];for(a=0;a<L.tokens.length;++a)b=L.tokens[a],c={type:b.type,value:b.value},b.regex&&(c.regex={pattern:b.regex.pattern,flags:b.regex.flags}),L.range&&(c.range=b.range),L.loc&&(c.loc=b.loc),d.push(c);L.tokens=d}var R,Ga,va,ea,Qa,Na,la,db,K,ma,E,da,ia,oa,X,aa,L;R={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};Ga={};Ga[R.BooleanLiteral]="Boolean";Ga[R.EOF]=
"\x3cend\x3e";Ga[R.Identifier]="Identifier";Ga[R.Keyword]="Keyword";Ga[R.NullLiteral]="Null";Ga[R.NumericLiteral]="Numeric";Ga[R.Punctuator]="Punctuator";Ga[R.StringLiteral]="String";Ga[R.RegularExpression]="RegularExpression";va="( { [ in typeof instanceof new return case delete throw void \x3d +\x3d -\x3d *\x3d /\x3d %\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d |\x3d ^\x3d , + - * / % ++ -- \x3c\x3c \x3e\x3e \x3e\x3e\x3e \x26 | ^ ! ~ \x26\x26 || ? : \x3d\x3d\x3d \x3d\x3d \x3e\x3d \x3c\x3d \x3c \x3e !\x3d !\x3d\x3d".split(" ");
ea={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",
FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator"};Qa={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}};
Na={Data:1,Get:2,Set:4};la={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",
MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",
StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",
AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};db={NonAsciiIdentifierStart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/,
NonAsciiIdentifierPart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0-\u08b2\u08e4-\u0963\u0966-\u096f\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1ab0-\u1abd\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1cf8\u1cf9\u1d00-\u1df5\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua69d\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\ua9e0-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/};
G.prototype=C.prototype={processComment:function(){var a,b,c,d=L.bottomRightStack,e,f,g=d[d.length-1];if(!(this.type===ea.Program&&0<this.body.length)){if(0<L.trailingComments.length){c=[];for(e=L.trailingComments.length-1;0<=e;--e)f=L.trailingComments[e],f.range[0]>=this.range[1]&&(c.unshift(f),L.trailingComments.splice(e,1));L.trailingComments=[]}else g&&g.trailingComments&&g.trailingComments[0].range[0]>=this.range[1]&&(c=g.trailingComments,delete g.trailingComments);if(g)for(;g&&g.range[0]>=this.range[0];)a=
g,g=d.pop();if(a)a.leadingComments&&a.leadingComments[a.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=a.leadingComments,a.leadingComments=void 0);else if(0<L.leadingComments.length)for(b=[],e=L.leadingComments.length-1;0<=e;--e)f=L.leadingComments[e],f.range[1]<=this.range[0]&&(b.unshift(f),L.leadingComments.splice(e,1));b&&0<b.length&&(this.leadingComments=b);c&&0<c.length&&(this.trailingComments=c);d.push(this)}},finish:function(){L.range&&(this.range[1]=E);L.loc&&(this.loc.end=
new D,L.source&&(this.loc.source=L.source));L.attachComment&&this.processComment()},finishArrayExpression:function(a){this.type=ea.ArrayExpression;this.elements=a;this.finish();return this},finishAssignmentExpression:function(a,b,c){this.type=ea.AssignmentExpression;this.operator=a;this.left=b;this.right=c;this.finish();return this},finishBinaryExpression:function(a,b,c){this.type="||"===a||"\x26\x26"===a?ea.LogicalExpression:ea.BinaryExpression;this.operator=a;this.left=b;this.right=c;this.finish();
return this},finishBlockStatement:function(a){this.type=ea.BlockStatement;this.body=a;this.finish();return this},finishBreakStatement:function(a){this.type=ea.BreakStatement;this.label=a;this.finish();return this},finishCallExpression:function(a,b){this.type=ea.CallExpression;this.callee=a;this.arguments=b;this.finish();return this},finishConditionalExpression:function(a,b,c){this.type=ea.ConditionalExpression;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishContinueStatement:function(a){this.type=
ea.ContinueStatement;this.label=a;this.finish();return this},finishEmptyStatement:function(){this.type=ea.EmptyStatement;this.finish();return this},finishExpressionStatement:function(a){this.type=ea.ExpressionStatement;this.expression=a;this.finish();return this},finishForStatement:function(a,b,c,d){this.type=ea.ForStatement;this.init=a;this.test=b;this.update=c;this.body=d;this.finish();return this},finishForInStatement:function(a,b,c){this.type=ea.ForInStatement;this.left=a;this.right=b;this.body=
c;this.each=!1;this.finish();return this},finishFunctionDeclaration:function(a,b,c,d){this.type=ea.FunctionDeclaration;this.id=a;this.params=b;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishFunctionExpression:function(a,b,c,d){this.type=ea.FunctionExpression;this.id=a;this.params=b;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishIdentifier:function(a){this.type=ea.Identifier;
this.name=a;this.finish();return this},finishIfStatement:function(a,b,c){this.type=ea.IfStatement;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishLiteral:function(a){this.type=ea.Literal;this.value=a.value;this.raw=K.slice(a.start,a.end);a.regex&&(this.regex=a.regex);this.finish();return this},finishMemberExpression:function(a,b,c){this.type=ea.MemberExpression;this.computed="["===a;this.object=b;this.property=c;this.finish();return this},finishObjectExpression:function(a){this.type=
ea.ObjectExpression;this.properties=a;this.finish();return this},finishPostfixExpression:function(a,b){this.type=ea.UpdateExpression;this.operator=a;this.argument=b;this.prefix=!1;this.finish();return this},finishProgram:function(a){this.type=ea.Program;this.body=a;this.finish();return this},finishProperty:function(a,b,c,d,e){this.type=ea.Property;this.key=b;this.value=c;this.kind=a;this.method=d;this.shorthand=e;this.finish();return this},finishReturnStatement:function(a){this.type=ea.ReturnStatement;
this.argument=a;this.finish();return this},finishUnaryExpression:function(a,b){this.type="++"===a||"--"===a?ea.UpdateExpression:ea.UnaryExpression;this.operator=a;this.argument=b;this.prefix=!0;this.finish();return this},finishVariableDeclaration:function(a,b){this.type=ea.VariableDeclaration;this.declarations=a;this.kind=b;this.finish();return this},finishVariableDeclarator:function(a,b){this.type=ea.VariableDeclarator;this.id=a;this.init=b;this.finish();return this}};b.version="2.0.0-dev";b.tokenize=
function(a,b){var c,d;c=String;"string"===typeof a||a instanceof String||(a=c(a));K=a;E=0;da=0<K.length?1:0;ia=0;oa=K.length;X=null;aa={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1};L={};b=b||{};b.tokens=!0;L.tokens=[];L.tokenize=!0;L.openParenToken=-1;L.openCurlyToken=-1;L.range="boolean"===typeof b.range&&b.range;L.loc="boolean"===typeof b.loc&&b.loc;"boolean"===typeof b.comment&&b.comment&&(L.comments=[]);"boolean"===typeof b.tolerant&&b.tolerant&&(L.errors=
[]);try{A();if(X.type===R.EOF)return L.tokens;for(y();X.type!==R.EOF;)try{y()}catch(Sa){if(L.errors){L.errors.push(Sa);break}else throw Sa;}Ra();d=L.tokens;"undefined"!==typeof L.comments&&(d.comments=L.comments);"undefined"!==typeof L.errors&&(d.errors=L.errors)}catch(Sa){throw Sa;}finally{L={}}return d};b.parse=function(a,b){var c,d;d=String;"string"===typeof a||a instanceof String||(a=d(a));K=a;E=0;da=0<K.length?1:0;ia=0;oa=K.length;X=null;aa={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,
inIteration:!1,inSwitch:!1,lastCommentStart:-1};L={};"undefined"!==typeof b&&(L.range="boolean"===typeof b.range&&b.range,L.loc="boolean"===typeof b.loc&&b.loc,L.attachComment="boolean"===typeof b.attachComment&&b.attachComment,L.loc&&null!==b.source&&void 0!==b.source&&(L.source=d(b.source)),"boolean"===typeof b.tokens&&b.tokens&&(L.tokens=[]),"boolean"===typeof b.comment&&b.comment&&(L.comments=[]),"boolean"===typeof b.tolerant&&b.tolerant&&(L.errors=[]),L.attachComment&&(L.range=!0,L.comments=
[],L.bottomRightStack=[],L.trailingComments=[],L.leadingComments=[]));try{var e;k();A();e=new C;ma=!1;var f;a=[];for(var g,h,l;E<oa;){g=X;if(g.type!==R.StringLiteral)break;f=Ja();a.push(f);if(f.expression.type!==ea.Literal)break;h=K.slice(g.start+1,g.end-1);"use strict"===h?(ma=!0,l&&W(l,la.StrictOctalLiteral)):!l&&g.octal&&(l=g)}for(;E<oa;){f=Ja();if("undefined"===typeof f)break;a.push(f)}c=e.finishProgram(a);"undefined"!==typeof L.comments&&(c.comments=L.comments);"undefined"!==typeof L.tokens&&
(Ra(),c.tokens=L.tokens);"undefined"!==typeof L.errors&&(c.errors=L.errors)}catch(jb){throw jb;}finally{L={}}return c};b.Syntax=function(){var a,b={};"function"===typeof Object.create&&(b=Object.create(null));for(a in ea)ea.hasOwnProperty(a)&&(b[a]=ea[a]);"function"===typeof Object.freeze&&Object.freeze(b);return b}()})},"esri/support/actions/ActionBase":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Identifiable ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h){return function(b){function c(a){a=b.call(this)||this;a.active=!1;a.className=null;a.disabled=!1;a.id=null;a.indicator=!1;a.title=null;a.type=null;a.visible=!0;return a}p(c,b);e=c;c.prototype.clone=function(){return new e({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})};var e;f([h.property()],c.prototype,"active",void 0);f([h.property()],c.prototype,"className",void 0);f([h.property()],
c.prototype,"disabled",void 0);f([h.property()],c.prototype,"id",void 0);f([h.property()],c.prototype,"title",void 0);f([h.property()],c.prototype,"type",void 0);f([h.property()],c.prototype,"visible",void 0);return c=e=f([h.subclass("esri.support.actions.ActionBase")],c)}(h.declared(l,m))})},"esri/support/actions/ActionButton":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./ActionBase".split(" "),
function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.image=null;c.type="button";return c}p(c,b);g=c;c.prototype.clone=function(){return new g({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})};var g;f([l.property()],c.prototype,"image",void 0);return c=g=f([l.subclass("esri.support.Action.ActionButton")],c)}(l.declared(m))})},"esri/support/actions/ActionToggle":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./ActionBase".split(" "),
function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.image=null;c.type="toggle";c.value=!1;return c}p(c,b);g=c;c.prototype.clone=function(){return new g({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})};var g;f([l.property()],c.prototype,"image",void 0);f([l.property()],c.prototype,"value",void 0);return c=g=f([l.subclass("esri.support.Action.ActionToggle")],
c)}(l.declared(m))})},"esri/symbols/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/Warning ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PictureFillSymbol ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../Symbol3D ../TextSymbol ../WebStyleSymbol ../callouts/LineCallout3D ./symbolConversion".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d){function n(a,b,c){b=a?y[a.type]||null:
null;if(b)return b=new b,b.read(a,c),b;c&&c.messages&&a&&c.messages.push(new f("symbol:unsupported","Symbols of type '"+(a.type||"unknown")+"' are not supported",{definition:a,context:c}));return null}function x(a,b,c){if(!a)return null;if(!c||"web-scene"!==c.origin||a.isInstanceOf(z)||a.isInstanceOf(w))return a.write(b,c);var e=d.to3D(a);if(e.symbol)return e.symbol.write(b,c);c.messages&&c.messages.push(new p("symbol:unsupported","Symbols of type '"+a.declaredClass+"' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView",
{symbol:a,context:c,error:e.error}));return null}Object.defineProperty(g,"__esModule",{value:!0});var y={esriSMS:u,esriPMS:q,esriTS:v,esriSLS:r,esriSFS:k,esriPFS:c,PointSymbol3D:e,LineSymbol3D:m,PolygonSymbol3D:a,MeshSymbol3D:h,LabelSymbol3D:l,styleSymbolReference:w};g.read=n;g.writeTarget=function(a,b,c,d){(a=x(a,{},d))&&(b[c]=a)};g.write=x;g.fromJSON=function(a,b){return n(a,null,b)};g.readCallout3D=function(a,b){if(!a||!a.type)return null;var c=null;switch(a.type){case "line":c=new t}c&&c.read(a,
b);return c}})},"esri/symbols/LabelSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/lang ../core/accessorSupport/decorators ./Symbol3D ./TextSymbol3DLayer ./callouts/calloutUtils ./support/Symbol3DVerticalOffset".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){var k=l.ofType({base:null,key:"type",typeMap:{text:q}});return function(b){function c(a){a=b.call(this)||this;a.verticalOffset=null;a.callout=null;a.styleOrigin=
null;a.symbolLayers=new k;a.type="label-3d";return a}p(c,b);g=c;c.prototype.supportsCallout=function(){return!0};c.prototype.hasVisibleCallout=function(){return e.hasVisibleCallout(this)};c.prototype.hasVisibleVerticalOffset=function(){return e.hasVisibleVerticalOffset(this)};c.prototype.clone=function(){return new g({styleOrigin:m.clone(this.styleOrigin),symbolLayers:m.clone(this.symbolLayers),thumbnail:m.clone(this.thumbnail),callout:m.clone(this.callout),verticalOffset:m.clone(this.verticalOffset)})};
var g;f([h.property({type:a.default,json:{write:!0}})],c.prototype,"verticalOffset",void 0);f([h.property(e.calloutProperty)],c.prototype,"callout",void 0);f([h.property({json:{read:!1,write:!1}})],c.prototype,"styleOrigin",void 0);f([h.property({type:k})],c.prototype,"symbolLayers",void 0);f([h.property()],c.prototype,"type",void 0);return c=g=f([h.subclass("esri.symbols.LabelSymbol3D")],c)}(h.declared(c))})},"esri/symbols/Symbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/collectionUtils ../core/Logger ../core/urlUtils ../core/Warning ../core/accessorSupport/decorators ../portal/Portal ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./PathSymbol3DLayer ./Symbol ./Symbol3DLayer ./TextSymbol3DLayer ./support/StyleOrigin ./support/Thumbnail".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x,y){var A={icon:u,object:v,line:z,path:w,fill:r,extrude:k,text:n},D=l.ofType({base:d,key:"type",typeMap:A}),B=h.getLogger("esri.symbols.Symbol3D");return function(b){function g(a){a=b.call(this)||this;a.styleOrigin=null;a.thumbnail=null;a.type=null;var c=a.__accessor__&&a.__accessor__.metadatas&&a.__accessor__.metadatas.symbolLayers;a._set("symbolLayers",new (c&&c.type||l));return a}p(g,b);Object.defineProperty(g.prototype,"color",{get:function(){return null},
set:function(a){B.error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"symbolLayers",{set:function(a){m.referenceSetter(a,this._get("symbolLayers"))},enumerable:!0,configurable:!0});g.prototype.readSymbolLayers=function(a,b,c){b=[];for(var e=0;e<a.length;e++){var f=a[e],g=d.typeJSONDictionary.read(f.type),k=A[g];k?(f=new k,f.read(a[e],c),b.push(f)):(B.warn("Unknown symbol layer type: "+
g),c&&c.messages&&c.messages.push(new q("symbol-layer:unsupported","Symbol layers of type '"+(g||"unknown")+"' are not supported",{definition:f,context:c})))}return b};g.prototype.readStyleOrigin=function(b,d,e){if(b.styleUrl&&b.name)return d=c.read(b.styleUrl,e),new x({styleUrl:d,name:b.name});if(b.styleName&&b.name)return new x({portal:e&&e.portal||a.getDefault(),styleName:b.styleName,name:b.name});e&&e.messages&&e.messages.push(new q("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",
{context:e,definition:b}))};g.prototype.writeStyleOrigin=function(a,b,d,e){a.styleUrl&&a.name?(d=c.write(a.styleUrl,e),c.isAbsolute(d)&&(d=c.normalize(d)),b.styleOrigin={styleUrl:d,name:a.name}):a.styleName&&a.name&&(a.portal&&e&&e.portal&&!c.hasSamePortal(a.portal.restUrl,e.portal.restUrl)?e&&e.messages&&e.messages.push(new q("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):b.styleOrigin=
{styleName:a.styleName,name:a.name})};g.prototype.normalizeCtorArgs=function(a){return a instanceof d||a&&A[a.type]?{symbolLayers:[a]}:Array.isArray(a)?{symbolLayers:a}:a};f([e.property({json:{read:!1,write:!1}})],g.prototype,"color",null);f([e.property({type:D,nonNullable:!0,json:{write:!0}}),e.cast(m.castForReferenceSetter)],g.prototype,"symbolLayers",null);f([e.reader("symbolLayers")],g.prototype,"readSymbolLayers",null);f([e.property({type:x})],g.prototype,"styleOrigin",void 0);f([e.reader("styleOrigin")],
g.prototype,"readStyleOrigin",null);f([e.writer("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],g.prototype,"writeStyleOrigin",null);f([e.property({type:y.default,json:{read:!1}})],g.prototype,"thumbnail",void 0);f([e.property({type:String,readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0);return g=f([e.subclass("esri.symbols.Symbol3D")],g)}(e.declared(t))})},"esri/symbols/ExtrudeSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils".split(" "),
function(b,g,p,f,l,m,h){return function(b){function c(a){a=b.call(this)||this;a.type="extrude";a.size=void 0;a.material=null;a.edges=null;return a}p(c,b);e=c;c.prototype.clone=function(){return new e({edges:this.edges&&this.edges.clone(),enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};var e;f([l.property()],c.prototype,"type",void 0);f([l.property({type:Number,json:{write:!0}})],c.prototype,"size",void 0);
f([l.property()],c.prototype,"material",void 0);f([l.property(h.symbol3dEdgesProperty)],c.prototype,"edges",void 0);return c=e=f([l.subclass("esri.symbols.ExtrudeSymbol3DLayer")],c)}(l.declared(m))})},"esri/symbols/Symbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/kebabDictionary ../core/accessorSupport/decorators ./support/ElevationInfo ./support/Symbol3DMaterial".split(" "),function(b,g,p,f,l,m,h,
c,q){var e=m({Icon:"icon",Object:"object",Line:"line",Path:"path",Fill:"fill",Extrude:"extrude",Text:"text"});b=function(a){function b(b){b=a.call(this)||this;b.enabled=!0;b.material=null;b.type=null;return b}p(b,a);b.prototype.writeEnabled=function(a,b,c){a||(b[c]=a)};f([h.property({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],b.prototype,"enabled",void 0);f([h.writer("enabled")],b.prototype,"writeEnabled",null);f([h.property({type:c,json:{read:!1,write:!1}})],b.prototype,
"elevationInfo",void 0);f([h.property({type:q.default,json:{write:!0}})],b.prototype,"material",void 0);f([h.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:e.write}}})],b.prototype,"type",void 0);return b=f([h.subclass("esri.symbols.Symbol3DLayer")],b)}(h.declared(l));(b||(b={})).typeJSONDictionary=e;return b})},"esri/symbols/support/ElevationInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../support/arcadeUtils".split(" "),
function(b,g,p,f,l,m,h,c){var q=m({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),e=m({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"}),a=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}p(b,a);e=b;Object.defineProperty(b.prototype,"requiredFields",{get:function(){return c.extractFieldNames(this.expression)},enumerable:!0,configurable:!0});
b.prototype.clone=function(){return new e({expression:this.expression,title:this.title})};var e;f([h.property({type:String,json:{write:!0}})],b.prototype,"expression",void 0);f([h.property({readOnly:!0,dependsOn:["expression"]})],b.prototype,"requiredFields",null);f([h.property({type:String,json:{write:!0}})],b.prototype,"title",void 0);return b=e=f([h.subclass("esri.layers.support.FeatureExpressionInfo")],b)}(h.declared(l));return function(b){function c(){return null!==b&&b.apply(this,arguments)||
this}p(c,b);g=c;c.prototype.readFeatureExpressionInfo=function(a,b){if(null!=a)return a;if(b.featureExpression&&0===b.featureExpression.value)return{expression:"0"}};c.prototype.writeFeatureExpressionInfo=function(a,b,c,e){b[c]=a.write(null,e);"0"===a.expression&&(b.featureExpression={value:0})};Object.defineProperty(c.prototype,"mode",{get:function(){var a=this._get("mode");return a?a:null!=this.offset||this.featureExpressionInfo?"relative-to-ground":"on-the-ground"},set:function(a){this._set("mode",
a)},enumerable:!0,configurable:!0});c.prototype.write=function(a,b){return this.offset||this.mode||this.featureExpressionInfo||this.unit?this.inherited(arguments):null};c.prototype.clone=function(){return new g({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})};var g;f([h.property({type:a,json:{write:!0}})],c.prototype,"featureExpressionInfo",void 0);f([h.reader("featureExpressionInfo",["featureExpressionInfo",
"featureExpression"])],c.prototype,"readFeatureExpressionInfo",null);f([h.writer("featureExpressionInfo",{featureExpressionInfo:{type:a},"featureExpression.value":{type:Number}})],c.prototype,"writeFeatureExpressionInfo",null);f([h.property({type:String,dependsOn:["offset","featureExpressionInfo"],json:{read:q.read,write:{writer:q.write,isRequired:!0}}})],c.prototype,"mode",null);f([h.property({type:Number,json:{write:!0}})],c.prototype,"offset",void 0);f([h.property({type:String,json:{read:e.read,
write:e.write}})],c.prototype,"unit",void 0);return c=g=f([h.subclass("esri.layers.support.ElevationInfo")],c)}(h.declared(l))})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(){return null!==b&&b.apply(this,
arguments)||this}p(c,b);e=c;c.prototype.clone=function(){return new e({color:this.color?this.color.clone():null})};var e;f([m.property(h.colorAndTransparencyProperty)],c.prototype,"color",void 0);return c=e=f([m.subclass("esri.symbols.support.Symbol3DMaterial")],c)}(m.declared(l));g.Symbol3DMaterial=b;g.default=b})},"esri/symbols/support/materialUtils":function(){define("require exports ../../Color ../../core/screenUtils ../../core/accessorSupport/ensureType ../../webdoc/support/opacityUtils".split(" "),
function(b,g,p,f,l,m){function h(b,c){b=null!=c.transparency?m.transparencyToOpacity(c.transparency):1;if((c=c.color)&&Array.isArray(c))return new p([c[0]||0,c[1]||0,c[2]||0,b])}function c(b,c){c.color=b.toJSON().slice(0,3);b=m.opacityToTransparency(b.a);0!==b&&(c.transparency=b)}Object.defineProperty(g,"__esModule",{value:!0});g.readColorAndTransparency=h;g.writeColorAndTransparency=c;g.colorAndTransparencyProperty={type:p,json:{type:[l.Integer],read:{source:["color","transparency"],reader:h},write:{target:{color:{type:[l.Integer]},
transparency:{type:l.Integer}},writer:c}}};g.screenSizeProperty={type:Number,cast:f.toPt,json:{write:!0}}})},"esri/core/screenUtils":function(){define(["require","exports"],function(b,g){function p(b){return b?72*b/g.DPI:0}Object.defineProperty(g,"__esModule",{value:!0});var f=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;g.DPI=96;g.pt2px=function(b){return b?b/72*g.DPI:0};g.px2pt=p;g.toPt=function(b){if("string"===typeof b){if(f.test(b)){var g=b.match(f),h=Number(g[1]),g=g[3]&&g[3].toLowerCase();b="-"===b.charAt(0);
h="px"===g?p(h):h;return b?-h:h}console.warn("screenUtils.toPt: input not recognized!");return null}return b}})},"esri/symbols/edges/utils":function(){define(["require","exports","./Edges3D","./SketchEdges3D","./SolidEdges3D"],function(b,g,p,f,l){function m(b,c,g){if(!b)return b;switch(b.type){case "solid":return c=new l,c.read(b,g),c;case "sketch":return c=new f,c.read(b,g),c}}Object.defineProperty(g,"__esModule",{value:!0});g.read=m;g.symbol3dEdgesProperty={types:{key:"type",base:p,typeMap:{solid:l,
sketch:f}},json:{read:m,write:!0}}})},"esri/symbols/edges/Edges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/assignHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){return function(b){function g(a){a=b.call(this)||this;a.color=new m([0,0,0,1]);a.extensionLength=0;a.size=
q.px2pt(1);return a}p(g,b);g.prototype.normalizeCtorArgs=function(a){a&&a.type&&(a=l({},a),delete a.type);return a};g.prototype.clone=function(){};g.prototype.cloneProperties=function(){return{color:c.clone(this.color),size:this.size,extensionLength:this.extensionLength}};f([e.property({type:String,readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],g.prototype,"type",void 0);f([e.property(a.colorAndTransparencyProperty)],g.prototype,"color",void 0);f([e.property(l({},a.screenSizeProperty,{json:{write:{overridePolicy:function(a){return{enabled:!!a}}}}}))],
g.prototype,"extensionLength",void 0);f([e.property(a.screenSizeProperty)],g.prototype,"size",void 0);return g=f([e.subclass("esri.symbols.edges.Edges3D")],g)}(e.declared(h))})},"esri/symbols/edges/SketchEdges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Edges3D".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.type="sketch";return c}p(c,b);g=c;c.prototype.clone=
function(){return new g(this.cloneProperties())};var g;f([l.property({type:String})],c.prototype,"type",void 0);return c=g=f([l.subclass("esri.symbols.edges.SketchEdges3D")],c)}(l.declared(m))})},"esri/symbols/edges/SolidEdges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Edges3D".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.type="solid";return c}
p(c,b);g=c;c.prototype.clone=function(){return new g(this.cloneProperties())};var g;f([l.property({type:String})],c.prototype,"type",void 0);return c=g=f([l.subclass("esri.symbols.support.SolidEdges3D")],c)}(l.declared(m))})},"esri/symbols/FillSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils ./support/Symbol3DFillMaterial ./support/Symbol3DOutline".split(" "),function(b,
g,p,f,l,m,h,c,q){return function(b){function a(a){a=b.call(this)||this;a.type="fill";a.material=null;a.outline=null;a.edges=null;return a}p(a,b);e=a;a.prototype.clone=function(){return new e({edges:this.edges&&this.edges.clone(),enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone()})};var e;f([l.property()],a.prototype,"type",void 0);f([l.property({type:c.default})],a.prototype,"material",
void 0);f([l.property({type:q.default,json:{write:!0}})],a.prototype,"outline",void 0);f([l.property(h.symbol3dEdgesProperty)],a.prototype,"edges",void 0);return a=e=f([l.subclass("esri.symbols.FillSymbol3DLayer")],a)}(l.declared(m))})},"esri/symbols/support/Symbol3DFillMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Symbol3DMaterial".split(" "),function(b,g,p,f,l,m){Object.defineProperty(g,
"__esModule",{value:!0});b=function(b){function c(){return null!==b&&b.apply(this,arguments)||this}p(c,b);g=c;c.prototype.clone=function(){return new g({color:this.color?this.color.clone():null,colorMixMode:this.colorMixMode})};var g;f([l.property({type:String,json:{read:!0,write:!0}})],c.prototype,"colorMixMode",void 0);return c=g=f([l.subclass("esri.symbols.support.Symbol3DFillMaterial")],c)}(l.declared(m.default));g.Symbol3DFillMaterial=b;g.default=b})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/screenUtils ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(b,g,p,f,l,m,h,c,q){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new l([0,0,0,1]);a.size=h.px2pt(1);return a}p(a,b);e=a;a.prototype.clone=function(){return new e({color:this.color?this.color.clone():null,size:this.size})};var e;f([c.property(q.colorAndTransparencyProperty)],a.prototype,"color",void 0);f([c.property(q.screenSizeProperty)],a.prototype,"size",void 0);return a=e=f([c.subclass("esri.symbols.support.Symbol3DOutline")],
a)}(c.declared(m));g.Symbol3DOutline=b;g.default=b})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ../core/accessorSupport/decorators ./Symbol3DLayer ./support/IconSymbol3DLayerResource ./support/materialUtils ./support/Symbol3DOutline".split(" "),function(b,g,p,f,l,m,h,c,q,e){var a=l({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",
bottomLeft:"bottom-left",bottomRight:"bottom-right"},{ignoreUnknown:!0});return function(b){function g(a){a=b.call(this)||this;a.material=null;a.resource=null;a.type="icon";a.size=12;a.anchor=void 0;a.outline=void 0;return a}p(g,b);k=g;g.prototype.clone=function(){return new k({anchor:this.anchor,enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone(),resource:this.resource&&this.resource.clone(),
size:this.size})};var k;f([m.property()],g.prototype,"material",void 0);f([m.property({type:c.default,json:{write:!0}})],g.prototype,"resource",void 0);f([m.property()],g.prototype,"type",void 0);f([m.property(q.screenSizeProperty)],g.prototype,"size",void 0);f([m.property({type:String,json:{read:a.read,write:a.write}})],g.prototype,"anchor",void 0);f([m.property({type:e.default,json:{write:!0}})],g.prototype,"outline",void 0);return g=k=f([m.subclass("esri.symbols.IconSymbol3DLayer")],g)}(m.declared(h))})},
"esri/symbols/support/IconSymbol3DLayerResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/urlUtils ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(){return null!==b&&b.apply(this,arguments)||this}p(c,b);e=c;c.prototype.readHref=function(a,b,c){return a?m.read(a,c):b.dataURI};c.prototype.writeHref=
function(a,b,c,e){a&&(m.isDataProtocol(a)?b.dataURI=a:(b.href=m.write(a,e),m.isAbsolute(b.href)&&(b.href=m.normalize(b.href))))};c.prototype.clone=function(){return new e({href:this.href,primitive:this.primitive})};var e;f([h.property({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],c.prototype,"href",void 0);f([h.reader("href")],c.prototype,"readHref",null);f([h.writer("href",{href:{type:String},dataURI:{type:String}})],c.prototype,"writeHref",null);f([h.property({type:String,json:{write:!0}})],
c.prototype,"primitive",void 0);return c=e=f([h.subclass("esri.symbols.support.IconSymbol3DLayerResource")],c)}(h.declared(l));g.IconSymbol3DLayerResource=b;g.default=b})},"esri/symbols/LineSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/screenUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/materialUtils".split(" "),function(b,g,p,f,l,m,h,c){return function(b){function e(a){a=b.call(this)||this;a.material=
null;a.type="line";a.size=l.px2pt(1);return a}p(e,b);a=e;e.prototype.clone=function(){return new a({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};var a;f([m.property()],e.prototype,"material",void 0);f([m.property()],e.prototype,"type",void 0);f([m.property(c.screenSizeProperty)],e.prototype,"size",void 0);return e=a=f([m.subclass("esri.symbols.LineSymbol3DLayer")],e)}(m.declared(h))})},"esri/symbols/ObjectSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ../core/accessorSupport/decorators ./Symbol3DLayer ./support/ObjectSymbol3DLayerResource ./support/Symbol3DMaterial".split(" "),
function(b,g,p,f,l,m,h,c,q){var e=l({center:"center",top:"top",bottom:"bottom",origin:"origin"},{ignoreUnknown:!0});return function(a){function b(b){b=a.call(this)||this;b.material=null;b.resource=null;b.type="object";b.width=void 0;b.height=void 0;b.depth=void 0;b.anchor=void 0;b.heading=void 0;b.tilt=void 0;b.roll=void 0;return b}p(b,a);g=b;b.prototype.clone=function(){return new g({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,depth:this.depth,enabled:this.enabled,elevationInfo:this.elevationInfo&&
this.elevationInfo.clone(),height:this.height,material:this.material&&this.material.clone(),resource:this.resource&&this.resource.clone(),width:this.width})};Object.defineProperty(b.prototype,"isPrimitive",{get:function(){return!this.resource||"string"!==typeof this.resource.href},enumerable:!0,configurable:!0});var g;f([m.property({type:q.default})],b.prototype,"material",void 0);f([m.property({type:c.default,json:{write:!0}})],b.prototype,"resource",void 0);f([m.property()],b.prototype,"type",void 0);
f([m.property({type:Number,json:{write:!0}})],b.prototype,"width",void 0);f([m.property({type:Number,json:{write:!0}})],b.prototype,"height",void 0);f([m.property({type:Number,json:{write:!0}})],b.prototype,"depth",void 0);f([m.property({type:String,json:{read:e.read,write:e.write}})],b.prototype,"anchor",void 0);f([m.property({type:Number,json:{write:!0}})],b.prototype,"heading",void 0);f([m.property({type:Number,json:{write:!0}})],b.prototype,"tilt",void 0);f([m.property({type:Number,json:{write:!0}})],
b.prototype,"roll",void 0);f([m.property({readOnly:!0,dependsOn:["resource","resource.href"]})],b.prototype,"isPrimitive",null);return b=g=f([m.subclass("esri.symbols.ObjectSymbol3DLayer")],b)}(m.declared(h))})},"esri/symbols/support/ObjectSymbol3DLayerResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/urlUtils ../../core/accessorSupport/decorators".split(" "),function(b,
g,p,f,l,m,h,c){Object.defineProperty(g,"__esModule",{value:!0});var q=m({invertedCone:"inverted-cone"});b=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);e=a;a.prototype.readHref=function(a,b,c){return h.read(a,c)};a.prototype.writeHref=function(a,b,c,e){a&&(b.href=h.write(a,e),h.isAbsolute(b.href)&&(b.href=h.normalize(b.href)))};a.prototype.readPrimitive=function(a){return q.fromJSON(a)};a.prototype.writePrimitive=function(a,b){b.primitive=q.toJSON(a)};a.prototype.clone=
function(){return new e({href:this.href,primitive:this.primitive})};var e;f([c.property({type:String,json:{write:!0}})],a.prototype,"href",void 0);f([c.reader("href")],a.prototype,"readHref",null);f([c.writer("href")],a.prototype,"writeHref",null);f([c.property({type:String,json:{write:!0}})],a.prototype,"primitive",void 0);f([c.reader("primitive")],a.prototype,"readPrimitive",null);f([c.writer("primitive")],a.prototype,"writePrimitive",null);return a=e=f([c.subclass("esri.symbols.support.ObjectSymbol3DLayerResource")],
a)}(c.declared(l));g.ObjectSymbol3DLayerResource=b;g.default=b})},"esri/symbols/PathSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.material=null;c.type="path";c.size=void 0;return c}p(c,b);g=c;c.prototype.readSize=function(b,a){return b||a.width||0};c.prototype.clone=function(){return new g({enabled:this.enabled,
elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};var g;f([l.property()],c.prototype,"material",void 0);f([l.property()],c.prototype,"type",void 0);f([l.property({type:Number,json:{write:{enabled:!0,target:{size:{type:Number},width:{type:Number}}}}})],c.prototype,"size",void 0);f([l.reader("size",["size","width"])],c.prototype,"readSize",null);return c=g=f([l.subclass("esri.symbols.PathSymbol3DLayer")],c)}(l.declared(m))})},
"esri/symbols/Symbol":function(){define(["../core/lang","../core/kebabDictionary","../core/JSONSupport","../Color"],function(b,g,p,f){var l=g({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d"}),m=0;return p.createSubclass({declaredClass:"esri.symbols.Symbol",constructor:function(){this.id=
"sym"+m++},properties:{type:{type:String,value:null,json:{read:l.fromJSON,write:{ignoreOrigin:!0,writer:function(b,c){c.type=l.toJSON(this.type)}}}},color:{type:f,value:new f([0,0,0,1]),json:{read:function(f){return f&&b.isDefined(f[0])?[f[0],f[1],f[2],f[3]/255]:f},write:{allowNull:!0}}}}})})},"esri/symbols/TextSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper ../core/lang ../core/accessorSupport/decorators ./Font ./Symbol3DLayer ./support/materialUtils ./support/Symbol3DHalo".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){return function(b){function g(a){a=b.call(this)||this;a.font=null;a.halo=null;a.material=null;a.size=9;a.text=void 0;a.type="text";return a}p(g,b);k=g;g.prototype.writeFont=function(a,b,c,e){c=l({},e,{textSymbol3D:!0});b.font=a.write({},c)};g.prototype.clone=function(){return new k({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),font:this.font&&m.clone(this.font),halo:this.halo&&m.clone(this.halo),material:this.material&&this.material.clone(),
size:this.size,text:this.text})};var k;f([h.property({type:c,json:{write:!0}})],g.prototype,"font",void 0);f([h.writer("font")],g.prototype,"writeFont",null);f([h.property({type:a.default,json:{write:!0}})],g.prototype,"halo",void 0);f([h.property()],g.prototype,"material",void 0);f([h.property(e.screenSizeProperty)],g.prototype,"size",void 0);f([h.property({type:String,json:{write:!0}})],g.prototype,"text",void 0);f([h.property()],g.prototype,"type",void 0);return g=k=f([h.subclass("esri.symbols.TextSymbol3DLayer")],
g)}(h.declared(q))})},"esri/symbols/Font":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/screenUtils ../core/accessorSupport/decorators ../core/accessorSupport/write".split(" "),function(b,g,p,f,l,m,h,c){return function(b){function e(a){a=b.call(this)||this;a.decoration="none";a.family="sans-serif";a.size=9;a.style="normal";a.weight="normal";return a}p(e,b);a=e;e.prototype.castSize=function(a){return m.toPt(a)};
e.prototype.clone=function(){return new a({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})};var a;f([h.property({type:String,json:{write:{overridePolicy:c.disableWriteDefaultPolicy("none")}}})],e.prototype,"decoration",void 0);f([h.property({type:String,json:{write:!0}})],e.prototype,"family",void 0);f([h.property({type:Number,json:{write:{overridePolicy:function(a,b,c){return{enabled:!c||!c.textSymbol3D}}}}})],e.prototype,"size",void 0);f([h.cast("size")],
e.prototype,"castSize",null);f([h.property({type:String,json:{write:{overridePolicy:c.disableWriteDefaultPolicy("normal")}}})],e.prototype,"style",void 0);f([h.property({type:String,json:{write:{overridePolicy:c.disableWriteDefaultPolicy("normal")}}})],e.prototype,"weight",void 0);return e=a=f([h.subclass("esri.symbols.Font")],e)}(h.declared(l))})},"esri/symbols/support/Symbol3DHalo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(b,g,p,f,l,m,h,c,q){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new l([0,0,0,1]);a.size=0;return a}p(a,b);e=a;a.prototype.clone=function(){return new e({color:h.clone(this.color),size:this.size})};var e;f([c.property(q.colorAndTransparencyProperty)],a.prototype,"color",void 0);f([c.property(q.screenSizeProperty)],a.prototype,"size",void 0);return a=e=f([c.subclass("esri.symbols.support.Symbol3DHalo")],a)}(c.declared(m));
g.Symbol3DHalo=b;g.default=b})},"esri/symbols/support/StyleOrigin":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ../../portal/Portal".split(" "),function(b,g,p,f,l,m,h){return function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.portal=null;return a}p(c,b);e=c;c.prototype.clone=function(){return new e({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,
portal:this.portal})};var e;f([m.property({type:String})],c.prototype,"name",void 0);f([m.property({type:String})],c.prototype,"styleUrl",void 0);f([m.property({type:String})],c.prototype,"styleName",void 0);f([m.property({type:h})],c.prototype,"portal",void 0);return c=e=f([m.subclass("esri.symbols.support.StyleOrigin")],c)}(m.declared(l))})},"esri/symbols/support/Thumbnail":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(){return null!==b&&b.apply(this,arguments)||this}p(c,b);g=c;c.prototype.clone=function(){return new g({url:this.url})};var g;f([m.property({type:String})],c.prototype,"url",void 0);return c=g=f([m.subclass("esri.symbols.support.Thumbnail")],c)}(m.declared(l));g.Thumbnail=b;g.default=b})},"esri/symbols/callouts/calloutUtils":function(){define(["require","exports","./Callout3D","./LineCallout3D"],function(b,
g,p,f){function l(b){if(!b)return!1;b=b.verticalOffset;return!b||0>=b.screenLength||0>=b.maxWorldLength?!1:!0}function m(b,c,g){if(!b)return b;switch(b.type){case "line":return c=new f,c.read(b,g),c}}Object.defineProperty(g,"__esModule",{value:!0});g.hasVisibleVerticalOffset=l;g.hasVisibleCallout=function(b){if(!b||!b.supportsCallout||!b.supportsCallout())return!1;var c=b.callout;return c&&c.visible?l(b)?!0:!1:!1};g.isCalloutSupport=function(b){return"point-3d"===b.type||"label-3d"===b.type};g.read=
m;g.calloutProperty={types:{key:"type",base:p,typeMap:{line:f}},json:{read:m,write:!0}}})},"esri/symbols/callouts/Callout3D":function(){define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){return function(b){function c(c){c=b.call(this)||this;c.visible=!0;return c}f(c,b);c.prototype.normalizeCtorArgs=function(b){b&&b.type&&
(b=p({},b),delete b.type);return b};c.prototype.clone=function(){};l([h.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],c.prototype,"type",void 0);l([h.property({readOnly:!0})],c.prototype,"visible",void 0);return c=l([h.subclass("esri.symbols.callouts.Callout3D")],c)}(h.declared(m))})},"esri/symbols/callouts/LineCallout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ./Callout3D ./LineCallout3DBorder ../support/materialUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){return function(b){function g(a){a=b.call(this)||this;a.type="line";a.color=new l([0,0,0,1]);a.size=h.px2pt(1);a.border=null;return a}p(g,b);k=g;Object.defineProperty(g.prototype,"visible",{get:function(){return 0<this.size&&0<this.color.a},enumerable:!0,configurable:!0});g.prototype.clone=function(){return new k({color:m.clone(this.color),size:this.size,border:m.clone(this.border)})};var k;f([c.property({type:String})],g.prototype,"type",void 0);f([c.property(a.colorAndTransparencyProperty)],
g.prototype,"color",void 0);f([c.property(a.screenSizeProperty)],g.prototype,"size",void 0);f([c.property({type:e.default,json:{write:!0}})],g.prototype,"border",void 0);f([c.property({dependsOn:["size","color"],readOnly:!0})],g.prototype,"visible",null);return g=k=f([c.subclass("esri.symbols.callouts.LineCallout3D")],g)}(c.declared(q))})},"esri/symbols/callouts/LineCallout3DBorder":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),
function(b,g,p,f,l,m,h,c,q){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new l("white");return a}p(a,b);e=a;a.prototype.clone=function(){return new e({color:h.clone(this.color)})};var e;f([c.property(q.colorAndTransparencyProperty)],a.prototype,"color",void 0);return a=e=f([c.subclass("esri.symbols.callouts.LineCallout3DBorder")],a)}(c.declared(m));g.LineCallout3DBorder=b;g.default=b})},"esri/symbols/support/Symbol3DVerticalOffset":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.screenLength=0;a.minWorldLength=0;return a}p(c,b);e=c;c.prototype.writeMinWorldLength=function(a,b,c){a&&(b[c]=a)};c.prototype.clone=function(){return new e({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})};var e;f([m.property(h.screenSizeProperty)],c.prototype,"screenLength",void 0);f([m.property({type:Number,
json:{write:!0}})],c.prototype,"minWorldLength",void 0);f([m.writer("minWorldLength")],c.prototype,"writeMinWorldLength",null);f([m.property({type:Number,json:{write:!0}})],c.prototype,"maxWorldLength",void 0);return c=e=f([m.subclass("esri.symbols.support.Symbol3DVerticalOffset")],c)}(m.declared(l));g.Symbol3DVerticalOffset=b;g.default=b})},"esri/symbols/LineSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/lang ../core/accessorSupport/decorators ./LineSymbol3DLayer ./PathSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){var k=l.ofType({base:null,key:"type",typeMap:{line:c,text:a,path:q}});return function(a){function b(b){b=a.call(this)||this;b.symbolLayers=new k;b.type="line-3d";return b}p(b,a);c=b;b.prototype.clone=function(){return new c({styleOrigin:m.clone(this.styleOrigin),symbolLayers:m.clone(this.symbolLayers),thumbnail:m.clone(this.thumbnail)})};var c;f([h.property({type:k})],b.prototype,"symbolLayers",void 0);f([h.property()],b.prototype,"type",void 0);return b=c=f([h.subclass("esri.symbols.LineSymbol3D")],
b)}(h.declared(e))})},"esri/symbols/MeshSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/lang ../core/accessorSupport/decorators ./FillSymbol3DLayer ./Symbol3D".split(" "),function(b,g,p,f,l,m,h,c,q){var e=l.ofType({base:null,key:"type",typeMap:{fill:c}});return function(a){function b(b){b=a.call(this)||this;b.symbolLayers=new e;b.type="mesh-3d";return b}p(b,a);c=b;b.prototype.clone=function(){return new c({styleOrigin:m.clone(this.styleOrigin),
symbolLayers:m.clone(this.symbolLayers),thumbnail:m.clone(this.thumbnail)})};var c;f([h.property({type:e})],b.prototype,"symbolLayers",void 0);f([h.property()],b.prototype,"type",void 0);return b=c=f([h.subclass("esri.symbols.MeshSymbol3D")],b)}(h.declared(q))})},"esri/symbols/PictureFillSymbol":function(){define(["../core/declare","../core/lang","../core/screenUtils","./FillSymbol","./support/urlUtils"],function(b,g,p,f,l){var m={xscale:1,yscale:1,xoffset:0,yoffset:0,width:12,height:12},h=b(f,{declaredClass:"esri.symbols.PictureFillSymbol",
properties:{type:"picture-fill",url:l.urlPropertyDefinition,xscale:{value:1,json:{write:!0}},yscale:{value:1,json:{write:!0}},width:{value:12,cast:p.toPt,json:{write:!0}},height:{value:12,cast:p.toPt,json:{write:!0}},xoffset:{value:0,cast:p.toPt,json:{write:!0}},yoffset:{value:0,cast:p.toPt,json:{write:!0}},source:l.sourcePropertyDefinition},getDefaults:function(){return g.mixin(this.inherited(arguments),m)},normalizeCtorArgs:function(b,f,e,a){if(b&&"string"!==typeof b&&null==b.imageData)return b;
var c={};b&&(c.url=b);f&&(c.outline=f);null!=e&&(c.width=p.toPt(e));null!=a&&(c.height=p.toPt(a));return c},clone:function(){var b=new h({color:g.clone(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});b._set("source",g.clone(this.source));return b}});h.defaultProps=m;return h})},"esri/symbols/FillSymbol":function(){define(["./Symbol","./SimpleLineSymbol"],function(b,
g){return b.createSubclass({declaredClass:"esri.symbols.FillSymbol",properties:{outline:{type:g,json:{read:{default:null},write:!0}},type:null}})})},"esri/symbols/SimpleLineSymbol":function(){define(["../core/declare","../core/lang","../core/screenUtils","./LineSymbol"],function(b,g,p,f){var l={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dash-dot",STYLE_DASHDOTDOT:"long-dash-dot-dot",STYLE_NULL:"none",STYLE_SHORTDASH:"short-dash",STYLE_SHORTDOT:"short-dot",STYLE_SHORTDASHDOT:"short-dash-dot",
STYLE_SHORTDASHDOTDOT:"short-dash-dot-dot",STYLE_LONGDASH:"long-dash",STYLE_LONGDASHDOT:"long-dash-dot",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"},m={color:[0,0,0,1],style:l.STYLE_SOLID,width:.75,cap:l.CAP_ROUND,join:l.JOIN_ROUND,miterLimit:7.5},h=b(f,{declaredClass:"esri.symbols.SimpleLineSymbol",properties:{type:"simple-line",style:{value:l.STYLE_SOLID,json:{read:function(b,f){return g.valueOf(this._jsonStyles,b)||void 0},write:function(b,
f){f.style=this._jsonStyles[b]}}},cap:{value:l.CAP_ROUND,json:{write:{overridePolicy:function(b,f,e){return{enabled:"round"!==b&&(null==e||null==e.origin)}}}}},join:{value:l.JOIN_ROUND,json:{write:{overridePolicy:function(b,f,e){return{enabled:"round"!==b&&(null==e||null==e.origin)}}}}},miterLimit:{value:7.5,cast:p.toPt,json:{read:!1,write:!1}}},_jsonStyles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot","dash-dot":"esriSLSDashDot","long-dash-dot-dot":"esriSLSDashDotDot",none:"esriSLSNull",
"inside-frame":"esriSLSInsideFrame","short-dash":"esriSLSShortDash","short-dot":"esriSLSShortDot","short-dash-dot":"esriSLSShortDashDot","short-dash-dot-dot":"esriSLSShortDashDotDot","long-dash":"esriSLSLongDash","long-dash-dot":"esriSLSLongDashDot"},getDefaults:function(){return g.mixin(this.inherited(arguments),m)},normalizeCtorArgs:function(b,f,e,a,g,h){if(b&&"string"!==typeof b)return b;var c={};null!=b&&(c.style=b);null!=f&&(c.color=f);null!=e&&(c.width=p.toPt(e));null!=a&&(c.cap=a);null!=g&&
(c.join=g);null!=h&&(c.miterLimit=p.toPt(h));return c},clone:function(){return new h({color:g.clone(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit})}});g.mixin(h,l);h.defaultProps=m;return h})},"esri/symbols/LineSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],function(b,g,p){return b(p,{declaredClass:"esri.symbols.LineSymbol",properties:{color:{},type:"simple-line",width:{value:.75,cast:g.toPt,json:{write:!0}}}})})},
"esri/symbols/support/urlUtils":function(){define(["require","exports","../../core/urlUtils"],function(b,g,p){function f(b,f,e){return f.imageData?p.makeData({mediaType:f.contentType||"image/png",isBase64:!0,data:f.imageData}):l(f.url,e)}function l(b,f){return!f||"service"!==f.origin&&"portal-item"!==f.origin||!f.layer||"feature"!==f.layer.type&&"stream"!==f.layer.type||p.isAbsolute(b)||!f.layer.parsedUrl?p.read(b,f):p.join(f.layer.parsedUrl.path,"images",b)}function m(b,f,e,a){p.isDataProtocol(b)?
(b=p.dataComponents(b),f.contentType=b.mediaType,f.imageData=b.data,e&&e.imageData===f.imageData&&e.url&&(f.url=h(e.url,a))):f.url=h(b,a)}function h(b,f){return p.write(b,f)}Object.defineProperty(g,"__esModule",{value:!0});g.readImageDataOrUrl=f;g.read=l;g.writeImageDataAndUrl=m;g.write=h;g.urlPropertyDefinition={json:{read:{source:["imageData","url"],reader:f},write:{writer:function(b,f,e,a){m(b,f,this.source,a)}}}};g.sourcePropertyDefinition={readOnly:!0,json:{read:{source:["imageData","url"],reader:function(b,
f,e){b={};f.imageData&&(b.imageData=f.imageData);f.contentType&&(b.contentType=f.contentType);f.url&&(b.url=l(f.url,e));return b}}}}})},"esri/symbols/PictureMarkerSymbol":function(){define(["../core/declare","../core/lang","../core/screenUtils","./MarkerSymbol","./support/urlUtils"],function(b,g,p,f,l){var m={width:12,height:12,angle:0,xoffset:0,yoffset:0},h=b(f,{declaredClass:"esri.symbols.PictureMarkerSymbol",properties:{color:{json:{write:!1}},type:"picture-marker",url:l.urlPropertyDefinition,
source:l.sourcePropertyDefinition,height:{json:{read:{source:["height","size"],reader:function(b,f){return f.size||b}},write:!0},cast:p.toPt},width:{json:{read:{source:["width","size"],reader:function(b,f){return f.size||b}},write:!0},cast:p.toPt},size:{json:{write:!1}}},getDefaults:function(){return g.mixin(this.inherited(arguments),m)},normalizeCtorArgs:function(b,f,e){if(b&&"string"!==typeof b&&null==b.imageData)return b;var a={};b&&(a.url=b);null!=f&&(a.width=p.toPt(f));null!=e&&(a.height=p.toPt(e));
return a},clone:function(){var b=new h({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});b._set("source",g.clone(this.source));return b}});h.defaultProps=m;return h})},"esri/symbols/MarkerSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],function(b,g,p){return b(p,{declaredClass:"esri.symbols.MarkerSymbol",properties:{angle:{value:0,json:{read:function(b){return b&&-1*b},write:function(b,g){g.angle=b&&-1*b}}},
type:{},xoffset:{value:0,cast:g.toPt,json:{write:!0}},yoffset:{value:0,cast:g.toPt,json:{write:!0}},size:{value:9,cast:function(b){return"auto"===b?b:g.toPt(b)},json:{write:!0}}}})})},"esri/symbols/PointSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Error ../core/lang ../core/accessorSupport/decorators ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer ./callouts/calloutUtils ./support/Symbol3DVerticalOffset".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u){var z=l.ofType({base:null,key:"type",typeMap:{icon:q,object:e,text:k}});return function(a){function b(b){b=a.call(this)||this;b.verticalOffset=null;b.callout=null;b.symbolLayers=new z;b.type="point-3d";return b}p(b,a);e=b;b.prototype.writeSymbolLayers=function(a,b,c,e){var d=a.filter(function(a){return"text"!==a.type});e&&e.messages&&d.length<a.length&&(a=a.find(function(a){return"text"===a.type}),e.messages.push(new m("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PointSymbol3D",
{symbolLayer:a})));b[c]=d.map(function(a){return a.write({},e)}).toArray()};b.prototype.supportsCallout=function(){if(1!==(this.symbolLayers?this.symbolLayers.length:0))return!1;switch(this.symbolLayers.getItemAt(0).type){case "icon":case "text":case "object":return!0}return!1};b.prototype.hasVisibleCallout=function(){return r.hasVisibleCallout(this)};b.prototype.hasVisibleVerticalOffset=function(){return r.hasVisibleVerticalOffset(this)};b.prototype.clone=function(){return new e({verticalOffset:h.clone(this.verticalOffset),
callout:h.clone(this.callout),styleOrigin:h.clone(this.styleOrigin),symbolLayers:h.clone(this.symbolLayers),thumbnail:h.clone(this.thumbnail)})};var e;f([c.property({type:u.default,json:{write:!0}})],b.prototype,"verticalOffset",void 0);f([c.property(r.calloutProperty)],b.prototype,"callout",void 0);f([c.property({type:z})],b.prototype,"symbolLayers",void 0);f([c.writer("web-scene","symbolLayers")],b.prototype,"writeSymbolLayers",null);f([c.property()],b.prototype,"type",void 0);return b=e=f([c.subclass("esri.symbols.PointSymbol3D")],
b)}(c.declared(a))})},"esri/symbols/PolygonSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Error ../core/lang ../core/accessorSupport/decorators ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z){var v=l.ofType({base:null,key:"type",typeMap:{extrude:q,fill:e,icon:a,line:k,
object:r,text:z}});return function(a){function b(b){b=a.call(this)||this;b.type="polygon-3d";return b}p(b,a);d=b;b.prototype.writeSymbolLayers=function(a,b,c,d){var e=a.filter(function(a){return"text"!==a.type});d&&d.messages&&e.length<a.length&&(a=a.find(function(a){return"text"===a.type}),d.messages.push(new m("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PolygonSymbol3D",{symbolLayer:a})));b[c]=e.map(function(a){return a.write({},d)}).toArray()};b.prototype.clone=
function(){return new d({styleOrigin:h.clone(this.styleOrigin),symbolLayers:h.clone(this.symbolLayers),thumbnail:h.clone(this.thumbnail)})};b.fromJSON=function(a){var b=new d;b.read(a);if(2===b.symbolLayers.length&&"fill"===b.symbolLayers.getItemAt(0).type&&"line"===b.symbolLayers.getItemAt(1).type){var c=b.symbolLayers.getItemAt(0),e=b.symbolLayers.getItemAt(1);!e.enabled||a.symbolLayers&&a.symbolLayers[1]&&!1===a.symbolLayers[1].enable||(c.outline={size:e.size,color:e.material.color});b.symbolLayers.removeAt(1)}return b};
var d;f([c.property({type:v})],b.prototype,"symbolLayers",void 0);f([c.writer("web-scene","symbolLayers")],b.prototype,"writeSymbolLayers",null);f([c.property()],b.prototype,"type",void 0);return b=d=f([c.subclass("esri.symbols.PolygonSymbol3D")],b)}(c.declared(u))})},"esri/symbols/SimpleFillSymbol":function(){define(["../core/declare","../core/lang","./FillSymbol","./SimpleLineSymbol"],function(b,g,p,f){var l={style:"solid",outline:new f,color:[0,0,0,.25]},m=b(p,{declaredClass:"esri.symbols.SimpleFillSymbol",
properties:{color:{},type:"simple-fill",style:{value:"solid",type:String,json:{read:function(b){return g.valueOf(this._styles,b)||void 0},write:function(b,c){c.style=this._styles[b]}}}},_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical","forward-diagonal":"esriSFSForwardDiagonal","backward-diagonal":"esriSFSBackwardDiagonal",cross:"esriSFSCross","diagonal-cross":"esriSFSDiagonalCross"},getDefaults:function(){return g.mixin(this.inherited(arguments),
l)},normalizeCtorArgs:function(b,c,f){if(b&&"string"!==typeof b)return b;var e={};b&&(e.style=b);c&&(e.outline=c);f&&(e.color=f);return e},clone:function(){return new m({color:g.clone(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}});g.mixin(m,{STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forward-diagonal",STYLE_BACKWARD_DIAGONAL:"backward-diagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonal-cross"});
m.defaultProps=l;return m})},"esri/symbols/SimpleMarkerSymbol":function(){define(["../core/declare","../core/lang","../core/screenUtils","./MarkerSymbol","./SimpleLineSymbol"],function(b,g,p,f,l){var m={style:"circle",color:[255,255,255,.25],outline:new l,size:12,angle:0,xoffset:0,yoffset:0},h=b(f,{declaredClass:"esri.symbols.SimpleMarkerSymbol",properties:{color:{json:{write:function(b,f){b&&"x"!==this.style&&"cross"!==this.style&&(f.color=b.toJSON())}}},type:"simple-marker",size:{value:12},style:{type:String,
value:"circle",json:{read:function(b){return g.valueOf(this._styles,b)},write:function(b,f){f.style=this._styles[b]}}},path:{type:String,value:null,set:function(b){this.style="path";this._set("path",b)},json:{write:!0}},outline:{type:l,json:{write:!0}}},_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond",path:"esriSMSPath"},getDefaults:function(){return g.mixin(this.inherited(arguments),m)},normalizeCtorArgs:function(b,f,e,a){if(b&&"string"!==
typeof b)return b;var c={};b&&(c.style=b);null!=f&&(c.size=p.toPt(f));e&&(c.outline=e);a&&(c.color=a);return c},clone:function(){return new h({angle:this.angle,color:g.clone(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})},read:function q(b,a){return this.getInherited(q,arguments).call(this,g.mixin({outline:null},b),a)}});g.mixin(h,{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",
STYLE_DIAMOND:"diamond",STYLE_PATH:"path",STYLE_TARGET:"target"});h.defaultProps=m;return h})},"esri/symbols/TextSymbol":function(){define("../core/declare ../core/lang ../core/screenUtils ../Color ./Symbol ./Font".split(" "),function(b,g,p,f,l,m){var h={text:"",rotated:!1,kerning:!0,color:[0,0,0,1],font:{},angle:0,xoffset:0,yoffset:0,horizontalAlignment:"center"},c=b(l,{declaredClass:"esri.symbols.TextSymbol",properties:{backgroundColor:{type:f,json:{write:!0}},borderLineColor:{type:f,json:{write:!0}},
borderLineSize:{type:Number,json:{write:!0}},color:{},font:{type:m,json:{write:!0}},horizontalAlignment:{value:"center",json:{write:!0}},kerning:{value:!0,json:{write:!0}},haloColor:{type:f,json:{write:!0}},haloSize:{type:Number,cast:p.toPt,json:{write:!0}},rightToLeft:{json:{write:!0}},rotated:{value:!1,json:{write:!0}},text:{type:String,json:{write:!0}},type:"text",verticalAlignment:{type:String,json:{write:!0}},xoffset:{value:0,type:Number,cast:p.toPt,json:{write:!0}},yoffset:{value:0,type:Number,
cast:p.toPt,json:{write:!0}},angle:{type:Number,value:0,json:{read:function(b){return b&&-1*b},write:function(b,c){c.angle=b&&-1*b}}},width:{json:{write:!0}}},getDefaults:function(){return g.mixin(this.inherited(arguments),h)},normalizeCtorArgs:function(b,c,a){if(b&&"string"!==typeof b)return b;var e={};b&&(e.text=b);c&&(e.font=c);a&&(e.color=a);return e},clone:function(){return new c({angle:this.angle,backgroundColor:g.clone(this.backgroundColor),borderLineColor:g.clone(this.borderLineColor),borderLineSize:this.borderLineSize,
color:g.clone(this.color),font:this.font&&this.font.clone(),haloColor:g.clone(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}});g.mixin(c,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",
DECORATION_LINETHROUGH:"line-through"});c.defaultProps=h;return c})},"esri/symbols/WebStyleSymbol":function(){define("require exports ../core/tsSupport/extendsHelper ../core/tsSupport/decorateHelper ../core/Logger ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../portal/Portal ./Symbol ./support/Thumbnail".split(" "),function(b,g,p,f,l,m,h,c,q,e,a){var k=l.getLogger("esri.symbols.WebStyleSymbol");return function(e){function g(a){a=e.call(this,a)||this;a.styleName=null;a.portal=
null;a.styleUrl=null;a.thumbnail=null;a.name=null;a.type="web-style";return a}p(g,e);l=g;g.prototype._readStyleUrl=function(a,b,c){return h.read(a,c)};g.prototype._writeStyleUrl=function(a,b,c,d){b.styleUrl=h.write(a,d);h.isAbsolute(b.styleUrl)&&(b.styleUrl=h.normalize(b.styleUrl))};g.prototype._writeType=function(a,b,c,d){b.type="styleSymbolReference"};g.prototype.read=function(a,b){this.portal=b?b.portal:void 0;this.inherited(arguments,[a,b]);return this};g.prototype.clone=function(){return new l({name:this.name,
styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};g.prototype.fetchSymbol=function(){var a=this;return m.create(function(a){return b(["./support/styleUtils"],a)}).then(function(b){b=b.resolveWebStyleSymbol(a,{portal:a.portal});b.catch(function(a){k.error("#fetchSymbol()","Failed to create symbol from style",a)});return b})};var l;f([c.property({json:{write:!1}})],g.prototype,"color",void 0);f([c.property({type:String,json:{write:!0}})],g.prototype,"styleName",void 0);f([c.property({type:q,
json:{write:!1}})],g.prototype,"portal",void 0);f([c.property({type:String,json:{write:!0}})],g.prototype,"styleUrl",void 0);f([c.reader("styleUrl")],g.prototype,"_readStyleUrl",null);f([c.writer("styleUrl")],g.prototype,"_writeStyleUrl",null);f([c.property({type:a.default,json:{read:!1}})],g.prototype,"thumbnail",void 0);f([c.property({type:String,json:{write:!0}})],g.prototype,"name",void 0);f([c.property({type:String,readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0);f([c.writer("type")],
g.prototype,"_writeType",null);return g=l=f([c.subclass("esri.symbols.WebStyleSymbol")],g)}(c.declared(e))})},"esri/symbols/support/symbolConversion":function(){define("require exports ../../Color ../../symbols ../../core/Error ../../core/lang ../FillSymbol3DLayer ../Font ../IconSymbol3DLayer ../LabelSymbol3D ../LineSymbol3D ../LineSymbol3DLayer ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../TextSymbol ../TextSymbol3DLayer ../WebStyleSymbol".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x){function y(a){var b=a.color?a.color.clone():new p([255,255,255]),c,d,e;a instanceof r?(a.color&&0===a.color.r&&0===a.color.g&&0===a.color.b&&(b=new p([255,255,255])),c={href:a.url},d=a.width<=a.height?a.height:a.width):(c=a.style,c in A?c=A[c]:(console.log(c+' cannot be mapped to Icon symbol. Fallback to "circle"'),c="circle"),c={primitive:c},d=a.size,a.outline&&a.outline.color&&0<a.outline.width&&(e={size:a.outline.width,color:a.outline.color.clone()}));
return new u(new q({size:d,resource:c,material:{color:b},outline:e}))}Object.defineProperty(g,"__esModule",{value:!0});var A={};A[t.STYLE_CIRCLE]="circle";A[t.STYLE_CROSS]="cross";A[t.STYLE_DIAMOND]="kite";A[t.STYLE_SQUARE]="square";A[t.STYLE_X]="x";g.to3D=function(b,g,q,p){void 0===g&&(g=!1);void 0===q&&(q=!1);void 0===p&&(p=!0);if(!b)return{symbol:null};if(f.isSymbol3D(b)||b instanceof x)p=b.clone();else if(b instanceof w)p=new a(new k({size:b.width||1,material:{color:b.color?b.color.clone():[255,
255,255]}}));else if(b instanceof t)p=y(b);else if(b instanceof r)p=y(b);else if(b instanceof v)p=new h({material:{color:b.color?b.color.clone():[255,255,255]}}),b.outline&&b.outline.color&&(p.outline={size:b.outline.width||0,color:b.outline.color}),p=new z(p);else if(b instanceof d){var C;C=b.haloColor;var B=b.haloSize;C=C&&0<B?{color:m.clone(C),size:B}:null;B=b.font?b.font.clone():new c;p=new (p?e:u)(new n({size:B.size,font:B,halo:C,material:{color:b.color.clone()},text:b.text}))}else return{error:new l("symbol-conversion:unsupported-2d-symbol",
"2D symbol of type '"+(b.type||b.declaredClass)+"' is unsupported in 3D",{symbol:b})};g&&(p.id=b.id);if(q&&f.isSymbol3D(p))for(b=0;b<p.symbolLayers.length;++b)p.symbolLayers.getItemAt(b)._ignoreDrivers=!0;return{symbol:p}}})},"esri/symbols":function(){define("require exports ./symbols/ExtrudeSymbol3DLayer ./symbols/FillSymbol ./symbols/FillSymbol3DLayer ./symbols/Font ./symbols/IconSymbol3DLayer ./symbols/LabelSymbol3D ./symbols/LineSymbol3D ./symbols/LineSymbol3DLayer ./symbols/MarkerSymbol ./symbols/MeshSymbol3D ./symbols/ObjectSymbol3DLayer ./symbols/PathSymbol3DLayer ./symbols/PictureFillSymbol ./symbols/PictureMarkerSymbol ./symbols/PointSymbol3D ./symbols/PolygonSymbol3D ./symbols/SimpleFillSymbol ./symbols/SimpleLineSymbol ./symbols/SimpleMarkerSymbol ./symbols/Symbol ./symbols/Symbol3D ./symbols/Symbol3DLayer ./symbols/TextSymbol ./symbols/TextSymbol3DLayer ./symbols/WebStyleSymbol ./symbols/support/jsonUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x,y,A,D,B,F,C,G){Object.defineProperty(g,"__esModule",{value:!0});g.ExtrudeSymbol3DLayer=p;g.BaseFillSymbol=f;g.FillSymbol3DLayer=l;g.Font=m;g.IconSymbol3DLayer=h;g.LabelSymbol3D=c;g.LineSymbol3D=q;g.LineSymbol3DLayer=e;g.BaseMarkerSymbol=a;g.MeshSymbol3D=k;g.ObjectSymbol3DLayer=r;g.PathSymbol3DLayer=u;g.PictureFillSymbol=z;g.PictureMarkerSymbol=v;g.PointSymbol3D=w;g.PolygonSymbol3D=t;g.SimpleFillSymbol=d;g.SimpleLineSymbol=n;g.SimpleMarkerSymbol=x;
g.BaseSymbol=y;g.BaseSymbol3D=A;g.BaseSymbol3DLayer=D;g.TextSymbol=B;g.TextSymbol3DLayer=F;g.WebStyleSymbol=C;g.fromJSON=G.fromJSON;g.isSymbol=function(a){return a instanceof g.BaseSymbol};g.isSymbol2D=function(a){if(!a)return!1;switch(a.type){case "picture-fill":case "picture-marker":case "simple-fill":case "simple-line":case "simple-marker":case "text":return!0;default:return!1}};g.isSymbol3D=function(a){if(!a)return!1;switch(a.type){case "label-3d":case "line-3d":case "mesh-3d":case "point-3d":case "polygon-3d":return!0;
default:return!1}}})},"esri/symbols/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PictureFillSymbol ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../Symbol ../TextSymbol ../WebStyleSymbol".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){Object.defineProperty(g,"__esModule",{value:!0});g.types={base:u,key:"type",typeMap:{"simple-fill":a,
"picture-fill":h,"picture-marker":c,"simple-line":k,"simple-marker":r,text:z,"label-3d":f,"line-3d":l,"mesh-3d":m,"point-3d":q,"polygon-3d":e,"web-style":v}};g.rendererTypes={base:u,key:"type",typeMap:{"simple-fill":a,"picture-fill":h,"picture-marker":c,"simple-line":k,"simple-marker":r,text:z,"line-3d":l,"mesh-3d":m,"point-3d":q,"polygon-3d":e,"web-style":v}};g.labelTypes={base:u,key:"type",typeMap:{text:z,"label-3d":f}};g.types3D={base:u,key:"type",typeMap:{"label-3d":f,"line-3d":l,"mesh-3d":m,
"point-3d":q,"polygon-3d":e,"web-style":v}};g.rendererTypes3D={base:u,key:"type",typeMap:{"line-3d":l,"mesh-3d":m,"point-3d":q,"polygon-3d":e,"web-style":v}};g.labelTypes3D={base:u,key:"type",typeMap:{"label-3d":f}};g.ensureType=p.ensureOneOfType(g.types)})},"esri/tasks/QueryTask":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/tsSupport/assignHelper ../geometry ../core/accessorSupport/decorators ./Task ./operations/query ./operations/queryRelatedRecords ./support/FeatureSet ./support/Query ./support/RelationshipQuery".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u){return function(b){function g(a){a=b.call(this,a)||this;a.gdbVersion=null;a.source=null;return a}p(g,b);g.prototype.execute=function(a,b){return this.executeJSON(a,b).then(function(a){return k.fromJSON(a)})};g.prototype.executeJSON=function(a,b){return e.executeQuery(this.parsedUrl,this._normalizeQuery(a),m({},this.requestOptions,b)).then(function(a){return a.data})};g.prototype.executeForCount=function(a,b){return e.executeQueryForCount(this.parsedUrl,this._normalizeQuery(a),
m({},this.requestOptions,b)).then(function(a){return a.data.count})};g.prototype.executeForExtent=function(a,b){return e.executeQueryForExtent(this.parsedUrl,this._normalizeQuery(a),m({},this.requestOptions,b)).then(function(a){return{count:a.data.count,extent:h.Extent.fromJSON(a.data.extent)}})};g.prototype.executeForIds=function(a,b){return e.executeQueryForIds(this.parsedUrl,this._normalizeQuery(a),m({},this.requestOptions,b)).then(function(a){return a.data.objectIds})};g.prototype.executeRelationshipQuery=
function(b,c){if(this.gdbVersion||this.source)b=b.clone().set({gdbVersion:this.gdbVersion||b.gdbVersion,source:this.source||b.source});return a.executeRelationshipQuery(this.parsedUrl,b,m({},this.requestOptions,c)).then(function(a){var b=a.data,c={};Object.keys(b).forEach(function(a){return c[a]=k.fromJSON(b[a])});return c})};g.prototype._normalizeQuery=function(a){return this.gdbVersion||this.source?a.clone().set({gdbVersion:this.gdbVersion||a.gdbVersion,source:this.source||a.source}):a};f([c.property()],
g.prototype,"gdbVersion",void 0);f([c.property()],g.prototype,"source",void 0);f([l(0,c.cast(r))],g.prototype,"execute",null);f([l(0,c.cast(r))],g.prototype,"executeJSON",null);f([l(0,c.cast(r))],g.prototype,"executeForCount",null);f([l(0,c.cast(r))],g.prototype,"executeForExtent",null);f([l(0,c.cast(r))],g.prototype,"executeForIds",null);f([l(0,c.cast(u))],g.prototype,"executeRelationshipQuery",null);return g=f([c.subclass("esri.tasks.QueryTask")],g)}(c.declared(q))})},"esri/tasks/Task":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/tsSupport/assignHelper ../core/Accessor ../core/urlUtils ../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h,c,q){return function(b){function a(a){a=b.call(this)||this;a.requestOptions=null;a.url=null;return a}p(a,b);a.prototype.normalizeCtorArgs=function(a,b){return"string"!==typeof a?a:m({url:a},b)};Object.defineProperty(a.prototype,"parsedUrl",{get:function(){return this._parseUrl(this.url)},enumerable:!0,configurable:!0});a.prototype._parseUrl=function(a){return a?c.urlToObject(a):null};a.prototype._encode=function(a,b,c){var e={},f;for(f in a)if("declaredClass"!==f){var g=a[f];
if(null!=g&&"function"!==typeof g)if(Array.isArray(g)){e[f]=[];for(var k=0;k<g.length;k++)e[f][k]=this._encode(g[k])}else"object"===typeof g?g.toJSON&&(g=g.toJSON(c&&c[f]),e[f]=b?g:JSON.stringify(g)):e[f]=g}return e};f([q.property({readOnly:!0,dependsOn:["url"]})],a.prototype,"parsedUrl",null);f([q.property()],a.prototype,"requestOptions",void 0);f([q.property({type:String})],a.prototype,"url",void 0);return a=f([q.subclass("esri.tasks.Task")],a)}(q.declared(h))})},"esri/tasks/operations/query":function(){define("require exports ../../core/tsSupport/assignHelper ../../request ../../core/urlUtils ../../geometry/support/jsonUtils ../../geometry/support/normalizeUtils ./pbfQueryUtils ./urlUtils".split(" "),
function(b,g,p,f,l,m,h,c,q){function e(a){var b=a.geometry;a=a.toJSON();b&&(a.geometry=JSON.stringify(b),a.geometryType=m.getJsonType(b),a.inSR=b.spatialReference.wkid||JSON.stringify(b.spatialReference));a.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(","));a.objectIds&&(a.objectIds=a.objectIds.join(","));a.orderByFields&&(a.orderByFields=a.orderByFields.join(","));a.outFields&&(-1!==a.outFields.indexOf("*")?a.outFields="*":a.outFields=a.outFields.join(","));
a.outSR?a.outSR=a.outSR.wkid||JSON.stringify(a.outSR):b&&(a.returnGeometry||a.returnCentroid)&&(a.outSR=a.inSR);a.returnGeometry&&delete a.returnGeometry;a.outStatistics&&(a.outStatistics=JSON.stringify(a.outStatistics));a.pixelSize&&(a.pixelSize=JSON.stringify(a.pixelSize));a.quantizationParameters&&(a.quantizationParameters=JSON.stringify(a.quantizationParameters));a.source&&(a.layer=JSON.stringify({source:a.source}),delete a.source);a.timeExtent&&(b=a.timeExtent,a.time=[null!=b.startTime?b.startTime:
"null",null!=b.endTime?b.endTime:"null"],delete a.timeExtent);return a}function a(a,b,c,g,m){void 0===g&&(g={});var k="string"===typeof a?l.urlToObject(a):a;a=b.geometry?[b.geometry]:[];g.responseType="pbf"===c?"array-buffer":"json";return h.normalizeCentralMeridian(a).then(function(a){if(a=a&&a[0])b=b.clone(),b.geometry=a;a=q.mapParameters(p({},k.query,{f:c},m,e(b)));return f(k.path+"/query",p({},g,{query:a,callbackParamName:"callback"}))})}Object.defineProperty(g,"__esModule",{value:!0});g.queryToQueryStringParameters=
e;g.executeQuery=function(b,c,e){return a(b,c,"json",e)};g.executeQueryPBF=function(b,e,f){return a(b,e,"pbf",f).then(function(a){var b=c.parsePBFFeatureQuery(a.data);a.data=b;return a})};g.executeQueryForIds=function(b,c,e){return a(b,c,"json",e,{returnIdsOnly:!0})};g.executeQueryForCount=function(b,c,e){return a(b,c,"json",e,{returnIdsOnly:!0,returnCountOnly:!0})};g.executeQueryForExtent=function(b,c,e){return a(b,c,"json",e,{returnExtentOnly:!0,returnCountOnly:!0}).then(function(a){var b=a.data;
if(!b.hasOwnProperty("extent")){if(b.features)throw Error("Layer does not support extent calculation.");if(b.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");}return a})}})},"esri/geometry/support/normalizeUtils":function(){define("require exports ../../config ../../core/Error ../../core/Logger ../../core/promiseUtils ../Polygon ../Polyline ../SpatialReference ./spatialReferenceUtils ./webMercatorUtils ../../tasks/GeometryService".split(" "),function(b,g,p,f,l,m,h,
c,q,e,a,k){function r(a){return"polygon"===a.type?a.rings:a.paths}function u(a,b){return Math.ceil((a-b)/(2*b))}function z(a,b){for(var c=0,d=r(a);c<d.length;c++)for(var e=0,f=d[c];e<f.length;e++)f[e][0]+=b;return a}function v(a){for(var b=[],c=0,d=0,e=0;e<a.length;e++){for(var f=a[e],g=null,k=0;k<f.length;k++)g=f[k],b.push(g),0===k?d=c=g[0]:(c=Math.min(c,g[0]),d=Math.max(d,g[0]));g&&b.push([(c+d)/2,0])}return b}function w(a,b){if(!(a instanceof c||a instanceof h))throw y.error("straightLineDensify: the input geometry is neither polyline nor polygon"),
new f("straightLineDensify: the input geometry is neither polyline nor polygon");for(var d=[],e=0,g=r(a);e<g.length;e++){var k=g[e],l=[];d.push(l);l.push([k[0][0],k[0][1]]);for(var n=0;n<k.length-1;n++){var m=k[n][0],q=k[n][1],p=k[n+1][0],u=k[n+1][1],t=Math.sqrt((p-m)*(p-m)+(u-q)*(u-q)),z=(u-q)/t,v=(p-m)/t,x=t/b;if(1<x){for(var w=1;w<=x-1;w++){var B=w*b;l.push([v*B+m,z*B+q])}t=(t+Math.floor(x-1)*b)/2;l.push([v*t+m,z*t+q])}l.push([p,u])}}return"polygon"===a.type?new h({rings:d,spatialReference:a.spatialReference}):
new c({paths:d,spatialReference:a.spatialReference})}function t(b,c,d){c&&(b=w(b,1E6),b=a.webMercatorToGeographic(b,!0));d&&(b=z(b,d));return b}function d(a,b,c){if(Array.isArray(a)){var d=a[0];if(d>b){var e=u(d,b);a[0]=d+-2*e*b}else d<c&&(e=u(d,c),a[0]=d+-2*e*c)}else d=a.x,d>b?(e=u(d,b),a=a.clone().offset(-2*e*b,0)):d<c&&(e=u(d,c),a=a.clone().offset(-2*e*c,0));return a}function n(a,b){for(var c=-1,d=function(d){var e=b.cutIndexes[d],f=b.geometries[d],g=r(f);d=function(a){var b=g[a];b.some(function(c){if(!(180>
c[0])){for(var d=c=0;d<b.length;d++){var e=b[d][0];c=e>c?e:c}c=Number(c.toFixed(9));c=-360*u(c,180);for(d=0;d<b.length;d++)e=f.getPoint(a,d),f.setPoint(a,d,e.clone().offset(c,0))}return!0})};for(var k=0;k<g.length;k++)d(k);if(e===c)if("polygon"===a[0].type)for(d=0,k=r(f);d<k.length;d++)a[e]=a[e].addRing(k[d]);else{if("polyline"===a[0].type)for(d=0,k=r(f);d<k.length;d++)a[e]=a[e].addPath(k[d])}else c=e,a[e]=f},e=0;e<b.cutIndexes.length;e++)d(e);return a}function x(b,f){if(!Array.isArray(b))return x([b],
f);f||(D||(D=new k({url:p.geometryServiceUrl})),f=D);for(var g,l,q,r,y,v,w,B=0,F=[],N=[],H=0;H<b.length;H++){var O=b[H];if(O)if(g||(g=O.spatialReference,l=e.getInfo(g),v=(q=g.isWebMercator)?102100:4326,r=A[v].maxX,y=A[v].minX,w=A[v].plus180Line,v=A[v].minus180Line),l)if("mesh"===O.type)N.push(O);else if("point"===O.type)N.push(d(O.clone(),r,y));else if("multipoint"===O.type)O=O.clone(),O.points=O.points.map(function(a){return d(a,r,y)}),N.push(O);else if("extent"===O.type){var J=O.clone(),O=J._normalize(!1,
!1,l);N.push(O.rings?new h(O):O)}else if(O.extent){var J=O.extent,P=2*u(J.xmin,y)*r,O=0===P?O.clone():z(O.clone(),P);J.offset(P,0);J.intersects(w)&&J.xmax!==r?(B=J.xmax>B?J.xmax:B,O=t(O,q),F.push(O),N.push("cut")):J.intersects(v)&&J.xmin!==y?(B=2*J.xmax*r>B?2*J.xmax*r:B,O=t(O,q,360),F.push(O),N.push("cut")):N.push(O)}else N.push(O.clone());else N.push(O);else N.push(O)}g=u(B,r);l=-90;w=g;for(B=new c;0<g;)H=-180+360*g,B.addPath([[H,l],[H,-1*l]]),l*=-1,g--;if(0<F.length&&0<w)return f.cut(F,B).then(function(a){return n(F,
a)}).then(function(c){for(var d=[],e=[],g=0;g<N.length;g++){var k=N[g];if("cut"!==k)e.push(k);else{var k=c.shift(),h=b[g];"polygon"===h.type&&h.rings&&1<h.rings.length&&k.rings.length>=h.rings.length?(d.push(k),e.push("simplify")):e.push(q?a.geographicToWebMercator(k):k)}}return d.length?f.simplify(d).then(function(b){for(var c=[],d=0;d<e.length;d++){var f=e[d];"simplify"!==f?c.push(f):c.push(q?a.geographicToWebMercator(b.shift()):b.shift())}return c}):e});g=[];for(l=0;l<N.length;l++)w=N[l],"cut"!==
w?g.push(w):(w=F.shift(),g.push(!0===q?a.geographicToWebMercator(w):w));return m.resolve(g)}Object.defineProperty(g,"__esModule",{value:!0});var y=l.getLogger("esri.geometry.support.normalizeUtils"),A={102100:{maxX:2.0037508342788905E7,minX:-2.0037508342788905E7,plus180Line:new c({paths:[[[2.0037508342788905E7,-2.0037508342788905E7],[2.0037508342788905E7,2.0037508342788905E7]]],spatialReference:q.WebMercator}),minus180Line:new c({paths:[[[-2.0037508342788905E7,-2.0037508342788905E7],[-2.0037508342788905E7,
2.0037508342788905E7]]],spatialReference:q.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new c({paths:[[[180,-180],[180,180]]],spatialReference:q.WebMercator}),minus180Line:new c({paths:[[[-180,-180],[-180,180]]],spatialReference:q.WebMercator})}};g.straightLineDensify=w;var D;g.normalizeCentralMeridian=x;g.getDenormalizedExtent=function(a){var b;if(!a)return null;var c=a.extent;if(!c)return null;var d=a.spatialReference&&e.getInfo(a.spatialReference);if(!d)return c;var d=d.valid,f=d[0],d=d[1],
g=c.width,k=c.xmin;b=c.xmax;b=[b,k];k=b[0];b=b[1];if("extent"===a.type||0===g||g<=d||g>2*d||k<f||b>d)return c;var h;switch(a.type){case "polygon":if(1<a.rings.length)h=v(a.rings);else return c;break;case "polyline":if(1<a.paths.length)h=v(a.paths);else return c;break;case "multipoint":h=a.points}a=c.clone();for(f=0;f<h.length;f++){var l=h[f][0];0>l?(l+=d,b=Math.max(l,b)):(l-=d,k=Math.min(l,k))}a.xmin=k;a.xmax=b;return a.width<g?(a.xmin-=d,a.xmax-=d,a):c}})},"esri/tasks/GeometryService":function(){define("../core/lang ../core/kebabDictionary ../core/accessorSupport/ensureType ../geometry/Extent ../geometry/Multipoint ../geometry/Polyline ../geometry/Polygon ../geometry/support/jsonUtils ../request ./Task ./support/ProjectParameters".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){var k=g({MGRS:"mgrs",USNG:"usng",UTM:"utm",GeoRef:"geo-ref",GARS:"gars",DMS:"dms",DDM:"ddm",DD:"dd"}),r=p.ensureType(a);g=e.createSubclass({declaredClass:"esri.tasks.GeometryService",areasAndLengths:function(a,c){a={query:b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/areasAndLengths",a).then(function(a){return a.data})},autoComplete:function(a,
c,e){var f=a[0].spatialReference;a={query:b.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),polygons:JSON.stringify(this._encodeGeometries(a).geometries),polylines:JSON.stringify(this._encodeGeometries(c).geometries)}),callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/autoComplete",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new h({spatialReference:f,rings:a.rings})})})},buffer:function(a,
c){var e=b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),f=a.outSpatialReference||a.geometries[0].spatialReference;a={query:e,callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/buffer",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new h({spatialReference:f,rings:a.rings})})})},cut:function(a,e,f){var g=a[0].spatialReference,k=a.map(function(a){return a.toJSON()});a={query:b.mixin({},this.parsedUrl.query,
{f:"json",sr:JSON.stringify(g.toJSON()),target:JSON.stringify({geometryType:c.getJsonType(a[0]),geometries:k}),cutter:JSON.stringify(e.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||f)a=b.mixin({},this.requestOptions,f,a);return q(this.parsedUrl.path+"/cut",a).then(function(a){a=a.data;return{cutIndexes:a.cutIndexes,geometries:(a.geometries||[]).map(function(a){return c.fromJSON(a).set("spatialReference",g)})}})},convexHull:function(a,e){var f=a[0].spatialReference;a={query:b.mixin({},
this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/convexHull",a).then(function(a){return c.fromJSON(a.data.geometry).set("spatialReference",f)})},densify:function(a,e){var f=b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),g=a.geometries[0].spatialReference;a={query:f,callbackParamName:"callback"};if(this.requestOptions||
e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/densify",a).then(function(a){return(a.data.geometries||[]).map(function(a){return c.fromJSON(a).set("spatialReference",g)})})},difference:function(a,e,f){var g=a[0].spatialReference;a={query:b.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(g.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a)),geometry:JSON.stringify({geometryType:c.getJsonType(e),geometry:e.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||
f)a=b.mixin({},this.requestOptions,f,a);return q(this.parsedUrl.path+"/difference",a).then(function(a){return(a.data.geometries||[]).map(function(a){return c.fromJSON(a).set("spatialReference",g)})})},distance:function(a,c){a={query:b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/distance",a).then(this._handleDistanceResponse)},fromGeoCoordinateString:function(a,c){var e=
{};e.sr=null!=a.sr&&"object"===typeof a.sr?a.sr.wkid||JSON.stringify(a.sr):a.sr;e.strings=JSON.stringify(a.strings);e.conversionType=k.toJSON(a.conversionType||"mgrs");e.conversionMode=a.conversionMode;a={query:b.mixin({},this.parsedUrl.query,{f:"json"},e),callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/fromGeoCoordinateString",a).then(this._handleFromGeoCoordinateResponse)},generalize:function(a,e){var f=b.mixin({},this.parsedUrl.query,
{f:"json"},a.toJSON()),g=a.geometries[0].spatialReference;a={query:f,callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/generalize",a).then(function(a){return(a.data.geometries||[]).map(function(a){return c.fromJSON(a).set("spatialReference",g)})})},intersect:function(a,e,f){var g=a[0].spatialReference;a={query:b.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(g.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a)),
geometry:JSON.stringify({geometryType:c.getJsonType(e),geometry:e.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||f)a=b.mixin({},this.requestOptions,f,a);return q(this.parsedUrl.path+"/intersect",a).then(function(a){return(a.data.geometries||[]).map(function(a){return c.fromJSON(a).set("spatialReference",g)})})},lengths:function(a,c){a={query:b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,
c,a);return q(this.parsedUrl.path+"/lengths",a).then(function(a){return a.data})},labelPoints:function(a,e){var f=a.map(function(a){return a.toJSON()}),g=a[0].spatialReference;a={query:b.mixin({},this.parsedUrl.query,{f:"json",sr:g.wkid?g.wkid:JSON.stringify(g.toJSON()),polygons:JSON.stringify(f)}),callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/labelPoints",a).then(function(a){return(a.data.labelPoints||[]).map(function(a){return c.fromJSON(a).set("spatialReference",
g)})})},offset:function(a,e){var f=b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),g=a.geometries[0].spatialReference;a={query:f,callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/offset",a).then(function(a){return(a.data.geometries||[]).map(function(a){return c.fromJSON(a).set("spatialReference",g)})})},project:function(a,e){a=r(a);var f=b.mixin({},a.toJSON(),this.parsedUrl.query,{f:"json"}),g=a.outSpatialReference,
k=c.getJsonType(a.geometries[0]),d=this._decodeGeometries;a={query:f,callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/project",a).then(function(a){return d(a.data,k,g)})},relation:function(a,c){a={query:b.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/relation",a).then(this._handleRelationResponse)},
reshape:function(a,e,f){var g=a.spatialReference;a={query:b.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(g.toJSON()),target:JSON.stringify({geometryType:c.getJsonType(a),geometry:a.toJSON()}),reshaper:JSON.stringify(e.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||f)a=b.mixin({},this.requestOptions,f,a);return q(this.parsedUrl.path+"/reshape",a).then(function(a){return c.fromJSON(a.data.geometry).set("spatialReference",g)})},simplify:function(a,e){var f=a[0].spatialReference,
g=b.mixin({},this.parsedUrl.query,{f:"json",sr:f.wkid?f.wkid:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),k=c.getJsonType(a[0]),d=this._decodeGeometries;a={query:g,callbackParamName:"callback"};if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/simplify",a).then(function(a){return d(a.data,k,f)})},toGeoCoordinateString:function(a,c){var e={};e.sr=null!=a.sr&&"object"===typeof a.sr?a.sr.wkid||JSON.stringify(a.sr):a.sr;
e.coordinates=JSON.stringify(a.coordinates);e.conversionType=k.toJSON(a.conversionType||"mgrs");e.conversionMode=a.conversionMode;e.numOfDigits=a.numOfDigits;e.rounding=a.rounding;e.addSpaces=a.addSpaces;a={query:b.mixin({},this.parsedUrl.query,{f:"json"},e),callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/toGeoCoordinateString",a).then(this._handleToGeoCoordinateResponse)},trimExtend:function(a,c){var e=b.mixin({},this.parsedUrl.query,
{f:"json"},a.toJSON()),f=a.sr;a={query:e,callbackParamName:"callback"};if(this.requestOptions||c)a=b.mixin({},this.requestOptions,c,a);return q(this.parsedUrl.path+"/trimExtend",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new m({spatialReference:f,paths:a.paths})})})},union:function(a,e){var f=a[0].spatialReference;a={query:b.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),callbackParamName:"callback"};
if(this.requestOptions||e)a=b.mixin({},this.requestOptions,e,a);return q(this.parsedUrl.path+"/union",a).then(function(a){return c.fromJSON(a.data.geometry).set("spatialReference",f)})},_handleRelationResponse:function(a){return a.data.relations},_handleDistanceResponse:function(a){return(a=a.data)&&a.distance},_handleToGeoCoordinateResponse:function(a){return a.data.strings},_handleFromGeoCoordinateResponse:function(a){return a.data.coordinates},_encodeGeometries:function(a){var b=[],e,f=a.length;
for(e=0;e<f;e++)b.push(a[e].toJSON());return{geometryType:c.getJsonType(a[0]),geometries:b}},_decodeGeometries:function(a,e,f){var g=c.getGeometryType(e);a=a.geometries;var k=[],d={spatialReference:f.toJSON()},h=b.mixin;a.forEach(function(a,b){k[b]=new g(h(a,d))});return k},_toProjectGeometry:function(a){var b=a.spatialReference.toJSON();return a instanceof f?new h({rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]],spatialReference:b}):new m({paths:[[].concat(a.points)],
spatialReference:b})},_fromProjectedGeometry:function(a,b,c){return"extent"===b?(a=a.rings[0],new f(a[0][0],a[0][1],a[2][0],a[2][1],c)):new l({points:a.paths[0],spatialReference:c.toJSON()})}});b.mixin(g,{UNIT_METER:9001,UNIT_GERMAN_METER:9031,UNIT_FOOT:9002,UNIT_SURVEY_FOOT:9003,UNIT_CLARKE_FOOT:9005,UNIT_FATHOM:9014,UNIT_NAUTICAL_MILE:9030,UNIT_SURVEY_CHAIN:9033,UNIT_SURVEY_LINK:9034,UNIT_SURVEY_MILE:9035,UNIT_KILOMETER:9036,UNIT_CLARKE_YARD:9037,UNIT_CLARKE_CHAIN:9038,UNIT_CLARKE_LINK:9039,UNIT_SEARS_YARD:9040,
UNIT_SEARS_FOOT:9041,UNIT_SEARS_CHAIN:9042,UNIT_SEARS_LINK:9043,UNIT_BENOIT_1895A_YARD:9050,UNIT_BENOIT_1895A_FOOT:9051,UNIT_BENOIT_1895A_CHAIN:9052,UNIT_BENOIT_1895A_LINK:9053,UNIT_BENOIT_1895B_YARD:9060,UNIT_BENOIT_1895B_FOOT:9061,UNIT_BENOIT_1895B_CHAIN:9062,UNIT_BENOIT_1895B_LINK:9063,UNIT_INDIAN_FOOT:9080,UNIT_INDIAN_1937_FOOT:9081,UNIT_INDIAN_1962_FOOT:9082,UNIT_INDIAN_1975_FOOT:9083,UNIT_INDIAN_YARD:9084,UNIT_INDIAN_1937_YARD:9085,UNIT_INDIAN_1962_YARD:9086,UNIT_INDIAN_1975_YARD:9087,UNIT_FOOT_1865:9070,
UNIT_RADIAN:9101,UNIT_DEGREE:9102,UNIT_ARCMINUTE:9103,UNIT_ARCSECOND:9104,UNIT_GRAD:9105,UNIT_GON:9106,UNIT_MICRORADIAN:9109,UNIT_ARCMINUTE_CENTESIMAL:9112,UNIT_ARCSECOND_CENTESIMAL:9113,UNIT_MIL6400:9114,UNIT_BRITISH_1936_FOOT:9095,UNIT_GOLDCOAST_FOOT:9094,UNIT_INTERNATIONAL_CHAIN:109003,UNIT_INTERNATIONAL_LINK:109004,UNIT_INTERNATIONAL_YARD:109001,UNIT_STATUTE_MILE:9093,UNIT_SURVEY_YARD:109002,UNIT_50KILOMETER_LENGTH:109030,UNIT_150KILOMETER_LENGTH:109031,UNIT_DECIMETER:109005,UNIT_CENTIMETER:109006,
UNIT_MILLIMETER:109007,UNIT_INTERNATIONAL_INCH:109008,UNIT_US_SURVEY_INCH:109009,UNIT_INTERNATIONAL_ROD:109010,UNIT_US_SURVEY_ROD:109011,UNIT_US_NAUTICAL_MILE:109012,UNIT_UK_NAUTICAL_MILE:109013,UNIT_SQUARE_INCHES:"esriSquareInches",UNIT_SQUARE_FEET:"esriSquareFeet",UNIT_SQUARE_YARDS:"esriSquareYards",UNIT_ACRES:"esriAcres",UNIT_SQUARE_MILES:"esriSquareMiles",UNIT_SQUARE_MILLIMETERS:"esriSquareMillimeters",UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",
UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});return g})},"esri/tasks/support/ProjectParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators ../../geometry/support/jsonUtils".split(" "),function(b,g,p,f,l,m,h,c,q){var e=h.getLogger("esri.tasks.support.ProjectParameters");
return function(a){function b(b){b=a.call(this)||this;b.geometries=null;b.outSpatialReference=null;b.transformation=null;b.transformForward=null;return b}p(b,a);Object.defineProperty(b.prototype,"outSR",{get:function(){e.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");return this.outSpatialReference},set:function(a){e.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");this.outSpatialReference=a},enumerable:!0,configurable:!0});b.prototype.toJSON=
function(){var a=this.geometries.map(function(a){return a.toJSON()}),b=this.geometries[0],c={};c.outSR=this.outSpatialReference.wkid||JSON.stringify(this.outSpatialReference.toJSON());c.inSR=b.spatialReference.wkid||JSON.stringify(b.spatialReference.toJSON());c.geometries=JSON.stringify({geometryType:q.getJsonType(b),geometries:a});this.transformation&&(c.transformation=this.transformation.wkid||JSON.stringify(this.transformation));m.isDefined(this.transformForward)&&(c.transformForward=this.transformForward);
return c};f([c.property()],b.prototype,"geometries",void 0);f([c.property({json:{read:{source:"outSR"}}})],b.prototype,"outSpatialReference",void 0);f([c.property({json:{read:!1}})],b.prototype,"outSR",null);f([c.property()],b.prototype,"transformation",void 0);f([c.property()],b.prototype,"transformForward",void 0);return b=f([c.subclass("esri.tasks.support.ProjectParameters")],b)}(c.declared(l))})},"esri/tasks/operations/pbfQueryUtils":function(){define("require exports ../../core/Error ../../core/Logger ../../core/pbf ../../layers/graphics/optimizedFeatures".split(" "),
function(b,g,p,f,l,m){function h(b){if(b>=u.length){var c=new p("query:parsing-pbf","Error while parsing FeatureSet PBF payload. Unknown GeometryType");a.error(c)}return u[b]}function c(a){for(;a.next();)switch(a.tag()){case w.STRING:return a.getString();case w.FLOAT:return a.getFloat();case w.DOUBLE:return a.getDouble();case w.SINT32:return a.getSInt32();case w.UINT32:return a.getUInt32();case w.INT64:return a.getInt64();case w.UINT64:return a.getUInt64();case w.SINT64:return a.getSInt64();case w.BOOL:return a.getBool();
default:return a.skip(),null}return null}function q(a){for(var b={type:k[0]};a.next();)switch(a.tag()){case t.NAME:b.name=a.getString();break;case t.TYPE:b.type=k[a.getEnum()];break;case t.ALIAS:b.alias=a.getString();break;case t.SQL_TYPE:b.sqlType=r[a.getEnum()];break;case t.DOMAIN:a.skip();break;case t.DEFAULT_VALUE:a.skip();break;default:a.skip()}return b}function e(a,b){for(var e=new m.OptimizedFeature,f=0;a.next();)switch(a.tag()){case d.ATTRIBUTES:var g=a.getMessage(),k=b[f++].name;e.attributes[k]=
c(g);break;case d.GEOMETRY:for(var g=a.getMessage(),k=new m.OptimizedGeometry,h=k.coords,l=k.lengths;g.next();)switch(g.tag()){case v.LENGTHS:for(var n=g.getUInt32(),n=g.pos()+n;g.pos()<n;)l.push(g.getUInt32());break;case v.COORDS:for(var n=g.getUInt32(),n=g.pos()+n,q=0;g.pos()<n;)h[q++]=g.getSInt32();break;default:g.skip()}e.geometry=k;break;case d.CENTROID:g=a.getMessage();k=new m.OptimizedGeometry;for(h=k.coords;g.next();)switch(g.tag()){case v.COORDS:l=g.getUInt32();l=g.pos()+l;for(n=0;g.pos()<
l;)h[n++]=g.getSInt32();break;default:g.skip()}e.centroid=k;break;default:a.skip()}return e}Object.defineProperty(g,"__esModule",{value:!0});var a=f.getLogger("esri.tasks.operations.pbfQueryUtils"),k="esriFieldTypeSmallInteger esriFieldTypeInteger esriFieldTypeSingle esriFieldTypeDouble esriFieldTypeString esriFieldTypeDate esriFieldTypeOID esriFieldTypeGeometry esriFieldTypeBlob esriFieldTypeRaster esriFieldTypeGUID esriFieldTypeGlobalID esriFieldTypeXML".split(" "),r="sqlTypeBigInt sqlTypeBinary sqlTypeBit sqlTypeChar sqlTypeDate sqlTypeDecimal sqlTypeDouble sqlTypeFloat sqlTypeGeometry sqlTypeGUID sqlTypeInteger sqlTypeLongNVarchar sqlTypeLongVarbinary sqlTypeLongVarchar sqlTypeNChar sqlTypeNVarchar sqlTypeOther sqlTypeReal sqlTypeSmallInt sqlTypeSqlXml sqlTypeTime sqlTypeTimestamp sqlTypeTimestamp2 sqlTypeTinyInt sqlTypeVarbinary sqlTypeVarchar".split(" "),
u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],z=["upperLeft","lowerLeft"],v;(function(a){a[a.TYPE=1]="TYPE";a[a.LENGTHS=2]="LENGTHS";a[a.COORDS=3]="COORDS"})(v||(v={}));var w;(function(a){a[a.STRING=1]="STRING";a[a.FLOAT=2]="FLOAT";a[a.DOUBLE=3]="DOUBLE";a[a.SINT32=4]="SINT32";a[a.UINT32=5]="UINT32";a[a.INT64=6]="INT64";a[a.UINT64=7]="UINT64";a[a.SINT64=8]="SINT64";a[a.BOOL=9]="BOOL"})(w||(w={}));var t;(function(a){a[a.NAME=1]="NAME";a[a.TYPE=2]="TYPE";
a[a.ALIAS=3]="ALIAS";a[a.SQL_TYPE=4]="SQL_TYPE";a[a.DOMAIN=5]="DOMAIN";a[a.DEFAULT_VALUE=6]="DEFAULT_VALUE"})(t||(t={}));var d;(function(a){a[a.ATTRIBUTES=1]="ATTRIBUTES";a[a.GEOMETRY=2]="GEOMETRY";a[a.CENTROID=4]="CENTROID"})(d||(d={}));var n;(function(a){a[a.X=1]="X";a[a.Y=2]="Y";a[a.M=3]="M";a[a.Z=4]="Z"})(n||(n={}));var x;(function(a){a[a.ORIGIN_POSTION=1]="ORIGIN_POSTION";a[a.SCALE=2]="SCALE";a[a.TRANSLATE=3]="TRANSLATE"})(x||(x={}));var y;(function(a){a[a.AREA_FIELD_NAME=1]="AREA_FIELD_NAME";
a[a.LENGTH_FIELD_NAME=2]="LENGTH_FIELD_NAME";a[a.UNITS=3]="UNITS"})(y||(y={}));var A;(function(a){a[a.WKID=1]="WKID";a[a.LASTEST_WKID=2]="LASTEST_WKID";a[a.VCS_WKID=3]="VCS_WKID";a[a.LATEST_VCS_WKID=4]="LATEST_VCS_WKID";a[a.WKT=5]="WKT"})(A||(A={}));var D;(function(a){a[a.OBJECT_ID_NAME=1]="OBJECT_ID_NAME";a[a.UNIQUE_ID_NAME=2]="UNIQUE_ID_NAME";a[a.GLOBAL_ID_NAME=3]="GLOBAL_ID_NAME";a[a.GEOHASH_NAME=4]="GEOHASH_NAME";a[a.GEOMETRY_PROPERTIES=5]="GEOMETRY_PROPERTIES";a[a.SERVER_GENS=6]="SERVER_GENS";
a[a.GEOMETRY_TYPE=7]="GEOMETRY_TYPE";a[a.SPATIAL_REFERENCE=8]="SPATIAL_REFERENCE";a[a.EXCEEDED_TRANSFER_LIMIT=9]="EXCEEDED_TRANSFER_LIMIT";a[a.HAS_Z=10]="HAS_Z";a[a.HAS_M=11]="HAS_M";a[a.TRANSFORM=12]="TRANSFORM";a[a.FIELDS=13]="FIELDS";a[a.FEATURES=15]="FEATURES"})(D||(D={}));var B;(function(a){a[a.FEATURE_RESULT=1]="FEATURE_RESULT"})(B||(B={}));var F;(function(a){a[a.QUERY_RESULT=2]="QUERY_RESULT"})(F||(F={}));g.parsePBFFeatureQuery=function(b){try{for(var c=new l(new Uint8Array(b),new DataView(b)),
d;c.next();)switch(c.tag()){case F.QUERY_RESULT:var f=c.getMessage();for(b={};f.next();)switch(f.tag()){case B.FEATURE_RESULT:var g=f.getMessage(),k=new m.OptimizedFeatureSet;for(k.geometryType=h(0);g.next();)switch(g.tag()){case D.OBJECT_ID_NAME:k.objectIdFieldName=g.getString();break;case D.GLOBAL_ID_NAME:k.globalIdFieldName=g.getString();break;case D.GEOHASH_NAME:k.geohashFieldName=g.getString();break;case D.GEOMETRY_PROPERTIES:for(var r=g.getMessage(),u={};r.next();)switch(r.tag()){case y.AREA_FIELD_NAME:u.shapeAreaFieldName=
r.getString();break;case y.LENGTH_FIELD_NAME:u.shapeLengthFieldName=r.getString();break;case y.UNITS:u.units=r.getString();break;default:r.skip()}k.geometryProperties=u;break;case D.GEOMETRY_TYPE:k.geometryType=h(g.getEnum());break;case D.SPATIAL_REFERENCE:for(var t=g.getMessage(),u={};t.next();)switch(t.tag()){case A.WKID:u.wkid=t.getUInt32();break;case A.WKT:u.wkt=t.getString();break;default:t.skip()}k.spatialReference=u;break;case D.HAS_Z:k.hasZ=g.getBool();break;case D.HAS_M:k.hasM=g.getBool();
break;case D.TRANSFORM:for(var v=g.getMessage(),w=z[0],C=u=void 0;v.next();)switch(v.tag()){case x.ORIGIN_POSTION:w=z[v.getEnum()];break;case x.SCALE:for(var J=v.getMessage(),P=[0,0];J.next();)switch(J.tag()){case n.X:P[0]=J.getDouble();break;case n.Y:P[1]=J.getDouble();break;case n.M:P.push(J.getDouble());break;case n.Z:P.push(J.getDouble());break;default:J.skip()}u=P;break;case x.TRANSLATE:for(var S=v.getMessage(),P=[0,0];S.next();)switch(S.tag()){case n.X:P[0]=S.getDouble();break;case n.Y:P[1]=
S.getDouble();break;case n.M:P.push(S.getDouble());break;case n.Z:P.push(S.getDouble());break;default:S.skip()}C=P;break;default:v.skip()}k.transform={originPosition:w,scale:u,translate:C};break;case D.EXCEEDED_TRANSFER_LIMIT:var ca=g.getBool();k.exceededTransferLimit=ca;break;case D.FIELDS:var Q=g.getMessage();k.fields.push(q(Q));break;case D.FEATURES:var U=g.getMessage();k.features.push(e(U,k.fields));break;default:g.skip()}b.featureResult=k;break;default:f.skip()}d=b;break;default:c.skip()}return d.featureResult}catch(Y){return c=
new p("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:Y}),a.error(c),new m.OptimizedFeatureSet}}})},"esri/core/pbf":function(){define(["require","exports"],function(b,g){return function(){function b(b,g,m,h){this._tag=0;this._dataType=99;this._data=b;this._dataView=g;this._pos=m||0;this._end=h||b.byteLength}b.prototype.clone=function(){return new b(this._data,this._dataView,this._pos,this._end)};b.prototype.pos=function(){return this._pos};b.prototype.next=function(b){for(;;){if(this._pos===
this._end)return!1;var f=this._decodeVarint();this._tag=f>>3;this._dataType=f&7;if(!b||b===this._tag)break;this.skip()}return!0};b.prototype.empty=function(){return this._pos>=this._end};b.prototype.tag=function(){return this._tag};b.prototype.getInt32=function(){return this._decodeVarint()};b.prototype.getInt64=function(){return this._decodeVarint()};b.prototype.getUInt32=function(){var b=4294967295,b=(this._data[this._pos]&127)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&
127)<<7)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&127)<<14)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&127)<<21)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&15)<<28)>>>0;if(128>this._data[this._pos++])return b};b.prototype.getUInt64=function(){return this._decodeVarint()};b.prototype.getSInt32=function(){var b=this.getUInt32();return b>>>1^-(b&1)|0};b.prototype.getSInt64=function(){return this._decodeSVarint()};
b.prototype.getBool=function(){var b=0!==this._data[this._pos];this._skip(1);return b};b.prototype.getEnum=function(){return this._decodeVarint()};b.prototype.getFixed64=function(){var b=this._dataView,g=this._pos,b=b.getUint32(g,!0)+4294967296*b.getUint32(g+4,!0);this._skip(8);return b};b.prototype.getSFixed64=function(){var b=this._dataView,g=this._pos,b=b.getUint32(g,!0)+4294967296*b.getInt32(g+4,!0);this._skip(8);return b};b.prototype.getDouble=function(){var b=this._dataView.getFloat64(this._pos,
!0);this._skip(8);return b};b.prototype.getFixed32=function(){var b=this._dataView.getUint32(this._pos,!0);this._skip(4);return b};b.prototype.getSFixed32=function(){var b=this._dataView.getInt32(this._pos,!0);this._skip(4);return b};b.prototype.getFloat=function(){var b=this._dataView.getFloat32(this._pos,!0);this._skip(4);return b};b.prototype.getString=function(){var b=this._getLength(),g=this._pos,g=this._toString(this._data,g,g+b);this._skip(b);return g};b.prototype.getBytes=function(){var b=
this._getLength(),g=this._pos,g=this._toBytes(this._data,g,g+b);this._skip(b);return g};b.prototype.getMessage=function(){var f=this._getLength(),g=this._pos,g=new b(this._data,this._dataView,g,g+f);this._skip(f);return g};b.prototype.skip=function(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw Error("Invalid data type!");}};b.prototype._skip=function(b){if(this._pos+b>this._end)throw Error("Attempt to skip past the end of buffer!");
this._pos+=b};b.prototype._decodeVarint=function(){var b=this._data,g=this._pos,m=0,h;if(10<=this._end-g){if(h=b[g++],m|=h&127,0!==(h&128)&&(h=b[g++],m|=(h&127)<<7,0!==(h&128)&&(h=b[g++],m|=(h&127)<<14,0!==(h&128)&&(h=b[g++],m|=(h&127)<<21,0!==(h&128)&&(h=b[g++],m+=268435456*(h&127),0!==(h&128)&&(h=b[g++],m+=34359738368*(h&127),0!==(h&128)&&(h=b[g++],m+=4398046511104*(h&127),0!==(h&128)&&(h=b[g++],m+=562949953421312*(h&127),0!==(h&128)&&(h=b[g++],m+=72057594037927936*(h&127),0!==(h&128)&&(h=b[g++],
m+=0x7fffffffffffffff*(h&127),0!==(h&128)))))))))))throw Error("Varint too long!");}else{for(var c=1;g!==this._end;){h=b[g];if(0===(h&128))break;++g;m+=(h&127)*c;c*=128}if(g===this._end)throw Error("Varint overrun!");++g;m+=h*c}this._pos=g;return m};b.prototype._decodeSVarint=function(){var b=this._decodeVarint();return b%2?-(b+1)/2:b/2};b.prototype._getLength=function(){if(2!==this._dataType)throw Error("Not a delimited data type!");return this._decodeVarint()};b.prototype._toString=function(b,g,
m){var f="",c="";for(m=Math.min(this._end,m);g<m;++g){var l=b[g];l&128?c+="%"+l.toString(16):(f+=decodeURIComponent(c)+String.fromCharCode(l),c="")}c.length&&(f+=decodeURIComponent(c));return f};b.prototype._toBytes=function(b,g,m){m=Math.min(this._end,m);return new Uint8Array(b.buffer,g,m-g)};return b}()})},"esri/layers/graphics/optimizedFeatures":function(){define(["require","exports","../../core/Error","../../core/Logger"],function(b,g,p,f){function l(a,b){return Math.round((b-a.translate[0])/
a.scale[0])}function m(a,b){return Math.round((a.translate[1]-b)/a.scale[1])}function h(a,b){return b*a.scale[0]+a.translate[0]}function c(a,b){return a.translate[1]-b*a.scale[1]}function q(a){a=a.coords;return{x:a[0],y:a[1]}}function e(a){var b=new W;b.coords[0]=a.x;b.coords[1]=a.y;return b}function a(a){a=a.coords;return{x:a[0],y:a[1],z:a[2]}}function k(a){var b=new W;b.coords[0]=a.x;b.coords[1]=a.y;b.coords[2]=a.z;return b}function r(a){a=a.coords;return{x:a[0],y:a[1],m:a[2]}}function u(a){var b=
new W;b.coords[0]=a.x;b.coords[1]=a.y;b.coords[2]=a.m;return b}function z(a){a=a.coords;return{x:a[0],y:a[1],z:a[2],m:a[3]}}function v(a){var b=new W;b.coords[0]=a.x;b.coords[1]=a.y;b.coords[2]=a.z;b.coords[3]=a.m;return b}function w(a,b,c){for(var d=b?c?4:3:c?3:2,e=[],f=0;f<a.coords.length;f+=d){for(var g=[],k=0;k<d;k++)g.push(a.coords[f+k]);e.push(g)}return b?c?{points:e,hasZ:b,hasM:c}:{points:e,hasZ:b}:c?{points:e,hasM:c}:{points:e}}function t(a,b,c){var d=b?c?4:3:c?3:2,e=a.coords,f=[],g=0,k=0;
for(a=a.lengths;k<a.length;k++){for(var h=a[k],l=[],n=0;n<h;n++){for(var m=[],q=0;q<d;q++)m.push(e[g++]);l.push(m)}f.push(l)}return b?c?{paths:f,hasZ:b,hasM:c}:{paths:f,hasZ:b}:c?{paths:f,hasM:c}:{paths:f}}function d(a,b,c){var d=b?c?4:3:c?3:2,e=a.coords,f=[],g=0,k=0;for(a=a.lengths;k<a.length;k++){for(var h=a[k],l=[],n=0;n<h;n++){for(var m=[],q=0;q<d;q++)m.push(e[g++]);l.push(m)}f.push(l)}return b?c?{rings:f,hasZ:b,hasM:c}:{rings:f,hasZ:b}:c?{rings:f,hasM:c}:{rings:f}}function n(a,b,c,d){if(!b)return[];
switch(b){case "esriGeometryPoint":b=e;d&&c?b=v:d?b=k:c&&(b=u);c=[];for(d=0;d<a.length;d++){var f=a[d],g=f.geometry,f=f.attributes,g=g?b(g):void 0;c.push(new N(g,f))}return c;case "esriGeometryMultipoint":b=c?d?4:3:d?3:2;c=[];for(d=0;d<a.length;d++){var g=a[d],h=g.geometry,g=g.attributes,f=void 0;if(h){f=new W;f.lengths[0]=h.points.length;for(var l=f.coords,n=0,m=0,h=h.points;m<h.length;m++)for(var q=h[m],r=0;r<b;r++)l[n++]=q[r]}c.push(new N(f,g))}return c;case "esriGeometryPolyline":b=c?d?4:3:d?
3:2;c=[];for(d=0;d<a.length;d++){g=a[d];q=g.geometry;g=g.attributes;f=void 0;if(q)for(f=new W,l=f.lengths,n=f.coords,h=m=0,q=q.paths;h<q.length;h++){for(var r=q[h],t=0,y=r;t<y.length;t++)for(var z=y[t],x=0;x<b;x++)n[m++]=z[x];l.push(r.length)}c.push(new N(f,g))}return c;case "esriGeometryPolygon":b=c?d?4:3:d?3:2;c=[];for(d=0;d<a.length;d++){f=a[d];r=f.geometry;g=f.centroid;f=f.attributes;l=void 0;if(r)for(l=new W,n=l.lengths,m=l.coords,q=h=0,r=r.rings;q<r.length;q++){t=r[q];y=0;for(z=t;y<z.length;y++)for(var x=
z[y],w=0;w<b;w++)m[h++]=x[w];n.push(t.length)}g?c.push(new N(l,f,e(g))):c.push(new N(l,f))}return c;default:return ba.error("convertToFeatureSet:unknown-geometry",new p("Unable to parse unknown geometry type "+b)),[]}}function x(a,b,c,d,e,f){e=Z[e];var g=b.coords;b=b.lengths;var k=c?d?4:3:d?3:2;c=c?d?fa:I:d?I:V;a.lengths.length&&(a.lengths.length=0);a.coords.length&&(a.coords.length=0);if(!g.length)return a;if(!b.length)return c(a.coords,g,0,0,l(f,g[0]),m(f,g[1])),a.lengths.length&&(a.lengths.length=
0),a.coords.length=k,a;for(var h,n,q,r=0,p,u=0,t=0;t<b.length;t++){var y=b[t];if(!(y<e)){var z=0;p=u;n=d=l(f,g[r]);q=h=m(f,g[r+1]);c(a.coords,g,p,r,n,q);z++;r+=k;p+=k;for(var x=1;x<y;x++,r+=k)if(n=l(f,g[r]),q=m(f,g[r+1]),n!==d||q!==h)c(a.coords,g,p,r,n-d,q-h),p+=k,z++,d=n,h=q;z>=e&&(a.lengths.push(z),u=p)}}a.coords.length=u;return a.coords.length?a:null}function y(a,b,d,e,f){var g=b.coords,k=b.lengths,l=d?e?fa:I:e?I:V;d=d?e?4:3:e?3:2;if(!g.length)return a!==b&&(a.lengths.length=0,a.coords.length=
0),a;if(!k.length)return l(a.coords,g,0,0,h(f,g[0]),c(f,g[1])),a!==b&&(a.lengths.length=0,a.coords.length=d),a;var n=f.scale;e=n[0];for(var n=n[1],m=0,q=0;q<k.length;q++){var r=k[q];a.lengths[q]=r;var p=h(f,g[m]),u=c(f,g[m+1]);l(a.coords,g,m,m,p,u);for(var m=m+d,t=1;t<r;t++,m+=d)p+=g[m]*e,u-=g[m+1]*n,l(a.coords,g,m,m,p,u)}a!==b&&(a.lengths.length=k.length,a.coords.length=g.length);return a}function A(a,b,c,d,e,f){f=e?f?4:3:f?3:2;var g=c,k=c+f,h=0,l=0,n=c=0,m=0,q=0;for(--d;q<d;q++,g+=f,k+=f){var r=
b[g],p=b[g+1],u=b[g+2],t=b[k],y=b[k+1],z=b[k+2],x=r*y-t*p,n=n+x,h=h+(r+t)*x,l=l+(p+y)*x;e&&(x=r*z-t*u,c+=(u+z)*x,m+=x);r<a[0]&&(a[0]=r);r>a[1]&&(a[1]=r);p<a[2]&&(a[2]=p);p>a[3]&&(a[3]=p);e&&(u<a[4]&&(a[4]=u),u>a[5]&&(a[5]=u))}0<n&&(n*=-1);0<m&&(m*=-1);if(!n)return null;a=[h,l,.5*n];e&&(a[3]=c,a[4]=.5*m);return a}function D(a,b,c,d,e){e=d?e?4:3:e?3:2;for(var f=b,g=b+e,k=0,h=0,l=0,n=0,m=0,q=c-1;m<q;m++,f+=e,g+=e){var r=a[f],p=a[f+1],u=a[f+2],t=a[g],y=a[g+1],z=a[g+2],x=d?F(r,p,u,t,y,z):B(r,p,t,y);x&&
(k+=x,d?(r=G(r,p,u,t,y,z),h+=x*r[0],l+=x*r[1],n+=x*r[2]):(r=C(r,p,t,y),h+=x*r[0],l+=x*r[1]))}return 0<k?d?[h/k,l/k,n/k]:[h/k,l/k]:0<c?d?[a[b],a[b+1],a[b+2]]:[a[b],a[b+1]]:null}function B(a,b,c,d){a=c-a;b=d-b;return Math.sqrt(a*a+b*b)}function F(a,b,c,d,e,f){a=d-a;b=e-b;c=f-c;return Math.sqrt(a*a+b*b+c*c)}function C(a,b,c,d){return[a+.5*(c-a),b+.5*(d-b)]}function G(a,b,c,d,e,f){return[a+.5*(d-a),b+.5*(e-b),c+.5*(f-c)]}Object.defineProperty(g,"__esModule",{value:!0});var ba=f.getLogger("esri.tasks.support.optimizedFeatureSet"),
Z={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0},V=function(a,b,c,d,e,f){a[c]=e;a[c+1]=f},I=function(a,b,c,d,e,f){a[c]=e;a[c+1]=f;a[c+2]=b[d+2]},fa=function(a,b,c,d,e,f){a[c]=e;a[c+1]=f;a[c+2]=b[d+2];a[c+3]=b[d+3]};g.quantizeX=l;g.quantizeY=m;g.hydrateX=h;g.hydrateY=c;var M=function(){return function(){this.spatialReference=this.geometryType=this.geometryProperties=this.geohashFieldName=this.globalIdFieldName=this.objectIdFieldName=null;this.hasM=this.hasZ=
!1;this.features=[];this.fields=[];this.transform=null;this.exceededTransferLimit=!1}}();g.OptimizedFeatureSet=M;var W=function(){return function(a,b){void 0===a&&(a=[]);void 0===b&&(b=[]);this.lengths=a;this.coords=b}}();g.OptimizedGeometry=W;var N=function(){return function(a,b,c){void 0===a&&(a=null);void 0===b&&(b={});this.geometry=a;this.attributes=b;c&&(this.centroid=c)}}();g.OptimizedFeature=N;g.convertToPoint=function(b,c,d){return c?d?z(b):a(b):d?r(b):q(b)};g.convertToMultipoint=w;g.convertToPolyline=
t;g.convertToPolygon=d;g.convertFromFeatures=n;g.convertToFeatureSet=function(b){var c=[],e=b.objectIdFieldName,f=b.spatialReference,g=b.transform,k=b.fields,h=b.hasM,l=b.hasZ,n=b.features,m=b.geometryType;b=b.exceededTransferLimit;switch(m){case "esriGeometryPoint":c=q;h&&l?c=z:h?c=a:l&&(c=r);for(var u=[],y=0;y<n.length;y++){var x=n[y],v=x.geometry,x=x.attributes,v=v?c(v):null;u.push({attributes:x,geometry:v})}c=u;break;case "esriGeometryMultipoint":c=[];for(u=0;u<n.length;u++)v=n[u],y=v.geometry,
v=v.attributes,x=void 0,y&&(x=w(y,l,h)),c.push({attributes:v,geometry:x});break;case "esriGeometryPolyline":c=[];for(u=0;u<n.length;u++)v=n[u],y=v.geometry,v=v.attributes,x=void 0,y&&(x=t(y,l,h)),c.push({attributes:v,geometry:x});break;case "esriGeometryPolygon":c=[];for(u=0;u<n.length;u++){var x=n[u],v=x.geometry,y=x.attributes,A=x.centroid,x=void 0;v&&(x=d(v,l,h));A?(v=q(A),c.push({attributes:y,centroid:v,geometry:x})):c.push({attributes:y,geometry:x})}break;default:ba.error("convertToFeatureSet:unknown-geometry",
new p("Unable to parse unknown geometry type "+m))}e={features:c,fields:k,geometryType:m,objectIdFieldName:e,spatialReference:f};g&&(e.transform=g);b&&(e.exceededTransferLimit=b);h&&(e.hasM=h);l&&(e.hasZ=l);return e};g.convertFromFeatureSet=function(a){var b=new M,c=a.hasM,d=a.hasZ,e=a.features,f=a.objectIdFieldName,g=a.spatialReference,k=a.geometryType,h=a.exceededTransferLimit,l=a.transform;b.fields=a.fields;b.geometryType=k;b.objectIdFieldName=f;b.spatialReference=g;b.features=n(e,k,d,c);h&&(b.exceededTransferLimit=
h);c&&(b.hasM=c);d&&(b.hasZ=d);l&&(b.transform=l);return b};g.hydrateOptimizedFeatureSet=function(a){var b=a.transform,c=a.hasM,d=a.hasZ;if(!b)return a;for(var e=0,f=a.features;e<f.length;e++){var g=f[e];y(g.geometry,g.geometry,c,d,b);g.centroid&&y(g.centroid,g.centroid,c,d,b)}a.transform=null;return a};g.quantizeOptimizedFeatureSet=function(a,b){var c=b.geometryType,d=b.features,e=b.hasM,f=b.hasZ;if("esriGeometryEnvelope"===c)return ba.error(new p("optimized-features:invalid-geometry-type",'FeatureSet with geometry type "'+
c+'" is not supported')),b;if(!a)return b;for(var g=0;g<d.length;g++){var k=d[g],h=new N(new W,k.attributes);x(h.geometry,k.geometry,e,f,c,a);k.centroid&&(h.centroid=new W,x(h.centroid,k.centroid,e,f,"esriGeometryPoint",a));d[g]=h}b.transform=a;return b};g.quantizeOptimizedGeometry=x;g.quantizeOptimizedGeometryRemoveCollinear=function(a,b,c,d,e,f){e=Z[e];var g=b.coords;b=b.lengths;var k=c?d?4:3:d?3:2;c=c?d?fa:I:d?I:V;a.lengths.length&&(a.lengths.length=0);a.coords.length&&(a.coords.length=0);if(!g.length)return a;
if(!b.length)return c(a.coords,g,0,0,l(f,g[0]),m(f,g[1])),a.lengths.length&&(a.lengths.length=0),a.coords.length=k,a;for(var h,n,q,r=0,p,u=0,t=0;t<b.length;t++){var y=b[t];if(!(y<e)){var z=0;p=u;d=h=l(f,g[r]);q=n=m(f,g[r+1]);c(a.coords,g,p,r,d,q);z++;for(var r=r+k,x=!1,v=0,w=0,A=1;A<y;A++,r+=k)if(d=l(f,g[r]),q=m(f,g[r+1]),d!==h||q!==n)h=d-h,n=q-n,x&&(0===v&&0===h||0===w&&0===n)?(v+=h,w+=n):(x=!0,v=h,w=n,p+=k,z++),c(a.coords,g,p,r,v,w),h=d,n=q;x&&(p+=k,c(a.coords,g,p,r,v,w));z>=e&&(a.lengths.push(z),
u=p)}}a.coords.length!==u&&(a.coords.length=u);return a.coords.length?a:null};g.getBoundsOptimizedGeometry=function(a,b,c,d){c=c?d?4:3:d?3:2;b=b.coords;for(var e=d=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,g=Number.NEGATIVE_INFINITY,k=0;k<b.length;k+=c){var h=b[k],l=b[k+1];d=Math.min(d,h);f=Math.max(f,h);e=Math.min(e,l);g=Math.max(g,l)}a[0]=d;a[1]=e;a[2]=f;a[3]=g;return a};g.getQuantizedBoundsOptimizedGeometry=function(a,b,c,d){c=c?d?4:3:d?3:2;d=b.coords;var e=Number.POSITIVE_INFINITY,f=
Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,k=Number.NEGATIVE_INFINITY,h=0,l=0;for(b=b.lengths;l<b.length;l++)for(var n=b[l],m=d[h],q=d[h+1],e=Math.min(m,e),f=Math.min(q,f),g=Math.max(m,g),k=Math.max(q,k),h=h+c,r=1;r<n;r++,h+=c){var p=d[h],u=d[h+1],m=m+p,q=q+u;0>p&&(e=Math.min(e,m));0<p&&(g=Math.max(g,m));0>u?f=Math.min(f,q):0<u&&(k=Math.max(k,q))}a[0]=e;a[1]=f;a[2]=g;a[3]=k;return a};g.hydrateOptimizedGeometry=y;g.getCentroidOptimizedGeometry=function(a,b,c,d){if(!b||!b.lengths.length)return null;
a.lengths.length&&(a.lengths.length=0);a.coords.length&&(a.coords.length=0);for(var e=a.coords,f=[],g=c?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],k=b.lengths,h=b.coords,l=c?d?4:3:d?3:2,n=0,m=0;m<k.length;m++){var q=k[m],r=A(g,h,n,q,c,d);r&&f.push(r);n+=q*l}f.sort(function(a,b){var d=a[2]-
b[2];0===d&&c&&(d=a[4]-b[4]);return d});f.length&&(l=6*f[0][2],e[0]=f[0][0]/l,e[1]=f[0][1]/l,c&&(l=6*f[0][4],e[2]=0!==l?f[0][3]/l:0),e[0]<g[0]||e[0]>g[1]||e[1]<g[2]||e[1]>g[3]||c&&(e[2]<g[4]||e[2]>g[5]))&&(e.length=0);if(!e.length)if(b=b.lengths[0]?D(h,0,k[0],c,d):null)e[0]=b[0],e[1]=b[1],c&&2<b.length&&(e[2]=b[2]);else return null;return a};g.lineCentroid=D;g.getLength2D=B;g.getLength3D=F;g.getMidpoint2D=C;g.getMidpoint3D=G})},"esri/tasks/operations/urlUtils":function(){define(["require","exports"],
function(b,g){function p(b){var f={},g;for(g in b)if("declaredClass"!==g){var h=b[g];if(null!=h&&"function"!==typeof h)if(Array.isArray(h)){f[g]=[];for(var c=0;c<h.length;c++)f[g][c]=p(h[c])}else"object"===typeof h?h.toJSON&&(f[g]=JSON.stringify(h)):f[g]=h}return f}Object.defineProperty(g,"__esModule",{value:!0});g.mapParameters=p})},"esri/tasks/operations/queryRelatedRecords":function(){define(["require","exports","../../core/tsSupport/assignHelper","../../request","./urlUtils"],function(b,g,p,f,
l){function m(b){b=b.toJSON();b.objectIds&&(b.objectIds=b.objectIds.join(","));b.outFields&&(b.outFields=b.outFields.join(","));b.outSpatialReference&&(b.outSR=b.outSR.wkid||JSON.stringify(b.outSR.toJSON()),delete b.outSpatialReference);b.source&&(b.layer=JSON.stringify({source:b.source}),delete b.source);return b}Object.defineProperty(g,"__esModule",{value:!0});g.toQueryStringParameters=m;g.executeRelationshipQuery=function(b,c,g){c={query:l.mapParameters(p({},b.query,{f:"json"},m(c))),callbackParamName:"callback"};
g&&(c=p({},g,c));return f(b.path+"/queryRelatedRecords",c).then(function(b){for(var a=b.data,c=a.geometryType,e=a.spatialReference,f={},g=0,a=a.relatedRecordGroups;g<a.length;g++){var h=a[g],l={fields:void 0,objectIdFieldName:void 0,geometryType:c,spatialReference:e,features:h.relatedRecords};if(null!=h.objectId)f[h.objectId]=l;else for(var m in h)h.hasOwnProperty(m)&&"relatedRecords"!==m&&(f[h[m]]=l)}b.data=f;return b})}})},"esri/tasks/support/FeatureSet":function(){define("../../core/kebabDictionary ../../core/JSONSupport ../../core/lang ../../Graphic ../../layers/support/Field ../../geometry/SpatialReference ../../geometry/support/graphicsUtils ../../geometry/support/jsonUtils".split(" "),
function(b,g,p,f,l,m,h,c){b=b({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent"});return g.createSubclass({declaredClass:"esri.tasks.support.FeatureSet",getDefaults:function(){return p.mixin(this.inherited(arguments),{features:[]})},properties:{displayFieldName:null,exceededTransferLimit:null,features:{value:null,json:{read:function(b,c){var a=m.fromJSON(c.spatialReference);b=b.map(function(b){var c=
f.fromJSON(b);b=b.geometry&&b.geometry.spatialReference;c.geometry&&!b&&(c.geometry.spatialReference=a);return c});c.transform&&this._hydrate(c.transform,c.geometryType,b);return b}}},fields:{value:null,type:[l]},geometryType:{value:null,json:{read:b.fromJSON}},spatialReference:{type:m}},toJSON:function(b){var e={hasZ:this.hasZ,hasM:this.hasM};this.displayFieldName&&(e.displayFieldName=this.displayFieldName);this.fields&&(e.fields=this.fields.map(function(a){return a.toJSON()}));this.spatialReference?
e.spatialReference=this.spatialReference.toJSON():this.features[0]&&this.features[0].geometry&&(e.spatialReference=this.features[0].geometry.spatialReference.toJSON());this.features[0]&&(this.features[0].geometry&&(e.geometryType=c.getJsonType(this.features[0].geometry)),e.features=h._encodeGraphics(this.features,b));e.exceededTransferLimit=this.exceededTransferLimit;e.transform=this.transform;return p.fixJson(e)},quantize:function(b){var c=b.translate[0],a=b.translate[1],f=b.scale[0],g=b.scale[1],
h=this.features,l=function(a,b,c){var d,e,f,g,k,h,l=[];d=0;for(e=a.length;d<e;d++)if(f=a[d],0<d){if(h=b(f[0]),f=c(f[1]),h!==g||f!==k)l.push([h-g,f-k]),g=h,k=f}else g=b(f[0]),k=c(f[1]),l.push([g,k]);return 0<l.length?l:null},m=function(a,b,c){if("point"===a)return function(a){a.x=b(a.x);a.y=c(a.y);return a};if("polyline"===a||"polygon"===a)return function(a){var d,e,f,g,k;f=a.rings||a.paths;k=[];d=0;for(e=f.length;d<e;d++)g=f[d],(g=l(g,b,c))&&k.push(g);return 0<k.length?(a.rings?a.rings=k:a.paths=
k,a):null};if("multipoint"===a)return function(a){var d;d=l(a.points,b,c);return 0<d.length?(a.points=d,a):null};if("extent"===a)return function(a){return a}}(this.geometryType,function(a){return Math.round((a-c)/f)},function(b){return Math.round((a-b)/g)}),q,p;q=0;for(p=h.length;q<p;q++)m(h[q].geometry)||(h.splice(q,1),q--,p--);this.transform=b;return this},_hydrate:function(b,c,a){if(b){var e=b.translate[0],f=b.translate[1],g=b.scale[0],h=b.scale[1],l=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=
b(a.x);a.y=c(a.y)};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){a=a.rings||a.paths;var d,e,f,g,k,h,l,n;d=0;for(e=a.length;d<e;d++)for(k=a[d],f=0,g=k.length;f<g;f++)h=k[f],0<f?(l+=h[0],n+=h[1]):(l=h[0],n=h[1]),h[0]=b(l),h[1]=c(n)};if("esriGeometryEnvelope"===a)return function(a){a.xmin=b(a.xmin);a.ymin=c(a.ymin);a.xmax=b(a.xmax);a.ymax=c(a.ymax)};if("esriGeometryMultipoint"===a)return function(a){a=a.points;var d,e,f,g,k;d=0;for(e=a.length;d<e;d++)f=a[d],0<d?(g+=f[0],
k+=f[1]):(g=f[0],k=f[1]),f[0]=b(g),f[1]=c(k)}}(c,function(a){return a*g+e},function(a){return f-a*h});b=0;for(c=a.length;b<c;b++)a[b].geometry&&l(a[b].geometry)}}})})},"esri/layers/support/Field":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./domains ./fieldType".split(" "),function(b,g,p,f,l,m,h,c){return function(b){function e(a){a=b.call(this)||this;a.alias=null;a.domain=null;
a.editable=!1;a.length=-1;a.name=null;a.nullable=!0;a.type=null;return a}p(e,b);a=e;e.prototype.readDomain=function(a){var b=a&&a.type;return"range"===b?h.RangeDomain.fromJSON(a):"codedValue"===b?h.CodedValueDomain.fromJSON(a):null};e.prototype.clone=function(){return new a({alias:this.alias,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type})};var a;f([m.property({type:String,json:{write:!0}})],e.prototype,
"alias",void 0);f([m.property({types:h.types,json:{write:!0}})],e.prototype,"domain",void 0);f([m.reader("domain")],e.prototype,"readDomain",null);f([m.property({type:Boolean,json:{write:!0}})],e.prototype,"editable",void 0);f([m.property({type:Number,json:{write:!0}})],e.prototype,"length",void 0);f([m.property({type:String,json:{write:!0}})],e.prototype,"name",void 0);f([m.property({type:Boolean,json:{write:!0}})],e.prototype,"nullable",void 0);f([m.property({type:String,json:{read:c.kebabDict.read,
write:c.kebabDict.write}})],e.prototype,"type",void 0);return e=a=f([m.subclass("esri.layers.support.Field")],e)}(m.declared(l))})},"esri/layers/support/domains":function(){define("require exports ./CodedValueDomain ./Domain ./InheritedDomain ./RangeDomain".split(" "),function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});g.CodedValueDomain=p;g.DomainBase=f;g.InheritedDomain=l;g.RangeDomain=m;g.types={key:"type",base:g.DomainBase,typeMap:{range:g.RangeDomain,"coded-value":g.CodedValueDomain}}})},
"esri/layers/support/CodedValueDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/lang ../../core/accessorSupport/decorators ./Domain".split(" "),function(b,g,p,f,l,m,h){return function(b){function c(a){a=b.call(this,a)||this;a.codedValues=null;a.type="coded-value";return a}p(c,b);e=c;c.prototype.writeCodedValues=function(a,b){var c=null;a&&(c=a.map(function(a){return l.fixJson(l.clone(a))}));b.codedValues=c};c.prototype.getName=
function(a){var b=null;if(this.codedValues){var c=String(a);this.codedValues.some(function(a){String(a.code)===c&&(b=a.name);return!!b})}return b};c.prototype.clone=function(){return new e({codedValues:l.clone(this.codedValues),name:this.name})};var e;f([m.property({json:{write:!0}})],c.prototype,"codedValues",void 0);f([m.writer("codedValues")],c.prototype,"writeCodedValues",null);f([m.property()],c.prototype,"type",void 0);return c=e=f([m.subclass("esri.layers.support.CodedValueDomain")],c)}(m.declared(h))})},
"esri/layers/support/Domain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){var c=m({inherited:"inherited",codedValue:"coded-value",range:"range"});return function(b){function e(a){a=b.call(this,a)||this;a.name=null;a.type=null;return a}p(e,b);f([h.property({json:{write:!0}})],e.prototype,"name",void 0);f([h.property({json:{read:c.read,
write:c.write}})],e.prototype,"type",void 0);return e=f([h.subclass("esri.layers.support.Domain")],e)}(h.declared(l))})},"esri/layers/support/InheritedDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this,c)||this;c.type="inherited";return c}p(c,b);g=c;c.prototype.clone=function(){return new g};var g;f([l.property()],
c.prototype,"type",void 0);return c=g=f([l.subclass("esri.layers.support.InheritedDomain")],c)}(l.declared(m))})},"esri/layers/support/RangeDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this,c)||this;c.maxValue=null;c.minValue=null;c.type="range";return c}p(c,b);g=c;c.prototype.clone=function(){return new g({maxValue:this.maxValue,
minValue:this.minValue,name:this.name})};var g;f([l.property({json:{read:{source:"range",reader:function(b,a){return a.range&&a.range[1]}},write:{target:"range",writer:function(b,a,c){a[c]=[this.minValue,b]}}}})],c.prototype,"maxValue",void 0);f([l.property({json:{read:{source:"range",reader:function(b,a){return a.range&&a.range[0]}},write:{target:"range",writer:function(b,a,c){a[c]=[b,this.maxValue]}}}})],c.prototype,"minValue",void 0);f([l.property()],c.prototype,"type",void 0);return c=g=f([l.subclass("esri.layers.support.RangeDomain")],
c)}(l.declared(m))})},"esri/layers/support/fieldType":function(){define(["require","exports","../../core/kebabDictionary"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.kebabDict=p({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",
esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})})},"esri/geometry/support/graphicsUtils":function(){define(["require","exports","../../core/Collection","../Extent"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.graphicsExtent=function(b){if(!b||!b.length)return null;var g=p.isCollection(b)?b.getItemAt(0).geometry:b[0].geometry,h=g.extent,c=g;null===h&&(h=new f(c.x,c.y,c.x,c.y,g.spatialReference));for(var l=1;l<b.length;l++){var c=g=p.isCollection(b)?
b.getItemAt(l).geometry:b[l].geometry,e=g.extent;null===e&&(e=new f(c.x,c.y,c.x,c.y,g.spatialReference));h=h.clone().union(e)}return 0>h.width&&0>h.height?null:h};g.getGeometries=function(b){return b.map(function(b){return b.geometry})};g._encodeGraphics=function(b,f){var g=[];b.forEach(function(b,h){b=b.toJSON();var c={};if(b.geometry){var a=f&&f[h];c.geometry=a&&a.toJSON()||b.geometry}b.attributes&&(c.attributes=b.attributes);g[h]=c});return g}})},"esri/tasks/support/Query":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../TimeExtent ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators ../../geometry/support/jsonUtils ../../geometry/support/typeUtils ../../symbols/support/jsonUtils ../../symbols/support/typeUtils ./QuantizationParameters ./StatisticDefinition".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){var w=c({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),t=c({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",
esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});return function(b){function c(a){a=b.call(this,a)||this;a.datumTransformation=null;a.distance=void 0;a.gdbVersion=null;a.geometry=null;a.geometryPrecision=void 0;a.groupByFieldsForStatistics=null;a.historicMoment=null;a.maxAllowableOffset=void 0;a.maxRecordCountFactor=1;a.multipatchOption=null;a.num=void 0;a.objectIds=null;a.orderByFields=null;a.outFields=null;a.outSpatialReference=null;a.outStatistics=null;a.parameterValues=
null;a.pixelSize=null;a.quantizationParameters=null;a.rangeValues=null;a.relationParameter=null;a.resultType=null;a.returnDistinctValues=!1;a.returnGeometry=!1;a.returnCentroid=!1;a.returnExceededLimitFeatures=!0;a.returnM=void 0;a.returnZ=void 0;a.source=null;a.spatialRelationship="intersects";a.start=void 0;a.sqlFormat=null;a.text=null;a.timeExtent=null;a.units="meters";a.where=null;return a}p(c,b);d=c;c.prototype.castDatumTransformation=function(a){return"number"===typeof a||"object"===typeof a?
a:null};c.prototype.writeHistoricMoment=function(a,b,c){b.historicMoment=a&&a.getTime()};c.prototype.writeParameterValues=function(a,b,c){if(a){c={};for(var d in a){var e=a[d];Array.isArray(e)?c[d]=e.map(function(a){return a instanceof Date?a.getTime():a}):c[d]=e instanceof Date?e.getTime():e}b.parameterValues=c}};c.prototype.writeStart=function(a,b,c){b.resultOffset=this.start;b.resultRecordCount=this.num||10;b.where="1\x3d1"};c.prototype.writeWhere=function(a,b,c){b.where=a||"1\x3d1"};c.prototype.clone=
function(){return new d(q.clone({datumTransformation:this.datumTransformation,distance:this.distance,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,historicMoment:this.historicMoment?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,
outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnM:this.returnM,
returnZ:this.returnZ,source:this.source,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.text,text:this.text,timeExtent:this.timeExtent,units:this.units,where:this.where}))};var d;f([e.property({json:{write:!0}})],c.prototype,"datumTransformation",void 0);f([e.cast("datumTransformation")],c.prototype,"castDatumTransformation",null);f([e.property({type:Number,json:{write:!0}})],c.prototype,"distance",void 0);f([e.property({type:String,json:{write:!0}})],c.prototype,"gdbVersion",
void 0);f([e.property({types:k.types,json:{read:a.fromJSON,write:!0}})],c.prototype,"geometry",void 0);f([e.property({type:Number,json:{write:!0}})],c.prototype,"geometryPrecision",void 0);f([e.property({type:[String],json:{write:!0}})],c.prototype,"groupByFieldsForStatistics",void 0);f([e.property({type:Date})],c.prototype,"historicMoment",void 0);f([e.writer("historicMoment")],c.prototype,"writeHistoricMoment",null);f([e.property({type:Number,json:{write:!0}})],c.prototype,"maxAllowableOffset",
void 0);f([e.property({type:Number,cast:function(a){return 1>a?1:5<a?5:a},json:{write:{overridePolicy:function(a){return{enabled:1<a}}}}})],c.prototype,"maxRecordCountFactor",void 0);f([e.property({type:String,json:{write:!0}})],c.prototype,"multipatchOption",void 0);f([e.property({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0);f([e.property({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0);f([e.property({type:[String],json:{write:!0}})],c.prototype,
"orderByFields",void 0);f([e.property({type:[String],json:{write:!0}})],c.prototype,"outFields",void 0);f([e.property({type:l.SpatialReference,json:{read:{source:"outSR"},write:{target:"outSR"}}})],c.prototype,"outSpatialReference",void 0);f([e.property({type:[v],json:{write:!0}})],c.prototype,"outStatistics",void 0);f([e.property({json:{write:!0}})],c.prototype,"parameterValues",void 0);f([e.writer("parameterValues")],c.prototype,"writeParameterValues",null);f([e.property({types:u.types,json:{read:r.read,
write:!0}})],c.prototype,"pixelSize",void 0);f([e.property({type:z.default,json:{write:!0}})],c.prototype,"quantizationParameters",void 0);f([e.property({type:[Object],json:{write:!0}})],c.prototype,"rangeValues",void 0);f([e.property({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy:function(a){return{enabled:"relation"===this.spatialRelationship}}}}})],c.prototype,"relationParameter",void 0);f([e.property({type:String,json:{write:!0}})],c.prototype,"resultType",
void 0);f([e.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnDistinctValues",void 0);f([e.property({type:Boolean,json:{write:!0}})],c.prototype,"returnGeometry",void 0);f([e.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnCentroid",void 0);f([e.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:!a}}}}})],c.prototype,"returnExceededLimitFeatures",void 0);f([e.property({type:Boolean,
json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnM",void 0);f([e.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnZ",void 0);f([e.property({json:{write:!0}})],c.prototype,"source",void 0);f([e.property({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],c.prototype,"spatialRelationship",void 0);f([e.property({type:Number,json:{read:{source:"resultOffset"}}})],
c.prototype,"start",void 0);f([e.writer("start"),e.writer("num")],c.prototype,"writeStart",null);f([e.property({type:String,json:{write:!0}})],c.prototype,"sqlFormat",void 0);f([e.property({type:String,json:{write:!0}})],c.prototype,"text",void 0);f([e.property({type:m,json:{write:!0}})],c.prototype,"timeExtent",void 0);f([e.property({type:String,json:{read:t.read,write:{writer:t.write,overridePolicy:function(a){return{enabled:0<this.distance}}}}})],c.prototype,"units",void 0);f([e.property({type:String,
json:{write:{overridePolicy:function(a){return{enabled:null!=a||0<this.start}}}}})],c.prototype,"where",void 0);f([e.writer("where")],c.prototype,"writeWhere",null);return c=d=f([e.subclass("esri.tasks.support.Query")],c)}(e.declared(h))})},"esri/TimeExtent":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){var h={milliseconds:{getter:"getUTCMilliseconds",setter:"setUTCMilliseconds",
multiplier:1},seconds:{getter:"getUTCSeconds",setter:"setUTCSeconds",multiplier:1},minutes:{getter:"getUTCMinutes",setter:"setUTCMinutes",multiplier:1},hours:{getter:"getUTCHours",setter:"setUTCHours",multiplier:1},days:{getter:"getUTCDate",setter:"setUTCDate",multiplier:1},weeks:{getter:"getUTCDate",setter:"setUTCDate",multiplier:7},months:{getter:"getUTCMonth",setter:"setUTCMonth",multiplier:1},years:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:1},decades:{getter:"getUTCFullYear",
setter:"setUTCFullYear",multiplier:10},centuries:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:100}};return function(b){function c(a,c){a=b.call(this)||this;a.endTime=null;a.startTime=null;return a}p(c,b);e=c;c.prototype.normalizeCtorArgs=function(a,b){return!a||a instanceof Date?{startTime:a,endTime:b}:a};c.prototype.readEndTime=function(a,b){return null!=b.endTime?new Date(b.endTime):null};c.prototype.writeEndTime=function(a,b,c){b.endTime=a?a.getTime():null};c.prototype.readStartTime=
function(a,b){return null!=b.startTime?new Date(b.startTime):null};c.prototype.writeStartTime=function(a,b,c){b.startTime=a?a.getTime():null};c.prototype.clone=function(){return new e({endTime:this.endTime,startTime:this.startTime})};c.prototype.intersection=function(a){if(!a)return null;var b=this.startTime?this.startTime.getTime():-Infinity,c=this.endTime?this.endTime.getTime():Infinity,f=a.startTime?a.startTime.getTime():-Infinity;a=a.endTime?a.endTime.getTime():Infinity;var g,h;f>=b&&f<=c?g=f:
b>=f&&b<=a&&(g=b);c>=f&&c<=a?h=c:a>=b&&a<=c&&(h=a);if(isNaN(g)||isNaN(h))return null;b=new e;b.startTime=-Infinity===g?null:new Date(g);b.endTime=Infinity===h?null:new Date(h);return b};c.prototype.offset=function(a,b){var c=new e,f=this.startTime,g=this.endTime;f&&(c.startTime=this._offsetDate(f,a,b));g&&(c.endTime=this._offsetDate(g,a,b));return c};c.prototype._offsetDate=function(a,b,c){a=new Date(a.getTime());b&&c&&(c=h[c],a[c.setter](a[c.getter]()+b*c.multiplier));return a};var e;f([m.property({type:Date,
json:{write:{allowNull:!0}}})],c.prototype,"endTime",void 0);f([m.reader("endTime")],c.prototype,"readEndTime",null);f([m.writer("endTime")],c.prototype,"writeEndTime",null);f([m.property({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"startTime",void 0);f([m.reader("startTime")],c.prototype,"readStartTime",null);f([m.writer("startTime")],c.prototype,"writeStartTime",null);return c=e=f([m.subclass("esri.TimeExtent")],c)}(m.declared(l))})},"esri/tasks/support/QuantizationParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h,c,q){Object.defineProperty(g,"__esModule",{value:!0});var e=h({upperLeft:"upper-left",lowerLeft:"lower-left"});b=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.extent=null;b.mode="view";b.originPosition="upper-left";return b}p(b,a);g=b;b.prototype.clone=function(){return new g(c.clone({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))};var g;f([q.property({type:l.Extent,json:{write:!0}})],b.prototype,"extent",
void 0);f([q.property({type:String,json:{write:!0}})],b.prototype,"mode",void 0);f([q.property({type:String,json:{read:e.read,write:e.write}})],b.prototype,"originPosition",void 0);f([q.property({type:Number,json:{write:!0}})],b.prototype,"tolerance",void 0);return b=g=f([q.subclass("esri.tasks.support.QuantizationParameters")],b)}(q.declared(m));g.default=b})},"esri/tasks/support/StatisticDefinition":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m){return function(b){function c(c){c=b.call(this)||this;c.maxPointCount=void 0;c.maxRecordCount=void 0;c.maxVertexCount=void 0;c.onStatisticField=null;c.outStatisticFieldName=null;c.statisticType=null;return c}p(c,b);g=c;c.prototype.clone=function(){return new g({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType})};
var g;f([m.property({type:Number,json:{write:!0}})],c.prototype,"maxPointCount",void 0);f([m.property({type:Number,json:{write:!0}})],c.prototype,"maxRecordCount",void 0);f([m.property({type:Number,json:{write:!0}})],c.prototype,"maxVertexCount",void 0);f([m.property({type:String,json:{write:!0}})],c.prototype,"onStatisticField",void 0);f([m.property({type:String,json:{write:!0}})],c.prototype,"outStatisticFieldName",void 0);f([m.property({type:String,json:{write:!0}})],c.prototype,"statisticType",
void 0);return c=g=f([m.subclass("esri.tasks.support.StatisticDefinition")],c)}(m.declared(l))})},"esri/tasks/support/RelationshipQuery":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h,c){return function(b){function e(a){a=b.call(this,a)||this;a.definitionExpression=null;a.gdbVersion=null;a.geometryPrecision=
void 0;a.historicMoment=null;a.maxAllowableOffset=void 0;a.objectIds=null;a.outFields=null;a.outSpatialReference=null;a.relationshipId=void 0;a.returnGeometry=!1;a.source=null;return a}p(e,b);a=e;e.prototype._writeHistoricMoment=function(a,b){b.historicMoment=a&&a.getTime()};e.prototype.clone=function(){return new a(h.clone({definitionExpression:this.definitionExpression,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&this.historicMoment.getTime(),
maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,source:this.source}))};var a;f([c.property({type:String,json:{write:!0}})],e.prototype,"definitionExpression",void 0);f([c.property({type:String,json:{write:!0}})],e.prototype,"gdbVersion",void 0);f([c.property({type:Number,json:{write:!0}})],e.prototype,"geometryPrecision",void 0);f([c.property({type:Date})],
e.prototype,"historicMoment",void 0);f([c.writer("historicMoment")],e.prototype,"_writeHistoricMoment",null);f([c.property({type:Number,json:{write:!0}})],e.prototype,"maxAllowableOffset",void 0);f([c.property({type:[Number],json:{write:!0}})],e.prototype,"objectIds",void 0);f([c.property({type:[String],json:{write:!0}})],e.prototype,"outFields",void 0);f([c.property({type:l.SpatialReference,json:{read:{source:"outSR"},write:{target:"outSR"}}})],e.prototype,"outSpatialReference",void 0);f([c.property({json:{write:!0}})],
e.prototype,"relationshipId",void 0);f([c.property({json:{write:!0}})],e.prototype,"returnGeometry",void 0);f([c.property({json:{write:!0}})],e.prototype,"source",void 0);return e=a=f([c.subclass("esri.tasks.support.RelationshipQuery")],e)}(c.declared(m))})},"esri/layers/graphics/controllers/OnDemandController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/Handles ../../../core/Logger ../../../core/Promise ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../geometry/support/aaBoundingRect ./support/TileSet ../../support/GraphicsManager ../../support/TileInfo ../../../views/2d/tiling/enums ../../../views/2d/tiling/TileInfoView ../../../views/2d/tiling/TileKey ../../../views/2d/tiling/TileQueue ../../../views/2d/tiling/TileStrategy".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x){var y=q.getLogger("esri.views.2d.layers.MapImageLayerView2D"),A=function(){function a(){this.key=new d(0,0,0,0);this.status=w.TileStatus.INITIALIZED}a.prototype.dispose=function(){};return a}();return function(b){function d(a){var d=b.call(this)||this;d._handles=new c;d._pendingQueries=new Map;d._tileRequests=new Map;d.layer=a.layer;d.layerView=a.layerView;d.graphics=a.graphics;d._tileInfo=v.create({spatialReference:d.layerView.view.spatialReference,
size:512});d._tileInfoView=new t(d._tileInfo);d._tileQueue=new n({tileInfoView:d._tileInfoView,process:function(a){return d._fetchTile(a)}});d._tileSet=new u({layer:d.layer,tileInfo:d._tileInfo});d._graphicsManager=new z({graphics:d.graphics,objectIdField:d.layer.objectIdField});d._tileStrategy=new x({cachePolicy:"purge",acquireTile:function(a){return d._acquireTile(a)},releaseTile:function(a){return d._releaseTile(a)},tileInfoView:d._tileInfoView});d._handles.add([d.layer.watch("outFields",function(a,
b){a&&b?-1===b.indexOf("*")&&(a.sort(),b.sort(),JSON.stringify(a)!==JSON.stringify(b)&&d.refresh()):d.refresh()}),d.layer.watch("definitionExpression, historicMoment",function(){return d.refresh()}),d.layer.on("edits",function(a){return d._editsHandler(a)})],"layer");return d}p(d,b);d.prototype.destroy=function(){var a=this;this._pendingQueries.forEach(function(a){a.isFulfilled()||a.cancel()});this._tileStrategy.tiles.forEach(function(b){return a._releaseTile(b)});this._handles.destroy();this._graphicsManager.destroy();
this._tileStrategy.destroy();this._tileQueue.clear();this._tileRequests.clear()};Object.defineProperty(d.prototype,"graphics",{set:function(a){var b=this,c=this._get("graphics");c!==a&&(this._handles.remove("graphics"),c&&c.forEach(function(a){a.layer=null;a.sourceLayer=null}),a&&(a.forEach(function(a){a.layer=b.layer;a.sourceLayer=b.layer}),this._handles.add([a.on("after-add",function(a){a.item.layer=b.layer;a.item.sourceLayer=b.layer}),a.on("after-remove",function(a){a.item.layer=null;a.item.sourceLayer=
null})],"graphics")),this._set("graphics",a))},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"updating",{get:function(){return 0<this._tileQueue.length||this.get("_graphicsManager.updating")},enumerable:!0,configurable:!0});d.prototype.update=function(a){var b=this;this._tileQueue.pause();this._tileQueue.state=a.state;this._tileStrategy.update(a);var c=this.layer.objectIdField,d=new Map;a=this._tileStrategy.tiles.reduce(function(a,e){if(e.featureSet){var f=b._graphicsManager.findIntent(e.intentId);
e.featureSet.features.forEach(function(b){b&&b.attributes&&(d.set(b.attributes[c],f),a.push(b))})}return a},[]);this._graphicsManager.update(a,d);this._tileQueue.resume();this.notifyChange("updating")};d.prototype.refresh=function(){var a=this;this._tileQueue.reset();this._graphicsManager.removeAll();this._tileStrategy.tiles.forEach(function(b){var c=a._graphicsManager.createIntentToAdd();a.notifyChange("updating");var d=a._tileSet.fetch(b.key).then(function(d){b.intentId=c;b.featureSet=d;a._graphicsManager.add(b.featureSet.features,
b.intentId);return b});d.always(function(){a._graphicsManager.removeIntent(c);a.notifyChange("updating")});return d});this.notifyChange("updating")};d.prototype._acquireTile=function(a){var b=this,c=new A;c.key.set(a);a=this._tileQueue.push(c.key).then(function(a){c.status=w.TileStatus.READY;c.attached=!0;c.featureSet=a.featureSet;c.intentId=a.intentId;b._graphicsManager.removeIntent(c.intentId);b.layerView.requestUpdate()});this._tileRequests.set(c,a);this.notifyChange("updating");return c};d.prototype._releaseTile=
function(a){if(this._tileRequests.has(a)){var b=this._tileRequests.get(a);b.isFulfilled()||b.cancel();this._tileRequests.delete(a);this.layerView.requestUpdate()}};d.prototype._fetchTile=function(b){var c=this,d=this._graphicsManager.createIntentToAdd();b=this._tileSet.fetch(b).then(function(a){for(var b=Date.now(),c=0,e=a.features;c<e.length;c++)e[c]._ts=b;return{featureSet:a,intentId:d}});b.catch(function(b){c._graphicsManager.removeIntent(d);if(b&&"cancel"===b.dojoType)return a.reject(b);b=new m("ondemandcontroller2d:tile-request-failed",
"Failed to query for features",{error:b});y.error(b);return a.reject(b)});return b};d.prototype._editsHandler=function(a){var b=this,c=function(a){return a.objectId},d=a.deletedFeatures.map(c);this._graphicsManager.delete(d);a=a.addedFeatures.concat(a.updatedFeatures).map(c);if(a.length){c=this.layer.createQuery();c.objectIds=a;c.outSpatialReference=this._tileInfo.spatialReference;var e=this._graphicsManager.createIntentToAdd(a);a=this.layer.queryFeatures(c);this._pendingQueries.set(e,a);this.notifyChange("updating");
a.then(function(a){return b._refetchHandler(a,e)}).always(function(){b._graphicsManager.removeIntent(e);b._pendingQueries.delete(e);b.notifyChange("updating")})}};d.prototype._refetchHandler=function(a,b){var c=this,d=a.features;if(d){var e=this._tileInfo.spatialReference;a=function(a){var b=r.toExtent(a.key.extent,e);d.forEach(function(d){d.geometry&&b.intersects(d.geometry)&&c._addFeatureToTile(d,a)})};for(var f=0,g=this._tileStrategy.tiles;f<g.length;f++)a(g[f]);this._graphicsManager.add(d,b)}};
d.prototype._addFeatureToTile=function(a,b){var c=b.featureSet.features||[],d=this.layer.objectIdField,e=a.attributes&&a.attributes[d],f;c.some(function(a){(a.attributes&&a.attributes[d])===e&&(f=a);return!!f});f?(f.geometry=a.geometry,f.attributes=a.attributes):c.push(a);b.featureSet.features=c};f([k.property()],d.prototype,"graphics",null);f([k.property()],d.prototype,"layer",void 0);f([k.property()],d.prototype,"layerView",void 0);f([k.property()],d.prototype,"updating",null);return d=f([k.subclass("esri.layers.graphics.controllers.OnDemandController2D")],
d)}(k.declared(l,e,h))})},"esri/layers/graphics/controllers/support/TileSet":function(){define(["require","exports","../../../../geometry/support/aaBoundingRect","../../../../tasks/support/QuantizationParameters"],function(b,g,p,f){return function(){function b(b){this.layer=b.layer;this.tileInfo=b.tileInfo}b.prototype.fetch=function(b){return this._queryTile(b)};b.prototype._queryTile=function(b){return this.layer.queryFeatures(this._createQuery(b))};b.prototype._createQuery=function(b){this.tileInfo.updateTileInfo(b);
var f=this.tileInfo.spatialReference,c=this.layer.createQuery();c.geometry=p.toExtent(b.extent,f);c.outSpatialReference=f;this._setResolutionParams(c,b);return c};b.prototype._setResolutionParams=function(b,g){var c=this.layer,h=c.geometryType;if("polyline"===h||"polygon"===h)g=this.tileInfo.lodAt(g.level).resolution,"polyline"===h&&(b.maxAllowableOffset=g),c.get("capabilities.query.supportsQuantization")&&(b.quantizationParameters=new f.default({mode:"view",originPosition:"upper-left",tolerance:g,
extent:c.fullExtent}))};return b}()})},"esri/layers/support/GraphicsManager":function(){define(["../../core/Accessor"],function(b){var g=0;return b.createSubclass({constructor:function(){this._deletedGraphicsIndex=new Set;this._intentsIndex=new Map},destroy:function(){this.removeAll();this._intentsIndex=this._deletedGraphicsIndex=null},properties:{graphics:null,indexById:{value:null,dependsOn:["graphics","objectIdField"],get:function(){return this._createIndexById(this.graphics&&this.graphics.toArray(),
this.objectIdField)}},numGraphics:{value:0,dependsOn:["indexById"],get:function(){return this.indexById?this.indexById.size:0}},objectIdField:null,updating:{value:!1,dependsOn:["_intentsIndex"],get:function(){return!!(this._intentsIndex&&0<this._intentsIndex.size)}},_intentsIndex:{value:null}},_oldIndex:null,_deletedGraphicsIndex:null,beginPagedUpdate:function(){this._oldIndex=this.indexById;this.indexById=null;this.notifyChange("numGraphics")},addPage:function(b,f){this.add(b,f)},revertPagedUpdate:function(){var b=
this._removeLeftOnly(this.indexById,this._oldIndex);this.indexById=this._oldIndex;this._oldIndex=null;this.graphics.removeMany(b);this.notifyChange("numGraphics")},endPagedUpdate:function(){var b=this._removeLeftOnly(this._oldIndex,this.indexById);this._oldIndex=null;this.graphics.removeMany(b);this.notifyChange("numGraphics")},findGraphic:function(b){return(b=this.indexById&&this.indexById.get(b))&&b.graphic},removeAll:function(){this.indexById=this._oldIndex=null;this.graphics.removeAll();this.notifyChange("numGraphics")},
add:function(b,f){if(b&&b.length){for(var g=this.objectIdField,m=this.indexById=this.indexById||new Map,h=this._oldIndex,c=this._createIndexById(b,g),c=this._extractObjectIds(c),m=this._extractObjectIds(m),h=this._extractObjectIds(h),m=m.concat(h),q=[],e=m.length,h=0;h<e;h++){var a=m[h];-1<c.indexOf(a)&&q.push(a)}q.length&&this._remove(q,!1);f=this.findIntent(f);c=new Map;m=b.length;for(h=0;h<m;h++)(q=b[h])&&q.attributes&&c.set(q.attributes[g],f);b.length&&this._add(b,c)}},remove:function(b){this._remove(b,
!1)},delete:function(b){this._remove(b,!0)},isDeleted:function(b){return this._deletedGraphicsIndex.has(b)},createIntentToAdd:function(b){b&&this._intentsIndex.forEach(function(f,g){b.forEach(function(b){f.ignoredIds.add(b)})},this);var f=g++;this._intentsIndex.set(f,{ignoredIds:new Set});this.notifyChange("updating");return f},findIntent:function(b){return this._intentsIndex.get(b)},removeIntent:function(b){this._intentsIndex.delete(b);this.notifyChange("updating")},update:function(b,f){if(b&&b.length){var g=
this.objectIdField,m=this.indexById=this.indexById||new Map,h=this._oldIndex;b=this._createIndexById(b,g);for(var g=this._extractObjectIds(b),c=this._extractObjectIds(m),q=this._extractObjectIds(h),c=c.concat(q),q=[],e=c.length,a=0;a<e;a++){var k=c[a];if(-1===g.indexOf(k))q.push(k);else{var r=m.get(k)||h.get(k),r=r&&r.graphic&&r.graphic._ts,p=b.get(k);(p&&p.graphic&&p.graphic._ts)>r&&q.push(k)}}m=[];h=g.length;for(a=0;a<h;a++)k=g[a],(-1===c.indexOf(k)||-1<q.indexOf(k))&&m.push(k);q.length&&this._remove(q,
!1);m.length&&this._add(this._extractGraphics(m,b),f)}},_createIndexById:function(b,f){var g;if(b&&b.length&&f){var m,h,c;g=new Map;for(m=0;h=b[m];m++)c=h.attributes&&h.attributes[f],null!=c&&g.set(c,{graphic:h,refCount:1})}return g},_add:function(b,f){var g=this.objectIdField;b.forEach(function(b){var h=f.get(b.attributes&&b.attributes[g]);this._addToIndex(b,this.indexById,h)},this);this.graphics.addMany(b);this.notifyChange("numGraphics")},_addToIndex:function(b,f,g){var l=b.attributes&&b.attributes[this.objectIdField];
f&&null!=l&&(f.has(l)?g&&g.ignoredIds.has(l)||(g=f.get(l),f.set(l,{graphic:b,refCount:g.refCount+1})):this.isDeleted(l)||f.set(l,{graphic:b,refCount:1}))},_remove:function(b,f){b=b||[];b="object"===typeof b[0]?b.map(function(b){return b.attributes&&b.attributes[this.objectIdField]}.bind(this)):b;var g=this._extractGraphics(b,this._oldIndex),m=this._extractGraphics(b,this.indexById);b.forEach(function(b){f&&this._deletedGraphicsIndex.add(b);this._removeFromIndex(b,this._oldIndex,f);this._removeFromIndex(b,
this.indexById,f)}.bind(this));this.graphics.removeMany(g.concat(m));this.notifyChange("numGraphics")},_removeFromIndex:function(b,f,g){if(f&&f.has(b))if(g)f.delete(b);else{g=f.get(b);var l=g.refCount-1;0===l?f.delete(b):g.refCount=l}},_removeLeftOnly:function(b,f){var g=[];b&&b.forEach(function(l,h){var c=l.graphic;!c||f&&f.has(h)||(--l.refCount,0===l.refCount&&b.delete(h),g.push(c))});return g},_extractGraphics:function(b,f){return b&&f?b.map(function(b){return(b=f.get(b))&&b.graphic}):[]},_extractObjectIds:function(b){var f=
[];b&&b.forEach(function(b,g){f.push(g)});return f}})})},"esri/views/2d/tiling/enums":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});b=g.TileStatus||(g.TileStatus={});b[b.INITIALIZED=0]="INITIALIZED";b[b.NO_DATA=1]="NO_DATA";b[b.READY=2]="READY";b[b.MODIFIED=3]="MODIFIED";b[b.INVALID=4]="INVALID"})},"esri/views/2d/tiling/TileInfoView":function(){define("require exports ../../../geometry/support/spatialReferenceUtils ./LODInfo ./TileCoverage ./TileKey ./TileSpan".split(" "),
function(b,g,p,f,l,m,h){var c=new m("0/0/0/0"),q=function(){function a(a,b,c,e,f,g,h,d){this.x=a;this.ymin=b;this.ymax=c;this.invM=e;this.leftAdjust=f;this.rightAdjust=g;this.leftBound=h;this.rightBound=d}a.create=function(b,c){var e;b[1]>c[1]&&(e=[c,b],b=e[0],c=e[1]);e=b[0];b=b[1];var f=c[0];c=c[1];var g=f-e,k=c-b,k=0!==k?g/k:0,h=(Math.ceil(b)-b)*k,d=(Math.floor(b)-b)*k;return new a(e,Math.floor(b),Math.ceil(c),k,0>g?h:d,0>g?d:h,0>g?f:e,0>g?e:f)};a.prototype.incrRow=function(){this.x+=this.invM};
a.prototype.getLeftCol=function(){return Math.max(this.x+this.leftAdjust,this.leftBound)};a.prototype.getRightCol=function(){return Math.min(this.x+this.rightAdjust,this.rightBound)};return a}(),e=[[0,0],[0,0],[0,0],[0,0]];return function(){function a(a,b){var c=this;this.tileInfo=a;this.fullExtent=b;this.scales=[];this._lodInfos=null;this._infoByScale={};this._infoByLevel={};var e=a.lods.slice();e.sort(function(a,b){return b.scale-a.scale});var g=this._lodInfos=e.map(function(c){return f.create(a,
c,b)});e.forEach(function(a,b){c._infoByLevel[a.level]=g[b];c._infoByScale[a.scale]=g[b];c.scales[b]=a.scale},this);this._wrap=a.isWrappable}a.prototype.getLODInfoAt=function(a){return this._infoByLevel[a.level]};a.prototype.getTileBounds=function(a,b,e){void 0===e&&(e=!1);c.set(b);return(b=this._infoByLevel[c.level])?b.getTileBounds(a,c,e):a};a.prototype.getTileCoords=function(a,b,e){void 0===e&&(e=!1);c.set(b);return(b=this._infoByLevel[c.level])?b.getTileCoords(a,c,e):a};a.prototype.getTileCoverage=
function(a,b){void 0===b&&(b=192);var c=this.getClosestInfoForScale(a.scale),f=l.pool.acquire(c),g=this._wrap,k;k=Infinity;var m=-Infinity,d,n,r=f.spans;e[0][0]=e[0][1]=e[1][1]=e[3][0]=-b;e[1][0]=e[2][0]=a.size[0]+b;e[2][1]=e[3][1]=a.size[1]+b;for(b=0;b<e.length;b++){var p=e[b];a.toMap(p,p);p[0]=c.getColumnForX(p[0]);p[1]=c.getRowForY(p[1])}a=[];p=3;for(b=0;4>b;b++){if(e[b][1]!==e[p][1]){var A=q.create(e[b],e[p]);k=Math.min(A.ymin,k);m=Math.max(A.ymax,m);void 0===a[A.ymin]&&(a[A.ymin]=[]);a[A.ymin].push(A)}p=
b}if(null==k||null==m||100<m-k)return null;for(p=[];k<m;){null!=a[k]&&(p=p.concat(a[k]));d=Infinity;n=-Infinity;for(b=p.length-1;0<=b;b--)A=p[b],d=Math.min(d,A.getLeftCol()),n=Math.max(n,A.getRightCol());d=Math.floor(d);n=Math.floor(n);if(k>=c.first[1]&&k<=c.last[1])if(g)if(c.size[0]<c.worldSize[0])for(A=Math.floor(n/c.worldSize[0]),b=Math.floor(d/c.worldSize[0]);b<=A;b++)r.push(new h(k,Math.max(c.getFirstColumnForWorld(b),d),Math.min(c.getLastColumnForWorld(b),n)));else r.push(new h(k,d,n));else d>
c.last[0]||n<c.first[0]||(d=Math.max(d,c.first[0]),n=Math.min(n,c.last[0]),r.push(new h(k,d,n)));k+=1;for(b=p.length-1;0<=b;b--)A=p[b],A.ymax>=k?A.incrRow():p.splice(b,1)}return f};a.prototype.getTileIdAtParent=function(a,b){b=m.pool.acquire(b);var c=this._infoByLevel[b.level];if(a.resolution<c.resolution)throw Error("Cannot calculate parent tile. destination LOD's resolution "+a.resolution+" is not a parent resolution of "+c.resolution);return a.resolution===c.resolution?b.id:m.getId(a.level,Math.floor(b.row*
c.resolution/a.resolution+.01),Math.floor(b.col*c.resolution/a.resolution+.01),b.world)};a.prototype.getTileParentId=function(a){a=m.pool.acquire(a);var b=this._lodInfos.indexOf(this._infoByLevel[a.level])-1;if(0>b)return m.pool.release(a),null;b=this.getTileIdAtParent(this._lodInfos[b],a);m.pool.release(a);return b};a.prototype.getTileResolution=function(a){return(a=this._infoByLevel["object"===typeof a?a.level:a])?a.resolution:-1};a.prototype.getTileScale=function(a){return(a=this._infoByLevel[a.level])?
a.scale:-1};a.prototype.intersects=function(a,b){var c=m.pool.acquire(b);b=this._infoByLevel[c.level];var e=a.lodInfo;if(e.resolution>b.resolution){var f=m.pool.acquire(this.getTileIdAtParent(e,c)),g=e.denormalizeCol(f.col,f.world);b=a.spans.some(function(a){return a.row===f.row&&a.colFrom<=g&&a.colTo>=g});m.pool.release(c);m.pool.release(f);return b}if(e.resolution<b.resolution){var k=a.spans.reduce(function(a,b){a[0]=Math.min(a[0],b.row);a[1]=Math.max(a[1],b.row);a[2]=Math.min(a[2],b.colFrom);a[3]=
Math.max(a[3],b.colTo);return a},[Infinity,-Infinity,Infinity,-Infinity]);a=k[0];var d=k[1],h=k[2],k=k[3],l=b.denormalizeCol(c.col,c.world),q=e.getColumnForX(b.getXForColumn(l)),r=e.getRowForY(b.getYForRow(c.row)),l=e.getColumnForX(b.getXForColumn(l+1))-1;b=e.getRowForY(b.getYForRow(c.row+1))-1;m.pool.release(c);return!(q>k||l<h||r>d||b<a)}var p=e.denormalizeCol(c.col,c.world);b=a.spans.some(function(a){return a.row===c.row&&a.colFrom<=p&&a.colTo>=p});m.pool.release(c);return b};a.prototype.normalizeBounds=
function(a,b,c){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];this._wrap&&(b=p.getInfo(this.tileInfo.spatialReference),c=-c*(b.valid[1]-b.valid[0]),a[0]+=c,a[2]+=c);return a};a.prototype.getClosestInfoForScale=function(a){var b=this.scales;this._infoByScale[a]||(a=b.reduce(function(b,c,e,f){return Math.abs(c-a)<Math.abs(b-a)?c:b},b[0]));return this._infoByScale[a]};return a}()})},"esri/views/2d/tiling/LODInfo":function(){define(["require","exports","../../../geometry/support/spatialReferenceUtils","./TileKey"],
function(b,g,p,f){function l(b,c,f){b[0]=c;b[1]=f;return b}var m=new f("0/0/0/0");return function(){function b(b,f,e,a,g,h,l,m,p,w,t,d){this.level=b;this.resolution=f;this.scale=e;this.origin=a;this.first=g;this.last=h;this.size=l;this.norm=m;this.worldStart=p;this.worldEnd=w;this.worldSize=t;this.wrap=d}b.create=function(c,f,e){var a=p.getInfo(c.spatialReference),g=[c.origin.x,c.origin.y],h=[c.size[0]*f.resolution,c.size[1]*f.resolution],m=[-Infinity,-Infinity],q=[Infinity,Infinity],v=[Infinity,
Infinity];e&&(l(m,Math.max(0,Math.floor((e.xmin-g[0])/h[0])),Math.max(0,Math.floor((g[1]-e.ymax)/h[1]))),l(q,Math.max(0,Math.floor((e.xmax-g[0])/h[0])),Math.max(0,Math.floor((g[1]-e.ymin)/h[1]))),l(v,q[0]-m[0]+1,q[1]-m[1]+1));var w;c.isWrappable?(c=[Math.ceil(Math.round(2*a.origin[1]/f.resolution)/c.size[0]),v[1]],a=[Math.floor((a.origin[0]-g[0])/h[0]),m[1]],e=[c[0]+a[0]-1,q[1]],w=!0):(a=m,e=q,c=v,w=!1);return new b(f.level,f.resolution,f.scale,g,m,q,v,h,a,e,c,w)};b.prototype.normalizeCol=function(b){if(!this.wrap)return b;
var c=this.worldSize[0];return 0>b?c-1-Math.abs((b+1)%c):b%c};b.prototype.denormalizeCol=function(b,f){return this.wrap?this.worldSize[0]*f+b:b};b.prototype.getWorldForColumn=function(b){return this.wrap?Math.floor(b/this.worldSize[0]):0};b.prototype.getFirstColumnForWorld=function(b){return b*this.worldSize[0]+this.first[0]};b.prototype.getLastColumnForWorld=function(b){return b*this.worldSize[0]+this.first[0]+this.size[0]-1};b.prototype.getColumnForX=function(b){return(b-this.origin[0])/this.norm[0]};
b.prototype.getXForColumn=function(b){return this.origin[0]+b*this.norm[0]};b.prototype.getRowForY=function(b){return(this.origin[1]-b)/this.norm[1]};b.prototype.getYForRow=function(b){return this.origin[1]-b*this.norm[1]};b.prototype.getTileBounds=function(b,f,e){void 0===e&&(e=!1);m.set(f);var a=e?m.col:this.denormalizeCol(m.col,m.world),c=m.row;f=this.getXForColumn(a);e=this.getYForRow(c+1);a=this.getXForColumn(a+1);c=this.getYForRow(c);b[0]=f;b[1]=e;b[2]=a;b[3]=c;return b};b.prototype.getTileCoords=
function(b,f,e){void 0===e&&(e=!1);m.set(f);f=e?m.col:this.denormalizeCol(m.col,m.world);Array.isArray(b)?l(b,this.getXForColumn(f),this.getYForRow(m.row)):(b.x=this.getXForColumn(f),b.y=this.getYForRow(m.row));return b};return b}()})},"esri/views/2d/tiling/TileKey":function(){define(["require","exports","../../../core/ObjectPool"],function(b,g,p){return function(){function b(b,f,g,c){this.set(b,f,g,c)}b.from=function(f,g,h,c){return b.pool.acquire(f,g,h,c)};b.getId=function(b,f,g,c){return"object"===
typeof b?b.level+"/"+b.row+"/"+b.col+"/"+b.world:b+"/"+f+"/"+g+"/"+c};Object.defineProperty(b.prototype,"key",{get:function(){return this},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"id",{get:function(){return this.toString()},enumerable:!0,configurable:!0});b.prototype.equals=function(b){return this.level===b.level&&this.row===b.row&&this.col===b.col&&this.world===b.world};b.prototype.release=function(){this.world=this.col=this.row=this.level=0};b.prototype.set=function(b,
f,g,c){null==b?this.world=this.col=this.row=this.level=0:"object"===typeof b?(this.level=b.level||0,this.row=b.row||0,this.col=b.col||0,this.world=b.world||0):"string"===typeof b?(b=b.split("/"),f=b[1],g=b[2],c=b[3],this.level=parseFloat(b[0]),this.row=parseFloat(f),this.col=parseFloat(g),this.world=parseFloat(c)):(this.level=+b,this.row=+f,this.col=+g,this.world=+c||0);return this};b.prototype.toString=function(){return this.level+"/"+this.row+"/"+this.col+"/"+this.world};b.prototype.getChildKeys=
function(){var f=this.level+1,g=this.row<<1,h=this.col<<1,c=this.world;return[b.pool.acquire(f,g,h,c),b.pool.acquire(f,g,h+1,c),b.pool.acquire(f,g+1,h,c),b.pool.acquire(f,g+1,h+1,c)]};b.prototype._compare=function(b){return this.row<b.row?-1:this.row>b.row?1:this.col<b.col?-1:this.col>b.col?1:0};b.sort=function(f){return f.map(function(f){return b.from(f)}).sort(function(b,f){return b._compare(f)}).map(function(b){return b.id})};b.pool=new p(b,!0,null,25,50);return b}()})},"esri/views/2d/tiling/TileCoverage":function(){define(["require",
"exports","../../../core/ArrayPool","../../../core/ObjectPool","./TileSpan"],function(b,g,p,f,l){return function(){function b(b){this.lodInfo=b;this.spans=p.acquire()}b.prototype.release=function(){for(var b=0,c=this.spans;b<c.length;b++)l.pool.release(c[b]);p.release(this.spans)};b.prototype.forEach=function(b,c){var f=this.spans,e=this.lodInfo,a=e.level;if(0!==f.length)for(var g=0;g<f.length;g++)for(var h=f[g],l=h.row,m=h.colTo,h=h.colFrom;h<=m;h++)b.call(c,a,l,e.normalizeCol(h),e.getWorldForColumn(h))};
b.pool=new f(b,!0);return b}()})},"esri/views/2d/tiling/TileSpan":function(){define(["require","exports","../../../core/ObjectPool"],function(b,g,p){return function(){function b(b,f,g){this.row=b;this.colFrom=f;this.colTo=g}b.pool=new p(b,!0);return b}()})},"esri/views/2d/tiling/TileQueue":function(){define(["require","exports","../../../core/QueueProcessor","../libs/gl-matrix/vec2"],function(b,g,p,f){function l(b,a){b.length=0;a.forEach(function(a){return b.push(a)});return b}var m=new Set,h=[],
c=new Map,q=[0,0];return function(){function b(a){var b=this;this._keysToRequests=new Map;this.tileInfoView=null;var c=a.strategy&&"scale-first"!==a.strategy?this._peekByCenterFirst.bind(this):this._peekByScaleFirst.bind(this);this.tileInfoView=a.tileInfoView;this._queues=a.tileServers&&0<a.tileServers.length?a.tileServers.map(function(e){return new p({concurrency:a.concurrency||6,process:function(c){c=b._keysToRequests.get(c);return a.process(c,e)},peeker:c})}):[new p({concurrency:a.concurrency||
6,process:function(c){c=b._keysToRequests.get(c);return a.process(c)},peeker:c})]}Object.defineProperty(b.prototype,"length",{get:function(){return this._queues.reduce(function(a,b){return a+b.length},0)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"onGoingCount",{get:function(){return this._keysToRequests.size},enumerable:!0,configurable:!0});b.prototype.clear=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].clear();this._keysToRequests.clear()};b.prototype.find=function(a,
b){var c=this;b=0;for(var e=this._queues;b<e.length;b++){var f=e[b].find(function(b){return a(c._keysToRequests.get(b).key)});if(f)return f}};b.prototype.get=function(a){a="string"===typeof a?a:a.id;for(var b=0,c=this._queues;b<c.length;b++){var e=c[b].get(a);if(e)return e}};b.prototype.getRequest=function(a){return this._keysToRequests.get("string"===typeof a?a:a.id)};b.prototype.has=function(a){return"string"===typeof a?this._keysToRequests.has(a):this._keysToRequests.has(a.id)};b.prototype.isOngoing=
function(a){var b="string"===typeof a?a:a.id;return this.has(b)&&this._queues.some(function(a){return a.isOngoing(b)})};b.prototype.pause=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].pause()};b.prototype.push=function(a){var b=this,c=a.key.id;if(this.has(c))return this.get(c);var e=this._queues[a.key.row%this._queues.length].push(c),f=function(){return b._keysToRequests.delete(c)};this._keysToRequests.set(c,a);e.then(f,f);return e};b.prototype.reset=function(){for(var a=0,b=this._queues;a<
b.length;a++)b[a].reset()};b.prototype.resume=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].resume()};b.prototype._peekByScaleFirst=function(a){if(!this.state)return a[0];for(var b=this.tileInfoView,e=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,g=0;g<a.length;g++){var q=this._keysToRequests.get(a[g]),p=this.tileInfoView.getTileScale(q.key);c.has(p)||(c.set(p,[]),e=Math.max(p,e),f=Math.min(p,f));c.get(p).push(q.key);m.add(p)}var t=this.state.scale;c.has(t)||(l(h,m),h.sort(),t=h.reduce(function(a,
b,c,d){return Math.abs(b-t)<Math.abs(a-t)?b:a},h[0]));t=Math.min(t,e);t=Math.max(t,f);a=c.get(t);var d=b.getClosestInfoForScale(t),n=d.getColumnForX(this.state.center[0]),x=d.getRowForY(this.state.center[1]);a.sort(function(a,b){var c=d.denormalizeCol(a.col,a.world),e=d.denormalizeCol(b.col,b.world);return Math.sqrt((n-c)*(n-c)+(x-a.row)*(x-a.row))-Math.sqrt((n-e)*(n-e)+(x-b.row)*(x-b.row))});m.clear();c.clear();return a[0].id};b.prototype._peekByCenterFirst=function(a){if(!this.state)return a[0];
for(var b=this.tileInfoView,c=this.state.center,e=Number.POSITIVE_INFINITY,g=null,h=0;h<a.length;h++){var l=this._keysToRequests.get(a[h]);b.getTileCoords(q,l.key);var m=f.distance(q,c);m<e&&(e=m,g=l.key)}return g.id};return b}()})},"esri/core/QueueProcessor":function(){define(["require","exports","dojo/Deferred","./Queue","./scheduling"],function(b,g,p,f,l){return function(){function b(b){this._apiPromises=new Map;this._processingItems=new Map;this._isPaused=!1;this._scheduledNextHandle=null;this.concurrency=
1;this.ordered=!1;b.concurrency&&(this.concurrency=b.concurrency);this.ordered=!!b.ordered;this._queue=new f(b.peeker?{peeker:b.peeker}:void 0);this.process=b.process}Object.defineProperty(b.prototype,"length",{get:function(){return this._processingItems.size+this._queue.length},enumerable:!0,configurable:!0});b.prototype.clear=function(){this._queue.clear();var b=[];this._processingItems.forEach(function(c){return b.push(c.resultPromise)});this._processingItems.clear();b.forEach(function(b){return b.cancel()});
b.length=0;this._apiPromises.forEach(function(c){return b.push(c)});this._apiPromises.clear();b.forEach(function(b){return b.cancel()});this._cancelNext()};b.prototype.find=function(b,c){var f=this,e=void 0;this._apiPromises.forEach(function(a,g){b.call(c,g)&&(e=f._apiPromises.get(g).promise)});return e};b.prototype.get=function(b){return(b=this._apiPromises.get(b))&&b.promise||void 0};b.prototype.isOngoing=function(b){return this._processingItems.has(b)};b.prototype.has=function(b){return this._apiPromises.has(b)};
b.prototype.pause=function(){this._isPaused||(this._isPaused=!0,this._cancelNext())};b.prototype.push=function(b){var c=this;if(this._apiPromises.has(b))return this._apiPromises.get(b).promise;var f=new p(function(e){var a=c._processingItems.get(b);a?a.resultPromise.cancel(e):(c._remove(b),c._scheduleNext())});this._add(b,f);this._scheduleNext();return f.promise};b.prototype.reset=function(){var b=[];this._processingItems.forEach(function(c){return b.push(c)});this._processingItems.clear();for(var c=
0;c<b.length;c++){var f=b[c];f.resultPromise.isFulfilled()?this._processReset(f):(f.isReset=!0,f.resultPromise.cancel())}};b.prototype.resume=function(){this._isPaused&&(this._isPaused=!1,this._scheduleNext())};b.prototype._scheduleNext=function(){var b=this;this._isPaused||this._scheduledNextHandle||(this._scheduledNextHandle=l.schedule(function(){b._scheduledNextHandle=null;b._next()}))};b.prototype._next=function(){for(;0<this._queue.length&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())};
b.prototype._processResult=function(b,c){this._remove(b.item);this._scheduleNext();b.dfd.resolve(c)};b.prototype._processError=function(b,c){b.isReset?this._processReset(b):(this._remove(b.item),this._scheduleNext(),b.dfd.reject(c))};b.prototype._processReset=function(b){this._remove(b.item);this._add(b.item,b.dfd);this._scheduleNext()};b.prototype._processOrdered=function(b,c){var f=this,e=!1;if(b.isReset)this._processReset(b);else{b.result=c;this._itemsToProcess||(this._itemsToProcess=[]);this._processingItems.forEach(function(a){e||
(a.result?f._itemsToProcess.push(a):e=!0)});b=0;for(c=this._itemsToProcess;b<c.length;b++){var a=c[b];!1===a.result.ok?this._processError(a,a.result.error):this._processResult(a,a.result.value)}this._itemsToProcess.length=0}};b.prototype._process=function(b){var c=this;if(null!=b){var f=this._apiPromises.get(b),e=this.process(b);if(e&&"function"===typeof e.then){var a={item:b,resultPromise:e,result:null,dfd:f,isReset:!1};this._processingItems.set(b,a);this.ordered?e.then(function(b){return c._processOrdered(a,
{ok:!0,value:b})},function(b){return c._processOrdered(a,{ok:!1,error:b})}):e.then(function(b){return c._processResult(a,b)},function(b){return c._processError(a,b)})}else f.resolve(e),this._remove(b)}};b.prototype._add=function(b,c){this._apiPromises.set(b,c);this._queue.push(b)};b.prototype._remove=function(b){this._queue.remove(b);this._apiPromises.delete(b);this._processingItems.delete(b)};b.prototype._cancelNext=function(){this._scheduledNextHandle&&(this._scheduledNextHandle.remove(),this._scheduledNextHandle=
null)};return b}()})},"esri/core/Queue":function(){define(["require","exports"],function(b,g){return function(){function b(b){this._items=[];this._itemSet=new Set;this._peeker=function(b){return b[0]};this._length=0;b&&b.peeker&&(this._peeker=b.peeker)}Object.defineProperty(b.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});b.prototype.clear=function(){this._itemSet.clear();this._length=this._items.length=0};b.prototype.peek=function(){if(0!==this._length)return this._peeker(this._items)};
b.prototype.push=function(b){this.contains(b)||this._add(b)};b.prototype.contains=function(b){return 0<this._length&&this._itemSet.has(b)};b.prototype.pop=function(){if(0!==this._length){var b=this.peek();this._remove(b);return b}};b.prototype.remove=function(b){this.contains(b)&&this._remove(b)};b.prototype._add=function(b){this._items.push(b);this._itemSet.add(b);this._length++};b.prototype._remove=function(b){this._itemSet.delete(b);this._items.splice(this._items.indexOf(b),1);this._length--};
return b}()})},"esri/views/2d/libs/gl-matrix/vec2":function(){define(["./common"],function(b){var g=b.GLMAT_ARRAY_TYPE,p=b.GLMAT_RANDOM,f={create:function(){var b=new g(2);b[0]=0;b[1]=0;return b},clone:function(b){var f=new g(2);f[0]=b[0];f[1]=b[1];return f},fromValues:function(b,f){var h=new g(2);h[0]=b;h[1]=f;return h},copy:function(b,f){b[0]=f[0];b[1]=f[1];return b},set:function(b,f,g){b[0]=f;b[1]=g;return b},add:function(b,f,g){b[0]=f[0]+g[0];b[1]=f[1]+g[1];return b},subtract:function(b,f,g){b[0]=
f[0]-g[0];b[1]=f[1]-g[1];return b}};f.sub=f.subtract;f.multiply=function(b,f,g){b[0]=f[0]*g[0];b[1]=f[1]*g[1];return b};f.mul=f.multiply;f.divide=function(b,f,g){b[0]=f[0]/g[0];b[1]=f[1]/g[1];return b};f.div=f.divide;f.min=function(b,f,g){b[0]=Math.min(f[0],g[0]);b[1]=Math.min(f[1],g[1]);return b};f.max=function(b,f,g){b[0]=Math.max(f[0],g[0]);b[1]=Math.max(f[1],g[1]);return b};f.scale=function(b,f,g){b[0]=f[0]*g;b[1]=f[1]*g;return b};f.scaleAndAdd=function(b,f,g,c){b[0]=f[0]+g[0]*c;b[1]=f[1]+g[1]*
c;return b};f.distance=function(b,f){var g=f[0]-b[0];b=f[1]-b[1];return Math.sqrt(g*g+b*b)};f.dist=f.distance;f.squaredDistance=function(b,f){var g=f[0]-b[0];b=f[1]-b[1];return g*g+b*b};f.sqrDist=f.squaredDistance;f.length=function(b){var f=b[0];b=b[1];return Math.sqrt(f*f+b*b)};f.len=f.length;f.squaredLength=function(b){var f=b[0];b=b[1];return f*f+b*b};f.sqrLen=f.squaredLength;f.negate=function(b,f){b[0]=-f[0];b[1]=-f[1];return b};f.inverse=function(b,f){b[0]=1/f[0];b[1]=1/f[1];return b};f.normalize=
function(b,f){var g=f[0],c=f[1],g=g*g+c*c;0<g&&(g=1/Math.sqrt(g),b[0]=f[0]*g,b[1]=f[1]*g);return b};f.dot=function(b,f){return b[0]*f[0]+b[1]*f[1]};f.cross=function(b,f,g){f=f[0]*g[1]-f[1]*g[0];b[0]=b[1]=0;b[2]=f;return b};f.lerp=function(b,f,g,c){var h=f[0];f=f[1];b[0]=h+c*(g[0]-h);b[1]=f+c*(g[1]-f);return b};f.random=function(b,f){f=f||1;var g=2*p()*Math.PI;b[0]=Math.cos(g)*f;b[1]=Math.sin(g)*f;return b};f.transformMat2=function(b,f,g){var c=f[0];f=f[1];b[0]=g[0]*c+g[2]*f;b[1]=g[1]*c+g[3]*f;return b};
f.transformMat2d=function(b,f,g){var c=f[0];f=f[1];b[0]=g[0]*c+g[2]*f+g[4];b[1]=g[1]*c+g[3]*f+g[5];return b};f.transformMat3=function(b,f,g){var c=f[0];f=f[1];b[0]=g[0]*c+g[3]*f+g[6];b[1]=g[1]*c+g[4]*f+g[7];return b};f.transformMat4=function(b,f,g){var c=f[0];f=f[1];b[0]=g[0]*c+g[4]*f+g[12];b[1]=g[1]*c+g[5]*f+g[13];return b};f.forEach=function(){var b=f.create();return function(f,g,c,l,e,a){g||(g=2);c||(c=0);for(l=l?Math.min(l*g+c,f.length):f.length;c<l;c+=g)b[0]=f[c],b[1]=f[c+1],e(b,b,a),f[c]=b[0],
f[c+1]=b[1];return f}}();f.str=function(b){return"vec2("+b[0]+", "+b[1]+")"};return f})},"esri/views/2d/libs/gl-matrix/common":function(){define([],function(){if(!b)var b=1E-6;if(!g)var g="undefined"!==typeof Float32Array?Float32Array:Array;if(!p)var p=Math.random;var f={GLMAT_EPSILON:b,GLMAT_ARRAY_TYPE:g,GLMAT_RANDOM:p,setMatrixArrayType:function(b){f.GLMAT_ARRAY_TYPE=b}},l=Math.PI/180,m=180/Math.PI;f.toRadian=function(b){return b*l};f.toDegree=function(b){return b*m};f.setMatrixArrayType(Array);
return f})},"esri/views/2d/tiling/TileStrategy":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./enums","./TileKey"],function(b,g,p,f,l){var m=new l(0,0,0,0),h=new Map,c=[],q=[];return function(){function b(a){this._previousResolution=Number.POSITIVE_INFINITY;this.cachePolicy="keep";this.tileIndex=new Map;this.tiles=[];this.buffer=192;this.acquireTile=a.acquireTile;this.releaseTile=a.releaseTile;this.tileInfoView=a.tileInfoView;a.cachePolicy&&(this.cachePolicy=a.cachePolicy);
null!=a.buffer&&(this.buffer=a.buffer)}b.prototype.destroy=function(){this.tileIndex.clear()};b.prototype.update=function(a){var b=this,e=this.tileIndex,g=this.tileInfoView.getTileCoverage(a.state,this.buffer);if(g){var l=g.spans,p=g.lodInfo,w=p.level,t=a.state.resolution,d=!a.stationary&&t>this._previousResolution;this._previousResolution=t;e.forEach(function(a){return a.visible=!0});this.tiles.length=0;h.clear();var n=0,x=0;if(0<l.length)for(var y=0;y<l.length;y++){a=l[y];for(var A=a.row,D=a.colTo,
B=a.colFrom;B<=D;B++)n++,a=m.set(w,A,p.normalizeCol(B),p.getWorldForColumn(B)).id,e.has(a)?(t=e.get(a),t.status!==f.TileStatus.INITIALIZED&&x++,t.attached?h.set(a,t):t.attached||d||this._addParentTile(a,h)):(t=this.acquireTile(m),this.tileIndex.set(a,t),d||this._addParentTile(a,h))}var F=x===n;q.length=0;c.length=0;e.forEach(function(a,e){m.set(e);if(!h.has(e)){var k=b.tileInfoView.intersects(g,m);!k||!d&&F?"purge"===b.cachePolicy&&a.status!==f.TileStatus.MODIFIED&&a.status!==f.TileStatus.READY?c.push(e):
(m.level>w||!k)&&c.push(e):a.attached?q.push(e):m.level>w&&c.push(e)}});for(l=0;l<q.length;l++)a=q[l],(t=e.get(a))&&t.attached&&h.set(a,t);for(l=0;l<c.length;l++)a=c[l],t=e.get(a),this.releaseTile(t),e["delete"](a);h.forEach(function(a){return b.tiles.push(a)});e.forEach(function(a){h.has(a.key.id)||(a.visible=!1)});q.length=0;c.length=0;h.clear()}};b.prototype.clear=function(){var a=this,b=this.tileIndex;b.forEach(function(b){a.releaseTile(b)});b.clear()};b.prototype._addParentTile=function(a,b){for(var c=
null;;){a=this.tileInfoView.getTileParentId(a);if(!a)break;if(this.tileIndex.has(a)&&(c=this.tileIndex.get(a))&&c.attached){b.has(c.key.id)||b.set(c.key.id,c);break}}};return b}()})},"esri/layers/graphics/controllers/SnapshotController":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/tsSupport/assignHelper ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/Handles ../../../core/Logger ../../../core/Promise ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../geometry/support/scaleUtils ../../support/GraphicsManager ../../../views/3d/layers/graphics/Graphics3DVerticalScale".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v){var w=e.getLogger("esri.layers.graphics.controllers.SnapshotController");return function(a){function b(b){b=a.call(this)||this;b.type="snapshot";b._gManager=null;b._verticalScale=null;b._handles=new q;b._source=null;b._started=!1;b._pendingQueries=new Map;b.extent=null;b.hasAllFeatures=!1;b.hasFeatures=!1;b.layer=null;b.layerView=null;b.maxPageSize=null;b.defaultReturnZ=void 0;b.defaultReturnM=void 0;b.pageSize=null;b.paginationEnabled=!1;return b}p(b,a);
b.prototype.initialize=function(){var a=this,b=this.layer.when(function(){return a._verifyCapabilities()}).then(function(){return a._init()});this.addResolvingPromise(b)};b.prototype.destroy=function(){this.cancelQuery();this._gManager&&(this._gManager.destroy(),this._gManager=null);this._handles.destroy();this._pendingQueries=this._handles=null};Object.defineProperty(b.prototype,"updating",{get:function(){return!!(this._pendingQueries&&0<this._pendingQueries.size)},enumerable:!0,configurable:!0});
Object.defineProperty(b.prototype,"graphics",{set:function(a){var b=this._get("graphics");b!==a&&(this._handles.remove("graphics"),a&&(this._collectionChanged({added:a.toArray(),removed:b&&b.toArray()}),this._handles.add(a.on("change",this._collectionChanged.bind(this)),"graphics")),this._set("graphics",a))},enumerable:!0,configurable:!0});b.prototype.cancelQuery=function(){var a=this;this._pendingQueries&&(this._pendingQueries.forEach(function(b,c){b.isFulfilled()||b.cancel(Error(a._cancelErrorMsg))}),
this._pendingQueries.clear(),this.notifyChange("updating"))};b.prototype.refresh=function(){this.isResolved()&&this._started&&this._queryFeatures()};b.prototype.startup=function(){this._started||(this._started=!0,this._resolutionParams=this._getResolutionParams(),this._queryFeatures())};b.prototype.update=function(){this.startup()};b.prototype._init=function(){var a=this.layer;this.paginationEnabled=!!a.get("capabilities.query.supportsPagination");this._source=a.source;var b=a.maxRecordCount||4E3;
this.pageSize=null==this.maxPageSize?b:Math.min(b,this.maxPageSize);this._gManager=new z({graphics:this.graphics,objectIdField:a.objectIdField});this._verticalScale=new v({sourceSpatialReference:a.spatialReference,destSpatialReference:this.layerView.view.spatialReference});this._setupStateWatchers()};b.prototype._getResolutionParams=function(){var a=this.layer,b=a.get("capabilities.query.supportsQuantization"),c;if("polyline"===a.geometryType||"polygon"===a.geometryType){var d=u.getMetersPerUnit(this.layerView.view.spatialReference);
null!=d&&(c=this._featureResolution.scale,d=this._featureResolution.value/d,c=a.maxScale?a.maxScale:a.minScale?Math.min(c,a.minScale):Math.min(c,u.getScale(this.layerView.view,a.fullExtent)),c*=d/this._featureResolution.scale)}return c?{maxAllowableOffset:b?null:c,quantizationParameters:b?{mode:"view",originPosition:"upperLeft",tolerance:c,extent:a.fullExtent}:null}:null};b.prototype._setupStateWatchers=function(){var a=this;this._handles.add([this.watch("extent",this.refresh.bind(this)),this.layer.watch("outFields",
function(b,c){b&&c?-1===c.indexOf("*")&&(b.sort(),c.sort(),JSON.stringify(b)!==JSON.stringify(c)&&a.refresh()):a.refresh()}),this.layer.watch("definitionExpression, historicMoment",this.refresh.bind(this)),this.layer.on("edits",this._editsHandler.bind(this))])};b.prototype._createQueryParams=function(){var a=this.layer,b=this.layerView,c=a.createQuery();c.outSpatialReference=b.view.spatialReference;c.geometry=this.extent;(a=a.capabilities&&a.capabilities.data)&&a.supportsZ&&null==c.returnZ&&null!=
this.defaultReturnZ&&(c.returnZ=this.defaultReturnZ);a&&a.supportsM&&null==c.returnM&&null!=this.defaultReturnM&&(c.returnM=this.defaultReturnM);c.set(this._resolutionParams);this.paginationEnabled&&(c.start=0,c.num=this.pageSize);return c};b.prototype._queryFeatures=function(){this.cancelQuery();this.hasAllFeatures=this.hasFeatures=!1;this._gManager.beginPagedUpdate();this.emit("query-start");this._executeQuery(this._createQueryParams())};b.prototype._executeQuery=function(a){var b=this,c=this._source.queryFeatures(a),
d=this._gManager.createIntentToAdd();this._querySetup(d,c);c.then(this._processFeatureSet.bind(this,a,d)).catch(function(a){return b._queryError(d,a)}).always(function(){return b._queryTeardown(d)})};b.prototype._processFeatureSet=function(a,b,c){var d=c.exceededTransferLimit,e=c.features,f=this._maxFeatures[this.layer.geometryType]||0,g=e?e.length:0,k=this._gManager.numGraphics+g,h=k>=f;h&&(w.warn('Feature limit exceeded on layer "',this.layer.title,'". Not all features are shown.'),(f=k-f)&&e.splice(g-
f,f));a=d&&this.paginationEnabled&&!h?this._queryNextPage(a):!1;this._verticalScale.adjust(e);e&&this._gManager.addPage(e,b);this.hasFeatures=!0;a||(this._gManager.endPagedUpdate(),this.hasAllFeatures=!d,this.emit("query-end",{success:!0}));return c};b.prototype._queryNextPage=function(a){a.start+=this.pageSize;this._executeQuery(a);return!0};b.prototype._queryError=function(a,b){b&&"cancel"===b.dojoType&&!this.hasFeatures?this._gManager.revertPagedUpdate():this._gManager.endPagedUpdate();this.emit("query-end",
{success:!1});if(b&&"cancel"===b.dojoType)return k.reject(b);a=new h("snapshotcontroller:tile-request-failed","Failed to query for features",{error:b});w.error(a);return k.reject(a)};b.prototype._querySetup=function(a,b){this._pendingQueries.set(a,b);this.notifyChange("updating")};b.prototype._queryTeardown=function(a){this._gManager.removeIntent(a);this._pendingQueries.delete(a);this.notifyChange("updating")};b.prototype._processRefetch=function(a,b){(b=b.features)&&this._gManager.add(b,a)};b.prototype._refetchError=
function(a,b){};b.prototype._verifyCapabilities=function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new h("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:this.layer});};b.prototype._collectionChanged=function(a){var b=a.added;if(b)for(var c=0;c<b.length;c++)b[c].layer=this.layer,b[c].sourceLayer=this.layer;if(b=a.removed)for(c=0;c<b.length;c++)b[c].layer=null,b[c].sourceLayer=null};b.prototype._editsHandler=
function(a){var b=function(a){return a.objectId},c=a.deletedFeatures.map(b);this._gManager.delete(c);a=a.addedFeatures.concat(a.updatedFeatures).map(b);a.length&&(b=this._createQueryParams(),b.objectIds=a,b=this._source.queryFeatures(b),a=this._gManager.createIntentToAdd(a),this._querySetup(a,b),b.then(this._processRefetch.bind(this,a)).catch(this._refetchError.bind(this,a)).always(this._queryTeardown.bind(this,a)))};f([r.shared("SnapshotController: query cancelled")],b.prototype,"_cancelErrorMsg",
void 0);f([r.property({readOnly:!0})],b.prototype,"type",void 0);f([r.shared({value:.25,scale:945})],b.prototype,"_featureResolution",void 0);f([r.shared({point:16E3,multipoint:8E3,polyline:4E3,polygon:4E3,multipatch:4E3})],b.prototype,"_maxFeatures",void 0);f([r.property()],b.prototype,"_pendingQueries",void 0);f([r.property({dependsOn:["_pendingQueries"]})],b.prototype,"updating",null);f([r.property()],b.prototype,"graphics",null);f([r.property()],b.prototype,"extent",void 0);f([r.property()],b.prototype,
"hasAllFeatures",void 0);f([r.property()],b.prototype,"hasFeatures",void 0);f([r.property()],b.prototype,"layer",void 0);f([r.property()],b.prototype,"layerView",void 0);f([r.property()],b.prototype,"maxPageSize",void 0);f([r.property()],b.prototype,"defaultReturnZ",void 0);f([r.property()],b.prototype,"defaultReturnM",void 0);f([r.property()],b.prototype,"pageSize",void 0);f([r.property()],b.prototype,"paginationEnabled",void 0);return b=f([r.subclass("esri.layers.graphics.controllers.SnapshotController")],
b)}(r.declared(m,a,c))})},"esri/views/3d/layers/graphics/Graphics3DVerticalScale":function(){define(["require","exports","../../../../geometry/support/scaleUtils","../../../../layers/graphics/dehydratedFeatures"],function(b,g,p,f){return function(){function b(b){this.sourceSpatialReference=b.sourceSpatialReference;this.destSpatialReference=b.destSpatialReference}b.prototype.adjust=function(b){var f=this._getVerticalUnitScale();1!==f&&this._scaleVerticalUnits(b,f)};b.prototype._getVerticalUnitScale=
function(){if(this.sourceSpatialReference&&!this.sourceSpatialReference.equals(this.destSpatialReference)){var b=p.getMetersPerVerticalUnitForSR(this.sourceSpatialReference),f=p.getMetersPerVerticalUnitForSR(this.destSpatialReference);return b/f}return 1};b.prototype._vertexListsScaleZ=function(b,f){for(var c=0;c<b.length;++c)for(var g=b[c],e=0;e<g.length;++e)g[e][2]*=f};b.prototype._scaleVerticalUnits=function(b,g){for(var c=0;c<b.length;++c){var h=b[c].geometry;h&&f.hasZ(h)&&(this._geometryIsPoint(h)?
null!==h.z&&(h.z*=g):this._geometryIsPolyline(h)?this._vertexListsScaleZ(h.paths,g):this._geometryIsPolygon(h)&&this._vertexListsScaleZ(h.rings,g))}};b.prototype._geometryIsPoint=function(b){return"point"===b.type};b.prototype._geometryIsPolygon=function(b){return"polygon"===b.type};b.prototype._geometryIsPolyline=function(b){return"polyline"===b.type};return b}()})},"esri/layers/graphics/dehydratedFeatures":function(){define("require exports ../../Graphic ../../core/lang ../../geometry/SpatialReference ../../geometry/support/aaBoundingBox ../../geometry/support/aaBoundingRect ./dehydratedFeatureComparison".split(" "),
function(b,g,p,f,l,m,h,c){function q(a){switch(a){case "esriGeometryPoint":return"point";case "esriGeometryMultipoint":return"multipoint";case "esriGeometryPolyline":return"polyline";case "esriGeometryPolygon":return"polygon";case "esriGeometryEnvelope":return"extent"}}function e(b,c,e,f){return{uid:p.generateUID(),objectId:f&&b.attributes?b.attributes[f]:null,attributes:b.attributes,geometry:a(b.geometry,c,e),visible:!0}}function a(a,b,c){if(!a)return null;switch(b){case "point":return{x:a.x,y:a.y,
z:a.z,type:b,spatialReference:c};case "polyline":var d=a;return{paths:d.paths,hasZ:d.hasZ,hasM:d.hasM,type:b,spatialReference:c};case "polygon":return{rings:a.rings,hasZ:d.hasZ,hasM:d.hasM,type:b,spatialReference:c};case "multipoint":return{points:a.points,hasZ:d.hasZ,hasM:d.hasM,type:b,spatialReference:c};case "extent":return{xmin:a.xmin,ymin:a.ymin,zmin:a.zmin,mmin:a.mmin,xmax:a.xmax,ymax:a.ymax,zmax:a.zmax,mmax:a.mmax,hasZ:a.hasZ,hasM:a.hasM,type:b,spatialReference:c}}}function k(a){return"point"===
a.type?null!=a.z:"extent"===a.type?null!=a.zmin:a.hasZ}function r(a){return"declaredClass"in a}function u(a){var b=a.spatialReference.toJSON();switch(a.type){case "point":return{x:a.x,y:a.y,z:a.z,m:a.m,spatialReference:b};case "polygon":var c=a.hasM;return{rings:a.rings,hasZ:a.hasZ,hasM:c,spatialReference:b};case "polyline":var d=a.paths,e=a.hasZ,c=a.hasM;return{paths:d,hasZ:e,hasM:c,spatialReference:b};case "extent":var d=a.xmin,e=a.xmax,f=a.ymin,g=a.ymax,k=a.zmin,h=a.zmax,l=a.mmin,m=a.mmax,q=a.hasZ,
c=a.hasM;return{xmin:d,xmax:e,ymin:f,ymax:g,zmin:k,zmax:h,mmin:l,mmax:m,hasZ:q,hasM:c,spatialReference:b};case "multipoint":return d=a.points,e=a.hasZ,c=a.hasM,{points:d,hasZ:e,hasM:c,spatialReference:b}}}function z(a,b){m.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[3]=a.x;b[1]=b[4]=a.y;k(a)&&(b[2]=b[5]=a.z);break;case "polyline":for(var c=0;c<a.paths.length;c++)m.expandWithNestedArray(b,a.paths[c],k(a));break;case "polygon":for(c=0;c<a.rings.length;c++)m.expandWithNestedArray(b,
a.rings[c],k(a));break;case "multipoint":m.expandWithNestedArray(b,a.points,k(a));break;case "extent":b[0]=a.xmin,b[1]=a.ymin,b[3]=a.xmax,b[4]=a.ymax,null!=a.zmin&&(b[2]=a.zmin),null!=a.zmax&&(b[5]=a.zmax)}}function v(a,b){h.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[2]=a.x;b[1]=b[3]=a.y;break;case "polyline":for(var c=0;c<a.paths.length;c++)h.expandWithNestedArray(b,a.paths[c]);break;case "polygon":for(c=0;c<a.rings.length;c++)h.expandWithNestedArray(b,a.rings[c]);
break;case "multipoint":h.expandWithNestedArray(b,a.points);break;case "extent":b[0]=a.xmin,b[1]=a.ymin,b[2]=a.xmax,b[3]=a.ymax}}Object.defineProperty(g,"__esModule",{value:!0});g.equals=c.equals;g.isPoint=function(a){return"point"===a.type};g.mapJSONGeometryType=q;g.fromFeatureSetJSON=function(a){var b=q(a.geometryType),c=l.fromJSON(a.spatialReference);return a.features.map(function(d){return e(d,b,c,a.objectIdFieldName)})};g.fromJSON=e;g.fromJSONGeometry=a;g.makeDehydratedPoint=function(a,b,c,e){return{x:a,
y:b,z:c,spatialReference:e,type:"point"}};g.hasZ=k;g.isHydratedGeometry=function(a){return"declaredClass"in a};g.isHydratedGraphic=r;g.hydrateGraphic=function(a,b){if(!a||r(a))return a;b=new p({layer:b,sourceLayer:b});b.visible=a.visible;b.symbol=f.clone(a.symbol);b.attributes=f.clone(a.attributes);a.geometry&&("mesh"===a.geometry.type?b.geometry=a.geometry:b.read({geometry:u(a.geometry)}));return b};g.computeAABB=z;g.expandAABB=function(a,b){z(a,w);m.expand(b,w)};g.computeAABR=v;g.expandAABR=function(a,
b){v(a,t);h.expand(b,t)};var w=m.create(),t=h.create()})},"esri/geometry/support/aaBoundingBox":function(){define(["require","exports","../Extent","./aaBoundingRect"],function(b,g,p,f){function l(a){void 0===a&&(a=g.ZERO);return[a[0],a[1],a[2],a[3],a[4],a[5]]}function m(a){return a[0]>=a[3]?0:a[3]-a[0]}function h(a){return a[1]>=a[4]?0:a[4]-a[1]}function c(a){return a[2]>=a[5]?0:a[5]-a[2]}function q(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a}function e(a){return 6===
a.length}Object.defineProperty(g,"__esModule",{value:!0});g.create=l;g.fromValues=function(a,b,c,e,f,g){return[a,b,c,e,f,g]};g.fromExtent=function(a,b){void 0===b&&(b=l());b[0]=a.xmin;b[1]=a.ymin;b[2]=a.zmin;b[3]=a.xmax;b[4]=a.ymax;b[5]=a.zmax;return b};g.toExtent=function(a,b){return isFinite(a[2])||isFinite(a[5])?new p({xmin:a[0],xmax:a[3],ymin:a[1],ymax:a[4],zmin:a[2],zmax:a[5],spatialReference:b}):new p({xmin:a[0],xmax:a[3],ymin:a[1],ymax:a[4],spatialReference:b})};g.fromMinMax=function(a,b,c){void 0===
c&&(c=l());c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=b[0];c[4]=b[1];c[5]=b[2];return c};g.expandPointInPlace=function(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[3]&&(a[3]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[4]&&(a[4]=b[1]);b[2]<a[2]&&(a[2]=b[2]);b[2]>a[5]&&(a[5]=b[2])};g.expand=function(a,b,c){void 0===c&&(c=a);e(b)?(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[2]=Math.min(a[2],b[2]),c[3]=Math.max(a[3],b[3]),c[4]=Math.max(a[4],b[4]),c[5]=Math.max(a[5],b[5])):f.is(b)?(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],
b[1]),c[3]=Math.max(a[3],b[2]),c[4]=Math.max(a[4],b[3])):2===b.length?(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[3]=Math.max(a[3],b[0]),c[4]=Math.max(a[4],b[1])):3===b.length&&(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[2]=Math.min(a[2],b[2]),c[3]=Math.max(a[3],b[0]),c[4]=Math.max(a[4],b[1]),c[5]=Math.max(a[5],b[2]));return c};g.expandWithBuffer=function(a,b,c,e,f){void 0===f&&(f=a);var g=a[0],k=a[1],h=a[2],d=a[3],l=a[4];a=a[5];for(var m=0;m<e;m++)g=Math.min(g,b[c+3*m]),k=Math.min(k,
b[c+3*m+1]),h=Math.min(h,b[c+3*m+2]),d=Math.max(d,b[c+3*m]),l=Math.max(l,b[c+3*m+1]),a=Math.max(a,b[c+3*m+2]);f[0]=g;f[1]=k;f[2]=h;f[3]=d;f[4]=l;f[5]=a;return f};g.expandWithNestedArray=function(a,b,c,e){void 0===e&&(e=a);var f=b.length,g=a[0],k=a[1],h=a[2],d=a[3],l=a[4];a=a[5];if(c)for(c=0;c<f;c++){var m=b[c],g=Math.min(g,m[0]),k=Math.min(k,m[1]),h=Math.min(h,m[2]),d=Math.max(d,m[0]),l=Math.max(l,m[1]);a=Math.max(a,m[2])}else for(c=0;c<f;c++)m=b[c],g=Math.min(g,m[0]),k=Math.min(k,m[1]),d=Math.max(d,
m[0]),l=Math.max(l,m[1]);e[0]=g;e[1]=k;e[2]=h;e[3]=d;e[4]=l;e[5]=a;return e};g.allFinite=function(a){for(var b=0;6>b;b++)if(!isFinite(a[b]))return!1;return!0};g.width=m;g.depth=h;g.height=c;g.diameter=function(a){var b=m(a),e=c(a);a=h(a);return Math.sqrt(b*b+e*e+a*a)};g.center=function(a,b){void 0===b&&(b=[0,0,0]);b[0]=a[0]+m(a)/2;b[1]=a[1]+h(a)/2;b[2]=a[2]+c(a)/2;return b};g.size=function(a,b){void 0===b&&(b=[0,0,0]);b[0]=m(a);b[1]=h(a);b[2]=c(a);return b};g.maximumDimension=function(a){return Math.max(m(a),
c(a),h(a))};g.containsPoint=function(a,b){return b[0]>=a[0]&&b[1]>=a[1]&&b[2]>=a[2]&&b[0]<=a[3]&&b[1]<=a[4]&&b[2]<=a[5]};g.containsPointWithMargin=function(a,b,c){return b[0]>=a[0]-c&&b[1]>=a[1]-c&&b[2]>=a[2]-c&&b[0]<=a[3]+c&&b[1]<=a[4]+c&&b[2]<=a[5]+c};g.contains=function(a,b){return b[0]>=a[0]&&b[1]>=a[1]&&b[2]>=a[2]&&b[3]<=a[3]&&b[4]<=a[4]&&b[5]<=a[5]};g.intersects=function(a,b){return Math.max(b[0],a[0])<=Math.min(b[3],a[3])&&Math.max(b[1],a[1])<=Math.min(b[4],a[4])&&Math.max(b[2],a[2])<=Math.min(b[5],
a[5])};g.offset=function(a,b,c,e,f){void 0===f&&(f=a);f[0]=a[0]+b;f[1]=a[1]+c;f[2]=a[2]+e;f[3]=a[3]+b;f[4]=a[4]+c;f[5]=a[5]+e;return f};g.setMin=function(a,b,c){void 0===c&&(c=a);c[0]=b[0];c[1]=b[1];c[2]=b[2];c!==a&&(c[3]=a[3],c[4]=a[4],c[5]=a[5]);return c};g.setMax=function(a,b,c){void 0===c&&(c=a);c[3]=b[0];c[4]=b[1];c[5]=b[2];c!==a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);return a};g.set=q;g.empty=function(a){return a?q(a,g.NEGATIVE_INFINITY):l(g.NEGATIVE_INFINITY)};g.toRect=function(a,b){b||(b=f.create());
b[0]=a[0];b[1]=a[1];b[2]=a[3];b[3]=a[4];return b};g.fromRect=function(a,b){a[0]=b[0];a[1]=b[1];a[3]=b[2];a[4]=b[3];return a};g.is=e;g.isPoint=function(a){return 0===m(a)&&0===h(a)&&0===c(a)};g.equals=function(a,b,c){if(null==a||null==b)return a===b;if(!e(a)||!e(b))return!1;if(c)for(var f=0;f<a.length;f++){if(!c(a[f],b[f]))return!1}else for(f=0;f<a.length;f++)if(a[f]!==b[f])return!1;return!0};g.POSITIVE_INFINITY=[-Infinity,-Infinity,-Infinity,Infinity,Infinity,Infinity];g.NEGATIVE_INFINITY=[Infinity,
Infinity,Infinity,-Infinity,-Infinity,-Infinity];g.ZERO=[0,0,0,0,0,0]})},"esri/layers/graphics/dehydratedFeatureComparison":function(){define(["require","exports"],function(b,g){function p(b,f){if(b===f)return!0;if(null==b||null==f||b.length!==f.length)return!1;for(var c=0;c<b.length;c++){var a=b[c],g=f[c];if(a.length!==g.length)return!1;for(var h=0;h<a.length;h++)if(a[h]!==g[h])return!1}return!0}function f(b,f){if(b===f)return!0;if(null==b||null==f||b.length!==f.length)return!1;for(var c=0;c<b.length;c++)if(!p(b[c],
f[c]))return!1;return!0}function l(b,f){return b===f||b&&f&&b.equals(f)}function m(b,g){if(b===g)return!0;if(!b||!g||b.type!==g.type)return!1;switch(b.type){case "point":return l(b.spatialReference,g.spatialReference)?b.x===g.x&&b.y===g.y&&b.z===g.z&&b.m===g.m:!1;case "extent":return b.hasZ===g.hasZ&&b.hasM===g.hasM&&l(b.spatialReference,g.spatialReference)?b.xmin===g.xmin&&b.ymin===g.ymin&&b.zmin===g.zmin&&b.xmax===g.xmax&&b.ymax===g.ymax&&b.zmax===g.zmax:!1;case "polyline":return b.hasZ===g.hasZ&&
b.hasM===g.hasM&&l(b.spatialReference,g.spatialReference)?f(b.paths,g.paths):!1;case "polygon":return b.hasZ===g.hasZ&&b.hasM===g.hasM&&l(b.spatialReference,g.spatialReference)?f(b.rings,g.rings):!1;case "multipoint":return b.hasZ===g.hasZ&&b.hasM===g.hasM&&l(b.spatialReference,g.spatialReference)?p(b.points,g.points):!1;case "mesh":return!1}}function h(b,f){if(b===f)return!0;if(!b||!f)return!1;for(var c in b)if(!(c in f)||b[c]!==f[c])return!1;for(c in f)if(!(c in b))return!1;return!0}Object.defineProperty(g,
"__esModule",{value:!0});g.equals=function(b,f){return b===f?!0:null!=b&&null!=f&&b.objectId===f.objectId&&m(b.geometry,f.geometry)&&h(b.attributes,f.attributes)?!0:!1}})},"esri/layers/graphics/sources/FeatureLayerSource":function(){define("dojo/io-query ../../support/layerSourceUtils ../../../core/Accessor ../../../core/Promise ../../../core/lang ../../../core/urlUtils ../../../core/Error ../../../request ../../../tasks/QueryTask".split(" "),function(b,g,p,f,l,m,h,c,q){return p.createSubclass([f],
{getDefaults:function(b){var a=this.inherited(arguments),c=b.layer;c&&(a=l.mixin(a,{url:c.url,layerId:c.layerId,gdbVersion:c.gdbVersion,dynamicDataSource:c.dynamicDataSource}));return a},initialize:function(){this.addResolvingPromise(this._fetchService())},properties:{dynamicDataSource:{},layer:{},layerId:{},gdbVersion:{dependsOn:["layer.gdbVersion"],get:function(){return this.layer.gdbVersion}},parsedUrl:{dependsOn:["url","layerId"],get:function(){var b=this.url?m.urlToObject(this.url):null;if(null!=
b)if(null!=this.layerId)b.path=m.join(b.path,this.layerId.toString());else if(null!=this.dynamicDataSource){var a={source:g.sourceToJSON(this.dynamicDataSource)};b.query={layer:JSON.stringify(a)}}return b}},queryTask:{dependsOn:["parsedUrl","gdbVersion"],get:function(){var c=this.parsedUrl.path+"?"+b.objectToQuery(this.parsedUrl.query);return new q({url:null!=this.dynamicDataSource?c:this.parsedUrl.path,gdbVersion:this.gdbVersion})}},url:{}},applyEdits:function(b){var a=b.addFeatures.map(this._serializeFeature.bind(this)),
e=b.updateFeatures.map(this._serializeFeature.bind(this));b=this._getFeatureIds(b.deleteFeatures);a={f:"json",adds:a.length?JSON.stringify(a):null,updates:e.length?JSON.stringify(e):null,deletes:b.length?b.join(","):null};return c(this.parsedUrl.path+"/applyEdits",{query:a,method:"post",responseType:"json",callbackParamName:"callback"}).then(this._createEditsResult.bind(this))},queryFeatures:function(b,a){return this.queryTask.execute(b,a)},queryFeaturesJSON:function(b,a){return this.queryTask.executeJSON(b,
a)},queryObjectIds:function(b,a){return this.queryTask.executeForIds(b,a)},queryFeatureCount:function(b,a){return this.queryTask.executeForCount(b,a)},queryExtent:function(b,a){return this.queryTask.executeForExtent(b,a)},_updateUrl:function(b){b&&(this.url=this.url.replace(/^http:/i,"https:"))},_fetchService:function(){return null==this.layerId&&null==this.dynamicDataSource?c(this.url,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(b){this._updateUrl(b.ssl);(b=
b.data)&&b.layers&&b.layers[0]&&(this.layerId=b.layers[0].id);return this._fetchServiceLayer()}.bind(this)):this._fetchServiceLayer()},_fetchServiceLayer:function(){return c(this.parsedUrl.path,{query:l.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"}).then(function(b){this._updateUrl(b.ssl);this.layerDefinition=b.data}.bind(this))},_serializeFeature:function(b){var a=b.geometry;b=b.attributes;return{geometry:a&&a.toJSON(),attributes:b}},_getFeatureIds:function(b){var a=
this.layer.objectIdField,c=b[0],e=!(!c||null==c.objectId),f=!(!c||!c.attributes);return b.map(function(b){var c=null;e?c=b.objectId:f&&(c=b.attributes&&b.attributes[a]);return c},this)},_createEditsResult:function(b){var a={};b=b.data;a.addFeatureResults=b.addResults?b.addResults.map(this._createFeatureEditResult.bind(this)):[];a.updateFeatureResults=b.updateResults?b.updateResults.map(this._createFeatureEditResult.bind(this)):[];a.deleteFeatureResults=b.deleteResults?b.deleteResults.map(this._createFeatureEditResult.bind(this)):
[];return a},_createFeatureEditResult:function(b){var a=b.success?null:b.error||{};return{objectId:b.objectId,globalId:b.globalId,error:a?new h("feature-layer-source:edit-failure",a.description,{code:a.code}):null}}})})},"esri/layers/support/layerSourceUtils":function(){define(["require","exports","../../core/kebabDictionary","../../core/lang"],function(b,g,p,f){function l(a){return null!=a&&a.hasOwnProperty("mapLayerId")}function m(a){return null!=a&&a.hasOwnProperty("dataSource")}function h(a){if(!a)return a;
l(a)&&(a.type=g.MAPLAYER);if(m(a)&&(a.type=g.DATALAYER,!a.dataSource.type)){var b=a.dataSource;b.workspaceId?b.type=b.gdbVersion?"table":b.query||b.oidFields?"query-table":"raster":b.leftTableKey&&b.rightTableKey&&b.leftTableSource&&b.rightTableSource&&(b.type="join-table",b.leftTableSource=h(b.leftTableSource),b.rightTableSource=h(b.rightTableSource))}return a}function c(b){var h={};if(b.type===g.MAPLAYER)h.mapLayerId=b.mapLayerId,b.gdbVersion&&(h.gdbVersion=b.gdbVersion);else if(b.type===g.DATALAYER){b.fields&&
(h.fields=b.fields);var l;l=b.dataSource;var m;switch(l.type){case "table":m={dataSourceName:l.dataSourceName,workspaceId:l.workspaceId,gdbVersion:l.gdbVersion};break;case "query-table":m={geometryType:e.toJSON(l.geometryType),workspaceId:l.workspaceId,query:l.query,oidFields:l.oidFields,spatialReference:l.spatialReference};break;case "join-table":m={leftTableSource:c(l.leftTableSource),rightTableSource:c(l.rightTableSource),leftTableKey:l.leftTableKey,rightTableKey:l.rightTableKey,joinType:r.toJSON(l.joinType)};
break;case "raster":m={workspaceId:l.workspaceId,dataSourceName:l.dataSourceName}}m.type=k.toJSON(l.type);l=f.fixJson(m);h.dataSource=l}h.type=a.toJSON(b.type);return f.fixJson(h)}function q(b){var c={};if(a.fromJSON(b.type)===g.MAPLAYER)c.mapLayerId=b.mapLayerId,b.gdbVersion&&(c.gdbVersion=b.gdbVersion);else if(a.fromJSON(b.type)===g.DATALAYER){b.fields&&(c.fields=b.fields);var h;h=b.dataSource;var l;switch(h.type){case "table":l={dataSourceName:h.dataSourceName,workspaceId:h.workspaceId,gdbVersion:h.gdbVersion};
break;case "queryTable":l={geometryType:e.fromJSON(h.geometryType),workspaceId:h.workspaceId,query:h.query,oidFields:h.oidFields,spatialReference:h.spatialReference};break;case "joinTable":l={leftTableSource:q(h.leftTableSource),rightTableSource:q(h.rightTableSource),leftTableKey:h.leftTableKey,rightTableKey:h.rightTableKey,joinType:r.fromJSON(h.joinType)};break;case "raster":l={workspaceId:h.workspaceId,dataSourceName:h.dataSourceName}}l.type=k.fromJSON(h.type);h=f.fixJson(l);c.dataSource=h}c.type=
a.fromJSON(b.type);return f.fixJson(c)}Object.defineProperty(g,"__esModule",{value:!0});g.MAPLAYER="map-layer";g.DATALAYER="data-layer";var e=p({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),a=p({mapLayer:g.MAPLAYER,dataLayer:g.DATALAYER}),k=p({joinTable:"join-table",queryTable:"query-table"}),r=p({esriLeftOuterJoin:"left-outer-join",esriLeftInnerJoin:"left-inner-join"});g.isMapLayerSource=
l;g.isDataLayerSource=m;g.castSource=h;g.sourceToJSON=c;g.sourceFromJSON=q})},"esri/layers/graphics/sources/MemorySource":function(){define("../../../core/Collection ../../../core/Promise ../../../core/promiseUtils ../../../core/Error ../../../tasks/support/FeatureSet ../../../Graphic ../QueryEngine".split(" "),function(b,g,p,f,l,m,h){return b.ofType(m).createSubclass([g],{declaredClass:"esri.layers.graphics.sources.MemorySource",properties:{layer:{value:null},_queryEngine:{value:null,dependsOn:["layer.loaded"],
get:function(){return this.get("layer.loaded")?new h({features:this,spatialReference:this.layer.spatialReference,objectIdField:this.layer.objectIdField}):null}}},queryFeatures:function(b){return this._queryEngine?this._queryEngine.queryFeatures(b).then(function(b){var c=new l;c.features=b;return c}):this._rejectQuery("Not ready to execute query")},queryObjectIds:function(b){return this._queryEngine?this._queryEngine.queryObjectIds(b):this._rejectQuery("Not ready to execute query")},queryFeatureCount:function(b){return this._queryEngine?
this._queryEngine.queryFeatureCount(b):this._rejectQuery("Not ready to execute query")},queryExtent:function(b){return this._queryEngine?this._queryEngine.queryExtent(b):this._rejectQuery("Not ready to execute query")},_rejectQuery:function(b){return p.reject(new f("MemorySource",b))}})})},"esri/layers/graphics/QueryEngine":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/Accessor ../../core/Error ../../core/promiseUtils ../../core/accessorSupport/decorators ../../geometry/support/aaBoundingRect ./dehydratedFeatures ../../tasks/support/FeatureSet".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k){b=function(b){function g(a){a=b.call(this)||this;a.features=null;a.layer=null;a.objectIdField=null;a.dataSpatialReference=null;return a}p(g,b);g.prototype.queryFeatures=function(b){var c=this;return this._queryFeatures(b).then(function(b){b=b.map(function(b){return a.hydrateGraphic(b,c.layer)});return new k({features:b,fields:c.layer?c.layer.fields.slice():null,geometryType:c.layer?c.layer.geometryType:null,spatialReference:c.dataSpatialReference?c.dataSpatialReference.clone():
null})})};g.prototype.queryObjectIds=function(a){var b=this;return this.objectIdField?this.queryFeatures(a).then(function(a){return b._getObjectIds(a.features)}):this._rejectQuery("Unsupported query")};g.prototype.queryFeatureCount=function(a){return this.features&&!a?c.resolve(this.features.length):this._queryFeatures(a).then(function(a){return a.length})};g.prototype.queryExtent=function(a){var b=this;return this.queryFeatures(a).then(function(a){return{count:a.features.length,extent:b._getExtent(a.features)}})};
g.prototype._queryFeatures=function(a){if(this.features){if(a){if(this._isSupportedQuery(a)){var b=this._createFilters(a);return b.length?this._executeQuery(a,b):this._rejectQuery("Invalid query")}return this._rejectQuery("Unsupported query")}return this._returnAllFeatures()}return this._rejectQuery("Engine not initialized")};g.prototype._returnAllFeatures=function(){return c.resolve(this.features.toArray())};g.prototype._executeQuery=function(a,b){var d=this,e=[];this.features.forEach(function(c){b.every(function(b){return b.call(d,
c,a)})&&e.push(c)});return c.resolve(e)};g.prototype._isSupportedQuery=function(a){var b=!0;if(null!=a.distance||null!=a.geometryPrecision||a.groupByFieldsForStatistics&&a.groupByFieldsForStatistics.length||null!=a.maxAllowableOffset||a.multipatchOption||null!=a.num||a.orderByFields&&a.orderByFields.length||a.outFields&&a.outFields.length||a.outSpatialReference||a.outStatistics&&a.outStatistics.length||a.pixelSize||a.quantizationParameters||a.relationParameter||a.returnDistinctValues||null!=a.start||
a.text||a.timeExtent||a.where||a.objectIds&&a.objectIds.length&&!this.objectIdField)b=!1;return b};g.prototype._createFilters=function(a){var b=[];a.objectIds&&a.objectIds.length&&b.push(this._createObjectIdFilter());a.geometry&&"extent"===a.geometry.type&&"intersects"===a.spatialRelationship&&b.push(this._createExtentFilter());return b};g.prototype._createExtentFilter=function(){return function(b,c){b=b.geometry;if(!b)return!1;e.fromExtent(c.geometry,r);a.computeAABR(b,u);return e.intersects(r,u)}};
g.prototype._createObjectIdFilter=function(){var a=this;return function(b,c){b=b.attributes;return-1<c.objectIds.indexOf(b&&b[a.objectIdField])}};g.prototype._rejectQuery=function(a){return c.reject(new h(this.declaredClass,a))};g.prototype._getObjectIds=function(a){var b=this.objectIdField,c=[];a.forEach(function(a){a=(a=a.attributes)&&a[b];null!=a&&c.push(a)});return c};g.prototype._getExtent=function(b){if(0===b.length)return null;e.empty(r);for(var c=0;c<b.length;c++)a.computeAABR(b[c].geometry,
u),e.expand(r,u,r);return new l.Extent({xmin:r[0],ymin:r[1],xmax:r[2],ymax:r[3],spatialReference:b[0].geometry.spatialReference})};f([q.property()],g.prototype,"features",void 0);f([q.property({constructOnly:!0})],g.prototype,"layer",void 0);f([q.property()],g.prototype,"objectIdField",void 0);f([q.property()],g.prototype,"dataSpatialReference",void 0);return g=f([q.subclass("esri.layers.graphics.QueryEngine")],g)}(q.declared(m));var r=e.create(),u=e.create();return b})},"esri/layers/TileLayer":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/io-query ../geometry ../request ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ./Layer ./mixins/ArcGISCachedService ./mixins/ArcGISMapService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./support/arcgisLayers ./support/arcgisLayerUrl".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n){var x="Canvas/World_Dark_Gray_Base Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Base Canvas/World_Light_Gray_Reference Elevation/World_Hillshade Ocean/World_Ocean_Base Ocean/World_Ocean_Reference Ocean_Basemap Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Transportation World_Imagery World_Street_Map World_Topo_Map".split(" ");return function(g){function k(a,b){a=g.call(this)||this;
a.url=null;a.type="tile";a.spatialReference=null;return a}f(k,g);k.prototype.normalizeCtorArgs=function(a,b){return"string"===typeof a?p({url:a},b):a};k.prototype.load=function(){var a=this;this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service","Map Service"]}).always(function(){return a._fetchService()}));return this.when()};Object.defineProperty(k.prototype,"operationalLayerType",{get:function(){if(this.capabilities)return this.capabilities.operations.supportsExportMap?"ArcGISTiledMapServiceLayer":
"ArcGISTiledImageServiceLayer";var a=this.url||this.portalItem&&this.portalItem.url;return a&&/\/ImageServer(\/|\/?$)/i.test(a)?"ArcGISTiledImageServiceLayer":"ArcGISTiledMapServiceLayer"},enumerable:!0,configurable:!0});Object.defineProperty(k.prototype,"attributionDataUrl",{get:function(){return this._getDefaultAttribution(this._getMapName(this.parsedUrl.path.toLowerCase()))},enumerable:!0,configurable:!0});Object.defineProperty(k.prototype,"tileServers",{get:function(){return this._getDefaultTileServers(this.parsedUrl.path)},
enumerable:!0,configurable:!0});k.prototype.castTileServers=function(a){return Array.isArray(a)?a.map(function(a){return e.urlToObject(a).path}):null};k.prototype.readSpatialReference=function(a,b){return(a=a||b.tileInfo&&b.tileInfo.spatialReference)&&h.SpatialReference.fromJSON(a)};k.prototype.fetchTile=function(a,b,d,e){a=this.getTileUrl(a,b,d);b={responseType:"image",allowImageDataAccess:e&&e.allowImageDataAccess||!1};e&&e.timestamp&&(b.query={_ts:e.timestamp});return c(a,b).then(function(a){return a.data})};
k.prototype.getTileUrl=function(a,b,c){var d=m.objectToQuery(p({},this.parsedUrl.query,{blankTile:!this.tilemapCache&&this.supportsBlankTile?!1:null,token:this.token?encodeURIComponent(this.token):null})),e=this.tileServers;return(e&&e.length?e[b%e.length]:this.parsedUrl.path)+"/tile/"+a+"/"+b+"/"+c+(d?"?"+d:"")};k.prototype.importLayerViewModule=function(a){switch(a.type){case "2d":return q.create(function(a){return b(["../views/2d/layers/TiledLayerView2D"],a)});case "3d":return q.create(function(a){return b(["../views/3d/layers/TileLayerView3D"],
a)})}};k.prototype._fetchService=function(){var a=this;return q.create(function(b,d){a.resourceInfo?b({data:a.resourceInfo}):c(a.parsedUrl.path,{query:p({f:"json"},a.parsedUrl.query),responseType:"json",callbackParamName:"callback"}).then(b,d)}).then(function(b){b.ssl&&(a.url=a.url.replace(/^http:/i,"https:"));a.read(b.data,{origin:"service",url:a.parsedUrl});if(10.1===a.version&&!n.isHostedAgolService(a.url))return d.fetchServerVersion(a.url).then(function(b){a.read({currentVersion:b})}).catch(function(){})})};
k.prototype._getMapName=function(a){return(a=a.match(/^(?:https?:)?\/\/(server|services)\.arcgisonline\.com\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i))&&a[2]};k.prototype._getDefaultAttribution=function(a){if(a){var b;a=a.toLowerCase();for(var c=0,d=x.length;c<d;c++)if(b=x[c],-1<b.toLowerCase().indexOf(a))return e.makeAbsolute("//static.arcgis.com/attribution/"+b)}};k.prototype._getDefaultTileServers=function(a){var b=-1!==a.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),c=
-1!==a.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return b||c?[a,a.replace(b?/server\.arcgisonline/i:/services\.arcgisonline/i,b?"services.arcgisonline":"server.arcgisonline")]:[]};l([a.property({readOnly:!0})],k.prototype,"operationalLayerType",null);l([a.property({readOnly:!0,dependsOn:["parsedUrl"]})],k.prototype,"attributionDataUrl",null);l([a.property()],k.prototype,"popupTemplates",void 0);l([a.property()],k.prototype,"resourceInfo",void 0);l([a.property({dependsOn:["parsedUrl"]})],
k.prototype,"tileServers",null);l([a.cast("tileServers")],k.prototype,"castTileServers",null);l([a.property({json:{origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writer:e.writeOperationalLayerUrl}}}}})],k.prototype,"url",void 0);l([a.property({readOnly:!0,json:{read:!1}})],k.prototype,"type",void 0);l([a.property({type:h.SpatialReference})],k.prototype,"spatialReference",void 0);l([a.reader("spatialReference",["spatialReference","tileInfo"])],k.prototype,"readSpatialReference",null);return k=
l([a.subclass("esri.layers.TileLayer")],k)}(a.declared(k,u,r,t,z,v,w))})},"esri/layers/mixins/ArcGISMapService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../geometry/Extent ../../geometry/SpatialReference ./ArcGISService ../support/commonProperties".split(" "),function(b,g,p,f,l,m,h,c,q){return function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.capabilities=void 0;
a.copyright=null;a.fullExtent=null;a.legendEnabled=!0;a.spatialReference=null;a.version=null;return a}p(a,b);a.prototype.readCapabilities=function(a,b){var c=b.capabilities&&b.capabilities.split(",").map(function(a){return a.toLowerCase().trim()});if(!c)return{operations:{supportsQuery:!1,supportsExportMap:!1,supportsExportTiles:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};a=-1!==c.indexOf("query");var e=-1!==c.indexOf("map"),f=!!b.exportTilesAllowed,c=-1!==c.indexOf("tilemap"),g=!!b.supportsDynamicLayers,
h=!b.tileInfo||g,d=!b.tileInfo||g;return{operations:{supportsQuery:a,supportsExportMap:e,supportsExportTiles:f,supportsTileMap:c},exportMap:e?{supportsDynamicLayers:g,supportsSublayerVisibility:h,supportsSublayerDefinitionExpression:d}:null,exportTiles:f?{maxExportTilesCount:+b.maxExportTilesCount}:null}};a.prototype.readVersion=function(a,b){(a=b.currentVersion)||(a=b.hasOwnProperty("capabilities")||b.hasOwnProperty("tables")?10:b.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3);return a};f([l.property({readOnly:!0})],
a.prototype,"capabilities",void 0);f([l.reader("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],a.prototype,"readCapabilities",null);f([l.property({json:{read:{source:"copyrightText"}}})],a.prototype,"copyright",void 0);f([l.property({type:m})],a.prototype,"fullExtent",void 0);f([l.property({json:{origins:{service:{read:!1},"portal-item":{read:!1}}}})],a.prototype,"id",void 0);f([l.property({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},
read:{source:"showLegend"},write:{target:"showLegend"}}})],a.prototype,"legendEnabled",void 0);f([l.property(q.popupEnabled)],a.prototype,"popupEnabled",void 0);f([l.property({type:h})],a.prototype,"spatialReference",void 0);f([l.property()],a.prototype,"version",void 0);f([l.reader("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],a.prototype,"readVersion",null);return a=f([l.subclass("esri.layers.mixins.ArcGISMapService")],a)}(l.declared(c))})},"esri/layers/support/commonProperties":function(){define(["require",
"exports","../../core/accessorSupport/PropertyOrigin","../../core/accessorSupport/utils","../../core/accessorSupport/write"],function(b,g,p,f,l){Object.defineProperty(g,"__esModule",{value:!0});g.screenSizePerspectiveEnabled={type:Boolean,value:!0,json:{origins:{"web-scene":{read:{source:["id","url","layerType"],reader:function(b,g){if(null==g.screenSizePerspective&&"defaults"===this.originOf("screenSizePerspectiveEnabled"))f.getProperties(this).store.set("screenSizePerspectiveEnabled",!1,p.OriginId.DEFAULTS);
else return g.screenSizePerspective}},write:{ignoreOrigin:!0,target:"screenSizePerspective",writer:function(b,f,c,g){"defaults"===this.originOf("screenSizePerspectiveEnabled")&&b?f[c]=b:l.willPropertyWrite(this,"screenSizePerspectiveEnabled",{},g)&&(f[c]=b)}}}}}};g.popupEnabled={type:Boolean,json:{read:{source:"disablePopup",reader:function(b,f){return!f.disablePopup}},write:{target:"disablePopup",writer:function(b,f,c){f[c]=!b}}}};g.labelsVisible={type:Boolean,json:{read:{source:"showLabels"},write:{target:"showLabels"}}}})},
"esri/layers/mixins/RefreshableLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){return function(b){function c(){var c=null!==b&&b.apply(this,arguments)||this;c.refreshInterval=0;return c}p(c,b);c.prototype.refresh=function(){this.emit("refresh")};f([m.property({type:Number,cast:function(b){return.1<=b?b:0>=b?0:.1},json:{write:!0}})],c.prototype,
"refreshInterval",void 0);return c=f([m.subclass("esri.layers.mixins.RefreshableLayer")],c)}(m.declared(l))})},"esri/layers/mixins/ScaleRangeLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ../../core/accessorSupport/write".split(" "),function(b,g,p,f,l,m,h){return function(b){function c(){var c=null!==b&&b.apply(this,arguments)||this;c.minScale=0;c.maxScale=0;return c}
p(c,b);f([m.property({type:Number,json:{write:{overridePolicy:function(b,a,c){if(h.willPropertyWrite(this,"maxScale",{},c))return{ignoreOrigin:!0}}}}})],c.prototype,"minScale",void 0);f([m.property({type:Number,json:{write:{overridePolicy:function(b,a,c){if(h.willPropertyWrite(this,"minScale",{},c))return{ignoreOrigin:!0}}}}})],c.prototype,"maxScale",void 0);return c=f([m.subclass("esri.layers.mixins.ScaleRangeLayer")],c)}(m.declared(l))})},"esri/layers/support/arcgisLayers":function(){define("require exports ../../core/tsSupport/assignHelper dojo/when ../../request ../../core/Error ../../core/promiseUtils ./arcgisLayerUrl ./arcgisLayerUrl ./lazyLayerLoader".split(" "),
function(b,g,p,f,l,m,h,c,q,e){function a(a,b){return a.sublayerIds.map(function(c){return new a.Constructor(p({},b,{layerId:c,sublayerTitleMode:"service-name"}))})}function k(a){var b=q.parse(a);if(!b)return h.reject(new m("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:a}));var c=b.serverType,g=b.sublayer,k={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(c){case "MapServer":c=null!=g?"FeatureLayer":u(a).then(function(a){return a?
"TileLayer":"MapImageLayer"});break;case "ImageServer":c=v(a).then(function(a){var b=a.tileInfo&&a.tileInfo.format;return a.tileInfo?b&&"LERC"===b.toUpperCase()&&a.cacheType&&"elevation"===a.cacheType.toLowerCase()?"ElevationLayer":"TileLayer":"ImageryLayer"});break;case "SceneServer":c=v(b.url.path).then(function(a){var b={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer"};return a&&Array.isArray(a.layers)&&0<a.layers.length&&(a=a.layers[0].layerType,
null!=b[a])?b[a]:"SceneLayer"});break;default:c=k[c]}var l={FeatureLayer:!0,SceneLayer:!0},p={parsedUrl:b,Constructor:null,sublayerIds:null},z;return f(c).then(function(b){z=b;if(l[b]&&null==g)return r(a).then(function(a){1!==a.length&&(p.sublayerIds=a)})}).then(function(){return(0,e.layerLookupMap[z])()}).then(function(a){p.Constructor=a;return p})}function r(a){return v(a).then(function(a){return a&&Array.isArray(a.layers)?a.layers.map(function(a){return a.id}).reverse():[]})}function u(a){return v(a).then(function(a){return a.tileInfo})}
function z(a,b){a=a.Constructor.prototype.declaredClass;return"esri.layers.FeatureLayer"===a||"esri.layers.StreamLayer"===a?p({outFields:["*"]},b):b}function v(a){return l(a,{responseType:"json",callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(g,"__esModule",{value:!0});g.fromUrl=function(c){return k(c.url).then(function(e){var d=z(e,p({},c.properties,{url:c.url}));return e.sublayerIds?h.create(function(a){return b(["../GroupLayer"],a)}).then(function(b){var c=
new b({title:e.parsedUrl.title});a(e,d).forEach(function(a){return c.add(a)});return h.resolve(c)}):h.resolve(new e.Constructor(d))})};g.fetchServerVersion=function(a){if(!c.test(a))return h.reject();a=a.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return l(a,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){return a.data&&a.data.currentVersion?a.data.currentVersion:h.reject()})}})},"esri/layers/support/lazyLayerLoader":function(){define(["require","exports","../../core/promiseUtils"],
function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.layerLookupMap={CSVLayer:function(){return p.create(function(f){return b(["../CSVLayer"],f)})},ElevationLayer:function(){return p.create(function(f){return b(["../ElevationLayer"],f)})},FeatureLayer:function(){return p.create(function(f){return b(["../FeatureLayer"],f)})},GroupLayer:function(){return p.create(function(f){return b(["../GroupLayer"],f)})},GeoRSSLayer:function(){return p.create(function(f){return b(["../GeoRSSLayer"],
f)})},ImageryLayer:function(){return p.create(function(f){return b(["../ImageryLayer"],f)})},KMLLayer:function(){return p.create(function(f){return b(["../KMLLayer"],f)})},MapImageLayer:function(){return p.create(function(f){return b(["../MapImageLayer"],f)})},MapNotesLayer:function(){return p.create(function(f){return b(["../MapNotesLayer"],f)})},OpenStreetMapLayer:function(){return p.create(function(f){return b(["../OpenStreetMapLayer"],f)})},PointCloudLayer:function(){return p.create(function(f){return b(["../PointCloudLayer"],
f)})},SceneLayer:function(){return p.create(function(f){return b(["../SceneLayer"],f)})},IntegratedMeshLayer:function(){return p.create(function(f){return b(["../IntegratedMeshLayer"],f)})},StreamLayer:function(){return p.create(function(f){return b(["../StreamLayer"],f)})},TileLayer:function(){return p.create(function(f){return b(["../TileLayer"],f)})},UnknownLayer:function(){return p.create(function(f){return b(["../UnknownLayer"],f)})},UnsupportedLayer:function(){return p.create(function(f){return b(["../UnsupportedLayer"],
f)})},VectorTileLayer:function(){return p.create(function(f){return b(["../VectorTileLayer"],f)})},WebTileLayer:function(){return p.create(function(f){return b(["../WebTileLayer"],f)})},WMSLayer:function(){return p.create(function(f){return b(["../WMSLayer"],f)})},WMTSLayer:function(){return p.create(function(f){return b(["../WMTSLayer"],f)})},BingMapsLayer:function(){return p.create(function(f){return b(["../BingMapsLayer"],f)})}}})},"esri/layers/FeatureLayer":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../Graphic ../PopupTemplate ../renderers ../request ../symbols ../core/Collection ../core/Error ../core/Handles ../core/kebabDictionary ../core/lang ../core/Logger ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ../geometry/support/normalizeUtils ./Layer ./graphics/sources/MemorySource ./mixins/ArcGISService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./support/arcgisLayerUrl ./support/commonProperties ./support/FeatureIndex ./support/FeatureProcessing ./support/FeatureReduction ./support/FeatureReductionSelection ./support/FeatureTemplate ./support/FeatureType ./support/Field ./support/fieldUtils ./support/LabelClass ./support/labelingInfo ./support/Relationship ../renderers/support/jsonUtils ../renderers/support/styleUtils ../renderers/support/typeUtils ../symbols/support/ElevationInfo ../symbols/support/jsonUtils ../tasks/support/FeatureSet ../tasks/support/Query".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x,y,A,D,B,F,C,G,ba,Z,V,I,fa,M,W,N,H,O,J,P,S,ca,Q,U,Y,ga,ka,ha,qa,na,wa,ra){function za(a){return a&&null!=a.applyEdits}function sa(a){return a&&a.isInstanceOf&&a.isInstanceOf(C)}function ja(a,b,c){return!(a&&a.hasOwnProperty(b)?!a[b]:!c)}var Da=z({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),Ma=w.getLogger("esri.layers.FeatureLayer");
return function(g){function t(a){a=g.call(this)||this;a._handles=new u;a.featureReduction=null;a.copyright=null;a.displayField=null;a.definitionExpression=null;a.dynamicDataSource=null;a.editFieldsInfo=null;a.elevationInfo=null;a.fields=null;a.fullExtent=null;a.gdbVersion=null;a.geometryType=null;a.hasM=!1;a.hasZ=!1;a.heightModelInfo=null;a.historicMoment=null;a.isTable=!1;a.labelsVisible=!0;a.labelingInfo=null;a.layerId=void 0;a.legendEnabled=!0;a.maxRecordCount=void 0;a.tileMaxRecordCount=void 0;
a.minScale=0;a.maxScale=0;a.objectIdField=null;a.operationalLayerType="ArcGISFeatureLayer";a.popupEnabled=!0;a.popupTemplate=null;a.relationships=null;a.returnM=void 0;a.returnZ=void 0;a.screenSizePerspectiveEnabled=!0;a.serviceDefinitionExpression=null;a.spatialReference=D.WGS84;a.templates=null;a.timeInfo=null;a.title=null;a.sublayerTitleMode="item-title";a.trackIdField=null;a.type="feature";a.typeIdField=null;a.types=null;a.indexes=new (k.ofType(W.FeatureIndex));a.userIsAdmin=!1;a.version=void 0;
a.visible=!0;return a}f(t,g);t.prototype.normalizeCtorArgs=function(a,b){return"string"===typeof a?p({url:a},b):a};t.prototype.load=function(){var a=this,b=this.source&&(Array.isArray(this.source)||sa(this.source));if(this.portalItem&&b)this.addResolvingPromise(d.resolve());else return b=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]}).always(function(){if(a.url&&null==a.layerId&&/FeatureServer\/*$/i.test(a.url))return a._fetchFirstLayerId().then(function(b){null!=b&&
(a.layerId=b)})}).then(function(){if(!a.url&&!a._hasMemorySource())throw new r("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return a.createGraphicsSource().then(a._initLayerProperties.bind(a))}),this.addResolvingPromise(b),this.when()};Object.defineProperty(t.prototype,"allRenderers",{get:function(){return this._getAllRenderers(this.renderer)},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"capabilities",{get:function(){var a=
this._get("capabilities");return a||!this.loaded||this.hasService?a:{data:{supportsAttachment:!1,supportsM:!1,supportsZ:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!0,supportsDelete:!0,supportsEditing:!0,supportsQuery:!0,supportsResizeAttachments:!1,supportsUpdate:!0},query:{supportsStatistics:!1,supportsCentroid:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!0,supportsGeometryProperties:!1,supportsOrderBy:!1,supportsPagination:!1,supportsQuantization:!1,
supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1},queryRelated:{supportsPagination:!1,supportsCount:!1,supportsOrderBy:!1},editing:{supportsGeometryUpdate:!0,supportsGlobalId:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}},enumerable:!0,configurable:!0});
t.prototype.readCapabilities=function(a,b){b=b.layerDefinition||b;return{data:this._readDataCapabilities(b),operations:this._readOperationsCapabilities(b.capabilities||a,b),query:this._readQueryCapabilities(b),queryRelated:this._readQueryRelatedCapabilities(b),editing:this._readEditingCapabilities(b)}};Object.defineProperty(t.prototype,"hasAttachments",{get:function(){return this.hasService&&this._get("hasAttachments")||!1},enumerable:!0,configurable:!0});t.prototype.readIsTable=function(a,b){b=b&&
b.layerDefinition||b;return"Table"===b.type};Object.defineProperty(t.prototype,"hasService",{get:function(){return!this._hasMemorySource()},enumerable:!0,configurable:!0});t.prototype.readMinScale=function(a,b){return b.effectiveMinScale||a||0};t.prototype.readMaxScale=function(a,b){return b.effectiveMaxScale||a||0};t.prototype.readObjectIdFieldFromService=function(a,b){b=b.layerDefinition||b;if(b.objectIdField)return b.objectIdField;if(b.fields)for(a=0,b=b.fields;a<b.length;a++){var c=b[a];if("esriFieldTypeOID"===
c.type)return c.name}};Object.defineProperty(t.prototype,"outFields",{get:function(){var a=this,b=this._userOutFields,c=this.requiredFields,b=b&&b.slice(0),c=c&&c.slice(0);b?-1===b.indexOf("*")&&c.forEach(function(a){-1===b.indexOf(a)&&b.push(a)}):b=c;-1!==b.indexOf("*")?b=["*"]:this.loaded&&(b=b.filter(function(b){var c=!!a.getField(b);b&&!c&&Ma.error("[outFields] Invalid field: ",b);return c},this),b=b.map(function(b){return a.getField(b).name},this),b=b.filter(function(a,b,c){return c.indexOf(a)===
b}));return b},set:function(a){var b=this,c=this.requiredFields&&this.requiredFields.slice(0);a?-1===a.indexOf("*")&&c.forEach(function(b){-1===a.indexOf(b)&&a.push(b)}):a=c;this.loaded&&(a=a.filter(function(a){var c="*"===a||!!b.getField(a,b.fields);a&&!c&&Ma.error("[outFields] Invalid field: ",a);return c},this),a=a.map(function(a){return"*"===a?a:b.getField(a,b.fields).name},this));this._userOutFields=a},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"parsedUrl",{get:function(){var a=
this.url?n.urlToObject(this.url):null;null!=this.layerId&&null!=a&&(a.path=n.join(a.path,this.layerId.toString()));return a},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"renderer",{set:function(a){var b=this._getAllRenderers(a);ca.fixRendererFields(b,this.fields);this._set("renderer",a)},enumerable:!0,configurable:!0});t.prototype.readRenderer=function(b,c,d){c=c.layerDefinition||c;var e=c.drawingInfo&&c.drawingInfo.renderer||void 0,f,g;if(e)(f=ga.read(e,c,d)||void 0)||Ma.error("Failed to create renderer",
{rendererDefinition:c.drawingInfo.renderer,layer:this,context:d});else if(c.defaultSymbol)na.read(c.defaultSymbol,c,d),c.types&&c.types.length?(f=new q.UniqueValueRenderer({defaultSymbol:g,field:c.typeIdField}),c.types.forEach(function(a){e.addUniqueValueInfo(a.id,na.read(a.symbol,a,d))})):f=new q.SimpleRenderer({symbol:g});else if("Table"!==c.type){switch(c.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":g=new a.SimpleMarkerSymbol;break;case "esriGeometryPolyline":g=new a.SimpleLineSymbol;
break;case "esriGeometryPolygon":g=new a.SimpleFillSymbol}f=g&&new q.SimpleRenderer({symbol:g})}return f};t.prototype.writeRenderer=function(a,b,c,d){ga.writeTarget(a,b,c,d)};Object.defineProperty(t.prototype,"requiredFields",{get:function(){var a=this.timeInfo,b=[],c=[],a=[this.objectIdField,this.typeIdField,this.editFieldsInfo&&this.editFieldsInfo.creatorField,a&&a.startTimeField,a&&a.endTimeField,this.trackIdField];this.allRenderers.forEach(function(a){b=b.concat(a.requiredFields)});this.labelingInfo&&
this.labelingInfo.length&&this.labelingInfo.forEach(function(a){c=c.concat(a.requiredFields)});var c=c.map(function(a){return a.replace(/['"]+/g,"")}),a=a.concat(b),a=a.concat(c),d=this.elevationInfo&&this.elevationInfo.featureExpressionInfo;d&&(a=a.concat(d.requiredFields));this.popupTemplate&&(a=a.concat(this.popupTemplate.requiredFields));return a.filter(function(a,b,c){return!!a&&c.indexOf(a)===b&&"function"!==typeof a})},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"source",
{set:function(a){var b=this._get("source");b!==a&&(sa(b)&&this._resetMemorySource(b),sa(a)&&this._initMemorySource(a),this._set("source",a))},enumerable:!0,configurable:!0});t.prototype.castSource=function(a){return a?Array.isArray(a)||a&&a.isInstanceOf&&a.isInstanceOf(k)?new C({layer:this,items:a}):a:null};t.prototype.readSource=function(a,b){a=wa.fromJSON(b.featureSet);return new C({layer:this,items:a&&a.features||[]})};t.prototype.readTemplates=function(a,b){var c=b.editFieldsInfo;b=c&&c.creatorField;
c=c&&c.editorField;a=a&&a.map(function(a){return J.fromJSON(a)});this._fixTemplates(a,b);this._fixTemplates(a,c);return a};t.prototype.readTitle=function(a,b){a=b.layerDefinition&&b.layerDefinition.name||b.name;b=b.title||b.layerDefinition&&b.layerDefinition.title;if(a){b=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?fa.titleFromUrlAndName(this.url,a):a;if(a=a||this.url&&fa.parse(this.url).title)return"item-title-and-service-name"===this.sublayerTitleMode&&
b&&(a=b+" - "+a),fa.cleanTitle(a)}else if("item-title"===this.sublayerTitleMode&&b)return b};t.prototype.readTitleFromWebMap=function(a,b){return(a=b.layerDefinition&&b.layerDefinition.name)?a:b.title};t.prototype.readTypeIdField=function(a,b){b=b.layerDefinition||b;if(a=b.typeIdField)if(b=this.getField(a,b.fields))a=b.name;return a};t.prototype.readTypes=function(a,b){var c=this;b=b.layerDefinition||b;a=b.types;var d=(b=b.editFieldsInfo)&&b.creatorField,e=b&&b.editorField;return a&&a.map(function(a){a=
P.fromJSON(a);c._fixTemplates(a.templates,d);c._fixTemplates(a.templates,e);return a})};Object.defineProperty(t.prototype,"url",{set:function(a){a=fa.sanitizeUrlWithLayerId(this,a,Ma);this._set("url",a.url);null!=a.layerId&&this._set("layerId",a.layerId)},enumerable:!0,configurable:!0});t.prototype.writeUrl=function(a,b,c,d){fa.writeUrlWithLayerId(this,a,b)};t.prototype.readVersion=function(a,b){b=b.layerDefinition||b;return b.currentVersion?b.currentVersion:b.hasOwnProperty("capabilities")||b.hasOwnProperty("drawingInfo")||
b.hasOwnProperty("hasAttachments")||b.hasOwnProperty("htmlPopupType")||b.hasOwnProperty("relationships")||b.hasOwnProperty("timeInfo")||b.hasOwnProperty("typeIdField")||b.hasOwnProperty("types")?10:9.3};t.prototype.readVisible=function(a,b){if(b.layerDefinition&&null!=b.layerDefinition.defaultVisibility)return!!b.layerDefinition.defaultVisibility;if(null!=b.visibility)return!!b.visibility};t.prototype.applyEdits=function(a){var b=this,c,e,f={edits:a,result:d.create(function(a,b){c=a;e=b})};this.emit("apply-edits",
f);return this.load().then(function(){return za(b.source)?b._processApplyEditsParams(a):d.reject(new r("FeatureLayer","Layer source does not support applyEdits capability"))}).then(function(a){if(za(b.source))return b.source.applyEdits(a).then(function(a){var d=function(a){return a.filter(function(a){return!a.error}).map(v.clone)},d={addedFeatures:d(a.addFeatureResults),updatedFeatures:d(a.updateFeatureResults),deletedFeatures:d(a.deleteFeatureResults)};(d.addedFeatures.length||d.updatedFeatures.length||
d.deletedFeatures.length)&&b.emit("edits",d);c(d);return a})}).catch(function(a){e(a);throw a;})};t.prototype.on=function(a,b){return this.inherited(arguments)};t.prototype.createGraphicsSource=function(){var a=this;return this._hasMemorySource()?(this.emit("graphics-source-create",{graphicsSource:this.source}),this.source.when()):d.create(function(a){return b(["./graphics/sources/FeatureLayerSource"],a)}).then(function(b){return new b({layer:a})}).then(function(a){return a.when()}).then(function(b){a.emit("graphics-source-create",
{graphicsSource:b});return b})};t.prototype.createGraphicsController=function(a){var c=this,e=a.layerView,f=k.ofType(h),g=this.source,l=sa(g),n=p({},a.options,{layer:this,layerView:e,graphics:l?g:new f});return(l?d.create(function(a){return b(["./graphics/controllers/MemoryController"],a)}):"2d"===e.view.type?d.create(function(a){return b(["./graphics/controllers/AutoController2D"],a)}):d.create(function(a){return b(["./graphics/controllers/SnapshotController"],a)})).then(function(a){return new a(n)}).then(function(a){c.emit("graphics-controller-create",
{graphicsController:a});return a.when()})};t.prototype.createQuery=function(){var a=new ra,b=this.get("capabilities.data");a.gdbVersion=this.gdbVersion;a.historicMoment=this.historicMoment;a.returnGeometry=!0;b&&(b.supportsZ&&null!=this.returnZ&&(a.returnZ=this.returnZ),b.supportsM&&null!=this.returnM&&(a.returnM=this.returnM));a.outFields=this.outFields;a.where=this.definitionExpression||"1\x3d1";a.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null;return a};t.prototype.getFeatureType=
function(a){var b=this.typeIdField;if(!b||!a)return null;var c=a.attributes?a.attributes[b]:void 0;if(null==c)return null;var d=null;this.types.some(function(a){var b=a.id;if(null==b)return!1;b.toString()===c.toString()&&(d=a);return!!d});return d};t.prototype.getFieldDomain=function(a,b){var c=this,d,e=!1;b=(b=b&&b.feature)&&b.attributes;var f=this.typeIdField&&b&&b[this.typeIdField];null!=f&&this.types&&(e=this.types.some(function(b){return b.id==f?((d=b.domains&&b.domains[a])&&"inherited"===d.type&&
(d=c._getLayerDomain(a)),!0):!1}));e||d||(d=this._getLayerDomain(a));return d};t.prototype.getField=function(a,b){var c=this.processing?this.fields.concat(this.processing.fields):this.fields;return ca.getField(a,b||c)};t.prototype.graphicChanged=function(a){this.emit("graphic-update",a)};t.prototype.queryFeatureAttachments=function(a){var b=this;return this.load().then(function(){if(!a)return d.reject(new r("FeatureLayer","A feature is required to query attachments"));var c=b.layerId,f=b.objectIdField,
g=b.token,h=b.url;if(!b.get("capabilities.data.supportsAttachment"))return d.reject(new r("FeatureLayer","this layer doesn't support attachments"));var k=a.attributes;if(!k)return d.reject(new r("FeatureLayer","'attributes' are required on a feature to query attachments"));k=k[f];if(!k)return d.reject(new r("FeatureLayer","feature is missing the identifying attribute "+f));var l=h+"/"+c+"/"+k+"/attachments";return e(l,{query:{f:"json",token:g},callbackParamName:"callback",responseType:"json"}).then(function(a){return a.data.attachmentInfos.map(function(a){return p({},
a,{url:n.addProxy(l+"/"+a.id+(g?"?token\x3d"+g:""))})})})})};t.prototype.queryFeatures=function(a,b){var c=this;return this.load().then(function(){return c.source.queryFeatures(a||c.createQuery(),b)}).then(function(a){if(a&&a.features)for(var b=0,d=a.features;b<d.length;b++){var e=d[b];e.layer=e.sourceLayer=c}return a})};t.prototype.queryFeaturesJSON=function(a,b){var c=this;return this.load().then(function(){if(!c.source.queryFeaturesJSON)return d.reject(new r("FeatureLayer","Layer source does not support queryFeaturesJSON capability"))}).then(function(){return c.source.queryFeaturesJSON(a||
c.createQuery(),b)})};t.prototype.queryObjectIds=function(a,b){var c=this;return this.load().then(function(){return c.source.queryObjectIds?c.source.queryObjectIds(a||c.createQuery(),b):d.reject(new r("FeatureLayer","Layer source does not support queryObjectIds capability"))})};t.prototype.queryFeatureCount=function(a,b){var c=this;return this.load().then(function(){return c.source.queryFeatureCount?c.source.queryFeatureCount(a||c.createQuery(),b):d.reject(new r("FeatureLayer","Layer source does not support queryFeatureCount capability"))})};
t.prototype.queryExtent=function(a,b){var c=this;return this.load().then(function(){return c.source.queryExtent?c.source.queryExtent(a||c.createQuery(),b):d.reject(new r("FeatureLayer","Layer source does not support queryExtent capability"))})};t.prototype.read=function(a,b){var c=a.featureCollection;if(c){var d=c.layers;d&&1===d.length&&(this.inherited(arguments,[d[0],b]),null!=c.showLegend&&this.inherited(arguments,[{showLegend:c.showLegend},b]))}this.inherited(arguments,[a,b]);return this};t.prototype.write=
function(a,b){if(b&&"web-scene"===b.origin&&b.messages){if(!this.url)return b.messages.push(new r("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to web scenes",{layer:this})),null;if(this.isTable)return b.messages.push(new r("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' using a Table source cannot written to web scenes",{layer:this})),null}return this.inherited(arguments)};
t.prototype.importLayerViewModule=function(a){switch(a.type){case "2d":return d.create(function(a){return b(["../views/2d/layers/FeatureLayerView2D"],a)});case "3d":return d.create(function(a){return b(["../views/3d/layers/FeatureLayerView3D"],a)})}};t.prototype._getLayerDomain=function(a){if(!this.fields)return null;var b=null;this.fields.some(function(c){c.name===a&&(b=c.domain);return!!b});return b};t.prototype._fetchFirstLayerId=function(){return e(this.url,{query:{f:"json"},callbackParamName:"callback",
responseType:"json"}).then(function(a){if((a=a.data)&&Array.isArray(a.layers)&&0<a.layers.length)return a.layers[0].id})};t.prototype._initLayerProperties=function(a){var b=this;this.source||(this.source=a);a.url&&(this.url=a.url);a.layerDefinition&&this.read(a.layerDefinition,{origin:"service",url:this.parsedUrl});this._verifySource();this._verifyFields();this._addSymbolUrlTokens();ca.fixRendererFields(this._getAllRenderers(this.renderer),this.fields);this.watch("token",function(){b._addSymbolUrlTokens()});
return ka.loadStyleRenderer(this,{origin:"service"})};t.prototype._findUrlBasedSymbols=function(){var a=this.renderer;if(!a)return[];var b=[];a.symbol&&b.push(a.symbol);a.defaultSymbol&&b.push(a.defaultSymbol);(a=a.classBreakInfos||a.uniqueValueInfos)&&a.forEach(function(a){a.symbol&&b.push(a.symbol)});return b.filter(function(a){return!!a.url})};t.prototype._addSymbolUrlTokens=function(){var a=this.token;!this._hasMemorySource()&&a&&this._findUrlBasedSymbols().forEach(function(b){var c=b.url;if(c&&
-1!==c.search(/https?\:/i)&&!/[?&]token=/.test(c)){var d=-1===c.indexOf("?")?"?":"\x26";b.url=c+d+"token\x3d"+a}})};t.prototype._getAllRenderers=function(a){if(!a)return[];var b=[];[a,a.trackRenderer,a.observationRenderer,a.latestObservationRenderer].forEach(function(a){a&&(b.push(a),a.rendererInfos&&a.rendererInfos.forEach(function(a){a.renderer&&b.push(a.renderer)}))});return b};t.prototype._verifyFields=function(){var a=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+
a+")");this.isTable||this._hasMemorySource()||-1!==a.search(/\/FeatureServer\//i)||this.fields&&this.fields.some(function(a){return"geometry"===a.type})||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+a+")")};t.prototype._fixTemplates=function(a,b){a&&a.forEach(function(a){(a=a.prototype&&a.prototype.attributes)&&b&&delete a[b]})};t.prototype._verifySource=function(){var a=
this;if(this._hasMemorySource()){if(this.url)throw new r("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url");var b=["geometryType","fields","objectIdField"];if(!b.every(function(b){return null!=a[b]}))throw new r("feature-layer:missing-property","FeatureLayer created as feature collection requires properties: "+b.join(),{requiredProperties:b});}else{if(this.isTable)throw new r("feature-layer:source-type-not-supported","The table feature service type is not yet supported",
{sourceType:"Table"});if(!this.url)throw new r("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source");}};t.prototype._initMemorySource=function(a){var b=this;a.forEach(function(a){a.layer=b;a.sourceLayer=b});this._handles.add([a.on("after-add",function(a){a.item.layer=b;a.item.sourceLayer=b}),a.on("after-remove",function(a){a.item.layer=null;a.item.sourceLayer=null})],"fl-source")};t.prototype._resetMemorySource=function(a){a.forEach(function(a){a.layer=
null;a.sourceLayer=null});this._handles.remove("fl-source")};t.prototype._hasMemorySource=function(){return!(this.url||!this.source)};t.prototype._readDataCapabilities=function(a){return{supportsAttachment:ja(a,"hasAttachments",!1),supportsM:ja(a,"hasM",!1),supportsZ:ja(a,"hasZ",!1)}};t.prototype._readOperationsCapabilities=function(a,b){a=a?a.toLowerCase().split(",").map(function(a){return a.trim()}):[];var c=-1!==a.indexOf("editing"),d=c&&-1!==a.indexOf("create"),e=c&&-1!==a.indexOf("delete"),f=
c&&-1!==a.indexOf("update");!c||d||e||f||(d=e=f=!0);return{supportsCalculate:ja(b,"supportsCalculate",!1),supportsTruncate:ja(b,"supportsTruncate",!1),supportsValidateSql:ja(b,"supportsValidateSql",!1),supportsAdd:d,supportsDelete:e,supportsEditing:c,supportsQuery:-1!==a.indexOf("query"),supportsResizeAttachments:ja(b,"supportsAttachmentsResizing",!1),supportsUpdate:f}};t.prototype._readQueryCapabilities=function(a){var b=a.advancedQueryCapabilities,c=a.ownershipBasedAccessControlForFeatures,d=a.archivingInfo,
e=(a.supportedQueryFormats||"").split(",").reduce(function(a,b){(b=b.toLowerCase().trim())&&a.add(b);return a},new Set);return{supportsStatistics:ja(b,"supportsStatistics",a.supportsStatistics),supportsCentroid:ja(b,"supportsReturningGeometryCentroid",!1),supportsDistance:ja(b,"supportsQueryWithDistance",!1),supportsDistinct:ja(b,"supportsDistinct",a.supportsAdvancedQueries),supportsExtent:ja(b,"supportsReturningQueryExtent",!1),supportsGeometryProperties:ja(b,"supportsReturningGeometryProperties",
!1),supportsOrderBy:ja(b,"supportsOrderBy",a.supportsAdvancedQueries),supportsPagination:ja(b,"supportsPagination",!1),supportsQuantization:ja(a,"supportsCoordinatesQuantization",!1),supportsResultType:ja(b,"supportsQueryWithResultType",!1),supportsSqlExpression:ja(b,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:ja(a,"useStandardizedQueries",!1),supportsQueryByOthers:ja(c,"allowOthersToQuery",!0),supportsHistoricMoment:ja(d,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:e.has("pbf")}};
t.prototype._readQueryRelatedCapabilities=function(a){a=a.advancedQueryCapabilities;var b=ja(a,"supportsAdvancedQueryRelated",!1);return{supportsPagination:ja(a,"supportsQueryRelatedPagination",!1),supportsCount:b,supportsOrderBy:b}};t.prototype._readEditingCapabilities=function(a){var b=a.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:ja(a,"allowGeometryUpdates",!0),supportsGlobalId:ja(a,"supportsApplyEditsWithGlobalIds",!1),supportsRollbackOnFailure:ja(a,"supportsRollbackOnFailureParameter",
!1),supportsUpdateWithoutM:ja(a,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:ja(a,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:ja(b,"allowAnonymousToDelete",!0),supportsDeleteByOthers:ja(b,"allowOthersToDelete",!0),supportsUpdateByAnonymous:ja(b,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:ja(b,"allowOthersToUpdate",!0)}};t.prototype._processApplyEditsParams=function(a){if(!a)return d.reject(new r("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"));
a=p({},a);a.addFeatures=a.addFeatures||[];a.updateFeatures=a.updateFeatures||[];a.deleteFeatures=a.deleteFeatures||[];if(a.addFeatures.length||a.updateFeatures.length||a.deleteFeatures.length){var b=function(a){var b=new h;b.geometry=a.geometry;b.attributes=a.attributes;return b};a.addFeatures=a.addFeatures.map(b);a.updateFeatures=a.updateFeatures.map(b);return this._normalizeGeometries(a)}return d.reject(new r("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"))};
t.prototype._normalizeGeometries=function(a){var b=a.addFeatures,c=a.updateFeatures,d=b.concat(c).map(function(a){return a.geometry});return B.normalizeCentralMeridian(d).then(function(d){var e=b.length,f=c.length;d.slice(0,e).forEach(function(b,c){a.addFeatures[c].geometry=b});d.slice(e,e+f).forEach(function(b,c){a.updateFeatures[c].geometry=b});return a})};l([x.property({types:{key:"type",base:H.default,typeMap:{selection:O.default}},json:{origins:{"web-scene":{read:{source:"layerDefinition.featureReduction"},
write:{target:"layerDefinition.featureReduction"}}}}})],t.prototype,"featureReduction",void 0);l([x.property({readOnly:!0,dependsOn:["loaded","renderer","fields"]})],t.prototype,"allRenderers",null);l([x.property({readOnly:!0,dependsOn:["loaded"]})],t.prototype,"capabilities",null);l([x.reader("capabilities","layerDefinition.capabilities layerDefinition.advancedQueryCapabilities layerDefinition.archivingInfo layerDefinition.supportsStatistics layerDefinition.supportsAdvancedQueries layerDefinition.hasAttachments layerDefinition.hasM layerDefinition.hasZ layerDefinition.supportsCalculate layerDefinition.supportsTruncate layerDefinition.supportsValidateSql layerDefinition.supportsCoordinatesQuantization layerDefinition.useStandardizedQueries layerDefinition.ownershipBasedAccessControlForFeatures layerDefinition.allowGeometryUpdates layerDefinition.supportsApplyEditsWithGlobalIds layerDefinition.supportsRollbackOnFailureParameter layerDefinition.allowUpdateWithoutMValues layerDefinition.supportsAttachmentsByUploadId layerDefinition.supportedQueryFormats".split(" ")),
x.reader("service","capabilities","advancedQueryCapabilities archivingInfo supportsStatistics supportsAdvancedQueries hasAttachments hasM hasZ supportsAttachmentsResizing supportsCalculate supportsTruncate supportsValidateSql supportsCoordinatesQuantization useStandardizedQueries ownershipBasedAccessControlForFeatures allowGeometryUpdates supportsApplyEditsWithGlobalIds supportsRollbackOnFailureParameter allowUpdateWithoutMValues supportsAttachmentsByUploadId capabilities supportedQueryFormats".split(" "))],
t.prototype,"readCapabilities",null);l([x.property({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0);l([x.property({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0);l([x.property({type:String,json:{origins:{service:{read:!1,write:!1}},read:{source:"layerDefinition.definitionExpression"},write:{target:"layerDefinition.definitionExpression"}}})],
t.prototype,"definitionExpression",void 0);l([x.property({readOnly:!0,json:{read:na.read}})],t.prototype,"defaultSymbol",void 0);l([x.property()],t.prototype,"dynamicDataSource",void 0);l([x.property({readOnly:!0})],t.prototype,"editFieldsInfo",void 0);l([x.property({type:qa,json:{origins:{service:{read:{source:"elevationInfo"},write:{target:"elevationInfo",enabled:!1}}},read:{source:"layerDefinition.elevationInfo"},write:{target:"layerDefinition.elevationInfo"}}})],t.prototype,"elevationInfo",void 0);
l([x.property({type:[S],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.fields"}}})],t.prototype,"fields",void 0);l([x.property({type:y,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],t.prototype,"fullExtent",void 0);l([x.property()],t.prototype,"gdbVersion",void 0);l([x.property({json:{origins:{service:{read:Da.read}},read:{source:"layerDefinition.geometryType",reader:Da.read}}})],t.prototype,"geometryType",void 0);l([x.property({readOnly:!0,
dependsOn:["loaded"],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasAttachments"}}})],t.prototype,"hasAttachments",null);l([x.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],t.prototype,"hasM",void 0);l([x.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],t.prototype,"hasZ",void 0);l([x.property({readOnly:!0,type:A})],t.prototype,"heightModelInfo",void 0);l([x.property({type:Date})],
t.prototype,"historicMoment",void 0);l([x.property({json:{origins:{service:{read:!1},"portal-item":{read:!1}}}})],t.prototype,"id",void 0);l([x.property({readOnly:!0})],t.prototype,"isTable",void 0);l([x.reader("service","isTable",["type"]),x.reader("isTable",["layerDefinition.type"])],t.prototype,"readIsTable",null);l([x.property({dependsOn:["loaded","url","source"],readOnly:!0})],t.prototype,"hasService",null);l([x.property(M.labelsVisible)],t.prototype,"labelsVisible",void 0);l([x.property({type:[Q],
json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:U.reader},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:U.reader},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],t.prototype,"labelingInfo",void 0);l([x.property({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],t.prototype,"layerId",void 0);l([x.property({type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"}}})],
t.prototype,"legendEnabled",void 0);l([x.property({type:Number,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.maxRecordCount"}}})],t.prototype,"maxRecordCount",void 0);l([x.property({type:Number,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.tileMaxRecordCount"}}})],t.prototype,"tileMaxRecordCount",void 0);l([x.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}})],
t.prototype,"minScale",void 0);l([x.reader("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null);l([x.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}})],t.prototype,"maxScale",void 0);l([x.reader("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null);l([x.property({type:String})],t.prototype,"objectIdField",void 0);l([x.reader("objectIdField",
["layerDefinition.objectIdField","layerDefinition.fields"]),x.reader("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null);l([x.property()],t.prototype,"operationalLayerType",void 0);l([x.property({dependsOn:["requiredFields"]})],t.prototype,"outFields",null);l([x.property({readOnly:!0,dependsOn:["layerId"]})],t.prototype,"parsedUrl",null);l([x.property(M.popupEnabled)],t.prototype,"popupEnabled",void 0);l([x.property({type:c,json:{read:{source:"popupInfo"},
write:{target:"popupInfo"}}})],t.prototype,"popupTemplate",void 0);l([x.property({type:N})],t.prototype,"processing",void 0);l([x.property({type:[Y],readOnly:!0})],t.prototype,"relationships",void 0);l([x.property({types:ha.types,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],t.prototype,"renderer",null);l([x.reader("service","renderer",["drawingInfo.renderer","defaultSymbol","type"]),x.reader("renderer",["layerDefinition.drawingInfo.renderer",
"layerDefinition.defaultSymbol","layerDefinition.type"])],t.prototype,"readRenderer",null);l([x.writer("renderer")],t.prototype,"writeRenderer",null);l([x.property({readOnly:!0,dependsOn:["allRenderers","labelingInfo","elevationInfo.featureExpressionInfo","popupTemplate.requiredFields"]})],t.prototype,"requiredFields",null);l([x.property({type:Boolean})],t.prototype,"returnM",void 0);l([x.property({type:Boolean})],t.prototype,"returnZ",void 0);l([x.property(M.screenSizePerspectiveEnabled)],t.prototype,
"screenSizePerspectiveEnabled",void 0);l([x.property()],t.prototype,"source",null);l([x.cast("source")],t.prototype,"castSource",null);l([x.reader("portal-item","source",["featureSet"]),x.reader("web-map","source",["featureSet"])],t.prototype,"readSource",null);l([x.property({readOnly:!0,json:{origins:{service:{read:{source:"definitionExpression"}}}}})],t.prototype,"serviceDefinitionExpression",void 0);l([x.property({type:D,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],
t.prototype,"spatialReference",void 0);l([x.property({type:[J]})],t.prototype,"templates",void 0);l([x.reader("templates",["editFieldsInfo","creatorField","editorField","templates"])],t.prototype,"readTemplates",null);l([x.property()],t.prototype,"timeInfo",void 0);l([x.property()],t.prototype,"title",void 0);l([x.reader("service","title",["name"]),x.reader("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],t.prototype,"readTitle",null);l([x.reader("web-map","title",
["layerDefinition.name","title"])],t.prototype,"readTitleFromWebMap",null);l([x.property({type:String})],t.prototype,"sublayerTitleMode",void 0);l([x.property({type:String,readOnly:!0,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0);l([x.property({json:{read:!1}})],t.prototype,"type",void 0);l([x.property({type:String,readOnly:!0})],t.prototype,"typeIdField",void 0);l([x.reader("service","typeIdField"),x.reader("typeIdField",["layerDefinition.typeIdField"])],t.prototype,
"readTypeIdField",null);l([x.property({type:[P]})],t.prototype,"types",void 0);l([x.reader("service","types",["types"]),x.reader("types",["layerDefinition.types"])],t.prototype,"readTypes",null);l([x.property({type:k.ofType(W.FeatureIndex),readOnly:!0})],t.prototype,"indexes",void 0);l([x.property({type:String})],t.prototype,"url",null);l([x.writer("url")],t.prototype,"writeUrl",null);l([x.property({readOnly:!0})],t.prototype,"userIsAdmin",void 0);l([x.property({json:{origins:{"portal-item":{read:!1}}}})],
t.prototype,"version",void 0);l([x.reader("service","version","currentVersion capabilities drawingInfo hasAttachments htmlPopupType relationships timeInfo typeIdField types".split(" ")),x.reader("version","layerDefinition.currentVersion layerDefinition.capabilities layerDefinition.drawingInfo layerDefinition.hasAttachments layerDefinition.htmlPopupType layerDefinition.typeIdField layerDefinition.types".split(" "))],t.prototype,"readVersion",null);l([x.property({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],
t.prototype,"visible",void 0);l([x.reader("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],t.prototype,"readVisible",null);l([m(0,x.cast(ra))],t.prototype,"queryFeatures",null);l([m(0,x.cast(ra))],t.prototype,"queryFeaturesJSON",null);l([m(0,x.cast(ra))],t.prototype,"queryObjectIds",null);l([m(0,x.cast(ra))],t.prototype,"queryFeatureCount",null);l([m(0,x.cast(ra))],t.prototype,"queryExtent",null);return t=l([x.subclass("esri.layers.FeatureLayer")],t)}(x.declared(F,ba,Z,
I,V,G,t))})},"esri/renderers":function(){define("require exports ./renderers/ClassBreaksRenderer ./renderers/HeatmapRenderer ./renderers/Renderer ./renderers/SimpleRenderer ./renderers/UniqueValueRenderer ./renderers/support/jsonUtils".split(" "),function(b,g,p,f,l,m,h,c){Object.defineProperty(g,"__esModule",{value:!0});g.ClassBreaksRenderer=p;g.HeatmapRenderer=f;g.BaseRenderer=l;g.SimpleRenderer=m;g.UniqueValueRenderer=h;g.isRenderer=function(b){return b instanceof g.BaseRenderer};g.fromJSON=c.fromJSON})},
"esri/renderers/ClassBreaksRenderer":function(){define("../core/declare ../core/lang ../core/kebabDictionary ../core/Error ../core/Logger ../core/accessorSupport/ensureType ../support/arcadeUtils ../symbols/Symbol ../symbols/PolygonSymbol3D ../symbols/support/jsonUtils ../symbols/support/typeUtils ./Renderer ./support/LegendOptions ./support/ClassBreakInfo".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k,r,u){var z=l.getLogger("esri.renderers.ClassBreaksRenderer");r=r.LegendOptions;u=u.ClassBreakInfo;
var v=p({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"}),w=m.ensureType(u),t=b(k,{declaredClass:"esri.renderers.ClassBreaksRenderer",properties:{backgroundFillSymbol:{types:{base:c,key:"type",typeMap:{"simple-fill":a.types.typeMap["simple-fill"],"picture-fill":a.types.typeMap["picture-fill"],"polygon-3d":a.types.typeMap["polygon-3d"]}},value:null,json:{origins:{"web-scene":{read:e.read,write:{target:{backgroundFillSymbol:{type:q}},writer:e.writeTarget}}},
read:e.read,write:e.writeTarget}},classBreakInfos:{type:[u],json:{read:function(a,b,c){if(Array.isArray(a)){var d=b.minValue;return a.map(function(a){var b=new u;b.read(a,c);null==b.minValue&&(b.minValue=d);null==b.maxValue&&(b.maxValue=b.minValue);d=b.maxValue;return b})}},write:function(a,b,c,e){a=a.map(function(a){return a.write({},e)});this._areClassBreaksConsecutive()&&a.forEach(function(a){delete a.classMinValue});b[c]=a}}},minValue:{type:Number,readOnly:!0,dependsOn:["classBreakInfos"],get:function(){return this.classBreakInfos[0]&&
this.classBreakInfos[0].minValue||0},json:{read:!1,write:{overridePolicy:function(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}},defaultLabel:{type:String,value:null,json:{write:!0}},defaultSymbol:{types:a.rendererTypes,value:null,json:{origins:{"web-scene":{read:e.read,write:{target:{defaultSymbol:{types:a.rendererTypes3D}},writer:e.writeTarget}}},read:e.read,write:e.writeTarget}},valueExpression:{type:String,value:null,json:{write:!0}},
valueExpressionTitle:{type:String,value:null,json:{write:!0}},compiledFunc:{dependsOn:["valueExpression"],get:function(){return h.createFunction(this.valueExpression)}},legendOptions:{type:r,value:null,json:{write:!0}},field:{value:null,cast:function(a){return null==a?a:"function"===typeof a?a:m.ensureString(a)},json:{type:String,write:function(a,b,c,e){"string"===typeof a?b[c]=a:e&&e.messages?e.messages.push(new f("property:unsupported","ClassBreaksRenderer.field set to a function cannot be written to JSON")):
z.error(".field: cannot write field to JSON since it's not a string value")}}},isMaxInclusive:!0,normalizationField:{type:String,value:null,json:{write:!0}},normalizationTotal:{type:Number,value:null,json:{write:!0}},normalizationType:{type:String,value:null,dependsOn:["normalizationField","normalizationTotal"],get:function(){var a=this._get("normalizationType"),b=!!this.normalizationField,c=null!=this.normalizationTotal;if(b||c)a=b&&"field"||c&&"percent-of-total",b&&c&&console.warn("warning: both normalizationField and normalizationTotal are set!");
else if("field"===a||"percent-of-total"===a)a=null;return a},json:{read:v.fromJSON,write:function(a,b){if(a=v.toJSON(a))b.normalizationType=a}}},requiredFields:{dependsOn:["field","normalizationField","valueExpression"]},type:{value:"class-breaks",json:{write:function(a,b){b.type="classBreaks"}}}},constructor:function(){this.classBreakInfos=[]},addClassBreakInfo:function(a,b,c){a="number"===typeof a?new u({minValue:a,maxValue:b,symbol:c}):w(g.clone(a));this.classBreakInfos.push(a);1===this.classBreakInfos.length&&
this.notifyChange("minValue")},removeClassBreakInfo:function(a,b){var c,d,e=this.classBreakInfos.length;for(d=0;d<e;d++)if(c=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],c[0]==a&&c[1]==b){this.classBreakInfos.splice(d,1);break}},getBreakIndex:function(a,b){var c=this.field,d=a.attributes,e=this.classBreakInfos.length,f=this.isMaxInclusive;if(this.valueExpression)a=h.executeFunction(this.compiledFunc,h.createExecContext(a,h.getViewInfo(b)));else if("function"===typeof c)a=c(a);
else if(a=parseFloat(d[c]),b=this.normalizationType)if(c=parseFloat(this.normalizationTotal),d=parseFloat(d[this.normalizationField]),"log"===b)a=Math.log(a)*Math.LOG10E;else if("percent-of-total"===b&&!isNaN(c))a=a/c*100;else if("field"===b&&!isNaN(d)){if(isNaN(a)||isNaN(d))return-1;a/=d}if(null!=a&&!isNaN(a)&&"number"===typeof a)for(d=0;d<e;d++)if(b=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],b[0]<=a&&(f?a<=b[1]:a<b[1]))return d;return-1},getClassBreakInfo:function(a,b){a=
this.getBreakIndex(a,b);return-1!==a?this.classBreakInfos[a]:null},getSymbol:function(a,b){a=this.getBreakIndex(a,b);return-1<a?this.classBreakInfos[a].symbol:this.defaultSymbol},getSymbols:function(){var a=[];this.classBreakInfos.forEach(function(b){b.symbol&&a.push(b.symbol)});this.defaultSymbol&&a.push(this.defaultSymbol);return a},clone:function(){return new t({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol&&
this.defaultSymbol.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:g.clone(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:g.clone(this.visualVariables),legendOptions:g.clone(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})},collectRequiredFields:function(a){this.inherited(arguments);
[this.field,this.normalizationField].forEach(function(b){b&&(a[b]=!0)});this.valueExpression&&h.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})},_areClassBreaksConsecutive:function(){for(var a=this.classBreakInfos,b=1;b<a.length;b++)if(a[b-1].maxValue!==a[b].minValue)return!1;return!0}});return t})},"esri/renderers/Renderer":function(){define("../core/declare ../core/Accessor ../core/JSONSupport ../core/kebabDictionary ../core/screenUtils ../core/lang ../core/Error ../support/arcadeUtils ../webdoc/support/opacityUtils ../Color ./support/utils ./support/AuthoringInfo".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k){var r=f({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),u=f({widthAndDepth:"width-and-depth"}),z=f({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});f({classedSize:"classed-size",classedColor:"classed-color",univariateColorSize:"univariate-color-size"});
f({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"});f({percentTotal:"percent-of-total"});var v=Math.PI,w=q.opacityToTransparency,t=q.transparencyToOpacity;return b([g,p],{declaredClass:"esri.renderers.Renderer",properties:{authoringInfo:{type:k,value:null,json:{write:!0}},requiredFields:{dependsOn:["visualVariables"],get:function(){var a=Object.create(null);
this.collectRequiredFields(a);return Object.keys(a).sort()}},type:{type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}},visualVariables:{json:{read:{source:["visualVariables","rotationType","rotationExpression"],reader:function(a,b){return this._readVariables(a,b)}},write:function(a,b,c,e){var d=[];a.forEach(function(a,b){"size"===a.type?d.push(this._writeSizeInfo(a,e,b)):"color"===a.type?d.push(this._writeColorInfo(a,e,b)):"opacity"===a.type?d.push(this._writeOpacityInfo(a,e,b)):"rotation"===
a.type&&d.push(this._writeRotationInfo(a,e,b))},this);b.visualVariables=d}}}},constructor:function(){this._cache={}},_rotationRE:/^\[([^\]]+)\]$/i,_viewScaleRE:/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i,_visualVariablesSetter:function(a){var b=this._cache;this.visualVariables&&this.visualVariables.forEach(function(a,c){b.hasOwnProperty(c)&&(b[c]=null)},this);a&&a.some(function(a){return!!a.target})&&a.sort(function(a,b){return a.target===b.target?0:a.target?1:-1});a&&a.forEach(function(a,c){"color"===
a.type?b[c]=this._processColorInfo(a):"opacity"===a.type?b[c]=this._processOpacityInfo(a):"size"===a.type?b[c]=this._processSizeInfo(a):"rotation"===a.type&&(b[c]=this._processRotationInfo(a))},this);this._set("visualVariables",a)},getSymbol:function(a,b){},getVisualVariableValues:function(a,b){var c=this.visualVariables,d;c&&(d=c.map(function(c){var d,e=c.type,f=e+"Info";b=m.mixin({},b);b[f]=c;switch(e){case "size":d=this.getSize(a,b);break;case "color":d=this.getColor(a,b);break;case "opacity":d=
this.getOpacity(a,b);break;case "rotation":d=this.getRotationAngle(a,b)}return{variable:c,value:d}},this).filter(function(a){return null!=a.value},this));return d},hasVisualVariables:function(a,b){return a?!!this.getVisualVariablesForType(a,b):!!(this.getVisualVariablesForType("size",b)||this.getVisualVariablesForType("color",b)||this.getVisualVariablesForType("opacity",b)||this.getVisualVariablesForType("rotation",b))},getVisualVariablesForType:function(a,b){var c=this.visualVariables,d;c&&(d=c.filter(function(c){return c.type===
a&&("string"===typeof b?c.target===b:!1===b?!c.target:!0)}))&&0===d.length&&(d=void 0);return d},getSize:function(a,b){var c=this._getVarInfo(b&&b.sizeInfo,"size"),d=c.variable,c=this._cache[c.cacheKey],e=null;if(d)var f=d.minSize,e=d.maxSize,f="object"===typeof f&&f?this._getSize(a,f,c&&c.minSize,b):f,e="object"===typeof e&&e?this._getSize(a,e,c&&c.maxSize,b):e,e=this._getSize(a,d,c&&c.root,b,[f,e]);return e},getSizeRangeAtScale:function(a,b){var c;a=this._getVarInfo(a,"size");var d=this._cache[a.cacheKey],
e={scale:b};if((a=a.variable)&&b){b=a.minSize;var f=a.maxSize;a="object"===typeof b&&b?this._getSize({},b,d&&d.minSize,e):b;d="object"===typeof f&&f?this._getSize({},f,d&&d.maxSize,e):f;if(null!=a||null!=d)a>d&&(c=d,d=a,a=c),c={minSize:a,maxSize:d}}return c},getColor:function(a,b){var c=this._getVarInfo(b&&b.colorInfo,"color");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b)},getOpacity:function(a,b){var c=this._getVarInfo(b&&b.opacityInfo,"opacity");return this._getColorComponent(a,
c.variable,this._cache[c.cacheKey],b,!0)},getRotationAngle:function(a,b){var d=this._getVarInfo(b&&b.rotationInfo,"rotation"),e=d.variable,f=this._cache[d.cacheKey],g=e.axis||"heading",d="heading"===g&&"arithmetic"===e.rotationType?90:0,g="heading"===g&&"arithmetic"===e.rotationType?-1:1,e=e.field,f=f&&f.compiledFunc,h=a.attributes,k=0;if(e||f)f?k=c.executeFunction(f,c.createExecContext(a,c.getViewInfo(b))):"function"===typeof e?k=e.apply(this,arguments):h&&(k=h[e]||0),k="number"!==typeof k||isNaN(k)?
null:d+g*k;return k},collectRequiredFields:function(a){var b=[];this.visualVariables&&(b=b.concat(this.visualVariables));b.forEach(function(b){b&&(b.field&&(a[b.field]=!0),b.normalizationField&&(a[b.normalizationField]=!0),b.valueExpression&&c.extractFieldNames(b.valueExpression).forEach(function(b){a[b]=!0}))})},_getVarInfo:function(a,b){var c;a&&a.type===b&&this.visualVariables?(c=this.visualVariables.indexOf(a),a=this.visualVariables[c]):this.visualVariables&&(a=(a=this.getVisualVariablesForType(b))&&
a[0],c=this.visualVariables.indexOf(a));return{variable:a,cacheKey:c}},_readSizeInfo:function(a){a.axis&&(a.axis=u.fromJSON(a.axis));a.valueUnit&&(a.valueUnit=z.fromJSON(a.valueUnit));return a},_readColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(b,c){Array.isArray(b)?a.colors[c]=e.fromJSON(b):a.colors[c]=new e(b)}),a.stops&&a.stops.forEach(function(b,c){b.color&&Array.isArray(b.color)?a.stops[c].color=e.fromJSON(b.color):b.color&&(a.stops[c].color=new e(b.color))}));return a},_readOpacityInfo:function(a){var b;
a&&(b=m.mixin({},a),b.transparencyValues&&(b.opacityValues=b.transparencyValues.map(t),delete b.transparencyValues),b.stops&&(b.stops=b.stops.map(function(a){a=m.mixin({},a);a.opacity=t(a.transparency);delete a.transparency;return a})));return b},_readVariables:function(a,b){a&&(a=a.map(function(a){a=m.clone(a);a.type=r.fromJSON(a.type);"size"===a.type?a=this._readSizeInfo(a):"color"===a.type?a=this._readColorInfo(a):"opacity"===a.type&&(a=this._readOpacityInfo(a));return a},this));var c=b.rotationType;
if(b=b.rotationExpression)c={type:"rotation",rotationType:c},(b=b.match(this._rotationRE))&&b[1]&&(c.field=b[1],a||(a=[]),a.push(c));return a},_createCache:function(a){var b=a&&a.valueExpression,d=c.createSyntaxTree(b),d=c.createFunction(d),e=!(!a||!a.expression)||this._viewScaleRE.test(b);return{ipData:this._interpolateData(a),hasExpr:!!b,compiledFunc:d,isScaleDriven:e}},_processColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(b,c){b instanceof e||(a.colors[c]=new e(b))}),a.stops&&a.stops.forEach(function(b,
c){!b.color||b.color instanceof e||(a.stops[c].color=new e(b.color))}),this._sortStops(a.stops));return this._createCache(a)},_processOpacityInfo:function(a){this._sortStops(a&&a.stops);return this._createCache(a)},_processSizeInfo:function(a){a.stops&&Array.isArray(a.stops)?a.stops=this._processSizeInfoStops(a.stops):(a.minSize=a.minSize&&this._processSizeInfoSize(a.minSize),a.maxSize=a.maxSize&&this._processSizeInfoSize(a.maxSize));return{root:this._createCache(a),minSize:this._createCache(a.minSize),
maxSize:this._createCache(a.maxSize)}},_processSizeInfoSize:function(a){"object"===typeof a?a.stops=this._processSizeInfoStops(a.stops):a=l.toPt(a);return a},_processSizeInfoStops:function(a){a&&Array.isArray(a)&&(a.forEach(function(a){a.size=l.toPt(a.size)}),this._sortStops(a));return a},_sortStops:function(a){a&&Array.isArray(a)&&a.sort(function(a,b){return a.value-b.value})},_processRotationInfo:function(a){return this._createCache(a)},_getSize:function(b,e,f,g,h){var d=b.attributes,k=e.field,
l=e.stops,n=0,m=f&&f.hasExpr,p=f&&f.compiledFunc,q=f&&f.ipData,r=f&&f.isScaleDriven,t="number"===typeof b,u=t?b:null;if(k||r||m){var z=g&&g.scale,y=h?h[0]:e.minSize,x=h?h[1]:e.maxSize,w=e.minDataValue,A=e.maxDataValue,J=e.valueUnit||"unknown",P=e.valueRepresentation,n=e.scaleBy,S=e.normalizationField,ca=d?parseFloat(d[S]):void 0,Q=g&&g.shape;r?u=null==z?this._getAverageValue(e):z:"number"!==typeof u&&(m?u=c.executeFunction(p,c.createExecContext(b,c.getViewInfo(g))):"function"===typeof k?u=k.apply(this,
arguments):d&&(u=d[k]));if(null==u||S&&!t&&(isNaN(ca)||0===ca))return null;isNaN(ca)||t||(u/=ca);if(l)x=this._lookupData(u,q),u=x[0],y=x[1],u===y?n=l[u].size:(u=l[u].size,l=l[y].size,n=u+(l-u)*x[2]);else if(null!=y&&null!=x&&null!=w&&null!=A)u<=w?n=y:u>=A?n=x:(l=(u-w)/(A-w),"area"===n&&Q?(y=(u="circle"===Q)?v*Math.pow(y/2,2):y*y,l=y+l*((u?v*Math.pow(x/2,2):x*x)-y),n=u?2*Math.sqrt(l/v):Math.sqrt(l)):n=y+l*(x-y));else if("unknown"===J)null!=y&&null!=w?(y&&w?(l=u/w,n="circle"===Q?2*Math.sqrt(l*Math.pow(y/
2,2)):"square"===Q||"diamond"===Q||"image"===Q?Math.sqrt(l*Math.pow(y,2)):l*y):n=u+(y||w),n=n<y?y:n,null!=x&&n>x&&(n=x)):n=u;else{l=(g&&g.resolution?g.resolution:1)*a.meterIn[J];if("area"===P)n=Math.sqrt(u/v)/l,n*=2;else if(n=u/l,"radius"===P||"distance"===P)n*=2;null!=y&&n<y&&(n=y);null!=x&&n>x&&(n=x)}}else e&&(n=l&&l[0]&&l[0].size,null==n&&(n=e.minSize));return n=isNaN(n)?0:n},_getAverageValue:function(a){var b=a.stops,c;b?(c=b[0].value,a=b[b.length-1].value):(c=a.minDataValue||0,a=a.maxDataValue||
0);return(c+a)/2},_getColorComponent:function(a,b,e,f,g,h){var d=a.attributes,k=b&&b.field,l="number"===typeof a,n=l?a:null,m=e&&e.hasExpr,p=e&&e.compiledFunc,q=e&&e.ipData,r;if(k||m){var t=b.normalizationField,u=d?parseFloat(d[t]):void 0;"number"!==typeof n&&(m?n=c.executeFunction(p,c.createExecContext(a,c.getViewInfo(f))):"function"===typeof k?n=k.apply(this,arguments):d&&(n=d[k]));null==n||t&&!l&&(isNaN(u)||0===u)||(isNaN(u)||l||(n/=u),r=g?this._getOpacity(n,b,q):this._getColor(n,b,q))}else b&&
(d=b.stops,g?(r=d&&d[0]&&d[0].opacity,null==r&&(r=b.opacityValues&&b.opacityValues[0])):r=d&&d[0]&&d[0].color||b.colors&&b.colors[0]);h&&(h.data=n,h.value=r);return h||r},_interpolateData:function(a){var b;if(a)if(a.colors||a.opacityValues){var c=(a.colors||a.opacityValues).length,d=a.minDataValue,e=(a.maxDataValue-d)/(c-1);b=[];for(a=0;a<c;a++)b[a]=d+a*e}else a.stops&&(b=a.stops.map(function(a){return a.value||0}));return b},_getOpacity:function(a,b,c){a=this._lookupData(a,c);var d;b=b||this.opacityInfo;
a&&(c=a[0],d=a[1],c===d?d=this._getOpacValue(b,c):(c=this._getOpacValue(b,c),b=this._getOpacValue(b,d),d=c+(b-c)*a[2]));return d},_getOpacValue:function(a,b){return a.opacityValues?a.opacityValues[b]:a.stops[b].opacity},_getColor:function(a,b,c){a=this._lookupData(a,c);var d;b=b||this.colorInfo;a&&(d=a[0],c=a[1],d=d===c?this._getColorObj(b,d):e.blendColors(this._getColorObj(b,d),this._getColorObj(b,c),a[2]),d=new e(d));return d},_getColorObj:function(a,b){return a.colors?a.colors[b]:a.stops[b].color},
_lookupData:function(a,b){var c;if(b){var d=0,e=b.length-1;b.some(function(b,c){if(a<b)return e=c,!0;d=c;return!1});c=[d,e,(a-b[d])/(b[e]-b[d])]}return c},_processForContext:function(a,b,c){if(b&&"web-scene"===b.origin){var d=null!=a.expression,e=null!=a.valueExpressionTitle&&"rotation"===a.type;b.messages&&(d&&b.messages.push(new h("property:unsupported",a.type+"VisualVariable.expression is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+
".expression",context:b})),e&&b.messages.push(new h("property:unsupported",a.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+".valueExpressionTitle",context:b})));d&&delete a.expression;e&&delete a.valueExpressionTitle}else"size"===a.type&&this._convertExpressionToArcade(a)},_writeRotationInfo:function(a,b,c){a&&(a=m.mixin({},a),this._processForContext(a,b,"visualVariables["+c+"]"),a.type=r.toJSON(a.type),
a=m.fixJson(a,!0));return a},_convertExpressionToArcade:function(a){a&&a.expression&&(a.valueExpression="$view.scale")},_writeSizeInfo:function(a,b,c){if(a){a=m.mixin({},a);this._processForContext(a,b,"string"===typeof c?c:"visualVariables["+c+"]");var d=a.minSize,e=a.maxSize;d&&(a.minSize="number"===typeof d?d:this._writeSizeInfo(d,b,"visualVariables["+c+"].minSize"));e&&(a.maxSize="number"===typeof e?e:this._writeSizeInfo(e,b,"visualVariables["+c+"].maxSize"));b=a.legendOptions;c=a.axis;a.type=
r.toJSON(a.type);c&&(a.axis=u.toJSON(c));b&&(a.legendOptions=m.mixin({},b),b=b.customValues)&&(a.legendOptions.customValues=b.slice(0));a.stops&&(a.stops=a.stops.map(function(a){a=m.mixin({},a);null===a.label&&delete a.label;return a}));a=m.fixJson(a,!0)}return a},_writeColorInfo:function(a,b,c){a&&(a=m.mixin({},a),this._processForContext(a,b,"visualVariables["+c+"]"),a.type=r.toJSON(a.type),a.colors&&(a.colors=a.colors.map(function(a){return e.toJSON(a)})),a.stops&&(a.stops=a.stops.map(function(a){a=
m.mixin({},a);a.color&&(a.color=e.toJSON(a.color));null==a.value&&(a.value=0);null===a.label&&delete a.label;return a})),a.legendOptions&&(a.legendOptions=m.mixin({},a.legendOptions)),a=m.fixJson(a,!0));return a},_writeOpacityInfo:function(a,b,c){var d;a&&(d=m.mixin({},a),this._processForContext(d,b,"visualVariables["+c+"]"),d.type=r.toJSON(d.type),d.opacityValues&&(d.transparencyValues=d.opacityValues.map(w),delete d.opacityValues),d.stops&&(d.stops=d.stops.map(function(a){a=m.mixin({},a);a.transparency=
w(a.opacity);delete a.opacity;null===a.label&&delete a.label;return a})),d.legendOptions&&(d.legendOptions=m.mixin({},d.legendOptions)),d=m.fixJson(d,!0));return d}})})},"esri/renderers/support/utils":function(){define(["dojo/date/locale","../../Color","../../core/lang","../../core/numberUtils","dojo/i18n!dojo/cldr/nls/gregorian"],function(b,g,p,f,l){function m(a){return a&&a.map(function(a){return new g(a)})}function h(a,b,c){var e="";0===b?e=q.lt+" ":b===c&&(e=q.gt+" ");return e+a}var c={},q={lte:"\x3c\x3d",
gte:"\x3e\x3d",lt:"\x3c",gt:"\x3e",pct:"%",ld:"\u2013"},e={millisecond:0,second:1,minute:2,hour:3,day:4,month:5,year:6},a={millisecond:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},second:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},minute:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},hour:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},day:{selector:"date",dateOptions:{formatLength:"long"}},month:{selector:"date",
dateOptions:{formatLength:"long"}},year:{selector:"date",dateOptions:{selector:"year"}}},k={formatLength:"short",fullYear:!0},r={formatLength:"short"};p.mixin(c,{meterIn:{inches:1/.0254,feet:1/.3048,"us-feet":3.28084,yards:1/.9144,miles:1/1609.344,"nautical-miles":1/1852,millimeters:1E3,centimeters:100,decimeters:10,meters:1,kilometers:.001,"decimal-degrees":180/20015077},timelineDateFormatOptions:{selector:"date",dateOptions:{formatLength:"short",fullYear:!0}},formatDate:function(a,c){var e=[];null==
a||a instanceof Date||(a=new Date(a));c=c||{};c=p.mixin({},c);var f=c.selector?c.selector.toLowerCase():null,g=!f||-1<f.indexOf("time"),f=!f||-1<f.indexOf("date");g&&(c.timeOptions=c.timeOptions||r,c.timeOptions&&(c.timeOptions=p.mixin({},c.timeOptions),c.timeOptions.selector=c.timeOptions.selector||"time",e.push(c.timeOptions)));f&&(c.dateOptions=c.dateOptions||k,c.dateOptions&&(c.dateOptions=p.mixin({},c.dateOptions),c.dateOptions.selector=c.dateOptions.selector||"date",e.push(c.dateOptions)));
e&&e.length?(e=e.map(function(c){return b.format(a,c)}),c=1==e.length?e[0]:l["dateTimeFormat-medium"].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(a,b){return e[b]})):c=b.format(a);return c},createColorStops:function(a){var b=a.values,e=a.colors,g=a.labelIndexes,k=a.isDate,d=a.dateFormatOptions;a=[];return a=b.map(function(a,l){var m=null;if(!g||-1<g.indexOf(l)){var n;(n=k?c.formatDate(a,d):f.format(a))&&(m=h(n,l,b.length-1))}return{value:a,color:e[l],label:m}})},updateColorStops:function(a){var b=
a.stops,e=a.changes,g=a.isDate,k=a.dateFormatOptions,d=[],l,m=b.map(function(a){return a.value});e.forEach(function(a){d.push(a.index);m[a.index]=a.value});l=f.round(m,{indexes:d});b.forEach(function(a,d){a.value=m[d];if(null!=a.label){var e,n=null;(e=g?c.formatDate(l[d],k):f.format(l[d]))&&(n=h(e,d,b.length-1));a.label=n}})},createClassBreakLabel:function(a){var b=a.minValue,c=a.maxValue,e=a.isFirstBreak?"":q.gt+" ";a="percent-of-total"===a.normalizationType?q.pct:"";b=null==b?"":f.format(b);c=null==
c?"":f.format(c);return e+b+a+" "+q.ld+" "+c+a},setLabelsForClassBreaks:function(a){var b=a.classBreakInfos,e=a.classificationMethod,g=a.normalizationType,h=[];b&&b.length&&("standard-deviation"===e?console.log("setLabelsForClassBreaks: cannot set labels for class breaks generated using 'standard-deviation' method."):a.round?(h.push(b[0].minValue),b.forEach(function(a){h.push(a.maxValue)}),h=f.round(h),b.forEach(function(a,b){a.label=c.createClassBreakLabel({minValue:0===b?h[0]:h[b],maxValue:h[b+
1],isFirstBreak:0===b,normalizationType:g})})):b.forEach(function(a,b){a.label=c.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===b,normalizationType:g})}))},updateClassBreak:function(a){var b=a.classBreaks,e=a.normalizationType,f=a.change,g=f.index,f=f.value,d=-1,h=-1,k=b.length;"standard-deviation"===a.classificationMethod?console.log("updateClassBreak: cannot update labels for class breaks generated using 'standard-deviation' method."):(0===g?d=g:g===k?h=g-1:(h=g-
1,d=g),-1<d&&d<k&&(a=b[d],a.minValue=f,a.label=c.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===d,normalizationType:e})),-1<h&&h<k&&(a=b[h],a.maxValue=f,a.label=c.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===h,normalizationType:e})))},calculateDateFormatInterval:function(a){var b,c,f=a.length,g,d,h,k,l,m,p=Infinity,q;a=a.map(function(a){return new Date(a)});for(b=0;b<f-1;b++){g=a[b];h=[];l=Infinity;m="";for(c=b+1;c<f;c++)d=a[c],d=
g.getFullYear()!==d.getFullYear()&&"year"||g.getMonth()!==d.getMonth()&&"month"||g.getDate()!==d.getDate()&&"day"||g.getHours()!==d.getHours()&&"hour"||g.getMinutes()!==d.getMinutes()&&"minute"||g.getSeconds()!==d.getSeconds()&&"second"||"millisecond",k=e[d],k<l&&(l=k,m=d),h.push(d);l<p&&(p=l,q=m)}return q},createUniqueValueLabel:function(b){var e=b.value,g=b.fieldInfo,h=b.domain;b=b.dateFormatInterval;var k=String(e);(h=h&&h.codedValues?h.getName(e):null)?k=h:"number"===typeof e&&(k=g&&"date"===
g.type?c.formatDate(e,b&&a[b]):f.format(e));return k},cloneColorVariable:function(a){var b;a&&(b=p.mixin({},a),b.colors=m(b.colors),b.stops=b.stops&&b.stops.map(function(a){a=p.mixin({},a);a.color&&(a.color=new g(a.color));return a}),b.legendOptions&&(b.legendOptions=p.mixin({},b.legendOptions)));return b},cloneOpacityVariable:function(a){var b;if(a){b=p.mixin({},a);if(a=b.opacityValues)b.opacityValues=a.slice(0);if(a=b.stops)b.stops=a.map(function(a){return p.mixin({},a)});if(a=b.legendOptions)b.legendOptions=
p.mixin({},a)}return b},cloneSizeVariable:function(a){var b;a&&(b=p.mixin({},a),b.stops&&(b.stops=b.stops.map(function(a){return p.mixin({},a)})),(a=b.minSize)&&"object"===typeof a&&(b.minSize=c.cloneSizeVariable(a)),(a=b.maxSize)&&"object"===typeof a&&(b.maxSize=c.cloneSizeVariable(a)),a=b.legendOptions)&&(b.legendOptions=p.mixin({},a),a=a.customValues)&&(b.legendOptions.customValues=a.slice(0));return b}});return c})},"esri/core/numberUtils":function(){define(["dojo/number","dojo/i18n!dojo/cldr/nls/number"],
function(b,g){function p(b,f){return b-f}var f=/^-?(\d+)(\.(\d+))?$/i,l=new RegExp("\\"+g.decimal+"0+$","g"),m=/(\d)0*$/g,h={numDigits:function(b){var c=String(b),e=c.match(f);b={integer:0,fractional:0};e&&e[1]?(b.integer=e[1].split("").length,b.fractional=e[3]?e[3].split("").length:0):-1<c.toLowerCase().indexOf("e")&&(e=c.split("e"),c=e[0],e=e[1],c&&e&&(c=Number(c),e=Number(e),(b=0<e)||(e=Math.abs(e)),c=h.numDigits(c),b?(c.integer+=e,c.fractional=e>c.fractional?0:c.fractional-e):(c.fractional+=e,
c.integer=e>c.integer?1:c.integer-e),b=c));return b},percentChange:function(b,f,e,a){var c={previous:null,next:null},g;null!=e&&(g=b-e,c.previous=Math.floor(Math.abs(100*(f-e-g)/g)));null!=a&&(g=a-b,c.next=Math.floor(Math.abs(100*(a-f-g)/g)));return c},round:function(b,f){b=b.slice(0);var c,a,g,l,m,q,v,w,t=f&&null!=f.tolerance?f.tolerance:2,d=f&&f.indexes,n=f&&null!=f.strictBounds?f.strictBounds:!1;if(d)d.sort(p);else for(d=[],m=0;m<b.length;m++)d.push(m);for(m=0;m<d.length;m++)if(w=d[m],f=b[w],c=
0===w?null:b[w-1],a=w===b.length-1?null:b[w+1],g=h.numDigits(f),g=g.fractional){q=0;for(v=!1;q<=g&&!v;){l=f;v=q;var x=void 0,y=void 0,x=Number(l.toFixed(v));x<l?y=x+1/Math.pow(10,v):(y=x,x-=1/Math.pow(10,v));x=Number(x.toFixed(v));y=Number(y.toFixed(v));l=[x,y];l=n&&0===m?l[1]:l[0];v=t;var x=h.percentChange(f,l,c,a),A=y=void 0,y=void 0,y=null==x.previous||x.previous<=v,A=null==x.next||x.next<=v;v=y=y&&A||x.previous+x.next<=2*v;q++}v&&(b[w]=l)}return b},format:function(c,f){f=f||{places:20,round:-1};
(c=b.format(c,f))&&(c=c.replace(m,"$1").replace(l,""));return c}};return h})},"esri/renderers/support/AuthoringInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators ./AuthoringInfoVisualVariable".split(" "),function(b,g,p,f,l,m,h,c,q){var e=m({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",
esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),a=m({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size"});return function(b){function g(a){a=b.call(this)||this;a.lengthUnit=null;a.visualVariables=null;return a}p(g,b);k=g;Object.defineProperty(g.prototype,"classificationMethod",{get:function(){var a=this._get("classificationMethod"),b=this.type;return b&&"relationship"!==b?"class-breaks-size"===b||"class-breaks-color"===
b?a||"manual":null:a},set:function(a){this._set("classificationMethod",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"fields",{get:function(){return this.type&&"predominance"!==this.type?null:this._get("fields")},set:function(a){this._set("fields",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"field1",{get:function(){return this.type&&"relationship"!==this.type?null:this._get("field1")},set:function(a){this._set("field1",a)},enumerable:!0,configurable:!0});
Object.defineProperty(g.prototype,"field2",{get:function(){return this.type&&"relationship"!==this.type?null:this._get("field2")},set:function(a){this._set("field2",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"focus",{get:function(){return this.type&&"relationship"!==this.type?null:this._get("focus")},set:function(a){this._set("focus",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"numClasses",{get:function(){return this.type&&"relationship"!==this.type?
null:this._get("numClasses")},set:function(a){this._set("numClasses",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"standardDeviationInterval",{get:function(){var a=this.type;return a&&"relationship"!==a&&"class-breaks-size"!==a&&"class-breaks-color"!==a?null:this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")},set:function(a){this._set("standardDeviationInterval",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,
"type",{get:function(){return this._get("type")},set:function(a){var b=a;"classed-size"===a?b="class-breaks-size":"classed-color"===a&&(b="class-breaks-color");this._set("type",b)},enumerable:!0,configurable:!0});g.prototype.clone=function(){return new k({classificationMethod:this.classificationMethod,fields:this.fields&&this.fields.slice(0),field1:h.clone(this.field1),field2:h.clone(this.field2),focus:this.focus,numClasses:this.numClasses,lengthUnit:this.lengthUnit,standardDeviationInterval:this.standardDeviationInterval,
type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(function(a){return a.clone()})})};var k;f([c.property({type:String,value:null,dependsOn:["type"],json:{read:e.read,write:e.write}})],g.prototype,"classificationMethod",null);f([c.property({type:[String],value:null,dependsOn:["type"],json:{write:!0}})],g.prototype,"fields",null);f([c.property({value:null,dependsOn:["type"],json:{write:!0}})],g.prototype,"field1",null);f([c.property({value:null,dependsOn:["type"],json:{write:!0}})],
g.prototype,"field2",null);f([c.property({type:String,value:null,dependsOn:["type"],json:{write:!0}})],g.prototype,"focus",null);f([c.property({type:Number,value:null,dependsOn:["type"],json:{write:!0}})],g.prototype,"numClasses",null);f([c.property({type:String,json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],g.prototype,"lengthUnit",void 0);f([c.property({type:Number,value:null,dependsOn:["classificationMethod","type"],json:{write:!0}})],g.prototype,"standardDeviationInterval",
null);f([c.property({type:String,value:null,json:{read:a.read,write:a.write}})],g.prototype,"type",null);f([c.property({type:[q],json:{write:!0}})],g.prototype,"visualVariables",void 0);return g=k=f([c.subclass("esri.renderers.support.AuthoringInfo")],g)}(c.declared(l))})},"esri/renderers/support/AuthoringInfoVisualVariable":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../core/accessorSupport/decorators/cast".split(" "),
function(b,g,p,f,l,m,h,c){var q=m({percentTotal:"percent-of-total"}),e=m({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity"}),a={key:function(a){return"number"===typeof a?"number":"string"},typeMap:{number:Number,string:String},base:null};return function(b){function g(a){a=b.call(this)||this;a.endTime=null;a.field=null;a.maxSliderValue=null;a.minSliderValue=null;a.startTime=null;a.type=null;a.units=null;return a}p(g,b);k=g;g.prototype.castEndTime=function(a){return"string"===typeof a||
"number"===typeof a?a:null};g.prototype.castStartTime=function(a){return"string"===typeof a||"number"===typeof a?a:null};Object.defineProperty(g.prototype,"style",{get:function(){return"color"===this.type?this._get("style"):null},set:function(a){this._set("style",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"theme",{get:function(){return"color"===this.type?this._get("theme")||"high-to-low":null},set:function(a){this._set("theme",a)},enumerable:!0,configurable:!0});g.prototype.clone=
function(){return new k({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})};var k;f([h.property({types:a,json:{write:!0}})],g.prototype,"endTime",void 0);f([c.cast("endTime")],g.prototype,"castEndTime",null);f([h.property({type:String,json:{write:!0}})],g.prototype,"field",void 0);f([h.property({type:Number,json:{write:!0}})],g.prototype,"maxSliderValue",
void 0);f([h.property({type:Number,json:{write:!0}})],g.prototype,"minSliderValue",void 0);f([h.property({types:a,json:{write:!0}})],g.prototype,"startTime",void 0);f([c.cast("startTime")],g.prototype,"castStartTime",null);f([h.property({type:String,value:null,dependsOn:["type"],json:{read:q.read,write:q.write}})],g.prototype,"style",null);f([h.property({type:String,value:null,dependsOn:["type"],json:{write:!0}})],g.prototype,"theme",null);f([h.property({type:String,json:{read:e.read,write:e.write}})],
g.prototype,"type",void 0);f([h.property({type:String,json:{write:!0}})],g.prototype,"units",void 0);return g=k=f([h.subclass("esri.renderers.support.AuthoringInfoVisualVariable")],g)}(h.declared(l))})},"esri/renderers/support/LegendOptions":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});b=
function(b){function c(){var c=null!==b&&b.apply(this,arguments)||this;c.title=null;return c}p(c,b);g=c;c.prototype.clone=function(){return new g({title:this.title})};var g;f([m.property({type:String,json:{write:!0}})],c.prototype,"title",void 0);return c=g=f([m.subclass("esri.renderers.support.LegendOptions")],c)}(m.declared(l));g.LegendOptions=b;g.default=b})},"esri/renderers/support/ClassBreakInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),
function(b,g,p,f,l,m,h,c){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.description=null;a.label=null;a.minValue=null;a.maxValue=0;a.symbol=null;return a}p(e,b);a=e;e.prototype.clone=function(){return new a({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})};var a;f([m.property({type:String,json:{write:!0}})],e.prototype,"description",
void 0);f([m.property({type:String,json:{write:!0}})],e.prototype,"label",void 0);f([m.property({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],e.prototype,"minValue",void 0);f([m.property({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],e.prototype,"maxValue",void 0);f([m.property({types:c.rendererTypes,json:{origins:{"web-scene":{read:h.read,write:{target:{symbol:{types:c.rendererTypes3D}},writer:h.writeTarget}}},read:h.read,
write:h.writeTarget}})],e.prototype,"symbol",void 0);return e=a=f([m.subclass("esri.renderers.support.ClassBreakInfo")],e)}(m.declared(l));g.ClassBreakInfo=b;g.default=b})},"esri/renderers/HeatmapRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../Color ../core/lang ../core/accessorSupport/decorators ./Renderer ./support/HeatmapColorStop".split(" "),function(b,g,p,f,l,m,h,c,q){return function(b){function a(a){a=b.call(this)||this;
a.blurRadius=10;a.colorStops=[new q.HeatmapColorStop({ratio:0,color:new l("rgba(255, 140, 0, 0)")}),new q.HeatmapColorStop({ratio:.75,color:new l("rgba(255, 140, 0, 1)")}),new q.HeatmapColorStop({ratio:.9,color:new l("rgba(255, 0,   0, 1)")})];a.field=null;a.fieldOffset=0;a.maxPixelIntensity=100;a.minPixelIntensity=0;a.type="heatmap";return a}p(a,b);c=a;a.prototype.clone=function(){return new c({blurRadius:this.blurRadius,colorStops:m.clone(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,
minPixelIntensity:this.minPixelIntensity})};var c;f([h.property({type:Number,json:{write:!0}})],a.prototype,"blurRadius",void 0);f([h.property({type:[q.HeatmapColorStop],json:{write:!0}})],a.prototype,"colorStops",void 0);f([h.property({type:String,json:{write:!0}})],a.prototype,"field",void 0);f([h.property({type:Number,json:{write:{overridePolicy:function(a,b,c){return{enabled:null==c}}}}})],a.prototype,"fieldOffset",void 0);f([h.property({type:Number,json:{write:!0}})],a.prototype,"maxPixelIntensity",
void 0);f([h.property({type:Number,json:{write:!0}})],a.prototype,"minPixelIntensity",void 0);f([h.property({dependsOn:["field"],readOnly:!0})],a.prototype,"requiredFields",void 0);return a=c=f([h.subclass("esri.renderers.HeatmapRenderer")],a)}(h.declared(c))})},"esri/renderers/support/HeatmapColorStop":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(a){a=b.call(this)||this;a.color=null;a.ratio=null;return a}p(c,b);e=c;c.prototype.clone=function(){return new e({color:this.color,ratio:this.ratio})};var e;f([h.property({type:l,json:{write:!0}})],c.prototype,"color",void 0);f([h.property({type:Number,json:{write:!0}})],c.prototype,"ratio",void 0);return c=e=f([h.subclass("esri.renderers.support.HeatmapColorStop")],c)}(h.declared(m));g.HeatmapColorStop=
b;g.default=b})},"esri/renderers/SimpleRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Renderer ../symbols/support/jsonUtils ../symbols/support/typeUtils".split(" "),function(b,g,p,f,l,m,h,c,q){return function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.description=null;a.label=null;a.symbol=null;a.type="simple";return a}p(a,b);e=a;a.prototype.writeSymbolWebScene=
function(a,b,e,f){c.writeTarget(a,b,e,f)};a.prototype.writeSymbol=function(a,b,e,f){c.writeTarget(a,b,e,f)};a.prototype.readSymbol=function(a,b,e){return c.read(a,b,e)};a.prototype.getSymbol=function(a,b){return this.symbol};a.prototype.getSymbols=function(){return this.symbol?[this.symbol]:[]};a.prototype.clone=function(){return new e({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:l.clone(this.visualVariables),authoringInfo:this.authoringInfo&&
this.authoringInfo.clone()})};var e;f([m.property({type:String,json:{write:!0}})],a.prototype,"description",void 0);f([m.property({type:String,json:{write:!0}})],a.prototype,"label",void 0);f([m.property({types:q.rendererTypes})],a.prototype,"symbol",void 0);f([m.writer("web-scene","symbol",{symbol:{types:q.rendererTypes3D}})],a.prototype,"writeSymbolWebScene",null);f([m.writer("symbol")],a.prototype,"writeSymbol",null);f([m.reader("symbol")],a.prototype,"readSymbol",null);return a=e=f([m.subclass("esri.renderers.SimpleRenderer")],
a)}(m.declared(h))})},"esri/renderers/UniqueValueRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../symbols ../core/arrayUtils ../core/Error ../core/lang ../core/Logger ../core/urlUtils ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ../portal/Portal ./Renderer ./support/diffUtils ./support/LegendOptions ./support/UniqueValueInfo ../support/arcadeUtils ../symbols/support/jsonUtils ../symbols/support/styleUtils ../symbols/support/typeUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n,x,y){var A=e.getLogger("esri.renderers.UniqueValueRenderer"),D=r.ensureType(t.default);return function(b){function e(a){a=b.call(this)||this;a._valueInfoMap={};a._isDefaultSymbolDerived=!1;a.type="unique-value";a.backgroundFillSymbol=null;a.field=null;a.field2=null;a.field3=null;a.valueExpression=null;a.valueExpressionTitle=null;a.legendOptions=null;a.defaultLabel=null;a.fieldDelimiter=null;a.portal=null;a.styleOrigin=null;a.diff={uniqueValueInfos:function(a,
b){if(a||b){if(!a||!b)return{type:"complete",oldValue:a,newValue:b};for(var c=!1,d={type:"collection",added:[],removed:[],changed:[],unchanged:[]},e=function(e){var f=h.find(a,function(a){return a.value===b[e].value});f?v.diff(f,b[e])?d.changed.push({type:"complete",oldValue:f,newValue:b[e]}):d.unchanged.push({oldValue:f,newValue:b[e]}):d.added.push(b[e]);c=!0},f=0;f<b.length;f++)e(f);e=function(e){h.find(b,function(b){return b.value===a[e].value})||(d.removed.push(a[e]),c=!0)};for(f=0;f<a.length;f++)e(f);
return c?d:void 0}}};a._set("uniqueValueInfos",[]);return a}p(e,b);g=e;e.prototype.writeType=function(a,b,c,d){b.type="uniqueValue"};e.prototype.writeBackgroundFillSymbolWebScene=function(a,b,c,d){n.writeTarget(a,b,c,d)};e.prototype.castField=function(a){return null==a?a:"function"===typeof a?a:r.ensureString(a)};e.prototype.writeField=function(a,b,d,e){"string"===typeof a?b[d]=a:e&&e.messages?e.messages.push(new c("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):
A.error(".field: cannot write field to JSON since it's not a string value")};Object.defineProperty(e.prototype,"compiledFunc",{get:function(){return d.createFunction(this.valueExpression)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"defaultSymbol",{set:function(a){this._isDefaultSymbolDerived=!1;this._set("defaultSymbol",a)},enumerable:!0,configurable:!0});e.prototype.readDefaultSymbol=function(a,b,c){return n.read(a,b,c)};e.prototype.writeDefaultSymbolWebScene=function(a,b,
c,d){this._isDefaultSymbolDerived||n.writeTarget(a,b,c,d)};e.prototype.writeDefaultSymbol=function(a,b,c,d){this._isDefaultSymbolDerived||n.writeTarget(a,b,c,d)};e.prototype.readPortal=function(a,b,c){return c.portal||u.getDefault()};e.prototype.readStyleOrigin=function(b,c,d){if(c.styleName)return Object.freeze({styleName:c.styleName});if(c.styleUrl)return b=a.read(c.styleUrl,d),Object.freeze({styleUrl:b})};e.prototype.writeStyleOrigin=function(b,c,d,e){b.styleName?c.styleName=b.styleName:b.styleUrl&&
(c.styleUrl=a.write(b.styleUrl,e),a.isAbsolute(c.styleUrl)&&(c.styleUrl=a.normalize(c.styleUrl)))};Object.defineProperty(e.prototype,"uniqueValueInfos",{set:function(a){this.styleOrigin?A.error("#uniqueValueInfos\x3d","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",a),this._updateValueInfoMap())},enumerable:!0,configurable:!0});e.prototype.addUniqueValueInfo=function(a,b){this.styleOrigin?A.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):
(a="object"===typeof a?D(a):new t.default({value:a,symbol:b}),this.uniqueValueInfos.push(a),this._valueInfoMap[a.value]=a)};e.prototype.removeUniqueValueInfo=function(a){if(this.styleOrigin)A.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");else for(var b=0;b<this.uniqueValueInfos.length;b++)if(this.uniqueValueInfos[b].value===a+""){delete this._valueInfoMap[a];this.uniqueValueInfos.splice(b,1);break}};e.prototype.getUniqueValueInfo=
function(a,b){var c=this.field,e=a.attributes,f;this.valueExpression?f=d.executeFunction(this.compiledFunc,d.createExecContext(a,d.getViewInfo(b))):"function"!==typeof c&&this.field2?(a=this.field2,b=this.field3,f=[],c&&f.push(e[c]),a&&f.push(e[a]),b&&f.push(e[b]),f=f.join(this.fieldDelimiter||"")):"function"===typeof c?f=c(a):c&&(f=e[c]);return this._valueInfoMap[f+""]};e.prototype.getSymbol=function(a,b){return(a=this.getUniqueValueInfo(a,b))&&a.symbol||this.defaultSymbol};e.prototype.getSymbols=
function(){for(var a=[],b=0,c=this.uniqueValueInfos;b<c.length;b++){var d=c[b];d.symbol&&a.push(d.symbol)}this.defaultSymbol&&a.push(this.defaultSymbol);return a};e.prototype.clone=function(){var a=new g({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:q.clone(this.defaultSymbol),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:q.clone(this.visualVariables),legendOptions:q.clone(this.legendOptions),
authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:q.clone(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(a._isDefaultSymbolDerived=!0);a._set("portal",this.portal);var b=q.clone(this.uniqueValueInfos);this.styleOrigin&&(a._set("styleOrigin",Object.freeze(q.clone(this.styleOrigin))),Object.freeze(b));a._set("uniqueValueInfos",b);a._updateValueInfoMap();return a};e.prototype.collectRequiredFields=function(a){this.inherited(arguments);[this.field,this.field2,
this.field3].forEach(function(b){b&&"string"===typeof b&&(a[b]=!0)});this.valueExpression&&d.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})};e.prototype.populateFromStyle=function(){var a=this;return x.fetchStyle(this.styleOrigin,{portal:this.portal}).then(function(b){var c=[];a._valueInfoMap={};b&&b.data&&Array.isArray(b.data.items)&&b.data.items.forEach(function(d){var e=new m.WebStyleSymbol({styleUrl:b.styleUrl,styleName:b.styleName,portal:a.portal,name:d.name});a.defaultSymbol||
d.name!==b.data.defaultItem||(a.defaultSymbol=e,a._isDefaultSymbolDerived=!0);e=new t.default({value:d.name,symbol:e});c.push(e);a._valueInfoMap[d.name]=e});a._set("uniqueValueInfos",Object.freeze(c));!a.defaultSymbol&&a.uniqueValueInfos.length&&(a.defaultSymbol=a.uniqueValueInfos[0].symbol,a._isDefaultSymbolDerived=!0);return a})};e.prototype._updateValueInfoMap=function(){var a=this;this._valueInfoMap={};this.uniqueValueInfos.forEach(function(b){return a._valueInfoMap[b.value+""]=b})};e.fromPortalStyle=
function(a,b){var c=new g(b&&b.properties);c._set("styleOrigin",Object.freeze({styleName:a}));c._set("portal",b&&b.portal||u.getDefault());b=c.populateFromStyle();b.catch(function(b){A.error("#fromPortalStyle('"+a+"'[, ...])","Failed to create unique value renderer from style name",b)});return b};e.fromStyleUrl=function(a,b){b=new g(b&&b.properties);b._set("styleOrigin",Object.freeze({styleUrl:a}));b=b.populateFromStyle();b.catch(function(b){A.error("#fromStyleUrl('"+a+"'[, ...])","Failed to create unique value renderer from style URL",
b)});return b};var g;f([k.property()],e.prototype,"type",void 0);f([k.writer("type")],e.prototype,"writeType",null);f([k.property({types:{base:m.BaseSymbol,key:"type",typeMap:{"simple-fill":y.rendererTypes.typeMap["simple-fill"],"picture-fill":y.rendererTypes.typeMap["picture-fill"],"polygon-3d":y.rendererTypes.typeMap["polygon-3d"]}},json:{read:n.read,write:n.writeTarget}})],e.prototype,"backgroundFillSymbol",void 0);f([k.writer("web-scene","backgroundFillSymbol",{backgroundFillSymbol:{type:m.PolygonSymbol3D}})],
e.prototype,"writeBackgroundFillSymbolWebScene",null);f([k.property({json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],e.prototype,"field",void 0);f([k.cast("field")],e.prototype,"castField",null);f([k.writer("field")],e.prototype,"writeField",null);f([k.property({type:String,json:{write:!0}})],e.prototype,"field2",void 0);f([k.property({type:String,json:{write:!0}})],e.prototype,"field3",void 0);f([k.property({type:String,json:{write:!0}})],e.prototype,"valueExpression",void 0);
f([k.property({type:String,json:{write:!0}})],e.prototype,"valueExpressionTitle",void 0);f([k.property({dependsOn:["valueExpression"]})],e.prototype,"compiledFunc",null);f([k.property({type:w.default,json:{write:!0}})],e.prototype,"legendOptions",void 0);f([k.property({type:String,json:{write:!0}})],e.prototype,"defaultLabel",void 0);f([k.property({types:y.rendererTypes})],e.prototype,"defaultSymbol",null);f([k.reader("defaultSymbol")],e.prototype,"readDefaultSymbol",null);f([k.writer("web-scene",
"defaultSymbol",{defaultSymbol:{types:y.rendererTypes3D}})],e.prototype,"writeDefaultSymbolWebScene",null);f([k.writer("defaultSymbol")],e.prototype,"writeDefaultSymbol",null);f([k.property({type:String,json:{write:!0}})],e.prototype,"fieldDelimiter",void 0);f([k.property({type:u,readOnly:!0})],e.prototype,"portal",void 0);f([k.reader("portal",["styleName"])],e.prototype,"readPortal",null);f([k.property({readOnly:!0})],e.prototype,"styleOrigin",void 0);f([k.reader("styleOrigin",["styleName","styleUrl"])],
e.prototype,"readStyleOrigin",null);f([k.writer("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],e.prototype,"writeStyleOrigin",null);f([k.property({type:[t.default],json:{write:{overridePolicy:function(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],e.prototype,"uniqueValueInfos",null);f([k.property({dependsOn:["field","field2","field3","valueExpression"],readOnly:!0})],e.prototype,"requiredFields",void 0);f([l(1,k.cast(y.ensureType))],e.prototype,"addUniqueValueInfo",null);
return e=g=f([k.subclass("esri.renderers.UniqueValueRenderer")],e)}(k.declared(z))})},"esri/core/arrayUtils":function(){define(["require","exports"],function(b,g){function p(a,b,c){for(var e=a.length,f=0;f<e;f++)if(b.call(c,a[f],f,a))return f;return-1}function f(a,b,c,f){void 0===c&&(c=a.length);f=f||e;for(var g=Math.max(0,f.last-10),h=-1,k=g;k<c;++k)if(a[k]===b){h=k;break}if(-1===h){for(k=0;k<g;++k)if(a[k]===b){h=k;break}if(-1===h)return}a[h]=a[c-1];a.pop();f.last=h;return b}function l(a,b,c,e){void 0===
c&&(c=a.length);var g=[];b.forEach(function(b){void 0!==f(a,b,c,e)&&(g.push(b),--c)});return g}function m(a,b){return-1===a.indexOf(b)}function h(a,b,c){return!a.some(b.bind(null,c))}function c(a){return a}Object.defineProperty(g,"__esModule",{value:!0});g.findIndex=p;g.find=function(a,b,c){for(var e=a.length,f=0;f<e;f++){var g=a[f];if(b.call(c,g,f,a))return g}};g.unique=function(a){return a.filter(function(a,b,c){return c.indexOf(a)===b})};g.equals=function(a,b,c){if(!a&&!b)return!0;if(!a||!b||a.length!==
b.length)return!1;if(c)for(var e=0;e<a.length;e++){if(!c(a[e],b[e]))return!1}else for(e=0;e<a.length;e++)if(a[e]!==b[e])return!1;return!0};g.difference=function(a,b,c){var e;c?(e=b.filter(h.bind(null,a,c)),a=a.filter(h.bind(null,b,c))):(e=b.filter(m.bind(null,a)),a=a.filter(m.bind(null,b)));return{added:e,removed:a}};g.intersect=function(a,b,c){return a&&b?c?a.filter(function(a){return-1<p(b,function(b){return c(a,b)})}):a.filter(function(a){return-1<b.indexOf(a)}):[]};g.constant=function(a,b){for(var c=
Array(a),e=0;e<a;e++)c[e]=b;return c};g.range=function(a,b){void 0===b&&(b=a,a=0);for(var c=Array(b-a),e=a;e<b;e++)c[e-a]=e;return c};g.binaryIndexOf=function(a,b,c){for(var e=a.length,f=0,g=e-1;f<g;){var h=f+Math.floor((g-f)/2);b>a[h]?f=h+1:g=h}g=a[f];return c?b>=a[e-1]?-1:g===b?f:f-1:g===b?f:-1};var q=function(){return function(){this.last=0}}();g.RemoveHint=q;var e=new q;b=function(){return function(a){var b=this;this._array=a;this._hint=new q;this.remove=function(a){return f(b._array,a,b._array.length,
b._hint)};this.removeMany=function(a){return l(b._array,a,b._array.length,b._hint)}}}();g.UnorderedRemover=b;g.removeUnordered=f;g.removeUnorderedMany=l;g.keysOfMap=function(a){var b=[];a.forEach(function(a,c){return b.push(c)});return b};g.keysOfSet=function(a,b){void 0===b&&(b=c);var e=[];a.forEach(function(a){return e.push(b(a))});return e}})},"esri/renderers/support/diffUtils":function(){define(["require","exports","../../core/Accessor","../../core/Collection","../../core/accessorSupport/utils"],
function(b,g,p,f,l){function m(a){return a instanceof f?Object.keys(a.items):a instanceof p?l.getProperties(a).keys():a?Object.keys(a):[]}function h(a,b){return a instanceof f?a.items[b]:a[b]}function c(a,b){return Array.isArray(a)&&Array.isArray(b)?a.length!==b.length:!1}function q(a){return a?a.declaredClass:null}function e(b,f){var g=b.diff;if(g&&"function"===typeof g)return g(b,f);var k=m(b),l=m(f);if(0!==k.length||0!==l.length){if(!k.length||!l.length||c(b,f))return{type:"complete",oldValue:b,
newValue:f};var r=l.filter(function(a){return-1===k.indexOf(a)}),t=k.filter(function(a){return-1===l.indexOf(a)}),r=k.filter(function(a){return-1<l.indexOf(a)&&h(b,a)!==h(f,a)}).concat(r,t).sort();if((t=q(b))&&-1<a.indexOf(t)&&r.length)return{type:"complete",oldValue:b,newValue:f};var d,t=b instanceof p&&f instanceof p,n;for(n in r){var x=r[n],y=h(b,x),A=h(f,x),D=void 0;(t||"function"!==typeof y&&"function"!==typeof A)&&y!==A&&(null!=y||null!=A)&&(D=g&&g[x]&&"function"===typeof g[x]?g[x](y,A):"object"===
typeof y&&"object"===typeof A&&q(y)===q(A)?e(y,A):{type:"complete",oldValue:y,newValue:A})&&(d=d||{type:"partial",diff:{}},d.diff[x]=D)}return d}}Object.defineProperty(g,"__esModule",{value:!0});var a=["esri.Color","esri.portal.Portal"];g.diff=function(a,b){if("function"!==typeof a&&"function"!==typeof b&&(a||b))return!a||!b||"object"===typeof a&&"object"===typeof b&&q(a)!==q(b)?{type:"complete",oldValue:a,newValue:b}:e(a,b)}})},"esri/renderers/support/UniqueValueInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),
function(b,g,p,f,l,m,h,c){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.description=null;a.label=null;a.symbol=null;a.value=null;return a}p(e,b);a=e;e.prototype.clone=function(){return new a({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})};var a;f([m.property({type:String,json:{write:!0}})],e.prototype,"description",void 0);f([m.property({type:String,json:{write:!0}})],
e.prototype,"label",void 0);f([m.property({types:c.rendererTypes,json:{origins:{"web-scene":{read:h.read,write:{target:{symbol:{types:c.rendererTypes3D}},writer:h.writeTarget}}},read:h.read,write:h.writeTarget}})],e.prototype,"symbol",void 0);f([m.property({type:String,json:{write:!0}})],e.prototype,"value",void 0);return e=a=f([m.subclass("esri.renderers.support.UniqueValueInfo")],e)}(m.declared(l));g.UniqueValueInfo=b;g.default=b})},"esri/symbols/support/styleUtils":function(){define("require exports ../../request ../../symbols ../../core/Error ../../core/promiseUtils ../../core/urlUtils ../../portal/Portal ../../portal/PortalQueryParams ./jsonUtils ./StyleOrigin ./Thumbnail".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k){function r(a,b){return t(a).then(function(b){return{data:b.data,baseUrl:h.removeFile(a),styleUrl:a}})}function u(a,b){b=b.portal||c.getDefault();var e,f=b.url+" - "+(b.user&&b.user.username)+" - "+a;d[f]||(d[f]=z(a,b).then(function(a){e=a;return a.fetchData()}).then(function(b){return{data:b,baseUrl:e.itemUrl,styleName:a}}));return d[f]}function z(a,b){return b.load().then(function(){var c=new q({disableExtraQuery:!0,query:"owner:"+n+" AND type:"+x+' AND typekeywords:"'+
a+'"'});return b.queryItems(c)}).then(function(b){b=b.results;var c=null,d=a.toLowerCase();if(b&&Array.isArray(b))for(var e=0;e<b.length;e++){var f=b[e];if(f.typeKeywords.some(function(a){return a.toLowerCase()===d})&&f.type===x&&f.owner===n){c=f;break}}if(c)return c.load();throw new l("symbolstyleutils:style-not-found","The style '"+a+"' could not be found",{styleName:a});})}function v(a,b){return a.styleUrl?r(a.styleUrl,b):a.styleName?u(a.styleName,b):m.reject(new l("symbolstyleutils:style-url-and-name-missing",
"Either styleUrl or styleName is required to resolve a style"))}function w(b,c,d){for(var g=b.data,n={portal:d.portal,url:h.urlToObject(b.baseUrl),origin:"portal-item"},p=function(g){if(g.name!==c)return"continue";var l=h.read(g.webRef,n),m={portal:d.portal,url:h.urlToObject(h.removeFile(l)),origin:"portal-item"};return{value:t(l).then(function(l){if((l=e.fromJSON(l.data,m))&&l.isInstanceOf(f.BaseSymbol3D)){if(g.thumbnail)if(g.thumbnail.href){var p=h.read(g.thumbnail.href,n);l.thumbnail=new k.default({url:p})}else g.thumbnail.imageData&&
(l.thumbnail=new k.default({url:"data:image/png;base64,"+g.thumbnail.imageData}));b.styleUrl?l.styleOrigin=new a({portal:d.portal,styleUrl:b.styleUrl,name:c}):b.styleName&&(l.styleOrigin=new a({portal:d.portal,styleName:b.styleName,name:c}))}return l})}},q=0,g=g.items;q<g.length;q++){var r=p(g[q]);if("object"===typeof r)return r.value}return m.reject(new l("symbolstyleutils:symbol-name-not-found","The symbol name '"+c+"' could not be found",{symbolName:c}))}function t(a){return p(h.normalize(a),{responseType:"json",
query:{f:"json"}})}Object.defineProperty(g,"__esModule",{value:!0});var d={};g.fetchStyle=v;g.resolveWebStyleSymbol=function(a,b){return a.name?v(a,b).then(function(c){return w(c,a.name,b)}):m.reject(new l("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))};g.fetchSymbolFromStyle=w;g.styleNameFromItem=function(a){var b=0;for(a=a.typeKeywords;b<a.length;b++){var c=a[b];if(/^Esri.*Style$/.test(c)&&"Esri Style"!==c)return c}};var n="esri_en",x="Style"})},
"esri/renderers/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/object ../../core/Warning ../ClassBreaksRenderer ../HeatmapRenderer ../SimpleRenderer ../UniqueValueRenderer".split(" "),function(b,g,p,f,l,m,h,c,q){function e(a,b,c){if(!a)return null;if(a&&(a.styleName||a.styleUrl)&&"uniqueValue"!==a.type)return c&&c.messages&&c.messages.push(new l("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+a.type+"'",{definition:a,
context:c})),null;b=a?k[a.type]||null:null;if(b)return b=new b,b.read(a,c),b;c&&c.messages&&a&&c.messages.push(new l("renderer:unsupported","Renderers of type '"+(a.type||"unknown")+"' are not supported",{definition:a,context:c}));return null}function a(a,b,c){return a?c&&"web-scene"===c.origin&&"heatmap"===a.type?(c.messages&&c.messages.push(new p("renderer:unsupported","Renderer of type '"+a.declaredClass+"' are not supported in scenes.",{renderer:a,context:c})),null):a.write(b,c):null}Object.defineProperty(g,
"__esModule",{value:!0});var k={simple:c,uniqueValue:q,classBreaks:m,heatmap:h};g.read=e;g.writeTarget=function(b,c,e,g){(b=a(b,{},g))&&f.setDeepValue(e,b,c)};g.write=a;g.fromJSON=function(a,b){return e(a,null,b)}})},"esri/layers/support/FeatureIndex":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});
b=function(b){function c(c){return b.call(this,c)||this}p(c,b);g=c;c.prototype.clone=function(){return new g({name:this.name,fields:this.fields,isAscending:this.isAscending,isUnique:this.isUnique,description:this.description})};var g;f([m.property({constructOnly:!0})],c.prototype,"name",void 0);f([m.property({constructOnly:!0})],c.prototype,"fields",void 0);f([m.property({constructOnly:!0})],c.prototype,"isAscending",void 0);f([m.property({constructOnly:!0})],c.prototype,"isUnique",void 0);f([m.property({constructOnly:!0})],
c.prototype,"description",void 0);return c=g=f([m.subclass("esri.layers.support.FeatureIndex")],c)}(m.declared(l));g.FeatureIndex=b;g.default=b})},"esri/layers/support/FeatureProcessing":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/lang ../../core/accessorSupport/decorators ../../layers/support/Field ../../layers/support/fieldUtils".split(" "),function(b,g,p,f,l,m,h,c,q){return function(b){function a(){return null!==
b&&b.apply(this,arguments)||this}p(a,b);e=a;a.fromWorker=function(a){if(!a)return null;a=JSON.parse(a);var b=new e;b.fields=a.fields&&a.fields.map(function(a){return c.fromJSON(a)});b.options=a.options;b.process=new (Function.bind.apply(Function,[void 0].concat(a.process.args,[a.process.body])));return b};Object.defineProperty(a.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0});a.prototype.clone=function(){return new e(m.clone({fields:this.fields,
options:this.options,process:this.process}))};a.prototype.getField=function(a){return q.getField(a,this.fields)};a.prototype.refresh=function(){this.notifyChange("version")};a.prototype.toWorker=function(){var a=this.process.toString();return JSON.stringify({fields:this.fields,options:this.options,process:{body:a.substring(a.indexOf("{")+1,a.lastIndexOf("}")),args:a.slice(a.indexOf("(")+1,a.indexOf(")")).match(/([^\s,]+)/g)}})};var e;f([h.property({type:[c]})],a.prototype,"fields",void 0);f([h.property()],
a.prototype,"options",void 0);f([h.property()],a.prototype,"process",void 0);f([h.property({readOnly:!0,dependsOn:["process","options","fields"]})],a.prototype,"version",null);return a=e=f([h.subclass("esri.layers.support.FeatureProcessing")],a)}(h.declared(l))})},"esri/layers/support/FeatureReduction":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(b,
g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(){var c=null!==b&&b.apply(this,arguments)||this;c.type=null;return c}p(c,b);f([m.property({type:String,readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0);return c=f([m.subclass("esri.layers.support.FeatureReduction")],c)}(m.declared(l));g.FeatureReduction=b;g.default=b})},"esri/layers/support/FeatureReductionSelection":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./FeatureReduction".split(" "),
function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});b=function(b){function c(){var c=null!==b&&b.apply(this,arguments)||this;c.type="selection";return c}p(c,b);f([l.property()],c.prototype,"type",void 0);return c=f([l.subclass("esri.layers.support.FeatureReductionSelection")],c)}(l.declared(m.default));g.FeatureReductionSelection=b;g.default=b})},"esri/layers/support/FeatureTemplate":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h,c){var q=m({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",
esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});return function(b){function a(a){a=b.call(this,a)||this;a.name=null;a.description=null;a.drawingTool=null;a.prototype=null;a.thumbnail=null;return a}p(a,b);a.prototype.writeDrawingTool=function(a,b){b.drawingTool=q.toJSON(a)};a.prototype.writePrototype=function(a,b){b.prototype=h.fixJson(h.clone(a),!0)};a.prototype.writeThumbnail=function(a,b){b.thumbnail=h.fixJson(h.clone(a))};f([c.property({json:{write:!0}})],a.prototype,
"name",void 0);f([c.property({json:{write:!0}})],a.prototype,"description",void 0);f([c.property({json:{read:q.fromJSON,write:!0}})],a.prototype,"drawingTool",void 0);f([c.writer("drawingTool")],a.prototype,"writeDrawingTool",null);f([c.property({json:{write:!0}})],a.prototype,"prototype",void 0);f([c.writer("prototype")],a.prototype,"writePrototype",null);f([c.property({json:{write:!0}})],a.prototype,"thumbnail",void 0);f([c.writer("thumbnail")],a.prototype,"writeThumbnail",null);return a=f([c.subclass("esri.layers.support.FeatureTemplate")],
a)}(c.declared(l))})},"esri/layers/support/FeatureType":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./domains ./FeatureTemplate".split(" "),function(b,g,p,f,l,m,h,c,q){return function(b){function a(a){a=b.call(this,a)||this;a.id=null;a.name=null;a.domains=null;a.templates=null;return a}p(a,b);a.prototype.readDomains=function(a){var b={},e;for(e in a)if(a.hasOwnProperty(e)){var f=
a[e];switch(f.type){case "range":b[e]=c.RangeDomain.fromJSON(f);break;case "codedValue":b[e]=c.CodedValueDomain.fromJSON(f);break;case "inherited":b[e]=c.InheritedDomain.fromJSON(f)}}return b};a.prototype.writeDomains=function(a,b){var c={},e;for(e in a)a.hasOwnProperty(e)&&(c[e]=a[e]&&a[e].toJSON());m.fixJson(c);b.domains=c};a.prototype.readTemplates=function(a){return a&&a.map(function(a){return new q(a)})};a.prototype.writeTemplates=function(a,b){b.templates=a&&a.map(function(a){return a.toJSON()})};
f([h.property({json:{write:!0}})],a.prototype,"id",void 0);f([h.property({json:{write:!0}})],a.prototype,"name",void 0);f([h.property({json:{write:!0}})],a.prototype,"domains",void 0);f([h.reader("domains")],a.prototype,"readDomains",null);f([h.writer("domains")],a.prototype,"writeDomains",null);f([h.property({json:{write:!0}})],a.prototype,"templates",void 0);f([h.reader("templates")],a.prototype,"readTemplates",null);f([h.writer("templates")],a.prototype,"writeTemplates",null);return a=f([h.subclass("esri.layers.support.FeatureType")],
a)}(h.declared(l))})},"esri/layers/support/LabelClass":function(){define("../../core/date ../../core/JSONSupport ../../core/lang ../../core/kebabDictionary dojo/number ./LabelExpressionInfo ./labelUtils ./types ../../support/arcadeUtils ../../arcade/Feature ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k){function r(a){a=(a=q.createSyntaxTree(a))&&a.body&&a.body[0]&&a.body[0].body&&a.body[0].body.body;if(!a||1!==a.length)return null;a="ExpressionStatement"===
a[0].type&&a[0].expression;if(!a||"MemberExpression"!==a.type)return null;var b=a.object;if(!b||"Identifier"!==b.type||"$feature"!==b.name)return null;a=a.property;if(!a)return null;switch(a.type){case "Literal":return a.value;case "Identifier":return a.name}return null}function u(a){return a?"service"===a.origin?!1:!a.layer||!c.isOfType(a.layer,"map-image"):!0}var z=f({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",
esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",
esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",
esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"}),v=new e,w=g.createSubclass({declaredClass:"esri.layers.support.LabelClass",properties:{name:{type:String,value:null,json:{write:!0}},labelExpression:{type:String,value:null,json:{read:function(a,b,c,e){b=b.labelExpressionInfo;if(!b||!b.value&&!b.expression)return a},write:{allowNull:!0,writer:function(a,b,c,e){this.labelExpressionInfo&&u(e)&&(null!=this.labelExpressionInfo.value?a=this._templateStringToSql(this.labelExpressionInfo.value):
null!=this.labelExpressionInfo.expression&&(e=r(this.labelExpressionInfo.expression))&&(a="["+e+"]"));null!=a&&(b[c]=a)}}}},labelExpressionInfo:{value:null,type:m,json:{write:{overridePolicy:function(a,b,c){return u(c)?{allowNull:!0}:{enabled:!1}},writer:function(a,b,c,e){if(null==a&&null!=this.labelExpression&&u(e))a=new m({expression:this.getLabelExpressionArcade()});else if(!a)return;a=a.toJSON(e);a.expression&&(b[c]=a)}}}},labelPlacement:{type:String,value:null,json:{read:function(a,b){return z.fromJSON(a)},
write:function(a,b){if(a=z.toJSON(a))b.labelPlacement=a}}},maxScale:{type:Number,value:0,json:{write:function(a,b){if(a||this.minScale)b.maxScale=a}}},minScale:{type:Number,value:0,json:{write:function(a,b){if(a||this.maxScale)b.minScale=a}}},requiredFields:{readOnly:!0,dependsOn:["labelExpression","labelExpressionInfo","where"],get:function(){var a=Object.create(null);this._collectRequiredFields(a);return Object.keys(a)}},symbol:{value:null,types:k.labelTypes,json:{origins:{"web-scene":{read:a.read,
write:{target:{symbol:{types:k.labelTypes3D}},writer:a.writeTarget}}},read:a.read,write:a.writeTarget}},useCodedValues:{type:Boolean,value:null,json:{write:!0}},where:{type:String,value:null,json:{write:!0}}},getLabelExpression:function(){var a={expression:"",type:"none"};this.labelExpressionInfo?this.labelExpressionInfo.value?(a.expression=this.labelExpressionInfo.value,a.type="conventional"):this.labelExpressionInfo.expression&&(a.expression=this.labelExpressionInfo.expression,a.type="arcade"):
null!=this.labelExpression&&(a.expression=this._sqlToTemplateString(this.labelExpression),a.type="conventional");return a},getLabelExpressionArcade:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return h.convertTemplatedStringToArcade(a.expression);case "arcade":return a.expression}return null},getOptions:function(a){a={spatialReference:a};var b=this.labelExpressionInfo;if(b){var c=b.expression;c&&!b.value&&(a.hasArcadeExpression=!0,a.compiledArcadeFunc=
q.createFunction(c))}return a},getLabelExpressionSingleField:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return(a=a.expression.match(t))&&a[1].trim()||null;case "arcade":return r(a.expression)}return null},clone:function(){return new w({labelExpression:this.labelExpression,labelExpressionInfo:p.clone(this.labelExpressionInfo),labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,symbol:this.symbol.clone(),
where:this.where,useCodedValues:this.useCodedValues})},_collectRequiredFields:function(a){this._collectLabelExpressionRequiredFields(this.getLabelExpression(),a);this._collectWhereRequiredFields(this.where,a)},_sqlToTemplateString:function(a){return a.replace(/\[/g,"{").replace(/\]/g,"}")},_templateStringToSql:function(a){return a.replace(/\{/g,"[").replace(/\}/g,"]")},_collectWhereRequiredFields:function(a,b){null!=a&&(a=a.split(" "),3===a.length&&(b[a[0]]=!0),7===a.length&&(b[a[0]]=!0,b[a[4]]=!0))},
_collectLabelExpressionRequiredFields:function(a,b){"arcade"===a.type?q.extractFieldNames(a.expression).forEach(function(a){b[a]=!0}):(a=a.expression.match(/{[^}]*}/g))&&a.forEach(function(a){b[a.slice(1,-1)]=!0})}});w.evaluateWhere=function(a,b){var c=function(a,b,c){switch(b){case "\x3d":return a==c?!0:!1;case "\x3c\x3e":return a!=c?!0:!1;case "\x3e":return a>c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return a<c?!0:!1;case "\x3c\x3d":return a<=c?!0:!1}return!1};try{if(null==a)return!0;
var d=a.split(" ");if(3===d.length)return c(b[d[0]],d[1],d[2]);if(7===d.length){var e=c(b[d[0]],d[1],d[2]),f=d[3],g=c(b[d[4]],d[5],d[6]);switch(f){case "AND":return e&&g;case "OR":return e||g}}return!1}catch(F){console.log("Error.: can't parse \x3d "+a)}};w.buildLabelText=function(a,b,c,e){var d="";if(e&&e.hasArcadeExpression)e.compiledArcadeFunc&&(v.repurposeFromGraphicLikeObject(b.geometry,b.attributes,{fields:c}),a=q.executeFunction(e.compiledArcadeFunc,{vars:{$feature:v},spatialReference:e.spatialReference}),
null!=a&&(d=a.toString()));else var f=b&&b.attributes||{},d=a.replace(/{[^}]*}/g,function(a){return w.formatField(a.slice(1,-1),a,f,c,e)});return d};w.formatField=function(a,c,e,f,g){var d=a.toLowerCase();for(a=0;a<f.length;a++)if(f[a].name.toLowerCase()===d){c=e[f[a].name];var h=f[a].domain;if(h&&"object"===typeof h){if("codedValue"==h.type)for(e=0;e<h.codedValues.length;e++)h.codedValues[e].code==c&&(c=h.codedValues[e].name);else"range"==h.type&&h.minValue<=c&&c<=h.maxValue&&(c=h.name);break}h=
f[a].type;"date"==h?(h=b.fromJSON(g&&g.dateFormat||"shortDate"),(h="DateFormat"+b.getFormat(h))&&(c=p.substitute({myKey:c},"{myKey:"+h+"}"))):("integer"==h||"small-integer"==h||"long"==h||"double"==h)&&g&&g.numberFormat&&g.numberFormat.digitSeparator&&g.numberFormat.places&&(c=l.format(c,{places:g.numberFormat.places}))}return null==c?"":c};var t=/^\s*\{([^}]+)\}\s*$/i;return w})},"esri/layers/support/LabelExpressionInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./labelUtils".split(" "),
function(b,g,p,f,l,m,h){return function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.value=null;a.expression=null;return a}p(c,b);e=c;c.prototype.readExpression=function(a,b){return b.value?h.convertTemplatedStringToArcade(b.value):a};c.prototype.writeExpression=function(a,b,c){null!=this.value&&(a=h.convertTemplatedStringToArcade(this.value));b[c]=a};c.prototype.clone=function(){return new e({value:this.value,expression:this.expression})};var e;f([m.property({json:{read:!1,write:!1}})],
c.prototype,"value",void 0);f([m.property({json:{write:{allowNull:!0}}})],c.prototype,"expression",void 0);f([m.reader("expression",["expression","value"])],c.prototype,"readExpression",null);f([m.writer("expression")],c.prototype,"writeExpression",null);return c=e=f([m.subclass("esri.layers.support.LabelExpressionInfo")],c)}(m.declared(l))})},"esri/layers/support/labelUtils":function(){define(["require","exports","../../core/string"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});
var f=/__begin__/ig,l=/__end__/ig,m=/^__begin__/i,h=/__end__$/i;g.convertTemplatedStringToArcade=function(b){b?(b=p.replace(b,function(b,c){return'__begin__$feature["'+c+'"]__end__'}),b=m.test(b)?b.replace(m,""):'"'+b,b=h.test(b)?b.replace(h,""):b+'"',b=b.replace(f,'" + ').replace(l,' + "')):b='""';return b}})},"esri/core/string":function(){define(["require","exports","./object"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.replace=function(b,g,m){void 0===m&&(m=/\{([^\}]+)\}/g);
return b.replace(m,"function"===typeof g?g:function(b,c){return p.getDeepValue(c,g)})}})},"esri/layers/support/labelingInfo":function(){define(["require","exports","./LabelClass"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});var f=/\[([^\[\]]+)\]/gi;g.reader=function(b,g,h){var c=this;return b?b.map(function(b){var e=new p;e.read(b,h);if(e.labelExpression){var a=g.fields||g.layerDefinition&&g.layerDefinition.fields||c.fields;e.labelExpression=e.labelExpression.replace(f,function(b,
c){a:if(a){b=c.toLowerCase();for(var e=0;e<a.length;e++){var f=a[e].name;if(f.toLowerCase()===b){c=f;break a}}}return"["+c+"]"})}return e}):null}})},"esri/layers/support/Relationship":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){var c=m({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",
esriRelCardinalityManyToMany:"many-to-many"});return function(b){function e(a){a=b.call(this,a)||this;a.cardinality=null;a.id=null;a.keyField=null;a.name=null;a.relatedTableId=null;return a}p(e,b);f([h.property({json:{read:c.read,write:c.write}})],e.prototype,"cardinality",void 0);f([h.property({json:{read:!0,write:!0}})],e.prototype,"id",void 0);f([h.property({json:{read:!0,write:!0}})],e.prototype,"keyField",void 0);f([h.property({json:{read:!0,write:!0}})],e.prototype,"name",void 0);f([h.property({json:{read:!0,
write:!0}})],e.prototype,"relatedTableId",void 0);return e=f([h.subclass("esri.layers.support.Relationship")],e)}(h.declared(l))})},"esri/renderers/support/styleUtils":function(){define(["require","exports","../../core/promiseUtils","../../core/Warning"],function(b,g,p,f){Object.defineProperty(g,"__esModule",{value:!0});g.loadStyleRenderer=function(b,g){var h=b&&b.getAtOrigin&&b.getAtOrigin("renderer",g.origin);return h&&"unique-value"===h.type&&h.styleOrigin?h.populateFromStyle().catch(function(c){g&&
g.messages&&g.messages.push(new f("renderer:style-reference","Failed to create unique value renderer from style reference: "+c.message,{error:c,context:g}));b.clear("renderer",g.origin)}).then(function(){return null}):p.resolve(null)}})},"esri/renderers/support/typeUtils":function(){define("require exports ../ClassBreaksRenderer ../HeatmapRenderer ../Renderer ../SimpleRenderer ../UniqueValueRenderer".split(" "),function(b,g,p,f,l,m,h){Object.defineProperty(g,"__esModule",{value:!0});g.types={key:"type",
base:l,typeMap:{heatmap:f,simple:m,"unique-value":h,"class-breaks":p}}})},"esri/plugins/popupManager":function(){define(["../views/PopupManager"],function(b){return{add:function(g,p){g.popupManager||(g.popupManager=new b(p),g.popupManager.view=g)},remove:function(b){var g=b.popupManager;g&&(g.destroy(),b.popupManager=null)}}})},"esri/views/PopupManager":function(){define("../core/promiseUtils dojo/on dojo/Deferred ../layers/graphics/dehydratedFeatures ../geometry/support/scaleUtils ../geometry/Extent ../tasks/support/Query ../layers/GroupLayer ../core/Accessor".split(" "),
function(b,g,p,f,l,m,h,c,q){return q.createSubclass({declaredClass:"esri.views.PopupManager",properties:{map:{dependsOn:["view.map"],readOnly:!0}},constructor:function(){this._featureLayersCache={}},destroy:function(){this._featureLayersCache={};this.view=null},_clickHandle:null,_featureLayersCache:null,enabled:!1,_enabledSetter:function(b){this._clickHandle&&(b?this._clickHandle.resume():this._clickHandle.pause());this._set("enabled",b)},_mapGetter:function(){return this.get("view.map")||null},view:null,
_viewSetter:function(b){this._clickHandle&&(this._clickHandle.remove(),this._clickHandle=null);b&&(this._clickHandle=g.pausable(b,"click",this._clickHandler.bind(this)),this.enabled||this._clickHandle.pause());this._set("view",b)},getMapLayer:function(b){var a;if(b&&(a=b.findLayerById())&&(b=a.id,this._featureLayersCache[b])){var c=b.lastIndexOf("_");-1<c&&(b=b.substring(0,c),a=this.map.findLayerById(b))}return a},_closePopup:function(){var b=this.get("view.popup");b&&(b.clear(),b.close())},_showPopup:function(e,
a,g){function k(a){return v.allLayerViews.find(function(b){return b.layer===a})}function q(a){if(null==a)return!1;var b=k(a);return null==b?!1:a.loaded&&!b.suspended&&(a.popupEnabled&&a.popupTemplate||"graphics"===a.type||"geo-rss"===a.type||"map-notes"===a.type||"kml"===a.type||b.getPopupData)}function z(a){return(a=k(a))&&a.hasDraped}var v=this.view;e=v.popup;var w=this,t=[],d="3d"===v.type;this.map.layers.toArray().forEach(function(a){a.isInstanceOf(c)?a.layers.toArray().forEach(function(a){!q(a)||
d&&!z(a)||t.push(a)}):!q(a)||d&&!z(a)||t.push(a)});0<v.graphics.length&&t.push(v.graphics);(g&&v.graphics.includes(g)?g.getEffectivePopupTemplate():!g||q(g.layer))||(g=null);if(t.length||g){var n=[],x=!!g,y=w._calculateClickTolerance(t);if(a){var A=1;"2d"===v.type&&(A=v.state.resolution);var D=v.basemapTerrain;D&&D.overlayManager&&(A=D.overlayManager.overlayPixelSizeInMapUnits(a));y*=A;D&&!D.spatialReference.equals(v.spatialReference)&&(y*=l.getMetersPerUnitForSR(D.spatialReference)/l.getMetersPerUnitForSR(v.spatialReference));
var D=a.clone().offset(-y,-y),y=a.clone().offset(y,y),B=new m(Math.min(D.x,y.x),Math.min(D.y,y.y),Math.max(D.x,y.x),Math.max(D.y,y.y),v.spatialReference),D=function(c){var d;if("imagery"===c.type){d=new h;d.geometry=a;var e=k(c),l={rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0};l.layerView=e;d=c.queryVisibleRasters(d,l).then(function(a){x=x||0<a.length;return a})}else if("scene"===c.type||!w._featureLayersCache[c.id]&&"function"!==typeof c.queryFeatures){if("map-image"===c.type||
"wms"===c.type)return e=k(c),e.getPopupData(B);var l=[],m,n=!1;"esri.core.Collection\x3cesri.Graphic\x3e"===c.declaredClass?(e=c,m=!0):"graphics"===c.type?(e=c.graphics,m=!0):(e=(e=k(c))&&e.loadedGraphics,m=!1,n=!0);e&&(l=e.filter(function(a){return a&&(!m||a.getEffectivePopupTemplate())&&a.visible&&B.intersects(a.geometry)}).toArray(),n&&(l=l.map(function(a){return f.hydrateGraphic(a,c)})));0<l.length&&(x=!0,d="scene"===c.type?w._fetchSceneAttributes(c,l):b.resolve(l))}else d=c.createQuery(),d.geometry=
B,d=c.queryFeatures(d).then(function(a){a=a.features;if(g&&g.layer===c&&c.objectIdField){var b=c.objectIdField,d=g.attributes[b];a=a.filter(function(a){return a.attributes[b]!==d})}if(!g&&"graphics3DGraphics"in k(c)){var e=[],f=k(c).graphics3DGraphics,h;for(h in f)e.push(f[h].graphic.attributes[c.objectIdField]);a=a.filter(function(a){return-1!==e.indexOf(a.attributes[c.objectIdField])})}x=x||0<a.length;return a});return d};if(d&&!g||!d)var n=t.map(D).filter(function(a){return!!a}),F=function(a){return a.reduce(function(a,
b){return a.concat(b.items?F(b.items):b)},[])},n=F(n);g&&(g.layer&&"scene"===g.layer.type?n.unshift(this._fetchSceneAttributes(g.layer,[g])):g.getEffectivePopupTemplate()&&(D=new p,n.unshift(D.resolve([g]))));n.some(function(a){return!a.isFulfilled()})||x?n.length&&e.open({promises:n,location:a}):w._closePopup()}else w._closePopup()}else w._closePopup()},_fetchSceneAttributes:function(c,a){return this.view.whenLayerView(c).then(function(e){var f=this._getOutFields(c.popupTemplate),g=a.map(function(a){return e.whenGraphicAttributes(a,
f).catch(function(){return a})});return b.eachAlways(g)}.bind(this)).then(function(a){return a.map(function(a){return a.value})})},_getOutFields:function(b){var a=["*"];if("esri.PopupTemplate"===b.declaredClass){var c=null==b.content||Array.isArray(b.content)&&b.content.every(function(a){return"attachments"===a.type||"fields"===a.type&&null==a.fieldInfos||"text"===a.type&&-1===a.text.indexOf("{")});b.fieldInfos&&!b.expressionInfos&&c&&(a=[],b.fieldInfos.forEach(function(b){var c=b.fieldName&&b.fieldName.toLowerCase();
c&&"shape"!==c&&0!==c.indexOf("relationships/")&&a.push(b.fieldName)}))}return a},_calculateClickTolerance:function(b){var a=6;b.forEach(function(b){if(b=b.renderer)"simple"===b.type?((b=b.symbol)&&b.xoffset&&(a=Math.max(a,Math.abs(b.xoffset))),b&&b.yoffset&&(a=Math.max(a,Math.abs(b.yoffset)))):"unique-value"!==b.type&&"class-breaks"!==b.type||(b.uniqueValueInfos||b.classBreakInfos).forEach(function(b){(b=b.symbol)&&b.xoffset&&(a=Math.max(a,Math.abs(b.xoffset)));b&&b.yoffset&&(a=Math.max(a,Math.abs(b.yoffset)))})});
return a},_clickHandler:function(b){function a(a){return e.allLayerViews.find(function(b){return b.layer===a})}var e=this.view,f=b.screenPoint,g=this;if(0===b.button&&e.popup&&e.ready){var h="3d"===e.type,l=e.map.allLayers.some(function(b){if(b.isInstanceOf(c))return!1;var e;null==b?e=!1:(e=a(b),e=null==e?!1:b.loaded&&!e.suspended&&(b.popupEnabled&&b.popupTemplate||"graphics"===b.type||e.getPopupData));e&&!(e=!h)&&(e=(b=a(b))&&b.hasDraped);return e?!0:!1});null!=f?this.view.hitTest(f.x,f.y).then(function(a){l||
0<a.results.length?0<a.results.length?(a=a.results[0],g._showPopup(b,a.mapPoint,a.graphic)):g._showPopup(b,b.mapPoint,null):g._closePopup()}):g._showPopup(b,b.mapPoint)}}})})},"esri/layers/GroupLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/accessorSupport/decorators ../core/accessorSupport/utils ./Layer ./mixins/OperationalLayer ./mixins/PortalLayer ../support/LayersMixin".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k){return function(a){function e(b){b=a.call(this)||this;b._visibilityHandles={};b.fullExtent=void 0;b.operationalLayerType="GroupLayer";b.spatialReference=void 0;b.type="group";b._visibilityWatcher=b._visibilityWatcher.bind(b);return b}p(e,a);e.prototype.initialize=function(){this._enforceVisibility(this.visibilityMode,this.visible);this.watch("visible",this._visibleWatcher.bind(this),!0)};e.prototype._writeLayers=function(a,b,c,e){var d=[];if(!a)return d;a.forEach(function(a){a.write&&
(a=a.write(null,e))&&a.layerType&&d.push(a)});b.layers=d};Object.defineProperty(e.prototype,"visibilityMode",{set:function(a){var b=this._get("visibilityMode")!==a;this._set("visibilityMode",a);b&&this._enforceVisibility(a,this.visible)},enumerable:!0,configurable:!0});e.prototype.load=function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]}));return this.when()};e.prototype.layerAdded=function(a){a.visible&&"exclusive"===this.visibilityMode?
this._turnOffOtherLayers(a):"inherited"===this.visibilityMode&&(a.visible=this.visible);this._visibilityHandles[a.uid]=a.watch("visible",this._visibilityWatcher,!0)};e.prototype.layerRemoved=function(a){var b=this._visibilityHandles[a.uid];b&&(b.remove(),delete this._visibilityHandles[a.uid]);this._enforceVisibility(this.visibilityMode,this.visible)};e.prototype.importLayerViewModule=function(a){switch(a.type){case "2d":return m.create(function(a){b(["../views/layers/GroupLayerView"],a)});case "3d":return m.create(function(a){b(["../views/layers/GroupLayerView"],
a)})}};e.prototype._turnOffOtherLayers=function(a){this.layers.forEach(function(b){b!==a&&(b.visible=!1)})};e.prototype._enforceVisibility=function(a,b){if(c.getProperties(this).initialized){var e=this.layers,f=e.find(function(a){return a.visible});switch(a){case "exclusive":e.length&&!f&&(f=e.getItemAt(0),f.visible=!0);this._turnOffOtherLayers(f);break;case "inherited":e.forEach(function(a){a.visible=b})}}};e.prototype._visibleWatcher=function(a){"inherited"===this.visibilityMode&&this.layers.forEach(function(b){b.visible=
a})};e.prototype._visibilityWatcher=function(a,b,c,e){switch(this.visibilityMode){case "exclusive":a?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case "inherited":e.visible=this.visible}};e.prototype._isAnyLayerVisible=function(){return this.layers.some(function(a){return a.visible})};f([h.property()],e.prototype,"fullExtent",void 0);f([h.property({json:{read:!1,write:{ignoreOrigin:!0}}})],e.prototype,"layers",void 0);f([h.writer("layers")],e.prototype,"_writeLayers",
null);f([h.property()],e.prototype,"operationalLayerType",void 0);f([h.property({json:{write:!1}})],e.prototype,"portalItem",void 0);f([h.property()],e.prototype,"spatialReference",void 0);f([h.property({json:{read:!1},readOnly:!0,value:"group"})],e.prototype,"type",void 0);f([h.property({json:{read:!1,write:!1}})],e.prototype,"url",void 0);f([h.property({type:String,value:"independent",json:{write:!0}})],e.prototype,"visibilityMode",null);return e=f([h.subclass("esri.layers.GroupLayer")],e)}(h.declared(q,
k,l,e,a))})},"esri/portal/support/layersCreator":function(){define("require exports dojo/has ../../core/promiseUtils ../../layers/Layer ../../layers/support/lazyLayerLoader ../PortalItem ./mapNotesUtils ./portalLayers ../../renderers/support/styleUtils".split(" "),function(b,g,p,f,l,m,h,c,q,e){function a(a,b,c){var d,g={};b.itemId&&(g.portalItem={id:b.itemId,portal:c.context.portal});d=new a(g);d.read(b,c.context);return e.loadStyleRenderer(d,c.context).then(function(){return f.resolve(d)})}function k(b,
c){return r(b,c).then(function(d){return a(d,b,c)})}function r(a,b){var d=b.context,e=u(d),f=a.layerType||a.type;!f&&b&&b.defaultLayerType&&(f=b.defaultLayerType);b=(b=e[f])?m.layerLookupMap[b]:m.layerLookupMap.UnknownLayer;if("Feature Collection"===a.type){if(a.itemId)return(new h({id:a.itemId,portal:d&&d.portal})).load().then(q.selectLayerClassPath).then(function(a){return m.layerLookupMap[a.className||"UnknownLayer"]}).then(function(a){return a()})}else"ArcGISFeatureLayer"===f&&c.isMapNotesLayer(a)&&
(b=m.layerLookupMap.MapNotesLayer);a.wmtsInfo&&(b=m.layerLookupMap.WMTSLayer);return b()}function u(a){switch(a.origin){case "web-scene":switch(a.layerContainerType){case "basemap":a=d;break;case "ground":a=t;break;default:a=w}break;default:switch(a.layerContainerType){case "basemap":a=x;break;default:a=n}}return a}function z(a,b,c){return b&&b.filter?c.then(function(a){var c=b.filter(a);return void 0===c?f.resolve(a):c instanceof l?f.resolve(c):c}):c}function v(a,b,c){if(!b)return[];for(var d=[],
e=[],g=0;g<b.length;g++){var h=b[g],l=k(h,c);d.push(l);e.push(null);if("GroupLayer"===h.layerType&&h.layers&&Array.isArray(h.layers)&&0<h.layers.length){h=h.layers.map(function(a){return k(a,c)});d.push.apply(d,h);for(var m=0;m<h.length;m++)e.push(l)}}var n={};return d.map(function(b,d){var g=function(a,b){n[b.id]=d;var c=a.findIndex(function(a){if(!a.id)return!1;a=n[a.id];return void 0===a?!1:d<a});0>c&&(c=void 0);a.add(b,c)};return z(a,c,b).then(function(b){if(null===e[d])g(a,b);else return e[d].then(function(a){g(a.layers,
b);return f.resolve(b)});return f.resolve(b)})})}Object.defineProperty(g,"__esModule",{value:!0});var w={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer",
CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},t={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer"},d={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",DefaultTileLayer:"TileLayer"},n=
{ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",GeoRSS:"GeoRSSLayer",KML:"KMLLayer",WMS:"WMSLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",DefaultTileLayer:"TileLayer"},
x={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"};g.createLayer=k;g.processLayer=z;g.populateLayers=v;g.populateOperationalLayers=
function(a,b,c){return v(a,b,c)}})},"esri/portal/support/mapNotesUtils":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.isMapNotesLayer=function(b){var f=["TITLE","DESCRIPTION","IMAGE_URL","IMAGE_LINK_URL"];if((b=b.layers||b.featureCollection&&b.featureCollection.layers)&&Array.isArray(b))return b=b[0],b.layerDefinition.fields&&b.layerDefinition.fields.forEach(function(b){b=f.indexOf(b.name);-1<b&&f.splice(b,1)}),f.length?!1:!0}})},"esri/portal/support/portalLayers":function(){define("require exports ../../core/tsSupport/assignHelper ../../request ../../core/Collection ../../core/Error ../../core/promiseUtils ../../layers/support/lazyLayerLoader ../PortalItem ./mapNotesUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e){function a(a){switch(a.type){case "Map Service":return r(a);case "Feature Service":return u(a);case "Feature Collection":return v(a);case "Scene Service":return z(a);case "Image Service":return w(a);case "Stream Service":return{className:"StreamLayer"};case "Vector Tile Service":return{className:"VectorTileLayer"};case "KML":return{className:"KMLLayer"};case "WMTS":return{className:"WMTSLayer"};case "WMS":return{className:"WMSLayer"};default:return h.reject(new m("portal:unknown-item-type",
"Unknown item type '${type}'",{type:a.type}))}}function k(a){return(0,c.layerLookupMap[a.className])().then(function(b){return{constructor:b,properties:a.properties}})}function r(a){return t(a).then(function(a){return a?{className:"TileLayer"}:{className:"MapImageLayer"}})}function u(a){return d(a).then(function(a){if("object"===typeof a){var b={outFields:["*"]};null!=a.id&&(b.layerId=a.id);return{className:"FeatureLayer",properties:b}}return{className:"GroupLayer"}})}function z(a){return d(a).then(function(b){if("object"===
typeof b){var c={},d=void 0;null!=b.id?(c.layerId=b.id,d=a.url+"/layers/"+b.id):d=a.url;if(Array.isArray(a.typeKeywords)&&0<a.typeKeywords.length){b={IntegratedMesh:"IntegratedMeshLayer","3DObject":"SceneLayer",Point:"SceneLayer",PointCloud:"PointCloudLayer"};for(var e=0,f=Object.keys(b);e<f.length;e++){var g=f[e];if(-1!==a.typeKeywords.indexOf(g))return{className:b[g]}}}return n(d).then(function(a){var b="SceneLayer";null!=a&&"IntegratedMesh"===a.layerType?b="IntegratedMeshLayer":null!=a&&"PointCloud"===
a.layerType&&(b="PointCloudLayer");return{className:b,properties:c}})}return{className:"GroupLayer"}})}function v(a){return a.load().then(function(){return a.fetchData()}).then(function(a){if(a&&Array.isArray(a.layers)){if(e.isMapNotesLayer(a))return{className:"MapNotesLayer"};if(1===a.layers.length)return{className:"FeatureLayer"}}return{className:"GroupLayer"}})}function w(a){return t(a).then(function(b){var c=new l(a.typeKeywords);return b?c.find(function(a){return"elevation 3d layer"===a.toLowerCase()})?
{className:"ElevationLayer"}:{className:"TileLayer"}:{className:"ImageryLayer"}})}function t(a){return n(a.url).then(function(a){return a.tileInfo})}function d(a){return!a.url||a.url.match(/\/\d+$/)?h.resolve({}):a.load().then(function(){return a.fetchData()}).then(function(b){return b&&Array.isArray(b.layers)?1===b.layers.length?{id:b.layers[0].id}:!1:n(a.url).then(function(a){return a&&Array.isArray(a.layers)?1===a.layers.length?{id:a.layers[0].id}:!1:{}})})}function n(a){return f(a,{responseType:"json",
callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(g,"__esModule",{value:!0});g.fromItem=function(b){!b.portalItem||b.portalItem instanceof q||b.portalItem.constructor&&b.portalItem.constructor._meta||(b=p({},b,{portalItem:new q(b.portalItem)}));return b.portalItem.load().then(a).then(k).then(function(a){var c=p({portalItem:b.portalItem},a.properties);a=a.constructor;"esri.layers.FeatureLayer"===a.declaredClass&&(c.outFields=["*"]);return h.resolve(new a(c))})};
g.selectLayerClassPath=a})},"esri/views/layers/LayerView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/Handles ../../core/Identifiable ../../core/Logger ../../core/Promise ../../core/promiseUtils ../../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h,c,q,e,a,k){return function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.handles=new h;a.layer=null;
a.parent=null;a.view=null;return a}p(c,b);c.prototype.initialize=function(){var b=this;this.addResolvingPromise(this.layer);this.when().catch(function(c){if("layerview:create-error"!==c.name){var e=b.layer&&b.layer.id||"no id",f=b.layer&&b.layer.title||"no title";q.getLogger(b.declaredClass).error("#resolve()","Failed to resolve layer view (layer title: '"+f+"', id: '"+e+"')",c);return a.reject(c)}})};c.prototype.destroy=function(){this.layer=this.view=this.parent=null};Object.defineProperty(c.prototype,
"suspended",{get:function(){return!this.canResume()},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"updating",{get:function(){return!this.suspended&&this.isUpdating()},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"visible",{get:function(){return!0===this.get("layer.visible")},set:function(a){void 0===a?this._clearOverride("visible"):this._override("visible",a)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"fullOpacity",{get:function(){var a=
this.get("layer.opacity"),a=null!=a?a:1,b=this.get("parent.fullOpacity");return a*(null!=b?b:1)},enumerable:!0,configurable:!0});c.prototype.canResume=function(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.get("layer.loaded")&&this.visible||!1};c.prototype.isUpdating=function(){return!1};f([k.property()],c.prototype,"layer",void 0);f([k.property()],c.prototype,"parent",void 0);f([k.property({readOnly:!0,dependsOn:["view","visible","layer.loaded","parent.suspended"]})],c.prototype,
"suspended",null);f([k.property({type:Boolean,dependsOn:["suspended"],readOnly:!0})],c.prototype,"updating",null);f([k.property()],c.prototype,"view",void 0);f([k.property({dependsOn:["layer.visible"]})],c.prototype,"visible",null);f([k.property({dependsOn:["layer.opacity","parent.fullOpacity"]})],c.prototype,"fullOpacity",null);return c=f([k.subclass("esri.views.layers.LayerView")],c)}(k.declared(l,m,c,e))})},"esri/views/View":function(){define("../Graphic ../core/Accessor ../core/Collection ../core/CollectionFlattener ../core/Evented ../core/Handles ../core/lang ../core/Logger ../core/Promise ../core/watchUtils ../core/promiseUtils ../core/scheduling ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ./LayerViewManager ./RefreshManager ./BasemapView ./GroundView ./support/DefaultsFromMap".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z,v,w,t,d,n){var x=c.getLogger("esri.views.View");return g.createSubclass([q,l],{declaredClass:"esri.views.View",properties:{allLayerViews:{readOnly:!0},basemapView:{},animation:{},resizing:{},interacting:{},graphics:{type:p.ofType(b)},groundView:{},defaultsFromMap:n,heightModelInfo:{readOnly:!0,type:u,dependsOn:["map.heightModelInfo","defaultsFromMap.heightModelInfo"]},initialExtent:{readOnly:!0,type:r,dependsOn:["defaultsFromMap.extent"]},initialExtentRequired:{},
layerViews:{type:p},map:{},ready:{readOnly:!0,dependsOn:"map spatialReference width height initialExtentRequired initialExtent defaultsFromMap.isSpatialReferenceDone map.loaded".split(" ")},size:{readOnly:!0,dependsOn:["width","height"],get:function(){return[this.width,this.height]}},spatialReference:{type:z,dependsOn:["defaultsFromMap.spatialReference","defaultsFromMap.vcsWkid","defaultsFromMap.latestVcsWkid"]},stationary:{dependsOn:["animation","interacting","resizing"]},type:{},updating:{},padding:{},
width:{},height:{},cursor:{},spatialReferenceWarningDelay:1E3},constructor:function(a){this._viewHandles=new m;this._viewHandles.add(this.watch("ready",function(a,b){this._currentSpatialReference=a?this.spatialReference:null;this.notifyChange("spatialReference");!a&&b&&this.layerViewManager.clear()}.bind(this)));this.allLayerViews=new f({root:this,rootCollectionNames:["basemapView.baseLayerViews","groundView.layerViews","layerViews","basemapView.referenceLayerViews"],getChildrenFunction:function(a){return a.layerViews}});
this.defaultsFromMap=new n({view:this})},getDefaults:function(){return h.mixin(this.inherited(arguments),{layerViews:[],graphics:[],padding:{left:0,top:0,right:0,bottom:0}})},initialize:function(){var b=this.validate().then(function(){this._isValid=!0;this.notifyChange("ready");var b=function(){return e.whenOnce(this,"ready").then(function(){return a.after(0)}.bind(this)).then(function(){if(!this.ready)return b()}.bind(this))}.bind(this);return b()}.bind(this));this.addResolvingPromise(b);this.basemapView=
new t({view:this});this.groundView=new d({view:this});this.layerViewManager=new v({view:this});this.refreshManager=new w({view:this});this._resetInitialViewPropertiesFromContent();var c;e.init(this.defaultsFromMap,"isSpatialReferenceDone",function(b){var d=!!(this.map&&0<this.map.allLayers.length);b&&!this.spatialReference&&d||!c?b&&!this.spatialReference&&d&&!c&&(c=a.after(this.spatialReferenceWarningDelay),c.then(function(){x.warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}).catch(function(){})):
(c.cancel(),c=null)}.bind(this),!0)},destroy:function(){this.destroyed||(this.basemapView.destroy(),this.groundView.destroy(),this.destroyLayerViews(),this.refreshManager.destroy(),this.defaultsFromMap.destroy(),this.defaultsFromMap=null,this._viewHandles.destroy(),this.map=null)},destroyLayerViews:function(){this.layerViewManager.destroy()},_viewHandles:null,_isValid:!1,_readyCycleForced:!1,_userSpatialReference:null,_currentSpatialReference:null,animation:null,basemapView:null,groundView:null,graphics:null,
heightModelInfo:null,_heightModelInfoGetter:function(){return this.getDefaultHeightModelInfo()},interacting:!1,layerViews:null,map:null,_mapSetter:function(a){var b=this._get("map");a!==b&&(a&&a.load&&a.load(),this._forceReadyCycle(),this._resetInitialViewPropertiesFromContent(),this._set("map",a))},padding:null,_readyGetter:function(){return!!(this._isValid&&!this._readyCycleForced&&this.map&&0!==this.width&&0!==this.height&&this.spatialReference&&(!this.map.load||this.map.loaded)&&(this._currentSpatialReference||
!this.initialExtentRequired||this.initialExtent||this.defaultsFromMap&&this.defaultsFromMap.isSpatialReferenceDone)&&this.defaultsFromMap&&this.defaultsFromMap.isTileInfoDone&&this.isSpatialReferenceSupported(this.spatialReference))},spatialReference:null,_spatialReferenceGetter:function(){var a=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||null;a&&this.isHeightModelInfoRequired&&this.defaultsFromMap&&(a=a.clone(),a.vcsWkid=this.defaultsFromMap.vcsWkid,
a.latestVcsWkid=this.defaultsFromMap.latestVcsWkid);return a},_spatialReferenceSetter:function(a){this._userSpatialReference=a;this._set("spatialReference",a)},stationary:!0,_stationaryGetter:function(){return!this.animation&&!this.interacting&&!this.resizing},type:null,updating:!1,initialExtentRequired:!0,initialExtent:null,_initialExtentGetter:function(){return this.defaultsFromMap&&this.defaultsFromMap.extent},cursor:"default",renderContext:null,whenLayerView:function(a){return this.layerViewManager.whenLayerView(a)},
getDefaultSpatialReference:function(){return this.get("defaultsFromMap.spatialReference")},getDefaultHeightModelInfo:function(){return this.get("map.supportsHeightModelInfo")&&this.get("map.heightModelInfo")||this.get("defaultsFromMap.heightModelInfo")||null},validate:function(){return a.resolve()},isSpatialReferenceSupported:function(){return!0},isTileInfoRequired:function(){return!1},_resetInitialViewPropertiesFromContent:function(){if(this.defaultsFromMap){var a=this.defaultsFromMap.start.bind(this.defaultsFromMap);
this.defaultsFromMap.reset();this._currentSpatialReference=null;this.notifyChange("spatialReference");this._viewHandles.remove("defaultsFromMap");this._viewHandles.add([e.watch(this,"spatialReference",a),e.watch(this,"initialExtentRequired",a),k.schedule(a)],"defaultsFromMap")}},_forceReadyCycle:function(){this.ready&&(this._readyCycleForced=!0,e.whenFalseOnce(this,"ready",function(){this._readyCycleForced=!1;this.notifyChange("ready")}.bind(this)),this.notifyChange("ready"))}})})},"esri/views/LayerViewManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Error ../core/Handles ../core/promiseUtils ../core/scheduling ../core/watchUtils ../core/accessorSupport/decorators ./LayerViewFactory".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k){return function(b){function g(){var a=b.call(this)||this;a._promisesMap=new Map;a._layerViewsMap=new Map;a._handles=new h;a.factory=new k;a.ready=!1;a.layersToLayerViews=function(){var a=new Map;a.set("view.map.basemap.baseLayers","view.basemapView.baseLayerViews");a.set("view.map.ground.layers","view.groundView.layerViews");a.set("view.map.layers","view.layerViews");a.set("view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews");return a}();a._doWork=
a._doWork.bind(a);a.refresh=a.refresh.bind(a);a._handles.add(e.init(a,"view.ready",function(b){return a.ready=b}));a._handles.add(a.watch(["view.map.basemap","view.map.ground","view.map.layers","ready"],a.refresh),"watcher");return a}p(g,b);g.prototype.destroy=function(){this._handles&&(this.clear(),this.view=null,this.factory.destroy(),this.factory=null,this._handles.destroy(),this._map=this._layerViewsMap=this._promisesMap=this._handles=null)};g.prototype.clear=function(){this.destroyed||(this._layerViewsMap.forEach(this._disposeLayerView,
this),this._promisesMap.forEach(function(a){return a.cancel()}),this._layerViewsMap.clear(),this._promisesMap.clear(),this._refreshCollections())};g.prototype.refresh=function(){var a=this._handles;a.remove("refresh");a.add(q.schedule(this._doWork),"refresh")};g.prototype.whenLayerView=function(a){this.refresh();this._doWork();return this._promisesMap.has(a)?this._promisesMap.get(a):c.reject(new m("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:a}))};g.prototype._doWork=
function(){var a=this,b=this._handles,c=this.get("view.map");this._map!==c&&(this.clear(),this._map=c);if(b.has("refresh")){b.remove("refresh");b.remove("collection-change");this.factory.paused=!this.ready;var e=this._map&&this._map.allLayers;e&&(e.forEach(this._createLayerView,this),this._refreshCollections(),this._promisesMap.forEach(function(b,c){e.includes(c)||a._disposeLayerView(a._layerViewsMap.get(c),c)}),b.add(e.on("change",this.refresh),"collection-change"))}};g.prototype._refreshCollections=
function(){var a=this;this.layersToLayerViews.forEach(function(b,c){a._populateLayerViewsOwners(a.get(c),a.get(b),a.view)})};g.prototype._populateLayerViewsOwners=function(a,b,c){var e=this;if(a&&b){var d=0;a.forEach(function(a){var f=e._layerViewsMap.get(a);f&&(f.layer=a,f.parent=c,b.getItemAt(d)!==f&&b.splice(d,0,f),a.layers&&e._populateLayerViewsOwners(a.layers,f.layerViews,f),d+=1)});d<b.length&&b.splice(d,b.length)}else b&&b.removeAll()};g.prototype._createLayerView=function(a){var b=this,c=
this.view,e=this.factory,d=this._layerViewsMap,f=this._promisesMap;d.has(a)?a.load():f.has(a)||(e=e.create(c,a).then(function(e){if(!b._map||!b._map.allLayers.some(function(b){return a===b}))throw new m("view:no-layerview-for-layer","The layer has been removed from the map",{layer:a});d.set(a,e);b._refreshCollections();a.emit("layerview-create",{view:c,layerView:e});c.emit("layerview-create",{layer:a,layerView:e});return e.when()}),f.set(a,e),e.always(this.refresh))};g.prototype._disposeLayerView=
function(a,b){if(this._promisesMap.has(b)&&(this._promisesMap.get(b).cancel(),this._promisesMap.delete(b),a)){b=a.layer;var c=a.view;this.factory.dispose(a);a.layer=a.parent=a.view=null;this._layerViewsMap.delete(b);b.emit("layerview-destroy",{view:c,layerView:a});c.emit("layerview-destroy",{layer:b,layerView:a})}};f([a.property()],g.prototype,"ready",void 0);f([a.property()],g.prototype,"view",void 0);return g=f([a.subclass("esri.views.LayerViewManager")],g)}(a.declared(l))})},"esri/views/LayerViewFactory":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/Deferred dojo/when ../core/Accessor ../core/Collection ../core/Error ../core/watchUtils ../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){return function(b){function g(){var a=null!==b&&b.apply(this,arguments)||this;a.creationRequests=new c;a.paused=!0;return a}p(g,b);g.prototype.initialize=function(){var a=this;e.whenFalse(this,"paused",function(){a.creationRequests.toArray().forEach(a._processRequest,a)},!0)};g.prototype.destroy=function(){this.creationRequests.drain(function(a){return a.deferred.cancel(void 0)})};Object.defineProperty(g.prototype,"working",{get:function(){return 0<this.creationRequests.length},
enumerable:!0,configurable:!0});g.prototype.create=function(a,b){var c=this.getLayerViewPromise(b);if(c)return c;var e=this.creationRequests,f={deferred:new l(function(){var a=new q("cancelled:layerview-create","layerview creation cancelled",{layer:b});e.remove(f);f.creationPromise&&f.creationPromise.cancel(a);return a}),view:a,layer:b,started:!1,creationPromise:null};e.push(f);this.paused||this._processRequest(f);return f.deferred.promise};g.prototype.dispose=function(a){a.layer.destroyLayerView(a)};
g.prototype.getLayerViewPromise=function(a){var b=this.creationRequests&&this.creationRequests.find(function(b){return b.layer===a});return b&&b.deferred.promise};g.prototype._processRequest=function(a){var b=this;if(!a.started){a.started=!0;var c=a.deferred,e=a.layer,f=a.view;e.load().then(function(b){if(!c.isCanceled())return a.creationPromise=b.createLayerView(f),a.creationPromise}).then(function(b){return c.isCanceled()?b:a.creationPromise=m(b.when())}).catch(function(a){c.isCanceled()||c.reject(new q("layerview:create-error",
"layerview creation failed",{layer:e,error:a}))}).then(function(d){b.creationRequests&&b.creationRequests.remove(a);c.isFulfilled()?d&&b.dispose(d):c.resolve(d);return d})}};f([a.property()],g.prototype,"creationRequests",void 0);f([a.property()],g.prototype,"paused",void 0);f([a.property()],g.prototype,"view",void 0);f([a.property({dependsOn:["paused","creationRequests.length"],readOnly:!0})],g.prototype,"working",null);return g=f([a.subclass("esri.views.LayerViewFactory")],g)}(a.declared(h))})},
"esri/views/RefreshManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Handles ../core/accessorSupport/decorators".split(" "),function(b,g,p,f,l,m,h){return function(b){function c(){var c=null!==b&&b.apply(this,arguments)||this;c._handles=new m;c._currentTick=0;return c}p(c,b);c.prototype.initialize=function(){var b=this;this.view.allLayerViews.on("after-changes",function(){b.notifyChange("tickInterval");b._handles.remove("layerViewsUpdating");
b._handles.add(b._getLayerViewHandles(),"layerViewsUpdating")});this.watch("tickInterval",function(){return b._restartTicking()});this.watch("view.ready",function(){return b._restartTicking()});this._restartTicking()};c.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null,this._intervalID&&clearInterval(this._intervalID),this._currentTick=0)};Object.defineProperty(c.prototype,"tickInterval",{get:function(){var b=this.view.allLayerViews.filter(function(a){return!!a.refresh});
return this._getCommonInterval(b)},enumerable:!0,configurable:!0});c.prototype._restartTicking=function(){var b=this;this._currentTick=0;this._intervalID&&clearInterval(this._intervalID);this.get("view.ready")&&this.tickInterval&&(this._intervalID=setInterval(function(){var a=Date.now();b._currentTick+=b.tickInterval;b.view.allLayerViews.forEach(function(c){if(c.refresh){var e=Math.round(6E4*c.refreshInterval),f=0===b._currentTick%e,g=6E3>a-c.refreshTimestamp;e&&f&&!g&&c.refresh(a)}})},this.tickInterval))};
c.prototype._getLayerViewHandles=function(){var b=this,a=[];this.view.allLayerViews.forEach(function(c){if(c.refresh){var e=c.watch("refreshInterval",function(){return b.notifyChange("tickInterval")});a.push(e);c.layer&&(e=c.layer.on("refresh",function(){var a=Date.now();6E3>a-c.refreshTimestamp||c.refresh(a)}),a.push(e))}});return a};c.prototype._getCommonInterval=function(b){var a=function(b,c){return isNaN(b)||isNaN(c)?0:0>=c?b:a(c,b%c)};return b.toArray().reduce(function(b,c){return a(Math.round(6E4*
c.refreshInterval),b)},0)};f([h.property()],c.prototype,"view",void 0);f([h.property({readOnly:!0})],c.prototype,"tickInterval",null);return c=f([h.subclass("esri.views.RefreshManager")],c)}(h.declared(l))})},"esri/views/BasemapView":function(){define(["../core/Accessor","../core/Collection","../core/watchUtils"],function(b,g,p){return b.createSubclass({declaredClass:"esri.views.BasemapView",properties:{view:{},baseLayerViews:{type:g},referenceLayerViews:{type:g}},constructor:function(){this._loadingHdl=
p.init(this,"view.map.basemap",this._loadBasemap)},getDefaults:function(){return{baseLayerViews:[],referenceLayerViews:[]}},destroy:function(){this.view=null;this._loadingHdl&&(this._loadingHdl.remove(),this._loadingHdl=null)},_suspendedGetter:function(){return this.view?this.view.suspended:!0},_loadBasemap:function(b){b&&b.load()}})})},"esri/views/GroundView":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Collection ../core/Handles ../core/watchUtils ../core/accessorSupport/decorators ./support/GroundViewElevationSampler".split(" "),
function(b,g,p,f,l,m,h,c,q,e){return function(a){function b(b){b=a.call(this)||this;b.handles=new h;b.view=null;b.layerViews=new m;return b}p(b,a);b.prototype.initialize=function(){var a=this;this.handles.add(c.when(this,"view.map.ground",function(a){return a.load()}));this.handles.add(this.layerViews.on("after-changes",function(){return a.layerViewsAfterChangesHandler()}))};b.prototype.destroy=function(){this._set("view",null);this.handles&&(this.handles.destroy(),this.handles=null)};Object.defineProperty(b.prototype,
"elevationSampler",{get:function(){return this.view&&"2d"!==this.view.type&&this.view.ready&&this.view.basemapTerrain&&this.view.basemapTerrain.ready?new e({view:this.view}):null},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"updating",{get:function(){return this.suspended?!1:this.layerViews.some(function(a){return a.updating})},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"suspended",{get:function(){return!this.view||this.view.suspended},enumerable:!0,configurable:!0});
b.prototype.layerViewsAfterChangesHandler=function(){var a=this;this.handles.remove("updating");this.handles.add(this.layerViews.map(function(b){return b.watch("updating",function(){return a.updateUpdating()},!0)}).toArray(),"updating");this.updateUpdating()};b.prototype.updateUpdating=function(){this.notifyChange("updating")};f([q.property({readOnly:!0,dependsOn:["view.ready","view.basemapTerrain.ready"]})],b.prototype,"elevationSampler",null);f([q.property({type:Boolean,dependsOn:["suspended"],
readOnly:!0})],b.prototype,"updating",null);f([q.property({constructOnly:!0})],b.prototype,"view",void 0);f([q.property({type:m,readOnly:!0})],b.prototype,"layerViews",void 0);f([q.property({readOnly:!0,dependsOn:["view.suspended"]})],b.prototype,"suspended",null);return b=f([q.subclass("esri.views.GroundView")],b)}(q.declared(l))})},"esri/views/support/GroundViewElevationSampler":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/Logger ../../core/accessorSupport/decorators ../../geometry/support/aaBoundingRect ../../geometry/support/webMercatorUtils ../../layers/support/ElevationSampler".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){var k=h.getLogger("esri.views.support.GroundViewElevationSampler");return function(b){function g(a){a=b.call(this,a)||this;a.demResolution={min:-1,max:-1};return a}p(g,b);g.prototype.initialize=function(){var a=this;this.view.basemapTerrain.on("elevation-change",function(){return a.emit("changed",{})})};Object.defineProperty(g.prototype,"extent",{get:function(){var a=this.view.basemapTerrain;return a.extent&&a.spatialReference?q.toExtent(a.extent,a.spatialReference):
null},enumerable:!0,configurable:!0});g.prototype.elevationAt=function(a){var b=a.spatialReference,c=this.spatialReference;return e.canProject(b,c)?this.view.basemapTerrain.getElevation(a):(k.error("Cannot sample elevation at a location with spatial reference ("+(b?b.wkid:"unknown")+") different from the view ("+c.wkid+")"),null)};g.prototype.queryElevation=function(b){return a.updateGeometryElevation(b.clone(),this)};f([c.property({readOnly:!0})],g.prototype,"demResolution",void 0);f([c.property({readOnly:!0,
dependsOn:["view.basemapTerrain.extent","view.basemapTerrain.spatialReference"]})],g.prototype,"extent",null);f([c.property({readOnly:!0,aliasOf:"view.basemapTerrain.spatialReference"})],g.prototype,"spatialReference",void 0);f([c.property({constructOnly:!0})],g.prototype,"view",void 0);return g=f([c.subclass("esri.views.support.GroundViewElevationSampler")],g)}(c.declared(l,m))})},"esri/layers/support/ElevationSampler":function(){define("require exports ../../geometry ../../core/Logger ../../geometry/support/aaBoundingRect ../../geometry/support/scaleUtils ../../geometry/support/webMercatorUtils".split(" "),
function(b,g,p,f,l,m,h){function c(a,b){var c=q(a,b.spatialReference);if(!c)return null;switch(a.type){case "point":a.z=b.elevationAt(c)||0;break;case "polyline":k.spatialReference=c.spatialReference;for(var e=0;e<a.paths.length;e++)for(var f=a.paths[e],d=c.paths[e],g=0;g<f.length;g++){var h=f[g],l=d[g];k.x=l[0];k.y=l[1];h[2]=b.elevationAt(k)||0}a.hasZ=!0;break;case "multipoint":k.spatialReference=c.spatialReference;for(e=0;e<a.points.length;e++)f=a.points[e],d=c.points[e],k.x=d[0],k.y=d[1],f[2]=
b.elevationAt(k)||0;a.hasZ=!0}return a}function q(a,b){var c=a.spatialReference;return c.equals(b)?a:h.canProject(c,b)?h.project(a,b):(e.error("Cannot project geometry spatial reference (wkid:"+c.wkid+") to elevation sampler spatial reference (wkid:"+b.wkid+")"),null)}Object.defineProperty(g,"__esModule",{value:!0});var e=f.getLogger("esri.layers.support.ElevationSampler"),a=function(){function a(a,b){this.tile=a;this.extent=l.toExtent(a.tile.extent,b.spatialReference);var c=m.getMetersPerUnitForSR(b.spatialReference);
a=b.lodAt(a.tile.level).resolution*c;this.demResolution={min:a,max:a}}Object.defineProperty(a.prototype,"spatialReference",{get:function(){return this.extent.spatialReference},enumerable:!0,configurable:!0});a.prototype.contains=function(a){var b=q(a,this.spatialReference);a=b.x;b=b.y;return a>=this.extent.xmin&&a<this.extent.xmax&&b>=this.extent.ymin&&b<this.extent.ymax};a.prototype.elevationAt=function(a){return(a=q(a,this.spatialReference))?this.tile.sample(a.x,a.y):null};a.prototype.queryElevation=
function(a){return c(a.clone(),this)};a.prototype.on=function(a,b){return r};return a}();g.TileElevationSampler=a;b=function(){function b(b,c){this.samplers=c?b.map(function(b){return new a(b,c)}):b;if(b=this.samplers[0])for(this.extent=b.extent.clone(),b=b.demResolution,this.demResolution={min:b.min,max:b.max},b=1;b<this.samplers.length;b++){var e=this.samplers[b];this.extent.union(e.extent);this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min);this.demResolution.max=Math.max(this.demResolution.max,
e.demResolution.max)}else this.extent=l.toExtent(l.create(),c.spatialReference),this.demResolution={min:0,max:0}}Object.defineProperty(b.prototype,"spatialReference",{get:function(){return this.extent.spatialReference},enumerable:!0,configurable:!0});b.prototype.elevationAt=function(a){a=q(a,this.spatialReference);if(!a)return null;for(var b=0,c=this.samplers;b<c.length;b++){var e=c[b];if(e.contains(a))return e.elevationAt(a)}return null};b.prototype.queryElevation=function(a){return c(a.clone(),
this)};b.prototype.on=function(a,b){return r};return b}();g.MultiTileElevationSampler=b;g.updateGeometryElevation=c;var k=new p.Point,r={remove:function(){}}})},"esri/views/support/DefaultsFromMap":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/arrayUtils ../../core/Handles ../../core/Logger ../../core/watchUtils ../../core/accessorSupport/decorators ../../geometry/support/heightModelInfoUtils ../../geometry/support/webMercatorUtils ../../portal/support/geometryServiceUtils".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r){function u(a){return a?JSON.stringify(a.toJSON()):"undefined"}function z(a){switch(a){case 0:return"Waiting";case 1:return"Found";case 2:return"Exhausted"}return"Unknown: "+a}var v=c.getLogger("esri.views.support.DefaultsFromMap");return function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a._handles=new h;a._waitTask=null;a._isStarted=!1;a._spatialReferenceCandidates=null;a._extentCandidates=null;a.logDebugInformation=!1;a.isSpatialReferenceDone=
!1;a.isTileInfoDone=!1;a.isHeightModelInfoSearching=!1;a.spatialReference=null;a.extent=null;a.heightModelInfo=null;a.vcsWkid=null;a.latestVcsWkid=null;a.mapCollectionPaths=d.DefaultMapCollectionPaths.slice();a.tileInfo=null;return a}p(c,b);d=c;c.prototype.initialize=function(){var a=this;this.watch("mapCollectionPaths",function(){a._isStarted&&(a.reset(),a.start())})};c.prototype.destroy=function(){this._set("view",null);this._handles&&(this._handles.destroy(),this._handles=null,this._isStarted=
!1);this._cancelLoading()};c.prototype.reset=function(){this._handles.removeAll();this._isStarted=!1;this._set("isSpatialReferenceDone",!1);this._set("isTileInfoDone",!1);this._set("isHeightModelInfoSearching",!1);this._set("spatialReference",null);this._set("extent",null);this._set("heightModelInfo",null);this._set("vcsWkid",null);this._set("latestVcsWkid",null);this._set("tileInfo",null);this._extentCandidates=this._spatialReferenceCandidates=null};c.prototype.start=function(){this._handles.removeAll();
this._isStarted=!0;for(var a=this._updateLayerChange.bind(this),b=0,c=this.mapCollectionPaths;b<c.length;b++)this._handles.add(q.on(this.view,"map."+c[b],"change",a,a,a,!0))};c.prototype._ownerNameFromCollectionName=function(a){var b=a.lastIndexOf(".");return-1===b?"view":"view."+a.slice(0,b)};c.prototype._ensureLoadedOwnersFromCollectionName=function(a){a=this._ownerNameFromCollectionName(a).split(".");for(var b,c=0;c<a.length;c++){b=this.get(a.slice(0,c+1).join("."));if(!b)break;if(b.load&&!b.isFulfilled())return{owner:null,
loading:b.load()}}return{owner:b}};c.prototype._cancelLoading=function(){this._waitTask=null;this._extentProjectTask&&(this._extentProjectTask.cancel(),this._extentProjectTask=null)};c.prototype._updateWhen=function(a){var b=this,c=!0,d=!1,e=a.always(function(){c?d=!0:e===b._waitTask&&b._update()}),c=!1;d||(this._waitTask=e);return d};c.prototype._updateLayerChange=function(){this.isSpatialReferenceDone&&!this.spatialReference&&this._set("isSpatialReferenceDone",!1);this._update()};c.prototype._update=
function(){var b=this;this._cancelLoading();if(this.view){if(!this.isSpatialReferenceDone){this._debugLog("Starting search for spatial reference...");var c=this._processMapCollections(function(a){return b._processSpatialReferenceSource(a)});this._debugLog("Search ended with status '"+z(c)+"'");if(0!==c){var d=null,c=this._spatialReferenceCandidates;!c||1>c.length?(d=this.defaultSpatialReference,this._debugLog("No spatial reference found, locking to default ("+u(d)+")")):(this.defaultSpatialReference&&
1<c.length&&-1<m.findIndex(c,function(a){return a.equals(b.defaultSpatialReference)})&&(c=[this.defaultSpatialReference]),d=c[0],this._debugLog("Locking to "+u(d)));this._set("spatialReference",d);this._set("isSpatialReferenceDone",!0);d&&(c=this.logDebugInformation,this.logDebugInformation=!1,this._processMapCollections(function(a){return b._findExtent(a,d)}),this.extent||this._projectExtentCandidate(),this.logDebugInformation=c)}}null==this.heightModelInfo&&this.view.isHeightModelInfoRequired&&
(this._debugLog("Starting search for height model info..."),c=this._processMapCollections(function(a){return b._processHeightModelInfoSource(a)},function(b){return a.mayHaveHeightModelInfo(b)}),this._debugLog("Search ended with status "+z(c)),this._set("isHeightModelInfoSearching",0===c));null==this.tileInfo&&(c=!1,this.view.isTileInfoRequired()&&(c=this._deriveTileInfo()),c||this._set("isTileInfoDone",!0))}};c.prototype._processMapCollections=function(a,b){for(var c=0,d=this.mapCollectionPaths;c<
d.length;c++){var e="map."+d[c],f=this._ensureLoadedOwnersFromCollectionName(e);this._debugLog("Processing collection "+e+"...");if(f.loading&&!this._updateWhen(f.loading))return this._debugLog("Collection "+e+" owner is loading -\x3e wait"),0;f=f.owner;if(!f||f.isRejected&&f.isRejected())this._debugLog("Collection "+e+" owner is invalid or rejected -\x3e skip");else if(f=this.view.get(e)){if(e=this._processMapCollection(f,a,b),2!==e)return e}else this._debugLog("Collection "+e+" does not exist -\x3e skip")}return 2};
c.prototype._processMapCollection=function(a,b,c){for(var d=0;d<a.length;d++){var e=a.getItemAt(d);if(null==c||c(e)){if(e.load&&!e.isFulfilled()&&!this._updateWhen(e.load()))return this._debugLog("Source "+e.id+" is loading -\x3e wait"),0;if(!e.load||e.isResolved()){if(b(e))return 1;if(e.layers&&(e=this._processMapCollection(e.layers,b),2!==e))return e}}else this._debugLog("Source "+e.id+" is skipped due to predicate")}return 2};c.prototype._processSpatialReferenceSource=function(a){var b=this._getSupportedSpatialReferences(a);
if(0===b.length)return!1;this._spatialReferenceCandidates?(b=m.intersect(b,this._spatialReferenceCandidates,function(a,b){return a.equals(b)}),0<b.length?this._spatialReferenceCandidates=b:this._debugLog("Layer "+a.id+" is ignored because its supported spatial\n          references are not compatible with the previous candidates")):this._spatialReferenceCandidates=b;return 1===this._spatialReferenceCandidates.length};c.prototype._findExtent=function(a,b){var c=a.fullExtents||(a.fullExtent?[a.fullExtent]:
[]),d=m.find(c,function(a){return a.spatialReference.equals(b)});if(d)return this._set("extent",d),!0;0<this._getSupportedSpatialReferences(a).length&&(c=c.map(function(b){return{extent:b,layer:a}}),this._extentCandidates=(this._extentCandidates||[]).concat(c));return!1};c.prototype._projectExtentCandidate=function(){var a=this;if(this._extentCandidates&&this._extentCandidates.length){var b=this.spatialReference,c=m.find(this._extentCandidates,function(a){return k.canProject(a.extent.spatialReference,
b)});c?this._set("extent",k.project(c.extent,b)):(c=this._extentCandidates[0],this._extentProjectTask=r.projectGeometry(c.extent,b,c.layer.portalItem).then(function(b){a._set("extent",b)}))}};c.prototype._getSupportedSpatialReferences=function(a){var b=this,c=a.supportedSpatialReferences||(a.spatialReference?[a.spatialReference]:[]);if(0===c.length)return this._debugLog("Layer "+a.id+" is ignored because it does not have any spatial references"),[];c=c.filter(function(c){return b.view.isSpatialReferenceSupported(c,
a,function(a){return b._debugLog(a)})});0===c.length?this._debugLog("Layer "+a.id+" has spatial references but none of them are supported (or layer doesn't require locking)"):this._debugLog("Layer "+a.id+" has spatial references. Resulting candidate set: "+c.map(u).join(", "));return c};c.prototype._processHeightModelInfoSource=function(b){var c=a.deriveHeightModelInfoFromLayer(b);return c?(this._set("heightModelInfo",c),this._set("isHeightModelInfoSearching",!1),b.spatialReference&&(this._set("vcsWkid",
b.spatialReference.vcsWkid),this._set("latestVcsWkid",b.spatialReference.latestVcsWkid)),!0):!1};c.prototype._deriveTileInfo=function(){if(!this.isSpatialReferenceDone)return!0;var a=this.get("view.map");if(!a)return!0;var b=a.basemap,c=b&&b.get("baseLayers.0"),a=a.get("layers.0"),d=!1,e=null;b&&"failed"!==b.loadStatus?b.loaded?c&&"failed"!==c.loadStatus?c.loaded?e=c.tileInfo:(this._updateWhen(c.load()),d=!0):a&&"failed"!==a.loadStatus?a.loaded?e=a.tileInfo:(this._updateWhen(a.load()),d=!0):d=!0:
(this._updateWhen(b.load()),d=!0):a&&"failed"!==a.loadStatus&&(a.loaded?e=a.tileInfo:(this._updateWhen(a.load()),d=!0));e&&!e.spatialReference.equals(this.spatialReference)&&(e=null);d||this._set("tileInfo",e);return d};c.prototype._debugLog=function(a){this.logDebugInformation&&v.info(a)};var d;c.DefaultMapCollectionPaths=["basemap.baseLayers","layers","ground.layers","basemap.referenceLayers"];f([e.property()],c.prototype,"logDebugInformation",void 0);f([e.property({readOnly:!0})],c.prototype,"isSpatialReferenceDone",
void 0);f([e.property({readOnly:!0})],c.prototype,"isTileInfoDone",void 0);f([e.property({readOnly:!0})],c.prototype,"isHeightModelInfoSearching",void 0);f([e.property({constructOnly:!0})],c.prototype,"view",void 0);f([e.property({readOnly:!0})],c.prototype,"spatialReference",void 0);f([e.property({readOnly:!0})],c.prototype,"extent",void 0);f([e.property({readOnly:!0})],c.prototype,"heightModelInfo",void 0);f([e.property({readOnly:!0})],c.prototype,"vcsWkid",void 0);f([e.property({readOnly:!0})],
c.prototype,"latestVcsWkid",void 0);f([e.property()],c.prototype,"mapCollectionPaths",void 0);f([e.property()],c.prototype,"defaultSpatialReference",void 0);f([e.property({readOnly:!0})],c.prototype,"tileInfo",void 0);return c=d=f([e.subclass("esri.views.support.DefaultsFromMap")],c)}(e.declared(l))})},"esri/geometry/support/heightModelInfoUtils":function(){define(["require","exports","../../core/Error","../HeightModelInfo","../../layers/support/arcgisLayerUrl"],function(b,g,p,f,l){function m(a,b,
c){if(h(a)&&h(b)){if(null==a||null==b)return 0;if(c||a.heightUnit===b.heightUnit){if(a.heightModel!==b.heightModel)return 2;switch(a.heightModel){case "gravity-related-height":return 0;case "ellipsoidal":return a.vertCRS===b.vertCRS?0:3;default:return 4}}else return 1}else return 4}function h(a){return null==a||null!=a.heightModel&&null!=a.heightUnit}function c(a){var b=a.url&&l.parse(a.url);return null==(a.spatialReference&&a.spatialReference.vcsWkid)&&b&&"ImageServer"===b.serverType||!a.heightModelInfo?
("hasZ"in a?!0===a.hasZ:q(a))?f.deriveUnitFromSR(e,a.spatialReference):null:a.heightModelInfo}function q(a){switch(a.type){case "elevation":case "integrated-mesh":case "point-cloud":case "scene":return!0}return!1}Object.defineProperty(g,"__esModule",{value:!0});g.validateWebSceneError=function(a,b){if(!a)return null;if(!h(a))return new p("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:a});var c=a.heightUnit;a=f.deriveUnitFromSR(a,
b).heightUnit;return c!==a?new p("webscene:incompatible-height-unit","The vertical units of the scene ("+c+") must match the horizontal units of the scene ("+a+")",{verticalUnit:c,horizontalUnit:a}):null};g.rejectLayerError=function(a,b,e){var g=c(a),h=m(g,b,e),k=null;if(g){var l=f.deriveUnitFromSR(g,a.spatialReference).heightUnit;e||l===g.heightUnit||(k=new p("layerview:unmatched-height-unit","The vertical units of the layer must match the horizontal units ("+l+")",{horizontalUnit:l}))}if(null==
a.heightModelInfo&&null==a.spatialReference&&("hasZ"in a?!0===a.hasZ:q(a))||4===h||k)return new p("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:g,error:k});k=null;switch(h){case 1:a=g.heightUnit||"unknown";e=b.heightUnit||"unknown";k=new p("layerview:incompatible-height-unit","The vertical units of the layer ("+a+") must match the vertical units of the scene ("+e+")",{layerUnit:a,sceneUnit:e});break;case 2:a=g.heightModel||
"unknown";e=b.heightModel||"unknown";k=new p("layerview:incompatible-height-model","The height model of the layer ("+a+") must match the height model of the scene ("+e+")",{layerHeightModel:a,sceneHeightModel:e});break;case 3:a=g.vertCRS||"unknown",e=b.vertCRS||"unknown",k=new p("layerview:incompatible-vertical-datum","The vertical datum of the layer ("+a+") must match the vertical datum of the scene ("+e+")",{layerDatum:a,sceneDatum:e})}return k?new p("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",
{layerHeightModelInfo:g,sceneHeightModelInfo:b,error:k}):null};g.deriveHeightModelInfoFromLayer=c;g.mayHaveHeightModelInfo=function(a){return null!=a.layers||q(a)||void 0!==a.hasZ||void 0!==a.heightModelInfo};var e=new f({heightModel:"gravity-related-height"})})},"esri/portal/support/geometryServiceUtils":function(){define("require exports ../../config ../../core/Error ../../core/promiseUtils ../Portal ../PortalItem ../../tasks/GeometryService ../../tasks/support/ProjectParameters".split(" "),function(b,
g,p,f,l,m,h,c,q){function e(a){void 0===a&&(a=null);if(p.geometryServiceUrl)return l.resolve(new c({url:p.geometryServiceUrl}));if(!a)return l.reject(new f("internal:geometry-service-url-not-configured"));var b;a.isInstanceOf(h)?b=a.portal||m.getDefault():a.isInstanceOf(m)&&(b=a);return b.load().then(function(a){if(a.helperServices&&a.helperServices.geometry&&a.helperServices.geometry.url)return l.resolve(new c({url:a.helperServices.geometry.url}));throw new f("internal:geometry-service-url-not-configured");
})}Object.defineProperty(g,"__esModule",{value:!0});g.create=e;g.projectGeometry=function(a,b,c){void 0===c&&(c=null);return e(c).then(function(c){var e=new q;e.geometries=[a];e.outSpatialReference=b;return c.project(e)}).then(function(a){return a&&Array.isArray(a)&&1===a.length?a[0]:l.reject()})}})},"esri/views/ViewAnimation":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/Deferred ../core/Accessor ../core/Error ../core/Promise ../core/promiseUtils ../core/scheduling ../core/accessorSupport/decorators".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a){b=function(b){function c(a){a=b.call(this)||this;a.state="running";a.target=null;return a}p(c,b);c.prototype.initialize=function(){this._dfd=new l;this.addResolvingPromise(this._dfd.promise)};Object.defineProperty(c.prototype,"done",{get:function(){return"finished"===this.state||"stopped"===this.state},enumerable:!0,configurable:!0});c.prototype.stop=function(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","stopped"),e.schedule(this._dfd.reject.bind(this._dfd,
new h("ViewAnimation stopped"))))};c.prototype.finish=function(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","finished"),e.schedule(this._dfd.resolve))};c.prototype.update=function(a,b){b||(b=q.isThenable(a)?"waiting-for-target":"running");this._set("target",a);this._set("state",b)};f([a.property({readOnly:!0,dependsOn:["state"]})],c.prototype,"done",null);f([a.property({readOnly:!0,type:String})],c.prototype,"state",void 0);f([a.property()],c.prototype,"target",void 0);return c=
f([a.subclass("esri.views.ViewAnimation")],c)}(a.declared(m,c));(b||(b={})).State={RUNNING:"running",STOPPED:"stopped",FINISHED:"finished",WAITING_FOR_TARGET:"waiting-for-target"};return b})},"esri/widgets/Widget":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/dom ../core/Accessor ../core/Collection ../core/Evented ../core/Handles ../core/Logger ../core/watchUtils ../core/accessorSupport/decorators ./support/widget maquette".split(" "),
function(b,g,p,f,l,m,h,c,q,e,a,k,r,u,z){var v=a.getLogger("esri.widgets.Widget"),w=0;return function(a){function b(b,c){b=a.call(this)||this;b._attached=!1;b.destroyed=!1;b.domNode=null;b.iconClass="esri-icon-checkbox-unchecked";b.visible=!0;b._internalHandles=new e;b.render=b.render.bind(b);return b}f(b,a);b.prototype.normalizeCtorArgs=function(a,b){a=p({},a);b&&(a.container=b);return a};b.prototype.initialize=function(){var a=this;this._internalHandles.add(this._renderableProps.map(function(b){return k.init(a,
b,function(a,d){var e=this;c.isCollection(d)&&this._internalHandles.remove(this.declaredClass+":"+b+"-collection-change-event-listener");c.isCollection(a)&&(a=a.on("change",function(){return e.scheduleRender()}),this._internalHandles.add(a,this.declaredClass+":"+b+"-collection-change-event-listener"));this.scheduleRender()})}));this._delegatedEventNames.length&&this._internalHandles.add(k.init(this,"viewModel",function(){a._get("viewModel")&&a._internalHandles.remove("delegated-events");a._delegatedEventNames.map(function(b){return a.viewModel.on(b,
function(c){a.emit(b,c)})})}),"delegated-events");this.postInitialize();this._internalHandles.add(k.whenOnce(this,"container",function(b){return a._attach(b)}))};b.prototype.postInitialize=function(){};b.prototype.destroy=function(){this.destroyed||(this.viewModel&&this.viewModel.destroy(),this._detach(this.container),this._internalHandles.destroy(),this._set("destroyed",!0))};b.prototype.startup=function(){v.warn("Widget.startup() is deprecated and no longer needed")};Object.defineProperty(b.prototype,
"container",{set:function(a){this._get("container")||this._set("container",a)},enumerable:!0,configurable:!0});b.prototype.castContainer=function(a){return m.byId(a)};Object.defineProperty(b.prototype,"id",{get:function(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+w++},set:function(a){a&&this._set("id",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"label",{get:function(){return this.declaredClass.split(".").pop()},enumerable:!0,configurable:!0});
b.prototype.scheduleRender=function(){this._projector.scheduleRender()};b.prototype.on=function(a,b){var c=this.inherited(arguments);this._internalHandles.add(c);return c};b.prototype.classes=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];return u.classes.apply(this,a)};b.prototype.own=function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments));this._internalHandles.add(a)};b.prototype.renderNow=function(){this._projector.renderNow()};b.prototype._attach=function(a){a&&
(this._projector.merge(a,this.render),this._attached=!0)};b.prototype._detach=function(a){a&&this._attached&&(this._projector.detach(this.render),a.parentNode&&a.parentNode.removeChild(a),this._attached=!1)};l([r.shared(z.createProjector())],b.prototype,"_projector",void 0);l([r.shared([])],b.prototype,"_renderableProps",void 0);l([r.shared([])],b.prototype,"_delegatedEventNames",void 0);l([r.property({value:null})],b.prototype,"container",null);l([r.cast("container")],b.prototype,"castContainer",
null);l([r.property({readOnly:!0})],b.prototype,"destroyed",void 0);l([r.property({aliasOf:"container"})],b.prototype,"domNode",void 0);l([r.property({readOnly:!0})],b.prototype,"iconClass",void 0);l([r.property({dependsOn:["container"]})],b.prototype,"id",null);l([r.property({readOnly:!0})],b.prototype,"label",null);l([r.property()],b.prototype,"viewModel",void 0);l([r.property()],b.prototype,"visible",void 0);return b=l([r.subclass("esri.widgets.Widget")],b)}(r.declared(h,q))})},"esri/widgets/support/widget":function(){define(["require",
"exports","./decorators","./jsxFactory","./widgetUtils"],function(b,g,p,f,l){function m(b){for(var c in b)g.hasOwnProperty(c)||(g[c]=b[c])}Object.defineProperty(g,"__esModule",{value:!0});m(p);m(f);m(l);g.isWidget=function(b){return b&&"function"===typeof b.render};g.isWidgetBase=function(b){return b&&"function"===typeof b.postMixInProperties&&"function"===typeof b.buildRendering&&"function"===typeof b.postCreate&&"function"===typeof b.startup}})},"esri/widgets/support/decorators":function(){define(["require",
"exports","./decorators/accessibleHandler","./decorators/renderable","./decorators/vmEvent"],function(b,g,p,f,l){function m(b){for(var c in b)g.hasOwnProperty(c)||(g[c]=b[c])}Object.defineProperty(g,"__esModule",{value:!0});m(p);m(f);m(l)})},"esri/widgets/support/decorators/accessibleHandler":function(){define(["require","exports","dojo/keys"],function(b,g,p){function f(b){return function(f){for(var g=[],c=1;c<arguments.length;c++)g[c-1]=arguments[c];c=f.type;if(f instanceof KeyboardEvent||"keyup"===
c||"keydown"===c||"keypress"===c){if(f.keyCode===p.ENTER||f.keyCode===p.SPACE)f.preventDefault(),f.target.click()}else b.call.apply(b,[this,f].concat(g))}}Object.defineProperty(g,"__esModule",{value:!0});g.accessibleHandler=function(){return function(b,g){return{value:f(b[g])}}}})},"esri/widgets/support/decorators/renderable":function(){define(["require","exports","./propUtils"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.renderable=function(b){var f="string"===typeof b?p.splitProps(b):
b;return function(b,g){b._renderableProps||(b._renderableProps=[]);b=b._renderableProps;f?b.push.apply(b,p.normalizePropNames(f,g)):b.push(g)}}})},"esri/widgets/support/decorators/propUtils":function(){define(["require","exports"],function(b,g){Object.defineProperty(g,"__esModule",{value:!0});g.splitProps=function(b){return b.split(",").map(function(b){return b.trim()})};g.normalizePropNames=function(b,f){return b.map(function(b){b=0===b.indexOf(f)?b:f+"."+b;return b})}})},"esri/widgets/support/decorators/vmEvent":function(){define(["require",
"exports","./propUtils"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.vmEvent=function(b){return function(f){f._delegatedEventNames||(f._delegatedEventNames=[]);var g=Array.isArray(b)?b:p.splitProps(b);f._delegatedEventNames=f._delegatedEventNames.concat(g)}}})},"esri/widgets/support/jsxFactory":function(){define(["require","exports","maquette-jsx"],function(b,g,p){Object.defineProperty(g,"__esModule",{value:!0});g.tsx=function(b,g){for(var f=[],h=2;h<arguments.length;h++)f[h-
2]=arguments[h];g&&""===g.class&&delete g.class;return p.jsx.apply(void 0,[b,g].concat(f))}})},"maquette-jsx/dist/maquette-jsx.umd":function(){(function(b,g){"object"===typeof exports&&"undefined"!==typeof module?g(exports):"function"===typeof define&&define.amd?define(["exports"],g):g(b.maquetteCssTransitions={})})(this,function(b){var g=function(b,l){for(var f=0,h=b.length;f<h;f++){var c=b[f];Array.isArray(c)?g(c,l):null!==c&&void 0!==c&&!1!==c&&(c.hasOwnProperty("vnodeSelector")||(c={vnodeSelector:"",
properties:void 0,children:void 0,text:c.toString(),domNode:null}),l.push(c))}},p=function(b,l){for(var f=[],h=2;h<arguments.length;h++)f[h-2]=arguments[h];if(1===f.length&&"string"===typeof f[0])return{vnodeSelector:b,properties:l||void 0,children:void 0,text:f[0],domNode:null};h=[];g(f,h);return{vnodeSelector:b,properties:l||void 0,children:h,text:void 0,domNode:null}};b.jsx=p;b.enableGlobalJsx=function(){window.jsx=p};Object.defineProperty(b,"__esModule",{value:!0})})},"esri/widgets/support/widgetUtils":function(){define("require exports dojo/has ../../core/ArrayPool ../../core/Logger maquette-css-transitions".split(" "),
function(b,g,p,f,l,m){Object.defineProperty(g,"__esModule",{value:!0});l.getLogger("esri.widgets.support.widgetUtils");g.join=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];return b.join(" ")};g.classes=function(b){for(var c=f.acquire(),g=0;g<arguments.length;g++){var e=arguments[g],a=typeof e;if("string"===a)c.push(e);else if(Array.isArray(e))c.push.apply(c,e);else if("object"===a)for(var h in e)e[h]&&c.push(h)}g=c.join(" ");f.release(c);return g};g.isRtl=function(){return"rtl"===
document.dir};g.storeNode=function(b){this[b.getAttribute("data-node-ref")]=b};g.cssTransition=function(b,c){return("enter"===b?m.createEnterCssTransition:m.createExitCssTransition)(c)}})},"maquette-css-transitions/dist/maquette-css-transitions.umd":function(){(function(b,g){"object"===typeof exports&&"undefined"!==typeof module?g(exports):"function"===typeof define&&define.amd?define(["exports"],g):g(b.maquetteCssTransitions={})})(this,function(b){var g,p,f=function(b){if("WebkitTransition"in b.style)g=
"webkitTransitionEnd",p="webkitAnimationEnd";else if("transition"in b.style)g="transitionend",p="animationend";else throw Error("Your browser is not supported!");};b.createEnterCssTransition=function(b,m){void 0===m&&(m=b+"-active");return function(h){g||f(h);var c=!1,l=function(e){c||(c=!0,h.removeEventListener(g,l),h.removeEventListener(p,l),h.classList.remove(b),h.classList.remove(m))};h.classList.add(b);h.addEventListener(g,l);h.addEventListener(p,l);requestAnimationFrame(function(){h.classList.add(m)})}};
b.createExitCssTransition=function(b,m){void 0===m&&(m=b+"-active");return function(h,c){g||f(h);var l=!1,e=function(a){l||(l=!0,h.removeEventListener(g,e),h.removeEventListener(p,e),c())};h.classList.add(b);h.addEventListener(g,e);h.addEventListener(p,e);requestAnimationFrame(function(){h.classList.add(m)})}};Object.defineProperty(b,"__esModule",{value:!0})})},"maquette/dist/maquette.umd":function(){(function(b,g){"object"===typeof exports&&"undefined"!==typeof module?g(exports):"function"===typeof define&&
define.amd?define(["exports"],g):g(b.maquette={})})(this,function(b){var g=[],p=function(a,b){var c={};Object.keys(a).forEach(function(b){c[b]=a[b]});b&&Object.keys(b).forEach(function(a){c[a]=b[a]});return c},f=function(a,b){return a.vnodeSelector!==b.vnodeSelector?!1:a.properties&&b.properties?a.properties.key!==b.properties.key?!1:a.properties.bind===b.properties.bind:!a.properties&&!b.properties},l=function(a){if("string"!==typeof a)throw Error("Style values must be strings");},m=function(a,b,
c,d){var e=a[b];if(""!==e.vnodeSelector){var g=e.properties;if(!(g&&(void 0===g.key?g.bind:g.key)))for(g=0;g<a.length;g++)if(g!==b&&f(a[g],e))throw Error(c.vnodeSelector+" had a "+e.vnodeSelector+" child "+("added"===d?d:"removed")+", but there is now more than one. You must add unique key properties to make them distinguishable.");}},h=[],c=!1,q=function(a){(a.children||[]).forEach(q);a.properties&&a.properties.afterRemoved&&a.properties.afterRemoved.apply(a.properties.bind||a.properties,[a.domNode])},
e=function(){c=!1;h.forEach(q);h.length=0},a=function(a){h.push(a);c||(c=!0,"undefined"!==typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:16}):setTimeout(e,16))},k=function(b){var c=b.domNode;if(b.properties){var d=b.properties.exitAnimation;if(d){c.style.pointerEvents="none";d(c,function(){c.parentNode&&(c.parentNode.removeChild(c),a(b))},b.properties);return}}c.parentNode&&(c.parentNode.removeChild(c),a(b))},r=function(a,b,c){if(b)for(var d=c.eventHandlerInterceptor,
e=Object.keys(b),f=e.length,g=function(f){f=e[f];var g=b[f];if("className"===f)throw Error('Property "className" is not supported, use "class".');if("class"===f)g.split(/\s+/).forEach(function(b){return a.classList.add(b)});else if("classes"===f){var h=Object.keys(g),k=h.length;for(f=0;f<k;f++){var m=h[f];g[m]&&a.classList.add(m)}}else if("styles"===f)for(h=Object.keys(g),k=h.length,f=0;f<k;f++){var m=h[f],n=g[m];n&&(l(n),c.styleApplyer(a,m,n))}else"key"!==f&&null!==g&&void 0!==g&&(h=typeof g,"function"===
h?0===f.lastIndexOf("on",0)&&(d&&(g=d(f,g,a,b)),"oninput"===f&&function(){var a=g;g=function(b){a.apply(this,[b]);b.target["oninput-value"]=b.target.value}}(),a[f]=g):"string"===h&&"value"!==f&&"innerHTML"!==f?"http://www.w3.org/2000/svg"===c.namespace&&"href"===f?a.setAttributeNS("http://www.w3.org/1999/xlink",f,g):a.setAttribute(f,g):a[f]=g)},h=0;h<f;h++)g(h)},u=function(a,b,c){var d=b.children;if(d)for(var e=0;e<d.length;e++)z(d[e],a,void 0,c);b.text&&(a.textContent=b.text);r(a,b.properties,c);
b.properties&&b.properties.afterCreate&&b.properties.afterCreate.apply(b.properties.bind||b.properties,[a,c,b.vnodeSelector,b.properties,b.children])},z=function(a,b,c,d){var e,f=0,g=a.vnodeSelector,h=b.ownerDocument;if(""===g)e=a.domNode=h.createTextNode(a.text),void 0!==c?b.insertBefore(e,c):b.appendChild(e);else{for(var k=0;k<=g.length;++k){var l=g.charAt(k);if(k===g.length||"."===l||"#"===l)l=g.charAt(f-1),f=g.slice(f,k),"."===l?e.classList.add(f):"#"===l?e.id=f:("svg"===f&&(d=p(d,{namespace:"http://www.w3.org/2000/svg"})),
void 0!==d.namespace?e=a.domNode=h.createElementNS(d.namespace,f):(e=a.domNode=a.domNode||h.createElement(f),"input"===f&&a.properties&&void 0!==a.properties.type&&e.setAttribute("type",a.properties.type)),void 0!==c?b.insertBefore(e,c):e.parentNode!==b&&b.appendChild(e)),f=k+1}u(e,a,d)}},v,w=function(a,b,c){b&&b.split(" ").forEach(function(b){return a.classList.toggle(b,c)})};v=function(a,b,c){var d=a.domNode;if(a===b)return!1;var e=!1;if(""===b.vnodeSelector){if(b.text!==a.text)return a=d.ownerDocument.createTextNode(b.text),
d.parentNode.replaceChild(a,d),b.domNode=a,!0;b.domNode=d}else{0===b.vnodeSelector.lastIndexOf("svg",0)&&(c=p(c,{namespace:"http://www.w3.org/2000/svg"}));a.text!==b.text&&(e=!0,void 0===b.text?d.removeChild(d.firstChild):d.textContent=b.text);b.domNode=d;var h;h=a.children;var n=b.children,q=c;if(h===n)h=!1;else{h=h||g;for(var n=n||g,r=h.length,t=n.length,u=0,x=0,y=!1;x<t;){var A=u<r?h[u]:void 0,B=n[x];if(void 0!==A&&f(A,B))y=v(A,B,q)||y,u++;else{b:{var A=h,C=B;if(""!==C.vnodeSelector)for(var F=
u+1;F<A.length;F++)if(f(A[F],C)){A=F;break b}A=-1}if(0<=A){for(;u<A;u++)k(h[u]),m(h,u,b,"removed");y=v(h[A],B,q)||y;u=A+1}else z(B,d,u<r?h[u].domNode:void 0,q),B.properties&&(A=B.properties.enterAnimation)&&A(B.domNode,B.properties),m(n,x,b,"added")}x++}if(r>u)for(;u<r;u++)k(h[u]),m(h,u,b,"removed");h=y}e=h||e;h=a.properties;n=b.properties;q=c;if(n){r=!1;t=Object.keys(n);x=t.length;for(y=0;y<x;y++)if(A=t[y],B=n[A],u=h[A],"class"===A)u!==B&&(w(d,u,!1),w(d,B,!0));else if("classes"===A)for(var C=d.classList,
F=Object.keys(B),D=F.length,A=0;A<D;A++){var Q=F[A],U=!!B[Q];U!==!!u[Q]&&(r=!0,U?C.add(Q):C.remove(Q))}else if("styles"===A)for(C=Object.keys(B),F=C.length,A=0;A<F;A++)D=C[A],Q=B[D],Q!==u[D]&&(r=!0,Q?(l(Q),q.styleApplyer(d,D,Q)):q.styleApplyer(d,D,""));else B||"string"!==typeof u||(B=""),"value"===A?(C=d[A],C!==B&&(d["oninput-value"]?C===d["oninput-value"]:B!==u)&&(d[A]=B,d["oninput-value"]=void 0),B!==u&&(r=!0)):B!==u&&(u=typeof B,"function"===u&&q.eventHandlerInterceptor||("string"===u&&"innerHTML"!==
A?"http://www.w3.org/2000/svg"===q.namespace&&"href"===A?d.setAttributeNS("http://www.w3.org/1999/xlink",A,B):"role"===A&&""===B?d.removeAttribute(A):d.setAttribute(A,B):d[A]!==B&&(d[A]=B),r=!0));h=r}else h=void 0;e=h||e;b.properties&&b.properties.afterUpdate&&b.properties.afterUpdate.apply(b.properties.bind||b.properties,[d,c,b.vnodeSelector,b.properties,b.children])}e&&b.properties&&b.properties.updateAnimation&&b.properties.updateAnimation(d,b.properties,a.properties);return!1};var t=function(a,
b){return{getLastRender:function(){return a},update:function(c){if(a.vnodeSelector!==c.vnodeSelector)throw Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var d=a;a=c;v(d,c,b)},domNode:a.domNode}},d={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(a,b,c){a.style[b]=c}},n={create:function(a,b){b=p(d,b);z(a,document.createElement("div"),void 0,b);return t(a,b)},append:function(a,
b,c){c=p(d,c);z(b,a,void 0,c);return t(b,c)},insertBefore:function(a,b,c){c=p(d,c);z(b,a.parentNode,a,c);return t(b,c)},merge:function(a,b,c){c=p(d,c);b.domNode=a;u(a,b,c);return t(b,c)},replace:function(a,b,c){c=p(d,c);z(b,a.parentNode,a,c);a.parentNode.removeChild(a);return t(b,c)}},x=function(a,b,c){for(var d=0,e=b.length;d<e;d++){var f=b[d];Array.isArray(f)?x(a,f,c):null!==f&&void 0!==f&&!1!==f&&("string"===typeof f&&(f={vnodeSelector:"",properties:void 0,children:void 0,text:f.toString(),domNode:null}),
c.push(f))}},y;y=Array.prototype.find?function(a,b){return a.find(b)}:function(a,b){return a.filter(b)[0]};var A=function(a,b){var c=a;b.forEach(function(a){c=c&&c.children?y(c.children,function(b){return b.domNode===a}):void 0});return c},D=function(a,b,c){var d=function(d){c("domEvent",d);var e=b(),f;f=d.currentTarget;for(var g=e.domNode,h=[];f!==g;)h.push(f),f=f.parentNode;f=h;f.reverse();e=A(e.getLastRender(),f);a.scheduleRender();var k;e&&(k=e.properties["on"+d.type].apply(e.properties.bind||
this,arguments));c("domEventProcessed",d);return k};return function(a,b,c,e){return d}};b.dom=n;b.h=function(a,b,c){if(Array.isArray(b))c=b,b=void 0;else if(b&&("string"===typeof b||b.hasOwnProperty("vnodeSelector"))||c&&("string"===typeof c||c.hasOwnProperty("vnodeSelector")))throw Error("h called with invalid arguments");var d,e;void 0!==c&&1===c.length&&"string"===typeof c[0]?d=c[0]:c&&(e=[],x(a,c,e),0===e.length&&(e=void 0));return{vnodeSelector:a,properties:b,children:e,text:""===d?void 0:d,
domNode:null}};b.createProjector=function(a){var b,c=p(d,a),e=c.performanceLogger,f=!0,g,h=!1,k=[],l=[],m=function(a,d,f){var g;c.eventHandlerInterceptor=D(b,function(){return g},e);g=a(d,f(),c);k.push(g);l.push(f)},q=function(){g=void 0;if(f){f=!1;e("renderStart",void 0);for(var a=0;a<k.length;a++){var b=l[a]();e("rendered",void 0);k[a].update(b);e("patched",void 0)}e("renderDone",void 0);f=!0}};return b={renderNow:q,scheduleRender:function(){g||h||(g=requestAnimationFrame(q))},stop:function(){g&&
(cancelAnimationFrame(g),g=void 0);h=!0},resume:function(){h=!1;f=!0;b.scheduleRender()},append:function(a,b){m(n.append,a,b)},insertBefore:function(a,b){m(n.insertBefore,a,b)},merge:function(a,b){m(n.merge,a,b)},replace:function(a,b){m(n.replace,a,b)},detach:function(a){for(var b=0;b<l.length;b++)if(l[b]===a)return l.splice(b,1),k.splice(b,1)[0];throw Error("renderFunction was not found");}}};b.createCache=function(){var a,b;return{invalidate:function(){a=b=void 0},result:function(c,d){if(a)for(var e=
0;e<c.length;e++)a[e]!==c[e]&&(b=void 0);b||(b=d(),a=c);return b}}};b.createMapping=function(a,b,c){var d=[],e=[];return{results:e,map:function(f){for(var g=f.map(a),h=e.slice(),k=0,l=0;l<f.length;l++){var m=f[l],n=g[l];if(n===d[k])e[l]=h[k],c(m,h[k],l),k++;else{for(var p=!1,q=1;q<d.length+1;q++){var r=(k+q)%d.length;if(d[r]===n){e[l]=h[r];c(f[l],h[r],l);k=r+1;p=!0;break}}p||(e[l]=b(m,l))}}e.length=f.length;d=g}}};Object.defineProperty(b,"__esModule",{value:!0})})},"url:esri/core/request/iframe.html":'\x3c!DOCTYPE html\x3e\r\n\x3chtml\x3e\r\n\x3chead\x3e\r\n  \x3cmeta http-equiv\x3d"Content-Security-Policy" content\x3d"default-src \'none\'; script-src * \'unsafe-inline\'"\x3e\r\n\r\n  \x3cscript\x3e\r\n    var dojoConfig \x3d {\r\n      async: true,\r\n      baseUrl: "../../../dojo/",\r\n      has: {\r\n        "csp-restrictions": true,\r\n        "dojo-preload-i18n-Api": false\r\n      }\r\n    };\r\n  \x3c/script\x3e\r\n  \x3c!--\r\n  This src is relative to this page and assumes dojo is a sibling to esri.\r\n  It is updated when this file is set as the iframe\'s `srcdoc` value.\r\n  --\x3e\r\n  \x3cscript src\x3d"../../../dojo/dojo.js"\x3e\x3c/script\x3e\r\n\r\n  \x3cscript\x3e\r\n    function windowMessageHandler(event) {\r\n      window.removeEventListener("message", windowMessageHandler);\r\n\r\n      var port \x3d event.ports[0];\r\n\r\n      require([\r\n        "dojo/request/script"\r\n      ], function(script) {\r\n        port.postMessage("ready");\r\n\r\n        port.addEventListener("message", function(event) {\r\n          var data \x3d event.data;\r\n          script.get(data.url, data.options)\r\n              .then(function(response) {\r\n                port.postMessage({\r\n                  id: data.id,\r\n                  response: response\r\n                });\r\n              })\r\n              .catch(function(error) {\r\n                port.postMessage({\r\n                  id: data.id,\r\n                  isError: true,\r\n                  message: error.message\r\n                });\r\n              });\r\n        });\r\n        port.start();\r\n      });\r\n    }\r\n\r\n    window.addEventListener("message", windowMessageHandler);\r\n  \x3c/script\x3e\r\n\x3c/head\x3e\r\n\x3cbody\x3e\r\n\x3c/body\x3e\r\n\x3c/html\x3e\r\n',
"*now":function(b){b(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});require.boot&&require.apply(null,require.boot);