MapView.js 616 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  2. // See https://js.arcgis.com/4.7/esri/copyright.txt for details.
  3. //>>built
  4. require({cache:{"esri/core/workers":function(){define(["require","exports","./workers/workers"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});for(var a in b)g.hasOwnProperty(a)||(g[a]=b[a])})},"esri/core/workers/workers":function(){define("require exports dojo/sniff dojo/promise/all ../Logger ../promiseUtils ./Connection ./RemoteClient ./WorkerOwner".split(" "),function(p,g,b,a,e,d,c,k,f){function l(){if(q)return q;for(var b=h+n,c=[],d=function(a){var b=f.create(a).then(function(b){return u[a]=
  5. b});c.push(b)},e=0;e<b;e++)d(e);return q=a(c).then(function(){})}Object.defineProperty(g,"__esModule",{value:!0});g.Connection=c;g.RemoteClient=k;(c=b("host-browser")?navigator.hardwareConcurrency:0)||(c=b("safari")&&b("mac")||b("trident")?8:2);var h=b("esri-workers-debug")?1:Math.max(1,Math.ceil(c/2)),n=b("esri-workers-debug")?1:Math.max(1,Math.floor(c/2)),r=e.getLogger("esri.core.workers"),m=0,u=[];g.initialize=function(){l()};g.open=function(a,b,c){void 0===b&&(b={});if(Array.isArray(a))return new g.Connection(a.map(function(a){return new g.RemoteClient(a,
  6. b.client)}));if("string"!==typeof a){r.warn("workers-open:signature-deprecated","DEPRECATED: workers.open() changed signature.");var e=a;a=b;b={client:e,strategy:c?"dedicated":"distributed"}}var f=b.strategy||"distributed";return"local"===f?d.create(function(b){p([a],function(a){b(g.RemoteClient.connect(a))})}).then(function(a){return new g.Connection([new g.RemoteClient(a,b.client)])}):l().then(function(){if("dedicated"===f){var c=h+m++;m%=n;return u[c].open(a).then(function(a){return new g.Connection([new g.RemoteClient(a,
  7. b.client)])})}return d.all(u.map(function(b){return b.open(a)})).then(function(a){return new g.Connection(a.map(function(a){return new g.RemoteClient(a,b.client)}))})})};g.terminate=function(){for(var a=0;a<u.length;a++)u[a]&&u[a].terminate();u.length=0};var q})},"esri/core/workers/Connection":function(){define(["require","exports","../promiseUtils"],function(p,g,b){return function(){function a(a){this._clientIdx=0;this._clients=a}a.prototype.broadcast=function(a,b,c){for(var d=[],e=0,l=this._clients;e<
  8. l.length;e++)d.push(l[e].invoke(a,b,c));return d};a.prototype.close=function(){for(var a=0,b=this._clients;a<b.length;a++)b[a].close();this._clients=[]};a.prototype.invoke=function(a,b,c,k){var d=k&&k.client;null!=d&&-1!==this._clients.indexOf(d)||this._clients.some(function(a){return a.isBusy()?!1:(d=a,!0)})||(this._clientIdx=(this._clientIdx+1)%this._clients.length,d=this._clients[this._clientIdx]);a=d.invoke(a,b,c);k&&(k.client=d);return a};a.prototype.openPorts=function(){return b.all(this._clients.map(function(a){return a.openPort()}))};
  9. return a}()})},"esri/core/workers/RemoteClient":function(){define("require exports dojo/Deferred ../Error ../promiseUtils ./utils".split(" "),function(p,g,b,a,e,d){function c(a,b){a["delete"](b)}var k=d.MessageType.CLOSE,f=d.MessageType.CANCEL,l=d.MessageType.INVOKE,h=d.MessageType.RESPONSE,n=d.MessageType.OPEN_PORT,r=function(){function a(a){this._timer=null;this._cancelledJobIds=new Set;this._invokeMessages=[];this._invoke=a;this._timer=null;this._process=this._process.bind(this)}a.prototype.push=
  10. function(a){a.type===d.MessageType.CANCEL?this._cancelledJobIds.add(a.jobId):(this._invokeMessages.push(a),null===this._timer&&(this._timer=setTimeout(this._process,0)))};a.prototype.clear=function(){this._invokeMessages.length=0;this._cancelledJobIds.clear();this._timer=null};a.prototype._process=function(){this._timer=null;for(var a=0,b=this._invokeMessages;a<b.length;a++){var c=b[a];this._cancelledJobIds.has(c.jobId)||this._invoke(c)}this._cancelledJobIds.clear();this._invokeMessages.length=0};
  11. return a}();return function(){function m(a,b,c){this._outJobs=new Map;this._inJobs=new Map;this._queue=new r(this._onInvoke.bind(this));this._onMessage=this._onMessage.bind(this);this._client=b;this._port=a;this._port.addEventListener("message",this._onMessage);this._port.start();this._channel=c}m.connect=function(a){var b=new MessageChannel;a="function"===typeof a?new a:"default"in a&&"function"===typeof a.default?new a.default:a;a.remoteClient=new m(b.port1,a,b);return b.port2};m.prototype.close=
  12. function(){this._post({type:k});this._close()};m.prototype.isBusy=function(){return 0<this._outJobs.size};m.prototype.invoke=function(a,e,h){var k=this,n=d.newJobId(),r=new b(function(){c(k._outJobs,n);k._post({type:f,jobId:n})});this._outJobs.set(n,r);this._post({type:l,jobId:n,methodName:a},e,h);return r.promise};m.prototype.openPort=function(){var a=this,e=d.newJobId(),h=new b(function(){c(a._outJobs,e);a._post({type:f,jobId:e})});this._outJobs.set(e,h);this._post({type:n,jobId:e});return h.promise};
  13. m.prototype._close=function(){this._channel&&(this._channel=null);this._port.removeEventListener("message",this._onMessage);this._port.close();this._outJobs.forEach(function(a){a.cancel()});this._inJobs.clear();this._outJobs.clear();this._queue.clear();this._port=this._client=null};m.prototype._onMessage=function(a){if(a=d.receiveMessage(a))switch(a.type){case h:this._onResponse(a);break;case l:this._queue.push(a);break;case f:this._onCancel(a);break;case k:this._close();break;case n:this._onOpenPort(a)}};
  14. m.prototype._onCancel=function(a){var b=this._inJobs,d=a.jobId,e=b.get(d);this._queue.push(a);e&&(c(b,d),e.cancel())};m.prototype._onInvoke=function(a){var b=this,k=a.methodName,f=a.jobId;a=a.data;var l=this._inJobs,n=this._client,r=n[k],m;try{if(!r&&k&&-1!==k.indexOf("."))for(var u=k.split("."),g=0;g<u.length-1;g++)n=n[u[g]],r=n[u[g+1]];if("function"!==typeof r)throw new TypeError(k+" is not a function");m=r.call(n,a,this)}catch(C){this._post({type:h,jobId:f,error:d.toInvokeError(C)});return}e.isThenable(m)?
  15. (l.set(f,m),m.then(function(a){l.has(f)&&(c(l,f),b._post({type:h,jobId:f},a))}).catch(function(a){l.has(f)&&(c(l,f),a&&"cancel"===a.dojoType||b._post({type:h,jobId:f,error:d.toInvokeError(a||{message:"Error encountered at method "+k})}))})):this._post({type:h,jobId:f},m)};m.prototype._onOpenPort=function(a){var b=new MessageChannel;new m(b.port1,this._client);this._post({type:h,jobId:a.jobId},b.port2,[b.port2])};m.prototype._onResponse=function(b){var d=b.jobId,e=b.error;b=b.data;var h=this._outJobs;
  16. if(h.has(d)){var k=h.get(d);c(h,d);e?k.reject(a.fromJSON(JSON.parse(e))):k.resolve(b)}};m.prototype._post=function(a,b,c){return d.postMessage(this._port,a,b,c)};return m}()})},"esri/core/workers/utils":function(){define(["require","exports","dojo/has"],function(p,g,b){function a(a){return a&&"object"===typeof a&&("result"in a||"transferList"in a)}Object.defineProperty(g,"__esModule",{value:!0});(function(a){a[a.HANDSHAKE=0]="HANDSHAKE";a[a.CONFIGURE=1]="CONFIGURE";a[a.CONFIGURED=2]="CONFIGURED";
  17. a[a.OPEN=3]="OPEN";a[a.OPENED=4]="OPENED";a[a.RESPONSE=5]="RESPONSE";a[a.INVOKE=6]="INVOKE";a[a.CANCEL=7]="CANCEL";a[a.CLOSE=8]="CLOSE";a[a.OPEN_PORT=9]="OPEN_PORT"})(g.MessageType||(g.MessageType={}));var e=0;g.newJobId=function(){return e++};g.isTranferableResult=a;g.toInvokeError=function(a){return a?a.toJSON?JSON.stringify(a):JSON.stringify({name:a.name,message:a.message,details:a.details,stack:a.stack}):null};g.postMessage=function(d,c,e,f){2===arguments.length||void 0===e&&void 0===f?d.postMessage(c):
  18. (b("esri-workers-supports-transfer-arraybuffer")||(f?(f=f.filter(function(a){return!(a instanceof ArrayBuffer)}),f.length||(f=null)):a(e)&&e.transferList&&(e.transferList=e.transferList.filter(function(a){return!(a instanceof ArrayBuffer)}),e.transferList.length||(e.transferList=null))),f?(c.data=e,d.postMessage(c,f)):a(e)?(c.data=e.result,e.transferList?d.postMessage(c,e.transferList):d.postMessage(c)):(c.data=e,d.postMessage(c)))};g.receiveMessage=function(a){return a?(a=a.data)?"string"===typeof a?
  19. JSON.parse(a):a:null:null}})},"esri/core/workers/WorkerOwner":function(){define("require exports dojo/Deferred ../../kernel ../Error ../Logger ../promiseUtils ./utils ./workerFactory".split(" "),function(p,g,b,a,e,d,c,k,f){var l=d.getLogger("esri.core.workers"),h=k.MessageType.CANCEL,n=k.MessageType.INVOKE,r=k.MessageType.OPEN,m=k.MessageType.OPENED,u=k.MessageType.RESPONSE;return function(){function d(a,b){this._outJobs=new Map;this._inJobs=new Map;this.worker=a;this.id=b;a.addEventListener("message",
  20. this._onMessage.bind(this));a.addEventListener("error",function(a){a.preventDefault();l.error(a)})}d.create=function(a){return f.createWorker().then(function(b){return new d(b,a)})};d.prototype.terminate=function(){this.worker.terminate()};d.prototype.open=function(a){var c=this,d=k.newJobId(),e=new b(function(a){c._outJobs["delete"](d);c._post({type:h,jobId:d})});this._outJobs.set(d,e);this._post({type:r,jobId:d,modulePath:a});return e.promise};d.prototype._onMessage=function(a){if(a=k.receiveMessage(a))switch(a.type){case m:case u:this._onResponse(a);
  21. break;case h:this._onCancel(a);break;case n:this._onInvoke(a)}};d.prototype._onCancel=function(a){(a=this._inJobs.get(a.jobId))&&a.cancel()};d.prototype._onInvoke=function(b){var d=this,e=b.methodName,h=b.jobId;b=b.data;var f=this._inJobs,l=a.workerMessages[e],n;try{if("function"!==typeof l)throw new TypeError(e+" is not a function");n=l.call(null,b)}catch(A){this._post({type:u,jobId:h,error:k.toInvokeError(A)});return}c.isThenable(n)?(f.set(h,n),n.then(function(a){f["delete"](h);d._post({type:u,
  22. jobId:h},a)}).catch(function(a){f["delete"](h);a||(a={message:"Error encountered at method"+e});a.dojoType&&"cancel"===a.dojoType||d._post({type:u,jobId:h,error:k.toInvokeError(a)})})):this._post({type:u,jobId:h},n)};d.prototype._onResponse=function(a){var b=a.jobId,c=a.error;a=a.data;var d=this._outJobs.get(b);d&&(this._outJobs["delete"](b),c?d.reject(e.fromJSON(JSON.parse(c))):d.resolve(a))};d.prototype._post=function(a,b,c){return k.postMessage(this.worker,a,b,c)};return d}()})},"esri/core/workers/workerFactory":function(){define("require exports ../tsSupport/assignHelper dojo/_base/kernel dojo/_base/lang ../../config ../../request ../Logger ../promiseUtils ../sniff ../urlUtils ./loaderConfig ./utils ./WorkerFallback".split(" "),
  23. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m){function u(){return A?A:A=f.create(function(a){var b=new MessageChannel,c=b.port1,d=b.port2,e=function(b){l.add("esri-workers-supports-transfer-arraybuffer",Number(null!=b.data));c.removeEventListener("message",e);c.close();d.close();l("esri-workers-supports-transfer-arraybuffer")||v.warn("This browser doesn't support ArrayBuffer transfer.");a()};c.addEventListener("message",e);c.start();d.start();b=new ArrayBuffer(0);d.postMessage(b,[b])})}function q(c){return u().then(function(){return f.create(function(h){function f(m){if(m=
  24. r.receiveMessage(m))switch(m.type){case y:m=c;var u=d.workers.loaderUrl||n.DEFAULT_LOADER_URL,q;null!=d["default"]?(q=e.mixin({},d),delete q["default"],q=JSON.parse(JSON.stringify(q))):q=JSON.parse(JSON.stringify(d));var v=d.workers.loaderConfig,v=n.default({baseUrl:v.baseUrl,locale:a.locale,has:b({"esri-cors":1,"dojo-test-sniff":0,"config-deferredInstrumentation":0,"host-webworker":1,"events-keypress-typed":0,"esri-workers-supports-transfer-arraybuffer":l("esri-workers-supports-transfer-arraybuffer")},
  25. v.has),map:b({},v.map),paths:b({},v.paths),packages:v.packages||[]});m.postMessage({type:z,configure:{esriConfig:q,loaderUrl:u,loaderConfig:v}});break;case w:c.removeEventListener("message",f),c.removeEventListener("error",k),h(c)}}function k(a){a.preventDefault();c.removeEventListener("message",f);c.removeEventListener("error",k);v.warn("Failed to create Worker. Fallback to execute module in main thread",a);c=new m;c.addEventListener("message",f);c.addEventListener("error",k)}c.addEventListener("message",
  26. f);c.addEventListener("error",k)})})}Object.defineProperty(g,"__esModule",{value:!0});var t=h.normalize(p.toUrl("./worker.js")),x=!h.hasSameOrigin(t,location.href),v=k.getLogger("esri.core.workers"),B=null,w=r.MessageType.CONFIGURED,z=r.MessageType.CONFIGURE,y=r.MessageType.HANDSHAKE,A=null;g.createWorker=function(){if(!l("esri-workers"))return q(new m);if(!x){var a=void 0;try{a=new Worker(t)}catch(D){v.warn("Failed to create Worker. Fallback to execute module in main thread",event),a=new m}return q(a)}B||
  27. (B=c(t,{responseType:"text"}));return B.then(function(a){return new Worker(URL.createObjectURL(new Blob([a.data],{type:"text/javascript"})))}).catch(function(a){v.warn("Failed to create Worker. Fallback to execute module in main thread",a);return new m}).then(function(a){return q(a)})}})},"esri/core/workers/loaderConfig":function(){define(["require","exports","../tsSupport/assignHelper","dojo/has","../urlUtils"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});a=a("esri-built")?
  28. "dojo/dojo-lite.js":"dojo/dojo.js";g.DEFAULT_LOADER_URL=e.makeAbsolute(e.removeQueryParameters(p.toUrl(a)));g.DEFAULT_CONFIG={baseUrl:function(){var a=e.removeQueryParameters(p.toUrl("dojo/x.js"));return e.makeAbsolute(a.slice(0,a.length-5))}(),packages:[{name:"esri"},{name:"dojo"},{name:"dojox"},{name:"dstore"},{name:"moment",main:"moment"},{name:"@dojo"},{name:"cldrjs",main:"dist/cldr"},{name:"globalize",main:"dist/globalize"},{name:"maquette",main:"dist/maquette.umd"},{name:"maquette-css-transitions",
  29. main:"dist/maquette-css-transitions.umd"},{name:"maquette-jsx",main:"dist/maquette-jsx.umd"},{name:"tslib",main:"tslib"}],map:{globalize:{cldr:"cldrjs/dist/cldr","cldr/event":"cldrjs/dist/cldr/event","cldr/supplemental":"cldrjs/dist/cldr/supplemental","cldr/unresolved":"cldrjs/dist/cldr/unresolved"}}};g.default=function(a){var c={async:a.async,isDebug:a.isDebug,locale:a.locale,baseUrl:a.baseUrl,has:b({},a.has),map:b({},a.map),packages:a.packages&&a.packages.concat()||[],paths:b({},a.paths)};a.hasOwnProperty("async")||
  30. (c.async=!0);a.hasOwnProperty("isDebug")||(c.isDebug=!1);a.baseUrl||(c.baseUrl=g.DEFAULT_CONFIG.baseUrl);g.DEFAULT_CONFIG.packages.forEach(function(a){a:{for(var d=c.packages,h=0;h<d.length;h++)if(d[h].name===a.name)break a;a=b({},a);h=e.removeQueryParameters(p.toUrl(a.name+"/x.js"));h=h.slice(0,h.length-5);a.location=e.makeAbsolute(h);d.push(a)}});a=c.map=c.map||{};for(var d=0,f=Object.keys(g.DEFAULT_CONFIG.map);d<f.length;d++){var l=f[d];a[l]||(a[l]=g.DEFAULT_CONFIG.map[l])}return c}})},"esri/core/workers/WorkerFallback":function(){define(["require",
  31. "exports","dojo/has","../global","./utils"],function(p,g,b,a,e){var d=function(){return function(){var a=this,b=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(function(c){a[c]=function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];return b[c].apply(b,a)}})}}(),c=a.MutationObserver||a.WebKitMutationObserver,k=function(){var b;if(a.process&&a.process.nextTick)b=function(b){a.process.nextTick(b)};else if(a.Promise)b=function(b){a.Promise.resolve().then(b)};
  32. else if(c){var d=[],e=document.createElement("div");(new c(function(){for(;0<d.length;)d.shift()()})).observe(e,{attributes:!0});b=function(a){d.push(a);e.setAttribute("queueStatus","1")}}return b}();return function(){function a(){this._dispatcher=new d;this._isInitialized=!1;this._workerPostMessage({type:e.MessageType.HANDSHAKE})}a.prototype.terminate=function(){};Object.defineProperty(a.prototype,"onmessage",{get:function(){return this._onmessageHandler},set:function(a){this._onmessageHandler&&
  33. this.removeEventListener("message",this._onmessageHandler);(this._onmessageHandler=a)&&this.addEventListener("message",a)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"onerror",{get:function(){return this._onerrorHandler},set:function(a){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler);(this._onerrorHandler=a)&&this.addEventListener("error",a)},enumerable:!0,configurable:!0});a.prototype.postMessage=function(a,b){var c=this;k(function(){c._workerMessageHandler(new MessageEvent("message",
  34. {data:a}))})};a.prototype.dispatchEvent=function(a){return this._dispatcher.dispatchEvent(a)};a.prototype.addEventListener=function(a,b,c){this._dispatcher.addEventListener(a,b,c)};a.prototype.removeEventListener=function(a,b,c){this._dispatcher.removeEventListener(a,b,c)};a.prototype._workerPostMessage=function(a,b){var c=this;k(function(){c.dispatchEvent(new MessageEvent("message",{data:a}))})};a.prototype._workerMessageHandler=function(a){var b=this;if(a=e.receiveMessage(a)){var c=a.jobId;switch(a.type){case e.MessageType.CONFIGURE:this._isInitialized||
  35. this._workerPostMessage({type:e.MessageType.CONFIGURED});break;case e.MessageType.OPEN:p(["esri/core/workers/RemoteClient",a.modulePath],function(a,d){a=a.connect(d);b._workerPostMessage({type:e.MessageType.OPENED,jobId:c,data:a})})}}};return a}()})},"esri/views/BreakpointsOwner":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper dojo/dom-class ../core/Accessor ../core/ArrayPool ../core/Handles ../core/watchUtils ../core/accessorSupport/decorators ./DOMContainer".split(" "),
  36. function(p,g,b,a,e,d,c,k,f,l,h,n){var r={widthBreakpoint:{getValue:function(a){var b=a.viewSize[0];a=a.breakpoints;var c=this.values;return b<=a.xsmall?c.xsmall:b<=a.small?c.small:b<=a.medium?c.medium:b<=a.large?c.large:c.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",
  37. medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},
  38. heightBreakpoint:{getValue:function(a){var b=a.viewSize[1];a=a.breakpoints;var c=this.values;return b<=a.xsmall?c.xsmall:b<=a.small?c.small:b<=a.medium?c.medium:b<=a.large?c.large:c.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",
  39. medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},
  40. orientation:{getValue:function(a){a=a.viewSize;var b=this.values;return a[1]>=a[0]?b.portrait:b.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},m={xsmall:544,small:768,medium:992,large:1200};return function(c){function n(){var a=null!==c&&c.apply(this,arguments)||this;a._breakpointsHandles=new f;a.breakpoints=m;a.orientation=null;a.widthBreakpoint=null;a.heightBreakpoint=null;return a}
  41. b(n,c);n.prototype.initialize=function(){this._breakpointsHandles.add([l.init(this,["breakpoints","size"],this._updateClassNames)])};n.prototype.destroy=function(){this.destroyed||(this._removeActiveClassNames(),this._breakpointsHandles.destroy(),this._breakpointsHandles=null)};n.prototype._updateClassNames=function(){if(this.container){var a=k.acquire(),b=k.acquire(),c=!1,d,e,h;for(d in r)e=this[d],h=r[d].getValue({viewSize:this.size,breakpoints:this.breakpoints}),e!==h&&(c=!0,this[d]=h,b.push(r[d].valueToClassName[e]),
  42. a.push(r[d].valueToClassName[h]));c&&(this._applyClassNameChanges(a,b),k.release(a),k.release(b))}};n.prototype._applyClassNameChanges=function(a,b){var c=this.container;c&&(d.remove(c,b),d.add(c,a))};n.prototype._removeActiveClassNames=function(){var a=this.container;if(a)for(var b in r)d.remove(a,r[b].valueToClassName[this[b]])};a([h.property({set:function(a){var b=this._get("breakpoints");if(a!==b){b=(b=a)&&b.xsmall<b.small&&b.small<b.medium&&b.medium<b.large;if(!b){var c=JSON.stringify(m,null,
  43. 2);console.warn("provided breakpoints are not valid, using defaults:"+c)}a=b?a:m;this._set("breakpoints",e({},a))}}})],n.prototype,"breakpoints",void 0);a([h.property()],n.prototype,"orientation",void 0);a([h.property()],n.prototype,"widthBreakpoint",void 0);a([h.property()],n.prototype,"heightBreakpoint",void 0);return n=a([h.subclass("esri.views.BreakpointsOwner")],n)}(h.declared(c,n))})},"esri/views/DOMContainer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/dom dojo/dom-construct dojo/on ../core/Accessor ../core/Evented ../core/Handles ../core/scheduling ../core/watchUtils ../core/accessorSupport/decorators ./PopupManager ./overlay/ViewOverlay ../widgets/Popup".split(" "),
  44. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q){var t=[0,0];return function(k){function f(){var a=k.call(this)||this;a._domHandles=new l;a._freqInfo={freq:16,time:750};a._overlayRenderTaskHandle=null;a.height=0;a.popup=new q({view:a});a.position=null;a.resizing=!1;a.root=null;a.surface=null;a.suspended=!0;a.ui=null;a.userContent=null;a.width=0;a.watch("cursor",function(b){var c=a.surface;c&&c.setAttribute("data-cursor",b)});a.watch("interacting",function(b){var c=a.surface;c&&c.setAttribute("data-interacting",
  45. b.toString())});a._focusEvent=a._focusEvent.bind(a);a._blurEvent=a._blurEvent.bind(a);return a}b(f,k);f.prototype.initialize=function(){this.watch("ui",this._handleUIChange);this._wireUI(this.ui)};f.prototype.destroy=function(){this.ui.destroy();this.popup&&!this.popup.destroyed&&this.popup.destroy();this.container=null;this._domHandles.destroy()};Object.defineProperty(f.prototype,"container",{set:function(a){var b=this,c=this._get("container");if(c!==a){this._domHandles.remove("dom-size");this._stopMeasuring();
  46. if(c){var f=this.surface;f&&(f.removeEventListener("focus",this._focusEvent),f.removeEventListener("blur",this._blurEvent));c.classList.remove("esri-view");this.popupManager.destroy();this._set("popupManager",null);this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null);this.overlay.destroy();this._set("overlay",null);d.destroy(this.root);this._set("root",null);d.destroy(this.userContent);this._set("userContent",null)}if(a){a.classList.add("esri-view");
  47. c=document.createElement("div");for(c.className="esri-view-user-storage";a.hasChildNodes();)c.appendChild(a.firstChild);a.appendChild(c);c=document.createElement("div");c.className="esri-view-root";a.insertBefore(c,a.firstChild);this._set("root",c);var k=document.createElement("div");k.className="esri-view-surface";k.setAttribute("role","application");k.tabIndex=0;k.addEventListener("focus",this._focusEvent);k.addEventListener("blur",this._blurEvent);e.setSelectable(k,!1);c.appendChild(k);this._set("surface",
  48. k);f=new u;c.appendChild(f.surface);this._set("overlay",f);f.watch("needsRender",function(a){a&&!b._overlayRenderTaskHandle?b._overlayRenderTaskHandle=h.addFrameTask({render:function(){b.overlay.render()}}):b._overlayRenderTaskHandle&&(b._overlayRenderTaskHandle.remove(),b._overlayRenderTaskHandle=null)});this._forceReadyCycle();this._domHandles.add(n.init(this,"size",function(a){var b=a[1];k.classList.toggle("esri-view-surface--inset-outline",a[0]>=document.body.clientWidth||b>=document.body.clientHeight)}),
  49. "dom-size");this._set("container",a);this._startMeasuring();a=new m({enabled:!0,view:this});this._set("popupManager",a)}else this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),this._set("container",null)}},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"focused",{get:function(){return document.activeElement===this.surface},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"size",{get:function(){return[this.width,
  50. this.height]},enumerable:!0,configurable:!0});f.prototype.blur=function(){this.surface&&this.surface.blur()};f.prototype.focus=function(){this.surface&&this.surface.focus()};f.prototype.pageToContainer=function(a,b,c){var d=this.position;a-=d[0];b-=d[1];c?(c[0]=a,c[1]=b):c=[a,b];return c};f.prototype.containerToPage=function(a,b,c){var d=this.position;a+=d[0];b+=d[1];c?(c[0]=a,c[1]=b):c=[a,b];return c};f.prototype._handleUIChange=function(a,b){b&&(this._domHandles.remove("ui"),b.destroy());a&&this._wireUI(a);
  51. this._set("ui",a)};f.prototype._wireUI=function(a){this._domHandles.remove("ui");a&&(a.view=this,this._domHandles.add([n.init(this,"root",function(b){a.container=b?d.create("div",null,b):null}),n.init(this,"popup",function(b,c){c&&(a.remove(c,"popup"),c!==b&&c.destroy());b&&(b.view=a.view,a.add(b,{key:"popup",position:"manual"}))})],"ui"))};f.prototype._focusEvent=function(a){this.notifyChange("focused");this.emit("focus",{native:a})};f.prototype._blurEvent=function(a){this.notifyChange("focused");
  52. this.emit("blur",{native:a})};f.prototype._stopMeasuring=function(){this._domHandles.remove("measuring");this._get("resizing")&&this._set("resizing",!1)};f.prototype._startMeasuring=function(){var a=this,b=this._freqInfo;b.freq=16;b.time=750;this._domHandles.add([c(window,"resize",function(){b.freq=16;b.time=750}),h.addFrameTask({prepare:function(b){var c=a._measure(),d=a._freqInfo;d.time+=b.deltaTime;c&&(d.freq=16,a._get("resizing")||a._set("resizing",!0));d.time<d.freq||(d.time=0,a._position()||
  53. c?d.freq=16:d.freq=Math.min(750,2*d.freq),!c&&512<=d.freq&&a._get("resizing")&&a._set("resizing",!1))}})],"measuring");this._measure();this._position()};f.prototype._measure=function(){var a=this.container,b=a?a.clientWidth:0,c=a?a.clientHeight:0;if(0===b||0===c||"hidden"===window.getComputedStyle(a).visibility)return this.suspended||this._set("suspended",!0),!1;var a=this.width,d=this.height;if(b===a&&c===d)return this.suspended&&this._set("suspended",!1),!1;this._set("width",b);this._set("height",
  54. c);this.suspended&&this._set("suspended",!1);this.emit("resize",{oldWidth:a,oldHeight:d,width:b,height:c});return!0};f.prototype._position=function(){var a=this.container,b=this.position,c=(a.ownerDocument||window.document).defaultView,a=a.getBoundingClientRect();t[0]=a.left+c.pageXOffset;t[1]=a.top+c.pageYOffset;return b&&t[0]===b[0]&&t[1]===b[1]?!1:(this._set("position",t.slice()),!0)};a([r.property({value:null,cast:function(a){return e.byId(a)}})],f.prototype,"container",null);a([r.property({readOnly:!0,
  55. dependsOn:["surface"]})],f.prototype,"focused",null);a([r.property({readOnly:!0})],f.prototype,"height",void 0);a([r.property({type:q})],f.prototype,"popup",void 0);a([r.property({type:m})],f.prototype,"popupManager",void 0);a([r.property({type:u})],f.prototype,"overlay",void 0);a([r.property({readOnly:!0})],f.prototype,"position",void 0);a([r.property({readOnly:!0})],f.prototype,"resizing",void 0);a([r.property({readOnly:!0})],f.prototype,"root",void 0);a([r.property({value:null,dependsOn:["width",
  56. "height"],readOnly:!0})],f.prototype,"size",null);a([r.property({readOnly:!0})],f.prototype,"surface",void 0);a([r.property({readOnly:!0})],f.prototype,"suspended",void 0);a([r.property()],f.prototype,"ui",void 0);a([r.property({readOnly:!0})],f.prototype,"userContent",void 0);a([r.property({readOnly:!0})],f.prototype,"width",void 0);return f=a([r.subclass("esri.views.DOMContainer")],f)}(r.declared(k,f))})},"esri/views/overlay/ViewOverlay":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/dom ../../core/Accessor ../../core/Collection ../../core/accessorSupport/decorators maquette".split(" "),
  57. function(p,g,b,a,e,d,c,k,f){return function(d){function h(){var a=null!==d&&d.apply(this,arguments)||this;a.items=new c;a._callbacks=new Map;a._projector=f.createProjector();a._hiddenProjector=f.createProjector();return a}b(h,d);Object.defineProperty(h.prototype,"needsRender",{get:function(){return 0<this.items.length},enumerable:!0,configurable:!0});h.prototype.initialize=function(){var a=this,b=document.createElement("div");b.className="esri-overlay-surface";e.setSelectable(b,!1);this._set("surface",
  58. b);this._hiddenSurface=document.createElement("div");this._hiddenSurface.setAttribute("style","visibility: hidden;");b.appendChild(this._hiddenSurface);this._itemsChangeHandle=this.items.on("change",function(b){b.added.map(function(b){var c=function(){return b.render()};a._callbacks.set(b,c);a._projector.append(a.surface,c)});b.removed.map(function(b){var c=a._projector.detach(a._callbacks.get(b));a.surface.removeChild(c.domNode);a._callbacks.delete(b)})})};h.prototype.addItem=function(a){this.items.add(a)};
  59. h.prototype.removeItem=function(a){this.items.remove(a)};h.prototype.destroy=function(){this.items.removeAll();this._itemsChangeHandle.remove();this._projector=this._callbacks=null};h.prototype.render=function(){this._projector.renderNow()};h.prototype.computeBoundingRect=function(a){var b=this._hiddenSurface,c=this._hiddenProjector,d=null,e=function(){return d=a.render()};c.append(b,e);c.renderNow();var f={left:0,top:0,right:0,bottom:0};if(d&&d.domNode){var h=d.domNode.getBoundingClientRect();f.left=
  60. h.left;f.top=h.top;f.right=h.right;f.bottom=h.bottom}for(c.detach(e);b.firstChild;)b.removeChild(b.firstChild);return f};h.prototype.overlaps=function(a,b){a=this.computeBoundingRect(a);b=this.computeBoundingRect(b);return Math.max(a.left,b.left)<=Math.min(a.right,b.right)&&Math.max(a.top,b.top)<=Math.min(a.bottom,b.bottom)};a([k.property({readOnly:!0})],h.prototype,"surface",void 0);a([k.property({readOnly:!0})],h.prototype,"items",void 0);a([k.property({readOnly:!0,dependsOn:["items.length"]})],
  61. h.prototype,"needsRender",null);return h=a([k.subclass("esri.views.overlay.ViewOverlay")],h)}(k.declared(d))})},"esri/widgets/Popup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper dojo/dom-geometry dojo/i18n!./Popup/nls/Popup dojo/keys ../core/Handles ../core/lang ../core/Logger ../core/watchUtils ../core/accessorSupport/decorators ./Feature ./Spinner ./Widget ./Popup/PopupViewModel ../widgets/support/widgetUtils ./support/widget".split(" "),
  62. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x,v){function B(a,b){return void 0===b?"esri-popup__"+a:"esri-popup__"+a+"-"+b}var w=p.toUrl("./Popup/images/default-action.svg"),z={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},y=h.getLogger("esri.widgets.Popup");return function(h){function q(a){a=h.call(this)||this;a._blurContainer=!1;a._containerNode=null;a._mainContainerNode=null;a._featureMenuNode=null;a._focusContainer=!1;a._focusDockButton=!1;a._focusFeatureMenuButton=!1;a._focusFirstFeature=
  63. !1;a._handles=new f;a._displayActionTextLimit=2;a._pointerOffsetInPx=16;a._spinner=null;a.actions=null;a.alignment="auto";a.autoCloseEnabled=null;a.content=null;a.collapsed=!1;a.collapseEnabled=!0;a.dockEnabled=!1;a.featureCount=null;a.features=null;a.featureNavigationEnabled=!0;a.highlightEnabled=null;a.location=null;a.featureWidgets=[];a.promises=null;a.selectedFeature=null;a.selectedFeatureIndex=null;a.selectedFeatureWidget=null;a.spinnerEnabled=!0;a.title=null;a.updateLocationEnabled=null;a.view=
  64. null;a.viewModel=new t;a.visible=null;return a}b(q,h);q.prototype.postInitialize=function(){var a=this;this._addSelectedFeatureIndexHandle();this.own(n.watch(this,"viewModel.screenLocation",function(){return a._positionContainer()}),n.watch(this,["viewModel.visible","dockEnabled"],function(){return a._toggleScreenLocationEnabled()}),n.watch(this,"viewModel.screenLocation",function(b,c){!!b!==!!c&&a.reposition()}),n.watch(this,"viewModel.features",function(b){return a._createFeatureWidgets(b)}),n.watch(this,
  65. "viewModel.view.padding viewModel.view.size viewModel.visible viewModel.waitingForResult viewModel.location alignment".split(" "),function(){return a.reposition()}),n.watch(this,"spinnerEnabled",function(b){return a._spinnerEnabledChange(b)}),n.watch(this,"viewModel.view.size",function(b,c){return a._updateDockEnabledForViewSize(b,c)}),n.watch(this,"viewModel.view",function(b,c){return a._viewChange(b,c)}),n.watch(this,"viewModel.view.ready",function(b,c){return a._viewReadyChange(b,c)}),n.watch(this,
  66. ["viewModel.waitingForResult","viewModel.location"],function(){return a._displaySpinner()}),n.watch(this,["featureWidgets","viewModel.selectedFeatureIndex"],function(){return a._updateFeatureWidget()}),n.watch(this,"selectedFeatureWidget.viewModel.title",function(b){return a._setTitleFromFeatureWidget(b)}),n.watch(this,["selectedFeatureWidget.viewModel.content","selectedFeatureWidget.viewModel.waitingForContent"],function(){return a._setContentFromFeatureWidget()}),n.on(this,"viewModel","trigger-action",
  67. function(b){return a._zoomToAction(b)}))};q.prototype.destroy=function(){this._destroyFeatureWidgets();this._destroySpinner();this._handles&&this._handles.destroy();this._handles=null};Object.defineProperty(q.prototype,"currentAlignment",{get:function(){return this._getCurrentAlignment()},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"currentDockPosition",{get:function(){return this._getCurrentDockPosition()},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"dockOptions",
  68. {get:function(){return this._get("dockOptions")||z},set:function(a){var b=e({},z),c=this.get("viewModel.view.breakpoints"),d={};c&&(d.width=c.xsmall,d.height=c.xsmall);a=e({},b,a);b=e({},b.breakpoint,d);d=a.breakpoint;!0===d?a.breakpoint=b:"object"===typeof d&&(a.breakpoint=e({},b,d));this._set("dockOptions",a);this._setCurrentDockPosition();this.reposition()},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"featureMenuOpen",{get:function(){return this.viewModel.visible?this._get("featureMenuOpen"):
  69. !1},set:function(a){this._set("featureMenuOpen",!!a)},enumerable:!0,configurable:!0});q.prototype.blur=function(){this.visible||y.warn("Popup cannot be blurred while visible is false");this._blurContainer=!0;this.scheduleRender()};q.prototype.clear=function(){};q.prototype.close=function(){this.visible=!1};q.prototype.focus=function(){this.visible||y.warn("Popup cannot be focused while visible is false");this._focusContainer=!0;this.scheduleRender()};q.prototype.next=function(){return null};q.prototype.open=
  70. function(a){this._handles.remove("selected-index");this.set({featureMenuOpen:a?!!a.featureMenuOpen:!1});this.viewModel.open(a);this._addSelectedFeatureIndexHandle()};q.prototype.previous=function(){return null};q.prototype.reposition=function(){this.renderNow();this._positionContainer();this._setCurrentAlignment()};q.prototype.triggerAction=function(a){return null};q.prototype.render=function(){var a=this.collapsed,b=this.collapseEnabled,d=this.dockEnabled,e=this.actions,f=this.featureMenuOpen,h=
  71. this.featureNavigationEnabled,k=this.featureWidgets,n=this.visible,r=this.viewModel,m=r.content,q=r.featureCount,u=r.pendingPromisesCount,g=r.selectedFeatureIndex,t=r.title,r=1<q&&h,h=1<q&&f,w=b&&!h&&a,a=e&&e.length,y=r&&this._getPageText(q,g),A=this._renderContent(),z=x.isRtl(),p=this.get("selectedFeatureWidget")?this.get("selectedFeatureWidget.viewModel.waitingForContent")||this.get("selectedFeatureWidget.viewModel.content"):A,P=d?c.undock:c.dock,q=this.currentAlignment,e=this.currentDockPosition,
  72. u=u?v.tsx("div",{key:B("loading-container"),role:"presentation",class:"esri-popup__loading-container","aria-label":c.loading,title:c.loading},v.tsx("span",{"aria-hidden":"true",class:v.join("esri-popup__icon","esri-icon-loading-indicator","esri-rotating")})):null,C=(Q={},Q["esri-icon-layer-list"]=!h,Q["esri-icon-close"]=h,Q),Q=v.tsx("span",{"aria-hidden":"true",class:"esri-popup__icon",classes:C}),C=(M={},M["esri-icon-right-triangle-arrow"]=z,M["esri-popup__pagination-previous-icon--rtl"]=z,M["esri-icon-left-triangle-arrow"]=
  73. !z,M["esri-popup__pagination-previous-icon"]=!z,M),M=v.tsx("span",{"aria-hidden":"true",class:"esri-popup__icon",classes:C}),C=v.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:v.join("esri-popup__button","esri-popup__pagination-previous"),"aria-label":c.previous,title:c.previous},M),M=(N={},N["esri-icon-left-triangle-arrow"]=z,N["esri-popup__pagination-next-icon--rtl"]=z,N["esri-icon-right-triangle-arrow"]=!z,N["esri-popup__pagination-next-icon"]=
  74. !z,N),N=v.tsx("span",{"aria-hidden":"true",class:"esri-popup__icon",classes:M}),z=v.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:v.join("esri-popup__button","esri-popup__pagination-next"),"aria-label":c.next,title:c.next},N),M=x.cssTransition("enter","esri-popup--feature-updated"),N=this.id+"-feature-menu",f=v.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,
  75. afterUpdate:this._focusFeatureMenuButtonNode,class:v.join("esri-popup__button","esri-popup__feature-menu-button"),"aria-haspopup":"true","aria-controls":N,"aria-expanded":f,"aria-label":c.menu,title:c.menu},Q),y=v.tsx("div",{class:"esri-popup__pagination-page-text"},y),f=r?v.tsx("div",{class:"esri-popup__navigation-buttons",enterAnimation:M},C,y,z,u||f):null,y=this._wouldDockTo(),y=(L={},L["esri-icon-minimize"]=d,L["esri-popup__icon--dock-icon"]=!d,L["esri-icon-dock-right"]=!d&&("top-right"===y||
  76. "bottom-right"===y),L["esri-icon-dock-left"]=!d&&("top-left"===y||"bottom-left"===y),L["esri-icon-maximize"]=!d&&"top-center"===y,L["esri-icon-dock-bottom"]=!d&&"bottom-center"===y,L),L=v.tsx("span",{"aria-hidden":"true",classes:y,class:"esri-popup__icon"}),L=this.get("dockOptions.buttonEnabled")?v.tsx("div",{role:"button","aria-label":P,title:P,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,
  77. class:v.join("esri-popup__button","esri-popup__button--dock")},L):null,b=b&&t&&(p||a||r),P=(S={},S["esri-popup__header-title--button"]=b,S),y=b?w?c.expand:c.collapse:"",S=this.id+"-popup-title",t=t?v.tsx("h2",{class:"esri-popup__header-title",key:t,enterAnimation:M,id:S,role:b?"button":"heading","aria-label":y,title:y,classes:P,bind:this,tabIndex:b?0:-1,onclick:this._toggleCollapsed,onkeydown:this._toggleCollapsed,innerHTML:t}):null,b=v.tsx("span",{"aria-hidden":"true",class:v.join("esri-popup__icon",
  78. "esri-icon-close")}),b=v.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:"esri-popup__button","aria-label":c.close,title:c.close},b),b=v.tsx("header",{class:"esri-popup__header"},t,v.tsx("div",{class:"esri-popup__header-buttons"},L,b)),L=this.id+"-popup-content",m=p&&!w?v.tsx("article",{key:m,enterAnimation:M,id:L,class:"esri-popup__content"},A):null,A=!w&&("bottom-left"===q||"bottom-center"===q||"bottom-right"===q||"top-left"===e||"top-center"===e||"top-right"===
  79. e),w=!w&&("top-left"===q||"top-center"===q||"top-right"===q||"bottom-left"===e||"bottom-center"===e||"bottom-right"===e),p=h?null:v.tsx("div",{key:B("actions"),class:"esri-popup__actions"},this._renderActions()),P=v.tsx("section",{key:B("navigation"),class:"esri-popup__navigation"},f),r=r||a?v.tsx("div",{key:B("feature-buttons"),class:"esri-popup__feature-buttons"},p,P):null,g=this._renderFeatureMenuNode(k,g,h,N),k=l.substitute({total:k.length},c.selectedFeatures),N=v.tsx("section",{key:B("menu"),
  80. class:"esri-popup__feature-menu"},v.tsx("h2",{class:"esri-popup__feature-menu-header"},k),v.tsx("nav",{class:"esri-popup__feature-menu-viewport",afterCreate:this._featureMenuViewportNodeUpdated,afterUpdate:this._featureMenuViewportNodeUpdated},g)),k=d?null:v.tsx("div",{key:B("pointer"),class:"esri-popup__pointer",role:"presentation"},v.tsx("div",{class:v.join("esri-popup__pointer-direction","esri-popup--shadow")})),g=this.get("selectedFeature.layer.title"),a=this.get("selectedFeature.layer.id"),p=
  81. (T={},T["esri-popup--shadow"]=d,T),d=(I={},I["esri-popup--aligned-top-center"]=n&&"top-center"===q,I["esri-popup--aligned-bottom-center"]=n&&"bottom-center"===q,I["esri-popup--aligned-top-left"]=n&&"top-left"===q,I["esri-popup--aligned-bottom-left"]=n&&"bottom-left"===q,I["esri-popup--aligned-top-right"]=n&&"top-right"===q,I["esri-popup--aligned-bottom-right"]="bottom-right"===q,I["esri-popup--is-docked"]=n&&d,I["esri-popup--shadow"]=n&&!d,I["esri-popup--is-docked-top-left"]=n&&"top-left"===e,I["esri-popup--is-docked-top-center"]=
  82. n&&"top-center"===e,I["esri-popup--is-docked-top-right"]=n&&"top-right"===e,I["esri-popup--is-docked-bottom-left"]=n&&"bottom-left"===e,I["esri-popup--is-docked-bottom-center"]=n&&"bottom-center"===e,I["esri-popup--is-docked-bottom-right"]=n&&"bottom-right"===e,I["esri-popup--feature-menu-open"]=n&&h,I),I=A?N:null,T=w?N:null,h=A?r:null,q=w?r:null,I=v.tsx("div",{class:v.join("esri-popup__main-container","esri-widget"),classes:p,tabIndex:-1,role:"dialog","aria-labelledby":t?S:"","aria-describedby":m?
  83. L:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},h,I,b,m,q,T);return v.tsx("div",{key:B("base"),class:"esri-popup",role:"presentation",classes:d,"data-layer-title":g,"data-layer-id":a,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},n?[I,k]:null);var Q,M,N,L,S,T,I};q.prototype._featureMenuOpenChanged=function(a){a?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0};q.prototype._setTitleFromFeatureWidget=
  84. function(a){this.selectedFeatureWidget&&(this.viewModel.title=a||"")};q.prototype._setContentFromFeatureWidget=function(){var a=this.selectedFeatureWidget;a&&(this.viewModel.content=a)};q.prototype._handleFeatureMenuKeyup=function(a){a.keyCode===k.ESCAPE&&(a.stopPropagation(),this.featureMenuOpen=!1)};q.prototype._handleFeatureMenuItemKeyup=function(a){var b=a.keyCode,c=this._featureMenuNode,d=this.get("features.length"),e=a.currentTarget["data-feature-index"];c&&(c=c.querySelectorAll("li"),b===k.UP_ARROW?
  85. (a.stopPropagation(),c[(e-1+d)%d].focus()):b===k.DOWN_ARROW?(a.stopPropagation(),c[(e+1+d)%d].focus()):b===k.HOME?(a.stopPropagation(),c[0].focus()):b===k.END&&(a.stopPropagation(),c[c.length-1].focus()))};q.prototype._handleMainKeyup=function(a){var b=a.keyCode;b===k.LEFT_ARROW&&(a.stopPropagation(),this.previous());b===k.RIGHT_ARROW&&(a.stopPropagation(),this.next())};q.prototype._zoomToAction=function(a){a.action&&"zoom-to"===a.action.id&&this.viewModel.zoomToLocation()};q.prototype._spinnerEnabledChange=
  86. function(a){this._destroySpinner();a&&(a=this.get("viewModel.view"),this._createSpinner(a))};q.prototype._displaySpinner=function(){var a=this._spinner;if(a){var b=this.viewModel,c=b.location;b.waitingForResult?a.show({location:c}):a.hide()}};q.prototype._getIconStyles=function(a){return{"background-image":a?"url("+a+")":""}};q.prototype._renderAction=function(a,b,d,e){var f=this,h=n.watch(a,["id","className","title","image","visible"],function(){return f.scheduleRender()});this._handles.add(h,e);
  87. h=this.get("selectedFeature.attributes");"zoom-to"===a.id&&(a.title=c.zoom,this._handles.add(n.init(this,"view.animation.state",function(b){a.className="waiting-for-target"===b?v.join("esri-popup__icon","esri-icon-loading-indicator","esri-rotating"):v.join("esri-popup__icon","esri-icon-zoom-in-magnifying-glass")}),e));e=a.title;var k=a.className,r=a.image||k?a.image:w;e=e&&h?l.substitute(h,e):e;k=k&&h?l.substitute(h,k):k;h=r&&h?l.substitute(h,r):r;r=k||"esri-popup__icon";k=(m={},m["esri-popup__action-image"]=
  88. !!h,m);m=(q={},q["esri-disabled"]=-1!==r.indexOf("esri-icon-loading-indicator"),q);d=d<=this._displayActionTextLimit?v.tsx("span",{key:B("action-text-"+b+"-"+a.uid),class:"esri-popup__action-text"},e):null;return a.visible?v.tsx("div",{key:B("action-"+b+"-"+a.uid),role:"button",tabIndex:0,title:e,"aria-label":e,classes:m,class:v.join("esri-popup__button","esri-popup__action"),bind:this,"data-action-index":b,onclick:this._triggerAction,onkeydown:this._triggerAction},v.tsx("span",{key:B("action-icon-"+
  89. b+"-"+a.uid+"-"+r),"aria-hidden":"true",class:r,classes:k,styles:this._getIconStyles(h)}),d):null;var m,q};q.prototype._renderActions=function(){var a=this;this._handles.remove("actions");var b=this.actions;if(b){var c=b.length;return b.toArray().map(function(b,d){return a._renderAction(b,d,c,"actions")})}};q.prototype._addSelectedFeatureIndexHandle=function(){var a=this,b=n.watch(this,"viewModel.selectedFeatureIndex",function(b,c){return a._selectedFeatureIndexUpdated(b,c)});this._handles.add(b,
  90. "selected-index")};q.prototype._selectedFeatureIndexUpdated=function(a,b){var c=this.featureMenuOpen;this.featureCount&&c&&a!==b&&-1!==a&&(this.featureMenuOpen=!1)};q.prototype._updateFeatureWidget=function(){var a=this.featureWidgets[this.viewModel.selectedFeatureIndex]||null;a&&!a.contentEnabled&&(a.contentEnabled=!0);this._set("selectedFeatureWidget",a)};q.prototype._destroyFeatureWidgets=function(){this.featureWidgets.forEach(function(a){return a.destroy()});this._set("featureWidgets",[])};q.prototype._createFeatureWidgets=
  91. function(a){var b=this.featureWidgets.slice(0),c=this.get("viewModel.view"),d=[];a.forEach(function(a,e){if(a){var f=null;b.some(function(c,d){c&&c.graphic===a&&(f=c,b.splice(d,1));return!!f});d[e]=f||new m({contentEnabled:!1,graphic:a,view:c})}});b.forEach(function(a){return a&&a.destroy()});this._set("featureWidgets",d)};q.prototype._isScreenLocationWithinView=function(a,b){return-1<a.x&&-1<a.y&&a.x<=b.width&&a.y<=b.height};q.prototype._isOutsideView=function(a){var b=a.popupHeight,c=a.popupWidth,
  92. d=a.screenLocation,e=a.side;a=a.view;if(isNaN(c)||isNaN(b)||!a||!d)return!1;var f=a.padding;return"right"===e&&d.x+c/2>a.width-f.right||"left"===e&&d.x-c/2<f.left||"top"===e&&d.y-b<f.top||"bottom"===e&&d.y+b>a.height-f.bottom?!0:!1};q.prototype._determineCurrentAlignment=function(){var a=this._pointerOffsetInPx,b=this._containerNode,c=this._mainContainerNode,e=this.viewModel,f=e.screenLocation,e=e.view;if(!f||!e||!b)return"top-center";if(!this._isScreenLocationWithinView(f,e))return this._get("currentAlignment")||
  93. "top-center";var h=c?window.getComputedStyle(c,null):null,c=h?parseInt(h.getPropertyValue("max-height").replace(/[^-\d\.]/g,""),10):0,h=h?parseInt(h.getPropertyValue("height").replace(/[^-\d\.]/g,""),10):0,k=d.getContentBox(b),b=k.w+a,k=Math.max(k.h,c,h)+a,a=this._isOutsideView({popupHeight:k,popupWidth:b,screenLocation:f,side:"right",view:e}),c=this._isOutsideView({popupHeight:k,popupWidth:b,screenLocation:f,side:"left",view:e}),h=this._isOutsideView({popupHeight:k,popupWidth:b,screenLocation:f,
  94. side:"top",view:e}),f=this._isOutsideView({popupHeight:k,popupWidth:b,screenLocation:f,side:"bottom",view:e});return c?h?"bottom-right":"top-right":a?h?"bottom-left":"top-left":h?f?"top-center":"bottom-center":"top-center"};q.prototype._getCurrentAlignment=function(){var a=this.alignment;return this.dockEnabled?null:"auto"===a?this._determineCurrentAlignment():"function"===typeof a?a.call(this):a};q.prototype._setCurrentAlignment=function(){this._set("currentAlignment",this._getCurrentAlignment())};
  95. q.prototype._setCurrentDockPosition=function(){this._set("currentDockPosition",this._getCurrentDockPosition())};q.prototype._getDockPosition=function(){var a=this.get("dockOptions.position");return"auto"===a?this._determineCurrentDockPosition():"function"===typeof a?a.call(this):a};q.prototype._getCurrentDockPosition=function(){return this.dockEnabled?this._getDockPosition():null};q.prototype._wouldDockTo=function(){return this.dockEnabled?null:this._getDockPosition()};q.prototype._renderFeatureMenuItemNode=
  96. function(a,b,d,e){var f=b===d;e=(h={},h["esri-popup__feature-menu-item--selected"]=f,h);h=f?v.tsx("span",{key:B("feature-menu-selected-feature-"+d),title:c.selectedFeature,"aria-label":c.selectedFeature,class:"esri-icon-check-mark"}):null;a=v.tsx("span",{innerHTML:a.title||c.untitled});return v.tsx("li",{role:"menuitem",tabIndex:-1,key:B("feature-menu-feature-"+d),classes:e,class:"esri-popup__feature-menu-item",bind:this,"data-feature-index":b,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,
  97. onkeydown:this._selectFeature},v.tsx("span",{class:"esri-popup__feature-menu-title"},a,h));var h};q.prototype._renderFeatureMenuNode=function(a,b,c,d){var e=this;return 1<a.length?v.tsx("ol",{class:"esri-popup__feature-menu-list",id:d,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},a.map(function(a,d){return e._renderFeatureMenuItemNode(a,d,b,c)})):null};q.prototype._determineCurrentDockPosition=function(){var a=
  98. this.get("viewModel.view"),b=x.isRtl()?"top-left":"top-right";if(!a)return b;var c=a.padding||{left:0,right:0,top:0,bottom:0},c=a.width-c.left-c.right;return(a=a.get("breakpoints"))&&c<=a.xsmall?"bottom-center":b};q.prototype._renderContent=function(){var a=this.get("viewModel.content");if("string"===typeof a)return v.tsx("div",{key:a,innerHTML:a});if(v.isWidget(a))return v.tsx("div",{key:a},a.render());if(a instanceof HTMLElement)return v.tsx("div",{key:a,bind:a,afterCreate:this._attachToNode});
  99. if(v.isWidgetBase(a))return v.tsx("div",{key:a,bind:a.domNode,afterCreate:this._attachToNode})};q.prototype._attachToNode=function(a){a.appendChild(this)};q.prototype._positionContainer=function(a){void 0===a&&(a=this._containerNode);a&&(this._containerNode=a);if(a){var b=this.viewModel.screenLocation,c=d.getContentBox(a);if(b=this._calculatePositionStyle(b,c))a.style.top=b.top,a.style.left=b.left,a.style.bottom=b.bottom,a.style.right=b.right}};q.prototype._calculateFullWidth=function(a){var b=this.currentAlignment,
  100. c=this._pointerOffsetInPx;return"top-left"===b||"bottom-left"===b||"top-right"===b||"bottom-right"===b?a+c:a};q.prototype._calculateAlignmentPosition=function(a,b,c,d){var e=this.currentAlignment,f=this._pointerOffsetInPx;d/=2;var h=c.height-b;c=c.width-a;var k=this.view.padding;if("bottom-center"===e)return{top:b+f-k.top,left:a-d-k.left};if("top-left"===e)return{bottom:h+f-k.bottom,right:c+f-k.right};if("bottom-left"===e)return{top:b+f-k.top,right:c+f-k.right};if("top-right"===e)return{bottom:h+
  101. f-k.bottom,left:a+f-k.left};if("bottom-right"===e)return{top:b+f-k.top,left:a+f-k.left};if("top-center"===e)return{bottom:h+f-k.bottom,left:a-d-k.left}};q.prototype._calculatePositionStyle=function(a,b){var c=this.view;if(c){if(this.dockEnabled)return{left:"",top:"",right:"",bottom:""};if(a&&b&&(b=this._calculateFullWidth(b.w),a=this._calculateAlignmentPosition(a.x,a.y,c,b)))return{top:void 0!==a.top?a.top+"px":"auto",left:void 0!==a.left?a.left+"px":"auto",bottom:void 0!==a.bottom?a.bottom+"px":
  102. "auto",right:void 0!==a.right?a.right+"px":"auto"}}};q.prototype._viewChange=function(a,b){a&&b&&(this.close(),this.clear())};q.prototype._viewReadyChange=function(a,b){a?(a=this.get("viewModel.view"),this._wireUpView(a)):b&&(this.close(),this.clear())};q.prototype._wireUpView=function(a){this._destroySpinner();a&&(this.spinnerEnabled&&this._createSpinner(a),this._setDockEnabledForViewSize(this.dockOptions))};q.prototype._dockingThresholdCrossed=function(a,b,c){var d=a[0];a=a[1];var e=b[0];b=b[1];
  103. var f=c.width;c=c.height;return d<=f&&e>f||d>f&&e<=f||a<=c&&b>c||a>c&&b<=c};q.prototype._updateDockEnabledForViewSize=function(a,b){if(a&&b){var c=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},d=c.left+c.right,e=c.top+c.bottom,c=[],f=[];c[0]=a[0]-d;c[1]=a[1]-e;f[0]=b[0]-d;f[1]=b[1]-e;a=this.dockOptions;this._dockingThresholdCrossed(c,f,a.breakpoint)&&this._setDockEnabledForViewSize(a);this._setCurrentDockPosition()}};q.prototype._focusDockButtonNode=function(a){this._focusDockButton&&
  104. (this._focusDockButton=!1,a.focus())};q.prototype._mainContainerNodeUpdated=function(a){this._mainContainerNode=a;this._focusContainer?(this._focusContainer=!1,a.focus()):this._blurContainer&&(this._blurContainer=!1,a.blur())};q.prototype._featureMenuNodeUpdated=function(a){(this._featureMenuNode=a)&&this._focusFirstFeature&&(this._focusFirstFeature=!1,a=a.querySelectorAll("li"),a.length&&a[0].focus())};q.prototype._focusFeatureMenuButtonNode=function(a){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=
  105. !1,a.focus())};q.prototype._featureMenuViewportNodeUpdated=function(a){a&&(a.scrollTop=0)};q.prototype._toggleScreenLocationEnabled=function(){var a=this.dockEnabled,b=this.viewModel;b&&(b.screenLocationEnabled=this.visible&&!a)};q.prototype._shouldDockAtCurrentViewSize=function(a){a=a.breakpoint;var b=this.get("viewModel.view.ui"),c=b.width,b=b.height;if(isNaN(c)||isNaN(b))return!1;c=a.hasOwnProperty("width")&&c<=a.width;a=a.hasOwnProperty("height")&&b<=a.height;return c||a};q.prototype._setDockEnabledForViewSize=
  106. function(a){a.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(a))};q.prototype._getPageText=function(a,b){return l.substitute({index:b+1,total:a},c.pageText)};q.prototype._destroySpinner=function(){var a=this._spinner,b=this.view;a&&(b&&b.ui.remove(this._spinner,"popup-spinner"),a.destroy(),this._spinner=null)};q.prototype._createSpinner=function(a){a&&(this._spinner=new u({view:a}),a.ui.add(this._spinner,{key:"popup-spinner",position:"manual"}))};q.prototype._toggleCollapsed=function(){this.collapsed=
  107. !this.collapsed};q.prototype._close=function(){this.close();this.view&&this.view.focus()};q.prototype._toggleDockEnabled=function(){this.dockEnabled=!this.dockEnabled;this._focusDockButton=!0;this.scheduleRender()};q.prototype._toggleFeatureMenu=function(){var a=!this.featureMenuOpen;this._featureMenuOpenChanged(a);this.featureMenuOpen=a};q.prototype._triggerAction=function(a){this.viewModel.triggerAction(a.currentTarget["data-action-index"])};q.prototype._selectFeature=function(a){a=a.currentTarget["data-feature-index"];
  108. isNaN(a)||(this.viewModel.selectedFeatureIndex=a)};q.prototype._next=function(){this.next()};q.prototype._previous=function(){this.previous()};a([r.aliasOf("viewModel.actions"),v.renderable()],q.prototype,"actions",void 0);a([r.property()],q.prototype,"alignment",void 0);a([r.aliasOf("viewModel.autoCloseEnabled")],q.prototype,"autoCloseEnabled",void 0);a([r.aliasOf("viewModel.content"),v.renderable()],q.prototype,"content",void 0);a([r.property(),v.renderable()],q.prototype,"collapsed",void 0);a([r.property(),
  109. v.renderable()],q.prototype,"collapseEnabled",void 0);a([r.property({readOnly:!0,dependsOn:["dockEnabled","alignment"]}),v.renderable()],q.prototype,"currentAlignment",null);a([r.property({readOnly:!0,dependsOn:["viewModel.view.ready","dockEnabled","dockOptions"]}),v.renderable()],q.prototype,"currentDockPosition",null);a([r.property(),v.renderable()],q.prototype,"dockOptions",null);a([r.property(),v.renderable()],q.prototype,"dockEnabled",void 0);a([r.aliasOf("viewModel.featureCount"),v.renderable()],
  110. q.prototype,"featureCount",void 0);a([r.property({dependsOn:["viewModel.visible"]}),v.renderable()],q.prototype,"featureMenuOpen",null);a([r.aliasOf("viewModel.features"),v.renderable()],q.prototype,"features",void 0);a([r.property(),v.renderable()],q.prototype,"featureNavigationEnabled",void 0);a([r.aliasOf("viewModel.highlightEnabled")],q.prototype,"highlightEnabled",void 0);a([r.aliasOf("viewModel.location"),v.renderable()],q.prototype,"location",void 0);a([r.property({readOnly:!0}),v.renderable()],
  111. q.prototype,"featureWidgets",void 0);a([r.aliasOf("viewModel.promises")],q.prototype,"promises",void 0);a([r.aliasOf("viewModel.selectedFeature"),v.renderable()],q.prototype,"selectedFeature",void 0);a([r.aliasOf("viewModel.selectedFeatureIndex"),v.renderable()],q.prototype,"selectedFeatureIndex",void 0);a([r.property({readOnly:!0}),v.renderable()],q.prototype,"selectedFeatureWidget",void 0);a([r.property()],q.prototype,"spinnerEnabled",void 0);a([r.aliasOf("viewModel.title"),v.renderable()],q.prototype,
  112. "title",void 0);a([r.aliasOf("viewModel.updateLocationEnabled")],q.prototype,"updateLocationEnabled",void 0);a([r.aliasOf("viewModel.view")],q.prototype,"view",void 0);a([r.property({type:t}),v.renderable("viewModel.screenLocation viewModel.screenLocationEnabled viewModel.state viewModel.pendingPromisesCount viewModel.promiseCount viewModel.waitingForResult".split(" ")),v.vmEvent(["triggerAction","trigger-action"])],q.prototype,"viewModel",void 0);a([r.aliasOf("viewModel.visible"),v.renderable()],
  113. q.prototype,"visible",void 0);a([r.aliasOf("viewModel.clear")],q.prototype,"clear",null);a([r.aliasOf("viewModel.next")],q.prototype,"next",null);a([r.aliasOf("viewModel.previous")],q.prototype,"previous",null);a([r.aliasOf("viewModel.triggerAction")],q.prototype,"triggerAction",null);a([v.accessibleHandler()],q.prototype,"_toggleCollapsed",null);a([v.accessibleHandler()],q.prototype,"_close",null);a([v.accessibleHandler()],q.prototype,"_toggleDockEnabled",null);a([v.accessibleHandler()],q.prototype,
  114. "_toggleFeatureMenu",null);a([v.accessibleHandler()],q.prototype,"_triggerAction",null);a([v.accessibleHandler()],q.prototype,"_selectFeature",null);a([v.accessibleHandler()],q.prototype,"_next",null);a([v.accessibleHandler()],q.prototype,"_previous",null);return q=a([r.subclass("esri.widgets.Popup")],q)}(r.declared(q))})},"esri/widgets/Feature":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/i18n!./Feature/nls/Feature dojo/keys ../core/promiseUtils ../core/watchUtils ../core/accessorSupport/decorators ./Widget ./Feature/FeatureViewModel ./Feature/support/attachmentUtils ./support/uriUtils ./support/widget".split(" "),
  115. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m){function u(a,b){return void 0===b?"esri-feature__"+a:"esri-feature__"+a+"-"+b}return function(l){function q(a){a=l.call(this)||this;a._chartMap=new Map;a._activeMediaMap=new Map;a._chartRequirePromise=null;a._refreshTimers=new Map;a._mediaInfo=new Map;a.contentEnabled=null;a.graphic=null;a.title=null;a.view=null;a.viewModel=new h;return a}b(q,l);q.prototype.postInitialize=function(){var a=this;this.own(k.init(this,"viewModel.content",function(){return a._setupMediaRefreshTimers()}))};
  116. q.prototype.destroy=function(){this._clearMediaRefreshTimers();this._activeMediaMap.clear();this._activeMediaMap=null;this._cancelChartModules();this._destroyCharts()};q.prototype.render=function(){var a=m.tsx("div",{key:u("loading-container"),class:"esri-feature__loading-container"},m.tsx("span",{class:m.join("esri-icon-loading-indicator esri-rotating","esri-feature__loading-spinner")})),a=this.viewModel.waitingForContent?a:this._renderContent();return m.tsx("div",{class:"esri-feature"},m.tsx("div",
  117. {class:"esri-feature__size-container"},m.tsx("div",{class:"esri-feature__main-container"},a)))};q.prototype.goToMedia=function(a,b){this._setContentElementMedia(a,b)};q.prototype.nextMedia=function(a){this._pageContentElementMedia(a,"next")};q.prototype.previousMedia=function(a){this._pageContentElementMedia(a,"previous")};q.prototype._cancelChartModules=function(){this._chartRequirePromise&&this._chartRequirePromise.cancel()};q.prototype._destroyChart=function(a){var b=this._chartMap.get(a);b&&(b.chart.destroy(),
  118. b.tooltip.destroy());this._chartMap.delete(a)};q.prototype._destroyCharts=function(){this._chartMap.forEach(function(a){a.chart.destroy();a.tooltip.destroy()});this._chartMap.clear()};q.prototype._renderContent=function(){this._destroyCharts();var a=this.viewModel.content;if("string"===typeof a)return m.tsx("div",{key:u("content-string"),innerHTML:a});if(m.isWidget(a))return m.tsx("div",{key:u("content-widget")},a.render());if(a instanceof HTMLElement)return m.tsx("div",{key:u("content-html-element"),
  119. bind:a,afterCreate:this._attachToNode});if(m.isWidgetBase(a))return m.tsx("div",{key:u("content-dijit"),bind:a.domNode,afterCreate:this._attachToNode});if(Array.isArray(a))return a.length?m.tsx("div",{key:u("content-content-elements")},a.map(this._renderContentElement,this)):null};q.prototype._renderContentElement=function(a,b){switch(a.type){case "attachments":return this._renderAttachments(a,b);case "fields":return this._renderFields(a,b);case "media":return this._renderMedia(a,b);case "text":return this._renderText(a,
  120. b);default:return null}};q.prototype._renderAttachmentInfo=function(a){var b=a.attachmentInfo,c=a.supportsResizeAttachments,d=b.contentType;a=b.name;var f=b.url,h=c&&n.isSupportedImage(d),k=-1===f.indexOf("?")?"?":"\x26",d=h?""+f+k+"w\x3d48":n.getIconPath(d),h=(l={},l["esri-feature__attachment-item-mask--icon"]=!h,l),l=(r={},r["esri-feature__attachments-image--resizable"]=c,r);return m.tsx("li",{class:"esri-feature__attachments-item",key:b},m.tsx("a",{class:"esri-feature__attachments-item-link",href:f,
  121. target:"_blank"},m.tsx("div",{classes:h,class:"esri-feature__attachment-item-mask"},m.tsx("img",{alt:a,classes:l,class:"esri-feature__attachments-image",title:a,src:d}),m.tsx("span",{class:"esri-feature__attachments-image-overlay"},m.tsx("span",{"aria-hidden":"true",class:"esri-feature__attachments-link-icon esri-icon-link-external"}))),m.tsx("span",{class:"esri-feature__attachments-filename"},a||e.noTitle)));var l,r};q.prototype._renderAttachments=function(a,b){var c=this,d=a.displayType,f=(b=a.attachmentInfos)&&
  122. b.length,h=this.get("graphic.layer.capabilities.operations.supportsResizeAttachments"),d=(k={},k["esri-feature__attachments--list"]="preview"!==d,k["esri-feature__attachments--preview"]="preview"===d,k);return f?m.tsx("div",{key:u("attachments-element"),class:m.join("esri-feature__attachments","esri-feature__content-element"),classes:d},m.tsx("div",{class:"esri-feature__attachments-title"},e.attach),m.tsx("ul",{class:"esri-feature__attachments-items"},b.map(function(b,d){return c._renderAttachmentInfo({attachmentInfo:b,
  123. attachmentInfoIndex:d,supportsResizeAttachments:h,contentElement:a})}))):null;var k};q.prototype._forceLTR=function(a){return"\x26lrm;"+a};q.prototype._renderFieldInfo=function(a,b){var c=this.viewModel.formattedAttributes,d=c?c.content[b]||c.global:null,e=a.fieldName,c=a.label||e,d=d?null==d[e]?"":d[e]:"";a=!(!a.format||!a.format.dateFormat);d="number"!==typeof d||a?r.autoLink(d):this._forceLTR(d);a=(f={},f["esri-feature__field-data--date"]=a,f);return m.tsx("tr",{key:u("fields-element-info-row",
  124. b)},m.tsx("th",{key:u("fields-element-info-row-header",b),class:"esri-feature__field-header",innerHTML:c}),m.tsx("td",{key:u("fields-element-info-row-data",b),class:"esri-feature__field-data",classes:a,innerHTML:d}));var f};q.prototype._renderFields=function(a,b){var c=this;return(a=a.fieldInfos)?m.tsx("div",{key:u("fields-element",b),class:m.join("esri-feature__fields","esri-feature__content-element")},m.tsx("table",{class:"esri-table",summary:e.fieldsSummary,key:u("fields-element-table",b)},m.tsx("tbody",
  125. {key:u("fields-element-table-body",b)},a.map(function(a){return c._renderFieldInfo(a,b)})))):null};q.prototype._shouldOpenInNewTab=function(a){void 0===a&&(a="");return!/^(?:mailto:|tel:)/.test(a.trim().toLowerCase())};q.prototype._clearMediaRefreshTimers=function(){this._refreshTimers.forEach(function(a){return clearTimeout(a)});this._refreshTimers.clear()};q.prototype._clearMediaRefreshTimer=function(a){var b=this._refreshTimers.get(a);b&&(clearTimeout(b),this._refreshTimers.delete(a))};q.prototype._getImageSource=
  126. function(a,b){var c=-1!==a.indexOf("?")?"\x26":"?";a=a.split("#");var d=a[1],d=void 0===d?"":d;return""+a[0]+c+"timestamp\x3d"+b+(d?"#":"")+d};q.prototype._setupMediaRefreshTimer=function(a){var b=this.get("viewModel.content");if(Array.isArray(b)&&(b=b[a])&&"media"===b.type){var c=this._activeMediaMap.get(a);isNaN(c)&&(c=0);(b=b.mediaInfos[c])&&"image"===b.type&&b.refreshInterval&&this._setRefreshTimeout(a,b)}};q.prototype._setupMediaRefreshTimers=function(){var a=this;this._clearMediaRefreshTimers();
  127. var b=this.get("viewModel.content");Array.isArray(b)&&b.forEach(function(b,c){return a._setupMediaRefreshTimer(c)})};q.prototype._updateMediaInfoTimestamp=function(a,b){var c=Date.now();this._mediaInfo.set(b,{timestamp:c,sourceURL:this._getImageSource(a,c)});this.scheduleRender()};q.prototype._setRefreshTimeout=function(a,b){var c=this,d=b.refreshInterval,e=b.value;d&&(b=6E4*d,this._updateMediaInfoTimestamp(e.sourceURL,a),b=setInterval(function(){c._updateMediaInfoTimestamp(e.sourceURL,a)},b),this._refreshTimers.set(a,
  128. b))};q.prototype._renderMediaInfoType=function(a,b){var c=a.value,d=a.title,d=void 0===d?"":d,e=a.type,f=a.refreshInterval,h=c.sourceURL,c=c.linkURL;if("image"===e)return a=this._shouldOpenInNewTab(c)?"_self":"_blank",h=(f=f?this._mediaInfo.get(b):null)?f.sourceURL:h,b=m.tsx("img",{alt:d,key:u("media-image-"+(f?f.timestamp:0),b),src:h}),(d=c?m.tsx("a",{title:d,href:c,target:a},b):null)?d:b;if(-1!==e.indexOf("chart"))return m.tsx("div",{key:u("chart",b),bind:this,"data-media-info":a,"data-content-element-index":b,
  129. class:"esri-feature__media-chart",afterCreate:this._getChartDependencies,afterUpdate:this._getChartDependencies})};q.prototype._getChartDependencies=function(a){var b=this,d=a["data-media-info"],e=a["data-content-element-index"],f=d.value,h=f.theme||"Claro",k=d.type,l=h;"string"===typeof h&&(l=h.replace(/\./g,"/"));this._cancelChartModules();this._chartRequirePromise=c.create(function(a){return p(["dojox/charting/Chart2D","dojox/charting/action2d/Tooltip","dojox/charting/themes/"+l],function(){for(var b=
  130. [],c=0;c<arguments.length;c++)b[c]=arguments[c];return a(b)})}).then(function(c){b._renderChart(a,e,k,f,c[0],c[1],c[2]);b._chartRequirePromise=null})};q.prototype._renderChart=function(a,b,c,d,e,f,h){a=new e(a,{margins:{l:4,t:4,r:4,b:4}});h&&a.setTheme(h);switch(c){case "pie-chart":a.addPlot("default",{type:"Pie",labels:!1});a.addSeries("Series A",d.chartOptions);break;case "line-chart":a.addPlot("default",{type:"Markers"});a.addAxis("x",{min:0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1});
  131. a.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});d.chartOptions.forEach(function(a,b){a.x=b+1});a.addSeries("Series A",d.chartOptions);break;case "column-chart":a.addPlot("default",{type:"Columns",gap:3});a.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});a.addSeries("Series A",d.chartOptions);break;case "bar-chart":a.addPlot("default",{type:"Bars",gap:3}),a.addAxis("x",{includeZero:!0,fixUpper:"minor",minorLabels:!1}),a.addAxis("y",{vertical:!0,majorTicks:!1,minorTicks:!1,majorLabels:!1,
  132. minorLabels:!1}),a.addSeries("Series A",d.chartOptions)}c=new f(a);a.render();this._chartMap.set(b,{chart:a,tooltip:c})};q.prototype._renderMediaInfo=function(a,b){this._destroyChart(b);var c=this._renderMediaInfoType(a,b),d=a.title?m.tsx("div",{key:u("media-title",b),class:"esri-feature__media-item-title",innerHTML:a.title}):null;a=a.caption?m.tsx("div",{key:u("media-caption",b),class:"esri-feature__media-item-caption",innerHTML:a.caption}):null;return m.tsx("div",{key:u("media-container",b),class:"esri-feature__media-item-container"},
  133. m.tsx("div",{key:u("media-item-container",b),class:"esri-feature__media-item"},c),d,a)};q.prototype._renderMediaStatsItem=function(a,b,c){c="chart"===c?m.join("esri-feature__media-chart-icon","esri-icon-chart"):m.join("esri-feature__media-image-icon","esri-icon-media");return m.tsx("li",{class:"esri-feature__media-image-summary"},m.tsx("span",{"aria-hidden":"true",class:c}),m.tsx("span",{class:"esri-feature__media-count","aria-label":a},"("+b+")"))};q.prototype._renderMediaPageButton=function(a,b){var c=
  134. (a="previous"===a)?e.previous:e.next,d=a?m.join("esri-feature__button","esri-feature__media-previous"):m.join("esri-feature__button","esri-feature__media-next"),f=a?m.join("esri-feature__icon","esri-feature__media-previous-icon","esri-icon-left-triangle-arrow"):m.join("esri-feature__icon","esri-feature__media-next-icon","esri-icon-right-triangle-arrow"),h=a?m.join("esri-feature__icon","esri-feature__media-previous-icon--rtl","esri-icon-right-triangle-arrow"):m.join("esri-feature__icon","esri-feature__media-next-icon--rtl",
  135. "esri-icon-left-triangle-arrow"),k=a?this._previousClick:this._nextClick;return m.tsx("div",{key:u(a?"previous":"next",b),title:c,tabIndex:0,role:"button",class:d,"data-content-element-index":b,bind:this,onkeydown:k,onclick:k},m.tsx("span",{"aria-hidden":"true",class:f}),m.tsx("span",{"aria-hidden":"true",class:h}),m.tsx("span",{class:"esri-icon-font-fallback-text"},c))};q.prototype._handleMediaKeyup=function(a){var b=a.currentTarget["data-content-element-index"],c=a.keyCode;c===d.LEFT_ARROW&&(a.stopPropagation(),
  136. this.previousMedia(b));c===d.RIGHT_ARROW&&(a.stopPropagation(),this.nextMedia(b))};q.prototype._renderMedia=function(a,b){a=a.mediaInfos;var c=this._getMediaStats(a),d=c.total,f=(h={},h["esri-feature--media-pagination-visible"]=1<c.total,h),h=this._renderMediaStatsItem(e.numImages,c.images,"image"),c=this._renderMediaStatsItem(e.numCharts,c.charts,"chart"),k=this._renderMediaPageButton("previous",b),l=this._renderMediaPageButton("next",b),n=this._activeMediaMap.get(b);isNaN(n)&&(this._activeMediaMap.set(b,
  137. 0),n=0);return d?m.tsx("div",{key:u("media-element",b),"data-content-element-index":b,bind:this,onkeyup:this._handleMediaKeyup,class:m.join("esri-feature__media","esri-feature__content-element"),classes:f},m.tsx("ul",{class:"esri-feature__media-summary"},h,c),m.tsx("div",{key:u("media-element-container",b),class:"esri-feature__media-container"},k,this._renderMediaInfo(a[n],b),l)):null;var h};q.prototype._renderText=function(a,b){return a.text?m.tsx("div",{key:u("text-element",b),innerHTML:a.text,
  138. class:m.join("esri-feature__text","esri-feature__content-element")}):null};q.prototype._attachToNode=function(a){a.appendChild(this)};q.prototype._getMediaStats=function(a){var b=0,c=0;a.forEach(function(a){a=a.type;"image"===a?b++:-1!==a.indexOf("chart")&&c++});return{total:c+b,images:b,charts:c}};q.prototype._setContentElementMedia=function(a,b){this._clearMediaRefreshTimer(a);var c=this.viewModel.content;(c=(c=c&&c[a])&&c.mediaInfos)&&c.length&&(this._activeMediaMap.set(a,(b+c.length)%c.length),
  139. this._setupMediaRefreshTimer(a),this.scheduleRender())};q.prototype._pageContentElementMedia=function(a,b){b="previous"===b?-1:1;b=this._activeMediaMap.get(a)+b;this._setContentElementMedia(a,b)};q.prototype._previousClick=function(a){this.previousMedia(a.currentTarget["data-content-element-index"])};q.prototype._nextClick=function(a){this.nextMedia(a.currentTarget["data-content-element-index"])};a([f.aliasOf("viewModel.contentEnabled")],q.prototype,"contentEnabled",void 0);a([f.aliasOf("viewModel.graphic")],
  140. q.prototype,"graphic",void 0);a([f.aliasOf("viewModel.title")],q.prototype,"title",void 0);a([f.aliasOf("viewModel.view")],q.prototype,"view",void 0);a([f.property({type:h}),m.renderable(["viewModel.waitingForContent","viewModel.content"])],q.prototype,"viewModel",void 0);a([m.accessibleHandler()],q.prototype,"_previousClick",null);a([m.accessibleHandler()],q.prototype,"_nextClick",null);return q=a([f.subclass("esri.widgets.Feature")],q)}(f.declared(l))})},"esri/widgets/Feature/FeatureViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/assignHelper dojo/i18n!dojo/cldr/nls/number ../../Graphic ../../core/date ../../core/Error ../../core/Handles ../../core/lang ../../core/Logger ../../core/promiseUtils ../../core/watchUtils ../../core/accessorSupport/decorators ../../support/arcadeUtils ./support/featureUtils ./support/RelatedFeatures ../support/widget".split(" "),
  141. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x,v){function B(a,b){return a&&"feature"===a.type?a.getField(b):null}function w(a){return a.replace(/[\u00A0-\u99999<>\&]/gim,function(a){return"\x26#"+a.charCodeAt(0)+";"})}var z=n.getLogger("esri.widgets.FeatureViewModel"),y=/^\s*expression\//i,A=new f("cancelled-query","cancelled feature query"),C=k.getFormat("short-date-short-time"),D="DateFormat"+C;return function(e){function f(a){a=e.call(this)||this;a._handles=new l;a._featurePromise=void 0;a._layerDateFields=
  142. [];a.content=null;a.contentEnabled=!0;a.formattedAttributes=null;a.title="";a.view=null;return a}b(f,e);f.prototype.destroy=function(){this._clear();this._handles.destroy();this.graphic=this.view=this._handles=null};Object.defineProperty(f.prototype,"graphic",{get:function(){return this._get("graphic")||null},set:function(a){if(a){var b=t.getSourceLayer(a);this._layerDateFields=b?this._getDateFields(b):[]}this._set("graphic",a);this._graphicChanged(a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,
  143. "waitingForContent",{get:function(){var a=this._featurePromise;return a?!a.isFulfilled():!1},enumerable:!0,configurable:!0});f.prototype._clear=function(){this._cancelFeatureQuery();this._set("title","");this._set("content",null);this._set("formattedAttributes",null)};f.prototype._graphicChanged=function(a){var b=this,c=this._handles;c&&(c.remove("graphic"),this._clear(),a&&(c.add(m.watch(this,["graphic.popupTemplate.title","graphic.popupTemplate.content","graphic.popupTemplate.fieldInfos","contentEnabled"],
  144. function(){b._graphicChanged(b.graphic)}),"graphic"),this._featurePromise=this._queryFeature().then(function(){b.notifyChange("waitingForContent")}).catch(function(a){b.notifyChange("waitingForContent");a!==A&&z.log("error","error loading template",a);throw a;}),this.notifyChange("waitingForContent")))};f.prototype._cancelFeatureQuery=function(){var a=this._featurePromise;a&&!a.isFulfilled()&&a.cancel(A)};f.prototype._compileContent=function(a,b){var c=this;if(a&&(a.nodeName||a&&v.isWidgetBase(a)||
  145. v.isWidget(a)))return a;if("string"===typeof a)return this._compileText({type:"text",text:a}).text;if(Array.isArray(a))return a.map(function(a,d){d=(d=b&&b[d])&&d.value;var f=a.type;if("attachments"===f)return c._compileAttachments(a,d);if("fields"===f)return c._compileFields(a);if("media"===f)return c._compileMedia(a);if("text"===f)return c._compileText(a)});a&&z.warn("invalid content type.")};f.prototype._compileFields=function(a){var b=this,c=this.graphic;a=h.clone(a);var d=c.get("popupTemplate.expressionInfos"),
  146. c=a.fieldInfos?void 0:c.get("popupTemplate.fieldInfos"),c=a.fieldInfos||h.clone(c),f=[];c&&c.forEach(function(a){var c=a.fieldName.toLowerCase();if(!a.hasOwnProperty("visible")||a.visible)c=b._isExpressionField(c)?b._getExpressionInfo(d,c):null,a.label=c?c.title:a.label,f.push(a)});a.fieldInfos=f;return a};f.prototype._setImageValue=function(a,b,c){var d=a.linkURL;a.sourceURL=h.substitute(b,this._fixTokens(a.sourceURL,c));a.sourceURL&&d&&(a.linkURL=(""+h.substitute(b,this._fixTokens(d,c))).trim())};
  147. f.prototype._compileMedia=function(a){var b=this,c=this._layerDateFields,d=this.graphic;a=h.clone(a);var f=a.mediaInfos||[],e=d.attributes,k=t.getSourceLayer(d),l=this.formattedAttributes.global,n={dateFormat:{properties:c,formatter:D}};a.mediaInfos=f.map(function(a){if(a=h.clone(a)){var c=a.value,d=a.type,f=a.title?b._processFieldsInLinks(b._fixTokens(a.title,k),e):"",r=a.caption?b._processFieldsInLinks(b._fixTokens(a.caption,k),e):"";a.title=f?(""+h.substitute(l,f,n)).trim():"";a.caption=r?(""+
  148. h.substitute(l,r,n)).trim():"";if("image"===d)return b._setImageValue(c,l,k),a;if("pie-chart"===d||"line-chart"===d||"column-chart"===d||"bar-chart"===d)return b._setChartValue(c,l,k),a}});return a};f.prototype._compileText=function(a){var b=this._layerDateFields,c=this.graphic;if((a=h.clone(a))&&a.text){var d=t.getSourceLayer(c),f=c.attributes,c=this.formattedAttributes.global,b={dateFormat:{properties:b,formatter:D}},d=this._processFieldsInLinks(this._fixTokens(a.text,d),f);a.text=(""+h.substitute(c,
  149. d,b)).trim()}return a};f.prototype._compileTitle=function(){var a=this._layerDateFields,b=this.graphic,c=b.get("popupTemplate.title"),d=b.attributes,f=t.getSourceLayer(b),a={dateFormat:{properties:a,formatter:D}},e=this.formattedAttributes.global;return"function"===typeof c?c.call(null,{graphic:b}):"string"===typeof c&&c?(b=this._processFieldsInLinks(this._fixTokens(c,f),d),(""+h.substitute(e,b,a)).trim()):""};f.prototype._getExpressionInfo=function(a,b){if(this._isExpressionField(b)){var c=b.replace(y,
  150. "").toLowerCase(),d;a.some(function(a){if(a.name.toLowerCase()===c)return d=a,!0});return d}};f.prototype._fixTokens=function(a,b){return a.replace(/(\{([^\{\r\n]+)\})/g,function(a,c,d){return(a=B(b,d))?"{"+a.name+"}":c})};f.prototype._encodeAttributes=function(a){var b=a?h.clone(a):{};Object.keys(b).forEach(function(a){var c=b[a];"string"===typeof c&&(c=encodeURIComponent(c).replace(/\'/g,"\x26apos;"),b[a]=c)});return b};f.prototype._formatAttributesToFieldInfos=function(a,b,c){var d=this,f=h.clone(this._layerDateFields);
  151. a.forEach(function(e){var h=d._getFixedFieldName(e.fieldName,b);e.fieldName=h;c[h]=d._formatValue(c[h],{fieldInfos:a,fieldName:h,layer:b});f&&e.format&&e.format.dateFormat&&(e=f.indexOf(h),-1<e&&f.splice(e,1))})};f.prototype._getArcadeViewingMode=function(a){return a&&"local"===a.viewingMode?"localScene":"globalScene"};f.prototype._getViewInfo=function(){var a=this.view;if(a){var b="3d"===a.type?this._getArcadeViewingMode(a):"map";return q.getViewInfo({viewingMode:b,scale:a.scale,spatialReference:a.spatialReference})}};
  152. f.prototype._formatAttributes=function(a,b,c){var d=this,f=this.graphic,e=f.attributes,k=t.getSourceLayer(f),l=e?h.clone(e):{};b&&b.forEach(function(a){var b="expression/"+a.name;a=c.get(a.name);var e=d._getViewInfo();a=q.executeFunction(a,q.createExecContext(f,e));l[b]="string"===typeof a?w(a):a});this.addRelatedFeatureAttributes(l);a&&this._formatAttributesToFieldInfos(a,k,l);if(k){var n=k.typeIdField;e&&Object.keys(e).forEach(function(a){if(!d.isRelatedField(a)){var b=e[a];h.isDefined(b)&&(b=d._getDomainName(a,
  153. b),h.isDefined(b)?l[a]=b:a===n&&(b=d._getTypeName(),h.isDefined(b)&&(l[a]=b)))}})}return l};f.prototype._formatValue=function(a,b){var c={dateFormat:{properties:this._layerDateFields,formatter:D}},f=b.fieldName,e=this._getFieldInfo(b.fieldInfos,f),l=h.clone(e),e=b.preventPlacesFormatting;(b=B(b.layer,f))&&"date"===b.type&&(b=l.format||{},b.dateFormat=b.dateFormat||"short-date-short-time",l.format=b);f=l&&l.format;if(!h.isDefined(a)||!l||!h.isDefined(f))return a;var n=[],l=f.hasOwnProperty("places")||
  154. f.hasOwnProperty("digitSeparator");b=f.hasOwnProperty("digitSeparator")?f.digitSeparator:!0;e=h.isDefined(f.places)&&(!e||0<f.places);l&&e&&n.push("places: "+Number(f.places));e=l?e?"NumberFormat("+n.join(",")+")":"NumberFormat":f.dateFormat?"DateFormat"+(k.getFormat(f.dateFormat)||C):void 0;if(!e)return a;a=h.substitute({myKey:a},"{myKey:"+e+"}",c)||"";return l&&!b&&d.group?a.replace(new RegExp("\\"+d.group,"g"),""):a};f.prototype._getDomainName=function(a,b){var c=this.graphic,d=t.getSourceLayer(c);
  155. return d&&"feature"===d.type?(a=d.getFieldDomain(a,{feature:c}))&&"coded-value"===a.type?a.getName(b):null:null};f.prototype._getFieldInfo=function(a,b){if(a&&a.length&&b){var c=b.toLowerCase(),d=void 0;a.some(function(a){if(a.fieldName&&a.fieldName.toLowerCase()===c)return d=a,!0});return d}};f.prototype._getTypeName=function(){var a=this.graphic,b=t.getSourceLayer(a);if(b&&"feature"===b.type&&(a=b.getFeatureType(a),!a))return a.name};f.prototype._processFieldsInLinks=function(a,b){var c=this._encodeAttributes(b),
  156. d=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/ig;return a?a.replace(d,function(a,d,f){d=(""+(d||f)).trim();return h.substitute(d&&"{"===d[0]?b:c,a)}):a};f.prototype._compileAttachments=function(a,b){a=h.clone(a);if(!b)return a;a.attachmentInfos=b;return a};f.prototype._queryAttachments=function(){var a=this.graphic,b=t.getSourceLayer(a);return b?(b="scene"===b.type&&b.associatedLayer?b.associatedLayer:b)&&"feature"===b.type?b.queryFeatureAttachments(a):r.resolve([]):r.resolve([])};f.prototype._queryContentElements=
  157. function(a){var b=this;if(!Array.isArray(a))return r.resolve();var c={};a.forEach(function(a,d){"attachments"===a.type&&(a=b._queryAttachments())&&(c[d]=a)});return Object.keys(c).length?r.eachAlways(c):r.resolve()};f.prototype._getContent=function(){var a=this.graphic;if(!this.contentEnabled)return r.resolve();var b=a.get("popupTemplate.content"),a="function"===typeof b?b.call(null,{graphic:a}):b;return r.isThenable(a)?a:r.resolve(a)};f.prototype._queryFeature=function(){var a=this;return this._getContent().then(function(b){return a._checkForRelatedFeatures(b).then(function(){a._set("formattedAttributes",
  158. a._createFormattedAttributes(b));a._set("title",a._compileTitle());return a._queryContentElements(b).then(function(c){c=a._compileContent(b,c);a._set("content",c||null);return c})})})};f.prototype._isExpressionField=function(a){return y.test(a)};f.prototype._createCompiledExpressionDictionary=function(a){var b=new Map;if(!a)return b;a.forEach(function(a){return b.set(a.name,q.createFunction(a.expression))});return b};f.prototype._getDateFields=function(a){return(a=a.fields)?a.filter(function(a){return"date"===
  159. a.type}).map(function(a){return a.name}):[]};f.prototype._createFormattedAttributes=function(a){var b=this,c=this.graphic,d=c.get("popupTemplate.fieldInfos"),f=c.get("popupTemplate.expressionInfos"),e=this._createCompiledExpressionDictionary(f),h={global:this._formatAttributes(d,f,e),content:[]};Array.isArray(a)&&a.forEach(function(a,c){"fields"===a.type&&a.fieldInfos&&(h.content[c]=b._formatAttributes(a.fieldInfos,f,e))});return h};f.prototype._getAllFieldInfos=function(a){var b=[],c=this.graphic.get("popupTemplate.fieldInfos");
  160. c&&b.push.apply(b,c);if(!a||!Array.isArray(a))return b;a.forEach(function(a){b.push.apply(b,a&&a.fieldInfos)});return b};f.prototype._checkForRelatedFeatures=function(a){var b=this.graphic;a=this._getAllFieldInfos(a);return this.queryRelatedInfos(b,a)};f.prototype._getChartOption=function(a,b,c,d,f){var e=t.getSourceLayer(this.graphic),h=b.normalizeField;b=b.tooltipField;h=h?this.isRelatedField(h)?c[this.getRelatedFieldInfo(h).fieldName]:c[h]:null;a=parseFloat(c[a]);var k=void 0===a?null:a&&h?a/h:
  161. a;a={y:k,tooltip:""+k};if(!b)return a;if(this.isRelatedField(b))return d=this.getRelatedFieldInfo(b).fieldName,c=c[d],f=this._formatValue(k,{fieldInfos:f,fieldName:c,layer:e,preventPlacesFormatting:!!h}),a.tooltip=c+":"+f,a;c=this._getFieldInfo(f,d);d=this._getFixedFieldName(d,e);f=this._formatValue(k,{fieldInfos:f,fieldName:b,layer:e,preventPlacesFormatting:!!h});a.tooltip=(c?c.fieldName:d)+":"+f;return a};f.prototype._getFixedFieldName=function(a,b){return(b=B(b,a))?b.name:a};f.prototype._getFixedFieldNames=
  162. function(a,b){var c=this;return a&&a.map(function(a){return c._getFixedFieldName(a,b)})};f.prototype._setChartValue=function(a,b,c){var d=this,f=this.graphic,e=this.relatedInfoCount,k=a.fields,l=a.normalizeField;a.fields=this._getFixedFieldNames(k,c);l&&(a.normalizeField=this._getFixedFieldName(l,c));if(k.some(function(a){return!!(h.isDefined(b[a])||d.isRelatedField(a)&&e)})){var n=f.get("popupTemplate.fieldInfos");a.chartOptions=a.chartOptions||[];k.forEach(function(c){d.isRelatedField(c)?a.chartOptions=
  163. a.chartOptions.concat(d._getRelatedChartInfos(n,c,a,b)):(c=d._getChartOption(c,a,b,c,n),a.chartOptions.push(c))})}};f.prototype._getRelatedChartInfos=function(a,b,c,d){var f=this,e=[];d=this.getRelatedFieldInfo(b);var h=d.fieldName,k=this.getRelatedInfo(d.layerId);if(!k)return e;d=k.relatedFeatures;k=k.relation;if(!k||!d)return e;k=k.cardinality;d.forEach(function(d){var k=d.attributes;k&&Object.keys(k).forEach(function(d){d===h&&e.push(f._getChartOption(d,c,k,b,a))})});return"one-to-many"===k||"many-to-many"===
  164. k?e:[e[0]]};a([u.property({readOnly:!0})],f.prototype,"content",void 0);a([u.property()],f.prototype,"contentEnabled",void 0);a([u.property({readOnly:!0})],f.prototype,"formattedAttributes",void 0);a([u.property({type:c})],f.prototype,"graphic",null);a([u.property({readOnly:!0})],f.prototype,"title",void 0);a([u.property()],f.prototype,"view",void 0);a([u.property({readOnly:!0})],f.prototype,"waitingForContent",null);return f=a([u.subclass("esri.widgets.FeatureViewModel")],f)}(u.declared(x))})},"esri/widgets/Feature/support/featureUtils":function(){define(["require",
  165. "exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.getSourceLayer=function(b){if(b)return b.get("sourceLayer")||b.get("layer")}})},"esri/widgets/Feature/support/RelatedFeatures":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../request ../../../core/Accessor ../../../core/Error ../../../core/Logger ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../tasks/QueryTask ../../../tasks/support/Query ../../../tasks/support/StatisticDefinition ./featureUtils".split(" "),
  166. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m){var u=new Map,q=k.getLogger("esri.widgets.Popup.support.RelatedFeatures");return function(d){function k(a){a=d.call(this)||this;a.relatedInfoCount=null;a.relatedInfos=new Map;return a}b(k,d);k.prototype.destroy=function(){this.relatedInfos.clear()};k.prototype.addRelatedFeatureAttributes=function(a){var b=this;this.relatedInfos.forEach(function(c){return b._addRelatedFeatureAttribute(a,c)})};k.prototype.getRelatedFieldInfo=function(a){if(-1===a.indexOf("relationships/"))return null;
  167. a=a.split("/").slice(1);return{layerId:a[0],fieldName:a[1]}};k.prototype.getRelatedInfo=function(a){return this.relatedInfos.get(a.toString())};k.prototype.isRelatedField=function(a){void 0===a&&(a="");return a?-1!==a.indexOf("relationships/"):!1};k.prototype.queryRelatedInfos=function(a,b){var c=this;this.relatedInfos.clear();var d=m.getSourceLayer(a);if(!d)return f.resolve();var e=b.filter(function(a){return a&&c.isRelatedField(a.fieldName)});if(!e||!e.length)return f.resolve();this._createRelatedInfos(b,
  168. d);return this._queryLayerInfos(d,b).then(function(b){c._updateRelatedInfoLayerInfos(b);return c._queryRelatedFeatureMap(a).then(function(a){Object.keys(a).forEach(function(b){c._setRelatedFeatures(a[b],b.toString())});return a})})};k.prototype._addRelatedFeatureAttribute=function(a,b){var c=this;a&&b&&("one-to-one"===b.relation.cardinality&&b.relatedFeatures&&b.relatedFeatures.forEach(function(d){return c._addAttributesFromFeature(a,d,b)}),b.relatedStatsFeatures&&b.relatedStatsFeatures.forEach(function(d){return c._addAttributesFromFeature(a,
  169. d,b)}))};k.prototype._updateRelatedInfoLayerInfo=function(a,b){if(a=a.value)this.getRelatedInfo(b).layerInfo=a.data};k.prototype._updateRelatedInfoLayerInfos=function(a){var b=this;Object.keys(a).forEach(function(c){return b._updateRelatedInfoLayerInfo(a[c],c.toString())})};k.prototype._addAttributesFromFeature=function(a,b,c){var d=this;a&&b&&c&&Object.keys(b.attributes).forEach(function(f){var e=d._relatedFieldInfoToString({layerId:c.relation.id.toString(),fieldName:f});a[e]=b.attributes[f]})};
  170. k.prototype._relatedFieldInfoToString=function(a){return a?"relationships/"+a.layerId+"/"+a.fieldName:""};k.prototype._createRelatedInfoForFieldInfo=function(a,b){var c=this.getRelatedFieldInfo(a.fieldName);if(c){var d=c.layerId,c=c.fieldName;d&&(b=this.getRelatedInfo(d)||this._createRelatedInfo(d,b))&&(b.relatedFields.push(c),a.statisticType&&(a=new r({statisticType:a.statisticType,onStatisticField:c,outStatisticFieldName:c}),b.outStatistics.push(a)))}};k.prototype._createRelatedInfos=function(a,
  171. b){var c=this;a.forEach(function(a){return c._createRelatedInfoForFieldInfo(a,b)})};k.prototype._queryRelatedFeatureMap=function(a){var b=this,c={};this.relatedInfos.forEach(function(d,f){c[f]=b._queryRelatedLayerFeatures(a,d)});return f.eachAlways(c)};k.prototype._queryLayerInfos=function(a,b){var d=this,e={};this.relatedInfos.forEach(function(b,h){b=b.relation;if(!b)return h=new c("relation-required","A relation is required on a layer to retrieve related records."),q.error(h),f.reject(h);b=b.relatedTableId;
  172. if(!b)return h=new c("A related table ID is required on a layer to retrieve related records."),q.error(h),f.reject(h);b=a.url+"/"+b;var k=u.get(b),l=k?k:d._queryLayerInfo(b);k||u.set(b,l);e[h]=l});return f.eachAlways(e)};k.prototype._queryLayerInfo=function(a){return e(a,{query:{f:"json"},callbackParamName:"callback"})};k.prototype._queryRelatedLayerFeatures=function(a,b){var c=m.getSourceLayer(a).layerId.toString(),d=b.layerInfo,e=b.queryTask,h=b.relation;if(c=this._getDestinationRelation(d,c)){var h=
  173. h.keyField,k=c.keyField,c="string"===this._getDestinationFieldType(d,c)?k+"\x3d'"+a.attributes[h]+"'":k+"\x3d"+a.attributes[h];a=e.execute(new n({where:c,outFields:b.relatedFields}));b=b.outStatistics&&0<b.outStatistics.length&&d.supportsStatistics?e.execute(new n({where:c,outFields:b.relatedFields,outStatistics:b.outStatistics})):null;return f.eachAlways({features:a,statsFeatures:b?b:f.resolve()})}return f.resolve()};k.prototype._setRelatedFeatures=function(a,b){if(b=this.getRelatedInfo(b)){var c=
  174. a.value;c&&(a=c.features,c=c.statsFeatures,a=a&&a.value,b.relatedFeatures=a?a.features:[],a=c&&c.value,b.relatedStatsFeatures=a?a.features:[])}};k.prototype._getRelation=function(a,b){if("feature"!==b.type)return null;var c=null;b.relationships.some(function(b){if(b.id===parseInt(a,10))return c=b,!0});return c};k.prototype._createRelatedInfo=function(a,b){var c=this._getRelation(a,b);if(c){b=b.url+"/"+c.relatedTableId;var d=new h({url:b}),c={url:b,queryTask:d,relation:c,relatedFields:[],outStatistics:[]};
  175. this.relatedInfos.set(a,c);return c}};k.prototype._getDestinationRelation=function(a,b){var c;a&&a.relationships&&a.relationships.some(function(a){if(""+a.relatedTableId===b)return c=a,!0});return c};k.prototype._getDestinationFieldType=function(a,b){var c=void 0;a.fields.some(function(a){if(a.name===b.keyField)return c=-1!==["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"].indexOf(a.type)?"number":"string",!0});return c};a([l.aliasOf("relatedInfos.size")],
  176. k.prototype,"relatedInfoCount",void 0);a([l.property()],k.prototype,"relatedInfos",void 0);return k=a([l.subclass("esri.widgets.Popup.support.RelatedFeatures")],k)}(l.declared(d))})},"esri/widgets/Feature/support/attachmentUtils":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});var b=p.toUrl("../../../themes/base/images/files/");g.isSupportedImage=function(a){a=a.toLowerCase();return"image/bmp"===a||"image/emf"===a||"image/exif"===a||"image/gif"===
  177. a||"image/x-icon"===a||"image/jpeg"===a||"image/png"===a||"image/tiff"===a||"image/x-wmf"===a};g.getIconPath=function(a){return"text/plain"===a?b+"text-32.svg":"application/pdf"===a?b+"pdf-32.svg":"text/csv"===a?b+"csv-32.svg":"application/gpx+xml"===a?b+"gpx-32.svg":"application/x-dwf"===a?b+"cad-32.svg":"application/postscript"===a||"application/json"===a||"text/xml"===a||"model/vrml"===a?b+"code-32.svg":"application/x-zip-compressed"===a||"application/x-7z-compressed"===a||"application/x-gzip"===
  178. a||"application/x-tar"===a||"application/x-gtar"===a||"application/x-bzip2"===a||"application/gzip"===a||"application/x-compress"===a||"application/x-apple-diskimage"===a||"application/x-rar-compressed"===a||"application/zip"===a?b+"zip-32.svg":-1!==a.indexOf("image/")?b+"image-32.svg":-1!==a.indexOf("audio/")?b+"sound-32.svg":-1!==a.indexOf("video/")?b+"video-32.svg":-1!==a.indexOf("msexcel")||-1!==a.indexOf("ms-excel")||-1!==a.indexOf("spreadsheetml")?b+"excel-32.svg":-1!==a.indexOf("msword")||
  179. -1!==a.indexOf("ms-word")||-1!==a.indexOf("wordprocessingml")?b+"word-32.svg":-1!==a.indexOf("powerpoint")||-1!==a.indexOf("presentationml")?b+"report-32.svg":b+"generic-32.svg"}})},"esri/widgets/support/uriUtils":function(){define(["require","exports","dojo/i18n!./nls/uriUtils","../../core/lang"],function(p,g,b,a){function e(a){var b=null;d.some(function(c){c.pattern.test(a)&&(b=c);return!!b});return b}Object.defineProperty(g,"__esModule",{value:!0});var d=[{id:"http",pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,
  180. target:"_blank",label:b.view},{id:"tel",pattern:/^\s*(tel:([^\s]+))\s*$/i,label:"{hierPart}"},{id:"mailto",pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"{hierPart}"},{id:"arcgis-appstudio-player",pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"App Studio Player"},{id:"arcgis-collector",pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"Collector"},{id:"arcgis-explorer",pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,label:b.openInApp,
  181. appName:"Explorer"},{id:"arcgis-navigator",pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"Navigator"},{id:"arcgis-survey123",pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"Survey123"},{id:"arcgis-trek2there",pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"Trek2There"},{id:"arcgis-workforce",pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:b.workforce},{id:"iform",pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,
  182. label:b.openInApp,appName:"iForm"},{id:"flow",pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"FlowFinity"},{id:"lfmobile",pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"Laserfische"},{id:"mspbi",pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,label:b.openInApp,appName:"Microsoft Power Bi"}];g.autoLink=function(b){if("string"!==typeof b||!b)return b;var c=e(b);if(!c)return b;var d=b.match(c.pattern),d=a.substitute({appName:c.appName,hierPart:d&&d[2]},c.label);return b.replace(c.pattern,
  183. "\x3ca "+(c.target?'target\x3d"'+c.target+'"':"")+'" href\x3d"$1"\x3e'+d+"\x3c/a\x3e")}})},"esri/widgets/Spinner":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/promiseUtils ../core/watchUtils ../core/accessorSupport/decorators ./Widget ./support/AnchorElementViewModel ./support/widget".split(" "),function(p,g,b,a,e,d,c,k,f,l){return function(h){function k(a){a=h.call(this)||this;a._animationDelay=500;a._animationPromise=null;a.location=
  184. null;a.view=null;a.visible=!1;a.viewModel=new f;return a}b(k,h);k.prototype.postInitialize=function(){var a=this;this.own([d.watch(this,"visible",function(b){return a._visibleChange(b)})])};k.prototype.destroy=function(){this._cancelAnimationPromise()};k.prototype.show=function(a){var b=this,c=a.location;a=a.promise;c&&(this.viewModel.location=c);this.visible=!0;a&&a.always(function(){return b.hide()})};k.prototype.hide=function(){this.visible=!1};k.prototype.render=function(){var a=this.visible,
  185. b=!!this.viewModel.screenLocation,a=(c={},c["esri-spinner--start"]=a&&b,c["esri-spinner--finish"]=!a&&b,c),c=this._getPositionStyles();return l.tsx("div",{class:"esri-spinner",classes:a,styles:c});var c};k.prototype._cancelAnimationPromise=function(){this._animationPromise&&(this._animationPromise.cancel(),this._animationPromise=null)};k.prototype._visibleChange=function(a){var b=this;a?this.viewModel.screenLocationEnabled=!0:(this._cancelAnimationPromise(),this._animationPromise=e.after(this._animationDelay).then(function(){b.viewModel.screenLocationEnabled=
  186. !1;b._animationPromise=null}))};k.prototype._getPositionStyles=function(){var a=this.viewModel,b=a.screenLocation,a=a.view;if(!a||!b)return{};a=a.padding;return{left:b.x-a.left+"px",top:b.y-a.top+"px"}};a([c.aliasOf("viewModel.location")],k.prototype,"location",void 0);a([c.aliasOf("viewModel.view")],k.prototype,"view",void 0);a([c.property(),l.renderable()],k.prototype,"visible",void 0);a([c.property({type:f}),l.renderable(["viewModel.screenLocation","viewModel.screenLocationEnabled"])],k.prototype,
  187. "viewModel",void 0);return k=a([c.subclass("esri.widgets.Spinner")],k)}(c.declared(k))})},"esri/widgets/support/AnchorElementViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/Handles ../../core/watchUtils ../../core/watchUtils ../../core/accessorSupport/decorators".split(" "),function(p,g,b,a,e,d,c,k,f,l){return function(d){function e(){var a=d.call(this)||this;a._anchorHandles=
  188. new c;a.location=null;a.screenLocation=null;a.screenLocationEnabled=!1;a.view=null;a._anchorHandles.add([f.watch(a,"screenLocationEnabled,location,view.size",function(){return a._updateScreenPointAndHandle()}),f.watch(a,"view, view.ready",function(){return a._wireUpView()})]);return a}b(e,d);e.prototype.destroy=function(){this.view=null;this._anchorHandles&&this._anchorHandles.destroy();this._viewpointHandle=this._anchorHandles=null};e.prototype._wireUpView=function(){var a=this;this._anchorHandles.remove("view");
  189. this._viewpointHandle=null;if(this.get("view.ready")){this._setScreenLocation();var b=this.view,b=k.pausable(b,"3d"===b.type?"camera":"viewpoint",function(){return a._viewpointChange()});this._anchorHandles.add(b,"view");this._viewpointHandle=b;this._toggleWatchingViewpoint()}};e.prototype._viewpointChange=function(){this._setScreenLocation();this.emit("view-change")};e.prototype._updateScreenPointAndHandle=function(){this._setScreenLocation();this._toggleWatchingViewpoint()};e.prototype._toggleWatchingViewpoint=
  190. function(){var a=this._viewpointHandle,b=this.screenLocationEnabled;a&&(this.location&&b?a.resume():a.pause())};e.prototype._setScreenLocation=function(){var a=this.location,b=this.view,c=this.screenLocationEnabled,d=this.get("view.ready"),a=c&&a&&d?b.toScreen(a):null;this._set("screenLocation",a)};a([l.property()],e.prototype,"location",void 0);a([l.property({readOnly:!0})],e.prototype,"screenLocation",void 0);a([l.property()],e.prototype,"screenLocationEnabled",void 0);a([l.property()],e.prototype,
  191. "view",void 0);return e=a([l.subclass("esri.widgets.support.AnchorElementViewModel")],e)}(l.declared(e,d))})},"esri/widgets/Popup/PopupViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/assignHelper ../../core/Collection ../../core/Error ../../core/Handles ../../core/promiseUtils ../../core/watchUtils ../../core/accessorSupport/decorators ../../geometry/Point ../../geometry/support/webMercatorUtils ../../support/Action ../support/AnchorElementViewModel".split(" "),
  192. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u){function q(a,b){return b.allLayerViews.find(function(b){return b.layer===a})}p=new m({id:"zoom-to"});var t=new (d.ofType(m))([p]);return function(u){function g(a){a=u.call(this)||this;a._handles=new k;a._originalActions=null;a._pendingPromises=new Set;a.actions=t;a.goToOptions=null;a.autoCloseEnabled=!1;a.content=null;a.highlightEnabled=!0;a.title=null;a.updateLocationEnabled=!1;a.view=null;a.visible=!1;a.zoomFactor=4;return a}b(g,u);g.prototype.initialize=
  193. function(){this._handles.add([this.on("view-change",this._autoClose),l.watch(this,["highlightEnabled","selectedFeature","visible","view"],this._highlightFeature),l.watch(this,"selectedFeature.popupTemplate.actions",this._getSelectedFeatureActions),l.watch(this,"selectedFeature.popupTemplate.overwriteActions",this._getSelectedFeatureActions)])};g.prototype.destroy=function(){this._handles.destroy();this._handles=null;this._pendingPromises.clear();this.view=null};Object.defineProperty(g.prototype,"featureCount",
  194. {get:function(){return this.features.length},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"features",{get:function(){return this._get("features")||[]},set:function(a){a=a||[];this._set("features",a);var b=this.pendingPromisesCount,c=this.selectedFeatureIndex,d=this.promiseCount&&a.length;d&&b&&-1===c?this.selectedFeatureIndex=0:d&&-1!==c||(this.selectedFeatureIndex=a.length?0:-1)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"location",{get:function(){return this._get("location")||
  195. null},set:function(a){var b=this.get("location"),c=this.get("view.spatialReference.isWebMercator");a&&a.get("spatialReference.isWGS84")&&c&&(a=r.geographicToWebMercator(a));this._set("location",a);a!==b&&this._centerAtLocation()},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"pendingPromisesCount",{get:function(){return this._pendingPromises.size},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"waitingForResult",{get:function(){return 0<this.pendingPromisesCount&&
  196. 0===this.featureCount},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"promiseCount",{get:function(){return this.promises.length},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"promises",{get:function(){return this._get("promises")||[]},set:function(a){var b=this,c=this._get("promises");c&&c.forEach(function(a){a&&"function"===typeof a.cancel&&a.cancel()});this._pendingPromises.clear();this.features=[];Array.isArray(a)&&a.length?(this._set("promises",a),a=a.slice(0),
  197. a.forEach(function(a){b._pendingPromises.add(a);var c=function(c){b._pendingPromises.has(a)&&(b._pendingPromises.delete(a),b.notifyChange("pendingPromisesCount"),b._updateFeatures(a,c))};a.then(c,c)})):this._set("promises",[]);this.notifyChange("pendingPromisesCount")},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"selectedFeature",{get:function(){var a=this.selectedFeatureIndex;if(-1===a)return null;a=this.features[a];if(!a)return null;this.updateLocationEnabled&&(this.location=
  198. this._getPointFromGeometry(a.geometry));return a},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"selectedFeatureIndex",{get:function(){var a=this._get("selectedFeatureIndex");return"number"===typeof a?a:-1},set:function(a){var b=this.featureCount;a=isNaN(a)||-1>a||!b?-1:(a+b)%b;this._set("selectedFeatureIndex",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"state",{get:function(){return this.get("view.ready")?"ready":"disabled"},enumerable:!0,configurable:!0});
  199. g.prototype.centerAtLocation=function(){var a=this.location,b=this.view;return a&&b?b.goTo({target:a,scale:b.scale},this.goToOptions):f.reject(new c(this.declaredClass+"::Cannot center at location without a location and view."))};g.prototype.clear=function(){this.set({promises:[],features:[],content:null,title:null,location:null})};g.prototype.open=function(a){this.set(e({visible:!1},{updateLocationEnabled:!1,promises:[]},a));this._setVisibleWhenContentExists()};g.prototype.triggerAction=function(a){(a=
  200. this.actions.getItemAt(a))&&this.emit("trigger-action",{action:a})};g.prototype.next=function(){this.selectedFeatureIndex+=1;return this};g.prototype.previous=function(){--this.selectedFeatureIndex;return this};g.prototype.zoomToLocation=function(){var a=this,b=this.location,d=this.selectedFeature,e=this.view,k=this.zoomFactor;if(!b||!e)return f.reject(new c(this.declaredClass+"::Cannot zoom to location without a location and view."));var k=e.scale/k,h=this.get("selectedFeature.geometry"),l=d&&"3d"===
  201. e.type,b=(l=h||l)?d:b,n=l&&h&&"point"===h.type&&this._isScreenSize(d);return e.goTo({target:b,scale:n?k:void 0},this.goToOptions).then(function(){n&&"point"===h.type&&(a.location=h)})};g.prototype._setVisibleWhenContentExists=function(){var a=this,b=this._handles,c=this.promiseCount;b.remove("pendingVisible");c?(c=l.init(this,"pendingPromisesCount",function(c){a.featureCount&&(a.set("visible",!0),b.remove("pendingVisible"));c||b.remove("pendingVisible")}),b.add(c,"pendingVisible")):this.set("visible",
  202. !0)};g.prototype._autoClose=function(){this.autoCloseEnabled&&(this.visible=!1)};g.prototype._isScreenSize=function(a){var b=this.view;if("3d"!==b.type||"esri.Graphic"!==a.declaredClass)return!0;if((b=b.getViewForGraphic(a))&&b.whenGraphicBounds){var c=!1;b.whenGraphicBounds(a,{useViewElevation:!0}).then(function(a){c=!a||!a.boundingBox||a.boundingBox[0]===a.boundingBox[3]&&a.boundingBox[1]===a.boundingBox[4]&&a.boundingBox[2]===a.boundingBox[5]});return c}return!0};g.prototype._getSelectedFeatureActions=
  203. function(){this._originalActions&&(this.actions=this._originalActions,this._originalActions=null);var a=this.actions.filter(function(a){return!a.temporary}),b=this.get("selectedFeature.popupTemplate");b&&b.overwriteActions&&(this._originalActions=a);this.actions=this._getNewActions(b,a)};g.prototype._getNewActions=function(a,b){if(!a||!a.actions)return b;var c=a.actions;c.forEach(function(a){a.temporary=!0});return a.overwriteActions?c:b.concat(c)};g.prototype._getPointFromGeometry=function(a){return a?
  204. "point"===a.type?a:"extent"===a.type?a.center:"polygon"===a.type?a.centroid:"multipoint"===a.type||"polyline"===a.type?a.extent.center:null:null};g.prototype._centerAtLocation=function(){var a=this.location,b=this.updateLocationEnabled,c=this.get("view.extent");b&&c&&a&&!c.contains(a)&&this.centerAtLocation()};g.prototype._highlightFeature=function(){this._handles.remove("highlight");var a=this.selectedFeature,b=this.highlightEnabled,c=this.view,d=this.visible;a&&c&&b&&d&&(b=a.layer)&&(c=q(b,c))&&
  205. "function"===typeof c.highlight&&(b=b.objectIdField,d=a.attributes,a=c.highlight(d&&d[b]||a,{}),this._handles.add(a,"highlight"))};g.prototype._updateFeatures=function(a,b){var d=this.features;a&&b&&b.length&&!(!this._validatePromise(a)||b instanceof c||b instanceof Error)&&(d.length?(a=b.filter(function(a){return-1===d.indexOf(a)}),this.features=d.concat(a)):this.features=b)};g.prototype._validatePromise=function(a){return a&&(!a.isCanceled||!a.isCanceled())};a([h.property({type:d.ofType(m)})],g.prototype,
  206. "actions",void 0);a([h.property()],g.prototype,"goToOptions",void 0);a([h.property()],g.prototype,"autoCloseEnabled",void 0);a([h.property()],g.prototype,"content",void 0);a([h.property({readOnly:!0,dependsOn:["features"]})],g.prototype,"featureCount",null);a([h.property()],g.prototype,"features",null);a([h.property()],g.prototype,"highlightEnabled",void 0);a([h.property({type:n})],g.prototype,"location",null);a([h.property({readOnly:!0,dependsOn:["promises"]})],g.prototype,"pendingPromisesCount",
  207. null);a([h.property({readOnly:!0,dependsOn:["featureCount","pendingPromisesCount"]})],g.prototype,"waitingForResult",null);a([h.property({readOnly:!0,dependsOn:["promises"]})],g.prototype,"promiseCount",null);a([h.property()],g.prototype,"promises",null);a([h.property({value:null,readOnly:!0,dependsOn:["features","selectedFeatureIndex","updateLocationEnabled"]})],g.prototype,"selectedFeature",null);a([h.property({value:-1})],g.prototype,"selectedFeatureIndex",null);a([h.property({readOnly:!0,dependsOn:["view.ready"]})],
  208. g.prototype,"state",null);a([h.property()],g.prototype,"title",void 0);a([h.property()],g.prototype,"updateLocationEnabled",void 0);a([h.property()],g.prototype,"view",void 0);a([h.property()],g.prototype,"visible",void 0);a([h.property()],g.prototype,"zoomFactor",void 0);a([h.property()],g.prototype,"centerAtLocation",null);a([h.property()],g.prototype,"clear",null);a([h.property()],g.prototype,"triggerAction",null);a([h.property()],g.prototype,"next",null);a([h.property()],g.prototype,"previous",
  209. null);a([h.property()],g.prototype,"zoomToLocation",null);return g=a([h.subclass("esri.widgets.Popup.PopupViewModel")],g)}(h.declared(u))})},"esri/views/MapViewBase":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../geometry ../Viewpoint ../core/Error ../core/Handles ../core/Logger ../core/promiseUtils ../core/accessorSupport/decorators ../geometry/support/webMercatorUtils ./View ./ViewAnimation ./2d/AnimationManager ./2d/FrameTask ./2d/MapViewConstraints ./2d/PaddedViewState ./2d/viewpointUtils".split(" "),
  210. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x,v,B){var w=l.getLogger("esri.views.MapView");return function(l){function m(a){var b=l.call(this,a)||this;b._frameTask=new t(b);b._mapViewBaseHandles=new f;b._setup=!1;b.fullOpacity=1;b.interacting=!1;b.initialExtent=null;b.resizeAlign="center";b.type="2d";b.constraints=new x;b.padding={top:0,right:0,bottom:0,left:0};var c=function(){this._set("updating",this.layerViewManager.factory.working||this.allLayerViews.some(function(a){return!0===a.updating}))}.bind(b),
  211. d=b._mapViewBaseHandles;d.add([b.watch("viewpoint",function(a){return b._flipStationary()},!0),b.on("resize",function(a){return b._resizeHandler(a)}),b.watch("animationManager.animation",function(a){b.animation=a}),b.allLayerViews.on("change",function(){c();d.remove("layerViewsUpdating");d.add(b.allLayerViews.map(function(a){return a.watch("updating",c)}).toArray(),"layerViewsUpdating")})]);b.watch("ready",function(a){a?b._startup():b._tearDown()});return b}b(m,l);m.prototype.destroy=function(){this.destroyed||
  212. (this._set("ready",!1),this._mapViewBaseHandles.removeAll(),this.layerViewManager.clear(),this._frameTask.destroy(),this._tearDown(),this._gotoTask=this._mapViewBaseHandles=this._frameTask=null)};Object.defineProperty(m.prototype,"animation",{set:function(a){var b=this,c=this._get("animation");a!==c&&(c&&c.stop(),!a||a.isFulfilled()?this._set("animation",null):(this._set("animation",a),c=function(){a===b._get("animation")&&(b._set("animation",null),b._frameTask.requestFrame())},a.when(c,c,function(a){b.state&&
  213. (b.state.viewpoint=a)})))},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"center",{get:function(){if(!this._setup)return this._get("center");var a=this.content.center;return new d.Point({x:a[0],y:a[1],spatialReference:this.content.spatialReference})},set:function(a){if(null!=a)if(this._normalizeInput(a))if(this._setup){var b=this.viewpoint;B.centerAt(b,b,a);this.viewpoint=b}else this._set("center",a),this.notifyChange("initialExtentRequired");else w.error("#center","incompatible spatialReference "+
  214. JSON.stringify(a.spatialReference)+" with view's spatialReference "+JSON.stringify(this.spatialReference))},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"constraints",{set:function(a){var b=this,c=this._get("constraints");c&&(this._mapViewBaseHandles.remove("constraints"),c.destroy());this._set("constraints",a);a&&(this._setup&&(a.view=this,this.state.viewpoint=a.fit(this.content.viewpoint)),this._mapViewBaseHandles.add(a.on("update",function(){b._setup&&b.state&&(b.state.viewpoint=
  215. a.fit(b.content.viewpoint))}),"constraints"))},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"extent",{get:function(){return this._setup?this.content.extent.clone():this._get("extent")},set:function(a){if(null!=a){var b=this._normalizeInput(a);b?b.width&&b.height?this._setup?(a=this.viewpoint,B.setExtent(a,a,b,this.size,{constraints:this.constraints}),this.viewpoint=a):(this._set("extent",b),this._set("center",null),this._set("viewpoint",null),this._set("scale",0),this._set("zoom",
  216. -1),this.notifyChange("initialExtentRequired")):w.error("#extent","invalid extent size"):w.error("#center","incompatible spatialReference "+JSON.stringify(a.spatialReference)+" with view's spatialReference "+JSON.stringify(this.spatialReference))}},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"initialExtentRequired",{get:function(){var a=this.extent,b=this.center,c=this.scale,d=this.viewpoint,e=this.zoom;return this.get("map.initialViewProperties.viewpoint")||a||b&&(0!==c||-1!==
  217. e)||d?!1:!0},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"padding",{get:function(){return this._setup?this.state.padding:this._get("padding")},set:function(a){this._setup?(this.state.padding=a,this._set("padding",this.state.padding)):this._set("padding",a)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"rotation",{get:function(){return this._setup?this.content.rotation:this._get("rotation")},set:function(a){if(!isNaN(a))if(this._setup){var b=this.viewpoint;
  218. B.rotateTo(b,b,a);this.viewpoint=b}else this._set("rotation",a)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"scale",{get:function(){return this._setup?this.content.scale:this._get("scale")},set:function(a){if(a&&!isNaN(a))if(this._setup){var b=this.viewpoint;B.scaleTo(b,b,a);this.viewpoint=b}else{this._set("scale",a);this._set("zoom",-1);if(a=this._get("extent"))this._set("extent",null),this._set("center",a.center);this.notifyChange("initialExtentRequired")}},enumerable:!0,
  219. configurable:!0});Object.defineProperty(m.prototype,"stationary",{get:function(){return!this.animation&&!this.interacting&&!this._get("resizing")&&!this._stationaryTimer},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"viewpoint",{get:function(){if(!this._setup)return this._get("viewpoint");var a=this.content;return a&&a.viewpoint.clone()},set:function(a){if(null!=a){var b=this._normalizeInput(a);b?this._setup?(a=B.create(),B.copy(a,b),this.constraints.constrain(a,this.content.viewpoint),
  220. this.state.viewpoint=a,this._frameTask.requestFrame(),this._set("viewpoint",a)):(this._set("viewpoint",b),this._set("extent",null),this._set("center",null),this._set("zoom",-1),this._set("scale",0),this.notifyChange("initialExtentRequired")):!a.scale||isNaN(a.scale)?w.error("#viewpoint","invalid scale value of "+a.scale):a.targetGeometry?w.error("#viewpoint","incompatible spatialReference "+JSON.stringify(a.targetGeometry.spatialReference)+" with view's spatialReference "+JSON.stringify(this.spatialReference)):
  221. w.error("#viewpoint","geometry not defined")}},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"zoom",{get:function(){return this._setup?this.constraints.scaleToZoom(this.scale):this._get("zoom")},set:function(a){if(null!=a){if(!this._setup){this.notifyChange("initialExtentRequired");this._set("zoom",a);this._set("scale",0);var b=this._get("extent");b&&(this._set("extent",null),this._set("center",b.center))}this.constraints.effectiveLODs&&(b=this.viewpoint,B.scaleTo(b,b,this.constraints.zoomToScale(a)),
  222. this.viewpoint=b,this._set("zoom",this.constraints.scaleToZoom(this.scale)))}},enumerable:!0,configurable:!0});m.prototype.goTo=function(a,b){this.animation&&(this.animation=null);if(this._setup)return b=e.mixin({animate:!0},b),a=B.createAsync(a,this),this._gotoTask={},b.animate?this._gotoAnimated(a,b):this._gotoImmediate(a,b);w.error("#goTo()","MapView cannot be used before it is ready")};m.prototype.hitTest=function(a,b){return h.reject("Should be implemented by subclasses")};m.prototype.toMap=
  223. function(a,b,c){if(!this._setup)return null;a&&null!=a.x&&(c=b,b=a.y,a=a.x);var e=[0,0];this.state.toMap(e,[a,b]);c=c||new d.Point;c.x=e[0];c.y=e[1];c.spatialReference=this.spatialReference;return c};m.prototype.isTileInfoRequired=function(){return!0};m.prototype.toScreen=function(a,b,c,e){if(!this._setup)return null;a&&"object"===typeof a?(e=b||new d.ScreenPoint,a=this._normalizeInput(a),b=a.y,a=a.x):e="number"===typeof c||null==c?e||new d.ScreenPoint:c||new d.ScreenPoint;a=[a,b];this.state.toScreen(a,
  224. a);e.x=a[0];e.y=a[1];return e};m.prototype.pixelSizeAt=function(a,b){if(!this._setup)return NaN;a&&null!=a.x&&(b=a.y,a=a.x);return this.content.pixelSizeAt([a,b])};m.prototype.requestLayerViewUpdate=function(a){this._setup&&this._frameTask.requestLayerViewUpdate(a)};m.prototype.getDefaultSpatialReference=function(){return this.get("map.initialViewProperties.spatialReference")||this.get("defaultsFromMap.spatialReference")||null};m.prototype.isSpatialReferenceSupported=function(a,b){if(b||this._get("ready"))return!0;
  225. b=this._normalizeInput(this._get("center"),a);var c=this._normalizeInput(this._get("extent"),a),d=this._normalizeInput(this._get("viewpoint"),a),e=this._userSpatialReference,f=null,h=null;(d=d&&d.targetGeometry)&&("extent"===d.type?f=d:"point"===d.type&&(h=d));d=this._normalizeInput(this.get("map.initialViewProperties.viewpoint.targetGeometry.extent"),a);a=this._normalizeInput(this.initialExtent,a);a=c||f||d||a;return b||h||a&&a.center?!0:(e&&w.error("The view could not be initialized with the spatialReference "+
  226. e.wkid+".","Try specifying an extent or a center and scale"),!1)};m.prototype._createOrReplaceAnimation=function(a){if(!this.animation||this.animation.done)this.animation=new u;this.animation.update(a);return this.animation};m.prototype._cancellableGoTo=function(a,b,c){var d=this,e=c.then(function(){a===d._gotoTask&&(d.animation=null)}).catch(function(c){a===d._gotoTask&&(d.animation=null,b.done||b.stop());throw c;}),f=h.create(function(a){return a(e)},function(){a!==d._gotoTask||b.done||b.stop()});
  227. b.catch(function(){a===d._gotoTask&&f.cancel()});return f};m.prototype._gotoImmediate=function(a,b){var c=this,d=this._gotoTask,e=this._createOrReplaceAnimation(a);a=a.then(function(a){if(d!==c._gotoTask)throw new k("view:goto-interrupted","Goto was interrupted");c.viewpoint=e.target=a;e.finish()});return this._cancellableGoTo(d,e,a)};m.prototype._gotoAnimated=function(a,b){var c=this,d=this._gotoTask,e=this._createOrReplaceAnimation(a);a=a.then(function(a){if(d!==c._gotoTask)throw new k("view:goto-interrupted",
  228. "Goto was interrupted");e.update(a);c.animationManager.animate(e,c.viewpoint,b);return e.when().then(function(){})});return this._cancellableGoTo(d,e,a)};m.prototype._resizeHandler=function(a){var b=this.state;if(b){var c=this.content.viewpoint,d=this.content.size.concat();b.size=[a.width,a.height];B.resize(c,c,d,this.content.size,this.resizeAlign);c=this.constraints.constrain(c,null);this.state.viewpoint=c}};m.prototype._startup=function(){if(!this._setup){var a=this.constraints,b=this._get("zoom"),
  229. d=this._get("scale"),e=this._normalizeInput(this._get("center")),f=this._normalizeInput(this._get("extent")),h=this._get("rotation"),k=this._normalizeInput(this._get("viewpoint"));a.view=this;a.effectiveLODs?-1!==b&&(d=a.zoomToScale(b)):b=-1;var l=null,n=null,r=0,b=k&&k.rotation,m=k&&k.targetGeometry;m&&("extent"===m.type?l=m:"point"===m.type&&(n=m,r=k.scale));k=this._normalizeInput(this.get("map.initialViewProperties.viewpoint.targetGeometry.extent"));m=this._normalizeInput(this.initialExtent);f=
  230. f||l||k||m;e=e||n||f&&f.center;d=d||r||f&&B.extentToScale(f,this.size);h=new c({targetGeometry:e,scale:d,rotation:h||b||0});a.fit(h);this._set("animationManager",new q);this._set("state",new v({padding:this._get("padding"),size:this.size,viewpoint:h}));this._set("content",this.state.content);this._setup=!0}};m.prototype._tearDown=function(){if(this._setup){this._setup=!1;this._stationaryTimer&&(clearTimeout(this._stationaryTimer),this._stationaryTimer=null,this.notifyChange("stationary"));var a=this._get("content"),
  231. b=a.center,c=a.spatialReference,b=new d.Point({x:b[0],y:b[1],spatialReference:c});this._set("viewpoint",null);this._set("extent",null);this._set("center",b);this._set("zoom",-1);this._set("rotation",a.rotation);this._set("scale",a.scale);this._set("spatialReference",c);this.constraints.view=null;this.animationManager.destroy();this._set("animationManager",null);this._set("state",null);this._set("content",null);this.animation=null}};m.prototype._flipStationary=function(){var a=this;this._stationaryTimer&&
  232. clearTimeout(this._stationaryTimer);this._stationaryTimer=setTimeout(function(){a._stationaryTimer=null;a.notifyChange("stationary")},160);this.notifyChange("stationary")};m.prototype._normalizeInput=function(a,b){void 0===b&&(b=this.spatialReference);var c=a&&a.targetGeometry||a;return b?c?b.equals(c.spatialReference)?a:r.canProject(c,b)?a&&"esri.Viewpoint"===a.declaredClass?(a.targetGeometry=r.project(c,b),a):r.project(c,b):null:null:a};a([n.property()],m.prototype,"animation",null);a([n.property({readOnly:!0})],
  233. m.prototype,"animationManager",void 0);a([n.property({value:null,type:d.Point,dependsOn:["content.center"]})],m.prototype,"center",null);a([n.property({type:x})],m.prototype,"constraints",null);a([n.property({readOnly:!0})],m.prototype,"content",void 0);a([n.property({value:null,type:d.Extent,dependsOn:["content.extent"]})],m.prototype,"extent",null);a([n.property()],m.prototype,"fullOpacity",void 0);a([n.property({readOnly:!0})],m.prototype,"interacting",void 0);a([n.property({type:d.Extent})],m.prototype,
  234. "initialExtent",void 0);a([n.property({dependsOn:["map.initialViewProperties.viewpoint"]})],m.prototype,"initialExtentRequired",null);a([n.property({value:{top:0,right:0,bottom:0,left:0},cast:function(a){return e.mixin({top:0,right:0,bottom:0,left:0},a)}})],m.prototype,"padding",null);a([n.property()],m.prototype,"resizeAlign",void 0);a([n.property({value:0,type:Number,dependsOn:["content.rotation"]})],m.prototype,"rotation",null);a([n.property({value:0,type:Number,dependsOn:["content.scale"]})],
  235. m.prototype,"scale",null);a([n.property({type:d.SpatialReference,dependsOn:["map.initialViewProperties.spatialReference","defaultsFromMap.isSpatialReferenceDone"]})],m.prototype,"spatialReference",void 0);a([n.property({readOnly:!0})],m.prototype,"state",void 0);a([n.property()],m.prototype,"stationary",null);a([n.property({readOnly:!0})],m.prototype,"type",void 0);a([n.property({value:null,type:c,dependsOn:["content.viewpoint"]})],m.prototype,"viewpoint",null);a([n.property({value:-1,dependsOn:["content.scale"]})],
  236. m.prototype,"zoom",null);return m=a([n.subclass("esri.views.MapViewBase")],m)}(n.declared(m))})},"esri/views/2d/AnimationManager":function(){define("../../core/Accessor ../../core/scheduling ../../core/now ../ViewAnimation ./unitBezier ./viewpointUtils".split(" "),function(p,g,b,a,e,d){var c=function(a,b,c,d){var f=a.targetGeometry,k=b.targetGeometry;d?"string"===typeof d&&(d=e.parse(d)||e.ease):d=e.ease;this.easing=d;this.duration=c;this.sCenterX=f.x;this.sCenterY=f.y;this.sScale=a.scale;this.sRotation=
  237. a.rotation;this.tCenterX=k.x;this.tCenterY=k.y;this.tScale=b.scale;this.tRotation=b.rotation;this.dCenterX=this.tCenterX-this.sCenterX;this.dCenterY=this.tCenterY-this.sCenterY;this.dScale=this.tScale-this.sScale;this.dRotation=this.tRotation-this.sRotation;180<this.dRotation?this.dRotation-=360:-180>this.dRotation&&(this.dRotation+=360)};c.prototype.applyRatio=function(a,b){var c=this.easing(b),d,e;1<=b?(b=this.tCenterX,d=this.tCenterY,e=this.tRotation,c=this.tScale):(b=this.sCenterX+c*this.dCenterX,
  238. d=this.sCenterY+c*this.dCenterY,e=this.sRotation+c*this.dRotation,c=this.sScale+c*this.dScale);a.targetGeometry.x=b;a.targetGeometry.y=d;a.scale=c;a.rotation=e};return p.createSubclass({constructor:function(){this._updateTask=g.addFrameTask({postRender:this._postRender.bind(this)});this._updateTask.pause()},getDefaults:function(){return{viewpoint:d.create()}},properties:{animation:null,duration:{value:200},transition:{value:null},easing:{value:e.ease},viewpoint:null},animate:function(a,e,l){this.stop();
  239. d.copy(this.viewpoint,e);this.transition=new c(this.viewpoint,a.target,l&&l.duration||this.duration,l&&l.easing||this.easing);a.always(function(){this.animation===a&&this._updateTask&&("finished"===a.state&&(this.transition.applyRatio(this.viewpoint,1),this.animation._dfd.progress(this.viewpoint)),this._updateTask.pause(),this.updateFunction=this.animation=null)}.bind(this));this._startTime=b();this._updateTask.resume();return this.animation=a},animateContinous:function(c,d){this.stop();this.updateFunction=
  240. d;this.viewpoint=c;var e=new a({target:c.clone()});e.always(function(){this.animation===e&&this._updateTask&&(this._updateTask.pause(),this.updateFunction=this.animation=null)}.bind(this));this._startTime=b();this._updateTask.resume();return this.animation=e},stop:function(){this.animation&&(this.animation.stop(),this.updateFunction=this.animation=null)},_postRender:function(c){var d=this.animation;d&&d.state!==a.STOPPED?(this.updateFunction?this.updateFunction(this.viewpoint,c.deltaTime):(c=(b()-
  241. this._startTime)/this.transition.duration,d=1<=c,this.transition.applyRatio(this.viewpoint,c),d&&this.animation.finish()),this.animation._dfd.progress(this.viewpoint)):this._updateTask.pause()}})})},"esri/views/2d/unitBezier":function(){define([],function(){var p=function(b,a,e,d){function c(a,b){var c,d,e,h;b=null==b?1E-6:b;e=a;for(d=0;8>d;d++){h=((l*e+f)*e+k)*e-a;if(Math.abs(h)<b)return e;c=(3*l*e+2*f)*e+k;if(1E-6>Math.abs(c))break;e-=h/c}c=0;d=1;e=a;if(e<c)return c;if(e>d)return d;for(;c<d;){h=
  242. ((l*e+f)*e+k)*e;if(Math.abs(h-a)<b)break;a>h?c=e:d=e;e=.5*(d-c)+c}return e}var k=3*b,f=3*(e-b)-k,l=1-k-f,h=3*a,n=3*(d-a)-h,r=1-h-n;return function(a,b){a=c(a,b);return((r*a+n)*a+h)*a}},g=/^cubic-bezier\((.*)\)/;p.parse=function(b){var a=p[b]||null;!a&&(b=g.exec(b))&&(b=b[1].split(",").map(function(a){return parseFloat(a.trim())}),4!==b.length||b.some(function(a){return isNaN(a)})||(a=p.apply(p,b)));return a};p.ease=p(.25,.1,.25,1);p.linear=p(0,0,1,1);p.easeIn=p["ease-in"]=p(.42,0,1,1);p.easeOut=p["ease-out"]=
  243. p(0,0,.58,1);p.easeInOut=p["ease-in-out"]=p(.42,0,.58,1);return p})},"esri/views/2d/viewpointUtils":function(){define("require exports ../../Viewpoint ../../core/Error ../../core/promiseUtils ../../geometry/Extent ../../geometry/Geometry ../../geometry/Point ../../geometry/SpatialReference ../../geometry/support/scaleUtils ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ../../geometry/support/webMercatorUtils ./libs/gl-matrix/common ./libs/gl-matrix/mat2d ./libs/gl-matrix/vec2".split(" "),
  244. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q){function t(a,b,c,d){return d&&c&&!d.equals(c)&&n.canProject(d,c)&&d.isWebMercator?(d.isWebMercator?(c=b[1],89.99999<c?c=89.99999:-89.99999>c&&(c=-89.99999),c=Math.sin(m.toRadian(c)),a=q.set(a,6378137*m.toRadian(b[0]),3189068.5*Math.log((1+c)/(1-c)))):(c=m.toDegree(b[0]/6378137),a=q.set(a,c-360*Math.floor((c+180)/360),m.toDegree(.5*Math.PI-2*Math.atan(Math.exp(-1*b[1]/6378137))))),a):q.copy(a,b)}function x(a){return a.wkid?a:a.spatialReference||f.WGS84}function v(a,
  245. b){return b.type?q.set(a,b.x,b.y):q.copy(a,b)}function B(a,b){return Math.max(a.width/b[0],a.height/b[1])*G(a.spatialReference)}function w(a,b,e){var f;if(!a)return null;if(Array.isArray(a)&&2===a.length&&"number"===typeof a[0]&&"number"===typeof a[1])return new k(a);if(a.reduce)return a.reduce(function(a,c){return w(c,b,a)},e);a instanceof c?f=a:a.geometry&&(f=a.geometry);if(!f)return null;a="point"===f.type?new d({xmin:f.x,ymin:f.y,xmax:f.x,ymax:f.y,spatialReference:f.spatialReference}):f.extent;
  246. if(!a)return null;f=n.canProject(a,b);if(!a.spatialReference.equals(b)&&f)a=n.project(a,b);else if(!f)return null;return e=e?e.union(a):a.clone()}function z(a,c){if(!a)return new b({targetGeometry:new k,scale:0,rotation:0});var e=c.spatialReference,f=c.size,h=c.viewpoint,l=c.constraints,m=null;"esri.Viewpoint"===a.declaredClass?m=a:a.viewpoint?m=a.viewpoint:a.target&&"esri.Viewpoint"===a.target.declaredClass&&(m=a.target);var u=null;if(m&&m.targetGeometry)u=m.targetGeometry;else if(a instanceof d)u=
  247. a;else if(a||a&&(a.hasOwnProperty("center")||a.hasOwnProperty("extent")||a.hasOwnProperty("target")))u=w(a.center,e)||w(a.extent,e)||w(a.target,e)||w(a,e);!u&&h&&h.targetGeometry?u=h.targetGeometry:!u&&c.extent&&(u=c.extent);var g=x(u);e||(e=x(c.spatialReference||c.extent||u));if(!r.canProject(u,e)&&g&&!g.equals(e))return null;var y=v(q.create(),u.center?u.center:u),g=new k(t(y,y,g,e),e),y=null,y=m&&m.targetGeometry&&"point"===m.targetGeometry.type?m.scale:a.hasOwnProperty("scale")&&a.scale?a.scale:
  248. a.hasOwnProperty("zoom")&&-1!==a.zoom&&l&&l.effectiveLODs?l.zoomToScale(a.zoom):Array.isArray(u)||"point"===u.type||"extent"===u.type&&0===u.width&&0===u.height?c.extent&&n.canProject(c.extent,e)?B(n.project(c.extent,e),f):c.extent?B(c.extent,f):h.scale:n.canProject(u.extent,e)?B(n.project(u.extent,e),f):B(u.extent,f);c=0;m?c=m.rotation:a.hasOwnProperty("rotation")?c=a.rotation:h&&(c=h.rotation);a=new b({targetGeometry:g,scale:y,rotation:c});l&&(a=l.fit(a),l.rotationEnabled||(a.rotation=c));return a}
  249. function y(a,b){var c=a.targetGeometry,d=b.targetGeometry;c.x=d.x;c.y=d.y;c.spatialReference=d.spatialReference;a.scale=b.scale;a.rotation=b.rotation;return a}function A(a,b,c){return c?q.set(a,.5*(b[0]-c.right+c.left),.5*(b[1]-c.bottom+c.top)):q.scale(a,b,.5)}function C(a,b,c,d){g.getTransform(a,b,c,d);return u.invert(a,a)}function D(a,b,c){var d=m.toRadian(b.rotation)||0;b=Math.abs(Math.cos(d));d=Math.abs(Math.sin(d));return q.set(a,Math.round(c[1]*d+c[0]*b),Math.round(c[1]*b+c[0]*d))}function E(a){return a.scale*
  250. (1/(39.37*l.getMetersPerUnitForSR(a.targetGeometry.spatialReference)*96))}function G(a){return 39.37*l.getMetersPerUnitForSR(a)*96}function F(a){return a.isWrappable?(a=h.getInfo(a),a.valid[1]-a.valid[0]):0}function K(a,b){return Math.round(F(a)/b)}Object.defineProperty(g,"__esModule",{value:!0});var J=180/Math.PI;g.extentToScale=B;g.create=z;g.copy=y;g.getAnchor=A;g.getExtent=function(){var a=q.create();return function(b,c,d){var e=c.targetGeometry;v(a,e);c=.5*E(c);b.xmin=a[0]-c*d[0];b.ymin=a[1]-
  251. c*d[1];b.xmax=a[0]+c*d[0];b.ymax=a[1]+c*d[1];b.spatialReference=e.spatialReference;return b}}();g.setExtent=function(a,b,c,d,e){g.centerAt(a,b,c.center);a.scale=B(c,d);e&&e.constraints&&e.constraints.constrain(a);return a};g.getOuterExtent=function(){var a=q.create(),b=q.create();return function(c,d,e){v(a,d.targetGeometry);D(b,d,e);e=.5*E(d);c.set({xmin:a[0]-e*b[0],ymin:a[1]-e*b[1],xmax:a[0]+e*b[0],ymax:a[1]+e*b[1],spatialReference:d.targetGeometry.spatialReference});return c}}();g.getClippedExtent=
  252. function(){var a=q.create(),b=q.create();return function(c,d,e){var f=E(d),h=d.targetGeometry.spatialReference,k=K(h,f);v(a,d.targetGeometry);D(b,d,e);h.isWrappable&&b[0]>k&&(b[0]=k);d=.5*f;c.set({xmin:a[0]-d*b[0],ymin:a[1]-d*b[1],xmax:a[0]+d*b[0],ymax:a[1]+d*b[1],spatialReference:h});return c}}();g.getOuterSize=D;g.getPaddingScreenTranslation=function(){var a=q.create();return function(b,c,d){return q.sub(b,q.scale(b,c,.5),A(a,c,d))}}();var H=function(){var a=u.create(),b=q.create();return function(c,
  253. d,e,f){var h=E(d);d=m.toRadian(d.rotation)||0;q.set(b,h,h);u.fromScaling(a,b);u.rotate(a,a,d);u.translate(a,a,g.getPaddingScreenTranslation(b,e,f));u.translate(a,a,[0,f.top-f.bottom]);return q.set(c,a[4],a[5])}}();g.getResolution=E;g.getResolutionToScaleFactor=G;g.getMatrix=function(){var a=q.create(),b=q.create(),c=q.create();return function(d,e,f,h,k,l){q.negate(a,e);q.scale(b,f,.5*l);q.set(c,1/h*l,-1/h*l);u.identity(d);u.translate(d,d,b);k&&u.rotate(d,d,k);u.scale(d,d,c);u.translate(d,d,a);return d}}();
  254. g.getTransform=function(){var a=q.create();return function(b,c,d,e){var f=E(c),h=m.toRadian(c.rotation)||0;v(a,c.targetGeometry);return g.getMatrix(b,a,d,f,h,e)}}();g.getTransformNoRotation=function(){var a=q.create();return function(b,c,d,e){var f=E(c);v(a,c.targetGeometry);return g.getMatrix(b,a,d,f,0,e)}}();g.getWorldWidth=F;g.getWorldScreenWidth=K;g.createAsync=function(b,c){if(b=z(b,c))return e.resolve(b);b=new a("viewpointUtils-createAsync:different-spatialReference","Target spatialReference cannot be projected and is different from out spatialReference");
  255. return e.reject(b)};g.angleBetween=function(){var a=q.create(),b=q.create(),c=q.create();return function(d,e,f){q.subtract(a,d,e);q.normalize(a,a);q.subtract(b,d,f);q.normalize(b,b);q.cross(c,a,b);d=Math.acos(q.dot(a,b)/(q.length(a)*q.length(b)))*J;0>c[2]&&(d=-d);isNaN(d)&&(d=0);return d}}();g.addPadding=function(){var a=q.create();return function(b,c,d,e){var f=b.targetGeometry;y(b,c);H(a,c,d,e);f.x+=a[0];f.y+=a[1];return b}}();g.removePadding=function(){var a=q.create();return function(b,c,d,e){var f=
  256. b.targetGeometry;y(b,c);H(a,c,d,e);f.x-=a[0];f.y-=a[1];return b}}();g.centerAt=function(){var a=q.create();return function(b,c,d){y(b,c);c=b.targetGeometry;var e=x(d),f=x(c);v(a,d);t(a,a,e,f);c.x=a[0];c.y=a[1];return b}}();g.pixelSizeAt=function(a,b,c){return E(b)};g.resize=function(){var a=q.create();return function(b,c,d,e,f){f||(f="center");q.sub(a,d,e);q.scale(a,a,.5);d=a[0];e=a[1];switch(f){case "center":q.set(a,0,0);break;case "left":q.set(a,-d,0);break;case "top":q.set(a,0,e);break;case "right":q.set(a,
  257. d,0);break;case "bottom":q.set(a,0,-e);break;case "top-left":q.set(a,-d,e);break;case "bottom-left":q.set(a,-d,-e);break;case "top-right":q.set(a,d,e);break;case "bottom-right":q.set(a,d,-e)}g.translateBy(b,c,a);return b}}();g.rotateBy=function(a,b,c){y(a,b);a.rotation+=c;return a};g.rotateTo=function(a,b,c){y(a,b);a.rotation=c;return a};g.scaleBy=function(){var a=q.create();return function(b,c,d,e,f){y(b,c);isNaN(d)||0===d||(g.toMap(a,e,c,f),b.scale=c.scale*d,g.toScreen(a,a,b,f),g.translateBy(b,
  258. b,q.set(a,a[0]-e[0],e[1]-a[1])));return b}}();g.scaleTo=function(a,b,c){y(a,b);a.scale=c;return a};g.scaleAndRotateBy=function(){var a=q.create();return function(b,c,d,e,f,h){y(b,c);isNaN(d)||0===d||(g.toMap(a,f,c,h),b.scale=c.scale*d,b.rotation+=e,g.toScreen(a,a,b,h),g.translateBy(b,b,q.set(a,a[0]-f[0],f[1]-a[1])));return b}}();g.padAndScaleAndRotateBy=function(){var a=q.create(),b=q.create();return function(c,d,e,f,h,k,l){g.getPaddingScreenTranslation(b,k,l);q.add(a,h,b);return f?g.scaleAndRotateBy(c,
  259. d,e,f,a,k):g.scaleBy(c,d,e,a,k)}}();g.toMap=function(){var a=u.create();return function(b,c,d,e){return q.transformMat2d(b,c,C(a,d,e,1))}}();g.toScreen=function(){var a=u.create();return function(b,c,d,e){return q.transformMat2d(b,c,g.getTransform(a,d,e,1))}}();g.translateBy=function(){var a=q.create(),b=u.create();return function(c,d,e){y(c,d);var f=E(d),h=c.targetGeometry;u.fromRotation(b,m.toRadian(d.rotation)||0);u.scale(b,b,q.fromValues(f,f));q.transformMat2d(a,e,b);h.x+=a[0];h.y+=a[1];return c}}()})},
  260. "esri/views/2d/libs/gl-matrix/common":function(){define([],function(){if(!p)var p=1E-6;if(!g)var g="undefined"!==typeof Float32Array?Float32Array:Array;if(!b)var b=Math.random;var a={GLMAT_EPSILON:p,GLMAT_ARRAY_TYPE:g,GLMAT_RANDOM:b,setMatrixArrayType:function(b){a.GLMAT_ARRAY_TYPE=b}},e=Math.PI/180,d=180/Math.PI;a.toRadian=function(a){return a*e};a.toDegree=function(a){return a*d};a.setMatrixArrayType(Array);return a})},"esri/views/2d/libs/gl-matrix/mat2d":function(){define(["./common"],function(p){var g=
  261. p.GLMAT_ARRAY_TYPE;p={create:function(){var b=new g(6);b[0]=1;b[1]=0;b[2]=0;b[3]=1;b[4]=0;b[5]=0;return b},clone:function(b){var a=new g(6);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},copy:function(b,a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];return b},identity:function(b){b[0]=1;b[1]=0;b[2]=0;b[3]=1;b[4]=0;b[5]=0;return b},invert:function(b,a){var e=a[0],d=a[1],c=a[2],k=a[3],f=a[4];a=a[5];var l=e*k-d*c;if(!l)return null;l=1/l;b[0]=k*l;b[1]=-d*l;b[2]=
  262. -c*l;b[3]=e*l;b[4]=(c*a-k*f)*l;b[5]=(d*f-e*a)*l;return b},determinant:function(b){return b[0]*b[3]-b[1]*b[2]},multiply:function(b,a,e){var d=a[0],c=a[1],k=a[2],f=a[3],l=a[4];a=a[5];var h=e[0],n=e[1],r=e[2],m=e[3],u=e[4];e=e[5];b[0]=d*h+k*n;b[1]=c*h+f*n;b[2]=d*r+k*m;b[3]=c*r+f*m;b[4]=d*u+k*e+l;b[5]=c*u+f*e+a;return b}};p.mul=p.multiply;p.rotate=function(b,a,e){var d=a[0],c=a[1],k=a[2],f=a[3],l=a[4];a=a[5];var h=Math.sin(e);e=Math.cos(e);b[0]=d*e+k*h;b[1]=c*e+f*h;b[2]=d*-h+k*e;b[3]=c*-h+f*e;b[4]=l;
  263. b[5]=a;return b};p.scale=function(b,a,e){var d=a[1],c=a[2],k=a[3],f=a[4],l=a[5],h=e[0];e=e[1];b[0]=a[0]*h;b[1]=d*h;b[2]=c*e;b[3]=k*e;b[4]=f;b[5]=l;return b};p.translate=function(b,a,e){var d=a[0],c=a[1],k=a[2],f=a[3],l=a[4];a=a[5];var h=e[0];e=e[1];b[0]=d;b[1]=c;b[2]=k;b[3]=f;b[4]=d*h+k*e+l;b[5]=c*h+f*e+a;return b};p.fromRotation=function(b,a){var e=Math.sin(a);a=Math.cos(a);b[0]=a;b[1]=e;b[2]=-e;b[3]=a;b[4]=0;b[5]=0;return b};p.fromScaling=function(b,a){b[0]=a[0];b[1]=0;b[2]=0;b[3]=a[1];b[4]=0;b[5]=
  264. 0;return b};p.fromTranslation=function(b,a){b[0]=1;b[1]=0;b[2]=0;b[3]=1;b[4]=a[0];b[5]=a[1];return b};p.str=function(b){return"mat2d("+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+", "+b[4]+", "+b[5]+")"};p.frob=function(b){return Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2)+Math.pow(b[2],2)+Math.pow(b[3],2)+Math.pow(b[4],2)+Math.pow(b[5],2)+1)};return p})},"esri/views/2d/libs/gl-matrix/vec2":function(){define(["./common"],function(p){var g=p.GLMAT_ARRAY_TYPE,b=p.GLMAT_RANDOM,a={create:function(){var a=new g(2);
  265. a[0]=0;a[1]=0;return a},clone:function(a){var b=new g(2);b[0]=a[0];b[1]=a[1];return b},fromValues:function(a,b){var c=new g(2);c[0]=a;c[1]=b;return c},copy:function(a,b){a[0]=b[0];a[1]=b[1];return a},set:function(a,b,c){a[0]=b;a[1]=c;return a},add:function(a,b,c){a[0]=b[0]+c[0];a[1]=b[1]+c[1];return a},subtract:function(a,b,c){a[0]=b[0]-c[0];a[1]=b[1]-c[1];return a}};a.sub=a.subtract;a.multiply=function(a,b,c){a[0]=b[0]*c[0];a[1]=b[1]*c[1];return a};a.mul=a.multiply;a.divide=function(a,b,c){a[0]=
  266. b[0]/c[0];a[1]=b[1]/c[1];return a};a.div=a.divide;a.min=function(a,b,c){a[0]=Math.min(b[0],c[0]);a[1]=Math.min(b[1],c[1]);return a};a.max=function(a,b,c){a[0]=Math.max(b[0],c[0]);a[1]=Math.max(b[1],c[1]);return a};a.scale=function(a,b,c){a[0]=b[0]*c;a[1]=b[1]*c;return a};a.scaleAndAdd=function(a,b,c,k){a[0]=b[0]+c[0]*k;a[1]=b[1]+c[1]*k;return a};a.distance=function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return Math.sqrt(c*c+a*a)};a.dist=a.distance;a.squaredDistance=function(a,b){var c=b[0]-a[0];a=b[1]-
  267. a[1];return c*c+a*a};a.sqrDist=a.squaredDistance;a.length=function(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)};a.len=a.length;a.squaredLength=function(a){var b=a[0];a=a[1];return b*b+a*a};a.sqrLen=a.squaredLength;a.negate=function(a,b){a[0]=-b[0];a[1]=-b[1];return a};a.inverse=function(a,b){a[0]=1/b[0];a[1]=1/b[1];return a};a.normalize=function(a,b){var c=b[0],d=b[1],c=c*c+d*d;0<c&&(c=1/Math.sqrt(c),a[0]=b[0]*c,a[1]=b[1]*c);return a};a.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]};a.cross=function(a,
  268. b,c){b=b[0]*c[1]-b[1]*c[0];a[0]=a[1]=0;a[2]=b;return a};a.lerp=function(a,b,c,k){var d=b[0];b=b[1];a[0]=d+k*(c[0]-d);a[1]=b+k*(c[1]-b);return a};a.random=function(a,d){d=d||1;var c=2*b()*Math.PI;a[0]=Math.cos(c)*d;a[1]=Math.sin(c)*d;return a};a.transformMat2=function(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[2]*b;a[1]=c[1]*d+c[3]*b;return a};a.transformMat2d=function(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[2]*b+c[4];a[1]=c[1]*d+c[3]*b+c[5];return a};a.transformMat3=function(a,b,c){var d=b[0];b=b[1];a[0]=
  269. c[0]*d+c[3]*b+c[6];a[1]=c[1]*d+c[4]*b+c[7];return a};a.transformMat4=function(a,b,c){var d=b[0];b=b[1];a[0]=c[0]*d+c[4]*b+c[12];a[1]=c[1]*d+c[5]*b+c[13];return a};a.forEach=function(){var b=a.create();return function(a,c,e,f,l,h){c||(c=2);e||(e=0);for(f=f?Math.min(f*c+e,a.length):a.length;e<f;e+=c)b[0]=a[e],b[1]=a[e+1],l(b,b,h),a[e]=b[0],a[e+1]=b[1];return a}}();a.str=function(a){return"vec2("+a[0]+", "+a[1]+")"};return a})},"esri/views/2d/FrameTask":function(){define(["require","exports","../../core/scheduling"],
  270. function(p,g,b){return function(){function a(a){var b=this;this.view=a;this._frameTaskHandle=null;this.updateEnabled=this.stationary=!0;this.prepare=function(){b._updateParameters.state=b.view.state;b._updateParameters.stationary=b.view.stationary;b._updateParameters.pixelRatio=window.devicePixelRatio};this.update=function(){if(b.updateEnabled){for(var a=b.view,d=a.allLayerViews.toArray().filter(function(a){return a.isFulfilled()&&null==a.layerViews}),f=d.length,e=a.state,h=0;h<d.length;h++)if(a=
  271. d[h],a.attached){var n=b._layerViewsState[a.uid];if(null==n||!b.stationary&&!a.moving)a.moving=!0,a.moveStart();n!==e.id&&a.viewChange();b.stationary&&a.moving&&(a.moving=!1,a.moveEnd());b._layerViewsState[a.uid]=e.id}e=b._layerViewsTrash;for(h=0;h<e.length;h++)a=e[h],b._detachLayerView(a);for(h=e.length=0;h<f;h++)a=d[h],a.isFulfilled()&&!a.attached&&b._attachLayerView(a);d=b._layerViewsToUpdate;f=d.slice();h=b._updateParameters;for(n=d.length=0;n<f.length;n++)a=f[n],a.processUpdate(h);0===d.length&&
  272. 0===e.length&&b._frameTaskHandle.pause()}};a.watch("ready",function(a){a?b.start():b.stop()})}a.prototype.destroy=function(){this.stop()};a.prototype.start=function(){var a=this;this._updateParameters={state:this.view.state,pixelRatio:window.devicePixelRatio,stationary:!0};this._layerViewsTrash=[];this._layerViewsToUpdate=[];this._layerViewsState={};this._allLayerViewsChangeHandle=this.view.allLayerViews.on("change",function(b){Array.prototype.push.apply(a._layerViewsTrash,b.removed);a.requestFrame()});
  273. this._stationaryHandle=this.view.watch("stationary",function(b){a.stationary=b;a.requestFrame()});this._frameTaskHandle=b.addFrameTask(this)};a.prototype.stop=function(){var a=this;this._frameTaskHandle&&(this.view.allLayerViews.forEach(function(b){return a._detachLayerView(b)}),this._stationaryHandle.remove(),this._allLayerViewsChangeHandle.remove(),this._frameTaskHandle.remove(),this._updateParameters=this._stationaryHandle=this._allLayerViewsChangeHandle=this._frameTaskHandle=this._layerViewsTrash=
  274. this._layerViewsToUpdate=this._layerViewsState=null,this.stationary=!0)};a.prototype.requestLayerViewUpdate=function(a){this._layerViewsToUpdate.push(a);this.requestFrame()};a.prototype.requestFrame=function(){this._frameTaskHandle&&this._frameTaskHandle.resume()};a.prototype._attachLayerView=function(a){a.attached||(a.attached=!0,a.moving=!1,a.attach())};a.prototype._detachLayerView=function(a){a.attached&&(a.detach(),a.attached=!1,a.moving=!1)};return a}()})},"esri/views/2d/MapViewConstraints":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/accessorSupport/decorators ../../layers/support/LOD ./constraints/RotationConstraint ./constraints/ZoomConstraint".split(" "),
  275. function(p,g,b,a,e,d,c,k,f,l){return function(d){function e(){var a=null!==d&&d.apply(this,arguments)||this;a.enabled=!0;a.lods=null;a.minScale=0;a.maxScale=0;a.minZoom=-1;a.maxZoom=-1;a.rotationEnabled=!0;a.snapToZoom=!0;return a}b(e,d);e.prototype.initialize=function(){this.watch("_zoom, _rotation",this.emit.bind(this,"update"),!0)};e.prototype.destroy=function(){this.view=null;this._set("_zoom",null);this._set("_rotation",null)};Object.defineProperty(e.prototype,"_rotation",{get:function(){return new f({rotationEnabled:this.rotationEnabled})},
  276. enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"_defaultLODs",{get:function(){var a=this.get("view.defaultsFromMap.tileInfo"),b=this.get("view.spatialReference");return a&&b&&a.spatialReference.equals(b)?a.lods:null},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"_zoom",{get:function(){return new l({lods:this.lods||this._defaultLODs,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale,snapToZoom:this.snapToZoom})},enumerable:!0,
  277. configurable:!0});e.prototype.canZoomInTo=function(a){var b=this.effectiveMaxScale;return 0===b||a>=b};e.prototype.canZoomOutTo=function(a){var b=this.effectiveMinScale;return 0===b||a<=b};e.prototype.constrain=function(a,b){if(!this.enabled)return a;this._zoom.constrain(a,b);this._rotation.constrain(a,b);return a};e.prototype.fit=function(a){if(!this.enabled||!this.snapToZoom)return a;this._zoom.fit(a);return a};e.prototype.zoomToScale=function(a){return this._zoom.zoomToScale(a)};e.prototype.scaleToZoom=
  278. function(a){return this._zoom.scaleToZoom(a)};e.prototype.snapScale=function(a){return this._zoom.snapToClosestScale(a)};e.prototype.snapToNextScale=function(a){return this._zoom.snapToNextScale(a)};e.prototype.snapToPreviousScale=function(a){return this._zoom.snapToPreviousScale(a)};a([c.property({readOnly:!0,aliasOf:"_zoom.effectiveLODs"})],e.prototype,"effectiveLODs",void 0);a([c.property({readOnly:!0,aliasOf:"_zoom.effectiveMinScale"})],e.prototype,"effectiveMinScale",void 0);a([c.property({readOnly:!0,
  279. aliasOf:"_zoom.effectiveMaxScale"})],e.prototype,"effectiveMaxScale",void 0);a([c.property({readOnly:!0,aliasOf:"_zoom.effectiveMinZoom"})],e.prototype,"effectiveMinZoom",void 0);a([c.property({readOnly:!0,aliasOf:"_zoom.effectiveMaxZoom"})],e.prototype,"effectiveMaxZoom",void 0);a([c.property()],e.prototype,"enabled",void 0);a([c.property({type:[k]})],e.prototype,"lods",void 0);a([c.property()],e.prototype,"minScale",void 0);a([c.property()],e.prototype,"maxScale",void 0);a([c.property()],e.prototype,
  280. "minZoom",void 0);a([c.property()],e.prototype,"maxZoom",void 0);a([c.property()],e.prototype,"rotationEnabled",void 0);a([c.property()],e.prototype,"snapToZoom",void 0);a([c.property()],e.prototype,"view",void 0);a([c.property({type:f,dependsOn:["rotationEnabled"]})],e.prototype,"_rotation",null);a([c.property({dependsOn:["view.spatialReference","view.defaultsFromMap.tileInfo"]})],e.prototype,"_defaultLODs",null);a([c.property({readOnly:!0,type:l,dependsOn:"lods minZoom maxZoom minScale maxScale snapToZoom _defaultLODs".split(" ")})],
  281. e.prototype,"_zoom",null);return e=a([c.subclass("esri.views.2d.MapViewConstraints")],e)}(c.declared(e,d))})},"esri/views/2d/constraints/RotationConstraint":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Accessor ../../../core/accessorSupport/decorators".split(" "),function(p,g,b,a,e,d){return function(c){function e(){var a=null!==c&&c.apply(this,arguments)||this;a.enabled=!0;a.rotationEnabled=!0;return a}b(e,c);
  282. f=e;e.prototype.constrain=function(a,b){if(!this.enabled||!b)return a;this.rotationEnabled||(a.rotation=b.rotation);return a};e.prototype.clone=function(){return new f({enabled:this.enabled,rotationEnabled:this.rotationEnabled})};a([d.property()],e.prototype,"enabled",void 0);a([d.property()],e.prototype,"rotationEnabled",void 0);return e=f=a([d.subclass("esri.views.2d.constraints.RotationConstraint")],e);var f}(d.declared(e))})},"esri/views/2d/constraints/ZoomConstraint":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Accessor ../../../core/accessorSupport/decorators ../../../layers/support/LOD".split(" "),
  283. function(p,g,b,a,e,d,c){return function(e){function f(){var a=null!==e&&e.apply(this,arguments)||this;a._lodByScale={};a._scales=[];a.effectiveLODs=null;a.effectiveMinZoom=-1;a.effectiveMaxZoom=-1;a.effectiveMinScale=0;a.effectiveMaxScale=0;a.enabled=!0;a.lods=null;a.minZoom=-1;a.maxZoom=-1;a.minScale=0;a.maxScale=0;a.snapToZoom=!0;return a}b(f,e);k=f;f.prototype.initialize=function(){var a=this,b=this.lods,c=this.minScale,d=this.maxScale,e=this.minZoom,f=this.maxZoom,k=-1,l=-1,g=!1,B=!1;0!==c&&0!==
  284. d&&c<d&&(d=[d,c],c=d[0],d=d[1]);if(b&&b.length){b=b.map(function(a){return a.clone()});b.sort(function(a,b){return b.scale-a.scale});b.forEach(function(a,b){return a.level=b});for(var w,z=0,y=b;z<y.length;z++){var p=y[z];!g&&0<c&&c>=p.scale&&(k=p.level,g=!0);!B&&0<d&&d>=p.scale&&(l=w?w.level:-1,B=!0);w=p}-1===e&&(e=0===c?0:k);-1===f&&(f=0===d?b.length-1:l);e=Math.max(e,0);e=Math.min(e,b.length-1);f=Math.max(f,0);f=Math.min(f,b.length-1);e>f&&(c=[f,e],e=c[0],f=c[1]);c=b[e].scale;d=b[f].scale;b.splice(0,
  285. e);b.splice(f-e+1,b.length);b.forEach(function(b,c){a._lodByScale[b.scale]=b;a._scales[c]=b.scale});this._set("effectiveLODs",b);this._set("effectiveMinZoom",e);this._set("effectiveMaxZoom",f)}this._set("effectiveMinScale",c);this._set("effectiveMaxScale",d)};f.prototype.constrain=function(a,b){if(!this.enabled||b&&a.scale===b.scale)return a;var c=this.effectiveMinScale,d=this.effectiveMaxScale,e=a.targetGeometry,f=b&&b.targetGeometry,h=0!==c&&a.scale>c;if(0!==d&&a.scale<d||h)c=h?c:d,f&&(b=(c-b.scale)/
  286. (a.scale-b.scale),e.x=f.x+(e.x-f.x)*b,e.y=f.y+(e.y-f.y)*b),a.scale=c;this.snapToZoom&&this.effectiveLODs&&(a.scale=this._getClosestScale(a.scale));return a};f.prototype.fit=function(a){if(!this.effectiveLODs)return this.constrain(a,null);var b=a.scale,c=this.scaleToZoom(b);a.scale=.99<Math.abs(c-Math.round(c))?this.snapToPreviousScale(b):this.zoomToScale(Math.round(c));return a};f.prototype.zoomToScale=function(a){if(!this.effectiveLODs)return 0;a-=this.effectiveMinZoom;a=Math.max(0,a);var b=this._scales;
  287. if(0>=a)return b[0];if(a>=b.length)return b[b.length-1];var c=Math.round(a);return b[c]+(c-a)*(b[Math.round(a-.5)]-b[c])};f.prototype.scaleToZoom=function(a){if(!this.effectiveLODs)return-1;var b=this._scales,c=0,d=b.length-1,e,f;for(c;c<d;c++){e=b[c];f=b[c+1];if(e<=a)return c+this.effectiveMinZoom;if(f===a)return c+1+this.effectiveMinZoom;if(e>a&&f<a)return c+1-(a-f)/(e-f)+this.effectiveMinZoom}return c};f.prototype.snapToClosestScale=function(a){if(!this.effectiveLODs)return a;a=this.scaleToZoom(a);
  288. return this.zoomToScale(Math.round(a))};f.prototype.snapToNextScale=function(a,b){void 0===b&&(b=.5);if(!this.effectiveLODs)return a*b;a=Math.round(this.scaleToZoom(a));return this.zoomToScale(a+1)};f.prototype.snapToPreviousScale=function(a,b){void 0===b&&(b=2);if(!this.effectiveLODs)return a*b;a=Math.round(this.scaleToZoom(a));return this.zoomToScale(a-1)};f.prototype.clone=function(){return new k({enabled:this.enabled,lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,
  289. maxScale:this.maxScale})};f.prototype._getClosestScale=function(a){if(this._lodByScale[a])return this._lodByScale[a].scale;a=this._scales.reduce(function(b,c,d,e){return Math.abs(c-a)<=Math.abs(b-a)?c:b},this._scales[0]);return this._lodByScale[a].scale};a([d.property({readOnly:!0})],f.prototype,"effectiveLODs",void 0);a([d.property({readOnly:!0})],f.prototype,"effectiveMinZoom",void 0);a([d.property({readOnly:!0})],f.prototype,"effectiveMaxZoom",void 0);a([d.property({readOnly:!0})],f.prototype,
  290. "effectiveMinScale",void 0);a([d.property({readOnly:!0})],f.prototype,"effectiveMaxScale",void 0);a([d.property()],f.prototype,"enabled",void 0);a([d.property({type:[c]})],f.prototype,"lods",void 0);a([d.property()],f.prototype,"minZoom",void 0);a([d.property()],f.prototype,"maxZoom",void 0);a([d.property()],f.prototype,"minScale",void 0);a([d.property()],f.prototype,"maxScale",void 0);a([d.property()],f.prototype,"snapToZoom",void 0);return f=k=a([d.subclass("esri.views.2d.constraints.ZoomConstraint")],
  291. f);var k}(d.declared(e))})},"esri/views/2d/PaddedViewState":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ./viewpointUtils ./ViewState ./libs/gl-matrix/common ./libs/gl-matrix/mat2d ./libs/gl-matrix/vec2".split(" "),function(p,g,b,a,e,d,c,k,f,l,h){var n=function(c){function e(){var a=null!==c&&c.apply(this,arguments)||this;a.left=0;a.top=0;a.right=0;a.bottom=0;return a}b(e,
  292. c);a([d.property()],e.prototype,"left",void 0);a([d.property()],e.prototype,"top",void 0);a([d.property()],e.prototype,"right",void 0);a([d.property()],e.prototype,"bottom",void 0);return e=a([d.subclass("esri.views.2d.PaddedViewState.Padding")],e)}(d.declared(e));return function(e){function m(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=e.apply(this,a)||this;a.content=new k;a.padding=new n;a.size=h.fromValues(0,0);return a}b(m,e);Object.defineProperty(m.prototype,"clipRect",{get:function(){var a=
  293. this.worldScreenWidth;if(!a)return null;var b=f.toRadian(this.rotation),c=this.width*Math.abs(Math.cos(b))+this.height*Math.abs(Math.sin(b));if(a>c)return null;var d=h.clone(this.screenCenter),e=l.fromTranslation(l.create(),d);l.rotate(e,e,b);h.negate(d,d);l.translate(e,e,d);h.transformMat2d(d,this.paddedScreenCenter,e);return{top:-Math.round(c),left:Math.round(d[0]-.5*a),right:Math.round(d[0]+.5*a),bottom:+Math.round(c)}},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"padding",
  294. {set:function(a){this._set("padding",a||new n);this._updateContent()},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"size",{set:function(a){this._set("size",a);this._updateContent()},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"paddedScreenCenter",{get:function(){var a=this.content.size,b=this.padding,a=h.scale(h.create(),a,.5);a[0]+=b.left;a[1]+=b.top;return a},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"viewpoint",{set:function(a){var b=
  295. a.clone();this.content.viewpoint=a;c.addPadding(b,a,this._get("size"),this._get("padding"));this._set("viewpoint",c.addPadding(b.clone(),a,this._get("size"),this._get("padding")))},enumerable:!0,configurable:!0});m.prototype._updateContent=function(){var a=h.create(),b=this._get("size"),c=this._get("padding");if(b&&c){var d=this.content;h.set(a,c.left+c.right,c.top+c.bottom);h.subtract(a,b,a);d.size=a;if(a=d.viewpoint)this.viewpoint=a}};a([d.shared({transform:{dependsOn:["padding"]}})],m.prototype,
  296. "properties",void 0);a([d.property({dependsOn:["worldScreenWidth","rotation","paddedScreenCenter","screenCenter"],readOnly:!0})],m.prototype,"clipRect",null);a([d.property()],m.prototype,"content",void 0);a([d.property({type:n})],m.prototype,"padding",null);a([d.property()],m.prototype,"size",null);a([d.property({dependsOn:["size","padding"],readOnly:!0})],m.prototype,"paddedScreenCenter",null);a([d.property()],m.prototype,"viewpoint",null);return m=a([d.subclass("esri.views.2d.PaddedViewState")],
  297. m)}(d.declared(k))})},"esri/views/2d/ViewState":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Viewpoint ../../core/JSONSupport ../../core/accessorSupport/decorators ../../geometry/Extent ./viewpointUtils ./libs/gl-matrix/mat2d ./libs/gl-matrix/vec2".split(" "),function(p,g,b,a,e,d,c,k,f,l,h){var n=[0,0];return function(d){function m(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=d.apply(this,a)||this;a.pixelRatio=
  298. 1;a.size=[0,0];return a}b(m,d);r=m;Object.defineProperty(m.prototype,"center",{get:function(){var a=this.viewpoint.targetGeometry;return h.set(h.create(),a.x,a.y)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"extent",{get:function(){return f.getExtent(new k,this.viewpoint,this.size)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"height",{get:function(){return this.size?this.size[1]:0},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"id",
  299. {get:function(){return this._get("id")+1},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"inverseTransform",{get:function(){return l.invert(l.create(),this.transform)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"latitude",{get:function(){return this.viewpoint.targetGeometry.latitude},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"longitude",{get:function(){return this.viewpoint.targetGeometry.longitude},enumerable:!0,configurable:!0});
  300. Object.defineProperty(m.prototype,"resolution",{get:function(){return f.getResolution(this.viewpoint)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"rotation",{get:function(){return this.viewpoint.rotation},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"scale",{get:function(){return this.viewpoint.scale},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"screenCenter",{get:function(){return h.scale(h.create(),this.size,.5)},enumerable:!0,configurable:!0});
  301. Object.defineProperty(m.prototype,"spatialReference",{get:function(){return this.viewpoint.targetGeometry.spatialReference},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"transform",{get:function(){return f.getTransform(l.create(),this.viewpoint,this.size,this.pixelRatio)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"transformNoRotation",{get:function(){return f.getTransformNoRotation(l.create(),this.viewpoint,this.size,this.pixelRatio)},enumerable:!0,configurable:!0});
  302. Object.defineProperty(m.prototype,"clippedExtent",{get:function(){return f.getClippedExtent(new k,this.viewpoint,this.size)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"width",{get:function(){return this.size?this.size[0]:0},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"worldScreenWidth",{get:function(){return f.getWorldScreenWidth(this.spatialReference,this.resolution)},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"worldWidth",{get:function(){return f.getWorldWidth(this.spatialReference)},
  303. enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"wrappable",{get:function(){return!!this.spatialReference&&this.spatialReference.isWrappable},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"x",{get:function(){return this.center[0]},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"y",{get:function(){return this.center[1]},enumerable:!0,configurable:!0});m.prototype.copy=function(a){this.viewpoint&&this.size?(this._set("viewpoint",f.copy(this.viewpoint,
  304. a.viewpoint)),this._set("size",h.copy(this.size,a.size))):(this.viewpoint=a.viewpoint.clone(),h.copy(this.size,a.size));this._set("pixelRatio",a.pixelRatio);return this};m.prototype.clone=function(){return new r({viewpoint:this.viewpoint.clone(),size:h.clone(this.size)})};m.prototype.toMap=function(a,b,c){if(Array.isArray(b))return h.transformMat2d(a,b,this.inverseTransform);n[0]=b;n[1]=c;return h.transformMat2d(a,n,this.inverseTransform)};m.prototype.toScreen=function(a,b,c){if(Array.isArray(b))return h.transformMat2d(a,
  305. b,this.transform);n[0]=b;n[1]=c;return h.transformMat2d(a,n,this.transform)};m.prototype.pixelSizeAt=function(a){return f.pixelSizeAt(a,this.viewpoint,this.size)};a([c.property({dependsOn:["viewpoint"]})],m.prototype,"center",null);a([c.property({readOnly:!0,dependsOn:["viewpoint","size"]})],m.prototype,"extent",null);a([c.property({readOnly:!0,dependsOn:["size"]})],m.prototype,"height",null);a([c.property({value:0,readOnly:!0,dependsOn:["transform"]})],m.prototype,"id",null);a([c.property({readOnly:!0,
  306. dependsOn:["transform"]})],m.prototype,"inverseTransform",null);a([c.property({readOnly:!0,dependsOn:["viewpoint"]})],m.prototype,"latitude",null);a([c.property({readOnly:!0,dependsOn:["viewpoint"]})],m.prototype,"longitude",null);a([c.property({type:Number,json:{write:!0}})],m.prototype,"pixelRatio",void 0);a([c.property({readOnly:!0,dependsOn:["viewpoint"]})],m.prototype,"resolution",null);a([c.property({readOnly:!0,dependsOn:["viewpoint"]})],m.prototype,"rotation",null);a([c.property({readOnly:!0,
  307. dependsOn:["viewpoint"]})],m.prototype,"scale",null);a([c.property({readOnly:!0,dependsOn:["size"]})],m.prototype,"screenCenter",null);a([c.property({json:{write:!0}})],m.prototype,"size",void 0);a([c.property({readOnly:!0,dependsOn:["viewpoint"]})],m.prototype,"spatialReference",null);a([c.property({readOnly:!0,dependsOn:["viewpoint","size","pixelRatio"]})],m.prototype,"transform",null);a([c.property({readOnly:!0,dependsOn:["viewpoint","size","pixelRatio"]})],m.prototype,"transformNoRotation",null);
  308. a([c.property({type:e,json:{write:!0}})],m.prototype,"viewpoint",void 0);a([c.property({readOnly:!0,dependsOn:["viewpoint","size"]})],m.prototype,"clippedExtent",null);a([c.property({readOnly:!0,dependsOn:["size"]})],m.prototype,"width",null);a([c.property({readOnly:!0,dependsOn:["worldWidth","resolution"]})],m.prototype,"worldScreenWidth",null);a([c.property({readOnly:!0,dependsOn:["spatialReference"]})],m.prototype,"worldWidth",null);a([c.property({readOnly:!0,dependsOn:["spatialReference"]})],
  309. m.prototype,"wrappable",null);a([c.property({readOnly:!0,dependsOn:["center"]})],m.prototype,"x",null);a([c.property({readOnly:!0,dependsOn:["center"]})],m.prototype,"y",null);return m=r=a([c.subclass("esri.views.2d.ViewState")],m);var r}(c.declared(d))})},"esri/views/2d/engine/Stage":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/promiseUtils ../../../core/scheduling ./Container ./DOMContainer ./StageGL".split(" "),function(p,g,b,a,e,d,c,k){function f(a){if(a instanceof
  310. k)return a;if(a instanceof d){var b=0;for(a=a.children;b<a.length;b++){var c=f(a[b]);if(c)return c}}return null}return function(c){function d(a){var b=c.call(this)||this;b.element=a;b._renderParameters={state:b.state,pixelRatio:window.devicePixelRatio,stationary:!1};b._renderRequested=!1;b._taskHandle=e.addFrameTask({render:function(){return b.renderFrame()}});b._stationary=!0;b.attached=!0;b._taskHandle.pause();return b}b(d,c);d.prototype.destroy=function(){this.removeAllChildren();this.renderFrame();
  311. this._taskHandle.remove();this._taskHandle=null};Object.defineProperty(d.prototype,"state",{get:function(){return this._state},set:function(a){this._state=a;this.requestRender()},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"stationary",{get:function(){return this._stationary},set:function(a){this._stationary!==a&&(this._stationary=a,this.requestRender())},enumerable:!0,configurable:!0});d.prototype.start=function(){this._taskHandle.resume()};d.prototype.stop=function(){this._taskHandle.pause()};
  312. d.prototype.requestRender=function(){this._renderRequested=!0;this._taskHandle&&this._taskHandle.resume()};d.prototype.takeScreenshot=function(b){var c=f(this);return c?c.takeScreenshot(b):a.reject("Could not find an object capable of capturing screenshot!")};d.prototype.renderFrame=function(){this._renderRequested&&(this._renderRequested=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this.processRender(this._renderParameters));
  313. this._renderRequested||this._taskHandle.pause()};return d}(c)})},"esri/views/2d/engine/Container":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./DisplayObject"],function(p,g,b,a){var e;(function(a){a[a.BEFORE=0]="BEFORE";a[a.ATTACHING=1]="ATTACHING";a[a.DETACHING=2]="DETACHING";a[a.RENDERING=3]="RENDERING";a[a.AFTER=4]="AFTER";a[a.DONE=5]="DONE"})(e||(e={}));return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b._childrenSet=new Set;b._childrenToAttach=
  314. [];b._childrenToDetach=[];b._renderPhase=e.DONE;b.children=[];return b}b(c,a);Object.defineProperty(c.prototype,"numChildren",{get:function(){return this.children.length},enumerable:!0,configurable:!0});c.prototype.detach=function(a){var b=this.children.concat(this._childrenToDetach);a=this.prepareChildrenRenderParameters(a);for(var c=0;c<b.length;c++){var d=b[c];d.attached&&(this.detachChild(d,a),d.attached=!1,d.parent=null)}};c.prototype.doRender=function(a){var b=this.prepareChildrenRenderParameters(a);
  315. this._renderPhase=e.BEFORE;this.beforeRenderChildren(a,b);this._renderPhase=e.ATTACHING;this.attachChildren(b);this._renderPhase=e.DETACHING;for(var c=this._childrenToDetach;0<c.length;){var d=c.shift();this.detachChild(d,b);d.attached=!1;d.parent=null}this._renderPhase=e.RENDERING;this.renderChildren(b);this._renderPhase=e.AFTER;this.afterRenderChildren(a,b);this._renderPhase=e.DONE};c.prototype.addChild=function(a){return this.addChildAt(a,this.children.length)};c.prototype.addChildAt=function(a,
  316. b){void 0===b&&(b=this.numChildren);if(!a||this.contains(a))return a;var c=a.parent;c&&c!==this&&c.removeChild(a);b>=this.numChildren?this.children.push(a):this.children.splice(b,0,a);this._childrenSet.add(a);b=this._childrenToDetach.indexOf(a);-1<b&&this._childrenToDetach.splice(b,1);this._childrenToAttach.push(a);this._renderPhase>=e.RENDERING&&this.requestRender();return a};c.prototype.contains=function(a){return this._childrenSet.has(a)};c.prototype.getChildIndex=function(a){return this.children.indexOf(a)};
  317. c.prototype.getChildAt=function(a){return 0>a||a>this.children.length?null:this.children[a]};c.prototype.removeAllChildren=function(){for(var a=this.numChildren;a--;)this.removeChildAt(0)};c.prototype.removeChild=function(a){return this.contains(a)?this.removeChildAt(this.getChildIndex(a)):a};c.prototype.removeChildAt=function(a){if(0>a||a>=this.children.length)return null;a=this.children.splice(a,1)[0];this._childrenSet["delete"](a);if(a.attached)this._childrenToDetach.push(a),this._renderPhase>=
  318. e.RENDERING&&this.requestRender();else{var b=this._childrenToAttach.indexOf(a);-1<b&&this._childrenToAttach.splice(b,1)}return a};c.prototype.requestChildRender=function(a){a&&a.parent===this&&this._renderPhase>=e.RENDERING&&this.requestRender()};c.prototype.setChildIndex=function(a,b){var c=this.getChildIndex(a);-1<c&&(this.children.splice(c,1),this.children.splice(b,0,a),this._renderPhase>=e.RENDERING&&this.requestRender())};c.prototype.sortChildren=function(a){this._renderPhase>e.RENDERING&&this.requestRender();
  319. return this.children.sort(a)};c.prototype.attachChildren=function(a){var b=this._childrenToAttach;if(0!==b.length)for(var c=0,d=!1;!d;)d=b[c],this.attachChild(d,a)?(d.attached=!0,d.parent=this,b.splice(c,1)):++c,d=b.length===c};c.prototype.renderChildren=function(a){for(var b=this.children,c=b.length,d=0;d<c;d++){var e=b[d];e.attached&&this.renderChild(e,a)}};c.prototype.beforeRenderChildren=function(a,b){};c.prototype.attachChild=function(a,b){return a.attach(b)};c.prototype.detachChild=function(a,
  320. b){a.detach(b)};c.prototype.renderChild=function(a,b){a.processRender(b)};c.prototype.afterRenderChildren=function(a,b){};return c}(a)})},"esri/views/2d/engine/DisplayObject":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./Evented"],function(p,g,b,a){return function(a){function d(){var b=null!==a&&a.apply(this,arguments)||this;b._renderRequestedCalled=!1;b._attached=!1;b._opacity=1;b.renderRequested=!1;b._visible=!0;return b}b(d,a);Object.defineProperty(d.prototype,
  321. "attached",{get:function(){return this._attached},set:function(a){this._attached!==a&&((this._attached=a)?this.hasEventListener("attach")&&this.emit("attach"):this.hasEventListener("detach")&&this.emit("detach"))},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"opacity",{get:function(){return this._opacity},set:function(a){this._opacity!==a&&(this._opacity=a,this.requestRender())},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"visible",{get:function(){return this._visible},
  322. set:function(a){this._visible!==a&&(this._visible=a,this.requestRender())},enumerable:!0,configurable:!0});d.prototype.attach=function(a){return!0};d.prototype.detach=function(a){};d.prototype.processRender=function(a){this._renderRequestedCalled=!1;this.doRender(a);this._renderRequestedCalled||(this.renderRequested=!1);this.hasEventListener("post-render")&&this.emit("post-render")};d.prototype.requestRender=function(){var a=this.renderRequested;this.renderRequested=this._renderRequestedCalled=!0;
  323. this.parent&&this.parent.requestChildRender(this);a!==this.renderRequested&&this.hasEventListener("will-render")&&this.emit("will-render")};d.prototype.dispose=function(){};return d}(a.Evented)})},"esri/views/2d/engine/Evented":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","dojo/aspect","dojo/on"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function b(){}b.prototype.on=function(b,d){return a.after(this,"on"+b,d,!0)};b.prototype.once=
  324. function(a,b){return e.once(this,a,b)};b.prototype.emit=function(a){e.emit(this,a,this)};b.prototype.hasEventListener=function(a){a="on"+a;return!(!this[a]||!this[a].after)};return b}();g.Evented=p;g.EventedMixin=function(d){return function(c){function d(){return null!==c&&c.apply(this,arguments)||this}b(d,c);d.prototype.on=function(b,c){return a.after(this,"on"+b,c,!0)};d.prototype.once=function(a,b){return e.once(this,a,b)};d.prototype.emit=function(a,b){e.emit(this,a,b)};d.prototype.hasEventListener=
  325. function(a){a="on"+a;return!(!this[a]||!this[a].after)};return d}(d)}})},"esri/views/2d/engine/DOMContainer":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./Container"],function(p,g,b,a){return function(a){function d(){return null!==a&&a.apply(this,arguments)||this}b(d,a);d.prototype.createElement=function(){var a=document.createElement("div");a.setAttribute("class","esri-display-object");return a};d.prototype.setElement=function(a){this.element=a};d.prototype.doRender=
  326. function(b){var c=this.element.style;this.visible?(c.display="block",a.prototype.doRender.call(this,b)):c.display="none"};d.prototype.prepareChildrenRenderParameters=function(a){return a};d.prototype.attachChild=function(a,b){var c=a.element;c||(c=a.createElement(),a.setElement(c));return a.attach(b)};d.prototype.detachChild=function(a,b){a.detach(b);this.element.contains(a.element)&&this.element.removeChild(a.element);a.setElement(null)};d.prototype.renderChildren=function(b){for(var c=this.children,
  327. d=this.element.childNodes,e=0,h=c.length,n=0;n<h;n++)if(c[n].attached){var r=c[n].element;d[e]!==r&&(null!=d[e+1]?this.element.insertBefore(r,d[e]):this.element.appendChild(r));e+=1}a.prototype.renderChildren.call(this,b)};return d}(a)})},"esri/views/2d/engine/StageGL":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/promiseUtils ./Container ./webgl/BitBlitRenderer ./webgl/WGLPainter ./webgl/shaders/glShaderSnippets ../libs/gl-matrix/common ../libs/gl-matrix/mat2d ../libs/gl-matrix/vec2 ../../support/screenshotUtils ../../webgl/BufferObject ../../webgl/context-util ../../webgl/FramebufferObject ../../webgl/Program ../../webgl/RenderingContext ../../webgl/VertexArrayObject".split(" "),
  328. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x){function v(a){return{state:a.state,pixelRatio:a.pixelRatio,stationary:a.stationary}}var B={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"};return function(e){function g(){var a=null!==e&&e.apply(this,arguments)||this;a._clipData=new Float32Array(8);a._upperLeft=h.create();a._upperRight=h.create();a._lowerLeft=h.create();a._lowerRight=h.create();a._mat2=l.create();a._clipRendererInitialized=!1;a._contextVersion=null;return a}b(g,e);Object.defineProperty(g.prototype,
  329. "glPainter",{get:function(){return this._painter},enumerable:!0,configurable:!0});g.prototype.createElement=function(){var a=document.createElement("canvas");a.setAttribute("class","esri-display-object");return a};g.prototype.setElement=function(a){this.element=a};g.prototype.useContextVersion=function(a){this._renderingContext||(this._contextVersion=a)};g.prototype.attach=function(a){if(this.attached)return!0;this._resizeCanvas(a);var b=m.createContextOrErrorHTML(this.element,{alpha:!0,antialias:!1,
  330. depth:!0,stencil:!0},this._contextVersion);this._renderingContext=new t(b);this._contextVersion=this._renderingContext.contextVersion;this.attached=!0;this._cachedRenderParams=v(a);this._painter||(this._painter=new c.default,this._painter.initialize(this._renderingContext));return e.prototype.attach.call(this,a)};g.prototype.detach=function(a){e.prototype.detach.call(this,a);this._renderingContext&&(this._renderingContext.dispose(),this._renderingContext=null);this._cachedRenderParams=null};g.prototype.beforeRenderChildren=
  331. function(a,b){var c=a.state,d=this._painter;if(d)if(b=this._renderingContext,b.enforceState(),d.update(c,a.pixelRatio),c.spatialReference&&(c.spatialReference._isWrappable?c.spatialReference._isWrappable():c.spatialReference.isWrappable)){var e=c.width,d=c.height,k=c.rotation,e=Math.round(e*a.pixelRatio),d=Math.round(d*a.pixelRatio),n=f.toRadian(k),m=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),q=Math.round(c.worldScreenWidth);if(Math.round(e*m+d*r)<=q)this._clipFrame=!1;else{this._clipFBO&&this._clipFBO.width===
  332. e&&this._clipFBO.height===d||(this._clipFBO=new u(b,{colorTarget:0,depthStencilTarget:3,width:e,height:d}));var g=.5*e,t=.5*d,c=1/e,w=1/d;a=.5*q*a.pixelRatio;var v=.5*(e*r+d*m),e=this._upperLeft,m=this._upperRight,r=this._lowerLeft,q=this._lowerRight;h.set(e,-a,-v);h.set(m,a,-v);h.set(r,-a,v);h.set(q,a,v);l.identity(this._mat2);l.translate(this._mat2,this._mat2,[g,t]);0!==k&&l.rotate(this._mat2,this._mat2,n);h.transformMat2d(e,e,this._mat2);h.transformMat2d(m,m,this._mat2);h.transformMat2d(r,r,this._mat2);
  333. h.transformMat2d(q,q,this._mat2);k=this._clipData;k.set([2*r[0]*c-1,2*(d-r[1])*w-1,2*q[0]*c-1,2*(d-q[1])*w-1,2*e[0]*c-1,2*(d-e[1])*w-1,2*m[0]*c-1,2*(d-m[1])*w-1]);this._clipRendererInitialized||this._initializeClipRenderer(b);this._clipVBO.setData(k);this._boundFBO=b.getBoundFramebufferObject();b.bindFramebuffer(this._clipFBO);b.setDepthWriteEnabled(!0);b.setStencilWriteMask(255);b.setClearColor(0,0,0,0);b.setClearDepth(1);b.setClearStencil(0);b.clear(b.gl.COLOR_BUFFER_BIT|b.gl.DEPTH_BUFFER_BIT|b.gl.STENCIL_BUFFER_BIT);
  334. b.setDepthWriteEnabled(!1);this._clipFrame=!0}}else this._clipFrame=!1};g.prototype.afterRenderChildren=function(a,b){this._clipFrame&&this._clipRendererInitialized&&(a=this._renderingContext,a.bindFramebuffer(this._boundFBO),this._boundFBO=null,a.bindVAO(this._clipVAO),a.bindProgram(this._clipStencilProgram),a.setDepthWriteEnabled(!1),a.setDepthTestEnabled(!1),a.setStencilTestEnabled(!0),a.setBlendingEnabled(!1),a.setColorMask(!1,!1,!1,!1),a.setStencilOp(7680,7680,7681),a.setStencilWriteMask(255),
  335. a.setStencilFunction(519,1,255),a.drawElements(4,6,5123,0),a.bindVAO(),a.setColorMask(!0,!0,!0,!0),a.setBlendingEnabled(!0),a.setStencilFunction(514,1,255),this._blitRenderer.render(a,this._clipFBO.colorTexture,9728,1),a.setStencilTestEnabled(!1))};g.prototype.doRender=function(a){var b=this.element.style;this.visible?(b.display="block",b.opacity=""+this.opacity,this._resizeCanvas(a),e.prototype.doRender.call(this,a),this._cachedRenderParams=v(a)):b.display="none"};g.prototype.takeScreenshot=function(b){void 0===
  336. b&&(b={});var c=b.pixelRatio||1;this._cachedRenderParams.pixelRatio=c;var d=Math.round(c*this._cachedRenderParams.state.width),e=Math.round(c*this._cachedRenderParams.state.height),f=0,h=0,k=d,l=e,m=d,r=e;if(m=b.area)f=Math.round(c*m.x),h=Math.round(c*m.y),k=Math.round(c*m.width),l=Math.round(c*m.height);void 0!==b.width&&void 0!==b.height?(m=b.width/b.height,l*m<k?(m*=l,f+=Math.floor((k-m)/2),k=Math.floor(m)):(m=k/m,h+=Math.floor((l-m)/2),l=Math.floor(m)),m=b.width,r=b.height):(m=k,r=l);c=document.createElement("canvas");
  337. c.width=m;c.height=r;var q=c.getContext("2d"),g=new Uint8Array(k*l*4),t=this._renderingContext,w=u.create(t,{colorTarget:1,depthStencilTarget:3,width:d,height:e});t.bindFramebuffer(w);t.setViewport(0,0,d,e);var v=this._cachedRenderParams,x=this._renderingContext.gl;this._renderingContext.setClearColor(0,0,0,0);this._renderingContext.setClearDepth(1);this._renderingContext.setClearStencil(0);this._renderingContext.clear(x.COLOR_BUFFER_BIT|x.DEPTH_BUFFER_BIT|x.STENCIL_BUFFER_BIT);v.context=this._renderingContext;
  338. this.beforeRenderChildren(v,v);if(void 0!==b.rotation&&null!==b.rotation){var x=v.state,z=x.clone();z.viewpoint.rotation=b.rotation;v.state=z;this.renderChildren(v);v.state=x}else this.renderChildren(v);this.afterRenderChildren(v,v);w.readPixels(f,e-(h+l),k,l,6408,5121,g);t.bindFramebuffer();t=q.getImageData(0,0,m,r);if(0!==f||0!==h||k!==d||l!==e||m!==d||r!==e)n.resampleHermite(g,k,l,t.data,m,r,!0);else{h=l-1;l=0;w=4*k;for(z=x=f=e=d=k=v=void 0;l<h;){x=l*w;z=h*w;for(v=0;v<w;v+=4)k=g[x+v],d=g[x+v+1],
  339. e=g[x+v+2],f=g[x+v+3],g[x+v]=g[z+v],g[x+v+1]=g[z+v+1],g[x+v+2]=g[z+v+2],g[x+v+3]=g[z+v+3],g[z+v]=k,g[z+v+1]=d,g[z+v+2]=e,g[z+v+3]=f;l++;h--}k=t.data;d=g.length;for(h=0;h<d;h++)k[h]=g[h]}g=t.data;l=g.length;for(h=0;h<l;h+=4)f=g[h+3],0<f&&(e=f/255,k=Math.floor(g[h+0]/e),d=Math.floor(g[h+1]/e),e=Math.floor(g[h+2]/e),g[h+0]=255>=k?k:255,g[h+1]=255>=d?d:255,g[h+2]=255>=e?e:255);q.putImageData(t,0,0);q=B[b.format?b.format.toLowerCase():"png"];g=1;void 0!==b.quality&&(g=b.quality/100);b=c.toDataURL(q,g);
  340. return a.resolve({dataURL:b,x:0,y:0,width:m,height:r})};g.prototype.prepareChildrenRenderParameters=function(a){if(!this.attached||!this._renderingContext)return null;a=v(a);var b=this._renderingContext,c=b.gl;b.setDepthWriteEnabled(!0);b.setStencilWriteMask(255);b.setClearColor(0,0,0,0);b.setClearDepth(1);b.setClearStencil(0);b.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT|c.STENCIL_BUFFER_BIT);b.setViewport(0,0,this.element.width,this.element.height);b.setDepthWriteEnabled(!1);a.context=b;a.painter=
  341. this._painter;return a};g.prototype.attachChild=function(a,b){return a.attach(b)};g.prototype.detachChild=function(a,b){return a.detach(b)};g.prototype.renderChild=function(a,b){return a.processRender(b)};g.prototype._resizeCanvas=function(a){var b=this.element,c=b.style,d=a.state,e=a.pixelRatio;a=Math.round(d.width*e);e=Math.round(d.height*e);if(b.width!==a||b.height!==e)b.width=a,b.height=e;c.width=d.width+"px";c.height=d.height+"px"};g.prototype._initializeClipRenderer=function(a){if(this._clipRendererInitialized)return!0;
  342. this._blitRenderer=new d;var b={a_pos:0},c=new q(a,k.stencilVS,k.stencilFS,b);if(!c)return!1;var e=r.createVertex(a,35040,32),f=new Uint16Array([0,1,2,2,1,3]),f=r.createIndex(a,35044,f);a=new x(a,b,{geometry:[{name:"a_pos",count:2,type:5126,offset:0,stride:8,normalized:!1,divisor:0}]},{geometry:e},f);this._clipStencilProgram=c;this._clipVBO=e;this._clipVAO=a;return this._clipRendererInitialized=!0};return g}(e)})},"esri/views/2d/engine/webgl/BitBlitRenderer":function(){define("require exports ./shaders/glShaderSnippets ../../../webgl/BufferObject ../../../webgl/Program ../../../webgl/VertexArrayObject".split(" "),
  343. function(p,g,b,a,e,d){return function(){function c(){this._initialized=!1}c.prototype.render=function(a,b,c,d){a&&(this._initialized||this._initialize(a),a.setBlendFunctionSeparate(1,771,1,771),a.bindVAO(this._vertexArrayObject),a.bindProgram(this._program),b.setSamplingMode(c),a.bindTexture(b,0),this._program.setUniform1i("u_tex",0),this._program.setUniform1f("u_opacity",d),a.drawArrays(5,0,4),a.bindVAO())};c.prototype._initialize=function(c){if(this._initialized)return!0;var f={a_pos:0,a_tex:1},
  344. k=new e(c,b.bitblitVS,b.bitblitFS,f);if(!k)return!1;var h=new Int8Array(16);h[0]=-1;h[1]=-1;h[2]=0;h[3]=0;h[4]=1;h[5]=-1;h[6]=1;h[7]=0;h[8]=-1;h[9]=1;h[10]=0;h[11]=1;h[12]=1;h[13]=1;h[14]=1;h[15]=1;c=new d(c,f,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:4,normalized:!1,divisor:0},{name:"a_tex",count:2,type:5120,offset:2,stride:4,normalized:!1,divisor:0}]},{geometry:a.createVertex(c,35044,h)});this._program=k;this._vertexArrayObject=c;return this._initialized=!0};return c}()})},"esri/views/2d/engine/webgl/shaders/glShaderSnippets":function(){define("require exports dojo/text!./backgroundShaders.xml dojo/text!./bitblitShaders.xml dojo/text!./stencilShaders.xml dojo/text!./tileInfo.xml ../../../../webgl/ShaderSnippets".split(" "),
  345. function(p,g,b,a,e,d,c){p=new c;c.parse(b,p);c.parse(a,p);c.parse(e,p);c.parse(d,p);return p})},"esri/views/webgl/ShaderSnippets":function(){define(["require","exports","dojox/xml/parser"],function(p,g,b){return function(){function a(a){if(a)for(var b in a)this[b]=a[b]}a.parse=function(a,d){a=b.parse(a).getElementsByTagName("snippet");for(var c=/\$[a-zA-Z][a-zA-Z0-9]*(?:\([^\(\)]*\))?[ \t]*/,e=/[\$\s]+/g,f=/\(([^\(\)]*)\)/,l=0;l<a.length;l++){for(var h=a[l].getAttribute("name"),n=a[l].textContent;;){var r=
  346. n.match(c);if(null==r)break;var m=r[0].replace(e,""),g=m.match(f),q=void 0;g&&(q=g[1].split(",").map(function(a){return a.trim()}));m=m.replace(f,"");q=d._instantiate(m,q);n=n.replace(r[0],q)}d[h]=n}};a.prototype._instantiate=function(a,b){a=this[a];for(b||(b=[]);;){var c=a.match(/\$(\d+)/);if(null==c)break;var d=parseInt(c[1],10);a=a.replace(c[0],b[d])}return a};return a}()})},"dojox/xml/parser":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],
  347. function(p){p.getObject("xml.parser",!0,dojox);dojox.xml.parser.parse=function(g,b){var a=p.doc,e;b=b||"text/xml";if(g&&p.trim(g)&&"DOMParser"in p.global){e=(new DOMParser).parseFromString(g,b);g=e.documentElement;if("parsererror"==g.nodeName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"==g.namespaceURI){if(a=g.getElementsByTagNameNS("http://www.mozilla.org/newlayout/xml/parsererror.xml","sourcetext")[0])a=a.firstChild.data;throw Error("Error parsing text "+g.firstChild.data+" \n"+a);}return e}if("ActiveXObject"in
  348. p.global){a=function(a){return"MSXML"+a+".DOMDocument"};a=["Microsoft.XMLDOM",a(6),a(4),a(3),a(2)];p.some(a,function(a){try{e=new ActiveXObject(a)}catch(k){return!1}return!0});if(g&&e&&(e.async=!1,e.loadXML(g),g=e.parseError,0!==g.errorCode))throw Error("Line: "+g.line+"\nCol: "+g.linepos+"\nReason: "+g.reason+"\nError Code: "+g.errorCode+"\nSource: "+g.srcText);if(e)return e}else if(a.implementation&&a.implementation.createDocument){if(g&&p.trim(g)&&a.createElement){b=a.createElement("xml");b.innerHTML=
  349. g;var d=a.implementation.createDocument("foo","",null);p.forEach(b.childNodes,function(a){d.importNode(a,!0)});return d}return a.implementation.createDocument("","",null)}return null};dojox.xml.parser.textContent=function(g,b){if(1<arguments.length)return dojox.xml.parser.replaceChildren(g,(g.ownerDocument||p.doc).createTextNode(b)),b;if(void 0!==g.textContent)return g.textContent;var a="";g&&p.forEach(g.childNodes,function(b){switch(b.nodeType){case 1:case 5:a+=dojox.xml.parser.textContent(b);break;
  350. case 3:case 2:case 4:a+=b.nodeValue}});return a};dojox.xml.parser.replaceChildren=function(g,b){var a=[];p.isIE&&p.forEach(g.childNodes,function(b){a.push(b)});dojox.xml.parser.removeChildren(g);p.forEach(a,p.destroy);p.isArray(b)?p.forEach(b,function(a){g.appendChild(a)}):g.appendChild(b)};dojox.xml.parser.removeChildren=function(g){for(var b=g.childNodes.length;g.hasChildNodes();)g.removeChild(g.firstChild);return b};dojox.xml.parser.innerXML=function(g){return g.innerXML?g.innerXML:g.xml?g.xml:
  351. "undefined"!=typeof XMLSerializer?(new XMLSerializer).serializeToString(g):null};return dojox.xml.parser})},"esri/views/webgl/BufferObject":function(){define(["require","exports"],function(p,g){return function(){function b(a,e,d,c,k){this._glName=this._context=null;this._bufferType=void 0;this._usage=35044;this._size=-1;this._indexType=void 0;this._context=a;this._bufferType=e;this._usage=d;this._id=b._nextId++;this._glName=this._context.gl.createBuffer();c&&this.setData(c,k)}b.createIndex=function(a,
  352. e,d,c){return new b(a,34963,e,d,c)};b.createVertex=function(a,e,d){return new b(a,34962,e,d)};Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"usage",{get:function(){return this._usage},enumerable:!0,
  353. configurable:!0});Object.defineProperty(b.prototype,"bufferType",{get:function(){return this._bufferType},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"indexType",{get:function(){return this._indexType},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"byteSize",{get:function(){return 34962===this._bufferType?this._size:5125===this._indexType?4*this._size:2*this._size},enumerable:!0,configurable:!0});b.prototype.dispose=function(){this._context&&(this._glName&&
  354. (this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context=null)};b.prototype.setData=function(a,b){if(a){if("number"===typeof a){if(0>a&&console.error("Buffer size cannot be negative!"),34963===this._bufferType&&b)switch(this._indexType=b,this._size=a,b){case 5123:a*=2;break;case 5125:a*=4}}else b=a.byteLength,a instanceof Uint16Array&&(b/=2,this._indexType=5123),a instanceof Uint32Array&&(b/=4,this._indexType=5125),this._size=b;b=this._context.getBoundVAO();this._context.bindVAO(null);
  355. this._context.bindBuffer(this);this._context.gl.bufferData(this._bufferType,a,this._usage);this._context.bindVAO(b)}};b.prototype.setSubData=function(a,b,d,c){void 0===b&&(b=0);void 0===d&&(d=0);if(a){(0>b||b>=this._size)&&console.error("offset is out of range!");var e=b,f=d,l=c,h=a.byteLength;a instanceof Uint16Array&&(h/=2,e*=2,f*=2,l*=2);a instanceof Uint32Array&&(h/=4,e*=4,f*=4,l*=4);void 0===c&&(c=h-1);d>=c&&console.error("end must be bigger than start!");b+d-c>this._size&&console.error("An attempt to write beyond the end of the buffer!");
  356. b=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);this._context.gl.bufferSubData(this._bufferType,e,(a instanceof ArrayBuffer?a:a.buffer).slice(f,l));this._context.bindVAO(b)}};b._nextId=0;return b}()})},"esri/views/webgl/Program":function(){define(["require","exports","dojo/has","./ShaderTranspiler"],function(p,g,b,a){return function(){function b(a,c,e,f,l){void 0===l&&(l={});this._glName=this._context=null;this._locations={};this._id=void 0;this._initialized=
  357. !1;this._fShader=this._vShader=null;this._defines={};this._nameToUniformLocation={};this._nameToAttribLocation={};this._nameToUniform1={};this._nameToUniform2={};this._nameToUniform3={};this._nameToUniform4={};this._nameToUniformMatrix3={};this._nameToUniformMatrix4={};a||console.error("RenderingContext isn't initialized!");0===c.length&&console.error("Shaders source should not be empty!");this._context=a;this._vertexShaderSource=c;this._fragmentShaderSource=e;if(Array.isArray(l))for(a=0;a<l.length;a++)this._defines[l[a]]=
  358. "1";else this._defines=l;this._id=b._nextId++;this._locations=f}Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});b.prototype.getDefine=function(a){return this._defines[a]};b.prototype.dispose=function(){if(this._context){var a=
  359. this._context.gl;this._vShader&&(a.deleteShader(this._vShader),this._vShader=null);this._fShader&&(a.deleteShader(this._fShader),this._fShader=null);this._glName&&(a.deleteProgram(this._glName),this._glName=null);this._context=null}};b.prototype.initialize=function(){if(!this._initialized){this._vShader=this._loadShader(35633);this._fShader=this._loadShader(35632);this._vShader&&this._fShader||console.error("Error loading shaders!");var a=this._context.gl,b=a.createProgram();a.attachShader(b,this._vShader);
  360. a.attachShader(b,this._fShader);for(var e in this._locations)a.bindAttribLocation(b,this._locations[e],e);a.linkProgram(b);a.getProgramParameter(b,a.LINK_STATUS)||console.error("Could not initialize shader\nVALIDATE_STATUS: "+a.getProgramParameter(b,a.VALIDATE_STATUS)+", gl error ["+a.getError()+"]infoLog: "+a.getProgramInfoLog(b));this._glName=b;this._initialized=!0}};b.prototype.getUniformLocation=function(a){this.initialize();void 0===this._nameToUniformLocation[a]&&(this._nameToUniformLocation[a]=
  361. this._context.gl.getUniformLocation(this._glName,a));return this._nameToUniformLocation[a]};b.prototype.hasUniform=function(a){return null!==this.getUniformLocation(a)};b.prototype.getAttribLocation=function(a){this.initialize();void 0===this._nameToAttribLocation[a]&&(this._nameToAttribLocation[a]=this._context.gl.getAttribLocation(this._glName,a));return this._nameToAttribLocation[a]};b.prototype.setUniform1i=function(a,b){var c=this._nameToUniform1[a];if(void 0===c||b!==c)this._context.bindProgram(this),
  362. this._context.gl.uniform1i(this.getUniformLocation(a),b),this._nameToUniform1[a]=b};b.prototype.setUniform1f=function(a,b){var c=this._nameToUniform1[a];if(void 0===c||b!==c)this._context.bindProgram(this),this._context.gl.uniform1f(this.getUniformLocation(a),b),this._nameToUniform1[a]=b};b.prototype.setUniform1fv=function(a,c){var d=this._nameToUniform2[a];void 0!==d&&b._arraysEqual(c,d)||(this._context.bindProgram(this),this._context.gl.uniform1fv(this.getUniformLocation(a),c),void 0===d?this._nameToUniform2[a]=
  363. new Float32Array(c):d.set(c))};b.prototype.setUniform2f=function(a,b,e){var c=this._nameToUniform2[a];if(void 0===c||b!==c[0]||e!==c[1])this._context.bindProgram(this),this._context.gl.uniform2f(this.getUniformLocation(a),b,e),void 0===c?this._nameToUniform2[a]=new Float32Array([b,e]):(c[0]=b,c[1]=e)};b.prototype.setUniform2fv=function(a,c){var d=this._nameToUniform2[a];void 0!==d&&b._arraysEqual(c,d)||(this._context.bindProgram(this),this._context.gl.uniform2fv(this.getUniformLocation(a),c),void 0===
  364. d?this._nameToUniform2[a]=new Float32Array(c):d.set(c))};b.prototype.setUniform3f=function(a,b,e,f){var c=this._nameToUniform3[a];if(void 0===c||b!==c[0]||e!==c[1]||f!==c[2])this._context.bindProgram(this),this._context.gl.uniform3f(this.getUniformLocation(a),b,e,f),void 0===c?this._nameToUniform3[a]=new Float32Array([b,e,f]):(c[0]=b,c[1]=e,c[2]=f)};b.prototype.setUniform3fv=function(a,c){var d=this._nameToUniform3[a];void 0!==d&&b._arraysEqual(c,d)||(this._context.bindProgram(this),this._context.gl.uniform3fv(this.getUniformLocation(a),
  365. c),void 0===d?this._nameToUniform3[a]=new Float32Array(c):d.set(c))};b.prototype.setUniform4f=function(a,b,e,f,l){var c=this._nameToUniform4[a];if(void 0===c||b!==c[0]||e!==c[1]||f!==c[2]||l!==c[3])this._context.bindProgram(this),this._context.gl.uniform4f(this.getUniformLocation(a),b,e,f,l),void 0===c?this._nameToUniform4[a]=new Float32Array([b,e,f,l]):(c[0]=b,c[1]=e,c[2]=f,c[3]=l)};b.prototype.setUniform4fv=function(a,c){var d=this._nameToUniform4[a];void 0!==d&&b._arraysEqual(c,d)||(this._context.bindProgram(this),
  366. this._context.gl.uniform4fv(this.getUniformLocation(a),c),void 0===d?this._nameToUniform4[a]=new Float32Array(c):d.set(c))};b.prototype.setUniformMatrix3fv=function(a,c,e){void 0===e&&(e=!1);var d=this._nameToUniformMatrix3[a];void 0!==d&&(9===d.length?b._matrix3Equal(d,c):b._arraysEqual(c,d))||(this._context.bindProgram(this),this._context.gl.uniformMatrix3fv(this.getUniformLocation(a),e,c),void 0===d?this._nameToUniformMatrix3[a]=new Float32Array(c):d.set(c))};b.prototype.setUniformMatrix4fv=function(a,
  367. c,e){void 0===e&&(e=!1);var d=this._nameToUniformMatrix4[a];void 0!==d&&(16===d.length?b._matrix4Equal(d,c):b._arraysEqual(c,d))||(this._context.bindProgram(this),this._context.gl.uniformMatrix4fv(this.getUniformLocation(a),e,c),void 0===d?this._nameToUniformMatrix4[a]=new Float32Array(c):d.set(c))};b._padToThree=function(a){var b=a.toString();1E3>a&&(b=(" "+a).slice(-3));return b};b.prototype._addLineNumbers=function(a){var c=2;return a.replace(/\n/g,function(){return"\n"+b._padToThree(c++)+":"})};
  368. b.prototype._loadShader=function(b){var c=35633===b,d=c?this._vertexShaderSource:this._fragmentShaderSource,e;e="";for(var l in this._defines)e+="#define "+l+" "+this._defines[l]+"\n";e+=d;"webgl2"===this._context.contextVersion&&(e=a.transpileShader(e,c?"vertex":"fragment"));c=this._context.gl;b=c.createShader(b);c.shaderSource(b,e);c.compileShader(b);c.getShaderParameter(b,c.COMPILE_STATUS)||(console.error(c.getShaderInfoLog(b)),console.error(this._addLineNumbers(e)),"webgl2"===this._context.contextVersion&&
  369. (console.log("Shader source before transpilation:"),console.log(d)));return b};b._matrix4Equal=function(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]&&a[6]===b[6]&&a[7]===b[7]&&a[8]===b[8]&&a[9]===b[9]&&a[10]===b[10]&&a[11]===b[11]&&a[12]===b[12]&&a[13]===b[13]&&a[14]===b[14]&&a[15]===b[15]};b._matrix3Equal=function(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]&&a[4]===b[4]&&a[5]===b[5]&&a[6]===b[6]&&a[7]===b[7]&&a[8]===b[8]};b._arraysEqual=
  370. function(a,b){if(a.length!==b.length)return!1;for(var c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};b._nextId=0;return b}()})},"esri/views/webgl/ShaderTranspiler":function(){define(["require","exports","./reservedWordsGLSL3","./lib/glsl-tokenizer/string"],function(p,g,b,a){function e(a){return a.map(function(a){return"eof"!==a.type?a.data:""}).join("")}function d(a,b,c,e){e=e||c;for(var f=0;f<a.length;f++){var h=a[f];if("ident"===h.type&&h.data===c)return e in b?b[e]++:b[e]=0,d(a,b,e+"_"+b[e],
  371. e)}return c}function c(a,b,c){void 0===c&&(c="afterVersion");var d={data:"\n",type:"whitespace"},e=function(b){return b<a.length?/[^\r\n]$/.test(a[b].data):!1},f=function(a){for(var b=-1,d=0,e=-1,f=0;f<a.length;f++){var h=a[f];"preprocessor"===h.type&&(h.data.match(/\#(if|ifdef|ifndef)\s+.+/)?++d:h.data.match(/\#endif\s*.*/)&&--d);("afterVersion"===c||"afterPrecision"===c)&&"preprocessor"===h.type&&/^#version/.test(h.data)&&(e=Math.max(e,f));if("afterPrecision"===c&&"keyword"===h.type&&"precision"===
  372. h.data){a:{for(h=f;h<a.length;h++){var k=a[h];if("operator"===k.type&&";"===k.data)break a}h=null}if(null===h)throw Error("precision statement not followed by any semicolons!");e=Math.max(e,h)}b<e&&0===d&&(b=f)}return b+1}(a);e(f-1)&&a.splice(f++,0,d);for(var h=0;h<b.length;h++){var k=b[h];a.splice(f++,0,k)}e(f-1)&&e(f)&&a.splice(f,0,d)}Object.defineProperty(g,"__esModule",{value:!0});var k=["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"];g.transpileShader=
  373. function(f,l){f=a(f);var h;a:{h="100";var n="300 es";void 0===h&&(h="100");void 0===n&&(n="300 es");for(var r=/^\s*\#version\s+([0-9]+(\s+[a-zA-Z]+)?)\s*/,m=0;m<f.length;m++){var g=f[m];if("preprocessor"===g.type){var q=r.exec(g.data);if(q)if(r=q[1].replace(/\s\s+/g," "),r===n){h=r;break a}else if(r===h){g.data="#version "+n;break a}else throw Error("unknown glsl version: "+r);}}f.splice(0,0,{type:"preprocessor",data:"#version "+n},{type:"whitespace",data:"\n"});h=null}if("300 es"===h)throw Error("shader is already glsl 300 es");
  374. r=g=null;m={};q={};for(h=0;h<f.length;++h)switch(n=f[h],n.type){case "keyword":"vertex"===l&&"attribute"===n.data?n.data="in":"varying"===n.data&&(n.data="vertex"===l?"out":"in");break;case "builtin":/^texture(2D|Cube)(Proj)?(Lod|Grad)?(EXT)?$/.test(n.data.trim())&&(n.data=n.data.replace(/(2D|Cube|EXT)/g,""));if("fragment"===l&&"gl_FragColor"===n.data){if(!g){var g=d(f,m,"fragColor"),t=void 0;void 0===t&&(t="lowp");c(f,[{type:"keyword",data:"out"},{type:"whitespace",data:" "},{type:"keyword",data:t},
  375. {type:"whitespace",data:" "},{type:"keyword",data:"vec4"},{type:"whitespace",data:" "},{type:"ident",data:g},{type:"operator",data:";"}],"afterPrecision")}n.data=g}else"fragment"===l&&"gl_FragDepthEXT"===n.data&&(r||(r=d(f,m,"gl_FragDepth")),n.data=r);break;case "ident":if(0<=b.indexOf(n.data)){if(t="vertex"===l)a:{for(t=h-1;0<=t;t--){var x=f[t];if("whitespace"!==x.type&&"block-comment"!==x.type)if("keyword"===x.type){if("attribute"===x.data||"in"===x.data){t=!0;break a}}else break}t=!1}if(t)throw Error("attribute in vertex shader uses a name that is a reserved word in glsl 300 es");
  376. n.data in q||(q[n.data]=d(f,m,n.data));n.data=q[n.data]}}for(h=f.length-1;0<=h;--h)n=f[h],"preprocessor"===n.type&&((l=n.data.match(/\#extension\s+(.*)\:/))&&l[1]&&0<=k.indexOf(l[1].trim())&&(l=f[h+1],f.splice(h,l&&"whitespace"===l.type?2:1)),(l=n.data.match(/\#ifdef\s+(.*)/))&&l[1]&&0<=k.indexOf(l[1].trim())&&(n.data="#if 1"),(l=n.data.match(/\#ifndef\s+(.*)/))&&l[1]&&0<=k.indexOf(l[1].trim())&&(n.data="#if 0"));return e(f)}})},"esri/views/webgl/reservedWordsGLSL3":function(){define(["require","exports"],
  377. function(p,g){return"layout centroid smooth case mat2x2 mat2x3 mat2x4 mat3x2 mat3x3 mat3x4 mat4x2 mat4x3 mat4x4 uint uvec2 uvec3 uvec4 samplerCubeShadow sampler2DArray sampler2DArrayShadow isampler2D isampler3D isamplerCube isampler2DArray usampler2D usampler3D usamplerCube usampler2DArray coherent restrict readonly writeonly resource atomic_uint noperspective patch sample subroutine common partition active filter image1D image2D image3D imageCube iimage1D iimage2D iimage3D iimageCube uimage1D uimage2D uimage3D uimageCube image1DArray image2DArray iimage1DArray iimage2DArray uimage1DArray uimage2DArray image1DShadow image2DShadow image1DArrayShadow image2DArrayShadow imageBuffer iimageBuffer uimageBuffer sampler1DArray sampler1DArrayShadow isampler1D isampler1DArray usampler1D usampler1DArray isampler2DRect usampler2DRect samplerBuffer isamplerBuffer usamplerBuffer sampler2DMS isampler2DMS usampler2DMS sampler2DMSArray isampler2DMSArray usampler2DMSArray trunc round roundEven isnan isinf floatBitsToInt floatBitsToUint intBitsToFloat uintBitsToFloat packSnorm2x16 unpackSnorm2x16 packUnorm2x16 unpackUnorm2x16 packHalf2x16 unpackHalf2x16 outerProduct transpose determinant inverse texture textureSize textureProj textureLod textureOffset texelFetch texelFetchOffset textureProjOffset textureLodOffset textureProjLod textureProjLodOffset textureGrad textureGradOffset textureProjGrad textureProjGradOffset".split(" ")})},
  378. "esri/views/webgl/lib/glsl-tokenizer/string":function(){define(["./index"],function(p){"use strict;";return function(g){var b=p(),a=[],a=a.concat(b(g));return a=a.concat(b(null))}})},"esri/views/webgl/lib/glsl-tokenizer/index":function(){define(["./lib/literals","./lib/operators","./lib/builtins"],function(p,g,b){"use strict;";var a="block-comment line-comment preprocessor operator integer float ident builtin keyword whitespace eof integer".split(" ");return function(){function e(b){b.length&&x.push({type:a[m],
  379. data:b,position:w,line:v,column:B})}function d(){t=t.length?[]:t;if("/"===q&&"*"===u)return w=r+n-1,m=0,q=u,n+1;if("/"===q&&"/"===u)return w=r+n-1,m=1,q=u,n+1;if("#"===u)return m=2,w=r+n,n;if(/\s/.test(u))return m=9,w=r+n,n;z=/\d/.test(u);y=/[^\w_]/.test(u);w=r+n;m=z?4:y?3:9999;return n}function c(){if(("\r"===u||"\n"===u)&&"\\"!==q)return e(t.join("")),m=999,n;t.push(u);q=u;return n+1}function k(){if("."===q&&/\d/.test(u))return m=5,n;if("/"===q&&"*"===u)return m=0,n;if("/"===q&&"/"===u)return m=
  380. 1,n;if("."===u&&t.length){for(;f(t););m=5;return n}if(";"===u||")"===u||"("===u){if(t.length)for(;f(t););e(u);m=999;return n+1}var a=2===t.length&&"\x3d"!==u;if(/[\w_\d\s]/.test(u)||a){for(;f(t););m=999;return n}t.push(u);q=u;return n+1}function f(a){var b=0,c,d;do{c=g.indexOf(a.slice(0,a.length+b).join(""));d=g[c];if(-1===c){if(0<b--+a.length)continue;d=a.slice(0,1).join("")}e(d);w+=d.length;t=t.slice(d.length);return t.length}while(1)}function l(){if("."===u||/[eE]/.test(u))return t.push(u),m=5,
  381. q=u,n+1;if("x"===u&&1===t.length&&"0"===t[0])return m=11,t.push(u),q=u,n+1;if(/[^\d]/.test(u))return e(t.join("")),m=999,n;t.push(u);q=u;return n+1}function h(){"f"===u&&(t.push(u),q=u,n+=1);if(/[eE]/.test(u)||"-"===u&&/[eE]/.test(q))return t.push(u),q=u,n+1;if(/[^\d]/.test(u))return e(t.join("")),m=999,n;t.push(u);q=u;return n+1}var n=0,r=0,m=999,u,q,t=[],x=[],v=1,B=0,w=0,z=!1,y=!1,A="",C;return function(a){x=[];if(null!==a){a=a.replace?a.replace(/\r\n/g,"\n"):a;n=0;A+=a;for(C=A.length;u=A[n],n<
  382. C;){a=n;switch(m){case 0:"/"===u&&"*"===q?(t.push(u),e(t.join("")),m=999):(t.push(u),q=u);n+=1;break;case 1:n=c();break;case 2:n=c();break;case 3:n=k();break;case 4:n=l();break;case 11:/[^a-fA-F0-9]/.test(u)?(e(t.join("")),m=999):(t.push(u),q=u,n+=1);break;case 5:n=h();break;case 9999:if(/[^\d\w_]/.test(u)){var f=t.join("");m=-1<p.indexOf(f)?8:-1<b.indexOf(f)?7:6;e(t.join(""));m=999}else t.push(u),q=u,n+=1;break;case 9:/[^\s]/g.test(u)?(e(t.join("")),m=999):(t.push(u),q=u,n+=1);break;case 999:n=d()}if(a!==
  383. n)switch(A[a]){case "\n":B=0;++v;break;default:++B}}r+=n;A=A.slice(n);return x}t.length&&e(t.join(""));m=10;e("(eof)");return x}}})},"esri/views/webgl/lib/glsl-tokenizer/lib/literals":function(){define([],function(){return"precision highp mediump lowp attribute const uniform varying break continue do for while if else in out inout float int void bool true false discard return mat2 mat3 mat4 vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow struct asm class union enum typedef template this packed goto switch default inline noinline volatile public static extern external interface long short double half fixed unsigned input output hvec2 hvec3 hvec4 dvec2 dvec3 dvec4 fvec2 fvec3 fvec4 sampler2DRect sampler3DRect sampler2DRectShadow sizeof cast namespace using".split(" ")})},
  384. "esri/views/webgl/lib/glsl-tokenizer/lib/operators":function(){define([],function(){"use strict;";return"\x3c\x3c\x3d \x3e\x3e\x3d ++ -- \x3c\x3c \x3e\x3e \x3c\x3d \x3e\x3d \x3d\x3d !\x3d \x26\x26 || +\x3d -\x3d *\x3d /\x3d %\x3d \x26\x3d ^^ ^\x3d |\x3d ( ) [ ] . ! ~ * / % + - \x3c \x3e \x26 ^ | ? : \x3d , ; { }".split(" ")})},"esri/views/webgl/lib/glsl-tokenizer/lib/builtins":function(){define([],function(){return"abs acos all any asin atan ceil clamp cos cross dFdx dFdy degrees distance dot equal exp exp2 faceforward floor fract gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_DepthRangeParameters gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FogParameters gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FragDepthEXT gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_LightModel gl_LightModelParameters gl_LightModelProducts gl_LightProducts gl_LightSource gl_LightSourceParameters gl_MaterialParameters gl_MaxClipPlanes gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentUniformComponents gl_MaxLights gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingFloats gl_MaxVertexAttribs gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_Point gl_PointCoord gl_PointParameters gl_PointSize gl_Position gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SecondaryColor gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex greaterThan greaterThanEqual inversesqrt length lessThan lessThanEqual log log2 matrixCompMult max min mix mod normalize not notEqual pow radians reflect refract sign sin smoothstep sqrt step tan texture2D texture2DLod texture2DProj texture2DProjLod textureCube textureCubeLod texture2DLodEXT texture2DProjLodEXT textureCubeLodEXT texture2DGradEXT texture2DProjGradEXT textureCubeGradEXT".split(" ")})},
  385. "esri/views/webgl/VertexArrayObject":function(){define(["require","exports"],function(p,g){return function(){function b(a,e,d,c,k){this._locations=this._layout=this._glName=this._context=null;this._indexBuffer=this._buffers=void 0;this._initialized=!1;this._context=a;this._layout=d;this._buffers=c;this._locations=e;k&&(this._indexBuffer=k);this._id=b._nextId++}Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
  386. "glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"vertexBuffers",{get:function(){return this._buffers},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"indexBuffer",{get:function(){return this._indexBuffer},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"size",{get:function(){var a=this;return Object.keys(this._buffers).reduce(function(b,d){return b+a._buffers[d].size},this._indexBuffer?this._indexBuffer.size:
  387. 0)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"layout",{get:function(){return this._layout},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});b.prototype.dispose=function(a){void 0===a&&(a=!0);if(this._context){var b=this._context.capabilities.vao;b&&this._glName&&(b.deleteVertexArray(this._glName),this._glName=null);this._context.getBoundVAO()===this&&this._context.bindVAO(null);
  388. if(a){for(var d in this._buffers)this._buffers[d].dispose(),delete this._buffers[d];this._indexBuffer&&(this._indexBuffer.dispose(),this._indexBuffer=null)}this._context=null}};b.prototype.initialize=function(){if(!this._initialized){var a=this._context.capabilities.vao;if(a){var b=a.createVertexArray();a.bindVertexArray(b);this._bindLayout();a.bindVertexArray(null);this._glName=b}this._initialized=!0}};b.prototype.bind=function(){this.initialize();var a=this._context.capabilities.vao;a?a.bindVertexArray(this.glName):
  389. (this._context.bindVAO(null),this._bindLayout())};b.prototype._bindLayout=function(){var a=this._buffers,b=!!this._context.capabilities.vao,d=this._layout,c=this._indexBuffer;a||console.error("Vertex buffer dictionary is empty!");var k=this._context.gl,f,l,h=0,n;for(n in a)for((f=a[n])||console.error("Vertex buffer is uninitialized!"),(l=d[n])||console.error("Vertex element descriptor is empty!"),this._context.bindBuffer(f),h=0;h<l.length;++h){f=l[h];var r=this._locations[f.name],m=f.baseInstance?
  390. f.baseInstance*f.stride:0;void 0===r&&console.error("There is no location for vertex attribute '"+f.name+"' defined.");f.baseInstance&&!f.divisor&&console.error("Vertex attribute '"+f.name+"' uses baseInstanceOffset without divisor.");if(4>=f.count){if(k.enableVertexAttribArray(r),k.vertexAttribPointer(r,f.count,f.type,f.normalized,f.stride,f.offset+m),f.divisor&&0<f.divisor){var g=this._context.capabilities.instancing;g&&g.vertexAttribDivisor(r,f.divisor)}}else if(16===f.count&&5126===f.type)for(var q=
  391. 0;4>q;q++)k.enableVertexAttribArray(r+q),k.vertexAttribPointer(r+q,4,f.type,f.normalized,f.stride,f.offset+16*q+m),f.divisor&&0<f.divisor&&(g=this._context.capabilities.instancing)&&g.vertexAttribDivisor(r+q,f.divisor);else console.error("Unsupported vertex attribute element count: "+f.count)}c&&(b?k.bindBuffer(k.ELEMENT_ARRAY_BUFFER,c.glName):this._context.bindBuffer(c))};b.prototype.unbind=function(){this.initialize();var a=this._context.capabilities.vao;a?a.bindVertexArray(null):this._unbindLayout()};
  392. b.prototype._unbindLayout=function(){var a=this._buffers,b=this._layout,d=this._locations,c=this._context;a||console.error("Vertex buffer dictionary is empty!");var k=c.gl,f,l,h,n=0,r=0,m;for(m in a){(f=a[m])||console.error("Vertex buffer is uninitialized!");l=b[m];n=0;for(r=l.length;n<r;++n)h=l[n],k.disableVertexAttribArray(d[h.name]);c.unbindBuffer(f.bufferType)}(a=this._indexBuffer)&&c.unbindBuffer(a.bufferType)};b._nextId=0;return b}()})},"esri/views/2d/engine/webgl/WGLPainter":function(){define("require exports ../../../../core/tsSupport/assignHelper dojo/has ../../../../core/libs/gl-matrix/mat4 ./enums ./GeometryUtils ./MaterialManager ./Utils ./brushes/WGLBrushInfo ./brushes/WGLBrushStencil ./brushes/WGLGeometryBrushFill ./brushes/WGLGeometryBrushLine ./brushes/WGLGeometryBrushMarker ./brushes/WGLGeometryBrushText ./painter/WGLHighlightPainter ./../../../webgl/FramebufferObject".split(" "),
  393. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function a(){this._initialized=!1}a.prototype.registerPass=function(a,b){this._initialize();for(var c=0;c<b.length;c++)this._passMap.set(b[c],a);return this};a.prototype.getPaintPassTs=function(a){this._initialize();return this._passMap.has(a)?[this._passMap.get(a)]:[]};a.prototype._initialize=function(){this._initialized||(this._passMap=new Map,this._initialized=!0)};return a}();g.WGLPainterOptions=
  394. p;var x=new Uint8Array(4*f.C_HITTEST_SEARCH_SIZE*f.C_HITTEST_SEARCH_SIZE),v=new Uint32Array(x.buffer);p=function(){function g(){this._hlPainter=new q;this._extrudeMatrix=new Float32Array(16);this._extrudeNoRotationMatrix=new Float32Array(16);this._extrudeRotateVector=new Float32Array([0,0,1]);this._extrudeScaleVector=new Float32Array([1,1,1]);this._state={rotation:0,width:0,height:0};this._cachedRotation=this._cachedHeight=this._cachedWidth=0;this.materialManager=new k}g.allGeometryPhases=function(){return[d.WGLDrawPhase.FILL,
  395. d.WGLDrawPhase.LINE,d.WGLDrawPhase.MARKER,d.WGLDrawPhase.TEXT]};Object.defineProperty(g.prototype,"extrudeMatrix",{get:function(){return this._extrudeMatrix},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"extrudeNoRotationMatrix",{get:function(){return this._extrudeNoRotationMatrix},enumerable:!0,configurable:!0});g.prototype.initialize=function(a){this.materialManager.initialize(a)};g.prototype.update=function(a,b){this._state=a;if(this._state.width!==this._cachedWidth||this._state.height!==
  396. this._cachedHeight||this._state.rotation!==this._cachedRotation)this._extrudeScaleVector[0]=2/a.width,this._extrudeScaleVector[1]=-2/a.height,e.identity(this._extrudeMatrix),e.rotate(this._extrudeMatrix,this._extrudeMatrix,-a.rotation*c.C_DEG_TO_RAD,this._extrudeRotateVector),e.scale(this._extrudeMatrix,this._extrudeMatrix,this._extrudeScaleVector),e.transpose(this._extrudeMatrix,this._extrudeMatrix),e.identity(this._extrudeNoRotationMatrix),e.scale(this._extrudeNoRotationMatrix,this._extrudeNoRotationMatrix,
  397. this._extrudeScaleVector),e.transpose(this._extrudeNoRotationMatrix,this._extrudeNoRotationMatrix),this._cachedWidth=this._state.width,this._cachedHeight=this._state.height,this._cachedRotation=this._state.rotation};g.prototype.getBrushes=function(a){if(!this._brushes){var b=new n.default,c=new m.default,e=new r.default,f=new u.default,k=new l.default,q=new h.default;this._brushes=new Map;this._brushes.set(d.WGLDrawPhase.FILL,[b]);this._brushes.set(d.WGLDrawPhase.MARKER,[c]);this._brushes.set(d.WGLDrawPhase.LINE,
  398. [e]);this._brushes.set(d.WGLDrawPhase.TEXT,[f]);this._brushes.set(d.WGLDrawPhase.HITTEST,[b,c,e,f]);this._brushes.set(d.WGLDrawPhase.HIGHLIGHT,[b,c,e,f]);this._brushes.set(d.WGLDrawPhase.CLIP,[q]);this._brushes.set(d.WGLDrawPhase.DEBUG,[k])}if(!this._brushes.has(a))throw Error("WGLPainter: Tried to get brush for unknown phase: "+a);return this._brushes.get(a)};g.prototype.bindTextureManager=function(a){this.textureManager=a};g.prototype.draw=function(a,b,c,d){this._drawClippingRects(a,b);var e=a.context;
  399. e.setBlendingEnabled(!0);e.setStencilWriteMask(0);e.setBlendFunctionSeparate(1,771,1,771);this._drawPhases(a,b,c,d);this._debugTiles(a,b)};g.prototype.setHighlightOptions=function(a){this._hlPainter.setHighlightOptions(a)};g.prototype.highlight=function(a,b){var c=a.context,e=c.getViewport();this._hlPainter.setup(c,e.width,e.height);this._hlPainter.startMaskDraw(c);this._drawClippingRects(a,b);c.setBlendingEnabled(!0);c.setStencilWriteMask(0);c.setBlendFunctionSeparate(1,771,1,771);this._drawPhases(a,
  400. b,[d.WGLDrawPhase.HIGHLIGHT]);this._hlPainter.draw(c)};g.prototype.hitTest=function(a,b){var c=f.C_HITTEST_SEARCH_SIZE,e=[0,0],h=[0,0],k=a.state;k.toMap(e,[0,0]);k.toMap(h,[c,c]);if(0===b.filter(function(a){return!(e[0]>a.bounds[2]||h[0]<a.bounds[0]||e[1]<a.bounds[1]||h[1]>a.bounds[3])}).length)return[];k=a.context;this._hittestFBO||(this._hittestFBO=t.create(k,{colorTarget:0,depthStencilTarget:3,width:c,height:c}));var l=k.getViewport(),m=k.getBoundFramebufferObject();k.bindFramebuffer(this._hittestFBO);
  401. k.setViewport(0,0,c,c);this._drawClippingRects(a,b);var n=k.gl;k.setClearColor(1,1,1,1);k.clear(n.COLOR_BUFFER_BIT);k.setBlendingEnabled(!1);k.setStencilWriteMask(0);this._drawPhases(a,b,[d.WGLDrawPhase.HITTEST]);k.setBlendingEnabled(!0);this._hittestFBO.readPixels(0,0,c,c,6408,5121,x);a=c*c;b=new Set;for(c=0;c<a;c++)n=v[c],4294967295!==n&&b.add(n);k.bindFramebuffer(m);k.setViewport(l.x,l.y,l.width,l.height);var r=[];b.forEach(function(a){r.push(a)});return r};g.prototype._getPaintPass=function(a){this._passes||
  402. (this._passes=new Map);if(!this._passes.has(a))try{this._passes.set(a,new a)}catch(z){throw Error("Tried to instantiate WGLPaintPass with unknown constructor: "+a+",\n"+z);}return this._passes.get(a)};g.prototype._getPaintPasses=function(a,b){var c=this;return b.getPaintPassTs(a).map(function(a){return c._getPaintPass(a)})};g.prototype._drawPhases=function(a,c,d,e){a.context.setStencilTestEnabled(!0);for(var f=0;f<d.length;f++){var h=d[f],k=e?this._getPaintPasses(h,e):[],h=b({},a,{drawPhase:h});k.forEach(function(b){return b.preRender(a,
  403. a.rendererInfo)});for(var l=0,m=c;l<m.length;l++)m[l].doRender(h);k.reverse().forEach(function(b){return b.postRender(a,a.rendererInfo)})}a.context.setStencilTestEnabled(!1)};g.prototype._debugTiles=function(b,c){a("esri-feature-tiles-debug")&&this._drawPhases(b,c,[d.WGLDrawPhase.DEBUG])};g.prototype._drawClippingRects=function(a,b){if(0!==b.length){var c=a.context;c.setDepthWriteEnabled(!1);c.setDepthTestEnabled(!1);c.setStencilTestEnabled(!0);c.setBlendingEnabled(!1);c.setColorMask(!1,!1,!1,!1);
  404. c.setStencilOp(7680,7680,7681);c.setClearStencil(0);c.clear(c.gl.STENCIL_BUFFER_BIT);c.setStencilWriteMask(255);for(var c=0,e=b.length;c<b.length;c++,e--)b[c].stencilRef=e;this._drawPhases(a,b,[d.WGLDrawPhase.CLIP]);a.context.setColorMask(!0,!0,!0,!0)}};return g}();g.default=p})},"esri/core/libs/gl-matrix/mat4":function(){define(["./common"],function(p){var g={scalar:{},SIMD:{},create:function(){var b=new p.ARRAY_TYPE(16);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=
  405. 1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},clone:function(b){var a=new p.ARRAY_TYPE(16);a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15];return a},copy:function(b,a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];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];return b},fromValues:function(b,
  406. a,e,d,c,k,f,l,h,n,r,m,g,q,t,x){var u=new p.ARRAY_TYPE(16);u[0]=b;u[1]=a;u[2]=e;u[3]=d;u[4]=c;u[5]=k;u[6]=f;u[7]=l;u[8]=h;u[9]=n;u[10]=r;u[11]=m;u[12]=g;u[13]=q;u[14]=t;u[15]=x;return u},set:function(b,a,e,d,c,k,f,l,h,n,r,m,g,q,t,x,v){b[0]=a;b[1]=e;b[2]=d;b[3]=c;b[4]=k;b[5]=f;b[6]=l;b[7]=h;b[8]=n;b[9]=r;b[10]=m;b[11]=g;b[12]=q;b[13]=t;b[14]=x;b[15]=v;return b},identity:function(b){b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;
  407. return b}};g.scalar.transpose=function(b,a){if(b===a){var e=a[1],d=a[2],c=a[3],k=a[6],f=a[7],l=a[11];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=e;b[6]=a[9];b[7]=a[13];b[8]=d;b[9]=k;b[11]=a[14];b[12]=c;b[13]=f;b[14]=l}else b[0]=a[0],b[1]=a[4],b[2]=a[8],b[3]=a[12],b[4]=a[1],b[5]=a[5],b[6]=a[9],b[7]=a[13],b[8]=a[2],b[9]=a[6],b[10]=a[10],b[11]=a[14],b[12]=a[3],b[13]=a[7],b[14]=a[11],b[15]=a[15];return b};g.SIMD.transpose=function(b,a){var e,d,c,k,f,l;e=SIMD.Float32x4.load(a,0);d=SIMD.Float32x4.load(a,4);c=SIMD.Float32x4.load(a,
  408. 8);a=SIMD.Float32x4.load(a,12);k=SIMD.Float32x4.shuffle(e,d,0,1,4,5);f=SIMD.Float32x4.shuffle(c,a,0,1,4,5);l=SIMD.Float32x4.shuffle(k,f,0,2,4,6);k=SIMD.Float32x4.shuffle(k,f,1,3,5,7);SIMD.Float32x4.store(b,0,l);SIMD.Float32x4.store(b,4,k);k=SIMD.Float32x4.shuffle(e,d,2,3,6,7);f=SIMD.Float32x4.shuffle(c,a,2,3,6,7);e=SIMD.Float32x4.shuffle(k,f,0,2,4,6);d=SIMD.Float32x4.shuffle(k,f,1,3,5,7);SIMD.Float32x4.store(b,8,e);SIMD.Float32x4.store(b,12,d);return b};g.transpose=p.USE_SIMD?g.SIMD.transpose:g.scalar.transpose;
  409. g.scalar.invert=function(b,a){var e=a[0],d=a[1],c=a[2],k=a[3],f=a[4],l=a[5],h=a[6],n=a[7],r=a[8],m=a[9],g=a[10],q=a[11],t=a[12],x=a[13],v=a[14];a=a[15];var p=e*l-d*f,w=e*h-c*f,z=e*n-k*f,y=d*h-c*l,A=d*n-k*l,C=c*n-k*h,D=r*x-m*t,E=r*v-g*t,G=r*a-q*t,F=m*v-g*x,K=m*a-q*x,J=g*a-q*v,H=p*J-w*K+z*F+y*G-A*E+C*D;if(!H)return null;H=1/H;b[0]=(l*J-h*K+n*F)*H;b[1]=(c*K-d*J-k*F)*H;b[2]=(x*C-v*A+a*y)*H;b[3]=(g*A-m*C-q*y)*H;b[4]=(h*G-f*J-n*E)*H;b[5]=(e*J-c*G+k*E)*H;b[6]=(v*z-t*C-a*w)*H;b[7]=(r*C-g*z+q*w)*H;b[8]=(f*
  410. K-l*G+n*D)*H;b[9]=(d*G-e*K-k*D)*H;b[10]=(t*A-x*z+a*p)*H;b[11]=(m*z-r*A-q*p)*H;b[12]=(l*E-f*F-h*D)*H;b[13]=(e*F-d*E+c*D)*H;b[14]=(x*w-t*y-v*p)*H;b[15]=(r*y-m*w+g*p)*H;return b};g.SIMD.invert=function(b,a){var e,d,c,k,f,l,h,n;f=SIMD.Float32x4.load(a,0);l=SIMD.Float32x4.load(a,4);h=SIMD.Float32x4.load(a,8);n=SIMD.Float32x4.load(a,12);a=SIMD.Float32x4.shuffle(f,l,0,1,4,5);d=SIMD.Float32x4.shuffle(h,n,0,1,4,5);e=SIMD.Float32x4.shuffle(a,d,0,2,4,6);d=SIMD.Float32x4.shuffle(d,a,1,3,5,7);a=SIMD.Float32x4.shuffle(f,
  411. l,2,3,6,7);k=SIMD.Float32x4.shuffle(h,n,2,3,6,7);c=SIMD.Float32x4.shuffle(a,k,0,2,4,6);k=SIMD.Float32x4.shuffle(k,a,1,3,5,7);a=SIMD.Float32x4.mul(c,k);a=SIMD.Float32x4.swizzle(a,1,0,3,2);f=SIMD.Float32x4.mul(d,a);l=SIMD.Float32x4.mul(e,a);a=SIMD.Float32x4.swizzle(a,2,3,0,1);f=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,a),f);l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,a),l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);a=SIMD.Float32x4.mul(d,c);a=SIMD.Float32x4.swizzle(a,1,0,3,2);f=SIMD.Float32x4.add(SIMD.Float32x4.mul(k,
  412. a),f);n=SIMD.Float32x4.mul(e,a);a=SIMD.Float32x4.swizzle(a,2,3,0,1);f=SIMD.Float32x4.sub(f,SIMD.Float32x4.mul(k,a));n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,a),n);n=SIMD.Float32x4.swizzle(n,2,3,0,1);a=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,2,3,0,1),k);a=SIMD.Float32x4.swizzle(a,1,0,3,2);c=SIMD.Float32x4.swizzle(c,2,3,0,1);f=SIMD.Float32x4.add(SIMD.Float32x4.mul(c,a),f);h=SIMD.Float32x4.mul(e,a);a=SIMD.Float32x4.swizzle(a,2,3,0,1);f=SIMD.Float32x4.sub(f,SIMD.Float32x4.mul(c,a));h=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,
  413. a),h);h=SIMD.Float32x4.swizzle(h,2,3,0,1);a=SIMD.Float32x4.mul(e,d);a=SIMD.Float32x4.swizzle(a,1,0,3,2);h=SIMD.Float32x4.add(SIMD.Float32x4.mul(k,a),h);n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(c,a),n);a=SIMD.Float32x4.swizzle(a,2,3,0,1);h=SIMD.Float32x4.sub(SIMD.Float32x4.mul(k,a),h);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(c,a));a=SIMD.Float32x4.mul(e,k);a=SIMD.Float32x4.swizzle(a,1,0,3,2);l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(c,a));h=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,a),h);a=SIMD.Float32x4.swizzle(a,
  414. 2,3,0,1);l=SIMD.Float32x4.add(SIMD.Float32x4.mul(c,a),l);h=SIMD.Float32x4.sub(h,SIMD.Float32x4.mul(d,a));a=SIMD.Float32x4.mul(e,c);a=SIMD.Float32x4.swizzle(a,1,0,3,2);l=SIMD.Float32x4.add(SIMD.Float32x4.mul(k,a),l);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(d,a));a=SIMD.Float32x4.swizzle(a,2,3,0,1);l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(k,a));n=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,a),n);e=SIMD.Float32x4.mul(e,f);e=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(e,2,3,0,1),e);e=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(e,
  415. 1,0,3,2),e);a=SIMD.Float32x4.reciprocalApproximation(e);e=SIMD.Float32x4.sub(SIMD.Float32x4.add(a,a),SIMD.Float32x4.mul(e,SIMD.Float32x4.mul(a,a)));e=SIMD.Float32x4.swizzle(e,0,0,0,0);if(!e)return null;SIMD.Float32x4.store(b,0,SIMD.Float32x4.mul(e,f));SIMD.Float32x4.store(b,4,SIMD.Float32x4.mul(e,l));SIMD.Float32x4.store(b,8,SIMD.Float32x4.mul(e,h));SIMD.Float32x4.store(b,12,SIMD.Float32x4.mul(e,n));return b};g.invert=p.USE_SIMD?g.SIMD.invert:g.scalar.invert;g.scalar.adjoint=function(b,a){var e=a[0],
  416. d=a[1],c=a[2],k=a[3],f=a[4],l=a[5],h=a[6],n=a[7],r=a[8],m=a[9],g=a[10],q=a[11],t=a[12],x=a[13],v=a[14];a=a[15];b[0]=l*(g*a-q*v)-m*(h*a-n*v)+x*(h*q-n*g);b[1]=-(d*(g*a-q*v)-m*(c*a-k*v)+x*(c*q-k*g));b[2]=d*(h*a-n*v)-l*(c*a-k*v)+x*(c*n-k*h);b[3]=-(d*(h*q-n*g)-l*(c*q-k*g)+m*(c*n-k*h));b[4]=-(f*(g*a-q*v)-r*(h*a-n*v)+t*(h*q-n*g));b[5]=e*(g*a-q*v)-r*(c*a-k*v)+t*(c*q-k*g);b[6]=-(e*(h*a-n*v)-f*(c*a-k*v)+t*(c*n-k*h));b[7]=e*(h*q-n*g)-f*(c*q-k*g)+r*(c*n-k*h);b[8]=f*(m*a-q*x)-r*(l*a-n*x)+t*(l*q-n*m);b[9]=-(e*
  417. (m*a-q*x)-r*(d*a-k*x)+t*(d*q-k*m));b[10]=e*(l*a-n*x)-f*(d*a-k*x)+t*(d*n-k*l);b[11]=-(e*(l*q-n*m)-f*(d*q-k*m)+r*(d*n-k*l));b[12]=-(f*(m*v-g*x)-r*(l*v-h*x)+t*(l*g-h*m));b[13]=e*(m*v-g*x)-r*(d*v-c*x)+t*(d*g-c*m);b[14]=-(e*(l*v-h*x)-f*(d*v-c*x)+t*(d*h-c*l));b[15]=e*(l*g-h*m)-f*(d*g-c*m)+r*(d*h-c*l);return b};g.SIMD.adjoint=function(b,a){var e,d,c,k,f,l,h,n;e=SIMD.Float32x4.load(a,0);d=SIMD.Float32x4.load(a,4);c=SIMD.Float32x4.load(a,8);k=SIMD.Float32x4.load(a,12);l=SIMD.Float32x4.shuffle(e,d,0,1,4,5);
  418. f=SIMD.Float32x4.shuffle(c,k,0,1,4,5);a=SIMD.Float32x4.shuffle(l,f,0,2,4,6);f=SIMD.Float32x4.shuffle(f,l,1,3,5,7);l=SIMD.Float32x4.shuffle(e,d,2,3,6,7);d=SIMD.Float32x4.shuffle(c,k,2,3,6,7);e=SIMD.Float32x4.shuffle(l,d,0,2,4,6);d=SIMD.Float32x4.shuffle(d,l,1,3,5,7);l=SIMD.Float32x4.mul(e,d);l=SIMD.Float32x4.swizzle(l,1,0,3,2);c=SIMD.Float32x4.mul(f,l);k=SIMD.Float32x4.mul(a,l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(f,l),c);k=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,
  419. l),k);k=SIMD.Float32x4.swizzle(k,2,3,0,1);l=SIMD.Float32x4.mul(f,e);l=SIMD.Float32x4.swizzle(l,1,0,3,2);c=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,l),c);n=SIMD.Float32x4.mul(a,l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(d,l));n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,l),n);n=SIMD.Float32x4.swizzle(n,2,3,0,1);l=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,2,3,0,1),d);l=SIMD.Float32x4.swizzle(l,1,0,3,2);e=SIMD.Float32x4.swizzle(e,2,3,0,1);c=SIMD.Float32x4.add(SIMD.Float32x4.mul(e,
  420. l),c);h=SIMD.Float32x4.mul(a,l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(e,l));h=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,l),h);h=SIMD.Float32x4.swizzle(h,2,3,0,1);l=SIMD.Float32x4.mul(a,f);l=SIMD.Float32x4.swizzle(l,1,0,3,2);h=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,l),h);n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,l),n);l=SIMD.Float32x4.swizzle(l,2,3,0,1);h=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,l),h);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(e,l));l=SIMD.Float32x4.mul(a,
  421. d);l=SIMD.Float32x4.swizzle(l,1,0,3,2);k=SIMD.Float32x4.sub(k,SIMD.Float32x4.mul(e,l));h=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,l),h);l=SIMD.Float32x4.swizzle(l,2,3,0,1);k=SIMD.Float32x4.add(SIMD.Float32x4.mul(e,l),k);h=SIMD.Float32x4.sub(h,SIMD.Float32x4.mul(f,l));l=SIMD.Float32x4.mul(a,e);l=SIMD.Float32x4.swizzle(l,1,0,3,2);k=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,l),k);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(f,l));l=SIMD.Float32x4.swizzle(l,2,3,0,1);k=SIMD.Float32x4.sub(k,SIMD.Float32x4.mul(d,
  422. l));n=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,l),n);SIMD.Float32x4.store(b,0,c);SIMD.Float32x4.store(b,4,k);SIMD.Float32x4.store(b,8,h);SIMD.Float32x4.store(b,12,n);return b};g.adjoint=p.USE_SIMD?g.SIMD.adjoint:g.scalar.adjoint;g.determinant=function(b){var a=b[0],e=b[1],d=b[2],c=b[3],k=b[4],f=b[5],l=b[6],h=b[7],n=b[8],r=b[9],m=b[10],g=b[11],q=b[12],t=b[13],x=b[14];b=b[15];return(a*f-e*k)*(m*b-g*x)-(a*l-d*k)*(r*b-g*t)+(a*h-c*k)*(r*x-m*t)+(e*l-d*f)*(n*b-g*q)-(e*h-c*f)*(n*x-m*q)+(d*h-c*l)*(n*t-r*q)};
  423. g.SIMD.multiply=function(b,a,e){var d=SIMD.Float32x4.load(a,0),c=SIMD.Float32x4.load(a,4),k=SIMD.Float32x4.load(a,8);a=SIMD.Float32x4.load(a,12);var f=SIMD.Float32x4.load(e,0),f=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,0,0,0,0),d),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,1,1,1,1),c),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,2,2,2,2),k),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,3,3,3,3),a))));SIMD.Float32x4.store(b,0,f);f=SIMD.Float32x4.load(e,
  424. 4);f=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,0,0,0,0),d),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,1,1,1,1),c),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,2,2,2,2),k),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,3,3,3,3),a))));SIMD.Float32x4.store(b,4,f);f=SIMD.Float32x4.load(e,8);f=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,0,0,0,0),d),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,1,1,1,1),c),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,
  425. 2,2,2,2),k),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,3,3,3,3),a))));SIMD.Float32x4.store(b,8,f);e=SIMD.Float32x4.load(e,12);d=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,0,0,0,0),d),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,1,1,1,1),c),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,2,2,2,2),k),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,3,3,3,3),a))));SIMD.Float32x4.store(b,12,d);return b};g.scalar.multiply=function(b,a,e){var d=a[0],c=a[1],
  426. k=a[2],f=a[3],l=a[4],h=a[5],n=a[6],r=a[7],m=a[8],g=a[9],q=a[10],t=a[11],x=a[12],v=a[13],p=a[14];a=a[15];var w=e[0],z=e[1],y=e[2],A=e[3];b[0]=w*d+z*l+y*m+A*x;b[1]=w*c+z*h+y*g+A*v;b[2]=w*k+z*n+y*q+A*p;b[3]=w*f+z*r+y*t+A*a;w=e[4];z=e[5];y=e[6];A=e[7];b[4]=w*d+z*l+y*m+A*x;b[5]=w*c+z*h+y*g+A*v;b[6]=w*k+z*n+y*q+A*p;b[7]=w*f+z*r+y*t+A*a;w=e[8];z=e[9];y=e[10];A=e[11];b[8]=w*d+z*l+y*m+A*x;b[9]=w*c+z*h+y*g+A*v;b[10]=w*k+z*n+y*q+A*p;b[11]=w*f+z*r+y*t+A*a;w=e[12];z=e[13];y=e[14];A=e[15];b[12]=w*d+z*l+y*m+A*x;
  427. b[13]=w*c+z*h+y*g+A*v;b[14]=w*k+z*n+y*q+A*p;b[15]=w*f+z*r+y*t+A*a;return b};g.multiply=p.USE_SIMD?g.SIMD.multiply:g.scalar.multiply;g.mul=g.multiply;g.scalar.translate=function(b,a,e){var d=e[0],c=e[1];e=e[2];var k,f,l,h,n,r,m,g,q,t,x,v;a===b?(b[12]=a[0]*d+a[4]*c+a[8]*e+a[12],b[13]=a[1]*d+a[5]*c+a[9]*e+a[13],b[14]=a[2]*d+a[6]*c+a[10]*e+a[14],b[15]=a[3]*d+a[7]*c+a[11]*e+a[15]):(k=a[0],f=a[1],l=a[2],h=a[3],n=a[4],r=a[5],m=a[6],g=a[7],q=a[8],t=a[9],x=a[10],v=a[11],b[0]=k,b[1]=f,b[2]=l,b[3]=h,b[4]=n,
  428. b[5]=r,b[6]=m,b[7]=g,b[8]=q,b[9]=t,b[10]=x,b[11]=v,b[12]=k*d+n*c+q*e+a[12],b[13]=f*d+r*c+t*e+a[13],b[14]=l*d+m*c+x*e+a[14],b[15]=h*d+g*c+v*e+a[15]);return b};g.SIMD.translate=function(b,a,e){var d=SIMD.Float32x4.load(a,0),c=SIMD.Float32x4.load(a,4),k=SIMD.Float32x4.load(a,8),f=SIMD.Float32x4.load(a,12);e=SIMD.Float32x4(e[0],e[1],e[2],0);a!==b&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11]);d=SIMD.Float32x4.mul(d,SIMD.Float32x4.swizzle(e,
  429. 0,0,0,0));c=SIMD.Float32x4.mul(c,SIMD.Float32x4.swizzle(e,1,1,1,1));k=SIMD.Float32x4.mul(k,SIMD.Float32x4.swizzle(e,2,2,2,2));a=SIMD.Float32x4.add(d,SIMD.Float32x4.add(c,SIMD.Float32x4.add(k,f)));SIMD.Float32x4.store(b,12,a);return b};g.translate=p.USE_SIMD?g.SIMD.translate:g.scalar.translate;g.scalar.scale=function(b,a,e){var d=e[0],c=e[1];e=e[2];b[0]=a[0]*d;b[1]=a[1]*d;b[2]=a[2]*d;b[3]=a[3]*d;b[4]=a[4]*c;b[5]=a[5]*c;b[6]=a[6]*c;b[7]=a[7]*c;b[8]=a[8]*e;b[9]=a[9]*e;b[10]=a[10]*e;b[11]=a[11]*e;b[12]=
  430. a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b};g.SIMD.scale=function(b,a,e){var d;e=SIMD.Float32x4(e[0],e[1],e[2],0);d=SIMD.Float32x4.load(a,0);SIMD.Float32x4.store(b,0,SIMD.Float32x4.mul(d,SIMD.Float32x4.swizzle(e,0,0,0,0)));d=SIMD.Float32x4.load(a,4);SIMD.Float32x4.store(b,4,SIMD.Float32x4.mul(d,SIMD.Float32x4.swizzle(e,1,1,1,1)));d=SIMD.Float32x4.load(a,8);SIMD.Float32x4.store(b,8,SIMD.Float32x4.mul(d,SIMD.Float32x4.swizzle(e,2,2,2,2)));b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b};
  431. g.scale=p.USE_SIMD?g.SIMD.scale:g.scalar.scale;g.rotate=function(b,a,e,d){var c=d[0],k=d[1];d=d[2];var f=Math.sqrt(c*c+k*k+d*d),l,h,n,r,m,g,q,t,x,v,B,w,z,y,A,C,D,E,G,F;if(Math.abs(f)<p.EPSILON)return null;f=1/f;c*=f;k*=f;d*=f;l=Math.sin(e);h=Math.cos(e);n=1-h;e=a[0];f=a[1];r=a[2];m=a[3];g=a[4];q=a[5];t=a[6];x=a[7];v=a[8];B=a[9];w=a[10];z=a[11];y=c*c*n+h;A=k*c*n+d*l;C=d*c*n-k*l;D=c*k*n-d*l;E=k*k*n+h;G=d*k*n+c*l;F=c*d*n+k*l;c=k*d*n-c*l;k=d*d*n+h;b[0]=e*y+g*A+v*C;b[1]=f*y+q*A+B*C;b[2]=r*y+t*A+w*C;b[3]=
  432. m*y+x*A+z*C;b[4]=e*D+g*E+v*G;b[5]=f*D+q*E+B*G;b[6]=r*D+t*E+w*G;b[7]=m*D+x*E+z*G;b[8]=e*F+g*c+v*k;b[9]=f*F+q*c+B*k;b[10]=r*F+t*c+w*k;b[11]=m*F+x*c+z*k;a!==b&&(b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b};g.scalar.rotateX=function(b,a,e){var d=Math.sin(e);e=Math.cos(e);var c=a[4],k=a[5],f=a[6],l=a[7],h=a[8],n=a[9],r=a[10],m=a[11];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[4]=c*e+h*d;b[5]=k*e+n*d;b[6]=f*e+r*d;b[7]=l*e+m*d;b[8]=h*e-
  433. c*d;b[9]=n*e-k*d;b[10]=r*e-f*d;b[11]=m*e-l*d;return b};g.SIMD.rotateX=function(b,a,e){var d=SIMD.Float32x4.splat(Math.sin(e));e=SIMD.Float32x4.splat(Math.cos(e));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]);var c=SIMD.Float32x4.load(a,4);a=SIMD.Float32x4.load(a,8);SIMD.Float32x4.store(b,4,SIMD.Float32x4.add(SIMD.Float32x4.mul(c,e),SIMD.Float32x4.mul(a,d)));SIMD.Float32x4.store(b,8,SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,e),SIMD.Float32x4.mul(c,d)));
  434. return b};g.rotateX=p.USE_SIMD?g.SIMD.rotateX:g.scalar.rotateX;g.scalar.rotateY=function(b,a,e){var d=Math.sin(e);e=Math.cos(e);var c=a[0],k=a[1],f=a[2],l=a[3],h=a[8],n=a[9],r=a[10],m=a[11];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[0]=c*e-h*d;b[1]=k*e-n*d;b[2]=f*e-r*d;b[3]=l*e-m*d;b[8]=c*d+h*e;b[9]=k*d+n*e;b[10]=f*d+r*e;b[11]=l*d+m*e;return b};g.SIMD.rotateY=function(b,a,e){var d=SIMD.Float32x4.splat(Math.sin(e));e=SIMD.Float32x4.splat(Math.cos(e));
  435. 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]);var c=SIMD.Float32x4.load(a,0);a=SIMD.Float32x4.load(a,8);SIMD.Float32x4.store(b,0,SIMD.Float32x4.sub(SIMD.Float32x4.mul(c,e),SIMD.Float32x4.mul(a,d)));SIMD.Float32x4.store(b,8,SIMD.Float32x4.add(SIMD.Float32x4.mul(c,d),SIMD.Float32x4.mul(a,e)));return b};g.rotateY=p.USE_SIMD?g.SIMD.rotateY:g.scalar.rotateY;g.scalar.rotateZ=function(b,a,e){var d=Math.sin(e);e=Math.cos(e);var c=a[0],k=a[1],f=a[2],l=a[3],
  436. h=a[4],n=a[5],r=a[6],m=a[7];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[0]=c*e+h*d;b[1]=k*e+n*d;b[2]=f*e+r*d;b[3]=l*e+m*d;b[4]=h*e-c*d;b[5]=n*e-k*d;b[6]=r*e-f*d;b[7]=m*e-l*d;return b};g.SIMD.rotateZ=function(b,a,e){var d=SIMD.Float32x4.splat(Math.sin(e));e=SIMD.Float32x4.splat(Math.cos(e));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]);var c=SIMD.Float32x4.load(a,0);a=SIMD.Float32x4.load(a,
  437. 4);SIMD.Float32x4.store(b,0,SIMD.Float32x4.add(SIMD.Float32x4.mul(c,e),SIMD.Float32x4.mul(a,d)));SIMD.Float32x4.store(b,4,SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,e),SIMD.Float32x4.mul(c,d)));return b};g.rotateZ=p.USE_SIMD?g.SIMD.rotateZ:g.scalar.rotateZ;g.fromTranslation=function(b,a){b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=a[0];b[13]=a[1];b[14]=a[2];b[15]=1;return b};g.fromScaling=function(b,a){b[0]=a[0];b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=a[1];b[6]=
  438. 0;b[7]=0;b[8]=0;b[9]=0;b[10]=a[2];b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};g.fromRotation=function(b,a,e){var d=e[0],c=e[1];e=e[2];var k=Math.sqrt(d*d+c*c+e*e),f;if(Math.abs(k)<p.EPSILON)return null;k=1/k;d*=k;c*=k;e*=k;k=Math.sin(a);a=Math.cos(a);f=1-a;b[0]=d*d*f+a;b[1]=c*d*f+e*k;b[2]=e*d*f-c*k;b[3]=0;b[4]=d*c*f-e*k;b[5]=c*c*f+a;b[6]=e*c*f+d*k;b[7]=0;b[8]=d*e*f+c*k;b[9]=c*e*f-d*k;b[10]=e*e*f+a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};g.fromXRotation=function(b,a){var e=Math.sin(a);
  439. a=Math.cos(a);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=a;b[6]=e;b[7]=0;b[8]=0;b[9]=-e;b[10]=a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};g.fromYRotation=function(b,a){var e=Math.sin(a);a=Math.cos(a);b[0]=a;b[1]=0;b[2]=-e;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=e;b[9]=0;b[10]=a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};g.fromZRotation=function(b,a){var e=Math.sin(a);a=Math.cos(a);b[0]=a;b[1]=e;b[2]=0;b[3]=0;b[4]=-e;b[5]=a;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=
  440. 0;b[15]=1;return b};g.fromRotationTranslation=function(b,a,e){var d=a[0],c=a[1],k=a[2],f=a[3],l=d+d,h=c+c,n=k+k;a=d*l;var r=d*h,d=d*n,m=c*h,c=c*n,k=k*n,l=f*l,h=f*h,f=f*n;b[0]=1-(m+k);b[1]=r+f;b[2]=d-h;b[3]=0;b[4]=r-f;b[5]=1-(a+k);b[6]=c+l;b[7]=0;b[8]=d+h;b[9]=c-l;b[10]=1-(a+m);b[11]=0;b[12]=e[0];b[13]=e[1];b[14]=e[2];b[15]=1;return b};g.getTranslation=function(b,a){b[0]=a[12];b[1]=a[13];b[2]=a[14];return b};g.getRotation=function(b,a){var e=a[0]+a[5]+a[10],d=0;0<e?(d=2*Math.sqrt(e+1),b[3]=.25*d,b[0]=
  441. (a[6]-a[9])/d,b[1]=(a[8]-a[2])/d,b[2]=(a[1]-a[4])/d):a[0]>a[5]&a[0]>a[10]?(d=2*Math.sqrt(1+a[0]-a[5]-a[10]),b[3]=(a[6]-a[9])/d,b[0]=.25*d,b[1]=(a[1]+a[4])/d,b[2]=(a[8]+a[2])/d):a[5]>a[10]?(d=2*Math.sqrt(1+a[5]-a[0]-a[10]),b[3]=(a[8]-a[2])/d,b[0]=(a[1]+a[4])/d,b[1]=.25*d,b[2]=(a[6]+a[9])/d):(d=2*Math.sqrt(1+a[10]-a[0]-a[5]),b[3]=(a[1]-a[4])/d,b[0]=(a[8]+a[2])/d,b[1]=(a[6]+a[9])/d,b[2]=.25*d);return b};g.fromRotationTranslationScale=function(b,a,e,d){var c=a[0],k=a[1],f=a[2],l=a[3],h=c+c,n=k+k,r=f+
  442. f;a=c*h;var m=c*n,c=c*r,g=k*n,k=k*r,f=f*r,h=l*h,n=l*n,l=l*r,r=d[0],q=d[1];d=d[2];b[0]=(1-(g+f))*r;b[1]=(m+l)*r;b[2]=(c-n)*r;b[3]=0;b[4]=(m-l)*q;b[5]=(1-(a+f))*q;b[6]=(k+h)*q;b[7]=0;b[8]=(c+n)*d;b[9]=(k-h)*d;b[10]=(1-(a+g))*d;b[11]=0;b[12]=e[0];b[13]=e[1];b[14]=e[2];b[15]=1;return b};g.fromRotationTranslationScaleOrigin=function(b,a,e,d,c){var k=a[0],f=a[1],l=a[2],h=a[3],n=k+k,r=f+f,m=l+l;a=k*n;var g=k*r,k=k*m,q=f*r,f=f*m,l=l*m,n=h*n,r=h*r,h=h*m,m=d[0],t=d[1];d=d[2];var x=c[0],v=c[1];c=c[2];b[0]=(1-
  443. (q+l))*m;b[1]=(g+h)*m;b[2]=(k-r)*m;b[3]=0;b[4]=(g-h)*t;b[5]=(1-(a+l))*t;b[6]=(f+n)*t;b[7]=0;b[8]=(k+r)*d;b[9]=(f-n)*d;b[10]=(1-(a+q))*d;b[11]=0;b[12]=e[0]+x-(b[0]*x+b[4]*v+b[8]*c);b[13]=e[1]+v-(b[1]*x+b[5]*v+b[9]*c);b[14]=e[2]+c-(b[2]*x+b[6]*v+b[10]*c);b[15]=1;return b};g.fromQuat=function(b,a){var e=a[0],d=a[1],c=a[2];a=a[3];var k=e+e,f=d+d,l=c+c,e=e*k,h=d*k,d=d*f,n=c*k,r=c*f,c=c*l,k=a*k,f=a*f;a*=l;b[0]=1-d-c;b[1]=h+a;b[2]=n-f;b[3]=0;b[4]=h-a;b[5]=1-e-c;b[6]=r+k;b[7]=0;b[8]=n+f;b[9]=r-k;b[10]=1-
  444. e-d;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};g.frustum=function(b,a,e,d,c,k,f){var l=1/(e-a),h=1/(c-d),n=1/(k-f);b[0]=2*k*l;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=2*k*h;b[6]=0;b[7]=0;b[8]=(e+a)*l;b[9]=(c+d)*h;b[10]=(f+k)*n;b[11]=-1;b[12]=0;b[13]=0;b[14]=f*k*2*n;b[15]=0;return b};g.perspective=function(b,a,e,d,c){a=1/Math.tan(a/2);var k=1/(d-c);b[0]=a/e;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=a;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=(c+d)*k;b[11]=-1;b[12]=0;b[13]=0;b[14]=2*c*d*k;b[15]=0;return b};g.perspectiveFromFieldOfView=
  445. function(b,a,e,d){var c=Math.tan(a.upDegrees*Math.PI/180),k=Math.tan(a.downDegrees*Math.PI/180),f=Math.tan(a.leftDegrees*Math.PI/180);a=Math.tan(a.rightDegrees*Math.PI/180);var l=2/(f+a),h=2/(c+k);b[0]=l;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=h;b[6]=0;b[7]=0;b[8]=-((f-a)*l*.5);b[9]=(c-k)*h*.5;b[10]=d/(e-d);b[11]=-1;b[12]=0;b[13]=0;b[14]=d*e/(e-d);b[15]=0;return b};g.ortho=function(b,a,e,d,c,k,f){var l=1/(a-e),h=1/(d-c),n=1/(k-f);b[0]=-2*l;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=-2*h;b[6]=0;b[7]=0;b[8]=0;b[9]=
  446. 0;b[10]=2*n;b[11]=0;b[12]=(a+e)*l;b[13]=(c+d)*h;b[14]=(f+k)*n;b[15]=1;return b};g.lookAt=function(b,a,e,d){var c,k,f,l,h,n,r,m,u=a[0],q=a[1];a=a[2];f=d[0];l=d[1];k=d[2];r=e[0];d=e[1];c=e[2];if(Math.abs(u-r)<p.EPSILON&&Math.abs(q-d)<p.EPSILON&&Math.abs(a-c)<p.EPSILON)return g.identity(b);e=u-r;d=q-d;r=a-c;m=1/Math.sqrt(e*e+d*d+r*r);e*=m;d*=m;r*=m;c=l*r-k*d;k=k*e-f*r;f=f*d-l*e;(m=Math.sqrt(c*c+k*k+f*f))?(m=1/m,c*=m,k*=m,f*=m):f=k=c=0;l=d*f-r*k;h=r*c-e*f;n=e*k-d*c;(m=Math.sqrt(l*l+h*h+n*n))?(m=1/m,l*=
  447. m,h*=m,n*=m):n=h=l=0;b[0]=c;b[1]=l;b[2]=e;b[3]=0;b[4]=k;b[5]=h;b[6]=d;b[7]=0;b[8]=f;b[9]=n;b[10]=r;b[11]=0;b[12]=-(c*u+k*q+f*a);b[13]=-(l*u+h*q+n*a);b[14]=-(e*u+d*q+r*a);b[15]=1;return b};g.str=function(b){return"mat4("+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+", "+b[4]+", "+b[5]+", "+b[6]+", "+b[7]+", "+b[8]+", "+b[9]+", "+b[10]+", "+b[11]+", "+b[12]+", "+b[13]+", "+b[14]+", "+b[15]+")"};g.frob=function(b){return Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2)+Math.pow(b[2],2)+Math.pow(b[3],2)+Math.pow(b[4],
  448. 2)+Math.pow(b[5],2)+Math.pow(b[6],2)+Math.pow(b[7],2)+Math.pow(b[8],2)+Math.pow(b[9],2)+Math.pow(b[10],2)+Math.pow(b[11],2)+Math.pow(b[12],2)+Math.pow(b[13],2)+Math.pow(b[14],2)+Math.pow(b[15],2))};g.add=function(b,a,e){b[0]=a[0]+e[0];b[1]=a[1]+e[1];b[2]=a[2]+e[2];b[3]=a[3]+e[3];b[4]=a[4]+e[4];b[5]=a[5]+e[5];b[6]=a[6]+e[6];b[7]=a[7]+e[7];b[8]=a[8]+e[8];b[9]=a[9]+e[9];b[10]=a[10]+e[10];b[11]=a[11]+e[11];b[12]=a[12]+e[12];b[13]=a[13]+e[13];b[14]=a[14]+e[14];b[15]=a[15]+e[15];return b};g.subtract=function(b,
  449. a,e){b[0]=a[0]-e[0];b[1]=a[1]-e[1];b[2]=a[2]-e[2];b[3]=a[3]-e[3];b[4]=a[4]-e[4];b[5]=a[5]-e[5];b[6]=a[6]-e[6];b[7]=a[7]-e[7];b[8]=a[8]-e[8];b[9]=a[9]-e[9];b[10]=a[10]-e[10];b[11]=a[11]-e[11];b[12]=a[12]-e[12];b[13]=a[13]-e[13];b[14]=a[14]-e[14];b[15]=a[15]-e[15];return b};g.sub=g.subtract;g.multiplyScalar=function(b,a,e){b[0]=a[0]*e;b[1]=a[1]*e;b[2]=a[2]*e;b[3]=a[3]*e;b[4]=a[4]*e;b[5]=a[5]*e;b[6]=a[6]*e;b[7]=a[7]*e;b[8]=a[8]*e;b[9]=a[9]*e;b[10]=a[10]*e;b[11]=a[11]*e;b[12]=a[12]*e;b[13]=a[13]*e;b[14]=
  450. a[14]*e;b[15]=a[15]*e;return b};g.multiplyScalarAndAdd=function(b,a,e,d){b[0]=a[0]+e[0]*d;b[1]=a[1]+e[1]*d;b[2]=a[2]+e[2]*d;b[3]=a[3]+e[3]*d;b[4]=a[4]+e[4]*d;b[5]=a[5]+e[5]*d;b[6]=a[6]+e[6]*d;b[7]=a[7]+e[7]*d;b[8]=a[8]+e[8]*d;b[9]=a[9]+e[9]*d;b[10]=a[10]+e[10]*d;b[11]=a[11]+e[11]*d;b[12]=a[12]+e[12]*d;b[13]=a[13]+e[13]*d;b[14]=a[14]+e[14]*d;b[15]=a[15]+e[15]*d;return b};g.exactEquals=function(b,a){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]&&b[6]===a[6]&&b[7]===
  451. a[7]&&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]};g.equals=function(b,a){var e=b[0],d=b[1],c=b[2],k=b[3],f=b[4],l=b[5],h=b[6],n=b[7],r=b[8],m=b[9],g=b[10],q=b[11],t=b[12],x=b[13],v=b[14];b=b[15];var B=a[0],w=a[1],z=a[2],y=a[3],A=a[4],C=a[5],D=a[6],E=a[7],G=a[8],F=a[9],K=a[10],J=a[11],H=a[12],U=a[13],V=a[14];a=a[15];return Math.abs(e-B)<=p.EPSILON*Math.max(1,Math.abs(e),Math.abs(B))&&Math.abs(d-w)<=p.EPSILON*Math.max(1,Math.abs(d),
  452. Math.abs(w))&&Math.abs(c-z)<=p.EPSILON*Math.max(1,Math.abs(c),Math.abs(z))&&Math.abs(k-y)<=p.EPSILON*Math.max(1,Math.abs(k),Math.abs(y))&&Math.abs(f-A)<=p.EPSILON*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(l-C)<=p.EPSILON*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(h-D)<=p.EPSILON*Math.max(1,Math.abs(h),Math.abs(D))&&Math.abs(n-E)<=p.EPSILON*Math.max(1,Math.abs(n),Math.abs(E))&&Math.abs(r-G)<=p.EPSILON*Math.max(1,Math.abs(r),Math.abs(G))&&Math.abs(m-F)<=p.EPSILON*Math.max(1,Math.abs(m),Math.abs(F))&&
  453. Math.abs(g-K)<=p.EPSILON*Math.max(1,Math.abs(g),Math.abs(K))&&Math.abs(q-J)<=p.EPSILON*Math.max(1,Math.abs(q),Math.abs(J))&&Math.abs(t-H)<=p.EPSILON*Math.max(1,Math.abs(t),Math.abs(H))&&Math.abs(x-U)<=p.EPSILON*Math.max(1,Math.abs(x),Math.abs(U))&&Math.abs(v-V)<=p.EPSILON*Math.max(1,Math.abs(v),Math.abs(V))&&Math.abs(b-a)<=p.EPSILON*Math.max(1,Math.abs(b),Math.abs(a))};return g})},"esri/core/libs/gl-matrix/common":function(){define([],function(){var p={EPSILON:1E-6};p.ARRAY_TYPE="undefined"!==typeof Float32Array?
  454. Float32Array:Array;p.RANDOM=Math.random;p.ENABLE_SIMD=!1;p.SIMD_AVAILABLE=p.ARRAY_TYPE===Float32Array&&"SIMD"in this;p.USE_SIMD=p.ENABLE_SIMD&&p.SIMD_AVAILABLE;p.setMatrixArrayType=function(b){p.ARRAY_TYPE=b};var g=Math.PI/180;p.toRadian=function(b){return b*g};p.equals=function(b,a){return Math.abs(b-a)<=p.EPSILON*Math.max(1,Math.abs(b),Math.abs(a))};return p})},"esri/views/2d/engine/webgl/enums":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});
  455. (function(b){b[b.FILL=0]="FILL";b[b.LINE=1]="LINE";b[b.MARKER=2]="MARKER";b[b.TEXT=3]="TEXT";b[b.NONE=4]="NONE";b[b.UNKNOWN=5]="UNKNOWN"})(g.WGLGeometryType||(g.WGLGeometryType={}));(function(b){b[b.SUCCEEDED=0]="SUCCEEDED";b[b.FAILED_OUT_OF_MEMORY=1]="FAILED_OUT_OF_MEMORY"})(g.WGLGeometryTransactionStatus||(g.WGLGeometryTransactionStatus={}));(function(b){b[b.NONE=0]="NONE";b[b.FILL=1]="FILL";b[b.LINE=2]="LINE";b[b.MARKER=3]="MARKER";b[b.TEXT=4]="TEXT";b[b.HITTEST=5]="HITTEST";b[b.HIGHLIGHT=6]="HIGHLIGHT";
  456. b[b.CLIP=7]="CLIP";b[b.DEBUG=8]="DEBUG"})(g.WGLDrawPhase||(g.WGLDrawPhase={}));(function(b){b[b.NONE=0]="NONE";b[b.OPACITY=1]="OPACITY";b[b.COLOR=2]="COLOR";b[b.ROTATION=4]="ROTATION";b[b.SIZE_MINMAX_VALUE=8]="SIZE_MINMAX_VALUE";b[b.SIZE_SCALE_STOPS=16]="SIZE_SCALE_STOPS";b[b.SIZE_FIELD_STOPS=32]="SIZE_FIELD_STOPS";b[b.SIZE_UNIT_VALUE=64]="SIZE_UNIT_VALUE"})(g.WGLVVFlag||(g.WGLVVFlag={}));(function(b){b[b.INITIALIZED=0]="INITIALIZED";b[b.NO_DATA=1]="NO_DATA";b[b.READY=2]="READY";b[b.MODIFIED=3]="MODIFIED";
  457. b[b.INVALID=4]="INVALID"})(g.TileStatus||(g.TileStatus={}))})},"esri/views/2d/engine/webgl/GeometryUtils":function(){define(["require","exports"],function(p,g){function b(a,b){a%=b;return 0<=a?a:a+b}Object.defineProperty(g,"__esModule",{value:!0});g.C_INFINITY=Number.POSITIVE_INFINITY;g.C_PI=Math.PI;g.C_2PI=2*g.C_PI;g.C_PI_BY_2=g.C_PI/2;g.C_RAD_TO_256=128/g.C_PI;g.C_256_TO_RAD=g.C_PI/128;g.C_DEG_TO_256=256/360;g.C_DEG_TO_RAD=g.C_PI/180;g.C_SQRT2=1.414213562;g.C_SQRT2_INV=1/g.C_SQRT2;var a=1/Math.LN2;
  458. g.positiveMod=b;g.radToByte=function(a){return b(a*g.C_RAD_TO_256,256)};g.degToByte=function(a){return b(a*g.C_DEG_TO_256,256)};g.log2=function(b){return Math.log(b)*a};g.sqr=function(a){return a*a};g.clamp=function(a,b,c){return Math.min(Math.max(a,b),c)};g.interpolate=function(a,b,c){return a*(1-c)+b*c};g.between=function(a,b,c){return a>=b&&a<=c||a>=c&&a<=b}})},"esri/views/2d/engine/webgl/MaterialManager":function(){define("require exports ./enums ./MaterialInfoUtils ./shaders/fillShaderSnippets ./shaders/iconShaderSnippets ./shaders/lineShaderSnippets ./shaders/textShaderSnippets ../../../webgl/ShaderVariations".split(" "),
  459. function(p,g,b,a,e,d,c,k,f){return function(){function l(){this._programRep=new Map;this.isInitialize=!1}l.prototype.initialize=function(a){if(!this.isInitialize){var b=new f("text",["textVS","textFS"],[],k,a);b.addDefine("ID","ID",[!0,!0],"ID");b.addDefine("HIGHLIGHT","HIGHLIGHT",[!1,!1],"HIGHLIGHT");b.addDefine("SDF","SDF",[!1,!1],"SDF");b.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",[!0,!1],"VV_SIZE_MIN_MAX_VALUE");b.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!0,!1],"VV_SIZE_SCALE_STOPS");
  460. b.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!0,!1],"VV_SIZE_FIELD_STOPS");b.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!0,!1],"VV_SIZE_UNIT_VALUE");b.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");b.addDefine("VV_ROTATION","VV_ROTATION",[!0,!1],"VV_ROTATION");b.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");b.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",[!1,!1],"VERTEX_VISIBILITY");b.addDefine("PATTERN","PATTERN",[!1,!1],"PATTERN");b.addDefine("HEATMAP",
  461. "HEATMAP",[!1,!1],"HEATMAP");var h=new f("icon",["iconVS","iconFS"],[],d,a);h.addDefine("ID","ID",[!0,!0],"ID");h.addDefine("HIGHLIGHT","HIGHLIGHT",[!0,!0],"HIGHLIGHT");h.addDefine("SDF","SDF",[!0,!0],"SDF");h.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",[!0,!1],"VV_SIZE_MIN_MAX_VALUE");h.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!0,!1],"VV_SIZE_SCALE_STOPS");h.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!0,!1],"VV_SIZE_FIELD_STOPS");h.addDefine("VV_SIZE_UNIT_VALUE",
  462. "VV_SIZE_UNIT_VALUE",[!0,!1],"VV_SIZE_UNIT_VALUE");h.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");h.addDefine("VV_ROTATION","VV_ROTATION",[!0,!1],"VV_ROTATION");h.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");h.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",[!1,!1],"VERTEX_VISIBILITY");h.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");h.addDefine("HEATMAP","HEATMAP",[!0,!0],"HEATMAP");var l=new f("fill",["fillVS","fillFS"],[],e,a);l.addDefine("ID","ID",[!0,!0],"ID");l.addDefine("HIGHLIGHT",
  463. "HIGHLIGHT",[!0,!0],"HIGHLIGHT");l.addDefine("SDF","SDF",[!1,!1],"SDF");l.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",[!1,!1],"VV_SIZE_MIN_MAX_VALUE");l.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!1,!1],"VV_SIZE_SCALE_STOPS");l.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!1,!1],"VV_SIZE_FIELD_STOPS");l.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!1,!1],"VV_SIZE_UNIT_VALUE");l.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");l.addDefine("VV_ROTATION",
  464. "VV_ROTATION",[!1,!1],"VV_ROTATION");l.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");l.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",[!1,!1],"VERTEX_VISIBILITY");l.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");l.addDefine("HEATMAP","HEATMAP",[!1,!1],"HEATMAP");a=new f("line",["lineVS","lineFS"],[],c,a);a.addDefine("ID","ID",[!0,!0],"ID");a.addDefine("HIGHLIGHT","HIGHLIGHT",[!0,!0],"HIGHLIGHT");a.addDefine("SDF","SDF",[!0,!0],"SDF");a.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",
  465. [!0,!1],"VV_SIZE_MIN_MAX_VALUE");a.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!0,!1],"VV_SIZE_SCALE_STOPS");a.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!0,!1],"VV_SIZE_FIELD_STOPS");a.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!0,!1],"VV_SIZE_UNIT_VALUE");a.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");a.addDefine("VV_ROTATION","VV_ROTATION",[!0,!1],"VV_ROTATION");a.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");a.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",
  466. [!1,!1],"VERTEX_VISIBILITY");a.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");a.addDefine("HEATMAP","HEATMAP",[!1,!1],"HEATMAP");this._textShaderVariations=b;this._fillShaderVariations=l;this._iconShaderVariations=h;this._lineShaderVariations=a;this.isInitialize=!0}};l.prototype.getProgram=function(c,d,e){c|=d===b.WGLDrawPhase.HITTEST?4:0;c|=d===b.WGLDrawPhase.HIGHLIGHT?8:0;if(this._programRep[c])return this._programRep[c];if(!this._iconShaderVariations||!this._fillShaderVariations||!this._lineShaderVariations)return null;
  467. d=a.getMaterialVariations(c);var f;switch(d.geometryType){case b.WGLGeometryType.MARKER:f=this._iconShaderVariations.getProgram(d.variations,null,null,e);break;case b.WGLGeometryType.TEXT:f=this._textShaderVariations.getProgram(d.variations,null,null,e);break;case b.WGLGeometryType.FILL:f=this._fillShaderVariations.getProgram(d.variations,null,null,e);break;case b.WGLGeometryType.LINE:f=this._lineShaderVariations.getProgram(d.variations,null,null,e)}f&&(this._programRep[c]=f);return f};return l}()})},
  468. "esri/views/2d/engine/webgl/MaterialInfoUtils":function(){define(["require","exports","./enums","./MaterialInfo","./MaterialKeyInfo"],function(p,g,b,a,e){function d(a){var b=[];b[0]=a.sdf?!0:!1;b[1]=a.vvSizeMinMaxValue?!0:!1;b[2]=a.vvSizeScaleStops?!0:!1;b[3]=a.vvSizeFieldStops?!0:!1;b[4]=a.vvSizeUnitValue?!0:!1;b[5]=a.vvColor?!0:!1;b[6]=a.vvRotation?!0:!1;b[7]=a.vvOpacity?!0:!1;b[8]=a.visibility?!0:!1;b[9]=a.pattern?!0:!1;b[10]=a.heatmap?!0:!1;return b.reduce(function(a,b,c){b&&(a|=1<<c+2);return a},
  469. 0)}function c(a){if(a.geometryType===b.WGLGeometryType.UNKNOWN)return-1;var c=d(a)<<2;return a.geometryType+c}Object.defineProperty(g,"__esModule",{value:!0});g.createTextMaterialInfo=function(d,f){var k=new a.default,h=new e;h.geometryType=b.WGLGeometryType.TEXT;h.sdf=!0;h.pattern=!1;h.visibility=!1;h.heatmap=!1;k.texBindingInfo.push(new a.TexBindingInfo(2,d.page,"u_texture"));0===f?h.vvOpacity=h.vvSizeMinMaxValue=h.vvSizeScaleStops=h.vvSizeFieldStops=h.vvSizeUnitValue=h.vvColor=h.vvRotation=!1:
  470. (h.vvOpacity=0!==(f&b.WGLVVFlag.OPACITY),h.vvSizeMinMaxValue=0!==(f&b.WGLVVFlag.SIZE_MINMAX_VALUE),h.vvSizeScaleStops=0!==(f&b.WGLVVFlag.SIZE_SCALE_STOPS),h.vvSizeFieldStops=0!==(f&b.WGLVVFlag.SIZE_FIELD_STOPS),h.vvSizeUnitValue=0!==(f&b.WGLVVFlag.SIZE_UNIT_VALUE),h.vvColor=0!==(f&b.WGLVVFlag.COLOR),h.vvRotation=0!==(f&b.WGLVVFlag.ROTATION));k.materialKey=c(h);k.materialKeyInfo=h;return k};g.createMaterialInfo=function(d,f,l,h){var k=new a.default,r=new e;r.geometryType=l;(f=f.spriteMosaicItem)?(r.sdf=
  471. f.sdf,r.pattern=!0,k.texBindingInfo.push(new a.TexBindingInfo(1,f.page,"u_texture"))):(r.sdf=!1,r.pattern=!1);0===h?r.vvOpacity=r.vvSizeMinMaxValue=r.vvSizeScaleStops=r.vvSizeFieldStops=r.vvSizeUnitValue=r.vvColor=r.vvRotation=!1:(r.vvOpacity=0!==(h&b.WGLVVFlag.OPACITY),r.vvSizeMinMaxValue=0!==(h&b.WGLVVFlag.SIZE_MINMAX_VALUE),r.vvSizeScaleStops=0!==(h&b.WGLVVFlag.SIZE_SCALE_STOPS),r.vvSizeFieldStops=0!==(h&b.WGLVVFlag.SIZE_FIELD_STOPS),r.vvSizeUnitValue=0!==(h&b.WGLVVFlag.SIZE_UNIT_VALUE),r.vvColor=
  472. 0!==(h&b.WGLVVFlag.COLOR),r.vvRotation=0!==(h&b.WGLVVFlag.ROTATION));r.visibility=!1;r.heatmap=null!=d.heatmapInfo;k.materialKey=c(r);k.materialKeyInfo=r;return k};g.getMaterialKey=c;g.getMaterialVariations=function(a){var b=a&3;a>>=2;return{geometryType:b,variations:[0!==(a&1),0!==(a&2),0!==(a&4),0!==(a&8),0!==(a&16),0!==(a&32),0!==(a&64),0!==(a&128),0!==(a&256),0!==(a&512),0!==(a&1024),0!==(a&2048),0!==(a&4096)]}}})},"esri/views/2d/engine/webgl/MaterialInfo":function(){define(["require","exports",
  473. "./MaterialInfoUtils_updateMaterialVariations","./MaterialKeyInfo","./util/serializationUtils"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});var d=function(){function a(a,b,c){this.unit=a;this.pageId=b;this.semantic=c}a.prototype.clone=function(){return new a(this.unit,this.pageId,this.semantic)};a.prototype.serialize=function(a){a.writeInt32(this.unit);a.writeInt32(this.pageId);return a};a.deserialize=function(b){var c=b.readInt32();b=b.readInt32();return new a(c,b,"u_texture")};
  474. return a}();g.TexBindingInfo=d;var c=function(){function a(a,b){this.name=a;this.value=b}a.prototype.clone=function(){return new a(this.name,this.value)};a.prototype.serialize=function(a){a.writeInt32(this.value);return a};a.deserialize=function(b){b=b.readInt32();return new a("u_my_param",b)};return a}();g.MaterialParam=c;p=function(){function k(){this.texBindingInfo=[];this.materialParams=[]}k.prototype.copy=function(b){this.materialParams=b.materialParams.map(function(a){return a.clone()});this.texBindingInfo=
  475. b.texBindingInfo.map(function(a){return a.clone()});b.materialKeyInfo&&(this.materialKeyInfo=new a,this.materialKeyInfo.copy(b.materialKeyInfo));this.materialKey=b.materialKey};k.prototype.serialize=function(a){a.writeInt32(this.materialKey);e.serializeList(a,this.texBindingInfo);e.serializeList(a,this.materialParams);return a};k.deserialize=function(f){var l=new k;l.materialKey=f.readInt32();l.texBindingInfo=e.deserializeList(f,d);l.materialParams=e.deserializeList(f,c);l.materialKeyInfo=new a;b(l.materialKeyInfo,
  476. l.materialKey);return l};return k}();g.default=p})},"esri/views/2d/engine/webgl/MaterialInfoUtils_updateMaterialVariations":function(){define(["require","exports"],function(p,g){return function(b,a){b.geometryType=a&3;a>>=2;b.sdf=0!==(a&4);b.vvSizeMinMaxValue=0!==(a&8);b.vvSizeScaleStops=0!==(a&16);b.vvSizeFieldStops=0!==(a&32);b.vvSizeUnitValue=0!==(a&64);b.vvColor=0!==(a&128);b.vvRotation=0!==(a&256);b.vvOpacity=0!==(a&512);b.visibility=0!==(a&1024);b.pattern=0!==(a&2048);b.heatmap=0!==(a&4096);
  477. return b}})},"esri/views/2d/engine/webgl/MaterialKeyInfo":function(){define(["require","exports"],function(p,g){return function(){function b(){this.heatmap=this.pattern=this.visibility=this.vvOpacity=this.vvRotation=this.vvColor=this.vvSizeUnitValue=this.vvSizeFieldStops=this.vvSizeScaleStops=this.vvSizeMinMaxValue=this.sdf=!1}b.prototype.copy=function(a){this.geometryType=a.geometryType;this.sdf=a.sdf;this.vvSizeMinMaxValue=a.vvSizeMinMaxValue;this.vvSizeScaleStops=a.vvSizeScaleStops;this.vvSizeFieldStops=
  478. a.vvSizeFieldStops;this.vvSizeUnitValue=a.vvSizeUnitValue;this.vvColor=a.vvColor;this.vvRotation=a.vvRotation;this.vvOpacity=a.vvOpacity;this.visibility=a.visibility;this.pattern=a.pattern;this.heatmap=a.heatmap};return b}()})},"esri/views/2d/engine/webgl/util/serializationUtils":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.serializeList=function(b,a){if(null===a)b.writeInt32(0);else{b.writeInt32(a.length);for(var e=0;e<a.length;e++)a[e].serialize(b);
  479. return b}};g.deserializeList=function(b,a,e){for(var d=b.readInt32(),d=Array(d),c=0;c<d.length;c++)d[c]=a.deserialize(b,e);return d}})},"esri/views/2d/engine/webgl/shaders/fillShaderSnippets":function(){define(["require","exports","dojo/text!./fillShaders.xml","../../../../webgl/ShaderSnippets"],function(p,g,b,a){p=new a;a.parse(b,p);return p})},"esri/views/2d/engine/webgl/shaders/iconShaderSnippets":function(){define(["require","exports","dojo/text!./iconShaders.xml","../../../../webgl/ShaderSnippets"],
  480. function(p,g,b,a){p=new a;a.parse(b,p);return p})},"esri/views/2d/engine/webgl/shaders/lineShaderSnippets":function(){define(["require","exports","dojo/text!./lineShaders.xml","../../../../webgl/ShaderSnippets"],function(p,g,b,a){p=new a;a.parse(b,p);return p})},"esri/views/2d/engine/webgl/shaders/textShaderSnippets":function(){define(["require","exports","dojo/text!./textShaders.xml","../../../../webgl/ShaderSnippets"],function(p,g,b,a){p=new a;a.parse(b,p);return p})},"esri/views/webgl/ShaderVariations":function(){define(["require",
  481. "exports","./Program","./ShaderSourceVariator","./Util"],function(p,g,b,a,e){function d(a){return a.reduce(function(a,b,c){b&&(a|=1<<c);return a},0)}return function(){function c(a,b,c,d,e,r){"string"===typeof a?this._initParams(a,b,c,d,e,r):this._initObject({programNamePrefix:a.programNamePrefix,shaderSnippetPrefixes:a.shaderSnippetPrefixes,baseDefines:a.baseDefines,snippets:a.snippets,rctx:a.rctx,vertexAttribLocs:a.vertexAttribLocs})}c.prototype._initObject=function(a){this._initParams(a.programNamePrefix,
  482. a.shaderSnippetPrefixes,a.baseDefines,a.snippets,a.rctx,a.vertexAttribLocs)};c.prototype._initParams=function(b,c,d,e,n,r){this._defaultSnippets=e;this._defaultRctx=n;this._defaultVertexAttribLocs=r;this._programCache=new Map;this._variationInfo=new Map;this._shaderSourceVariator=new a(b,c,d)};c.prototype.addDefine=function(a,b,c,d){this._shaderSourceVariator.addDefine(a,b,c,d)};c.prototype.addBinaryShaderSnippetSuffix=function(a,b,c){this._shaderSourceVariator.addBinaryShaderSnippetSuffix(a,b,c)};
  483. c.prototype.addNaryShaderSnippetSuffix=function(a,b){this._shaderSourceVariator.addNaryShaderSnippetSuffix(a,b)};c.prototype.getProgram=function(a,c,l,h){c=c||this._defaultSnippets;l=l||this._defaultRctx;h=h||this._defaultVertexAttribLocs;if(!c)throw Error("No ShaderSnippets provided to getProgram nor to ShaderVariations constructor.");if(!l)throw Error("No RenderingContext provided to getProgram nor to ShaderVariations constructor.");if(!h)throw Error("No VertexAttributeLocations provided to getProgram nor to ShaderVariations constructor.");
  484. var f=d(a);if(this._programCache[f])return this._programCache[f];a=this._shaderSourceVariator.getShaderVariation(a);var k,m;k=a.shaderSnippetNames[0];m=c[k];e.assert(null!=m,"shader snippet '"+k+"' does not exist");k=a.shaderSnippetNames[1];c=c[k];e.assert(null!=c,"shader snippet '"+k+"' does not exist");l=new b(l,m,c,h,a.defines);return this._programCache[f]=l};c.prototype.getProgramByKey=function(a){if(this._programCache[a])return this._programCache[a];if(!this._variationInfo[a])return null;var c=
  485. this._variationInfo[a],d=this._defaultSnippets,h=this._defaultRctx,k=this._defaultVertexAttribLocs,r,m;r=c.shaderSnippetNames[0];m=d[r];e.assert(null!=m,"shader snippet '"+r+"' does not exist");r=c.shaderSnippetNames[1];d=d[r];e.assert(null!=d,"shader snippet '"+r+"' does not exist");c=new b(h,m,d,k,c.defines);return this._programCache[a]=c};c.prototype.getProgramInfo=function(a){var b=this._shaderSourceVariator.getShaderVariation(a);a=d(a);this._variationInfo[a]||(this._variationInfo[a]=b);return{name:b.programName,
  486. key:a}};return c}()})},"esri/views/webgl/ShaderSourceVariator":function(){define(["require","exports","dojo/_base/lang","./Util"],function(p,g,b,a){return function(){function e(b,c,e){var d;"string"===typeof b?d=b:(d=b.programNamePrefix,c=b.shaderSnippetPrefixes,e=b.baseDefines);a.assert(c,"you must specify shader snippet prefixes");a.assert(2===c.length,"you must specify shader snippet prefixes for vertex and fragment shaders");e&&0!==e.length||(e=[]);this.programNamePrefix=d;this.shaderSnippetPrefixes=
  487. c;this.baseDefines=e;this.variables=[];this.sealed=!1}e.prototype.addDefine=function(b,c,e,f){a.assert(!this.sealed,"you cannot add another variable after the first program has been generated");a.assert(b,"you must specify a program name suffix");this.variables.push({programNameSuffixes:["",b],shaderNameSuffixes:f||b,defineStr:c,affectsShaderTypes:e||[!0,!0]})};e.prototype.addBinaryShaderSnippetSuffix=function(b,c,e){a.assert(!this.sealed,"you cannot add another variable after the first program has been generated");
  488. a.assert(b,"you must specify a program name suffix");this.variables.push({programNameSuffixes:["",b],shaderSnippetSuffixes:["",c],affectsShaderTypes:e||[!0,!0]})};e.prototype.addNaryShaderSnippetSuffix=function(b,c){a.assert(!this.sealed,"you cannot add another variable after the first program has been generated");var d=b.map(function(b){a.assert(null!=b.value,"value must always be specified");return b.value});this.variables.push({values:d,programNameSuffixes:b.map(function(a,b){return null!=a.programNameSuffix?
  489. a.programNameSuffix:d[b]}),shaderSnippetSuffixes:b.map(function(a,b){return null!=a.shaderSnippetSuffix?a.shaderSnippetSuffix:d[b]}),affectsShaderTypes:c||[!0,!0]})};e.prototype.getShaderVariation=function(d){a.assert(d.length===this.variables.length,"you must specify a value for each variable");for(var c=this.programNamePrefix,e=b.clone(this.shaderSnippetPrefixes),f=b.clone(this.shaderSnippetPrefixes),l=b.clone(this.baseDefines),h=0;h<this.variables.length;h++){var n=this.variables[h],r=d[h],m=void 0;
  490. n.values?(m=n.values.indexOf(r),a.assert(0<=m,"invalid value "+r+" for variable "+h)):m=r?1:0;c+=n.programNameSuffixes[m];for(r=0;2>r;r++)n.affectsShaderTypes[r]&&(n.shaderSnippetSuffixes&&(e[r]+=n.shaderSnippetSuffixes[m],f[r]+=n.shaderSnippetSuffixes[m]),n.defineStr&&m&&(l.push(n.defineStr),f[r]+=n.shaderNameSuffixes))}return{programName:c,shaderSnippetNames:e,shaderNames:f,defines:l}};return e}()})},"esri/views/webgl/Util":function(){define(["require","exports","../../core/tsSupport/assignHelper",
  491. "../../core/Error"],function(p,g,b,a){return function(){function e(){}e.vertexCount=function(a,b){return a.vertexBuffers[b].size/e.getStride(a.layout[b])};e.getStride=function(a){return a[0].stride};e.getBytesPerElement=function(a){switch(a){case 5126:return 4;case 5124:return 4;case 5125:return 4;case 5122:return 2;case 5123:return 2;case 5120:return 1;case 5121:return 1;default:throw Error("Unknown data type");}};e.addDescriptor=function(a,b,k,f,l,h){var c=e.getBytesPerElement(f);if(0<a.length){var d=
  492. a[0].stride,m=d+c*k;a.forEach(function(a){return a.stride=m});a.push({name:b,count:k,type:f,offset:d,stride:m,normalized:l,divisor:h})}else a.push({name:b,count:k,type:f,offset:0,stride:c*k,normalized:l,divisor:h})};e.assertCompatibleVertexAttributeLocations=function(a,b){(a=a.locations===b.locations)||console.error("VertexAttributeLocations are incompatible");return a};e.hasAttribute=function(a,b){for(var c=0;c<a.length;c++)if(a[c].name===b)return!0;return!1};e.findAttribute=function(a,b){for(var c=
  493. 0;c<a.length;c++)if(a[c].name===b)return a[c];return null};e.copyFramebufferToTexture=function(a,b,e,f,l){void 0===l&&(l=0);var c=a.getBoundFramebufferObject(),d=a.getBoundTexture(0);a.bindFramebuffer(b);a.bindTexture(e,0);a.gl.copyTexImage2D(a.gl.TEXTURE_2D,l,e.descriptor.pixelFormat,f[0],f[1],f[2],f[3],0);a.gl.flush();a.bindFramebuffer(c);a.bindTexture(d,0)};e.assert=function(b,c){if(!b)throw new a(c);};e.setBaseInstanceOffset=function(a,c){var d={},e;for(e in a)d[e]=a[e].map(function(a){return a.divisor?
  494. b({},a,{baseInstance:c}):a});return d};return e}()})},"esri/views/2d/engine/webgl/Utils":function(){define("require exports ../../../../core/screenUtils ./color ./enums ./SymbolProperties".split(" "),function(p,g,b,a,e,d){function c(a){return a.map(function(a){return a.name})}function k(a){for(var b={},c=0;c<a.length;c++){var d=a[c];b[d.name]=d.strideInBytes}return b}function f(a){switch(a){case "esriSMS":return"simple-marker";case "esriPMS":return"picture-marker";case "esriSLS":return"simple-line";
  495. case "esriPLS":return"picture-line";case "esriSFS":return"simple-fill";case "esriPFS":return"picture-fill";case "esriTS":return"text"}return a}function l(a){if(a=f(a.type)){switch(a){case "simple-marker":case "picture-marker":return!0;case "CIMPointSymbol":return!0}return!1}}function h(a){if(a=f(a.type)){switch(a){case "simple-fill":case "picture-fill":return!0;case "CIMPolygonSymbol":return!0}return!1}}function n(a){if(a=f(a.type)){switch(a){case "simple-line":case "picture-line":return!0;case "CIMLineSymbol":return!0}return!1}}
  496. function r(a){if(a=f(a.type)){switch(a){case "text":return!0;case "CIMTextSymbol":return!0}return!1}}function m(a){return a&&a.length||0}function u(a){return"string"===typeof a}Object.defineProperty(g,"__esModule",{value:!0});g.C_HITTEST_SEARCH_SIZE=4;g.C_VBO_GEOMETRY="geometry";g.C_VBO_PERINSTANCE="per_instance";g.C_VBO_PERINSTANCE_VV="per_instance_vv";g.C_VBO_VISIBILITY="visibility";g.C_ICON_VERTEX_DEF=[{name:g.C_VBO_GEOMETRY,strideInBytes:24,divisor:0}];g.C_ICON_VERTEX_DEF_VV=[{name:g.C_VBO_GEOMETRY,
  497. strideInBytes:40,divisor:0}];g.C_ICON_HEATMAP=[{name:g.C_VBO_GEOMETRY,strideInBytes:28,divisor:0}];g.C_FILL_VERTEX_DEF=[{name:g.C_VBO_GEOMETRY,strideInBytes:24,divisor:0}];g.C_FILL_VERTEX_DEF_VV=[{name:g.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}];g.C_LINE_VERTEX_DEF=[{name:g.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}];g.C_LINE_VERTEX_DEF_VV=[{name:g.C_VBO_GEOMETRY,strideInBytes:44,divisor:0}];g.C_TEXT_VERTEX_DEF=[{name:g.C_VBO_GEOMETRY,strideInBytes:20,divisor:0},{name:g.C_VBO_VISIBILITY,strideInBytes:1,
  498. divisor:0}];g.C_TEXT_VERTEX_DEF_VV=[{name:g.C_VBO_GEOMETRY,strideInBytes:36,divisor:0},{name:g.C_VBO_VISIBILITY,strideInBytes:1,divisor:0}];g.C_ICON_VERTEX_NAMES=c(g.C_ICON_VERTEX_DEF);g.C_ICON_VERTEX_NAMES_VV=c(g.C_ICON_VERTEX_DEF_VV);g.C_FILL_VERTEX_NAMES=c(g.C_FILL_VERTEX_DEF);g.C_FILL_VERTEX_NAMES_VV=c(g.C_FILL_VERTEX_DEF_VV);g.C_LINE_VERTEX_NAMES=c(g.C_LINE_VERTEX_DEF);g.C_LINE_VERTEX_NAMES_VV=c(g.C_LINE_VERTEX_DEF_VV);g.C_TEXT_VERTEX_NAMES=c(g.C_TEXT_VERTEX_DEF);g.C_TEXT_VERTEX_NAMES_VV=c(g.C_TEXT_VERTEX_DEF_VV);
  499. g.C_ICON_STRIDE_SPEC=k(g.C_ICON_VERTEX_DEF);g.C_ICON_STRIDE_SPEC_VV=k(g.C_ICON_VERTEX_DEF_VV);g.C_ICON_STRIDE_SPEC_HEATMAP=k(g.C_ICON_HEATMAP);g.C_FILL_STRIDE_SPEC=k(g.C_FILL_VERTEX_DEF);g.C_FILL_STRIDE_SPEC_VV=k(g.C_FILL_VERTEX_DEF_VV);g.C_LINE_STRIDE_SPEC=k(g.C_LINE_VERTEX_DEF);g.C_LINE_STRIDE_SPEC_VV=k(g.C_LINE_VERTEX_DEF_VV);g.C_TEXT_STRIDE_SPEC=k(g.C_TEXT_VERTEX_DEF);g.C_TEXT_STRIDE_SPEC_VV=k(g.C_TEXT_VERTEX_DEF_VV);g.getStrides=function(a,b,c){void 0===c&&(c=!1);switch(a){case e.WGLGeometryType.MARKER:return b?
  500. g.C_ICON_STRIDE_SPEC_VV:c?g.C_ICON_STRIDE_SPEC_HEATMAP:g.C_ICON_STRIDE_SPEC;case e.WGLGeometryType.FILL:return b?g.C_FILL_STRIDE_SPEC_VV:g.C_FILL_STRIDE_SPEC;case e.WGLGeometryType.LINE:return b?g.C_LINE_STRIDE_SPEC_VV:g.C_LINE_STRIDE_SPEC;case e.WGLGeometryType.TEXT:return b?g.C_TEXT_STRIDE_SPEC_VV:g.C_TEXT_STRIDE_SPEC}return null};g.getSymbolGeometryType=function(a){return l(a)?e.WGLGeometryType.MARKER:n(a)?e.WGLGeometryType.LINE:h(a)?e.WGLGeometryType.FILL:r(a)?e.WGLGeometryType.TEXT:e.WGLGeometryType.UNKNOWN};
  501. g.normalizeSymbolType=f;g.isMarkerSymbol=l;g.isFillSymbol=h;g.isLineSymbol=n;g.isPictureSymbol=function(a){if(a=f(a.type))switch(a){case "picture-marker":case "picture-line":case "picture-fill":return!0}return!1};g.isTextSymbol=r;g.getTextProperties=function(c){return d.TextProperties.pool.acquire(c.color?a.copyAndPremultiply(c.color):[255,255,255,255],c.haloColor?a.copyAndPremultiply(c.haloColor):[255,255,255,255],b.pt2px(c.haloSize),b.pt2px(c.font.size),c.angle*Math.PI/180,c.xoffset/c.font.size,
  502. c.yoffset/c.font.size,"left"===c.horizontalAlignment?0:"right"===c.horizontalAlignment?1:.5,"top"===c.verticalAlignment?0:"bottom"===c.verticalAlignment?1:.5)};g.isSameUniformValue=function(a,b){return!1};g.isSameMaterialInfo=function(a,b){if(a.materialKey!==b.materialKey||m(a.texBindingInfo)!==m(b.texBindingInfo)||m(a.materialParams)!==m(b.materialParams))return!1;for(var c=a.texBindingInfo.length,d=0;d<c;++d){var e=a.texBindingInfo[d],f=b.texBindingInfo[d];if(e.unit!==f.unit||e.pageId!==f.pageId||
  503. e.semantic!==f.semantic)return!1}a=a.materialParams.length;for(d=0;d<a;)return!1;return!0};g.serializeString=function(a,b,c){for(var d=0,e=a.length,f=0;f<e;++f)b&&(b[c+d]=a.charCodeAt(f)),++d;b&&(b[c+d]=0);++d;return d};g.deserializeString=function(a,b,c){var d=0;a.s="";for(var e=!0;e;){var f=b[c+d];++d;0!==f?a.s+=String.fromCharCode(f):e=!1}return d};g.isDefined=function(a){return null!==a&&void 0!==a};g.isNumber=function(a){return"number"===typeof a};g.isString=u;g.isStringOrNull=function(a){return null==
  504. a||u(a)};g.lerp=function(a,b,c){return a+(b-a)*c};p=function(){function a(){this._arr=[];this._addGeometryType=this._addGeometryType.bind(this)}a.prototype._addGeometryType=function(a,b){this._arr.push(b)};a.prototype.getKeys=function(a){this._arr.length=0;a.forEach(this._addGeometryType);return this._arr};return a}();g.KeysGetter=p;p=function(){function a(){this._arr=[];this._addGeometryType=this._addGeometryType.bind(this)}a.prototype._addGeometryType=function(a,b){this._arr.push(a)};a.prototype.getValues=
  505. function(a){this._arr.length=0;a.forEach(this._addGeometryType);return this._arr};return a}();g.ValuesGetter=p})},"esri/views/2d/engine/webgl/color":function(){define(["require","exports","./number"],function(p,g,b){function a(a,b){Array.isArray(b)?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):(a[0]=b.r,a[1]=b.g,a[2]=b.b,a[3]=b.a);return a}function e(a,b,d){void 0===b&&(b=0);void 0===d&&(d=!1);var c=a[b+3];a[b+0]*=c;a[b+1]*=c;a[b+2]*=c;d||(a[b+3]*=255);return a}Object.defineProperty(g,"__esModule",{value:!0});
  506. g.white=[255,255,255,1];var d=[0,0,0,0];g.premultiplyAlpha=e;g.copyAndPremultiply=function(b){return e(a([],b))};g.premultiplyAlphaUint32=function(c){e(a(d,c));return b.i8888to32(d[0],d[1],d[2],d[3])}})},"esri/views/2d/engine/webgl/number":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});var b=new Float32Array(1),a=new Uint32Array(b.buffer);g.nextHighestPowerOfTwo=function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a};g.toUint32=
  507. function(e){b[0]=e;return a[0]};g.i1616to32=function(a,b){return 65535&a|b<<16};g.i8888to32=function(a,b,c,k){return a&255|(b&255)<<8|(c&255)<<16|k<<24};g.i8816to32=function(a,b,c){return a&255|(b&255)<<8|c<<16};g.numTo32=function(a){return a|0}})},"esri/views/2d/engine/webgl/SymbolProperties":function(){define(["require","exports","../../../../core/ObjectPool"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function a(){this.color=[0,0,0,0];this.haloColor=[0,0,0,0];
  508. this.haloSize=0;this.size=12;this.vAnchor=this.hAnchor=this.offsetY=this.offsetX=this.angle=0}a.prototype.acquire=function(a,b,c,k,f,l,h,n,r){this.color=a;this.haloColor=b;this.haloSize=c;this.size=k;this.angle=f;this.offsetX=l;this.offsetY=h;this.hAnchor=n;this.vAnchor=r};a.prototype.release=function(){this.color[0]=this.color[1]=this.color[2]=this.color[3]=0;this.vAnchor=this.hAnchor=this.offsetY=this.offsetX=this.angle=this.size=this.haloSize=this.haloColor[0]=this.haloColor[1]=this.haloColor[2]=
  509. this.haloColor[3]=0};a.pool=new b(a);return a}();g.TextProperties=p})},"esri/views/2d/engine/webgl/brushes/WGLBrushInfo":function(){define("require exports ../../../../../core/tsSupport/extendsHelper ../GeometryUtils ./WGLBrush ../shaders/glShaderSnippets ../../../../webgl/BufferObject ../../../../webgl/Program ../../../../webgl/Texture ../../../../webgl/VertexArrayObject".split(" "),function(p,g,b,a,e,d,c,k,f,l){Object.defineProperty(g,"__esModule",{value:!0});p=function(e){function h(){var a=e.call(this)||
  510. this;a._initialized=!1;a._maxWidth=0;a._color=new Float32Array([1,0,0,1]);return a}b(h,e);h.prototype.draw=function(a,b){a=a.context;this._initialized||this._initialize(a);a.bindVAO(this._outlineVertexArrayObject);a.bindProgram(this._outlineProgram);this._outlineProgram.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform);this._outlineProgram.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord);this._outlineProgram.setUniform1f("u_coord_range",512);this._outlineProgram.setUniform1f("u_depth",
  511. 0);this._outlineProgram.setUniform4fv("u_color",this._color);a.setLineWidth(2);a.drawArrays(3,0,4);a.bindVAO();var c=this._getTexture(a,b);c&&(a.bindVAO(this._tileInfoVertexArrayObject),a.bindProgram(this._tileInfoProgram),a.bindTexture(c,0),this._tileInfoProgram.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform),this._tileInfoProgram.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord),this._tileInfoProgram.setUniform1f("u_depth",0),this._tileInfoProgram.setUniform1f("u_coord_ratio",
  512. 1),this._tileInfoProgram.setUniform2f("u_delta",8,8),this._tileInfoProgram.setUniform2f("u_dimensions",c.descriptor.width,c.descriptor.height),a.drawArrays(5,0,4),a.bindVAO())};h.prototype._initialize=function(a){if(this._initialized)return!0;var b={a_pos:0},e=new k(a,d.backgroundVS,d.backgroundFS,b),f=new k(a,d.tileInfoVS,d.tileInfoFS,b),h={geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},n=new Int8Array([0,0,1,0,1,1,0,1]),n=c.createVertex(a,35044,n),n=new l(a,
  513. b,h,{geometry:n}),r=new Int8Array([0,0,1,0,0,1,1,1]),r=c.createVertex(a,35044,r);a=new l(a,b,h,{geometry:r});this._outlineProgram=e;this._tileInfoProgram=f;this._outlineVertexArrayObject=n;this._tileInfoVertexArrayObject=a;return this._initialized=!0};h.prototype._getTexture=function(b,c){if(c.texture)return c.texture;this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id","canvas2d"),this._canvas.setAttribute("width","256"),this._canvas.setAttribute("height","32"),
  514. this._canvas.setAttribute("style","display:none"));var d=c.key.id,e=this._canvas.getContext("2d");e.font="24px sans-serif";e.textAlign="left";e.textBaseline="middle";var h=e.measureText(d),h=Math.pow(2,Math.ceil(a.log2(h.width+2)));h>this._maxWidth&&(this._maxWidth=h);e.clearRect(0,0,this._maxWidth,32);e.fillStyle="blue";e.fillText(d,0,16);c.texture=new f(b,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728},this._canvas);return c.texture};return h}(e.default);g.default=p})},"esri/views/2d/engine/webgl/brushes/WGLBrush":function(){define(["require",
  515. "exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});p=function(){return function(){}}();g.default=p})},"esri/views/webgl/Texture":function(){define(["require","exports"],function(p,g){return function(){function b(a,e,d){this._glName=this._context=null;this._id=-1;this._desc=void 0;this._wrapModeDirty=this._samplingModeDirty=!1;this._boundToUnits=new Set;this._context=a;this._desc={pixelFormat:e.pixelFormat,internalFormat:e.internalFormat,dataType:e.dataType,target:e.target?e.target:
  516. 3553,samplingMode:e.samplingMode?e.samplingMode:9729,wrapMode:e.wrapMode?e.wrapMode:10497,maxAnisotropy:e.maxAnisotropy,flipped:void 0!==e.flipped?e.flipped:!1,hasMipmap:void 0!==e.hasMipmap?e.hasMipmap:!1,level:void 0!==e.level?e.level:0,unpackAlignment:e.unpackAlignment?e.unpackAlignment:4,width:e.width,height:e.height,preMultiplyAlpha:void 0!==e.preMultiplyAlpha?e.preMultiplyAlpha:!1};this._id=++b._nextId;this.setData(d)}Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!0,
  517. configurable:!0});Object.defineProperty(b.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});b.prototype.dispose=function(){var a=this;if(this._context){if(this._glName){var b=this._context.gl;this._boundToUnits.forEach(function(b){a._context.bindTexture(null,b)});b.deleteTexture(this._glName);this._glName=null}this._context=null}};b.prototype.resize=
  518. function(a,b){var d=this._desc;if(d.width!==a||d.height!==b)d.width=a,d.height=b,this.setData(null)};b.prototype.setData=function(a){var e=this._context.gl;this._glName||(this._glName=e.createTexture());void 0===a&&(a=null);null===a&&(this._desc.width=this._desc.width||4,this._desc.height=this._desc.height||4);var d=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var c=this._desc;b._validateTexture(c);e.pixelStorei(e.UNPACK_ALIGNMENT,c.unpackAlignment);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,
  519. c.flipped?1:0);e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c.preMultiplyAlpha);if(a instanceof ImageData||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)c.width&&c.height&&console.assert(a.width===c.width&&a.height===c.height),e.texImage2D(e.TEXTURE_2D,c.level,c.internalFormat?c.internalFormat:c.pixelFormat,c.pixelFormat,c.dataType,a),void 0===this._desc.width&&(this._desc.width=a.width),void 0===this._desc.height&&(this._desc.height=a.height);else{null!=
  520. c.width&&null!=c.height||console.error("Width and height must be specified!");var k=c.internalFormat?c.internalFormat:c.pixelFormat,f=c.pixelFormat;e.DEPTH24_STENCIL8&&k===e.DEPTH_STENCIL&&(k=e.DEPTH24_STENCIL8);e.texImage2D(e.TEXTURE_2D,c.level,k,c.width,c.height,0,f,c.dataType,a)}c.hasMipmap&&this.generateMipmap();b._applySamplingMode(e,this._desc);b._applyWrapMode(e,this._desc);b._applyAnisotropicFilteringParameters(this._context,this._desc);this._context.bindTexture(d,0)};b.prototype.updateData=
  521. function(a,b,d,c,k,f){f||console.error("An attempt to use uninitialized data!");this._glName||console.error("An attempt to update uninitialized texture!");var e=this._context.gl,h=this._desc,n=this._context.getBoundTexture(0);this._context.bindTexture(this,0);(0>b||0>d||c>h.width||k>h.height||b+c>h.width||d+k>h.height)&&console.error("An attempt to update out of bounds of the texture!");f instanceof ImageData||f instanceof HTMLImageElement||f instanceof HTMLCanvasElement||f instanceof HTMLVideoElement?
  522. (console.assert(f.width===c&&f.height===k),e.texSubImage2D(e.TEXTURE_2D,a,b,d,h.pixelFormat,h.dataType,f)):e.texSubImage2D(e.TEXTURE_2D,a,b,d,c,k,h.pixelFormat,h.dataType,f);this._context.bindTexture(n,0)};b.prototype.generateMipmap=function(){var a=this._desc;a.hasMipmap||(a.hasMipmap=!0,b._validateTexture(a));9729===a.samplingMode?(this._samplingModeDirty=!0,a.samplingMode=9985):9728===a.samplingMode&&(this._samplingModeDirty=!0,a.samplingMode=9984);a=this._context.getBoundTexture(0);this._context.bindTexture(this,
  523. 0);var e=this._context.gl;e.generateMipmap(e.TEXTURE_2D);this._context.bindTexture(a,0)};b.prototype.setSamplingMode=function(a){a!==this._desc.samplingMode&&(this._desc.samplingMode=a,b._validateTexture(this._desc),this._samplingModeDirty=!0)};b.prototype.setWrapMode=function(a){a!==this._desc.wrapMode&&(this._desc.wrapMode=a,b._validateTexture(this._desc),this._wrapModeDirty=!0)};b.prototype.applyChanges=function(){var a=this._context.gl,e=this._desc;this._samplingModeDirty&&(b._applySamplingMode(a,
  524. e),this._samplingModeDirty=!1);this._wrapModeDirty&&(b._applyWrapMode(a,e),this._wrapModeDirty=!1)};b.prototype.setBoundToUnit=function(a,b){b?this._boundToUnits.add(a):this._boundToUnits.delete(a)};b._isPowerOfTwo=function(a){return 0===(a&a-1)};b._validateTexture=function(a){(0>a.width||0>a.height)&&console.error("Negative dimension parameters are not allowed!");b._isPowerOfTwo(a.width)&&b._isPowerOfTwo(a.height)||(33071!==a.wrapMode&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),
  525. a.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))};b._applySamplingMode=function(a,b){var d=b.samplingMode;if(9985===d||9987===d)d=9729;else if(9984===d||9986===d)d=9728;a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,d);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,b.samplingMode)};b._applyWrapMode=function(a,b){a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,b.wrapMode);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,b.wrapMode)};b._applyAnisotropicFilteringParameters=
  526. function(a,b){if(null!=b.maxAnisotropy){var d=a.capabilities.textureFilterAnisotropic;d&&(a=a.gl,a.texParameterf(a.TEXTURE_2D,d.TEXTURE_MAX_ANISOTROPY,b.maxAnisotropy))}};b._nextId=0;return b}()})},"esri/views/2d/engine/webgl/brushes/WGLBrushStencil":function(){define("require exports ../../../../../core/tsSupport/extendsHelper ../../../../../core/libs/gl-matrix/vec4 ./WGLBrush ../shaders/glShaderSnippets ../../../../webgl/BufferObject ../../../../webgl/Program ../../../../webgl/VertexArrayObject".split(" "),
  527. function(p,g,b,a,e,d,c,k,f){Object.defineProperty(g,"__esModule",{value:!0});p=function(e){function h(){var b=e.call(this)||this;b._color=a.create();b._initialized=!1;b._color.set([1,0,0,1]);return b}b(h,e);h.prototype.dispose=function(){this._solidProgram&&(this._solidProgram.dispose(),this._solidProgram=null);this._solidVertexArrayObject&&(this._solidVertexArrayObject.dispose(),this._solidVertexArrayObject=null)};h.prototype.draw=function(a,b){a=a.context;this._initialized||this._initialize(a);
  528. a.setStencilFunctionSeparate(1032,519,b.stencilRef,255);a.bindVAO(this._solidVertexArrayObject);a.bindProgram(this._solidProgram);this._solidProgram.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform);this._solidProgram.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord);this._solidProgram.setUniform1f("u_coord_range",512);this._solidProgram.setUniform1f("u_depth",0);this._solidProgram.setUniform4fv("u_color",this._color);a.drawArrays(5,0,4);a.bindVAO()};h.prototype._initialize=
  529. function(a){if(this._initialized)return!0;var b={a_pos:0},e=new k(a,d.backgroundVS,d.backgroundFS,b);if(!e)return!1;var h=new Int8Array([0,0,1,0,0,1,1,1]),h=c.createVertex(a,35044,h);a=new f(a,b,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},{geometry:h});this._solidProgram=e;this._solidVertexArrayObject=a;return this._initialized=!0};return h}(e.default);g.default=p})},"esri/core/libs/gl-matrix/vec4":function(){define(["./common"],function(p){var g={create:function(){var b=
  530. new p.ARRAY_TYPE(4);b[0]=0;b[1]=0;b[2]=0;b[3]=0;return b},clone:function(b){var a=new p.ARRAY_TYPE(4);a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];return a},fromValues:function(b,a,e,d){var c=new p.ARRAY_TYPE(4);c[0]=b;c[1]=a;c[2]=e;c[3]=d;return c},copy:function(b,a){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},set:function(b,a,e,d,c){b[0]=a;b[1]=e;b[2]=d;b[3]=c;return b},add:function(b,a,e){b[0]=a[0]+e[0];b[1]=a[1]+e[1];b[2]=a[2]+e[2];b[3]=a[3]+e[3];return b},subtract:function(b,a,e){b[0]=a[0]-
  531. e[0];b[1]=a[1]-e[1];b[2]=a[2]-e[2];b[3]=a[3]-e[3];return b}};g.sub=g.subtract;g.multiply=function(b,a,e){b[0]=a[0]*e[0];b[1]=a[1]*e[1];b[2]=a[2]*e[2];b[3]=a[3]*e[3];return b};g.mul=g.multiply;g.divide=function(b,a,e){b[0]=a[0]/e[0];b[1]=a[1]/e[1];b[2]=a[2]/e[2];b[3]=a[3]/e[3];return b};g.div=g.divide;g.ceil=function(b,a){b[0]=Math.ceil(a[0]);b[1]=Math.ceil(a[1]);b[2]=Math.ceil(a[2]);b[3]=Math.ceil(a[3]);return b};g.floor=function(b,a){b[0]=Math.floor(a[0]);b[1]=Math.floor(a[1]);b[2]=Math.floor(a[2]);
  532. b[3]=Math.floor(a[3]);return b};g.min=function(b,a,e){b[0]=Math.min(a[0],e[0]);b[1]=Math.min(a[1],e[1]);b[2]=Math.min(a[2],e[2]);b[3]=Math.min(a[3],e[3]);return b};g.max=function(b,a,e){b[0]=Math.max(a[0],e[0]);b[1]=Math.max(a[1],e[1]);b[2]=Math.max(a[2],e[2]);b[3]=Math.max(a[3],e[3]);return b};g.round=function(b,a){b[0]=Math.round(a[0]);b[1]=Math.round(a[1]);b[2]=Math.round(a[2]);b[3]=Math.round(a[3]);return b};g.scale=function(b,a,e){b[0]=a[0]*e;b[1]=a[1]*e;b[2]=a[2]*e;b[3]=a[3]*e;return b};g.scaleAndAdd=
  533. function(b,a,e,d){b[0]=a[0]+e[0]*d;b[1]=a[1]+e[1]*d;b[2]=a[2]+e[2]*d;b[3]=a[3]+e[3]*d;return b};g.distance=function(b,a){var e=a[0]-b[0],d=a[1]-b[1],c=a[2]-b[2];b=a[3]-b[3];return Math.sqrt(e*e+d*d+c*c+b*b)};g.dist=g.distance;g.squaredDistance=function(b,a){var e=a[0]-b[0],d=a[1]-b[1],c=a[2]-b[2];b=a[3]-b[3];return e*e+d*d+c*c+b*b};g.sqrDist=g.squaredDistance;g.length=function(b){var a=b[0],e=b[1],d=b[2];b=b[3];return Math.sqrt(a*a+e*e+d*d+b*b)};g.len=g.length;g.squaredLength=function(b){var a=b[0],
  534. e=b[1],d=b[2];b=b[3];return a*a+e*e+d*d+b*b};g.sqrLen=g.squaredLength;g.negate=function(b,a){b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b};g.inverse=function(b,a){b[0]=1/a[0];b[1]=1/a[1];b[2]=1/a[2];b[3]=1/a[3];return b};g.normalize=function(b,a){var e=a[0],d=a[1],c=a[2];a=a[3];var k=e*e+d*d+c*c+a*a;0<k&&(k=1/Math.sqrt(k),b[0]=e*k,b[1]=d*k,b[2]=c*k,b[3]=a*k);return b};g.dot=function(b,a){return b[0]*a[0]+b[1]*a[1]+b[2]*a[2]+b[3]*a[3]};g.lerp=function(b,a,e,d){var c=a[0],k=a[1],f=a[2];a=a[3];
  535. b[0]=c+d*(e[0]-c);b[1]=k+d*(e[1]-k);b[2]=f+d*(e[2]-f);b[3]=a+d*(e[3]-a);return b};g.random=function(b,a){a=a||1;b[0]=p.RANDOM();b[1]=p.RANDOM();b[2]=p.RANDOM();b[3]=p.RANDOM();g.normalize(b,b);g.scale(b,b,a);return b};g.transformMat4=function(b,a,e){var d=a[0],c=a[1],k=a[2];a=a[3];b[0]=e[0]*d+e[4]*c+e[8]*k+e[12]*a;b[1]=e[1]*d+e[5]*c+e[9]*k+e[13]*a;b[2]=e[2]*d+e[6]*c+e[10]*k+e[14]*a;b[3]=e[3]*d+e[7]*c+e[11]*k+e[15]*a;return b};g.transformQuat=function(b,a,e){var d=a[0],c=a[1],k=a[2],f=e[0],l=e[1],
  536. h=e[2];e=e[3];var n=e*d+l*k-h*c,r=e*c+h*d-f*k,m=e*k+f*c-l*d,d=-f*d-l*c-h*k;b[0]=n*e+d*-f+r*-h-m*-l;b[1]=r*e+d*-l+m*-f-n*-h;b[2]=m*e+d*-h+n*-l-r*-f;b[3]=a[3];return b};g.forEach=function(){var b=g.create();return function(a,e,d,c,k,f){e||(e=4);d||(d=0);for(c=c?Math.min(c*e+d,a.length):a.length;d<c;d+=e)b[0]=a[d],b[1]=a[d+1],b[2]=a[d+2],b[3]=a[d+3],k(b,b,f),a[d]=b[0],a[d+1]=b[1],a[d+2]=b[2],a[d+3]=b[3];return a}}();g.str=function(b){return"vec4("+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+")"};g.exactEquals=
  537. function(b,a){return b[0]===a[0]&&b[1]===a[1]&&b[2]===a[2]&&b[3]===a[3]};g.equals=function(b,a){var e=b[0],d=b[1],c=b[2];b=b[3];var k=a[0],f=a[1],l=a[2];a=a[3];return Math.abs(e-k)<=p.EPSILON*Math.max(1,Math.abs(e),Math.abs(k))&&Math.abs(d-f)<=p.EPSILON*Math.max(1,Math.abs(d),Math.abs(f))&&Math.abs(c-l)<=p.EPSILON*Math.max(1,Math.abs(c),Math.abs(l))&&Math.abs(b-a)<=p.EPSILON*Math.max(1,Math.abs(b),Math.abs(a))};return g})},"esri/views/2d/engine/webgl/brushes/WGLGeometryBrushFill":function(){define("require exports ../../../../../core/tsSupport/extendsHelper ../enums ../Utils ./WGLGeometryBrush ../../../../webgl/VertexArrayObject".split(" "),
  538. function(p,g,b,a,e,d,c){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a._isInitialized=!1;a._fillAttributeLocations={a_pos:0,a_id:1,a_color:2,a_tlbr:3,a_aux:4};a._fillAttributeLocationsVV={a_pos:0,a_id:1,a_color:2,a_tlbr:3,a_aux:4,a_vv:5};a._spritesTextureSize=new Float32Array(2);return a}b(f,d);f.prototype.getGeometryType=function(){return a.WGLGeometryType.FILL};f.prototype.drawGeometry=function(a,b,c,d){d=a.context;var e=
  539. a.painter,f=a.rendererInfo,h=a.requiredLevel,k=a.stationary,l=c.indexCount,n=c.indexFrom;this._initialize();var r=c.materialInfo.materialKeyInfo,g=r.vvColor||r.vvOpacity,p=a.painter.materialManager.getProgram(c.materialInfo.materialKey,a.drawPhase,g?this._fillAttributeLocationsVV:this._fillAttributeLocations);if(p){d.bindProgram(p);g=this._getVAO(d,b,g);d.bindVAO(g);if(0<c.materialInfo.texBindingInfo.length){c=c.materialInfo.texBindingInfo[0];var g=c.pageId,y=a.painter.textureManager.sprites;this._spritesTextureSize[0]=
  540. y.getWidth(g);this._spritesTextureSize[1]=y.getHeight(g);p.setUniform1f("u_zoomFactor",1/Math.pow(2,h-b.key.level)/a.pixelRatio);e.textureManager.bindSpritePage(d,g,c.unit,k?9728:9729);p.setUniform1i(c.semantic,c.unit);p.setUniform2fv("u_mosaicSize",this._spritesTextureSize)}p.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform);p.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord);p.setUniform1f("u_opacity",1);r.vvColor&&(p.setUniform1fv("u_vvColorValues",f.vvColorValues),
  541. p.setUniform4fv("u_vvColors",f.vvColors));r.vvOpacity&&(p.setUniform1fv("u_vvOpacityValues",f.vvOpacityValues),p.setUniform1fv("u_vvOpacities",f.vvOpacities));d.drawElements(4,l,5125,4*n);d.bindVAO(null)}};f.prototype._initialize=function(){if(this._isInitialized)return!0;this._fillVertexAttributeLayout={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:24,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:24,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,
  542. offset:8,stride:24,normalized:!0,divisor:0},{name:"a_tlbr",count:4,type:5123,offset:12,stride:24,normalized:!1,divisor:0},{name:"a_aux",count:4,type:5121,offset:20,stride:24,normalized:!1,divisor:0}]};this._fillVertexAttributeLayoutVV={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:32,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:32,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:32,normalized:!0,divisor:0},{name:"a_tlbr",count:4,type:5123,
  543. offset:12,stride:32,normalized:!1,divisor:0},{name:"a_aux",count:4,type:5121,offset:20,stride:32,normalized:!1,divisor:0},{name:"a_vv",count:2,type:5126,offset:24,stride:32,normalized:!1,divisor:0}]};this._isInitialized=!0};f.prototype._getVAO=function(a,b,d){if(b.fillGeometry.vao)return b.fillGeometry.vao;var f=b.fillGeometry.vertexBufferMap[e.C_VBO_GEOMETRY],h=b.fillGeometry.indexBuffer;if(!f||!h)return null;b.fillGeometry.vao=d?new c(a,this._fillAttributeLocationsVV,this._fillVertexAttributeLayoutVV,
  544. {geometry:f},h):new c(a,this._fillAttributeLocations,this._fillVertexAttributeLayout,{geometry:f},h);return b.fillGeometry.vao};return f}(d.default);g.default=p})},"esri/views/2d/engine/webgl/brushes/WGLGeometryBrush":function(){define(["require","exports","../../../../../core/tsSupport/extendsHelper","./WGLBrush","../util/iterator"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}b(c,a);c.prototype.draw=
  545. function(a,b){var c=this;if(b.canDisplay){var d=this.getGeometryType(),f=b.getDisplayList(a.drawPhase),k=b.getGeometry(d);k&&e.forEachIter(f.ofType(d),function(d){return c.drawGeometry(a,b,d,k)})}};return c}(a.default);g.default=p})},"esri/views/2d/engine/webgl/util/iterator":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.forEachIter=function(b,a){for(;;){var e=b.next();if(e.done)break;a(e.value)}}})},"esri/views/2d/engine/webgl/brushes/WGLGeometryBrushLine":function(){define("require exports ../../../../../core/tsSupport/extendsHelper ../enums ../Utils ./WGLGeometryBrush ../../../../webgl/VertexArrayObject".split(" "),
  546. function(p,g,b,a,e,d,c){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a._lineAttributeLocations={a_pos:0,a_id:1,a_color:2,a_offsetAndNormal:3,a_accumulatedDistanceAndHalfWidth:4,a_tlbr:5,a_segmentDirection:6};a._lineAttributeLocationsVV={a_pos:0,a_id:1,a_color:2,a_offsetAndNormal:3,a_accumulatedDistanceAndHalfWidth:4,a_tlbr:5,a_segmentDirection:6,a_vv:7};a._lineVertexAttributeLayout={geometry:[{name:"a_pos",count:2,type:5122,
  547. offset:0,stride:32,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:32,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:32,normalized:!0,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:12,stride:32,normalized:!1,divisor:0},{name:"a_accumulatedDistanceAndHalfWidth",count:2,type:5123,offset:16,stride:32,normalized:!1,divisor:0},{name:"a_tlbr",count:4,type:5123,offset:20,stride:32,normalized:!1,divisor:0},{name:"a_segmentDirection",count:4,
  548. type:5120,offset:28,stride:32,normalized:!1,divisor:0}]};a._lineVertexAttributeLayoutVV={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:44,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:44,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:44,normalized:!0,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:12,stride:44,normalized:!1,divisor:0},{name:"a_accumulatedDistanceAndHalfWidth",count:2,type:5123,offset:16,stride:44,normalized:!1,
  549. divisor:0},{name:"a_tlbr",count:4,type:5123,offset:20,stride:44,normalized:!1,divisor:0},{name:"a_segmentDirection",count:4,type:5120,offset:28,stride:44,normalized:!1,divisor:0},{name:"a_vv",count:3,type:5126,offset:32,stride:44,normalized:!1,divisor:0}]};a._spritesTextureSize=new Float32Array(2);return a}b(f,d);f.prototype.getGeometryType=function(){return a.WGLGeometryType.LINE};f.prototype.drawGeometry=function(a,b,c,d){d=a.context;var e=a.painter,f=a.rendererInfo,h=a.requiredLevel,k=c.indexFrom,
  550. l=c.indexCount,n=c.materialInfo;c=n.materialKeyInfo;var r=c.vvSizeMinMaxValue||c.vvSizeScaleStops||c.vvSizeFieldStops||c.vvSizeUnitValue||c.vvColor||c.vvOpacity,g=e.materialManager.getProgram(n.materialKey,a.drawPhase,r?this._lineAttributeLocationsVV:this._lineAttributeLocations);if(g){d.bindProgram(g);r=this._getVAO(d,b,r);d.bindVAO(r);r=1/a.pixelRatio;if(0<n.texBindingInfo.length){var n=n.texBindingInfo[0],p=n.pageId,y=e.textureManager.sprites;this._spritesTextureSize[0]=y.getWidth(p);this._spritesTextureSize[1]=
  551. y.getHeight(p);e.textureManager.bindSpritePage(d,p,n.unit);g.setUniform1i(n.semantic,n.unit);g.setUniform2fv("u_mosaicSize",this._spritesTextureSize)}a=Math.pow(2,h-b.key.level)/a.pixelRatio;g.setUniform1f("u_zoomFactor",a);g.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform);g.setUniformMatrix4fv("u_extrudeMatrix",e.extrudeMatrix);g.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord);g.setUniform1f("u_opacity",1);g.setUniform1f("u_blur",0+r);g.setUniform1f("u_antialiasing",
  552. r);g.setUniform1f("u_zoomFactor",a);c.vvSizeMinMaxValue&&g.setUniform4fv("u_vvSizeMinMaxValue",f.vvSizeMinMaxValue);c.vvSizeScaleStops&&g.setUniform1f("u_vvSizeScaleStopsValue",f.vvSizeScaleStopsValue);c.vvSizeFieldStops&&(g.setUniform1fv("u_vvSizeFieldStopsValues",f.vvSizeFieldStopsValues),g.setUniform1fv("u_vvSizeFieldStopsSizes",f.vvSizeFieldStopsSizes));c.vvSizeUnitValue&&g.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",f.vvSizeUnitValueToPixelsRatio);c.vvColor&&(g.setUniform1fv("u_vvColorValues",
  553. f.vvColorValues),g.setUniform4fv("u_vvColors",f.vvColors));c.vvOpacity&&(g.setUniform1fv("u_vvOpacityValues",f.vvOpacityValues),g.setUniform1fv("u_vvOpacities",f.vvOpacities));d.setFaceCullingEnabled(!0);d.setFrontFace(2305);d.setCullFace(1029);d.drawElements(4,l,5125,4*k);d.setFaceCullingEnabled(!1);d.bindVAO(null)}};f.prototype._getVAO=function(a,b,d){if(b.lineGeometry.vao)return b.lineGeometry.vao;var f=b.lineGeometry.vertexBufferMap[e.C_VBO_GEOMETRY],h=b.lineGeometry.indexBuffer;if(!f||!h)return null;
  554. b.lineGeometry.vao=d?new c(a,this._lineAttributeLocationsVV,this._lineVertexAttributeLayoutVV,{geometry:f},h):new c(a,this._lineAttributeLocations,this._lineVertexAttributeLayout,{geometry:f},h);return b.lineGeometry.vao};return f}(d.default);g.default=p})},"esri/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker":function(){define("require exports ../../../../../core/tsSupport/extendsHelper ../enums ../Utils ./WGLGeometryBrush ../../../../webgl/Texture ../../../../webgl/VertexArrayObject".split(" "),
  555. function(p,g,b,a,e,d,c,k){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a._iconAttributeLocations={a_pos:0,a_vertexOffsetAndTex:1,a_id:2,a_color:3,a_outlineColor:4,a_sizeAndOutlineWidth:5};a._iconAttributeLocationsVV={a_pos:0,a_vertexOffsetAndTex:1,a_id:2,a_color:3,a_outlineColor:4,a_sizeAndOutlineWidth:5,a_vv:6};a._iconAttributeLocationsHeatmap={a_pos:0,a_vertexOffsetAndTex:1,a_id:2,a_color:3,a_outlineColor:4,a_sizeAndOutlineWidth:5,
  556. a_weight:6};a._iconVertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:24,normalized:!1,divisor:0},{name:"a_vertexOffsetAndTex",count:4,type:5120,offset:4,stride:24,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:8,stride:24,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:24,normalized:!0,divisor:0},{name:"a_outlineColor",count:4,type:5121,offset:16,stride:24,normalized:!0,divisor:0},{name:"a_sizeAndOutlineWidth",count:4,type:5121,
  557. offset:20,stride:24,normalized:!1,divisor:0}]};a._iconVertexAttributesWithVV={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:40,normalized:!1,divisor:0},{name:"a_vertexOffsetAndTex",count:4,type:5120,offset:4,stride:40,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:8,stride:40,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:40,normalized:!0,divisor:0},{name:"a_outlineColor",count:4,type:5121,offset:16,stride:40,normalized:!0,divisor:0},{name:"a_sizeAndOutlineWidth",
  558. count:4,type:5121,offset:20,stride:40,normalized:!1,divisor:0},{name:"a_vv",count:4,type:5126,offset:24,stride:40,normalized:!1,divisor:0}]};a._iconVertexAttributesWithHeatmap={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:28,normalized:!1,divisor:0},{name:"a_vertexOffsetAndTex",count:4,type:5120,offset:4,stride:28,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:8,stride:28,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:28,normalized:!0,divisor:0},
  559. {name:"a_outlineColor",count:4,type:5121,offset:16,stride:28,normalized:!0,divisor:0},{name:"a_sizeAndOutlineWidth",count:4,type:5121,offset:20,stride:28,normalized:!1,divisor:0},{name:"a_weight",count:1,type:5126,offset:24,stride:28,normalized:!1,divisor:0}]};a._spritesTextureSize=new Float32Array(2);return a}b(f,d);f.prototype.getGeometryType=function(){return a.WGLGeometryType.MARKER};f.prototype.drawGeometry=function(a,b,c,d){d=a.context;var e=a.painter,f=a.rendererInfo,h=c.indexCount,k=c.indexFrom,
  560. l=c.materialInfo;c=l.materialKeyInfo;var m=c.heatmap,n=c.vvSizeMinMaxValue||c.vvSizeScaleStops||c.vvSizeFieldStops||c.vvSizeUnitValue||c.vvColor||c.vvRotation||c.vvOpacity;if(a=e.materialManager.getProgram(l.materialKey,a.drawPhase,n?this._iconAttributeLocationsVV:this._iconAttributeLocations))d.bindProgram(a),n=this._getVAO(d,b,n,m),d.bindVAO(n),m?(l=this._getIntensityTexture(d,f.heatmapParameters),d.bindTexture(l,1),a.setUniform1i("u_texture",1),this._spritesTextureSize[0]=Math.round(f.heatmapParameters.radius),
  561. this._spritesTextureSize[1]=Math.round(f.heatmapParameters.radius)):(m=l.texBindingInfo[0],l=m.pageId,e.textureManager.bindSpritePage(d,l,m.unit),a.setUniform1i(m.semantic,m.unit),m=e.textureManager.sprites,this._spritesTextureSize[0]=m.getWidth(l)/4,this._spritesTextureSize[1]=m.getHeight(l)/4),e=f.vvMaterialParameters.vvRotationEnabled&&"geographic"===f.vvMaterialParameters.vvRotationType?e.extrudeMatrix:e.extrudeNoRotationMatrix,a.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform),
  562. a.setUniformMatrix4fv("u_extrudeMatrix",e),a.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord),a.setUniform2fv("u_mosaicSize",this._spritesTextureSize),a.setUniform1f("u_opacity",1),c.vvSizeMinMaxValue&&a.setUniform4fv("u_vvSizeMinMaxValue",f.vvSizeMinMaxValue),c.vvSizeScaleStops&&a.setUniform1f("u_vvSizeScaleStopsValue",f.vvSizeScaleStopsValue),c.vvSizeFieldStops&&(a.setUniform1fv("u_vvSizeFieldStopsValues",f.vvSizeFieldStopsValues),a.setUniform1fv("u_vvSizeFieldStopsSizes",f.vvSizeFieldStopsSizes)),
  563. c.vvSizeUnitValue&&a.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",f.vvSizeUnitValueToPixelsRatio),c.vvColor&&(a.setUniform1fv("u_vvColorValues",f.vvColorValues),a.setUniform4fv("u_vvColors",f.vvColors)),c.vvOpacity&&(a.setUniform1fv("u_vvOpacityValues",f.vvOpacityValues),a.setUniform1fv("u_vvOpacities",f.vvOpacities)),c.vvRotation&&a.setUniform1f("u_vvRotationType","geographic"===f.vvMaterialParameters.vvRotationType?0:1),d.drawElements(4,h,5125,4*k),d.bindVAO(null)};f.prototype._getVAO=function(a,
  564. b,c,d){if(b.iconGeometry.vao)return b.iconGeometry.vao;var f=b.iconGeometry.vertexBufferMap[e.C_VBO_GEOMETRY],h=b.iconGeometry.indexBuffer;if(!f||!h)return null;b.iconGeometry.vao=c?new k(a,this._iconAttributeLocationsVV,this._iconVertexAttributesWithVV,{geometry:f},h):d?new k(a,this._iconAttributeLocationsHeatmap,this._iconVertexAttributesWithHeatmap,{geometry:f},h):new k(a,this._iconAttributeLocations,this._iconVertexAttributes,{geometry:f},h);return b.iconGeometry.vao};f.prototype._getIntensityTexture=
  565. function(a,b){if(b.intensityKernel&&!b.refreshIntensityKernel)return b.intensityKernel;b.intensityKernel&&(b.intensityKernel.dispose(),b.intensityKernel=null);for(var d=b.radius,e=b.kernelSize,f=b.blurRadius,h=d*d,k=[],l=-1;++l<e;)k[l]=Math.exp(-Math.pow(l-f,2)/(2*h))/(d/2*Math.sqrt(2*Math.PI));for(var d=[],n,g=0;g<e;g++)for(h=k[g],l=0;l<e;l++)n=g*e+l,f=k[l],d[4*n+0]=h*f,d[4*n+1]=0,d[4*n+2]=0,d[4*n+3]=1;a=new c(a,{target:3553,pixelFormat:6408,internalFormat:a.capabilities.colorBufferFloat.RGBA32F,
  566. dataType:5126,samplingMode:a.capabilities.textureFloatLinear?9729:9728,wrapMode:33071,width:e,height:e},new Float32Array(d));b.intensityKernel=a;b.refreshIntensityKernel=!1;return a};return f}(d.default);g.default=p})},"esri/views/2d/engine/webgl/brushes/WGLGeometryBrushText":function(){define("require exports ../../../../../core/tsSupport/extendsHelper ../enums ../Utils ./WGLGeometryBrush ../../../../webgl/VertexArrayObject".split(" "),function(p,g,b,a,e,d,c){Object.defineProperty(g,"__esModule",
  567. {value:!0});p=function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a._attributeLocations={a_pos:0,a_id:1,a_color:2,a_vertexOffset:3,a_texFontSize:4,a_visible:5};a._attributeLocationsVV={a_pos:0,a_id:1,a_color:2,a_vertexOffset:3,a_texFontSize:4,a_vv:5,a_visible:6};a._vertexAttributeLayout={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:20,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:20,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,
  568. offset:8,stride:20,normalized:!0,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:12,stride:20,normalized:!1,divisor:0},{name:"a_texFontSize",count:4,type:5120,offset:16,stride:20,normalized:!1,divisor:0}],visibility:[{name:"a_visible",count:1,type:5121,offset:0,stride:1,normalized:!0,divisor:0}]};a._vertexAttributeLayoutVV={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:36,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:36,normalized:!0,divisor:0},{name:"a_color",
  569. count:4,type:5121,offset:8,stride:36,normalized:!0,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:12,stride:36,normalized:!1,divisor:0},{name:"a_texFontSize",count:4,type:5120,offset:16,stride:36,normalized:!1,divisor:0},{name:"a_vv",count:4,type:5126,offset:20,stride:36,normalized:!1,divisor:0}],visibility:[{name:"a_visible",count:1,type:5121,offset:0,stride:1,normalized:!0,divisor:0}]};a._glyphsTextureSize=new Float32Array(2);return a}b(f,d);f.prototype.getGeometryType=function(){return a.WGLGeometryType.TEXT};
  570. f.prototype.drawGeometry=function(a,b,c,d){d=a.context;var e=a.painter,f=a.rendererInfo,h=c.materialInfo,k=c.indexCount;c=c.indexFrom;var l=h.materialKeyInfo,n=l.vvSizeMinMaxValue||l.vvSizeScaleStops||l.vvSizeFieldStops||l.vvSizeUnitValue||l.vvColor||l.vvRotation||l.vvOpacity;if(a=e.materialManager.getProgram(h.materialKey,a.drawPhase,n?this._attributeLocationsVV:this._attributeLocations))d.bindProgram(a),n=this._getVAO(d,b,n),d.bindVAO(n),h=h.texBindingInfo[0],e.textureManager.bindGlyphsPage(d,h.pageId,
  571. h.unit),a.setUniform1i(h.semantic,h.unit),h=e.textureManager.glyphs,this._glyphsTextureSize[0]=h.width/4,this._glyphsTextureSize[1]=h.height/4,e=f.vvMaterialParameters.vvRotationEnabled&&"geographic"===f.vvMaterialParameters.vvRotationType?e.extrudeMatrix:e.extrudeNoRotationMatrix,a.setUniformMatrix4fv("u_transformMatrix",b.tileTransform.transform),a.setUniformMatrix4fv("u_extrudeMatrix",e),a.setUniform2fv("u_normalized_origin",b.tileTransform.displayCoord),a.setUniform2fv("u_mosaicSize",this._glyphsTextureSize),
  572. a.setUniform1f("u_pixelRatio",1),a.setUniform1f("u_opacity",1),l.vvSizeMinMaxValue&&a.setUniform4fv("u_vvSizeMinMaxValue",f.vvSizeMinMaxValue),l.vvSizeScaleStops&&a.setUniform1f("u_vvSizeScaleStopsValue",f.vvSizeScaleStopsValue),l.vvSizeFieldStops&&(a.setUniform1fv("u_vvSizeFieldStopsValues",f.vvSizeFieldStopsValues),a.setUniform1fv("u_vvSizeFieldStopsSizes",f.vvSizeFieldStopsSizes)),l.vvSizeUnitValue&&a.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",f.vvSizeUnitValueToPixelsRatio),l.vvColor&&
  573. (a.setUniform1fv("u_vvColorValues",f.vvColorValues),a.setUniform4fv("u_vvColors",f.vvColors)),l.vvOpacity&&(a.setUniform1fv("u_vvOpacityValues",f.vvOpacityValues),a.setUniform1fv("u_vvOpacities",f.vvOpacities)),l.vvRotation&&a.setUniform1f("u_vvRotationType","geographic"===f.vvMaterialParameters.vvRotationType?0:1),d.drawElements(4,k,5125,4*c),d.bindVAO(null)};f.prototype._getVAO=function(a,b,d){if(b.textGeometry.vao)return b.textGeometry.vao;var f=b.textGeometry.vertexBufferMap[e.C_VBO_GEOMETRY],
  574. h=b.textGeometry.vertexBufferMap[e.C_VBO_VISIBILITY],k=b.textGeometry.indexBuffer;if(!f||!k)return null;b.textGeometry.vao=d?new c(a,this._attributeLocationsVV,this._vertexAttributeLayoutVV,{geometry:f,visibility:h},k):new c(a,this._attributeLocations,this._vertexAttributeLayout,{geometry:f,visibility:h},k);return b.textGeometry.vao};return f}(d.default);g.default=p})},"esri/views/2d/engine/webgl/painter/WGLHighlightPainter":function(){define(["require","exports","dojo/has","./highlight/HighlightRenderer",
  575. "./highlight/HighlightSurfaces"],function(p,g,b,a,e){return function(){function d(){this._hlRenderer=new a;this._hlSurfaces=new e;this._height=this._width=void 0}d.prototype.setup=function(a,b,d){var c=b%4,e=d%4;b+=2>c?-c:4-c;d+=2>e?-e:4-e;this._width=b;this._height=d;this._boundFBO=a.getBoundFramebufferObject();b=Math.round(.75*b);d=Math.round(.75*d);this._hlRenderer.setup(a,b,d);this._hlSurfaces.setup(a,b,d)};d.prototype.setHighlightOptions=function(a){this._hlRenderer.setHighlightOptions({fillColor:a.fillColor,
  576. outlineColor:a.outlineColor,outlineWidth:.75*a.outlineWidth,outerHaloWidth:.75*a.outerHaloWidth,innerHaloWidth:.75*a.innerHaloWidth,outlinePosition:.75*a.outlinePosition})};d.prototype.startMaskDraw=function(a){a.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo);a.setClearColor(0,0,0,0);a.setClearStencil(0);a.clear(a.gl.COLOR_BUFFER_BIT|a.gl.STENCIL_BUFFER_BIT);a.setViewport(0,0,.75*this._width,.75*this._height)};d.prototype.draw=function(a){a.setStencilTestEnabled(!1);a.setBlendingEnabled(!1);a.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo);
  577. a.setClearColor(0,0,0,0);a.clear(a.gl.COLOR_BUFFER_BIT);this._hlRenderer.preBlur(a,this._hlSurfaces.sharedBlur1Tex);b("esri-feature-highlight-debug")?(a.bindFramebuffer(null),a.clear(a.gl.COLOR_BUFFER_BIT),this._hlRenderer.finalBlur(a,this._hlSurfaces.sharedBlur2Tex)):(a.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),a.setClearColor(0,0,0,0),a.clear(a.gl.COLOR_BUFFER_BIT),this._hlRenderer.finalBlur(a,this._hlSurfaces.sharedBlur2Tex),a.bindFramebuffer(this._boundFBO),a.setBlendingEnabled(!0),a.setViewport(0,
  578. 0,this._width,this._height),this._hlRenderer.renderHighlight(a,this._hlSurfaces.sharedBlur1Tex),this._boundFBO=null)};return d}()})},"esri/views/2d/engine/webgl/painter/highlight/HighlightRenderer":function(){define("require exports ../../shaders/hlShaderSnippets ../../../../../webgl/BufferObject ../../../../../webgl/ShaderVariations ../../../../../webgl/Texture ../../../../../webgl/VertexArrayObject".split(" "),function(p,g,b,a,e,d,c){var k=[void 0,void 0,void 0,1],f=[3,4],l=[0,0,0,0,0,0,0,0,0,0,
  579. 0,0,1,1,1,1],h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return function(){function n(){this._height=this._width=void 0;this._highlightOptions={fillColor:[.2,.6,.9,.75],outlineColor:[.2,.6,.9,.9],outlinePosition:0,outlineWidth:3.4,innerHaloWidth:2,outerHaloWidth:3.3};this._resources=null}n.prototype._initialize=function(h,l,n){this._width=l;this._height=n;l=new a(h,34962,35044,(new Int8Array([-128,-128,0,0,127,-128,255,0,-128,127,0,255,127,127,255,255])).buffer);n=new c(h,{a_position:0,a_texcoord:1},{geometry:[{name:"a_position",
  580. count:2,type:5120,offset:0,stride:4,normalized:!0},{name:"a_texcoord",count:2,type:5121,offset:2,stride:4,normalized:!0}]},{geometry:l});var m=(new e("hl",["texturedVS","highlightFS"],[],b,h,{a_position:0,a_texcoord:1})).getProgram([]),r=(new e("hl",["texturedVS","blurFS"],[],b,h,{a_position:0,a_texcoord:1})).getProgram([]);m.setUniform1i("u_texture",f[0]);m.setUniform1i("u_shade",f[1]);m.setUniform4fv("u_sigmas",k);r.setUniform1i("u_texture",f[0]);r.setUniform4fv("u_sigmas",k);h=new d(h,{target:3553,
  581. pixelFormat:6408,dataType:5121,wrapMode:33071,width:256,height:1,samplingMode:9728});this._resources={quadGeometry:l,quadVAO:n,highlightProgram:m,blurProgram:r,shadeTex:h}};n.prototype.setHighlightOptions=function(a){function b(a,b,c){n[0]=(1-c)*a[0]+c*b[0];n[1]=(1-c)*a[1]+c*b[1];n[2]=(1-c)*a[2]+c*b[2];n[3]=(1-c)*a[3]+c*b[3]}this._highlightOptions=a;if(this._resources){var c=a.outlinePosition-a.outlineWidth/2-a.outerHaloWidth,d=a.outlinePosition-a.outlineWidth/2,e=a.outlinePosition+a.outlineWidth/
  582. 2,f=a.outlinePosition+a.outlineWidth/2+a.innerHaloWidth,h=Math.sqrt(Math.PI/2)*k[3],l=Math.abs(c)>h?Math.round(10*(Math.abs(c)-h))/10:0,h=Math.abs(f)>h?Math.round(10*(Math.abs(f)-h))/10:0;l&&!h?console.warn("The outer rim of the highlight is "+l+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards)."):!l&&h?console.warn("The inner rim of the highlight is "+h+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards)."):
  583. l&&h&&console.warn("The highlight is "+Math.max(l,h)+"px away from the edge of the feature; consider reducing some width values.");for(var l=new Uint8Array(1024),n=[void 0,void 0,void 0,void 0],r=0;256>r;++r)h=c+r/255*(f-c),h<c?(l[4*r+0]=0,l[4*r+1]=0,l[4*r+2]=0,l[4*r+3]=0):h<d?b([0,0,0,0],a.outlineColor,(h-c)/(d-c)):h<e?(n[0]=a.outlineColor[0],n[1]=a.outlineColor[1],n[2]=a.outlineColor[2],n[3]=a.outlineColor[3]):h<f?b(a.outlineColor,a.fillColor,(h-e)/(f-e)):(l[4*r+0]=a.fillColor[0],l[4*r+1]=a.fillColor[1],
  584. l[4*r+2]=a.fillColor[2],l[4*r+3]=a.fillColor[3]),l[4*r+0]=255*n[0]*n[3],l[4*r+1]=255*n[1]*n[3],l[4*r+2]=255*n[2]*n[3],l[4*r+3]=255*n[3];this._resources.highlightProgram.setUniform2fv("u_minMaxDistance",[c,f]);this._resources.shadeTex.updateData(0,0,0,256,1,l)}};n.prototype.setup=function(a,b,c){this._resources?(this._width=b,this._height=c):(this._initialize(a,b,c),this.setHighlightOptions(this._highlightOptions))};n.prototype._teardown=function(){this._resources.quadGeometry.dispose();this._resources.quadVAO.dispose();
  585. this._resources.highlightProgram.dispose();this._resources.blurProgram.dispose();this._resources.shadeTex.dispose();this._resources=null};n.prototype.dispose=function(){this._resources&&this._teardown()};n.prototype.preBlur=function(a,b){a.bindTexture(b,f[0]);a.bindProgram(this._resources.blurProgram);this._resources.blurProgram.setUniform4fv("u_direction",[1,0,1/this._width,0]);this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",l);a.bindVAO(this._resources.quadVAO);a.drawArrays(5,
  586. 0,4);a.bindVAO()};n.prototype.finalBlur=function(a,b){a.bindTexture(b,f[0]);a.bindProgram(this._resources.blurProgram);this._resources.blurProgram.setUniform4fv("u_direction",[0,1,0,1/this._height]);this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",h);a.bindVAO(this._resources.quadVAO);a.drawArrays(5,0,4);a.bindVAO()};n.prototype.renderHighlight=function(a,b){a.bindTexture(b,f[0]);a.bindTexture(this._resources.shadeTex,f[1]);a.bindProgram(this._resources.highlightProgram);a.bindVAO(this._resources.quadVAO);
  587. a.drawArrays(5,0,4);a.bindVAO()};return n}()})},"esri/views/2d/engine/webgl/shaders/hlShaderSnippets":function(){define(["require","exports","dojo/text!./hlShaders.xml","../../../../webgl/ShaderSnippets"],function(p,g,b,a){p=new a;a.parse(b,p);return p})},"esri/views/2d/engine/webgl/painter/highlight/HighlightSurfaces":function(){define(["require","exports","../../../../../webgl/FramebufferObject","../../../../../webgl/Texture"],function(p,g,b,a){function e(d,c,e){c=new a(d,{target:3553,pixelFormat:6408,
  588. dataType:5121,wrapMode:33071,width:c,height:e,samplingMode:9729});d=b.createWithAttachments(d,c,{colorTarget:0,depthStencilTarget:2});return[c,d]}return function(){function a(){this._height=this._width=void 0;this._resources=null}a.prototype._initialize=function(a,b,d){this._width=b;this._height=d;var c=e(a,b,d),f=c[0],c=c[1];a=e(a,b,d);this._resources={sharedBlur1Tex:f,sharedBlur1Fbo:c,sharedBlur2Tex:a[0],sharedBlur2Fbo:a[1]}};a.prototype.setup=function(a,b,d){!this._resources||this._width===b&&
  589. this._height===d||this._teardown();this._resources||this._initialize(a,b,d)};a.prototype._teardown=function(){this._resources.sharedBlur1Tex.dispose();this._resources.sharedBlur1Fbo.dispose();this._resources.sharedBlur2Tex.dispose();this._resources.sharedBlur2Fbo.dispose();this._resources=null};a.prototype.dispose=function(){this._resources&&this._teardown()};Object.defineProperty(a.prototype,"sharedBlur1Tex",{get:function(){return this._resources.sharedBlur1Tex},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
  590. "sharedBlur1Fbo",{get:function(){return this._resources.sharedBlur1Fbo},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"sharedBlur2Tex",{get:function(){return this._resources.sharedBlur2Tex},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"sharedBlur2Fbo",{get:function(){return this._resources.sharedBlur2Fbo},enumerable:!0,configurable:!0});return a}()})},"esri/views/webgl/FramebufferObject":function(){define(["require","exports","./Texture"],function(p,g,b){return function(){function a(e,
  591. d,c,k){this._colorAttachment=this._stencilAttachment=this._depthAttachment=this._glName=this._context=null;this._initialized=!1;this._context=e;this._desc={colorTarget:d.colorTarget,depthStencilTarget:d.depthStencilTarget,width:d.width,height:d.height,multisampled:d.multisampled};this._id=a._nextId++;c&&(e=void 0,c instanceof b?(this._colorAttachment=c,e=c.descriptor):(e=c,this._colorAttachment=new b(this._context,e)),0!==this._desc.colorTarget&&console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),
  592. a._validateTextureDimensions(e,this._desc));k&&(this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),c=void 0,k instanceof b?(this._depthStencilTexture=k,c=this._depthStencilTexture.descriptor):(c=k,this._depthStencilTexture=new b(this._context,c)),a._validateTextureDimensions(c,this._desc))}a.create=function(b,d){return new a(b,d)};a.createWithAttachments=function(b,d,
  593. c,k){return new a(b,c,d,k)};Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"colorTexture",{get:function(){return this._colorAttachment instanceof b?this._colorAttachment:null},enumerable:!0,
  594. configurable:!0});Object.defineProperty(a.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this._desc.width},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._desc.height},enumerable:!0,configurable:!0});a.prototype.dispose=function(){this._context&&this._glName&&(this._disposeColorAttachment(),this._disposeDepthStencilAttachments(),
  595. this._context.gl.deleteFramebuffer(this._glName),this._glName=null)};a.prototype.attachColorTexture=function(b){if(b){a._validateTextureDimensions(b.descriptor,this._desc);this._disposeColorAttachment();if(this._initialized){this._context.bindFramebuffer(this);var d=this._context.gl;d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,b.glName,0)}this._colorAttachment=b}};a.prototype.detachColorTexture=function(){var a=void 0;if(this._colorAttachment instanceof b){a=this._colorAttachment;
  596. if(this._initialized){this._context.bindFramebuffer(this);var d=this._context.gl;this._context.gl.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null,0)}this._colorAttachment=null}return a};a.prototype.attachDepthStencilTexture=function(b){if(b){var d=b.descriptor;34041!==d.pixelFormat&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!");34042!==d.dataType&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8_WEBGL!");this._context.capabilities.depthTexture||
  597. console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!");a._validateTextureDimensions(d,this._desc);4!==this._desc.depthStencilTarget&&(this._desc.depthStencilTarget=4);this._disposeDepthStencilAttachments();this._initialized&&(this._context.bindFramebuffer(this),d=this._context.gl,d.framebufferTexture2D(d.FRAMEBUFFER,d.DEPTH_STENCIL_ATTACHMENT,d.TEXTURE_2D,b.glName,0));this._depthStencilTexture=b}};a.prototype.detachDepthStencilTexture=
  598. function(){var a=this._depthStencilTexture;if(a&&this._initialized){this._context.bindFramebuffer(this);var b=this._context.gl;this._context.gl.framebufferTexture2D(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.TEXTURE_2D,null,0)}this._depthStencilTexture=null;return a};a.prototype.copyToTexture=function(a,b,c,k,f,l,h){(0>a||0>b||0>f||0>l)&&console.error("Offsets cannot be negative!");(0>=c||0>=k)&&console.error("Copy width and height must be greater than zero!");var d=this._desc,e=h.descriptor;3553!==
  599. h.descriptor.target&&console.error("Texture target must be TEXTURE_2D!");(a+c>d.width||b+k>d.height||f+c>e.width||l+k>e.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");d=this._context;d.bindTexture(h);d.bindFramebuffer(this);d.gl.copyTexSubImage2D(3553,0,f,l,a,b,c,k)};a.prototype.readPixels=function(a,b,c,k,f,l,h){(0>=c||0>=k)&&console.error("Copy width and height must be greater than zero!");h||console.error("Target memory is not initialized!");
  600. this._context.bindFramebuffer(this);this._context.gl.readPixels(a,b,c,k,f,l,h)};a.prototype.resize=function(e,d){var c=this._desc;if(c.width!==e||c.height!==d)if(this._initialized)c.width=e,c.height=d,this._colorAttachment instanceof b?(k=this._colorAttachment,c=k.descriptor,c.width=e,c.height=d,this._colorAttachment.dispose(),this._colorAttachment=new b(this._context,c),a._validateTextureDimensions(k.descriptor,this._desc)):this._colorAttachment&&this._disposeColorAttachment(),null!=this._depthStencilTexture?
  601. (c=this._depthStencilTexture.descriptor,c.width=e,c.height=d,this._depthStencilTexture.dispose(),this._depthStencilTexture=new b(this._context,c)):(this._depthAttachment||this._stencilAttachment)&&this._disposeDepthStencilAttachments(),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1;else{c.width=e;c.height=d;if(this._colorAttachment instanceof b){var k=this._colorAttachment;k.resize(e,d)}this._depthStencilTexture&&this._depthStencilTexture.resize(e,
  602. d)}};a.prototype.initialize=function(){if(this._initialized)return!1;var a=this._context.gl;this._glName&&a.deleteFramebuffer(this._glName);var d=a.createFramebuffer(),c=this._desc;a.bindFramebuffer(a.FRAMEBUFFER,d);if(!this._colorAttachment)if(0===c.colorTarget)this._colorAttachment=new b(this._context,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:c.width,height:c.height});else{var k=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,k);a.renderbufferStorage(a.RENDERBUFFER,
  603. a.RGBA4,c.width,c.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.RENDERBUFFER,k);this._colorAttachment=k}this._colorAttachment instanceof b&&a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this._colorAttachment.glName,0);switch(c.depthStencilTarget){case 1:case 3:k=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,k);var f=1===c.depthStencilTarget?a.DEPTH_ATTACHMENT:a.DEPTH_STENCIL_ATTACHMENT;a.renderbufferStorage(a.RENDERBUFFER,1===c.depthStencilTarget?
  604. a.DEPTH_COMPONENT16:a.DEPTH_STENCIL,c.width,c.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,f,a.RENDERBUFFER,k);this._depthAttachment=k;break;case 2:k=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,k);a.renderbufferStorage(a.RENDERBUFFER,a.STENCIL_INDEX8,c.width,c.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.STENCIL_ATTACHMENT,a.RENDERBUFFER,k);this._stencilAttachment=k;break;case 4:this._depthStencilTexture||(this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),
  605. this._depthStencilTexture=new b(this._context,{target:3553,pixelFormat:34041,dataType:34042,samplingMode:9728,wrapMode:33071,width:c.width,height:c.height})),a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,this._depthStencilTexture.glName,0)}a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!");this._glName=d;return this._initialized=!0};a.prototype._disposeColorAttachment=function(){if(this._colorAttachment instanceof
  606. b){var a=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var d=this._context.gl;d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null,0)}a.dispose()}else this._colorAttachment instanceof WebGLRenderbuffer&&(a=this._colorAttachment,d=this._context.gl,this._initialized&&(this._context.bindFramebuffer(this),d.framebufferRenderbuffer(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(a));this._colorAttachment=
  607. null};a.prototype._disposeDepthStencilAttachments=function(){var a=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);var b=this._context.gl;b.framebufferRenderbuffer(b.FRAMEBUFFER,1===this._desc.depthStencilTarget?b.DEPTH_ATTACHMENT:b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,null)}a.deleteRenderbuffer(this._depthAttachment);this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),b=this._context.gl,
  608. b.framebufferRenderbuffer(b.FRAMEBUFFER,b.STENCIL_ATTACHMENT,b.RENDERBUFFER,null)),a.deleteRenderbuffer(this._stencilAttachment),this._stencilAttachment=null);this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),a=this._context.gl,a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,null,0)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)};a._validateTextureDimensions=function(a,b){console.assert(0<=a.width&&0<=a.height);3553!==
  609. a.target&&console.error("Texture type must be TEXTURE_2D!");void 0!==b.width&&0<=b.width&&void 0!==b.height&&0<=b.height?b.width===a.width&&b.height===a.height||console.error("Color attachment texture must match the framebuffer's!"):(b.width=a.width,b.height=a.height)};a._nextId=0;return a}()})},"esri/views/support/screenshotUtils":function(){define(["require","exports","dojo/_base/lang"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});g.adjustScreenshotSettings=function(a,e){a=b.mixin({format:"png",
  610. quality:100},a||{});var d,c;a.includePadding?(d=e.width,c=e.height):(d=e.width-e.padding.left-e.padding.right,c=e.height-e.padding.top-e.padding.bottom);var k=d/c;void 0!==a.width&&void 0===a.height?a.height=a.width/k:void 0!==a.height&&void 0===a.width&&(a.width=k*a.height);void 0!==a.height&&(a.height=Math.floor(a.height));void 0!==a.width&&(a.width=Math.floor(a.width));a.area||a.includePadding||(a.area={x:e.padding.left,y:e.padding.top,width:d,height:c});return a};g.resampleHermite=function(a,
  611. b,d,c,k,f,l){void 0===l&&(l=!0);var e=b/k;d/=f;for(var n=Math.ceil(e/2),g=Math.ceil(d/2),m=0;m<f;m++)for(var u=0;u<k;u++){for(var q=4*(u+(l?f-m-1:m)*k),t=0,p=0,v=0,B=0,w=0,z=0,y=0,A=(m+.5)*d,C=Math.floor(m*d);C<(m+1)*d;C++)for(var D=Math.abs(A-(C+.5))/g,E=(u+.5)*e,D=D*D,G=Math.floor(u*e);G<(u+1)*e;G++){var F=Math.abs(E-(G+.5))/n,t=Math.sqrt(D+F*F);-1<=t&&1>=t&&(t=2*t*t*t-3*t*t+1,0<t&&(F=4*(G+C*b),y+=t*a[F+3],v+=t,255>a[F+3]&&(t=t*a[F+3]/250),B+=t*a[F],w+=t*a[F+1],z+=t*a[F+2],p+=t))}c[q]=B/p;c[q+1]=
  612. w/p;c[q+2]=z/p;c[q+3]=y/v}}})},"esri/views/webgl/RenderingContext":function(){define(["require","exports","./enums","./capabilities/isWebGL2Context","./capabilities/load"],function(p,g,b,a,e){return function(){function d(b,d){this.gl=null;this._blendEnabled=!1;this._blendColorState={r:0,g:0,b:0,a:0};this._blendFunctionState={srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0};this._blendEquationState={mode:32774,modeAlpha:32774};this._colorMaskState={r:!0,g:!0,b:!0,a:!0};this._polygonCullingEnabled=!1;this._cullFace=
  613. 1029;this._frontFace=2305;this._scissorTestEnabled=!1;this._scissorRect={x:0,y:0,width:0,height:0};this._depthTestEnabled=!1;this._depthFunction=513;this._clearDepth=1;this._depthWriteEnabled=!0;this._depthRange={zNear:0,zFar:1};this._viewport=null;this._polygonOffsetFillEnabled=this._stencilTestEnabled=!1;this._polygonOffset=[0,0];this._stencilFunction={face:1032,func:519,ref:0,mask:1};this._clearStencil=0;this._stencilWriteMask=1;this._stencilOperation={face:1032,fail:7680,zFail:7680,zPass:7680};
  614. this._lineWidth=1;this._clearColor={r:0,g:0,b:0,a:0};this._activeFramebuffer=this._activeIndexBuffer=this._activeVertexBuffer=this._activeShaderProgram=null;this._activeTextureUnit=0;this._textureUnitMap={};this.contextVersion=a.default(b)?"webgl2":"webgl";this.gl=b;b instanceof WebGLRenderingContext&&this.gl.getExtension("OES_element_index_uint");this._capabilities=e.loadCapabilities(b,d);b=this.gl.getParameter(this.gl.VIEWPORT);this._viewport={x:b[0],y:b[1],width:b[2],height:b[3]};b=this.capabilities.textureFilterAnisotropic;
  615. this._parameters={versionString:this.gl.getParameter(this.gl.VERSION),maxVertexTextureImageUnits:this.gl.getParameter(this.gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxVertexAttributes:this.gl.getParameter(this.gl.MAX_VERTEX_ATTRIBS),maxMaxAnisotropy:b?this.gl.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY):void 0,maxTextureImageUnits:this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS)};this.enforceState()}Object.defineProperty(d.prototype,"contextAttributes",{get:function(){return this.gl.getContextAttributes()},
  616. enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"parameters",{get:function(){return this._parameters},enumerable:!0,configurable:!0});d.prototype.dispose=function(){this.bindVAO(null);this.unbindBuffer(34962);this.unbindBuffer(34963);this._textureUnitMap={};this.gl=null};d.prototype.setBlendingEnabled=function(a){this._blendEnabled!==a&&(!0===a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._blendEnabled=a)};d.prototype.setBlendColor=function(a,b,d,e){if(a!==this._blendColorState.r||
  617. b!==this._blendColorState.g||d!==this._blendColorState.b||e!==this._blendColorState.a)this.gl.blendColor(a,b,d,e),this._blendColorState.r=a,this._blendColorState.g=b,this._blendColorState.b=d,this._blendColorState.a=e};d.prototype.setBlendFunction=function(a,b){if(a!==this._blendFunctionState.srcRGB||b!==this._blendFunctionState.dstRGB)this.gl.blendFunc(a,b),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=a,this._blendFunctionState.dstRGB=b,this._blendFunctionState.dstAlpha=b};
  618. d.prototype.setBlendFunctionSeparate=function(a,b,d,e){if(this._blendFunctionState.srcRGB!==a||this._blendFunctionState.srcAlpha!==d||this._blendFunctionState.dstRGB!==b||this._blendFunctionState.dstAlpha!==e)this.gl.blendFuncSeparate(a,b,d,e),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=d,this._blendFunctionState.dstRGB=b,this._blendFunctionState.dstAlpha=e};d.prototype.setBlendEquation=function(a){this._blendEquationState.mode!==a&&(this.gl.blendEquation(a),this._blendEquationState.mode=
  619. a,this._blendEquationState.modeAlpha=a)};d.prototype.setBlendEquationSeparate=function(a,b){if(this._blendEquationState.mode!==a||this._blendEquationState.modeAlpha!==b)this.gl.blendEquationSeparate(a,b),this._blendEquationState.mode=a,this._blendEquationState.modeAlpha=b};d.prototype.setColorMask=function(a,b,d,e){if(this._colorMaskState.r!==a||this._colorMaskState.g!==b||this._colorMaskState.b!==d||this._colorMaskState.a!==e)this.gl.colorMask(a,b,d,e),this._colorMaskState.r=a,this._colorMaskState.g=
  620. b,this._colorMaskState.b=d,this._colorMaskState.a=e};d.prototype.setClearColor=function(a,b,d,e){if(this._clearColor.r!==a||this._clearColor.g!==b||this._clearColor.b!==d||this._clearColor.a!==e)this.gl.clearColor(a,b,d,e),this._clearColor.r=a,this._clearColor.g=b,this._clearColor.b=d,this._clearColor.a=e};d.prototype.setFaceCullingEnabled=function(a){this._polygonCullingEnabled!==a&&(!0===a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._polygonCullingEnabled=a)};d.prototype.setPolygonOffsetFillEnabled=
  621. function(a){this._polygonOffsetFillEnabled!==a&&(!0===a?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._polygonOffsetFillEnabled=a)};d.prototype.setPolygonOffset=function(a,b){if(this._polygonOffset[0]!==a||this._polygonOffset[1]!==b)this._polygonOffset[0]=a,this._polygonOffset[1]=b,this.gl.polygonOffset(a,b)};d.prototype.setCullFace=function(a){this._cullFace!==a&&(this.gl.cullFace(a),this._cullFace=a)};d.prototype.setFrontFace=function(a){this._frontFace!==
  622. a&&(this.gl.frontFace(a),this._frontFace=a)};d.prototype.setScissorTestEnabled=function(a){this._scissorTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._scissorTestEnabled=a)};d.prototype.setScissorRect=function(a,b,d,e){if(this._scissorRect.x!==a||this._scissorRect.y!==b||this._scissorRect.width!==d||this._scissorRect.height!==e)this.gl.scissor(a,b,d,e),this._scissorRect.x=a,this._scissorRect.y=b,this._scissorRect.width=d,this._scissorRect.height=
  623. e};d.prototype.setDepthTestEnabled=function(a){this._depthTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._depthTestEnabled=a)};d.prototype.setClearDepth=function(a){this._clearDepth!==a&&(this.gl.clearDepth(a),this._clearDepth=a)};d.prototype.setDepthFunction=function(a){this._depthFunction!==a&&(this.gl.depthFunc(a),this._depthFunction=a)};d.prototype.setDepthWriteEnabled=function(a){this._depthWriteEnabled!==a&&(this.gl.depthMask(a),this._depthWriteEnabled=
  624. a)};d.prototype.setDepthRange=function(a,b){if(this._depthRange.zNear!==a||this._depthRange.zFar!==b)this.gl.depthRange(a,b),this._depthRange.zNear=a,this._depthRange.zFar=b};d.prototype.setStencilTestEnabled=function(a){this._stencilTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTestEnabled=a)};d.prototype.setClearStencil=function(a){a!==this._clearStencil&&(this.gl.clearStencil(a),this._clearStencil=a)};d.prototype.setStencilFunction=
  625. function(a,b,d){if(this._stencilFunction.func!==a||this._stencilFunction.ref!==b||this._stencilFunction.mask!==d)this.gl.stencilFunc(a,b,d),this._stencilFunction.face=1032,this._stencilFunction.func=a,this._stencilFunction.ref=b,this._stencilFunction.mask=d};d.prototype.setStencilFunctionSeparate=function(a,b,d,e){if(this._stencilFunction.face!==a||this._stencilFunction.func!==b||this._stencilFunction.ref!==d||this._stencilFunction.mask!==e)this.gl.stencilFuncSeparate(a,b,d,e),this._stencilFunction.face=
  626. a,this._stencilFunction.func=b,this._stencilFunction.ref=d,this._stencilFunction.mask=e};d.prototype.setStencilWriteMask=function(a){this._stencilWriteMask!==a&&(this.gl.stencilMask(a),this._stencilWriteMask=a)};d.prototype.setStencilOp=function(a,b,d){if(this._stencilOperation.fail!==a||this._stencilOperation.zFail!==b||this._stencilOperation.zPass!==d)this.gl.stencilOp(a,b,d),this._stencilOperation.face=1032,this._stencilOperation.fail=a,this._stencilOperation.zFail=b,this._stencilOperation.zPass=
  627. d};d.prototype.setStencilOpSeparate=function(a,b,d,e){if(this._stencilOperation.face!==a||this._stencilOperation.fail!==b||this._stencilOperation.zFail!==d||this._stencilOperation.zPass!==e)this.gl.stencilOpSeparate(a,b,d,e),this._stencilOperation.face=a,this._stencilOperation.face=a,this._stencilOperation.fail=b,this._stencilOperation.zFail=d,this._stencilOperation.zPass=e};d.prototype.setLineWidth=function(a){var b=this._lineWidth;this._lineWidth!==a&&(this.gl.lineWidth(a),this._lineWidth=a);return b};
  628. d.prototype.setActiveTexture=function(a){var c=this._activeTextureUnit;0<=a&&a!==this._activeTextureUnit&&(this.gl.activeTexture(b.BASE_TEXTURE_UNIT+a),this._activeTextureUnit=a);return c};d.prototype.clear=function(a){a&&this.gl.clear(a)};d.prototype.drawArrays=function(a,b,d){this.gl.drawArrays(a,b,d)};d.prototype.drawElements=function(a,b,d,e){5123===d?this.gl.drawElements(a,b,d,e):5125===d&&this.gl.drawElements(a,b,d,e)};Object.defineProperty(d.prototype,"capabilities",{get:function(){return this._capabilities},
  629. enumerable:!0,configurable:!0});d.prototype.setViewport=function(a,b,d,e){var c=this._viewport;if(c.x!==a||c.y!==b||c.width!==d||c.height!==e)c.x=a,c.y=b,c.width=d,c.height=e,this.gl.viewport(a,b,d,e)};d.prototype.getViewport=function(){return{x:this._viewport.x,y:this._viewport.y,width:this._viewport.width,height:this._viewport.height}};d.prototype.bindProgram=function(a){a?this._activeShaderProgram!==a&&(a.initialize(),this.gl.useProgram(a.glName),this._activeShaderProgram=a):(this.gl.useProgram(null),
  630. this._activeShaderProgram=null)};d.prototype.bindTexture=function(a,b){void 0===b&&(b=0);-1===d._MAX_TEXTURE_IMAGE_UNITS&&(d._MAX_TEXTURE_IMAGE_UNITS=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS));(b>=d._MAX_TEXTURE_IMAGE_UNITS||0>b)&&console.error("Input texture unit is out of range of available units!");var c=this._textureUnitMap[b];this.setActiveTexture(b);null==a||null==a.glName?(null!=c&&(this.gl.bindTexture(c.descriptor.target,null),c.setBoundToUnit(b,!1)),this._textureUnitMap[b]=null):
  631. c&&c.id===a.id?a.applyChanges():(this.gl.bindTexture(a.descriptor.target,a.glName),a.setBoundToUnit(b,!0),a.applyChanges(),this._textureUnitMap[b]=a)};d.prototype.bindFramebuffer=function(a){a?this._activeFramebuffer!==a&&(a.initialize()||this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a.glName),this._activeFramebuffer=a):(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this._activeFramebuffer=null)};d.prototype.bindBuffer=function(a){a&&(34962===a.bufferType?this._activeVertexBuffer=d._bindBuffer(this.gl,
  632. a,a.bufferType,this._activeVertexBuffer):this._activeIndexBuffer=d._bindBuffer(this.gl,a,a.bufferType,this._activeIndexBuffer))};d.prototype.unbindBuffer=function(a){34962===a?this._activeVertexBuffer=d._bindBuffer(this.gl,null,a,this._activeVertexBuffer):this._activeIndexBuffer=d._bindBuffer(this.gl,null,a,this._activeIndexBuffer)};d.prototype.bindVAO=function(a){a?this._activeVertexArrayObject&&this._activeVertexArrayObject.id===a.id||(a.bind(),this._activeVertexArrayObject=a):this._activeVertexArrayObject&&
  633. (this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null)};d.prototype.getBoundTexture=function(a){return this._textureUnitMap[a]};d.prototype.getBoundFramebufferObject=function(){return this._activeFramebuffer};d.prototype.getBoundVAO=function(){return this._activeVertexArrayObject};d.prototype.resetState=function(){this.bindProgram(null);this.bindVAO(null);this.bindFramebuffer(null);this.unbindBuffer(34962);this.unbindBuffer(34963);for(var a=0;a<this.parameters.maxTextureImageUnits;a++)this.bindTexture(null,
  634. a);this.setBlendingEnabled(!1);this.setBlendFunction(1,0);this.setBlendEquation(32774);this.setBlendColor(0,0,0,0);this.setFaceCullingEnabled(!1);this.setCullFace(1029);this.setFrontFace(2305);this.setPolygonOffsetFillEnabled(!1);this.setPolygonOffset(0,0);this.setScissorTestEnabled(!1);this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height);this.setDepthTestEnabled(!1);this.setDepthFunction(513);this.setDepthRange(0,1);this.setStencilTestEnabled(!1);this.setStencilFunction(519,0,0);this.setStencilOp(7680,
  635. 7680,7680);this.setClearColor(0,0,0,0);this.setClearDepth(1);this.setClearStencil(0);this.setColorMask(!0,!0,!0,!0);this.setStencilWriteMask(4294967295);this.setDepthWriteEnabled(!0);this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)};d.prototype.enforceState=function(){var a=this.gl,d=this._capabilities.vao;d&&d.bindVertexArray(null);for(var e=0;e<this.parameters.maxVertexAttributes;e++)a.disableVertexAttribArray(e);this._activeVertexBuffer?a.bindBuffer(this._activeVertexBuffer.bufferType,
  636. this._activeVertexBuffer.glName):a.bindBuffer(34962,null);this._activeIndexBuffer?a.bindBuffer(this._activeIndexBuffer.bufferType,this._activeIndexBuffer.glName):a.bindBuffer(34963,null);if(d&&this._activeVertexArrayObject){if(d=this._activeVertexArrayObject)this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null;this.bindVAO(d)}a.bindFramebuffer(a.FRAMEBUFFER,this._activeFramebuffer?this._activeFramebuffer.glName:null);a.useProgram(this._activeShaderProgram?this._activeShaderProgram.glName:
  637. null);a.blendColor(this._blendColorState.r,this._blendColorState.g,this._blendColorState.b,this._blendColorState.a);!0===this._blendEnabled?a.enable(this.gl.BLEND):a.disable(this.gl.BLEND);a.blendEquationSeparate(this._blendEquationState.mode,this._blendEquationState.modeAlpha);a.blendFuncSeparate(this._blendFunctionState.srcRGB,this._blendFunctionState.dstRGB,this._blendFunctionState.srcAlpha,this._blendFunctionState.dstAlpha);a.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,
  638. this._clearColor.a);a.clearDepth(this._clearDepth);a.clearStencil(this._clearStencil);a.colorMask(this._colorMaskState.r,this._colorMaskState.g,this._colorMaskState.b,this._colorMaskState.a);a.cullFace(this._cullFace);a.depthFunc(this._depthFunction);a.depthRange(this._depthRange.zNear,this._depthRange.zFar);!0===this._depthTestEnabled?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST);a.depthMask(this._depthWriteEnabled);a.frontFace(this._frontFace);a.lineWidth(this._lineWidth);!0===this._polygonCullingEnabled?
  639. a.enable(a.CULL_FACE):a.disable(a.CULL_FACE);a.polygonOffset(this._polygonOffset[0],this._polygonOffset[1]);!0===this._polygonOffsetFillEnabled?a.enable(a.POLYGON_OFFSET_FILL):a.disable(a.POLYGON_OFFSET_FILL);a.scissor(this._scissorRect.x,this._scissorRect.y,this._scissorRect.width,this._scissorRect.height);!0===this._scissorTestEnabled?a.enable(a.SCISSOR_TEST):a.disable(a.SCISSOR_TEST);a.stencilFunc(this._stencilFunction.func,this._stencilFunction.ref,this._stencilFunction.mask);a.stencilOpSeparate(this._stencilOperation.face,
  640. this._stencilOperation.fail,this._stencilOperation.zFail,this._stencilOperation.zPass);!0===this._stencilTestEnabled?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST);a.stencilMask(this._stencilWriteMask);for(d=0;d<this.parameters.maxTextureImageUnits;d++)a.activeTexture(b.BASE_TEXTURE_UNIT+d),a.bindTexture(3553,null),(e=this._textureUnitMap[d])&&a.bindTexture(e.descriptor.target,e.glName);a.activeTexture(b.BASE_TEXTURE_UNIT+this._activeTextureUnit);a.viewport(this._viewport.x,this._viewport.y,this._viewport.width,
  641. this._viewport.height)};d._bindBuffer=function(a,b,d,e){if(!b)return a.bindBuffer(d,null),null;if(e===b)return e;a.bindBuffer(d,b.glName);return b};d._MAX_TEXTURE_IMAGE_UNITS=-1;return d}()})},"esri/views/webgl/enums":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.BASE_TEXTURE_UNIT=33984})},"esri/views/webgl/capabilities/isWebGL2Context":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});
  642. g.default=function(b){return window.WebGL2RenderingContext&&b instanceof WebGL2RenderingContext}})},"esri/views/webgl/capabilities/load":function(){define("require exports ./DisjointTimerQuery ./Instancing ./isWebGL2Context ./VertexArrayObjects".split(" "),function(p,g,b,a,e,d){function c(a,b,c,d,n){if(d&&e.default(a))return!0;if(b[c])return!1;for(b=0;b<n.length;b++)if(a.getExtension(n[b]))return!0;return!1}Object.defineProperty(g,"__esModule",{value:!0});g.loadCapabilities=function(k,f){f=f&&f.disabledExtensions||
  643. {};var l=a.load(k,f),h=d.load(k,f),n;n=f.compressedTextureS3TC?null:(n=k.getExtension("WEBGL_compressed_texture_s3tc"))?{COMPRESSED_RGB_S3TC_DXT1:n.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:n.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:n.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:n.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null;var g;g=f.textureFilterAnisotropic?null:(g=k.getExtension("EXT_texture_filter_anisotropic")||k.getExtension("MOZ_EXT_texture_filter_anisotropic")||
  644. k.getExtension("WEBKIT_EXT_texture_filter_anisotropic"))?{MAX_TEXTURE_MAX_ANISOTROPY:g.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:g.TEXTURE_MAX_ANISOTROPY_EXT}:null;var m=b.load(k,f),u;if(e.default(k))u=f.colorBufferFloat||!k.getExtension("EXT_color_buffer_float")?null:{R16F:k.R16F,RG16F:k.RG16F,RGBA16F:k.RGBA16F,R32F:k.R32F,RG32F:k.RG32F,RGBA32F:k.RGBA32F,R11F_G11F_B10F:k.R11F_G11F_B10F};else if(k instanceof WebGLRenderingContext){u=!f.colorBufferFloat&&k.getExtension("EXT_color_buffer_half_float");
  645. var q=!f.colorBufferFloat&&k.getExtension("WEBGL_color_buffer_float");u=u||q?{RGBA16F:u?u.RGBA16F_EXT:void 0,RGBA32F:q?q.RGBA32F_EXT:void 0}:null}else u=void 0;q=e.default(k)?{MIN:k.MIN,MAX:k.MAX}:f.blendMinMax?null:(q=k.getExtension("EXT_blend_minmax"))?{MIN:q.MIN_EXT,MAX:q.MAX_EXT}:null;return{instancing:l,vao:h,compressedTextureS3TC:n,textureFilterAnisotropic:g,disjointTimerQuery:m,colorBufferFloat:u,blendMinMax:q,depthTexture:c(k,f,"depthTexture",!0,["WEBGL_depth_texture","MOZ_WEBGL_depth_texture",
  646. "WEBKIT_WEBGL_depth_texture"]),standardDerivatives:c(k,f,"standardDerivatives",!0,["OES_standard_derivatives"]),shaderTextureLOD:c(k,f,"shaderTextureLOD",!0,["EXT_shader_texture_lod"]),textureFloatLinear:c(k,f,"textureFloatLinear",!1,["OES_texture_float_linear"]),fragDepth:c(k,f,"fragDepth",!0,["EXT_frag_depth"])}}})},"esri/views/webgl/capabilities/DisjointTimerQuery":function(){define(["require","exports","./isWebGL2Context"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});g.load=
  647. function(a,e){if(e.disjointTimerQuery)return null;var d=a.getExtension("EXT_disjoint_timer_query")||a.getExtension("EXT_disjoint_timer_query_webgl2");return d?b.default(a)?{createQuery:function(){return a.createQuery()},resultAvailable:function(b){return a.getQueryParameter(b,a.QUERY_RESULT_AVAILABLE)},getResult:function(b){return a.getQueryParameter(b,a.QUERY_RESULT)},disjoint:function(){return a.getParameter(d.GPU_DISJOINT_EXT)},beginTimeElapsed:function(b){return a.beginQuery(d.TIME_ELAPSED_EXT,
  648. b)},endTimeElapsed:function(){return a.endQuery(d.TIME_ELAPSED_EXT)},createTimestamp:function(a){return d.queryCounterEXT(a,d.TIMESTAMP_EXT)},timestampBits:function(){return a.getQuery(d.TIMESTAMP_EXT,d.QUERY_COUNTER_BITS_EXT)}}:{createQuery:function(){return d.createQueryEXT()},resultAvailable:function(a){return d.getQueryObjectEXT(a,d.QUERY_RESULT_AVAILABLE_EXT)},getResult:function(a){return d.getQueryObjectEXT(a,d.QUERY_RESULT_EXT)},disjoint:function(){return a.getParameter(d.GPU_DISJOINT_EXT)},
  649. beginTimeElapsed:function(a){return d.beginQueryEXT(d.TIME_ELAPSED_EXT,a)},endTimeElapsed:function(){return d.endQueryEXT(d.TIME_ELAPSED_EXT)},createTimestamp:function(a){return d.queryCounterEXT(a,d.TIMESTAMP_EXT)},timestampBits:function(){return d.getQueryEXT(d.TIMESTAMP_EXT,d.QUERY_COUNTER_BITS_EXT)}}:null}})},"esri/views/webgl/capabilities/Instancing":function(){define(["require","exports","./isWebGL2Context"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});g.load=function(a,
  650. e){return b.default(a)?{drawArraysInstanced:a.drawArraysInstanced.bind(a),drawElementsInstanced:a.drawElementsInstanced.bind(a),vertexAttribDivisor:a.vertexAttribDivisor.bind(a)}:e.angleInstancedArrays?null:(a=a.getExtension("ANGLE_instanced_arrays"))?{drawArraysInstanced:a.drawArraysInstancedANGLE.bind(a),drawElementsInstanced:a.drawElementsInstancedANGLE.bind(a),vertexAttribDivisor:a.vertexAttribDivisorANGLE.bind(a)}:null}})},"esri/views/webgl/capabilities/VertexArrayObjects":function(){define(["require",
  651. "exports","./isWebGL2Context"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});g.load=function(a,e){return b.default(a)?{createVertexArray:a.createVertexArray.bind(a),deleteVertexArray:a.deleteVertexArray.bind(a),bindVertexArray:a.bindVertexArray.bind(a)}:e.vao?null:(a=a.getExtension("OES_vertex_array_object")||a.getExtension("MOZ_OES_vertex_array_object")||a.getExtension("WEBKIT_OES_vertex_array_object"))?{createVertexArray:a.createVertexArrayOES.bind(a),deleteVertexArray:a.deleteVertexArrayOES.bind(a),
  652. bindVertexArray:a.bindVertexArrayOES.bind(a)}:null}})},"esri/views/2d/input/MapViewInputManager":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Accessor ../../../core/Handles ../../../core/watchUtils ../../../core/accessorSupport/decorators ../input/handlers/DoubleClickZoom ../input/handlers/DragPan ../input/handlers/DragRotate ../input/handlers/KeyPan ../input/handlers/KeyRotate ../input/handlers/KeyZoom ../input/handlers/MouseWheelZoom ../input/handlers/PinchAction ../../input/BrowserEventSource ../../input/InputManager ../../input/ViewEvents ../../input/handlers/PreventContextMenu".split(" "),
  653. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x,v,B){var w={left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown"},z={zoomIn:["\x3d","+"],zoomOut:["-","_"]},y={clockwiseOption1:"a",clockwiseOption2:"A",counterClockwiseOption1:"d",counterClockwiseOption2:"D",resetOption1:"n",resetOption2:"N"};return function(e){function g(){var a=null!==e&&e.apply(this,arguments)||this;a._handles=new d;return a}b(g,e);g.prototype.initialize=function(){var a=this;this.viewEvents=new v.ViewEvents(this.view);
  654. this._handles.add([c.whenNot(this.view,"ready",function(){return a._disconnect()}),c.when(this.view,"ready",function(){return a._connect()})])};g.prototype.destroy=function(){this._handles&&(this._handles.removeAll(),this._handles=null);this._disconnect();this.viewEvents.destroy();this.viewEvents=null};g.prototype._disconnect=function(){this._inputManager&&(this.viewEvents.disconnect(),this._source.destroy(),this._inputManager.destroy(),this._inputManager=this._source=null)};g.prototype._connect=
  655. function(){var a=new t.BrowserEventSource(this.view.surface),b=new x.InputManager(a);b.installHandlers("prevent-context-menu",[new B.PreventContextMenu]);b.installHandlers("navigation",[new q.PinchRotateAndZoom(this.view),new u.MouseWheelZoom(this.view),new f.DoubleClickZoom(this.view),new l.DragPan(this.view,"primary"),new n.KeyPan(this.view,w),new m.KeyZoom(this.view,z),new r.KeyRotate(this.view,y),new h.DragRotate(this.view,"secondary"),new f.DoubleClickZoom(this.view,["Ctrl"])]);this.viewEvents.connect(b);
  656. this._source=a;this._inputManager=b};a([k.property()],g.prototype,"view",void 0);return g=a([k.subclass("esri.views.2d.input.MapViewInputManager")],g)}(k.declared(e))})},"esri/views/2d/input/handlers/DoubleClickZoom":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler","../../../input/handlers/support"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function c(b,c){var d=a.call(this,!0)||this;d.view=b;d.registerIncoming("double-click",
  657. c,function(a){return d._handleDoubleClick(a,c)});return d}b(c,a);c.prototype._handleDoubleClick=function(a,b){e.eventMatchesPointerAction(a.data,"primary")&&(a.stopPropagation(),b?this.view.navigation.zoomOut([a.data.x,a.data.y]):this.view.navigation.zoomIn([a.data.x,a.data.y]))};return c}(a.InputHandler);g.DoubleClickZoom=p})},"esri/views/input/InputHandler":function(){define(["require","exports","../../core/Logger","./EventMatch"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});
  658. var e=b.getLogger("esri.views.input.InputHandler");p=function(){function b(a){this._manager=null;this._incoming={};this._outgoing={};this._outgoingEventTypes=this._incomingEventTypes=this._incomingEventMatches=null;this._hasSideEffects=a}Object.defineProperty(b.prototype,"incomingEventMatches",{get:function(){if(!this._incomingEventMatches){this._incomingEventMatches=[];for(var a in this._incoming)for(var b=0,c=this._incoming[a];b<c.length;b++)this._incomingEventMatches.push(c[b].match)}return this._incomingEventMatches},
  659. enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"incomingEventTypes",{get:function(){this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map(function(a){return a.eventType}));return this._incomingEventTypes},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"outgoingEventTypes",{get:function(){this._outgoingEventTypes||(this._outgoingEventTypes=Object.keys(this._outgoing));return this._outgoingEventTypes},enumerable:!0,configurable:!0});
  660. Object.defineProperty(b.prototype,"hasSideEffects",{get:function(){return this._hasSideEffects},enumerable:!0,configurable:!0});b.prototype.onInstall=function(a){var b=this;this._manager?e.error("This InputHandler has already been registered with an InputManager"):(a.setEventCallback(function(a){return b._handleEvent(a)}),a.setUninstallCallback(function(){return b._onUninstall()}),this._manager=a)};b.prototype.onUninstall=function(){};b.prototype.registerIncoming=function(b,c,e){var f=this;"function"===
  661. typeof c?(e=c,c=[]):c=c||[];b="string"===typeof b?new a.EventMatch(b,c):b;var h=function(){f._incomingEventTypes=null;f._incomingEventMatches=null};c=function(a){var b=f._incoming[a.match.eventType];b&&(a=b.indexOf(a),b.splice(a,1),h(),f._manager&&f._manager.updateDependencies())};e=new d(b,e,{onPause:c,onRemove:c,onResume:function(a){var b=f._incoming[a.match.eventType];b&&-1===b.indexOf(a)&&(b.push(a),h(),f._manager&&f._manager.updateDependencies())}});c=this._incoming[b.eventType];c||(c=[],this._incoming[b.eventType]=
  662. c);c.push(e);h();this._manager&&this._manager.updateDependencies();return e};b.prototype.registerOutgoing=function(a){var b=this;if(this._outgoing[a])throw Error("There is already a callback registered for this outgoing InputEvent: "+a);var d=new c(a,{onEmit:function(a,c,d,e){b._manager.emit(a.eventType,c,d,e)},onRemove:function(a){delete b._outgoing[a.eventType];b._manager.updateDependencies()}});this._outgoing[a]=d;this._outgoingEventTypes=null;this._manager&&this._manager.updateDependencies();
  663. return d};b.prototype.startCapturingPointer=function(a){this._manager.setPointerCapture(a,!0)};b.prototype.stopCapturingPointer=function(a){this._manager.setPointerCapture(a,!1)};b.prototype._onUninstall=function(){this._manager?(this.onUninstall(),this._manager=null):e.error("This InputHandler is not registered with an InputManager")};b.prototype._handleEvent=function(a){var b=this._incoming[a.type];if(b)for(var c=0;c<b.length;c++){var d=b[c];if(d.match.matches(a)&&(d.callback(a),a.shouldStopPropagation()))break}};
  664. return b}();g.InputHandler=p;var d=function(){function a(a,b,c){this.match=a;this._callback=b;this._handler=c}a.prototype.pause=function(){this._handler.onPause(this)};a.prototype.resume=function(){this._handler.onResume(this)};a.prototype.remove=function(){this._handler.onRemove(this)};Object.defineProperty(a.prototype,"callback",{get:function(){return this._callback},enumerable:!0,configurable:!0});return a}(),c=function(){function a(a,b){this.eventType=a;this._removed=!1;this._handler=b}a.prototype.emit=
  665. function(a,b,c){if(!this._removed)this._handler.onEmit(this,a,b,c)};a.prototype.remove=function(){this._removed=!0;this._handler.onRemove(this)};return a}()})},"esri/views/input/EventMatch":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function b(a,b){void 0===b&&(b=[]);this.eventType=a;this.keyModifiers=b}b.prototype.matches=function(a){if(a.type!==this.eventType)return!1;if(0===this.keyModifiers.length)return!0;a=a.modifiers;
  666. for(var b=0,d=this.keyModifiers;b<d.length;b++)if(!a.has(d[b]))return!1;return!0};return b}();g.EventMatch=p})},"esri/views/input/handlers/support":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.eventMatchesPointerAction=function(b,a){switch(a){case "primary":return"touch"===b.pointerType||0===b.button;case "secondary":return"touch"!==b.pointerType&&2===b.button;case "tertiary":return"touch"!==b.pointerType&&1===b.button}};g.eventMatchesMousePointerAction=
  667. function(b,a){if("touch"===b.pointerType)return!1;switch(a){case "primary":return 0===b.button;case "secondary":return 2===b.button;case "tertiary":return 1===b.button}}})},"esri/views/2d/input/handlers/DragPan":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../input/DragEventSeparator ../../../input/InputHandler ../../../input/handlers/support".split(" "),function(p,g,b,a,e,d){Object.defineProperty(g,"__esModule",{value:!0});p=function(c){function e(b,e,h){var f=
  668. c.call(this,!0)||this;f.view=b;f.pointerAction=e;f.registerIncoming("drag",h,function(a){return f._handleDrag(a)});f.registerIncoming("pointer-down",function(a){return f.stopMomentumNavigation()});var k=f.view.navigation;f.dragEventSeparator=new a.DragEventSeparator({start:function(a,b){k.pan.begin(f.view,b.data);b.stopPropagation()},update:function(a,b){k.pan.update(f.view,b.data);b.stopPropagation()},end:function(a,b){k.pan.end(f.view,b.data);b.stopPropagation()},condition:function(a,b){return 1===
  669. a&&d.eventMatchesPointerAction(b.data,f.pointerAction)}});return f}b(e,c);e.prototype._handleDrag=function(a){var b=this.view.navigation;b.pinch.zoomMomentum||b.pinch.rotateMomentum?this.stopMomentumNavigation():this.dragEventSeparator.handle(a)};e.prototype.stopMomentumNavigation=function(){this.view.navigation.pan.stopMomentumNavigation()};return e}(e.InputHandler);g.DragPan=p})},"esri/views/input/DragEventSeparator":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,
  670. "__esModule",{value:!0});p=function(){function b(a){this.callbacks=a;this.currentCount=0;this.callbacks.condition||(this.callbacks.condition=function(){return!0})}b.prototype.handle=function(a){var b=a.data,d=b.pointers.size;switch(b.action){case "start":this.currentCount=d;this.emitStart(a);break;case "added":this.emitEnd(this.previousEvent);this.currentCount=d;this.emitStart(a);break;case "update":this.emitUpdate(a);break;case "removed":this.startEvent&&this.emitEnd(this.previousEvent);this.currentCount=
  671. d;this.emitStart(a);break;case "end":this.emitEnd(a),this.currentCount=0}this.previousEvent=a};b.prototype.emitStart=function(a){this.startEvent=a;this.callbacks.condition(this.currentCount,a)&&this.callbacks.start(this.currentCount,a,this.startEvent)};b.prototype.emitUpdate=function(a){this.callbacks.condition(this.currentCount,a)&&this.callbacks.update(this.currentCount,a,this.startEvent)};b.prototype.emitEnd=function(a){this.callbacks.condition(this.currentCount,a)&&this.callbacks.end(this.currentCount,
  672. a,this.startEvent);this.startEvent=null};return b}();g.DragEventSeparator=p})},"esri/views/2d/input/handlers/DragRotate":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../input/DragEventSeparator ../../../input/InputHandler ../../../input/handlers/support".split(" "),function(p,g,b,a,e,d){Object.defineProperty(g,"__esModule",{value:!0});p=function(c){function e(b,e,h){var f=c.call(this,!0)||this;f.view=b;f.pointerAction=e;var k=f.view.navigation;f.dragEventSeparator=
  673. new a.DragEventSeparator({start:function(a,b){k.rotate.begin(f.view,b.data);b.stopPropagation()},update:function(a,b){k.rotate.update(f.view,b.data);b.stopPropagation()},end:function(a,b){k.rotate.end(f.view,b.data);b.stopPropagation()},condition:function(a,b){return 1===a&&d.eventMatchesPointerAction(b.data,f.pointerAction)}});f.registerIncoming("drag",h,function(a){return f.dragEventSeparator.handle(a)});return f}b(e,c);return e}(e.InputHandler);g.DragRotate=p})},"esri/views/2d/input/handlers/KeyPan":function(){define(["require",
  674. "exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function d(b,d,e){var c=a.call(this,!0)||this;c.view=b;c.keys=d;c._keyMap=(f={},f[d.left]="left",f[d.right]="right",f[d.up]="up",f[d.down]="down",f);c.registerIncoming("key-down",e,function(a){return c._handleKeyDown(a)});c.registerIncoming("key-up",e,function(a){return c._handleKeyUp(a)});return c;var f}b(d,a);d.prototype._handleKeyDown=
  675. function(a){a.data.repeat||this._handleKey(a,!0)};d.prototype._handleKeyUp=function(a){this._handleKey(a,!1)};d.prototype._handleKey=function(a,b){var c=this._keyMap[a.data.key];if(null!=c){if(b)switch(c){case "left":this.view.navigation.continousPanLeft();break;case "right":this.view.navigation.continousPanRight();break;case "up":this.view.navigation.continousPanUp();break;case "down":this.view.navigation.continousPanDown()}else this.view.navigation.stop();a.stopPropagation()}};return d}(a.InputHandler);
  676. g.KeyPan=p})},"esri/views/2d/input/handlers/KeyRotate":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function d(b,d,e){var c=a.call(this,!0)||this;c.view=b;c.keys=d;c._keyToDirection=(f={},f[d.clockwiseOption1]="clockwise",f[d.clockwiseOption2]="clockwise",f[d.counterClockwiseOption1]="counterClockwise",f[d.counterClockwiseOption2]="counterClockwise",
  677. f[d.resetOption1]="reset",f[d.resetOption2]="reset",f);c.registerIncoming("key-down",e,function(a){return c._handleKeyDown(a)});c.registerIncoming("key-up",e,function(a){return c._handleKeyUp(a)});return c;var f}b(d,a);d.prototype._handleKeyDown=function(a){a.data.repeat||this._handleKey(a,!0)};d.prototype._handleKeyUp=function(a){this._handleKey(a,!1)};d.prototype._handleKey=function(a,b){var c=a.modifiers;0<c.size&&!c.has("Shift")||!this.view.constraints.rotationEnabled||!(c=this._keyToDirection[a.data.key])||
  678. (b?"clockwise"===c?this.view.navigation.continousRotateClockwise():"counterClockwise"===c?this.view.navigation.continousRotateCounterclockwise():this.view.navigation.resetRotation():this.view.navigation.stop(),a.stopPropagation())};return d}(a.InputHandler);g.KeyRotate=p})},"esri/views/2d/input/handlers/KeyZoom":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});var e;(function(a){a[a.IN=
  679. 0]="IN";a[a.OUT=1]="OUT"})(e||(e={}));p=function(a){function c(b,c,d){var f=a.call(this,!0)||this;f.view=b;f.keys=c;f._keysToZoomAction={};f.registerIncoming("key-down",d,function(a){return f._handleKeyDown(a)});c.zoomIn.forEach(function(a){return f._keysToZoomAction[a]=e.IN});c.zoomOut.forEach(function(a){return f._keysToZoomAction[a]=e.OUT});return f}b(c,a);c.prototype._handleKeyDown=function(a){this._handleKey(a)};c.prototype._handleKey=function(a){var b=a.modifiers;0<b.size&&!b.has("Shift")||
  680. (b=this._keysToZoomAction[a.data.key],b===e.IN?(this.view.navigation.zoomIn(),a.stopPropagation()):b===e.OUT&&(this.view.navigation.zoomOut(),a.stopPropagation()))};return c}(a.InputHandler);g.KeyZoom=p})},"esri/views/2d/input/handlers/MouseWheelZoom":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function d(b,d){var c=a.call(this,!0)||this;c.view=b;c._canZoom=
  681. !0;c.registerIncoming("mouse-wheel",d,function(a){return c._handleMouseWheel(a)});return c}b(d,a);d.prototype._handleMouseWheel=function(a){var b=this;if(this._canZoom){var c=this.view.navigation,d=a.data;if(d=c.zoom(1/Math.pow(.6,1/60*d.deltaY),[d.x,d.y]))this._canZoom=!1,d.always(function(){b._canZoom=!0;c.end()});a.stopPropagation()}};return d}(a.InputHandler);g.MouseWheelZoom=p})},"esri/views/2d/input/handlers/PinchAction":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper",
  682. "../../../input/DragEventSeparator","../../../input/InputHandler"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function c(b){var c=d.call(this,!0)||this;c.view=b;c.registerIncoming("drag",function(a){return c._handleDrag(a)});c.registerIncoming("pointer-down",function(a){return c.stopMomentumNavigation()});var e=c.view.navigation;c.dragEventSeparator=new a.DragEventSeparator({start:function(a,b){e.pinch.begin(c.view,b.data);b.stopPropagation()},update:function(a,
  683. b){e.pinch.update(c.view,b.data);b.stopPropagation()},end:function(a,b){e.pinch.end(c.view,b.data);b.stopPropagation()},condition:function(a){return 2<=a}});return c}b(c,d);c.prototype._handleDrag=function(a){this.dragEventSeparator.handle(a)};c.prototype.stopMomentumNavigation=function(){this.view.navigation.pinch.stopMomentumNavigation()};return c}(e.InputHandler);g.PinchRotateAndZoom=p})},"esri/views/input/BrowserEventSource":function(){define(["require","exports","dojo/sniff","../../core/libs/pep/pep",
  684. "./keys"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});var d=b("trident"),c=b("edge"),k=b("chrome"),f=b("ff"),l=b("safari");p=function(){function b(b){this._active={};this._activePointerCaptures=new Set;this._keyDownState=new Set;this._element=b;a.applyLocal(b);b.getAttribute("tabindex")||b.setAttribute("tabindex","0");this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,
  685. "pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost};this._initialCssTouchAction=b.style.touchAction;b.style.touchAction="none";this._element.addEventListener("keydown",this._preventAltKeyDefault)}b.prototype.destroy=function(){var a=this;this.activeEvents=this._callback=null;this._activePointerCaptures.forEach(function(b){a._element.releasePointerCapture(b)});
  686. this._activePointerCaptures=null;this._element.style.touchAction=this._initialCssTouchAction;this._element.removeEventListener("keydown",this._preventAltKeyDefault)};Object.defineProperty(b.prototype,"onEventReceived",{set:function(a){this._callback=a},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"activeEvents",{set:function(a){var b=this,c;for(c in this._active)a&&a.has(c)||(this._element.removeEventListener(h[c],this._active[c]),delete this._active[c]);a&&a.forEach(function(a){if(!b._active[a]&&
  687. h[a]){var c=(b._eventHandlers[a]||b._handleDefault).bind(b,a);b._element.addEventListener(h[a],c);b._active[a]=c}})},enumerable:!0,configurable:!0});b.prototype.setPointerCapture=function(a,b){b?(this._element.setPointerCapture(a.pointerId),this._activePointerCaptures.add(a.pointerId)):(this._element.releasePointerCapture(a.pointerId),this._activePointerCaptures.delete(a.pointerId))};b.prototype._updateNormalizedPointerLikeEvent=function(a,b){var c=this._element.getBoundingClientRect();b.x=a.clientX-
  688. Math.round(c.left);b.y=a.clientY-Math.round(c.top);return b};b.prototype._handleKey=function(a,b){var c=e.eventKey(b);c&&"key-up"===a&&this._keyDownState.delete(c);b={native:b,key:c,repeat:c&&this._keyDownState.has(c)};c&&"key-down"===a&&this._keyDownState.add(b.key);this._callback(a,b)};b.prototype._handlePointer=function(a,b){b=this._updateNormalizedPointerLikeEvent(b,{native:b,x:0,y:0,pointerType:b.pointerType,button:b.button,buttons:b.buttons});this._callback(a,b)};b.prototype._handlePointerPreventDefault=
  689. function(a,b){var c=this._updateNormalizedPointerLikeEvent(b,{native:b,x:0,y:0,pointerType:b.pointerType,button:b.button,buttons:b.buttons});b.preventDefault();this._callback(a,c)};b.prototype._handleMouseWheel=function(a,b){b.preventDefault();var e=b.deltaY;switch(b.deltaMode){case 0:if(d||c)e=e/document.documentElement.clientHeight*600;break;case 1:e*=30;break;case 2:e*=900}d||c?e*=.7:k||l?e*=.6:f&&(e*=1.375);var h=Math.abs(e);100<h&&(e=e/h*200/(1+Math.exp(-.02*(h-100))));b=this._updateNormalizedPointerLikeEvent(b,
  690. {native:b,x:0,y:0,deltaY:e});this._callback(a,b)};b.prototype._handlePointerCaptureLost=function(a,b){this._activePointerCaptures.delete(b.pointerId);this._handleDefault(a,b)};b.prototype._handleDefault=function(a,b){var c={native:b};b.preventDefault();this._callback(a,c)};b.prototype._preventAltKeyDefault=function(a){"Alt"===a.key&&a.preventDefault()};return b}();g.BrowserEventSource=p;var h={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove",
  691. "mouse-wheel":"wheel","pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","pointer-enter":"pointerenter","pointer-leave":"pointerleave"}})},"esri/core/libs/pep/pep":function(){define(function(){function p(a,b){b=b||Object.create(null);var c=document.createEvent("Event");c.initEvent(a,b.bubbles||!1,b.cancelable||!1);a=2;for(var d;a<l.length;a++)d=l[a],c[d]=b[d]||h[a];c.buttons=b.buttons||0;a=0;a=b.pressure?b.pressure:c.buttons?.5:0;c.x=
  692. c.clientX;c.y=c.clientY;c.pointerId=b.pointerId||0;c.width=b.width||0;c.height=b.height||0;c.pressure=a;c.tiltX=b.tiltX||0;c.tiltY=b.tiltY||0;c.pointerType=b.pointerType||"";c.hwTimestamp=b.hwTimestamp||0;c.isPrimary=b.isPrimary||!1;return c}function g(){this.array=[];this.size=0}function b(a,b,c,d){this.addCallback=a.bind(d);this.removeCallback=b.bind(d);this.changedCallback=c.bind(d);y&&(this.observer=new y(this.mutationWatcher.bind(this)))}function a(a){return"body /shadow-deep/ "+e(a)}function e(a){return'[touch-action\x3d"'+
  693. a+'"]'}function d(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+"; touch-action-delay: none; }"}function c(){if(E){C.forEach(function(b){String(b)===b?(D+=e(b)+d(b)+"\n",G&&(D+=a(b)+d(b)+"\n")):(D+=b.selectors.map(e)+d(b.rule)+"\n",G&&(D+=b.selectors.map(a)+d(b.rule)+"\n"))});var b=document.createElement("style");b.textContent=D;document.head.appendChild(b)}}function k(a){if(!t.pointermap.has(a))throw a=Error("InvalidPointerId"),a.name="InvalidPointerId",a;}function f(a){if(!a.ownerDocument.contains(a))throw a=
  694. Error("InvalidStateError"),a.name="InvalidStateError",a;}var l="bubbles cancelable view detail screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button relatedTarget pageX pageY".split(" "),h=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],n=window.Map&&window.Map.prototype.forEach?Map:g;g.prototype={set:function(a,b){if(void 0===b)return this.delete(a);this.has(a)||this.size++;this.array[a]=b},has:function(a){return void 0!==this.array[a]},delete:function(a){this.has(a)&&(delete this.array[a],
  695. this.size--)},get:function(a){return this.array[a]},clear:function(){this.size=this.array.length=0},forEach:function(a,b){return this.array.forEach(function(c,d){a.call(b,c,d,this)},this)}};var r="bubbles cancelable view detail screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button relatedTarget buttons pointerId width height pressure tiltX tiltY pointerType hwTimestamp isPrimary type target currentTarget which pageX pageY timeStamp".split(" "),m=[!1,!1,null,null,0,0,0,0,!1,!1,!1,
  696. !1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],u={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},q="undefined"!==typeof SVGElementInstance,t={pointermap:new n,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(a,b){var c=b.events;c&&(c.forEach(function(a){b[a]&&(this.eventMap[a]=b[a].bind(b))},this),this.eventSources[a]=b,this.eventSourceList.push(b))},register:function(a){for(var b=this.eventSourceList.length,
  697. c=0,d;c<b&&(d=this.eventSourceList[c]);c++)d.register.call(d,a)},unregister:function(a){for(var b=this.eventSourceList.length,c=0,d;c<b&&(d=this.eventSourceList[c]);c++)d.unregister.call(d,a)},contains:function(a,b){try{return a.contains(b)}catch(Q){return!1}},down:function(a){a.bubbles=!0;this.fireEvent("pointerdown",a)},move:function(a){a.bubbles=!0;this.fireEvent("pointermove",a)},up:function(a){a.bubbles=!0;this.fireEvent("pointerup",a)},enter:function(a){a.bubbles=!1;this.fireEvent("pointerenter",
  698. a)},leave:function(a){a.bubbles=!1;this.fireEvent("pointerleave",a)},over:function(a){a.bubbles=!0;this.fireEvent("pointerover",a)},out:function(a){a.bubbles=!0;this.fireEvent("pointerout",a)},cancel:function(a){a.bubbles=!0;this.fireEvent("pointercancel",a)},leaveOut:function(a){this.out(a);this.propagate(a,this.leave,!1)},enterOver:function(a){this.over(a);this.propagate(a,this.enter,!0)},eventHandler:function(a){if(!a._handledByPE){var b=a.type;(b=this.eventMap&&this.eventMap[b])&&b(a);a._handledByPE=
  699. !0}},listen:function(a,b){b.forEach(function(b){this.addEvent(a,b)},this)},unlisten:function(a,b){b.forEach(function(b){this.removeEvent(a,b)},this)},addEvent:function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:function(a,b){a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){this.captureInfo[b.pointerId]&&(b.relatedTarget=null);a=new p(a,b);b.preventDefault&&(a.preventDefault=b.preventDefault);a._target=a._target||b.target;return a},fireEvent:function(a,b){a=this.makeEvent(a,
  700. b);return this.dispatchEvent(a)},cloneEvent:function(a){for(var b=Object.create(null),c,d=0;d<r.length;d++)c=r[d],b[c]=a[c]||m[d],q&&("target"===c||"relatedTarget"===c)&&b[c]instanceof SVGElementInstance&&(b[c]=b[c].correspondingUseElement);a.preventDefault&&(b.preventDefault=function(){a.preventDefault()});return b},getTarget:function(a){var b=this.captureInfo[a.pointerId];if(!b)return a._target;if(a._target===b||!(a.type in u))return b},propagate:function(a,b,c){for(var d=a.target,e=[];!d.contains(a.relatedTarget)&&
  701. d!==document;)e.push(d),d=d.parentNode;c&&e.reverse();e.forEach(function(c){a.target=c;b.call(this,a)},this)},setCapture:function(a,b){this.captureInfo[a]&&this.releaseCapture(a);this.captureInfo[a]=b;var c=new p("gotpointercapture");c.pointerId=a;this.implicitRelease=this.releaseCapture.bind(this,a);document.addEventListener("pointerup",this.implicitRelease);document.addEventListener("pointercancel",this.implicitRelease);c._target=b;this.asyncDispatchEvent(c)},releaseCapture:function(a){var b=this.captureInfo[a];
  702. if(b){var c=new p("lostpointercapture");c.pointerId=a;this.captureInfo[a]=void 0;document.removeEventListener("pointerup",this.implicitRelease);document.removeEventListener("pointercancel",this.implicitRelease);c._target=b;this.asyncDispatchEvent(c)}},dispatchEvent:function(a){var b=this.getTarget(a);if(b)return b.dispatchEvent(a)},asyncDispatchEvent:function(a){requestAnimationFrame(this.dispatchEvent.bind(this,a))}};t.boundHandler=t.eventHandler.bind(t);var x={shadow:function(a){if(a)return a.shadowRoot||
  703. a.webkitShadowRoot},canTarget:function(a){return a&&!!a.elementFromPoint},targetingShadow:function(a){a=this.shadow(a);if(this.canTarget(a))return a},olderShadow:function(a){var b=a.olderShadowRoot;!b&&(a=a.querySelector("shadow"))&&(b=a.olderShadowRoot);return b},allShadows:function(a){var b=[];for(a=this.shadow(a);a;)b.push(a),a=this.olderShadow(a);return b},searchRoot:function(a,b,c){if(a){var d=a.elementFromPoint(b,c),e;for(e=this.targetingShadow(d);e;){if(a=e.elementFromPoint(b,c))return d=this.targetingShadow(a),
  704. this.searchRoot(d,b,c)||a;e=this.olderShadow(e)}return d}},owner:function(a){for(;a.parentNode;)a=a.parentNode;a.nodeType!==Node.DOCUMENT_NODE&&a.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(a=document);return a},findTarget:function(a){var b=a.clientX,c=a.clientY;a=this.owner(a.target);a.elementFromPoint(b,c)||(a=document);return this.searchRoot(a,b,c)}},v=Array.prototype.forEach.call.bind(Array.prototype.forEach),B=Array.prototype.map.call.bind(Array.prototype.map),w=Array.prototype.slice.call.bind(Array.prototype.slice),
  705. z=Array.prototype.filter.call.bind(Array.prototype.filter),y=window.MutationObserver||window.WebKitMutationObserver,A={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]};b.prototype={watchSubtree:function(a){this.observer&&x.canTarget(a)&&this.observer.observe(a,A)},enableOnSubtree:function(a){this.watchSubtree(a);a===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(a)},installNewSubtree:function(a){v(this.findElements(a),
  706. this.addElement,this)},findElements:function(a){return a.querySelectorAll?a.querySelectorAll("[touch-action]"):[]},removeElement:function(a){this.removeCallback(a)},addElement:function(a){this.addCallback(a)},elementChanged:function(a,b){this.changedCallback(a,b)},concatLists:function(a,b){return a.concat(w(b))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(a){return a.nodeType===
  707. Node.ELEMENT_NODE},flattenMutationTree:function(a){var b=B(a,this.findElements,this);b.push(z(a,this.isElement));return b.reduce(this.concatLists,[])},mutationWatcher:function(a){a.forEach(this.mutationHandler,this)},mutationHandler:function(a){"childList"===a.type?(this.flattenMutationTree(a.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(a.removedNodes).forEach(this.removeElement,this)):"attributes"===a.type&&this.elementChanged(a.target,a.oldValue)}};var C=["none","auto","pan-x",
  708. "pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],D="",E=window.PointerEvent||window.MSPointerEvent,G=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,F=t.pointermap,K=[1,4,2,8,16],J=!1;try{J=1===(new MouseEvent("test",{buttons:1})).buttons}catch(P){}var H={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(a){t.listen(a,this.events)},unregister:function(a){t.unlisten(a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a){var b=
  709. this.lastTouches,c=a.clientX;a=a.clientY;for(var d=0,e=b.length,f;d<e&&(f=b[d]);d++){var h=Math.abs(a-f.y);if(25>=Math.abs(c-f.x)&&25>=h)return!0}},prepareEvent:function(a){var b=t.cloneEvent(a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=this.POINTER_ID;b.isPrimary=!0;b.pointerType=this.POINTER_TYPE;return b},prepareButtonsForMove:function(a,b){var c=F.get(this.POINTER_ID);a.buttons=0!==b.which&&c?c.buttons:0;b.buttons=a.buttons},mousedown:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=
  710. F.get(this.POINTER_ID),c=this.prepareEvent(a);J||(c.buttons=K[c.button],b&&(c.buttons|=b.buttons),a.buttons=c.buttons);F.set(this.POINTER_ID,a);b&&0!==b.buttons?t.move(c):t.down(c)}},mousemove:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=this.prepareEvent(a);J||this.prepareButtonsForMove(b,a);b.button=-1;F.set(this.POINTER_ID,a);t.move(b)}},mouseup:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=F.get(this.POINTER_ID),c=this.prepareEvent(a);if(!J){var d=K[c.button];c.buttons=
  711. b?b.buttons&~d:0;a.buttons=c.buttons}F.set(this.POINTER_ID,a);c.buttons&=~K[c.button];0===c.buttons?t.up(c):t.move(c)}},mouseover:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=this.prepareEvent(a);J||this.prepareButtonsForMove(b,a);b.button=-1;F.set(this.POINTER_ID,a);t.enterOver(b)}},mouseout:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=this.prepareEvent(a);J||this.prepareButtonsForMove(b,a);b.button=-1;t.leaveOut(b)}},cancel:function(a){a=this.prepareEvent(a);t.cancel(a);
  712. this.deactivateMouse()},deactivateMouse:function(){F.delete(this.POINTER_ID)}},U=t.captureInfo,V=x.findTarget.bind(x),Y=x.allShadows.bind(x),O=t.pointermap,Z,R={events:["touchstart","touchmove","touchend","touchcancel"],register:function(a){Z.enableOnSubtree(a)},unregister:function(a){},elementAdded:function(a){var b=a.getAttribute("touch-action"),c=this.touchActionToScrollType(b);c&&(a._scrollType=c,t.listen(a,this.events),Y(a).forEach(function(a){a._scrollType=c;t.listen(a,this.events)},this))},
  713. elementRemoved:function(a){a._scrollType=void 0;t.unlisten(a,this.events);Y(a).forEach(function(a){a._scrollType=void 0;t.unlisten(a,this.events)},this)},elementChanged:function(a,b){var c=a.getAttribute("touch-action"),d=this.touchActionToScrollType(c);b=this.touchActionToScrollType(b);d&&b?(a._scrollType=d,Y(a).forEach(function(a){a._scrollType=d},this)):b?this.elementRemoved(a):d&&this.elementAdded(a)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},
  714. touchActionToScrollType:function(a){var b=this.scrollTypes;if("none"===a)return"none";if(a===b.XSCROLLER)return"X";if(a===b.YSCROLLER)return"Y";if(b.SCROLLER.exec(a))return"XY"},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){if(0===O.size||1===O.size&&O.has(1))this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.scrolling=!1,this.cancelResetClickCount()},removePrimaryPointer:function(a){a.isPrimary&&
  715. (this.firstXY=this.firstTouch=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=function(){this.clickCount=0;this.resetId=null}.bind(this);this.resetId=setTimeout(a,200)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(a){var b=0;if("touchstart"===a||"touchmove"===a)b=1;return b},touchToPointer:function(a){var b=this.currentTouchEvent,c=t.cloneEvent(a),d=c.pointerId=a.identifier+2;c.target=U[d]||V(c);c.bubbles=
  716. !0;c.cancelable=!0;c.detail=this.clickCount;c.button=0;c.buttons=this.typeToButtons(b.type);c.width=a.radiusX||a.webkitRadiusX||0;c.height=a.radiusY||a.webkitRadiusY||0;c.pressure=a.force||a.webkitForce||.5;c.isPrimary=this.isPrimaryTouch(a);c.pointerType=this.POINTER_TYPE;c.altKey=b.altKey;c.ctrlKey=b.ctrlKey;c.metaKey=b.metaKey;c.shiftKey=b.shiftKey;var e=this;c.preventDefault=function(){e.scrolling=!1;e.firstXY=null;b.preventDefault()};return c},processTouches:function(a,b){var c=a.changedTouches;
  717. this.currentTouchEvent=a;a=0;for(var d;a<c.length;a++)d=c[a],b.call(this,this.touchToPointer(d))},shouldScroll:function(a){if(this.firstXY){var b;b=a.currentTarget._scrollType;if("none"===b)b=!1;else if("XY"===b)b=!0;else{a=a.changedTouches[0];var c="Y"===b?"X":"Y";b=Math.abs(a["client"+b]-this.firstXY[b])>=Math.abs(a["client"+c]-this.firstXY[c])}this.firstXY=null;return b}},findTouch:function(a,b){for(var c=0,d=a.length,e;c<d&&(e=a[c]);c++)if(e.identifier===b)return!0},vacuumTouches:function(a){var b=
  718. a.touches;if(O.size>=b.length){var c=[];O.forEach(function(a,d){1===d||this.findTouch(b,d-2)||c.push(a.out)},this);c.forEach(this.cancelOut,this)}},touchstart:function(a){this.vacuumTouches(a);this.setPrimaryTouch(a.changedTouches[0]);this.dedupSynthMouse(a);this.scrolling||(this.clickCount++,this.processTouches(a,this.overDown))},overDown:function(a){O.set(a.pointerId,{target:a.target,out:a,outTarget:a.target});t.enterOver(a);t.down(a)},touchmove:function(a){this.scrolling||(this.shouldScroll(a)?
  719. (this.scrolling=!0,this.touchcancel(a)):(a.preventDefault(),this.processTouches(a,this.moveOverOut)))},moveOverOut:function(a){var b=O.get(a.pointerId);if(b){var c=b.out,d=b.outTarget;t.move(a);c&&d!==a.target&&(c.relatedTarget=a.target,a.relatedTarget=d,c.target=d,a.target?(t.leaveOut(c),t.enterOver(a)):(a.target=d,a.relatedTarget=null,this.cancelOut(a)));b.out=a;b.outTarget=a.target}},touchend:function(a){this.dedupSynthMouse(a);this.processTouches(a,this.upOut)},upOut:function(a){this.scrolling||
  720. (t.up(a),t.leaveOut(a));this.cleanUpPointer(a)},touchcancel:function(a){this.processTouches(a,this.cancelOut)},cancelOut:function(a){t.cancel(a);t.leaveOut(a);this.cleanUpPointer(a)},cleanUpPointer:function(a){O.delete(a.pointerId);this.removePrimaryPointer(a)},dedupSynthMouse:function(a){var b=H.lastTouches;a=a.changedTouches[0];this.isPrimaryTouch(a)&&(a={x:a.clientX,y:a.clientY},b.push(a),b=function(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}.bind(null,b,a),setTimeout(b,2500))}};Z=new b(R.elementAdded,
  721. R.elementRemoved,R.elementChanged,R);var aa=t.pointermap,ca=window.MSPointerEvent&&"number"===typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,ba={events:"MSPointerDown MSPointerMove MSPointerUp MSPointerOut MSPointerOver MSPointerCancel MSGotPointerCapture MSLostPointerCapture".split(" "),register:function(a){t.listen(a,this.events)},unregister:function(a){t.unlisten(a,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(a){var b=a;ca&&(b=t.cloneEvent(a),b.pointerType=
  722. this.POINTER_TYPES[a.pointerType]);return b},cleanup:function(a){aa.delete(a)},MSPointerDown:function(a){aa.set(a.pointerId,a);a=this.prepareEvent(a);t.down(a)},MSPointerMove:function(a){a=this.prepareEvent(a);t.move(a)},MSPointerUp:function(a){var b=this.prepareEvent(a);t.up(b);this.cleanup(a.pointerId)},MSPointerOut:function(a){a=this.prepareEvent(a);t.leaveOut(a)},MSPointerOver:function(a){a=this.prepareEvent(a);t.enterOver(a)},MSPointerCancel:function(a){var b=this.prepareEvent(a);t.cancel(b);
  723. this.cleanup(a.pointerId)},MSLostPointerCapture:function(a){a=t.makeEvent("lostpointercapture",a);t.dispatchEvent(a)},MSGotPointerCapture:function(a){a=t.makeEvent("gotpointercapture",a);t.dispatchEvent(a)}},W,X;window.navigator.msPointerEnabled?(W=function(a){k(a);f(this);0!==t.pointermap.get(a).buttons&&this.msSetPointerCapture(a)},X=function(a){k(a);this.msReleasePointerCapture(a)}):(W=function(a){k(a);f(this);0!==t.pointermap.get(a).buttons&&t.setCapture(a,this)},X=function(a){k(a);t.releaseCapture(a,
  724. this)});var da=window.PointerEvent||window.MSPointerEvent;return{dispatcher:t,Installer:b,PointerEvent:p,PointerMap:n,targetFinding:x,applyGlobal:function(){c();window.PointerEvent||(window.PointerEvent=p,window.navigator.msPointerEnabled?(Object.defineProperty(window.navigator,"maxTouchPoints",{value:window.navigator.msMaxTouchPoints,enumerable:!0}),t.registerSource("ms",ba)):(t.registerSource("mouse",H),void 0!==window.ontouchstart&&t.registerSource("touch",R)),t.register(document));window.Element&&
  725. !Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:W},releasePointerCapture:{value:X}})},applyLocal:function(a){da||(window.PointerEvent||(window.navigator.msPointerEnabled?t.registerSource("ms",ba):(t.registerSource("mouse",H),void 0!==window.ontouchstart&&t.registerSource("touch",R)),t.register(document)),window.Element&&!Element.prototype.setPointerCapture&&(a.setPointerCapture=W.bind(a),a.releasePointerCapture=X.bind(a)),a.getAttribute("touch-action")||
  726. a.setAttribute("touch-action","none"))}}})},"esri/views/input/keys":function(){define(["require","exports","../../core/sniff"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});g.primaryKey=b("mac")?"Meta":"Ctrl";var a={8:"Backspace",9:"Tab",13:"Enter",27:"Escape",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete"};for(p=48;58>p;p++)a[p]=String.fromCharCode(p);for(p=1;25>p;p++)a[111+p]="F"+p;for(p=65;91>p;p++)a[p]=
  727. [String.fromCharCode(p+32),String.fromCharCode(p)];var e={Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"};g.eventKey=function(b){if(void 0!==b.key)return e[b.key]||b.key;var c=a[b.keyCode];return Array.isArray(c)?b.shiftKey?c[1]:c[0]:c};g.isSystemModifier=function(a){switch(a){case "Ctrl":case "Alt":case "Shift":case "Meta":case "Primary":return!0}}})},"esri/views/input/InputManager":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Logger ../../core/now ../../core/accessorSupport/decorators ./keys ./recognizers ./handlers/LatestPointerType".split(" "),
  728. function(p,g,b,a,e,d,c,k,f,l,h){Object.defineProperty(g,"__esModule",{value:!0});var n=d.getLogger("esri.views.input.InputManager");p=function(d){function e(a,b){a=d.call(this)||this;a._pointerCaptures=new Map;a._nameToGroup={};a._handlers=[];a._currentPropagation=null;a._sourceEvents=new Set;a._keyModifiers=new Set;a._activeKeyModifiers=new Set;a.primaryKey=f.primaryKey;a.latestPointerType="mouse";a._installRecognizers();return a}b(e,d);e.prototype.normalizeCtorArgs=function(a,b){this._browserEvents=
  729. a;this._browserEvents.onEventReceived=this._onEventReceived.bind(this);this._recognizers=b;this._recognizers||(this._recognizers=l.defaults.map(function(a){return new a}));return{}};e.prototype.destroy=function(){for(var a=0,b=Object.keys(this._nameToGroup);a<b.length;a++)this.uninstallHandlers(b[a])};e.prototype.installHandlers=function(a,b){var c=this;if(this._nameToGroup[a])n.error("There is already an InputHandler group registered under the name `"+a+"`");else if(0===b.length)n.error("Can't register a group of zero handlers");
  730. else{var d={name:a,handlers:b.map(function(a,b){return{handler:a,active:!0,removed:!1,priorityIndex:0,eventCallback:null,uninstallCallback:null}})};this._nameToGroup[a]=d;a=function(a){var b=d.handlers[a];e._handlers.push(b);b.handler.onInstall({updateDependencies:function(){c.updateDependencies()},emit:function(a,d,e,f){c._emitInputEvent(b.priorityIndex,a,d,e,f)},setPointerCapture:function(a,e){c._setPointerCapture(d,b,a,e)},setEventCallback:function(a){b.eventCallback=a},setUninstallCallback:function(a){b.uninstallCallback=
  731. a}})};var e=this;for(b=d.handlers.length-1;0<=b;b--)a(b);this.updateDependencies()}};e.prototype.uninstallHandlers=function(a){var b=this._nameToGroup[a];b?(b.handlers.forEach(function(a){a.removed=!0;a.uninstallCallback()}),delete this._nameToGroup[a],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):n.error("There is no InputHandler group registered under the name `"+a+"`")};e.prototype.hasHandlers=function(a){return void 0!==
  732. this._nameToGroup[a]};e.prototype.updateDependencies=function(){var a=new Set,b=new Set;this._handlersPriority=[];for(var c=this._handlers.length-1;0<=c;c--){var d=this._handlers[c];d.priorityIndex=c;this._handlersPriority.push(d)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(c=this._handlersPriority.length-1;0<=c;c--){d=this._handlersPriority[c];d.priorityIndex=c;var e=d.handler.hasSideEffects;if(!e)for(var h=0,k=d.handler.outgoingEventTypes;h<k.length;h++)if(a.has(k[h])){e=
  733. !0;break}if(e)for(h=0,k=d.handler.incomingEventMatches;h<k.length;h++){var l=k[h];a.add(l.eventType);for(var m=0,l=l.keyModifiers;m<l.length;m++){var n=l[m];f.isSystemModifier(n)||b.add(n)}}d.active=e}this._sourceEvents=a;this._keyModifiers=b;0<this._pointerCaptures.size&&this._sourceEvents.add("pointer-capture-lost");0<this._keyModifiers.size&&(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up"));this._browserEvents&&(this._browserEvents.activeEvents=this._sourceEvents)};e.prototype._setLatestPointerType=
  734. function(a){this._set("latestPointerType",a)};e.prototype._onEventReceived=function(a,b){"pointer-capture-lost"===a&&this._pointerCaptures.delete(b.native.pointerId);this._updateKeyModifiers(a,b);this._emitInputEventFromSource(a,b,b.native.timestamp)};e.prototype._updateKeyModifiers=function(a,b){var c=this;if(b){var d=!1,e=function(){if(!d){var a=new Set;c._activeKeyModifiers.forEach(function(b){a.add(b)});c._activeKeyModifiers=a;d=!0}},f=function(a,b){b&&!c._activeKeyModifiers.has(a)?(e(),c._activeKeyModifiers.add(a)):
  735. !b&&c._activeKeyModifiers.has(a)&&(e(),c._activeKeyModifiers.delete(a))};if("key-down"===a||"key-up"===a){var h=b.key;this._keyModifiers.has(h)&&f(h,"key-down"===a)}a=b.native;f("Alt",!(!a||!a.altKey));f("Ctrl",!(!a||!a.ctrlKey));f("Shift",!(!a||!a.shiftKey));f("Meta",!(!a||!a.metaKey));f("Primary",this._activeKeyModifiers.has(this.primaryKey))}};e.prototype._installRecognizers=function(){var a=this;this._latestPointerTypeHandler=new h.LatestPointerType(function(b){return a._setLatestPointerType(b)});
  736. 0<this._recognizers.length&&this.installHandlers("default",this._recognizers);this.installHandlers("input-manager-logic",[this._latestPointerTypeHandler])};e.prototype._setPointerCapture=function(a,b,c,d){a=a.name+"-"+b.priorityIndex;b=this._pointerCaptures.get(c.pointerId)||new Set;this._pointerCaptures.set(c.pointerId,b);d?(b.add(a),1===b.size&&this._browserEvents&&this._browserEvents.setPointerCapture(c,!0)):b.has(a)&&(b.delete(a),0===b.size&&(this._pointerCaptures.delete(c.pointerId),this._browserEvents&&
  737. this._browserEvents.setPointerCapture(c,!1)))};e.prototype._garbageCollectRemovedHandlers=function(){this._handlers=this._handlers.filter(function(a){return!a.removed});this.updateDependencies()};e.prototype._emitInputEventFromSource=function(a,b,c){this._emitInputEvent(0,a,b,c)};e.prototype._emitInputEvent=function(a,b,d,e,f){e=void 0!==e?e:this._currentPropagation?this._currentPropagation.timestamp:c();b=new r(b,d,e,f||this._activeKeyModifiers);this._currentPropagation?this._currentPropagation.addedEvents.push(b):
  738. this._doNewPropagation(a,b)};e.prototype._doNewPropagation=function(a,b){for(a=this._currentPropagation={events:[b],addedEvents:[],currentHandler:this._handlersPriority[a],needsHandlerGarbageCollect:!1,timestamp:b.timestamp};a.currentHandler;){if(a.currentHandler.removed)a.needsHandlerGarbageCollect=!0;else{b=a.events;var c=[];a.addedEvents=[];for(var d=0;d<b.length;d++){var e=b[d];a.currentHandler.active&&a.currentHandler.eventCallback(e);e.shouldStopPropagation()||c.push(e)}a.events=c.concat(a.addedEvents)}a.currentHandler=
  739. this._handlersPriority[a.currentHandler.priorityIndex+1]}a.needsHandlerGarbageCollect&&this._garbageCollectRemovedHandlers();this._currentPropagation=null};e.prototype._compareHandlerPriority=function(a,b){if(a.handler.hasSideEffects!==b.handler.hasSideEffects)return a.handler.hasSideEffects?1:-1;for(var c=0,d=a.handler.incomingEventMatches;c<d.length;c++)for(var e=d[c],f=function(a){if(e.eventType!==a.eventType)return"continue";var b=e.keyModifiers.filter(function(b){return-1!==a.keyModifiers.indexOf(b)});
  740. if(b.length===e.keyModifiers.length!==(b.length===a.keyModifiers.length))return{value:e.keyModifiers.length>a.keyModifiers.length?-1:1}},h=0,k=b.handler.incomingEventMatches;h<k.length;h++){var l=f(k[h]);if("object"===typeof l)return l.value}return a.priorityIndex>b.priorityIndex?-1:1};e.prototype._sortHandlersPriority=function(a){for(var b=[],c=0;c<a.length;c++){for(var d=a[c],e=0;e<b.length&&0<=this._compareHandlerPriority(d,b[e]);)e++;b.splice(e,0,d)}return b};a([k.property({readOnly:!0})],e.prototype,
  741. "latestPointerType",void 0);return e=a([k.subclass("esri.views.input.InputManager")],e)}(k.declared(e));g.InputManager=p;var r=function(){function a(a,b,c,d){this.type=a;this.data=b;this.timestamp=c;this.modifiers=d;this._stopPropagation=!1}a.prototype.stopPropagation=function(){this._stopPropagation=!0};a.prototype.shouldStopPropagation=function(){return this._stopPropagation};return a}()})},"esri/views/input/recognizers":function(){define("require exports ./recognizers/Drag ./recognizers/PointerClickHoldAndDrag ./recognizers/SingleAndDoubleClick ./recognizers/VerticalTwoFingerDrag".split(" "),
  742. function(p,g,b,a,e,d){Object.defineProperty(g,"__esModule",{value:!0});g.defaults=[a.PointerClickHoldAndDrag,e.SingleAndDoubleClick,b.Drag,d.VerticalTwoFingerDrag]})},"esri/views/input/recognizers/Drag":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler","./support"],function(p,g,b,a,e){function d(a){var b=[];a.forEach(function(a){b.push(a.event)});return e.fitCircleLSQ(b)}function c(a){var b=d(a),c=0;a.forEach(function(a){for(var d=f(a,b),d=d-a.lastAngle;d>
  743. Math.PI;)d-=2*Math.PI;for(;d<-Math.PI;)d+=2*Math.PI;d=a.lastAngle+d;a.lastAngle=d;c+=d-a.initialAngle});c/=a.size||1;return{angle:c,radius:b.radius,center:b.center}}function k(a){var b=new Map;a.forEach(function(a,c){return b.set(c,a.event)});return b}function f(a,b){a=a.event;return Math.atan2(a.y-b.center.y,a.x-b.center.x)}Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function e(){var b=a.call(this,!1)||this;b.startStateModifiers=new Set;b.activePointerMap=new Map;b.isDragging=
  744. !1;b.drag=b.registerOutgoing("drag");b.registerIncoming("pointer-drag",b.handlePointerDrag.bind(b));b.registerIncoming("pointer-up",b.handlePointerUpAndPointerLost.bind(b));b.registerIncoming("pointer-capture-lost",b.handlePointerUpAndPointerLost.bind(b));return b}b(e,a);e.prototype.createPayload=function(a,b,c,d){return{action:a,pointerType:this.pointerType,button:this.mouseButton,buttons:b.buttons,timestamp:d,pointers:k(this.activePointerMap),pointer:b,angle:c.angle,radius:c.radius,center:c.center}};
  745. e.prototype.addPointer=function(a){var b=a.native.pointerId,e=c(this.activePointerMap).angle;a={event:a,initialAngle:0,lastAngle:0};this.activePointerMap.set(b,a);b=f(a,d(this.activePointerMap));a.initialAngle=b;a.lastAngle=b;this.updatePointerAngles(e)};e.prototype.updatePointer=function(a){if(!a||null!=a.x||null!=a.y){var b=this.activePointerMap.get(a.native.pointerId);b?b.event=a:this.addPointer(a)}};e.prototype.removePointer=function(a){var b=c(this.activePointerMap).angle;this.activePointerMap.delete(a);
  746. this.updatePointerAngles(b)};e.prototype.updatePointerAngles=function(a){var b=c(this.activePointerMap);this.activePointerMap.forEach(function(c){c.initialAngle=f(c,b)-a;c.lastAngle=f(c,b)-a})};e.prototype.emitEvent=function(a,b,d){var e=c(this.activePointerMap);this.drag.emit(this.createPayload(a,b,e,d),void 0,this.startStateModifiers)};e.prototype.handlePointerUpAndPointerLost=function(a){var b=a.data.native.pointerId,c=a.timestamp;this.activePointerMap.get(b)&&(1===this.activePointerMap.size?(this.updatePointer(a.data),
  747. this.emitEvent("end",a.data,c),this.isDragging=!1,this.removePointer(b)):(this.removePointer(b),this.emitEvent("removed",a.data,a.timestamp)))};e.prototype.handlePointerDrag=function(a){var b=a.data,c=b.currentEvent,d=a.timestamp;switch(b.action){case "start":case "update":this.isDragging?this.activePointerMap.has(c.native.pointerId)?(this.updatePointer(c),this.emitEvent("update",c,d)):(this.addPointer(c),this.emitEvent("added",c,d)):(this.updatePointer(c),this.pointerType=a.data.startEvent.pointerType,
  748. this.mouseButton=a.data.startEvent.button,this.startStateModifiers=a.modifiers,this.isDragging=!0,this.emitEvent("start",c,d))}};return e}(a.InputHandler);g.Drag=p;(function(a){a[a.Left=0]="Left";a[a.Middle=1]="Middle";a[a.Right=2]="Right";a[a.Back=3]="Back";a[a.Forward=4]="Forward";a[a.Undefined=-1]="Undefined"})(g.Button||(g.Button={}))})},"esri/views/input/recognizers/support":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.manhattanDistance=
  749. function(b,a){return Math.abs(a.x-b.x)+Math.abs(a.y-b.y)};g.euclideanDistance=function(b,a){var e=a.x-b.x;b=a.y-b.y;return Math.sqrt(e*e+b*b)};g.fitCircleLSQ=function(b,a){a?(a.radius=0,a.center.x=0,a.center.y=0):a={radius:0,center:{x:0,y:0}};if(0===b.length)return a;if(1===b.length)return a.center.x=b[0].x,a.center.y=b[0].y,a;if(2===b.length){var e=b[0];b=b[1];var d=[b.x-e.x,b.y-e.y],c=d[0],d=d[1];a.radius=Math.sqrt(c*c+d*d)/2;a.center.x=(e.x+b.x)/2;a.center.y=(e.y+b.y)/2;return a}for(var k=0,f=
  750. 0,l=0;l<b.length;l++)k+=b[l].x,f+=b[l].y;for(var k=k/b.length,f=f/b.length,h=b.map(function(a){return a.x-k}),g=b.map(function(a){return a.y-f}),r=e=a=0,m=0,u=c=0,l=d=0;l<h.length;l++){var q=h[l],t=g[l],p=q*q,v=t*t;a+=p;e+=v;r+=q*t;m+=p*q;c+=v*t;u+=q*v;d+=t*p}l=a;h=r;g=e;m=.5*(m+u);c=.5*(c+d);d=l*g-r*h;u=(m*g-c*h)/d;c=(l*c-r*m)/d;return{radius:Math.sqrt(u*u+c*c+(a+e)/b.length),center:{x:u+k,y:c+f}}}})},"esri/views/input/recognizers/PointerClickHoldAndDrag":function(){define(["require","exports","../../../core/tsSupport/extendsHelper",
  751. "../InputHandler","./support"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});g.DefaultParameters={maximumClickDelay:300,movementUntilMouseDrag:1.5,movementUntilTouchDrag:6,holdDelay:500};p=function(a){function c(b,c,d,e){void 0===b&&(b=g.DefaultParameters.maximumClickDelay);void 0===c&&(c=g.DefaultParameters.movementUntilMouseDrag);void 0===d&&(d=g.DefaultParameters.movementUntilTouchDrag);void 0===e&&(e=g.DefaultParameters.holdDelay);var f=a.call(this,!1)||this;f.maximumClickDelay=
  752. b;f.movementUntilMouseDrag=c;f.movementUntilTouchDrag=d;f.holdDelay=e;f._pointerState=new Map;f._pointerDrag=f.registerOutgoing("pointer-drag");f._immediateClick=f.registerOutgoing("immediate-click");f._pointerHold=f.registerOutgoing("hold");f.registerIncoming("pointer-down",f._handlePointerDown.bind(f));f.registerIncoming("pointer-up",f._handlePointerUpOrLost.bind(f));f.registerIncoming("pointer-capture-lost",f._handlePointerUpOrLost.bind(f));f._moveHandle=f.registerIncoming("pointer-move",f._handlePointerMove.bind(f));
  753. f._moveHandle.pause();return f}b(c,a);c.prototype.onUninstall=function(){this._pointerState.forEach(function(a){0!==a.holdTimeout&&(clearTimeout(a.holdTimeout),a.holdTimeout=0)});a.prototype.onUninstall.call(this)};c.prototype._handlePointerDown=function(a){var b=this,c=a.data,d=c.native.pointerId,e=0;0===this._pointerState.size&&(e=setTimeout(function(){var c=b._pointerState.get(d);c&&(c.isDragging||(b._pointerHold.emit(c.previousEvent,void 0,a.modifiers),c.holdEmitted=!0),c.holdTimeout=0)},this.holdDelay));
  754. e={startEvent:c,previousEvent:c,startTimestamp:a.timestamp,isDragging:!1,downButton:c.native.button,holdTimeout:e,modifiers:new Set};this._pointerState.set(d,e);this.startCapturingPointer(c.native);this._moveHandle.resume();1<this._pointerState.size&&this.startDragging(a)};c.prototype._createPointerDragData=function(a,b,c){return{action:a,startEvent:b.startEvent,previousEvent:b.previousEvent,currentEvent:c}};c.prototype._handlePointerMove=function(a){var b=a.data,c=this._pointerState.get(b.native.pointerId);
  755. c&&(c.isDragging?this._pointerDrag.emit(this._createPointerDragData("update",c,b),void 0,c.modifiers):e.euclideanDistance(b,c.startEvent)>("touch"===b.native.pointerType?this.movementUntilTouchDrag:this.movementUntilMouseDrag)&&this.startDragging(a),c.previousEvent=b)};c.prototype.startDragging=function(a){var b=this,c=a.data,d=c.native.pointerId;this._pointerState.forEach(function(e){0!==e.holdTimeout&&(clearTimeout(e.holdTimeout),e.holdTimeout=0);e.isDragging||(e.modifiers=a.modifiers,e.isDragging=
  756. !0,d===e.startEvent.native.pointerId?b._pointerDrag.emit(b._createPointerDragData("start",e,c)):b._pointerDrag.emit(b._createPointerDragData("start",e,e.previousEvent),a.timestamp))})};c.prototype._handlePointerUpOrLost=function(a){var b=a.data,c=b.native.pointerId,d=this._pointerState.get(c);d&&(0!==d.holdTimeout&&clearTimeout(d.holdTimeout),d.isDragging?this._pointerDrag.emit(this._createPointerDragData("end",d,b),void 0,d.modifiers):d.downButton===b.native.button&&a.timestamp-d.startTimestamp<=
  757. this.maximumClickDelay&&!d.holdEmitted&&this._immediateClick.emit(b),this._pointerState.delete(c),this.stopCapturingPointer(b.native),0===this._pointerState.size&&this._moveHandle.pause())};return c}(a.InputHandler);g.PointerClickHoldAndDrag=p})},"esri/views/input/recognizers/SingleAndDoubleClick":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler","./support"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});g.DefaultParameters={maximumDoubleClickDelay:250,
  758. maximumDoubleClickDistance:10,maximumDoubleTouchDelay:350,maximumDoubleTouchDistance:35};p=function(a){function c(b,c,d,e){void 0===b&&(b=g.DefaultParameters.maximumDoubleClickDelay);void 0===c&&(c=g.DefaultParameters.maximumDoubleClickDistance);void 0===d&&(d=g.DefaultParameters.maximumDoubleTouchDelay);void 0===e&&(e=g.DefaultParameters.maximumDoubleTouchDistance);var f=a.call(this,!1)||this;f.maximumDoubleClickDelay=b;f.maximumDoubleClickDistance=c;f.maximumDoubleTouchDelay=d;f.maximumDoubleTouchDistance=
  759. e;f._pointerState=new Map;f._click=f.registerOutgoing("click");f._doubleClick=f.registerOutgoing("double-click");f.registerIncoming("immediate-click",f._handleImmediateClick.bind(f));return f}b(c,a);c.prototype.onUninstall=function(){this._pointerState.forEach(function(a){0!==a.doubleClickTimeout&&(clearTimeout(a.doubleClickTimeout),a.doubleClickTimeout=0)})};c.prototype._pointerId=function(a){a=a.native;return"mouse"===a.pointerType?a.pointerId+":"+a.button:""+a.pointerType};c.prototype._handleImmediateClick=
  760. function(a){var b=a.data,c=this._pointerId(b),d=this._pointerState.get(c);if(d){clearTimeout(d.doubleClickTimeout);d.doubleClickTimeout=0;var k="touch"===b.native.pointerType?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;e.manhattanDistance(d.event.data,b)>k?(this._doubleClickTimeoutExceeded(c),this._startClick(a)):(this._doubleClick.emit(b,void 0,d.event.modifiers),this._pointerState.delete(c))}else this._startClick(a)};c.prototype._startClick=function(a){var b=this,c=this._pointerId(a.data);
  761. this._pointerState.set(c,{event:a,doubleClickTimeout:setTimeout(function(){return b._doubleClickTimeoutExceeded(c)},"touch"===a.data.native.pointerType?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay)})};c.prototype._doubleClickTimeoutExceeded=function(a){var b=this._pointerState.get(a);this._click.emit(b.event.data,void 0,b.event.modifiers);b.doubleClickTimeout=0;this._pointerState.delete(a)};return c}(a.InputHandler);g.SingleAndDoubleClick=p})},"esri/views/input/recognizers/VerticalTwoFingerDrag":function(){define(["require",
  762. "exports","../../../core/tsSupport/extendsHelper","../DragEventSeparator","../InputHandler"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function c(b,c){void 0===b&&(b=20);void 0===c&&(c=40);var e=d.call(this,!1)||this;e._threshold=b;e._maxDelta=c;e.state="ready";e.emittedArtificalEnd2=!1;e._vertical=e.registerOutgoing("vertical-two-finger-drag");e._artificalDrag=e.registerOutgoing("drag");e.dragEventSeparator=new a.DragEventSeparator({start:function(a,b){return e.observeStart(a,
  763. b)},update:function(a,b,c){return e.observeUpdate(a,b,c)},end:function(a,b){return e.observeEnd(a,b)}});e.registerIncoming("drag",function(a){return e.dragEventSeparator.handle(a)});return e}b(c,d);Object.defineProperty(c.prototype,"failed",{get:function(){return"failed"===this.state},enumerable:!0,configurable:!0});c.prototype.observeStart=function(a,b){1===a&&this.emittedArtificalEnd2&&(this.emittedArtificalEnd2=!1,this._artificalDrag.emit({action:"start",button:b.data.button,buttons:b.data.buttons,
  764. pointerType:b.data.pointerType,timestamp:b.data.timestamp,pointers:b.data.pointers,pointer:b.data.pointer,angle:b.data.angle,radius:b.data.radius,center:b.data.center,artifical:!0}),b.stopPropagation());this.state=2===a?"ready":"failed"};c.prototype.observeUpdate=function(a,b,c){"failed"!==this.state&&2===a&&("active"===this.state?(this._vertical.emit({delta:b.data.center.y-this._thresholdReachedCenter.y,action:"update"}),b.stopPropagation()):this.checkMovementWithinLimits(b.data,c.data)?this.checkVerticalThresholdReached(b.data,
  765. c.data)&&(this.state="active",this.emittedArtificalEnd2=!0,this._thresholdReachedCenter=b.data.center,this._artificalDrag.emit({action:"end",button:b.data.button,buttons:b.data.buttons,pointerType:b.data.pointerType,timestamp:b.data.timestamp,pointers:b.data.pointers,pointer:b.data.pointer,angle:b.data.angle,radius:b.data.radius,center:b.data.center,artifical:!0}),this._vertical.emit({delta:b.data.center.y-this._thresholdReachedCenter.y,action:"begin"}),b.stopPropagation()):this.state="failed")};
  766. c.prototype.observeEnd=function(a,b){"active"===this.state&&(this._vertical.emit({delta:b.data.center.y-this._thresholdReachedCenter.y,action:"end"}),this.state="ready",b.stopPropagation())};c.prototype.checkMovementWithinLimits=function(a,b){var c=-Infinity,d=Infinity,e=-Infinity,f=Infinity;b.pointers.forEach(function(a){c=Math.max(c,a.x);d=Math.min(d,a.x);e=Math.max(e,a.y);f=Math.min(f,a.y)});var k=-Infinity,g=Infinity,q=-Infinity,t=Infinity;a.pointers.forEach(function(a){k=Math.max(k,a.x);g=Math.min(g,
  767. a.x);q=Math.max(q,a.y);t=Math.min(t,a.y)});return Math.abs(a.center.x-b.center.x)<this._threshold&&Math.abs(k-g-(c-d))<=this._maxDelta&&Math.abs(q-t-(e-f))<=this._maxDelta};c.prototype.checkVerticalThresholdReached=function(a,b){var c=Math.abs(a.center.y-b.center.y);a.pointers.forEach(function(a,d){d=b.pointers.get(d);c=Math.min(c,Math.abs(a.y-d.y))});return c>=this._threshold};return c}(e.InputHandler);g.VerticalTwoFingerDrag=p})},"esri/views/input/handlers/LatestPointerType":function(){define(["require",
  768. "exports","../../../core/tsSupport/extendsHelper","../InputHandler"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function d(b){var c=a.call(this,!0)||this;c._onChange=b;c._value="mouse";c.registerIncoming("pointer-down",function(a){c._setValue("touch"===a.data.native.pointerType?"touch":"mouse")});c._moveHandler=c.registerIncoming("pointer-move",function(a){c._setValue("touch"===a.data.native.pointerType?"touch":"mouse")});c._moveHandler.pause();return c}b(d,a);
  769. d.prototype._setValue=function(a){a!==this._value&&("touch"===a?this._moveHandler.resume():this._moveHandler.pause(),this._value=a,this._onChange(a))};return d}(a.InputHandler);g.LatestPointerType=p})},"esri/views/input/ViewEvents":function(){define("require exports ../../core/tsSupport/extendsHelper ../../geometry/ScreenPoint ../3d/support/mathUtils ./InputHandler".split(" "),function(p,g,b,a,e,d){function c(a){return!!f[a]}function k(a){for(var b=0;b<a.length;b++)if(!c(a[b]))return!1;return!0}Object.defineProperty(g,
  770. "__esModule",{value:!0});var f={click:!0,"double-click":!0,"immediate-click":!0,hold:!0,drag:!0,"key-down":!0,"key-up":!0,"pointer-down":!0,"pointer-move":!0,"pointer-up":!0,"pointer-drag":!0,"mouse-wheel":!0,"pointer-enter":!0,"pointer-leave":!0},l;(function(a){a[a.Left=0]="Left";a[a.Middle=1]="Middle";a[a.Right=2]="Right"})(l||(l={}));p=function(){function a(a){this.handlers=new Map;this.counter=0;this.handlerCounts=new Map;this.view=a;this.inputManager=null}a.prototype.connect=function(a){var b=
  771. this;a&&this.disconnect();this.inputManager=a;this.handlers.forEach(function(a,c){return b.inputManager.installHandlers(c,[a])})};a.prototype.disconnect=function(){var a=this;this.inputManager&&this.handlers.forEach(function(b,c){return a.inputManager.uninstallHandlers(c)});this.inputManager=null};a.prototype.destroy=function(){this.disconnect();this.handlers.clear();this.view=null};a.prototype.register=function(a,b,d){var e=this,f=Array.isArray(a)?a:a.split(",");if(!k(f))return f.some(c)&&console.error("Error: registering input events and other events on the view at the same time is not supported."),
  772. null;a=Array.isArray(b)?b:[];d=Array.isArray(b)?d:b;var l=this.createUniqueGroupName();b=new h(this.view,f,a,d);this.handlers.set(l,b);for(d=0;d<f.length;d++){a=f[d];var g=this.handlerCounts.get(a)||0;this.handlerCounts.set(a,g+1)}this.inputManager&&this.inputManager.installHandlers(l,[b]);return{remove:function(){return e.removeHandler(l,f)}}};a.prototype.hasHandler=function(a){return!!this.handlerCounts.get(a)};a.prototype.removeHandler=function(a,b){if(this.handlers.has(a)){this.handlers.delete(a);
  773. for(var c=0;c<b.length;c++){var d=b[c],e=this.handlerCounts.get(d);void 0===e?console.error("Trying to remove handler for event that has no handlers registered: ",d):1===e?this.handlerCounts.delete(d):this.handlerCounts.set(d,e-1)}}this.inputManager&&this.inputManager.uninstallHandlers(a)};a.prototype.createUniqueGroupName=function(){this.counter+=1;return"viewEvents_"+this.counter};return a}();g.ViewEvents=p;var h=function(c){function d(a,b,d,e){var f=c.call(this,!0)||this;f.view=a;for(a=0;a<b.length;a++)switch(b[a]){case "click":f.registerIncoming("click",
  774. d,function(a){return e(f.wrapClick(a))});break;case "double-click":f.registerIncoming("double-click",d,function(a){return e(f.wrapDoubleClick(a))});break;case "immediate-click":f.registerIncoming("immediate-click",d,function(a){return e(f.wrapImmediateClick(a))});break;case "hold":f.registerIncoming("hold",d,function(a){return e(f.wrapHold(a))});break;case "drag":f.registerIncoming("drag",d,function(a){return e(f.wrapDrag(a))});break;case "key-down":f.registerIncoming("key-down",d,function(a){return e(f.wrapKeyDown(a))});
  775. break;case "key-up":f.registerIncoming("key-up",d,function(a){return e(f.wrapKeyUp(a))});break;case "pointer-down":f.registerIncoming("pointer-down",d,function(a){return e(f.wrapPointer(a,"pointer-down"))});break;case "pointer-move":f.registerIncoming("pointer-move",d,function(a){return e(f.wrapPointer(a,"pointer-move"))});break;case "pointer-up":f.registerIncoming("pointer-up",d,function(a){return e(f.wrapPointer(a,"pointer-up"))});break;case "pointer-drag":f.registerIncoming("pointer-drag",d,function(a){return e(f.wrapPointerDrag(a))});
  776. break;case "mouse-wheel":f.registerIncoming("mouse-wheel",d,function(a){return e(f.wrapMouseWheel(a))});break;case "pointer-enter":f.registerIncoming("pointer-enter",d,function(a){return e(f.wrapPointer(a,"pointer-enter"))});break;case "pointer-leave":f.registerIncoming("pointer-leave",d,function(a){return e(f.wrapPointer(a,"pointer-leave"))})}return f}b(d,c);d.prototype.wrapClick=function(b){var c=b.data,d=c.x,e=c.y;return{type:"click",pointerType:c.pointerType,button:c.button,buttons:c.buttons,
  777. x:d,y:e,native:c.native,timestamp:b.timestamp,screenPoint:new a(d,e),mapPoint:this.view.toMap(d,e),stopPropagation:function(){return b.stopPropagation()}}};d.prototype.wrapDoubleClick=function(a){var b=a.data,c=b.x,d=b.y;return{type:"double-click",pointerType:b.pointerType,button:b.button,buttons:b.buttons,x:c,y:d,native:b.native,timestamp:a.timestamp,mapPoint:this.view.toMap(c,d),stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapImmediateClick=function(a){var b=a.data,c=b.x,
  778. d=b.y;return{type:"immediate-click",pointerType:b.pointerType,button:b.button,buttons:b.buttons,x:c,y:d,native:b.native,timestamp:a.timestamp,mapPoint:this.view.toMap(c,d),stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapHold=function(a){var b=a.data,c=b.x,d=b.y;return{type:"hold",pointerType:b.pointerType,button:b.button,buttons:b.buttons,x:c,y:d,native:b.native,timestamp:a.timestamp,mapPoint:this.view.toMap(c,d),stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapDrag=
  779. function(a){var b=a.data,c=b.center,d=c.x,c=c.y,f=b.action,h=b.pointerType,k=b.button;"start"===f&&(this.latestDragStart=b);var l=b.pointer.native,g=a.timestamp;return{type:"drag",action:f,x:d,y:c,origin:{x:this.latestDragStart.center.x,y:this.latestDragStart.center.y},pointerType:h,button:k,buttons:b.buttons,radius:b.radius,angle:e.rad2deg(b.angle),native:l,timestamp:g,stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapKeyDown=function(a){var b=a.data;return{type:"key-down",
  780. key:b.key,repeat:b.repeat,native:b.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapKeyUp=function(a){var b=a.data;return{type:"key-up",key:b.key,native:b.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapPointer=function(a,b){var c=a.data,d=c.native;return{type:b,x:c.x,y:c.y,pointerId:d.pointerId,pointerType:d.pointerType,button:c.button,buttons:c.buttons,native:d,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};
  781. d.prototype.wrapPointerDrag=function(a){var b=a.data.currentEvent,c=a.data.startEvent.native;return{type:"pointer-drag",x:b.x,y:b.y,pointerId:c.pointerId,pointerType:c.pointerType,button:a.data.startEvent.button,buttons:b.buttons,action:a.data.action,origin:{x:a.data.startEvent.x,y:a.data.startEvent.y},native:b.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};d.prototype.wrapMouseWheel=function(a){var b=a.data;return{type:"mouse-wheel",x:b.x,y:b.y,deltaY:b.deltaY,
  782. native:b.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};return d}(d.InputHandler)})},"esri/views/input/handlers/PreventContextMenu":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler"],function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function d(){var b=a.call(this,!0)||this;b.registerIncoming("context-menu",function(a){a.data.native.preventDefault()});return b}b(d,a);return d}(a.InputHandler);
  783. g.PreventContextMenu=p;g.default=p})},"esri/views/2d/layers/support/GraphicsView2D":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../Graphic ../../../../core/Collection ../../../../core/Handles ../../../../core/promiseUtils ../../../../core/accessorSupport/decorators ../../engine/graphics/GFXGroup ../../engine/graphics/GFXObject ../../engine/graphics/GFXSurface ../../../layers/GraphicsView".split(" "),function(p,
  784. g,b,a,e,d,c,k,f,l,h,n,r){return function(g){function m(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];var d=g.apply(this,a)||this;d._frontGroup=new l;d._handles=new c;d._objects=new Map;d.container=new n;d.container.addChild(d._frontGroup);d.watch("graphics",function(){return d._reset()},!0);return d}b(m,g);m.prototype.hitTest=function(a,b){if(!this.view||!this.view.position)return null;a+=this.view.position[0]-window.pageXOffset;b+=this.view.position[1]-window.pageYOffset;return(a=this.container.hitTest(a,
  785. b))?k.resolve(a.graphic):null};m.prototype.graphicUpdateHandler=function(a){var b=a.graphic,c=a.property;a=a.newValue;if(this._objects.has(b)){var d=this._objects.get(b);switch(c){case "geometry":d.graphic=b;break;case "symbol":d.renderingInfo={symbol:a};break;case "visible":d.visible=a}}};m.prototype._reset=function(){var a=this;this._handles.remove("graphics");this._objects.forEach(function(b,c){a._frontGroup.removeChild(b)});this._objects.clear();this.graphics&&(this.graphics.forEach(this._add,
  786. this),this._handles.add(this.graphics.on("change",function(b){return a._graphicsChangeHandler(b)}),"graphics"))};m.prototype._add=function(a){if(!this._objects.has(a)){var b=new h;b.graphic=a;b.renderingInfo={symbol:a.symbol};this._objects.set(a,b);this._frontGroup.addChild(b)}};m.prototype._remove=function(a){var b=this._objects.get(a);b&&(this._objects.delete(a),this._frontGroup.removeChild(b))};m.prototype._graphicsChangeHandler=function(a){var b=a.added,c=a.removed;a.moved.length&&this._reset();
  787. for(var d=0;d<b.length;d++)a=b[d],this._add(a);for(b=0;b<c.length;b++)a=c[b],this._remove(a)};a([f.cast(d.ofType(e))],m.prototype,"graphics",void 0);a([f.property()],m.prototype,"view",void 0);return m=a([f.subclass("esri.views.2d.layers.support.GraphicsView2D")],m)}(f.declared(r))})},"esri/views/2d/engine/graphics/GFXGroup":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","dojo/_base/lang","../Container"],function(p,g,b,a,e){return function(d){function c(){return null!==
  788. d&&d.apply(this,arguments)||this}b(c,d);c.prototype.attach=function(a){this.g=a.surface.createGroup();return d.prototype.attach.call(this,a)};c.prototype.detach=function(a){d.prototype.detach.call(this,a);this.g.destroy();this.g=null};c.prototype.prepareChildrenRenderParameters=function(b){return a.mixin({},b,{surface:this.g})};c.prototype.detachChild=function(a,b){return a.detach(b)};c.prototype.attachChild=function(a,b){return a.attach(b)};c.prototype.renderChild=function(a,b){return a.processRender(b)};
  789. return c}(e)})},"esri/views/2d/engine/graphics/GFXObject":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../../geometry ../../../../geometry/support/spatialReferenceUtils ../../../../geometry/support/webMercatorUtils ../DisplayObject ./gfxUtils".split(" "),function(p,g,b,a,e,d,c,k){var f=new Set,l=[];return function(c){function h(){var a=null!==c&&c.apply(this,arguments)||this;a._prevStateId=null;a.visible=!0;return a}b(h,c);Object.defineProperty(h.prototype,"graphic",
  790. {get:function(){return this._graphic},set:function(a){this._geometry=(this._graphic=a)&&a.geometry||null;this._projected=null;this.requestRender()},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"geometry",{get:function(){return this._geometry},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"isPolygonMarkerSymbol",{get:function(){var a=this.renderingInfo.symbol.type,b=this.geometry;return b&&"polygon"===b.type&&("simple-marker"===a||"picture-marker"===a||"text"===
  791. a)},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"renderingInfo",{get:function(){return this._renderingInfo},set:function(a){this._renderingInfo=a;this.requestRender()},enumerable:!0,configurable:!0});h.prototype.detach=function(){this._removeShape();this._drawInfo=this._projected=null};h.prototype.doRender=function(a){var b=a.surface,c=a.state,d=a.projector,e=this._prevStateId!==c.id;if(this.renderRequested||e)if(e&&a.stationary&&(this._prevStateId=c.id),this.visible)if(e=this._projectGeometry(this.geometry,
  792. a.state.spatialReference),a=this._getScreenOffsets([],a.state),k.isShapeInvalid(this.renderingInfo.symbol,this._shape)&&this._removeShape(),a.length){var f=this._shape,h=e.type;if(!f||this._showRedraw(a,c))"point"===h?(f=k.drawPoint(d,b,e,f,this.renderingInfo,c.rotation,a),k.stylePoint(f,this.renderingInfo)):"multipoint"===h?(f=k.drawMarkers(d,b,e,f,this.renderingInfo,c.rotation,a,this),k.styleMarkers(f,this.renderingInfo)):(f=k.drawShape(d,b,e,f,a),k.styleShape(f,this.renderingInfo)),this._shape=
  793. f,f.getNode().gfxObject=this}else this._removeShape();else this._removeShape()};h.prototype._getScreenOffsets=function(a,b){var c=b.clippedExtent,d=this._projected.outExtent,h=b.spatialReference;a.length=0;if(!d)return a;if(h.isWrappable){var h=e.getInfo(h),k=d.cache._partwise,c=c._getParts(h);l.length=0;if(k&&k.length)for(d=0;d<k.length;d++)l.push.apply(l,k[d]._getParts(h));else l.push.apply(l,d._getParts(h));b=b.worldScreenWidth;a.length=0;f.clear();d=l.length;for(h=0;h<d;h++)for(var g=l[h],k=g.extent,
  794. g=g.frameIds,m=g.length,n=c.length,r=0;r<n;r++){var p=c[r];if(p.extent.intersects(k))for(var A=m,C=0;C<A;C++){var D=(p.frameIds[0]-g[C])*b;f.has(D)||(a.push(D),f.add(D))}}a.sort()}else c.intersects(d)&&a.push(0);return a};h.prototype._projectGeometry=function(a,b){var c=this._projected;a=this.isPolygonMarkerSymbol?a.centroid:a;if(c&&c.inGeometry===a&&c.outSpatialReference===b)return c.outGeometry;a&&a.spatialReference.equals(b)?this._projected={inGeometry:a,outGeometry:a,outSpatialReference:b,outExtent:this._getExtent(a)}:
  795. d.canProject(a,b)?this._projected={inGeometry:a,outGeometry:d.project(a,b),outSpatialReference:b,outExtent:this._getExtent(a)}:this._projected={inGeometry:a,outGeometry:null,outSpatialReference:b,outExtent:null};return this._projected.outGeometry};h.prototype._getExtent=function(b){var c=b.extent;if(!c){var d=c=void 0;"esri.geometry.Point"===b.declaredClass?(c=b.x,d=b.y):"esri.geometry.Multipoint"===b.declaredClass&&(c=b.points[0][0],d=b.points[0][1]);c=new a.Extent(c,d,c,d,b.spatialReference)}return c};
  796. h.prototype._removeShape=function(){var a=this._shape;a&&(a.removeShape(),a.getNode().gfxObject=null,a.destroy());this._shape=this._drawInfo=null};h.prototype._showRedraw=function(a,b){return!0};return h}(c)})},"esri/views/2d/engine/graphics/gfxUtils":function(){define("require exports dojo/_base/lang ../../../../Color ../../../../core/screenUtils ../../../../geometry/Polygon ../../../../symbols/SimpleMarkerSymbol ../../../../symbols/support/gfxUtils ../../libs/gl-matrix/mat2d ../../libs/gl-matrix/mat2dExtras".split(" "),
  797. function(p,g,b,a,e,d,c,k,f,l){function h(a,b){if(!b)return null;b.toRgba?(a[0]=b.r,a[1]=b.g,a[2]=b.b,a[3]=b.a):(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]);return a}function n(a,b,c){null!=c&&(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=c);return a}function r(a,b,c){var d=b[0]/b[1];a[0]=a[1]=1;isNaN(c)||(1<d?(a[0]=c/b[0],a[1]=c/d/b[1]):(a[1]=c/b[1],a[0]=c*d/b[0]));return a}function m(a,b,d,h,g,m,n){var w=g.symbol;d=a.toScreenPoint(z,d,n[0]);n=[d.x,d.y];a=d.x;d=d.y;var p=g.heading,v=g.size&&g.size[0],A,C;f.identity(y);
  798. "number"===typeof v&&(C=isFinite(v)&&v);C=(v=C&&isFinite(C)&&!isNaN(C))?e.pt2px(C):NaN;m&&l.rotategAt(y,y,m,n);p&&l.rotategAt(y,y,p,n);m=e.pt2px(w.xoffset);var p=e.pt2px(w.yoffset),D;if(0!==m||0!==p)D=[m,-p];m=null;0!==w.angle&&(m=f.create(),l.rotategAt(m,m,w.angle,n));var E;if("simple-marker"===w.type)switch(A=w.style,g=Math.round,C=v?C:e.pt2px(w.size),v=void 0,A){case c.STYLE_SQUARE:case c.STYLE_CROSS:case c.STYLE_X:case c.STYLE_DIAMOND:v=isNaN(C)?16:.5*C;A=t(b,h,B(A,a,d,g(a-v),g(a+v),g(d-v),g(d+
  799. v)));break;case c.STYLE_PATH:A=E=t(b,h,w.path);E=E.getBoundingBox();w=r(f.create(),[E.width,E.height],C);1===w[0]&&1===w[3]||l.scaleAt(y,y,w,n);E=[-(E.x+.5*E.width)+a,-(E.y+.5*E.height)+d];break;default:v=isNaN(C)?16:.5*C,A=q(b,h,{cx:a,cy:d,r:v})}else if("picture-marker"===w.type){n=A=null;var p=e.pt2px(w.width),G=e.pt2px(w.height);v?(n=C,A=p/G*n):(A=p,n=G);D&&(null!=D[0]&&(D[0]=D[0]/p*A),null!=D[1]&&(D[1]=D[1]/G*n));A=u(b,h,{x:a-.5*A,y:d-.5*n,width:A,height:n,src:w.url});(C=A.getNode())&&(null!=
  800. g.opacity?C.setAttribute("opacity",g.opacity.toString()):C.setAttribute("opacity","1"))}else if("text"===w.type){if(g=w.font&&w.font.clone())g.size=v?C:e.pt2px(g.size);A=x(b,h,{type:"text",text:w.text,x:a,y:d,align:k.getSVGAlign(w),decoration:w.decoration||g&&g.decoration,rotated:w.rotated,kerning:w.kerning});g&&A.setFont(g);C=A.getNode();b=k.getSVGBaseline(w);w=k.getSVGBaselineShift(w);C&&(C.setAttribute("dominant-baseline",b),w&&C.setAttribute("baseline-shift",w))}D&&f.translate(y,y,D);m&&f.multiply(y,
  801. y,m);E&&f.translate(y,y,E);A.setTransform(y);return A}function u(a,b,c){return b?b.setShape(c):a.createImage(c)}function q(a,b,c){return b?b.setShape(c):a.createCircle(c)}function t(a,b,c){c=Array.isArray(c)?c.join(" "):c;return b?b.setShape(c):a.createPath(c)}function x(a,b,c){return b?b.setShape(c):a.createText(c)}function v(a,b){b=b&&b.shape&&b.shape.type;var c=a&&a.type;a=a&&a.style;c&&(a=A[c]||a);C[a]&&(a="path");return!(!b||!a||b===a)}function B(a,b,d,e,f,h,k,l){switch(a){case c.STYLE_SQUARE:return["M",
  802. e+","+h,f+","+h,f+","+k,e+","+k,"Z"];case c.STYLE_CROSS:return["M",b+","+h,b+","+k,"M",e+","+d,f+","+d];case c.STYLE_X:return["M",e+","+h,f+","+k,"M",e+","+k,f+","+h];case c.STYLE_DIAMOND:return["M",b+","+h,f+","+d,b+","+k,e+","+d,"Z"];case c.STYLE_TARGET:return["M",e+","+h,f+","+h,f+","+k,e+","+k,e+","+h,"M",e-l+","+d,e+","+d,"M",b+","+(h-l),b+","+h,"M",f+l+","+d,f+","+d,"M",b+","+(k+l),b+","+k]}}function w(a,d){var e=d.symbol;if("picture-marker"!==e.type){var f=k.getFill(e);if("simple-marker"===
  803. e.type){var l=e.style,g=(e=k.getStroke(e))&&e.color,l=l===c.STYLE_X||l===c.STYLE_CROSS,m=d.opacity;(d=d.color||h([0,0,0,0],l?g:f))&&null!=m&&(d=n([0,0,0,0],d,m));d&&(l?d!==g&&(e=e?b.mixin({},e):{},e.color=d):d!==f&&(f=d));a.setFill(f).setStroke(e)}else"text"===e.type&&(m=d.opacity,(d=d.color||h([0,0,0,0],f))&&null!=m&&(d=n([0,0,0,0],d,m)),d&&d!==f&&(f=d),a.setFill(f))}}Object.defineProperty(g,"__esModule",{value:!0});g.getScalingVector=r;var z={x:0,y:0},y=f.create();g.drawPoint=m;g.drawMarkers=function(a,
  804. b,c,d,e,f,h,k){var l=e.symbol;c=c.points;b=d||b.createGroup();d=[0];b.children[0]&&v(l,b.children[0])&&b.clear();for(var g=0,n=c.length,l=0;l<n;l++)for(var r=c[l],q=h.length,w=0;w<q;w++){d[0]=h[w];var t=m(a,b,{x:r[0],y:r[1]},b.children[g++],e,f,d);t.getNode().gfxObject=k;b.add(t)}a=b.children.length;if(c.length*h.length<a)for(h=c.length*h.length,l=a-1;l>=h;l--)b.children[l].removeShape();return b};g.drawShape=function(a,b,c,e,f){var h=[];"extent"===c.type&&(c=d.fromExtent(c));if("polyline"===c.type||
  805. "polygon"===c.type){for(var k=f.length,l=0;l<k;l++)h=h.concat(a.toScreenPath(c,f[l]));e=t(b,e,h)}return e};g.drawRect=function(a,b,c){return b?b.setShape(c):a.createRect(c)};g.drawImage=u;g.drawCircle=q;g.drawPath=t;g.drawText=x;var A={"picture-marker":"image","picture-fill":"path","simple-fill":"path","simple-line":"path",text:"text"},C={square:1,cross:1,x:1,diamond:1,target:1};g.isShapeInvalid=v;g.smsToPath=B;g.stylePoint=w;g.styleMarkers=function(a,b){for(var c=a.children.length,d=0;d<c;d++)w(a.children[d],
  806. b)};g.styleShape=function(c,d){var f=d.symbol,l=d.size,g=d.color,m=d.opacity,r=d.outlineSize;d=k.getStroke(f);var q=k.getFill(f),w=!1,t;"simple-line"===f.type?(w=!0,t="none"!==f.style):t=f.outline&&"none"!==f.outline.style;var u,p,v;if(null!=l||null!=r)if(l=l&&isFinite(l[0])&&l[0],r=w?null:r,null!=l||null!=r)v=e.pt2px(r||l);l="picture-fill"===f.type;!g&&null==m||l||(w?(u=g||d&&d.color&&h([0,0,0,0],d.color))&&null!=m&&(u=n(u,u,m)):q&&(p=g||h([0,0,0,0],q))&&null!=m&&(p=n(p,p,m)));!t||null==v&&!u?c.setStroke(d):
  807. c.setStroke(b.mixin({},d,null!=v?{width:v}:null,u&&{color:u}));f=g&&new a(g)||f.color;q&&"pattern"===q.type&&f&&!l?k.getPatternUrlWithColor(q.src,f.toCss(!0)).then(function(a){q.src=a;c.setFill(q)}):c.setFill(p||q);c.rawNode.setAttribute("vector-effect","non-scaling-stroke")}})},"esri/symbols/support/gfxUtils":function(){define("require exports dojo/_base/lang dojox/gfx/_base ../../Color ../../request ../../core/LRUMap ../../core/promiseUtils ../../core/screenUtils".split(" "),function(p,g,b,a,e,
  808. d,c,k,f){function l(a){if(!a)return null;var b,c=a.constructor,d=f.pt2px(a.width);switch(a.type){case "simple-fill":case "picture-fill":case "simple-marker":b=l(a.outline);break;case "simple-line":a.style!==c.STYLE_NULL&&0!==d&&(b={color:a.color,style:u(a.style),width:d,cap:a.cap,join:a.join===c.JOIN_MITER?f.pt2px(a.miterLimit):a.join});break;default:b=null}return b}Object.defineProperty(g,"__esModule",{value:!0});var h=p.toUrl("../../symbols/patterns/"),n={left:"start",center:"middle",right:"end",
  809. justify:"start"},r={top:"text-before-edge",middle:"central",baseline:"alphabetic",bottom:"text-after-edge"},m=new c(1E3);g.getSVGAlign=function(a){return a=(a=a.horizontalAlignment)&&n[a.toLowerCase()]||"middle"};g.getSVGBaseline=function(a){return(a=a.verticalAlignment)&&r[a.toLowerCase()]||"alphabetic"};g.getSVGBaselineShift=function(a){return"bottom"===a.verticalAlignment?"super":null};g.getFill=function(c){var d=c.style,e=null;if(c){var k=c.constructor;switch(c.type){case "simple-marker":d!==
  810. k.STYLE_CROSS&&d!==k.STYLE_X&&(e=c.color);break;case "simple-fill":d===k.STYLE_SOLID?e=c.color:d!==k.STYLE_NULL&&(e=b.mixin({},a.defaultPattern,{src:h+d+".png",width:8,height:8}));break;case "picture-fill":e=b.mixin({},a.defaultPattern,{src:c.url,width:f.pt2px(c.width)*c.xscale,height:f.pt2px(c.height)*c.yscale,x:f.pt2px(c.xoffset),y:f.pt2px(c.yoffset)});break;case "text":e=c.color}}return e};g.getPatternUrlWithColor=function(a,b){var c=a+"-"+b;return m.has(c)?k.resolve(m.get(c)):d(a,{responseType:"image",
  811. allowImageDataAccess:!0}).then(function(a){a=a.data;var d=a.naturalWidth,e=a.naturalHeight,f=document.createElement("canvas");f.width=d;f.height=e;var h=f.getContext("2d");h.fillStyle=b;h.fillRect(0,0,d,e);h.globalCompositeOperation="destination-in";h.drawImage(a,0,0);a=f.toDataURL();m.set(c,a);return a})};g.getStroke=l;var u=function(){var a={};return function(b){if(a[b])return a[b];var c=b.replace(/-/g,"");return a[b]=c}}();g.defaultThematicColor=new e([128,128,128])})},"dojox/gfx/_base":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/Color dojo/_base/sniff dojo/_base/window dojo/_base/array dojo/dom dojo/dom-construct dojo/dom-geometry".split(" "),
  812. function(p,g,b,a,e,d,c,k,f){var l=g.getObject("dojox.gfx",!0),h=l._base={};l._hasClass=function(a,b){return(a=a.getAttribute("className"))&&0<=(" "+a+" ").indexOf(" "+b+" ")};l._addClass=function(a,b){var c=a.getAttribute("className")||"";(!c||0>(" "+c+" ").indexOf(" "+b+" "))&&a.setAttribute("className",c+(c?" ":"")+b)};l._removeClass=function(a,b){var c=a.getAttribute("className");c&&a.setAttribute("className",c.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)"),"$1$2"))};h._getFontMeasurements=function(){var b=
  813. {"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},c,d;a("ie")&&(d=e.doc.documentElement.style.fontSize||"",d||(e.doc.documentElement.style.fontSize="100%"));var f=k.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},e.body());for(c in b)f.style.fontSize=c,b[c]=16*Math.round(12*f.offsetHeight/16)/12/1E3;
  814. a("ie")&&(e.doc.documentElement.style.fontSize=d);e.body().removeChild(f);return b};var n=null;h._getCachedFontMeasurements=function(a){if(a||!n)n=h._getFontMeasurements();return n};var r=null,m={};h._getTextBox=function(a,b,c){var d,h,l=arguments.length,g;r||(r=k.create("div",{style:{position:"absolute",top:"-10000px",left:"0",visibility:"hidden"}},e.body()));d=r;d.className="";h=d.style;h.borderWidth="0";h.margin="0";h.padding="0";h.outline="0";if(1<l&&b)for(g in b)g in m||(h[g]=b[g]);2<l&&c&&(d.className=
  815. c);d.innerHTML=a;d.getBoundingClientRect?(h=d.getBoundingClientRect(),h={l:h.left,t:h.top,w:h.width||h.right-h.left,h:h.height||h.bottom-h.top}):h=f.getMarginBox(d);d.innerHTML="";return h};h._computeTextLocation=function(a,b,c,d){var e={};switch(a.align){case "end":e.x=a.x-b;break;case "middle":e.x=a.x-b/2;break;default:e.x=a.x}e.y=a.y-c*(d?.75:1);return e};h._computeTextBoundingBox=function(a){if(!l._base._isRendered(a))return{x:0,y:0,width:0,height:0};var b;b=a.getShape();var c=a.getFont()||l.defaultFont;
  816. a=a.getTextWidth();c=l.normalizedLength(c.size);b=h._computeTextLocation(b,a,c,!0);return{x:b.x,y:b.y,width:a,height:c}};h._isRendered=function(a){for(a=a.parent;a&&a.getParent;)a=a.parent;return null!==a};var u=0;h._getUniqueId=function(){var a;do a=p._scopeName+"xUnique"+ ++u;while(c.byId(a));return a};var q=a("pointer-events")?"touchAction":null;h._fixMsTouchAction=q?function(a){a.rawNode.style[q]="none"}:function(){};g.mixin(l,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",
  817. points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",
  818. color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var a={};return function(b){var c=
  819. a[b];if(c)return new c;c=a[b]=new Function;c.prototype=l["default"+b];return new c}}(),normalizeColor:function(a){return a instanceof b?a:new b(a)},normalizeParameters:function(a,b){var c;if(b){var d={};for(c in a)c in b&&!(c in d)&&(a[c]=b[c])}return a},makeParameters:function(a,b){var c=null;if(!b)return g.delegate(a);var d={};for(c in a)c in d||(d[c]=g.clone(c in b?b[c]:a[c]));return d},formatNumber:function(a,b){var c=a.toString();if(0<=c.indexOf("e"))c=a.toFixed(4);else{var d=c.indexOf(".");
  820. 0<=d&&5<c.length-d&&(c=a.toFixed(4))}return 0>a?c:b?" "+c:c},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(a){var b=l.getDefault("Font");a=a.split(/\s+/);if(!(5>a.length)){b.style=a[0];b.variant=a[1];b.weight=a[2];var c=a[3].indexOf("/");b.size=0>c?a[3]:a[3].substring(0,c);var d=4;0>c&&("/"==a[4]?d=6:"/"==a[4].charAt(0)&&(d=5));d<a.length&&(b.family=a.slice(d).join(" "))}return b},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return l._base._getCachedFontMeasurements()["12pt"]/
  821. 12},pt2px:function(a){return a*l.px_in_pt()},px2pt:function(a){return a/l.px_in_pt()},normalizedLength:function(a){if(0===a.length)return 0;if(2<a.length){var b=l.px_in_pt(),c=parseFloat(a);switch(a.slice(-2)){case "px":return c;case "pt":return c*b;case "in":return 72*c*b;case "pc":return 12*c*b;case "mm":return c*l.mm_in_pt*b;case "cm":return c*l.cm_in_pt*b}}return parseFloat(a)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,
  822. equalSources:function(a,b){return a&&b&&a===b},switchTo:function(a){var b="string"==typeof a?l[a]:a;b&&(d.forEach("Group Rect Ellipse Circle Line Polyline Image Text Path TextPath EsriPath Surface createSurface fixTarget".split(" "),function(a){l[a]=b[a]}),"string"==typeof a?l.renderer=a:d.some(["svg","vml","canvas","canvasWithEvents","silverlight"],function(a){return l.renderer=l[a]&&l[a].Surface===l.Surface?a:null}))}});return l})},"esri/views/2d/libs/gl-matrix/mat2dExtras":function(){define(["require",
  823. "exports","./common","./mat2d","./vec2"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});var d=function(){var b=a.create(),d=e.create();return function(c,k,h){a.fromTranslation(b,h);a.multiply(c,b,k);e.negate(d,h);a.translate(c,c,d);return c}}();g.rotategAt=function(){var c=a.create();return function(e,f,l,h){a.fromRotation(c,b.toRadian(l));d(c,c,h);a.multiply(e,c,f);return e}}();g.scaleAt=function(){var b=a.create();return function(c,e,l,h){a.fromScaling(b,l);d(b,b,h);a.multiply(c,
  824. b,e);return c}}()})},"esri/views/2d/engine/graphics/GFXSurface":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../../core/tsSupport/assignHelper ../../viewpointUtils ../Container ../cssUtils ./Projector ../../libs/gfx ../../libs/gl-matrix/common ../../libs/gl-matrix/mat2d".split(" "),function(p,g,b,a,e,d,c,k,f,l,h){var n=h.identity(h.create());return function(d){function g(){var a=null!==d&&d.apply(this,arguments)||this;a._transform=h.create();a._projector=new k;
  825. a._prevStateId=null;return a}b(g,d);g.prototype.createElement=function(){var a=document.createElement("div");a.setAttribute("class","esri-display-object");return a};g.prototype.setElement=function(a){this.surface&&(this.surface.destroy(),this.surface=null);if(this.element=a)this.surface=f.createSurface(this.element,400,400)};g.prototype.doRender=function(a){var b=this.element.style;if(this.visible){b.display="block";b.opacity=""+this.parent.opacity;var f=this._transform,k=a.state,g=this._prevStateId!==
  826. k.id;if(this.renderRequested||g){if(a.stationary)g&&(this._prevStateId=k.id),e.getMatrix(f,k.center,k.size,k.resolution,l.toRadian(k.rotation),1),this.surface.setDimensions(k.size[0],k.size[1]),this._projector.update(f,k.resolution),this.children.forEach(function(a){a.g&&a.g.setTransform(n)}),d.prototype.doRender.call(this,a);else{var m=h.invert(h.create(),f);h.multiply(m,k.transform,m);this.children.forEach(function(a){a.g&&a.g.setTransform(m)})}c.clip(b,k.clipRect);b.transform=c.cssMatrix3d(h.fromRotation(h.create(),
  827. l.toRadian(k.rotation)));this.surface.rawNode.style.transform=c.cssMatrix(h.fromRotation(h.create(),l.toRadian(-k.rotation)))}}else b.display="none"};g.prototype.hitTest=function(a,b){if(!this.attached)return null;var c=this.surface.rawNode,c=c.parentElement||c.parentNode;c.style.zIndex="9000";a=document.elementFromPoint(a,b);c.style.zIndex="";return a&&a.gfxObject||null};g.prototype.prepareChildrenRenderParameters=function(b){return a({},b,{projector:this._projector,surface:this.surface})};g.prototype.beforeRenderChildren=
  828. function(a,b){this.surface.openBatch()};g.prototype.attachChild=function(a,b){return a.attach(b)};g.prototype.detachChild=function(a,b){return a.detach()};g.prototype.renderChild=function(a,b){return a.processRender(b)};g.prototype.afterRenderChildren=function(a,b){this.surface.closeBatch()};return g}(d)})},"esri/views/2d/engine/cssUtils":function(){define(["require","exports","dojo/has"],function(p,g,b){function a(a){return"matrix3d(\n "+a[0].toFixed(10)+", "+a[1].toFixed(10)+
  829. ", 0, 0,\n "+a[2].toFixed(10)+", "+a[3].toFixed(10)+", 0, 0,\n 0, 0, 1, 0,\n "+Math.round(a[4]).toFixed(10)+", "+Math.round(a[5]).toFixed(10)+", 0, 1\n )"}function e(a){return"translate("+Math.round(a[0])+"px, "+Math.round(a[1])+"px)"}function d(a){return"rotateZ( "+a+" deg)"}Object.defineProperty(g,"__esModule",{value:!0});p=b("ff");var c=b("ie"),k=b("webkit");b=b("opera");var f=k&&"-webkit-transform"||p&&"-moz-transform"||
  830. b&&"-o-transform"||c&&"-ms-transform"||"transform";g.clip=function(a,b){a.clip=b?"rect( "+b.top+"px, "+b.right+"px, "+b.bottom+"px, "+b.left+"px)":""};g.setTransform=function(b,c){var d=null;2===c.length&&(d=e(c));6===c.length&&(d=a(c));b.transform=b[f]=d};g.setOrigin=function(a,b){a.transformOrigin=b[0]+"px "+b[1]+"px 0"};g.cssMatrix=function(a){return"matrix(\n "+a[0].toFixed(10)+", "+a[1].toFixed(10)+",\n "+a[2].toFixed(10)+", "+a[3].toFixed(10)+",\n "+
  831. a[4]+", "+a[5]+"\n )"};g.cssMatrix3d=a;g.translate=e;g.rotate=function(a){return d(a.toFixed(3))};g.rotateZ=d})},"esri/views/2d/engine/graphics/Projector":function(){define(["require","exports"],function(p,g){function b(a,k,f,g,h){void 0===g&&(g=0);void 0===h&&(h=a.length);for(var c=a[g],l=a[h-1],m=0,p=0,q,t=g+1;t<h-1;t++){var x=a[t];q=x[0];var x=x[1],v=c[0],B=c[1],w=l[0],z=l[1];v===w?q=e(q-v):(w=(z-B)/(w-v),q=e(w*q-x+(B-w*v))/d(w*w+1));q>m&&(p=t,m=q)}m>k?(b(a,k,f,g,p+1),b(a,k,f,p,
  832. h)):(f(c[0],c[1]),f(l[0],l[1]))}var a=Math.round,e=Math.abs,d=Math.sqrt;return function(){function c(){this._transform=null}c.prototype.update=function(a,b){this._transform=a;this._resolution=b};c.prototype.toScreenPoint=function(a,b,c){this.transformPoint(b.x+c*this._resolution,b.y,function(b,c){a.x=b;a.y=c});return a};c.prototype.toScreenPath=function(a,c){var d=this,e=null!=a.paths;a=e?a.paths:a.rings;var f="",k=function(a,b){a+=c*d._resolution;d.transformPoint(a,b,function(a,b){isNaN(a)||isNaN(b)||
  833. (f+=a,f+=",",f+=b,f+=" ")})};if(a)for(var g=a.length,p=0;p<g;p++)f+="M ",b(a[p],this._resolution,k),e||(f+="Z ");return f};c.prototype.transformPoint=function(b,c,d){var e=this._transform,f=e[1],k=e[3],g=e[5];d(a(e[0]*b+e[2]*c+e[4]),a(f*b+k*c+g))};return c}()})},"esri/views/2d/libs/gfx":function(){define("require exports ./gfx/Circle ./gfx/Group ./gfx/Image ./gfx/Path ./gfx/Rect ./gfx/Shape ./gfx/Surface ./gfx/svgSurface ./gfx/Text".split(" "),function(p,g,b,a,e,d,c,k,f,l,h){Object.defineProperty(g,
  834. "__esModule",{value:!0});g.Circle=b.default;g.Group=a.default;g.Image=e.default;g.Path=d.default;g.Rect=c.default;g.Shape=k.default;g.Surface=f.default;g.createSurface=l.createSurface;g.Text=h.default})},"esri/views/2d/libs/gfx/Circle":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","dojox/gfx/_base","./Shape"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function c(b){var c=d.call(this)||this;c.shape=a.getDefault("Circle");c.rawNode=
  835. b;return c}b(c,d);c.prototype.getBoundingBox=function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.r,y:a.cy-a.r,width:2*a.r,height:2*a.r}}return this.bbox};c.nodeType="circle";return c}(e.default);g.default=p})},"esri/views/2d/libs/gfx/Shape":function(){define("require exports dojo/dom dojo/dom-attr dojo/_base/Color dojo/_base/lang dojox/gfx/_base ./svg ../gl-matrix/mat2d".split(" "),function(p,g,b,a,e,d,c,k,f){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function g(){this.parentMatrix=
  836. this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null}g.prototype.destroy=function(){if(this.fillStyle&&"type"in this.fillStyle){var a=this.rawNode.getAttribute("fill");(a=k.getRef(a))&&a.parentNode.removeChild(a)}this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=null};g.prototype.getNode=function(){return this.rawNode};g.prototype.getShape=function(){return this.shape};g.prototype.getTransform=function(){return this.matrix};
  837. g.prototype.getFill=function(){return this.fillStyle};g.prototype.getStroke=function(){return this.strokeStyle};g.prototype.getParent=function(){return this.parent};g.prototype.getBoundingBox=function(){return this.bbox};g.prototype.setTransform=function(a){this.matrix=this.matrix?f.copy(this.matrix,a):f.clone(a);return this._applyTransform()};g.prototype.setFill=function(a){if(!a)return this.fillStyle=null,this.rawNode.setAttribute("fill","none"),this.rawNode.setAttribute("fill-opacity",0),this;
  838. var b;if("object"===typeof a&&"type"in a){switch(a.type){case "linear":b=c.makeParameters(c.defaultLinearGradient,a);a=this._setFillObject(b,"linearGradient");a.setAttribute("x1",b.x1.toFixed(8));a.setAttribute("y1",b.y1.toFixed(8));a.setAttribute("x2",b.x2.toFixed(8));a.setAttribute("y2",b.y2.toFixed(8));break;case "radial":b=c.makeParameters(c.defaultRadialGradient,a);a=this._setFillObject(b,"radialGradient");a.setAttribute("cx",b.cx.toFixed(8));a.setAttribute("cy",b.cy.toFixed(8));a.setAttribute("r",
  839. b.r.toFixed(8));break;case "pattern":b=c.makeParameters(c.defaultPattern,a),a=this._setFillObject(b,"pattern"),a.setAttribute("x",b.x.toFixed(8)),a.setAttribute("y",b.y.toFixed(8)),a.setAttribute("width",b.width.toFixed(8)),a.setAttribute("height",b.height.toFixed(8))}this.fillStyle=b;return this}this.fillStyle=b=c.normalizeColor(a);this.rawNode.setAttribute("fill",b.toCss());this.rawNode.setAttribute("fill-opacity",b.a);this.rawNode.setAttribute("fill-rule","evenodd");return this};g.prototype.setStroke=
  840. function(a){var b=this.rawNode;if(!a)return this.strokeStyle=null,b.setAttribute("stroke","none"),b.setAttribute("stroke-opacity",0),this;if("string"===typeof a||d.isArray(a)||a instanceof e)a={color:a};a=this.strokeStyle=c.makeParameters(c.defaultStroke,a);a.color=c.normalizeColor(a.color);if(a){var f=0>a.width?0:a.width;b.setAttribute("stroke",a.color.toCss());b.setAttribute("stroke-opacity",a.color.a);b.setAttribute("stroke-width",f);b.setAttribute("stroke-linecap",a.cap);"number"===typeof a.join?
  841. (b.setAttribute("stroke-linejoin","miter"),b.setAttribute("stroke-miterlimit",a.join)):b.setAttribute("stroke-linejoin",a.join);var h=a.style.toLowerCase();h in k.dasharray&&(h=k.dasharray[h]);if(h instanceof Array){for(var h=d._toArray(h),g=0;g<h.length;++g)h[g]*=f;if("butt"!==a.cap){for(g=0;g<h.length;g+=2)h[g]-=f,1>h[g]&&(h[g]=1);for(g=1;g<h.length;g+=2)h[g]+=f}h=h.join(",")}b.setAttribute("stroke-dasharray",h);b.setAttribute("dojoGfxStrokeStyle",a.style)}return this};g.prototype._getParentSurface=
  842. function(){for(var a=this.parent;a&&!a.defNode;a=a.parent);return a};g.prototype._setFillObject=function(a,b){var d=k.xmlns.svg;this.fillStyle=a;var e=this._getParentSurface().defNode,f=this.rawNode.getAttribute("fill");if(f=k.getRef(f))if(f.tagName.toLowerCase()!==b.toLowerCase()){var h=f.id;f.parentNode.removeChild(f);f=k._createElementNS(d,b);f.setAttribute("id",h);e.appendChild(f)}else for(;f.childNodes.length;)f.removeChild(f.lastChild);else f=k._createElementNS(d,b),f.setAttribute("id",c._base._getUniqueId()),
  843. e.appendChild(f);if("pattern"===b)f.setAttribute("patternUnits","userSpaceOnUse"),d=k._createElementNS(d,"image"),d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width",(0>a.width?0:a.width).toFixed(8)),d.setAttribute("height",(0>a.height?0:a.height).toFixed(8)),k._setAttributeNS(d,k.xmlns.xlink,"xlink:href",a.src),f.appendChild(d);else for(f.setAttribute("gradientUnits","userSpaceOnUse"),b=0;b<a.colors.length;++b){var e=a.colors[b],h=k._createElementNS(d,"stop"),g=e.color=c.normalizeColor(e.color);
  844. h.setAttribute("offset",e.offset.toFixed(8));h.setAttribute("stop-color",g.toCss());h.setAttribute("stop-opacity",g.a);f.appendChild(h)}this.rawNode.setAttribute("fill","url(#"+f.getAttribute("id")+")");this.rawNode.removeAttribute("fill-opacity");this.rawNode.setAttribute("fill-rule","evenodd");return f};g.prototype._applyTransform=function(){var a=this.matrix;a?this.rawNode.setAttribute("transform","matrix("+a[0].toFixed(8)+","+a[1].toFixed(8)+","+a[2].toFixed(8)+","+a[3].toFixed(8)+","+a[4].toFixed(8)+
  845. ","+a[5].toFixed(8)+")"):this.rawNode.removeAttribute("transform");return this};g.prototype.setRawNode=function(a){a=this.rawNode=a;"image"!==this.shape.type&&a.setAttribute("fill","none");a.setAttribute("fill-opacity",0);a.setAttribute("stroke","none");a.setAttribute("stroke-opacity",0);a.setAttribute("stroke-width",1);a.setAttribute("stroke-linecap","butt");a.setAttribute("stroke-linejoin","miter");a.setAttribute("stroke-miterlimit",4);a.__gfxObject__=this};g.prototype.setShape=function(a){this.shape=
  846. c.makeParameters(this.shape,a);for(var b in this.shape)if("type"!==b){a=this.shape[b];if("width"===b||"height"===b)a=0>a?0:a;this.rawNode.setAttribute(b,a)}this.bbox=null;return this};g.prototype._moveToFront=function(){this.rawNode.parentNode.appendChild(this.rawNode);return this};g.prototype._moveToBack=function(){this.rawNode.parentNode.insertBefore(this.rawNode,this.rawNode.parentNode.firstChild);return this};g.prototype._removeClipNode=function(){var c,d=a.get(this.rawNode,"clip-path");d&&(c=
  847. b.byId(d.match(/gfx_clip[\d]+/)[0]))&&c.parentNode.removeChild(c);return c};g.prototype.moveToFront=function(){var a=this.getParent();a&&(a._moveChildToFront(this),this._moveToFront());return this};g.prototype.moveToBack=function(){var a=this.getParent();a&&(a._moveChildToBack(this),this._moveToBack());return this};g.prototype.removeShape=function(a){this.parent&&this.parent.remove(this,a);return this};g.prototype._setParent=function(a,b){this.parent=a;return this._updateParentMatrix(b)};g.prototype._updateParentMatrix=
  848. function(a){this.parentMatrix=a?f.clone(a):null;return this._applyTransform()};g.prototype._getRealMatrix=function(){for(var a=f.clone(this.matrix||f.create()),b=this.parent;b;)b.matrix&&a&&f.multiply(a,b.matrix,a),b=b.parent;return a};return g}();g.default=p})},"esri/views/2d/libs/gfx/svg":function(){define(["require","exports","dojo/dom"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});g.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};g.dasharray={solid:"none",
  849. shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};g._createElementNS=function(a,b){return document.createElementNS?document.createElementNS(a,b):document.createElement(b)};g._setAttributeNS=function(a,b,d,c){return a.setAttributeNS?a.setAttributeNS(b,d,c):a.setAttribute(d,c)};g._createTextNode=function(a){return document.createTextNode(a)};g._createFragment=function(){return document.createDocumentFragment()};
  850. g.getRef=function(a){return a&&"none"!==a?a.match(/^url\(#.+\)$/)?b.byId(a.slice(5,-1)):a.match(/^#dojoUnique\d+$/)?b.byId(a.slice(1)):null:null}})},"esri/views/2d/libs/gfx/Group":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojox/gfx/_base ./Circle ./Container ./Image ./Path ./Rect ./svg ./Text".split(" "),function(p,g,b,a,e,d,c,k,f,l,h){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function g(){return null!==d&&d.apply(this,arguments)||this}b(g,d);
  851. g.prototype.setRawNode=function(a){this.rawNode=a;this.rawNode.__gfxObject__=this};g.prototype.destroy=function(){d.prototype.clear.call(this,!0);d.prototype.destroy.call(this)};g.prototype.createShape=function(b){switch(b.type){case a.defaultPath.type:return this.createPath(b);case a.defaultRect.type:return this.createRect(b);case a.defaultCircle.type:return this.createCircle(b);case a.defaultImage.type:return this.createImage(b);case a.defaultText.type:return this.createText(b)}console.error("[gfx] unknown shape",
  852. b);return null};g.prototype.createGroup=function(){return this.createObject(g)};g.prototype.createRect=function(a){return this.createObject(f.default,a)};g.prototype.createCircle=function(a){return this.createObject(e.default,a)};g.prototype.createImage=function(a){return this.createObject(c.default,a)};g.prototype.createText=function(a){return this.createObject(h.default,a)};g.prototype.createPath=function(a){return this.createObject(k.default,a)};g.prototype.createObject=function(a,b){if(!this.rawNode)return null;
  853. var c=new a;a=l._createElementNS(l.xmlns.svg,a.nodeType);c.setRawNode(a);c.setShape(b);this.add(c);return c};g.nodeType="g";return g}(d.default);g.default=p})},"esri/views/2d/libs/gfx/Container":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojox/gfx/matrix ./Shape ./svg".split(" "),function(p,g,b,a,e,d){Object.defineProperty(g,"__esModule",{value:!0});p=function(c){function e(){var a=null!==c&&c.apply(this,arguments)||this;a.children=[];a._batch=0;return a}b(e,c);e.prototype.openBatch=
  854. function(){this._batch||(this.fragment=d._createFragment());++this._batch;return this};e.prototype.closeBatch=function(){this._batch=0<this._batch?--this._batch:0;this.fragment&&!this._batch&&(this.rawNode.appendChild(this.fragment),this.fragment=null);return this};e.prototype.add=function(a){if(this===a.getParent())return this;this.fragment?this.fragment.appendChild(a.rawNode):this.rawNode.appendChild(a.rawNode);var b=a.getParent();b&&b.remove(a,!0);this.children.push(a);a._setParent(this,this._getRealMatrix());
  855. return this};e.prototype.remove=function(a,b){void 0===b&&(b=!1);if(this!==a.getParent())return this;this.rawNode===a.rawNode.parentNode&&this.rawNode.removeChild(a.rawNode);this.fragment&&this.fragment===a.rawNode.parentNode&&this.fragment.removeChild(a.rawNode);for(var c=0;c<this.children.length;++c)if(this.children[c]===a){b||(a.parent=null,a.parentMatrix=null);this.children.splice(c,1);break}return this};e.prototype.clear=function(a){void 0===a&&(a=!1);for(var b=this.rawNode;b.lastChild;)b.removeChild(b.lastChild);
  856. var c=this.defNode;if(c){for(;c.lastChild;)c.removeChild(c.lastChild);b.appendChild(c)}for(c=0;c<this.children.length;++c)b=this.children[c],b.parent=null,b.parentMatrix=null,a&&b.destroy();this.children=[];return this};e.prototype.getBoundingBox=function(){if(!this.children)return null;var b=null;this.children.forEach(function(c){var d=c.getBoundingBox();d&&((c=c.getTransform())&&(d=a.multiplyRectangle(c,d)),b?(b.x=Math.min(b.x,d.x),b.y=Math.min(b.y,d.y),b.endX=Math.max(b.endX,d.x+d.width),b.endY=
  857. Math.max(b.endY,d.y+d.height)):b={x:d.x,y:d.y,endX:d.x+d.width,endY:d.y+d.height,width:0,height:0})});b&&(b.width=b.endX-b.x,b.height=b.endY-b.y);return b};e.prototype._moveChildToFront=function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]===a){this.children.splice(b,1);this.children.push(a);break}return this};e.prototype._moveChildToBack=function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]===a){this.children.splice(b,1);this.children.unshift(a);break}return this};
  858. return e}(e.default);g.default=p})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],function(p,g){var b=p.matrix={},a={};b._degToRad=function(b){return a[b]||(a[b]=Math.PI*b/180)};b._radToDeg=function(a){return a/Math.PI*180};b.Matrix2D=function(a){if(a)if("number"==typeof a)this.xx=this.yy=a;else if(a instanceof Array){if(0<a.length){for(var d=b.normalize(a[0]),c=1;c<a.length;++c){var e=d,f=b.normalize(a[c]),d=new b.Matrix2D;d.xx=e.xx*f.xx+e.xy*f.yx;d.xy=e.xx*f.xy+e.xy*f.yy;d.yx=
  859. e.yx*f.xx+e.yy*f.yx;d.yy=e.yx*f.xy+e.yy*f.yy;d.dx=e.xx*f.dx+e.xy*f.dy+e.dx;d.dy=e.yx*f.dx+e.yy*f.dy+e.dy}g.mixin(this,d)}}else g.mixin(this,a)};g.extend(b.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});g.mixin(b,{identity:new b.Matrix2D,flipX:new b.Matrix2D({xx:-1}),flipY:new b.Matrix2D({yy:-1}),flipXY:new b.Matrix2D({xx:-1,yy:-1}),translate:function(a,d){return 1<arguments.length?new b.Matrix2D({dx:a,dy:d}):new b.Matrix2D({dx:a.x,dy:a.y})},scale:function(a,d){return 1<arguments.length?new b.Matrix2D({xx:a,
  860. yy:d}):"number"==typeof a?new b.Matrix2D({xx:a,yy:a}):new b.Matrix2D({xx:a.x,yy:a.y})},rotate:function(a){var d=Math.cos(a);a=Math.sin(a);return new b.Matrix2D({xx:d,xy:-a,yx:a,yy:d})},rotateg:function(a){return b.rotate(b._degToRad(a))},skewX:function(a){return new b.Matrix2D({xy:Math.tan(a)})},skewXg:function(a){return b.skewX(b._degToRad(a))},skewY:function(a){return new b.Matrix2D({yx:Math.tan(a)})},skewYg:function(a){return b.skewY(b._degToRad(a))},reflect:function(a,d){1==arguments.length&&
  861. (d=a.y,a=a.x);var c=a*a,e=d*d,f=c+e,g=2*a*d/f;return new b.Matrix2D({xx:2*c/f-1,xy:g,yx:g,yy:2*e/f-1})},project:function(a,d){1==arguments.length&&(d=a.y,a=a.x);var c=a*a,e=d*d,f=c+e,g=a*d/f;return new b.Matrix2D({xx:c/f,xy:g,yx:g,yy:e/f})},normalize:function(a){return a instanceof b.Matrix2D?a:new b.Matrix2D(a)},isIdentity:function(a){return 1==a.xx&&0==a.xy&&0==a.yx&&1==a.yy&&0==a.dx&&0==a.dy},clone:function(a){var d=new b.Matrix2D,c;for(c in a)"number"==typeof a[c]&&"number"==typeof d[c]&&d[c]!=
  862. a[c]&&(d[c]=a[c]);return d},invert:function(a){a=b.normalize(a);var d=a.xx*a.yy-a.xy*a.yx;return a=new b.Matrix2D({xx:a.yy/d,xy:-a.xy/d,yx:-a.yx/d,yy:a.xx/d,dx:(a.xy*a.dy-a.yy*a.dx)/d,dy:(a.yx*a.dx-a.xx*a.dy)/d})},_multiplyPoint:function(a,b,c){return{x:a.xx*b+a.xy*c+a.dx,y:a.yx*b+a.yy*c+a.dy}},multiplyPoint:function(a,d,c){a=b.normalize(a);return"number"==typeof d&&"number"==typeof c?b._multiplyPoint(a,d,c):b._multiplyPoint(a,d.x,d.y)},multiplyRectangle:function(a,d){var c=b.normalize(a);d=d||{x:0,
  863. y:0,width:0,height:0};if(b.isIdentity(c))return{x:d.x,y:d.y,width:d.width,height:d.height};a=b.multiplyPoint(c,d.x,d.y);var e=b.multiplyPoint(c,d.x,d.y+d.height),f=b.multiplyPoint(c,d.x+d.width,d.y);d=b.multiplyPoint(c,d.x+d.width,d.y+d.height);var c=Math.min(a.x,e.x,f.x,d.x),g=Math.min(a.y,e.y,f.y,d.y);return{x:c,y:g,width:Math.max(a.x,e.x,f.x,d.x)-c,height:Math.max(a.y,e.y,f.y,d.y)-g}},multiply:function(a){for(var d=b.normalize(a),c=1;c<arguments.length;++c){var e=d,f=b.normalize(arguments[c]),
  864. d=new b.Matrix2D;d.xx=e.xx*f.xx+e.xy*f.yx;d.xy=e.xx*f.xy+e.xy*f.yy;d.yx=e.yx*f.xx+e.yy*f.yx;d.yy=e.yx*f.xy+e.yy*f.yy;d.dx=e.xx*f.dx+e.xy*f.dy+e.dx;d.dy=e.yx*f.dx+e.yy*f.dy+e.dy}return d},_sandwich:function(a,d,c){return b.multiply(b.translate(d,c),a,b.translate(-d,-c))},scaleAt:function(a,d,c,g){switch(arguments.length){case 4:return b._sandwich(b.scale(a,d),c,g);case 3:return"number"==typeof c?b._sandwich(b.scale(a),d,c):b._sandwich(b.scale(a,d),c.x,c.y)}return b._sandwich(b.scale(a),d.x,d.y)},rotateAt:function(a,
  865. d,c){return 2<arguments.length?b._sandwich(b.rotate(a),d,c):b._sandwich(b.rotate(a),d.x,d.y)},rotategAt:function(a,d,c){return 2<arguments.length?b._sandwich(b.rotateg(a),d,c):b._sandwich(b.rotateg(a),d.x,d.y)},skewXAt:function(a,d,c){return 2<arguments.length?b._sandwich(b.skewX(a),d,c):b._sandwich(b.skewX(a),d.x,d.y)},skewXgAt:function(a,d,c){return 2<arguments.length?b._sandwich(b.skewXg(a),d,c):b._sandwich(b.skewXg(a),d.x,d.y)},skewYAt:function(a,d,c){return 2<arguments.length?b._sandwich(b.skewY(a),
  866. d,c):b._sandwich(b.skewY(a),d.x,d.y)},skewYgAt:function(a,d,c){return 2<arguments.length?b._sandwich(b.skewYg(a),d,c):b._sandwich(b.skewYg(a),d.x,d.y)}});p.Matrix2D=b.Matrix2D;return b})},"esri/views/2d/libs/gfx/Image":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojox/gfx/_base ./Shape ./svg".split(" "),function(p,g,b,a,e,d){Object.defineProperty(g,"__esModule",{value:!0});p=function(c){function e(b){var d=c.call(this)||this;d.shape=a.getDefault("Image");d.rawNode=
  867. b;return d}b(e,c);e.prototype.setShape=function(b){this.shape=a.makeParameters(this.shape,b);this.bbox=null;b=this.rawNode;for(var c in this.shape)if("type"!==c&&"src"!==c){var e=this.shape[c];if("width"===c||"height"===c)e=0>e?0:e;b.setAttribute(c,e)}b.setAttribute("preserveAspectRatio","none");d._setAttributeNS(b,d.xmlns.xlink,"xlink:href",this.shape.src);b.__gfxObject__=this;return this};e.prototype.getBoundingBox=function(){return this.shape};e.prototype.setStroke=function(){return this};e.prototype.setFill=
  868. function(){return this};e.nodeType="image";return e}(e.default);g.default=p})},"esri/views/2d/libs/gfx/Path":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/_base/lang dojox/gfx/_base dojox/gfx/matrix ./Shape".split(" "),function(p,g,b,a,e,d,c){Object.defineProperty(g,"__esModule",{value:!0});p=function(c){function f(b){var d=c.call(this)||this;d.segments=[];d.tbbox=null;d.absolute=!0;d.last={};d.segmented=!1;d._validSegments={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0};
  869. d._2PI=2*Math.PI;d.rawNode=b;d.shape=a.clone(e.defaultPath);return d}b(f,c);f.prototype.setAbsoluteMode=function(a){this._confirmSegmented();this.absolute="string"===typeof a?"absolute"===a:a;return this};f.prototype.getAbsoluteMode=function(){this._confirmSegmented();return this.absolute};f.prototype.getBoundingBox=function(){this._confirmSegmented();return this.bbox&&"l"in this.bbox?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null};f.prototype._getRealBBox=
  870. function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;var a=this.bbox,b=this._getRealMatrix();this.bbox=null;for(var c=this.segments.length,d=0;d<c;++d)this._updateWithSegment(this.segments[d],b);b=this.bbox;this.bbox=a;return this.tbbox=b?[{x:b.l,y:b.t},{x:b.r,y:b.t},{x:b.r,y:b.b},{x:b.l,y:b.b}]:null};f.prototype.getLastPosition=function(){this._confirmSegmented();return"x"in this.last?this.last:null};f.prototype._applyTransform=function(){this.tbbox=null;c.prototype._applyTransform.call(this);
  871. return this};f.prototype._updateBBox=function(a,b,c){c&&(b=d.multiplyPoint(c,a,b),a=b.x,b=b.y);this.bbox&&"l"in this.bbox?(this.bbox.l>a&&(this.bbox.l=a),this.bbox.r<a&&(this.bbox.r=a),this.bbox.t>b&&(this.bbox.t=b),this.bbox.b<b&&(this.bbox.b=b)):this.bbox={l:a,b:b,r:a,t:b}};f.prototype._updateWithSegment=function(a,b){var c=a.args,d=c.length,f;switch(a.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(f=0;f<d;f+=2)this._updateBBox(c[f],c[f+1],b);this.last.x=c[d-2];this.last.y=c[d-
  872. 1];this.absolute=!0;break;case "H":for(f=0;f<d;++f)this._updateBBox(c[f],this.last.y,b);this.last.x=c[d-1];this.absolute=!0;break;case "V":for(f=0;f<d;++f)this._updateBBox(this.last.x,c[f],b);this.last.y=c[d-1];this.absolute=!0;break;case "m":f=0;"x"in this.last||(this._updateBBox(this.last.x=c[0],this.last.y=c[1],b),f=2);for(;f<d;f+=2)this._updateBBox(this.last.x+=c[f],this.last.y+=c[f+1],b);this.absolute=!1;break;case "l":case "t":for(f=0;f<d;f+=2)this._updateBBox(this.last.x+=c[f],this.last.y+=
  873. c[f+1],b);this.absolute=!1;break;case "h":for(f=0;f<d;++f)this._updateBBox(this.last.x+=c[f],this.last.y,b);this.absolute=!1;break;case "v":for(f=0;f<d;++f)this._updateBBox(this.last.x,this.last.y+=c[f],b);this.absolute=!1;break;case "c":for(f=0;f<d;f+=6)this._updateBBox(this.last.x+c[f],this.last.y+c[f+1],b),this._updateBBox(this.last.x+c[f+2],this.last.y+c[f+3],b),this._updateBBox(this.last.x+=c[f+4],this.last.y+=c[f+5],b);this.absolute=!1;break;case "s":case "q":for(f=0;f<d;f+=4)this._updateBBox(this.last.x+
  874. c[f],this.last.y+c[f+1],b),this._updateBBox(this.last.x+=c[f+2],this.last.y+=c[f+3],b);this.absolute=!1;break;case "A":for(f=0;f<d;f+=7)this._updateBBox(c[f+5],c[f+6],b);this.last.x=c[d-2];this.last.y=c[d-1];this.absolute=!0;break;case "a":for(f=0;f<d;f+=7)this._updateBBox(this.last.x+=c[f+5],this.last.y+=c[f+6],b);this.absolute=!1}a=[a.action];for(f=0;f<d;++f)a.push(e.formatNumber(c[f],!0));if("string"===typeof this.shape.path)this.shape.path+=a.join("");else for(f=0,d=a.length;f<d;++f)this.shape.path.push(a[f]);
  875. "string"===typeof this.shape.path&&this.rawNode.setAttribute("d",this.shape.path)};f.prototype._pushSegment=function(a,b){this.tbbox=null;var c=this._validSegments[a.toLowerCase()];"number"===typeof c&&(c?b.length>=c&&(a={action:a,args:b.slice(0,b.length-b.length%c)},this.segments.push(a),this._updateWithSegment(a)):(a={action:a,args:[]},this.segments.push(a),this._updateWithSegment(a)))};f.prototype._collectArgs=function(a,b){for(var c=0;c<b.length;++c){var d=b[c];"boolean"===typeof d?a.push(d?1:
  876. 0):"number"===typeof d?a.push(d):d instanceof Array?this._collectArgs(a,d):"x"in d&&"y"in d&&a.push(d.x,d.y)}};f.prototype._confirmSegmented=function(){if(!this.segmented){var a=this.shape.path;this.shape.path=[];this._setPath(a);this.shape.path=this.shape.path.join("");this.segmented=!0}};f.prototype._setPath=function(b){b=a.isArray(b)?b:b.match(e.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(b){for(var c="",d=[],f=b.length,g=0;g<f;++g){var k=b[g],l=parseFloat(k);
  877. isNaN(l)?(c&&this._pushSegment(c,d),d=[],c=k):d.push(l)}this._pushSegment(c,d)}};f.prototype.setShape=function(a){c.prototype.setShape.call(this,"string"===typeof a?{path:a}:a);this.segmented=!1;this.segments=[];this.shape.path?this.rawNode.setAttribute("d",this.shape.path):this.rawNode.removeAttribute("d");return this};f.nodeType="path";return f}(c.default);g.default=p})},"esri/views/2d/libs/gfx/Rect":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","dojox/gfx/_base",
  878. "./Shape"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});p=function(d){function c(b){var c=d.call(this)||this;c.shape=a.getDefault("Rect");c.rawNode=b;return c}b(c,d);c.prototype.getBoundingBox=function(){return this.shape};c.prototype.setShape=function(b){this.shape=a.makeParameters(this.shape,b);this.bbox=null;for(var c in this.shape)if("type"!==c&&"r"!==c){b=this.shape[c];if("width"===c||"height"===c)b=0>b?0:b;this.rawNode.setAttribute(c,b)}null!=this.shape.r&&(this.rawNode.setAttribute("ry",
  879. this.shape.r),this.rawNode.setAttribute("rx",this.shape.r));return this};c.nodeType="rect";return c}(e.default);g.default=p})},"esri/views/2d/libs/gfx/Text":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/has dojox/gfx/_base ./Shape ./svg".split(" "),function(p,g,b,a,e,d,c){Object.defineProperty(g,"__esModule",{value:!0});var k=a("chrome")?"auto":"optimizeLegibility";p=function(a){function d(b){var c=a.call(this)||this;c.fontStyle=null;c.shape=e.getDefault("Text");
  880. c.rawNode=b;return c}b(d,a);d.prototype.getFont=function(){return this.fontStyle};d.prototype.setFont=function(a){this.fontStyle="string"===typeof a?e.splitFontString(a):e.makeParameters(e.defaultFont,a);this._setFont();return this};d.prototype._setFont=function(){var a=this.fontStyle;this.rawNode.setAttribute("font-style",a.style);this.rawNode.setAttribute("font-weight",a.weight);this.rawNode.setAttribute("font-size",a.size);this.rawNode.setAttribute("font-family",a.family)};d.prototype.setShape=
  881. function(a){this.shape=e.makeParameters(this.shape,a);this.bbox=null;a=this.rawNode;var b=this.shape;a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("text-anchor",b.align);a.setAttribute("text-decoration",b.decoration);a.setAttribute("rotate",b.rotated?90:0);a.setAttribute("kerning",b.kerning?"auto":0);a.setAttribute("text-rendering",k);a.firstChild?a.firstChild.nodeValue=b.text:a.appendChild(c._createTextNode(b.text));return this};d.prototype.getTextWidth=function(){var a=this.rawNode,
  882. b=a.parentNode,a=a.cloneNode(!0);a.style.visibility="hidden";var c=0,d=a.firstChild.nodeValue;b.appendChild(a);if(""!==d)for(;!c;)c=a.getBBox?parseInt(a.getBBox().width,10):68;b.removeChild(a);return c};d.prototype.getBoundingBox=function(){var a=null;if(this.getShape().text)try{a=this.rawNode.getBBox()}catch(n){a={x:0,y:0,width:0,height:0}}return a};d.nodeType="text";return d}(d.default);g.default=p})},"esri/views/2d/libs/gfx/Surface":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/dom-construct dojo/has dojo/_base/array dojox/gfx/_base ./Circle ./Container ./Group ./Image ./Path ./Rect ./svg ./Text".split(" "),
  883. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u){Object.defineProperty(g,"__esModule",{value:!0});var q=navigator.userAgent,t=534<function(){var a=/WebKit\/(\d*)/.exec(q);return a?parseInt(a[1],10):0}();p=function(f){function g(){var a=null!==f&&f.apply(this,arguments)||this;a.rawNode=null;a._parent=null;a._nodes=[];a._events=[];return a}b(g,f);g.prototype.destroy=function(){d.forEach(this._nodes,a.destroy);this._nodes=[];d.forEach(this._events,function(a){a&&a.remove()});this._events=[];this.rawNode=null;
  884. if(e("ie"))for(;this._parent.lastChild;)a.destroy(this._parent.lastChild);else this._parent.innerHTML="";this.defNode=this._parent=null};g.prototype.setDimensions=function(a,b){if(!this.rawNode)return this;a=0>a?0:a;b=0>b?0:b;this.rawNode.setAttribute("width",a);this.rawNode.setAttribute("height",b);t&&(this.rawNode.style.width=a,this.rawNode.style.height=b);return this};g.prototype.getDimensions=function(){return this.rawNode?{width:c.normalizedLength(this.rawNode.getAttribute("width")),height:c.normalizedLength(this.rawNode.getAttribute("height"))}:
  885. null};g.prototype.getEventSource=function(){return this.rawNode};g.prototype._getRealMatrix=function(){return null};g.prototype.createShape=function(a){switch(a.type){case c.defaultPath.type:return this.createPath(a);case c.defaultRect.type:return this.createRect(a);case c.defaultCircle.type:return this.createCircle(a);case c.defaultImage.type:return this.createImage(a);case c.defaultText.type:return this.createText(a)}console.error("[gfx] unknown shape",a);return null};g.prototype.createGroup=function(){return this.createObject(l.default)};
  886. g.prototype.createRect=function(a){return this.createObject(r.default,a)};g.prototype.createCircle=function(a){return this.createObject(k.default,a)};g.prototype.createImage=function(a){return this.createObject(h.default,a)};g.prototype.createText=function(a){return this.createObject(u.default,a)};g.prototype.createPath=function(a){return this.createObject(n.default,a)};g.prototype.createObject=function(a,b){if(!this.rawNode)return null;var c=new a;a=m._createElementNS(m.xmlns.svg,a.nodeType);c.setRawNode(a);
  887. c.setShape(b);this.add(c);return c};return g}(f.default);g.default=p})},"esri/views/2d/libs/gfx/svgSurface":function(){define(["require","exports","dojo/dom","./Surface","./svg"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});g.createSurface=function(d,c,g){var f=new a.default;f.rawNode=e._createElementNS(e.xmlns.svg,"svg");f.rawNode.setAttribute("overflow","hidden");c&&f.rawNode.setAttribute("width",0>c?0:c);g&&f.rawNode.setAttribute("height",0>g?0:g);c=e._createElementNS(e.xmlns.svg,
  888. "defs");f.rawNode.appendChild(c);f.defNode=c;f._parent=b.byId(d);f._parent.appendChild(f.rawNode);return f}})},"esri/views/layers/GraphicsView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Graphic ../../core/Accessor ../../core/Collection ../../core/accessorSupport/decorators".split(" "),function(p,g,b,a,e,d,c,k){return function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a.graphics=null;a.renderer=null;a.view=
  889. null;return a}b(f,d);a([k.property({type:c.ofType(e)})],f.prototype,"graphics",void 0);a([k.property()],f.prototype,"renderer",void 0);a([k.property()],f.prototype,"view",void 0);return f=a([k.subclass("esri.views.layers.GraphicsView")],f)}(k.declared(d))})},"esri/views/2d/navigation/MapViewNavigation":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../Viewpoint ../../../core/Accessor ../../../core/accessorSupport/decorators ../../../geometry/Point ../viewpointUtils ./ZoomBox ./actions/Pan ./actions/Pinch ./actions/Rotate".split(" "),
  890. function(p,g,b,a,e,d,c,k,f,l,h,n,r){var m=new e({targetGeometry:new k}),u=[0,0];return function(d){function e(a){a=d.call(this)||this;a.animationManager=null;return a}b(e,d);e.prototype.initialize=function(){this.pan=new h({navigation:this});this.rotate=new r({navigation:this});this.pinch=new n({navigation:this});this.zoomBox=new l({view:this.view,navigation:this})};e.prototype.destroy=function(){this.zoomBox.destroy();this.animationManager=this.zoomBox=null};e.prototype.begin=function(){this._set("interacting",
  891. !0)};e.prototype.end=function(){this._set("interacting",!1)};e.prototype.zoom=function(a,b){void 0===b&&(b=this._getDefaultAnchor());this.stop();this.begin();if(this.view.constraints.snapToZoom&&this.view.constraints.effectiveLODs)return 1>a?this.zoomIn(b):this.zoomOut(b);this.setViewpoint(b,a,0)};e.prototype.zoomIn=function(a){void 0===a&&(a=this._getDefaultAnchor());var b=this.view,c=b.scale,d=b.constraints.snapToNextScale(c);return b.goTo(this._scaleAndRotateViewpoint(m,a,d/c,0))};e.prototype.zoomOut=
  892. function(a){void 0===a&&(a=this._getDefaultAnchor());var b=this.view,c=b.scale,d=b.constraints.snapToPreviousScale(c);return b.goTo(this._scaleAndRotateViewpoint(m,a,d/c,0))};e.prototype.setViewpoint=function(a,b,c){this.begin();this.view.state.viewpoint=this._scaleAndRotateViewpoint(m,a,b,c);this.end()};e.prototype.animateViewpoint=function(a,b,c){return this.view.goTo(this._scaleAndRotateViewpoint(m,a,b,c))};e.prototype.continousRotateClockwise=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,
  893. function(a){f.rotateBy(a,a,-1)})};e.prototype.continousRotateCounterclockwise=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){f.rotateBy(a,a,1)})};e.prototype.resetRotation=function(){this.view.rotation=0};e.prototype.continousPanLeft=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){f.translateBy(a,a,[-10,0])})};e.prototype.continousPanRight=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,
  894. function(a){f.translateBy(a,a,[10,0])})};e.prototype.continousPanUp=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){f.translateBy(a,a,[0,10])})};e.prototype.continousPanDown=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){f.translateBy(a,a,[0,-10])})};e.prototype.stop=function(){this.pan.stopMomentumNavigation();this.animationManager.stop();this.end()};e.prototype._getDefaultAnchor=function(){var a=this.view.size;
  895. u[0]=.5*a[0];u[1]=.5*a[1];return u};e.prototype._scaleAndRotateViewpoint=function(a,b,c,d){var e=this.view,h=e.size,g=e.padding,k=e.constraints,l=e.viewpoint,m=e.scale*c,e=k.canZoomInTo(m),k=k.canZoomOutTo(m);return 1>c&&!e||1<c&&!k?l:f.padAndScaleAndRotateBy(a,l,c,d,b,h,g)};a([c.property()],e.prototype,"animationManager",void 0);a([c.property({type:Boolean,readOnly:!0})],e.prototype,"interacting",void 0);a([c.property()],e.prototype,"pan",void 0);a([c.property()],e.prototype,"pinch",void 0);a([c.property()],
  896. e.prototype,"rotate",void 0);a([c.property()],e.prototype,"view",void 0);a([c.property()],e.prototype,"zoomBox",void 0);return e=a([c.subclass("esri.views.2d.navigation.MapViewNavigation")],e)}(c.declared(d))})},"esri/views/2d/navigation/ZoomBox":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Accessor ../../../core/accessorSupport/decorators".split(" "),function(p,g,b,a,e,d){return function(c){function e(a){a=c.call(this,
  897. a)||this;a._container=null;a._overlay=null;a._backgroundShape=null;a._boxShape=null;a._box={x:0,y:0,width:0,height:0};a._redraw=a._redraw.bind(a);return a}b(e,c);e.prototype.destroy=function(){this.view=null};Object.defineProperty(e.prototype,"view",{set:function(a){var b=this;this._handles&&this._handles.forEach(function(a){a.remove()});this._handles=null;this._destroyOverlay();this._set("view",a);a&&(a.on("drag",["Shift"],function(a){return b._handleDrag(a,1)}),a.on("drag",["Shift","Ctrl"],function(a){return b._handleDrag(a,
  898. -1)}))},enumerable:!0,configurable:!0});e.prototype._start=function(a,b,c,d){this._createContainer();this._createOverlay();this.navigation.begin()};e.prototype._update=function(a,b,c,d){this._box.x=a;this._box.y=b;this._box.width=c;this._box.height=d;this._rafId||(this._rafId=requestAnimationFrame(this._redraw))};e.prototype._end=function(a,b,c,d,e){var f=this.view;a=f.toMap(a+.5*c,b+.5*d);c=Math.max(c/f.width,d/f.height);-1===e&&(c=1/c);this._destroyOverlay();this.navigation.end();f.goTo({center:a,
  899. scale:f.scale*c})};e.prototype._updateBox=function(a,b,c,d){var e=this._boxShape;e.setAttributeNS(null,"x",""+a);e.setAttributeNS(null,"y",""+b);e.setAttributeNS(null,"width",""+c);e.setAttributeNS(null,"height",""+d);e.setAttributeNS(null,"class","esri-zoom-box__outline")};e.prototype._updateBackground=function(a,b,c,d){this._backgroundShape.setAttributeNS(null,"d",this._toSVGPath(a,b,c,d,this.view.width,this.view.height))};e.prototype._createContainer=function(){var a=document.createElement("div");
  900. a.className="esri-zoom-box__container";this.view.root.appendChild(a);this._container=a};e.prototype._createOverlay=function(){var a=this.view.width,b=this.view.height,c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttributeNS(null,"d","M 0 0 L "+a+" 0 L "+a+" "+b+" L 0 "+b+" Z");c.setAttributeNS(null,"class","esri-zoom-box__overlay-background");a=document.createElementNS("http://www.w3.org/2000/svg","rect");b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttributeNS("http://www.w3.org/2000/xmlns/",
  901. "xmlns:xlink","http://www.w3.org/1999/xlink");b.setAttributeNS(null,"class","esri-zoom-box__overlay");b.appendChild(c);b.appendChild(a);this._container.appendChild(b);this._backgroundShape=c;this._boxShape=a;this._overlay=b};e.prototype._destroyOverlay=function(){this._container&&this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container=this._backgroundShape=this._boxShape=this._overlay=null};e.prototype._toSVGPath=function(a,b,c,d,e,g){c=a+c;d=b+d;return"M 0 0 L "+
  902. e+" 0 L "+e+" "+g+" L 0 "+g+" ZM "+a+" "+b+" L "+a+" "+d+" L "+c+" "+d+" L "+c+" "+b+" Z"};e.prototype._handleDrag=function(a,b){var c=a.x,d=a.y,e=a.origin.x,f=a.origin.y,g;c>e?(g=e,e=c-e):(g=c,e-=c);d>f?(c=f,d-=f):(c=d,d=f-d);switch(a.action){case "start":this._start(g,c,e,d);break;case "update":this._update(g,c,e,d);break;case "end":this._end(g,c,e,d,b)}a.stopPropagation()};e.prototype._redraw=function(){if(this._rafId&&(this._rafId=null,this._overlay)){var a=this._box,b=a.x,c=a.y,d=a.width,a=a.height;
  903. this._updateBox(b,c,d,a);this._updateBackground(b,c,d,a);this._rafId=requestAnimationFrame(this._redraw)}};a([d.property()],e.prototype,"navigation",void 0);a([d.property()],e.prototype,"view",null);return e=a([d.subclass("esri.views.2d.navigation.ZoomBox")],e)}(d.declared(e))})},"esri/views/2d/navigation/actions/Pan":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/Accessor ../../../../core/accessorSupport/decorators ../../viewpointUtils ../../../3d/lib/glMatrix ../../../navigation/PanPlanarMomentumEstimator".split(" "),
  904. function(p,g,b,a,e,d,c,k,f){return function(e){function h(a){var b=e.call(this)||this;b.animationTime=0;b.momentumEstimator=new f.PanPlanarMomentumEstimator(500,6,.92);b.momentum=null;b.tmpMomentum=k.vec3.create();b.momentumFinished=!1;b.viewpoint=c.create();b.watch("momentumFinished",function(a){a&&b.navigation.stop()});return b}b(h,e);h.prototype.begin=function(a,b){this.navigation.begin();this.momentumEstimator.reset();this.addToEstimator(b);this.previousDrag=b};h.prototype.update=function(a,b){this.addToEstimator(b);
  905. var d=b.center.x,e=b.center.y,f=this.previousDrag,d=f?f.center.x-d:-d,e=f?e-f.center.y:e;a.viewpoint=c.translateBy(this.viewpoint,a.viewpoint,[d||0,e||0]);this.previousDrag=b};h.prototype.end=function(a,b){this.addToEstimator(b);this.momentum=this.momentumEstimator.evaluateMomentum();this.animationTime=0;if(this.momentum)this.onAnimationUpdate(a);this.previousDrag=null;this.navigation.end()};h.prototype.addToEstimator=function(a){var b=k.vec3.createFrom(-a.center.x,a.center.y,0);this.momentumEstimator.add(b,
  906. b,.001*a.timestamp)};h.prototype.onAnimationUpdate=function(a){var b=this;this.navigation.animationManager.animateContinous(a.viewpoint,function(d,e){b.momentumFinished=!b.momentum||b.momentum.isFinished(b.animationTime);e*=.001;if(!b.momentumFinished){var f=b.momentum.valueDelta(b.animationTime,e);k.vec3.scale(b.momentum.direction,f,b.tmpMomentum);a.viewpoint=c.translateBy(d,d,b.tmpMomentum)}b.animationTime+=e})};h.prototype.stopMomentumNavigation=function(){this.momentum&&(this.momentumEstimator.reset(),
  907. this.momentum=null,this.navigation.stop())};a([d.property()],h.prototype,"momentumFinished",void 0);a([d.property()],h.prototype,"viewpoint",void 0);a([d.property()],h.prototype,"navigation",void 0);return h=a([d.subclass("esri.views.2d.navigation.actions.Pan")],h)}(d.declared(e))})},"esri/views/navigation/PanPlanarMomentumEstimator":function(){define("require exports ../../core/tsSupport/extendsHelper ../3d/lib/glMatrix ./FilteredFiniteDifference ./Momentum".split(" "),function(p,g,b,a,e,d){Object.defineProperty(g,
  908. "__esModule",{value:!0});var c=function(a){function c(b,c,d,e,f){b=a.call(this,b,c,d)||this;b.sceneVelocity=e;b.direction=f;return b}b(c,a);c.prototype.value=function(b){return a.prototype.valueFromInitialVelocity.call(this,this.sceneVelocity,b)};return c}(d.Momentum);g.PanPlanarMomentum=c;p=function(){function b(b,c,d){void 0===b&&(b=300);void 0===c&&(c=12);void 0===d&&(d=.84);this.minimumInitialVelocity=b;this.stopVelocity=c;this.friction=d;this.time=new e.FilteredFiniteDifference(.6);this.screen=
  909. [new e.FilteredFiniteDifference(.4),new e.FilteredFiniteDifference(.4)];this.scene=[new e.FilteredFiniteDifference(.6),new e.FilteredFiniteDifference(.6),new e.FilteredFiniteDifference(.6)];this.tmpDirection=a.vec3d.create()}b.prototype.add=function(a,b,c){this.time.hasLastValue&&.015>this.time.computeDelta(c)||(this.screen[0].update(a[0]),this.screen[1].update(a[1]),this.scene[0].update(b[0]),this.scene[1].update(b[1]),this.scene[2].update(b[2]),this.time.update(c))};b.prototype.reset=function(){this.screen[0].reset();
  910. this.screen[1].reset();this.scene[0].reset();this.scene[1].reset();this.scene[2].reset();this.time.reset()};b.prototype.evaluateMomentum=function(){if(!this.screen[0].hasFilteredDelta)return null;var a=this.screen[0].filteredDelta,b=this.screen[1].filteredDelta,a=Math.sqrt(a*a+b*b)/this.time.filteredDelta;return Math.abs(a)<this.minimumInitialVelocity?null:this.createMomentum(a,this.stopVelocity,this.friction)};b.prototype.createMomentum=function(b,d,e){a.vec3d.set3(this.scene[0].filteredDelta,this.scene[1].filteredDelta,
  911. this.scene[2].filteredDelta,this.tmpDirection);var f=a.vec3d.length(this.tmpDirection);0<f&&a.vec3d.scale(this.tmpDirection,1/f);return new c(b,d,e,f/this.time.filteredDelta,this.tmpDirection)};return b}();g.PanPlanarMomentumEstimator=p})},"esri/views/navigation/FilteredFiniteDifference":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function b(a){this.gain=a}b.prototype.update=function(a){if(this.hasLastValue){var b=this.computeDelta(a);
  912. this.updateDelta(b)}this.lastValue=a};b.prototype.reset=function(){this.filteredDelta=this.lastValue=void 0};Object.defineProperty(b.prototype,"hasLastValue",{get:function(){return void 0!==this.lastValue},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasFilteredDelta",{get:function(){return void 0!==this.filteredDelta},enumerable:!0,configurable:!0});b.prototype.computeDelta=function(a){return a-this.lastValue};b.prototype.updateDelta=function(a){this.filteredDelta=this.hasFilteredDelta?
  913. (1-this.gain)*this.filteredDelta+this.gain*a:a};return b}();g.FilteredFiniteDifference=p})},"esri/views/navigation/Momentum":function(){define(["require","exports","../../core/tsSupport/extendsHelper"],function(p,g,b){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function a(a,b,c){this._initialVelocity=a;this._stopVelocity=b;this._friction=c;this._duration=Math.abs(Math.log(Math.abs(this._initialVelocity)/this._stopVelocity)/Math.log(1-this._friction))}Object.defineProperty(a.prototype,
  914. "duration",{get:function(){return this._duration},enumerable:!0,configurable:!0});a.prototype.isFinished=function(a){return a>this.duration};Object.defineProperty(a.prototype,"friction",{get:function(){return this._friction},enumerable:!0,configurable:!0});a.prototype.value=function(a){return this.valueFromInitialVelocity(this._initialVelocity,a)};a.prototype.valueDelta=function(a,b){var c=this.value(a);return this.value(a+b)-c};a.prototype.valueFromInitialVelocity=function(a,b){b=Math.min(b,this.duration);
  915. var c=1-this.friction;return a*(Math.pow(c,b)-1)/Math.log(c)};return a}();g.Momentum=p})},"esri/views/2d/navigation/actions/Pinch":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/Accessor ../../../../core/accessorSupport/decorators ../../viewpointUtils ../../libs/gl-matrix/vec2 ../../../navigation/RotationMomentumEstimator ../../../navigation/ZoomMomentumEstimator".split(" "),function(p,g,b,a,e,d,c,k,f,l){return function(e){function h(a){var b=
  916. e.call(this,a)||this;b._animationTime=0;b._momentumFinished=!1;b._rotateMomentumEstimator=new f.RotationMomentumEstimator(.6,.15,.95);b._rotationDirection=1;b._zoomDirection=1;b._zoomFirst=null;b._zoomMomentumEstimator=new l.ZoomMomentumEstimator;b.zoomMomentum=null;b.rotateMomentum=null;b.viewpoint=c.create();b.watch("_momentumFinished",function(a){a&&b.navigation.stop()});return b}b(h,e);h.prototype.begin=function(a,b){this.navigation.begin();this._rotateMomentumEstimator.reset();this._zoomMomentumEstimator.reset();
  917. this._previousAngle=this._startAngle=b.angle;this._previousRadius=this._startRadius=b.radius;this._startTimestamp=b.timestamp;a.constraints.rotationEnabled&&this.addToRotateEstimator(0,b.timestamp);this.addToZoomEstimator(b,1)};h.prototype.update=function(a,b){if(!(100>b.timestamp-this._startTimestamp)){var c=b.angle,d=b.radius,e=b.center,f=180*Math.abs(c-this._startAngle)/Math.PI,h=Math.abs(d-this._startRadius);if(!(1>=f&&1>=h)){var g=this._startRadius/d;this._previousRadius&&(d/=this._previousRadius,
  918. c=180*(c-this._previousAngle)/Math.PI,this._rotationDirection=0<=c?1:-1,this._zoomDirection=1<=d?1:-1,f=h-f,null==this._zoomFirst&&(this._zoomFirst=0<f?!0:!1),this._zoomFirst?c=0:null!=this._zoomFirst&&a.constraints.rotationEnabled&&.5<Math.abs(c)&&this.addToRotateEstimator(b.angle-this._startAngle,b.timestamp),this.addToZoomEstimator(b,g),this._center=e,this.navigation.setViewpoint([e.x,e.y],1/d,c));this._previousAngle=b.angle;this._previousRadius=b.radius}}};h.prototype.end=function(a,b){this._zoomFirst=
  919. null;this.rotateMomentum=this._rotateMomentumEstimator.evaluateMomentum();this.zoomMomentum=this._zoomMomentumEstimator.evaluateMomentum();this._animationTime=0;if(this.rotateMomentum||this.zoomMomentum)this.onAnimationUpdate(a);this.navigation.end()};h.prototype.addToRotateEstimator=function(a,b){this._rotateMomentumEstimator.add(a,.001*b)};h.prototype.addToZoomEstimator=function(a,b){this._zoomMomentumEstimator.add(b,.001*a.timestamp)};h.prototype.canZoomIn=function(a){var b=a.scale;a=a.constraints.effectiveMaxScale;
  920. return 0===a||b>a};h.prototype.canZoomOut=function(a){var b=a.scale;a=a.constraints.effectiveMinScale;return 0===a||b<a};h.prototype.onAnimationUpdate=function(a){var b=this;this.navigation.animationManager.animateContinous(a.viewpoint,function(d,e){var f=!b.canZoomIn(a)&&1<b._zoomDirection||!b.canZoomOut(a)&&1>b._zoomDirection,h=!b.rotateMomentum||b.rotateMomentum.isFinished(b._animationTime),f=f||!b.zoomMomentum||b.zoomMomentum.isFinished(b._animationTime);e*=.001;b._momentumFinished=h&&f;if(!b._momentumFinished){var h=
  921. b.rotateMomentum?Math.abs(b.rotateMomentum.valueDelta(b._animationTime,e))*b._rotationDirection*180/Math.PI:0,f=b.zoomMomentum?Math.abs(b.zoomMomentum.valueDelta(b._animationTime,e)):1,g=k.create(),l=k.create();b._center&&(k.set(g,b._center.x,b._center.y),c.getPaddingScreenTranslation(l,a.size,a.padding),k.add(g,g,l),c.scaleAndRotateBy(d,a.viewpoint,f,h,g,a.size))}b._animationTime+=e})};h.prototype.stopMomentumNavigation=function(){if(this.rotateMomentum||this.zoomMomentum)this.rotateMomentum&&(this._rotateMomentumEstimator.reset(),
  922. this.rotateMomentum=null),this.zoomMomentum&&(this._zoomMomentumEstimator.reset(),this.zoomMomentum=null),this.navigation.stop()};a([d.property()],h.prototype,"_momentumFinished",void 0);a([d.property()],h.prototype,"viewpoint",void 0);a([d.property()],h.prototype,"navigation",void 0);return h=a([d.subclass("esri.views.2d.navigation.actions.Pinch")],h)}(d.declared(e))})},"esri/views/navigation/RotationMomentumEstimator":function(){define(["require","exports","../../core/tsSupport/extendsHelper","./MomentumEstimator"],
  923. function(p,g,b,a){Object.defineProperty(g,"__esModule",{value:!0});p=function(a){function d(b,d,e,g){void 0===b&&(b=3);void 0===d&&(d=.01);void 0===e&&(e=.95);void 0===g&&(g=12);return a.call(this,b,d,e,g)||this}b(d,a);d.prototype.add=function(b,d){if(this.value.hasLastValue){var c=this.value.lastValue;for(b-=c;b>Math.PI;)b-=2*Math.PI;for(;b<-Math.PI;)b+=2*Math.PI;b=c+b}a.prototype.add.call(this,b,d)};return d}(a.MomentumEstimator);g.RotationMomentumEstimator=p})},"esri/views/navigation/MomentumEstimator":function(){define("require exports ../../core/tsSupport/extendsHelper ../3d/support/mathUtils ./FilteredFiniteDifference ./Momentum".split(" "),
  924. function(p,g,b,a,e,d){Object.defineProperty(g,"__esModule",{value:!0});p=function(){function b(a,b,c,d){void 0===a&&(a=2.5);void 0===b&&(b=.01);void 0===c&&(c=.95);void 0===d&&(d=12);this.minimumInitialVelocity=a;this.stopVelocity=b;this.friction=c;this.maxVelocity=d;this.value=new e.FilteredFiniteDifference(.8);this.time=new e.FilteredFiniteDifference(.3)}b.prototype.add=function(a,b){if(this.time.hasLastValue){if(.01>this.time.computeDelta(b))return;if(this.value.hasFilteredDelta){var c=this.value.computeDelta(a);
  925. 0>this.value.filteredDelta*c&&this.value.reset()}}this.time.update(b);this.value.update(a)};b.prototype.reset=function(){this.value.reset();this.time.reset()};b.prototype.evaluateMomentum=function(){if(!this.value.hasFilteredDelta)return null;var b=this.value.filteredDelta/this.time.filteredDelta,b=a.clamp(b,-this.maxVelocity,this.maxVelocity);return Math.abs(b)<this.minimumInitialVelocity?null:this.createMomentum(b,this.stopVelocity,this.friction)};b.prototype.createMomentum=function(a,b,c){return new d.Momentum(a,
  926. b,c)};return b}();g.MomentumEstimator=p})},"esri/views/navigation/ZoomMomentumEstimator":function(){define(["require","exports","../../core/tsSupport/extendsHelper","./Momentum","./MomentumEstimator"],function(p,g,b,a,e){Object.defineProperty(g,"__esModule",{value:!0});var d=function(a){function c(b,c,d){return a.call(this,b,c,d)||this}b(c,a);c.prototype.value=function(b){b=a.prototype.value.call(this,b);return Math.exp(b)};c.prototype.valueDelta=function(b,c){var d=a.prototype.value.call(this,b);
  927. b=a.prototype.value.call(this,b+c);return Math.exp(b-d)};return c}(a.Momentum);g.ZoomMomentum=d;p=function(a){function c(b,c,d,e){void 0===b&&(b=2.5);void 0===c&&(c=.01);void 0===d&&(d=.95);void 0===e&&(e=12);return a.call(this,b,c,d,e)||this}b(c,a);c.prototype.add=function(b,c){a.prototype.add.call(this,Math.log(b),c)};c.prototype.createMomentum=function(a,b,c){return new d(a,b,c)};return c}(e.MomentumEstimator);g.ZoomMomentumEstimator=p})},"esri/views/2d/navigation/actions/Rotate":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/Accessor ../../../../core/accessorSupport/decorators ../../viewpointUtils ../../libs/gl-matrix/vec2".split(" "),
  928. function(p,g,b,a,e,d,c,k){return function(e){function f(a){a=e.call(this)||this;a.animationTime=0;a.viewpoint=c.create();return a}b(f,e);f.prototype.begin=function(a,b){this.navigation.begin();this.previousCenter=b.center};f.prototype.update=function(a,b){var d=k.create();k.set(d,b.center.x+a.padding.left-a.padding.right,a.height-b.center.y+a.padding.top-a.padding.bottom);var e=k.create();k.set(e,this.previousCenter.x+a.padding.left-a.padding.right,a.height-this.previousCenter.y+a.padding.top-a.padding.bottom);
  929. d=c.angleBetween([a.state.paddedScreenCenter[0]+a.padding.left-a.padding.right,a.state.paddedScreenCenter[1]],d,e);a.viewpoint=c.rotateBy(this.viewpoint,a.content.viewpoint,d);this.previousCenter=b.center};f.prototype.end=function(a,b){this.navigation.end()};a([d.property()],f.prototype,"viewpoint",void 0);a([d.property()],f.prototype,"navigation",void 0);return f=a([d.subclass("esri.views.2d.actions.Rotate")],f)}(d.declared(e))})},"esri/views/2d/support/HighlightOptions":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../Color ../../../core/Accessor ../../../core/accessorSupport/decorators".split(" "),
  930. function(p,g,b,a,e,d,c){return function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a.color=new e([0,255,255]);a.haloOpacity=1;a.fillOpacity=.5;return a}b(f,d);a([c.property({type:e})],f.prototype,"color",void 0);a([c.property()],f.prototype,"haloOpacity",void 0);a([c.property()],f.prototype,"fillOpacity",void 0);return f=a([c.subclass("esri.views.2d.support.HighlightOptions")],f)}(c.declared(d))})},"esri/views/ui/2d/DefaultUI2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../DefaultUI".split(" "),
  931. function(p,g,b,a,e,d){return function(c){function d(){var a=c.call(this)||this;a.components=["attribution","zoom"];return a}b(d,c);a([e.property()],d.prototype,"components",void 0);return d=a([e.subclass("esri.views.ui.2d.DefaultUI2D")],d)}(e.declared(d))})},"esri/views/ui/DefaultUI":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/dom-geometry ../../core/watchUtils ../../core/accessorSupport/decorators ./Component ./UI ../../widgets/Attribution ../../widgets/Compass ../../widgets/NavigationToggle ../../widgets/Zoom".split(" "),
  932. function(p,g,b,a,e,d,c,k,f,l,h,n,r){return function(f){function g(a){a=f.call(this)||this;a._defaultPositionLookup=null;a.components=[];return a}b(g,f);g.prototype.initialize=function(){this._handles.add([d.init(this,"components",this._componentsWatcher.bind(this)),d.init(this,"view",this._updateViewAwareWidgets.bind(this))])};g.prototype._findComponentPosition=function(a){if(!this._defaultPositionLookup){var b=e.isBodyLtr();this._defaultPositionLookup={attribution:"manual",compass:b?"top-left":"top-right",
  933. "navigation-toggle":b?"top-left":"top-right",zoom:b?"top-left":"top-right"}}return this._defaultPositionLookup[a]};g.prototype._removeComponents=function(a){var b=this;a.forEach(function(a){if(a=b.find(a))b.remove(a),a.destroy()})};g.prototype._updateViewAwareWidgets=function(a){var b=this;this.components.forEach(function(c){(c=(c=b.find(c))&&c.widget)&&void 0!==c.view&&c.set("view",a)})};g.prototype._componentsWatcher=function(a,b){this._removeComponents(b);this._addComponents(a)};g.prototype._addComponents=
  934. function(a){var b=this;this.initialized&&a.forEach(function(a){return b.add(b._createComponent(a),b._findComponentPosition(a))})};g.prototype._createComponent=function(a){var b=this._createWidget(a);if(b)return new k({id:a,node:b})};g.prototype._createWidget=function(a){if("attribution"===a)return this._createAttribution();if("compass"===a)return this._createCompass();if("navigation-toggle"===a)return this._createNavigationToggle();if("zoom"===a)return this._createZoom()};g.prototype._createAttribution=
  935. function(){return new l({view:this.view})};g.prototype._createCompass=function(){return new h({view:this.view})};g.prototype._createNavigationToggle=function(){return new n({view:this.view})};g.prototype._createZoom=function(){return new r({view:this.view})};a([c.property()],g.prototype,"components",void 0);return g=a([c.subclass("esri.views.ui.DefaultUI")],g)}(c.declared(f))})},"esri/views/ui/Component":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/dom dojo/dom-class ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
  936. function(p,g,b,a,e,d,c,k){return function(c){function f(){var a=null!==c&&c.apply(this,arguments)||this;a.widget=null;return a}b(f,c);f.prototype.destroy=function(){this.widget&&this.widget.destroy();this.node=null};Object.defineProperty(f.prototype,"id",{get:function(){return this._get("id")||this.get("node.id")},set:function(a){this._set("id",a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"node",{set:function(a){var b=this._get("node");a!==b&&(a&&d.add(a,"esri-component"),
  937. b&&d.remove(b,"esri-component"),this._set("node",a))},enumerable:!0,configurable:!0});f.prototype.castNode=function(a){if(!a)return this._set("widget",null),null;if("string"===typeof a||a&&"nodeType"in a)return this._set("widget",null),e.byId(a);a&&"function"===typeof a.render&&!a.domNode&&(a.domNode=document.createElement("div"));this._set("widget",a);return a.domNode};a([k.property()],f.prototype,"id",null);a([k.property()],f.prototype,"node",null);a([k.cast("node")],f.prototype,"castNode",null);
  938. a([k.property({readOnly:!0})],f.prototype,"widget",void 0);return f=a([k.subclass("esri.views.ui.Component")],f)}(k.declared(c))})},"esri/views/ui/UI":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/dom-class dojo/dom-construct dojo/dom-style dojo/_base/lang ../../core/Accessor ../../core/Evented ../../core/Handles ../../core/watchUtils ../../core/accessorSupport/decorators ./Component".split(" "),function(p,g,b,a,e,d,c,k,f,l,h,
  939. n,r,m){function u(a){return"object"!==typeof a||a&&a.isInstanceOf&&a.isInstanceOf(m)||!("component"in a||"index"in a||"position"in a)?null:a}var q={left:0,top:0,bottom:0,right:0},t={bottom:30,top:15,right:15,left:15};return function(f){function g(){var a=f.call(this)||this;a._cornerNameToContainerLookup={};a._positionNameToContainerLookup={};a._components=[];a._handles=new h;a._componentToKey=new Map;a.padding=t;a.view=null;a._initContainers();return a}b(g,f);g.prototype.initialize=function(){this._handles.add([n.init(this,
  940. "view.padding, container",this._applyViewPadding.bind(this)),n.init(this,"padding",this._applyUIPadding.bind(this))])};g.prototype.destroy=function(){this.container=null;this._components.forEach(function(a){a.destroy()});this._components.length=0;this._handles.destroy();this._componentToKey.clear();this._componentToKey=null};Object.defineProperty(g.prototype,"container",{set:function(a){var b=this._get("container");a!==b&&(a&&(e.add(a,"esri-ui"),this._attachContainers(a)),b&&(e.remove(b,"esri-ui"),
  941. c.set(b,{top:"",bottom:"",left:"",right:""}),d.empty(b)),this._set("container",a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"height",{get:function(){var a=this.get("view.height")||0;if(0===a)return a;var b=this._getViewPadding();return Math.max(a-(b.top+b.bottom),0)},enumerable:!0,configurable:!0});g.prototype.castPadding=function(a){return"number"===typeof a?{bottom:a,top:a,right:a,left:a}:k.mixin({},t,a)};Object.defineProperty(g.prototype,"width",{get:function(){var a=
  942. this.get("view.width")||0;if(0===a)return a;var b=this._getViewPadding();return Math.max(a-(b.left+b.right),0)},enumerable:!0,configurable:!0});g.prototype.add=function(a,b){var c=this,d,e;if(Array.isArray(a))a.forEach(function(a){return c.add(a,b)});else{var f=u(a);f&&(d=f.index,b=f.position,a=f.component,e=f.key);b&&"object"===typeof b&&(d=b.index,e=b.key,b=b.position);!a||b&&!this._isValidPosition(b)||(a&&a.isInstanceOf&&a.isInstanceOf(m)||(a=new m({node:a})),this._place({component:a,position:b,
  943. index:d}),this._components.push(a),e&&this._componentToKey.set(a,e))}};g.prototype.remove=function(a,b){var c=this;if(a){if(Array.isArray(a))return a.map(function(a){return c.remove(a,b)});var d=this.find(a);if(d){var e=this._componentToKey;if(!e.has(a)||e.get(a)===b)return e=this._components.indexOf(d),d.node.parentNode&&d.node.parentNode.removeChild(d.node),this._componentToKey.delete(a),this._components.splice(e,1)[0]}}};g.prototype.empty=function(a){var b=this;if(Array.isArray(a))return a.map(function(a){return b.empty(a)}).reduce(function(a,
  944. b){return a.concat(b)});a=a||"manual";if("manual"===a)return Array.prototype.slice.call(this._manualContainer.children).filter(function(a){return!e.contains(a,"esri-ui-corner")}).map(function(a){return b.remove(a)});if(this._isValidPosition(a))return Array.prototype.slice.call(this._cornerNameToContainerLookup[a].children).map(this.remove,this)};g.prototype.move=function(a,b){var c=this;Array.isArray(a)&&a.forEach(function(a){return c.move(a,b)});if(a){var d,e=u(a)||u(b);e&&(d=e.index,b=e.position,
  945. a=e.component||a);(!b||this._isValidPosition(b))&&(a=this.remove(a))&&this.add(a,{position:b,index:d})}};g.prototype.find=function(a){return a?a&&a.isInstanceOf&&a.isInstanceOf(m)?this._findByComponent(a):"string"===typeof a?this._findById(a):this._findByNode(a.domNode||a):null};g.prototype._getViewPadding=function(){return this.get("view.padding")||q};g.prototype._attachContainers=function(a){d.place(this._manualContainer,a);d.place(this._innerContainer,a)};g.prototype._initContainers=function(){var a=
  946. d.create("div",{className:"esri-ui-inner-container esri-ui-corner-container"}),b=d.create("div",{className:"esri-ui-inner-container esri-ui-manual-container"}),c=d.create("div",{className:"esri-ui-top-left esri-ui-corner"},a),e=d.create("div",{className:"esri-ui-top-right esri-ui-corner"},a),f=d.create("div",{className:"esri-ui-bottom-left esri-ui-corner"},a),g=d.create("div",{className:"esri-ui-bottom-right esri-ui-corner"},a);this._innerContainer=a;this._manualContainer=b;this._cornerNameToContainerLookup=
  947. {"top-left":c,"top-right":e,"bottom-left":f,"bottom-right":g};this._positionNameToContainerLookup=k.mixin({manual:b},this._cornerNameToContainerLookup)};g.prototype._isValidPosition=function(a){return!!this._positionNameToContainerLookup[a]};g.prototype._place=function(a){var b=a.component,c=a.index;a=this._positionNameToContainerLookup[a.position||"manual"];var d;-1<c?(d=Array.prototype.slice.call(a.children),0===c?this._placeComponent(b,a,"first"):c>=d.length?this._placeComponent(b,a,"last"):this._placeComponent(b,
  948. d[c],"before")):this._placeComponent(b,a,"last")};g.prototype._placeComponent=function(a,b,c){var e=a.widget;e&&!e._started&&"function"===typeof e.postMixInProperties&&"function"===typeof e.buildRendering&&"function"===typeof e.postCreate&&"function"===typeof e.startup&&a.widget.startup();d.place(a.node,b,c)};g.prototype._applyViewPadding=function(){var a=this.container;a&&c.set(a,this._toPxPosition(this._getViewPadding()))};g.prototype._applyUIPadding=function(){this._innerContainer&&c.set(this._innerContainer,
  949. this._toPxPosition(this.padding))};g.prototype._toPxPosition=function(a){return{top:this._toPxUnit(a.top),left:this._toPxUnit(a.left),right:this._toPxUnit(a.right),bottom:this._toPxUnit(a.bottom)}};g.prototype._toPxUnit=function(a){return 0===a?0:a+"px"};g.prototype._findByComponent=function(a){var b=null,c;this._components.some(function(d){(c=d===a)&&(b=d);return c});return b};g.prototype._findById=function(a){var b=null,c;this._components.some(function(d){(c=d.id===a)&&(b=d);return c});return b};
  950. g.prototype._findByNode=function(a){var b=null,c;this._components.some(function(d){(c=d.node===a)&&(b=d);return c});return b};a([r.property()],g.prototype,"container",null);a([r.property({dependsOn:["view.height"]})],g.prototype,"height",null);a([r.property()],g.prototype,"padding",void 0);a([r.cast("padding")],g.prototype,"castPadding",null);a([r.property()],g.prototype,"view",void 0);a([r.property({dependsOn:["view.width"]})],g.prototype,"width",null);return g=a([r.subclass("esri.views.ui.UI")],
  951. g)}(r.declared(f,l))})},"esri/widgets/Attribution":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/i18n!./Attribution/nls/Attribution ../core/watchUtils ../core/accessorSupport/decorators ./Widget ./Attribution/AttributionViewModel ./support/widget".split(" "),function(p,g,b,a,e,d,c,k,f,l){return function(g){function h(a){a=g.call(this)||this;a._isOpen=!1;a._attributionTextOverflowed=!1;a._prevSourceNodeHeight=0;a.iconClass="esri-icon-description";
  952. a.itemDelimiter=" | ";a.label=e.widgetLabel;a.view=null;a.viewModel=new f;return a}b(h,g);h.prototype.postInitialize=function(){var a=this;this.own(d.on(this,"viewModel.items","change",function(){return a.scheduleRender()}))};Object.defineProperty(h.prototype,"attributionText",{get:function(){return this.viewModel.items.reduce(function(a,b){-1===a.indexOf(b.text)&&a.push(b.text);return a},[]).join(this.itemDelimiter)},enumerable:!0,configurable:!0});h.prototype.render=function(){var a=(b={},b["esri-attribution--open"]=
  953. this._isOpen,b);return l.tsx("div",{bind:this,class:"esri-attribution esri-widget",classes:a,onclick:this._toggleState,onkeydown:this._toggleState},this._renderSourcesNode(),l.tsx("div",{class:"esri-attribution__powered-by"},"Powered by ",l.tsx("a",{target:"_blank",href:"http://www.esri.com/",class:"esri-attribution__link"},"Esri")));var b};h.prototype._renderSourcesNode=function(){var a=this._isOpen,b=this._isInteractive(),c=this.attributionText,a=(d={},d["esri-attribution__sources--open"]=a,d["esri-interactive"]=
  954. b,d);return l.tsx("div",{afterCreate:this._afterSourcesNodeCreate,afterUpdate:this._afterSourcesNodeUpdate,bind:this,class:"esri-attribution__sources",classes:a,innerHTML:c,role:b?"button":void 0,tabIndex:b?0:-1});var d};h.prototype._afterSourcesNodeCreate=function(a){this._prevSourceNodeHeight=a.clientWidth};h.prototype._afterSourcesNodeUpdate=function(a){var b=!1,c=a.clientHeight;a=a.scrollWidth>=a.clientWidth;var d=this._attributionTextOverflowed!==a;this._attributionTextOverflowed=a;d&&(b=!0);
  955. this._isOpen&&(a=c<this._prevSourceNodeHeight,this._prevSourceNodeHeight=c,a&&(this._isOpen=!1,b=!0));b&&this.scheduleRender()};h.prototype._toggleState=function(){this._isInteractive()&&(this._isOpen=!this._isOpen)};h.prototype._isInteractive=function(){return this._isOpen||this._attributionTextOverflowed};a([c.property({dependsOn:["viewModel.items.length","itemDelimiter"],readOnly:!0}),l.renderable()],h.prototype,"attributionText",null);a([c.property()],h.prototype,"iconClass",void 0);a([c.property(),
  956. l.renderable()],h.prototype,"itemDelimiter",void 0);a([c.property()],h.prototype,"label",void 0);a([c.aliasOf("viewModel.view")],h.prototype,"view",void 0);a([c.property({type:f}),l.renderable(["state","view.size"])],h.prototype,"viewModel",void 0);a([l.accessibleHandler()],h.prototype,"_toggleState",null);return h=a([c.subclass("esri.widgets.Attribution")],h)}(c.declared(k))})},"esri/widgets/Attribution/AttributionViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Collection ../../core/Handles ../../core/lang ../../core/watchUtils ../../core/accessorSupport/decorators ../../geometry/Extent ../../geometry/support/webMercatorUtils".split(" "),
  957. function(p,g,b,a,e,d,c,k,f,l,h,n){return function(e){function g(a){a=e.call(this,a)||this;a._handles=new c;a._pendingAttributionItemsByLayerId={};a._attributionDataByLayerId={};a.items=new d;a.view=null;a._updateAttributionItems=a._updateAttributionItems.bind(a);return a}b(g,e);g.prototype.initialize=function(){this._handles.add(f.init(this,"view",this._viewWatcher))};g.prototype.destroy=function(){this._handles.destroy();this.view=this._handles=null};Object.defineProperty(g.prototype,"state",{get:function(){return this.get("view.ready")?
  958. "ready":"disabled"},enumerable:!0,configurable:!0});g.prototype._viewWatcher=function(a){var b=this,c=this._handles;c&&c.remove();a&&(c.add([a.allLayerViews.on("change",function(a){b._addLayerViews(a.added);0<a.removed.length&&(a.removed.forEach(function(a){c.remove(a.uid)}),b._updateAttributionItems())}),f.init(a,"stationary",this._updateAttributionItems)]),this._addLayerViews(a.allLayerViews))};g.prototype._addLayerViews=function(a){var b=this;a.forEach(function(a){b._handles.has(a.uid)||b._handles.add(f.init(a,
  959. "suspended",b._updateAttributionItems),a.uid)})};g.prototype._updateAttributionItems=function(){var a=this,b=[];this._getActiveLayerViews().forEach(function(c){var d=c.layer;if(!d.hasAttributionData){if(c=d.get("copyright")){var e=a._findItem(b,{layer:d,text:c});e||b.push({text:c,layer:d})}}else if(d&&d.tileInfo){var f=a._attributionDataByLayerId;if(f[d.uid]){if(c=a._getDynamicAttribution(f[d.uid],a.view,d))(e=a._findItem(b,{layer:d,text:c}))||b.push({text:c,layer:d})}else{var g=a._pendingAttributionItemsByLayerId;
  960. a._inProgress(g[d.uid])||(g[d.uid]=d.fetchAttributionData().then(function(b){b=a._createContributionIndex(b,a._isBingLayer(d));delete g[d.uid];f[d.uid]=b;a._updateAttributionItems()}))}}});this._itemsChanged(this.items,b)&&(this.items.removeAll(),this.items.addMany(b))};g.prototype._itemsChanged=function(a,b){return a.length!==b.length||a.some(function(a,c){return a.text!==b[c].text})};g.prototype._inProgress=function(a){return a&&!a.isFulfilled()};g.prototype._getActiveLayerViews=function(){return this.get("view.allLayerViews").filter(function(a){return!a.suspended&&
  961. a.get("layer.attributionVisible")})};g.prototype._findItem=function(a,b){var c=b.layer,d=b.text,e;a.some(function(a){var b=a.layer===c&&a.text===d;b&&(e=a);return b});return e};g.prototype._isBingLayer=function(a){return-1!==a.declaredClass.toLowerCase().indexOf("vetiledlayer")};g.prototype._createContributionIndex=function(a,b){a=a.contributors;var c={};if(!a)return c;a.forEach(function(a,d){var e=a.coverageAreas;e&&e.forEach(function(e){var f=e.bbox,g=e.zoomMin-(b&&e.zoomMin?1:0),l=e.zoomMax-(b&&
  962. e.zoomMax?1:0);a={extent:n.geographicToWebMercator(new h({xmin:f[1],ymin:f[0],xmax:f[3],ymax:f[2]})),attribution:a.attribution||"",score:k.isDefined(e.score)?e.score:100,id:d};for(e=g;e<=l;e++)c[e]=c[e]||[],c[e].push(a)})});c.maxKey=Math.max.apply(null,Object.keys(c));return c};g.prototype._getDynamicAttribution=function(a,b,c){var d=b.extent;b=c.tileInfo.scaleToZoom(b.scale);b=Math.min(a.maxKey,Math.round(b));if(!d||!k.isDefined(b)||-1>=b)return"";a=a[b];var e=d.center.clone().normalize(),f={};return a.filter(function(a){var b=
  963. !f[a.id]&&a.extent.contains(e);b&&(f[a.id]=!0);return b}).sort(function(a,b){return b.score-a.score||a.objectId-b.objectId}).map(function(a){return a.attribution}).join(", ")};a([l.property({readOnly:!0,type:d})],g.prototype,"items",void 0);a([l.property({dependsOn:["view.ready"],readOnly:!0})],g.prototype,"state",null);a([l.property()],g.prototype,"view",void 0);return g=a([l.subclass("esri.widgets.Attribution.AttributionViewModel")],g)}(l.declared(e))})},"esri/widgets/Compass":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/i18n!./Compass/nls/Compass ../core/accessorSupport/decorators ./Widget ./Compass/CompassViewModel ./support/widget".split(" "),
  964. function(p,g,b,a,e,d,c,k,f){return function(c){function g(a){a=c.call(this)||this;a.activeMode=null;a.iconClass="esri-icon-locate-circled";a.label=e.widgetLabel;a.modes=null;a.view=null;a.viewModel=new k;return a}b(g,c);g.prototype.reset=function(){};g.prototype.render=function(){var a=this.viewModel.orientation,b=this.viewModel.state,c="disabled"===b,d="compass"===("rotation"===b?"rotation":"compass"),b=(g={},g["esri-disabled"]=c,g["esri-compass--active"]="device-orientation"===this.viewModel.activeMode,
  965. g["esri-interactive"]=!c,g),g=(h={},h["esri-icon-compass"]=d,h["esri-icon-dial"]=!d,h);return f.tsx("div",{bind:this,class:"esri-compass esri-widget-button esri-widget",classes:b,onclick:this._start,onkeydown:this._start,role:"button",tabIndex:c?-1:0,"aria-label":e.reset,title:e.reset},f.tsx("span",{"aria-hidden":"true",class:"esri-compass__icon",classes:g,styles:this._toRotationTransform(a)}),f.tsx("span",{class:"esri-icon-font-fallback-text"},e.reset));var g,h};g.prototype._start=function(){var a=
  966. this.viewModel;a.nextMode();a.startMode()};g.prototype._toRotationTransform=function(a){return{transform:"rotateZ("+a.z+"deg)"}};a([d.aliasOf("viewModel.activeMode")],g.prototype,"activeMode",void 0);a([d.property()],g.prototype,"iconClass",void 0);a([d.property()],g.prototype,"label",void 0);a([d.aliasOf("viewModel.modes")],g.prototype,"modes",void 0);a([d.aliasOf("viewModel.view")],g.prototype,"view",void 0);a([d.property({type:k}),f.renderable(["viewModel.orientation","viewModel.state"])],g.prototype,
  967. "viewModel",void 0);a([d.aliasOf("viewModel.reset")],g.prototype,"reset",null);a([f.accessibleHandler()],g.prototype,"_start",null);return g=a([d.subclass("esri.widgets.Compass")],g)}(d.declared(c))})},"esri/widgets/Compass/CompassViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Handles ../../core/Logger ../../core/promiseUtils ../../core/watchUtils ../../core/accessorSupport/decorators".split(" "),
  968. function(p,g,b,a,e,d,c,k,f,l){var h=c.getLogger("esri.widgets.CompassViewModel");return function(c){function e(a){a=c.call(this,a)||this;a._handles=new d;a.canUseHeading=!1;a.orientation={x:0,y:0,z:0};a.view=null;a._updateForCamera=a._updateForCamera.bind(a);a._updateForRotation=a._updateForRotation.bind(a);a._updateRotationWatcher=a._updateRotationWatcher.bind(a);a._updateViewHeading=a._updateViewHeading.bind(a);a._checkHeadingSupport=a._checkHeadingSupport.bind(a);a._canUseHeading();return a}b(e,
  969. c);e.prototype.initialize=function(){this._handles.add(f.init(this,"view",this._updateRotationWatcher))};e.prototype.destroy=function(){this._removeCheckHeadingListener();this._removeOrientationListener();this._handles.destroy();this.view=this._handles=null};Object.defineProperty(e.prototype,"activeMode",{get:function(){var a=this._get("activeMode");return a?a:(a=this.modes)?a[0]:"none"},set:function(a){this.stopMode();this._set("activeMode",a);void 0===a&&this._clearOverride("activeMode")},enumerable:!0,
  970. configurable:!0});Object.defineProperty(e.prototype,"canShowNorth",{get:function(){var a=this.get("view.spatialReference");return a&&(a.isWebMercator||a.isWGS84)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"modes",{get:function(){return this._get("modes")||["reset"]},set:function(a){this._set("modes",a);void 0===a&&this._clearOverride("modes")},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"state",{get:function(){return this.get("view.ready")?this.canShowNorth?
  971. "compass":"rotation":"disabled"},enumerable:!0,configurable:!0});e.prototype.previousMode=function(){var a=this.modes;2>a.length||(a=a.indexOf(this.activeMode),this._paginateMode(a-1))};e.prototype.nextMode=function(){var a=this.modes;2>a.length||(a=a.indexOf(this.activeMode),this._paginateMode(a+1))};e.prototype.startMode=function(){var a=this.activeMode;"reset"===a&&this.reset();"device-orientation"===a&&(this._removeOrientationListener(),this._addOrientationListener())};e.prototype.stopMode=function(){"device-orientation"===
  972. this.activeMode&&this._removeOrientationListener()};e.prototype.reset=function(){if(this.get("view.ready")){var a={};"2d"===this.view.type?a.rotation=0:a.heading=0;this.view.goTo(a)}};e.prototype._supportsDeviceOrientation=function(){return"DeviceOrientationEvent"in window};e.prototype._paginateMode=function(a){var b=this.modes;this.activeMode=b[(a+b.length)%b.length]};e.prototype._supportsHeading=function(a){var b="number"===typeof a.webkitCompassHeading;return"number"===typeof a.compassHeading||
  973. b||!1};e.prototype._getAccuracy=function(a){return a.compassAccuracy||a.webkitCompassAccuracy||0};e.prototype._getHeading=function(a){return a.webkitCompassHeading||a.compassHeading||void 0};e.prototype._removeCheckHeadingListener=function(){this._supportsDeviceOrientation()&&window.removeEventListener("deviceorientation",this._checkHeadingSupport)};e.prototype._checkHeadingSupport=function(a){this._supportsHeading(a)&&this._set("canUseHeading",!0);this._removeCheckHeadingListener()};e.prototype._canUseHeading=
  974. function(){var a=this;this._supportsDeviceOrientation()&&(window.addEventListener("deviceorientation",this._checkHeadingSupport),k.after(500).then(function(){a._removeCheckHeadingListener()}))};e.prototype._getHeadingAdjustment=function(a,b){if("orientation"in window){b=window.orientation;if("number"!==typeof b)return a;a+=b;return 360<a?a-360:0>a?a+360:a}return a};e.prototype._updateViewHeading=function(a){var b=this.view,c=this._getHeading(a),d=this._getAccuracy(a);!b||!b.stationary||"number"!==
  975. typeof c||0>c||360<c||50<d||(a=this._getHeadingAdjustment(c,a),"3d"===b.type&&(c=b.camera.clone(),c.heading=a,b.camera=c),"2d"===b.type&&(b.rotation=a))};e.prototype._removeOrientationListener=function(){this.canUseHeading&&window.removeEventListener("deviceorientation",this._updateViewHeading)};e.prototype._addOrientationListener=function(){var a=this.canShowNorth;this.canUseHeading?a?window.addEventListener("deviceorientation",this._updateViewHeading):h.warn("device-orientation mode requires 'canShowNorth' to be true"):
  976. h.warn("The deviceorientation event is not supported in this browser")};e.prototype._updateForRotation=function(a){void 0!==a&&null!==a&&(this.orientation={z:a})};e.prototype._updateForCamera=function(a){a&&(this.orientation={x:0,y:0,z:-a.heading})};e.prototype._updateRotationWatcher=function(a){this._handles.removeAll();a&&("2d"===a.type?this._handles.add(f.init(this,"view.rotation",this._updateForRotation)):this._handles.add(f.init(this,"view.camera",this._updateForCamera)))};a([l.property({dependsOn:["modes"]})],
  977. e.prototype,"activeMode",null);a([l.property({dependsOn:["view.spatialReference.isWebMercator","view.spatialReference.wkid"],readOnly:!0})],e.prototype,"canShowNorth",null);a([l.property({readOnly:!0})],e.prototype,"canUseHeading",void 0);a([l.property({dependsOn:["canUseHeading"]})],e.prototype,"modes",null);a([l.property()],e.prototype,"orientation",void 0);a([l.property({dependsOn:["view.ready","canShowNorth"],readOnly:!0})],e.prototype,"state",null);a([l.property()],e.prototype,"view",void 0);
  978. a([l.property()],e.prototype,"previousMode",null);a([l.property()],e.prototype,"nextMode",null);a([l.property()],e.prototype,"startMode",null);a([l.property()],e.prototype,"stopMode",null);a([l.property()],e.prototype,"reset",null);return e=a([l.subclass("esri.widgets.CompassViewModel")],e)}(l.declared(e))})},"esri/widgets/NavigationToggle":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/i18n!./NavigationToggle/nls/NavigationToggle ../core/accessorSupport/decorators ./Widget ./NavigationToggle/NavigationToggleViewModel ./support/widget".split(" "),
  979. function(p,g,b,a,e,d,c,k,f){return function(c){function g(a){a=c.call(this)||this;a.iconClass="esri-icon-pan2";a.label=e.widgetLabel;a.view=null;a.viewModel=new k;return a}b(g,c);Object.defineProperty(g.prototype,"layout",{set:function(a){"horizontal"!==a&&(a="vertical");this._set("layout",a)},enumerable:!0,configurable:!0});g.prototype.toggle=function(){};g.prototype.render=function(){var a="disabled"===this.get("viewModel.state"),b="pan"===this.get("viewModel.navigationMode"),c=(d={},d["esri-disabled"]=
  980. a,d["esri-navigation-toggle--horizontal"]="horizontal"===this.layout,d),d=(g={},g["esri-navigation-toggle__button--active"]=b,g),b=(h={},h["esri-navigation-toggle__button--active"]=!b,h);return f.tsx("div",{bind:this,class:"esri-navigation-toggle esri-widget",classes:c,onclick:this._toggle,onkeydown:this._toggle,tabIndex:a?-1:0,"aria-label":e.toggle,title:e.toggle},f.tsx("div",{class:f.join("esri-navigation-toggle__button esri-widget-button","esri-navigation-toggle__button--pan"),classes:d},f.tsx("span",
  981. {class:"esri-icon-pan"})),f.tsx("div",{class:f.join("esri-navigation-toggle__button esri-widget-button","esri-navigation-toggle__button--rotate"),classes:b},f.tsx("span",{class:"esri-icon-rotate"})));var d,g,h};g.prototype._toggle=function(){this.toggle()};a([d.property()],g.prototype,"iconClass",void 0);a([d.property()],g.prototype,"label",void 0);a([d.property({value:"vertical"}),f.renderable()],g.prototype,"layout",null);a([d.aliasOf("viewModel.view"),f.renderable()],g.prototype,"view",void 0);
  982. a([d.property({type:k}),f.renderable(["viewModel.state","viewModel.navigationMode"])],g.prototype,"viewModel",void 0);a([d.aliasOf("viewModel.toggle")],g.prototype,"toggle",null);a([f.accessibleHandler()],g.prototype,"_toggle",null);return g=a([d.subclass("esri.widgets.NavigationToggle")],g)}(d.declared(c))})},"esri/widgets/NavigationToggle/NavigationToggleViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Handles ../../core/watchUtils ../../core/accessorSupport/decorators".split(" "),
  983. function(p,g,b,a,e,d,c,k){return function(e){function f(a){a=e.call(this,a)||this;a._handles=new d;a.navigationMode="pan";a.view=null;a.toggle=a.toggle.bind(a);return a}b(f,e);f.prototype.initialize=function(){this._handles.add(c.when(this,"view.inputManager",this._setNavigationMode.bind(this)))};f.prototype.destroy=function(){this._handles.destroy();this.view=this._handles=null};Object.defineProperty(f.prototype,"state",{get:function(){return this.get("view.ready")&&"3d"===this.view.type?"ready":
  984. "disabled"},enumerable:!0,configurable:!0});f.prototype.toggle=function(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate",this._setNavigationMode())};f.prototype._setNavigationMode=function(){this.get("view.inputManager").primaryDragAction="pan"===this.navigationMode?"pan":"rotate"};a([k.property({dependsOn:["view.ready"],readOnly:!0})],f.prototype,"state",null);a([k.property()],f.prototype,"navigationMode",void 0);a([k.property()],f.prototype,"view",void 0);
  985. a([k.property()],f.prototype,"toggle",null);return f=a([k.subclass("esri.widgets.NavigationToggleViewModel")],f)}(k.declared(e))})},"esri/widgets/Zoom":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/i18n!./Zoom/nls/Zoom ../core/accessorSupport/decorators ./Widget ./Zoom/IconButton ./Zoom/ZoomViewModel ./support/widget".split(" "),function(p,g,b,a,e,d,c,k,f,l){return function(c){function g(a){a=c.call(this)||this;a.iconClass="esri-icon-zoom-in-magnifying-glass";
  986. a.label=e.widgetLabel;a.view=null;a.viewModel=new f;return a}b(g,c);g.prototype.postInitialize=function(){this._zoomInButton=new k({action:this.zoomIn,iconClass:"esri-icon-plus",title:e.zoomIn});this._zoomOutButton=new k({action:this.zoomOut,iconClass:"esri-icon-minus",title:e.zoomOut})};Object.defineProperty(g.prototype,"layout",{set:function(a){"horizontal"!==a&&(a="vertical");this._set("layout",a)},enumerable:!0,configurable:!0});g.prototype.render=function(){var a=this.viewModel,b=(c={},c["esri-zoom--horizontal"]=
  987. "horizontal"===this.layout,c);this._zoomInButton.enabled="ready"===a.state&&a.canZoomIn;this._zoomOutButton.enabled="ready"===a.state&&a.canZoomOut;return l.tsx("div",{class:"esri-zoom esri-widget",classes:b},this._zoomInButton.render(),this._zoomOutButton.render());var c};g.prototype.zoomIn=function(){};g.prototype.zoomOut=function(){};a([d.property()],g.prototype,"iconClass",void 0);a([d.property()],g.prototype,"label",void 0);a([d.property({value:"vertical"}),l.renderable()],g.prototype,"layout",
  988. null);a([d.aliasOf("viewModel.view"),l.renderable()],g.prototype,"view",void 0);a([d.property({type:f}),l.renderable(["viewModel.canZoomIn","viewModel.canZoomOut","viewModel.state"])],g.prototype,"viewModel",void 0);a([d.aliasOf("viewModel.zoomIn")],g.prototype,"zoomIn",null);a([d.aliasOf("viewModel.zoomOut")],g.prototype,"zoomOut",null);return g=a([d.subclass("esri.widgets.Zoom")],g)}(d.declared(c))})},"esri/widgets/Zoom/IconButton":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../Widget ../support/widget".split(" "),
  989. function(p,g,b,a,e,d,c){return function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a.enabled=!0;a.iconClass="";a.title="";return a}b(f,d);f.prototype.render=function(){var a=this.enabled?0:-1,b=(d={},d["esri-disabled"]=!this.enabled,d["esri-interactive"]=this.enabled,d),d=(e={},e[this.iconClass]=!!this.iconClass,e);return c.tsx("div",{bind:this,class:"esri-widget-button esri-widget",classes:b,onclick:this._triggerAction,onkeydown:this._triggerAction,role:"button",tabIndex:a,title:this.title},
  990. c.tsx("span",{"aria-hidden":"true",role:"presentation",class:"esri-icon",classes:d}),c.tsx("span",{class:"esri-icon-font-fallback-text"},this.title));var d,e};f.prototype._triggerAction=function(){this.action.call(this)};a([e.property()],f.prototype,"action",void 0);a([e.property(),c.renderable()],f.prototype,"enabled",void 0);a([e.property({readOnly:!1}),c.renderable()],f.prototype,"iconClass",void 0);a([e.property(),c.renderable()],f.prototype,"title",void 0);a([c.accessibleHandler()],f.prototype,
  991. "_triggerAction",null);return f=a([e.subclass("esri.widgets.IconButton")],f)}(e.declared(d))})},"esri/widgets/Zoom/ZoomViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ./ZoomConditions2D ./ZoomConditions3D".split(" "),function(p,g,b,a,e,d,c,k){return function(e){function f(a){a=e.call(this,a)||this;a.canZoomIn=null;a.canZoomOut=null;a.zoomIn=a.zoomIn.bind(a);a.zoomOut=
  992. a.zoomOut.bind(a);return a}b(f,e);f.prototype.destroy=function(){this.view=null};Object.defineProperty(f.prototype,"state",{get:function(){return this.get("view.ready")?"ready":"disabled"},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"view",{set:function(a){a?"2d"===a.type?this._zoomConditions=new c({view:a}):"3d"===a.type&&(this._zoomConditions=new k):this._zoomConditions=null;this._set("view",a)},enumerable:!0,configurable:!0});f.prototype.zoomIn=function(){this.canZoomIn&&
  993. this._zoomToFactor(.5)};f.prototype.zoomOut=function(){this.canZoomOut&&this._zoomToFactor(2)};f.prototype._zoomToFactor=function(a){if("ready"===this.state){var b=this.view;"3d"===this.view.type?b.goTo({zoomFactor:1/a}):b.goTo({scale:this.get("view.scale")*a})}};a([d.property()],f.prototype,"_zoomConditions",void 0);a([d.property({aliasOf:"_zoomConditions.canZoomIn",readOnly:!0})],f.prototype,"canZoomIn",void 0);a([d.property({aliasOf:"_zoomConditions.canZoomOut",readOnly:!0})],f.prototype,"canZoomOut",
  994. void 0);a([d.property({dependsOn:["view.ready"],readOnly:!0})],f.prototype,"state",null);a([d.property()],f.prototype,"view",null);a([d.property()],f.prototype,"zoomIn",null);a([d.property()],f.prototype,"zoomOut",null);return f=a([d.subclass("esri.widgets.Zoom.ZoomViewModel")],f)}(d.declared(e))})},"esri/widgets/Zoom/ZoomConditions2D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
  995. function(p,g,b,a,e,d){return function(c){function e(){return null!==c&&c.apply(this,arguments)||this}b(e,c);Object.defineProperty(e.prototype,"canZoomIn",{get:function(){var a=this.get("view.scale"),b=this.get("view.constraints.effectiveMaxScale");return 0===b||a>b},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"canZoomOut",{get:function(){var a=this.get("view.scale"),b=this.get("view.constraints.effectiveMinScale");return 0===b||a<b},enumerable:!0,configurable:!0});a([d.property({dependsOn:["view.ready",
  996. "view.scale"],readOnly:!0})],e.prototype,"canZoomIn",null);a([d.property({dependsOn:["view.ready","view.scale"],readOnly:!0})],e.prototype,"canZoomOut",null);a([d.property()],e.prototype,"view",void 0);return e=a([d.subclass("esri.widgets.Zoom.ZoomConditions2D")],e)}(d.declared(e))})},"esri/widgets/Zoom/ZoomConditions3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
  997. function(p,g,b,a,e,d){return function(c){function e(){var a=null!==c&&c.apply(this,arguments)||this;a.canZoomIn=!0;a.canZoomOut=!0;return a}b(e,c);a([d.property({readOnly:!0})],e.prototype,"canZoomIn",void 0);a([d.property({readOnly:!0})],e.prototype,"canZoomOut",void 0);return e=a([d.subclass("esri.widgets.Zoom.ZoomConditions3D")],e)}(d.declared(e))})},"esri/views/2d/layers/GraphicsLayerView2D":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Handles ../../../core/accessorSupport/decorators ./LayerView2D ./support/GraphicsView2D".split(" "),
  998. function(p,g,b,a,e,d,c,k){return function(c){function f(){var a=null!==c&&c.apply(this,arguments)||this;a._handles=new e;a.graphicsView=new k;a.container=a.graphicsView.container;return a}b(f,c);f.prototype.hitTest=function(a,b){return this.graphicsView.hitTest(a,b)};f.prototype.attach=function(){var a=this;this.layer.createGraphicsController({layerView:this}).then(function(b){a._handles.add(a.layer.on("graphic-update",function(b){return a.graphicsView.graphicUpdateHandler(b)}));a.graphicsView.view=
  999. a.view;a.graphicsView.graphics=b.graphics})};f.prototype.detach=function(){this.graphicsView.graphics=null;this._handles.removeAll()};f.prototype.update=function(a){};f.prototype.moveStart=function(){};f.prototype.viewChange=function(){};f.prototype.moveEnd=function(){};return f=a([d.subclass("esri.views.2d.layers.GraphicsLayerView2D")],f)}(d.declared(c))})},"esri/views/2d/layers/LayerView2D":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/watchUtils ../../../core/accessorSupport/decorators ../../layers/LayerView".split(" "),
  1000. function(p,g,b,a,e,d,c){return function(c){function f(){var a=null!==c&&c.apply(this,arguments)||this;a.attached=!1;a.moving=!1;a.updateRequested=!1;return a}b(f,c);f.prototype.initialize=function(){var a=this;this.when(function(){a.requestUpdate()});e.init(this,"suspended",function(b){a.container.visible=!b;!b&&a.updateRequested&&a.view.requestLayerViewUpdate(a)},!0);e.init(this,"fullOpacity",function(b){a.container.opacity=b},!0);var b=function(){this.notifyChange("rendering")}.bind(this);this.container.on("post-render",
  1001. b);this.container.on("will-render",b)};f.prototype.destroy=function(){this.attached&&(this.attached=!1,this.detach());this.updateRequested=!1;this.layer=null};Object.defineProperty(f.prototype,"rendering",{get:function(){return this.isRendering()},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"updating",{get:function(){return!this.suspended&&(!this.attached||this.updateRequested||this.isUpdating())},enumerable:!0,configurable:!0});f.prototype.requestUpdate=function(){this.updateRequested||
  1002. (this.updateRequested=!0,this.suspended||this.view.requestLayerViewUpdate(this))};f.prototype.processUpdate=function(a){this.isFulfilled()&&!this.isResolved()?this.updateRequested=!1:(this._set("updateParameters",a),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(a)))};f.prototype.isUpdating=function(){return!1};f.prototype.isRendering=function(){return this.attached&&(this.moving||this.container.renderRequested)};f.prototype.canResume=function(){var a=this.inherited(arguments),
  1003. b=this.layer;if(a&&null!=b.minScale&&null!=b.minScale){var a=this.view.scale,c=b.minScale,b=b.maxScale,d=!c,e=!b;!d&&a<=c&&(d=!0);!e&&a>=b&&(e=!0);a=d&&e}return a};a([d.property()],f.prototype,"attached",void 0);a([d.property()],f.prototype,"container",void 0);a([d.property()],f.prototype,"moving",void 0);a([d.property({dependsOn:["moving"]})],f.prototype,"rendering",null);a([d.property({dependsOn:["view.scale","layer.minScale","layer.maxScale"]})],f.prototype,"suspended",void 0);a([d.property({readOnly:!0})],
  1004. f.prototype,"updateParameters",void 0);a([d.property()],f.prototype,"updateRequested",void 0);a([d.property({dependsOn:["updateRequested","attached"]})],f.prototype,"updating",null);a([d.property()],f.prototype,"view",void 0);return f=a([d.subclass("esri.views.2d.layers.LayerView2D")],f)}(d.declared(c))})},"esri/views/2d/layers/FeatureLayerView2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/tsSupport/paramHelper dojo/has ../../../Graphic ../../../core/Collection ../../../core/Error ../../../core/Handles ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../layers/graphics/QueryEngine ../../../layers/graphics/controllers/support/controllerUtils ../engine/DOMContainer ../engine/webgl/rendererInfoUtils ./LayerView2D ./support/FeaturesView2D ../../layers/RefreshableLayerView".split(" "),
  1005. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x,v){function B(a){return a&&null!=a._proxy}function w(a){return a&&null!=a.update}return function(e){function g(){var a=null!==e&&e.apply(this,arguments)||this;a._handles=new l;a.container=new u;return a}b(g,e);g.prototype.highlight=function(a,b){var d=this;b=this.featuresView;var e;a instanceof c?e=[a.getAttribute(this.layer.objectIdField)]:"number"===typeof a?e=[a]:k.isCollection(a)?e=a.map(function(a){return a.getAttribute(d.layer.objectIdField)}).toArray():
  1006. Array.isArray(a)&&0<a.length&&(e="number"===typeof a[0]?a:a.map(function(a){return a.getAttribute(d.layer.objectIdField)}));return e&&e.length&&b&&null!=b.highlight?b.highlight(e):{remove:function(){}}};g.prototype.queryGraphics=function(){return this._queryEngine?this._queryEngine.queryFeatures():this._rejectQuery()};g.prototype.queryFeatures=function(a){return B(this.featuresView)?this.featuresView.queryFeatures(a):this._queryEngine?this._queryEngine.queryFeatures(a):this._rejectQuery()};g.prototype.queryObjectIds=
  1007. function(a){return B(this.featuresView)?this.featuresView.queryObjectIds(a):this._queryEngine?this._queryEngine.queryObjectIds(a):this._rejectQuery()};g.prototype.queryFeatureCount=function(a){return B(this.featuresView)?this.featuresView.queryFeatureCount(a):this._queryEngine?this._queryEngine.queryFeatureCount(a):this._rejectQuery()};g.prototype.queryExtent=function(a){return B(this.featuresView)?this.featuresView.queryExtent(a):this._queryEngine?this._queryEngine.queryExtent(a):this._rejectQuery()};
  1008. g.prototype.hitTest=function(a,b){return this.suspended||!this.featuresView?h.resolve():this.featuresView.hitTest(a,b)};g.prototype.update=function(a){w(this.controller)?this.controller.update(a):w(this.featuresView)&&this.featuresView.update(a)};g.prototype.attach=function(){var a=this;this._canUseWebGL()?h.create(function(a){return p(["./FeatureLayerView2DWebGL"],a)}).then(function(b){if(a.attached)return(new b({layer:a.layer,view:a.view})).when()}).then(function(b){a.featuresView=b;a.container.addChild(b.container);
  1009. b.attached=!0;b.attach()}):this.layer.createGraphicsController({layerView:this}).then(function(b){if(a.attached){a._set("controller",b);a.requestUpdate();var c=new x;c.mapView=a.view;c.graphics=b.graphics;c.layer=a.layer;c.renderer=a.layer.renderer;a._handles.add(a.layer.watch("renderer",function(){c.renderer=a.layer.renderer}));a._handles.add(a.layer.on("graphic-update",function(a){return c.graphicUpdateHandler(a)}));a.featuresView=c;a._queryEngine=new r;a._queryEngine.features=b.graphics;a._queryEngine.objectIdField=
  1010. a.layer.objectIdField;a.container.addChild(c.container)}})};g.prototype.detach=function(){this.container.removeAllChildren();this._handles.removeAll();this.featuresView&&(this.featuresView.destroy(),this.featuresView=null);this.controller&&(this.controller.destroy&&this.controller.destroy(),this._set("controller",null))};g.prototype.moveStart=function(){this.requestUpdate()};g.prototype.viewChange=function(){this.requestUpdate()};g.prototype.moveEnd=function(){this.requestUpdate()};g.prototype.doRefresh=
  1011. function(){this.updateRequested||this.suspended||this.controller&&m.isRefreshable(this.controller.activeController)&&this.controller.activeController.refresh()};g.prototype.isUpdating=function(){return null==this.featuresView||!0===this.get("controller.updating")||!0===this.featuresView.updateRequested||w(this.featuresView)&&this.featuresView.updating};g.prototype._canUseWebGL=function(){return d("esri-featurelayer-webgl")&&d("esri-webgl")&&q.isRendererWebGLCompatible(this.layer.renderer)&&(this.layer.capabilities.query.supportsQuantization&&
  1012. ("polygon"!==this.layer.geometryType||this.layer.capabilities.query.supportsCentroid)||this.layer.source&&"esri.layers.graphics.sources.CSVSource"===this.layer.source.declaredClass)};g.prototype._rejectQuery=function(){return h.reject(new f("FeatureLayerView2D","Not ready to execute query"))};a([n.property({readOnly:!0})],g.prototype,"controller",void 0);a([n.property()],g.prototype,"featuresView",void 0);a([n.property({dependsOn:["controller.updating","featuresView","featuresView.updating"]})],g.prototype,
  1013. "updating",void 0);return g=a([n.subclass("esri.views.2d.layers.FeatureLayerView2D")],g)}(n.declared(t,v))})},"esri/layers/graphics/controllers/support/controllerUtils":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",{value:!0});g.isRefreshable=function(b){return b&&b.refresh}})},"esri/views/2d/engine/webgl/rendererInfoUtils":function(){define("require exports ../../../../core/tsSupport/assignHelper ../../../../Graphic ../../../../arcade/Feature ../../../../support/arcadeUtils ./enums ./visualVariablesUtils".split(" "),
  1014. function(p,g,b,a,e,d,c,k){function f(c,e,f){if(!c)return null;var g=0,h={};c=c.clone();var k=c.visualVariables,n=null;if("simple"!==c.type){var r=c.valueExpression;if(!c.field&&r){var p="$$fake"+g++,B=d.createFunction(r);h[p]=function(a,b){l.repurposeFromGraphicLikeObject(a.geometry,a.attributes,f);return d.executeFunction(B,{vars:{$feature:l,$view:d.getViewInfo(b)},spatialReference:e})};c.field=p;c.valueExpression=null;n=function(b,c){c.attributes[p]=h[p](c);return b.valueExpression?b.getSymbol(a.fromJSON(c)):
  1015. b.getSymbol(c)}}}k&&(c.visualVariables=k.map(function(a){if(a.normalizationField){var c=a.field,k=a.normalizationField,m="$$fake"+g++;h[m]=function(a,b){return a.attributes[c]/a.attributes[k]};a=b({},a);a.field=m;delete a.normalizationField;return a}if(a.valueExpression&&"$view.scale"!==a.valueExpression){var n=a.valueExpression,m="$$fake"+g++,r=d.createFunction(n);h[m]=function(a,b){l.repurposeFromGraphicLikeObject(a.geometry,a.attributes,f);return d.executeFunction(r,{vars:{$feature:l,$view:d.getViewInfo(b)},
  1016. spatialReference:e})};a=b({},a);a.field=m;delete a.valueExpression}return a}));return{renderer:c,normalizingFunctions:h,getSymbolFunction:n}}Object.defineProperty(g,"__esModule",{value:!0});var l=new e;g.createRendererInfo=function(a,b,c){var d=(b=f(a,b,c)||{renderer:null,normalizingFunctions:null,getSymbolFunction:null},b.normalizingFunctions),e=b&&b.getSymbolFunction;a=b&&b.renderer||a;b=k.convertVisualVariables(a.visualVariables);return{renderer:a,vvFields:b.vvFields,vvRanges:b.vvRanges,getValue:function(a,
  1017. b){var c=d[b];return c?c(a):a.attributes[b]},getSymbol:function(a){return e?e(this.renderer,a):this.renderer.getSymbol?this.renderer.getSymbol.call(this.renderer,a):null}}};g.getNormalizedRenderer=function(a,b,c){return(b=f(a,b,c)||{renderer:null,normalizingFunctions:null,getSymbolFunction:null},b.renderer)||a};g.getSymbol=function(a,b){return a.getSymbol(b)};g.isRendererWebGLCompatible=function(a){if(!a||-1===["simple","class-breaks","unique-value"].indexOf(a.type))return!1;if(a.visualVariables){var b=
  1018. 0;for(a=a.visualVariables;b<a.length;b++){var d=a[b];switch(d.type){case "color":case "opacity":if(d.stops&&8<d.stops.length)return!1;break;case "size":if(k.getTypeOfSizeVisualVariable(d)===c.WGLVVFlag.SIZE_FIELD_STOPS&&d.stops&&6<d.stops.length)return!1}}}return!0}})},"esri/views/2d/engine/webgl/visualVariablesUtils":function(){define("require exports ../../../../core/screenUtils ./color ./enums ./Utils ../../../3d/layers/support/FastSymbolUpdates".split(" "),function(p,g,b,a,e,d,c){function k(a){return d.isNumber(a.minDataValue)&&
  1019. d.isNumber(a.maxDataValue)&&null!=a.minSize&&null!=a.maxSize?e.WGLVVFlag.SIZE_MINMAX_VALUE:(a.expression&&"view.scale"===a.expression||a.valueExpression&&"$view.scale"===a.valueExpression)&&Array.isArray(a.stops)?e.WGLVVFlag.SIZE_SCALE_STOPS:(null!=a.field||a.expression&&"view.scale"!==a.expression||a.valueExpression&&"$view.scale"!==a.valueExpression)&&Array.isArray(a.stops)?e.WGLVVFlag.SIZE_FIELD_STOPS:(null!=a.field||a.expression&&"view.scale"!==a.expression||a.valueExpression&&"$view.scale"!==
  1020. a.valueExpression)&&null!=a.valueUnit?e.WGLVVFlag.SIZE_UNIT_VALUE:e.WGLVVFlag.NONE}function f(a){return{value:a.value,size:b.toPt(a.size)}}function l(a){return a.map(function(a){return f(a)})}function h(a){return"string"===typeof a||"number"===typeof a?b.toPt(a):{type:"size",expression:a.expression,stops:l(a.stops)}}function n(a){var b={values:[0,0,0,0,0,0,0,0],opacities:[0,0,0,0,0,0,0,0]};if(d.isString(a.field))if(a.stops){if(8<a.stops.length)return null;a=a.stops;for(var c=0;8>c;++c){var e=a[Math.min(c,
  1021. a.length-1)];b.values[c]=e.value;b.opacities[c]=e.opacity}}else if(a.opacityValues){if(!d.isDefined(a.minDataValue)||!d.isDefined(a.maxDataValue)||2!==a.opacityValues.length)return null;b.values[0]=a.minDataValue;b.opacities[0]=a.opacityValues[0];b.values[1]=a.maxDataValue;b.opacities[1]=a.opacityValues[1];for(c=2;8>c;++c)b.values[c]=a.maxDataValue,b.opacities[c]=a.opacityValues[1]}else return null;else if(a.stops&&0<=a.stops.length||a.opacityValues&&0<=a.opacityValues.length)for(a=a.stops&&0<=a.stops.length?
  1022. a.stops[0].opacity:a.opacityValues[0],c=0;8>c;c++)b.values[c]=Infinity,b.opacities[c]=a;else return null;return b}Object.defineProperty(g,"__esModule",{value:!0});g.getTypeOfSizeVisualVariable=k;g.getVisualVariableSizeValueRepresentationRatio=function(a,b){if(!a||!b)return a;switch(b){case "radius":case "distance":return 2*a;case "area":return Math.sqrt(a)}return a};g.stopToSizeStop=f;g.normalizeSizeStops=l;g.normalizeSizeElement=h;g.getVisualVariablesFields=function(a){var b=a&&0<a.length?{}:null;
  1023. b&&a.forEach(function(a){var c=a.type;a.field&&(b[c]=a.field)});return b};g.convertVisualVariables=function(d){var f=d&&0<d.length?{}:null,g=f?{}:null;f&&d.forEach(function(d){var m=d.type;d.field&&(f[m]=d.field);if("size"===m)switch(g.size||(g.size={}),k(d)){case e.WGLVVFlag.SIZE_MINMAX_VALUE:g.size.minMaxValue={minDataValue:d.minDataValue,maxDataValue:d.maxDataValue,minSize:h(d.minSize),maxSize:h(d.maxSize)};break;case e.WGLVVFlag.SIZE_SCALE_STOPS:g.size.scaleStops={stops:l(d.stops)};break;case e.WGLVVFlag.SIZE_FIELD_STOPS:var m=
  1024. [],p=[];d=l(d.stops);for(var r=d.length,q=0;6>q;q++){var w=d[Math.min(q,r-1)];m.push(w.value);p.push(b.pt2px(w.size))}g.size.fieldStops={values:m,sizes:p};break;case e.WGLVVFlag.SIZE_UNIT_VALUE:g.size.unitValue={unit:d.valueUnit,valueRepresentation:d.valueRepresentation}}else if("color"===m)for(m=c.convertVisualVariables([d],{modelSize:null,symbolSize:null,unitInMeters:1,transformation:null}),g.color=m.color,q=0;32>q;q+=4)a.premultiplyAlpha(g.color.colors,q,!0);else"opacity"===m?g.opacity=n(d):"rotation"===
  1025. m&&(g.rotation={type:d.rotationType})});return{vvFields:f,vvRanges:g}}})},"esri/views/3d/layers/support/FastSymbolUpdates":function(){define(["require","exports","../../../../renderers/support/utils","../graphics/graphicUtils","../../lib/glMatrix"],function(p,g,b,a,e){function d(a){return null!==a&&void 0!==a}function c(a){return"number"===typeof a}function k(a,b){a&&a.push(b)}function f(a,e,f,g,h){var m=a.minSize,n=a.maxSize;if(a.expression)return k(h,"Could not convert size info: expression not supported"),
  1026. !1;if(a.useSymbolValue)return a=g.symbolSize[f],e.minSize[f]=a,e.maxSize[f]=a,e.offset[f]=e.minSize[f],e.factor[f]=0,e.type[f]=1,!0;if(d(a.field)){if(d(a.stops)){if(2===a.stops.length&&c(a.stops[0].size)&&c(a.stops[1].size))return l(a.stops[0].size,a.stops[1].size,a.stops[0].value,a.stops[1].value,e,f),e.type[f]=1,!0;k(h,"Could not convert size info: stops only supported with 2 elements");return!1}if(c(m)&&c(n)&&d(a.minDataValue)&&d(a.maxDataValue))return l(m,n,a.minDataValue,a.maxDataValue,e,f),
  1027. e.type[f]=1,!0;if(null!=b.meterIn[a.valueUnit])return e.minSize[f]=-Infinity,e.maxSize[f]=Infinity,e.offset[f]=0,e.factor[f]=1/b.meterIn[a.valueUnit],e.type[f]=1,!0;"unknown"===a.valueUnit?k(h,"Could not convert size info: proportional size not supported"):k(h,"Could not convert size info: scale-dependent size not supported");return!1}if(!d(a.field)){if(a.stops&&a.stops[0]&&c(a.stops[0].size))return e.minSize[f]=a.stops[0].size,e.maxSize[f]=a.stops[0].size,e.offset[f]=e.minSize[f],e.factor[f]=0,e.type[f]=
  1028. 1,!0;if(c(m))return e.minSize[f]=m,e.maxSize[f]=m,e.offset[f]=m,e.factor[f]=0,e.type[f]=1,!0}k(h,"Could not convert size info: unsupported variant of sizeInfo");return!1}function l(a,b,c,d,e,f){d=0<Math.abs(d-c)?(b-a)/(d-c):0;e.minSize[f]=0<d?a:b;e.maxSize[f]=0<d?b:a;e.offset[f]=a-c*d;e.factor[f]=d}function h(a,b,c,d){if(a.normalizationField||a.valueRepresentation)return k(d,"Could not convert size info: unsupported property"),null;var e=a.field;if(null!=e&&"string"!==typeof e)return k(d,"Could not convert size info: field is not a string"),
  1029. null;if(!b.size)b.size={field:a.field,minSize:[0,0,0],maxSize:[0,0,0],offset:[0,0,0],factor:[0,0,0],type:[0,0,0]};else if(a.field)if(!b.size.field)b.size.field=a.field;else if(a.field!==b.size.field)return k(d,"Could not convert size info: multiple fields in use"),null;switch(a.axis){case "width":return(e=f(a,b.size,0,c,d))?b:null;case "height":return(e=f(a,b.size,2,c,d))?b:null;case "depth":return(e=f(a,b.size,1,c,d))?b:null;case "width-and-depth":return(e=f(a,b.size,0,c,d))&&f(a,b.size,1,c,d),e?
  1030. b:null;case null:case void 0:case "all":return(e=(e=(e=f(a,b.size,0,c,d))&&f(a,b.size,1,c,d))&&f(a,b.size,2,c,d))?b:null;default:return k(d,'Could not convert size info: unknown axis "'+a.axis+'""'),null}}function n(a,b,c){for(var d=0;3>d;++d){var e=b.unitInMeters;1===a.type[d]&&(e*=b.modelSize[d],a.type[d]=2);a.minSize[d]/=e;a.maxSize[d]/=e;a.offset[d]/=e;a.factor[d]/=e}if(0!==a.type[0])b=0;else if(0!==a.type[1])b=1;else if(0!==a.type[2])b=2;else return k(c,"No size axis contains a valid size or scale"),
  1031. !1;for(d=0;3>d;++d)0===a.type[d]&&(a.minSize[d]=a.minSize[b],a.maxSize[d]=a.maxSize[b],a.offset[d]=a.offset[b],a.factor[d]=a.factor[b],a.type[d]=a.type[b]);return!0}function r(a,b,c){a[4*b+0]=c.r/255;a[4*b+1]=c.g/255;a[4*b+2]=c.b/255;a[4*b+3]=c.a}function m(a,b,c){if(a.normalizationField)return k(c,"Could not convert color info: unsupported property"),null;if("string"===typeof a.field)if(a.stops){if(8<a.stops.length)return k(c,"Could not convert color info: too many color stops"),null;b.color={field:a.field,
  1032. values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};a=a.stops;for(c=0;8>c;++c){var e=a[Math.min(c,a.length-1)];b.color.values[c]=e.value;r(b.color.colors,c,e.color)}}else if(a.colors){if(!d(a.minDataValue)||!d(a.maxDataValue))return k(c,"Could not convert color info: missing data values"),null;if(2!==a.colors.length)return k(c,"Could not convert color info: invalid colors array"),null;b.color={field:a.field,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,
  1033. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};b.color.values[0]=a.minDataValue;r(b.color.colors,0,a.colors[0]);b.color.values[1]=a.maxDataValue;r(b.color.colors,1,a.colors[1]);for(c=2;8>c;++c)b.color.values[c]=a.maxDataValue,r(b.color.colors,c,a.colors[1])}else return k(c,"Could not convert color info: missing stops or colors"),null;else if(a.stops&&0<=a.stops.length||a.colors&&0<=a.colors.length)for(a=a.stops&&0<=a.stops.length?a.stops[0].color:a.colors[0],b.color={field:null,values:[0,
  1034. 0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},c=0;8>c;c++)b.color.values[c]=Infinity,r(b.color.colors,c,a);else return k(c,"Could not convert color info: no field and no colors/stops"),null;return b}function u(a,b,c,d){a=2===c&&"arithmetic"===a.rotationType;b.offset[c]=a?90:0;b.factor[c]=a?-1:1;b.type[c]=1}function q(a,b,c){if("string"!==typeof a.field)return k(c,"Could not convert rotation info: field is not a string"),null;if(!b.rotation)b.rotation={field:a.field,
  1035. offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};else if(a.field)if(!b.rotation.field)b.rotation.field=a.field;else if(a.field!==b.rotation.field)return k(c,"Could not convert rotation info: multiple fields in use"),null;switch(a.axis){case "tilt":return u(a,b.rotation,0,c),b;case "roll":return u(a,b.rotation,1,c),b;case null:case void 0:case "heading":return u(a,b.rotation,2,c),b;default:return k(c,'Could not convert rotation info: unknown axis "'+a.axis+'""'),null}}function t(a,b,c){if(!a)return null;
  1036. var d=!b.supportedTypes||!!b.supportedTypes.size,e=!b.supportedTypes||!!b.supportedTypes.color,f=!b.supportedTypes||!!b.supportedTypes.rotation;return(a=a.reduce(function(a,g){if(!a)return a;if(g.valueExpression)return k(c,"Could not convert visual variables: arcade expressions not supported"),null;switch(g.type){case "size":return d?h(g,a,b,c):a;case "color":return e?m(g,a,c):a;case "rotation":return f?q(g,a,c):a;default:return k(c,"Could not convert visual variables: unsupported type "+g.type),
  1037. null}},{size:null,color:null,rotation:null}))&&a.size&&!n(a.size,b,c)?null:a}function x(a,b,c){if(!!a!==!!b||a&&a.field!==b.field)return!1;if(a&&"rotation"===c)for(c=0;3>c;c++)if(a.type[c]!==b.type[c]||a.offset[c]!==b.offset[c]||a.factor[c]!==b.factor[c])return!1;return!0}function v(a,b){var c={vvSizeEnabled:!1,vvSizeMinSize:null,vvSizeMaxSize:null,vvSizeOffset:null,vvSizeFactor:null,vvSizeValue:null,vvColorEnabled:!1,vvColorValues:null,vvColorColors:null,vvSymbolAnchor:null,vvSymbolRotation:null},
  1038. d=a&&null!=a.size;a&&a.size?(c.vvSizeEnabled=!0,c.vvSizeMinSize=a.size.minSize,c.vvSizeMaxSize=a.size.maxSize,c.vvSizeOffset=a.size.offset,c.vvSizeFactor=a.size.factor):a&&d&&(c.vvSizeValue=b.transformation.scale);a&&d&&(c.vvSymbolAnchor=b.transformation.anchor,c.vvSymbolRotation=b.transformation.rotation);a&&a.color&&(c.vvColorEnabled=!0,c.vvColorValues=a.color.values,c.vvColorColors=a.color.colors);return c}Object.defineProperty(g,"__esModule",{value:!0});g.convertVisualVariables=t;g.initFastSymbolUpdatesState=
  1039. function(a,b,c){return b&&a&&!a.disableFastUpdates?(a=t(a.visualVariables,c))?{enabled:!0,visualVariables:a,materialParameters:v(a,c),customTransformation:a&&null!=a.size}:{enabled:!1}:{enabled:!1}};g.updateFastSymbolUpdatesState=function(a,b,c){if(!b||!a.enabled)return!1;var d=a.visualVariables;b=t(b.visualVariables,c);if(!(b&&x(d.size,b.size,"size")&&x(d.color,b.color,"color")&&x(d.rotation,b.rotation,"rotation")))return!1;a.visualVariables=b;a.materialParameters=v(b,c);a.customTransformation=b&&
  1040. null!=b.size;return!0};g.getMaterialParams=v;var B;(function(b){var c=e.mat4d,d=e.vec3,f=c.create(),g=d.create();b.evaluateModelTransform=function(b,d,e){if(!b.vvSizeEnabled)return e;c.identity(f);c.multiply(e,f,f);a.computeObjectRotation(b.vvSymbolRotation[2],b.vvSymbolRotation[0],b.vvSymbolRotation[1],f);if(b.vvSizeEnabled){for(e=0;3>e;++e){var h=b.vvSizeOffset[e]+d[0]*b.vvSizeFactor[e],k=e;var l=b.vvSizeMinSize[e],m=b.vvSizeMaxSize[e],h=h<l?l:h>m?m:h;g[k]=h}c.scale(f,g,f)}else c.scale(f,b.vvSizeValue,
  1041. f);c.translate(f,b.vvSymbolAnchor,f);return f}})(B||(B={}));g.evaluateModelTransform=B.evaluateModelTransform})},"esri/views/3d/layers/graphics/graphicUtils":function(){define(["require","exports","../../../../geometry","../../../../geometry/support/webMercatorUtils","../../lib/glMatrix"],function(p,g,b,a,e){function d(c,d){var e=c.spatialReference;e.equals(d)||(e.isWebMercator&&d.wkid===b.SpatialReference.WGS84.wkid?a.webMercatorToGeographic(c,!1,c):d.isWebMercator&&e.wkid===b.SpatialReference.WGS84.wkid&&
  1042. a.geographicToWebMercator(c,!1,c))}function c(a){if(Array.isArray(a)){for(var b=0;b<a.length;b++)if(!c(a[b]))return!1;return!0}return null==a||0<=a}Object.defineProperty(g,"__esModule",{value:!0});var k=e.vec4d,f=e.mat4d,l=[1,1,1];g.computeCentroid=function(a,c){if("extent"===a.type)return a.center;if("polygon"===a.type)return a.centroid;if("mesh"===a.type)return a.extent.center;for(var e=0,f=0,g=0,h=a.hasZ,k=0,l=0,n=a.paths;l<n.length;l++){for(var p=n[l],w=0,z=p;w<z.length;w++){var y=z[w],e=e+y[0],
  1043. f=f+y[1];h&&(g+=y[2])}k+=p.length}a=new b.Point({x:e/k,y:f/k,z:h?g/k:void 0,spatialReference:a.spatialReference});c&&d(a,c);return a};g.convertToSR=d;g.enlargeExtent=function(a,b,c){if(a){b||(b=k.create());var d=.5*a.width*(c-1);c=.5*a.height*(c-1);a.width<1E-7*a.height?d+=c/20:a.height<1E-7*a.width&&(c+=d/20);k.set4(a.xmin-d,a.ymin-c,a.xmax+d,a.ymax+c,b);return b}return null};g.updateVertexAttributeAuxpos1w=function(a,b){for(var c=0;c<a.geometries.length;++c){var d=a.geometries[c].data.vertexAttributes.auxpos1;
  1044. d&&d.data[3]!==b&&(d.data[3]=b,a.geometryVertexAttrsUpdated(c))}};g.mixinColorAndOpacity=function(a,b){var c=[1,1,1,1];null!=a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);null!==b&&void 0!==b?c[3]=b:null!=a&&3<a.length&&(c[3]=a[3]);return c};g.overrideColor=function(a,b,c,d,e,f){void 0===f&&(f=[0,0,0,0]);for(var g=0;3>g;++g)f[g]=a&&null!=a[g]?a[g]:c&&null!=c[g]?c[g]:e[g];f[3]=null!=b?b:null!=d?d:e[3];return f};g.computeObjectScale=function(a,b,c,d){void 0===a&&(a=l);void 0===d&&(d=1);var e=Array(3);if(null==
  1045. b||null==c)e[0]=1,e[1]=1,e[2]=1;else{for(var f=void 0,g=0,h=2;0<=h;h--){var k=a[h],m=void 0,n=null!=k,p=0===h&&!f&&!n,r=c[h];"symbolValue"===k||p?m=0!==r?b[h]/r:1:n&&"proportional"!==k&&isFinite(k)&&(m=0!==r?k/r:1);null!=m&&(f=e[h]=m,g=Math.max(g,Math.abs(m)))}for(h=2;0<=h;h--)null==e[h]?e[h]=f:0===e[h]&&(e[h]=.001*g)}for(h=2;0<=h;h--)e[h]/=d;return e};g.computeSizeWithResourceSize=function(a,b){var c=b.width,d=b.depth,e=b.height;b=b.isPrimitive?10:1;if(null==c&&null==e&&null==d)return[b*a[0],b*a[1],
  1046. b*a[2]];for(var c=[c,d,e],f,d=0;3>d;d++)if(e=c[d],null!=e){f=e/a[d];break}for(d=0;3>d;d++)null==c[d]&&(c[d]=a[d]*f);return c};g.validateSymbolLayerSize=function(a){null!=a.isPrimitive&&(a=[a.width,a.depth,a.height]);return c(a)?null:"Symbol sizes may not be negative values"};g.computeObjectRotation=function(a,b,c,d){void 0===d&&(d=f.identity());a=a||0;b=b||0;c=c||0;0!==a&&f.rotateZ(d,-a/180*Math.PI,d);0!==b&&f.rotateX(d,b/180*Math.PI,d);0!==c&&f.rotateY(d,c/180*Math.PI,d);return d}})},"esri/views/2d/layers/support/FeaturesView2D":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../Graphic ../../../../core/Collection ../../../../core/Handles ../../../../core/Logger ../../../../core/promiseUtils ../../../../core/accessorSupport/decorators ../../../../renderers/support/renderingInfoUtils ../../../../symbols/Symbol3D ../../engine/graphics/GFXGroup ../../engine/graphics/GFXObject ../../engine/graphics/GFXSurface ../../../layers/GraphicsView".split(" "),
  1047. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q){var t=k.getLogger("esri.views.2d.layers.support.FeaturesView2D");return function(g){function k(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];var d=g.apply(this,a)||this;d._handles=new c;d._backgroundGroup=new r;d._frontGroup=new r;d._frontObjects=new Map;d._backgroundObjects=new Map;d._scale=0;d.container=new u;d.layer=null;d.container.addChild(d._backgroundGroup);d.container.addChild(d._frontGroup);d.watch("graphics",function(){return d._reset()});
  1048. d.watch("renderer",function(){return d._resymbolize()});d.watch("mapView.scale, mapView.stationary",function(){return d._applyScale()});return d}b(k,g);k.prototype.destroy=function(){this.renderer=this.graphics=null};k.prototype.hitTest=function(a,b){a+=this.mapView.position[0]-window.pageXOffset;b+=this.mapView.position[1]-window.pageYOffset;return(a=this.container.hitTest(a,b))?f.resolve(a.graphic):f.resolve()};k.prototype.graphicUpdateHandler=function(a){};k.prototype._reset=function(){var a=this;
  1049. this._handles.remove("graphics");this.graphics&&(this.graphics.forEach(this._add,this),this._handles.add(this.graphics.on("change",function(b){return a._graphicsChangeHandler(b)}),"graphics"))};k.prototype._applyScale=function(){var a=this.get("mapView.scale"),b=this.get("mapView.stationary");a!==this._scale&&b&&(this._scale=a,this._resymbolize())};k.prototype._resymbolize=function(){var a=this;this.graphics&&this.graphics.forEach(function(b){return a._resymbolizeGraphic(b)})};k.prototype._add=function(a){if(!this._frontObjects.has(a)){var b=
  1050. h.getRenderingInfo(a,{renderer:this.renderer,viewingMode:"map",scale:this.mapView.state.scale,resolution:this.mapView.state.resolution,spatialReference:this.mapView.spatialReference});if(b)if(b.symbol instanceof n)t.error("3D symbols are not supported with MapView");else{var c=new m;c.graphic=a;c.renderingInfo=b;this._frontObjects.set(a,c);this._frontGroup.addChild(c);var d=b.renderer&&b.renderer.backgroundFillSymbol;d&&c.isPolygonMarkerSymbol&&(c=new m,c.graphic=a,c.renderingInfo=null!=b.outlineSize?
  1051. {symbol:d,size:[b.outlineSize,b.outlineSize,b.outlineSize]}:{symbol:d},this._backgroundObjects.set(a,c),this._backgroundGroup.addChild(c))}}};k.prototype._remove=function(a){var b=this._frontObjects.get(a);b&&(this._frontObjects.delete(a),this._frontGroup.removeChild(b),this._backgroundObjects.has(a)&&(b=this._backgroundObjects.get(a),this._backgroundObjects.delete(a),this._backgroundGroup.removeChild(b)))};k.prototype._resymbolizeGraphic=function(a){if(this._frontObjects.has(a)){var b=h.getRenderingInfo(a,
  1052. {renderer:this.renderer,viewingMode:"map",scale:this.mapView.state.scale,resolution:this.mapView.state.resolution,spatialReference:this.mapView.spatialReference});if(b)if(b.symbol instanceof n)t.error("3D symbols are not supported with MapView");else{var c=this._frontObjects.get(a);c&&(c.renderingInfo=b);var d=b.renderer&&b.renderer.backgroundFillSymbol,e=this._backgroundObjects.get(a);d&&c.isPolygonMarkerSymbol?(e||(e=new m,e.graphic=a,this._backgroundObjects.set(a,e),this._backgroundGroup.addChild(e)),
  1053. e.renderingInfo=null!=b.outlineSize?{symbol:d,size:[b.outlineSize,b.outlineSize,b.outlineSize]}:{symbol:d}):!d&&e&&(this._backgroundObjects.delete(a),this._backgroundGroup.removeChild(e))}}};k.prototype._graphicsChangeHandler=function(a){for(var b=a.removed,c=0,d=a.added;c<d.length;c++)a=d[c],this._add(a);for(c=0;c<b.length;c++)a=b[c],this._remove(a)};a([l.property()],k.prototype,"container",void 0);a([l.property(),l.cast(d.ofType(e))],k.prototype,"graphics",void 0);a([l.property()],k.prototype,"layer",
  1054. void 0);a([l.property()],k.prototype,"mapView",void 0);return k=a([l.subclass("esri.views.2d.layers.support.FeaturesView2D")],k)}(l.declared(q))})},"esri/renderers/support/renderingInfoUtils":function(){define(["require","exports"],function(p,g){function b(a,b){if(!a||a.symbol)return null;b=b.renderer;return a&&b&&b.getObservationRenderer?b.getObservationRenderer(a):b}function a(a,d){if(a.symbol)return a.symbol;var c=b(a,d);return c&&c.getSymbol(a,d)}Object.defineProperty(g,"__esModule",{value:!0});
  1055. g.getRenderer=b;g.getSymbol=a;g.getRenderingInfo=function(e,d){var c=b(e,d),g=a(e,d);if(!g)return null;g={renderer:c,symbol:g};if(c){c.colorInfo&&(g.color=c.getColor(e).toRgba());if(c.sizeInfo){var f=c.getSize(e);g.size=[f,f,f]}if(c.visualVariables){e=c.getVisualVariableValues(e,d);f=["proportional","proportional","proportional"];for(d=0;d<e.length;d++){var l=e[d],c=l.variable,h=l.value;"color"===c.type?g.color=h.toRgba():"size"===c.type?"outline"===c.target?g.outlineSize=h:(l=c.axis,c=c.useSymbolValue?
  1056. "symbolValue":h,"width"===l?f[0]=c:"depth"===l?f[1]=c:"height"===l?f[2]=c:f[0]="width-and-depth"===l?f[1]=c:f[1]=f[2]=c):"opacity"===c.type?g.opacity=h:"rotation"===c.type&&"tilt"===c.axis?g.tilt=h:"rotation"===c.type&&"roll"===c.axis?g.roll=h:"rotation"===c.type&&(g.heading=h)}if(isFinite(f[0])||isFinite(f[1])||isFinite(f[2]))g.size=f}}return g}})},"esri/views/layers/RefreshableLayerView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
  1057. function(p,g,b,a,e,d){return function(c){function e(){var a=null!==c&&c.apply(this,arguments)||this;a.refreshTimestamp=null;return a}b(e,c);e.prototype.refresh=function(a){void 0===a&&(a=Date.now());this._set("refreshTimestamp",a);this.doRefresh&&this.doRefresh()};a([d.property()],e.prototype,"layer",void 0);a([d.aliasOf("layer.refreshInterval")],e.prototype,"refreshInterval",void 0);a([d.property({readOnly:!0})],e.prototype,"refreshTimestamp",void 0);return e=a([d.subclass("esri.layers.mixins.RefreshableLayerView")],
  1058. e)}(d.declared(e))})},"esri/views/2d/layers/TiledLayerView2D":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Error ../../../core/ObjectPool ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../engine/Bitmap ../engine/BitmapContainer ../engine/BitmapSource ../engine/Canvas2DContainer ../engine/Tiled ./LayerView2D ../tiling/TileInfoView ../tiling/TileKey ../tiling/TileQueue ../tiling/TileStrategy ../../layers/RefreshableLayerView".split(" "),
  1059. function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,u,q,t,x,v){var B=function(a){function c(b){b=a.call(this,b)||this;b.key=new q(0,0,0,0);return b}b(c,a);c.prototype.acquire=function(a){};c.prototype.release=function(){this.key.set(0,0,0,0)};c.pool=new d(c,!0);return c}(r(f)),w=[0,0];return function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a._tileStrategy=null;a._tileInfoView=null;a._fetchQueue=null;a._tileRequests=new Map;a.container=new n;a.layer=null;return a}b(f,d);f.prototype.initialize=
  1060. function(){var a=this.layer.tileInfo,a=a&&a.spatialReference,b;a||(b=new e("layerview:tiling-information-missing","The layer doesn't provide tiling information",{layer:this.layer}));a.equals(this.view.spatialReference)||(b=new e("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}));b&&this.addResolvingPromise(c.reject(b))};f.prototype.hitTest=function(a,b){return null};f.prototype.update=function(a){this._fetchQueue.pause();
  1061. this._fetchQueue.state=a.state;this._tileStrategy.update(a);this._fetchQueue.resume();this.notifyChange("updating")};f.prototype.attach=function(){var a=this;this._tileContainer=new l;this.container.addChild(this._tileContainer);this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent);this._fetchQueue=new t({tileInfoView:this._tileInfoView,tileServers:this.layer.tileServers,concurrency:this.layer.url&&-1!==this.layer.url.indexOf("tiles.arcgis.com")?12:6,process:function(b,c){return a.fetchTile(b,
  1062. c)}});this._tileStrategy=new x({cachePolicy:"keep",acquireTile:function(b){return a.acquireTile(b)},releaseTile:function(b){return a.releaseTile(b)},tileInfoView:this._tileInfoView})};f.prototype.detach=function(){this._tileStrategy.destroy();this._fetchQueue.clear();this.container.removeChild(this._tileContainer);this._fetchQueue=this._tileStrategy=this._tileInfoView=this._tileContainer=null};f.prototype.moveStart=function(){this.requestUpdate()};f.prototype.viewChange=function(){this.requestUpdate()};
  1063. f.prototype.moveEnd=function(){this.requestUpdate()};f.prototype.doRefresh=function(){var a=this;this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach(function(b){return a._enqueueTileFetch(b)}),this.notifyChange("updating"))};f.prototype.isUpdating=function(){var a=!0;this._tileRequests.forEach(function(b){a=a&&b.isFulfilled()});return!a};f.prototype.getTileBounds=function(a,b){return this._tileInfoView.getTileBounds(a,b)};f.prototype.getTileCoords=function(a,
  1064. b){return this._tileInfoView.getTileCoords(a,b)};f.prototype.getTileResolution=function(a){return this._tileInfoView.getTileResolution(a)};f.prototype.acquireTile=function(a){var b=B.pool.acquire();b.key.set(a);a=this._tileInfoView.getTileCoords(w,b.key);b.x=a[0];b.y=a[1];b.resolution=this._tileInfoView.getTileResolution(b.key);a=this._tileInfoView.tileInfo.size;b.width=a[0];b.height=a[1];this._enqueueTileFetch(b);this.requestUpdate();return b};f.prototype.releaseTile=function(a){var b=this,c=this._tileRequests.get(a);
  1065. c&&!c.isFulfilled()&&c.cancel();this._tileRequests.delete(a);this._tileContainer.removeChild(a);a.once("detach",function(){B.pool.release(a);b.requestUpdate()});this.requestUpdate()};f.prototype.fetchTile=function(a,b){var c=this;if(b=this.layer.tilemapCache){var d=a.level,e=a.row,f=a.col;return b.fetchAvailabilityUpsample(d,e,f,a).then(function(){return c._fetchImage(a)}).catch(function(){a.level=d;a.row=e;a.col=f;return c._fetchImage(a)})}return this._fetchImage(a)};f.prototype._enqueueTileFetch=
  1066. function(a){var b=this;if(!this._fetchQueue.has(a.key)){var c=this._fetchQueue.push(a.key).then(function(c){a.source=c;a.once("attach",function(){return b.requestUpdate()});b._tileContainer.addChild(a);b.requestUpdate()});this._tileRequests.set(a,c)}};f.prototype._fetchImage=function(a){var b=this;return this.layer.fetchTile(a.level,a.row,a.col,{timestamp:this.refreshTimestamp}).then(function(c){c=h.default.pool.acquire(c);d=b.getTileCoords(w,a);c.x=d[0];c.y=d[1];c.resolution=b.getTileResolution(a);
  1067. return c;var d})};return f=a([k.subclass("esri.views.2d.layers.TiledLayerView2D")],f)}(k.declared(m,v))})},"esri/views/2d/engine/Bitmap":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./DisplayObject"],function(p,g,b,a){var e=[0,0];return function(a){function c(b){var c=a.call(this)||this;c.source=b;c.height=0;c.resolution=0;c.rotation=0;c.width=0;c.x=0;c.y=0;return c}b(c,a);c.prototype.doRender=function(a){this.source&&this.source.ready&&this.renderCanvas2D(a)};c.prototype.renderCanvas2D=
  1068. function(a){var b=this.source,c=a.context,d=a.state;a=d.rotation;var g=this.resolution/d.resolution*d.pixelRatio;if(!(.05>g)){c.save();var k=d.toScreen(e,this.x,this.y),d=k[0],k=k[1];.99<g&&1.01>g?c.translate(Math.round(d),Math.round(k)):(c.translate(d,k),c.scale(g,g));a&&c.rotate(a*Math.PI/180);b.rotation&&(c.translate(.5*this.width,.5*this.height),c.rotate(-b.rotation*Math.PI/180),c.translate(.5*-this.width,.5*-this.height));a=(this.x-b.x)/b.resolution;g=-(this.y-b.y)/b.resolution;d=this.resolution/
  1069. b.resolution*b.width;k=this.resolution/b.resolution*b.height;c.clearRect(0,0,this.width,this.height);b.draw(c,Math.round(a),Math.round(g),Math.round(d),Math.round(k),0,0,this.width,this.height);c.restore()}};return c}(a)})},"esri/views/2d/engine/BitmapContainer":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../ViewState ../viewStateUtils ./Container".split(" "),function(p,g,b,a,e,d,c){var k=[0,0];return function(a){function c(){var b=
  1070. null!==a&&a.apply(this,arguments)||this;b._childrenCanvas=null;b._childrenRenderParameters={context:null,pixelRatio:1,state:new e,stationary:!0};return b}b(c,a);c.prototype.attach=function(b){this._childrenCanvas||(this._childrenCanvas=document.createElement("canvas"),this._childrenRenderParameters.context=this._childrenCanvas.getContext("2d"));return a.prototype.attach.call(this,b)};c.prototype.detach=function(b){a.prototype.detach.call(this,b);this._childrenCanvas=null;this._childrenRenderParameters.context=
  1071. null};c.prototype.doRender=function(b){this.visible&&a.prototype.doRender.call(this,b)};c.prototype.prepareChildrenRenderParameters=function(a){var b=this._childrenCanvas,c=this._childrenRenderParameters,e=a.state,f=e.pixelRatio,g=c.state;g.copy(e);var h=d.getOuterSize(k,e),e=h[0],h=h[1],e=e*f,h=h*f;g.size=k;g.viewpoint.rotation=0;b.width!==e||b.height!==h?(b.width=e,b.height=h):c.context.clearRect(0,0,e,h);c.pixelRatio=a.pixelRatio;return c};c.prototype.beforeRenderChildren=function(a,b){this.sortChildren(function(a,
  1072. b){return b.resolution-a.resolution})};c.prototype.afterRenderChildren=function(a,b){var c=a.context;a=a.state;var d=b.context;b=b.state;0===a.rotation?c.drawImage(d.canvas,0,0):(c.save(),c.translate(.5*a.width,.5*a.height),c.rotate(a.rotation*Math.PI/180),c.translate(.5*-a.width,.5*-a.height),c.drawImage(d.canvas,.5*(a.width-b.width),.5*(a.height-b.height)),c.restore())};return c}(c)})},"esri/views/2d/viewStateUtils":function(){define(["require","exports"],function(p,g){Object.defineProperty(g,"__esModule",
  1073. {value:!0});var b=Math.PI/180;g.snapToPixel=function(a,b,d){var c=d.resolution;d=d.size;a[0]=c*(Math.round(b[0]/c)+d[0]%2*.5);a[1]=c*(Math.round(b[1]/c)+d[1]%2*.5);return a};g.getOuterSize=function(a,e){var d=e.rotation*b,c=Math.abs(Math.cos(d)),d=Math.abs(Math.sin(d)),g=e.size;e=g[0];g=g[1];a[0]=Math.round(g*d+e*c);a[1]=Math.round(g*c+e*d);return a};g.getBBox=function(a,b,d,c){var e=b[0];b=b[1];var f=c[0];c=c[1];d*=.5;a[0]=e-d*f;a[1]=b-d*c;a[2]=e+d*f;a[3]=b+d*c;return a};g.bboxIntersects=function(a,
  1074. b){var d=a[1],c=a[2],e=a[3],f=b[0],g=b[1],h=b[3];return!(a[0]>b[2]||c<f||d>h||e<g)}})},"esri/views/2d/engine/BitmapSource":function(){define(["require","exports","../../../core/ObjectPool"],function(p,g,b){function a(a){return a&&"render"in a}Object.defineProperty(g,"__esModule",{value:!0});p=function(){function e(a){this._height=0;this.pixelRatio=1;this.y=this.x=this._width=this.rotation=this.resolution=0;this.data=a}e.prototype.release=function(){this.data=null};Object.defineProperty(e.prototype,
  1075. "data",{get:function(){return this._data},set:function(b){this._data=b;this._width=this._height=0;b&&!a(b)&&(b instanceof HTMLImageElement?(this._width=b.naturalWidth,this._height=b.naturalHeight):0<b.width&&0<b.height&&(this._width=b.width,this._height=b.height))},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"height",{get:function(){return a(this._data)?this._data.height:this._height},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"ready",{get:function(){return a(this._data)?
  1076. 0<this._data.width&&0<this._data.height:0<this._width},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"width",{get:function(){return a(this.data)?this._data.width:this._width},enumerable:!0,configurable:!0});e.prototype.draw=function(b,c,e,f,g,h,n,p,m){this.ready&&(a(this._data)?this._data.render(b,c,e,f,g,h,n,p,m):f&&g&&p&&m&&b.drawImage(this._data,c,e,f,g,h,n,p,m))};e.pool=new b(e,!0);return e}();g.default=p})},"esri/views/2d/engine/Canvas2DContainer":function(){define(["require",
  1077. "exports","../../../core/tsSupport/extendsHelper","../ViewState","./Container"],function(p,g,b,a,e){return function(d){function c(){var b=null!==d&&d.apply(this,arguments)||this;b._childrenRenderParameters={context:null,pixelRatio:1,state:new a,stationary:!0};b.hidpi=!1;return b}b(c,d);c.prototype.createElement=function(){var a=document.createElement("canvas");a.setAttribute("class","esri-display-object");return a};c.prototype.setElement=function(a){this.element=a};c.prototype.doRender=function(a){var b=
  1078. this.element,c=b.style;if(this.visible){var e=a.state,g=a.pixelRatio,k=e.width,e=e.height;b.width=k*(this.hidpi?g:1);b.height=e*(this.hidpi?g:1);c.display="block";c.opacity=""+this.opacity;c.width=k+"px";c.height=e+"px";d.prototype.doRender.call(this,a)}else c.display="none"};c.prototype.prepareChildrenRenderParameters=function(a){var b=this._childrenRenderParameters;b.context=this.element.getContext("2d");b.pixelRatio=a.pixelRatio;b.state.copy(a.state);b.state.pixelRatio=this.hidpi?a.pixelRatio:
  1079. 1;b.stationary=a.stationary;return b};c.prototype.beforeRenderChildren=function(a,b){a=b.context;var c=b.state;a.save();if(c.spatialReference.isWrappable){var d=c.width;b=c.height;var e=c.pixelRatio,f=this.hidpi?e:1,e=c.rotation*Math.PI/180,g=Math.round(d*f*Math.abs(Math.cos(e))+b*f*Math.abs(Math.sin(e))),c=c.worldScreenWidth*f;c<g&&(d=d*f*.5,b=b*f*.5,e&&(a.translate(d,b),a.rotate(e),a.translate(-d,-b)),a.beginPath(),a.rect(d-.5*c,b-.5*g,c,g),a.closePath(),e&&(a.translate(d,b),a.rotate(-e),a.translate(-d,
  1080. -b)),a.clip("evenodd"))}};c.prototype.afterRenderChildren=function(a,b){b.context.restore()};c.prototype.renderChild=function(a,b){b.context.save();a.processRender(b);b.context.restore()};return c}(e)})},"esri/views/2d/engine/Tiled":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./Evented"],function(p,g,b,a){return function(e){e=function(a){function c(){for(var b=0;b<arguments.length;b++);return a.call(this)||this}b(c,a);return c}(e);return a.EventedMixin(e)}})},"url:esri/views/2d/engine/webgl/shaders/backgroundShaders.xml":'\x3csnippets\x3e\r\n \x3csnippet name\x3d"backgroundVS"\x3e\r\n \x3c![CDATA[\r\n attribute vec2 a_pos;\r\n\r\n uniform highp mat4 u_transformMatrix;\r\n uniform mediump vec2 u_normalized_origin;\r\n uniform mediump float u_coord_range;\r\n uniform mediump float u_depth;\r\n\r\n void main() {\r\n gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(u_coord_range * a_pos, 0.0, 1.0);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"backgroundFS"\x3e\r\n \x3c![CDATA[\r\n uniform lowp vec4 u_color;\r\n void main() {\r\n gl_FragColor \x3d u_color;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
  1081. "url:esri/views/2d/engine/webgl/shaders/bitblitShaders.xml":'\x3csnippets\x3e\r\n \x3csnippet name\x3d"bitblitVS"\x3e\r\n \x3c![CDATA[\r\n attribute vec2 a_pos;\r\n attribute vec2 a_tex;\r\n\r\n varying mediump vec2 v_uv;\r\n\r\n void main(void) {\r\n gl_Position \x3d vec4(a_pos, 0.0, 1.0);\r\n v_uv \x3d a_tex;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"bitblitFS"\x3e\r\n \x3c![CDATA[\r\n \tuniform lowp sampler2D u_tex;\r\n uniform lowp float u_opacity;\r\n\r\n varying mediump vec2 v_uv;\r\n\r\n void main() {\r\n lowp vec4 color \x3d texture2D(u_tex, v_uv);\r\n\r\n // Note: output in pre-multiplied alpha for correct alpha compositing\r\n gl_FragColor \x3d color * u_opacity;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
  1082. "url:esri/views/2d/engine/webgl/shaders/stencilShaders.xml":'\x3csnippets\x3e\r\n \x3csnippet name\x3d"stencilVS"\x3e\r\n \x3c![CDATA[\r\n attribute vec2 a_pos;\r\n\r\n void main() {\r\n gl_Position \x3d vec4(a_pos, 0.0, 1.0);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"stencilFS"\x3e\r\n \x3c![CDATA[\r\n void main() {\r\n gl_FragColor \x3d vec4(1.0, 1.0, 1.0, 1.0);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',"url:esri/views/2d/engine/webgl/shaders/tileInfo.xml":'\x3csnippets\x3e\r\n \x3csnippet name\x3d"tileInfoVS"\x3e\r\n \x3c![CDATA[\r\n attribute vec2 a_pos;\r\n\r\n uniform highp mat4 u_transformMatrix;\r\n uniform mediump vec2 u_normalized_origin;\r\n uniform mediump float u_depth;\r\n uniform mediump float u_coord_ratio;\r\n uniform mediump vec2 u_delta; // in tile coordinates\r\n uniform mediump vec2 u_dimensions; // in tile coordinates\r\n\r\n varying mediump vec2 v_tex;\r\n\r\n void main() {\r\n mediump vec2 offests \x3d u_coord_ratio * vec2(u_delta + a_pos * u_dimensions);\r\n gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(offests, 0.0, 1.0);\r\n\r\n v_tex \x3d a_pos;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"tileInfoFS"\x3e\r\n \x3c![CDATA[\r\n uniform mediump sampler2D u_texture;\r\n varying mediump vec2 v_tex;\r\n\r\n void main(void) {\r\n lowp vec4 color \x3d texture2D(u_texture, v_tex);\r\n gl_FragColor \x3d 0.75 * color;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
  1083. "url:esri/views/2d/engine/webgl/shaders/fillShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n // YF TODO: (doc)\r\n--\x3e\r\n\x3csnippets\x3e\r\n \x3csnippet name\x3d"fillVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR)|| defined(VV_OPACITY)\r\n attribute vec4 a_vv;\r\n #endif // VV_COLOR || VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"fillVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"fillVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n attribute vec2 a_pos;\r\n attribute vec4 a_id; // since we need to render the Id as a color we need to break it into RGBA components. so just like a color, the Id is normalized.\r\n attribute vec4 a_color;\r\n attribute vec4 a_tlbr;\r\n attribute vec4 a_aux;\r\n\r\n uniform highp mat4 u_transformMatrix;\r\n uniform highp vec2 u_normalized_origin;\r\n\r\n varying lowp vec4 v_color;\r\n varying lowp float v_opacity;\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $fillVVUniformsVS\r\n $fillVVFunctions\r\n\r\n #ifdef PATTERN\r\n uniform mediump float u_zoomFactor;\r\n uniform mediump vec2 u_mosaicSize;\r\n\r\n varying mediump vec4 v_tlbr;\r\n varying mediump vec2 v_tileTextureCoord;\r\n #endif // PATTERN\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n void main()\r\n {\r\n #ifdef VV_OPACITY\r\n v_opacity \x3d getVVOpacity(a_vv.y);\r\n #else\r\n v_opacity \x3d 1.0;\r\n #endif\r\n\r\n #ifdef VV_COLOR\r\n v_color \x3d getVVColor(a_vv.x);\r\n #else\r\n v_color \x3d a_color;\r\n #endif // VV_COLOR\r\n\r\n #ifdef ID\r\n v_id \x3d a_id;\r\n #endif // ID\r\n\r\n #ifdef PATTERN\r\n // calculate the pattern matrix\r\n mat3 patternMatrix \x3d mat3(1.0, 0.0, 0.0,\r\n 0.0, 1.0, 0.0,\r\n 0.0, 0.0, 1.0);\r\n patternMatrix[0][0] \x3d 1.0 / (u_zoomFactor * a_aux.x);\r\n patternMatrix[1][1] \x3d 1.0 / (u_zoomFactor * a_aux.y);\r\n\r\n // calculate the texture coordinates of the current vertex. It will of course get interpolated.\r\n // The pattern matrix is a 3x3 scale matrix which \'tiles\' the texture inside the tile, translating from\r\n // tile coordinates to texture coordinates.\r\n v_tileTextureCoord \x3d (patternMatrix * vec3(a_pos, 1.0)).xy;\r\n v_tlbr \x3d vec4(a_tlbr.x / u_mosaicSize.x, a_tlbr.y / u_mosaicSize.y, a_tlbr.z / u_mosaicSize.x, a_tlbr.w / u_mosaicSize.y);\r\n #endif // PATTERN\r\n\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(a_pos, 0, 1.0);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"fillFS"\x3e\r\n \x3c![CDATA[\r\n precision lowp float;\r\n uniform lowp float u_opacity;\r\n\r\n #ifdef PATTERN\r\n uniform lowp sampler2D u_texture;\r\n\r\n varying mediump vec4 v_tlbr;\r\n varying mediump vec2 v_tileTextureCoord;\r\n #endif // PATTERN\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n varying lowp vec4 v_color;\r\n varying lowp float v_opacity;\r\n\r\n void main()\r\n {\r\n #ifdef PATTERN\r\n // normalize the calculated texture coordinate such that it fits in the range of 0 to 1.\r\n mediump vec2 normalizedTextureCoord \x3d mod(v_tileTextureCoord, 1.0);\r\n // interpolate the image coordinate between the top-left and the bottom right to get the actual position to sample.\r\n // after normalizing the position, we get a value ranging between 0 and 1 which refers to the entire texture, however\r\n // we need to only sample from area that has our sprite in the mosaic.\r\n mediump vec2 samplePos \x3d mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\r\n // sample the sprite mosaic\r\n lowp vec4 color \x3d texture2D(u_texture, samplePos);\r\n gl_FragColor \x3d u_opacity * v_opacity * v_color * color;\r\n #else\r\n gl_FragColor \x3d u_opacity * v_opacity * v_color;\r\n #endif // PATTERN\r\n\r\n #ifdef HIGHLIGHT\r\n gl_FragColor.a \x3d step(1.0 / 255.0, gl_FragColor.a);\r\n #endif // HIGHLIGHT\r\n\r\n #ifdef ID\r\n //if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n // discard;\r\n //}\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
  1084. "url:esri/views/2d/engine/webgl/shaders/iconShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n Add your GLSL snippets to this file. You should start from\r\n importing your old GLSL files. For instance, if you have a\r\n file such as myShader.vs.glsl you should create a new \x3csnippet name\x3d"myShaderVS"\x3e\r\n and then copy and paste the GLSL source as the content. You will then convert your\r\n code to use the {@link esri/views/2d/engine/webgl/glShaderSnippets glShaderSnippets}\r\n instance to access the GLSL code, instead of importing it directly with require("dojo/text!...").\r\n--\x3e\r\n\x3csnippets\x3e\r\n\r\n \x3csnippet name\x3d"rgba2floatFunc"\x3e\r\n \x3c![CDATA[\r\n float rgba2float(vec4 rgba) {\r\n return dot(rgba, vec4(1.0/16777216.0, 1.0/65535.0, 1.0/256.0, 1.0));\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"iconVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR) || defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE) || defined(VV_OPACITY) || defined(VV_ROTATION)\r\n attribute vec4 a_vv;\r\n #endif // VV_COLOR || VV_SIZE_MIN_MAX_VALUE || VV_SIZE_SCALE_STOPS || VV_SIZE_FIELD_STOPS || VV_SIZE_UNIT_VALUE || VV_OPACITY || VV_ROTATION\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n uniform vec4 u_vvSizeMinMaxValue;\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n uniform float u_vvSizeScaleStopsValue;\r\n #endif // VV_SIZE_SCALE_STOPS\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n uniform float u_vvSizeFieldStopsValues[6];\r\n uniform float u_vvSizeFieldStopsSizes[6];\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n uniform float u_vvSizeUnitValueWorldToPixelsRatio;\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_ROTATION\r\n uniform lowp float u_vvRotationType;\r\n #endif // VV_ROTATION\r\n\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"iconVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n float getVVMinMaxSize(float sizeValue) {\r\n // we need to multiply by 8 in order to translate to tile coordinates\r\n float interpolationRatio \x3d (sizeValue - u_vvSizeMinMaxValue.x) / (u_vvSizeMinMaxValue.y - u_vvSizeMinMaxValue.x);\r\n interpolationRatio \x3d clamp(interpolationRatio, 0.0, 1.0);\r\n return u_vvSizeMinMaxValue.z + interpolationRatio * (u_vvSizeMinMaxValue.w - u_vvSizeMinMaxValue.z);\r\n }\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n const int VV_SIZE_N \x3d 6;\r\n float getVVStopsSize(float sizeValue) {\r\n if (sizeValue \x3c\x3d u_vvSizeFieldStopsValues[0]) {\r\n return u_vvSizeFieldStopsSizes[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_SIZE_N; ++i) {\r\n if (u_vvSizeFieldStopsValues[i] \x3e\x3d sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeFieldStopsValues[i-1]) / (u_vvSizeFieldStopsValues[i] - u_vvSizeFieldStopsValues[i-1]);\r\n return mix(u_vvSizeFieldStopsSizes[i-1], u_vvSizeFieldStopsSizes[i], f);\r\n }\r\n }\r\n\r\n return u_vvSizeFieldStopsSizes[VV_SIZE_N - 1];\r\n }\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n float getVVUnitValue(float sizeValue) {\r\n return u_vvSizeUnitValueWorldToPixelsRatio * sizeValue;\r\n }\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_ROTATION\r\n mat4 getVVRotation(float rotationValue) {\r\n // YF TODO: if the symbol has rotation we need to combine the symbo\'s rotation with the VV one\r\n\r\n float rotation \x3d rotationValue;\r\n if (u_vvRotationType \x3d\x3d 1.0) {\r\n rotation \x3d 90.0 - rotation;\r\n }\r\n\r\n float angle \x3d C_DEG_TO_RAD * rotation;\r\n\r\n float sinA \x3d sin(angle);\r\n float cosA \x3d cos(angle);\r\n\r\n return mat4(cosA, sinA, 0, 0,\r\n -sinA, cosA, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1);\r\n }\r\n #endif // VV_ROTATION\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n\r\n \x3csnippet name\x3d"iconVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n //const float C_256_TO_RAD \x3d 3.14159265359 / 128.0;\r\n const float C_DEG_TO_RAD \x3d 3.14159265359 / 180.0;\r\n const float C_OFFSET_PRECISION \x3d 1.0 / 64.0;\r\n\r\n // per-vertex attributes (4 bytes)\r\n attribute vec4 a_vertexOffsetAndTex;\r\n\r\n // per quad (instance) attributes (20 bytes \x3d\x3d\x3e equivalent of 5 bytes per vertex)\r\n attribute vec2 a_pos;\r\n attribute vec4 a_id; // since we need to render the Id as a color we need to break it into RGBA components. so just like a color, the Id is normalized.\r\n attribute vec4 a_color;\r\n attribute vec4 a_outlineColor;\r\n attribute vec4 a_sizeAndOutlineWidth;\r\n\r\n // the relative transformation of a vertex given in tile coordinates to a relative normalized coordinate\r\n // relative to the tile\'s upper left corner\r\n // the extrusion vector.\r\n uniform highp mat4 u_transformMatrix;\r\n // the extrude matrix which is responsible for the \'anti-zoom\' as well as the rotation\r\n uniform highp mat4 u_extrudeMatrix;\r\n // u_normalized_origin is the tile\'s upper left corner given in normalized coordinates\r\n uniform highp vec2 u_normalized_origin;\r\n\r\n // the size of the mosaic given in pixels\r\n uniform vec2 u_mosaicSize;\r\n\r\n // the opacity of the layer given by the painter\r\n uniform mediump float u_opacity;\r\n\r\n // the interpolated texture coordinate value to be used by the fragment shader in order to sample the sprite texture\r\n varying mediump vec2 v_tex;\r\n // the calculated transparency to be applied by the fragment shader. It is incorporating both the fade as well as the\r\n // opacity of the layer given by the painter\r\n varying lowp float v_transparency;\r\n // the of the icon given in pixels\r\n varying mediump vec2 v_size;\r\n\r\n // icon color. If is a picture-marker it is used to tint the texture color\r\n varying lowp vec4 v_color;\r\n\r\n #ifdef SDF\r\n varying lowp vec4 v_outlineColor;\r\n varying mediump float v_outlineWidth;\r\n #endif // SDF\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n #ifdef HEATMAP\r\n attribute float a_heatmapWeight;\r\n varying mediump float v_heatmapWeight;\r\n #endif // HEATMAP\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $iconVVUniformsVS\r\n $iconVVFunctions\r\n\r\n void main()\r\n {\r\n vec2 a_offset \x3d a_vertexOffsetAndTex.xy;\r\n vec2 a_tex \x3d a_vertexOffsetAndTex.zw;\r\n vec2 a_size \x3d a_sizeAndOutlineWidth.xy;\r\n\r\n // default values (we need them for the variations to come)\r\n float a_angle \x3d 0.0;\r\n float delta_z \x3d 0.0;\r\n float depth \x3d 0.0;\r\n v_transparency \x3d 1.0;\r\n\r\n #if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n // vv size override the original symbol\'s size\r\n float h \x3d getVVMinMaxSize(a_vv.x);\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n float h \x3d u_vvSizeScaleStopsValue;\r\n #endif // VV_SIZE_SCALE_STOPS\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n float h \x3d getVVStopsSize(a_vv.x);\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n float h \x3d getVVUnitValue(a_vv.x);\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n // make sure to preserve the aspect ratio of the symbol\r\n vec2 size \x3d vec2(h * a_size.x / a_size.y, h);\r\n vec2 offset \x3d C_OFFSET_PRECISION * a_offset * size;\r\n v_size \x3d size;\r\n #else\r\n #ifdef HEATMAP\r\n // reconstruct the kernel size\r\n a_size \x3d 9.0 * a_size + 1.0;\r\n #endif // HEATMAP\r\n\r\n vec2 offset \x3d C_OFFSET_PRECISION * a_offset * a_size;\r\n v_size \x3d a_size;\r\n #endif // defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n #ifdef SDF\r\n offset *\x3d 2.0;\r\n #endif // SDF\r\n\r\n #ifdef VV_ROTATION\r\n gl_Position \x3d vec4(u_normalized_origin, depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * getVVRotation(a_vv.w) * vec4(offset, delta_z, 0.0);\r\n #else\r\n gl_Position \x3d vec4(u_normalized_origin, depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * vec4(offset, delta_z, 0.0);\r\n #endif // VV_ROTATION\r\n\r\n #ifdef VV_OPACITY\r\n v_transparency \x3d getVVOpacity(a_vv.z);\r\n #else\r\n v_transparency \x3d u_opacity;\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n v_color \x3d getVVColor(a_vv.y);\r\n #else\r\n v_color \x3d a_color;\r\n #endif // VV_COLOR\r\n\r\n // output the texture coordinates and the transparency\r\n v_tex \x3d a_tex / u_mosaicSize;\r\n\r\n #ifdef SDF\r\n v_outlineColor \x3d a_outlineColor;\r\n v_outlineWidth \x3d a_sizeAndOutlineWidth.z;\r\n #endif // SDF\r\n\r\n #ifdef ID\r\n v_id \x3d a_id;\r\n #endif // ID\r\n\r\n #ifdef HEATMAP\r\n v_heatmapWeight \x3d a_heatmapWeight;\r\n #endif // HEATMAP\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"iconFS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n uniform lowp sampler2D u_texture;\r\n\r\n varying lowp vec2 v_tex;\r\n varying lowp float v_transparency;\r\n varying mediump vec2 v_size;\r\n varying lowp vec4 v_color;\r\n\r\n #ifdef SDF\r\n varying lowp vec4 v_outlineColor;\r\n varying mediump float v_outlineWidth;\r\n\r\n // we need the conversion function from RGBA to float\r\n $rgba2floatFunc\r\n #endif // SDF\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n #ifdef HEATMAP\r\n varying mediump float v_heatmapWeight;\r\n #endif // HEATMAP\r\n\r\n const float softEdgeRatio \x3d 1.0; // use blur here if needed\r\n\r\n void main()\r\n {\r\n #ifdef SDF\r\n lowp vec4 fillPixelColor \x3d v_color;\r\n\r\n // calculate the distance from the edge [-0.5, 0.5]\r\n float d \x3d 0.5 - rgba2float(texture2D(u_texture, v_tex));\r\n\r\n // Work around loss of precision for \'d \x3d 0.0\'.\r\n // \'0\' gets normalised to 0.5 * 256 \x3d 128 before float packing, but can only\r\n // be stored in the texture as 128 / 255 \x3d 0.502.\r\n // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/7058#issuecomment-603110\r\n const float diff \x3d (128.0/255.0 - 0.5);\r\n\r\n // adjust all values, not just those close to 0, to avoid discontinuities in\r\n // the outlines of other shapes e.g. circles\r\n d \x3d d - diff;\r\n\r\n // the soft edge ratio is about 1.5 pixels allocated for the soft edge.\r\n float size \x3d max(v_size.x, v_size.y);\r\n float dist \x3d d * size * softEdgeRatio;\r\n\r\n // set the fragment\'s transparency according to the distance from the edge\r\n fillPixelColor *\x3d clamp(0.5 - dist, 0.0, 1.0);\r\n\r\n // count for the outline\r\n // therefore tint the entire icon area.\r\n if (v_outlineWidth \x3e 0.25) {\r\n lowp vec4 outlinePixelColor \x3d v_outlineColor;\r\n\r\n // outlines can\'t be larger than the size of the symbol\r\n float clampedOutlineSize \x3d min(v_outlineWidth, size);\r\n\r\n outlinePixelColor *\x3d clamp(0.5 - abs(dist) + clampedOutlineSize * 0.5, 0.0, 1.0);\r\n\r\n // finally combine the outline and the fill colors (outline draws on top of fill)\r\n gl_FragColor \x3d v_transparency * ((1.0 - outlinePixelColor.a) * fillPixelColor + outlinePixelColor);\r\n }\r\n else {\r\n gl_FragColor \x3d v_transparency * fillPixelColor;\r\n }\r\n #else // not an SDF\r\n lowp vec4 texColor \x3d texture2D(u_texture, v_tex);\r\n\r\n #ifdef HEATMAP\r\n texColor.r *\x3d v_heatmapWeight;\r\n #endif // HEATMAP\r\n\r\n gl_FragColor \x3d v_transparency * texColor;\r\n #endif // SDF\r\n\r\n #ifdef HIGHLIGHT\r\n gl_FragColor.a \x3d step(1.0 / 255.0, gl_FragColor.a);\r\n #endif // HIGHLIGHT\r\n\r\n #ifdef ID\r\n if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n discard;\r\n }\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n\r\n',
  1085. "url:esri/views/2d/engine/webgl/shaders/lineShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n // YF TODO: (doc)\r\n--\x3e\r\n\x3csnippets\x3e\r\n \x3csnippet name\x3d"thinLineParams"\x3e\r\n \x3c![CDATA[\r\n float thinLineHalfWidth \x3d 1.0; // meaning that a 2 pixels line width is considered a thin line\r\n float thinLineWidthFactor \x3d 1.1;\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR) || defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE) || defined(VV_OPACITY)\r\n attribute vec3 a_vv;\r\n #endif // VV_COLOR || VV_SIZE_MIN_MAX_VALUE || VV_SIZE_SCALE_STOPS || VV_SIZE_FIELD_STOPS || VV_SIZE_UNIT_VALUE || VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n uniform vec4 u_vvSizeMinMaxValue;\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n uniform float u_vvSizeScaleStopsValue;\r\n #endif\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n uniform float u_vvSizeFieldStopsValues[6];\r\n uniform float u_vvSizeFieldStopsSizes[6];\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n uniform float u_vvSizeUnitValueWorldToPixelsRatio;\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n float getVVMinMaxSize(float sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeMinMaxValue.x) / (u_vvSizeMinMaxValue.y - u_vvSizeMinMaxValue.x);\r\n return clamp(mix(u_vvSizeMinMaxValue.z, u_vvSizeMinMaxValue.w, f), u_vvSizeMinMaxValue.z, u_vvSizeMinMaxValue.w);\r\n }\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n const int VV_SIZE_N \x3d 6;\r\n float getVVStopsSize(float sizeValue) {\r\n if (sizeValue \x3c\x3d u_vvSizeFieldStopsValues[0]) {\r\n return u_vvSizeFieldStopsSizes[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_SIZE_N; ++i) {\r\n if (u_vvSizeFieldStopsValues[i] \x3e\x3d sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeFieldStopsValues[i-1]) / (u_vvSizeFieldStopsValues[i] - u_vvSizeFieldStopsValues[i-1]);\r\n return mix(u_vvSizeFieldStopsSizes[i-1], u_vvSizeFieldStopsSizes[i], f);\r\n }\r\n }\r\n\r\n return u_vvSizeFieldStopsSizes[VV_SIZE_N - 1];\r\n }\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n float getVVUnitValue(float sizeValue) {\r\n return u_vvSizeUnitValueWorldToPixelsRatio * sizeValue;\r\n }\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n attribute vec2 a_pos;\r\n attribute vec4 a_id;\r\n attribute vec4 a_color;\r\n attribute vec4 a_offsetAndNormal;\r\n attribute vec2 a_accumulatedDistanceAndHalfWidth;\r\n attribute vec4 a_tlbr;\r\n attribute vec4 a_segmentDirection;\r\n\r\n // the relative transformation of a vertex given in tile coordinates to a relative normalized coordinate\r\n // relative to the tile\'s upper left corner\r\n // the extrusion vector.\r\n uniform highp mat4 u_transformMatrix;\r\n // the extrude matrix which is responsible for the \'anti-zoom\' as well as the rotation\r\n uniform highp mat4 u_extrudeMatrix;\r\n // u_normalized_origin is the tile\'s upper left corner given in normalized coordinates\r\n uniform highp vec2 u_normalized_origin;\r\n uniform lowp float u_opacity; // the layer\'s opacity\r\n uniform mediump float u_zoomFactor;\r\n uniform mediump float u_antialiasing;\r\n\r\n // the interpolated normal to the line. the information is packed into the two LSBs of the vertex coordinate\r\n varying mediump vec2 v_normal;\r\n varying mediump float v_lineHalfWidth;\r\n varying lowp vec4 v_color;\r\n varying lowp float v_transparency;\r\n\r\n const float scale \x3d 1.0 / 31.0;\r\n#ifdef SDF\r\n const float widthFactor \x3d 2.0;\r\n#else\r\n const float widthFactor \x3d 1.0;\r\n#endif\r\n\r\n\r\n#ifdef PATTERN\r\n uniform mediump vec2 u_mosaicSize;\r\n\r\n varying mediump vec4 v_tlbr; // normalized pattern coordinates [0, 1]\r\n varying mediump vec2 v_patternSize;\r\n#endif // PATTERN\r\n\r\n// we need to accumulated distance only if it is a pattern or an SDF line\r\n#if defined(PATTERN) || defined(SDF)\r\n varying highp float v_accumulatedDistance;\r\n#endif // PATTERN SDF\r\n\r\n#ifdef ID\r\n varying highp vec4 v_id;\r\n#endif // ID\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $lineVVUniformsVS\r\n $lineVVFunctions\r\n\r\n void main()\r\n {\r\n // size VV block\r\n#if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n#ifdef VV_SIZE_MIN_MAX_VALUE\r\n mediump float lineHalfWidth \x3d 0.5 * getVVMinMaxSize(a_vv.x);\r\n#endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n#ifdef VV_SIZE_SCALE_STOPS\r\n mediump float lineHalfWidth \x3d 0.5 * u_vvSizeScaleStopsValue;\r\n#endif // VV_SIZE_SCALE_STOPS\r\n\r\n#ifdef VV_SIZE_FIELD_STOPS\r\n mediump float lineHalfWidth \x3d 0.5 * getVVStopsSize(a_vv.x);\r\n#endif // VV_SIZE_FIELD_STOPS\r\n\r\n#ifdef VV_SIZE_UNIT_VALUE\r\n mediump float lineHalfWidth \x3d 0.5 * getVVUnitValue(a_vv.x);\r\n#endif // VV_SIZE_UNIT_VALUE\r\n\r\n#else // no VV\r\n mediump float lineHalfWidth \x3d a_accumulatedDistanceAndHalfWidth.y * scale;\r\n#endif // defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n#ifdef VV_OPACITY\r\n v_transparency \x3d u_opacity * getVVOpacity(a_vv.z);\r\n#else\r\n v_transparency \x3d u_opacity;\r\n#endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n v_color \x3d getVVColor(a_vv.y);\r\n#else\r\n v_color \x3d a_color;\r\n#endif // VV_COLOR\r\n\r\n // make sure to clip the vertices in case that the width of the line is 0 (or negative)\r\n float z \x3d 2.0 * step(lineHalfWidth, 0.0);\r\n\r\n // add an antialiasing distance. We use 0.2 rather than 0.5 in order to match the SVG renderer\r\n // also limit the total line width to 1.3 pixels. Below this value lines don\'t look good compared to the SVG renderer\r\n lineHalfWidth \x3d max(lineHalfWidth, 0.45) + 0.2 * u_antialiasing;\r\n\r\n // include the thin line parameters (thinLineHalfWidth and thinLineWidthFactor)\r\n $thinLineParams\r\n // for now assume that a thin line is a line which is under 2 pixels (1 pixels on either sides of the centerline)\r\n // in practice, a thin line is a line who\'s half width vary from 0.45px to the value of thinLineHalfWidth, as the value\r\n // is claped in line 221 above\r\n mediump float thinLineFactor \x3d max(thinLineWidthFactor * step(lineHalfWidth, thinLineHalfWidth), 1.0);\r\n\r\n v_lineHalfWidth \x3d lineHalfWidth;\r\n\r\n // calculate the relative distance from the centerline to the edge of the line. Since offset is given in integers (for the\r\n // sake of using less attribute memory, we need to scale it back to the original range of ~ [0, 1])\r\n // in a case of a thin line we move each vertex twice as far\r\n mediump vec2 dist \x3d thinLineFactor * widthFactor * lineHalfWidth * a_offsetAndNormal.xy * scale;\r\n\r\n // transform the vertex\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(a_pos, z, 1.0) + u_extrudeMatrix * vec4(dist, 0.0, 0.0);\r\n v_normal \x3d a_offsetAndNormal.zw * scale;\r\n\r\n#if defined(PATTERN) || defined(SDF)\r\n v_accumulatedDistance \x3d a_accumulatedDistanceAndHalfWidth.x + dot(scale * a_segmentDirection.xy, dist / u_zoomFactor);\r\n#endif // PATTERN || SDF\r\n\r\n#ifdef PATTERN\r\n v_tlbr \x3d vec4(a_tlbr.x / u_mosaicSize.x, a_tlbr.y / u_mosaicSize.y, a_tlbr.z / u_mosaicSize.x, a_tlbr.w / u_mosaicSize.y);\r\n v_patternSize \x3d vec2(a_tlbr.z - a_tlbr.x, a_tlbr.w - a_tlbr.y);\r\n#endif // PATTERN\r\n\r\n#ifdef ID\r\n v_id \x3d a_id;\r\n#endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineFS"\x3e\r\n \x3c![CDATA[\r\n precision lowp float;\r\n\r\n uniform lowp float u_blur;\r\n uniform mediump float u_antialiasing;\r\n\r\n varying mediump vec2 v_normal;\r\n varying mediump float v_lineHalfWidth;\r\n varying lowp vec4 v_color;\r\n varying lowp float v_transparency;\r\n\r\n#if defined(PATTERN) || defined(SDF)\r\n uniform sampler2D u_texture;\r\n uniform mediump float u_zoomFactor;\r\n\r\n varying mediump vec4 v_tlbr; // normalized pattern coordinates [0, 1]\r\n varying mediump vec2 v_patternSize;\r\n varying highp float v_accumulatedDistance;\r\n#endif // PATTERN SDF\r\n\r\n#ifdef SDF\r\n const float sdfPatternHalfWidth \x3d 15.5; // YF: assumed that the width will be set to 31\r\n const float widthFactor \x3d 2.0;\r\n\r\n float rgba2float(vec4 rgba) {\r\n return dot(rgba, vec4(1.0/16777216.0, 1.0/65535.0, 1.0/256.0, 1.0));\r\n }\r\n#endif // SDF\r\n\r\n#ifdef ID\r\n varying highp vec4 v_id;\r\n#endif // ID\r\n\r\n void main()\r\n {\r\n // include the thin line parameters (thinLineHalfWidth and thinLineWidthFactor)\r\n $thinLineParams\r\n\r\n // for now assume that a thin line is a line which is under 2 pixels (1 pixels on either sides of the centerline)\r\n mediump float thinLineFactor \x3d max(thinLineWidthFactor * step(v_lineHalfWidth, thinLineHalfWidth), 1.0);\r\n\r\n // dist represent the distance of the fragment from the line. 1.0 or -1.0 will be the values on the edge of the line,\r\n // and any value in between will be inside the line (the sign represent the direction - right or left).\r\n // since u_linewidth.s (half line width) is represented in pixels, dist is also given in pixels\r\n mediump float fragDist \x3d length(v_normal) * v_lineHalfWidth;\r\n\r\n // calculate the alpha given the difference between the line-width and the distance of the fragment from the center-line.\r\n // when it is a thin line then use a slightly shallower slope in order to add more feathering\r\n lowp float alpha \x3d clamp(thinLineFactor * (v_lineHalfWidth - fragDist) / (u_blur + thinLineFactor - 1.0), 0.0, 1.0);\r\n\r\n#if defined(SDF)\r\n mediump float lineHalfWidth \x3d widthFactor * v_lineHalfWidth;\r\n mediump float lineWidthRatio \x3d lineHalfWidth / sdfPatternHalfWidth;\r\n mediump float relativeTexX \x3d mod((u_zoomFactor * v_accumulatedDistance + v_normal.x * lineHalfWidth) / (lineWidthRatio * v_patternSize.x), 1.0);\r\n mediump float relativeTexY \x3d 0.5 + 0.5 * v_normal.y;\r\n\r\n // claculate the actual texture coordinates by interpolating between the TL/BR pattern coordinates\r\n mediump vec2 texCoord \x3d mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\r\n\r\n // calculate the distance from the edge [-0.5, 0.5]\r\n mediump float d \x3d rgba2float(texture2D(u_texture, texCoord)) - 0.5;\r\n\r\n // the distance is a proportional to the line width\r\n float dist \x3d d * lineHalfWidth;\r\n\r\n lowp vec4 fillPixelColor \x3d v_transparency * alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\r\n gl_FragColor \x3d fillPixelColor;\r\n#elif defined(PATTERN)\r\n // we need to calculate the relative portion of the line texture along the line given the accumulated distance along the line\r\n // The computed value should is anumber btween 0 and 1 which will later be used to interpolate btween the BR and TL values\r\n mediump float relativeTexX \x3d mod((u_zoomFactor * v_accumulatedDistance + v_normal.x * v_lineHalfWidth) / v_patternSize.x, 1.0);\r\n\r\n // in order to calculate the texture coordinates prependicular to the line (Y axis), we use the interpolated normal values\r\n // which range from -1.0 to 1.0. On the line\'s centerline, the value of the interpolated normal is 0.0, however the relative\r\n // texture value shpould be 0.5 (given that at the bottom of the line, the texture coordinate must be equal to 0.0)\r\n // (TL) --------------------------- --\x3e left edge of line. Interpolatedf normal is 1.0\r\n // | -\x3e line-width / 2\r\n // - - - - - - - - - - - - - -\r\n // | -\x3e line-width / 2\r\n // ---------------------------- (BR)--\x3e right edge of line. Interpolatedf normal is -1.0\r\n\r\n mediump float relativeTexY \x3d 0.5 + (v_normal.y * v_lineHalfWidth / v_patternSize.y);\r\n\r\n // claculate the actual texture coordinates by interpolating between the TL/BR pattern coordinates\r\n mediump vec2 texCoord \x3d mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\r\n\r\n // get the color from the texture\r\n lowp vec4 color \x3d texture2D(u_texture, texCoord);\r\n\r\n gl_FragColor \x3d v_transparency * alpha * v_color * color;\r\n#else // solid line (no texture, no pattern)\r\n // output the fragment color\r\n gl_FragColor \x3d v_transparency * alpha * v_color;\r\n#endif // SDF\r\n\r\n#ifdef HIGHLIGHT\r\n gl_FragColor.a \x3d step(1.0 / 255.0, gl_FragColor.a);\r\n#endif // HIGHLIGHT\r\n\r\n #ifdef ID\r\n if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n discard;\r\n }\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n\x3c/snippets\x3e\r\n',
  1086. "url:esri/views/2d/engine/webgl/shaders/textShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n Add your GLSL snippets to this file. You should start from\r\n importing your old GLSL files. For instance, if you have a\r\n file such as myShader.vs.glsl you should create a new \x3csnippet name\x3d"myShaderVS"\x3e\r\n and then copy and paste the GLSL source as the content. You will then convert your\r\n code to use the {@link esri/views/2d/engine/webgl/glShaderSnippets glShaderSnippets}\r\n instance to access the GLSL code, instead of importing it directly with require("dojo/text!...").\r\n--\x3e\r\n\x3csnippets\x3e\r\n\r\n\x3csnippet name\x3d"textVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR) || defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE) || defined(VV_OPACITY) || defined(VV_ROTATION)\r\n attribute vec4 a_vv;\r\n #endif // VV_COLOR || VV_SIZE_MIN_MAX_VALUE || VV_SIZE_SCALE_STOPS || VV_SIZE_FIELD_STOPS || VV_SIZE_UNIT_VALUE || VV_OPACITY || VV_ROTATION\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n uniform vec4 u_vvSizeMinMaxValue;\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n uniform float u_vvSizeScaleStopsValue;\r\n #endif // VV_SIZE_SCALE_STOPS\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n uniform float u_vvSizeFieldStopsValues[6];\r\n uniform float u_vvSizeFieldStopsSizes[6];\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n uniform float u_vvSizeUnitValueWorldToPixelsRatio;\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_ROTATION\r\n uniform lowp float u_vvRotationType;\r\n #endif // VV_ROTATION\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"textVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n float getVVMinMaxSize(float sizeValue) {\r\n // we need to multiply by 8 in order to translate to tile coordinates\r\n float interpolationRatio \x3d (sizeValue - u_vvSizeMinMaxValue.x) / (u_vvSizeMinMaxValue.y - u_vvSizeMinMaxValue.x);\r\n return clamp(u_vvSizeMinMaxValue.z + interpolationRatio * (u_vvSizeMinMaxValue.w - u_vvSizeMinMaxValue.z), u_vvSizeMinMaxValue.z, u_vvSizeMinMaxValue.w);\r\n }\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n const int VV_SIZE_N \x3d 6;\r\n float getVVStopsSize(float sizeValue) {\r\n if (sizeValue \x3c\x3d u_vvSizeFieldStopsValues[0]) {\r\n return u_vvSizeFieldStopsSizes[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_SIZE_N; ++i) {\r\n if (u_vvSizeFieldStopsValues[i] \x3e\x3d sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeFieldStopsValues[i-1]) / (u_vvSizeFieldStopsValues[i] - u_vvSizeFieldStopsValues[i-1]);\r\n return mix(u_vvSizeFieldStopsSizes[i-1], u_vvSizeFieldStopsSizes[i], f);\r\n }\r\n }\r\n\r\n return u_vvSizeFieldStopsSizes[VV_SIZE_N - 1];\r\n }\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n float getVVUnitValue(float sizeValue) {\r\n return u_vvSizeUnitValueWorldToPixelsRatio * sizeValue;\r\n }\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_ROTATION\r\n mat4 getVVRotation(float rotationValue) {\r\n // YF TODO: if the symbol has rotation we need to combine the symbo\'s rotation with the VV one\r\n\r\n float rotation \x3d rotationValue;\r\n if (u_vvRotationType \x3d\x3d 1.0) {\r\n rotation \x3d 90.0 - rotation;\r\n }\r\n\r\n float angle \x3d C_DEG_TO_RAD * rotation;\r\n\r\n float sinA \x3d sin(angle);\r\n float cosA \x3d cos(angle);\r\n\r\n return mat4(cosA, sinA, 0, 0,\r\n -sinA, cosA, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1);\r\n }\r\n #endif // VV_ROTATION\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"textVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n const float C_DEG_TO_RAD \x3d 3.14159265359 / 180.0;\r\n\r\n attribute vec2 a_pos; // 2 * 2 (2 x signed 16)\r\n attribute vec4 a_id; // 4 (4 x unsigned byte)\r\n attribute vec4 a_color; // 4 (4 x unsigned byte)\r\n attribute vec2 a_vertexOffset; // 2 * 2 // (2 x signed 16) offset from the anchor point of the string\r\n attribute vec4 a_texFontSize; // 4 (4 x unsigned byte) texture coordinatesm and font size\r\n\r\n attribute lowp float a_visible; // a one byte controlling the visibility of the vertex (a separate visibility buffer), values are 0 or 1 (visible)\r\n\r\n // the relative transformation of a vertex given in tile coordinates to a relative normalized coordinate\r\n // relative to the tile\'s upper left corner\r\n // the extrusion vector.\r\n uniform highp mat4 u_transformMatrix;\r\n // the extrude matrix which is responsible for the \'anti-zoom\' as well as the rotation\r\n uniform highp mat4 u_extrudeMatrix;\r\n // u_normalized_origin is the tile\'s upper left corner given in normalized coordinates\r\n uniform highp vec2 u_normalized_origin;\r\n // the size of the mosaic given in pixels\r\n uniform vec2 u_mosaicSize;\r\n uniform float u_pixelRatio;\r\n\r\n // the opacity of the layer\r\n uniform mediump float u_opacity;\r\n\r\n varying mediump vec4 v_color;\r\n varying mediump float v_antialiasingWidth;\r\n varying mediump float v_edgeDistanceOffset;\r\n\r\n // the interpolated texture coordinate value to be used by the fragment shader in order to sample the sprite texture\r\n varying mediump vec2 v_tex;\r\n // the calculated transparency to be applied by the fragment shader. It is incorporating both the fade as well as the\r\n // opacity of the layer given by the painter\r\n varying lowp float v_transparency;\r\n\r\n // the vertex offsets are given in integers, therefore in order to maintain a reasonable precission we multiply the values\r\n // by 16 and then at the shader devide by the same number\r\n const float offsetPrecision \x3d 1.0 / 32.0;\r\n const float outlineScale \x3d 1.0 / 10.0;\r\n const float sdfFontSize \x3d 24.0;\r\n\r\n // maximum SDF distance of 8 pixels represent the distance values that range from -2 inside the geometry to 6 on the outside.\r\n // 6 is actually the maximum distance outside the glyph, therefore it is the limitation of the halo which is 1/4 of the geometry size.\r\n const float maxSdfDistance \x3d 8.0;\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $textVVUniformsVS\r\n $textVVFunctions\r\n\r\n void main()\r\n {\r\n // make sure to clip the vertices in case that given record is marked as invisible\r\n float z \x3d 2.0 * (1.0 - a_visible);\r\n\r\n // we use the list significant bit of the position in order to store the indication whethe the vertex is of a halow of a glyph\r\n mediump float halo \x3d mod(a_pos, 2.0).x;\r\n\r\n #if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n // vv size override the original symbol\'s size\r\n vec2 size \x3d vec2(getVVMinMaxSize(a_vv.x));\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n vec2 size \x3d vec2(u_vvSizeScaleStopsValue);\r\n #endif // VV_SIZE_SCALE_STOPS\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n vec2 size \x3d vec2(getVVStopsSize(a_vv.x));\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n vec2 size \x3d vec2(getVVUnitValue(a_vv.x));\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n float fontSize \x3d size.x;\r\n #else // this generic case, no VV\r\n float fontSize \x3d a_texFontSize.z;\r\n #endif // defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n float fontScale \x3d fontSize / sdfFontSize;\r\n // we need to scale the extrude matrix by the font-scale in order to get the right text size\r\n mat4 extrudeMatrix \x3d fontScale * u_extrudeMatrix;\r\n\r\n // If the label rotates with the map, and if the rotated label is upside down, hide it\r\n //gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(floor(a_pos * 0.5), z, 1.0) + extrudeMatrix * vec4(offsetPrecision * a_vertexOffset, 0.0, 0.0);\r\n\r\n #ifdef VV_ROTATION\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(floor(a_pos * 0.5), z, 1.0) + extrudeMatrix * getVVRotation(a_vv.w) * vec4(offsetPrecision * a_vertexOffset, 0.0, 0.0);\r\n #else\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(floor(a_pos * 0.5), z, 1.0) + extrudeMatrix * vec4(offsetPrecision * a_vertexOffset, 0.0, 0.0);\r\n #endif // VV_ROTATION\r\n\r\n v_tex \x3d a_texFontSize.xy / u_mosaicSize;\r\n v_antialiasingWidth \x3d 0.105 * sdfFontSize / fontSize / u_pixelRatio;\r\n // if halo.x is zero (not a halo) v_edgeDistanceOffset will end up being zero as well.\r\n v_edgeDistanceOffset \x3d halo * outlineScale * a_texFontSize.w / fontScale / maxSdfDistance;\r\n\r\n #ifdef VV_OPACITY\r\n v_transparency \x3d getVVOpacity(a_vv.z);\r\n #else\r\n v_transparency \x3d u_opacity;\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n // we don\'t want to override the halo color\r\n v_color \x3d halo * a_color + (1.0 - halo) * getVVColor(a_vv.y);\r\n #else\r\n v_color \x3d a_color;\r\n #endif // VV_COLOR\r\n\r\n #ifdef ID\r\n v_id \x3d a_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"textFS"\x3e\r\n \x3c![CDATA[\r\n precision lowp float;\r\n\r\n uniform lowp sampler2D u_texture;\r\n\r\n varying mediump vec4 v_color;\r\n varying mediump float v_antialiasingWidth;\r\n varying mediump float v_edgeDistanceOffset;\r\n varying mediump vec2 v_tex;\r\n varying lowp float v_transparency;\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n void main()\r\n {\r\n // read the distance from the SDF texture\r\n lowp float dist \x3d texture2D(u_texture, v_tex).a;\r\n\r\n // the edge distance if a factor of the outline width\r\n float glyphEdgeDistance \x3d 0.75 - v_edgeDistanceOffset;\r\n\r\n // use a smooth-step in order to calculate the geometry of the shape given by the distance field\r\n lowp float alpha \x3d smoothstep(glyphEdgeDistance - v_antialiasingWidth, glyphEdgeDistance + v_antialiasingWidth, dist) * v_transparency;\r\n\r\n gl_FragColor \x3d alpha * v_color;\r\n\r\n #ifdef ID\r\n if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n discard;\r\n }\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
  1087. "url:esri/views/2d/engine/webgl/shaders/hlShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n Highlight generation and rendering shaders.\r\n\r\n These shader sources are loaded by hlShaderSnippets.ts which in turn\r\n is used by HighlightRenderer to instantiate the programs needed for\r\n generating and rendering the highlights.\r\n\r\n These shaders are intended to be used with full screen quads.\r\n--\x3e\r\n\x3csnippets\x3e\r\n \x3c!--\r\n Vertex shader: texturedVS\r\n\r\n Identity vertex shader that outputs an untransformed 2-D vertex\r\n and passes its texture coordinates unchanged to the interpolator.\r\n --\x3e\r\n \x3csnippet name\x3d"texturedVS"\x3e\r\n \x3c![CDATA[\r\n // Vertex position.\r\n attribute mediump vec2 a_position;\r\n\r\n // Texture coordinates.\r\n attribute mediump vec2 a_texcoord;\r\n\r\n // Texture coordinates to be interpolated.\r\n varying mediump vec2 v_texcoord;\r\n\r\n void main(void) {\r\n // Pass the position unchanged.\r\n gl_Position \x3d vec4(a_position, 0.0, 1.0);\r\n\r\n // Pass the texture coordinates unchanged.\r\n v_texcoord \x3d a_texcoord;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3c!--\r\n Fragment shader: blurFS\r\n\r\n A gaussian blur shader. It blurs the alpha channel of its input\r\n according to 4 different sigma and stores the results into the\r\n four channel of the target framebuffer.\r\n\r\n It is intended to be called twice; the first time to perform an\r\n horizontal blur, and a second time to perform a vertical blur.\r\n\r\n This shader is used to turn the highlight mask into a highlight\r\n map. The highlight map is an approximation of the signed distance\r\n field of the mask.\r\n --\x3e\r\n \x3csnippet name\x3d"blurFS"\x3e\r\n \x3c![CDATA[\r\n // Interpolated texture coordinates.\r\n varying mediump vec2 v_texcoord;\r\n\r\n // Blur direction information. There are two possible\r\n // configurations that the host code can use.\r\n // - [1, 0, 1/WIDTH, 0] Used when blurring horizontally. In this\r\n // case u_direction[0] \x3d 1 is expressed in pixel and is fed to\r\n // the gauss function to produce the value of the gaussian weight\r\n // for that pixel, while u_direction[2] \x3d 1/WIDTH is in texel units\r\n // and is used to sample the right texel from the texture map.\r\n // - [0, 1, 0, 1/HEIGHT] Used when blurring vertically. In this\r\n // case u_direction[1] \x3d 1 is expressed in pixel and is fed to\r\n // the gauss function to produce the value of the gaussian weight\r\n // for that pixel, while u_direction[3] \x3d 1/HEIGHT is in texel units\r\n // and is used to sample the right texel from the texture map.\r\n uniform mediump vec4 u_direction;\r\n\r\n // Source to destination channel selection matrix.\r\n uniform mediump mat4 u_channelSelector;\r\n\r\n // The highlight map is obtained by blurring the alpha channel of the highlight\r\n // mask accroding to these 4 values of the gaussian\'s sigma parameter.\r\n uniform mediump vec4 u_sigmas;\r\n\r\n // This is the highlight mask if we have not blurred horizontally yet, otherwise\r\n // it is the horizontally blurred highlight map and blurring it one more time\r\n // vertically will complete the process.\r\n uniform sampler2D u_texture;\r\n\r\n // The gaussian kernel. Note that it lacks the normalization constant, because\r\n // we want to store it unnormalized in the highlight map (i.e. having a peak\r\n // value of 1). Note also that we are using the SIMD (single instruction, multiple\r\n // data) capabilities of the GPU to compute four different gaussian kernels, one\r\n // for each sigma.\r\n mediump vec4 gauss(mediump vec2 dir) {\r\n return exp(-dot(dir, dir) / (2.0 * u_sigmas * u_sigmas));\r\n }\r\n\r\n mediump vec4 selectChannel(mediump vec4 sample) {\r\n return u_channelSelector * sample;\r\n }\r\n\r\n // Sample the input texture and accumulated its gaussian weighted value and the\r\n // total weight.\r\n void accumGauss(mediump float i, inout mediump vec4 tot, inout mediump vec4 weight) {\r\n // Computes the gaussian weights, one for each sigma.\r\n // Note that u_direction.xy is [1, 0] when blurring horizontally and [0, 1] when blurring vertically.\r\n mediump vec4 w \x3d gauss(i * u_direction.xy);\r\n\r\n // Accumumates the values.\r\n // Note that u_direction.xy is [1/WIDTH, 0] when blurring horizontally and [0, 1/HEIGHT] when blurring vertically.\r\n tot +\x3d selectChannel(texture2D(u_texture, v_texcoord + i * u_direction.zw)) * w;\r\n\r\n // Accumulates the weights.\r\n weight +\x3d w;\r\n }\r\n\r\n void main(void) {\r\n // Initialize accumulated values and weights to zero.\r\n mediump vec4 tot \x3d vec4(0.0, 0.0, 0.0, 0.0);\r\n mediump vec4 weight \x3d vec4(0.0, 0.0, 0.0, 0.0);\r\n\r\n // Accumulates enough samples. These will be taken\r\n // horizontally or vertically depending on the value\r\n // of u_direction.\r\n accumGauss(-5.0, tot, weight);\r\n accumGauss(-4.0, tot, weight);\r\n accumGauss(-3.0, tot, weight);\r\n accumGauss(-2.0, tot, weight);\r\n accumGauss(-1.0, tot, weight);\r\n accumGauss(0.0, tot, weight);\r\n accumGauss(1.0, tot, weight);\r\n accumGauss(2.0, tot, weight);\r\n accumGauss(3.0, tot, weight);\r\n accumGauss(4.0, tot, weight);\r\n accumGauss(5.0, tot, weight);\r\n\r\n // Compute blurred values.\r\n mediump vec4 rgba \x3d tot / weight;\r\n\r\n // Return the values. Note that each channel will contain\r\n // the result of a different blur operation, one for each\r\n // of the four chosen sigma.\r\n gl_FragColor \x3d vec4(rgba);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3c!--\r\n Fragment shader: highlightFS\r\n\r\n Takes as input the highlight map, estimated the signed distance field,\r\n and shades the fragments according to their estimated distance from the\r\n edge of the highlighted feature.\r\n\r\n A shade texture is used to turn distance values into colors; the shade\r\n texture is basically a color gradient and is recomputed on the host\r\n every time that the user alters the highlight options.\r\n --\x3e\r\n \x3csnippet name\x3d"highlightFS"\x3e\r\n \x3c![CDATA[\r\n // Interpolated texture coordinates.\r\n varying mediump vec2 v_texcoord;\r\n\r\n // The highlight map. Each channel is a blurred\r\n // version of the alpha channel of the highlight mask.\r\n // - Channel 0 (red) corresponds to a gaussian blur with sigma \x3d u_sigmas[0];\r\n // - Channel 1 (green) corresponds to a gaussian blur with sigma \x3d u_sigmas[1];\r\n // - Channel 2 (blue) corresponds to a gaussian blur with sigma \x3d u_sigmas[2];\r\n // - Channel 3 (alpha) corresponds to a gaussian blur with sigma \x3d u_sigmas[3];\r\n // As of today, only channel 3 is used for distance estimation.\r\n // But the availability of different amounts of blur leaves the\r\n // door open to multi-scale approaches.\r\n uniform sampler2D u_texture;\r\n\r\n // The highlight map was obtained by blurring the alpha channel of the highlight\r\n // mask accroding to these 4 values of the gaussian\'s sigma parameter.\r\n uniform mediump vec4 u_sigmas;\r\n\r\n // A 1-D texture used to shade the highlight.\r\n uniform sampler2D u_shade;\r\n\r\n // The 1-D shade texture is spreaded between u_minMaxDistance[0] and u_minMaxDistance[1].\r\n uniform mediump vec2 u_minMaxDistance;\r\n\r\n // Signed distance estimation.\r\n mediump float estimateDistance() {\r\n // Use the largest sigma and the corresponding distance value stored in the\r\n // last channel of the highlight map.\r\n mediump float sigma \x3d u_sigmas[3];\r\n mediump float y \x3d texture2D(u_texture, v_texcoord)[3];\r\n\r\n // Estimates the distance by linearization and local inversion around\r\n // the inflection point. The inflection point is in x \x3d 0.\r\n const mediump float y0 \x3d 0.5; // Value of the convolution at the inflection point.\r\n mediump float m0 \x3d 1.0 / (sqrt(2.0 * 3.1415) * sigma); // Slope of the convolution at the inflection point.\r\n mediump float d \x3d (y - y0) / m0; // Inversion of a local linearization.\r\n\r\n // Return the estimated distance.\r\n return d;\r\n }\r\n\r\n // Shading based on estimated distance.\r\n mediump vec4 shade(mediump float d) {\r\n // Maps the sampled distance from the [A, D] range (see HighlightRenderer::setHighlightOptions) to [0, 1].\r\n mediump float mappedDistance \x3d (d - u_minMaxDistance.x) / (u_minMaxDistance.y - u_minMaxDistance.x);\r\n\r\n // Force to [0, 1]; it should not be necessary because the shade texture uses the CLAMP address mode, so\r\n // this should happen anyway internally to the sampler, but in practice it is needed to avoid weird\r\n // banding artifacts.\r\n // We don\'t really know if we need this or not.\r\n mappedDistance \x3d clamp(mappedDistance, 0.0, 1.0);\r\n\r\n // Sample the 1-D shade texture on its center line (i.e. on t\x3d0.5).\r\n return texture2D(u_shade, vec2(mappedDistance, 0.5));\r\n }\r\n\r\n void main(void) {\r\n // Estimate the distance.\r\n mediump float d \x3d estimateDistance();\r\n\r\n // Shade the distance.\r\n gl_FragColor \x3d shade(d);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
  1088. "*now":function(p){p(['dojo/i18n!*preload*esri/views/nls/MapView*["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}});
  1089. define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/promise/all ../core/Handles ../core/promiseUtils ../core/workers ../core/accessorSupport/decorators ../geometry/ScreenPoint ./BreakpointsOwner ./MapViewBase ./2d/engine/Stage ./2d/input/MapViewInputManager ./2d/layers/support/GraphicsView2D ./2d/navigation/MapViewNavigation ./2d/support/HighlightOptions ./support/screenshotUtils ./ui/2d/DefaultUI2D".split(" "),function(p,g,b,a,e,d,c,k,f,l,h,n,r,m,
  1090. u,q,t,x,v){return function(g){function h(a){a=g.call(this,a)||this;a._graphicsView=null;a._mapViewHandles=new d;a._stage=null;a.highlightOptions=new t;a.inputManager=new m({view:a});a.navigation=null;a.ui=new v;a.rendering=!1;k.initialize();return a}b(h,g);Object.defineProperty(h.prototype,"interacting",{get:function(){return this.navigation&&this.navigation.interacting||!1},enumerable:!0,configurable:!0});h.prototype.hitTest=function(a,b){var d;d=null!=a&&a.x?a:new l({x:a,y:b});if(!this._setup||
  1091. isNaN(d.x)||isNaN(d.y))return c.resolve({screenPoint:d,results:[]});var f=this.toMap(d);a=[this._graphicsView];a.push.apply(a,this.allLayerViews.toArray().reverse());return e(a.map(function(a){return a&&a.hitTest?a.hitTest(d.x,d.y):null})).then(function(a){return{screenPoint:d,results:a.filter(function(a){return null!=a}).map(function(a){return{mapPoint:f,graphic:a}})}})};h.prototype.takeScreenshot=function(a){if(!this._setup)return c.reject("Map view cannot be used before it is ready");a=x.adjustScreenshotSettings(a,
  1092. this);return this._stage.takeScreenshot(a)};h.prototype.on=function(a,b,c){var d=this.inputManager&&this.inputManager.viewEvents.register(a,b,c);return d?d:this.inherited(arguments)};h.prototype.hasEventListener=function(a){return this.inherited(arguments)||this.inputManager&&this.inputManager.viewEvents.hasHandler(a)};h.prototype.destroyLayerViews=function(){this.inherited(arguments);this._stage&&(this._stage.destroy(),this._stage=null)};h.prototype._startup=function(){var a=this;this.inherited(arguments);
  1093. var b=new r(this.surface),c=new u({view:this,graphics:this.graphics}),d=new q({view:this,animationManager:this.animationManager});this._stage=b;this._graphicsView=c;this._set("navigation",d);this._mapViewHandles.add([this.allLayerViews.on("change",function(){return a._updateStageChildren()}),b.on("post-render",function(){return a._set("rendering",a.allLayerViews.some(function(a){return!0===a.rendering}))}),this.watch("stationary",function(a){return b.stationary=a},!0),this.watch("state.viewpoint",
  1094. function(c){return b.state=a.state},!0)]);b.state=this.state;this._updateStageChildren()};h.prototype._tearDown=function(){this._setup&&(this._graphicsView.destroy(),this._mapViewHandles.removeAll(),this._stage.destroy(),this.navigation.destroy(),this._graphicsView=this._stage=null,this._set("navigation",null),this.inherited(arguments))};h.prototype._updateStageChildren=function(){var a=this;this._stage.removeAllChildren();this.allLayerViews.filter(function(a){return null!=a.container}).forEach(function(b,
  1095. c){a._stage.addChildAt(b.container,c)});this._stage.addChild(this._graphicsView.container)};a([f.property({type:t})],h.prototype,"highlightOptions",void 0);a([f.property({readOnly:!0})],h.prototype,"inputManager",void 0);a([f.property({readOnly:!0})],h.prototype,"navigation",void 0);a([f.property({dependsOn:["navigation.interacting"],type:Boolean})],h.prototype,"interacting",null);a([f.property({type:v})],h.prototype,"ui",void 0);a([f.property({readOnly:!0})],h.prototype,"rendering",void 0);return h=
  1096. a([f.subclass("esri.views.MapView")],h)}(f.declared(n,h))});