// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"esri/layers/unitBezier":function(){define([],function(){var b=function(a,c,d,f){function b(a,c){var d,f,b,g;c=null==c?1E-6:c;b=a;for(f=0;8>f;f++){g=((k*b+m)*b+h)*b-a;if(Math.abs(g)<c)return b;d=(3*k*b+2*m)*b+h;if(1E-6>Math.abs(d))break;b-=g/d}d=0;f=1;b=a;if(b<d)return d;if(b>f)return f;for(;d<f;){g=((k*b+m)*b+h)*b;if(Math.abs(g-a)<c)break;a>g?d=b:f=b;b=.5*(f-d)+d}return b}var h=3*a,m=3*(d-a)-h,k=1-h-m,e=3*c,p=3*(f-c)-e,n=1-e-p;return function(a,c){var d=b(a,c);return((n*d+p)*d+e)*
d}},e=/^cubic-bezier\((.*)\)/;b.parse=function(a){var c=b[a]||null;!c&&(a=e.exec(a))&&(a=a[1].split(",").map(function(a){return parseFloat(a.trim())}),4!==a.length||a.some(function(a){return isNaN(a)})||(c=b.apply(b,a)));return c};b.ease=b(.25,.1,.25,1);b.linear=b(0,0,1,1);b.easeIn=b["ease-in"]=b(.42,0,1,1);b.easeOut=b["ease-out"]=b(0,0,.58,1);b.easeInOut=b["ease-in-out"]=b(.42,0,.58,1);return b})},"esri/layers/vectorTiles/request":function(){define(["require","exports","esri/request","dojo/_base/lang"],
function(b,e,a,c){return function(d,f){var b=c.mixin({},{url:d,failOk:!0},f);"array-buffer"===f.responseType?(b.handleAs="arraybuffer",delete b.responseType):f.responseType&&(b.handleAs=f.responseType,delete b.responseType);null!==f.query&&(b.content=b.query,delete b.query);return a(b).then(function(a){return{data:a}})}})},"esri/layers/vectorTiles/core/promiseUtils":function(){define("require exports dojo/Deferred dojo/promise/all dojo/when ./Error".split(" "),function(b,e,a,c,d,f){function g(c){if(c){if("function"!==
typeof c.forEach){var d=Object.keys(c),f=d.map(function(a){return c[a]});return g(f).then(function(a){var c={};d.forEach(function(d,f){return c[d]=a[f]});return c})}var b=new a,h=[],e=c.length;0===e&&b.resolve(h);c.forEach(function(a){var c={promise:a};h.push(c);a.then(function(a){c.value=a}).otherwise(function(a){c.error=a}).then(function(){--e;0===e&&b.resolve(h)})});return b.promise}}Object.defineProperty(e,"__esModule",{value:!0});e.all=function(a){return c(a)};e.filter=function(a,d){var f=a.slice();
return c(a.map(function(a,c){return d(a,c)})).then(function(a){return f.filter(function(c,d){return a[d]})})};e.eachAlways=g;e.create=function(c,f){var b=new a(f);c(function(a){void 0===a&&(a=null);return d(a).then(b.resolve)},b.reject);return b.promise};e.reject=function(c){var d=new a;d.reject(c);return d.promise};e.resolve=function(c){void 0===c&&(c=null);var d=new a;d.resolve(c);return d.promise};e.after=function(c,d){void 0===d&&(d=null);var f=0,b=new a(function(){f&&(clearTimeout(f),f=0)}),
f=setTimeout(function(){b.resolve(d)},c);return b.promise};e.timeout=function(c,d,b){var g=0,h=new a(c.cancel);c.then(function(a){h.isFulfilled()||(h.resolve(a),g&&(clearTimeout(g),g=0))});c.otherwise(function(a){h.isFulfilled()||(h.reject(a),g&&(clearTimeout(g),g=0))});g=setTimeout(function(){var a=b||new f("promiseUtils:timeout","The wrapped promise did not resolve within "+d+" ms");h.reject(a)},d);return h.promise};e.wrapCallback=function(c){var d=!1,f=new a(function(){return d=!0});c(function(a){d||
f.resolve(a)});return f.promise};e.isThenable=function(a){return a&&"function"===typeof a.then};e.when=function(a){return d(a)}})},"esri/layers/vectorTiles/core/Error":function(){define(["require","exports","./tsSupport/extendsHelper","./Message","./lang"],function(b,e,a,c,d){b=function(c){function f(a,d,b){var g=c.call(this,a,d,b)||this;return g instanceof f?g:new f(a,d,b)}a(f,c);f.prototype.toJSON=function(){return{name:this.name,message:this.message,details:d.clone(this.details),dojoType:this.dojoType}};
f.fromJSON=function(a){var c=new f(a.name,a.message,a.details);c.dojoType=a.dojoType;return c};return f}(c);b.prototype.type="error";return b})},"esri/layers/vectorTiles/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return function(e,a){function c(){this.constructor=e}b(e,a);e.prototype=null===a?Object.create(a):
(c.prototype=a.prototype,new c)}}()})},"esri/layers/vectorTiles/core/Message":function(){define(["require","exports","dojo/string"],function(b,e,a){return function(){function c(d,f,b){this instanceof c&&(this.name=d,this.message=f&&a.substitute(f,b,function(a){return null==a?"":a})||"",this.details=b)}c.prototype.toString=function(){return"["+this.name+"]: "+this.message};return c}()})},"esri/layers/vectorTiles/core/lang":function(){define("dojo/_base/array dojo/_base/kernel dojo/_base/lang dojo/date dojo/number dojo/date/locale dojo/i18n!../nls/common".split(" "),
function(b,e,a,c,d,f,g){function h(a){return void 0!==a&&null!==a}function m(a){return h(a)?a:""}function k(g,k,e){var l=e.match(/([^\(]+)(\([^\)]+\))?/i),p=a.trim(l[1]);e=k[g];var l=JSON.parse((l[2]?a.trim(l[2]):"{}").replace(/^\(/,"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z\_]+)\s*:/gi,'$1"$2":').replace(/\"\s*:\s*\'/gi,'":"').replace(/\'\s*(,|\})/gi,'"$1')),u=l.utcOffset;if(-1===b.indexOf(n,p))p=a.getObject(p),a.isFunction(p)&&(e=p(e,g,k,l));else if("number"===typeof e||"string"===typeof e&&
e&&!isNaN(Number(e)))switch(e=Number(e),p){case "NumberFormat":g=a.mixin({},l);k=parseFloat(g.places);if(isNaN(k)||0>k)g.places=Infinity;return d.format(e,g);case "DateString":e=new Date(e);if(l.local||l.systemLocale)return l.systemLocale?e.toLocaleDateString()+(l.hideTime?"":" "+e.toLocaleTimeString()):e.toDateString()+(l.hideTime?"":" "+e.toTimeString());e=e.toUTCString();l.hideTime&&(e=e.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return e;case "DateFormat":return e=new Date(e),h(u)&&(e=c.add(e,
"minute",e.getTimezoneOffset()-u)),f.format(e,l)}return m(e)}function l(a,c){var d;if(c)for(d in a)a.hasOwnProperty(d)&&(void 0===a[d]?delete a[d]:a[d]instanceof Object&&l(a[d],!0));else for(d in a)a.hasOwnProperty(d)&&void 0===a[d]&&delete a[d];return a}function p(c){if(!c||"object"!=typeof c||a.isFunction(c))return c;if("function"===typeof c.clone)c=c.clone();else if("function"===typeof c.map&&"function"===typeof c.forEach)c=c.map(p);else{var d={},f,b,g={};for(f in c){b=c[f];var h=!(f in g)||g[f]!==
b;if(!(f in d)||d[f]!==b&&h)d[f]=p?p(b):b}c=d}return c}var n=["NumberFormat","DateString","DateFormat"],q=/<\/?[^>]+>/g;return{equals:function(c,d){return c===d||"number"===typeof c&&isNaN(c)&&"number"===typeof d&&isNaN(d)||a.isFunction((c||{}).getTime)&&a.isFunction((d||{}).getTime)&&c.getTime()==d.getTime()||a.isFunction((c||{}).equals)&&c.equals(d)||a.isFunction((d||{}).equals)&&d.equals(c)||!1},valueOf:function(a,c){for(var d in a)if(a[d]==c)return d;return null},stripTags:function(a){if(a){var c=
typeof a;if("string"===c)a=a.replace(q,"");else if("object"===c)for(var d in a)(c=a[d])&&"string"===typeof c&&(c=c.replace(q,"")),a[d]=c}return a},substitute:function(c,d,f){var e,l,n;h(f)&&(a.isObject(f)?(e=f.first,l=f.dateFormat,n=f.numberFormat):e=f);if(d&&"{*}"!==d)return a.replace(d,a.hitch({obj:c},function(a,c){var d=c.split(":");return 1<d.length?(c=d[0],d.shift(),k(c,this.obj,d.join(":"))):l&&-1!==b.indexOf(l.properties||"",c)?k(c,this.obj,l.formatter||"DateString"):n&&-1!==b.indexOf(n.properties||
"",c)?k(c,this.obj,n.formatter||"NumberFormat"):m(this.obj[c])}));d=[];var p;d.push('\x3ctable summary\x3d"'+g.fieldsSummary+'"\x3e\x3ctbody\x3e');for(p in c)if(f=c[p],l&&-1!==b.indexOf(l.properties||"",p)?f=k(p,c,l.formatter||"DateString"):n&&-1!==b.indexOf(n.properties||"",p)&&(f=k(p,c,n.formatter||"NumberFormat")),d.push("\x3ctr\x3e\x3cth\x3e"+p+"\x3c/th\x3e\x3ctd\x3e"+m(f)+"\x3c/td\x3e\x3c/tr\x3e"),e)break;d.push("\x3c/tbody\x3e\x3c/table\x3e");return d.join("")},filter:function(c,d,f){d=[a.isString(c)?
c.split(""):c,f||e.global,a.isString(d)?new Function("item","index","array",d):d];f={};var b;c=d[0];for(b in c)d[2].call(d[b],c[b],b,c)&&(f[b]=c[b]);return f},startsWith:function(a,c,d){d=d||0;return a.indexOf(c,d)===d},endsWith:function(a,c,d){if("number"!==typeof d||!isFinite(d)||Math.floor(d)!==d||d>a.length)d=a.length;d-=c.length;a=a.indexOf(c,d);return-1!==a&&a===d},isDefined:h,fixJson:l,clone:p}})},"esri/layers/vectorTiles/core/urlUtils":function(){define(["require","exports","esri/urlUtils",
"dojo/_base/url"],function(b,e,a,c){function d(a){return f(a)||l.test(a)}function f(a){return a&&"/"===a[0]&&"/"===a[1]}function g(a){if("string"===typeof a)return new c(h(a));a.scheme||(a.scheme=e.appUrl.scheme);return a}function h(a,c){void 0===c&&(c=e.appBaseUrl);if(f(a))return"file"===e.appUrl.scheme?"https:"+a:e.appUrl.scheme+":"+a;if(l.test(a))return a;var d=m,b;if("/"===a[0]){b=c;var g=b.indexOf("//"),g=b.indexOf("/",g+2);b=-1===g?b:b.slice(0,g)}else b=c;return d(b,a)}function m(){for(var a=
[],c=0;c<arguments.length;c++)a[c]=arguments[c];if(a&&a.length){c=[];if(d(a[0])){var f=a[0],b=f.indexOf("//");c.push(f.slice(0,b+1));k.test(a[0])&&(c[0]+="/");a[0]=f.slice(b+2)}else"/"===a[0][0]&&c.push("");a=a.reduce(function(a,c){return a.concat(c.split("/"))},[]);for(f=0;f<a.length;f++)b=a[f],".."===b&&0<c.length?c.pop():!b||"."===b&&0!==c.length||c.push(b);return c.join("/")}}Object.defineProperty(e,"__esModule",{value:!0});e.normalize=function(c){return a.normalize(c)};e.canUseXhr=function(c){return a.canUseXhr(c)};
b=Function("return this")();e.appUrl=new c(b.location);e.appBaseUrl=function(){var a=e.appUrl.path,a=a.substring(0,a.lastIndexOf(a.split("/")[a.split("/").length-1]));return""+(e.appUrl.scheme+"://"+e.appUrl.host+(null!=e.appUrl.port?":"+e.appUrl.port:""))+a}();var k=/^\s*file:/i,l=/^\s*[a-z][a-z0-9-+.]*:[^0-9]/i;e.isAbsolute=d;e.urlToObject=function(c){return a.urlToObject(c)};e.getOrigin=function(a){if("data:"===a.slice(0,5))return null;var c=a.indexOf("://");if(-1===c&&f(a))c=2;else if(-1!==c)c+=
3;else return null;c=a.indexOf("/",c);return-1===c?a:a.slice(0,c)};e.makeAbsolute=h;e.hasSameOrigin=function(a,c,d){void 0===d&&(d=!1);a=g(a);c=g(c);return d||a.scheme===c.scheme?a.host.toLowerCase()===c.host.toLowerCase()&&a.port===c.port:!1};e.join=m})},"esri/layers/vectorTiles/geometry/support/spatialReferenceUtils":function(){define(["require","exports","./WKIDUnitConversion"],function(b,e,a){Object.defineProperty(e,"__esModule",{value:!0});e.isGeographic=function(c){return c.wkid?null==a[c.wkid]:
c.wkt?!!/^\s*GEOGCS/i.test(c.wkt):!1};e.getInfo=function(a){return a.wkid?c[a.wkid]:null};b=[-2.0037508342788905E7,2.0037508342788905E7];e=[-2.0037508342787E7,2.0037508342787E7];var c={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',
valid:b,origin:e,dx:1E-5},102100:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:b,origin:e,
dx:1E-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:b,origin:e,dx:1E-5},3857:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
valid:b,origin:e,dx:1E-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',
valid:[-180,180],origin:[-180,180],dx:1E-5}}})},"esri/layers/vectorTiles/geometry/support/WKIDUnitConversion":function(){define([],function(){var b,e={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],units:"Meter Foot Foot_US Foot_Clarke Yard_Clarke Link_Clarke Yard_Sears Foot_Sears Chain_Sears Chain_Benoit_1895_B Yard_Indian Yard_Indian_1937 Foot_Gold_Coast Chain_Sears_1922_Truncated 50_Kilometers 150_Kilometers".split(" "),
2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:13,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,
3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,
3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,
3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,
5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,
6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,
6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,
6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,
6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,
7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,
7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8058:0,8059:0,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,
8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,22391:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25E3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,
26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53034:0,53048:0,53049:0,
54034:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:14,102069:15,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,
103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,
103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,
103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,
103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103695:2};for(b=2E3;2045>=b;b++)e[b]=0;for(b=2056;2065>=b;b++)e[b]=0;for(b=2067;2135>=b;b++)e[b]=0;for(b=2137;2154>=b;b++)e[b]=0;for(b=2161;2170>=b;b++)e[b]=0;for(b=2172;2193>=b;b++)e[b]=0;for(b=2195;2198>=b;b++)e[b]=0;for(b=2200;2203>=b;b++)e[b]=0;for(b=2205;2217>=b;b++)e[b]=0;for(b=2222;2224>=b;b++)e[b]=1;for(b=2225;2250>=b;b++)e[b]=2;
for(b=2251;2253>=b;b++)e[b]=1;for(b=2257;2264>=b;b++)e[b]=2;for(b=2274;2279>=b;b++)e[b]=2;for(b=2280;2282>=b;b++)e[b]=1;for(b=2283;2289>=b;b++)e[b]=2;for(b=2290;2292>=b;b++)e[b]=0;for(b=2308;2313>=b;b++)e[b]=0;for(b=2315;2491>=b;b++)e[b]=0;for(b=2494;2866>=b;b++)e[b]=0;for(b=2867;2869>=b;b++)e[b]=1;for(b=2870;2888>=b;b++)e[b]=2;for(b=2891;2895>=b;b++)e[b]=2;for(b=2896;2898>=b;b++)e[b]=1;for(b=2902;2908>=b;b++)e[b]=2;for(b=2915;2920>=b;b++)e[b]=2;for(b=2921;2923>=b;b++)e[b]=1;for(b=2924;2930>=b;b++)e[b]=
2;for(b=2931;2962>=b;b++)e[b]=0;for(b=2964;2968>=b;b++)e[b]=2;for(b=2969;2973>=b;b++)e[b]=0;for(b=2975;2991>=b;b++)e[b]=0;for(b=2995;3051>=b;b++)e[b]=0;for(b=3054;3079>=b;b++)e[b]=0;for(b=3081;3088>=b;b++)e[b]=0;for(b=3092;3101>=b;b++)e[b]=0;for(b=3106;3138>=b;b++)e[b]=0;for(b=3146;3151>=b;b++)e[b]=0;for(b=3153;3166>=b;b++)e[b]=0;for(b=3168;3172>=b;b++)e[b]=0;for(b=3174;3203>=b;b++)e[b]=0;for(b=3294;3358>=b;b++)e[b]=0;for(b=3367;3403>=b;b++)e[b]=0;for(b=3408;3416>=b;b++)e[b]=0;for(b=3417;3438>=b;b++)e[b]=
2;for(b=3441;3446>=b;b++)e[b]=2;for(b=3447;3450>=b;b++)e[b]=0;for(b=3451;3459>=b;b++)e[b]=2;for(b=3460;3478>=b;b++)e[b]=0;for(b=3554;3559>=b;b++)e[b]=0;for(b=3560;3570>=b;b++)e[b]=2;for(b=3571;3581>=b;b++)e[b]=0;for(b=3594;3597>=b;b++)e[b]=0;for(b=3601;3604>=b;b++)e[b]=0;for(b=3637;3639>=b;b++)e[b]=0;for(b=3665;3667>=b;b++)e[b]=0;for(b=3693;3695>=b;b++)e[b]=0;for(b=3701;3727>=b;b++)e[b]=0;for(b=3728;3739>=b;b++)e[b]=2;for(b=3740;3751>=b;b++)e[b]=0;for(b=3753;3760>=b;b++)e[b]=2;for(b=3761;3773>=b;b++)e[b]=
0;for(b=3775;3777>=b;b++)e[b]=0;for(b=3779;3781>=b;b++)e[b]=0;for(b=3783;3785>=b;b++)e[b]=0;for(b=3788;3791>=b;b++)e[b]=0;for(b=3797;3802>=b;b++)e[b]=0;for(b=3814;3816>=b;b++)e[b]=0;for(b=3825;3829>=b;b++)e[b]=0;for(b=3832;3841>=b;b++)e[b]=0;for(b=3844;3852>=b;b++)e[b]=0;for(b=3873;3885>=b;b++)e[b]=0;for(b=3890;3893>=b;b++)e[b]=0;for(b=3907;3912>=b;b++)e[b]=0;for(b=3942;3950>=b;b++)e[b]=0;for(b=3968;3970>=b;b++)e[b]=0;for(b=3973;3976>=b;b++)e[b]=0;for(b=3986;3989>=b;b++)e[b]=0;for(b=3994;3997>=b;b++)e[b]=
0;for(b=4048;4051>=b;b++)e[b]=0;for(b=4056;4063>=b;b++)e[b]=0;for(b=4093;4096>=b;b++)e[b]=0;for(b=4390;4398>=b;b++)e[b]=0;for(b=4399;4413>=b;b++)e[b]=2;for(b=4418;4433>=b;b++)e[b]=2;for(b=4455;4457>=b;b++)e[b]=2;for(b=4484;4489>=b;b++)e[b]=0;for(b=4491;4554>=b;b++)e[b]=0;for(b=4568;4589>=b;b++)e[b]=0;for(b=4652;4656>=b;b++)e[b]=0;for(b=4766;4800>=b;b++)e[b]=0;for(b=5014;5016>=b;b++)e[b]=0;for(b=5069;5072>=b;b++)e[b]=0;for(b=5105;5130>=b;b++)e[b]=0;for(b=5173;5188>=b;b++)e[b]=0;for(b=5253;5259>=b;b++)e[b]=
0;for(b=5269;5275>=b;b++)e[b]=0;for(b=5292;5311>=b;b++)e[b]=0;for(b=5329;5331>=b;b++)e[b]=0;for(b=5343;5349>=b;b++)e[b]=0;for(b=5355;5357>=b;b++)e[b]=0;for(b=5387;5389>=b;b++)e[b]=0;for(b=5459;5463>=b;b++)e[b]=0;for(b=5479;5482>=b;b++)e[b]=0;for(b=5518;5520>=b;b++)e[b]=0;for(b=5530;5539>=b;b++)e[b]=0;for(b=5550;5552>=b;b++)e[b]=0;for(b=5562;5583>=b;b++)e[b]=0;for(b=5623;5625>=b;b++)e[b]=2;for(b=5631;5639>=b;b++)e[b]=0;for(b=5649;5653>=b;b++)e[b]=0;for(b=5663;5680>=b;b++)e[b]=0;for(b=5682;5685>=b;b++)e[b]=
0;for(b=5875;5877>=b;b++)e[b]=0;for(b=5921;5940>=b;b++)e[b]=0;for(b=6050;6125>=b;b++)e[b]=0;for(b=6244;6275>=b;b++)e[b]=0;for(b=6328;6348>=b;b++)e[b]=0;for(b=6350;6356>=b;b++)e[b]=0;for(b=6366;6372>=b;b++)e[b]=0;for(b=6381;6387>=b;b++)e[b]=0;for(b=6393;6404>=b;b++)e[b]=0;for(b=6480;6483>=b;b++)e[b]=0;for(b=6511;6514>=b;b++)e[b]=0;for(b=6579;6581>=b;b++)e[b]=0;for(b=6619;6624>=b;b++)e[b]=0;for(b=6625;6627>=b;b++)e[b]=2;for(b=6628;6632>=b;b++)e[b]=0;for(b=6634;6637>=b;b++)e[b]=0;for(b=6669;6692>=b;b++)e[b]=
0;for(b=6707;6709>=b;b++)e[b]=0;for(b=6720;6723>=b;b++)e[b]=0;for(b=6732;6738>=b;b++)e[b]=0;for(b=6931;6933>=b;b++)e[b]=0;for(b=6956;6959>=b;b++)e[b]=0;for(b=7005;7007>=b;b++)e[b]=0;for(b=7057;7070>=b;b++)e[b]=2;for(b=7074;7082>=b;b++)e[b]=0;for(b=7109;7118>=b;b++)e[b]=0;for(b=7119;7127>=b;b++)e[b]=1;for(b=7374;7376>=b;b++)e[b]=0;for(b=7528;7586>=b;b++)e[b]=0;for(b=7587;7645>=b;b++)e[b]=2;for(b=7755;7787>=b;b++)e[b]=0;for(b=7791;7795>=b;b++)e[b]=0;for(b=7799;7801>=b;b++)e[b]=0;for(b=7803;7805>=b;b++)e[b]=
0;for(b=7825;7831>=b;b++)e[b]=0;for(b=7845;7859>=b;b++)e[b]=0;for(b=8013;8032>=b;b++)e[b]=0;for(b=20002;20032>=b;b++)e[b]=0;for(b=20062;20092>=b;b++)e[b]=0;for(b=20135;20138>=b;b++)e[b]=0;for(b=20248;20258>=b;b++)e[b]=0;for(b=20348;20358>=b;b++)e[b]=0;for(b=20436;20440>=b;b++)e[b]=0;for(b=20822;20824>=b;b++)e[b]=0;for(b=20934;20936>=b;b++)e[b]=0;for(b=21035;21037>=b;b++)e[b]=0;for(b=21095;21097>=b;b++)e[b]=0;for(b=21148;21150>=b;b++)e[b]=0;for(b=21413;21423>=b;b++)e[b]=0;for(b=21473;21483>=b;b++)e[b]=
0;for(b=21780;21782>=b;b++)e[b]=0;for(b=21891;21894>=b;b++)e[b]=0;for(b=21896;21899>=b;b++)e[b]=0;for(b=22171;22177>=b;b++)e[b]=0;for(b=22181;22187>=b;b++)e[b]=0;for(b=22191;22197>=b;b++)e[b]=0;for(b=22234;22236>=b;b++)e[b]=0;for(b=22521;22525>=b;b++)e[b]=0;for(b=22991;22994>=b;b++)e[b]=0;for(b=23028;23038>=b;b++)e[b]=0;for(b=23830;23853>=b;b++)e[b]=0;for(b=23866;23872>=b;b++)e[b]=0;for(b=23877;23884>=b;b++)e[b]=0;for(b=23886;23894>=b;b++)e[b]=0;for(b=23946;23948>=b;b++)e[b]=0;for(b=24311;24313>=
b;b++)e[b]=0;for(b=24342;24347>=b;b++)e[b]=0;for(b=24370;24374>=b;b++)e[b]=10;for(b=24375;24381>=b;b++)e[b]=0;for(b=24718;24721>=b;b++)e[b]=0;for(b=24817;24821>=b;b++)e[b]=0;for(b=24877;24882>=b;b++)e[b]=0;for(b=24891;24893>=b;b++)e[b]=0;for(b=25391;25395>=b;b++)e[b]=0;for(b=25828;25838>=b;b++)e[b]=0;for(b=26191;26195>=b;b++)e[b]=0;for(b=26391;26393>=b;b++)e[b]=0;for(b=26701;26722>=b;b++)e[b]=0;for(b=26729;26799>=b;b++)e[b]=2;for(b=26801;26803>=b;b++)e[b]=2;for(b=26811;26813>=b;b++)e[b]=2;for(b=26847;26870>=
b;b++)e[b]=2;for(b=26891;26899>=b;b++)e[b]=0;for(b=26901;26923>=b;b++)e[b]=0;for(b=26929;26946>=b;b++)e[b]=0;for(b=26948;26998>=b;b++)e[b]=0;for(b=27037;27040>=b;b++)e[b]=0;for(b=27205;27232>=b;b++)e[b]=0;for(b=27258;27260>=b;b++)e[b]=0;for(b=27391;27398>=b;b++)e[b]=0;for(b=27561;27564>=b;b++)e[b]=0;for(b=27571;27574>=b;b++)e[b]=0;for(b=27581;27584>=b;b++)e[b]=0;for(b=27591;27594>=b;b++)e[b]=0;for(b=28191;28193>=b;b++)e[b]=0;for(b=28348;28358>=b;b++)e[b]=0;for(b=28402;28432>=b;b++)e[b]=0;for(b=28462;28492>=
b;b++)e[b]=0;for(b=29118;29122>=b;b++)e[b]=0;for(b=29168;29172>=b;b++)e[b]=0;for(b=29177;29185>=b;b++)e[b]=0;for(b=29187;29195>=b;b++)e[b]=0;for(b=29900;29903>=b;b++)e[b]=0;for(b=30161;30179>=b;b++)e[b]=0;for(b=30491;30494>=b;b++)e[b]=0;for(b=30729;30732>=b;b++)e[b]=0;for(b=31251;31259>=b;b++)e[b]=0;for(b=31265;31268>=b;b++)e[b]=0;for(b=31275;31279>=b;b++)e[b]=0;for(b=31281;31297>=b;b++)e[b]=0;for(b=31461;31469>=b;b++)e[b]=0;for(b=31491;31495>=b;b++)e[b]=0;for(b=31917;31922>=b;b++)e[b]=0;for(b=31965;32E3>=
b;b++)e[b]=0;for(b=32001;32003>=b;b++)e[b]=2;for(b=32005;32031>=b;b++)e[b]=2;for(b=32033;32060>=b;b++)e[b]=2;for(b=32064;32067>=b;b++)e[b]=2;for(b=32074;32077>=b;b++)e[b]=2;for(b=32081;32086>=b;b++)e[b]=0;for(b=32107;32130>=b;b++)e[b]=0;for(b=32133;32158>=b;b++)e[b]=0;for(b=32164;32167>=b;b++)e[b]=2;for(b=32180;32199>=b;b++)e[b]=0;for(b=32201;32260>=b;b++)e[b]=0;for(b=32301;32360>=b;b++)e[b]=0;for(b=32601;32662>=b;b++)e[b]=0;for(b=32664;32667>=b;b++)e[b]=2;for(b=32701;32761>=b;b++)e[b]=0;for(b=53001;53004>=
b;b++)e[b]=0;for(b=53008;53019>=b;b++)e[b]=0;for(b=53021;53032>=b;b++)e[b]=0;for(b=53042;53046>=b;b++)e[b]=0;for(b=53074;53080>=b;b++)e[b]=0;for(b=54001;54004>=b;b++)e[b]=0;for(b=54008;54019>=b;b++)e[b]=0;for(b=54021;54032>=b;b++)e[b]=0;for(b=54042;54046>=b;b++)e[b]=0;for(b=54048;54053>=b;b++)e[b]=0;for(b=54074;54080>=b;b++)e[b]=0;for(b=102001;102040>=b;b++)e[b]=0;for(b=102042;102063>=b;b++)e[b]=0;for(b=102065;102067>=b;b++)e[b]=0;for(b=102070;102117>=b;b++)e[b]=0;for(b=102122;102216>=b;b++)e[b]=
0;for(b=102221;102377>=b;b++)e[b]=0;for(b=102382;102388>=b;b++)e[b]=0;for(b=102389;102398>=b;b++)e[b]=2;for(b=102399;102444>=b;b++)e[b]=0;for(b=102445;102447>=b;b++)e[b]=2;for(b=102448;102458>=b;b++)e[b]=0;for(b=102459;102468>=b;b++)e[b]=2;for(b=102469;102496>=b;b++)e[b]=0;for(b=102500;102519>=b;b++)e[b]=1;for(b=102520;102524>=b;b++)e[b]=0;for(b=102525;102529>=b;b++)e[b]=2;for(b=102530;102568>=b;b++)e[b]=0;for(b=102570;102588>=b;b++)e[b]=0;for(b=102590;102598>=b;b++)e[b]=0;for(b=102601;102603>=b;b++)e[b]=
0;for(b=102605;102628>=b;b++)e[b]=0;for(b=102629;102646>=b;b++)e[b]=2;for(b=102648;102700>=b;b++)e[b]=2;for(b=102701;102703>=b;b++)e[b]=0;for(b=102707;102730>=b;b++)e[b]=2;for(b=102733;102758>=b;b++)e[b]=2;for(b=102767;102900>=b;b++)e[b]=0;for(b=102965;102969>=b;b++)e[b]=0;for(b=102971;102973>=b;b++)e[b]=0;for(b=102975;102989>=b;b++)e[b]=0;for(b=102990;102992>=b;b++)e[b]=1;for(b=102997;103002>=b;b++)e[b]=0;for(b=103003;103008>=b;b++)e[b]=2;for(b=103009;103011>=b;b++)e[b]=0;for(b=103012;103014>=b;b++)e[b]=
2;for(b=103019;103021>=b;b++)e[b]=0;for(b=103022;103024>=b;b++)e[b]=2;for(b=103029;103031>=b;b++)e[b]=0;for(b=103032;103034>=b;b++)e[b]=2;for(b=103065;103068>=b;b++)e[b]=0;for(b=103074;103076>=b;b++)e[b]=0;for(b=103077;103079>=b;b++)e[b]=1;for(b=103080;103082>=b;b++)e[b]=0;for(b=103083;103085>=b;b++)e[b]=2;for(b=103090;103093>=b;b++)e[b]=0;for(b=103097;103099>=b;b++)e[b]=0;for(b=103100;103102>=b;b++)e[b]=2;for(b=103107;103109>=b;b++)e[b]=0;for(b=103110;103112>=b;b++)e[b]=2;for(b=103113;103116>=b;b++)e[b]=
0;for(b=103117;103120>=b;b++)e[b]=2;for(b=103153;103157>=b;b++)e[b]=0;for(b=103158;103162>=b;b++)e[b]=2;for(b=103163;103165>=b;b++)e[b]=0;for(b=103166;103168>=b;b++)e[b]=1;for(b=103169;103171>=b;b++)e[b]=2;for(b=103186;103188>=b;b++)e[b]=0;for(b=103189;103191>=b;b++)e[b]=2;for(b=103192;103195>=b;b++)e[b]=0;for(b=103196;103199>=b;b++)e[b]=2;for(b=103200;103224>=b;b++)e[b]=0;for(b=103225;103227>=b;b++)e[b]=1;for(b=103232;103237>=b;b++)e[b]=0;for(b=103238;103243>=b;b++)e[b]=2;for(b=103244;103246>=b;b++)e[b]=
0;for(b=103247;103249>=b;b++)e[b]=2;for(b=103254;103256>=b;b++)e[b]=0;for(b=103257;103259>=b;b++)e[b]=2;for(b=103264;103266>=b;b++)e[b]=0;for(b=103267;103269>=b;b++)e[b]=2;for(b=103300;103375>=b;b++)e[b]=0;for(b=103381;103383>=b;b++)e[b]=0;for(b=103384;103386>=b;b++)e[b]=1;for(b=103387;103389>=b;b++)e[b]=0;for(b=103390;103392>=b;b++)e[b]=2;for(b=103397;103399>=b;b++)e[b]=0;for(b=103400;103471>=b;b++)e[b]=2;for(b=103476;103478>=b;b++)e[b]=0;for(b=103479;103481>=b;b++)e[b]=2;for(b=103486;103488>=b;b++)e[b]=
0;for(b=103489;103491>=b;b++)e[b]=2;for(b=103492;103495>=b;b++)e[b]=0;for(b=103496;103499>=b;b++)e[b]=2;for(b=103528;103543>=b;b++)e[b]=0;for(b=103544;103548>=b;b++)e[b]=2;for(b=103549;103551>=b;b++)e[b]=0;for(b=103552;103554>=b;b++)e[b]=1;for(b=103555;103557>=b;b++)e[b]=2;for(b=103558;103560>=b;b++)e[b]=0;for(b=103571;103573>=b;b++)e[b]=0;for(b=103574;103576>=b;b++)e[b]=2;for(b=103577;103580>=b;b++)e[b]=0;for(b=103581;103583>=b;b++)e[b]=2;for(b=103600;103694>=b;b++)e[b]=0;for(b=103700;103793>=b;b++)e[b]=
2;for(b=103794;103871>=b;b++)e[b]=0;for(b=103900;103971>=b;b++)e[b]=2;return e})},"esri/layers/vectorTiles/layers/support/vectorTileLayerLoader":function(){define("require exports dojo/has dojo/_base/lang ../../core/promiseUtils ../../core/urlUtils ../../config ../../request".split(" "),function(b,e,a,c,d,f,g,h){function m(a){if(a){var c=f.getOrigin(a);f.canUseXhr(c)||-1!==r.indexOf(c)||r.push(c);return a}}function k(a,c,d){if(null!=c.sources){d&&-1!==d.path.indexOf("root.json")&&(d.path=d.path.substr(0,
d.path.indexOf("root.json")),a.styleUrl=d.path);var b=n(c,d),g=c.sprite||null,h=c.glyphs||null;if(b=d&&d.path||b&&b.url)c.sprite&&!f.isAbsolute(c.sprite)&&(g=f.normalize(f.join(b,c.sprite))),c.glyphs&&!f.isAbsolute(c.glyphs)&&(h=f.normalize(f.join(b,c.glyphs)));a.style=c;a.spriteUrl=g;a.glyphsUrl=h;return p(a,c,d)}if(c.hasOwnProperty("tileInfo"))return a.layerDefinition=c,a.serviceUrl=d.path,l(a,c,d)}function l(a,c,d){if(t&&!c.hasOwnProperty("defaultStyles"))throw Error("Service definition must have 'defaultStyles' element!");
c=c.defaultStyles;f.isAbsolute(c)?a.styleUrl=f.normalize(c):a.styleUrl=f.normalize(f.join(d.path,c));m(a.styleUrl);return h(f.join(a.styleUrl,"root.json"),{responseType:"json"}).then(function(c){var d=c.data.sprite||null,b=c.data.glyphs||null;d&&!f.isAbsolute(d)&&(d=f.normalize(f.join(a.styleUrl,d)));b&&!f.isAbsolute(b)&&(b=f.normalize(f.join(a.styleUrl,b)));a.spriteUrl=d;a.glyphsUrl=b;return a.style=c.data})}function p(a,c,b){(c=n(c,b))||d.reject("Source isn't available in the syle object!");if(c.url)return a.serviceUrl=
c.url,f.isAbsolute(a.serviceUrl)||(a.serviceUrl=f.join(b.path,a.serviceUrl)),m(a.serviceUrl),h(a.serviceUrl,{query:{f:"json"},responseType:"json"}).then(function(c){a.layerDefinition=q(c.data);return a});a.layerDefinition=q(c);return d.resolve(a)}function n(a,c){if(!a.sources)return null;var d=a.sources,b=null;if(d.esri)b=d.esri,c&&b.url&&!f.isAbsolute(b.url)&&(d=c.path.substring(0,c.path.lastIndexOf("/")),b.url=f.join(d,b.url));else{for(var g=0,h=Object.keys(d);g<h.length;g++){var m=h[g];if(-1!==
m.toLocaleLowerCase().indexOf("street")&&"vector"===b.type){b=d[m];break}}if(!b)for(g=0,h=Object.keys(d);g<h.length&&(m=h[g],b=d[m],"vector"!==b.type);g++);}return b}function q(a){if(a.hasOwnProperty("tileInfo"))return a;for(var c={xmin:-2.0037507067161843E7,ymin:-2.0037507067161843E7,xmax:2.0037507067161843E7,ymax:2.0037507067161843E7,spatialReference:{wkid:102100}},d=(c.xmax-c.xmin)/512,f=[],b=a.hasOwnProperty("minzoom")?parseFloat(a.minzoom):0,g=a.hasOwnProperty("maxzoom")?parseFloat(a.maxzoom):
16;b<g;b++){var h=d/Math.pow(2,b);f.push({level:b,scale:Math.floor(3779.527559055118*h),resolution:h})}a.tiles.forEach(m);return{capabilities:"TilesOnly",initialExtent:c,fullExtent:c,minScale:f[0].scale,maxScale:f[f.length-1].scale,tiles:a.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-2.0037508342787E7,y:2.0037508342787E7},lods:f,spatialReference:{wkid:102100}}}}Object.defineProperty(e,"__esModule",{value:!0});var t=a("dojo-debug-messages"),r=g.defaults&&g.defaults.io.corsEnabledServers||
g.request.corsEnabledServers;e.loadMetadata=function(a){if(!a)return d.reject("invalid input URL!");var b={layerDefinition:null,parsedUrl:null,serviceUrl:null,style:null,styleUrl:null,url:null,spriteUrl:null,glyphsUrl:null};if("string"!==typeof a)return k(b,a,null).then(function(){return b});a=b.url=f.normalize(a);var g=b.parsedUrl=f.urlToObject(a);m(a);return h(g.path,{responseType:"json",query:c.mixin({f:"json"},g.query)}).then(function(a){return k(b,a.data,g)}).then(function(){return b})}})},"esri/layers/vectorTiles/config":function(){define(["require",
"exports","esri/config"],function(b,e,a){Object.defineProperty(a,"workers",{get:function(){return a.defaults.workers},set:function(c){return a.defaults.workers=c}});return a})},"esri/layers/vectorTiles/views/vectorTiles/style/StyleRepository":function(){define(["require","exports","./StyleLayer","dojo/has"],function(b,e,a,c){return function(){function d(a,b){this.styleJSON=a;this.version=parseFloat(a.version);this.sprite=b?b.spriteUrl:a.sprite;this.glyphs=b?b.glyphsUrl:a.glyphs;if(c("stable-symbol-rendering")){var f=
(a.layers||[]).filter(function(a){return a.layout&&a.layout["text-font"]})[0];f&&(a.layers||[]).forEach(function(a){a.layout&&a.layout["text-font"]&&(a.layout["text-font"]=f.layout["text-font"])})}this.layers=(a.layers||[]).map(d._create);this._identifyRefLayers()}d.prototype._identifyRefLayers=function(){for(var a=[],c=[],d=0,b=0,e=this.layers;b<e.length;b++){var l=e[b];if(1===l.type){var p=l,n=l.sourceLayer,n=n+("|"+JSON.stringify(l.minzoom)),n=n+("|"+JSON.stringify(l.maxzoom)),n=n+("|"+JSON.stringify(l.filter));
if(p.hasDataDrivenFill||p.hasDataDrivenOutline)n+="|"+JSON.stringify(d);a.push({key:n,layer:l})}2===l.type&&(p=l,n=l.sourceLayer,n+="|"+JSON.stringify(l.minzoom),n+="|"+JSON.stringify(l.maxzoom),n+="|"+JSON.stringify(l.filter),n+="|"+JSON.stringify(l.layout&&l.layout["line-cap"]),n+="|"+JSON.stringify(l.layout&&l.layout["line-join"]),p.hasDataDrivenLine&&(n+="|"+JSON.stringify(d)),c.push({key:n,layer:l}));++d}this._assignRefLayers(a);this._assignRefLayers(c)};d.prototype._assignRefLayers=function(a){a.sort(function(a,
c){return a.key<c.key?-1:a.key>c.key?1:0});for(var c,d,f=a.length,b=0;b<f;b++){var e=a[b];if(e.key===c)e.layer.refLayerId=d;else if(c=e.key,d=e.layer.id,1===e.layer.type&&!e.layer.getPaintProperty("fill-outline-color"))for(var p=b+1;p<f;p++){var n=a[p];if(n.key===c){if(n.layer.getPaintProperty("fill-outline-color")){a[b]=n;a[p]=e;d=n.layer.id;break}}else break}}};d._create=function(c,d,b){d=1-1/(b.length+1)*(1+d);switch(c.type){case "background":return new a.BackgroundStyleLayer(0,c,d);case "fill":return new a.FillStyleLayer(1,
c,d);case "line":return new a.LineStyleLayer(2,c,d);case "symbol":return new a.SymbolStyleLayer(3,c,d);case "raster":throw Error("Unsupported vector tile raster layer");case "circle":throw Error("Unsupported vector tile circle layer");}throw Error("Unknown vector tile layer");};return d}()})},"esri/layers/vectorTiles/views/vectorTiles/style/StyleLayer":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ./StyleDefinition ./StyleProperty ./Filter".split(" "),
function(b,e,a,c,d,f,g){Object.defineProperty(e,"__esModule",{value:!0});b=function(){function a(a,c,f){this.type=a;this.id=c.id;this.source=c.source;this.sourceLayer=c["source-layer"];this.minzoom=c.minzoom;this.maxzoom=c.maxzoom;this.filter=c.filter;this.layout=c.layout;this.paint=c.paint;this.z=f;switch(a){case 0:this._layoutDefinition=d.StyleDefinition.backgroundLayoutDefinition;this._paintDefinition=d.StyleDefinition.backgroundPaintDefinition;break;case 1:this._layoutDefinition=d.StyleDefinition.fillLayoutDefinition;
this._paintDefinition=d.StyleDefinition.fillPaintDefinition;break;case 2:this._layoutDefinition=d.StyleDefinition.lineLayoutDefinition;this._paintDefinition=d.StyleDefinition.linePaintDefinition;break;case 3:this._layoutDefinition=d.StyleDefinition.symbolLayoutDefinition,this._paintDefinition=d.StyleDefinition.symbolPaintDefinition}this._layoutProperties=this._parseLayout(this.layout);this._paintProperties=this._parsePaint(this.paint)}a.prototype.getFeatureFilter=function(){return void 0!==this._featureFilter?
this._featureFilter:this._featureFilter=g.createFilter(this.filter)};a.prototype.getLayoutProperty=function(a){var c=this._layoutProperties;if(c)return c[a]};a.prototype.getPaintProperty=function(a){var c=this._paintProperties;if(c)return c[a]};a.prototype.getLayoutValue=function(a,c,d){var f,b=this._layoutProperties;b&&(b=b[a])&&(f=b.getValue(c,d));a=this._layoutDefinition[a];void 0===f&&(f=a["default"]);"enum"===a.type&&(f=a.values.indexOf(f));return f};a.prototype.getPaintValue=function(a,c,d){var f,
b=this._paintProperties;b&&(b=b[a])&&(f=b.getValue(c,d));a=this._paintDefinition[a];void 0===f&&(f=a["default"]);"enum"===a.type&&(f=a.values.indexOf(f));return f};a.prototype._parseLayout=function(a){var c={},d;for(d in a){var b=this._layoutDefinition[d];b&&(c[d]=new f(d,b,a[d]))}return c};a.prototype._parsePaint=function(a){var c={},d;for(d in a){var b=this._paintDefinition[d];b&&(c[d]=new f(d,b,a[d]))}return c};return a}();e.StyleLayer=b;c=function(c){function d(a,d,f){return c.call(this,a,d,f)||
this}a(d,c);return d}(b);e.BackgroundStyleLayer=c;c=function(c){function d(a,d,f){a=c.call(this,a,d,f)||this;a.hasDataDrivenFill=!1;(d=a.getPaintProperty("fill-color"))&&d.isDataDriven&&(a.hasDataDrivenFill=!0);(f=a.getPaintProperty("fill-opacity"))&&f.isDataDriven&&(a.hasDataDrivenFill=!0);a.hasDataDrivenOutline=!1;(f=a.getPaintProperty("fill-outline-color"))&&f.isDataDriven&&(a.hasDataDrivenOutline=!0);!f&&d&&d.isDataDriven&&(a.hasDataDrivenOutline=!0);return a}a(d,c);return d}(b);e.FillStyleLayer=
c;c=function(c){function d(a,d,f){a=c.call(this,a,d,f)||this;a.hasDataDrivenLine=!1;(d=a.getPaintProperty("line-color"))&&d.isDataDriven&&(a.hasDataDrivenLine=!0);(d=a.getPaintProperty("line-opacity"))&&d.isDataDriven&&(a.hasDataDrivenLine=!0);(d=a.getPaintProperty("line-width"))&&d.isDataDriven&&(a.hasDataDrivenLine=!0);return a}a(d,c);return d}(b);e.LineStyleLayer=c;b=function(c){function d(a,d,f){a=c.call(this,a,d,f)||this;a.hasDataDrivenIcon=!1;(d=a.getPaintProperty("icon-color"))&&d.isDataDriven&&
(a.hasDataDrivenIcon=!0);(d=a.getPaintProperty("icon-opacity"))&&d.isDataDriven&&(a.hasDataDrivenIcon=!0);(d=a.getLayoutProperty("icon-size"))&&d.isDataDriven&&(a.hasDataDrivenIcon=!0);a.hasDataDrivenText=!1;(d=a.getPaintProperty("text-color"))&&d.isDataDriven&&(a.hasDataDrivenText=!0);(d=a.getPaintProperty("text-opacity"))&&d.isDataDriven&&(a.hasDataDrivenText=!0);(d=a.getLayoutProperty("text-size"))&&d.isDataDriven&&(a.hasDataDrivenText=!0);return a}a(d,c);return d}(b);e.SymbolStyleLayer=b;b=function(){return function(a,
c,d){this.cap=a.getLayoutValue("line-cap",c,d);this.join=a.getLayoutValue("line-join",c,d);this.miterLimit=a.getLayoutValue("line-miter-limit",c,d);this.roundLimit=a.getLayoutValue("line-round-limit",c,d)}}();e.LineLayout=b;b=function(){return function(a,c,d,f){this.allowOverlap=a.getLayoutValue("icon-allow-overlap",c,f);this.ignorePlacement=a.getLayoutValue("icon-ignore-placement",c,f);this.optional=a.getLayoutValue("icon-optional",c,f);this.rotationAlignment=a.getLayoutValue("icon-rotation-alignment",
c,f);this.size=a.getLayoutValue("icon-size",c,f);this.rotate=a.getLayoutValue("icon-rotate",c,f);this.padding=a.getLayoutValue("icon-padding",c,f);this.keepUpright=a.getLayoutValue("icon-keep-upright",c,f);this.offset=a.getLayoutValue("icon-offset",c,f);2===this.rotationAlignment&&(this.rotationAlignment=d?0:1)}}();e.IconLayout=b;b=function(){return function(a,c,d,f){this.allowOverlap=a.getLayoutValue("text-allow-overlap",c,f);this.ignorePlacement=a.getLayoutValue("text-ignore-placement",c,f);this.optional=
a.getLayoutValue("text-optional",c,f);this.rotationAlignment=a.getLayoutValue("text-rotation-alignment",c,f);this.fontArray=a.getLayoutValue("text-font",c,f);this.maxWidth=a.getLayoutValue("text-max-width",c,f);this.lineHeight=a.getLayoutValue("text-line-height",c,f);this.letterSpacing=a.getLayoutValue("text-letter-spacing",c,f);this.justify=a.getLayoutValue("text-justify",c,f);this.anchor=a.getLayoutValue("text-anchor",c,f);this.maxAngle=a.getLayoutValue("text-max-angle",c,f);this.size=a.getLayoutValue("text-size",
c,f);this.rotate=a.getLayoutValue("text-rotate",c,f);this.padding=a.getLayoutValue("text-padding",c,f);this.keepUpright=a.getLayoutValue("text-keep-upright",c,f);this.transform=a.getLayoutValue("text-transform",c,f);this.offset=a.getLayoutValue("text-offset",c,f);2===this.rotationAlignment&&(this.rotationAlignment=d?0:1)}}();e.TextLayout=b})},"esri/layers/vectorTiles/core/tsSupport/decorateHelper":function(){define([],function(){return function(b,e,a,c){var d=arguments.length,f=3>d?e:null===c?c=Object.getOwnPropertyDescriptor(e,
a):c,g;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)f=Reflect.decorate(b,e,a,c);else for(var h=b.length-1;0<=h;h--)if(g=b[h])f=(3>d?g(f):3<d?g(e,a,f):g(e,a))||f;return 3<d&&f&&Object.defineProperty(e,a,f),f}})},"esri/layers/vectorTiles/views/vectorTiles/style/StyleDefinition":function(){define(["require","exports"],function(b,e){Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function a(){}a.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible",
"none"],"default":"visible"}};a.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],"default":"visible"}};a.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],"default":"visible"},"line-cap":{type:"enum",values:["butt","round","square"],"default":"butt"},"line-join":{type:"enum",values:["bevel","round","miter"],"default":"miter"},"line-miter-limit":{type:"number","default":2},"line-round-limit":{type:"number","default":1.05}};a.symbolLayoutDefinition={visibility:{type:"enum",
values:["visible","none"],"default":"visible"},"symbol-placement":{type:"enum",values:["point","line"],"default":"point"},"symbol-spacing":{type:"number",minimum:1,"default":250},"symbol-avoid-edges":{type:"boolean","default":!1},"icon-image":{type:"string"},"icon-allow-overlap":{type:"boolean","default":!1},"icon-ignore-placement":{type:"boolean","default":!1},"icon-optional":{type:"boolean","default":!1},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],"default":"auto"},"icon-size":{type:"number",
minimum:0,"default":1},"icon-rotate":{type:"number","default":0},"icon-padding":{type:"number",minimum:0,"default":2},"icon-keep-upright":{type:"boolean","default":!1},"icon-offset":{type:"array",value:"number",length:2,"default":[0,0]},"text-field":{type:"string"},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],"default":"auto"},"text-font":{type:"array",value:"string","default":["Open Sans Regular","Arial Unicode MS Regular"]},"text-size":{type:"number",minimum:0,"default":16},
"text-max-width":{type:"number",minimum:0,"default":10},"text-line-height":{type:"number","default":1.2},"text-letter-spacing":{type:"number","default":0},"text-justify":{type:"enum",values:["left","center","right"],"default":"center"},"text-anchor":{type:"enum",values:"center left right top bottom top-left top-right bottom-left bottom-right".split(" "),"default":"center"},"text-max-angle":{type:"number",minimum:0,"default":45},"text-rotate":{type:"number","default":0},"text-padding":{type:"number",
minimum:0,"default":2},"text-keep-upright":{type:"boolean","default":!0},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],"default":"none"},"text-offset":{type:"array",value:"number",length:2,"default":[0,0]},"text-allow-overlap":{type:"boolean","default":!1},"text-ignore-placement":{type:"boolean","default":!1},"text-optional":{type:"boolean","default":!1}};a.backgroundPaintDefinition={"background-opacity":{type:"number",minimum:0,maximum:1,"default":1},"background-color":{type:"color",
"default":[0,0,0,1]},"background-pattern":{type:"string"}};a.fillPaintDefinition={"fill-opacity":{type:"number",minimum:0,maximum:1,"default":1},"fill-antialias":{type:"boolean","default":!0},"fill-color":{type:"color","default":[0,0,0,1]},"fill-outline-color":{type:"color","default":[0,0,0,0]},"fill-translate":{type:"array",value:"number",length:2,"default":[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],"default":"map"},"fill-pattern":{type:"string"}};a.linePaintDefinition=
{"line-opacity":{type:"number",minimum:0,maximum:1,"default":1},"line-color":{type:"color","default":[0,0,0,1]},"line-translate":{type:"array",value:"number",length:2,"default":[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],"default":"map"},"line-width":{type:"number",minimum:0,"default":1},"line-gap-width":{type:"number",minimum:0,"default":0},"line-offset":{type:"number","default":0},"line-blur":{type:"number",minimum:0,"default":0},"line-dasharray":{type:"array",value:"number",
"default":[]},"line-pattern":{type:"string"}};a.symbolPaintDefinition={"icon-opacity":{type:"number",minimum:0,maximum:1,"default":1},"icon-color":{type:"color","default":[0,0,0,1]},"icon-halo-color":{type:"color","default":[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,"default":0},"icon-halo-blur":{type:"number",minimum:0,"default":0},"icon-translate":{type:"array",value:"number",length:2,"default":[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],"default":"map"},"text-opacity":{type:"number",
minimum:0,maximum:1,"default":1},"text-color":{type:"color","default":[0,0,0,1]},"text-halo-color":{type:"color","default":[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,"default":0},"text-halo-blur":{type:"number",minimum:0,"default":0},"text-translate":{type:"array",value:"number",length:2,"default":[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],"default":"map"}};a.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,"default":1},"raster-hue-rotate":{type:"number",
"default":0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,"default":0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,"default":1},"raster-saturation":{type:"number",minimum:-1,maximum:1,"default":0},"raster-contrast":{type:"number",minimum:-1,maximum:1,"default":0},"raster-fade-duration":{type:"number",minimum:0,"default":300}};a.circlePaintDefinition={"circle-opacity":{type:"number",minimum:0,maximum:1,"default":1},"circle-radius":{type:"number",minimum:0,"default":5},
"circle-color":{type:"color","default":[0,0,0,1]},"circle-blur":{type:"number",minimum:0,"default":0},"circle-translate":{type:"array",value:"number",length:2,"default":[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],"default":"map"}};return a}();e.StyleDefinition=a})},"esri/layers/vectorTiles/views/vectorTiles/style/StyleProperty":function(){define(["require","exports","../../../Color","../GeometryUtils"],function(b,e,a,c){return function(){function d(a,c,b){this.isDataDriven=
!1;switch(c.type){case "number":a=!0;break;case "color":a=!0;b=d._parseColor(b);break;case "array":a="number"===c.value;break;default:a=!1}var f=b.stops&&0<b.stops.length;if(this.isDataDriven=!!b.property)if(f)switch(b.type){case "identity":this.getValue=this._buildIdentity(b,c);break;case "categorical":this.getValue=this._buildCategorical(b,c);break;default:a&&"interval"===b.type&&(a=!1),this.getValue=a?this._buildInterpolate(b,c):this._buildInterval(b,c)}else this.getValue=this._buildIdentity(b,
c);else this.getValue=f?a?this._buildZoomInterpolate(b):this._buildZoomInterval(b):this._buildSimple(b)}d.prototype._buildSimple=function(a){return function(){return a}};d.prototype._buildIdentity=function(a,c){return function(f,b){var g;b&&(g=b.values[a.property],"color"===c.type&&(g=d._parseColor(g)));return void 0!==g?g:void 0!==a.default?a.default:c.default}};d.prototype._buildCategorical=function(a,c){var d=this;return function(f,b){var g;b&&(g=b.values[a.property]);g=d._categorical(g,a.stops);
return void 0!==g?g:void 0!==a.default?a.default:c.default}};d.prototype._buildInterval=function(a,c){var d=this;return function(f,b){var g;b&&(g=b.values[a.property]);return"number"===typeof g?d._interval(g,a.stops):void 0!==a.default?a.default:c.default}};d.prototype._buildInterpolate=function(a,c){var d=this;return function(f,b){var g;b&&(g=b.values[a.property]);return"number"===typeof g?d._interpolate(g,a.stops,a.base||1):void 0!==a.default?a.default:c.default}};d.prototype._buildZoomInterpolate=
function(a){var c=this;return function(d){return c._interpolate(d,a.stops,a.base||1)}};d.prototype._buildZoomInterval=function(a){var c=this;return function(d){return c._interval(d,a.stops)}};d.prototype._categorical=function(a,c){for(var d=c.length,f=0;f<d;f++)if(c[f][0]===a)return c[f][1]};d.prototype._interval=function(a,c){for(var d=c.length,f=0,b=0;b<d;b++)if(c[b][0]<=a)f=b;else break;return c[f][1]};d.prototype._interpolate=function(a,d,b){for(var f,g,h=d.length,e=0;e<h;e++){var n=d[e];if(n[0]<=
a)f=n;else{g=n;break}}if(f&&g){e=g[0]-f[0];a-=f[0];b=1===b?a/e:(Math.pow(b,a)-1)/(Math.pow(b,e)-1);if(Array.isArray(f[1])){f=f[1];g=g[1];a=[];for(e=0;e<f.length;e++)a.push(c.interpolate(f[e],g[e],b));return a}return c.interpolate(f[1],g[1],b)}if(f)return f[1];if(g)return g[1]};d._isEmpty=function(a){for(var c in a)if(a.hasOwnProperty(c))return!1;return!0};d._parseColor=function(c){if(Array.isArray(c))return c;if("string"===typeof c){if(c=new a(c),!this._isEmpty(c))return a.toUnitRGBA(c)}else return c&&
c.default&&(c.default=d._parseColor(c.default)),c&&c.stops&&(c.stops=c.stops.map(function(a){return[a[0],d._parseColor(a[1])]})),c};return d}()})},"esri/layers/vectorTiles/Color":function(){define(["require","exports","esri/Color"],function(b,e,a){return function(){function c(c){return new a(c)}c.toUnitRGBA=function(a){return[a.r/255,a.g/255,a.b/255,null!=a.a?a.a:1]};return c}()})},"esri/layers/vectorTiles/views/vectorTiles/GeometryUtils":function(){define(["require","exports"],function(b,e){function a(a,
c){a%=c;return 0<=a?a:a+c}Object.defineProperty(e,"__esModule",{value:!0});e.C_INFINITY=Number.POSITIVE_INFINITY;e.C_PI=Math.PI;e.C_2PI=2*e.C_PI;e.C_PI_BY_2=e.C_PI/2;e.C_RAD_TO_256=128/e.C_PI;e.C_256_TO_RAD=e.C_PI/128;e.C_DEG_TO_256=256/360;e.C_DEG_TO_RAD=e.C_PI/180;e.C_SQRT2=1.414213562;e.C_SQRT2_INV=1/e.C_SQRT2;var c=1/Math.LN2;e.positiveMod=a;e.radToByte=function(c){return a(c*e.C_RAD_TO_256,256)};e.degToByte=function(c){return a(c*e.C_DEG_TO_256,256)};e.log2=function(a){return Math.log(a)*c};
e.sqr=function(a){return a*a};e.clamp=function(a,c,b){return Math.min(Math.max(a,c),b)};e.interpolate=function(a,c,b){return a*(1-b)+c*b};e.between=function(a,c,b){return a>=c&&a<=b||a>=b&&a<=c}})},"esri/layers/vectorTiles/views/vectorTiles/style/Filter":function(){define(["require","exports"],function(b,e){return function(){function a(c,d,f){this._op=c;"$type"===d?(this._val=f instanceof Array?f.map(function(c){return a._types.indexOf(c)}):a._types.indexOf(f),this._op+=11):(this._key=d,this._val=
f)}a.prototype.filter=function(a){switch(this._op){case 0:return this._val;case 1:return a.values[this._key]===this._val;case 2:return a.values[this._key]!==this._val;case 3:return a.values[this._key]<this._val;case 4:return a.values[this._key]>this._val;case 5:return a.values[this._key]<=this._val;case 6:return a.values[this._key]>=this._val;case 7:return-1!==this._val.indexOf(a.values[this._key]);case 8:return-1===this._val.indexOf(a.values[this._key]);case 9:for(var c=0,f=this._val;c<f.length;c++){var b=
f[c];if(b.filter(a))return!0}return!1;case 10:c=0;for(f=this._val;c<f.length;c++)if(b=f[c],!b.filter(a))return!1;return!0;case 11:c=0;for(f=this._val;c<f.length;c++)if(b=f[c],b.filter(a))return!1;return!0;case 12:return a.type===this._val;case 13:return a.type!==this._val;case 14:return a.type<this._val;case 15:return a.type>this._val;case 16:return a.type>=this._val;case 17:return a.type<=this._val;case 18:return-1!==this._val.indexOf(a.type);case 19:return-1===this._val.indexOf(a.type)}};a.createFilter=
function(c){if(!c)return new a(0,void 0,!0);var d=c[0];if(1>=c.length)return new a(0,void 0,"any"!==d);switch(d){case "\x3d\x3d":return new a(1,c[1],c[2]);case "!\x3d":return new a(2,c[1],c[2]);case "\x3e":return new a(4,c[1],c[2]);case "\x3c":return new a(3,c[1],c[2]);case "\x3e\x3d":return new a(6,c[1],c[2]);case "\x3c\x3d":return new a(5,c[1],c[2]);case "in":return new a(7,c[1],c.slice(2));case "!in":return new a(8,c[1],c.slice(2));case "any":return new a(9,void 0,c.slice(1).map(a.createFilter.bind(this)));
case "all":return new a(10,void 0,c.slice(1).map(a.createFilter.bind(this)));case "none":return new a(11,void 0,c.slice(1).map(a.createFilter.bind(this)));default:throw Error("invalid operator: "+d);}};a._types=["Unknown","Point","LineString","Polygon"];return a}()})},"esri/layers/vectorTiles/views/vectorTiles/VectorTileContainer":function(){define("require exports ../../core/tsSupport/extendsHelper dojo/has ../../core/promiseUtils ../../core/libs/gl-matrix/vec3 ../../core/libs/gl-matrix/mat4 ../2d/engine/Container ./renderers/Renderer ./GeometryUtils".split(" "),
function(b,e,a,c,d,f,g,h,m,k){return function(b){function h(){var a=b.call(this)||this;a.isInitialized=!1;a._displayWidth=0;a._displayHeight=0;a._pointToCallbacks=new Map;a._tileCoordinateScale=f.create();a._orientationVec=f.create();a._displayScale=f.create();a._orientationVec.set([0,0,1]);a._defaultTransform=g.create();return a}a(h,b);h.prototype.initialize=function(a,c,d,f){this._renderer=new m;this._renderer.initialize(a,c);this._tileInfoView=f;this._tileInfo=d;this.isInitialized=!0};h.prototype.destroy=
function(){this._renderer&&(this._renderer.dispose(),this._renderer=null)};h.prototype.hittest=function(a,c){var f=this,b=[a,c];return d.create(function(a,c){f._pointToCallbacks.set(b,{resolve:a,reject:c});f.requestRender()},function(){f._pointToCallbacks.has(b)&&f._pointToCallbacks.delete(b)})};h.prototype.prepareChildrenRenderParameters=function(a){var c=a.state;if(!c||!this._tileInfo||!this.isInitialized)return a;a.displayLevel=this._tileInfo.scaleToZoom(c.scale);a.requiredLevel=this._tileInfoView.getClosestInfoForScale(c.scale).level;
a.renderer=this._renderer;return a};h.prototype.renderChildren=function(a){var d=this;if(0!==this.children.length&&this.isInitialized&&a&&a.state){this.sortChildren(function(a,c){return a.key.level-c.key.level});for(var f=this.children.length,g=1;g<=f;g++){var h=this.children[g-1];h.attached&&(h.stencilData.reference=g,h.stencilData.mask=255)}this._updateTilesTransform(a.state,this._tileInfoView.getClosestInfoForScale(a.state.scale).level,this.children);f=a.context;f.setDepthWriteEnabled(!0);this._renderer.setStateParams(a.state,
a.devicePixelRatio,a.displayLevel);this._renderer.drawClippingMasks(f,this.children);f.setStencilWriteMask(0);f.setBlendFunctionSeparate(1,771,1,771);f.setStencilOp(7680,7680,7681);f.setDepthFunction(515);f.setBlendingEnabled(!1);f.setStencilTestEnabled(!0);f.setDepthTestEnabled(!0);f.setDepthWriteEnabled(!0);a.drawphase=0;b.prototype.renderChildren.call(this,a);f.setDepthWriteEnabled(!1);f.setBlendingEnabled(!0);a.drawphase=1;b.prototype.renderChildren.call(this,a);a.drawphase=2;b.prototype.renderChildren.call(this,
a);f.setStencilTestEnabled(!1);f.setDepthTestEnabled(!1);if(c("esri-vector-tiles-debug"))for(g=0,h=this.children;g<h.length;g++){var e=h[g];e.attached&&e.visible&&this._renderer.renderTileInfo(f,e)}0<this._pointToCallbacks.size&&(this._pointToCallbacks.forEach(function(c,f){c.resolve(d._hitTest(a,f[0],f[1]))}),this._pointToCallbacks.clear());this._renderer.needsRedraw()&&this.requestRender()}};h.prototype.removeAllChildren=function(){for(var a=0;a<this.children.length;a++)this.children[a].dispose();
b.prototype.removeAllChildren.call(this)};h.prototype._hitTest=function(a,c,d){var f=this._tileInfoView.getClosestInfoForScale(a.state.scale).level,b=[0,0];a.state.toMap(b,[c,d]);var g=a.state.clone(),h=g.viewpoint.clone(),e=h.targetGeometry;e.x=b[0];e.y=b[1];h.targetGeometry=e;g.viewpoint=h;g.size=[3,3];this._renderer.setStateParams(g,a.devicePixelRatio,a.displayLevel);return(a=this._renderer.hitTest({budget:a.budget,devicePixelRatio:a.devicePixelRatio,stationary:a.stationary,opacity:a.opacity,context:a.context,
displayLevel:a.displayLevel,requiredLevel:a.requiredLevel,renderer:a.renderer,layerOpacity:a.layerOpacity,state:g,drawphase:3},c,d,this.children,f,3,this._updateTilesTransform.bind(this)))&&0!==a.length?a[0]:null};h.prototype._updateTilesTransform=function(a,c,d){var f=1/a.width,b=1/a.height,g=[0,0];this._calculateRelativeViewProjMat(this._tileInfo.lodAt(c).resolution,a.resolution,a.rotation,this._tileInfo.size[1],4096,a.width,a.height,this._defaultTransform);for(var h=0;h<d.length;h++){var e=d[h];
a.toScreen(g,e.coords);g[1]=a.height-g[1];e.tileTransform.displayCoord[0]=2*g[0]*f-1;e.tileTransform.displayCoord[1]=2*g[1]*b-1;e.key.level===c&&4096===e.coordRange?e.tileTransform.transform.set(this._defaultTransform):this._calculateRelativeViewProjMat(this._tileInfo.lodAt(e.key.level).resolution,a.resolution,a.rotation,this._tileInfo.size[1],e.coordRange,a.width,a.height,e.tileTransform.transform)}};h.prototype._calculateRelativeViewProjMat=function(a,c,d,f,b,h,e,m){var l=.125;512!==f&&4096!==b&&
(l=f/b);a=a/c*l;this._tileCoordinateScale.set([a,a,1]);if(h!==this._displayWidth||e!==this._displayHeight)this._displayScale.set([2/h,-2/e,1]),this._displayWidth=h,this._displayHeight=e;g.identity(m);g.scale(m,m,this._tileCoordinateScale);g.rotate(m,m,-d*k.C_DEG_TO_RAD,this._orientationVec);g.scale(m,m,this._displayScale);g.transpose(m,m)};return h}(h)})},"esri/layers/vectorTiles/core/libs/gl-matrix/vec3":function(){define(["./common"],function(b){var e={create:function(){var a=new b.ARRAY_TYPE(3);
a[0]=0;a[1]=0;a[2]=0;return a},clone:function(a){var c=new b.ARRAY_TYPE(3);c[0]=a[0];c[1]=a[1];c[2]=a[2];return c},fromValues:function(a,c,d){var f=new b.ARRAY_TYPE(3);f[0]=a;f[1]=c;f[2]=d;return f},copy:function(a,c){a[0]=c[0];a[1]=c[1];a[2]=c[2];return a},set:function(a,c,d,f){a[0]=c;a[1]=d;a[2]=f;return a},add:function(a,c,d){a[0]=c[0]+d[0];a[1]=c[1]+d[1];a[2]=c[2]+d[2];return a},subtract:function(a,c,d){a[0]=c[0]-d[0];a[1]=c[1]-d[1];a[2]=c[2]-d[2];return a}};e.sub=e.subtract;e.multiply=function(a,
c,d){a[0]=c[0]*d[0];a[1]=c[1]*d[1];a[2]=c[2]*d[2];return a};e.mul=e.multiply;e.divide=function(a,c,d){a[0]=c[0]/d[0];a[1]=c[1]/d[1];a[2]=c[2]/d[2];return a};e.div=e.divide;e.ceil=function(a,c){a[0]=Math.ceil(c[0]);a[1]=Math.ceil(c[1]);a[2]=Math.ceil(c[2]);return a};e.floor=function(a,c){a[0]=Math.floor(c[0]);a[1]=Math.floor(c[1]);a[2]=Math.floor(c[2]);return a};e.min=function(a,c,d){a[0]=Math.min(c[0],d[0]);a[1]=Math.min(c[1],d[1]);a[2]=Math.min(c[2],d[2]);return a};e.max=function(a,c,d){a[0]=Math.max(c[0],
d[0]);a[1]=Math.max(c[1],d[1]);a[2]=Math.max(c[2],d[2]);return a};e.round=function(a,c){a[0]=Math.round(c[0]);a[1]=Math.round(c[1]);a[2]=Math.round(c[2]);return a};e.scale=function(a,c,d){a[0]=c[0]*d;a[1]=c[1]*d;a[2]=c[2]*d;return a};e.scaleAndAdd=function(a,c,d,f){a[0]=c[0]+d[0]*f;a[1]=c[1]+d[1]*f;a[2]=c[2]+d[2]*f;return a};e.distance=function(a,c){var d=c[0]-a[0],f=c[1]-a[1],b=c[2]-a[2];return Math.sqrt(d*d+f*f+b*b)};e.dist=e.distance;e.squaredDistance=function(a,c){var d=c[0]-a[0],f=c[1]-a[1],
b=c[2]-a[2];return d*d+f*f+b*b};e.sqrDist=e.squaredDistance;e.length=function(a){var c=a[0],d=a[1];a=a[2];return Math.sqrt(c*c+d*d+a*a)};e.len=e.length;e.squaredLength=function(a){var c=a[0],d=a[1];a=a[2];return c*c+d*d+a*a};e.sqrLen=e.squaredLength;e.negate=function(a,c){a[0]=-c[0];a[1]=-c[1];a[2]=-c[2];return a};e.inverse=function(a,c){a[0]=1/c[0];a[1]=1/c[1];a[2]=1/c[2];return a};e.normalize=function(a,c){var d=c[0],f=c[1],b=c[2],d=d*d+f*f+b*b;0<d&&(d=1/Math.sqrt(d),a[0]=c[0]*d,a[1]=c[1]*d,a[2]=
c[2]*d);return a};e.dot=function(a,c){return a[0]*c[0]+a[1]*c[1]+a[2]*c[2]};e.cross=function(a,c,d){var f=c[0],b=c[1];c=c[2];var h=d[0],e=d[1];d=d[2];a[0]=b*d-c*e;a[1]=c*h-f*d;a[2]=f*e-b*h;return a};e.lerp=function(a,c,d,f){var b=c[0],h=c[1];c=c[2];a[0]=b+f*(d[0]-b);a[1]=h+f*(d[1]-h);a[2]=c+f*(d[2]-c);return a};e.hermite=function(a,c,d,f,b,h){var g=h*h,e=g*(2*h-3)+1,l=g*(h-2)+h,p=g*(h-1);h=g*(3-2*h);a[0]=c[0]*e+d[0]*l+f[0]*p+b[0]*h;a[1]=c[1]*e+d[1]*l+f[1]*p+b[1]*h;a[2]=c[2]*e+d[2]*l+f[2]*p+b[2]*h;
return a};e.bezier=function(a,c,d,f,b,h){var g=1-h,e=g*g,l=h*h,p=e*g,e=3*h*e,g=3*l*g;h*=l;a[0]=c[0]*p+d[0]*e+f[0]*g+b[0]*h;a[1]=c[1]*p+d[1]*e+f[1]*g+b[1]*h;a[2]=c[2]*p+d[2]*e+f[2]*g+b[2]*h;return a};e.random=function(a,c){c=c||1;var d=2*b.RANDOM()*Math.PI,f=2*b.RANDOM()-1,g=Math.sqrt(1-f*f)*c;a[0]=Math.cos(d)*g;a[1]=Math.sin(d)*g;a[2]=f*c;return a};e.transformMat4=function(a,c,d){var f=c[0],b=c[1];c=c[2];var h=d[3]*f+d[7]*b+d[11]*c+d[15],h=h||1;a[0]=(d[0]*f+d[4]*b+d[8]*c+d[12])/h;a[1]=(d[1]*f+d[5]*
b+d[9]*c+d[13])/h;a[2]=(d[2]*f+d[6]*b+d[10]*c+d[14])/h;return a};e.transformMat3=function(a,c,d){var f=c[0],b=c[1];c=c[2];a[0]=f*d[0]+b*d[3]+c*d[6];a[1]=f*d[1]+b*d[4]+c*d[7];a[2]=f*d[2]+b*d[5]+c*d[8];return a};e.transformQuat=function(a,c,d){var f=c[0],b=c[1],h=c[2];c=d[0];var e=d[1],k=d[2];d=d[3];var l=d*f+e*h-k*b,p=d*b+k*f-c*h,n=d*h+c*b-e*f,f=-c*f-e*b-k*h;a[0]=l*d+f*-c+p*-k-n*-e;a[1]=p*d+f*-e+n*-c-l*-k;a[2]=n*d+f*-k+l*-e-p*-c;return a};e.rotateX=function(a,c,d,f){var b=[],h=[];b[0]=c[0]-d[0];b[1]=
c[1]-d[1];b[2]=c[2]-d[2];h[0]=b[0];h[1]=b[1]*Math.cos(f)-b[2]*Math.sin(f);h[2]=b[1]*Math.sin(f)+b[2]*Math.cos(f);a[0]=h[0]+d[0];a[1]=h[1]+d[1];a[2]=h[2]+d[2];return a};e.rotateY=function(a,c,d,f){var b=[],h=[];b[0]=c[0]-d[0];b[1]=c[1]-d[1];b[2]=c[2]-d[2];h[0]=b[2]*Math.sin(f)+b[0]*Math.cos(f);h[1]=b[1];h[2]=b[2]*Math.cos(f)-b[0]*Math.sin(f);a[0]=h[0]+d[0];a[1]=h[1]+d[1];a[2]=h[2]+d[2];return a};e.rotateZ=function(a,c,d,b){var f=[],h=[];f[0]=c[0]-d[0];f[1]=c[1]-d[1];f[2]=c[2]-d[2];h[0]=f[0]*Math.cos(b)-
f[1]*Math.sin(b);h[1]=f[0]*Math.sin(b)+f[1]*Math.cos(b);h[2]=f[2];a[0]=h[0]+d[0];a[1]=h[1]+d[1];a[2]=h[2]+d[2];return a};e.forEach=function(){var a=e.create();return function(c,d,b,g,h,e){d||(d=3);b||(b=0);for(g=g?Math.min(g*d+b,c.length):c.length;b<g;b+=d)a[0]=c[b],a[1]=c[b+1],a[2]=c[b+2],h(a,a,e),c[b]=a[0],c[b+1]=a[1],c[b+2]=a[2];return c}}();e.angle=function(a,c){var d=e.fromValues(a[0],a[1],a[2]),b=e.fromValues(c[0],c[1],c[2]);e.normalize(d,d);e.normalize(b,b);d=e.dot(d,b);return 1<d?0:Math.acos(d)};
e.str=function(a){return"vec3("+a[0]+", "+a[1]+", "+a[2]+")"};e.exactEquals=function(a,c){return a[0]===c[0]&&a[1]===c[1]&&a[2]===c[2]};e.equals=function(a,c){var d=a[0],f=a[1],g=a[2],h=c[0],e=c[1],k=c[2];return Math.abs(d-h)<=b.EPSILON*Math.max(1,Math.abs(d),Math.abs(h))&&Math.abs(f-e)<=b.EPSILON*Math.max(1,Math.abs(f),Math.abs(e))&&Math.abs(g-k)<=b.EPSILON*Math.max(1,Math.abs(g),Math.abs(k))};return e})},"esri/layers/vectorTiles/core/libs/gl-matrix/common":function(){define([],function(){var b=
{EPSILON:1E-6};b.ARRAY_TYPE="undefined"!==typeof Float32Array?Float32Array:Array;b.RANDOM=Math.random;b.ENABLE_SIMD=!1;b.SIMD_AVAILABLE=b.ARRAY_TYPE===Float32Array&&"SIMD"in this;b.USE_SIMD=b.ENABLE_SIMD&&b.SIMD_AVAILABLE;b.setMatrixArrayType=function(a){b.ARRAY_TYPE=a};var e=Math.PI/180;b.toRadian=function(a){return a*e};b.equals=function(a,c){return Math.abs(a-c)<=b.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))};return b})},"esri/layers/vectorTiles/core/libs/gl-matrix/mat4":function(){define(["./common"],
function(b){var e={scalar:{},SIMD:{},create:function(){var a=new b.ARRAY_TYPE(16);a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},clone:function(a){var c=new b.ARRAY_TYPE(16);c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c},copy:function(a,c){a[0]=c[0];a[1]=c[1];a[2]=c[2];a[3]=c[3];a[4]=
c[4];a[5]=c[5];a[6]=c[6];a[7]=c[7];a[8]=c[8];a[9]=c[9];a[10]=c[10];a[11]=c[11];a[12]=c[12];a[13]=c[13];a[14]=c[14];a[15]=c[15];return a},fromValues:function(a,c,d,f,g,h,e,k,l,p,n,q,t,r,u,w){var m=new b.ARRAY_TYPE(16);m[0]=a;m[1]=c;m[2]=d;m[3]=f;m[4]=g;m[5]=h;m[6]=e;m[7]=k;m[8]=l;m[9]=p;m[10]=n;m[11]=q;m[12]=t;m[13]=r;m[14]=u;m[15]=w;return m},set:function(a,c,d,b,g,h,e,k,l,p,n,q,t,r,u,w,v){a[0]=c;a[1]=d;a[2]=b;a[3]=g;a[4]=h;a[5]=e;a[6]=k;a[7]=l;a[8]=p;a[9]=n;a[10]=q;a[11]=t;a[12]=r;a[13]=u;a[14]=
w;a[15]=v;return a},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a}};e.scalar.transpose=function(a,c){if(a===c){var d=c[1],b=c[2],g=c[3],h=c[6],e=c[7],k=c[11];a[1]=c[4];a[2]=c[8];a[3]=c[12];a[4]=d;a[6]=c[9];a[7]=c[13];a[8]=b;a[9]=h;a[11]=c[14];a[12]=g;a[13]=e;a[14]=k}else a[0]=c[0],a[1]=c[4],a[2]=c[8],a[3]=c[12],a[4]=c[1],a[5]=c[5],a[6]=c[9],a[7]=c[13],a[8]=c[2],a[9]=c[6],a[10]=c[10],a[11]=c[14],a[12]=
c[3],a[13]=c[7],a[14]=c[11],a[15]=c[15];return a};e.SIMD.transpose=function(a,c){var d,b,g,h,e,k,l;d=SIMD.Float32x4.load(c,0);b=SIMD.Float32x4.load(c,4);g=SIMD.Float32x4.load(c,8);h=SIMD.Float32x4.load(c,12);e=SIMD.Float32x4.shuffle(d,b,0,1,4,5);k=SIMD.Float32x4.shuffle(g,h,0,1,4,5);l=SIMD.Float32x4.shuffle(e,k,0,2,4,6);e=SIMD.Float32x4.shuffle(e,k,1,3,5,7);SIMD.Float32x4.store(a,0,l);SIMD.Float32x4.store(a,4,e);e=SIMD.Float32x4.shuffle(d,b,2,3,6,7);k=SIMD.Float32x4.shuffle(g,h,2,3,6,7);d=SIMD.Float32x4.shuffle(e,
k,0,2,4,6);b=SIMD.Float32x4.shuffle(e,k,1,3,5,7);SIMD.Float32x4.store(a,8,d);SIMD.Float32x4.store(a,12,b);return a};e.transpose=b.USE_SIMD?e.SIMD.transpose:e.scalar.transpose;e.scalar.invert=function(a,c){var d=c[0],b=c[1],g=c[2],h=c[3],e=c[4],k=c[5],l=c[6],p=c[7],n=c[8],q=c[9],t=c[10],r=c[11],u=c[12],w=c[13],v=c[14],y=c[15],x=d*k-b*e,z=d*l-g*e,A=d*p-h*e,B=b*l-g*k,D=b*p-h*k,F=g*p-h*l,C=n*w-q*u,H=n*v-t*u,E=n*y-r*u,M=q*v-t*w,N=q*y-r*w,J=t*y-r*v,G=x*J-z*N+A*M+B*E-D*H+F*C;if(!G)return null;G=1/G;a[0]=
(k*J-l*N+p*M)*G;a[1]=(g*N-b*J-h*M)*G;a[2]=(w*F-v*D+y*B)*G;a[3]=(t*D-q*F-r*B)*G;a[4]=(l*E-e*J-p*H)*G;a[5]=(d*J-g*E+h*H)*G;a[6]=(v*A-u*F-y*z)*G;a[7]=(n*F-t*A+r*z)*G;a[8]=(e*N-k*E+p*C)*G;a[9]=(b*E-d*N-h*C)*G;a[10]=(u*D-w*A+y*x)*G;a[11]=(q*A-n*D-r*x)*G;a[12]=(k*H-e*M-l*C)*G;a[13]=(d*M-b*H+g*C)*G;a[14]=(w*z-u*B-v*x)*G;a[15]=(n*B-q*z+t*x)*G;return a};e.SIMD.invert=function(a,c){var d,b,g,h,e,k,l,p,n;k=SIMD.Float32x4.load(c,0);l=SIMD.Float32x4.load(c,4);p=SIMD.Float32x4.load(c,8);n=SIMD.Float32x4.load(c,
12);e=SIMD.Float32x4.shuffle(k,l,0,1,4,5);b=SIMD.Float32x4.shuffle(p,n,0,1,4,5);d=SIMD.Float32x4.shuffle(e,b,0,2,4,6);b=SIMD.Float32x4.shuffle(b,e,1,3,5,7);e=SIMD.Float32x4.shuffle(k,l,2,3,6,7);h=SIMD.Float32x4.shuffle(p,n,2,3,6,7);g=SIMD.Float32x4.shuffle(e,h,0,2,4,6);h=SIMD.Float32x4.shuffle(h,e,1,3,5,7);e=SIMD.Float32x4.mul(g,h);e=SIMD.Float32x4.swizzle(e,1,0,3,2);k=SIMD.Float32x4.mul(b,e);l=SIMD.Float32x4.mul(d,e);e=SIMD.Float32x4.swizzle(e,2,3,0,1);k=SIMD.Float32x4.sub(SIMD.Float32x4.mul(b,e),
k);l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,e),l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);e=SIMD.Float32x4.mul(b,g);e=SIMD.Float32x4.swizzle(e,1,0,3,2);k=SIMD.Float32x4.add(SIMD.Float32x4.mul(h,e),k);n=SIMD.Float32x4.mul(d,e);e=SIMD.Float32x4.swizzle(e,2,3,0,1);k=SIMD.Float32x4.sub(k,SIMD.Float32x4.mul(h,e));n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,e),n);n=SIMD.Float32x4.swizzle(n,2,3,0,1);e=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(b,2,3,0,1),h);e=SIMD.Float32x4.swizzle(e,1,0,3,2);g=SIMD.Float32x4.swizzle(g,
2,3,0,1);k=SIMD.Float32x4.add(SIMD.Float32x4.mul(g,e),k);p=SIMD.Float32x4.mul(d,e);e=SIMD.Float32x4.swizzle(e,2,3,0,1);k=SIMD.Float32x4.sub(k,SIMD.Float32x4.mul(g,e));p=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,e),p);p=SIMD.Float32x4.swizzle(p,2,3,0,1);e=SIMD.Float32x4.mul(d,b);e=SIMD.Float32x4.swizzle(e,1,0,3,2);p=SIMD.Float32x4.add(SIMD.Float32x4.mul(h,e),p);n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(g,e),n);e=SIMD.Float32x4.swizzle(e,2,3,0,1);p=SIMD.Float32x4.sub(SIMD.Float32x4.mul(h,e),p);n=SIMD.Float32x4.sub(n,
SIMD.Float32x4.mul(g,e));e=SIMD.Float32x4.mul(d,h);e=SIMD.Float32x4.swizzle(e,1,0,3,2);l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(g,e));p=SIMD.Float32x4.add(SIMD.Float32x4.mul(b,e),p);e=SIMD.Float32x4.swizzle(e,2,3,0,1);l=SIMD.Float32x4.add(SIMD.Float32x4.mul(g,e),l);p=SIMD.Float32x4.sub(p,SIMD.Float32x4.mul(b,e));e=SIMD.Float32x4.mul(d,g);e=SIMD.Float32x4.swizzle(e,1,0,3,2);l=SIMD.Float32x4.add(SIMD.Float32x4.mul(h,e),l);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(b,e));e=SIMD.Float32x4.swizzle(e,2,
3,0,1);l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(h,e));n=SIMD.Float32x4.add(SIMD.Float32x4.mul(b,e),n);d=SIMD.Float32x4.mul(d,k);d=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(d,2,3,0,1),d);d=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(d,1,0,3,2),d);e=SIMD.Float32x4.reciprocalApproximation(d);d=SIMD.Float32x4.sub(SIMD.Float32x4.add(e,e),SIMD.Float32x4.mul(d,SIMD.Float32x4.mul(e,e)));d=SIMD.Float32x4.swizzle(d,0,0,0,0);if(!d)return null;SIMD.Float32x4.store(a,0,SIMD.Float32x4.mul(d,k));SIMD.Float32x4.store(a,
4,SIMD.Float32x4.mul(d,l));SIMD.Float32x4.store(a,8,SIMD.Float32x4.mul(d,p));SIMD.Float32x4.store(a,12,SIMD.Float32x4.mul(d,n));return a};e.invert=b.USE_SIMD?e.SIMD.invert:e.scalar.invert;e.scalar.adjoint=function(a,c){var d=c[0],b=c[1],g=c[2],h=c[3],e=c[4],k=c[5],l=c[6],p=c[7],n=c[8],q=c[9],t=c[10],r=c[11],u=c[12],w=c[13],v=c[14],y=c[15];a[0]=k*(t*y-r*v)-q*(l*y-p*v)+w*(l*r-p*t);a[1]=-(b*(t*y-r*v)-q*(g*y-h*v)+w*(g*r-h*t));a[2]=b*(l*y-p*v)-k*(g*y-h*v)+w*(g*p-h*l);a[3]=-(b*(l*r-p*t)-k*(g*r-h*t)+q*(g*
p-h*l));a[4]=-(e*(t*y-r*v)-n*(l*y-p*v)+u*(l*r-p*t));a[5]=d*(t*y-r*v)-n*(g*y-h*v)+u*(g*r-h*t);a[6]=-(d*(l*y-p*v)-e*(g*y-h*v)+u*(g*p-h*l));a[7]=d*(l*r-p*t)-e*(g*r-h*t)+n*(g*p-h*l);a[8]=e*(q*y-r*w)-n*(k*y-p*w)+u*(k*r-p*q);a[9]=-(d*(q*y-r*w)-n*(b*y-h*w)+u*(b*r-h*q));a[10]=d*(k*y-p*w)-e*(b*y-h*w)+u*(b*p-h*k);a[11]=-(d*(k*r-p*q)-e*(b*r-h*q)+n*(b*p-h*k));a[12]=-(e*(q*v-t*w)-n*(k*v-l*w)+u*(k*t-l*q));a[13]=d*(q*v-t*w)-n*(b*v-g*w)+u*(b*t-g*q);a[14]=-(d*(k*v-l*w)-e*(b*v-g*w)+u*(b*l-g*k));a[15]=d*(k*t-l*q)-e*
(b*t-g*q)+n*(b*l-g*k);return a};e.SIMD.adjoint=function(a,c){var d,b,g,h,e,k,l,p,n;d=SIMD.Float32x4.load(c,0);b=SIMD.Float32x4.load(c,4);g=SIMD.Float32x4.load(c,8);h=SIMD.Float32x4.load(c,12);l=SIMD.Float32x4.shuffle(d,b,0,1,4,5);k=SIMD.Float32x4.shuffle(g,h,0,1,4,5);e=SIMD.Float32x4.shuffle(l,k,0,2,4,6);k=SIMD.Float32x4.shuffle(k,l,1,3,5,7);l=SIMD.Float32x4.shuffle(d,b,2,3,6,7);b=SIMD.Float32x4.shuffle(g,h,2,3,6,7);d=SIMD.Float32x4.shuffle(l,b,0,2,4,6);b=SIMD.Float32x4.shuffle(b,l,1,3,5,7);l=SIMD.Float32x4.mul(d,
b);l=SIMD.Float32x4.swizzle(l,1,0,3,2);g=SIMD.Float32x4.mul(k,l);h=SIMD.Float32x4.mul(e,l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);g=SIMD.Float32x4.sub(SIMD.Float32x4.mul(k,l),g);h=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,l),h);h=SIMD.Float32x4.swizzle(h,2,3,0,1);l=SIMD.Float32x4.mul(k,d);l=SIMD.Float32x4.swizzle(l,1,0,3,2);g=SIMD.Float32x4.add(SIMD.Float32x4.mul(b,l),g);n=SIMD.Float32x4.mul(e,l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);g=SIMD.Float32x4.sub(g,SIMD.Float32x4.mul(b,l));n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,
l),n);n=SIMD.Float32x4.swizzle(n,2,3,0,1);l=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(k,2,3,0,1),b);l=SIMD.Float32x4.swizzle(l,1,0,3,2);d=SIMD.Float32x4.swizzle(d,2,3,0,1);g=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,l),g);p=SIMD.Float32x4.mul(e,l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);g=SIMD.Float32x4.sub(g,SIMD.Float32x4.mul(d,l));p=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,l),p);p=SIMD.Float32x4.swizzle(p,2,3,0,1);l=SIMD.Float32x4.mul(e,k);l=SIMD.Float32x4.swizzle(l,1,0,3,2);p=SIMD.Float32x4.add(SIMD.Float32x4.mul(b,
l),p);n=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,l),n);l=SIMD.Float32x4.swizzle(l,2,3,0,1);p=SIMD.Float32x4.sub(SIMD.Float32x4.mul(b,l),p);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(d,l));l=SIMD.Float32x4.mul(e,b);l=SIMD.Float32x4.swizzle(l,1,0,3,2);h=SIMD.Float32x4.sub(h,SIMD.Float32x4.mul(d,l));p=SIMD.Float32x4.add(SIMD.Float32x4.mul(k,l),p);l=SIMD.Float32x4.swizzle(l,2,3,0,1);h=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,l),h);p=SIMD.Float32x4.sub(p,SIMD.Float32x4.mul(k,l));l=SIMD.Float32x4.mul(e,d);
l=SIMD.Float32x4.swizzle(l,1,0,3,2);h=SIMD.Float32x4.add(SIMD.Float32x4.mul(b,l),h);n=SIMD.Float32x4.sub(n,SIMD.Float32x4.mul(k,l));l=SIMD.Float32x4.swizzle(l,2,3,0,1);h=SIMD.Float32x4.sub(h,SIMD.Float32x4.mul(b,l));n=SIMD.Float32x4.add(SIMD.Float32x4.mul(k,l),n);SIMD.Float32x4.store(a,0,g);SIMD.Float32x4.store(a,4,h);SIMD.Float32x4.store(a,8,p);SIMD.Float32x4.store(a,12,n);return a};e.adjoint=b.USE_SIMD?e.SIMD.adjoint:e.scalar.adjoint;e.determinant=function(a){var c=a[0],d=a[1],b=a[2],g=a[3],h=a[4],
e=a[5],k=a[6],l=a[7],p=a[8],n=a[9],q=a[10],t=a[11],r=a[12],u=a[13],w=a[14];a=a[15];return(c*e-d*h)*(q*a-t*w)-(c*k-b*h)*(n*a-t*u)+(c*l-g*h)*(n*w-q*u)+(d*k-b*e)*(p*a-t*r)-(d*l-g*e)*(p*w-q*r)+(b*l-g*k)*(p*u-n*r)};e.SIMD.multiply=function(a,c,d){var b=SIMD.Float32x4.load(c,0),g=SIMD.Float32x4.load(c,4),h=SIMD.Float32x4.load(c,8);c=SIMD.Float32x4.load(c,12);var e=SIMD.Float32x4.load(d,0),e=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,0,0,0,0),b),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,
1,1,1,1),g),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,2,2,2,2),h),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,3,3,3,3),c))));SIMD.Float32x4.store(a,0,e);e=SIMD.Float32x4.load(d,4);e=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,0,0,0,0),b),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,1,1,1,1),g),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,2,2,2,2),h),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,3,3,3,3),c))));SIMD.Float32x4.store(a,
4,e);e=SIMD.Float32x4.load(d,8);e=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,0,0,0,0),b),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,1,1,1,1),g),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,2,2,2,2),h),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,3,3,3,3),c))));SIMD.Float32x4.store(a,8,e);d=SIMD.Float32x4.load(d,12);b=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,0,0,0,0),b),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,
1,1,1,1),g),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,2,2,2,2),h),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,3,3,3,3),c))));SIMD.Float32x4.store(a,12,b);return a};e.scalar.multiply=function(a,c,d){var b=c[0],g=c[1],h=c[2],e=c[3],k=c[4],l=c[5],p=c[6],n=c[7],q=c[8],t=c[9],r=c[10],u=c[11],w=c[12],v=c[13],y=c[14];c=c[15];var x=d[0],z=d[1],A=d[2],B=d[3];a[0]=x*b+z*k+A*q+B*w;a[1]=x*g+z*l+A*t+B*v;a[2]=x*h+z*p+A*r+B*y;a[3]=x*e+z*n+A*u+B*c;x=d[4];z=d[5];A=d[6];B=d[7];a[4]=x*b+z*k+A*q+
B*w;a[5]=x*g+z*l+A*t+B*v;a[6]=x*h+z*p+A*r+B*y;a[7]=x*e+z*n+A*u+B*c;x=d[8];z=d[9];A=d[10];B=d[11];a[8]=x*b+z*k+A*q+B*w;a[9]=x*g+z*l+A*t+B*v;a[10]=x*h+z*p+A*r+B*y;a[11]=x*e+z*n+A*u+B*c;x=d[12];z=d[13];A=d[14];B=d[15];a[12]=x*b+z*k+A*q+B*w;a[13]=x*g+z*l+A*t+B*v;a[14]=x*h+z*p+A*r+B*y;a[15]=x*e+z*n+A*u+B*c;return a};e.multiply=b.USE_SIMD?e.SIMD.multiply:e.scalar.multiply;e.mul=e.multiply;e.scalar.translate=function(a,c,d){var b=d[0],g=d[1];d=d[2];var h,e,k,l,p,n,q,t,r,u,w,v;c===a?(a[12]=c[0]*b+c[4]*g+
c[8]*d+c[12],a[13]=c[1]*b+c[5]*g+c[9]*d+c[13],a[14]=c[2]*b+c[6]*g+c[10]*d+c[14],a[15]=c[3]*b+c[7]*g+c[11]*d+c[15]):(h=c[0],e=c[1],k=c[2],l=c[3],p=c[4],n=c[5],q=c[6],t=c[7],r=c[8],u=c[9],w=c[10],v=c[11],a[0]=h,a[1]=e,a[2]=k,a[3]=l,a[4]=p,a[5]=n,a[6]=q,a[7]=t,a[8]=r,a[9]=u,a[10]=w,a[11]=v,a[12]=h*b+p*g+r*d+c[12],a[13]=e*b+n*g+u*d+c[13],a[14]=k*b+q*g+w*d+c[14],a[15]=l*b+t*g+v*d+c[15]);return a};e.SIMD.translate=function(a,c,d){var b=SIMD.Float32x4.load(c,0),g=SIMD.Float32x4.load(c,4),h=SIMD.Float32x4.load(c,
8),e=SIMD.Float32x4.load(c,12);d=SIMD.Float32x4(d[0],d[1],d[2],0);c!==a&&(a[0]=c[0],a[1]=c[1],a[2]=c[2],a[3]=c[3],a[4]=c[4],a[5]=c[5],a[6]=c[6],a[7]=c[7],a[8]=c[8],a[9]=c[9],a[10]=c[10],a[11]=c[11]);b=SIMD.Float32x4.mul(b,SIMD.Float32x4.swizzle(d,0,0,0,0));g=SIMD.Float32x4.mul(g,SIMD.Float32x4.swizzle(d,1,1,1,1));h=SIMD.Float32x4.mul(h,SIMD.Float32x4.swizzle(d,2,2,2,2));c=SIMD.Float32x4.add(b,SIMD.Float32x4.add(g,SIMD.Float32x4.add(h,e)));SIMD.Float32x4.store(a,12,c);return a};e.translate=b.USE_SIMD?
e.SIMD.translate:e.scalar.translate;e.scalar.scale=function(a,c,d){var b=d[0],g=d[1];d=d[2];a[0]=c[0]*b;a[1]=c[1]*b;a[2]=c[2]*b;a[3]=c[3]*b;a[4]=c[4]*g;a[5]=c[5]*g;a[6]=c[6]*g;a[7]=c[7]*g;a[8]=c[8]*d;a[9]=c[9]*d;a[10]=c[10]*d;a[11]=c[11]*d;a[12]=c[12];a[13]=c[13];a[14]=c[14];a[15]=c[15];return a};e.SIMD.scale=function(a,c,d){var b;d=SIMD.Float32x4(d[0],d[1],d[2],0);b=SIMD.Float32x4.load(c,0);SIMD.Float32x4.store(a,0,SIMD.Float32x4.mul(b,SIMD.Float32x4.swizzle(d,0,0,0,0)));b=SIMD.Float32x4.load(c,
4);SIMD.Float32x4.store(a,4,SIMD.Float32x4.mul(b,SIMD.Float32x4.swizzle(d,1,1,1,1)));b=SIMD.Float32x4.load(c,8);SIMD.Float32x4.store(a,8,SIMD.Float32x4.mul(b,SIMD.Float32x4.swizzle(d,2,2,2,2)));a[12]=c[12];a[13]=c[13];a[14]=c[14];a[15]=c[15];return a};e.scale=b.USE_SIMD?e.SIMD.scale:e.scalar.scale;e.rotate=function(a,c,d,f){var g=f[0],h=f[1];f=f[2];var e=Math.sqrt(g*g+h*h+f*f),k,l,p,n,q,t,r,u,w,v,y,x,z,A,B,D,F,C,H,E;if(Math.abs(e)<b.EPSILON)return null;e=1/e;g*=e;h*=e;f*=e;k=Math.sin(d);l=Math.cos(d);
p=1-l;d=c[0];e=c[1];n=c[2];q=c[3];t=c[4];r=c[5];u=c[6];w=c[7];v=c[8];y=c[9];x=c[10];z=c[11];A=g*g*p+l;B=h*g*p+f*k;D=f*g*p-h*k;F=g*h*p-f*k;C=h*h*p+l;H=f*h*p+g*k;E=g*f*p+h*k;g=h*f*p-g*k;h=f*f*p+l;a[0]=d*A+t*B+v*D;a[1]=e*A+r*B+y*D;a[2]=n*A+u*B+x*D;a[3]=q*A+w*B+z*D;a[4]=d*F+t*C+v*H;a[5]=e*F+r*C+y*H;a[6]=n*F+u*C+x*H;a[7]=q*F+w*C+z*H;a[8]=d*E+t*g+v*h;a[9]=e*E+r*g+y*h;a[10]=n*E+u*g+x*h;a[11]=q*E+w*g+z*h;c!==a&&(a[12]=c[12],a[13]=c[13],a[14]=c[14],a[15]=c[15]);return a};e.scalar.rotateX=function(a,c,d){var b=
Math.sin(d);d=Math.cos(d);var g=c[4],h=c[5],e=c[6],k=c[7],l=c[8],p=c[9],n=c[10],q=c[11];c!==a&&(a[0]=c[0],a[1]=c[1],a[2]=c[2],a[3]=c[3],a[12]=c[12],a[13]=c[13],a[14]=c[14],a[15]=c[15]);a[4]=g*d+l*b;a[5]=h*d+p*b;a[6]=e*d+n*b;a[7]=k*d+q*b;a[8]=l*d-g*b;a[9]=p*d-h*b;a[10]=n*d-e*b;a[11]=q*d-k*b;return a};e.SIMD.rotateX=function(a,c,d){var b=SIMD.Float32x4.splat(Math.sin(d));d=SIMD.Float32x4.splat(Math.cos(d));c!==a&&(a[0]=c[0],a[1]=c[1],a[2]=c[2],a[3]=c[3],a[12]=c[12],a[13]=c[13],a[14]=c[14],a[15]=c[15]);
var g=SIMD.Float32x4.load(c,4);c=SIMD.Float32x4.load(c,8);SIMD.Float32x4.store(a,4,SIMD.Float32x4.add(SIMD.Float32x4.mul(g,d),SIMD.Float32x4.mul(c,b)));SIMD.Float32x4.store(a,8,SIMD.Float32x4.sub(SIMD.Float32x4.mul(c,d),SIMD.Float32x4.mul(g,b)));return a};e.rotateX=b.USE_SIMD?e.SIMD.rotateX:e.scalar.rotateX;e.scalar.rotateY=function(a,c,d){var b=Math.sin(d);d=Math.cos(d);var g=c[0],h=c[1],e=c[2],k=c[3],l=c[8],p=c[9],n=c[10],q=c[11];c!==a&&(a[4]=c[4],a[5]=c[5],a[6]=c[6],a[7]=c[7],a[12]=c[12],a[13]=
c[13],a[14]=c[14],a[15]=c[15]);a[0]=g*d-l*b;a[1]=h*d-p*b;a[2]=e*d-n*b;a[3]=k*d-q*b;a[8]=g*b+l*d;a[9]=h*b+p*d;a[10]=e*b+n*d;a[11]=k*b+q*d;return a};e.SIMD.rotateY=function(a,c,d){var b=SIMD.Float32x4.splat(Math.sin(d));d=SIMD.Float32x4.splat(Math.cos(d));c!==a&&(a[4]=c[4],a[5]=c[5],a[6]=c[6],a[7]=c[7],a[12]=c[12],a[13]=c[13],a[14]=c[14],a[15]=c[15]);var g=SIMD.Float32x4.load(c,0);c=SIMD.Float32x4.load(c,8);SIMD.Float32x4.store(a,0,SIMD.Float32x4.sub(SIMD.Float32x4.mul(g,d),SIMD.Float32x4.mul(c,b)));
SIMD.Float32x4.store(a,8,SIMD.Float32x4.add(SIMD.Float32x4.mul(g,b),SIMD.Float32x4.mul(c,d)));return a};e.rotateY=b.USE_SIMD?e.SIMD.rotateY:e.scalar.rotateY;e.scalar.rotateZ=function(a,c,d){var b=Math.sin(d);d=Math.cos(d);var g=c[0],h=c[1],e=c[2],k=c[3],l=c[4],p=c[5],n=c[6],q=c[7];c!==a&&(a[8]=c[8],a[9]=c[9],a[10]=c[10],a[11]=c[11],a[12]=c[12],a[13]=c[13],a[14]=c[14],a[15]=c[15]);a[0]=g*d+l*b;a[1]=h*d+p*b;a[2]=e*d+n*b;a[3]=k*d+q*b;a[4]=l*d-g*b;a[5]=p*d-h*b;a[6]=n*d-e*b;a[7]=q*d-k*b;return a};e.SIMD.rotateZ=
function(a,c,d){var b=SIMD.Float32x4.splat(Math.sin(d));d=SIMD.Float32x4.splat(Math.cos(d));c!==a&&(a[8]=c[8],a[9]=c[9],a[10]=c[10],a[11]=c[11],a[12]=c[12],a[13]=c[13],a[14]=c[14],a[15]=c[15]);var g=SIMD.Float32x4.load(c,0);c=SIMD.Float32x4.load(c,4);SIMD.Float32x4.store(a,0,SIMD.Float32x4.add(SIMD.Float32x4.mul(g,d),SIMD.Float32x4.mul(c,b)));SIMD.Float32x4.store(a,4,SIMD.Float32x4.sub(SIMD.Float32x4.mul(c,d),SIMD.Float32x4.mul(g,b)));return a};e.rotateZ=b.USE_SIMD?e.SIMD.rotateZ:e.scalar.rotateZ;
e.fromTranslation=function(a,c){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=c[0];a[13]=c[1];a[14]=c[2];a[15]=1;return a};e.fromScaling=function(a,c){a[0]=c[0];a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=c[1];a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=c[2];a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};e.fromRotation=function(a,c,d){var f=d[0],g=d[1];d=d[2];var h=Math.sqrt(f*f+g*g+d*d),e;if(Math.abs(h)<b.EPSILON)return null;h=1/h;f*=h;g*=h;d*=h;h=Math.sin(c);c=Math.cos(c);
e=1-c;a[0]=f*f*e+c;a[1]=g*f*e+d*h;a[2]=d*f*e-g*h;a[3]=0;a[4]=f*g*e-d*h;a[5]=g*g*e+c;a[6]=d*g*e+f*h;a[7]=0;a[8]=f*d*e+g*h;a[9]=g*d*e-f*h;a[10]=d*d*e+c;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};e.fromXRotation=function(a,c){var d=Math.sin(c),b=Math.cos(c);a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=d;a[7]=0;a[8]=0;a[9]=-d;a[10]=b;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};e.fromYRotation=function(a,c){var d=Math.sin(c),b=Math.cos(c);a[0]=b;a[1]=0;a[2]=-d;a[3]=0;a[4]=0;a[5]=1;a[6]=
0;a[7]=0;a[8]=d;a[9]=0;a[10]=b;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};e.fromZRotation=function(a,c){var d=Math.sin(c),b=Math.cos(c);a[0]=b;a[1]=d;a[2]=0;a[3]=0;a[4]=-d;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};e.fromRotationTranslation=function(a,c,d){var b=c[0],g=c[1],e=c[2],m=c[3],k=b+b,l=g+g,p=e+e;c=b*k;var n=b*l,b=b*p,q=g*l,g=g*p,e=e*p,k=m*k,l=m*l,m=m*p;a[0]=1-(q+e);a[1]=n+m;a[2]=b-l;a[3]=0;a[4]=n-m;a[5]=1-(c+e);a[6]=g+k;a[7]=0;a[8]=
b+l;a[9]=g-k;a[10]=1-(c+q);a[11]=0;a[12]=d[0];a[13]=d[1];a[14]=d[2];a[15]=1;return a};e.getTranslation=function(a,c){a[0]=c[12];a[1]=c[13];a[2]=c[14];return a};e.getRotation=function(a,c){var d=c[0]+c[5]+c[10],b=0;0<d?(b=2*Math.sqrt(d+1),a[3]=.25*b,a[0]=(c[6]-c[9])/b,a[1]=(c[8]-c[2])/b,a[2]=(c[1]-c[4])/b):c[0]>c[5]&c[0]>c[10]?(b=2*Math.sqrt(1+c[0]-c[5]-c[10]),a[3]=(c[6]-c[9])/b,a[0]=.25*b,a[1]=(c[1]+c[4])/b,a[2]=(c[8]+c[2])/b):c[5]>c[10]?(b=2*Math.sqrt(1+c[5]-c[0]-c[10]),a[3]=(c[8]-c[2])/b,a[0]=(c[1]+
c[4])/b,a[1]=.25*b,a[2]=(c[6]+c[9])/b):(b=2*Math.sqrt(1+c[10]-c[0]-c[5]),a[3]=(c[1]-c[4])/b,a[0]=(c[8]+c[2])/b,a[1]=(c[6]+c[9])/b,a[2]=.25*b);return a};e.fromRotationTranslationScale=function(a,c,d,b){var f=c[0],e=c[1],m=c[2],k=c[3],l=f+f,p=e+e,n=m+m;c=f*l;var q=f*p,f=f*n,t=e*p,e=e*n,m=m*n,l=k*l,p=k*p,k=k*n,n=b[0],r=b[1];b=b[2];a[0]=(1-(t+m))*n;a[1]=(q+k)*n;a[2]=(f-p)*n;a[3]=0;a[4]=(q-k)*r;a[5]=(1-(c+m))*r;a[6]=(e+l)*r;a[7]=0;a[8]=(f+p)*b;a[9]=(e-l)*b;a[10]=(1-(c+t))*b;a[11]=0;a[12]=d[0];a[13]=d[1];
a[14]=d[2];a[15]=1;return a};e.fromRotationTranslationScaleOrigin=function(a,c,b,f,g){var d=c[0],e=c[1],k=c[2],l=c[3],p=d+d,n=e+e,q=k+k;c=d*p;var t=d*n,d=d*q,r=e*n,e=e*q,k=k*q,p=l*p,n=l*n,l=l*q,q=f[0],u=f[1];f=f[2];var w=g[0],v=g[1];g=g[2];a[0]=(1-(r+k))*q;a[1]=(t+l)*q;a[2]=(d-n)*q;a[3]=0;a[4]=(t-l)*u;a[5]=(1-(c+k))*u;a[6]=(e+p)*u;a[7]=0;a[8]=(d+n)*f;a[9]=(e-p)*f;a[10]=(1-(c+r))*f;a[11]=0;a[12]=b[0]+w-(a[0]*w+a[4]*v+a[8]*g);a[13]=b[1]+v-(a[1]*w+a[5]*v+a[9]*g);a[14]=b[2]+g-(a[2]*w+a[6]*v+a[10]*g);
a[15]=1;return a};e.fromQuat=function(a,c){var b=c[0],f=c[1],g=c[2],e=c[3],m=b+b,k=f+f,l=g+g,b=b*m,p=f*m,f=f*k,n=g*m,q=g*k,g=g*l,m=e*m,k=e*k,e=e*l;a[0]=1-f-g;a[1]=p+e;a[2]=n-k;a[3]=0;a[4]=p-e;a[5]=1-b-g;a[6]=q+m;a[7]=0;a[8]=n+k;a[9]=q-m;a[10]=1-b-f;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};e.frustum=function(a,c,b,f,g,e,m){var d=1/(b-c),h=1/(g-f),p=1/(e-m);a[0]=2*e*d;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=2*e*h;a[6]=0;a[7]=0;a[8]=(b+c)*d;a[9]=(g+f)*h;a[10]=(m+e)*p;a[11]=-1;a[12]=0;a[13]=0;a[14]=
m*e*2*p;a[15]=0;return a};e.perspective=function(a,c,b,f,g){c=1/Math.tan(c/2);var d=1/(f-g);a[0]=c/b;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=c;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=(g+f)*d;a[11]=-1;a[12]=0;a[13]=0;a[14]=2*g*f*d;a[15]=0;return a};e.perspectiveFromFieldOfView=function(a,c,b,f){var d=Math.tan(c.upDegrees*Math.PI/180),e=Math.tan(c.downDegrees*Math.PI/180),m=Math.tan(c.leftDegrees*Math.PI/180);c=Math.tan(c.rightDegrees*Math.PI/180);var k=2/(m+c),l=2/(d+e);a[0]=k;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=
l;a[6]=0;a[7]=0;a[8]=-((m-c)*k*.5);a[9]=(d-e)*l*.5;a[10]=f/(b-f);a[11]=-1;a[12]=0;a[13]=0;a[14]=f*b/(b-f);a[15]=0;return a};e.ortho=function(a,c,b,f,g,e,m){var d=1/(c-b),h=1/(f-g),p=1/(e-m);a[0]=-2*d;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=-2*h;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=2*p;a[11]=0;a[12]=(c+b)*d;a[13]=(g+f)*h;a[14]=(m+e)*p;a[15]=1;return a};e.lookAt=function(a,c,d,f){var g,h,m,k,l,p,n,q,t=c[0],r=c[1];c=c[2];m=f[0];k=f[1];h=f[2];n=d[0];f=d[1];g=d[2];if(Math.abs(t-n)<b.EPSILON&&Math.abs(r-f)<b.EPSILON&&
Math.abs(c-g)<b.EPSILON)return e.identity(a);d=t-n;f=r-f;n=c-g;q=1/Math.sqrt(d*d+f*f+n*n);d*=q;f*=q;n*=q;g=k*n-h*f;h=h*d-m*n;m=m*f-k*d;(q=Math.sqrt(g*g+h*h+m*m))?(q=1/q,g*=q,h*=q,m*=q):m=h=g=0;k=f*m-n*h;l=n*g-d*m;p=d*h-f*g;(q=Math.sqrt(k*k+l*l+p*p))?(q=1/q,k*=q,l*=q,p*=q):p=l=k=0;a[0]=g;a[1]=k;a[2]=d;a[3]=0;a[4]=h;a[5]=l;a[6]=f;a[7]=0;a[8]=m;a[9]=p;a[10]=n;a[11]=0;a[12]=-(g*t+h*r+m*c);a[13]=-(k*t+l*r+p*c);a[14]=-(d*t+f*r+n*c);a[15]=1;return a};e.str=function(a){return"mat4("+a[0]+", "+a[1]+", "+a[2]+
", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+")"};e.frob=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)+Math.pow(a[3],2)+Math.pow(a[4],2)+Math.pow(a[5],2)+Math.pow(a[6],2)+Math.pow(a[7],2)+Math.pow(a[8],2)+Math.pow(a[9],2)+Math.pow(a[10],2)+Math.pow(a[11],2)+Math.pow(a[12],2)+Math.pow(a[13],2)+Math.pow(a[14],2)+Math.pow(a[15],2))};e.add=function(a,c,b){a[0]=c[0]+b[0];a[1]=c[1]+
b[1];a[2]=c[2]+b[2];a[3]=c[3]+b[3];a[4]=c[4]+b[4];a[5]=c[5]+b[5];a[6]=c[6]+b[6];a[7]=c[7]+b[7];a[8]=c[8]+b[8];a[9]=c[9]+b[9];a[10]=c[10]+b[10];a[11]=c[11]+b[11];a[12]=c[12]+b[12];a[13]=c[13]+b[13];a[14]=c[14]+b[14];a[15]=c[15]+b[15];return a};e.subtract=function(a,c,b){a[0]=c[0]-b[0];a[1]=c[1]-b[1];a[2]=c[2]-b[2];a[3]=c[3]-b[3];a[4]=c[4]-b[4];a[5]=c[5]-b[5];a[6]=c[6]-b[6];a[7]=c[7]-b[7];a[8]=c[8]-b[8];a[9]=c[9]-b[9];a[10]=c[10]-b[10];a[11]=c[11]-b[11];a[12]=c[12]-b[12];a[13]=c[13]-b[13];a[14]=c[14]-
b[14];a[15]=c[15]-b[15];return a};e.sub=e.subtract;e.multiplyScalar=function(a,c,b){a[0]=c[0]*b;a[1]=c[1]*b;a[2]=c[2]*b;a[3]=c[3]*b;a[4]=c[4]*b;a[5]=c[5]*b;a[6]=c[6]*b;a[7]=c[7]*b;a[8]=c[8]*b;a[9]=c[9]*b;a[10]=c[10]*b;a[11]=c[11]*b;a[12]=c[12]*b;a[13]=c[13]*b;a[14]=c[14]*b;a[15]=c[15]*b;return a};e.multiplyScalarAndAdd=function(a,c,b,f){a[0]=c[0]+b[0]*f;a[1]=c[1]+b[1]*f;a[2]=c[2]+b[2]*f;a[3]=c[3]+b[3]*f;a[4]=c[4]+b[4]*f;a[5]=c[5]+b[5]*f;a[6]=c[6]+b[6]*f;a[7]=c[7]+b[7]*f;a[8]=c[8]+b[8]*f;a[9]=c[9]+
b[9]*f;a[10]=c[10]+b[10]*f;a[11]=c[11]+b[11]*f;a[12]=c[12]+b[12]*f;a[13]=c[13]+b[13]*f;a[14]=c[14]+b[14]*f;a[15]=c[15]+b[15]*f;return a};e.exactEquals=function(a,c){return a[0]===c[0]&&a[1]===c[1]&&a[2]===c[2]&&a[3]===c[3]&&a[4]===c[4]&&a[5]===c[5]&&a[6]===c[6]&&a[7]===c[7]&&a[8]===c[8]&&a[9]===c[9]&&a[10]===c[10]&&a[11]===c[11]&&a[12]===c[12]&&a[13]===c[13]&&a[14]===c[14]&&a[15]===c[15]};e.equals=function(a,c){var d=a[0],f=a[1],g=a[2],e=a[3],m=a[4],k=a[5],l=a[6],p=a[7],n=a[8],q=a[9],t=a[10],r=a[11],
u=a[12],w=a[13],v=a[14],y=a[15],x=c[0],z=c[1],A=c[2],B=c[3],D=c[4],F=c[5],C=c[6],H=c[7],E=c[8],M=c[9],N=c[10],J=c[11],G=c[12],I=c[13],P=c[14],L=c[15];return Math.abs(d-x)<=b.EPSILON*Math.max(1,Math.abs(d),Math.abs(x))&&Math.abs(f-z)<=b.EPSILON*Math.max(1,Math.abs(f),Math.abs(z))&&Math.abs(g-A)<=b.EPSILON*Math.max(1,Math.abs(g),Math.abs(A))&&Math.abs(e-B)<=b.EPSILON*Math.max(1,Math.abs(e),Math.abs(B))&&Math.abs(m-D)<=b.EPSILON*Math.max(1,Math.abs(m),Math.abs(D))&&Math.abs(k-F)<=b.EPSILON*Math.max(1,
Math.abs(k),Math.abs(F))&&Math.abs(l-C)<=b.EPSILON*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(p-H)<=b.EPSILON*Math.max(1,Math.abs(p),Math.abs(H))&&Math.abs(n-E)<=b.EPSILON*Math.max(1,Math.abs(n),Math.abs(E))&&Math.abs(q-M)<=b.EPSILON*Math.max(1,Math.abs(q),Math.abs(M))&&Math.abs(t-N)<=b.EPSILON*Math.max(1,Math.abs(t),Math.abs(N))&&Math.abs(r-J)<=b.EPSILON*Math.max(1,Math.abs(r),Math.abs(J))&&Math.abs(u-G)<=b.EPSILON*Math.max(1,Math.abs(u),Math.abs(G))&&Math.abs(w-I)<=b.EPSILON*Math.max(1,Math.abs(w),
Math.abs(I))&&Math.abs(v-P)<=b.EPSILON*Math.max(1,Math.abs(v),Math.abs(P))&&Math.abs(y-L)<=b.EPSILON*Math.max(1,Math.abs(y),Math.abs(L))};return e})},"esri/layers/vectorTiles/views/2d/engine/Container":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./DisplayObject"],function(b,e,a,c){var d;(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"})(d||(d={}));return function(c){function b(){var a=
null!==c&&c.apply(this,arguments)||this;a._childrenSet=new Set;a._childrenToAttach=[];a._childrenToDetach=[];a._renderPhase=d.DONE;a.children=[];return a}a(b,c);Object.defineProperty(b.prototype,"numChildren",{get:function(){return this.children.length},enumerable:!0,configurable:!0});b.prototype.detach=function(a){var c=this.children;a=this.prepareChildrenRenderParameters(a);for(var b=c.length,d=0;d<b;d++){var f=c[d];f.attached&&(this.detachChild(f,a),f.attached=!1,f.parent=null)}};b.prototype.doRender=
function(a){var c=this.prepareChildrenRenderParameters(a);this._renderPhase=d.BEFORE;this.beforeRenderChildren(a,c);this._renderPhase=d.ATTACHING;this.attachChildren(c)||this.requestRender();this._renderPhase=d.DETACHING;for(var b=this._childrenToDetach;0<b.length;){var f=b.shift();this.detachChild(f,c);f.attached=!1;f.parent=null}this._renderPhase=d.RENDERING;this.renderChildren(c);this._renderPhase=d.AFTER;this.afterRenderChildren(a,c);this._renderPhase=d.DONE};b.prototype.addChild=function(a){return this.addChildAt(a,
this.children.length)};b.prototype.addChildAt=function(a,c){void 0===c&&(c=this.numChildren);if(!a||this.contains(a))return a;var b=a.parent;b&&b!==this&&b.removeChild(a);c>=this.numChildren?this.children.push(a):this.children.splice(c,0,a);this._childrenSet.add(a);b=this._childrenToDetach.indexOf(a);-1<b&&this._childrenToDetach.splice(b,1);this._childrenToAttach.push(a);this._renderPhase>=d.RENDERING&&this.requestRender();return a};b.prototype.contains=function(a){return this._childrenSet.has(a)};
b.prototype.getChildIndex=function(a){return this.children.indexOf(a)};b.prototype.getChildAt=function(a){return 0>a||a>this.children.length?null:this.children[a]};b.prototype.removeAllChildren=function(){for(var a=this.numChildren;a--;)this.removeChildAt(0)};b.prototype.removeChild=function(a){return this.contains(a)?this.removeChildAt(this.getChildIndex(a)):a};b.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>=d.RENDERING&&this.requestRender();else{var c=this._childrenToAttach.indexOf(a);-1<c&&this._childrenToAttach.splice(c,1)}return a};b.prototype.requestChildRender=function(a){a&&a.parent===this&&this._renderPhase>=d.RENDERING&&this.requestRender()};b.prototype.setChildIndex=function(a,c){var b=this.getChildIndex(a);-1<b&&(this.children.splice(b,1),this.children.splice(c,0,a),this._renderPhase>=d.RENDERING&&this.requestRender())};b.prototype.sortChildren=
function(a){this._renderPhase>d.RENDERING&&this.requestRender();return this.children.sort(a)};b.prototype.attachChildren=function(a){var c=this._childrenToAttach;if(0===c.length)return!0;for(var b=0===c.length;!b;)b=c.shift(),this.attachChild(b,a)&&(b.attached=!0,b.parent=this),b=0===c.length;return 0===c.length};b.prototype.renderChildren=function(a){for(var c=this.children,b=c.length,d=0;d<b;d++){var f=c[d];f.attached&&this.renderChild(f,a)}};b.prototype.beforeRenderChildren=function(a,c){};b.prototype.attachChild=
function(a,c){return a.attach(c)};b.prototype.detachChild=function(a,c){a.detach(c)};b.prototype.renderChild=function(a,c){a.processRender(c)};b.prototype.afterRenderChildren=function(a,c){};return b}(c)})},"esri/layers/vectorTiles/views/2d/engine/DisplayObject":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./Evented"],function(b,e,a,c){return function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a._renderRequestedCalled=!1;a._attached=!1;a._opacity=
1;a.renderRequested=!1;a._visible=!0;return a}a(b,c);Object.defineProperty(b.prototype,"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(b.prototype,"opacity",{get:function(){return this._opacity},set:function(a){this._opacity!==a&&(this._opacity=a,this.requestRender())},enumerable:!0,
configurable:!0});Object.defineProperty(b.prototype,"visible",{get:function(){return this._visible},set:function(a){this._visible!==a&&(this._visible=a,this.requestRender())},enumerable:!0,configurable:!0});b.prototype.attach=function(a){return!0};b.prototype.detach=function(a){};b.prototype.processRender=function(a){this._renderRequestedCalled=!1;this.doRender(a);this._renderRequestedCalled||(this.renderRequested=!1);this.hasEventListener("post-render")&&this.emit("post-render")};b.prototype.requestRender=
function(){var a=this.renderRequested;this.renderRequested=this._renderRequestedCalled=!0;this.parent&&this.parent.requestChildRender(this);a!==this.renderRequested&&this.hasEventListener("will-render")&&this.emit("will-render")};b.prototype.dispose=function(){};return b}(c.Evented)})},"esri/layers/vectorTiles/views/2d/engine/Evented":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","dojo/aspect","dojo/on"],function(b,e,a,c,d){Object.defineProperty(e,"__esModule",{value:!0});
b=function(){function a(){}a.prototype.on=function(a,b){return c.after(this,"on"+a,b,!0)};a.prototype.once=function(a,c){return d.once(this,a,c)};a.prototype.emit=function(a){d.emit(this,a,this)};a.prototype.hasEventListener=function(a){a="on"+a;return!(!this[a]||!this[a].after)};return a}();e.Evented=b;e.EventedMixin=function(b){return function(b){function f(){return null!==b&&b.apply(this,arguments)||this}a(f,b);f.prototype.on=function(a,b){return c.after(this,"on"+a,b,!0)};f.prototype.once=function(a,
c){return d.once(this,a,c)};f.prototype.emit=function(a,c){d.emit(this,a,c)};f.prototype.hasEventListener=function(a){a="on"+a;return!(!this[a]||!this[a].after)};return f}(b)}})},"esri/layers/vectorTiles/views/vectorTiles/renderers/Renderer":function(){define("require exports ../../webgl/FramebufferObject ../../../core/libs/gl-matrix/mat4 ../GeometryUtils ./BackgroundRenderer ./LineRenderer ./FillRenderer ./SymbolRenderer ./TileInfoRenderer ./FadeRecorder".split(" "),function(b,e,a,c,d,f,g,h,m,k,
l){return function(){function b(){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}b.prototype.initialize=function(a,c,b){void 0===b&&(b=!0);this._SpriteMosaic=a;this._glyphMosaic=c;this._ignoreSpeed=!b;this._backgroundRenderer=new f;this._lineRenderer=new g;this._fillRenderer=new h;this._symbolRenderer=new m;this._tileInfoRenderer=new k;this._fadeRecorder=
new l.FadeRecorder(300);this._extrudeMatrix=new Float32Array(16);this._extrudeNoRotationMatrix=new Float32Array(16);this._backgroundColor=new Float32Array([1,0,0,1])};b.prototype.dispose=function(){this._backgroundRenderer&&(this._backgroundRenderer.dispose(),this._backgroundRenderer=null);this._lineRenderer&&(this._lineRenderer.dispose(),this._lineRenderer=null);this._fillRenderer&&(this._fillRenderer.dispose(),this._fillRenderer=null);this._symbolRenderer&&(this._symbolRenderer.dispose(),this._symbolRenderer=
null);this._tileInfoRenderer&&(this._tileInfoRenderer.dispose(),this._tileInfoRenderer=null);this._hittestFBO&&(this._hittestFBO.dispose(),this._hittestFBO=null)};b.prototype.setStateParams=function(a,b,f){this._fadeRecorder.recordLevel(f);this._state=a;if(this._state.width!==this._cachedWidth||this._state.height!==this._cachedHeight||this._state.rotation!==this._cachedRotation)this._extrudeScaleVector[0]=2/a.width,this._extrudeScaleVector[1]=-2/a.height,c.identity(this._extrudeMatrix),c.rotate(this._extrudeMatrix,
this._extrudeMatrix,-a.rotation*d.C_DEG_TO_RAD,this._extrudeRotateVector),c.scale(this._extrudeMatrix,this._extrudeMatrix,this._extrudeScaleVector),c.transpose(this._extrudeMatrix,this._extrudeMatrix),c.identity(this._extrudeNoRotationMatrix),c.scale(this._extrudeNoRotationMatrix,this._extrudeNoRotationMatrix,this._extrudeScaleVector),c.transpose(this._extrudeNoRotationMatrix,this._extrudeNoRotationMatrix),this._cachedWidth=this._state.width,this._cachedHeight=this._state.height,this._cachedRotation=
this._state.rotation};b.prototype.drawClippingMasks=function(a,c){if(0!==c.length){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);a.setClearStencil(0);a.clear(a.gl.STENCIL_BUFFER_BIT);for(var b=0;b<c.length;b++){var d=c[b];d.attached&&d.visible&&(a.setStencilFunctionSeparate(1032,519,d.stencilData.reference,d.stencilData.mask),this._backgroundRenderer.renderSolidColor(a,
{u_matrix:d.tileTransform.transform,u_normalized_origin:d.tileTransform.displayCoord,u_coord_range:d.coordRange,u_depth:0,u_color:this._backgroundColor}))}a.setColorMask(!0,!0,!0,!0);a.setBlendingEnabled(!0)}};b.prototype.renderDebug=function(a,c){var b=c.key;this._backgroundColor.set([b.col%2,b.row%2,0===b.col%2&&0===b.row%2?1:0,.5]);this._backgroundRenderer.renderSolidColor(a,{u_matrix:c.tileTransform.transform,u_normalized_origin:c.tileTransform.displayCoord,u_coord_range:c.coordRange,u_depth:0,
u_color:this._backgroundColor})};b.prototype.renderBucket=function(a,c,b,d,f,g,e,h){if(!(void 0!==e.minzoom&&e.minzoom>b||void 0!==e.maxzoom&&e.maxzoom<=b))switch(c.type){case 0:2!==f&&this._renderBackground(a,c,b,f,g,e,h);break;case 1:2!==f&&this._renderFill(a,c,b,f,g,e,h);break;case 2:1!==f&&3!==f||this._renderLine(a,c,b,f,g,e,h);break;case 3:2!==f&&3!==f||this._renderSymbol(a,c,b,f,d,g,e,h)}};b.prototype.renderTileInfo=function(a,c){this._tileInfoRenderer.render(a,c)};b.prototype.needsRedraw=function(){return this._fadeRecorder.needsRedraw()};
b.prototype.hitTest=function(c,b,d,f,g,e,h){var k=[0,0],l=[0,0],m=c.state;m.toMap(k,[0,0]);m.toMap(l,[e,e]);b=f.filter(function(a){return!(k[0]>a.bounds[2]||l[0]<a.bounds[0]||k[1]<a.bounds[3]||l[1]>a.bounds[1])});if(0===b.length)return[];b.sort(function(a,c){return a.key.level-c.key.level});d=b.length;for(f=1;f<=d;f++){var n=b[f-1];n.attached&&(n.stencilData.reference=f,n.stencilData.mask=255)}h(m,g,b);g=c.context;this._hittestFBO||(this._hittestFBO=a.create(g,{colorTarget:0,depthStencilTarget:3,
width:e,height:e}));h=g.getViewport();m=g.getBoundFramebufferObject();g.bindFramebuffer(this._hittestFBO);g.setViewport(0,0,e,e);f=g.gl;g.setDepthWriteEnabled(!0);g.setStencilWriteMask(255);g.setClearColor(1,1,1,1);g.setClearDepth(1);g.setClearStencil(0);g.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT|f.STENCIL_BUFFER_BIT);g.setDepthWriteEnabled(!1);this.drawClippingMasks(g,b);g.setBlendingEnabled(!1);g.setStencilWriteMask(0);g.setStencilOp(7680,7680,7681);g.setDepthFunction(515);g.setDepthTestEnabled(!0);
g.setDepthWriteEnabled(!0);g.setStencilTestEnabled(!0);for(f=0;f<d;f++)n=b[f],n.attached&&n.doRender(c);g.setStencilTestEnabled(!1);g.setDepthTestEnabled(!1);this._readbackBuffer||(this._readbackBuffer=new Uint8Array(4*e*e),this._readbackBuffer32=new Uint32Array(this._readbackBuffer.buffer));this._hittestFBO.readPixels(0,0,e,e,6408,5121,this._readbackBuffer);c=new Set;e*=e;b=this._readbackBuffer32[Math.round(e/2)];4294967295!==b&&c.add(b);for(f=0;f<e;f++)b=this._readbackBuffer32[f],4294967295!==b&&
c.add(b);g.bindFramebuffer(m);g.setViewport(h.x,h.y,h.width,h.height);var p=[];c.forEach(function(a){p.push(a)});return p};b.prototype._renderBackground=function(a,c,b,d,f,g,e){this._backgroundRenderer.render(a,c,b,d,f,g,this._SpriteMosaic,this._SpriteMosaic.pixelRatio,e)};b.prototype._renderLine=function(a,c,b,d,f,g,e){this._lineRenderer.render(a,c,b,d,this._state,f,g,this._SpriteMosaic,this._extrudeMatrix,this._SpriteMosaic.pixelRatio,e)};b.prototype._renderFill=function(a,c,b,d,f,g,e){this._fillRenderer.render(a,
c,b,this._state.rotation,d,f,g,this._SpriteMosaic,this._extrudeMatrix,this._SpriteMosaic.pixelRatio,e)};b.prototype._renderSymbol=function(a,c,b,d,f,g,e,h){var k=!0;f===g.key.level&&(k=!1);a.setStencilTestEnabled(k);this._symbolRenderer.render(a,c,b,d,this._state.rotation,this._fadeRecorder.getFadeValues(this._ignoreSpeed),g,e,this._SpriteMosaic,this._glyphMosaic,this._extrudeMatrix,this._extrudeNoRotationMatrix,this._SpriteMosaic.pixelRatio,h)};return b}()})},"esri/layers/vectorTiles/views/webgl/FramebufferObject":function(){define(["require",
"exports","./Texture"],function(b,e,a){return function(){function c(b,f,g,e){this._colorAttachment=this._stencilAttachment=this._depthAttachment=this._glName=this._context=null;this._initialized=!1;this._context=b;this._desc={colorTarget:f.colorTarget,depthStencilTarget:f.depthStencilTarget,width:f.width,height:f.height,multisampled:f.multisampled};this._id=c._nextId++;g&&(b=void 0,g instanceof a?(this._colorAttachment=g,b=g.descriptor):(b=g,this._colorAttachment=new a(this._context,b)),0!==this._desc.colorTarget&&
console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),c._validateTextureDimensions(b,this._desc));e&&(this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),g=void 0,e instanceof a?(this._depthStencilTexture=e,g=this._depthStencilTexture.descriptor):(g=e,this._depthStencilTexture=new a(this._context,
g)),c._validateTextureDimensions(g,this._desc))}c.create=function(a,b){return new c(a,b)};c.createWithAttachments=function(a,b,g,e){return new c(a,g,b,e)};Object.defineProperty(c.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,
"colorTexture",{get:function(){return this._colorAttachment instanceof a?this._colorAttachment:null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"width",{get:function(){return this._desc.width},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"height",{get:function(){return this._desc.height},enumerable:!0,configurable:!0});
c.prototype.dispose=function(){this._context&&this._glName&&(this._disposeColorAttachment(),this._disposeDepthStencilAttachments(),this._context.gl.deleteFramebuffer(this._glName),this._glName=null)};c.prototype.attachColorTexture=function(a){if(a){c._validateTextureDimensions(a.descriptor,this._desc);this._disposeColorAttachment();if(this._initialized){this._context.bindFramebuffer(this);var b=this._context.gl;b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,a.glName,0)}this._colorAttachment=
a}};c.prototype.detachColorTexture=function(){var c=void 0;if(this._colorAttachment instanceof a){c=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var b=this._context.gl;this._context.gl.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,null,0)}this._colorAttachment=null}return c};c.prototype.attachDepthStencilTexture=function(a){if(a){var b=a.descriptor;34041!==b.pixelFormat&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!");
34042!==b.dataType&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8_WEBGL!");this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!");c._validateTextureDimensions(b,this._desc);4!==this._desc.depthStencilTarget&&(this._desc.depthStencilTarget=4);this._disposeDepthStencilAttachments();this._initialized&&(this._context.bindFramebuffer(this),b=this._context.gl,b.framebufferTexture2D(b.FRAMEBUFFER,
b.DEPTH_STENCIL_ATTACHMENT,b.TEXTURE_2D,a.glName,0));this._depthStencilTexture=a}};c.prototype.detachDepthStencilTexture=function(){var a=this._depthStencilTexture;if(a&&this._initialized){this._context.bindFramebuffer(this);var c=this._context.gl;this._context.gl.framebufferTexture2D(c.FRAMEBUFFER,c.DEPTH_STENCIL_ATTACHMENT,c.TEXTURE_2D,null,0)}this._depthStencilTexture=null;return a};c.prototype.copyToTexture=function(a,c,b,e,m,k,l){(0>a||0>c||0>m||0>k)&&console.error("Offsets cannot be negative!");
(0>=b||0>=e)&&console.error("Copy width and height must be greater than zero!");var d=this._desc,f=l.descriptor;3553!==l.descriptor.target&&console.error("Texture target must be TEXTURE_2D!");(a+b>d.width||c+e>d.height||m+b>f.width||k+e>f.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");d=this._context;d.bindTexture(l);d.bindFramebuffer(this);d.gl.copyTexSubImage2D(3553,0,m,k,a,c,b,e)};c.prototype.readPixels=function(a,c,b,e,m,k,l){(0>=
b||0>=e)&&console.error("Copy width and height must be greater than zero!");l||console.error("Target memory is not initialized!");this._context.bindFramebuffer(this);this._context.gl.readPixels(a,c,b,e,m,k,l)};c.prototype.resize=function(b,f){var d=this._desc;if(d.width!==b||d.height!==f)if(this._initialized)d.width=b,d.height=f,this._colorAttachment instanceof a?(e=this._colorAttachment,d=e.descriptor,d.width=b,d.height=f,this._colorAttachment.dispose(),this._colorAttachment=new a(this._context,
d),c._validateTextureDimensions(e.descriptor,this._desc)):this._colorAttachment&&this._disposeColorAttachment(),null!=this._depthStencilTexture?(d=this._depthStencilTexture.descriptor,d.width=b,d.height=f,this._depthStencilTexture.dispose(),this._depthStencilTexture=new a(this._context,d)):(this._depthAttachment||this._stencilAttachment)&&this._disposeDepthStencilAttachments(),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1;else{d.width=b;
d.height=f;if(this._colorAttachment instanceof a){var e=this._colorAttachment;e.resize(b,f)}this._depthStencilTexture&&this._depthStencilTexture.resize(b,f)}};c.prototype.initialize=function(){if(this._initialized)return!1;var c=this._context.gl;this._glName&&c.deleteFramebuffer(this._glName);var b=c.createFramebuffer(),g=this._desc;c.bindFramebuffer(c.FRAMEBUFFER,b);if(!this._colorAttachment)if(0===g.colorTarget)this._colorAttachment=new a(this._context,{target:3553,pixelFormat:6408,dataType:5121,
samplingMode:9728,wrapMode:33071,width:g.width,height:g.height});else{var e=c.createRenderbuffer();c.bindRenderbuffer(c.RENDERBUFFER,e);c.renderbufferStorage(c.RENDERBUFFER,c.RGBA4,g.width,g.height);c.framebufferRenderbuffer(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.RENDERBUFFER,e);this._colorAttachment=e}this._colorAttachment instanceof a&&c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,this._colorAttachment.glName,0);switch(g.depthStencilTarget){case 1:case 3:e=c.createRenderbuffer();
c.bindRenderbuffer(c.RENDERBUFFER,e);var m=1===g.depthStencilTarget?c.DEPTH_ATTACHMENT:c.DEPTH_STENCIL_ATTACHMENT;c.renderbufferStorage(c.RENDERBUFFER,1===g.depthStencilTarget?c.DEPTH_COMPONENT16:c.DEPTH_STENCIL,g.width,g.height);c.framebufferRenderbuffer(c.FRAMEBUFFER,m,c.RENDERBUFFER,e);this._depthAttachment=e;break;case 2:e=c.createRenderbuffer();c.bindRenderbuffer(c.RENDERBUFFER,e);c.renderbufferStorage(c.RENDERBUFFER,c.STENCIL_INDEX8,g.width,g.height);c.framebufferRenderbuffer(c.FRAMEBUFFER,
c.STENCIL_ATTACHMENT,c.RENDERBUFFER,e);this._stencilAttachment=e;break;case 4:this._depthStencilTexture||(this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),this._depthStencilTexture=new a(this._context,{target:3553,pixelFormat:34041,dataType:34042,samplingMode:9728,wrapMode:33071,width:g.width,height:g.height})),c.framebufferTexture2D(c.FRAMEBUFFER,c.DEPTH_STENCIL_ATTACHMENT,
c.TEXTURE_2D,this._depthStencilTexture.glName,0)}c.checkFramebufferStatus(c.FRAMEBUFFER)!==c.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!");this._glName=b;return this._initialized=!0};c.prototype._disposeColorAttachment=function(){if(this._colorAttachment instanceof a){var c=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var b=this._context.gl;b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,null,0)}c.dispose()}else this._colorAttachment instanceof
WebGLRenderbuffer&&(c=this._colorAttachment,b=this._context.gl,this._initialized&&(this._context.bindFramebuffer(this),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(c));this._colorAttachment=null};c.prototype._disposeDepthStencilAttachments=function(){var a=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);var c=this._context.gl;c.framebufferRenderbuffer(c.FRAMEBUFFER,1===this._desc.depthStencilTarget?
c.DEPTH_ATTACHMENT:c.DEPTH_STENCIL_ATTACHMENT,c.RENDERBUFFER,null)}a.deleteRenderbuffer(this._depthAttachment);this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),c=this._context.gl,c.framebufferRenderbuffer(c.FRAMEBUFFER,c.STENCIL_ATTACHMENT,c.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)};c._validateTextureDimensions=function(a,c){console.assert(0<=a.width&&0<=a.height);3553!==a.target&&console.error("Texture type must be TEXTURE_2D!");void 0!==c.width&&0<=c.width&&void 0!==c.height&&0<=c.height?c.width===a.width&&c.height===a.height||console.error("Color attachment texture must match the framebuffer's!"):(c.width=a.width,c.height=
a.height)};c._nextId=0;return c}()})},"esri/layers/vectorTiles/views/webgl/Texture":function(){define(["require","exports"],function(b,e){return function(){function a(c,b,f){this._glName=this._context=null;this._id=-1;this._desc=void 0;this._wrapModeDirty=this._samplingModeDirty=!1;this._boundToUnits=new Set;this._context=c;this._desc={pixelFormat:b.pixelFormat,internalFormat:b.internalFormat,dataType:b.dataType,target:b.target?b.target:3553,samplingMode:b.samplingMode?b.samplingMode:9729,wrapMode:b.wrapMode?
b.wrapMode:10497,maxAnisotropy:b.maxAnisotropy,flipped:void 0!==b.flipped?b.flipped:!1,hasMipmap:void 0!==b.hasMipmap?b.hasMipmap:!1,level:void 0!==b.level?b.level:0,unpackAlignment:b.unpackAlignment?b.unpackAlignment:4,width:b.width,height:b.height,preMultiplyAlpha:void 0!==b.preMultiplyAlpha?b.preMultiplyAlpha:!1};this._id=++a._nextId;this.setData(f)}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});a.prototype.dispose=function(){var a=this;if(this._context){if(this._glName){var b=this._context.gl;this._boundToUnits.forEach(function(c){a._context.bindTexture(null,c)});b.deleteTexture(this._glName);this._glName=null}this._context=null}};a.prototype.resize=function(a,b){var c=this._desc;if(c.width!==a||c.height!==
b)c.width=a,c.height=b,this.setData(null)};a.prototype.setData=function(c){var b=this._context.gl;this._glName||(this._glName=b.createTexture());void 0===c&&(c=null);null===c&&(this._desc.width=this._desc.width||4,this._desc.height=this._desc.height||4);var f=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var g=this._desc;a._validateTexture(g);b.pixelStorei(b.UNPACK_ALIGNMENT,g.unpackAlignment);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,g.flipped?1:0);b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
g.preMultiplyAlpha);c instanceof ImageData||c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement?(g.width&&g.height&&console.assert(c.width===g.width&&c.height===g.height),b.texImage2D(b.TEXTURE_2D,g.level,g.internalFormat?g.internalFormat:g.pixelFormat,g.pixelFormat,g.dataType,c),void 0===this._desc.width&&(this._desc.width=c.width),void 0===this._desc.height&&(this._desc.height=c.height)):(null!=g.width&&null!=g.height||console.error("Width and height must be specified!"),
b.texImage2D(b.TEXTURE_2D,g.level,g.internalFormat?g.internalFormat:g.pixelFormat,g.width,g.height,0,g.pixelFormat,g.dataType,c));g.hasMipmap&&this.generateMipmap();a._applySamplingMode(b,this._desc);a._applyWrapMode(b,this._desc);a._applyAnisotropicFilteringParameters(this._context,this._desc);this._context.bindTexture(f,0)};a.prototype.updateData=function(a,b,f,g,e,m){m||console.error("An attempt to use uninitialized data!");this._glName||console.error("An attempt to update uninitialized texture!");
var c=this._context.gl,d=this._desc,h=this._context.getBoundTexture(0);this._context.bindTexture(this,0);(0>b||0>f||g>d.width||e>d.height||b+g>d.width||f+e>d.height)&&console.error("An attempt to update out of bounds of the texture!");m instanceof ImageData||m instanceof HTMLImageElement||m instanceof HTMLCanvasElement||m instanceof HTMLVideoElement?(console.assert(m.width===g&&m.height===e),c.texSubImage2D(c.TEXTURE_2D,a,b,f,d.pixelFormat,d.dataType,m)):c.texSubImage2D(c.TEXTURE_2D,a,b,f,g,e,d.pixelFormat,
d.dataType,m);this._context.bindTexture(h,0)};a.prototype.generateMipmap=function(){var c=this._desc;c.hasMipmap||(c.hasMipmap=!0,a._validateTexture(c));9729===c.samplingMode?(this._samplingModeDirty=!0,c.samplingMode=9985):9728===c.samplingMode&&(this._samplingModeDirty=!0,c.samplingMode=9984);c=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var b=this._context.gl;b.generateMipmap(b.TEXTURE_2D);this._context.bindTexture(c,0)};a.prototype.setSamplingMode=function(c){c!==this._desc.samplingMode&&
(this._desc.samplingMode=c,a._validateTexture(this._desc),this._samplingModeDirty=!0)};a.prototype.setWrapMode=function(c){c!==this._desc.wrapMode&&(this._desc.wrapMode=c,a._validateTexture(this._desc),this._wrapModeDirty=!0)};a.prototype.applyChanges=function(){var c=this._context.gl,b=this._desc;this._samplingModeDirty&&(a._applySamplingMode(c,b),this._samplingModeDirty=!1);this._wrapModeDirty&&(a._applyWrapMode(c,b),this._wrapModeDirty=!1)};a.prototype.setBoundToUnit=function(a,b){b?this._boundToUnits.add(a):
this._boundToUnits.delete(a)};a._isPowerOfTwo=function(a){return 0===(a&a-1)};a._validateTexture=function(c){(0>c.width||0>c.height)&&console.error("Negative dimension parameters are not allowed!");a._isPowerOfTwo(c.width)&&a._isPowerOfTwo(c.height)||(33071!==c.wrapMode&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),c.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))};a._applySamplingMode=function(a,b){var c=b.samplingMode;if(9985===c||9987===
c)c=9729;else if(9984===c||9986===c)c=9728;a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,c);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,b.samplingMode)};a._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)};a._applyAnisotropicFilteringParameters=function(a,b){if(null!=b.maxAnisotropy){var c=a.extensions.textureFilterAnisotropic;if(c){var d=a.gl;d.texParameterf(d.TEXTURE_2D,c.TEXTURE_MAX_ANISOTROPY_EXT,
b.maxAnisotropy)}}};a._nextId=0;return a}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/BackgroundRenderer":function(){define("require exports ../../../core/libs/gl-matrix/mat3 ../../../core/libs/gl-matrix/vec4 ../../webgl/VertexArrayObject ../../webgl/BufferObject ../MemoryBuffer ../../webgl/ShaderVariations ./vtShaderSnippets ./rendererUtils".split(" "),function(b,e,a,c,d,f,g,h,m,k){return function(){function b(){this._solidAttributeLocations={a_pos:0};this._attributeLocations={a_pos:0,
a_id:1};this._patternMatrix=a.create();this._color=c.create();this._rendererInitialized=this._solidrendererInitialized=!1;this._color.set([1,0,0,1])}b.prototype.dispose=function(){this._solidVertexArrayObject&&(this._solidVertexArrayObject.dispose(),this._solidVertexArrayObject=null);this._vertexArrayObject&&(this._vertexArrayObject.dispose(),this._vertexArrayObject=null)};b.prototype.renderSolidColor=function(a,c){this._solidrendererInitialized||this._initializeSolidRenderer(a);a.bindVAO(this._solidVertexArrayObject);
var b=this._shaderVariations.getProgram([!1,!1],void 0,void 0,this._solidAttributeLocations);a.bindProgram(b);b.setUniformMatrix4fv("u_transformMatrix",c.u_matrix);b.setUniform2fv("u_normalized_origin",c.u_normalized_origin);b.setUniform1f("u_coord_range",c.u_coord_range||4096);b.setUniform1f("u_depth",c.u_depth||0);b.setUniform4fv("u_color",c.u_color||this._color);a.drawArrays(5,0,4);a.bindVAO()};b.prototype.render=function(c,b,d,f,g,e,h,l,m){this._rendererInitialized||this._initialize(c);var n=
e.getPaintValue("background-color",d);m*=e.getPaintValue("background-opacity",d);var p=e.getPaintValue("background-pattern",d),q=void 0!==p,u=n[3]*m,t=q||1>u;if(!t||0!==f)if(t||1!==f){t=3===f;f=this._shaderVariations.getProgram([q,t],void 0,void 0,this._attributeLocations);c.bindVAO(this._vertexArrayObject);c.bindProgram(f);f.setUniform1f("u_coord_range",g.coordRange);f.setUniform1f("u_depth",e.z||0);f.setUniformMatrix4fv("u_transformMatrix",g.tileTransform.transform);f.setUniform2fv("u_normalized_origin",
g.tileTransform.displayCoord);if(q){e=h.getMosaicItemPosition(p,!0);if(!e)return;d=g.coordRange/512/Math.pow(2,Math.floor(d)-g.key.level)/l;a.identity(this._patternMatrix);g=1/(e.size[1]*d);this._patternMatrix[0]=1/(e.size[0]*d);this._patternMatrix[4]=g;h.bind(c,9729,0);f.setUniformMatrix3fv("u_pattern_matrix",this._patternMatrix);f.setUniform1f("u_opacity",m);f.setUniform2f("u_pattern_tl",e.tl[0],e.tl[1]);f.setUniform2f("u_pattern_br",e.br[0],e.br[1]);f.setUniform1i("u_texture",0)}else this._color[0]=
u*n[0],this._color[1]=u*n[1],this._color[2]=u*n[2],this._color[3]=u,f.setUniform4fv("u_color",this._color);t&&(b=k.int32To4Bytes(b.layerID),f.setUniform4f("u_id",b[0],b[1],b[2],b[3]));c.drawArrays(5,0,4);c.bindVAO()}};b.prototype._initializeSolidRenderer=function(a){if(this._solidrendererInitialized)return!0;if(!this._shaderVariations){var c=new h("background",["backgroundVS","backgroundFS"],[],m,a);c.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");c.addDefine("ID","ID",[!0,!0],"ID");this._shaderVariations=
c}c=new Int8Array([0,0,1,0,0,1,1,1]);c=f.createVertex(a,35044,c);this._solidVertexArrayObject=new d(a,{a_pos:0},{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},{geometry:c});return this._solidrendererInitialized=!0};b.prototype._initialize=function(a){if(this._rendererInitialized)return!0;if(!this._shaderVariations){var c=new h("background",["backgroundVS","backgroundFS"],[],m,a);c.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");c.addDefine("ID","ID",[!0,!0],
"ID");this._shaderVariations=c}c=[];c.push(g.i1616to32(0,0));c.push(g.i1616to32(1,0));c.push(g.i1616to32(0,1));c.push(g.i1616to32(1,1));c=new Uint32Array(c);c=f.createVertex(a,35044,c);this._vertexArrayObject=new d(a,{a_pos:0},{geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:4,normalized:!1,divisor:0}]},{geometry:c});return this._rendererInitialized=!0};return b}()})},"esri/layers/vectorTiles/core/libs/gl-matrix/mat3":function(){define(["./common"],function(b){var e={create:function(){var a=
new b.ARRAY_TYPE(9);a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},fromMat4:function(a,c){a[0]=c[0];a[1]=c[1];a[2]=c[2];a[3]=c[4];a[4]=c[5];a[5]=c[6];a[6]=c[8];a[7]=c[9];a[8]=c[10];return a},clone:function(a){var c=new b.ARRAY_TYPE(9);c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];return c},copy:function(a,c){a[0]=c[0];a[1]=c[1];a[2]=c[2];a[3]=c[3];a[4]=c[4];a[5]=c[5];a[6]=c[6];a[7]=c[7];a[8]=c[8];return a},fromValues:function(a,
c,d,f,g,e,m,k,l){var h=new b.ARRAY_TYPE(9);h[0]=a;h[1]=c;h[2]=d;h[3]=f;h[4]=g;h[5]=e;h[6]=m;h[7]=k;h[8]=l;return h},set:function(a,c,b,f,g,e,m,k,l,p){a[0]=c;a[1]=b;a[2]=f;a[3]=g;a[4]=e;a[5]=m;a[6]=k;a[7]=l;a[8]=p;return a},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,c){if(a===c){var b=c[1],f=c[2],g=c[5];a[1]=c[3];a[2]=c[6];a[3]=b;a[5]=c[7];a[6]=f;a[7]=g}else a[0]=c[0],a[1]=c[3],a[2]=c[6],a[3]=c[1],a[4]=c[4],a[5]=c[7],a[6]=c[2],
a[7]=c[5],a[8]=c[8];return a},invert:function(a,c){var b=c[0],f=c[1],g=c[2],e=c[3],m=c[4],k=c[5],l=c[6],p=c[7],n=c[8],q=n*m-k*p,t=-n*e+k*l,r=p*e-m*l,u=b*q+f*t+g*r;if(!u)return null;u=1/u;a[0]=q*u;a[1]=(-n*f+g*p)*u;a[2]=(k*f-g*m)*u;a[3]=t*u;a[4]=(n*b-g*l)*u;a[5]=(-k*b+g*e)*u;a[6]=r*u;a[7]=(-p*b+f*l)*u;a[8]=(m*b-f*e)*u;return a},adjoint:function(a,c){var b=c[0],f=c[1],g=c[2],e=c[3],m=c[4],k=c[5],l=c[6],p=c[7],n=c[8];a[0]=m*n-k*p;a[1]=g*p-f*n;a[2]=f*k-g*m;a[3]=k*l-e*n;a[4]=b*n-g*l;a[5]=g*e-b*k;a[6]=
e*p-m*l;a[7]=f*l-b*p;a[8]=b*m-f*e;return a},determinant:function(a){var c=a[3],b=a[4],f=a[5],g=a[6],e=a[7],m=a[8];return a[0]*(m*b-f*e)+a[1]*(-m*c+f*g)+a[2]*(e*c-b*g)},multiply:function(a,c,b){var d=c[0],g=c[1],e=c[2],m=c[3],k=c[4],l=c[5],p=c[6],n=c[7];c=c[8];var q=b[0],t=b[1],r=b[2],u=b[3],w=b[4],v=b[5],y=b[6],x=b[7];b=b[8];a[0]=q*d+t*m+r*p;a[1]=q*g+t*k+r*n;a[2]=q*e+t*l+r*c;a[3]=u*d+w*m+v*p;a[4]=u*g+w*k+v*n;a[5]=u*e+w*l+v*c;a[6]=y*d+x*m+b*p;a[7]=y*g+x*k+b*n;a[8]=y*e+x*l+b*c;return a}};e.mul=e.multiply;
e.translate=function(a,c,b){var d=c[0],g=c[1],e=c[2],m=c[3],k=c[4],l=c[5],p=c[6],n=c[7];c=c[8];var q=b[0];b=b[1];a[0]=d;a[1]=g;a[2]=e;a[3]=m;a[4]=k;a[5]=l;a[6]=q*d+b*m+p;a[7]=q*g+b*k+n;a[8]=q*e+b*l+c;return a};e.rotate=function(a,c,b){var d=c[0],g=c[1],e=c[2],m=c[3],k=c[4],l=c[5],p=c[6],n=c[7];c=c[8];var q=Math.sin(b);b=Math.cos(b);a[0]=b*d+q*m;a[1]=b*g+q*k;a[2]=b*e+q*l;a[3]=b*m-q*d;a[4]=b*k-q*g;a[5]=b*l-q*e;a[6]=p;a[7]=n;a[8]=c;return a};e.scale=function(a,c,b){var d=b[0];b=b[1];a[0]=d*c[0];a[1]=
d*c[1];a[2]=d*c[2];a[3]=b*c[3];a[4]=b*c[4];a[5]=b*c[5];a[6]=c[6];a[7]=c[7];a[8]=c[8];return a};e.fromTranslation=function(a,c){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=c[0];a[7]=c[1];a[8]=1;return a};e.fromRotation=function(a,c){var b=Math.sin(c),f=Math.cos(c);a[0]=f;a[1]=b;a[2]=0;a[3]=-b;a[4]=f;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a};e.fromScaling=function(a,c){a[0]=c[0];a[1]=0;a[2]=0;a[3]=0;a[4]=c[1];a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a};e.fromMat2d=function(a,c){a[0]=c[0];a[1]=c[1];a[2]=0;
a[3]=c[2];a[4]=c[3];a[5]=0;a[6]=c[4];a[7]=c[5];a[8]=1;return a};e.fromQuat=function(a,c){var b=c[0],f=c[1],g=c[2],e=c[3],m=b+b,k=f+f,l=g+g,b=b*m,p=f*m,f=f*k,n=g*m,q=g*k,g=g*l,m=e*m,k=e*k,e=e*l;a[0]=1-f-g;a[3]=p-e;a[6]=n+k;a[1]=p+e;a[4]=1-b-g;a[7]=q-m;a[2]=n-k;a[5]=q+m;a[8]=1-b-f;return a};e.normalFromMat4=function(a,c){var b=c[0],f=c[1],g=c[2],e=c[3],m=c[4],k=c[5],l=c[6],p=c[7],n=c[8],q=c[9],t=c[10],r=c[11],u=c[12],w=c[13],v=c[14],y=c[15],x=b*k-f*m,z=b*l-g*m,A=b*p-e*m,B=f*l-g*k,D=f*p-e*k,F=g*p-e*
l,C=n*w-q*u,H=n*v-t*u,n=n*y-r*u,E=q*v-t*w,q=q*y-r*w,t=t*y-r*v,r=x*t-z*q+A*E+B*n-D*H+F*C;if(!r)return null;r=1/r;a[0]=(k*t-l*q+p*E)*r;a[1]=(l*n-m*t-p*H)*r;a[2]=(m*q-k*n+p*C)*r;a[3]=(g*q-f*t-e*E)*r;a[4]=(b*t-g*n+e*H)*r;a[5]=(f*n-b*q-e*C)*r;a[6]=(w*F-v*D+y*B)*r;a[7]=(v*A-u*F-y*z)*r;a[8]=(u*D-w*A+y*x)*r;return a};e.str=function(a){return"mat3("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+")"};e.frob=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+
Math.pow(a[2],2)+Math.pow(a[3],2)+Math.pow(a[4],2)+Math.pow(a[5],2)+Math.pow(a[6],2)+Math.pow(a[7],2)+Math.pow(a[8],2))};e.add=function(a,c,b){a[0]=c[0]+b[0];a[1]=c[1]+b[1];a[2]=c[2]+b[2];a[3]=c[3]+b[3];a[4]=c[4]+b[4];a[5]=c[5]+b[5];a[6]=c[6]+b[6];a[7]=c[7]+b[7];a[8]=c[8]+b[8];return a};e.subtract=function(a,c,b){a[0]=c[0]-b[0];a[1]=c[1]-b[1];a[2]=c[2]-b[2];a[3]=c[3]-b[3];a[4]=c[4]-b[4];a[5]=c[5]-b[5];a[6]=c[6]-b[6];a[7]=c[7]-b[7];a[8]=c[8]-b[8];return a};e.sub=e.subtract;e.multiplyScalar=function(a,
b,d){a[0]=b[0]*d;a[1]=b[1]*d;a[2]=b[2]*d;a[3]=b[3]*d;a[4]=b[4]*d;a[5]=b[5]*d;a[6]=b[6]*d;a[7]=b[7]*d;a[8]=b[8]*d;return a};e.multiplyScalarAndAdd=function(a,b,d,f){a[0]=b[0]+d[0]*f;a[1]=b[1]+d[1]*f;a[2]=b[2]+d[2]*f;a[3]=b[3]+d[3]*f;a[4]=b[4]+d[4]*f;a[5]=b[5]+d[5]*f;a[6]=b[6]+d[6]*f;a[7]=b[7]+d[7]*f;a[8]=b[8]+d[8]*f;return a};e.exactEquals=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]};e.equals=function(a,c){var d=
a[0],f=a[1],g=a[2],e=a[3],m=a[4],k=a[5],l=a[6],p=a[7],n=a[8],q=c[0],t=c[1],r=c[2],u=c[3],w=c[4],v=c[5],y=a[6],x=c[7],z=c[8];return Math.abs(d-q)<=b.EPSILON*Math.max(1,Math.abs(d),Math.abs(q))&&Math.abs(f-t)<=b.EPSILON*Math.max(1,Math.abs(f),Math.abs(t))&&Math.abs(g-r)<=b.EPSILON*Math.max(1,Math.abs(g),Math.abs(r))&&Math.abs(e-u)<=b.EPSILON*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(m-w)<=b.EPSILON*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(k-v)<=b.EPSILON*Math.max(1,Math.abs(k),Math.abs(v))&&
Math.abs(l-y)<=b.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(p-x)<=b.EPSILON*Math.max(1,Math.abs(p),Math.abs(x))&&Math.abs(n-z)<=b.EPSILON*Math.max(1,Math.abs(n),Math.abs(z))};return e})},"esri/layers/vectorTiles/core/libs/gl-matrix/vec4":function(){define(["./common"],function(b){var e={create:function(){var a=new b.ARRAY_TYPE(4);a[0]=0;a[1]=0;a[2]=0;a[3]=0;return a},clone:function(a){var c=new b.ARRAY_TYPE(4);c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];return c},fromValues:function(a,c,d,
f){var g=new b.ARRAY_TYPE(4);g[0]=a;g[1]=c;g[2]=d;g[3]=f;return g},copy:function(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];return a},set:function(a,b,d,f,g){a[0]=b;a[1]=d;a[2]=f;a[3]=g;return a},add:function(a,b,d){a[0]=b[0]+d[0];a[1]=b[1]+d[1];a[2]=b[2]+d[2];a[3]=b[3]+d[3];return a},subtract:function(a,b,d){a[0]=b[0]-d[0];a[1]=b[1]-d[1];a[2]=b[2]-d[2];a[3]=b[3]-d[3];return a}};e.sub=e.subtract;e.multiply=function(a,b,d){a[0]=b[0]*d[0];a[1]=b[1]*d[1];a[2]=b[2]*d[2];a[3]=b[3]*d[3];return a};e.mul=
e.multiply;e.divide=function(a,b,d){a[0]=b[0]/d[0];a[1]=b[1]/d[1];a[2]=b[2]/d[2];a[3]=b[3]/d[3];return a};e.div=e.divide;e.ceil=function(a,b){a[0]=Math.ceil(b[0]);a[1]=Math.ceil(b[1]);a[2]=Math.ceil(b[2]);a[3]=Math.ceil(b[3]);return a};e.floor=function(a,b){a[0]=Math.floor(b[0]);a[1]=Math.floor(b[1]);a[2]=Math.floor(b[2]);a[3]=Math.floor(b[3]);return a};e.min=function(a,b,d){a[0]=Math.min(b[0],d[0]);a[1]=Math.min(b[1],d[1]);a[2]=Math.min(b[2],d[2]);a[3]=Math.min(b[3],d[3]);return a};e.max=function(a,
b,d){a[0]=Math.max(b[0],d[0]);a[1]=Math.max(b[1],d[1]);a[2]=Math.max(b[2],d[2]);a[3]=Math.max(b[3],d[3]);return a};e.round=function(a,b){a[0]=Math.round(b[0]);a[1]=Math.round(b[1]);a[2]=Math.round(b[2]);a[3]=Math.round(b[3]);return a};e.scale=function(a,b,d){a[0]=b[0]*d;a[1]=b[1]*d;a[2]=b[2]*d;a[3]=b[3]*d;return a};e.scaleAndAdd=function(a,b,d,f){a[0]=b[0]+d[0]*f;a[1]=b[1]+d[1]*f;a[2]=b[2]+d[2]*f;a[3]=b[3]+d[3]*f;return a};e.distance=function(a,b){var c=b[0]-a[0],f=b[1]-a[1],g=b[2]-a[2],e=b[3]-a[3];
return Math.sqrt(c*c+f*f+g*g+e*e)};e.dist=e.distance;e.squaredDistance=function(a,b){var c=b[0]-a[0],f=b[1]-a[1],g=b[2]-a[2],e=b[3]-a[3];return c*c+f*f+g*g+e*e};e.sqrDist=e.squaredDistance;e.length=function(a){var b=a[0],d=a[1],f=a[2];a=a[3];return Math.sqrt(b*b+d*d+f*f+a*a)};e.len=e.length;e.squaredLength=function(a){var b=a[0],d=a[1],f=a[2];a=a[3];return b*b+d*d+f*f+a*a};e.sqrLen=e.squaredLength;e.negate=function(a,b){a[0]=-b[0];a[1]=-b[1];a[2]=-b[2];a[3]=-b[3];return a};e.inverse=function(a,b){a[0]=
1/b[0];a[1]=1/b[1];a[2]=1/b[2];a[3]=1/b[3];return a};e.normalize=function(a,b){var c=b[0],f=b[1],g=b[2],e=b[3],m=c*c+f*f+g*g+e*e;0<m&&(m=1/Math.sqrt(m),a[0]=c*m,a[1]=f*m,a[2]=g*m,a[3]=e*m);return a};e.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};e.lerp=function(a,b,d,f){var c=b[0],e=b[1],m=b[2];b=b[3];a[0]=c+f*(d[0]-c);a[1]=e+f*(d[1]-e);a[2]=m+f*(d[2]-m);a[3]=b+f*(d[3]-b);return a};e.random=function(a,c){c=c||1;a[0]=b.RANDOM();a[1]=b.RANDOM();a[2]=b.RANDOM();a[3]=b.RANDOM();e.normalize(a,
a);e.scale(a,a,c);return a};e.transformMat4=function(a,b,d){var c=b[0],g=b[1],e=b[2];b=b[3];a[0]=d[0]*c+d[4]*g+d[8]*e+d[12]*b;a[1]=d[1]*c+d[5]*g+d[9]*e+d[13]*b;a[2]=d[2]*c+d[6]*g+d[10]*e+d[14]*b;a[3]=d[3]*c+d[7]*g+d[11]*e+d[15]*b;return a};e.transformQuat=function(a,b,d){var c=b[0],g=b[1],e=b[2],m=d[0],k=d[1],l=d[2];d=d[3];var p=d*c+k*e-l*g,n=d*g+l*c-m*e,q=d*e+m*g-k*c,c=-m*c-k*g-l*e;a[0]=p*d+c*-m+n*-l-q*-k;a[1]=n*d+c*-k+q*-m-p*-l;a[2]=q*d+c*-l+p*-k-n*-m;a[3]=b[3];return a};e.forEach=function(){var a=
e.create();return function(b,d,f,g,e,m){d||(d=4);f||(f=0);for(g=g?Math.min(g*d+f,b.length):b.length;f<g;f+=d)a[0]=b[f],a[1]=b[f+1],a[2]=b[f+2],a[3]=b[f+3],e(a,a,m),b[f]=a[0],b[f+1]=a[1],b[f+2]=a[2],b[f+3]=a[3];return b}}();e.str=function(a){return"vec4("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"};e.exactEquals=function(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]};e.equals=function(a,c){var d=a[0],f=a[1],g=a[2],e=a[3],m=c[0],k=c[1],l=c[2],p=c[3];return Math.abs(d-m)<=b.EPSILON*Math.max(1,
Math.abs(d),Math.abs(m))&&Math.abs(f-k)<=b.EPSILON*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(g-l)<=b.EPSILON*Math.max(1,Math.abs(g),Math.abs(l))&&Math.abs(e-p)<=b.EPSILON*Math.max(1,Math.abs(e),Math.abs(p))};return e})},"esri/layers/vectorTiles/views/webgl/VertexArrayObject":function(){define(["require","exports"],function(b,e){return function(){function a(b,d,f,g,e){this._locations=this._layout=this._glName=this._context=null;this._indexBuffer=this._buffers=void 0;this._initialized=!1;this._context=
b;this._layout=f;this._buffers=g;this._locations=d;e&&(this._indexBuffer=e);this._id=a._nextId++}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,"vertexBuffers",{get:function(){return this._buffers},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"indexBuffer",{get:function(){return this._indexBuffer},
enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"layout",{get:function(){return this._layout},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});a.prototype.dispose=function(a){void 0===a&&(a=!0);if(this._context){var b=this._context.extensions.vao;b&&this._glName&&(b.deleteVertexArrayOES(this._glName),this._glName=null);this._context.getBoundVAO()===this&&this._context.bindVAO(null);
if(a){for(var c in this._buffers)this._buffers[c].dispose(),delete this._buffers[c];this._indexBuffer&&(this._indexBuffer.dispose(),this._indexBuffer=null)}this._context=null}};a.prototype.initialize=function(){if(!this._initialized){var a=this._context.extensions.vao;if(a){var b=a.createVertexArrayOES();a.bindVertexArrayOES(b);this._bindLayout();a.bindVertexArrayOES(null);this._glName=b}this._initialized=!0}};a.prototype.bind=function(){this.initialize();var a=this._context.extensions.vao;a?a.bindVertexArrayOES(this.glName):
(this._context.bindVAO(null),this._bindLayout())};a.prototype._bindLayout=function(){var a=this._buffers,b=this._context.extensions.vao,f=this._layout,g=this._indexBuffer;a||console.error("Vertex buffer dictionary is empty!");var e=this._context.gl,m,k,l=0,p;for(p in a)for((m=a[p])||console.error("Vertex buffer is uninitialized!"),(k=f[p])||console.error("Vertex element descriptor is empty!"),this._context.bindBuffer(m),l=0;l<k.length;++l){m=k[l];var n=this._locations[m.name],q=m.baseInstance?m.baseInstance*
m.stride:0;void 0===n&&console.error("There is no location for vertex attribute '"+m.name+"' defined.");m.baseInstance&&!m.divisor&&console.error("Vertex attribute '"+m.name+"' uses baseInstanceOffset without divisor.");if(4>=m.count){if(e.enableVertexAttribArray(n),e.vertexAttribPointer(n,m.count,m.type,m.normalized,m.stride,m.offset+q),m.divisor&&0<m.divisor){var t=this._context.extensions.angleInstancedArrays;t&&t.vertexAttribDivisorANGLE(n,m.divisor)}}else if(16===m.count&&5126===m.type)for(var r=
0;4>r;r++)e.enableVertexAttribArray(n+r),e.vertexAttribPointer(n+r,4,m.type,m.normalized,m.stride,m.offset+16*r+q),m.divisor&&0<m.divisor&&(t=this._context.extensions.angleInstancedArrays)&&t.vertexAttribDivisorANGLE(n+r,m.divisor);else console.error("Unsupported vertex attribute element count: "+m.count)}g&&(b?e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,g.glName):this._context.bindBuffer(g))};a.prototype.unbind=function(){this.initialize();var a=this._context.extensions.vao;a?a.bindVertexArrayOES(null):
this._unbindLayout()};a.prototype._unbindLayout=function(){var a=this._buffers,b=this._layout,f=this._locations,e=this._context;a||console.error("Vertex buffer dictionary is empty!");var h=e.gl,m,k,l,p=0,n=0,q;for(q in a){(m=a[q])||console.error("Vertex buffer is uninitialized!");k=b[q];p=0;for(n=k.length;p<n;++p)l=k[p],h.disableVertexAttribArray(f[l.name]);e.unbindBuffer(m.bufferType)}(a=this._indexBuffer)&&e.unbindBuffer(a.bufferType)};a._nextId=0;return a}()})},"esri/layers/vectorTiles/views/webgl/BufferObject":function(){define(["require",
"exports"],function(b,e){return function(){function a(b,d,f,e,h){this._glName=this._context=null;this._bufferType=void 0;this._usage=35044;this._size=-1;this._indexType=void 0;this._context=b;this._bufferType=d;this._usage=f;this._id=a._nextId++;this._glName=this._context.gl.createBuffer();e&&this.setData(e,h)}a.createIndex=function(b,d,f,e){return new a(b,34963,d,f,e)};a.createVertex=function(b,d,f){return new a(b,34962,d,f)};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,"size",{get:function(){return this._size},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"usage",{get:function(){return this._usage},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bufferType",{get:function(){return this._bufferType},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"indexType",{get:function(){return this._indexType},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"byteSize",{get:function(){return 34962===this._bufferType?this._size:5125===this._indexType?4*this._size:2*this._size},enumerable:!0,configurable:!0});a.prototype.dispose=function(){this._context&&(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context=null)};a.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{var c=a.byteLength;a instanceof Uint16Array&&(c/=2,this._indexType=5123);a instanceof Uint32Array&&(c/=4,this._indexType=5125);this._size=c}c=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);this._context.gl.bufferData(this._bufferType,a,this._usage);this._context.bindVAO(c)}};a.prototype.setSubData=function(a,b,f,e){void 0===b&&(b=0);void 0===f&&(f=
0);if(a){(0>b||b>=this._size)&&console.error("offset is out of range!");var c=b,d=f,g=e,l=a.byteLength;a instanceof Uint16Array&&(l/=2,c*=2,d*=2,g*=2);a instanceof Uint32Array&&(l/=4,c*=4,d*=4,g*=4);void 0===e&&(e=l-1);f>=e&&console.error("end must be bigger than start!");b+f-e>this._size&&console.error("An attempt to write beyond the end of the buffer!");b=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);this._context.gl.bufferSubData(this._bufferType,c,(a instanceof
ArrayBuffer?a:a.buffer).slice(d,g));this._context.bindVAO(b)}};a._nextId=0;return a}()})},"esri/layers/vectorTiles/views/vectorTiles/MemoryBuffer":function(){define(["require","exports"],function(b,e){return function(){function a(a){this._array=[];0>=a&&console.error("strideInBytes must be positive!");this._stride=a}Object.defineProperty(a.prototype,"array",{get:function(){return this._array},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"index",{get:function(){return 4*this._array.length/
this._stride},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"itemSize",{get:function(){return this._stride},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"sizeInBytes",{get:function(){return 4*this._array.length},enumerable:!0,configurable:!0});a.prototype.reset=function(){this.array.length=0};a.prototype.toBuffer=function(){return(new Uint32Array(this._array)).buffer};a.i1616to32=function(a,b){return 65535&a|b<<16};a.i8888to32=function(a,b,f,e){return a&255|
(b&255)<<8|(f&255)<<16|e<<24};a.i8816to32=function(a,b,f){return a&255|(b&255)<<8|f<<16};return a}()})},"esri/layers/vectorTiles/views/webgl/ShaderVariations":function(){define(["require","exports","./Program","./Util","./ShaderSourceVariator"],function(b,e,a,c,d){function f(a){return a.reduce(function(a,b,c){b&&(a|=1<<c);return a},0)}return function(){function b(a,b,c,d,f,e){"string"===typeof a?this._initParams(a,b,c,d,f,e):this._initObject({programNamePrefix:a.programNamePrefix,shaderSnippetPrefixes:a.shaderSnippetPrefixes,
baseDefines:a.baseDefines,snippets:a.snippets,rctx:a.rctx,vertexAttribLocs:a.vertexAttribLocs})}b.prototype._initObject=function(a){this._initParams(a.programNamePrefix,a.shaderSnippetPrefixes,a.baseDefines,a.snippets,a.rctx,a.vertexAttribLocs)};b.prototype._initParams=function(a,b,c,f,e,g){this._defaultSnippets=f;this._defaultRctx=e;this._defaultVertexAttribLocs=g;this._programCache=new Map;this._variationInfo=new Map;this._shaderSourceVariator=new d(a,b,c)};b.prototype.addDefine=function(a,b,c,
d){this._shaderSourceVariator.addDefine(a,b,c,d)};b.prototype.addBinaryShaderSnippetSuffix=function(a,b,c){this._shaderSourceVariator.addBinaryShaderSnippetSuffix(a,b,c)};b.prototype.addNaryShaderSnippetSuffix=function(a,b){this._shaderSourceVariator.addNaryShaderSnippetSuffix(a,b)};b.prototype.getProgram=function(b,d,e,g){d=d||this._defaultSnippets;e=e||this._defaultRctx;g=g||this._defaultVertexAttribLocs;if(!d)throw Error("No ShaderSnippets provided to getProgram nor to ShaderVariations constructor.");
if(!e)throw Error("No RenderingContext provided to getProgram nor to ShaderVariations constructor.");if(!g)throw Error("No VertexAttributeLocations provided to getProgram nor to ShaderVariations constructor.");var h=f(b);if(this._programCache[h])return this._programCache[h];b=this._shaderSourceVariator.getShaderVariation(b);var k,l;k=b.shaderSnippetNames[0];l=d[k];c.assert(null!=l,"shader snippet '"+k+"' does not exist");k=b.shaderSnippetNames[1];d=d[k];c.assert(null!=d,"shader snippet '"+k+"' does not exist");
e=new a(e,l,d,g,b.defines);return this._programCache[h]=e};b.prototype.getProgramByKey=function(b){if(this._programCache[b])return this._programCache[b];if(!this._variationInfo[b])return null;var d=this._variationInfo[b],f=this._defaultSnippets,e=this._defaultRctx,g=this._defaultVertexAttribLocs,h,q;h=d.shaderSnippetNames[0];q=f[h];c.assert(null!=q,"shader snippet '"+h+"' does not exist");h=d.shaderSnippetNames[1];f=f[h];c.assert(null!=f,"shader snippet '"+h+"' does not exist");d=new a(e,q,f,g,d.defines);
return this._programCache[b]=d};b.prototype.getProgramInfo=function(a){var b=this._shaderSourceVariator.getShaderVariation(a);a=f(a);this._variationInfo[a]||(this._variationInfo[a]=b);return{name:b.programName,key:a}};return b}()})},"esri/layers/vectorTiles/views/webgl/Program":function(){define(["require","exports","dojo/has"],function(b,e,a){var c=a("dojo-debug-messages");return function(){function a(b,c,d,e,k){void 0===k&&(k={});this._glName=this._context=null;this._locations={};this._id=void 0;
this._initialized=!1;this._fShader=this._vShader=null;this._defines={};this._nameToUniformLocation={};this._nameToAttribLocation={};this._nameToUniform1={};this._nameToUniform2={};this._nameToUniform3={};this._nameToUniform4={};this._nameToUniformMatrix3={};this._nameToUniformMatrix4={};b||console.error("RenderingContext isn't initialized!");0===c.length&&console.error("Shaders source should not be empty!");this._context=b;this._vertexShaderSource=c;this._fragmentShaderSource=d;if(Array.isArray(k))for(b=
0;b<k.length;b++)this._defines[k[b]]="1";else this._defines=k;this._id=a._nextId++;this._locations=e}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,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});a.prototype.getDefine=function(a){return this._defines[a]};a.prototype.dispose=
function(){if(this._context){var a=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}};a.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);a.attachShader(b,this._fShader);for(var c in this._locations)a.bindAttribLocation(b,this._locations[c],c);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}};a.prototype.getUniformLocation=function(a){this.initialize();void 0===this._nameToUniformLocation[a]&&
(this._nameToUniformLocation[a]=this._context.gl.getUniformLocation(this._glName,a));return this._nameToUniformLocation[a]};a.prototype.hasUniform=function(a){return null!==this.getUniformLocation(a)};a.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]};a.prototype.setUniform1i=function(a,b){var c=this._nameToUniform1[a];if(void 0===
c||b!==c)this._context.bindProgram(this),this._context.gl.uniform1i(this.getUniformLocation(a),b),this._nameToUniform1[a]=b};a.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};a.prototype.setUniform1fv=function(b,c){var d=this._nameToUniform2[b];void 0!==d&&a._arraysEqual(c,d)||(this._context.bindProgram(this),this._context.gl.uniform1fv(this.getUniformLocation(b),
c),void 0===d?this._nameToUniform2[b]=new Float32Array(c):d.set(c))};a.prototype.setUniform2f=function(a,b,c){var d=this._nameToUniform2[a];if(void 0===d||b!==d[0]||c!==d[1])this._context.bindProgram(this),this._context.gl.uniform2f(this.getUniformLocation(a),b,c),void 0===d?this._nameToUniform2[a]=new Float32Array([b,c]):(d[0]=b,d[1]=c)};a.prototype.setUniform2fv=function(b,d){c&&0!==d.length%2&&console.error("Value array must have even number of elements!");var f=this._nameToUniform2[b];void 0!==
f&&a._arraysEqual(d,f)||(this._context.bindProgram(this),this._context.gl.uniform2fv(this.getUniformLocation(b),d),void 0===f?this._nameToUniform2[b]=new Float32Array(d):f.set(d))};a.prototype.setUniform3f=function(a,b,c,d){var f=this._nameToUniform3[a];if(void 0===f||b!==f[0]||c!==f[1]||d!==f[2])this._context.bindProgram(this),this._context.gl.uniform3f(this.getUniformLocation(a),b,c,d),void 0===f?this._nameToUniform3[a]=new Float32Array([b,c,d]):(f[0]=b,f[1]=c,f[2]=d)};a.prototype.setUniform3fv=
function(b,d){c&&0!==d.length%3&&console.error("Value array must contain sets of three values!");var f=this._nameToUniform3[b];void 0!==f&&a._arraysEqual(d,f)||(this._context.bindProgram(this),this._context.gl.uniform3fv(this.getUniformLocation(b),d),void 0===f?this._nameToUniform3[b]=new Float32Array(d):f.set(d))};a.prototype.setUniform4f=function(a,b,c,d,e){var f=this._nameToUniform4[a];if(void 0===f||b!==f[0]||c!==f[1]||d!==f[2]||e!==f[3])this._context.bindProgram(this),this._context.gl.uniform4f(this.getUniformLocation(a),
b,c,d,e),void 0===f?this._nameToUniform4[a]=new Float32Array([b,c,d,e]):(f[0]=b,f[1]=c,f[2]=d,f[3]=e)};a.prototype.setUniform4fv=function(b,d){c&&0!==d.length%4&&console.error("Value array must contain sets of four values!");var f=this._nameToUniform4[b];void 0!==f&&a._arraysEqual(d,f)||(this._context.bindProgram(this),this._context.gl.uniform4fv(this.getUniformLocation(b),d),void 0===f?this._nameToUniform4[b]=new Float32Array(d):f.set(d))};a.prototype.setUniformMatrix3fv=function(b,d,e){void 0===
e&&(e=!1);c&&0!==d.length%9&&console.error("Matrix array must contain sets ot 9 elements!");var f=this._nameToUniformMatrix3[b];void 0!==f&&(9===f.length?a._matrix3Equal(f,d):a._arraysEqual(d,f))||(this._context.bindProgram(this),this._context.gl.uniformMatrix3fv(this.getUniformLocation(b),e,d),void 0===f?this._nameToUniformMatrix3[b]=new Float32Array(d):f.set(d))};a.prototype.setUniformMatrix4fv=function(b,d,e){void 0===e&&(e=!1);c&&0!==d.length%16&&console.error("Matrix array must contain sets ot 16 elements!");
var f=this._nameToUniformMatrix4[b];void 0!==f&&(16===f.length?a._matrix4Equal(f,d):a._arraysEqual(d,f))||(this._context.bindProgram(this),this._context.gl.uniformMatrix4fv(this.getUniformLocation(b),e,d),void 0===f?this._nameToUniformMatrix4[b]=new Float32Array(d):f.set(d))};a._padToThree=function(a){var b=a.toString();1E3>a&&(b=("  "+a).slice(-3));return b};a.prototype._addLineNumbers=function(b){var c=2;return b.replace(/\n/g,function(){return"\n"+a._padToThree(c++)+":"})};a.prototype._loadShader=
function(a){var b=35633===a?this._vertexShaderSource:this._fragmentShaderSource,c="",d;for(d in this._defines)c+="#define "+d+" "+this._defines[d]+"\n";b=c+b;c=this._context.gl;a=c.createShader(a);c.shaderSource(a,b);c.compileShader(a);c.getShaderParameter(a,c.COMPILE_STATUS)||(console.error(c.getShaderInfoLog(a)),console.error(this._addLineNumbers(b)));return a};a._matrix4Equal=function(a,b){c&&(16===a.length&&16===b.length||console.error("Matrix object must contain 16 elements!"));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]};a._matrix3Equal=function(a,b){c&&(9===a.length&&9===b.length||console.error("Matrix object must contain 16 elements!"));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._arraysEqual=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};a._nextId=0;return a}()})},"esri/layers/vectorTiles/views/webgl/Util":function(){define(["require","exports","../../core/tsSupport/assignHelper","../../core/Error"],function(b,e,a,c){return function(){function b(){}b.vertexCount=function(a,c){return a.vertexBuffers[c].size/b.getStride(a.layout[c])};b.getStride=function(a){return a[0].stride};b.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");}};b.addDescriptor=function(a,c,d,e,k,l){var f=b.getBytesPerElement(e);if(0<a.length){var g=a[0].stride,h=g+f*d;a.forEach(function(a){return a.stride=h});a.push({name:c,count:d,type:e,offset:g,stride:h,normalized:k,divisor:l})}else a.push({name:c,count:d,type:e,offset:0,stride:f*d,normalized:k,divisor:l})};b.assertCompatibleVertexAttributeLocations=function(a,b){var c=a.locations===
b.locations;c||console.error("VertexAttributeLocations are incompatible");return c};b.hasAttribute=function(a,b){for(var c=0;c<a.length;c++)if(a[c].name===b)return!0;return!1};b.findAttribute=function(a,b){for(var c=0;c<a.length;c++)if(a[c].name===b)return a[c];return null};b.copyFramebufferToTexture=function(a,b,c,d,e){void 0===e&&(e=0);var f=a.getBoundFramebufferObject(),g=a.getBoundTexture(0);a.bindFramebuffer(b);a.bindTexture(c,0);a.gl.copyTexImage2D(a.gl.TEXTURE_2D,e,c.descriptor.pixelFormat,
d[0],d[1],d[2],d[3],0);a.gl.flush();a.bindFramebuffer(f);a.bindTexture(g,0)};b.assert=function(a,b){if(!a)throw new c(b);};b.setBaseInstanceOffset=function(b,c){var d={},f;for(f in b)d[f]=b[f].map(function(b){return b.divisor?a({},b,{baseInstance:c}):b});return d};return b}()})},"esri/layers/vectorTiles/core/tsSupport/assignHelper":function(){define([],function(){return Object.assign||function(b){for(var e,a=1,c=arguments.length;a<c;a++){e=arguments[a];for(var d in e)Object.prototype.hasOwnProperty.call(e,
d)&&(b[d]=e[d])}return b}})},"esri/layers/vectorTiles/views/webgl/ShaderSourceVariator":function(){define(["require","exports","dojo/_base/lang","./Util"],function(b,e,a,c){return function(){function b(a,b,d){var f;"string"===typeof a?f=a:(f=a.programNamePrefix,b=a.shaderSnippetPrefixes,d=a.baseDefines);c.assert(b,"you must specify shader snippet prefixes");c.assert(2===b.length,"you must specify shader snippet prefixes for vertex and fragment shaders");d&&0!==d.length||(d=[]);this.programNamePrefix=
f;this.shaderSnippetPrefixes=b;this.baseDefines=d;this.variables=[];this.sealed=!1}b.prototype.addDefine=function(a,b,d,e){c.assert(!this.sealed,"you cannot add another variable after the first program has been generated");c.assert(a,"you must specify a program name suffix");this.variables.push({programNameSuffixes:["",a],shaderNameSuffixes:e||a,defineStr:b,affectsShaderTypes:d||[!0,!0]})};b.prototype.addBinaryShaderSnippetSuffix=function(a,b,d){c.assert(!this.sealed,"you cannot add another variable after the first program has been generated");
c.assert(a,"you must specify a program name suffix");this.variables.push({programNameSuffixes:["",a],shaderSnippetSuffixes:["",b],affectsShaderTypes:d||[!0,!0]})};b.prototype.addNaryShaderSnippetSuffix=function(a,b){c.assert(!this.sealed,"you cannot add another variable after the first program has been generated");var d=a.map(function(a){c.assert(null!=a.value,"value must always be specified");return a.value});this.variables.push({values:d,programNameSuffixes:a.map(function(a,b){return null!=a.programNameSuffix?
a.programNameSuffix:d[b]}),shaderSnippetSuffixes:a.map(function(a,b){return null!=a.shaderSnippetSuffix?a.shaderSnippetSuffix:d[b]}),affectsShaderTypes:b||[!0,!0]})};b.prototype.getShaderVariation=function(b){c.assert(b.length===this.variables.length,"you must specify a value for each variable");for(var d=this.programNamePrefix,f=a.clone(this.shaderSnippetPrefixes),e=a.clone(this.shaderSnippetPrefixes),k=a.clone(this.baseDefines),l=0;l<this.variables.length;l++){var p=this.variables[l],n=b[l],q=void 0;
p.values?(q=p.values.indexOf(n),c.assert(0<=q,"invalid value "+n+" for variable "+l)):q=n?1:0;d+=p.programNameSuffixes[q];for(n=0;2>n;n++)p.affectsShaderTypes[n]&&(p.shaderSnippetSuffixes&&(f[n]+=p.shaderSnippetSuffixes[q],e[n]+=p.shaderSnippetSuffixes[q]),p.defineStr&&q&&(k.push(p.defineStr),e[n]+=p.shaderNameSuffixes))}return{programName:d,shaderSnippetNames:f,shaderNames:e,defines:k}};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/vtShaderSnippets":function(){define("require exports ../../webgl/ShaderSnippets dojo/text!./shaders/backgroundShaders.xml dojo/text!./shaders/fillShaders.xml dojo/text!./shaders/outlineShaders.xml dojo/text!./shaders/lineShaders.xml dojo/text!./shaders/iconShaders.xml dojo/text!./shaders/textShaders.xml dojo/text!./shaders/tileInfo.vs.glsl dojo/text!./shaders/tileInfo.fs.glsl".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){function p(a,b){n+='\x3csnippet name\x3d"'+a+'"\x3e\x3c![CDATA[';n+=b;n+="]]\x3e\x3c/snippet\x3e"}var n="",n=n+'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e',n=n+"\x3csnippets\x3e";p("tileInfoVS",k);p("tileInfoFS",l);n+="\x3c/snippets\x3e";b=new a;a.parse(c,b);a.parse(n,b);a.parse(d,b);a.parse(f,b);a.parse(g,b);a.parse(h,b);a.parse(m,b);return b})},"esri/layers/vectorTiles/views/webgl/ShaderSnippets":function(){define(["require","exports","dojox/xml/parser"],
function(b,e,a){return function(){function b(a){if(a)for(var b in a)this[b]=a[b]}b.parse=function(b,c){for(var d=a.parse(b).getElementsByTagName("snippet"),f=/\$[a-zA-Z][a-zA-Z0-9]*(?:\([^\(\)]*\))?[ \t]*/,e=/[\$\s]+/g,k=/\(([^\(\)]*)\)/,l=0;l<d.length;l++){for(var p=d[l].getAttribute("name"),n=d[l].textContent;;){var q=n.match(f);if(null==q)break;var t=q[0].replace(e,""),r=t.match(k),u=void 0;r&&(u=r[1].split(",").map(function(a){return a.trim()}));t=t.replace(k,"");u=c._instantiate(t,u);n=n.replace(q[0],
u)}c[p]=n}};b.prototype._instantiate=function(a,b){var c=this[a];for(b||(b=[]);;){var d=c.match(/\$(\d+)/);if(null==d)break;var f=parseInt(d[1],10),c=c.replace(d[0],b[f])}return c};return b}()})},"dojox/xml/parser":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(b){b.getObject("xml.parser",!0,dojox);dojox.xml.parser.parse=function(e,a){var c=b.doc,d;a=a||"text/xml";if(e&&b.trim(e)&&"DOMParser"in b.global){d=(new DOMParser).parseFromString(e,
a);c=d.documentElement;if("parsererror"==c.nodeName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"==c.namespaceURI){var f=c.getElementsByTagNameNS("http://www.mozilla.org/newlayout/xml/parsererror.xml","sourcetext")[0];f&&(f=f.firstChild.data);throw Error("Error parsing text "+c.firstChild.data+" \n"+f);}return d}if("ActiveXObject"in b.global){c=function(a){return"MSXML"+a+".DOMDocument"};c=["Microsoft.XMLDOM",c(6),c(4),c(3),c(2)];b.some(c,function(a){try{d=new ActiveXObject(a)}catch(m){return!1}return!0});
if(e&&d&&(d.async=!1,d.loadXML(e),c=d.parseError,0!==c.errorCode))throw Error("Line: "+c.line+"\nCol: "+c.linepos+"\nReason: "+c.reason+"\nError Code: "+c.errorCode+"\nSource: "+c.srcText);if(d)return d}else if(c.implementation&&c.implementation.createDocument){if(e&&b.trim(e)&&c.createElement){f=c.createElement("xml");f.innerHTML=e;var g=c.implementation.createDocument("foo","",null);b.forEach(f.childNodes,function(a){g.importNode(a,!0)});return g}return c.implementation.createDocument("","",null)}return null};
dojox.xml.parser.textContent=function(e,a){if(1<arguments.length)return dojox.xml.parser.replaceChildren(e,(e.ownerDocument||b.doc).createTextNode(a)),a;if(void 0!==e.textContent)return e.textContent;var c="";e&&b.forEach(e.childNodes,function(a){switch(a.nodeType){case 1:case 5:c+=dojox.xml.parser.textContent(a);break;case 3:case 2:case 4:c+=a.nodeValue}});return c};dojox.xml.parser.replaceChildren=function(e,a){var c=[];b.isIE&&b.forEach(e.childNodes,function(a){c.push(a)});dojox.xml.parser.removeChildren(e);
b.forEach(c,b.destroy);b.isArray(a)?b.forEach(a,function(a){e.appendChild(a)}):e.appendChild(a)};dojox.xml.parser.removeChildren=function(b){for(var a=b.childNodes.length;b.hasChildNodes();)b.removeChild(b.firstChild);return a};dojox.xml.parser.innerXML=function(b){return b.innerXML?b.innerXML:b.xml?b.xml:"undefined"!=typeof XMLSerializer?(new XMLSerializer).serializeToString(b):null};return dojox.xml.parser})},"esri/layers/vectorTiles/views/vectorTiles/renderers/rendererUtils":function(){define(["require",
"exports"],function(b,e){Object.defineProperty(e,"__esModule",{value:!0});var a=new Uint32Array(1),c=new Uint8Array(a.buffer);e.int32To4Bytes=function(b){a[0]=b|0;return[c[0],c[1],c[2],c[3]]}})},"esri/layers/vectorTiles/views/vectorTiles/renderers/LineRenderer":function(){define("require exports ../../../core/libs/gl-matrix/mat4 ../../../core/libs/gl-matrix/vec4 ../../../core/libs/gl-matrix/vec3 ../../../core/libs/gl-matrix/vec2 ../../webgl/VertexArrayObject ../GeometryUtils ./rendererUtils ../../webgl/ShaderVariations ./vtShaderSnippets".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){return function(){function b(){this._attributeLocations={a_pos:0,a_offsetAndNormal:1,a_accumulatedDistance:2};this._attributeLocationsDD={a_pos:0,a_offsetAndNormal:1,a_accumulatedDistance:2,a_color:3,a_width:4};this._initialized=!1;this._viewProjMat=a.create();this._offsetVector=d.create();this._color=c.create();this._dashArray=f.create()}b.prototype.dispose=function(){};b.prototype.render=function(b,c,d,f,e,g,k,l,p,z,A){if(0!==c.triangleElementCount){this._initialized||
this._initialize(b);var n=g.tileTransform.transform,q=g.coordRange/512,u=k.getPaintValue("line-translate",d);if(0!==u[0]||0!==u[1]){a.copy(this._viewProjMat,g.tileTransform.transform);var n=u[0],u=u[1],C=0,t=0,t=(1<<g.key.level)/Math.pow(2,d)*q;e=e.rotation;if(1===k.getPaintValue("line-translate-anchor",d)){C=-h.C_DEG_TO_RAD*e;e=Math.sin(C);var r=Math.cos(C),C=t*(n*r-u*e),t=t*(n*e+u*r)}else C=t*n,t*=u;this._offsetVector[0]=C;this._offsetVector[1]=t;this._offsetVector[2]=0;a.translate(this._viewProjMat,
this._viewProjMat,this._offsetVector);n=this._viewProjMat}u=k.getPaintValue("line-pattern",d);t=void 0!==u;z=1/z;e=k.getPaintValue("line-blur",d)+z;z=k.getPaintValue("line-width",d);C=A*k.getPaintValue("line-opacity",d);A=k.getPaintValue("line-color",d);var r=k.hasDataDrivenLine,v=3===f,w;v&&(w=m.int32To4Bytes(c.layerID));if(f=this._getLineVAO(b,g,r)){b.bindVAO(f);f=this._shaderVariations.getProgram([t,r,v],void 0,void 0,r?this._attributeLocationsDD:this._attributeLocations);b.bindProgram(f);f.setUniformMatrix4fv("u_transformMatrix",
n);f.setUniformMatrix4fv("u_extrudeMatrix",p);f.setUniform2fv("u_normalized_origin",g.tileTransform.displayCoord);f.setUniform1f("u_depth",k.z);f.setUniform1f("u_blur",e);r||(g=C*A[3],this._color[0]=g*A[0],this._color[1]=g*A[1],this._color[2]=g*A[2],this._color[3]=g,f.setUniform4fv("u_color",this._color),f.setUniform1f("u_width",z));v&&f.setUniform4f("u_id",w[0],w[1],w[2],w[3]);if(t){if(d=l.getMosaicItemPosition(u,!0))l.bind(b,9729,d.page,1),f.setUniform2f("u_pattern_tl",d.tl[0],d.tl[1]),f.setUniform2f("u_pattern_br",
d.br[0],d.br[1]),f.setUniform2f("u_spriteSize",q*d.size[0],d.size[1]),f.setUniform1i("u_texture",1)}else l=k.getPaintValue("line-dasharray",d),2>l.length&&(l=[1,-1]),this._dashArray[0]=q*l[0],this._dashArray[1]=q*l[1],f.setUniform2fv("u_dasharray",this._dashArray);b.drawElements(4,c.triangleElementCount,5125,12*c.triangleElementStart);b.bindVAO()}}};b.prototype._initialize=function(a){if(this._initialized)return!0;a=new k("line",["lineVS","lineFS"],[],l,a);a.addDefine("PATTERN","PATTERN",[!0,!0],
"PATTERN");a.addDefine("DD","DD",[!0,!1],"DD");a.addDefine("ID","ID",[!0,!0],"ID");this._shaderVariations=a;this._vertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:12,normalized:!1,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:4,stride:12,normalized:!1,divisor:0},{name:"a_accumulatedDistance",count:2,type:5123,offset:8,stride:12,normalized:!1,divisor:0}]};this._vertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:20,normalized:!1,
divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:4,stride:20,normalized:!1,divisor:0},{name:"a_accumulatedDistance",count:2,type:5122,offset:8,stride:20,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:20,normalized:!0,divisor:0},{name:"a_width",count:1,type:5126,offset:16,stride:20,normalized:!1,divisor:0}]};return this._initialized=!0};b.prototype._getLineVAO=function(a,b,c){if(c){if(b.lineDDVertexArrayObject)return b.lineDDVertexArrayObject;c=b.lineDDVertexBuffer;
var d=b.lineIndexBuffer;if(!c||!d)return null;b.lineDDVertexArrayObject=new g(a,this._attributeLocationsDD,this._vertexAttributesDD,{geometry:c},d);return b.lineDDVertexArrayObject}if(b.lineVertexArrayObject)return b.lineVertexArrayObject;c=b.lineVertexBuffer;d=b.lineIndexBuffer;if(!c||!d)return null;b.lineVertexArrayObject=new g(a,this._attributeLocations,this._vertexAttributes,{geometry:c},d);return b.lineVertexArrayObject};return b}()})},"esri/layers/vectorTiles/core/libs/gl-matrix/vec2":function(){define(["./common"],
function(b){var e={create:function(){var a=new b.ARRAY_TYPE(2);a[0]=0;a[1]=0;return a},clone:function(a){var c=new b.ARRAY_TYPE(2);c[0]=a[0];c[1]=a[1];return c},fromValues:function(a,c){var d=new b.ARRAY_TYPE(2);d[0]=a;d[1]=c;return d},copy:function(a,b){a[0]=b[0];a[1]=b[1];return a},set:function(a,b,d){a[0]=b;a[1]=d;return a},add:function(a,b,d){a[0]=b[0]+d[0];a[1]=b[1]+d[1];return a},subtract:function(a,b,d){a[0]=b[0]-d[0];a[1]=b[1]-d[1];return a}};e.sub=e.subtract;e.multiply=function(a,b,d){a[0]=
b[0]*d[0];a[1]=b[1]*d[1];return a};e.mul=e.multiply;e.divide=function(a,b,d){a[0]=b[0]/d[0];a[1]=b[1]/d[1];return a};e.div=e.divide;e.ceil=function(a,b){a[0]=Math.ceil(b[0]);a[1]=Math.ceil(b[1]);return a};e.floor=function(a,b){a[0]=Math.floor(b[0]);a[1]=Math.floor(b[1]);return a};e.min=function(a,b,d){a[0]=Math.min(b[0],d[0]);a[1]=Math.min(b[1],d[1]);return a};e.max=function(a,b,d){a[0]=Math.max(b[0],d[0]);a[1]=Math.max(b[1],d[1]);return a};e.round=function(a,b){a[0]=Math.round(b[0]);a[1]=Math.round(b[1]);
return a};e.scale=function(a,b,d){a[0]=b[0]*d;a[1]=b[1]*d;return a};e.scaleAndAdd=function(a,b,d,f){a[0]=b[0]+d[0]*f;a[1]=b[1]+d[1]*f;return a};e.distance=function(a,b){var c=b[0]-a[0],f=b[1]-a[1];return Math.sqrt(c*c+f*f)};e.dist=e.distance;e.squaredDistance=function(a,b){var c=b[0]-a[0],f=b[1]-a[1];return c*c+f*f};e.sqrDist=e.squaredDistance;e.length=function(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)};e.len=e.length;e.squaredLength=function(a){var b=a[0];a=a[1];return b*b+a*a};e.sqrLen=e.squaredLength;
e.negate=function(a,b){a[0]=-b[0];a[1]=-b[1];return a};e.inverse=function(a,b){a[0]=1/b[0];a[1]=1/b[1];return a};e.normalize=function(a,b){var c=b[0],f=b[1],c=c*c+f*f;0<c&&(c=1/Math.sqrt(c),a[0]=b[0]*c,a[1]=b[1]*c);return a};e.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]};e.cross=function(a,b,d){b=b[0]*d[1]-b[1]*d[0];a[0]=a[1]=0;a[2]=b;return a};e.lerp=function(a,b,d,f){var c=b[0];b=b[1];a[0]=c+f*(d[0]-c);a[1]=b+f*(d[1]-b);return a};e.random=function(a,c){c=c||1;var d=2*b.RANDOM()*Math.PI;a[0]=Math.cos(d)*
c;a[1]=Math.sin(d)*c;return a};e.transformMat2=function(a,b,d){var c=b[0];b=b[1];a[0]=d[0]*c+d[2]*b;a[1]=d[1]*c+d[3]*b;return a};e.transformMat2d=function(a,b,d){var c=b[0];b=b[1];a[0]=d[0]*c+d[2]*b+d[4];a[1]=d[1]*c+d[3]*b+d[5];return a};e.transformMat3=function(a,b,d){var c=b[0];b=b[1];a[0]=d[0]*c+d[3]*b+d[6];a[1]=d[1]*c+d[4]*b+d[7];return a};e.transformMat4=function(a,b,d){var c=b[0];b=b[1];a[0]=d[0]*c+d[4]*b+d[12];a[1]=d[1]*c+d[5]*b+d[13];return a};e.forEach=function(){var a=e.create();return function(b,
d,f,e,h,m){d||(d=2);f||(f=0);for(e=e?Math.min(e*d+f,b.length):b.length;f<e;f+=d)a[0]=b[f],a[1]=b[f+1],h(a,a,m),b[f]=a[0],b[f+1]=a[1];return b}}();e.str=function(a){return"vec2("+a[0]+", "+a[1]+")"};e.exactEquals=function(a,b){return a[0]===b[0]&&a[1]===b[1]};e.equals=function(a,c){var d=a[0],f=a[1],e=c[0],h=c[1];return Math.abs(d-e)<=b.EPSILON*Math.max(1,Math.abs(d),Math.abs(e))&&Math.abs(f-h)<=b.EPSILON*Math.max(1,Math.abs(f),Math.abs(h))};return e})},"esri/layers/vectorTiles/views/vectorTiles/renderers/FillRenderer":function(){define("require exports ../../../core/libs/gl-matrix/mat4 ../../../core/libs/gl-matrix/mat3 ../../../core/libs/gl-matrix/vec4 ../../../core/libs/gl-matrix/vec3 ../../webgl/VertexArrayObject ../GeometryUtils ./rendererUtils ../../webgl/ShaderVariations ./vtShaderSnippets".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){var p=1/65536;return function(){function b(){this._fillAttributeLocations={a_pos:0};this._fillAttributeLocationsDD={a_pos:0,a_color:1};this._outlineAttributeLocations={a_pos:0,a_offset:1,a_xnormal:2};this._outlineAttributeLocationsDD={a_pos:0,a_offset:1,a_xnormal:2,a_color:3};this._initialized=!1;this._viewProjMat=a.create();this._offsetVector=f.create();this._patternMatrix=c.create();this._color=d.create();this._outlineColor=d.create()}b.prototype.dispose=function(){};
b.prototype.render=function(b,c,d,f,e,g,k,l,n,A,B){if(0!==c.triangleElementCount){this._initialized||this._initialize(b);var q=void 0!==k.getPaintValue("fill-pattern",d),u=B*k.getPaintValue("fill-opacity",d),C=k.getPaintValue("fill-color",d),t=3===e,r;t&&(r=m.int32To4Bytes(c.layerID));var v=g.tileTransform.transform,w=g.coordRange/512,z=k.getPaintValue("fill-translate",d);if(0!==z[0]||0!==z[1]){a.copy(this._viewProjMat,g.tileTransform.transform);var v=z[0],z=z[1],y=0,x=0,w=(1<<g.key.level)/Math.pow(2,
d)*w;1===k.getPaintValue("fill-translate-anchor",d)?(y=-h.C_DEG_TO_RAD*f,f=Math.sin(y),x=Math.cos(y),y=w*(v*x-z*f),x=w*(v*f+z*x)):(y=w*v,x=w*z);this._offsetVector[0]=y;this._offsetVector[1]=x;this._offsetVector[2]=0;a.translate(this._viewProjMat,this._viewProjMat,this._offsetVector);v=this._viewProjMat}this._drawFill(b,c,d,e,g,k,l,v,A,B,t,r);if(k.getPaintValue("fill-antialias",d)&&!q&&0<c.outlineElementCount&&(1===e||3===e)){e=k.hasDataDrivenOutline;d=k.getPaintValue("fill-outline-color",d);if(0===
d[3]){if(1!==this._color[3]&&!e)return;d=C}A=.75/A;if(C=this._getOutlineVAO(b,g,e))b.bindVAO(C),C=this._outlineShaderVariations.getProgram([e,t],void 0,void 0,e?this._outlineAttributeLocationsDD:this._outlineAttributeLocations),b.bindProgram(C),C.setUniformMatrix4fv("u_transformMatrix",v),C.setUniformMatrix4fv("u_extrudeMatrix",n),C.setUniform2fv("u_normalized_origin",g.tileTransform.displayCoord),C.setUniform1f("u_depth",k.z+p),C.setUniform1f("u_outline_width",A),e||(g=u*d[3],this._outlineColor[0]=
g*d[0],this._outlineColor[1]=g*d[1],this._outlineColor[2]=g*d[2],this._outlineColor[3]=g,C.setUniform4fv("u_color",this._outlineColor)),t&&C.setUniform4f("u_id",r[0],r[1],r[2],r[3]),b.drawElements(4,c.outlineElementCount,5125,12*c.outlineElementStart),b.bindVAO()}}};b.prototype._initialize=function(a){if(this._initialized)return!0;var b=new k("fill",["fillVS","fillFS"],[],l,a);b.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");b.addDefine("DD","DD",[!0,!1],"DD");b.addDefine("ID","ID",[!0,!0],"ID");
this._fillShaderVariations=b;this._fillVertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:4,normalized:!1,divisor:0}]};this._fillVertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:8,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:4,stride:8,normalized:!0,divisor:0}]};a=new k("outline",["outlineVS","outlineFS"],[],l,a);a.addDefine("DD","DD",[!0,!1],"DD");a.addDefine("ID","ID",[!0,!0],"ID");this._outlineShaderVariations=a;this._outlineVertexAttributes=
{geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:8,normalized:!1,divisor:0},{name:"a_offset",count:2,type:5120,offset:4,stride:8,normalized:!1,divisor:0},{name:"a_xnormal",count:2,type:5120,offset:6,stride:8,normalized:!1,divisor:0}]};this._outlineVertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:12,normalized:!1,divisor:0},{name:"a_offset",count:2,type:5120,offset:4,stride:12,normalized:!1,divisor:0},{name:"a_xnormal",count:2,type:5120,offset:6,stride:12,normalized:!1,
divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:12,normalized:!0,divisor:0}]};return this._initialized=!0};b.prototype._drawFill=function(a,b,d,f,e,g,h,k,l,n,m,D){var q=g.getPaintValue("fill-pattern",d),C=void 0!==q,u=n*g.getPaintValue("fill-opacity",d);n=g.getPaintValue("fill-color",d);var t=g.hasDataDrivenFill,r=t?.5:n[3]*u,A=!1;C||1!==r||(A=!0);if(!C||0!==f)if(!A||1!==f)if(C||A||0!==f)if(f=this._getFillVAO(a,e,t))a.bindVAO(f),f=this._fillShaderVariations.getProgram([C,t,m],void 0,
void 0,t?this._fillAttributeLocationsDD:this._fillAttributeLocations),a.bindProgram(f),C&&(q=h.getMosaicItemPosition(q,!0))&&(d=e.coordRange/512/Math.pow(2,Math.round(d)-e.key.level)/l,c.identity(this._patternMatrix),l=1/(q.size[1]*d),this._patternMatrix[0]=1/(q.size[0]*d),this._patternMatrix[4]=l,h.bind(a,9729,q.page,1),f.setUniformMatrix3fv("u_pattern_matrix",this._patternMatrix),f.setUniform2f("u_pattern_tl",q.tl[0],q.tl[1]),f.setUniform2f("u_pattern_br",q.br[0],q.br[1]),f.setUniform1i("u_texture",
1)),f.setUniformMatrix4fv("u_transformMatrix",k),f.setUniform2fv("u_normalized_origin",e.tileTransform.displayCoord),f.setUniform1f("u_depth",g.z+p),t||(e=u*n[3],this._color[0]=e*n[0],this._color[1]=e*n[1],this._color[2]=e*n[2],this._color[3]=e,f.setUniform4fv("u_color",this._color)),m&&f.setUniform4f("u_id",D[0],D[1],D[2],D[3]),a.drawElements(4,b.triangleElementCount,5125,12*b.triangleElementStart),a.bindVAO()};b.prototype._getFillVAO=function(a,b,c){if(c){if(b.fillDDVertexArrayObject)return b.fillDDVertexArrayObject;
c=b.fillDDVertexBuffer;var d=b.fillIndexBuffer;if(!c||!d)return null;b.fillDDVertexArrayObject=new g(a,this._fillAttributeLocationsDD,this._fillVertexAttributesDD,{geometry:c},d);return b.fillDDVertexArrayObject}if(b.fillVertexArrayObject)return b.fillVertexArrayObject;c=b.fillVertexBuffer;d=b.fillIndexBuffer;if(!c||!d)return null;b.fillVertexArrayObject=new g(a,this._fillAttributeLocations,this._fillVertexAttributes,{geometry:c},d);return b.fillVertexArrayObject};b.prototype._getOutlineVAO=function(a,
b,c){if(c){if(b.outlineDDVertexArrayObject)return b.outlineDDVertexArrayObject;c=b.outlineDDVertexBuffer;var d=b.outlineIndexBuffer;if(!c||!d)return null;b.outlineDDVertexArrayObject=new g(a,this._outlineAttributeLocationsDD,this._outlineVertexAttributesDD,{geometry:c},d);return b.outlineDDVertexArrayObject}if(b.outlineVertexArrayObject)return b.outlineVertexArrayObject;c=b.outlineVertexBuffer;d=b.outlineIndexBuffer;if(!c||!d)return null;b.outlineVertexArrayObject=new g(a,this._outlineAttributeLocations,
this._outlineVertexAttributes,{geometry:c},d);return b.outlineVertexArrayObject};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/SymbolRenderer":function(){define(["require","exports","./IconRenderer","./SDFRenderer"],function(b,e,a,c){return function(){function b(){this._iconRenderer=new a;this._sdfRenderer=new c}b.prototype.dispose=function(){this._iconRenderer&&(this._iconRenderer.dispose(),this._iconRenderer=null);this._sdfRenderer&&(this._sdfRenderer.dispose(),this._sdfRenderer=
null)};b.prototype.render=function(a,b,c,d,e,l,p,n,q,t,r,u,w,v){b.hasData()&&(0<b.markerPerPageElementsMap.size&&this._iconRenderer.render(a,b,c,d,e,l,p,n,q,r,u,v),0<b.glyphPerPageElementsMap.size&&this._sdfRenderer.render(a,b,c,d,e,l,p,n,t,r,u,w,v))};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/IconRenderer":function(){define("require exports ../../../core/libs/gl-matrix/mat4 ../../../core/libs/gl-matrix/vec3 ../../webgl/VertexArrayObject ../GeometryUtils ./rendererUtils ../../webgl/ShaderVariations ./vtShaderSnippets".split(" "),
function(b,e,a,c,d,f,g,h,m){return function(){function b(){this._attributeLocations={a_pos:0,a_vertexOffset:1,a_tex:2,a_levelInfo:3};this._attributeLocationsDD={a_pos:0,a_vertexOffset:1,a_tex:2,a_levelInfo:3,a_color:4,a_size:5};this._spritesTextureSize=new Float32Array(2);this._initialized=!1;this._viewProjMat=a.create();this._offsetVector=c.create();this._extrudeMat=a.create()}b.prototype.dispose=function(){};b.prototype.render=function(b,c,d,e,h,k,m,w,v,y,x,z){var l=this;this._initialized||this._initialize(b);
var n=w.getLayoutValue("icon-size",d);z*=w.getPaintValue("icon-opacity",d);var p=w.getLayoutValue("icon-rotation-alignment",d);2===p&&(p=1===w.getLayoutValue("symbol-placement",d)?0:1);var q=0===p,C=c.isSDF,u=w.hasDataDrivenIcon;e=3===e;var p=f.degToByte(h),t=m.tileTransform.transform,r=w.getPaintValue("icon-translate",d);if(0!==r[0]||0!==r[1]){a.copy(this._viewProjMat,m.tileTransform.transform);var t=r[0],r=r[1],N=0,J=0,J=(1<<m.key.level)/Math.pow(2,d)*(m.coordRange/512);if(1===w.getPaintValue("icon-translate-anchor",
d)){N=-f.C_DEG_TO_RAD*h;h=Math.sin(N);var G=Math.cos(N),N=J*(t*G-r*h),J=J*(t*h+r*G)}else N=J*t,J*=r;this._offsetVector[0]=N;this._offsetVector[1]=J;this._offsetVector[2]=0;a.translate(this._viewProjMat,this._viewProjMat,this._offsetVector);t=this._viewProjMat}q?a.copy(this._extrudeMat,y):a.copy(this._extrudeMat,x);if(y=this._getIconVAO(b,m,u)){b.bindVAO(y);var I=this._shaderVariations.getProgram([C,u,e],void 0,void 0,u?this._attributeLocationsDD:this._attributeLocations);b.bindProgram(I);C&&(y=w.getPaintValue("icon-color",
d),x=w.getPaintValue("icon-halo-color",d),C=w.getPaintValue("icon-halo-width",d),I.setUniform4f("u_color",y[0],y[1],y[2],y[3]),I.setUniform4f("u_outlineColor",x[0],x[1],x[2],x[3]),I.setUniform1f("u_outlineSize",C));I.setUniformMatrix4fv("u_transformMatrix",t);I.setUniformMatrix4fv("u_extrudeMatrix",this._extrudeMat);I.setUniform2fv("u_normalized_origin",m.tileTransform.displayCoord);I.setUniform1f("u_depth",w.z);I.setUniform1f("u_mapRotation",p);I.setUniform1f("u_keepUpright",0);I.setUniform1f("u_level",
10*d);I.setUniform1f("u_fadeSpeed",10*k.fadeSpeed);I.setUniform1f("u_minfadeLevel",10*k.minfadeLevel);I.setUniform1f("u_maxfadeLevel",10*k.maxfadeLevel);I.setUniform1f("u_fadeChange",10*(d+k.fadeChange));I.setUniform1i("u_texture",1);I.setUniform1f("u_size",n);I.setUniform1f("u_opacity",z);e&&(d=g.int32To4Bytes(c.layerID),I.setUniform4f("u_id",d[0],d[1],d[2],d[3]));c.markerPerPageElementsMap.forEach(function(a,c){l._spritesTextureSize[0]=v.getWidth(c)/4;l._spritesTextureSize[1]=v.getHeight(c)/4;I.setUniform2fv("u_mosaicSize",
l._spritesTextureSize);v.bind(b,9729,c,1);b.drawElements(4,a[1],5125,12*a[0])});b.bindVAO()}};b.prototype._initialize=function(a){if(this._initialized)return!0;a=new h("icon",["iconVS","iconFS"],[],m,a);a.addDefine("SDF","SDF",[!0,!0],"SDF");a.addDefine("DD","DD",[!0,!1],"DD");a.addDefine("ID","ID",[!0,!0],"ID");this._shaderVariations=a;this._vertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:16,normalized:!1,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:4,stride:16,
normalized:!1,divisor:0},{name:"a_tex",count:4,type:5121,offset:8,stride:16,normalized:!1,divisor:0},{name:"a_levelInfo",count:4,type:5121,offset:12,stride:16,normalized:!1,divisor:0}]};this._vertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:24,normalized:!1,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:4,stride:24,normalized:!1,divisor:0},{name:"a_tex",count:4,type:5121,offset:8,stride:24,normalized:!1,divisor:0},{name:"a_levelInfo",count:4,type:5121,offset:12,
stride:24,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:16,stride:24,normalized:!0,divisor:0},{name:"a_size",count:1,type:5126,offset:20,stride:24,normalized:!1,divisor:0}]};return this._initialized=!0};b.prototype._getIconVAO=function(a,b,c){if(c){if(b.iconDDVertexArrayObject)return b.iconDDVertexArrayObject;c=b.iconDDVertexBuffer;var f=b.iconIndexBuffer;if(!c||!f)return null;b.iconDDVertexArrayObject=new d(a,this._attributeLocationsDD,this._vertexAttributesDD,{geometry:c},f);
return b.iconDDVertexArrayObject}if(b.iconVertexArrayObject)return b.iconVertexArrayObject;c=b.iconVertexBuffer;f=b.iconIndexBuffer;if(!c||!f)return null;b.iconVertexArrayObject=new d(a,this._attributeLocations,this._vertexAttributes,{geometry:c},f);return b.iconVertexArrayObject};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/SDFRenderer":function(){define("require exports dojo/has ../../../core/libs/gl-matrix/mat4 ../../../core/libs/gl-matrix/vec4 ../../../core/libs/gl-matrix/vec3 ../../webgl/VertexArrayObject ../GeometryUtils ./rendererUtils ../../webgl/ShaderVariations ./vtShaderSnippets".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){var p=1/65536;return function(){function b(){this._attributeLocations={a_pos:0,a_vertexOffset:1,a_tex:2,a_levelInfo:3};this._attributeLocationsDD={a_pos:0,a_vertexOffset:1,a_tex:2,a_levelInfo:3,a_color:4,a_size:5};this._initialized=!1;this._viewProjMat=c.create();this._offsetVector=f.create();this._extrudeMat=c.create();this._haloColor=d.create();this._sdfColor=d.create();this._scaleVec=f.create()}b.prototype.dispose=function(){};b.prototype.render=function(b,d,f,e,
g,k,l,n,z,A,B,D,F){var C=this;if(!a("esri-vector-tiles-avoid-text")){this._initialized||this._initialize(b);var q=n.getLayoutValue("text-size",f),u=h.degToByte(g),t=n.getLayoutValue("text-rotation-alignment",f);2===t&&(t=1===n.getLayoutValue("symbol-placement",f)?0:1);var r=0===t,t=n.getLayoutValue("text-keep-upright",f)&&r;e=3===e;D=.8*3/D;var v=F*n.getPaintValue("text-opacity",f);this._glyphTextureSize||(this._glyphTextureSize=new Float32Array([z.width/4,z.height/4]));F=l.tileTransform.transform;
var w=n.getPaintValue("text-translate",f);if(0!==w[0]||0!==w[1]){c.copy(this._viewProjMat,l.tileTransform.transform);F=w[0];var w=w[1],y=0,x=0,x=(1<<l.key.level)/Math.pow(2,f)*(l.coordRange/512);if(1===n.getPaintValue("text-translate-anchor",f)){y=-h.C_DEG_TO_RAD*g;g=Math.sin(y);var L=Math.cos(y),y=x*(F*L-w*g),x=x*(F*g+w*L)}else y=x*F,x*=w;this._offsetVector[0]=y;this._offsetVector[1]=x;this._offsetVector[2]=0;c.translate(this._viewProjMat,this._viewProjMat,this._offsetVector);F=this._viewProjMat}r?
c.copy(this._extrudeMat,A):c.copy(this._extrudeMat,B);this._scaleVec[0]=1/24;this._scaleVec[1]=1/24;this._scaleVec[2]=1;c.scale(this._extrudeMat,this._extrudeMat,this._scaleVec);A=n.hasDataDrivenText;if(B=this._getSDFVAO(b,l,A)){b.bindVAO(B);var K=this._shaderVariations.getProgram([A,e],void 0,void 0,A?this._attributeLocationsDD:this._attributeLocations);b.bindProgram(K);K.setUniformMatrix4fv("u_transformMatrix",F);K.setUniformMatrix4fv("u_extrudeMatrix",this._extrudeMat);K.setUniform2fv("u_normalized_origin",
l.tileTransform.displayCoord);K.setUniform1f("u_depth",n.z+p);K.setUniform2fv("u_mosaicSize",this._glyphTextureSize);K.setUniform1f("u_mapRotation",u);K.setUniform1f("u_keepUpright",t?1:0);K.setUniform1f("u_level",10*f);K.setUniform1f("u_fadeSpeed",10*k.fadeSpeed);K.setUniform1f("u_minfadeLevel",10*k.minfadeLevel);K.setUniform1f("u_maxfadeLevel",10*k.maxfadeLevel);K.setUniform1f("u_fadeChange",10*(f+k.fadeChange));K.setUniform1f("u_opacity",v);K.setUniform1i("u_texture",0);K.setUniform1f("u_size",
q);K.setUniform1f("u_antialiasingWidth",D);e&&(k=m.int32To4Bytes(d.layerID),K.setUniform4f("u_id",k[0],k[1],k[2],k[3]));d.glyphPerPageElementsMap.forEach(function(a,c){z.bind(b,9729,c,0);var d=n.getPaintValue("text-halo-color",f),e=n.getPaintValue("text-halo-width",f);if(0<d[3]&&0<e){var g=d[3]*v;C._haloColor[0]=g*d[0];C._haloColor[1]=g*d[1];C._haloColor[2]=g*d[2];C._haloColor[3]=g;d=3*n.getPaintValue("text-halo-blur",f);e*=3;K.setUniform4fv("u_color",C._haloColor);K.setUniform1f("u_halo",1);K.setUniform1f("u_edgeDistance",
e);K.setUniform1f("u_edgeBlur",d);b.drawElements(4,a[1],5125,12*a[0])}e=n.getPaintValue("text-color",f);0<e[3]&&(d=e[3]*v,C._sdfColor[0]=d*e[0],C._sdfColor[1]=d*e[1],C._sdfColor[2]=d*e[2],C._sdfColor[3]=d,K.setUniform4fv("u_color",C._sdfColor),K.setUniform1f("u_halo",0),K.setUniform1f("u_edgeDistance",0),K.setUniform1f("u_edgeBlur",0),b.drawElements(4,a[1],5125,12*a[0]))});b.bindVAO()}}};b.prototype._initialize=function(a){if(this._initialized)return!0;a=new k("text",["textVS","textFS"],[],l,a);a.addDefine("DD",
"DD",[!0,!1],"DD");a.addDefine("ID","ID",[!0,!0],"ID");this._shaderVariations=a;this._vertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:16,normalized:!1,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:4,stride:16,normalized:!1,divisor:0},{name:"a_tex",count:4,type:5121,offset:8,stride:16,normalized:!1,divisor:0},{name:"a_levelInfo",count:4,type:5121,offset:12,stride:16,normalized:!1,divisor:0}]};this._vertexAttributesDD={geometry:[{name:"a_pos",count:2,type:5122,
offset:0,stride:24,normalized:!1,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:4,stride:24,normalized:!1,divisor:0},{name:"a_tex",count:4,type:5121,offset:8,stride:24,normalized:!1,divisor:0},{name:"a_levelInfo",count:4,type:5121,offset:12,stride:24,normalized:!1,divisor:0},{name:"a_color",count:4,type:5121,offset:16,stride:24,normalized:!0,divisor:0},{name:"a_size",count:1,type:5126,offset:20,stride:24,normalized:!1,divisor:0}]};return this._initialized=!0};b.prototype._getSDFVAO=function(a,
b,c){if(c){if(b.textDDVertexArrayObject)return b.textDDVertexArrayObject;c=b.textDDVertexBuffer;var d=b.textIndexBuffer;if(!c||!d)return null;b.textDDVertexArrayObject=new g(a,this._attributeLocationsDD,this._vertexAttributesDD,{geometry:c},d);return b.textDDVertexArrayObject}if(b.textVertexArrayObject)return b.textVertexArrayObject;c=b.textVertexBuffer;d=b.textIndexBuffer;if(!c||!d)return null;b.textVertexArrayObject=new g(a,this._attributeLocations,this._vertexAttributes,{geometry:c},d);return b.textVertexArrayObject};
return b}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/TileInfoRenderer":function(){define("require exports ../../webgl/Program ../../webgl/VertexArrayObject ../../webgl/BufferObject ../../webgl/Texture ../GeometryUtils ./vtShaderSnippets".split(" "),function(b,e,a,c,d,f,g,h){return function(){function b(){this._initialized=!1;this._maxWidth=0;this._color=new Float32Array([1,0,0,1])}b.prototype.dispose=function(){this._outlineProgram&&(this._outlineProgram.dispose(),this._outlineProgram=
null);this._tileInfoProgram&&(this._tileInfoProgram.dispose(),this._tileInfoProgram=null);this._outlineVertexArrayObject&&(this._outlineVertexArrayObject.dispose(),this._outlineVertexArrayObject=null);this._tileInfoVertexArrayObject&&(this._tileInfoVertexArrayObject.dispose(),this._tileInfoVertexArrayObject=null)};b.prototype.render=function(a,b){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",b.coordRange);this._outlineProgram.setUniform1f("u_depth",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",b.coordRange/512),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())};b.prototype._initialize=function(b){if(this._initialized)return!0;var f={a_pos:0},e=new a(b,h.backgroundVS,
h.backgroundFS,f),g=new a(b,h.tileInfoVS,h.tileInfoFS,f),k={geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},m=new Int8Array([0,0,1,0,1,1,0,1]),m=d.createVertex(b,35044,m),m=new c(b,f,k,{geometry:m}),r=new Int8Array([0,0,1,0,0,1,1,1]),r=d.createVertex(b,35044,r);b=new c(b,f,k,{geometry:r});this._outlineProgram=e;this._tileInfoProgram=g;this._outlineVertexArrayObject=m;this._tileInfoVertexArrayObject=b;return this._initialized=!0};b.prototype._getTexture=function(a,
b){if(b.texture)return b.texture;this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id","canvas2d"),this._canvas.setAttribute("width","256"),this._canvas.setAttribute("height","32"),this._canvas.setAttribute("style","display:none"));var c=b.key.id,d=this._canvas.getContext("2d");d.font="24px sans-serif";d.textAlign="left";d.textBaseline="middle";var e=d.measureText(c),e=Math.pow(2,Math.ceil(g.log2(e.width+2)));e>this._maxWidth&&(this._maxWidth=e);d.clearRect(0,
0,this._maxWidth,32);d.fillStyle=b.key.level>b.refKey.level?"red":"blue";d.fillText(c,0,16);b.texture=new f(a,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728},this._canvas);return b.texture};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/renderers/FadeRecorder":function(){define(["require","exports","../../../core/now"],function(b,e,a){Object.defineProperty(e,"__esModule",{value:!0});(function(){return function(a,b){this.level=a;this.now=b}})();b=function(){return function(a,
b,f,e){this.fadeSpeed=a;this.minfadeLevel=b;this.maxfadeLevel=f;this.fadeChange=e}}();e.FadeProperties=b;b=function(){function b(a){void 0===a&&(a=300);this._levelSnapshots=[];this._duration=a}b.prototype.recordLevel=function(b){var c=a(),d=this._levelSnapshots;0===d.length&&(d.push({level:b,now:0}),d.push({level:b,now:0}));2!==d.length&&d[0].level===b||d.push({level:b,now:c})};b.prototype.needsRedraw=function(){if(0===this._levelSnapshots.length)return!1;for(var a=this._duration,b=this._levelSnapshots,
c=b.length,e=b[c-1],m=-1;c>m+1&&b[m+1].now+a<e.now;)m++;for(0>m&&(m=0);m<c;m++)if(b[m].level!==e.level)return!0;return!1};b.prototype.getFadeValues=function(b){void 0===b&&(b=!1);for(var c=this._duration,d=a(),e=this._levelSnapshots;3<e.length&&e[1].now+c<d;)e.shift();e[1].now+c<d&&(e[0].level=e[1].level);var m=e[0].level,k=e[e.length-1],l=k.level,p=Math.min(m,l),m=Math.max(m,l),e=(k.level-e[1].level)/((k.now-e[1].now)/c);return b?{fadeSpeed:0,minfadeLevel:p,maxfadeLevel:m,fadeChange:0}:{fadeSpeed:e,
minfadeLevel:p,maxfadeLevel:m,fadeChange:(d-k.now)/c*e}};return b}();e.FadeRecorder=b})},"esri/layers/vectorTiles/core/now":function(){define(["require","exports","./global"],function(b,e,a){return function(){var b=a.performance||{};if(b.now)return function(){return b.now()};if(b.webkitNow)return function(){return b.webkitNow()};if(b.mozNow)return function(){return b.mozNow()};if(b.msNow)return function(){return b.msNow()};if(b.oNow)return function(){return b.oNow()};var d;d=b.timing&&b.timing.navigationStart?
b.timing.navigationStart:Date.now();return function(){return Date.now()-d}}()})},"esri/layers/vectorTiles/core/global":function(){define(["require","exports"],function(b,e){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self}()})},"esri/layers/vectorTiles/views/vectorTiles/VectorTileDisplayObject":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/libs/gl-matrix/vec2 ../../core/libs/gl-matrix/mat4 ../../core/ObjectPool ../../geometry/support/spatialReferenceUtils ../webgl/BufferObject ../2d/engine/DisplayObject ../2d/tiling/TileKey ./RenderBucket".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){return function(b){function e(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];f=b.call(this)||this;f._renderBuckets=[];f._vectorTileData=null;f._symbolUpdateData=null;f.status=5;f.coords=[0,0];f.bounds=[0,0,0,0];f.tileTransform={transform:Float32Array[16],displayCoord:Float32Array[2]};f.stencilData={mask:0,reference:0};f.status=0;f.tileTransform.transform=d.create();f.tileTransform.displayCoord=c.create();0<a.length&&(e=f.acquire).call.apply(e,[f].concat(a));
return f;var e}a(e,b);e.prototype.reset=function(){k.pool.release(this.key);this.refKey=this.key=null;this.coords[0]=0;this.coords[1]=0;this.bounds[0]=0;this.bounds[1]=0;this.bounds[2]=0;this.height=this.width=this.bounds[3]=0;this.resolution=null;this.rotation=0;this.id=this._connection=this.workerID=this.styleLayers=this._vectorTileData=null;this.tileTransform.transform.fill(0);this.tileTransform.displayCoord.fill(0);this.stencilData.mask=0;this.stencilData.reference=0;this._renderBuckets.length=
0;this._symbolUpdateData=null;this.status=0};e.prototype.acquire=function(a,b,c,d,f){this.key=a;this.refKey=b;b=c.lodAt(a.level).resolution;var e=c.size[0]*b,h=c.origin,k=a.col*e,l=a.row*e,m=c.spatialReference,n=0;m&&(m._isWrappable?m._isWrappable():m.isWrappable)&&(m=g.getInfo(m),n=m.valid[1]-m.valid[0]);k=h.x+k+a.world*n;h=h.y-l;this.coords[0]=k;this.coords[1]=h;this.bounds[0]=k;this.bounds[1]=h;this.bounds[2]=k+e;this.bounds[3]=h-e;this.widthInPixels=c.size[1];this.coordRange=4096;this.resolution=
b;this.rotation=f;this.styleLayers=d;this.id=a.id;this.status=1};e.prototype.setData=function(a,b,c){this._vectorTileData=a;this.workerID=b;this._connection=c;this.status=3};e.prototype.updateSymbolData=function(a){a&&(this._symbolUpdateData=a,this.requestRender())};e.prototype.dispose=function(){this.fillVertexArrayObject&&(this.fillVertexArrayObject.dispose(),this.fillVertexArrayObject=null);this.fillDDVertexArrayObject&&(this.fillDDVertexArrayObject.dispose(),this.fillDDVertexArrayObject=null);
this.outlineVertexArrayObject&&(this.outlineVertexArrayObject.dispose(),this.outlineVertexArrayObject=null);this.outlineDDVertexArrayObject&&(this.outlineDDVertexArrayObject.dispose(),this.outlineDDVertexArrayObject=null);this.lineVertexArrayObject&&(this.lineVertexArrayObject.dispose(),this.lineVertexArrayObject=null);this.lineDDVertexArrayObject&&(this.lineDDVertexArrayObject.dispose(),this.lineDDVertexArrayObject=null);this.iconVertexArrayObject&&(this.iconVertexArrayObject.dispose(),this.iconVertexArrayObject=
null);this.iconDDVertexArrayObject&&(this.iconDDVertexArrayObject.dispose(),this.iconDDVertexArrayObject=null);this.textVertexArrayObject&&(this.textVertexArrayObject.dispose(),this.textVertexArrayObject=null);this.textDDVertexArrayObject&&(this.textDDVertexArrayObject.dispose(),this.textDDVertexArrayObject=null);this.fillVertexBuffer&&(this.fillVertexBuffer.dispose(),this.fillVertexBuffer=null);this.fillDDVertexBuffer&&(this.fillDDVertexBuffer.dispose(),this.fillDDVertexBuffer=null);this.fillIndexBuffer&&
(this.fillIndexBuffer.dispose(),this.fillIndexBuffer=null);this.outlineVertexBuffer&&(this.outlineVertexBuffer.dispose(),this.outlineVertexBuffer=null);this.outlineDDVertexBuffer&&(this.outlineDDVertexBuffer.dispose(),this.outlineDDVertexBuffer=null);this.outlineIndexBuffer&&(this.outlineIndexBuffer.dispose(),this.outlineIndexBuffer=null);this.lineVertexBuffer&&(this.lineVertexBuffer.dispose(),this.lineVertexBuffer=null);this.lineDDVertexBuffer&&(this.lineDDVertexBuffer.dispose(),this.lineDDVertexBuffer=
null);this.lineIndexBuffer&&(this.lineIndexBuffer.dispose(),this.lineIndexBuffer=null);this.iconVertexBuffer&&(this.iconVertexBuffer.dispose(),this.iconVertexBuffer=null);this.iconDDVertexBuffer&&(this.iconDDVertexBuffer.dispose(),this.iconDDVertexBuffer=null);this.iconIndexBuffer&&(this.iconIndexBuffer.dispose(),this.iconIndexBuffer=null);this.textVertexBuffer&&(this.textVertexBuffer.dispose(),this.textVertexBuffer=null);this.textDDVertexBuffer&&(this.textDDVertexBuffer.dispose(),this.textDDVertexBuffer=
null);this.textIndexBuffer&&(this.textIndexBuffer.dispose(),this.textIndexBuffer=null);this.texture&&(this.texture.dispose(),this.texture=null);this._renderBuckets.length=0;this.status=7};e.prototype.attach=function(a){if(4===this.status)return!0;this.status=3;if(!this._vectorTileData)return!1;if(!this._vectorTileData.bufferDataInfo)return this.status=4,!0;if(0===this._renderBuckets.length)for(var b=new Uint32Array(this._vectorTileData.bucketDataInfo),c=b.length,d=0;d<c;){var f=b[d],e=b[d+1];if(0===
e)e=new l.BackgroundRenderBucket,e.layerID=f,this._renderBuckets.push(e),d+=2;else if(1===e)e=new l.FillRenderBucket,e.layerID=f,e.triangleElementStart=b[d+2],e.triangleElementCount=b[d+3],e.outlineElementStart=b[d+4],e.outlineElementCount=b[d+5],this._renderBuckets.push(e),d+=6;else if(2===e)e=new l.LineRenderBucket,e.layerID=f,e.triangleElementStart=b[d+2],e.triangleElementCount=b[d+3],this._renderBuckets.push(e),d+=6;else if(3===e){e=new l.SymbolRenderBucket;e.layerID=f;e.isSDF=0!==b[d+2];var g=
d+3,f=b[g];g++;if(0<f)for(var k=void 0,m=void 0,n=void 0,p=0;p<f;p++)k=b[g],m=b[g+1],n=b[g+2],e.markerPerPageElementsMap.set(k,[m,n]),g+=3;var q=b[g];g++;if(0<q)for(n=m=k=void 0,p=0;p<q;p++)k=b[g],m=b[g+1],n=b[g+2],e.glyphPerPageElementsMap.set(k,[m,n]),g+=3;this._renderBuckets.push(e);d+=5+3*f+3*q}else console.error("Bad bucket type!")}a=a.context;b=new Uint32Array(this._vectorTileData.bufferDataInfo);c=b.length;for(e=d=0;e<c;e+=2,d++)if(!(0>=b[e+1]||0===this._vectorTileData.bufferData[d].byteLength))switch(b[e]){case 1:this.fillVertexBuffer?
this.fillVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.fillVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 2:this.fillDDVertexBuffer?this.fillDDVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.fillDDVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 3:this.fillIndexBuffer?this.fillIndexBuffer.setData(this._vectorTileData.bufferData[d]):this.fillIndexBuffer=h.createIndex(a,35044,this._vectorTileData.bufferData[d]);
break;case 4:this.outlineVertexBuffer?this.outlineVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.outlineVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 5:this.outlineDDVertexBuffer?this.outlineDDVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.outlineDDVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 6:this.outlineIndexBuffer?this.outlineIndexBuffer.setData(this._vectorTileData.bufferData[d]):this.outlineIndexBuffer=
h.createIndex(a,35044,this._vectorTileData.bufferData[d]);break;case 7:this.lineVertexBuffer?this.lineVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.lineVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 8:this.lineDDVertexBuffer?this.lineDDVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.lineDDVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 9:this.lineIndexBuffer?this.lineIndexBuffer.setData(this._vectorTileData.bufferData[d]):
this.lineIndexBuffer=h.createIndex(a,35044,this._vectorTileData.bufferData[d]);break;case 10:this.iconVertexBuffer?this.iconVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.iconVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 11:this.iconDDVertexBuffer?this.iconDDVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.iconDDVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 12:this.iconIndexBuffer?this.iconIndexBuffer.setData(this._vectorTileData.bufferData[d]):
this.iconIndexBuffer=h.createIndex(a,35044,this._vectorTileData.bufferData[d]);break;case 13:this.textVertexBuffer?this.textVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.textVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 14:this.textDDVertexBuffer?this.textDDVertexBuffer.setData(this._vectorTileData.bufferData[d]):this.textDDVertexBuffer=h.createVertex(a,35044,this._vectorTileData.bufferData[d]);break;case 15:this.textIndexBuffer?this.textIndexBuffer.setData(this._vectorTileData.bufferData[d]):
this.textIndexBuffer=h.createIndex(a,35044,this._vectorTileData.bufferData[d])}this.status=4;return!0};e.prototype.detach=function(a){-1!==this.workerID&&this._connection&&6!==this.status&&7!==this.status&&this._connection.broadcast("destructTileData",{key:this.id,worker:this.workerID},[]);this.dispose();b.prototype.detach.call(this,a)};e.prototype.doRender=function(a){if(this.visible&&4===this.status){var b=a.context,c=a.renderer;if(b&&c){var d=a.drawphase;this._symbolUpdateData&&this._updateSymbolData(a);
b.setStencilFunction(514,this.stencilData.reference,this.stencilData.mask);var f=this.styleLayers,e=void 0!==a.layerOpacity?a.layerOpacity:1;if(0!==e){var g,h=this._renderBuckets.length,k=0;if(0===d)for(k=h-1;0<=k;k--)g=this._renderBuckets[k],3!==g.type&&g.hasData()&&c.renderBucket(b,g,a.displayLevel,a.requiredLevel,d,this,f.layers[g.layerID],e);else for(k=0;k<h;k++)g=this._renderBuckets[k],g.hasData()&&c.renderBucket(b,g,a.displayLevel,a.requiredLevel,d,this,f.layers[g.layerID],e)}}}};e.prototype._updateSymbolData=
function(a){if(!this._symbolUpdateData.bucketDataInfo)return!0;var b=new Uint32Array(this._symbolUpdateData.bucketDataInfo),c=b.length;if(0===c)return this._symbolUpdateData=null,!0;if(1>a.budget.remaining||4!==this.status)return this.requestRender(),!1;a=a.context;for(var d=new Uint32Array(this._symbolUpdateData.bufferDataInfo),f=d.length,e=0,g=0;g<f;g+=2,e++)switch(d[g]){case 10:this.iconVertexBuffer&&(this.iconVertexBuffer.dispose(),this.iconVertexBuffer=null);this.iconVertexBuffer=h.createVertex(a,
35044,this._symbolUpdateData.bufferData[e]);break;case 11:this.iconDDVertexBuffer&&(this.iconDDVertexBuffer.dispose(),this.iconDDVertexBuffer=null);this.iconDDVertexBuffer=h.createVertex(a,35044,this._symbolUpdateData.bufferData[e]);break;case 12:this.iconIndexBuffer&&(this.iconIndexBuffer.dispose(),this.iconIndexBuffer=null);this.iconIndexBuffer=h.createIndex(a,35044,this._symbolUpdateData.bufferData[e]);break;case 13:this.textVertexBuffer&&(this.textVertexBuffer.dispose(),this.textVertexBuffer=
null);this.textVertexBuffer=h.createVertex(a,35044,this._symbolUpdateData.bufferData[e]);break;case 14:this.textDDVertexBuffer&&(this.textDDVertexBuffer.dispose(),this.textDDVertexBuffer=null);this.textDDVertexBuffer=h.createVertex(a,35044,this._symbolUpdateData.bufferData[e]);break;case 15:this.textIndexBuffer&&(this.textIndexBuffer.dispose(),this.textIndexBuffer=null),this.textIndexBuffer=h.createIndex(a,35044,this._symbolUpdateData.bufferData[e])}a=this._renderBuckets.length;for(d=0;d<a;d++)this._renderBuckets[d]instanceof
l.SymbolRenderBucket&&(f=this._renderBuckets[d],f.markerPerPageElementsMap.clear(),f.glyphPerPageElementsMap.clear());for(a=0;a<c;){f=b[a];e=-1;g=this._renderBuckets.length;for(d=0;d<g;d++)if(this._renderBuckets[d].layerID===f){e=d;break}d=this._renderBuckets[e];d||(d=new l.SymbolRenderBucket,d.layerID=f,d.isSDF=0!==b[a+2],this._renderBuckets.push(d));var k=a+3,f=b[k];k++;if(0<f)for(var m=g=e=void 0,n=0;n<f;n++)e=b[k],g=b[k+1],m=b[k+2],d.markerPerPageElementsMap.set(e,[g,m]),k+=3;var p=b[k];k++;if(0<
p)for(m=g=e=void 0,n=0;n<p;n++)e=b[k],g=b[k+1],m=b[k+2],d.glyphPerPageElementsMap.set(e,[g,m]),k+=3;a+=5+3*f+3*p}this.iconVertexArrayObject&&(this.iconVertexArrayObject.dispose(),this.iconVertexArrayObject=null);this.iconDDVertexArrayObject&&(this.iconDDVertexArrayObject.dispose(),this.iconDDVertexArrayObject=null);this.textVertexArrayObject&&(this.textVertexArrayObject.dispose(),this.textVertexArrayObject=null);this.textDDVertexArrayObject&&(this.textDDVertexArrayObject.dispose(),this.textDDVertexArrayObject=
null);this._symbolUpdateData=null;return!0};e.pool=new f(e);return e}(m)})},"esri/layers/vectorTiles/core/ObjectPool":function(){define(["require","exports"],function(b,e){var a=function(){return function(){}}();return function(){function b(a,b,c,e,m){void 0===e&&(e=1);void 0===m&&(m=0);this.classConstructor=a;this.acquireFunctionOrWithConstructor=b;this.releaseFunction=c;this.growthSize=e;!0===b?this.acquireFunction=this._constructorAcquireFunction:"function"===typeof b&&(this.acquireFunction=b);
this._pool=Array(m);this._set=new Set;this._initialSize=m;for(a=0;a<m;a++)this._pool[a]=new this.classConstructor;this.growthSize=Math.max(e,1)}b.prototype.acquire=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];c=this.classConstructor||a;if(0===this._pool.length)for(var e=this.growthSize,h=0;h<e;h++)this._pool[h]=new c;c=this._pool.shift();this.acquireFunction?this.acquireFunction.apply(this,[c].concat(b)):c&&c.acquire&&"function"===typeof c.acquire&&c.acquire.apply(c,b);this._set.delete(c);
return c};b.prototype.release=function(a){a&&!this._set.has(a)&&(this.releaseFunction?this.releaseFunction(a):a&&a.release&&"function"===typeof a.release&&a.release(),this._pool.push(a),this._set.add(a))};b.prototype.prune=function(){if(!(this._pool.length<=this._initialSize))for(var a;this._initialSize>this._pool.length;)a=this._pool.shift(),this._set.delete(a),a.dispose&&"function"===typeof a.dispose&&a.dispose()};b.prototype._constructorAcquireFunction=function(a){for(var b=[],c=1;c<arguments.length;c++)b[c-
1]=arguments[c];(d=this.classConstructor).call.apply(d,[a].concat(b));var d};return b}()})},"esri/layers/vectorTiles/views/2d/tiling/TileKey":function(){define(["require","exports","../../../core/ObjectPool"],function(b,e,a){return function(){function b(a,b,c,e){"string"===typeof a?(a=a.split("/"),b=a[1],c=a[2],e=a[3],this.level=+a[0],this.row=+b,this.col=+c,this.world=+e||0):a&&"object"===typeof a?(this.level=a.level||0,this.row=a.row||0,this.col=a.col||0,this.world=a.world||0):(this.level=+a||0,
this.row=+b||0,this.col=+c||0,this.world=+e||0)}b.from=function(a,c,e,h){return b.pool.acquire(a,c,e,h)};b.getId=function(a,b,c,e){return"object"===typeof a?a.level+"/"+a.row+"/"+a.col+"/"+a.world:a+"/"+b+"/"+c+"/"+e};Object.defineProperty(b.prototype,"id",{get:function(){return b.getId(this)},enumerable:!0,configurable:!0});b.prototype.equals=function(a){return this.level===a.level&&this.row===a.row&&this.col===a.col&&this.world===a.world};b.prototype.release=function(){this.world=this.col=this.row=
this.level=0};b.prototype.set=function(a,b,c,e){var d=typeof a;"object"===d?(this.level=a.level||0,this.row=a.row||0,this.col=a.col||0,this.world=a.world||0):"string"===d?(a=a.split("/"),b=a[1],c=a[2],e=a[3],this.level=parseFloat(a[0]),this.row=parseFloat(b),this.col=parseFloat(c),this.world=parseFloat(e)):(this.level=a,this.row=b,this.col=c,this.world=e);return this};b.prototype.toString=function(){return this.level+"/"+this.row+"/"+this.col+"/"+this.world};b.pool=new a(b,!0,null,25,50);return b}()})},
"esri/layers/vectorTiles/views/vectorTiles/RenderBucket":function(){define(["require","exports","../../core/tsSupport/extendsHelper","../../core/tsSupport/decorateHelper"],function(b,e,a,c){Object.defineProperty(e,"__esModule",{value:!0});b=function(){return function(a){this.type=a}}();e.RenderBucket=b;c=function(b){function c(){var a=b.call(this,2)||this;a.triangleElementStart=0;a.triangleElementCount=0;a.joinStart=0;a.joinCount=0;return a}a(c,b);c.prototype.hasData=function(){return 0<this.triangleElementCount||
0<this.joinCount};return c}(b);e.LineRenderBucket=c;c=function(b){function c(){var a=b.call(this,1)||this;a.triangleElementStart=0;a.triangleElementCount=0;a.outlineElementStart=0;a.outlineElementCount=0;return a}a(c,b);c.prototype.hasData=function(){return 0<this.triangleElementCount||0<this.outlineElementCount};return c}(b);e.FillRenderBucket=c;c=function(b){function c(){var a=b.call(this,3)||this;a.markerPerPageElementsMap=new Map;a.glyphPerPageElementsMap=new Map;a.isSDF=!1;return a}a(c,b);c.prototype.hasData=
function(){return 0<this.markerPerPageElementsMap.size||0<this.glyphPerPageElementsMap.size};return c}(b);e.SymbolRenderBucket=c;b=function(b){function c(){return b.call(this,0)||this}a(c,b);c.prototype.hasData=function(){return!0};return c}(b);e.BackgroundRenderBucket=b})},"esri/layers/vectorTiles/views/vectorTiles/TileHandler":function(){define("require exports module dojo/Deferred dojo/promise/all dojo/has ../../core/workers ../../core/promiseUtils ../../core/requireUtils ../../core/LRUCache ../../request ../2d/tiling/TileKey ./TileIndex ./SpriteMosaic ./SpriteSource ./GlyphMosaic ./GlyphSource ./VectorTileDisplayObject ./GeometryUtils".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w,v){var y=new k(10),x=new Map;return function(){function e(a,b,c,d,e){void 0===d&&(d=!1);this.devicePixelRatio=c;this.allowUpdates=d;this._tileIndex=this._connection=this._glyphMosaic=this._spriteMosaic=null;this._updateQueue=new Map;this._ongoingRequests=new Map;this._vectorTileLayer=a;this._styleRepository=a.styleRepository;this._requestUpdate=b}e.prototype.destroy=function(){this.stop();this._vectorTileLayer=this._requestUpdate=this._styleRepository=
null;this._spriteMosaic&&(this._spriteMosaic.dispose(),this._spriteMosaic=null);this._glyphMosaic&&(this._glyphMosaic.dispose(),this._glyphMosaic=null)};Object.defineProperty(e.prototype,"initialized",{get:function(){return this._broadcastPromise&&this._broadcastPromise.isFulfilled()},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"spriteMosaic",{get:function(){return this._spriteMosaic},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"glyphMosaic",{get:function(){return this._glyphMosaic},
enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"ongoingRequestCount",{get:function(){return this._ongoingRequests.size},enumerable:!0,configurable:!0});e.prototype.start=function(){var e=this;this.stop();var h=this._styleRepository,k=new t(h.sprite,this.devicePixelRatio);k.devicePixelRatio=this.devicePixelRatio;var l=k.load().then(function(){e._spriteMosaic=new q(1024,1024,250);e._spriteMosaic.setSpriteSource(k);f("stable-symbol-rendering")&&e._spriteMosaic.preloadSpriteItems()}),
n=new u(h.glyphs);this._glyphMosaic=new r(1024,1024,n);var p=this._fetchTileMap(this._vectorTileLayer.tileIndexUrl),E=g.open(this,m.getAbsMid("./WorkerTileHandler",b,a)).then(function(a){e._connection=a}),v=new c(function(a){l.isFulfilled()||l.cancel();p.isFulfilled()||p.cancel();E.isFulfilled()||E.cancel()});d([l,p,E]).then(function(a){d(e._connection.broadcast("setLayers",h.styleJSON)).then(function(){v.resolve()})});return this._broadcastPromise=v.promise};e.prototype.stop=function(){this._broadcastPromise&&
!this._broadcastPromise.isFulfilled()&&this._broadcastPromise.cancel();this._updateQueue.forEach(function(a){return a.cancel()});this._ongoingRequests.forEach(function(a){return a.cancel()});this._connection&&(this._connection.close(),this._connection=null)};e.prototype.updateTile=function(a,b){var c=this;if(!this.allowUpdates)return h.resolve(null);if(!this._broadcastPromise.isFulfilled()||!this._connection)return h.reject(Error("no connection"));var d=Math.round(v.degToByte(b.state.rotation));if(a.rotation===
d)return h.resolve(null);var e,f=a.key;this._updateQueue.has(f.id)&&(e=this._updateQueue.get(f.id),e.cancel("cancel"));a.rotation=d;e=this._connection.invoke("update",{key:a.id,rotation:d},[],{id:a.workerID}).then(function(b){a.updateSymbolData(b);return b}).always(function(){c._updateQueue["delete"](f.id)});this._updateQueue.set(a.id,e);return e};e.prototype.getVectorTileWithLRC=function(a,b,c,d){var e=this;void 0===d&&(d=0);a=new p(a,b,c,0);b=this.getRefKey(a);var f=new w(a,b,this._vectorTileLayer.tileInfo,
this._styleRepository,0);return this.getTileData(f.key,0).then(function(a){f.setData(a.tileData,a.workerId,e._connection);return f})};e.prototype.getTileData=function(a,b){var c=this;if(!this._broadcastPromise.isFulfilled()||!this._connection)return h.reject(Error("no connection"));var d=this._tileIndex?this._tileIndex.dataKey(a):a;if(!d)return h.reject(Error("no data"));var e=Math.round(v.degToByte(b));return this._getTileData(this._connection,a,d,e).then(function(a){return a&&a.tileData?{tileData:a.tileData,
workerId:a.workerId,connection:c._connection}:h.reject("No data")})};e.prototype.getRefKey=function(a){return this._tileIndex?this._tileIndex.dataKey(a):a};e.prototype.fetchTileData=function(a){a=p.pool.acquire(a);var b=this._vectorTileLayer.getTileUrl(a.level,a.row,a.col);p.pool.release(a);return l(b,{callbackParamName:"callback",responseType:"array-buffer"}).then(function(a){return{data:{protobuff:a.data},buffers:[a.data]}})};e.prototype.getSprites=function(a){return h.resolve({data:{spriteItems:this._spriteMosaic.getSpriteItems(a.sprites)}})};
e.prototype.getGlyphs=function(a){return this._glyphMosaic.getGlyphItems(a.tileID,a.font,a.codePoints).then(function(a){return{data:{glyphItems:a}}})};e.prototype.getStyleRepository=function(){return this._styleRepository};e.prototype.getTileIndex=function(){return this._tileIndex};e.prototype._getTileData=function(a,b,c,d){var e=this,f={id:null};if(a=this._ongoingRequests.get(b.id))return a;a=this._connection.invoke("getTile",{key:b.id,refKey:c.id,rotation:d,cacheTile:this.allowUpdates},[],f).then(function(a){e._ongoingRequests["delete"](b.id);
return{tileData:a,workerId:f.id}}).otherwise(function(a){e._ongoingRequests["delete"](b.id);e._connection.invoke("destructTileData",{key:b.id},[],f);return h.reject(a)});this._ongoingRequests.set(b.id,a);return a};e.prototype._fetchTileMap=function(a){var b=this;if(!a)return null;if(y.has(a))return this._tileIndex=y.use(a),h.resolve();if(x.has(a))return x.get(a);var c=l(a,{callbackParamName:"callback",responseType:"json"}).then(function(c){b._tileIndex=new n(c.data);x["delete"](a);y.insert(a,b._tileIndex)});
x.set(a,c);return c};return e}()})},"esri/layers/vectorTiles/core/workers":function(){define(["require","exports","./workers/workers"],function(b,e,a){Object.defineProperty(e,"__esModule",{value:!0});for(var c in a)e.hasOwnProperty(c)||(e[c]=a[c])})},"esri/layers/vectorTiles/core/workers/workers":function(){define("require exports dojo/promise/all dojo/has ../promiseUtils ./Connection ./DedicatedConnection ./JobProxy".split(" "),function(b,e,a,c,d,f,g,h){function m(){if(x)return x;for(var b=[],c=
function(a){var c=h.create(y,a);b.push(c);c.then(function(b){u[a]=b})},d=0;d<q;d++)c(d);return x=a(b).then(function(){return!0})}function k(){if(z)return z;for(var b=[],c=function(a){var c=q+a;a=h.create(y,c);b.push(a);a.then(function(a){u[c]=a})},d=0;d<t;d++)c(d);return z=a(b).then(function(){return!0})}function l(b,c,d){var e=c.id;if(d)return u[c.workerId].openConnection(b,e);c=[];for(d=0;d<u.length;d++)c.push(u[d].openConnection(b,e));return a(c)}function p(a){var b=v++;a=new e.Connection(a,b);
y.set(b,a);return a}function n(a){var b=v++,c=q+r++;r%=t;a=new e.DedicatedConnection(a,b,c);y.set(b,a);return a}Object.defineProperty(e,"__esModule",{value:!0});e.Connection=f;e.DedicatedConnection=g;b=(navigator||{}).hardwareConcurrency||2;var q=c("esri-workers-debug")?1:Math.max(1,Math.ceil(b/2)),t=c("esri-workers-debug")?1:Math.max(1,Math.floor(b/2)),r=0,u=[],w=0,v=0,y=new Map;e.initialize=function(){m();k()};e.open=function(a,b,c){void 0===c&&(c=!1);return(c?k():m()).then(function(e){var f;f=
c?n(a):p(a);return l(b,f,c).then(function(){return f}).otherwise(function(a){return d.reject(a)})})};e.terminate=function(){for(var a=0;a<u.length;a++)u[a]&&u[a].terminate();u.length=0;y.clear()};e.closeConnection=function(a){if(a){if(y.has(a.id))y["delete"](a.id);if(a instanceof e.DedicatedConnection)u[a.workerId].closeConnection(a.id);else for(var b=0;b<q;b++)u[b]&&u[b].closeConnection(a.id)}};e.invoke=function(a,b,c,d,e){var f=null;d&&(f=d.id);null===f&&(u.some(function(a,b){return b<q&&!a.hasOutgoingJobs()?
(f=a.index,!0):!1})||(f=w=(w+1)%q));a=u[f].invoke(a,b,c,e);d&&(d.id=f);return a};e.broadcast=function(a,b,c,d){for(var e=[],f=0;f<q;f++)e.push(u[f].invoke(a,b,c,d));return e};var x,z})},"esri/layers/vectorTiles/core/workers/Connection":function(){define(["require","exports","./workers"],function(b,e,a){return function(){function b(a,b){this.client=a;this.id=b}b.prototype.invoke=function(b,c,e,h){return a.invoke(b,c,e,h,this.id)};b.prototype.broadcast=function(b,c,e){return a.broadcast(b,c,e,this.id)};
b.prototype.close=function(){a.closeConnection(this)};return b}()})},"esri/layers/vectorTiles/core/workers/DedicatedConnection":function(){define(["require","exports","./workers"],function(b,e,a){return function(){function b(a,b,c){this.client=a;this.id=b;this._targetWorker={id:c}}Object.defineProperty(b.prototype,"workerId",{get:function(){return this._targetWorker.id},enumerable:!0,configurable:!0});b.prototype.invoke=function(b,c,e){return a.invoke(b,c,e,this._targetWorker,this.id)};b.prototype.close=
function(){a.closeConnection(this)};return b}()})},"esri/layers/vectorTiles/core/workers/JobProxy":function(){define("require exports dojo/_base/kernel dojo/_base/lang dojo/Deferred ../../kernel ../../config ../../request ../Logger ../Error ../sniff ../urlUtils ./WorkerFallbackImpl".split(" "),function(b,e,a,c,d,f,g,h,m,k,l,p,n){function q(){if(!l("esri-workers"))return t(new n);if(!y){var a=void 0;try{a=new Worker(u)}catch(A){r.warn("Failed to create Worker. Fallback to execute module in main thread",
event),a=new n}return t(a)}x||(x=h(u,{responseType:"text"}));return x.then(function(a){return new Worker(URL.createObjectURL(new Blob([a.data],{type:"text/javascript"})))}).otherwise(function(a){r.warn("Failed to create Worker. Fallback to execute module in main thread",a);return new n}).then(function(a){return t(a)})}function t(b){function e(d){if(d&&d.data&&d.data.type)if(d=d.data.type,"\x3cworker-loaded\x3e"===d){d=b;var k;null!=g["default"]?(k=c.mixin({},g),delete k["default"],k=JSON.parse(JSON.stringify(k))):
k=JSON.parse(JSON.stringify(g));var l={async:!0,baseUrl:v,locale:a.locale,has:{},paths:{}};c.mixin(l,g.workers.loaderConfig);l.has=c.mixin({"esri-cors":1,"dojo-test-sniff":0,"config-deferredInstrumentation":0,"host-webworker":1,"events-keypress-typed":0},l.has);l.paths=c.mixin({esri:"../esri",dojo:"../dojo",dojox:"../dojox",dstore:"../dstore",moment:"../moment"},l.paths);d.postMessage({type:"\x3cconfigure\x3e",configure:{esriConfig:k,dojoConfig:l,loaderUrl:w}})}else"\x3cworker-configured\x3e"===d&&
(b.removeEventListener("message",e),b.removeEventListener("error",f),h.resolve(b))}function f(a){a.preventDefault();b.removeEventListener("message",e);b.removeEventListener("error",f);r.warn("Failed to create Worker. Fallback to execute module in main thread",a);b=new n;b.addEventListener("message",e);b.addEventListener("error",f)}var h=new d;b.addEventListener("message",e);b.addEventListener("error",f);return h.promise}var r=m.getLogger("esri.core.workers.JobProxy"),u=p.normalize(b.toUrl("./worker.js")),
w=p.makeAbsolute(b.toUrl("./worker-init.js")),v=p.makeAbsolute("../../../../../",w)+"/",y=!p.hasSameOrigin(u,location.href),x=null;return function(){function a(a,b,c){this.connections=a;this.index=b;this.worker=c;this.msgCount=0;this.outgoingJobs=new Map;this.incomingJobs=new Map;this.incomingStaticJobs=new Map;this.worker.addEventListener("message",this.message.bind(this));this.worker.addEventListener("error",function(a){a.preventDefault();r.error(a)})}a.create=function(b,c){return q().then(function(d){return new a(b,
c,d)})};a.prototype.terminate=function(){this.worker.terminate()};a.prototype.openConnection=function(a,b){return this.invoke("\x3copen-connection\x3e",{path:a},void 0,b)};a.prototype.closeConnection=function(a){this.invoke("\x3cclose-connection\x3e",void 0,void 0,a)};a.prototype.hasOutgoingJobs=function(){return 0<this.outgoingJobs.size};a.prototype.invoke=function(a,b,c,e){var f=this,g=++this.msgCount,h=new d(function(a){f.worker.postMessage({type:"\x3ccancel\x3e",id:g,connection:e,data:{reason:a}});
if(f.outgoingJobs.has(g))f.outgoingJobs["delete"](g)});this.outgoingJobs.set(g,h);this.worker.postMessage({type:a,id:g,connection:e,data:b},c);return h.promise};a.prototype.message=function(a){var b=this;if(a&&a.data){var c=a.data.type;if(c){var d=a.data,e=a.data.id;if("\x3cresponse\x3e"===c&&e){if(a=this.outgoingJobs.get(e))this.outgoingJobs["delete"](e),d.error?a.reject(k.fromJSON(d.error)):a.resolve(d.data)}else if("\x3ccancel\x3e"===c&&e)(a=this.incomingJobs.get(e))&&a.cancel(d.data.reason),d.staticMsg&&
(a=this.incomingStaticJobs.get(e))&&a.cancel(d.data.reason);else if("\x3cstatic-message\x3e"===c){var g=d.staticMsg;(a=f.workerMessages[g])&&"function"===typeof a?(d=a.call(this,d.data),this.incomingStaticJobs.set(e,d),d.then(function(a){b.worker.postMessage({type:"\x3cstatic-message\x3e",staticMsg:g,id:e,data:a.data},a.buffers)}).otherwise(function(a){a||(a={message:"Error encountered at method"+g});a.dojoType&&"cancel"===a.dojoType||b.worker.postMessage({type:"\x3cstatic-message\x3e",staticMsg:g,
id:e,error:a})}).always(function(){b.incomingStaticJobs["delete"](e)})):this.worker.postMessage({type:"\x3cstatic-message\x3e",staticMsg:g,id:e,error:g+" message type is not available on the kernel!"})}else{var h=d.connection;if(a=this.connections.get(h))if(a=a.client){var l=a[c];"function"===typeof l&&(d=l.call(a,d.data),this.incomingJobs.set(e,d),d.then(function(a){b.worker.postMessage({type:"\x3cresponse\x3e",id:e,connection:h,error:a.error,data:a.data},a.buffers)}).otherwise(function(a){a||(a=
{message:"Error encountered at method"+c});a.dojoType&&"cancel"===a.dojoType||b.worker.postMessage({type:"\x3cresponse\x3e",id:e,connection:h,error:a})}).always(function(){b.incomingJobs["delete"](e)}))}}}}};return a}()})},"esri/layers/vectorTiles/kernel":function(){define(["require","exports","esri/kernel","./identity/IdentityManager"],function(b,e,a,c){return function(){function b(){}Object.defineProperty(b,"id",{get:function(){return a.id?c:null},enumerable:!0,configurable:!0});b.workerMessages=
{};return b}()})},"esri/layers/vectorTiles/identity/IdentityManager":function(){define(["require","exports","esri/IdentityManager"],function(b,e,a){Object.defineProperty(e,"__esModule",{value:!0});e.findCredential=function(b){return a.findCredential(b)}})},"esri/IdentityManager":function(){define(["./IdentityManagerDialog","./kernel","./OAuthSignInHandler","dojo/_base/declare"],function(b,e,a,c){b=new b;e.id=c.safeMixin(b,a);return e.id})},"esri/IdentityManagerDialog":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/config dojo/_base/Deferred dojo/_base/lang dojo/has dojo/dom-attr dojo/keys dijit/registry dijit/Dialog ./kernel ./lang ./domUtils ./Credential ./IdentityManagerBase dojo/i18n!./nls/jsapi dojo/query dijit/form/Button dijit/form/Form dijit/form/ValidationTextBox".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r){e=e([t],{declaredClass:"esri.IdentityManager",_eventMap:{"dialog-cancel":["info"]},constructor:function(a){d.mixin(this,a);this.registerConnectEvents()},_dialogContent:"\x3cdiv data-dojo-type\x3d'dijit.form.Form' data-dojo-props\x3d'\"class\":\"esriIdForm\"'\x3e\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e${info}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e${invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3ctable style\x3d'width: 100%;'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e${lblUser}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"text\", \"class\":\"esriIdUser\", required:true, trim:true, style:\"width: 100%;\", autocapitalize:\"none\", autocorrect:\"off\", spellcheck:false' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e${lblPwd}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"password\", \"class\":\"esriIdPwd\", required:true, style:\"width: 100%;\"' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e${lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e${lblCancel}\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e",
onDialogCreate:function(){},onDialogCancel:function(){},signIn:function(b,d,e){this._nls||(this._nls=r.identity);this._loginDialog||(this._loginDialog=this.dialog=this._createLoginDialog(),this.onDialogCreate());var f=this._loginDialog,h=e&&e.error,k=e&&e.token,l=new c(function(){f.onCancel()});if(f.open)return b=Error("BUSY"),b.code="IdentityManager.1",b.log=!!a.isDebug,l.errback(b),l;n.hide(f.errMsg_);h&&403==h.code&&k&&(g.set(f.errMsg_,"innerHTML",this._nls.forbidden),n.show(f.errMsg_));f.dfd_=
l;f.serverInfo_=d;f.resUrl_=b;f.admin_=e&&e.isAdmin;g.set(f.resLink_,{title:b,innerHTML:"("+(this.getResourceName(b)||this._nls.lblItem)+")"});g.set(f.serverLink_,{title:d.server,innerHTML:(-1!==d.server.toLowerCase().indexOf("arcgis.com")?"ArcGIS Online":d.server)+" "});f.txtPwd_.set("value","");f.show();return l},_createLoginDialog:function(){var c=this._nls,d=p.substitute(c,this._dialogContent),d=p.substitute({resource:"\x3cspan class\x3d'resLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e",
server:"\x3cspan class\x3d'serverLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e"},d),e=new k({title:c.title,content:d,"class":"esriSignInDialog",style:"width: 18em;",esriIdMgr_:this,keypressed_:function(a){a.charOrCode===h.ENTER&&this.execute_()},execute_:function(){var a=this.txtUser_.get("value"),b=this.txtPwd_.get("value"),d=this.dfd_,e=this;if(this.form_.validate()&&a&&b){this.btnSubmit_.set("label",c.lblSigning);var f=l.id.findCredential(e.resUrl_,a),h=function(b){e.btnSubmit_.set("label",
c.lblOk);e.btnSubmit_.set("disabled",!1);n.hide(e.errMsg_);e.hide();k._DialogLevelManager.hide(e);var g=e.serverInfo_;e.dfd_=e.serverInfo_=e.generateDfd_=e.resUrl_=null;var h,l,m=f,u;b&&(h=b.token,l=p.isDefined(b.expires)?Number(b.expires):null,u=!!b.ssl,m?(m.userId=a,m.token=h,m.expires=l,m.validity=b.validity,m.ssl=u,m.creationTime=(new Date).getTime()):m=new q({userId:a,server:g.server,token:h,expires:l,ssl:u,isAdmin:e.admin_,validity:b.validity}));d.callback(m)};f&&!f._enqueued?h():(e.btnSubmit_.set("disabled",
!0),e.generateDfd_=l.id.generateToken(this.serverInfo_,{username:a,password:b},{isAdmin:this.admin_}).addCallback(h).addErrback(function(a){e.btnSubmit_.set("disabled",!1);e.generateDfd_=null;e.btnSubmit_.set("label",c.lblOk);g.set(e.errMsg_,"innerHTML",a&&a.code?c.invalidUser:c.noAuthService);n.show(e.errMsg_)}))}},cancel_:function(){e.generateDfd_&&e.generateDfd_.cancel();var b=e.dfd_,c=e.resUrl_,d=e.serverInfo_;e.btnSubmit_.set("disabled",!1);e.dfd_=e.serverInfo_=e.generateDfd_=e.resUrl_=null;
n.hide(e.errMsg_);k._DialogLevelManager.hide(e);e.esriIdMgr_.onDialogCancel({resourceUrl:c,serverInfo:d});c=Error("ABORTED");c.code="IdentityManager.2";c.log=!!a.isDebug;b.errback(c)}}),d=e.domNode;e.form_=m.byNode(b.query(".esriIdForm",d)[0]);e.txtUser_=m.byNode(b.query(".esriIdUser",d)[0]);e.txtPwd_=m.byNode(b.query(".esriIdPwd",d)[0]);e.btnSubmit_=m.byNode(b.query(".esriIdSubmit",d)[0]);e.btnCancel_=m.byNode(b.query(".esriIdCancel",d)[0]);e.resLink_=b.query(".resLink",d)[0];e.serverLink_=b.query(".serverLink",
d)[0];e.errMsg_=b.query(".esriErrorMsg",d)[0];e.connect(e.txtUser_,"onKeyPress",e.keypressed_);e.connect(e.txtPwd_,"onKeyPress",e.keypressed_);e.connect(e.btnSubmit_,"onClick",e.execute_);e.connect(e.btnCancel_,"onClick",e.onCancel);e.connect(e,"onCancel",e.cancel_);return e}});f("extend-esri")&&(l.IdentityManagerDialog=l.IdentityManager=e);return e})},"dijit/Dialog":function(){define("require dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/ready dojo/sniff dojo/touch dojo/window dojo/dnd/Moveable dojo/dnd/TimedMoveable ./focus ./_base/manager ./_Widget ./_TemplatedMixin ./_CssStateMixin ./form/_FormMixin ./_DialogMixin ./DialogUnderlay ./layout/ContentPane ./layout/utils dojo/text!./templates/Dialog.html ./a11yclick dojo/i18n!./nls/common".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w,v,y,x,z,A,B,D,F,C,H,E,M,N){function J(){}var G=new d;G.resolve(!0);z=c("dijit._DialogBase"+(r("dojo-bidi")?"_NoBidi":""),[B,F,C,D],{templateString:N,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!1,duration:z.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,draggable:!0,_setDraggableAttr:function(a){this._set("draggable",a)},maxRatio:.9,
closable:!0,_setClosableAttr:function(a){this.closeButtonNode.style.display=a?"":"none";this._set("closable",a)},postMixInProperties:function(){var a=l.getLocalization("dijit","common");n.mixin(this,a);this.inherited(arguments)},postCreate:function(){m.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);a.after(this,"onExecute",n.hitch(this,"hide"),!0);a.after(this,"onCancel",n.hitch(this,"hide"),!0);q(this.closeButtonNode,
u.press,function(a){a.stopPropagation()});this._modalconnects=[]},onLoad:function(){this.resize();this._position();this.autofocus&&P.isTop(this)&&(this._getFocusItems(),x.focus(this._firstFocusItem));this.inherited(arguments)},focus:function(){this._getFocusItems();x.focus(this._firstFocusItem)},_endDrag:function(){var a=h.position(this.domNode),b=w.getBox(this.ownerDocument);a.y=Math.min(Math.max(a.y,0),b.h-a.h);a.x=Math.min(Math.max(a.x,0),b.w-a.w);this._relativePosition=a;this._position()},_setup:function(){var b=
this.domNode;this.titleBar&&this.draggable?(this._moveable=new (6==r("ie")?y:v)(b,{handle:this.titleBar}),a.after(this._moveable,"onMoveStop",n.hitch(this,"_endDrag"),!0)):g.add(b,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":e.map(this["class"].split(/\s/),function(a){return a+"_underlay"}).join(" "),_onKeyDown:n.hitch(this,"_onKey"),ownerDocument:this.ownerDocument}},_size:function(){this.resize()},_position:function(){if(!g.contains(this.ownerDocumentBody,"dojoMove")){var a=
this.domNode,b=w.getBox(this.ownerDocument),c=this._relativePosition,d=h.position(a);m.set(a,{left:Math.floor(b.l+(c?Math.min(c.x,b.w-d.w):(b.w-d.w)/2))+"px",top:Math.floor(b.t+(c?Math.min(c.y,b.h-d.h):(b.h-d.h)/2))+"px"})}},_onKey:function(a){if(a.keyCode==p.TAB){this._getFocusItems();var b=a.target;this._firstFocusItem==this._lastFocusItem?(a.stopPropagation(),a.preventDefault()):b==this._firstFocusItem&&a.shiftKey?(x.focus(this._lastFocusItem),a.stopPropagation(),a.preventDefault()):b!=this._lastFocusItem||
a.shiftKey||(x.focus(this._firstFocusItem),a.stopPropagation(),a.preventDefault())}else this.closable&&a.keyCode==p.ESCAPE&&(this.onCancel(),a.stopPropagation(),a.preventDefault())},show:function(){if(this.open)return G.promise;this._started||this.startup();this._alreadyInitialized||(this._setup(),this._alreadyInitialized=!0);this._fadeOutDeferred&&(this._fadeOutDeferred.cancel(),P.hide(this));var a=w.get(this.ownerDocument);this._modalconnects.push(q(a,"scroll",n.hitch(this,"resize",null)));this._modalconnects.push(q(this.domNode,
"keydown",n.hitch(this,"_onKey")));m.set(this.domNode,{opacity:0,display:""});this._set("open",!0);this._onShow();this.resize();this._position();var b;this._fadeInDeferred=new d(n.hitch(this,function(){b.stop();delete this._fadeInDeferred}));this._fadeInDeferred.then(void 0,J);a=this._fadeInDeferred.promise;b=k.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:n.hitch(this,function(){P.show(this,this.underlayAttrs)}),onEnd:n.hitch(this,function(){this.autofocus&&P.isTop(this)&&(this._getFocusItems(),
x.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();return a},hide:function(){if(!this._alreadyInitialized||!this.open)return G.promise;this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new d(n.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));this._fadeOutDeferred.then(void 0,J);this._fadeOutDeferred.then(n.hitch(this,"onHide"));var b=this._fadeOutDeferred.promise;a=k.fadeOut({node:this.domNode,duration:this.duration,
onEnd:n.hitch(this,function(){this.domNode.style.display="none";P.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();this._scrollConnected&&(this._scrollConnected=!1);for(var c;c=this._modalconnects.pop();)c.remove();this._relativePosition&&delete this._relativePosition;this._set("open",!1);return b},resize:function(a){if("none"!=this.domNode.style.display){this._checkIfSingleChild();if(!a){this._shrunk&&(this._singleChild&&"undefined"!=typeof this._singleChildOriginalStyle&&
(this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle,delete this._singleChildOriginalStyle),e.forEach([this.domNode,this.containerNode,this.titleBar,this.actionBarNode],function(a){a&&m.set(a,{position:"static",width:"auto",height:"auto"})}),this.domNode.style.position="absolute");var b=w.getBox(this.ownerDocument);b.w*=this.maxRatio;b.h*=this.maxRatio;var c=h.position(this.domNode);c.w>=b.w||c.h>=b.h?(a={w:Math.min(c.w,b.w),h:Math.min(c.h,b.h)},this._shrunk=!0):this._shrunk=!1}if(a){h.setMarginBox(this.domNode,
a);b=[];this.titleBar&&b.push({domNode:this.titleBar,region:"top"});this.actionBarNode&&b.push({domNode:this.actionBarNode,region:"bottom"});c={domNode:this.containerNode,region:"center"};b.push(c);var d=M.marginBox2contentBox(this.domNode,a);M.layoutChildren(this.domNode,d,b);this._singleChild?(b=M.marginBox2contentBox(this.containerNode,c),this._singleChild.resize({w:b.w,h:b.h})):(this.containerNode.style.overflow="auto",this._layoutChildren())}else this._layoutChildren();r("touch")||a||this._position()}},
_layoutChildren:function(){e.forEach(this.getChildren(),function(a){a.resize&&a.resize()})},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var a;a=this._modalconnects.pop();)a.remove();P.hide(this);this.inherited(arguments)}});r("dojo-bidi")&&(z=c("dijit._DialogBase",z,{_setTitleAttr:function(a){this._set("title",a);this.titleNode.innerHTML=a;this.applyTextDir(this.titleNode)},
_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this.set("title",this.title))}}));var I=c("dijit.Dialog",[E,z],{});I._DialogBase=z;var P=I._DialogLevelManager={_beginZIndex:950,show:function(a,b){L[L.length-1].focus=x.curNode;var c=L[L.length-1].dialog?L[L.length-1].zIndex+2:I._DialogLevelManager._beginZIndex;m.set(a.domNode,"zIndex",c);H.show(b,c-1);L.push({dialog:a,underlayAttrs:b,zIndex:c})},hide:function(a){if(L[L.length-1].dialog==a){L.pop();var b=L[L.length-
1];1==L.length?H.hide():H.show(b.underlayAttrs,b.zIndex-1);if(a.refocus&&(a=b.focus,!b.dialog||a&&f.isDescendant(a,b.dialog.domNode)||(b.dialog._getFocusItems(),a=b.dialog._firstFocusItem),a))try{a.focus()}catch(Q){}}else b=e.indexOf(e.map(L,function(a){return a.dialog}),a),-1!=b&&L.splice(b,1)},isTop:function(a){return L[L.length-1].dialog==a}},L=I._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];x.watch("curNode",function(a,b,c){a=L[L.length-1].dialog;if(c&&a&&!a._fadeOutDeferred&&c.ownerDocument==
a.ownerDocument){do if(c==a.domNode||g.contains(c,"dijitPopup"))return;while(c=c.parentNode);a.focus()}});r("dijit-legacy-requires")&&t(0,function(){b(["dijit/TooltipDialog"])});return I})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../has ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),function(b,e,a,c,d,f,g,h,m,k,l,p,n){function q(a,b){"touchAction"in document.body.style?t="touchAction":"msTouchAction"in
document.body.style&&(t="msTouchAction");r=function(a,b){a.style[t]=b};r(a,b)}var t,r=function(){};g("touch-action")&&(r=q);return e("dojo.dnd.Moveable",[f],{handle:"",delay:0,skip:!1,constructor:function(b,d){this.node=c.byId(b);r(this.node,"none");d||(d={});this.handle=d.handle?c.byId(d.handle):null;this.handle||(this.handle=this.node);this.delay=0<d.delay?d.delay:0;this.skip=d.skip;this.mover=d.mover?d.mover:p;this.events=[h(this.handle,k.press,a.hitch(this,"onMouseDown")),h(this.handle,"dragstart",
a.hitch(this,"onSelectStart")),h(this.handle,"selectstart",a.hitch(this,"onSelectStart"))]},markupFactory:function(a,b,c){return new c(b,a)},destroy:function(){b.forEach(this.events,function(a){a.remove()});r(this.node,"");this.events=this.node=this.handle=null},onMouseDown:function(b){if(!this.skip||!l.isFormElement(b)){if(this.delay)this.events.push(h(this.handle,k.move,a.hitch(this,"onMouseMove")),h(this.handle.ownerDocument,k.release,a.hitch(this,"onMouseUp"))),this._lastX=b.pageX,this._lastY=
b.pageY;else this.onDragDetected(b);b.stopPropagation();b.preventDefault()}},onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(a){this.skip&&l.isFormElement(a)||(a.stopPropagation(),a.preventDefault())},onDragDetected:function(a){new this.mover(this.node,
a,this)},onMoveStart:function(a){m.publish("/dnd/move/start",a);d.add(n.body(),"dojoMove");d.add(this.node,"dojoMoveItem")},onMoveStop:function(a){m.publish("/dnd/move/stop",a);d.remove(n.body(),"dojoMove");d.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},onMoved:function(){}})})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang",
"../dom"],function(b,e,a,c){var d=a.getObject("dojo.dnd",!0);d.getCopyKeyState=function(a){return a[b("mac")?"metaKey":"ctrlKey"]};d._uniqueId=0;d.getUniqueId=function(){var a;do a=e._scopeName+"Unique"+ ++d._uniqueId;while(c.byId(a));return a};d._empty={};d.isFormElement=function(a){a=a.target;3==a.nodeType&&(a=a.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+a.tagName.toLowerCase()+" ")};return d})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n){return e("dojo.dnd.Mover",[m],{constructor:function(b,c,d){function e(a){a.preventDefault();a.stopPropagation()}this.node=f.byId(b);this.marginBox={l:c.pageX,t:c.pageY};this.mouseButton=c.button;c=this.host=d;b=b.ownerDocument;this.events=[k(b,l.move,a.hitch(this,"onFirstMove")),k(b,l.move,a.hitch(this,"onMouseMove")),k(b,l.release,a.hitch(this,"onMouseUp")),k(b,"dragstart",e),k(b.body,"selectstart",e)];n.autoScrollStart(b);if(c&&c.onMoveStart)c.onMoveStart(this)},
onMouseMove:function(a){n.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);a.preventDefault();a.stopPropagation()},onMouseUp:function(a){(c("webkit")&&c("mac")&&2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();a.preventDefault();a.stopPropagation()},onFirstMove:function(a){var b=this.node.style,c,e=this.host;switch(b.position){case "relative":case "absolute":c=Math.round(parseFloat(b.left))||0;b=Math.round(parseFloat(b.top))||0;break;
default:b.position="absolute";b=g.getMarginBox(this.node);c=d.doc.body;var f=h.getComputedStyle(c),k=g.getMarginBox(c,f),f=g.getContentBox(c,f);c=b.l-(f.l-k.l);b=b.t-(f.t-k.t)}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=b-this.marginBox.t;if(e&&e.onFirstMove)e.onFirstMove(this,a);this.events.shift().remove()},destroy:function(){b.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),
function(b,e,a,c,d,f){var g={};b.setObject("dojo.dnd.autoscroll",g);g.getViewport=f.getBox;g.V_TRIGGER_AUTOSCROLL=32;g.H_TRIGGER_AUTOSCROLL=32;g.V_AUTOSCROLL_VALUE=16;g.H_AUTOSCROLL_VALUE=16;var h,m=a.doc,k=Infinity,l=Infinity;g.autoScrollStart=function(b){m=b;h=f.getBox(m);b=a.body(m).parentNode;k=Math.max(b.scrollHeight-h.h,0);l=Math.max(b.scrollWidth-h.w,0)};g.autoScroll=function(b){var c=h||f.getBox(m),d=a.body(m).parentNode,e=0,p=0;b.clientX<g.H_TRIGGER_AUTOSCROLL?e=-g.H_AUTOSCROLL_VALUE:b.clientX>
c.w-g.H_TRIGGER_AUTOSCROLL&&(e=Math.min(g.H_AUTOSCROLL_VALUE,l-d.scrollLeft));b.clientY<g.V_TRIGGER_AUTOSCROLL?p=-g.V_AUTOSCROLL_VALUE:b.clientY>c.h-g.V_TRIGGER_AUTOSCROLL&&(p=Math.min(g.V_AUTOSCROLL_VALUE,k-d.scrollTop));window.scrollBy(e,p)};g._validNodes={div:1,p:1,td:1};g._validOverflow={auto:1,scroll:1};g.autoScrollNodes=function(b){for(var f,h,k,l,m,p=0,v=0,y=b.target;y;){if(1==y.nodeType&&y.tagName.toLowerCase()in g._validNodes){k=d.getComputedStyle(y);m=k.overflowX.toLowerCase()in g._validOverflow;
l=k.overflowY.toLowerCase()in g._validOverflow;if(m||l)f=c.getContentBox(y,k),h=c.position(y,!0);if(m){k=Math.min(g.H_TRIGGER_AUTOSCROLL,f.w/2);m=b.pageX-h.x;if(e("webkit")||e("opera"))m+=a.body().scrollLeft;p=0;0<m&&m<f.w&&(m<k?p=-k:m>f.w-k&&(p=k),y.scrollLeft+=p)}if(l){l=Math.min(g.V_TRIGGER_AUTOSCROLL,f.h/2);k=b.pageY-h.y;if(e("webkit")||e("opera"))k+=a.body().scrollTop;v=0;0<k&&k<f.h&&(k<l?v=-l:k>f.h-l&&(v=l),y.scrollTop+=v)}if(p||v)return}try{y=y.parentNode}catch(x){y=null}}g.autoScroll(b)};
return g})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare","./Moveable"],function(b,e){var a=e.prototype.onMove;return b("dojo.dnd.TimedMoveable",e,{timeout:40,constructor:function(a,b){b||(b={});b.timeout&&"number"==typeof b.timeout&&0<=b.timeout&&(this.timeout=b.timeout)},onMoveStop:function(b){b._timer&&(clearTimeout(b._timer),a.call(this,b,b._leftTop));e.prototype.onMoveStop.apply(this,arguments)},onMove:function(b,d){b._leftTop=d;if(!b._timer){var c=this;b._timer=setTimeout(function(){b._timer=
null;a.call(c,b,b._leftTop)},this.timeout)}}})})},"dijit/_Widget":function(){define("dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/has dojo/_base/kernel dojo/_base/lang dojo/query dojo/ready ./registry ./_WidgetBase ./_OnDijitClickMixin ./_FocusMixin dojo/uacss ./hccss".split(" "),function(b,e,a,c,d,f,g,h,m,k,l,p,n){function q(){}function t(b){return function(c,d,e,f){return c&&"string"==typeof d&&c[d]==q?c.on(d.substring(2).toLowerCase(),g.hitch(e,f)):b.apply(a,arguments)}}
b.around(a,"connect",t);f.connect&&b.around(f,"connect",t);b=c("dijit._Widget",[l,p,n],{onClick:q,onDblClick:q,onKeyDown:q,onKeyPress:q,onKeyUp:q,onMouseDown:q,onMouseMove:q,onMouseOut:q,onMouseOver:q,onMouseLeave:q,onMouseEnter:q,onMouseUp:q,constructor:function(a){this._toConnect={};for(var b in a)this[b]===q&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]=a[b],delete a[b])},postCreate:function(){this.inherited(arguments);for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},
on:function(b,c){return this[this._onMap(b)]===q?a.connect(this.domNode,b.toLowerCase(),this,c):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){f.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,b)},attr:function(a,b){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,arguments):this.get(a)},getDescendants:function(){f.deprecated(this.declaredClass+
"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?h("[widgetId]",this.containerNode).map(k.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});d("dijit-legacy-requires")&&m(0,function(){require(["dijit/_base"])});return b})},"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w,v,y,x,z,A){function B(a){return function(b){h[b?"set":"remove"](this.domNode,a,b);this._set(a,b)}}n.add("dijit-legacy-requires",!q.isAsync);n.add("dojo-bidi",!1);n("dijit-legacy-requires")&&u(0,function(){b(["dijit/_base/manager"])});var D={};c=f("dijit._WidgetBase",[w,x],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:B("lang"),dir:"",_setDirAttr:B("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",
baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",a)},attributeMap:{},_blankGif:c.blankGif||b.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var b=a.prototype,c=a._setterAttrs=[],a=a._onMap={},d;for(d in b.attributeMap)c.push(d);for(d in b)/^on/.test(d)&&(a[d.substring(2).toLowerCase()]=d),/^_set[A-Z](.*)Attr$/.test(d)&&(d=d.charAt(4).toLowerCase()+
d.substr(5,d.length-9),b.attributeMap&&d in b.attributeMap||c.push(d))}},postscript:function(a,b){this.create(a,b)},create:function(a,b){this._introspect();this.srcNodeRef=g.byId(b);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,t.mixin(this,a));this.postMixInProperties();this.id||(this.id=A.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=
this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=y.body(this.ownerDocument);A.add(this);this.buildRendering();var c;if(this.domNode){this._applyAttributes();var d=this.srcNodeRef;d&&d.parentNode&&this.domNode!==d&&(d.parentNode.replaceChild(this.domNode,d),c=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();c&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},b;for(b in this.params||{})a[b]=this._get(b);
e.forEach(this.constructor._setterAttrs,function(b){if(!(b in a)){var c=this._get(b);c&&this.set(b,c)}},this);for(b in a)this.set(b,a[b])},postMixInProperties:function(){},buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(e.map(a,function(a){return a+"Rtl"})));m.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=
!0,e.forEach(this.getChildren(),function(a){a._started||a._destroyed||!t.isFunction(a.startup)||(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function b(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a)}this._beingDestroyed=!0;this.uninitialize();e.forEach(this._connects,t.hitch(this,"disconnect"));e.forEach(this._supportingWidgets,b);this.domNode&&e.forEach(A.findWidgets(this.domNode,
this.containerNode),b);this.destroyRendering(a);A.remove(this.id);this._destroyed=!0},destroyRendering:function(a){this.bgIframe&&(this.bgIframe.destroy(a),delete this.bgIframe);this.domNode&&(a?h.remove(this.domNode,"widgetId"):k.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||k.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){e.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var b=
this.domNode;t.isObject(a)?p.set(b,a):b.style.cssText=b.style.cssText?b.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,b,c){c=3<=arguments.length?c:this.attributeMap[a];e.forEach(t.isArray(c)?c:[c],function(c){var d=this[c.node||c||"domNode"];switch(c.type||"attribute"){case "attribute":t.isFunction(b)&&(b=t.hitch(this,b));c=c.attribute?c.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;d.tagName?h.set(d,c,b):d.set(c,b);break;case "innerText":d.innerHTML="";d.appendChild(this.ownerDocument.createTextNode(b));
break;case "innerHTML":d.innerHTML=b;break;case "class":m.replace(d,b,this[a]);break;case "toggleClass":m.toggle(d,c.className||a,b)}},this)},get:function(a){var b=this._getAttrNames(a);return this[b.g]?this[b.g]():this._get(a)},set:function(a,b){if("object"===typeof a){for(var c in a)this.set(c,a[c]);return this}c=this._getAttrNames(a);var d=this[c.s];if(t.isFunction(d))var e=d.apply(this,Array.prototype.slice.call(arguments,1));else{var d=this.focusNode&&!t.isFunction(this.focusNode)?"focusNode":
"domNode",f=this[d]&&this[d].tagName,g;if((g=f)&&!(g=D[f])){g=this[d];var h={},k;for(k in g)h[k.toLowerCase()]=!0;g=D[f]=h}k=g;c=a in this.attributeMap?this.attributeMap[a]:c.s in this?this[c.s]:k&&c.l in k&&"function"!=typeof b||/^aria-|^data-|^role$/.test(a)?d:null;null!=c&&this._attrToDom(a,b,c);this._set(a,b)}return e||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var c=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});
return b[a]={n:a+"Node",s:"_set"+c+"Attr",g:"_get"+c+"Attr",l:c.toLowerCase()}},_set:function(a,b){var c=this[a];this[a]=b;!this._created||c===b||c!==c&&b!==b||(this._watchCallbacks&&this._watchCallbacks(a,c,b),this.emit("attrmodified-"+a,{detail:{prevValue:c,newValue:b}}))},_get:function(a){return this[a]},emit:function(a,b,c){b=b||{};void 0===b.bubbles&&(b.bubbles=!0);void 0===b.cancelable&&(b.cancelable=!0);b.detail||(b.detail={});b.detail.widget=this;var d,e=this["on"+a];e&&(d=e.apply(this,c?
c:[b]));this._started&&!this._beingDestroyed&&r.emit(this.domNode,a.toLowerCase(),b);return d},on:function(b,c){var d=this._onMap(b);return d?a.after(this,d,c,!0):this.own(r(this.domNode,b,c))[0]},_onMap:function(a){var b=this.constructor,c=b._onMap;if(!c){var c=b._onMap={},d;for(d in b.prototype)/^on/.test(d)&&(c[d.replace(/^on/,"").toLowerCase()]=d)}return c["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?
A.findWidgets(this.containerNode):[]},getParent:function(){return A.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,b,c){return this.own(d.connect(a,b,this,c))[0]},disconnect:function(a){a.remove()},subscribe:function(a,b){return this.own(v.subscribe(a,t.hitch(this,b)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():l.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=p.get(this.domNode,"display")},
placeAt:function(a,b){var c=!a.tagName&&A.byId(a);!c||!c.addChild||b&&"number"!==typeof b?(c=c&&"domNode"in c?c.containerNode&&!/after|before|replace/.test(b||"")?c.containerNode:c.domNode:g.byId(a,this.ownerDocument),k.place(this.domNode,c,b),!this._started&&(this.getParent()||{})._started&&this.startup()):c.addChild(this,b);return this},defer:function(a,b){var c=setTimeout(t.hitch(this,function(){c&&(c=null,this._destroyed||t.hitch(this,a)())}),b||0);return{remove:function(){c&&(clearTimeout(c),
c=null);return null}}}});n("dojo-bidi")&&c.extend(z);return c})},"dijit/Destroyable":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(b,e,a){return a("dijit.Destroyable",null,{destroy:function(a){this._destroyed=!0},own:function(){var a=["destroyRecursive","destroy","remove"];b.forEach(arguments,function(c){function d(){h.remove();b.forEach(m,function(a){a.remove()})}var g,h=e.before(this,"destroy",function(a){c[g](a)}),m=[];c.then?(g="cancel",c.then(d,d)):b.forEach(a,
function(a){"function"===typeof c[a]&&(g||(g=a),m.push(e.after(c,a,d,!0)))})},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),function(b,e,a,c,d,f){b=c("dijit._OnDijitClickMixin",null,{connect:function(a,b,c){return this.inherited(arguments,[a,"ondijitclick"==b?f:b,c])}});b.a11yclick=f;return b})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],
function(b,e,a,c){c.extend(e,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});return a("dijit._FocusMixin",null,{_focusManager:b})})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(b,e,a,c){a(function(){e("highcontrast")&&b.add(c.body(),"dijit_a11y")});return e})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),
function(b,e,a,c,d,f,g){d.add("highcontrast",function(){var a=g.doc.createElement("div");try{a.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+(e.blankGif||b.toUrl("./resources/blank.gif"))+'");';g.body().appendChild(a);var f=c.getComputedStyle(a),k=f.backgroundImage;return f.borderTopColor==f.borderRightColor||k&&("none"==k||"url(invalid-url:)"==k)}catch(l){return console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: "+
l.toString()),!1}finally{8>=d("ie")?a.outerHTML="":g.body().removeChild(a)}});f(function(){d("highcontrast")&&a.add(g.body(),"dj_a11y")});return d})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(b,e,a,c,d,f,g,h){var m=e("dijit._TemplatedMixin",h,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var b=this.declaredClass,
d=this;return g.substitute(a,this,function(a,e){"!"==e.charAt(0)&&(a=c.getObject(e.substr(1),!1,d));if("undefined"==typeof a)throw Error(b+" template:"+e);return null==a?"":"!"==e.charAt(0)?a:this._escapeValue(""+a)},this)},_escapeValue:function(a){return a.replace(/["'<>&]/g,function(a){return{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[a]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=b(this.templatePath,{sanitize:!0}));
var d=m.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),e;if(c.isString(d)){if(e=a.toDom(this._stringRepl(d),this.ownerDocument),1!=e.nodeType)throw Error("Invalid template: "+d);}else e=d.cloneNode(!0);this.domNode=e}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)}});m._templateCache={};m.getCachedTemplate=function(b,
c,d){var e=m._templateCache,f=b,h=e[f];if(h){try{if(!h.ownerDocument||h.ownerDocument==(d||document))return h}catch(r){}a.destroy(h)}b=g.trim(b);if(c||b.match(/\$\{([^\}]+)\}/g))return e[f]=b;c=a.toDom(b,d);if(1!=c.nodeType)throw Error("Invalid template: "+b);return e[f]=c};f("ie")&&d(window,"unload",function(){var b=m._templateCache,c;for(c in b){var d=b[c];"object"==typeof d&&a.destroy(d);delete b[c]}});return m})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(b){return b.cache})},
"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(b,e,a,c,d,f,g,h,m){var k=d.delegate(h,{mouseenter:f.enter,mouseleave:f.leave,keypress:a._keypress}),l;a=c("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);this._beforeFillContent()},
_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var b=a;;)if(1==b.nodeType&&(this._processTemplateNode(b,function(a,b){return a.getAttribute(b)},this._attach)||this.searchContainerNode)&&b.firstChild)b=b.firstChild;else{if(b==a)break;for(;!b.nextSibling;)if(b=b.parentNode,b==a)return;b=b.nextSibling}},_processTemplateNode:function(a,b,c){var e=!0,f=this.attachScope||this,g=b(a,"dojoAttachPoint")||b(a,"data-dojo-attach-point");if(g)for(var h=g.split(/\s*,\s*/);g=h.shift();)d.isArray(f[g])?
f[g].push(a):f[g]=a,e="containerNode"!=g,this._attachPoints.push(g);if(b=b(a,"dojoAttachEvent")||b(a,"data-dojo-attach-event"))for(g=b.split(/\s*,\s*/),h=d.trim;b=g.shift();)if(b){var k=null;-1!=b.indexOf(":")?(k=b.split(":"),b=h(k[0]),k=h(k[1])):b=h(b);k||(k=b);this._attachEvents.push(c(a,b,d.hitch(f,k)))}return e},_attach:function(a,c,d){c=c.replace(/^on/,"").toLowerCase();c="dijitclick"==c?l||(l=b("./a11yclick")):k[c]||c;return g(a,c,d)},_detachTemplateNodes:function(){var a=this.attachScope||
this;e.forEach(this._attachPoints,function(b){delete a[b]});this._attachPoints=[];e.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});d.extend(m,{dojoAttachEvent:"",dojoAttachPoint:""});return a})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p){e=e("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);b.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(a){this.watch(a,f.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",
!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(a){c=c.concat(b.map(c,function(b){return b+a}),"dijit"+a)}var c=this.baseClass.split(" ");
this.isLeftToRight()||a("Rtl");var d="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(d);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var d=this.stateNode||this.domNode,e={};b.forEach(d.className.split(" "),function(a){e[a]=!0});"_stateClasses"in this&&b.forEach(this._stateClasses,function(a){delete e[a]});b.forEach(c,
function(a){e[a]=!0});var f=[],g;for(g in e)f.push(g);d.className=f.join(" ");this._stateClasses=c},_subnodeCssMouseEvent:function(a,b,d){function e(d){c.toggle(a,b+"Active",d)}if(!this.disabled&&!this.readOnly)switch(d.type){case "mouseover":case "MSPointerOver":case "pointerover":c.toggle(a,b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":c.toggle(a,b+"Hover",!1);e(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":e(!0);
break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":e(!1);break;case "focus":case "focusin":c.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":c.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});h(function(){function b(b,c,d){if(!d||!a.isDescendant(d,c))for(;c&&c!=d;c=c.parentNode)if(c._cssState){var e=p.getEnclosingWidget(c);e&&(c==e.domNode?e._cssMouseEvent(b):e._subnodeCssMouseEvent(c,c._cssState,b))}}var c=k.body(),d;g(c,
m.over,function(a){b(a,a.target,a.relatedTarget)});g(c,m.out,function(a){b(a,a.target,a.relatedTarget)});g(c,l.press,function(a){d=a.target;b(a,d)});g(c,l.release,function(a){b(a,d);d=null});g(c,"focusin, focusout",function(a){var b=a.target;if(b._cssState&&!b.getAttribute("widgetId")){var c=p.getEnclosingWidget(b);c&&c._subnodeCssMouseEvent(b,b._cssState,a)}})});return e})},"dijit/form/_FormMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),
function(b,e,a,c,d,f){return e("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(a){var c=[];b.forEach(a||this.getChildren(),function(a){"value"in a?c.push(a):c=c.concat(this._getDescendantFormWidgets(a.getChildren()))},this);return c},reset:function(){b.forEach(this._getDescendantFormWidgets(),function(a){a.reset&&a.reset()})},validate:function(){var a=!1;return b.every(b.map(this._getDescendantFormWidgets(),function(b){b._hasBeenBlurred=!0;var c=b.disabled||!b.validate||
b.validate();c||a||(f.scrollIntoView(b.containerNode||b.domNode),b.focus(),a=!0);return c}),function(a){return a})},setValues:function(b){a.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",b)},_setValueAttr:function(a){var d={};b.forEach(this._getDescendantFormWidgets(),function(a){a.name&&(d[a.name]||(d[a.name]=[])).push(a)});for(var e in d)if(d.hasOwnProperty(e)){var f=d[e],g=c.getObject(e,!1,a);void 0!==g&&(g=[].concat(g),
"boolean"==typeof f[0].checked?b.forEach(f,function(a){a.set("value",-1!=b.indexOf(g,a._get("value")))}):f[0].multiple?f[0].set("value",g):b.forEach(f,function(a,b){a.set("value",g[b])}))}},getValues:function(){a.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};b.forEach(this._getDescendantFormWidgets(),function(b){var d=b.name;if(d&&!b.disabled){var e=b.get("value");"boolean"==typeof b.checked?
/Radio/.test(b.declaredClass)?!1!==e?c.setObject(d,e,a):(e=c.getObject(d,!1,a),void 0===e&&c.setObject(d,null,a)):(b=c.getObject(d,!1,a),b||(b=[],c.setObject(d,b,a)),!1!==e&&b.push(e)):(b=c.getObject(d,!1,a),"undefined"!=typeof b?c.isArray(b)?b.push(e):c.setObject(d,[b,e],a):c.setObject(d,e,a))}});return a},isValid:function(){return""==this.state},onValidStateChange:function(){},_getState:function(){var a=b.map(this._descendants,function(a){return a.get("state")||""});return 0<=b.indexOf(a,"Error")?
"Error":0<=b.indexOf(a,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(a){this._descendants=this._getDescendantFormWidgets();b.forEach(this._descendants,function(a){a._started||a.startup()});a||this._onChildChange()},_onChildChange:function(a){a&&"state"!=a&&"disabled"!=a||this._set("state",this._getState());a&&"value"!=a&&"disabled"!=a&&"checked"!=a||(this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;
this._set("value",this.get("value"))},10))},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var a=this;this.own(d(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(b){b.target!=a.domNode&&a._onChildChange(b.type.replace("attrmodified-",""))}));this.watch("state",function(a,b,c){this.onValidStateChange(""==c)})},destroy:function(){this.inherited(arguments)}})})},
"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(b,e){return b("dijit._DialogMixin",null,{actionBarTemplate:"",execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=e._getTabNavigable(this.domNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}})})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-style dojo/on dojo/window ./_Widget ./_TemplatedMixin ./BackgroundIframe ./Viewport ./main".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p){var n=b("dijit.DialogUnderlay",[h,m],{templateString:"\x3cdiv class\x3d'dijitDialogUnderlayWrapper'\x3e\x3cdiv class\x3d'dijitDialogUnderlay' tabIndex\x3d'-1' data-dojo-attach-point\x3d'node'\x3e\x3c/div\x3e\x3c/div\x3e",dialogId:"","class":"",_modalConnects:[],_setDialogIdAttr:function(a){c.set(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+a;this._set("class",a)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);
this.own(f(this.domNode,"keydown",e.hitch(this,"_onKeyDown")));this.inherited(arguments)},layout:function(){var a=this.node.style,b=this.domNode.style;b.display="none";var c=g.getBox(this.ownerDocument);b.top=c.t+"px";b.left=c.l+"px";a.width=c.w+"px";a.height=c.h+"px";b.display="block"},show:function(){this.domNode.style.display="block";this.open=!0;this.layout();this.bgIframe=new k(this.domNode);var a=g.get(this.ownerDocument);this._modalConnects=[l.on("resize",e.hitch(this,"layout")),f(a,"scroll",
e.hitch(this,"layout"))]},hide:function(){this.bgIframe.destroy();delete this.bgIframe;for(this.domNode.style.display="none";this._modalConnects.length;)this._modalConnects.pop().remove();this.open=!1},destroy:function(){for(;this._modalConnects.length;)this._modalConnects.pop().remove();this.inherited(arguments)},_onKeyDown:function(){}});n.show=function(a,b){var c=n._singleton;!c||c._destroyed?c=p._underlay=n._singleton=new n(a):a&&c.set(a);d.set(c.domNode,"zIndex",b);c.open||c.show()};n.hide=function(){var a=
n._singleton;a&&!a._destroyed&&a.hide()};return n})},"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(b,e,a,c,d,f,g,h){h.add("config-bgIframe",(h("ie")||h("trident"))&&!/IEMobile\/10\.0/.test(navigator.userAgent));var m=new function(){var e=[];this.pop=function(){var f;e.length?(f=e.pop(),f.style.display=""):(9>h("ie")?(f=a.dojoBlankHtmlUrl||b.toUrl("dojo/resources/blank.html")||'javascript:""',
f=document.createElement("\x3ciframe src\x3d'"+f+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e")):(f=c.create("iframe"),f.src='javascript:""',f.className="dijitBackgroundIframe",f.setAttribute("role","presentation"),d.set(f,"opacity",.1)),f.tabIndex=-1);return f};this.push=function(a){a.style.display="none";e.push(a)}};e.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(h("config-bgIframe")){var b=this.iframe=
m.pop();a.appendChild(b);7>h("ie")||h("quirks")?(this.resize(a),this._conn=g(a,"resize",f.hitch(this,"resize",a))):d.set(b,{width:"100%",height:"100%"})}};f.extend(e.BackgroundIframe,{resize:function(a){this.iframe&&d.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),m.push(this.iframe),delete this.iframe)}});return e.BackgroundIframe})},"dijit/Viewport":function(){define(["dojo/Evented",
"dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(b,e,a,c,d){var f=new b,g;a(function(){var a=d.getBox();f._rlh=e(window,"resize",function(){var b=d.getBox();if(a.h!=b.h||a.w!=b.w)a=b,f.emit("resize")});if(8==c("ie")){var b=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=b&&(b=screen.deviceXDPI,f.emit("resize"))},500)}c("ios")&&(e(document,"focusin",function(a){g=a.target}),e(document,"focusout",function(a){g=null}))});f.getEffectiveBox=function(a){a=d.getBox(a);var b=g&&
g.tagName&&g.tagName.toLowerCase();c("ios")&&g&&!g.readOnly&&("textarea"==b||"input"==b&&/^(color|email|number|password|search|tel|text|url)$/.test(g.type))&&(a.h*=0==orientation||180==orientation?.66:.4,b=g.getBoundingClientRect(),a.h=Math.max(a.h,b.top+b.height));return a};return f})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when dojo/i18n!../nls/loading".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r){return m("dijit.layout.ContentPane",[a,c,d],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:b._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",
isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(a,b,c){var d=new c(a,b);return!d.href&&d._contentSetter&&d._contentSetter.parseDeferred&&!d._contentSetter.parseDeferred.isFulfilled()?d._contentSetter.parseDeferred.then(function(){return d}):d},create:function(a,b){if(!(a&&a.template||!b||"href"in a||"content"in a)){b=l.byId(b);for(var c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);
a=e.delegate(a,{content:c})}this.inherited(arguments,[a,b])},postMixInProperties:function(){this.inherited(arguments);var a=t.getLocalization("dijit","loading",this.lang);this.loadingMessage=f.substitute(this.loadingMessage,a);this.errorMessage=f.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&h.forEach(this._contentSetter.parseResults,
function(a){a._started||a._destroyed||!e.isFunction(a.startup)||(a.startup(),a._started=!0)},this)},_startChildren:function(){h.forEach(this.getChildren(),function(a){a._started||a._destroyed||!e.isFunction(a.startup)||(a.startup(),a._started=!0)});this._contentSetter&&h.forEach(this._contentSetter.parseResults,function(a){a._started||a._destroyed||!e.isFunction(a.startup)||(a.startup(),a._started=!0)},this)},setHref:function(a){b.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.",
"","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new k(e.hitch(this,"cancel"));this.onLoadDeferred.then(e.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){b.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href",
"");this.cancel();this.onLoadDeferred=new k(e.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(e.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||
this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new k(e.hitch(this,"cancel"));this.onLoadDeferred.then(e.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};
e.isObject(this.ioArgs)&&e.mixin(b,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||q.get)(b),d;c.then(function(b){d=b;try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(z){a._onError("Content",z)}},function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return d});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(w){console.error("Error "+this.widgetId+
" running custom onLoad code: "+w.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(u){console.error("Error "+this.widgetId+" running custom onUnload code: "+u.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var b=this._contentSetter;h.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});b&&(h.forEach(b.parseResults,function(b){b._destroyed||(b.destroyRecursive?
b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0)}),delete b.parseResults);a||n.empty(this.containerNode);delete this._singleChild},_setContent:function(a,b){a=this.preprocessContent(a);this.destroyDescendants();var c=this._contentSetter;c&&c instanceof g._ContentSetter||(c=this._contentSetter=new g._ContentSetter({node:this.containerNode,_onError:e.hitch(this,this._onError),onContentError:e.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(A){console.error("Fatal "+
this.id+" could not change content due to "+A.message,A)}})}));var d=e.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),d=c.set(e.isObject(a)&&a.domNode?a.domNode:a,d),f=this;return r(d&&d.then?d:c.parseDeferred,function(){delete f._contentSetterParams;b||(f._started&&(f._startChildren(),f._scheduleLayout()),f._onLoadHandler(a))})},
preprocessContent:function(a){return a},_onError:function(a,b,c){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],
function(b,e,a,c){return e("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(b,c){var d=this.containerNode;if(0<c){for(d=d.firstChild;0<c;)1==d.nodeType&&c--,d=d.nextSibling;d?c="before":(d=this.containerNode,c="last")}a.place(b.domNode,d,c);this._started&&!b._started&&b.startup()},removeChild:function(a){"number"==typeof a&&(a=this.getChildren()[a]);a&&(a=a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},
hasChildren:function(){return 0<this.getChildren().length},_getSiblingOfChild:function(a,c){var d=this.getChildren(),e=b.indexOf(d,a);return d[e+c]},getIndexOfChild:function(a){return b.indexOf(this.getChildren(),a)}})})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/query ../registry ../Viewport ./utils".split(" "),function(b,e,a,c,d,f,g,h,m,k){return e("dijit.layout._ContentPaneResizeMixin",
null,{doLayout:!0,isLayoutContainer:!0,startup:function(){if(!this._started){var a=this.getParent();this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(m.on("resize",f.hitch(this,"resize")))}},_checkIfSingleChild:function(){if(this.doLayout){var b=[],c=!1;g("\x3e *",this.containerNode).some(function(a){var d=h.byNode(a);d&&d.resize?b.push(d):!/script|link|style/i.test(a.nodeName)&&
a.offsetHeight&&(c=!0)});this._singleChild=1!=b.length||c?null:b[0];a.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)}},resize:function(a,b){this._resizeCalled=!0;this._scheduleLayout(a,b)},_scheduleLayout:function(a,b){this._isShown()?this._layout(a,b):(this._needLayout=!0,this._changeSize=a,this._resultSize=b)},_layout:function(a,b){delete this._needLayout;this._wasShown||!1===this.open||this._onShow();a&&c.setMarginBox(this.domNode,a);var d=this.containerNode;if(d===
this.domNode){var e=b||{};f.mixin(e,a||{});"h"in e&&"w"in e||(e=f.mixin(c.getMarginBox(d),e));this._contentBox=k.marginBox2contentBox(d,e)}else this._contentBox=c.getContentBox(d);this._layoutChildren()},_layoutChildren:function(){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||c.getContentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else for(var a=this.getChildren(),b,d=0;b=a[d++];)b.resize&&b.resize()},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&
"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var b=this.domNode,c=this.domNode.parentNode;return"none"!=b.style.display&&"hidden"!=b.style.visibility&&!a.contains(b,"dijitHidden")&&c&&c.style&&"none"!=c.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dijit/layout/utils":function(){define(["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],
function(b,e,a,c,d){function f(a){return a.substring(0,1).toUpperCase()+a.substring(1)}function g(b,c){var e=b.resize?b.resize(c):a.setMarginBox(b.domNode,c);e?d.mixin(b,e):(d.mixin(b,a.getMarginBox(b.domNode)),d.mixin(b,c))}var h={marginBox2contentBox:function(b,d){var e=c.getComputedStyle(b),f=a.getMarginExtents(b,e),g=a.getPadBorderExtents(b,e);return{l:c.toPixelValue(b,e.paddingLeft),t:c.toPixelValue(b,e.paddingTop),w:d.w-(f.w+g.w),h:d.h-(f.h+g.h)}},layoutChildren:function(a,c,h,p,n){c=d.mixin({},
c);e.add(a,"dijitLayoutContainer");h=b.filter(h,function(a){return"center"!=a.region&&"client"!=a.layoutAlign}).concat(b.filter(h,function(a){return"center"==a.region||"client"==a.layoutAlign}));b.forEach(h,function(a){var b=a.domNode,d=a.region||a.layoutAlign;if(!d)throw Error("No region setting for "+a.id);var h=b.style;h.left=c.l+"px";h.top=c.t+"px";h.position="absolute";e.add(b,"dijitAlign"+f(d));b={};p&&p==a.id&&(b["top"==a.region||"bottom"==a.region?"h":"w"]=n);"leading"==d&&(d=a.isLeftToRight()?
"left":"right");"trailing"==d&&(d=a.isLeftToRight()?"right":"left");"top"==d||"bottom"==d?(b.w=c.w,g(a,b),c.h-=a.h,"top"==d?c.t+=a.h:h.top=c.t+c.h+"px"):"left"==d||"right"==d?(b.h=c.h,g(a,b),c.w-=a.w,"left"==d?c.l+=a.w:h.left=c.l+c.w+"px"):"client"!=d&&"center"!=d||g(a,c)})}};d.setObject("dijit.layout.utils",h);return h})},"dojo/html":function(){define("./_base/kernel ./_base/lang ./_base/array ./_base/declare ./dom ./dom-construct ./parser".split(" "),function(b,e,a,c,d,f,g){var h=0,m={_secureForInnerHtml:function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,
"")},_emptyNode:f.empty,_setNodeContent:function(a,b){f.empty(a);if(b)if("number"==typeof b&&(b=b.toString()),"string"==typeof b&&(b=f.toDom(b,a.ownerDocument)),!b.nodeType&&e.isArrayLike(b))for(var c=b.length,d=0;d<b.length;d=c==b.length?d+1:0)f.place(b[d],a,"last");else f.place(b,a,"last");return a},_ContentSetter:c("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:b._scopeName,startup:!0,constructor:function(a,b){e.mixin(this,
a||{});b=this.node=d.byId(this.node||b);this.id||(this.id=["Setter",b?b.id||b.tagName:"",h++].join("_"))},set:function(a,b){void 0!==a&&(this.content=a);"number"==typeof a&&(a=a.toString());b&&this._mixin(b);this.onBegin();this.setContent();var c=this.onEnd();return c&&c.then?c:this.node},setContent:function(){var a=this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=m._setNodeContent(a,this.content)}catch(p){var b=this.onContentError(p);try{a.innerHTML=b}catch(n){console.error("Fatal "+
this.declaredClass+".setContent could not change content due to "+n.message,n)}}this.node=a},empty:function(){this.parseDeferred&&(this.parseDeferred.isResolved()||this.parseDeferred.cancel(),delete this.parseDeferred);this.parseResults&&this.parseResults.length&&(a.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);f.empty(this.node)},onBegin:function(){var a=this.content;if(e.isString(a)&&(this.cleanContent&&(a=m._secureForInnerHtml(a)),this.extractContent)){var b=
a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+a},onExecError:function(a){return"Error occurred executing scripts: "+a},_mixin:function(a){var b={},c;for(c in a)c in b||(this[c]=a[c])},_parse:function(){var b=
this.node;try{var c={};a.forEach(["dir","lang","textDir"],function(a){this[a]&&(c[a]=this[a])},this);var d=this;this.parseDeferred=g.parse({rootNode:b,noStart:!this.startup,inherited:c,scope:this.parserScope}).then(function(a){return d.parseResults=a},function(a){d._onError("Content",a,"Error parsing in _ContentSetter#"+this.id)})}catch(n){this._onError("Content",n,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,b,c){a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&m._setNodeContent(this.node,
a,!0)}}),set:function(a,b,c){void 0==b&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),b="");"number"==typeof b&&(b=b.toString());return c?(new m._ContentSetter(e.mixin(c,{content:b,node:a}))).set():m._setNodeContent(a,b,!0)}};e.setObject("dojo.html",m);return m})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r){function u(a){return eval("("+a+")")}function w(a){var b=a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt<y){var b=a._nameCaseMap={},d;for(d in c)"_"!==d.charAt(0)&&(b[d.toLowerCase()]=d);b._extendCnt=y}return b}function v(c,d){d||(d=b);var e=d._dojoParserCtorMap||(d._dojoParserCtorMap={}),f=c.join();if(!e[f]){for(var g=[],h=0,k=c.length;h<k;h++){var l=c[h];g[g.length]=e[l]=e[l]||a.getObject(l)||~l.indexOf("/")&&d(l)}h=g.shift();e[f]=g.length?h.createSubclass?
h.createSubclass(g):h.extend.apply(h,g):h}return e[f]}new Date("X");var y=0;m.after(a,"extend",function(){y++},!0);var x={_clearCache:function(){y++;_ctorMap={}},_functionFromScript:function(a,b){var d="",e="",f=a.getAttribute(b+"args")||a.getAttribute("args"),g=a.getAttribute("with"),f=(f||"").split(/\s*,\s*/);g&&g.length&&c.forEach(g.split(/\s*,\s*/),function(a){d+="with("+a+"){";e+="}"});return new Function(f,d+a.innerHTML+e)},instantiate:function(a,b,d){b=b||{};d=d||{};var f=(d.scope||e._scopeName)+
"Type",g="data-"+(d.scope||e._scopeName)+"-",h=g+"type",k=g+"mixins",l=[];c.forEach(a,function(a){var c=f in b?b[f]:a.getAttribute(h)||a.getAttribute(f);if(c){var d=a.getAttribute(k),c=d?[c].concat(d.split(/\s*,\s*/)):[c];l.push({node:a,types:c})}});return this._instantiate(l,b,d)},_instantiate:function(a,b,d,e){function f(a){b._started||d.noStart||c.forEach(a,function(a){"function"!==typeof a.startup||a._started||a.startup()});return a}a=c.map(a,function(a){var c=a.ctor||v(a.types,d.contextRequire);
if(!c)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(c,a.node,b,d,a.scripts,a.inherited)},this);return e?k(a).then(f):f(a)},construct:function(b,d,f,g,k,p){function C(b){F&&a.setObject(F,b);for(x=0;x<R.length;x++)m[R[x].advice||"after"](b,R[x].method,a.hitch(b,R[x].func),!0);for(x=0;x<S.length;x++)S[x].call(b);for(x=0;x<T.length;x++)b.watch(T[x].prop,T[x].func);for(x=0;x<U.length;x++)t(b,U[x].event,U[x].func);return b}var r=b&&b.prototype;g=g||{};var A=
{};g.defaults&&a.mixin(A,g.defaults);p&&a.mixin(A,p);var v;n("dom-attributes-explicit")?v=d.attributes:n("dom-attributes-specified-flag")?v=c.filter(d.attributes,function(a){return a.specified}):(p=(/^input$|^img$/i.test(d.nodeName)?d:d.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),v=c.map(p.split(/\s+/),function(a){var b=a.toLowerCase();return{name:a,value:"LI"==d.nodeName&&"value"==a||"enctype"==b?d.getAttribute(b):d.getAttributeNode(b).value}}));
var y=g.scope||e._scopeName;p="data-"+y+"-";var z={};"dojo"!==y&&(z[p+"props"]="data-dojo-props",z[p+"type"]="data-dojo-type",z[p+"mixins"]="data-dojo-mixins",z[y+"type"]="dojotype",z[p+"id"]="data-dojo-id");for(var x=0,B,y=[],F,D;B=v[x++];){var O=B.name,Q=O.toLowerCase();B=B.value;switch(z[Q]||Q){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":D=B;break;case "data-dojo-id":case "jsid":F=B;break;case "data-dojo-attach-point":case "dojoattachpoint":A.dojoAttachPoint=
B;break;case "data-dojo-attach-event":case "dojoattachevent":A.dojoAttachEvent=B;break;case "class":A["class"]=d.className;break;case "style":A.style=d.style&&d.style.cssText;break;default:if(O in r||(O=w(b)[Q]||O),O in r)switch(typeof r[O]){case "string":A[O]=B;break;case "number":A[O]=B.length?Number(B):NaN;break;case "boolean":A[O]="false"!=B.toLowerCase();break;case "function":""===B||-1!=B.search(/[^\w\.]+/i)?A[O]=new Function(B):A[O]=a.getObject(B,!1)||new Function(B);y.push(O);break;default:Q=
r[O],A[O]=Q&&"length"in Q?B?B.split(/\s*,\s*/):[]:Q instanceof Date?""==B?new Date(""):"now"==B?new Date:l.fromISOString(B):Q instanceof h?e.baseUrl+B:u(B)}else A[O]=B}}for(v=0;v<y.length;v++)z=y[v].toLowerCase(),d.removeAttribute(z),d[z]=null;if(D)try{D=u.call(g.propsThis,"{"+D+"}"),a.mixin(A,D)}catch(V){throw Error(V.toString()+" in data-dojo-props\x3d'"+D+"'");}a.mixin(A,f);k||(k=b&&(b._noScript||r._noScript)?[]:q("\x3e script[type^\x3d'dojo/']",d));var R=[],S=[],T=[],U=[];if(k)for(x=0;x<k.length;x++)z=
k[x],d.removeChild(z),f=z.getAttribute(p+"event")||z.getAttribute("event"),g=z.getAttribute(p+"prop"),D=z.getAttribute(p+"method"),y=z.getAttribute(p+"advice"),v=z.getAttribute("type"),z=this._functionFromScript(z,p),f?"dojo/connect"==v?R.push({method:f,func:z}):"dojo/on"==v?U.push({event:f,func:z}):A[f]=z:"dojo/aspect"==v?R.push({method:D,advice:y,func:z}):"dojo/watch"==v?T.push({prop:g,func:z}):S.push(z);b=(k=b.markupFactory||r.markupFactory)?k(A,d,b):new b(A,d);return b.then?b.then(C):C(b)},scan:function(a,
d){function f(a){if(!a.inherited){a.inherited={};var b=a.node,c=f(a.parent),b={dir:b.getAttribute("dir")||c.dir,lang:b.getAttribute("lang")||c.lang,textDir:b.getAttribute(t)||c.textDir},d;for(d in b)b[d]&&(a.inherited[d]=b[d])}return a.inherited}var g=[],h=[],k={},l=(d.scope||e._scopeName)+"Type",m="data-"+(d.scope||e._scopeName)+"-",q=m+"type",t=m+"textdir",m=m+"mixins",r=a.firstChild,u=d.inherited;if(!u){var A=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&A(a.parentNode,
b)},u={dir:A(a,"dir"),lang:A(a,"lang"),textDir:A(a,t)},w;for(w in u)u[w]||delete u[w]}for(var u={inherited:u},y,z;;)if(r)if(1!=r.nodeType)r=r.nextSibling;else if(y&&"script"==r.nodeName.toLowerCase())(x=r.getAttribute("type"))&&/^dojo\/\w/i.test(x)&&y.push(r),r=r.nextSibling;else if(z)r=r.nextSibling;else{var x=r.getAttribute(q)||r.getAttribute(l);w=r.firstChild;if(x||w&&(3!=w.nodeType||w.nextSibling)){z=null;if(x){var Q=r.getAttribute(m);y=Q?[x].concat(Q.split(/\s*,\s*/)):[x];try{z=v(y,d.contextRequire)}catch(S){}z||
c.forEach(y,function(a){~a.indexOf("/")&&!k[a]&&(k[a]=!0,h[h.length]=a)});Q=z&&!z.prototype._noScript?[]:null;u={types:y,ctor:z,parent:u,node:r,scripts:Q};u.inherited=f(u);g.push(u)}else u={node:r,scripts:y,parent:u};y=Q;z=r.stopParser||z&&z.prototype.stopParser&&!d.template;r=w}else r=r.nextSibling}else{if(!u||!u.node)break;r=u.node.nextSibling;z=!1;u=u.parent;y=u.scripts}var R=new p;h.length?(n("dojo-debug-messages")&&console.warn("WARNING: Modules being Auto-Required: "+h.join(", ")),(d.contextRequire||
b)(h,function(){R.resolve(c.filter(g,function(a){if(!a.ctor)try{a.ctor=v(a.types,d.contextRequire)}catch(V){}for(var b=a.parent;b&&!b.types;)b=b.parent;var c=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(c&&c.stopParser&&!d.template);a.instantiate=!b||b.instantiate&&b.instantiateChildren;return a.instantiate}))})):R.resolve(g);return R.promise},_require:function(c,d){var e=u("{"+c.innerHTML+"}"),f=[],g=[],h=new p,k=d&&d.contextRequire||b,l;for(l in e)f.push(l),g.push(e[l]);k(g,function(){for(var b=
0;b<f.length;b++)a.setObject(f[b],arguments[b]);h.resolve(arguments)});return h.promise},_scanAmd:function(a,b){var c=new p,d=c.promise;c.resolve(!0);var e=this;q("script[type\x3d'dojo/require']",a).forEach(function(a){d=d.then(function(){return e._require(a,b)});a.parentNode.removeChild(a)});return d},parse:function(b,c){!b||"string"==typeof b||"nodeType"in b||(c=b,b=c.rootNode);var d=b?f.byId(b):g.body();c=c||{};var e=c.template?{template:!0}:{},h=[],k=this,l=this._scanAmd(d,c).then(function(){return k.scan(d,
c)}).then(function(a){return k._instantiate(a,e,c,!0)}).then(function(a){return h=h.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});a.mixin(h,l);return h}};e.parser=x;d.parseOnLoad&&r(100,x,"parse");return x})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(b,e){var a={};b.setObject("dojo.date.stamp",a);a.fromISOString=function(b,d){a._isoRegExp||(a._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);
var c=a._isoRegExp.exec(b),g=null;if(c){c.shift();c[1]&&c[1]--;c[6]&&(c[6]*=1E3);d&&(d=new Date(d),e.forEach(e.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(a){return d["get"+a]()}),function(a,b){c[b]=c[b]||a}));g=new Date(c[0]||1970,c[1]||0,c[2]||1,c[3]||0,c[4]||0,c[5]||0,c[6]||0);100>c[0]&&g.setFullYear(c[0]||1970);var h=0,m=c[7]&&c[7].charAt(0);"Z"!=m&&(h=60*(c[8]||0)+(Number(c[9])||0),"-"!=m&&(h*=-1));m&&(h-=g.getTimezoneOffset());h&&g.setTime(g.getTime()+6E4*
h)}return g};a.toISOString=function(a,b){var c=function(a){return 10>a?"0"+a:a};b=b||{};var d=[],e=b.zulu?"getUTC":"get",m="";"time"!=b.selector&&(m=a[e+"FullYear"](),m=["0000".substr((m+"").length)+m,c(a[e+"Month"]()+1),c(a[e+"Date"]())].join("-"));d.push(m);if("date"!=b.selector){m=[c(a[e+"Hours"]()),c(a[e+"Minutes"]()),c(a[e+"Seconds"]())].join(":");e=a[e+"Milliseconds"]();b.milliseconds&&(m+="."+(100>e?"0":"")+c(e));if(b.zulu)m+="Z";else if("time"!=b.selector)var e=a.getTimezoneOffset(),k=Math.abs(e),
m=m+((0<e?"-":"+")+c(Math.floor(k/60))+":"+c(k%60));d.push(m)}return d.join("T")};return a})},"esri/Credential":function(){define(["dojo/_base/declare","dojo/has","./kernel","./IdentityManagerBase"],function(b,e,a,c){b=b(c.Credential,{});e("extend-esri")&&(a.Credential=b);return b})},"esri/IdentityManagerBase":function(){define("dojo/_base/declare dojo/_base/config dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/_base/url dojo/sniff dojo/cookie dojo/io-query dojo/regexp ./kernel ./config ./lang ./ServerInfo ./urlUtils ./deferredUtils ./request ./Evented ./OAuthCredential ./arcgis/OAuthInfo".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w,v,y,x){var z={},A=function(a){var b=(new g(a.owningSystemUrl)).host;a=(new g(a.server)).host;var c=/.+\.arcgis\.com$/i;return c.test(b)&&c.test(a)},B=function(a,b){return!!(A(a)&&b&&c.some(b,function(b){return b.test(a.server)}))},D,F=b(v,{declaredClass:"esri.IdentityManagerBase",constructor:function(){this._portalConfig=a.getObject("esriGeowConfig");this.serverInfos=[];this.oAuthInfos=[];this.credentials=[];this._soReqs=[];this._xoReqs=[];this._portals=
[];this._getOAuthHash()},defaultOAuthInfo:null,defaultTokenValidity:60,tokenValidity:null,signInPage:null,useSignInPage:!0,normalizeWebTierAuth:!1,_busy:null,_oAuthHash:null,_gwTokenUrl:"/sharing/generateToken",_agsRest:"/rest/services",_agsPortal:/\/sharing(\/|$)/i,_agsAdmin:/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i,_adminSvcs:/\/admin\/services(\/|$)/i,_agolSuffix:".arcgis.com",_gwDomains:[{regex:/https?:\/\/www\.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"},
{regex:/https?:\/\/dev\.arcgis\.com/i,tokenServiceUrl:"https://dev.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*dev[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://devext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*qa[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://qaext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"}],_legacyFed:[],_regexSDirUrl:/http.+\/rest\/services\/?/ig,_regexServerType:/(\/(MapServer|GeocodeServer|GPServer|GeometryServer|ImageServer|NAServer|FeatureServer|GeoDataServer|GlobeServer|MobileServer|GeoenrichmentServer|VectorTileServer)).*/ig,
_gwUser:/http.+\/users\/([^\/]+)\/?.*/i,_gwItem:/http.+\/items\/([^\/]+)\/?.*/i,_gwGroup:/http.+\/groups\/([^\/]+)\/?.*/i,_errorCodes:[499,498,403,401],_rePortalTokenSvc:/\/sharing(\/rest)?\/generatetoken/i,_publicUrls:[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],_createDefaultOAuthInfo:!0,_hasTestedIfAppIsOnPortal:!1,registerServers:function(a){var b=this.serverInfos;b?(a=c.filter(a,function(a){return!this.findServerInfo(a.server)},this),this.serverInfos=b.concat(a)):
this.serverInfos=a;c.forEach(a,function(a){a.owningSystemUrl&&this._portals.push(a.owningSystemUrl);if(a.hasPortal){this._portals.push(a.server);var b=n.defaults.io.corsEnabledServers,c=this._getOrigin(a.tokenServiceUrl);r.canUseXhr(a.server)||b.push(a.server.replace(/^https?:\/\//i,""));r.canUseXhr(c)||b.push(c.replace(/^https?:\/\//i,""))}},this)},registerOAuthInfos:function(a){var b=this.oAuthInfos;b?(a=c.filter(a,function(a){return!this.findOAuthInfo(a.portalUrl)},this),this.oAuthInfos=b.concat(a)):
this.oAuthInfos=a},registerToken:function(b){var c=this._sanitizeUrl(b.server),d=this.findServerInfo(c),e=!0,f;d||(d=new t,d.server=this._getServerInstanceRoot(c),d.tokenServiceUrl=this._getTokenSvcUrl(c),d.hasPortal=!0,this.registerServers([d]));(f=this.findCredential(c,b.userId))?(a.mixin(f,b),e=!1):(f=new D({userId:b.userId,server:d.server,token:b.token,expires:b.expires,ssl:b.ssl,scope:this._isServerRsrc(c)?"server":"portal"}),f.resources=[c],this.credentials.push(f));f.onTokenChange(!1);e||f.refreshServerTokens()},
toJson:function(){return q.fixJson({serverInfos:c.map(this.serverInfos,function(a){return a.toJson()}),oAuthInfos:c.map(this.oAuthInfos,function(a){return a.toJson()}),credentials:c.map(this.credentials,function(a){return a.toJson()})})},initialize:function(b){if(b){a.isString(b)&&(b=f.fromJson(b));var d=b.serverInfos,e=b.oAuthInfos;b=b.credentials;if(d){var g=[];c.forEach(d,function(a){a.server&&a.tokenServiceUrl&&g.push(a.declaredClass?a:new t(a))});g.length&&this.registerServers(g)}if(e){var h=
[];c.forEach(e,function(a){a.appId&&h.push(a.declaredClass?a:new x(a))});h.length&&this.registerOAuthInfos(h)}b&&c.forEach(b,function(a){a.userId&&a.server&&a.token&&a.expires&&a.expires>(new Date).getTime()&&(a=a.declaredClass?a:new D(a),a.onTokenChange(),this.credentials.push(a))},this)}},findServerInfo:function(a){var b;a=this._sanitizeUrl(a);c.some(this.serverInfos,function(c){this._hasSameServerInstance(c.server,a)&&(b=c);return!!b},this);return b},findOAuthInfo:function(a){var b;a=this._sanitizeUrl(a);
c.some(this.oAuthInfos,function(c){this._hasSameServerInstance(c.portalUrl,a)&&(b=c);return!!b},this);return b},findCredential:function(a,b){var d,e;a=this._sanitizeUrl(a);e=this._isServerRsrc(a)?"server":"portal";b?c.some(this.credentials,function(c){this._hasSameServerInstance(c.server,a)&&b===c.userId&&c.scope===e&&(d=c);return!!d},this):c.some(this.credentials,function(b){this._hasSameServerInstance(b.server,a)&&-1!==this._getIdenticalSvcIdx(a,b)&&b.scope===e&&(d=b);return!!d},this);return d},
getCredential:function(b,c){var f,g,h=!0;q.isDefined(c)&&(a.isObject(c)?(f=!!c.token,g=c.error,h=!1!==c.prompt):f=c);b=this._sanitizeUrl(b);var k=new d(u._dfdCanceller),l=this._isAdminResource(b),n=f&&this._doPortalSignIn(b)?this._getEsriAuthCookie():null;if((f=f?this.findCredential(b):null)&&g&&498===g.code)f.destroy(),n&&n.token===c.token&&m("esri_auth",null,{expires:-1,path:"/",domain:document.domain});else if(n||f)return h=Error("You are currently signed in as: '"+(n&&n.email||f&&f.userId)+"'. You do not have access to this resource: "+
b),h.code="IdentityManagerBase.1",h.httpCode=g&&g.httpCode,h.messageCode=g?g.messageCode:null,h.subcode=g?g.subcode:null,h.details=g?g.details:null,h.log=!!e.isDebug,k.errback(h),k;if(g=this._findCredential(b,c))return k.callback(g),k;g=this.findServerInfo(b);if(g)!g.hasServer&&this._isServerRsrc(b)&&(g._restInfoDfd=this._getTokenSvcUrl(b,!0),g.hasServer=!0);else{n=this._getTokenSvcUrl(b);if(!n)return h=Error("Unknown resource - could not find token service endpoint."),h.code="IdentityManagerBase.2",
h.log=!!e.isDebug,k.errback(h),k;g=new t;g.server=this._getServerInstanceRoot(b);a.isString(n)?(g.tokenServiceUrl=n,g.hasPortal=!0):(g._restInfoDfd=n,g.hasServer=!0);this.registerServers([g])}h&&g.hasPortal&&void 0===g._selfReq&&!this._findOAuthInfo(b)&&(g._selfReq={owningTenant:c&&c.owningTenant,selfDfd:this._getPortalSelf(g.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),b)});return this._enqueue(b,g,c,k,l)},getResourceName:function(a){return this._isRESTService(a)?
a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(a)&&a.replace(this._gwUser,"$1")||this._gwItem.test(a)&&a.replace(this._gwItem,"$1")||this._gwGroup.test(a)&&a.replace(this._gwGroup,"$1")||""},generateToken:function(b,c,d){var f,h,k,l,m,n,q=this._rePortalTokenSvc.test(b.tokenServiceUrl),t=new g(window.location.href.toLowerCase()),C=this._getEsriAuthCookie(),u,A=!c;l=b.shortLivedTokenValidity;var H;c&&(H=p.id.tokenValidity||l||p.id.defaultTokenValidity,H>l&&
(H=l));d&&(f=d.isAdmin,h=d.serverUrl,k=d.token,n=d.ssl,b.customParameters=d.customParameters);f?l=b.adminTokenServiceUrl:(l=b.tokenServiceUrl,m=new g(l.toLowerCase()),C&&(u=(u=C.auth_tier)&&u.toLowerCase()),("web"===u||b.webTierAuth)&&d&&d.serverUrl&&!n&&"http"===t.scheme&&(r.hasSameOrigin(t.uri,l,!0)||"https"===m.scheme&&t.host===m.host&&"7080"===t.port&&"7443"===m.port)&&(l=l.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),A&&q&&(l=l.replace(/\/rest/i,"")));f=a.mixin({url:l,content:a.mixin({request:"getToken",
username:c&&c.username,password:c&&c.password,serverUrl:h,token:k,expiration:H,referer:f||q?window.location.host:null,client:f?"referer":null,f:"json"},b.customParameters),handleAs:"json",callbackParamName:A?"callback":void 0},d&&d.ioArgs);d={usePost:!A,disableIdentityLookup:!0,useProxy:this._useProxy(b,d)};q||(f.withCredentials=!1);q=w(f,d);q.addCallback(function(a){if(!a||!a.token)return a=Error("Unable to generate token"),a.code="IdentityManagerBase.3",a.log=!!e.isDebug,a;var d=b.server;z[d]||
(z[d]={});c&&(z[d][c.username]=c.password);a.validity=H;return a});q.addErrback(function(a){});return q},isBusy:function(){return!!this._busy},checkSignInStatus:function(a){var b=new d;this.getCredential(a,{prompt:!1}).then(function(a){return a.token?w({url:a.server+("portal"===a.scope?"/sharing/rest":"/rest/services"),content:{f:"json",token:a.token},callbackParamName:"callback"},{disableIdentityLookup:!0}).then(function(){return a}).otherwise(function(b){if(498===b.code)throw a.destroy(),b=Error("User is not signed in."),
b.code="IdentityManagerBase.6",b.log=!!e.isDebug,b;return a}):a}).then(function(a){b.resolve(a)}).otherwise(function(a){b.reject(a)});return b},setRedirectionHandler:function(a){this._redirectFunc=a},setProtocolErrorHandler:function(a){this._protocolFunc=a},signIn:function(){},oAuthSignIn:function(){},onCredentialCreate:function(){},onCredentialsDestroy:function(){},destroyCredentials:function(){if(this.credentials){var a=this.credentials.slice();c.forEach(a,function(a){a.destroy()})}this.onCredentialsDestroy()},
_getOAuthHash:function(){var a=window.location.hash;if(a){"#"===a.charAt(0)&&(a=a.substring(1));var a=k.queryToObject(a),b=!1;a.access_token&&a.expires_in&&a.state&&a.hasOwnProperty("username")?(a.state=f.fromJson(a.state),this._oAuthHash=a,b=!0):a.error&&a.error_description&&(console.log("IdentityManager OAuth Error: ",a.error," - ",a.error_description),"access_denied"===a.error&&(b=!0));b&&(!h("ie")||8<h("ie"))&&(window.location.hash="")}},_findCredential:function(a,b){var d=-1,e,f,g,h,k=b&&b.token;
e=b&&b.resource;var l=this._isServerRsrc(a)?"server":"portal",m=c.filter(this.credentials,function(b){return this._hasSameServerInstance(b.server,a)&&b.scope===l},this);a=e||a;if(m.length)if(1===m.length)if(e=m[0],g=(f=(h=this.findServerInfo(e.server))&&h.owningSystemUrl)&&this.findCredential(f,e.userId),d=this._getIdenticalSvcIdx(a,e),k)-1!==d&&(e.resources.splice(d,1),this._removeResource(a,g));else return-1===d&&e.resources.push(a),this._addResource(a,g),e;else{var n,p;c.some(m,function(b){p=this._getIdenticalSvcIdx(a,
b);return-1!==p?(n=b,g=(f=(h=this.findServerInfo(n.server))&&h.owningSystemUrl)&&this.findCredential(f,n.userId),d=p,!0):!1},this);if(k)n&&(n.resources.splice(d,1),this._removeResource(a,g));else if(n)return this._addResource(a,g),n}},_findOAuthInfo:function(a){var b=this.findOAuthInfo(a);b||c.some(this.oAuthInfos,function(c){this._isIdProvider(c.portalUrl,a)&&(b=c);return!!b},this);return b},_addResource:function(a,b){b&&-1===this._getIdenticalSvcIdx(a,b)&&b.resources.push(a)},_removeResource:function(a,
b){var c=-1;b&&(c=this._getIdenticalSvcIdx(a,b),-1<c&&b.resources.splice(c,1))},_useProxy:function(a,b){return b&&b.isAdmin&&!r.hasSameOrigin(a.adminTokenServiceUrl,window.location.href)||!this._isPortalDomain(a.tokenServiceUrl)&&10.1==a.currentVersion&&!r.hasSameOrigin(a.tokenServiceUrl,window.location.href)},_getOrigin:function(a){a=new g(a);return a.scheme+"://"+a.host+(q.isDefined(a.port)?":"+a.port:"")},_getServerInstanceRoot:function(a){var b=a.toLowerCase(),c=b.indexOf(this._agsRest);-1===
c&&this._isAdminResource(a)&&(c=b.indexOf("/admin"));-1===c&&(c=b.indexOf("/sharing"));-1===c&&"/"===b.substr(-1)&&(c=b.length-1);return-1<c?a.substring(0,c):a},_hasSameServerInstance:function(a,b){"/"===a.substr(-1)&&(a=a.slice(0,-1));a=a.toLowerCase();b=this._getServerInstanceRoot(b).toLowerCase();a=a.substr(a.indexOf(":"));b=b.substr(b.indexOf(":"));return a===b},_sanitizeUrl:function(b){b=r.fixUrl(a.trim(b));var c=(n.defaults.io.proxyUrl||"").toLowerCase(),d=c?b.toLowerCase().indexOf(c+"?"):-1;
-1!==d&&(b=b.substring(d+c.length+1));return r.urlToObject(b).path},_isRESTService:function(a){return-1<a.indexOf(this._agsRest)},_isAdminResource:function(a){return this._agsAdmin.test(a)||this._adminSvcs.test(a)},_isServerRsrc:function(a){return this._isRESTService(a)||this._isAdminResource(a)},_isIdenticalService:function(a,b){var c;if(this._isRESTService(a)&&this._isRESTService(b)){var d=this._getSuffix(a).toLowerCase(),e=this._getSuffix(b).toLowerCase();c=d===e;c||(c=/(.*)\/(MapServer|FeatureServer).*/ig,
c=d.replace(c,"$1")===e.replace(c,"$1"))}else this._isAdminResource(a)&&this._isAdminResource(b)?c=!0:this._isServerRsrc(a)||this._isServerRsrc(b)||!this._isPortalDomain(a)||(c=!0);return c},_isPortalDomain:function(b){b=b.toLowerCase();var d=(new g(b)).authority,e=this._portalConfig,f=-1!==d.indexOf(this._agolSuffix);!f&&e&&(f=this._hasSameServerInstance(this._getServerInstanceRoot(e.restBaseUrl),b));f||(!this._arcgisUrl&&(e=a.getObject("esri.arcgis.utils.arcgisUrl"))&&(this._arcgisUrl=(new g(e)).authority),
this._arcgisUrl&&(f=this._arcgisUrl.toLowerCase()===d));f||(f=c.some(this._portals,function(a){return this._hasSameServerInstance(a,b)},this));return f=f||this._agsPortal.test(b)},_isIdProvider:function(a,b){var d=-1,e=-1;c.forEach(this._gwDomains,function(c,f){-1===d&&c.regex.test(a)&&(d=f);-1===e&&c.regex.test(b)&&(e=f)});var f=!1;if(-1<d&&-1<e)if(0===d||4===d){if(0===e||4===e)f=!0}else if(1===d){if(1===e||2===e)f=!0}else 2===d?2===e&&(f=!0):3===d&&3===e&&(f=!0);if(!f){var g=this.findServerInfo(b),
h=g&&g.owningSystemUrl;h&&A(g)&&this._isPortalDomain(h)&&this._isIdProvider(a,h)&&(f=!0)}return f},_isPublic:function(a){a=this._sanitizeUrl(a);return c.some(this._publicUrls,function(b){return b.test(a)})},_getIdenticalSvcIdx:function(a,b){var d=-1;c.some(b.resources,function(b,c){return this._isIdenticalService(a,b)?(d=c,!0):!1},this);return d},_getSuffix:function(a){return a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")},_getTokenSvcUrl:function(a){var b,d;if((b=this._isRESTService(a))||
this._isAdminResource(a))return d=a.toLowerCase().indexOf(b?this._agsRest:"/admin/"),b=a.substring(0,d)+"/admin/generateToken",a=a.substring(0,d)+"/rest/info",d=w({url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}),d.adminUrl_=b,d;if(this._isPortalDomain(a)){var e="";c.some(this._gwDomains,function(b){b.regex.test(a)&&(e=b.tokenServiceUrl);return!!e});e||c.some(this._portals,function(b){this._hasSameServerInstance(b,a)&&(e=b+this._gwTokenUrl);return!!e},this);e||(d=a.toLowerCase().indexOf("/sharing"),
-1!==d&&(e=a.substring(0,d)+this._gwTokenUrl));e||(e=this._getOrigin(a)+this._gwTokenUrl);e&&(b=(new g(a)).port,/^http:\/\//i.test(a)&&"7080"===b&&(e=e.replace(/:7080/i,":7443")),e=e.replace(/http:/i,"https:"));return e}if(-1!==a.toLowerCase().indexOf("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"},_getPortalSelf:function(a,b){"https:"===window.location.protocol?a=a.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(b)&&(a=a.replace(/^https:/i,
"http:").replace(/:7443/i,":7080"));return w({url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback"},{crossOrigin:!1,disableIdentityLookup:!0})},_hasPortalSession:function(){return!!this._getEsriAuthCookie()},_getEsriAuthCookie:function(){var a=null;if(m.isSupported()){var b=this._getAllCookies("esri_auth"),c;for(c=0;c<b.length;c++){var d=f.fromJson(b[c]);if(d.portalApp){a=d;break}}}a&&(b=null,a.expires&&("number"===typeof a.expires?b=a.expires:"string"===typeof a.expires&&(b=Date.parse(a.expires)),
isNaN(b)&&(b=null),a.expires=b),b&&b<(new Date).getTime()&&(a=null));return a},_getAllCookies:function(a){var b=[],c=document.cookie.match(new RegExp("(?:^|; )"+l.escapeString(a)+"\x3d([^;]*)","g"));if(c)for(a=0;a<c.length;a++){var d=c[a],e=d.indexOf("\x3d");-1<e&&(d=d.substring(e+1),b.push(decodeURIComponent(d)))}return b},_doPortalSignIn:function(a){if(m.isSupported()){var b=this._getEsriAuthCookie(),c=this._portalConfig,d=window.location.href,e=this.findServerInfo(a);if(this.useSignInPage&&(c||
this._isPortalDomain(d)||b)&&(e?e.hasPortal||e.owningSystemUrl&&this._isPortalDomain(e.owningSystemUrl):this._isPortalDomain(a))&&(this._isIdProvider(d,a)||c&&(this._hasSameServerInstance(this._getServerInstanceRoot(c.restBaseUrl),a)||this._isIdProvider(c.restBaseUrl,a))||r.hasSameOrigin(d,a,!0)))return!0}return!1},_checkProtocol:function(b,c,d,f){var g=!0;f=f?c.adminTokenServiceUrl:c.tokenServiceUrl;0!==a.trim(f).toLowerCase().indexOf("https:")||0===window.location.href.toLowerCase().indexOf("https:")||
n.defaults.io.useCors&&(r.canUseXhr(f)||r.canUseXhr(r.getProxyUrl(!0).path))||(g=this._protocolFunc?!!this._protocolFunc({resourceUrl:b,serverInfo:c}):!1,g||(b=Error("Aborted the Sign-In process to avoid sending password over insecure connection."),b.code="IdentityManagerBase.4",b.log=!!e.isDebug,console.log(b.message),d(b)));return g},_enqueue:function(a,b,c,e,f,g){e||(e=new d(u._dfdCanceller));e.resUrl_=a;e.sinfo_=b;e.options_=c;e.admin_=f;e.refresh_=g;this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(a),
this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(e)):this._xoReqs.push(e):this._doSignIn(e);return e},_doSignIn:function(b){this._busy=b;var d=this,f=function(a){var e=b.options_&&b.options_.resource,f=b.resUrl_,g=b.refresh_,h=!1;-1===c.indexOf(d.credentials,a)&&(g&&-1!==c.indexOf(d.credentials,g)?(g.userId=a.userId,g.token=a.token,g.expires=a.expires,g.validity=a.validity,g.ssl=a.ssl,g.creationTime=a.creationTime,h=!0,a=g):d.credentials.push(a));
a.resources||(a.resources=[]);a.resources.push(e||f);a.scope=d._isServerRsrc(f)?"server":"portal";a.onTokenChange();var e=d._soReqs,k={};d._soReqs=[];c.forEach(e,function(b){if(!this._isIdenticalService(f,b.resUrl_)){var c=this._getSuffix(b.resUrl_);k[c]||(k[c]=!0,a.resources.push(b.resUrl_))}},d);b.callback(a);c.forEach(e,function(b){this._hasSameServerInstance(this._getServerInstanceRoot(f),b.resUrl_)?b.callback(a):this._soReqs.push(b)},d);d._busy=b.resUrl_=b.sinfo_=b.refresh_=null;if(!h)d.onCredentialCreate({credential:a});
d._soReqs.length?d._doSignIn(d._soReqs.shift()):d._xoReqs.length&&d._doSignIn(d._xoReqs.shift())},g=function(a){b.errback(a);d._busy=b.resUrl_=b.sinfo_=b.refresh_=null;d._soReqs.length?d._doSignIn(d._soReqs.shift()):d._xoReqs.length&&d._doSignIn(d._xoReqs.shift())},h=function(a,c,h,k){var l=b.sinfo_,m=!b.options_||!1!==b.options_.prompt,n=l.hasPortal&&d._findOAuthInfo(b.resUrl_);d._doPortalSignIn(b.resUrl_)?(a=d._getEsriAuthCookie(),n=d._portalConfig,a?f(new D({userId:a.email,server:l.server,token:a.token,
expires:a.expires})):m?(m="",a=window.location.href,m=d.signInPage?d.signInPage:n?n.baseUrl+n.signin:d._isIdProvider(a,b.resUrl_)?d._getOrigin(a)+"/home/signin.html":l.tokenServiceUrl.replace(d._rePortalTokenSvc,"")+"/home/signin.html",m=m.replace(/http:/i,"https:"),n&&!1===n.useSSL&&(m=m.replace(/https:/i,"http:")),0===a.toLowerCase().replace("https","http").indexOf(m.toLowerCase().replace("https","http"))?(l=Error("Cannot redirect to Sign-In page from within Sign-In page. URL of the resource that triggered this workflow: "+
b.resUrl_),l.code="IdentityManagerBase.5",l.log=!!e.isDebug,g(l)):d._redirectFunc?d._redirectFunc({signInPage:m,returnUrlParamName:"returnUrl",returnUrl:a,resourceUrl:b.resUrl_,serverInfo:l}):window.location=m+"?returnUrl\x3d"+window.escape(a)):(l=Error("User is not signed in."),l.code="IdentityManagerBase.6",l.log=!!e.isDebug,g(l))):a?f(new D({userId:a,server:l.server,token:h,expires:q.isDefined(k)?Number(k):null,ssl:!!c})):n?(a=n._oAuthCred,a||(c=new y(n,window.localStorage),h=new y(n,window.sessionStorage),
c.isValid()&&h.isValid()?c.expires>h.expires?(a=c,h.destroy()):(a=h,c.destroy()):a=c.isValid()?c:h,n._oAuthCred=a),a.isValid()?f(new D({userId:a.userId,server:l.server,token:a.token,expires:a.expires,ssl:a.ssl,_oAuthCred:a})):d._oAuthHash&&d._oAuthHash.state.portalUrl===n.portalUrl?(m=d._oAuthHash,l=new D({userId:m.username,server:l.server,token:m.access_token,expires:(new Date).getTime()+1E3*Number(m.expires_in),ssl:"true"===m.ssl,oAuthState:m.state,_oAuthCred:a}),a.storage=m.persist?window.localStorage:
window.sessionStorage,a.token=l.token,a.expires=l.expires,a.userId=l.userId,a.ssl=l.ssl,a.save(),d._oAuthHash=null,f(l)):m?b._pendingDfd=d.oAuthSignIn(b.resUrl_,l,n,b.options_).addCallbacks(f,g):(l=Error("User is not signed in."),l.code="IdentityManagerBase.6",l.log=!!e.isDebug,g(l))):m?d._checkProtocol(b.resUrl_,l,g,b.admin_)&&(m=b.options_,b.admin_&&(m=m||{},m.isAdmin=!0),b._pendingDfd=d.signIn(b.resUrl_,l,m).addCallbacks(f,g)):(l=Error("User is not signed in."),l.code="IdentityManagerBase.6",l.log=
!!e.isDebug,g(l))},k=function(){var a=b.sinfo_,e=a.owningSystemUrl,h=b.options_,k,l,m,n;h&&(k=h.token,l=h.error,m=h.prompt);n=d._findCredential(e,{token:k,resource:b.resUrl_});!n&&A(a)&&c.some(d.credentials,function(a){this._isIdProvider(e,a.server)&&(n=a);return!!n},d);n?(h=d.findCredential(b.resUrl_,n.userId))?f(h):B(a,d._legacyFed)?(h=n.toJson(),h.server=a.server,h.resources=null,f(new D(h))):(b._pendingDfd=d.generateToken(d.findServerInfo(n.server),null,{serverUrl:b.resUrl_,token:n.token,ssl:n.ssl})).addCallbacks(function(c){f(new D({userId:n.userId,
server:a.server,token:c.token,expires:q.isDefined(c.expires)?Number(c.expires):null,ssl:!!c.ssl,isAdmin:b.admin_,validity:c.validity}))},g):(d._busy=null,k&&(b.options_.token=null),(b._pendingDfd=d.getCredential(e.replace(/\/?$/,"/sharing"),{resource:b.resUrl_,owningTenant:a.owningTenant,token:k,error:l,prompt:m})).addCallbacks(function(a){d._enqueue(b.resUrl_,b.sinfo_,b.options_,b,b.admin_)},function(a){g(a)}))},l=b.sinfo_.owningSystemUrl,m=this._isServerRsrc(b.resUrl_),n=b.sinfo_._restInfoDfd;n?
n.addCallbacks(function(c){var e=b.sinfo_;e.adminTokenServiceUrl=e._restInfoDfd.adminUrl_;e._restInfoDfd=null;e.tokenServiceUrl=a.getObject("authInfo.tokenServicesUrl",!1,c)||a.getObject("authInfo.tokenServiceUrl",!1,c)||a.getObject("tokenServiceUrl",!1,c);e.shortLivedTokenValidity=a.getObject("authInfo.shortLivedTokenValidity",!1,c);e.currentVersion=c.currentVersion;e.owningTenant=c.owningTenant;(c=e.owningSystemUrl=c.owningSystemUrl)&&d._portals.push(c);m&&c?k():h()},function(){b.sinfo_._restInfoDfd=
null;var a=Error("Unknown resource - could not find token service endpoint.");a.code="IdentityManagerBase.2";a.log=!!e.isDebug;g(a)}):m&&l?k():b.sinfo_._selfReq?b.sinfo_._selfReq.selfDfd.then(function(a){var c={},e,f,g,h;a&&(e=a.user&&a.user.username,c.username=e,c.allSSL=a.allSSL,f=a.supportsOAuth,g=a.currentVersion,"multitenant"===a.portalMode&&(h=a.customBaseUrl));b.sinfo_.webTierAuth=!!e;return e&&d.normalizeWebTierAuth?d.generateToken(b.sinfo_,null,{ssl:c.allSSL}).addBoth(function(a){c.portalToken=
a&&a.token;c.tokenExpiration=a&&a.expires;return c}):!e&&f&&4.4<=parseFloat(g)&&!d._doPortalSignIn(b.resUrl_)?d._generateOAuthInfo({portalUrl:b.sinfo_.server,customBaseUrl:h,owningTenant:b.sinfo_._selfReq.owningTenant}).always(function(){return c}):c}).always(function(a){b.sinfo_._selfReq=null;a?h(a.username,a.allSSL,a.portalToken,a.tokenExpiration):h()}):h()},_generateOAuthInfo:function(a){var b=this,c,e=a.portalUrl,f=a.customBaseUrl,g=a.owningTenant;if(a=!this.defaultOAuthInfo&&this._createDefaultOAuthInfo&&
!this._hasTestedIfAppIsOnPortal){c=window.location.href;var h=c.indexOf("?");-1<h&&(c=c.slice(0,h));h=c.search(/\/(apps|home)\//);c=-1<h?c.slice(0,h):null}a&&c?(this._hasTestedIfAppIsOnPortal=!0,a=w({url:c+"/sharing/rest",content:{f:"json"},handleAs:"json"}).then(function(){b.defaultOAuthInfo=new x({appId:"arcgisonline",popup:!0,popupCallbackUrl:c+"/home/oauth-callback.html"})})):(a=new d,a.resolve(),a=a.promise);return a.then(function(){if(b.defaultOAuthInfo)return e=e.replace(/^http:/i,"https:"),
w({url:e+"/sharing/rest/oauth2/validateRedirectUri",content:{accountId:g,client_id:b.defaultOAuthInfo.appId,redirect_uri:r.getAbsoluteUrl(b.defaultOAuthInfo.popupCallbackUrl),f:"json"},handleAs:"json",callbackParamName:"callback"}).then(function(a){if(a.valid){var c=b.defaultOAuthInfo.clone();c.portalUrl=a.urlKey&&f?"https://"+a.urlKey+"."+f:e;b.oAuthInfos.push(c)}})})}});D=b(v,{declaredClass:"esri.Credential",tokenRefreshBuffer:2,constructor:function(b){a.mixin(this,b);this.resources=this.resources||
[];q.isDefined(this.creationTime)||(this.creationTime=(new Date).getTime())},_oAuthCred:null,refreshToken:function(){var a=this,b=this.resources&&this.resources[0],d=p.id.findServerInfo(this.server),e=d&&d.owningSystemUrl,f=!!e&&"server"===this.scope,g=f&&B(d,p.id._legacyFed),h=f&&p.id.findServerInfo(e),k,l=(k=d.webTierAuth)&&p.id.normalizeWebTierAuth,m=z[this.server],m=m&&m[this.userId],n={username:this.userId,password:m},t;if(!k||l)if(f&&!h&&c.some(p.id.serverInfos,function(a){p.id._isIdProvider(e,
a.server)&&(h=a);return!!h}),k=h&&p.id.findCredential(h.server,this.userId),!f||k)if(g)k.refreshToken();else{if(f)t={serverUrl:b,token:k&&k.token,ssl:k&&k.ssl};else if(l)n=null,t={ssl:this.ssl};else if(m)this.isAdmin&&(t={isAdmin:!0});else{var r;b&&(b=p.id._sanitizeUrl(b),this._enqueued=1,r=p.id._enqueue(b,d,null,null,this.isAdmin,this),r.addCallback(function(){a._enqueued=0;a.refreshServerTokens()}).addErrback(function(){a._enqueued=0}));return r}return p.id.generateToken(f?h:d,f?null:n,t).addCallback(function(b){a.token=
b.token;a.expires=q.isDefined(b.expires)?Number(b.expires):null;a.creationTime=(new Date).getTime();a.validity=b.validity;a.onTokenChange();a.refreshServerTokens()}).addErrback(function(){})}},refreshServerTokens:function(){"portal"===this.scope&&c.forEach(p.id.credentials,function(a){var b=p.id.findServerInfo(a.server),c=b&&b.owningSystemUrl;a!==this&&a.userId===this.userId&&c&&"server"===a.scope&&(p.id._hasSameServerInstance(this.server,c)||p.id._isIdProvider(c,this.server))&&(B(b,p.id._legacyFed)?
(a.token=this.token,a.expires=this.expires,a.creationTime=this.creationTime,a.validity=this.validity,a.onTokenChange()):a.refreshToken())},this)},onTokenChange:function(a){clearTimeout(this._refreshTimer);var b=this.server&&p.id.findServerInfo(this.server),c=(b=b&&b.owningSystemUrl)&&p.id.findServerInfo(b);!1!==a&&(!b||"portal"===this.scope||c&&c.webTierAuth&&!p.id.normalizeWebTierAuth)&&(q.isDefined(this.expires)||q.isDefined(this.validity))&&this._startRefreshTimer()},onDestroy:function(){},destroy:function(){this.userId=
this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null;this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);var a=c.indexOf(p.id.credentials,this);-1<a&&p.id.credentials.splice(a,1);this.onTokenChange();this.onDestroy()},toJson:function(){return this._toJson()},_toJson:function(){var a=q.fixJson({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,
scope:this.scope}),b=this.resources;b&&0<b.length&&(a.resources=b.slice());return a},_startRefreshTimer:function(){clearTimeout(this._refreshTimer);var b=6E4*this.tokenRefreshBuffer,c=(this.validity?this.creationTime+6E4*this.validity:this.expires)-(new Date).getTime();0>c&&(c=0);this._refreshTimer=setTimeout(a.hitch(this,this.refreshToken),c>b?c-b:c)}});F.Credential=D;h("extend-esri")&&(p.IdentityManagerBase=F);return F})},"dojo/cookie":function(){define(["./_base/kernel","./regexp"],function(b,
e){b.cookie=function(a,b,d){var c=document.cookie,g;if(1==arguments.length)g=(g=c.match(new RegExp("(?:^|; )"+e.escapeString(a)+"\x3d([^;]*)")))?decodeURIComponent(g[1]):void 0;else{d=d||{};c=d.expires;if("number"==typeof c){var h=new Date;h.setTime(h.getTime()+864E5*c);c=d.expires=h}c&&c.toUTCString&&(d.expires=c.toUTCString());b=encodeURIComponent(b);var c=a+"\x3d"+b,m;for(m in d)c+="; "+m,h=d[m],!0!==h&&(c+="\x3d"+h);document.cookie=c}return g};b.cookie.isSupported=function(){"cookieEnabled"in
navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};return b.cookie})},"esri/ServerInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","./kernel","./lang"],function(b,e,a,c,d){b=b(null,{declaredClass:"esri.ServerInfo",constructor:function(a){e.mixin(this,a)},toJson:function(){return d.fixJson({server:this.server,
tokenServiceUrl:this.tokenServiceUrl,adminTokenServiceUrl:this.adminTokenServiceUrl,shortLivedTokenValidity:this.shortLivedTokenValidity,owningSystemUrl:this.owningSystemUrl,owningTenant:this.owningTenant,currentVersion:this.currentVersion,hasPortal:this.hasPortal,hasServer:this.hasServer,webTierAuth:this.webTierAuth})}});a("extend-esri")&&(c.ServerInfo=b);return b})},"esri/OAuthCredential":function(){define(["./kernel","dojo/_base/declare","dojo/has","dojo/json"],function(b,e,a,c){e=e(null,{declaredClass:"esri.OAuthCredential",
oAuthInfo:null,storage:null,expires:null,ssl:null,token:null,userId:null,constructor:function(a,b){this.oAuthInfo=a;this.storage=b;this._init()},isValid:function(){var a=!1;if(this.oAuthInfo&&this.token&&this.userId){var b=(new Date).getTime();this.expires>b&&(this.expires-b)/1E3>60*this.oAuthInfo.minTimeUntilExpiration&&(a=!0)}return a},save:function(){if(this.storage){var a=this._load(),b=this.oAuthInfo;if(b&&b.authNamespace&&b.portalUrl){var e=a[b.authNamespace];e||(e=a[b.authNamespace]={});e[b.portalUrl]=
{expires:this.expires,ssl:this.ssl,token:this.token,userId:this.userId};try{this.storage.setItem("esriJSAPIOAuth",c.stringify(a))}catch(h){console.log(h)}}}},destroy:function(){var a=this._load(),b=this.oAuthInfo;if(b&&b.authNamespace&&b.portalUrl&&this.storage){var e=a[b.authNamespace];if(e){delete e[b.portalUrl];try{this.storage.setItem("esriJSAPIOAuth",c.stringify(a))}catch(h){console.log(h)}}}b&&(this.oAuthInfo=b._oAuthCred=null)},_init:function(){var a=this._load(),b=this.oAuthInfo;b&&b.authNamespace&&
b.portalUrl&&(a=a[b.authNamespace])&&(a=a[b.portalUrl])&&(this.expires=a.expires,this.ssl=a.ssl,this.token=a.token,this.userId=a.userId)},_load:function(){var a={};if(this.storage){var b=this.storage.getItem("esriJSAPIOAuth");if(b)try{a=c.parse(b)}catch(g){console.log(g)}}return a}});a("extend-esri")&&(b.OAuthCredential=e);return e})},"esri/arcgis/OAuthInfo":function(){define(["../kernel","../lang","dojo/_base/declare","dojo/_base/lang","dojo/has"],function(b,e,a,c,d){var f=a(null,{declaredClass:"esri.arcgis.OAuthInfo",
constructor:function(a){c.mixin(this,{expiration:20160,minTimeUntilExpiration:30,portalUrl:"https://www.arcgis.com",authNamespace:"/",forceLogin:!1,popup:!1,popupCallbackUrl:"oauth-callback.html",popupWindowFeatures:"height\x3d490,width\x3d800,resizable,scrollbars,status"},a)},_oAuthCred:null,toJson:function(){return e.fixJson({appId:this.appId,expiration:this.expiration,locale:this.locale,minTimeUntilExpiration:this.minTimeUntilExpiration,portalUrl:this.portalUrl,authNamespace:this.authNamespace,
forceLogin:this.forceLogin,popup:this.popup,popupCallbackUrl:this.popupCallbackUrl,popupWindowFeatures:this.popupWindowFeatures})},clone:function(){return new f(this.toJson())}});d("extend-esri")&&c.setObject("arcgis.OAuthInfo",f,b);return f})},"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html ../a11yclick".split(" "),function(b,e,a,c,d,f,g,h,m,k){c("dijit-legacy-requires")&&
g(0,function(){b(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});g=e("dijit.form.Button"+(c("dojo-bidi")?"_NoBidi":""),[h,m],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:k,_setValueAttr:"valueNode",_setNameAttr:function(a){this.valueNode&&this.valueNode.setAttribute("name",a)},postCreate:function(){this.inherited(arguments);this._setLabelFromContainer()},_setLabelFromContainer:function(){this.containerNode&&
!this.label&&(this.label=f.trim(this.containerNode.innerHTML),this.onLabelSet())},_setShowLabelAttr:function(b){this.containerNode&&a.toggle(this.containerNode,"dijitDisplayNone",!b);this._set("showLabel",b)},setLabel:function(a){d.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},onLabelSet:function(){this.inherited(arguments);this.showLabel||"title"in this.params||(this.titleNode.title=f.trim(this.containerNode.innerText||this.containerNode.textContent||
""))}});c("dojo-bidi")&&(g=e("dijit.form.Button",g,{onLabelSet:function(){this.inherited(arguments);this.titleNode.title&&this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this._setLabelAttr(this.label))}}));return g})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),function(b,
e,a,c,d,f,g,h){e("dijit-legacy-requires")&&c(0,function(){require(["dijit/form/_FormValueWidget"])});return b("dijit.form._FormWidget",[d,g,f,h],{setDisabled:function(b){a.deprecated("setDisabled("+b+") is deprecated. Use set('disabled',"+b+") instead.","","2.0");this.set("disabled",b)},setValue:function(b){a.deprecated("dijit.form._FormWidget:setValue("+b+") is deprecated.  Use set('value',"+b+") instead.","","2.0");this.set("value",b)},getValue:function(){a.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.",
"","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name&&!e("msapp")?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),function(b,e,a,c,d,f,g,h,m,k){return e("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text",
"aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(c){this._set("disabled",c);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?a.set(this.focusNode,"disabled",c):this.focusNode.setAttribute("aria-disabled",c?"true":"false");this.valueNode&&a.set(this.valueNode,"disabled",c);c?(this._set("hovering",!1),this._set("active",!1),c="tabIndex"in this.attributeMap?
this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",b.forEach(d.isArray(c)?c:[c],function(a){a=this[a];h("webkit")||k.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(a){if("mouse"==a&&this.isFocusable())var b=this.own(g(this.focusNode,"focus",function(){e.remove();b.remove()}))[0],c=h("pointer-events")?"pointerup":h("MSPointer")?"MSPointerUp":h("touch-events")?
"touchend, mouseup":"mouseup",e=this.own(g(this.ownerDocumentBody,c,d.hitch(this,function(a){e.remove();b.remove();this.focused&&("touchend"==a.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){m.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=c.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(l){}},compare:function(a,
b){return"number"==typeof a&&"number"==typeof b?isNaN(a)&&isNaN(b)?0:a-b:a>b?1:a<b?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,b){void 0!=this._lastValueReported||null!==b&&this._onChangeActive||(this._resetValue=this._lastValueReported=a);this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||0!=this.compare(a,this._lastValueReported);(this.intermediateChanges||b||void 0===b)&&this._pendingOnChange&&(this._lastValueReported=a,this._pendingOnChange=
!1,this._onChangeActive&&(this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(a)})))},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/has","../registry"],function(b,e,a,c){var d=
b("dijit.form._ButtonMixin"+(a("dojo-bidi")?"_NoBidi":""),null,{label:"",type:"button",__onClick:function(a){a.stopPropagation();a.preventDefault();this.disabled||this.valueNode.click(a);return!1},_onClick:function(a){if(this.disabled)return a.stopPropagation(),a.preventDefault(),!1;!1===this.onClick(a)&&a.preventDefault();var b=a.defaultPrevented;if(!b&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var d=this.domNode;d.parentNode;d=d.parentNode){var e=c.byNode(d);if(e&&"function"==
typeof e._onSubmit){e._onSubmit(a);a.preventDefault();b=!0;break}}return!b},postCreate:function(){this.inherited(arguments);e.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(a){this._set("label",a);(this.containerNode||this.focusNode).innerHTML=a;this.onLabelSet()},onLabelSet:function(){}});a("dojo-bidi")&&(d=b("dijit.form._ButtonMixin",d,{onLabelSet:function(){this.inherited(arguments);this.applyTextDir(this.containerNode||this.focusNode)}}));return d})},"dijit/form/Form":function(){define("dojo/_base/declare dojo/dom-attr dojo/_base/kernel dojo/sniff ../_Widget ../_TemplatedMixin ./_FormMixin ../layout/_ContentPaneResizeMixin".split(" "),
function(b,e,a,c,d,f,g,h){return b("dijit.form.Form",[d,f,g,h],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"\x3cform data-dojo-attach-point\x3d'containerNode' data-dojo-attach-event\x3d'onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}\x3e\x3c/form\x3e",postMixInProperties:function(){this.nameAttrSetting=this.name?"name\x3d'"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){e.set(this.domNode,
"encType",a);c("ie")&&(this.domNode.encoding=a);this._set("encType",a)},reset:function(a){var b={returnValue:!0,preventDefault:function(){this.returnValue=!1},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};!1!==this.onReset(b)&&b.returnValue&&this.inherited(arguments,[])},onReset:function(){return!0},_onReset:function(a){this.reset(a);a.stopPropagation();a.preventDefault();return!1},_onSubmit:function(b){var c=this.constructor.prototype;if(this.execute!=
c.execute||this.onExecute!=c.onExecute)a.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0"),this.onExecute(),this.execute(this.getValues());!1===this.onSubmit(b)&&(b.stopPropagation(),b.preventDefault())},onSubmit:function(){return this.isValid()},submit:function(){!1!==this.onSubmit()&&this.containerNode.submit()}})})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),
function(b,e,a,c,d,f,g){var h=b("dijit.form.ValidationTextBox",d,{templateString:g,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(a,b){b!=h.prototype[a]&&(e.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+a+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",b))},_setRegExpGenAttr:function(a){this._deprecateRegExp("regExpGen",
a);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(a){this._deprecateRegExp("regExp",a)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(a,b){return(new RegExp("^(?:"+this._computeRegexp(b)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||void 0!==this.parse(a,b))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,
this.get("constraints"))},_isEmpty:function(a){return(this.trim?/^\s*$/:/^$/).test(a)},getErrorMessage:function(){var a="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:this.invalidMessage?this.invalidMessage:this.promptMessage,b="$_unset_$"==this.missingMessage?this.messages.missingMessage:this.missingMessage?this.missingMessage:a;return this.required&&this._isEmpty(this.textbox.value)?b:a},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(a){var b=
"",c=this.disabled||this.isValid(a);c&&(this._maskValidSubsetError=!0);var d=this._isEmpty(this.textbox.value),e=!c&&a&&this._isValidSubset();this._set("state",c?"":((!this._hasBeenBlurred||a)&&d||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&a)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=a&&e,b=this.getErrorMessage(a)):"Incomplete"==this.state?(b=this.getPromptMessage(a),this._maskValidSubsetError=
!this._hasBeenBlurred||a):d&&(b=this.getPromptMessage(a));this.set("message",b);return c},displayMessage:function(a){a&&this.focused?f.show(a,this.domNode,this.tooltipPosition,!this.isLeftToRight()):f.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(b){this.constraints=a.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(a){!a.locale&&
this.lang&&(a.locale=this.lang);this._set("constraints",a);this._refreshState()},_setPatternAttr:function(a){this._set("pattern",a);this._refreshState()},_computeRegexp:function(a){var b=this.pattern;"function"==typeof b&&(b=b.call(this,a));if(b!=this._lastRegExp){var c="";this._lastRegExp=b;".*"!=b&&b.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=a;break;case ")":c+="|$)";break;default:c+=
"(?:"+a+"|$)"}});try{"".search(c)}catch(p){c=this.pattern,console.warn("RegExp error in "+this.declaredClass+": "+this.pattern)}this._partialre="^(?:"+c+")$"}return b},postMixInProperties:function(){this.inherited(arguments);this.messages=c.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);this.focusNode.setAttribute("aria-required",
a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},destroy:function(){f.hide(this.domNode);this.inherited(arguments)}});return h})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){h=b("dijit.form.TextBox"+(g("dojo-bidi")?"_NoBidi":""),[h,m],{templateString:k,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',_buttonInputDisabled:g("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||
("hidden"==a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>g("ie")&&this.defer(function(){try{var b=a.getComputedStyle(this.domNode);if(b){var c=b.fontFamily;if(c){var d=this.domNode.getElementsByTagName("INPUT");if(d)for(b=0;b<d.length;b++)d[b].style.fontFamily=c}}}catch(t){}})},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);this._phspan||
(this._attachPoints.push("_phspan"),this._phspan=e.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after"),this.own(f(this._phspan,"mousedown",function(a){a.preventDefault()}),f(this._phspan,"touchend, pointerup, MSPointerUp",d.hitch(this,function(){this.focus()}))));this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(a));this._updatePlaceHolder()},_onInput:function(a){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&
(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},_setValueAttr:function(a,b,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){c.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){c.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",
a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),this._updatePlaceHolder(),g("mozilla")&&this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(a){this.disabled||this.readOnly||(this.inherited(arguments),this._updatePlaceHolder())}});9>g("ie")&&(h.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},l._setSelectionRange=m._setSelectionRange=function(a,
b,c){a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",b),a.moveEnd("character",c-b),a.select())});g("dojo-bidi")&&(h=b("dijit.form.TextBox",h,{_setPlaceHolderAttr:function(a){this.inherited(arguments);this.applyTextDir(this._phspan)}}));return h})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(b,e,a,c){return b("dijit.form._FormValueWidget",[a,c],{_layoutHackIE7:function(){if(7==
e("ie"))for(var a=this.domNode,b=a.parentNode,c=a.firstChild||a,h=c.style.filter,m=this;b&&0==b.clientHeight;)(function(){var a=m.connect(b,"onscroll",function(){m.disconnect(a);c.style.filter=(new Date).getMilliseconds();m.defer(function(){c.style.filter=h})})})(),b=b.parentNode}})})},"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on ./_FormWidgetMixin".split(" "),function(b,e,a,c,d,f){return b("dijit.form._FormValueMixin",f,{readOnly:!1,
_setReadOnlyAttr:function(a){e.set(this.focusNode,"readOnly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(a,b){this._handleOnChange(a,b)},_handleOnChange:function(a,b){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)}})})},
"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),function(b,e,a,c,d,f,g,h){var m=e("dijit.form._TextBoxMixin"+(c("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,b,c){var d;void 0!==a&&(d=this.filter(a),
"string"!=typeof c&&(c=null===d||"number"==typeof d&&isNaN(d)?"":this.filter(this.format(d,this.constraints)),0!=this.compare(d,this.filter(this.parse(c,this.constraints)))&&(c=null)));null==c||"number"==typeof c&&isNaN(c)||this.textbox.value==c||(this.textbox.value=c,this._set("displayedValue",this.get("displayedValue")));this.inherited(arguments,[d,b])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=
typeof a&&(a=String(a));this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},onInput:function(){},_onInput:function(a){this._lastInputEventValue=this.textbox.value;this._processInput(this._lastInputProducingEvent||a);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),
!1)},_processInput:function(){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(g(this.textbox,"keydown, keypress, paste, cut, compositionend",f.hitch(this,function(a){var b;if("keydown"==a.type&&229!=a.keyCode){b=a.keyCode;switch(b){case d.SHIFT:case d.ALT:case d.CTRL:case d.META:case d.CAPS_LOCK:case d.NUM_LOCK:case d.SCROLL_LOCK:return}if(!a.ctrlKey&&!a.metaKey&&
!a.altKey){switch(b){case d.NUMPAD_0:case d.NUMPAD_1:case d.NUMPAD_2:case d.NUMPAD_3:case d.NUMPAD_4:case d.NUMPAD_5:case d.NUMPAD_6:case d.NUMPAD_7:case d.NUMPAD_8:case d.NUMPAD_9:case d.NUMPAD_MULTIPLY:case d.NUMPAD_PLUS:case d.NUMPAD_ENTER:case d.NUMPAD_MINUS:case d.NUMPAD_PERIOD:case d.NUMPAD_DIVIDE:return}if(65<=b&&90>=b||48<=b&&57>=b||b==d.SPACE)return;b=!1;for(var e in d)if(d[e]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&&
90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==d.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}var h={faux:!0},k;for(k in a)/^(layer[XY]|returnValue|keyLocation)$/.test(k)||(e=a[k],"function"!=typeof e&&"undefined"!=typeof e&&(h[k]=e));f.mixin(h,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){h._wasConsumed=!0;a.preventDefault()},
stopPropagation:function(){a.stopPropagation()}});this._lastInputProducingEvent=h;!1===this.onInput(h)&&(h.preventDefault(),h.stopPropagation());if(!h._wasConsumed&&9>=c("ie"))switch(a.keyCode){case d.TAB:case d.ESCAPE:case d.DOWN_ARROW:case d.UP_ARROW:case d.LEFT_ARROW:case d.RIGHT_ARROW:break;default:a.keyCode==d.ENTER&&"textarea"!=this.textbox.tagName.toLowerCase()||this.defer(function(){this.textbox.value!==this._lastInputEventValue&&g.emit(this.textbox,"input",{bubbles:!0})})}})),g(this.textbox,
"input",f.hitch(this,"_onInput")),g(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=f.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||
(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){this.disabled||this.readOnly||(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=g.once(this.domNode,"mouseup, touchend",f.hitch(this,function(a){this._isTextSelected()||m.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=
null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});c("dojo-bidi")&&(m=e("dijit.form._TextBoxMixin",m,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));m._setSelectionRange=h._setSelectionRange=function(a,b,
c){a.setSelectionRange&&a.setSelectionRange(b,c)};m.selectInputText=h.selectInputText=function(b,c,d){b=a.byId(b);isNaN(c)&&(c=0);isNaN(d)&&(d=b.value?b.value.length:0);try{b.focus(),m._setSelectionRange(b,c,d)}catch(n){}};return m})},"dijit/Tooltip":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/fx dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff ./_base/manager ./place ./_Widget ./_TemplatedMixin ./BackgroundIframe dojo/text!./templates/Tooltip.html ./main".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w){function v(){}var y=e("dijit._MasterTooltip",[q,t],{duration:p.defaultDuration,templateString:u,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new r(this.domNode);this.fadeIn=a.fadeIn({node:this.domNode,duration:this.duration,onEnd:h.hitch(this,"_onShow")});this.fadeOut=a.fadeOut({node:this.domNode,duration:this.duration,onEnd:h.hitch(this,"_onHide")})},show:function(a,b,c,d,e,f,k){if(!this.aroundNode||this.aroundNode!==
b||this.containerNode.innerHTML!=a)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;e&&this.set("textDir",e);this.containerNode.align=d?"right":"left";var l=n.around(this.domNode,b,c&&c.length?c:x.defaultPosition,!d,h.hitch(this,"orient")),m=l.aroundNodePos;"M"==l.corner.charAt(0)&&"M"==l.aroundCorner.charAt(0)?(this.connectorNode.style.top=m.y+(m.h-this.connectorNode.offsetHeight>>1)-l.y+"px",this.connectorNode.style.left=""):"M"==l.corner.charAt(1)&&
"M"==l.aroundCorner.charAt(1)?this.connectorNode.style.left=m.x+(m.w-this.connectorNode.offsetWidth>>1)-l.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");g.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b;this.onMouseEnter=f||v;this.onMouseLeave=k||v}},orient:function(a,b,c,d,e){this.connectorNode.style.top="";var g=d.h;d=d.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove",
"BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[b+"-"+c];this.domNode.style.width="auto";var h=f.position(this.domNode);if(l("ie")||l("trident"))h.w+=2;f.setMarginBox(this.domNode,{w:Math.min(Math.max(d,1),h.w)});"B"==c.charAt(0)&&"B"==b.charAt(0)?(a=f.position(a),b=this.connectorNode.offsetHeight,
a.h>g?(this.connectorNode.style.top=g-(e.h+b>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(e.h/2-b/2,0),a.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,h.w-d)},_onShow:function(){l("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=
null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=v},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});l("dojo-bidi")&&y.extend({_setAutoTextDir:function(a){this.applyTextDir(a);b.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});w.showTooltip=
function(a,c,d,e,f,g,h){d&&(d=b.map(d,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));x._masterTT||(w._masterTT=x._masterTT=new y);return x._masterTT.show(a,c,d,e,f,g,h)};w.hideTooltip=function(a){return x._masterTT&&x._masterTT.hide(a)};var x=e("dijit.Tooltip",q,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(a){b.forEach(this._connections||[],function(a){b.forEach(a,function(a){a.remove()})},this);this._connectIds=
b.filter(h.isArrayLike(a)?a:a?[a]:[],function(a){return c.byId(a,this.ownerDocument)},this);this._connections=b.map(this._connectIds,function(a){a=c.byId(a,this.ownerDocument);var b=this.selector,d=b?function(a){return k.selector(b,a)}:function(a){return a},e=this;return[k(a,d(m.enter),function(){e._onHover(this)}),k(a,d("focusin"),function(){e._onHover(this)}),k(a,d(m.leave),h.hitch(e,"_onUnHover")),k(a,d("focusout"),h.hitch(e,"set","state","DORMANT"))]},this);this._set("connectId",a)},addTarget:function(a){a=
a.id||a;-1==b.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=b.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);d.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;b.forEach(h.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||this.domNode.innerHTML},
state:"DORMANT",_setStateAttr:function(a){if(!(this.state==a||"SHOW TIMER"==a&&"SHOWING"==this.state||"HIDE TIMER"==a&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(a){case "DORMANT":this._connectNode&&(x.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state","SHOWING")},
this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT");return}x.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,h.hitch(this,"set","state","SHOWING"),h.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",a)}},_onHover:function(a){this._connectNode&&a!=this._connectNode&&
this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOW TIMER")},_onUnHover:function(a){this.set("state","HIDE TIMER")},open:function(a){this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");b.forEach(this._connections||[],function(a){b.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});x._MasterTooltip=y;x.show=
w.showTooltip;x.hide=w.hideTooltip;x.defaultPosition=["after-centered","before-centered"];return x})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(b,e,a,c,d,f,g){function h(c,g,h,m){var k=f.getEffectiveBox(c.ownerDocument);c.parentNode&&"body"==String(c.parentNode.tagName).toLowerCase()||d.body(c.ownerDocument).appendChild(c);var l=null;b.some(g,function(a){var b=a.corner,d=a.pos,f=0,g=
{w:{L:k.l+k.w-d.x,R:d.x-k.l,M:k.w}[b.charAt(1)],h:{T:k.t+k.h-d.y,B:d.y-k.t,M:k.h}[b.charAt(0)]},n=c.style;n.left=n.right="auto";h&&(f=h(c,a.aroundCorner,b,g,m),f="undefined"==typeof f?0:f);var p=c.style,q=p.display,t=p.visibility;"none"==p.display&&(p.visibility="hidden",p.display="");n=e.position(c);p.display=q;p.visibility=t;q={L:d.x,R:d.x-n.w,M:Math.max(k.l,Math.min(k.l+k.w,d.x+(n.w>>1))-n.w)}[b.charAt(1)];t={T:d.y,B:d.y-n.h,M:Math.max(k.t,Math.min(k.t+k.h,d.y+(n.h>>1))-n.h)}[b.charAt(0)];d=Math.max(k.l,
q);p=Math.max(k.t,t);q=Math.min(k.l+k.w,q+n.w)-d;t=Math.min(k.t+k.h,t+n.h)-p;f+=n.w-q+(n.h-t);if(null==l||f<l.overflow)l={corner:b,aroundCorner:a.aroundCorner,x:d,y:p,w:q,h:t,overflow:f,spaceAvailable:g};return!f});l.overflow&&h&&h(c,l.aroundCorner,l.corner,l.spaceAvailable,m);g=l.y;var n=l.x,p=d.body(c.ownerDocument);/relative|absolute/.test(a.get(p,"position"))&&(g-=a.get(p,"marginTop"),n-=a.get(p,"marginLeft"));p=c.style;p.top=g+"px";p.left=n+"px";p.right="auto";return l}var m={TL:"BR",TR:"BL",
BL:"TR",BR:"TL"};return g.place={at:function(a,c,d,e,f){d=b.map(d,function(a){var b={corner:a,aroundCorner:m[a],pos:{x:c.x,y:c.y}};e&&(b.pos.x+="L"==a.charAt(1)?e.x:-e.x,b.pos.y+="T"==a.charAt(0)?e.y:-e.y);return b});return h(a,d,f)},around:function(d,f,g,m,q){function k(a,b){F.push({aroundCorner:a,corner:b,pos:{x:{L:z,R:z+B,M:z+(B>>1)}[a.charAt(1)],y:{T:A,B:A+D,M:A+(D>>1)}[a.charAt(0)]}})}var l;if("string"==typeof f||"offsetWidth"in f||"ownerSVGElement"in f){if(l=e.position(f,!0),/^(above|below)/.test(g[0])){var n=
e.getBorderExtents(f),p=f.firstChild?e.getBorderExtents(f.firstChild):{t:0,l:0,b:0,r:0},v=e.getBorderExtents(d),y=d.firstChild?e.getBorderExtents(d.firstChild):{t:0,l:0,b:0,r:0};l.y+=Math.min(n.t+p.t,v.t+y.t);l.h-=Math.min(n.t+p.t,v.t+y.t)+Math.min(n.b+p.b,v.b+y.b)}}else l=f;if(f.parentNode)for(n="absolute"==a.getComputedStyle(f).position,f=f.parentNode;f&&1==f.nodeType&&"BODY"!=f.nodeName;){p=e.position(f,!0);v=a.getComputedStyle(f);/relative|absolute/.test(v.position)&&(n=!1);if(!n&&/hidden|auto|scroll/.test(v.overflow)){var y=
Math.min(l.y+l.h,p.y+p.h),x=Math.min(l.x+l.w,p.x+p.w);l.x=Math.max(l.x,p.x);l.y=Math.max(l.y,p.y);l.h=y-l.y;l.w=x-l.x}"absolute"==v.position&&(n=!0);f=f.parentNode}var z=l.x,A=l.y,B="w"in l?l.w:l.w=l.width,D="h"in l?l.h:(c.deprecated("place.around: dijit/place.__Rectangle: { x:"+z+", y:"+A+", height:"+l.height+", width:"+B+" } has been deprecated.  Please use { x:"+z+", y:"+A+", h:"+l.height+", w:"+B+" }","","2.0"),l.h=l.height),F=[];b.forEach(g,function(a){var b=m;switch(a){case "above-centered":k("TM",
"BM");break;case "below-centered":k("BM","TM");break;case "after-centered":b=!b;case "before-centered":k(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":k(b?"TL":"TR",b?"TR":"TL");k(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":k(b?"BL":"BR",b?"TL":"TR");k(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":k(b?"TL":"TR",b?"BL":"BR");k(b?"TR":"TL",b?"BR":"BL");break;default:k(a.aroundCorner,a.corner)}});d=h(d,F,q,{w:B,h:D});d.aroundNodePos=l;return d}}})},
"esri/OAuthSignInHandler":function(){define("./Credential ./domUtils ./lang ./urlUtils dijit/Dialog dijit/registry dojo/_base/config dojo/_base/Deferred dojo/_base/kernel dojo/dom-attr dojo/i18n!./nls/jsapi dojo/io-query dojo/sniff dojo/json dijit/form/Button dojo/query".split(" "),function(b,e,a,c,d,f,g,h,m,k,l,p,n,q){return{_oAuthDfd:null,_oAuthIntervalId:0,_oAuthDialogContent:"\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e${oAuthInfo}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e${invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e${lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e${lblCancel}\x3c/button\x3e\x3c/div\x3e",
setOAuthRedirectionHandler:function(a){this._oAuthRedirectFunc=a},oAuthSignIn:function(a,b,c,d){var f=this._oAuthDfd=new h;f.resUrl_=a;f.sinfo_=b;f.oinfo_=c;var g=!d||!1!==d.oAuthPopupConfirmation;if(!c.popup||!g)return this._doOAuthSignIn(a,b,c),f;this._nls||(this._nls=l.identity);this.oAuthDialog||(this.oAuthDialog=this._createOAuthDialog());a=this.oAuthDialog;b=d&&d.error;d=d&&d.token;e.hide(a.errMsg_);b&&403==b.code&&d&&(k.set(a.errMsg_,"innerHTML",this._nls.forbidden),e.show(a.errMsg_));a.show();
return f},setOAuthResponseHash:function(a){var c=this._oAuthDfd;this._oAuthDfd=null;if(c&&a)if(clearInterval(this._oAuthIntervalId),"#"===a.charAt(0)&&(a=a.substring(1)),a=p.queryToObject(a),a.error)a=Error("access_denied"===a.error?"ABORTED":"OAuth: "+a.error+" - "+a.error_description),a.code="IdentityManagerBase.2",a.log=!!g.isDebug,c.errback(a);else{var d=c.oinfo_._oAuthCred,e=new b({userId:a.username,server:c.sinfo_.server,token:a.access_token,expires:(new Date).getTime()+1E3*Number(a.expires_in),
ssl:"true"===a.ssl,_oAuthCred:d});d.storage=a.persist?window.localStorage:window.sessionStorage;d.token=e.token;d.expires=e.expires;d.userId=e.userId;d.ssl=e.ssl;d.save();c.callback(e)}},_createOAuthDialog:function(){var b=this._nls,c=a.substitute(b,this._oAuthDialogContent),h=new d({title:b.title,content:c,"class":"esriOAuthSignInDialog",style:"min-width: 18em;",esriIdMgr_:this,execute_:function(){var a=h.esriIdMgr_._oAuthDfd;h.hide_();h.esriIdMgr_._doOAuthSignIn(a.resUrl_,a.sinfo_,a.oinfo_)},cancel_:function(){var a=
h.esriIdMgr_._oAuthDfd;h.esriIdMgr_._oAuthDfd=null;h.hide_();var b=Error("ABORTED");b.code="IdentityManager.2";b.log=!!g.isDebug;a.errback(b)},hide_:function(){e.hide(h.errMsg_);h.hide();d._DialogLevelManager.hide(h)}}),b=h.domNode;h.btnSubmit_=f.byNode(m.query(".esriIdSubmit",b)[0]);h.btnCancel_=f.byNode(m.query(".esriIdCancel",b)[0]);h.errMsg_=m.query(".esriErrorMsg",b)[0];h.connect(h.btnSubmit_,"onClick",h.execute_);h.connect(h.btnCancel_,"onClick",h.onCancel);h.connect(h,"onCancel",h.cancel_);
return h},_doOAuthSignIn:function(a,b,d){var e=this,f={client_id:d.appId,response_type:"token",state:q.stringify({portalUrl:d.portalUrl}),expiration:d.expiration,locale:d.locale,redirect_uri:d.popup?c.getAbsoluteUrl(d.popupCallbackUrl):window.location.href.replace(/#.*$/,"")};d.forceLogin&&(f.force_login=!0);var h=d.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",k=h+"?"+p.objectToQuery(f);if(d.popup){var l;7===n("ie")?(l=window.open(d.popupCallbackUrl,"esriJSAPIOAuth",d.popupWindowFeatures),
l.location=k):l=window.open(k,"esriJSAPIOAuth",d.popupWindowFeatures);l?(l.focus(),this._oAuthDfd.oAuthWin_=l,this._oAuthIntervalId=setInterval(function(){if(l.closed){clearInterval(e._oAuthIntervalId);var a=e._oAuthDfd;if(a){var b=Error("ABORTED");b.code="IdentityManager.2";b.log=!!g.isDebug;a.errback(b)}}},500)):(a=Error("ABORTED"),a.code="IdentityManager.2",a.log=!!g.isDebug,this._oAuthDfd.errback(a))}else this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:f,authorizeUrl:h,resourceUrl:a,
serverInfo:b,oAuthInfo:d}):window.location=k}}})},"esri/layers/vectorTiles/core/Logger":function(){define(["require","exports","dojo/has"],function(b,e,a){var c={info:0,warn:1,error:2};b=function(){function a(b){void 0===b&&(b={});this.module=b.module||"";this.writer=b.writer||null;this.level=b.level||null;null!=b.enabled&&(this.enabled=!!b.enabled);a._loggers[this.module]=this;b=this.module.lastIndexOf(".");-1!==b&&(this.parent=a.getLogger(this.module.slice(0,b)))}a.prototype.log=function(a){for(var b=
[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];this._isEnabled()&&this._matchLevel(a)&&(c=this._inheritedWriter())&&c.apply(void 0,[a,this.module].concat(b))};a.prototype.error=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];this.log.apply(this,["error"].concat(a))};a.prototype.warn=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];this.log.apply(this,["warn"].concat(a))};a.prototype.info=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];
this.log.apply(this,["info"].concat(a))};a.prototype.getLogger=function(b){return a.getLogger(this.module+"."+b)};a.getLogger=function(b){var c=a._loggers[b];c||(c=new a({module:b}));return c};a.prototype._parentWithMember=function(a,b){for(var c=this;c&&null==c[a];)c=c.parent;return c?c[a]:b};a.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};a.prototype._consoleWriter=function(a,b){for(var c=[],d=2;d<arguments.length;d++)c[d-2]=arguments[d];console[a].apply(console,
["["+b+"]"].concat(c))};a.prototype._matchLevel=function(a){return c[this._parentWithMember("level","error")]<=c[a]};a.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};a._loggers={};return a}();e=b.getLogger("esri");a("dojo-debug-messages")?e.level="info":e.level="warn";return b})},"esri/layers/vectorTiles/core/sniff":function(){define(["dojo/_base/window","dojo/sniff","../kernel"],function(b,e,a){function c(){if(q)return q;q={available:!1,version:0,supportsHighPrecisionFragment:!1};
var a=function(a,b){for(var c=["webgl","experimental-webgl","webkit-3d","moz-webgl"],d=null,e=0;e<c.length;++e){try{d=a.getContext(c[e],b)}catch(A){}if(d)break}return d},b;try{if(!p.WebGLRenderingContext)throw 0;b=document.createElement("canvas")}catch(w){return q}var c=a(b,{failIfMajorPerformanceCaveat:!0});!c&&(c=a(b))&&(q.majorPerformanceCaveat=!0);if(!c)return q;a=c.getParameter(c.VERSION);if(!a)return q;if(a=a.match(/^WebGL\s+([\d.]*)/))q.version=parseFloat(a[1]),q.available=.94<=q.version,a=
c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_FLOAT),q.supportsHighPrecisionFragment=a&&0<a.precision,q.supportsVertexShaderSamplers=0<c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS),q.supportsElementIndexUint=null!=c.getExtension("OES_element_index_uint");return q}var d=e("ff"),f=e("ie"),g=void 0===f&&7<=e("trident"),h=e("webkit"),m=e("opera"),k=e("chrome"),l=e("safari"),p=b.global;b=navigator.userAgent;var n;(n=b.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i))&&e.add("esri-iphone",parseFloat(n[2].replace("_",
".")));(n=b.match(/Android\s+(\d+\.\d+)/i))&&e.add("esri-android",parseFloat(n[1]));(n=b.match(/Fennec\/(\d+\.\d+)/i))&&e.add("esri-fennec",parseFloat(n[1]));0<=b.indexOf("BlackBerry")&&0<=b.indexOf("WebKit")&&e.add("esri-blackberry",1);e.add("esri-touch",e("esri-iphone")||e("esri-android")||e("esri-blackberry")||6<=e("esri-fennec")||(d||h)&&p.document&&p.document.createTouch?!0:!1);(n=b.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i))&&e.add("esri-mobile",n);e.add("esri-pointer",
navigator.pointerEnabled||navigator.msPointerEnabled);a._getDOMAccessor=function(a){var b="";d?b="Moz":h?b="Webkit":f?b="ms":m&&(b="O");return b+a.charAt(0).toUpperCase()+a.substr(1)};e.add("esri-phonegap",!!p.cordova);e.add("esri-cors",e("esri-phonegap")||"XMLHttpRequest"in p&&"withCredentials"in new XMLHttpRequest);e.add("esri-canvas-svg-support",function(){return!(e("trident")||e("ie"))});e.add("esri-wasm","WebAssembly"in p);if(e("host-webworker"))return e;e.add("esri-workers","Worker"in p);e.add("esri-script-sandbox",
function(){return"MessageChannel"in p&&"HTMLIFrameElement"in p&&"sandbox"in HTMLIFrameElement.prototype});e.add("esri-transforms",g||9<=f||3.5<=d||4<=k||3.1<=l||10.5<=m||3.2<=e("esri-iphone")||2.1<=e("esri-android"));e.add("esri-transitions",g||10<=f||4<=d||4<=k||3.1<=l||10.5<=m||3.2<=e("esri-iphone")||2.1<=e("esri-android"));e.add("esri-transforms3d",g||10<=d||12<=k||4<=l||3.2<=e("esri-iphone")||3<=e("esri-android"));e.add("esri-url-encodes-apostrophe",function(){var a=p.document.createElement("a");
a.href="?'";return-1<a.href.indexOf("?%27")});3>e("esri-android")&&(e.add("esri-transforms",!1,!1,!0),e.add("esri-transitions",!1,!1,!0),e.add("esri-transforms3d",!1,!1,!0));a._css=function(a){var b=e("esri-transforms3d");void 0!==a&&null!==a?b=a:b&&(k||l&&!e("esri-iphone"))&&(b=!1);var c=b?"translate3d(":"translate(",g=b?k?",-1px)":",0px)":")",n=b?"scale3d(":"scale(",p=b?",1)":")",q=b?"rotate3d(0,0,1,":"rotate(",t=b?"matrix3d(":"matrix(",A=b?",0,0,":",",B=b?",0,0,0,0,1,0,":",",D=b?",0,1)":")";return{names:{transition:h&&
"-webkit-transition"||d&&"MozTransition"||m&&"OTransition"||f&&"msTransition"||"transition",transform:h&&"-webkit-transform"||d&&"MozTransform"||m&&"OTransform"||f&&"msTransform"||"transform",transformName:h&&"-webkit-transform"||d&&"-moz-transform"||m&&"-o-transform"||f&&"-ms-transform"||"transform",origin:h&&"-webkit-transform-origin"||d&&"MozTransformOrigin"||m&&"OTransformOrigin"||f&&"msTransformOrigin"||"transformOrigin",endEvent:h&&"webkitTransitionEnd"||d&&"transitionend"||m&&"oTransitionEnd"||
f&&"MSTransitionEnd"||"transitionend"},translate:function(a,b){return c+a+"px,"+b+"px"+g},scale:function(a){return n+a+","+a+p},rotate:function(a){return q+a+"deg)"},matrix:function(a){return a.m?(a=a.m,t+a[0].toFixed(10)+","+a[1].toFixed(10)+A+a[2].toFixed(10)+","+a[3].toFixed(10)+B+a[4].toFixed(10)+(d?"px,":",")+a[5].toFixed(10)+(d?"px":"")+D):t+a.xx.toFixed(10)+","+a.yx.toFixed(10)+A+a.xy.toFixed(10)+","+a.yy.toFixed(10)+B+a.dx.toFixed(10)+(d?"px,":",")+a.dy.toFixed(10)+(d?"px":"")+D},matrix3d:function(a){a=
a.m;return"matrix3d("+a[0].toFixed(10)+","+a[1].toFixed(10)+",0,0,"+a[2].toFixed(10)+","+a[3].toFixed(10)+",0,0,0,0,1,0,"+a[4].toFixed(10)+","+a[5].toFixed(10)+",0,1)"},getScaleFromMatrix:function(a){if(!a)return 1;a=a.toLowerCase();var b=-1<a.indexOf("matrix3d")?"matrix3d(":"matrix(";return Number(a.substring(b.length,a.indexOf(",")))}}};var q;e.add("esri-webgl",function(){return!!c().available});e.add("esri-webgl-high-precision-fragment",function(){return!!c().supportsHighPrecisionFragment});e.add("esri-webgl-vertex-shader-samplers",
function(){return!!c().supportsVertexShaderSamplers});e.add("esri-webgl-element-index-uint",function(){return!!c().supportsElementIndexUint});e.add("esri-webgl-major-performance-caveat",function(){return!!c().majorPerformanceCaveat});return e})},"esri/layers/vectorTiles/core/workers/WorkerFallbackImpl":function(){define(["require","exports","../global"],function(b,e,a){var c=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)}})}}(),d=a.MutationObserver||a.WebKitMutationObserver,f=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)};else if(d){var c=[],e=document.createElement("div");(new d(function(){for(;0<c.length;)c.shift()()})).observe(e,{attributes:!0});b=function(a){c.push(a);e.setAttribute("queueStatus","1")}}return b}();return function(){function a(){this._dispatcher=
new c;this._connections={};this._outgoingStaticMessages={};this._isInitialized=!1;this._workerPostMessage({type:"\x3cworker-loaded\x3e"})}a.prototype.terminate=function(){this._connections={}};Object.defineProperty(a.prototype,"onmessage",{get:function(){return this._onmessageHandler},set:function(a){this._onmessageHandler&&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;f(function(){c._workerMessageHandler(new MessageEvent("message",{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;f(function(){c.dispatchEvent(new MessageEvent("message",{data:a}))})};a.prototype._workerMessageHandler=function(a){var c=this,d=a.data;if(d){var e=d.connection,f=d.type;if("\x3cconfigure\x3e"===f)this._isInitialized||this._workerPostMessage({type:"\x3cworker-configured\x3e"});else if("\x3copen-connection\x3e"===f){a=d.data.path;var g=d.id;this._connections[e]?
this._workerPostMessage({type:"\x3cresponse\x3e",id:g,connection:e}):b(["./WorkerConnection",a],function(a,b){c._connections[e]=new a(b,{postMessage:function(a,b){return c._workerPostMessage(a,b)}},e);c._workerPostMessage({type:"\x3cresponse\x3e",id:g,data:{connection:e},error:void 0})})}else"\x3cclose-connection\x3e"===f?this._connections[e]&&delete this._connections[e]:"\x3cstatic-message\x3e"===f?(a=d.id,this._outgoingStaticMessages[a]&&(f=this._outgoingStaticMessages[a],delete this._outgoingStaticMessages[a],
d.error?f.reject(d.error):f.resolve(d.data))):f&&(d=this._connections[e])&&d.proxy.message(a)}};return a}()})},"esri/layers/vectorTiles/core/requireUtils":function(){define(["require","exports","dojo/Deferred"],function(b,e,a){function c(b,e){if(Array.isArray(e)){var d=new a;b(e,function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];d.resolve(a)});return d.promise}return c(b,[e]).then(function(a){return a[0]})}Object.defineProperty(e,"__esModule",{value:!0});e.when=c;e.getAbsMid=function(a,
b,c){return b.toAbsMid?b.toAbsMid(a):c.id.replace(/\/[^\/]*$/ig,"/")+a}})},"esri/layers/vectorTiles/core/LRUCache":function(){define(["require","exports"],function(b,e){return function(){function a(a){this._cache={};this._lruQueue=[];if(0>=a)throw Error("LRU cache size must be bigger than zero!");this._maxSize=a}a.prototype.has=function(a){return void 0!==this._cache[a]};a.prototype.insert=function(a,b){null!==this.use(a)?this._cache[a]=b:(this._collect(),this._cache[a]=b,this._lruQueue.unshift(a))};
a.prototype.use=function(a){var b=this._cache[a];if(!b)return null;this._lruQueue.splice(this._lruQueue.indexOf(a),1);this._lruQueue.unshift(a);return b};a.prototype.print=function(){for(var a=0,b=this._lruQueue;a<b.length;a++){var e=b[a];console.log("key: "+e+", value: "+this._cache[e])}};a.prototype._collect=function(){if(!(this._lruQueue.length<this._maxSize)){var a=this._lruQueue.pop(),b=this._cache[a];b&&b.release&&b.release();delete this._cache[a]}};return a}()})},"esri/layers/vectorTiles/views/vectorTiles/TileIndex":function(){define(["require",
"exports","../2d/tiling/TileKey"],function(b,e,a){return function(){function b(a){if(!("index"in a))throw Error("The tilemap is missing the 'index' property.");this._tilemap=a.index}b.prototype.dataKey=function(b){var c=[b];if(0>b.level||0>b.row||0>b.col||0<b.row>>b.level||0<b.col>>b.level)return null;for(;0!==b.level;)b=new a(b.level-1,b.row>>1,b.col>>1,b.world),c.push(b);b=this._tilemap;var d=c.pop(),e,m;if(1===b)return d;for(;c.length;){e=c.pop();m=d.level+1;var k=2*d.row,l=2*d.col;m=[a.getId(m,
k,l,e.world),a.getId(m,k,l+1,e.world),a.getId(m,k+1,l,e.world),a.getId(m,k+1,l+1,e.world)].indexOf(e.id);if(b)if(0===b[m]){d=null;break}else if(1===b[m]){d=e;break}else d=e,b=b[m]}return d};b.prototype.forEach=function(a,b,c,e,m){this._callback=m;this._maxLevel=b+a;this._forEach(this._tilemap,b,c,e)};b.prototype._forEach=function(a,b,c,e){0!==a&&(this._callback(b,c,e),b!==this._maxLevel&&"object"===typeof a&&(this._forEach(a[0],b+1,2*c,2*e),this._forEach(a[1],b+1,2*c,2*e+1),this._forEach(a[2],b+1,
2*c+1,2*e),this._forEach(a[3],b+1,2*c+1,2*e+1)))};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/SpriteMosaic":function(){define("require exports ../webgl/Texture ../2d/engine/webgl/Geometry ./Rect ./GeometryUtils ./RectangleBinPack".split(" "),function(b,e,a,c,d,f,g){function h(a){return a-Math.floor(a)}function m(a,b,c){0>a?a=0:.9999991<a&&(a=.9999991);var d=h(a*k[0]),e=h(a*k[1]),f=h(a*k[2]);a=h(a*k[3]);b[c+0]=256*(d-d*l[0]);b[c+1]=256*(e-d*l[1]);b[c+2]=256*(f-e*l[2]);b[c+3]=256*(a-f*
l[3])}var k=[16777216,65536,256,1],l=[0,1/256,1/256,1/256];return function(){function b(a,b,c){void 0===c&&(c=0);this._size=[];this._mosaicsData=[];this._textures=[];this._dirties=[];this._pageHeight=this._pageWidth=this._currentPage=this._maxItemSize=0;this._mosaicRects={};this.pixelRatio=1;(0>=a||0>=b)&&console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!");this._pageWidth=a;this._pageHeight=b;0<c&&(this._maxItemSize=c);this._binPack=new g(a-4,b-4)}b.prototype.getWidth=
function(a){return a>=this._size.length?-1:this._size[a][0]};b.prototype.getHeight=function(a){return a>=this._size.length?-1:this._size[a][1]};b.prototype.setSpriteSource=function(a){this.dispose();this.pixelRatio=a.devicePixelRatio;if(0===this._mosaicsData.length){this._binPack=new g(this._pageWidth-4,this._pageHeight-4);var b=new Uint32Array(Math.floor(this._pageWidth)*Math.floor(this._pageHeight));this._mosaicsData[0]=b;this._dirties.push(!0);this._size.push([this._pageWidth,this._pageHeight]);
this._textures.push(void 0)}this._sprites=a};b.prototype.getSpriteItem=function(a,b){void 0===b&&(b=!1);var c=this._mosaicRects[a];if(c)return c;if(!this._sprites||"loaded"!==this._sprites.loadStatus)return null;c=this._sprites.getSpriteInfo(a);if(!c||!c.width||!c.height||0>c.width||0>c.height)return null;var d=c.width,e=c.height,f,g,h=1;if(c.cim){h=this._buildSDF(c.cim);f=h[0];g=h[1];var k=h[2],l=h[3],m=h[4],h=h[5];if(!f||0>=l||0>=m)return null;var n=this._allocateImage(g,k),m=n[0],l=n[1],n=n[2];
if(0>=m.width)return null;(c.cim||c.sdf)&&this._clearRect(m,l,n,1);this._copy(m,{width:g,height:k,x:0,y:0},l,n,b,f);m.x+=4;m.y+=4;m.width-=8;m.height-=8;f=m;g=l;h*=.75;h=k/e;c.sdf=!0}else{k=this._allocateImage(d,e);m=k[0];l=k[1];n=k[2];if(0>=m.width)return null;this._copy(m,c,l,n,b);f=m;g=l}c={rect:f,width:d,height:e,sdf:c.sdf,pixelRatio:c.pixelRatio,page:g,sdfRatio:h};return this._mosaicRects[a]=c};b.prototype.preloadSpriteItems=function(){for(var a=0,b=this._sprites.spriteNames;a<b.length;a++)this.getSpriteItem(b[a],
!0)};b.prototype.getSpriteItems=function(a){for(var b={},c=0;c<a.length;c++){var d=a[c];b[d]=this.getSpriteItem(d)}return b};b.prototype.getMosaicItemPosition=function(a,b){var c=this.getSpriteItem(a,b),d=c&&c.rect;if(!d)return null;d.width=c.width;d.height=c.height;return{size:[c.width,c.height],tl:[(d.x+2)/this._size[c.page][0],(d.y+2)/this._size[c.page][1]],br:[(d.x+2+c.width)/this._size[c.page][0],(d.y+2+c.height)/this._size[c.page][1]],page:c.page}};b.prototype.bind=function(b,c,d,e){void 0===
d&&(d=0);void 0===e&&(e=0);this._textures[d]||(this._textures[d]=new a(b,{pixelFormat:6408,dataType:5121,width:this._size[d][0],height:this._size[d][1]},new Uint8Array(this._mosaicsData[d].buffer)));var f=this._textures[d];f.setSamplingMode(c);this._dirties[d]&&f.setData(new Uint8Array(this._mosaicsData[d].buffer));b.bindTexture(f,e);this._dirties[d]=!1};b._copyBits=function(a,b,c,d,e,f,g,h,k,l,m){var n=d*b+c;g=h*f+g;if(m)for(g-=f,m=-1;m<=l;m++,n=((m+l)%l+d)*b+c,g+=f)for(h=-1;h<=k;h++)e[g+h]=a[n+
(h+k)%k];else for(m=0;m<l;m++){for(h=0;h<k;h++)e[g+h]=a[n+h];n+=b;g+=f}};b.prototype._copy=function(a,c,d,e,f,g){if(this._sprites&&"loaded"===this._sprites.loadStatus&&!(d>=this._mosaicsData.length)){var h=new Uint32Array(g?g.buffer:this._sprites.image.buffer),k=this._mosaicsData[d];k&&h||console.error("Source or target images are uninitialized!");b._copyBits(h,g?c.width:this._sprites.width,c.x,c.y,k,e[0],a.x+2,a.y+2,c.width,c.height,f);this._dirties[d]=!0}};b.prototype._allocateImage=function(a,
b){a+=2;b+=2;var c=Math.max(a,b);if(this._maxItemSize&&this._maxItemSize<c){var c=Math.pow(2,Math.ceil(f.log2(a))),e=Math.pow(2,Math.ceil(f.log2(b))),h=new d(0,0,a,b);this._mosaicsData.push(new Uint32Array(c*e));this._dirties.push(!0);this._size.push([c,e]);this._textures.push(void 0);return[h,this._mosaicsData.length-1,[c,e]]}c=a%4?4-a%4:4;e=b%4?4-b%4:4;1===c&&(c=5);1===e&&(e=5);c=this._binPack.allocate(a+c,b+e);return 0>=c.width?(this._dirties[this._currentPage]||(this._mosaicsData[this._currentPage]=
null),this._currentPage=this._mosaicsData.length,this._mosaicsData.push(new Uint32Array(this._pageWidth*this._pageHeight)),this._dirties.push(!0),this._size.push([this._pageWidth,this._pageHeight]),this._textures.push(void 0),this._binPack=new g(this._pageWidth-4,this._pageHeight-4),this._allocateImage(a,b)):[c,this._currentPage,[this._pageWidth,this._pageHeight]]};b.prototype._clearRect=function(a,b,c,d){(b=this._mosaicsData[b])||console.error("Source image is uninitialized!");var e=[0,0,0,0];m(d,
e,0);d=e[0]&255|(e[1]&255)<<8|(e[2]&255)<<16|e[3]<<24;c=c[0];var e=a.y*c+a.x,f=a.width;a=a.height;for(var g=0;g<a;g++){for(var h=0;h<f;h++)b[e+h]=d;e+=c}};b.prototype.dispose=function(){this._binPack=null;this._mosaicRects={};for(var a=0,b=this._textures;a<b.length;a++){var c=b[a];c&&c.dispose()}this._textures.length=0};b.prototype._extractGeometry=function(a){if(!a)return null;a=a.symbolLayers;if(!a||1!==a.length)return null;a=a[0];if(!a)return null;a=a.markerGraphics;if(!a||1!==a.length)return null;
a=a[0];if(!a)return null;var b=a.geometry;if(!b||!b.rings)return null;a=[];for(var d=0,b=b.rings;d<b.length;d++){for(var e=[],f=0,g=b[d];f<g.length;f++){var h=g[f];e.push(new c.Point(h[0],h[1]))}a.push(e)}return a};b.prototype._getEnvelope=function(a){for(var b=Infinity,c=-Infinity,e=Infinity,f=-Infinity,g=0;g<a.length;g++)for(var h=0,k=a[g];h<k.length;h++){var l=k[h];l.x<b&&(b=l.x);l.x>c&&(c=l.x);l.y<e&&(e=l.y);l.y>f&&(f=l.y)}return new d(b,e,c-b,f-e)};b.prototype._buildSDF=function(a){a=this._extractGeometry(a);
if(!a)return null;var b=this._getEnvelope(a);if(0>=b.width||0>=b.height)return null;for(var c=86/Math.max(b.width,b.height),d=Math.round(b.width*c),e=Math.round(b.height*c),f=d+32,g=e+32,h=0;h<a.length;h++)for(var k=0,l=a[h];k<l.length;k++){var m=l[k];m.x-=b.x;m.y-=b.y;m.x*=c;m.y*=c;m.x+=15.5;m.y+=15.5}b=this._dist_map(a,f,g,16);this._sign_dist_map(a,f,g,16,b);return[this._encodeDistMap(b),f,g,d,e,c]};b.prototype._dist_map=function(a,b,c,d){for(var e=b*c,f=new Float32Array(e),g=d*d+1,h=0;h<e;++h)f[h]=
g;for(g=0;g<a.length;g++)for(var k=a[g],l=k.length,h=1;h<l;++h){var m=k[h-1],n=k[h],p=void 0,q=void 0;m.x<n.x?(p=m.x,q=n.x):(p=n.x,q=m.x);var r=void 0,t=void 0;m.y<n.y?(r=m.y,t=n.y):(r=n.y,t=m.y);var E=Math.floor(p)-d,q=Math.floor(q)+d,r=Math.floor(r)-d,t=Math.floor(t)+d;0>E&&(E=0);q>b&&(q=b);0>r&&(r=0);t>c&&(t=c);for(var p=n.x-m.x,M=n.y-m.y,N=p*p+M*M;E<q;E++)for(var J=r;J<t;J++){var G=(E-m.x)*p+(J-m.y)*M,I=void 0,P=void 0;0>G?(I=m.x,P=m.y):G>N?(I=n.x,P=n.y):(G/=N,I=m.x+G*p,P=m.y+G*M);G=(E-I)*(E-
I)+(J-P)*(J-P);I=(c-J-1)*b+E;G<f[I]&&(f[I]=G)}}for(h=0;h<e;++h)f[h]=Math.sqrt(f[h]);return f};b.prototype._sign_dist_map=function(a,b,c,d,e){for(var f=0;f<a.length;f++)for(var g=a[f],h=g.length,k=1;k<h;++k){var l=g[k-1],m=g[k],n=void 0,p=void 0;l.x<m.x?(n=l.x,p=m.x):(n=m.x,p=l.x);var q=void 0,r=void 0;l.y<m.y?(q=l.y,r=m.y):(q=m.y,r=l.y);n=Math.floor(n);p=Math.floor(p)+1;q=Math.floor(q);r=Math.floor(r)+1;n<d&&(n=d);p>b-d&&(p=b-d);q<d&&(q=d);for(r>c-d&&(r=c-d);q<r;++q)if(l.y>q!==m.y>q){for(var t=(c-
q-1)*b,u=n;u<p;++u)u<(m.x-l.x)*(q-l.y)/(m.y-l.y)+l.x&&(e[t+u]=-e[t+u]);for(u=d;u<n;++u)e[t+u]=-e[t+u]}}};b.prototype._encodeDistMap=function(a){for(var b=a.length,c=new Uint8Array(4*b),d=0;d<b;++d)m(a[d]/16+.5,c,4*d);return c};return b}()})},"esri/layers/vectorTiles/views/2d/engine/webgl/Geometry":function(){define(["require","exports"],function(b,e){Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function a(a,b){this.x=a;this.y=b}a.prototype.clone=function(){return new a(this.x,
this.y)};a.prototype.equals=function(a,b){return a===this.x&&b===this.y};a.prototype.isEqual=function(a){return a.x===this.x&&a.y===this.y};a.prototype.setCoords=function(a,b){this.x=a;this.y=b};a.prototype.normalize=function(){var a=this.x,b=this.y,a=Math.sqrt(a*a+b*b);this.x/=a;this.y/=a};a.prototype.rightPerpendicular=function(){var a=this.x;this.x=this.y;this.y=-a};a.prototype.move=function(a,b){this.x+=a;this.y+=b};a.prototype.assign=function(a){this.x=a.x;this.y=a.y};a.prototype.assignAdd=function(a,
b){this.x=a.x+b.x;this.y=a.y+b.y};a.prototype.assignSub=function(a,b){this.x=a.x-b.x;this.y=a.y-b.y};a.prototype.rotate=function(a,b){var c=this.x,d=this.y;this.x=c*a-d*b;this.y=c*b+d*a};a.prototype.scale=function(a){this.x*=a;this.y*=a};a.prototype.length=function(){var a=this.x,b=this.y;return Math.sqrt(a*a+b*b)};a.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;return Math.sqrt(c*c+d*d)};a.add=function(b,c){return new a(b.x+c.x,b.y+c.y)};a.sub=function(b,c){return new a(b.x-c.x,b.y-c.y)};return a}();
e.Point=a})},"esri/layers/vectorTiles/views/vectorTiles/Rect":function(){define(["require","exports"],function(b,e){return function(){function a(a,b,e,g){void 0===a&&(a=0);void 0===b&&(b=0);void 0===e&&(e=0);void 0===g&&(g=0);this.x=a;this.y=b;this.width=e;this.height=g}Object.defineProperty(a.prototype,"isEmpty",{get:function(){return 0>=this.width||0>=this.height},enumerable:!0,configurable:!0});return a}()})},"esri/layers/vectorTiles/views/vectorTiles/RectangleBinPack":function(){define(["require",
"exports","./Rect"],function(b,e,a){return function(){function b(b,c){this._height=this._width=0;this._free=[];this._width=b;this._height=c;this._free.push(new a(0,0,b,c))}Object.defineProperty(b.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0});b.prototype.allocate=function(b,c){if(b>this._width||c>this._height)return new a;for(var d=null,e=-1,f=0;f<
this._free.length;++f){var k=this._free[f];b<=k.width&&c<=k.height&&(null===d||k.y<=d.y&&k.x<=d.x)&&(d=k,e=f)}if(null===d)return new a;this._free.splice(e,1);d.width<d.height?(d.width>b&&this._free.push(new a(d.x+b,d.y,d.width-b,c)),d.height>c&&this._free.push(new a(d.x,d.y+c,d.width,d.height-c))):(d.width>b&&this._free.push(new a(d.x+b,d.y,d.width-b,d.height)),d.height>c&&this._free.push(new a(d.x,d.y+c,b,d.height-c)));return new a(d.x,d.y,b,c)};b.prototype.release=function(a){for(var b=0;b<this._free.length;++b){var c=
this._free[b];if(c.y===a.y&&c.height===a.height&&c.x+c.width===a.x)c.width+=a.width;else if(c.x===a.x&&c.width===a.width&&c.y+c.height===a.y)c.height+=a.height;else if(a.y===c.y&&a.height===c.height&&a.x+a.width===c.x)c.x=a.x,c.width+=a.width;else if(a.x===c.x&&a.width===c.width&&a.y+a.height===c.y)c.y=a.y,c.height+=a.height;else continue;this._free.splice(b,1);this.release(a)}this._free.push(a)};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/SpriteSource":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper dojo/Deferred ../../request ../../kernel ../../core/promiseUtils".split(" "),
function(b,e,a,c,d,f,g,h){return function(){function a(a,b){this.baseURL=a;this.devicePixelRatio=b;this._isRetina=!1;this._spritesData={};this.height=this.width=this.image=null;this.loadStatus="not-loaded"}Object.defineProperty(a.prototype,"spriteNames",{get:function(){var a=[],b;for(b in this._spritesData)a.push(b);a.sort();return a},enumerable:!0,configurable:!0});a.prototype.getSpriteInfo=function(a){return this._spritesData[a]};a.prototype.load=function(){var a=this;this.loadStatus="loading";
return this.baseURL?this._loadSprites().then(function(){a.loadStatus="loaded";return a}).otherwise(function(b){a.loadStatus="failed";return a}):h.resolve(this)};a.prototype._loadSprites=function(){var a=this;this._isRetina=1.15<this.devicePixelRatio?!0:!1;var b=this.baseURL,c=this._isRetina?"@2x":"";return f(b+c+".json",{callbackParamName:"callback",responseType:"json"}).then(function(e){var f=Object.keys(e.data);if(0===f.length||1===f.length&&"_ssl"===f[0])return h.resolve(null);a._spritesData=e.data;
var k=new d,l=new Image;l.crossOrigin="anonymous";l.onload=function(){l.onload=null;a.width=l.width;a.height=l.height;var b=document.createElement("canvas");b.width=l.width;b.height=l.height;b=b.getContext("2d");b.drawImage(l,0,0,l.width,l.height);for(var b=b.getImageData(0,0,l.width,l.height),b=new Uint8Array(b.data),c,d=0;d<b.length;d+=4)c=b[d+3]/255,b[d]*=c,b[d+1]*=c,b[d+2]*=c;a.image=b;k.resolve()};e=""+b+c+".png";g.id&&(f=g.id.findCredential(e))&&f.token&&(e+="?token\x3d"+f.token);l.src=e;return k})};
return a}()})},"esri/layers/vectorTiles/views/vectorTiles/GlyphMosaic":function(){define("require exports dojo/has ../../core/promiseUtils ./Rect ../webgl/Texture ./RectangleBinPack".split(" "),function(b,e,a,c,d,f,g){var h;a("stable-symbol-rendering")&&(h=new Set);return function(){function b(a,b,c){this.height=this.width=0;this._dirties=[];this._glyphData=[];this._currentPage=0;this._glyphIndex={};this._textures=[];this._rangePromises=new Map;(0>=a||0>=b)&&console.error("Glyph mosaic width and height must be greater than zero!");
this.width=a;this.height=b;this._glyphSource=c;this._binPack=new g(a-4,b-4);this._glyphData.push(new Uint8Array(a*b));this._dirties.push(!0);this._textures.push(void 0)}b.prototype.getGlyphItems=function(b,e,f){var l=this,k=[],m=this._glyphSource,p=new Set;b=1/256;for(var u=0;u<f.length;u++)p.add(Math.floor(f[u]*b));var w=[];p.forEach(function(a){if(256>=a){var b=e+a;l._rangePromises.has(b)?w.push(l._rangePromises.get(b)):(a=m.getRange(e,a).always(function(){l._rangePromises["delete"](b)}),l._rangePromises.set(b,
a),w.push(a))}});return c.all(w).then(function(b){b=l._glyphIndex[e];b||(b={},l._glyphIndex[e]=b);var c;if(a("stable-symbol-rendering")){h.clear();for(var n=0;n<f.length;n++)c=f[n],h.add(c);var q=[];p.forEach(function(a){q.push(a)});q.sort();c=[];for(n=0;n<q.length;n++)for(var r=q[n],t=0;256>t;++t)c.push(256*r+t)}else c=f;n=0;for(r=c;n<r.length;n++)if(c=r[n],t=b[c]){if(!a("stable-symbol-rendering")||h.has(c))k[c]={rect:t.rect,metrics:t.metrics,page:t.page}}else{var u=m.getGlyph(e,c);if(u&&u.metrics){var t=
u.metrics,v=void 0;if(0===t.width)v=new d(0,0,0,0);else{var w=t.width+6,H=t.height+6,E=w%4?4-w%4:4,M=H%4?4-H%4:4;1===E&&(E=5);1===M&&(M=5);v=l._binPack.allocate(w+E,H+M);v.isEmpty&&(l._dirties[l._currentPage]||(l._glyphData[l._currentPage]=null),l._currentPage=l._glyphData.length,l._glyphData.push(new Uint8Array(l.width*l.height)),l._dirties.push(!0),l._textures.push(void 0),l._binPack=new g(l.width-4,l.height-4),v=l._binPack.allocate(w+E,H+M));var E=l._glyphData[l._currentPage],u=u.bitmap,N=M=void 0;
if(u)for(var J=0;J<H;J++)for(var M=w*J,N=l.width*(v.y+J+1)+v.x,G=0;G<w;G++)E[N+G+1]=u[M+G]}b[c]={rect:v,metrics:t,tileIDs:null,page:l._currentPage};if(!a("stable-symbol-rendering")||h.has(c))k[c]={rect:v,metrics:t,page:l._currentPage};l._dirties[l._currentPage]=!0}}return k})};b.prototype.removeGlyphs=function(a){for(var b in this._glyphIndex){var c=this._glyphIndex[b];if(c){var d=void 0,e;for(e in c)if(d=c[e],d.tileIDs["delete"](a),0===d.tileIDs.size){for(var f=this._glyphData[d.page],g=d.rect,h=
void 0,k=void 0,m=0;m<g.height;m++)for(h=this.width*(g.y+m)+g.x,k=0;k<g.width;k++)f[h+k]=0;delete c[e];this._dirties[d.page]=!0}}}};b.prototype.bind=function(a,b,c,d){void 0===d&&(d=0);this._textures[c]||(this._textures[c]=new f(a,{pixelFormat:6406,dataType:5121,width:this.width,height:this.height},new Uint8Array(this.width*this.height)));var e=this._textures[c];e.setSamplingMode(b);this._dirties[c]&&e.setData(this._glyphData[c]);a.bindTexture(e,d);this._dirties[c]=!1};b.prototype.dispose=function(){this._binPack=
null;for(var a=0,b=this._textures;a<b.length;a++){var c=b[a];c&&c.dispose()}this._textures.length=0};return b}()})},"esri/layers/vectorTiles/views/vectorTiles/GlyphSource":function(){define(["require","exports","../../core/promiseUtils","../../request","../../core/pbf"],function(b,e,a,c,d){var f=function(){function a(a){this._metrics=[];this._bitmaps=[];if(a)for(;a.next();)switch(a.tag()){case 1:for(var b=a.getMessage();b.next();)switch(b.tag()){case 3:for(var c=b.getMessage(),d=void 0,e=void 0,f=
void 0,g=void 0,h=void 0,m=void 0,w=void 0;c.next();)switch(c.tag()){case 1:d=c.getUInt32();break;case 2:e=c.getBytes();break;case 3:f=c.getUInt32();break;case 4:g=c.getUInt32();break;case 5:h=c.getSInt32();break;case 6:m=c.getSInt32();break;case 7:w=c.getUInt32();break;default:c.skip()}d&&(this._metrics[d]={width:f,height:g,left:h,top:m,advance:w},this._bitmaps[d]=e);break;default:b.skip()}break;default:a.skip()}}a.prototype.getMetrics=function(a){return this._metrics[a]};a.prototype.getBitmap=function(a){return this._bitmaps[a]};
return a}(),g=function(){function a(){this._ranges=[]}a.prototype.getRange=function(a){return this._ranges[a]};a.prototype.addRange=function(a,b){this._ranges[a]=b};return a}();return function(){function b(a){this._glyphInfo={};this._baseURL=a}b.prototype.getRange=function(b,e){var g=this._getFontStack(b);if(g.getRange(e))return a.resolve();var h=256*e,k=h+255,h=this._baseURL.replace("{fontstack}",b).replace("{range}",h+"-"+k);return c(h,{callbackParamName:"callback",responseType:"array-buffer"}).then(function(a){g.addRange(e,
new f(new d(new Uint8Array(a.data),new DataView(a.data))))}).otherwise(function(){g.addRange(e,new f)})};b.prototype.getGlyph=function(a,b){var c=this._getFontStack(a);if(c){var d=Math.floor(b/256);if(!(256<d)&&(c=c.getRange(d)))return{metrics:c.getMetrics(b),bitmap:c.getBitmap(b)}}};b.prototype._getFontStack=function(a){var b=this._glyphInfo[a];b||(b=this._glyphInfo[a]=new g);return b};return b}()})},"esri/layers/vectorTiles/core/pbf":function(){define(["require","exports"],function(b,e){return function(){function a(a,
b,e,g){this._tag=0;this._dataType=99;this._data=a;this._dataView=b;this._pos=e||0;this._end=g||a.byteLength}a.prototype.clone=function(){return new a(this._data,this._dataView,this._pos,this._end)};a.prototype.next=function(a){for(;;){if(this._pos===this._end)return!1;var b=this._decodeVarint();this._tag=b>>3;this._dataType=b&7;if(!a||a===this._tag)break;this.skip()}return!0};a.prototype.empty=function(){return this._pos>=this._end};a.prototype.tag=function(){return this._tag};a.prototype.getInt32=
function(){return this._decodeVarint()};a.prototype.getInt64=function(){return this._decodeVarint()};a.prototype.getUInt32=function(){return this._decodeVarint()};a.prototype.getUInt64=function(){return this._decodeVarint()};a.prototype.getSInt32=function(){return this._decodeSVarint()};a.prototype.getSInt64=function(){return this._decodeSVarint()};a.prototype.getBool=function(){var a=0!==this._data[this._pos];this._skip(1);return a};a.prototype.getEnum=function(){return this._decodeVarint()};a.prototype.getFixed64=
function(){var a=this._dataView,b=this._pos,a=a.getUint32(b,!0)+4294967296*a.getUint32(b+4,!0);this._skip(8);return a};a.prototype.getSFixed64=function(){var a=this._dataView,b=this._pos,a=a.getUint32(b,!0)+4294967296*a.getInt32(b+4,!0);this._skip(8);return a};a.prototype.getDouble=function(){var a=this._dataView.getFloat64(this._pos,!0);this._skip(8);return a};a.prototype.getFixed32=function(){var a=this._dataView.getUint32(this._pos,!0);this._skip(4);return a};a.prototype.getSFixed32=function(){var a=
this._dataView.getInt32(this._pos,!0);this._skip(4);return a};a.prototype.getFloat=function(){var a=this._dataView.getFloat32(this._pos,!0);this._skip(4);return a};a.prototype.getString=function(){var a=this._getLength(),b=this._pos,b=this._toString(this._data,b,b+a);this._skip(a);return b};a.prototype.getBytes=function(){var a=this._getLength(),b=this._pos,b=this._toBytes(this._data,b,b+a);this._skip(a);return b};a.prototype.getMessage=function(){var b=this._getLength(),d=this._pos,d=new a(this._data,
this._dataView,d,d+b);this._skip(b);return d};a.prototype.skip=function(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw Error("Invalid data type!");}};a.prototype._skip=function(a){if(this._pos+a>this._end)throw Error("Attempt to skip past the end of buffer!");this._pos+=a};a.prototype._decodeVarint=function(){var a=this._data,b=this._pos,e=0,g;if(10<=this._end-b){if(g=a[b++],
e|=g&127,0!==(g&128)&&(g=a[b++],e|=(g&127)<<7,0!==(g&128)&&(g=a[b++],e|=(g&127)<<14,0!==(g&128)&&(g=a[b++],e|=(g&127)<<21,0!==(g&128)&&(g=a[b++],e+=268435456*(g&127),0!==(g&128)&&(g=a[b++],e+=34359738368*(g&127),0!==(g&128)&&(g=a[b++],e+=4398046511104*(g&127),0!==(g&128)&&(g=a[b++],e+=562949953421312*(g&127),0!==(g&128)&&(g=a[b++],e+=72057594037927936*(g&127),0!==(g&128)&&(g=a[b++],e+=0x7fffffffffffffff*(g&127),0!==(g&128)))))))))))throw Error("Varint too long!");}else{for(var h=1;b!==this._end;){g=
a[b];if(0===(g&128))break;++b;e+=(g&127)*h;h*=128}if(b===this._end)throw Error("Varint overrun!");++b;e+=g*h}this._pos=b;return e};a.prototype._decodeSVarint=function(){var a=this._decodeVarint();return a%2?-(a+1)/2:a/2};a.prototype._getLength=function(){if(2!==this._dataType)throw Error("Not a delimited data type!");return this._decodeVarint()};a.prototype._toString=function(a,b,e){var c="",d="";for(e=Math.min(this._end,e);b<e;++b){var f=a[b];f&128?d+="%"+f.toString(16):(c+=decodeURIComponent(d)+
String.fromCharCode(f),d="")}d.length&&(c+=decodeURIComponent(d));return c};a.prototype._toBytes=function(a,b,e){e=Math.min(this._end,e);return new Uint8Array(a.buffer,b,e-b)};return a}()})},"esri/layers/vectorTiles/views/2d/engine/StageGL":function(){define("require exports ../../../core/tsSupport/extendsHelper ../libs/gl-matrix/common ../libs/gl-matrix/vec2 ../libs/gl-matrix/mat2d ./webgl/BitBlitRenderer ../../support/screenshotUtils ../../../core/promiseUtils ../../webgl/RenderingContext ../../webgl/FramebufferObject ../../webgl/webgl-utils ../../webgl/Program ../../webgl/VertexArrayObject ../../webgl/BufferObject ./webgl/painter/WGLPainter ./Container ./webgl/shaders/glShaderSnippets".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w){function v(a){return{budget:a.budget,state:a.state,devicePixelRatio:a.devicePixelRatio,stationary:a.stationary}}var y={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"};return function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a._clipData=new Float32Array(8);a._upperLeft=d.create();a._upperRight=d.create();a._lowerLeft=d.create();a._lowerRight=d.create();a._mat2=f.create();a._clipRendererInitialized=!1;return a}a(e,b);Object.defineProperty(e.prototype,
"glPainter",{get:function(){return this._painter},enumerable:!0,configurable:!0});e.prototype.createElement=function(){var a=document.createElement("canvas");a.setAttribute("class","esri-display-object");return a};e.prototype.setElement=function(a){this.element=a};e.prototype.attach=function(a){if(this.attached)return!0;this._resizeCanvas(a);var c=p.setupWebGL(this.element,{alpha:!0,antialias:!1,depth:!0,stencil:!0});this._renderingContext=new k(c[0]);this.attached=!0;this._cachedRenderParams=v(a);
this._painter||(this._painter=new r,this._painter.initialize(this._renderingContext));return b.prototype.attach.call(this,a)};e.prototype.detach=function(a){b.prototype.detach.call(this,a);this._renderingContext&&(this._renderingContext.dispose(),this._renderingContext=null);this._cachedRenderParams=null};e.prototype.beforeRenderChildren=function(a,b){var e=a.state,g=this._painter;if(g){var h=this._renderingContext;h.enforceState();g.update(e,a.devicePixelRatio);if(e.spatialReference&&(e.spatialReference._isWrappable?
e.spatialReference._isWrappable():e.spatialReference.isWrappable)){var k=e.width,g=e.height,m=e.rotation,k=Math.round(k*a.devicePixelRatio),g=Math.round(g*a.devicePixelRatio),n=c.toRadian(m),p=Math.abs(Math.cos(n)),q=Math.abs(Math.sin(n)),r=Math.round(e.worldScreenWidth);if(Math.round(k*p+g*q)<=r)this._clipFrame=!1;else{this._clipFBO&&this._clipFBO.width===k&&this._clipFBO.height===g||(this._clipFBO=new l(h,{colorTarget:0,depthStencilTarget:3,width:k,height:g}));var t=.5*k,u=.5*g,e=1/k,v=1/g,r=.5*
r*a.devicePixelRatio,w=.5*(k*q+g*p),k=this._upperLeft,p=this._upperRight,q=this._lowerLeft,O=this._lowerRight;d.set(k,-r,-w);d.set(p,r,-w);d.set(q,-r,w);d.set(O,r,w);f.identity(this._mat2);f.translate(this._mat2,this._mat2,[t,u]);0!==m&&f.rotate(this._mat2,this._mat2,n);d.transformMat2d(k,k,this._mat2);d.transformMat2d(p,p,this._mat2);d.transformMat2d(q,q,this._mat2);d.transformMat2d(O,O,this._mat2);m=this._clipData;m.set([2*q[0]*e-1,2*(g-q[1])*v-1,2*O[0]*e-1,2*(g-O[1])*v-1,2*k[0]*e-1,2*(g-k[1])*
v-1,2*p[0]*e-1,2*(g-p[1])*v-1]);this._clipRendererInitialized||this._initializeClipRenderer(h);this._clipVBO.setData(m);this._boundFBO=h.getBoundFramebufferObject();h.bindFramebuffer(this._clipFBO);h.setDepthWriteEnabled(!0);h.setStencilWriteMask(255);h.setClearColor(0,0,0,0);h.setClearDepth(1);h.setClearStencil(0);h.clear(h.gl.COLOR_BUFFER_BIT|h.gl.DEPTH_BUFFER_BIT|h.gl.STENCIL_BUFFER_BIT);h.setDepthWriteEnabled(!1);this._clipFrame=!0}}else this._clipFrame=!1}};e.prototype.afterRenderChildren=function(a,
b){if(this._clipFrame&&this._clipRendererInitialized){var c=this._renderingContext;c.bindFramebuffer(this._boundFBO);this._boundFBO=null;c.bindVAO(this._clipVAO);c.bindProgram(this._clipStencilProgram);c.setDepthWriteEnabled(!1);c.setDepthTestEnabled(!1);c.setStencilTestEnabled(!0);c.setBlendingEnabled(!1);c.setColorMask(!1,!1,!1,!1);c.setStencilOp(7680,7680,7681);c.setStencilWriteMask(255);c.setStencilFunction(519,1,255);c.drawElements(4,6,5123,0);c.bindVAO();c.setColorMask(!0,!0,!0,!0);c.setBlendingEnabled(!0);
c.setStencilFunction(514,1,255);this._blitRenderer.render(c,this._clipFBO.colorTexture,9728,1);c.setStencilTestEnabled(!1)}};e.prototype.doRender=function(a){var c=this.element.style;this.visible?(c.display="block",c.opacity=""+this.opacity,this._resizeCanvas(a),b.prototype.doRender.call(this,a),this._cachedRenderParams=v(a)):c.display="none"};e.prototype.takeScreenshot=function(a){void 0===a&&(a={});var b=a.pixelRatio||1;this._cachedRenderParams.devicePixelRatio=b;var c=Math.round(b*this._cachedRenderParams.state.width),
d=Math.round(b*this._cachedRenderParams.state.height),e=0,f=0,g=c,k=d,n=c,p=d;if(n=a.area)e=Math.round(b*n.x),f=Math.round(b*n.y),g=Math.round(b*n.width),k=Math.round(b*n.height);void 0!==a.width&&void 0!==a.height?(n=a.width/a.height,k*n<g?(n*=k,e+=Math.floor((g-n)/2),g=Math.floor(n)):(n=g/n,f+=Math.floor((k-n)/2),k=Math.floor(n)),n=a.width,p=a.height):(n=g,p=k);b=document.createElement("canvas");b.width=n;b.height=p;var q=b.getContext("2d"),r=new Uint8Array(g*k*4),t=this._renderingContext,u=l.create(t,
{colorTarget:1,depthStencilTarget:3,width:c,height:d});t.bindFramebuffer(u);t.setViewport(0,0,c,d);this._cachedRenderParams.budget&&this._cachedRenderParams.budget.reset(Number.MAX_VALUE);var v=this._cachedRenderParams,w=this._renderingContext.gl;this._renderingContext.setClearColor(0,0,0,0);this._renderingContext.setClearDepth(1);this._renderingContext.setClearStencil(0);this._renderingContext.clear(w.COLOR_BUFFER_BIT|w.DEPTH_BUFFER_BIT|w.STENCIL_BUFFER_BIT);v.context=this._renderingContext;this.beforeRenderChildren(v,
v);if(void 0!==a.rotation&&null!==a.rotation){var w=v.state,x=w.clone();x.viewpoint.rotation=a.rotation;v.state=x;this.renderChildren(v);v.state=w}else this.renderChildren(v);this.afterRenderChildren(v,v);u.readPixels(e,d-(f+k),g,k,6408,5121,r);t.bindFramebuffer();t=q.getImageData(0,0,n,p);if(0!==e||0!==f||g!==c||k!==d||n!==c||p!==d)h.resampleHermite(r,g,k,t.data,n,p,!0);else{f=k-1;k=0;u=4*g;for(x=w=e=d=c=g=v=void 0;k<f;){w=k*u;x=f*u;for(v=0;v<u;v+=4)g=r[w+v],c=r[w+v+1],d=r[w+v+2],e=r[w+v+3],r[w+
v]=r[x+v],r[w+v+1]=r[x+v+1],r[w+v+2]=r[x+v+2],r[w+v+3]=r[x+v+3],r[x+v]=g,r[x+v+1]=c,r[x+v+2]=d,r[x+v+3]=e;k++;f--}g=t.data;c=r.length;for(f=0;f<c;f++)g[f]=r[f]}r=t.data;k=r.length;for(f=0;f<k;f+=4)e=r[f+3],0<e&&(d=e/255,g=Math.floor(r[f+0]/d),c=Math.floor(r[f+1]/d),d=Math.floor(r[f+2]/d),r[f+0]=255>=g?g:255,r[f+1]=255>=c?c:255,r[f+2]=255>=d?d:255);q.putImageData(t,0,0);q=y[a.format?a.format.toLowerCase():"png"];r=1;void 0!==a.quality&&(r=a.quality/100);a=b.toDataURL(q,r);return m.resolve({dataURL:a,
x:0,y:0,width:n,height:p})};e.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;return a};e.prototype.attachChild=function(a,
b){return a.attach(b)};e.prototype.detachChild=function(a,b){return a.detach(b)};e.prototype.renderChild=function(a,b){return a.processRender(b)};e.prototype._resizeCanvas=function(a){var b=this.element,c=b.style,d=a.state,e=a.devicePixelRatio;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"};e.prototype._initializeClipRenderer=function(a){if(this._clipRendererInitialized)return!0;this._blitRenderer=new g;
var b={a_pos:0},c=new n(a,w.stencilVS,w.stencilFS,b);if(!c)return!1;var d=t.createVertex(a,35040,32),e=new Uint16Array([0,1,2,2,1,3]),e=t.createIndex(a,35044,e);a=new q(a,b,{geometry:[{name:"a_pos",count:2,type:5126,offset:0,stride:8,normalized:!1,divisor:0}]},{geometry:d},e);this._clipStencilProgram=c;this._clipVBO=d;this._clipVAO=a;return this._clipRendererInitialized=!0};return e}(u)})},"esri/layers/vectorTiles/views/2d/libs/gl-matrix/common":function(){define([],function(){if(!b)var b=1E-6;if(!e)var e=
"undefined"!==typeof Float32Array?Float32Array:Array;if(!a)var a=Math.random;var c={GLMAT_EPSILON:b,GLMAT_ARRAY_TYPE:e,GLMAT_RANDOM:a,setMatrixArrayType:function(a){c.GLMAT_ARRAY_TYPE=a}},d=Math.PI/180,f=180/Math.PI;c.toRadian=function(a){return a*d};c.toDegree=function(a){return a*f};c.setMatrixArrayType(Array);return c})},"esri/layers/vectorTiles/views/2d/libs/gl-matrix/vec2":function(){define(["./common"],function(b){var e=b.GLMAT_ARRAY_TYPE,a=b.GLMAT_RANDOM,c={create:function(){var a=new e(2);
a[0]=0;a[1]=0;return a},clone:function(a){var b=new e(2);b[0]=a[0];b[1]=a[1];return b},fromValues:function(a,b){var c=new e(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}};c.sub=c.subtract;c.multiply=function(a,b,c){a[0]=b[0]*c[0];a[1]=b[1]*c[1];return a};c.mul=c.multiply;c.divide=function(a,b,c){a[0]=
b[0]/c[0];a[1]=b[1]/c[1];return a};c.div=c.divide;c.min=function(a,b,c){a[0]=Math.min(b[0],c[0]);a[1]=Math.min(b[1],c[1]);return a};c.max=function(a,b,c){a[0]=Math.max(b[0],c[0]);a[1]=Math.max(b[1],c[1]);return a};c.scale=function(a,b,c){a[0]=b[0]*c;a[1]=b[1]*c;return a};c.scaleAndAdd=function(a,b,c,e){a[0]=b[0]+c[0]*e;a[1]=b[1]+c[1]*e;return a};c.distance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return Math.sqrt(c*c+d*d)};c.dist=c.distance;c.squaredDistance=function(a,b){var c=b[0]-a[0],d=b[1]-
a[1];return c*c+d*d};c.sqrDist=c.squaredDistance;c.length=function(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)};c.len=c.length;c.squaredLength=function(a){var b=a[0];a=a[1];return b*b+a*a};c.sqrLen=c.squaredLength;c.negate=function(a,b){a[0]=-b[0];a[1]=-b[1];return a};c.inverse=function(a,b){a[0]=1/b[0];a[1]=1/b[1];return a};c.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};c.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]};c.cross=function(a,
b,c){b=b[0]*c[1]-b[1]*c[0];a[0]=a[1]=0;a[2]=b;return a};c.lerp=function(a,b,c,e){var d=b[0];b=b[1];a[0]=d+e*(c[0]-d);a[1]=b+e*(c[1]-b);return a};c.random=function(b,c){c=c||1;var d=2*a()*Math.PI;b[0]=Math.cos(d)*c;b[1]=Math.sin(d)*c;return b};c.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};c.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};c.transformMat3=function(a,b,c){var d=b[0];b=b[1];a[0]=
c[0]*d+c[3]*b+c[6];a[1]=c[1]*d+c[4]*b+c[7];return a};c.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};c.forEach=function(){var a=c.create();return function(b,c,d,e,k,l){c||(c=2);d||(d=0);for(e=e?Math.min(e*c+d,b.length):b.length;d<e;d+=c)a[0]=b[d],a[1]=b[d+1],k(a,a,l),b[d]=a[0],b[d+1]=a[1];return b}}();c.str=function(a){return"vec2("+a[0]+", "+a[1]+")"};return c})},"esri/layers/vectorTiles/views/2d/libs/gl-matrix/mat2d":function(){define(["./common"],
function(b){var e=b.GLMAT_ARRAY_TYPE;b={create:function(){var a=new e(6);a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=0;a[5]=0;return a},clone:function(a){var b=new e(6);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},copy:function(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=0;a[5]=0;return a},invert:function(a,b){var c=b[0],e=b[1],g=b[2],h=b[3],m=b[4],k=b[5],l=c*h-e*g;if(!l)return null;l=1/l;a[0]=h*l;a[1]=
-e*l;a[2]=-g*l;a[3]=c*l;a[4]=(g*k-h*m)*l;a[5]=(e*m-c*k)*l;return a},determinant:function(a){return a[0]*a[3]-a[1]*a[2]},multiply:function(a,b,d){var c=b[0],e=b[1],h=b[2],m=b[3],k=b[4];b=b[5];var l=d[0],p=d[1],n=d[2],q=d[3],t=d[4];d=d[5];a[0]=c*l+h*p;a[1]=e*l+m*p;a[2]=c*n+h*q;a[3]=e*n+m*q;a[4]=c*t+h*d+k;a[5]=e*t+m*d+b;return a}};b.mul=b.multiply;b.rotate=function(a,b,d){var c=b[0],e=b[1],h=b[2],m=b[3],k=b[4];b=b[5];var l=Math.sin(d);d=Math.cos(d);a[0]=c*d+h*l;a[1]=e*d+m*l;a[2]=c*-l+h*d;a[3]=e*-l+m*
d;a[4]=k;a[5]=b;return a};b.scale=function(a,b,d){var c=b[1],e=b[2],h=b[3],m=b[4],k=b[5],l=d[0];d=d[1];a[0]=b[0]*l;a[1]=c*l;a[2]=e*d;a[3]=h*d;a[4]=m;a[5]=k;return a};b.translate=function(a,b,d){var c=b[0],e=b[1],h=b[2],m=b[3],k=b[4];b=b[5];var l=d[0];d=d[1];a[0]=c;a[1]=e;a[2]=h;a[3]=m;a[4]=c*l+h*d+k;a[5]=e*l+m*d+b;return a};b.fromRotation=function(a,b){var c=Math.sin(b),e=Math.cos(b);a[0]=e;a[1]=c;a[2]=-c;a[3]=e;a[4]=0;a[5]=0;return a};b.fromScaling=function(a,b){a[0]=b[0];a[1]=0;a[2]=0;a[3]=b[1];
a[4]=0;a[5]=0;return a};b.fromTranslation=function(a,b){a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=b[0];a[5]=b[1];return a};b.str=function(a){return"mat2d("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"};b.frob=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)+Math.pow(a[3],2)+Math.pow(a[4],2)+Math.pow(a[5],2)+1)};return b})},"esri/layers/vectorTiles/views/2d/engine/webgl/BitBlitRenderer":function(){define("require exports ../../../webgl/Program ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ./shaders/glShaderSnippets".split(" "),
function(b,e,a,c,d,f){return function(){function b(){this._initialized=!1}b.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())};b.prototype._initialize=function(b){if(this._initialized)return!0;var e={a_pos:0,a_tex:1},
g=new a(b,f.bitblitVS,f.bitblitFS,e);if(!g)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;b=new c(b,e,{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:d.createVertex(b,35044,h)});this._program=g;this._vertexArrayObject=b;return this._initialized=!0};return b}()})},"esri/layers/vectorTiles/views/2d/engine/webgl/shaders/glShaderSnippets":function(){define("require exports ../../../../webgl/ShaderSnippets dojo/text!./bitblit.vs.glsl dojo/text!./bitblit.fs.glsl dojo/text!./stencil.vs.glsl dojo/text!./stencil.fs.glsl dojo/text!./background.vs.glsl dojo/text!./background.fs.glsl dojo/text!./tileInfo.vs.glsl dojo/text!./tileInfo.fs.glsl".split(" "),
function(b,e,a,c,d,f,g,h,m,k,l){function p(a,b){n+='\x3csnippet name\x3d"'+a+'"\x3e\x3c![CDATA[';n+=b;n+="]]\x3e\x3c/snippet\x3e"}var n="",n=n+'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e',n=n+"\x3csnippets\x3e";p("bitblitVS",c);p("bitblitFS",d);p("stencilVS",f);p("stencilFS",g);p("backgroundVS",h);p("backgroundFS",m);p("tileInfoVS",k);p("tileInfoFS",l);n+="\x3c/snippets\x3e";b=new a;a.parse(n,b);return b})},"esri/layers/vectorTiles/views/support/screenshotUtils":function(){define(["require",
"exports","dojo/_base/lang"],function(b,e,a){Object.defineProperty(e,"__esModule",{value:!0});e.adjustScreenshotSettings=function(b,d){b=a.mixin({format:"png",quality:100},b||{});var c,e;b.includePadding?(c=d.width,e=d.height):(c=d.width-d.padding.left-d.padding.right,e=d.height-d.padding.top-d.padding.bottom);var h=c/e;void 0!==b.width&&void 0===b.height?b.height=b.width/h:void 0!==b.height&&void 0===b.width&&(b.width=h*b.height);void 0!==b.height&&(b.height=Math.floor(b.height));void 0!==b.width&&
(b.width=Math.floor(b.width));b.area||b.includePadding||(b.area={x:d.padding.left,y:d.padding.top,width:c,height:e});return b};e.resampleHermite=function(a,b,e,g,h,m,k){void 0===k&&(k=!0);var c=b/h;e/=m;for(var d=Math.ceil(c/2),f=Math.ceil(e/2),q=0;q<m;q++)for(var t=0;t<h;t++){for(var r=4*(t+(k?m-q-1:q)*h),u=0,w=0,v=0,y=0,x=0,z=0,A=0,B=(q+.5)*e,D=Math.floor(q*e);D<(q+1)*e;D++)for(var F=Math.abs(B-(D+.5))/f,C=(t+.5)*c,F=F*F,H=Math.floor(t*c);H<(t+1)*c;H++){var E=Math.abs(C-(H+.5))/d,u=Math.sqrt(F+
E*E);-1<=u&&1>=u&&(u=2*u*u*u-3*u*u+1,0<u&&(E=4*(H+D*b),A+=u*a[E+3],v+=u,255>a[E+3]&&(u=u*a[E+3]/250),y+=u*a[E],x+=u*a[E+1],z+=u*a[E+2],w+=u))}g[r]=y/w;g[r+1]=x/w;g[r+2]=z/w;g[r+3]=A/v}}})},"esri/layers/vectorTiles/views/webgl/RenderingContext":function(){define(["require","exports","./enums","./Extensions"],function(b,e,a,c){return function(){function b(a,b){this.gl=null;this._extensions=void 0;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=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};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.gl=a;this._extensions=new c(a,b);var d=a.getParameter(a.VIEWPORT);this._viewport={x:d[0],y:d[1],width:d[2],height:d[3]};d=this.extensions.textureFilterAnisotropic;
this._parameters={versionString:a.getParameter(a.VERSION),maxVertexTextureImageUnits:a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxVertexAttributes:a.getParameter(a.MAX_VERTEX_ATTRIBS),maxMaxAnisotropy:d?a.getParameter(d.MAX_TEXTURE_MAX_ANISOTROPY_EXT):void 0,maxTextureImageUnits:a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)};this.enforceState()}Object.defineProperty(b.prototype,"extensions",{get:function(){return this._extensions},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
"contextAttributes",{get:function(){return this.gl.getContextAttributes()},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"parameters",{get:function(){return this._parameters},enumerable:!0,configurable:!0});b.prototype.dispose=function(){this.bindVAO(null);this.unbindBuffer(34962);this.unbindBuffer(34963);this._textureUnitMap={};this.gl=null};b.prototype.setBlendingEnabled=function(a){this._blendEnabled!==a&&(!0===a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),
this._blendEnabled=a)};b.prototype.setBlendColor=function(a,b,c,d){if(a!==this._blendColorState.r||b!==this._blendColorState.g||c!==this._blendColorState.b||d!==this._blendColorState.a)this.gl.blendColor(a,b,c,d),this._blendColorState.r=a,this._blendColorState.g=b,this._blendColorState.b=c,this._blendColorState.a=d};b.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};b.prototype.setBlendFunctionSeparate=function(a,b,c,d){if(this._blendFunctionState.srcRGB!==a||this._blendFunctionState.srcAlpha!==c||this._blendFunctionState.dstRGB!==b||this._blendFunctionState.dstAlpha!==d)this.gl.blendFuncSeparate(a,b,c,d),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=c,this._blendFunctionState.dstRGB=b,this._blendFunctionState.dstAlpha=d};b.prototype.setBlendEquation=function(a){this._blendEquationState.mode!==
a&&(this.gl.blendEquation(a),this._blendEquationState.mode=a,this._blendEquationState.modeAlpha=a)};b.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};b.prototype.setColorMask=function(a,b,c,d){if(this._colorMaskState.r!==a||this._colorMaskState.g!==b||this._colorMaskState.b!==c||this._colorMaskState.a!==d)this.gl.colorMask(a,
b,c,d),this._colorMaskState.r=a,this._colorMaskState.g=b,this._colorMaskState.b=c,this._colorMaskState.a=d};b.prototype.setClearColor=function(a,b,c,d){if(this._clearColor.r!==a||this._clearColor.g!==b||this._clearColor.b!==c||this._clearColor.a!==d)this.gl.clearColor(a,b,c,d),this._clearColor.r=a,this._clearColor.g=b,this._clearColor.b=c,this._clearColor.a=d};b.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)};b.prototype.setPolygonOffsetFillEnabled=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)};b.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)};b.prototype.setCullFace=function(a){this._cullFace!==a&&(this.gl.cullFace(a),
this._cullFace=a)};b.prototype.setFrontFace=function(a){this._frontFace!==a&&(this.gl.frontFace(a),this._frontFace=a)};b.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)};b.prototype.setScissorRect=function(a,b,c,d){if(this._scissorRect.x!==a||this._scissorRect.y!==b||this._scissorRect.width!==c||this._scissorRect.height!==d)this.gl.scissor(a,b,c,d),this._scissorRect.x=
a,this._scissorRect.y=b,this._scissorRect.width=c,this._scissorRect.height=d};b.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)};b.prototype.setClearDepth=function(a){this._clearDepth!==a&&(this.gl.clearDepth(a),this._clearDepth=a)};b.prototype.setDepthFunction=function(a){this._depthFunction!==a&&(this.gl.depthFunc(a),this._depthFunction=a)};b.prototype.setDepthWriteEnabled=
function(a){this._depthWriteEnabled!==a&&(this.gl.depthMask(a),this._depthWriteEnabled=a)};b.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};b.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)};b.prototype.setClearStencil=function(a){a!==this._clearStencil&&
(this.gl.clearStencil(a),this._clearStencil=a)};b.prototype.setStencilFunction=function(a,b,c){if(this._stencilFunction.func!==a||this._stencilFunction.ref!==b||this._stencilFunction.mask!==c)this.gl.stencilFunc(a,b,c),this._stencilFunction.face=1032,this._stencilFunction.func=a,this._stencilFunction.ref=b,this._stencilFunction.mask=c};b.prototype.setStencilFunctionSeparate=function(a,b,c,d){if(this._stencilFunction.face!==a||this._stencilFunction.func!==b||this._stencilFunction.ref!==c||this._stencilFunction.mask!==
d)this.gl.stencilFuncSeparate(a,b,c,d),this._stencilFunction.face=a,this._stencilFunction.func=b,this._stencilFunction.ref=c,this._stencilFunction.mask=d};b.prototype.setStencilWriteMask=function(a){this._stencilWriteMask!==a&&(this.gl.stencilMask(a),this._stencilWriteMask=a)};b.prototype.setStencilOp=function(a,b,c){if(this._stencilOperation.fail!==a||this._stencilOperation.zFail!==b||this._stencilOperation.zPass!==c)this.gl.stencilOp(a,b,c),this._stencilOperation.face=1032,this._stencilOperation.fail=
a,this._stencilOperation.zFail=b,this._stencilOperation.zPass=c};b.prototype.setStencilOpSeparate=function(a,b,c,d){if(this._stencilOperation.face!==a||this._stencilOperation.fail!==b||this._stencilOperation.zFail!==c||this._stencilOperation.zPass!==d)this.gl.stencilOpSeparate(a,b,c,d),this._stencilOperation.face=a,this._stencilOperation.face=a,this._stencilOperation.fail=b,this._stencilOperation.zFail=c,this._stencilOperation.zPass=d};b.prototype.setLineWidth=function(a){var b=this._lineWidth;this._lineWidth!==
a&&(this.gl.lineWidth(a),this._lineWidth=a);return b};b.prototype.setActiveTexture=function(b){var c=this._activeTextureUnit;0<=b&&b!==this._activeTextureUnit&&(this.gl.activeTexture(a.BASE_TEXTURE_UNIT+b),this._activeTextureUnit=b);return c};b.prototype.clear=function(a){a&&this.gl.clear(a)};b.prototype.drawArrays=function(a,b,c){this.gl.drawArrays(a,b,c)};b.prototype.drawElements=function(a,b,c,d){5123===c?this.gl.drawElements(a,b,c,d):5125===c&&this._extensions.elementIndexUint?this.gl.drawElements(a,
b,c,d):console.warn("Data type is uint however extension OES_Element_index_unit is not supported therefore this draw call cannot be made")};b.prototype.drawArraysInstanced=function(a,b,c,d){this._extensions.angleInstancedArrays?this._extensions.angleInstancedArrays.drawArraysInstancedANGLE(a,b,c,d):console.error("Extension ANGLE_instanced_arrays isn't supported!")};b.prototype.drawElementsInstanced=function(a,b,c,d,e){this._extensions.angleInstancedArrays?5125!==c||this._extensions.elementIndexUint?
this._extensions.angleInstancedArrays.drawElementsInstancedANGLE(a,b,c,d,e):console.error("Extension OES_Element_index_unit is not supported!"):console.error("Extension ANGLE_instanced_arrays isn't supported!")};b.prototype.setViewport=function(a,b,c,d){var e=this._viewport;if(e.x!==a||e.y!==b||e.width!==c||e.height!==d)e.x=a,e.y=b,e.width=c,e.height=d,this.gl.viewport(a,b,c,d)};b.prototype.getViewport=function(){return{x:this._viewport.x,y:this._viewport.y,width:this._viewport.width,height:this._viewport.height}};
b.prototype.bindProgram=function(a){a?this._activeShaderProgram!==a&&(a.initialize(),this.gl.useProgram(a.glName),this._activeShaderProgram=a):(this.gl.useProgram(null),this._activeShaderProgram=null)};b.prototype.bindTexture=function(a,c){void 0===c&&(c=0);-1===b._MAX_TEXTURE_IMAGE_UNITS&&(b._MAX_TEXTURE_IMAGE_UNITS=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS));(c>=b._MAX_TEXTURE_IMAGE_UNITS||0>c)&&console.error("Input texture unit is out of range of available units!");var d=this._textureUnitMap[c];
this.setActiveTexture(c);null==a||null==a.glName?(null!=d&&(this.gl.bindTexture(d.descriptor.target,null),d.setBoundToUnit(c,!1)),this._textureUnitMap[c]=null):d&&d.id===a.id?a.applyChanges():(this.gl.bindTexture(a.descriptor.target,a.glName),a.setBoundToUnit(c,!0),a.applyChanges(),this._textureUnitMap[c]=a)};b.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)};b.prototype.bindBuffer=function(a){a&&(34962===a.bufferType?this._activeVertexBuffer=b._bindBuffer(this.gl,a,a.bufferType,this._activeVertexBuffer):this._activeIndexBuffer=b._bindBuffer(this.gl,a,a.bufferType,this._activeIndexBuffer))};b.prototype.unbindBuffer=function(a){34962===a?this._activeVertexBuffer=b._bindBuffer(this.gl,null,a,this._activeVertexBuffer):this._activeIndexBuffer=b._bindBuffer(this.gl,null,a,this._activeIndexBuffer)};b.prototype.bindVAO=function(a){a?
this._activeVertexArrayObject&&this._activeVertexArrayObject.id===a.id||(a.bind(),this._activeVertexArrayObject=a):this._activeVertexArrayObject&&(this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null)};b.prototype.getBoundTexture=function(a){return this._textureUnitMap[a]};b.prototype.getBoundFramebufferObject=function(){return this._activeFramebuffer};b.prototype.getBoundVAO=function(){return this._activeVertexArrayObject};b.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,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,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)};b.prototype.enforceState=function(){var b=this.gl,c=this._extensions.vao;
c&&c.bindVertexArrayOES(null);for(var d=0;d<this.parameters.maxVertexAttributes;d++)b.disableVertexAttribArray(d);this._activeVertexBuffer?b.bindBuffer(this._activeVertexBuffer.bufferType,this._activeVertexBuffer.glName):b.bindBuffer(34962,null);this._activeIndexBuffer?b.bindBuffer(this._activeIndexBuffer.bufferType,this._activeIndexBuffer.glName):b.bindBuffer(34963,null);if(c&&this._activeVertexArrayObject){if(c=this._activeVertexArrayObject)this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=
null;this.bindVAO(c)}b.bindFramebuffer(b.FRAMEBUFFER,this._activeFramebuffer?this._activeFramebuffer.glName:null);b.useProgram(this._activeShaderProgram?this._activeShaderProgram.glName:null);b.blendColor(this._blendColorState.r,this._blendColorState.g,this._blendColorState.b,this._blendColorState.a);!0===this._blendEnabled?b.enable(this.gl.BLEND):b.disable(this.gl.BLEND);b.blendEquationSeparate(this._blendEquationState.mode,this._blendEquationState.modeAlpha);b.blendFuncSeparate(this._blendFunctionState.srcRGB,
this._blendFunctionState.dstRGB,this._blendFunctionState.srcAlpha,this._blendFunctionState.dstAlpha);b.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a);b.clearDepth(this._clearDepth);b.clearStencil(this._clearStencil);b.colorMask(this._colorMaskState.r,this._colorMaskState.g,this._colorMaskState.b,this._colorMaskState.a);b.cullFace(this._cullFace);b.depthFunc(this._depthFunction);b.depthRange(this._depthRange.zNear,this._depthRange.zFar);!0===this._depthTestEnabled?
b.enable(b.DEPTH_TEST):b.disable(b.DEPTH_TEST);b.depthMask(this._depthWriteEnabled);b.frontFace(this._frontFace);b.lineWidth(this._lineWidth);!0===this._polygonCullingEnabled?b.enable(b.CULL_FACE):b.disable(b.CULL_FACE);b.polygonOffset(this._polygonOffset[0],this._polygonOffset[1]);!0===this._polygonOffsetFillEnabled?b.enable(b.POLYGON_OFFSET_FILL):b.disable(b.POLYGON_OFFSET_FILL);b.scissor(this._scissorRect.x,this._scissorRect.y,this._scissorRect.width,this._scissorRect.height);!0===this._scissorTestEnabled?
b.enable(b.SCISSOR_TEST):b.disable(b.SCISSOR_TEST);b.stencilFunc(this._stencilFunction.func,this._stencilFunction.ref,this._stencilFunction.mask);b.stencilOpSeparate(this._stencilOperation.face,this._stencilOperation.fail,this._stencilOperation.zFail,this._stencilOperation.zPass);!0===this._stencilTestEnabled?b.enable(b.STENCIL_TEST):b.disable(b.STENCIL_TEST);b.stencilMask(this._stencilWriteMask);for(c=0;c<this.parameters.maxTextureImageUnits;c++)b.activeTexture(a.BASE_TEXTURE_UNIT+c),b.bindTexture(3553,
null),(d=this._textureUnitMap[c])&&b.bindTexture(d.descriptor.target,d.glName);b.activeTexture(a.BASE_TEXTURE_UNIT+this._activeTextureUnit);b.viewport(this._viewport.x,this._viewport.y,this._viewport.width,this._viewport.height)};b._bindBuffer=function(a,b,c,d){if(!b)return a.bindBuffer(c,null),null;if(d===b)return d;a.bindBuffer(c,b.glName);return b};b._MAX_TEXTURE_IMAGE_UNITS=-1;return b}()})},"esri/layers/vectorTiles/views/webgl/enums":function(){define(["require","exports"],function(b,e){Object.defineProperty(e,
"__esModule",{value:!0});e.BASE_TEXTURE_UNIT=33984})},"esri/layers/vectorTiles/views/webgl/Extensions":function(){define(["require","exports"],function(b,e){return function(){function a(a,b){this._colorBufferFloatInit=this._textureFloatLinearInit=this._textureFloatInit=this._disjointTimerQueryInit=this._compressedTextureS3TCInit=this._shaderTextureLODInit=this._textureFilterAnisotropicInit=this._depthTextureInit=this._elementIndexUintInit=this._standardDerivativesInit=this._angleInstancedArraysInit=
this._vaoInit=!1;this._gl=a;if(b&&b.disabledExtensions){var c=b.disabledExtensions;c.vao&&(this._vao=null,this._vaoInit=!0);c.angleInstancedArrays&&(this._angleInstancedArrays=null,this._angleInstancedArraysInit=!0);c.standardDerivatives&&(this._standardDerivatives=null,this._standardDerivativesInit=!0);c.elementIndexUint&&(this._elementIndexUint=null,this._elementIndexUintInit=!0);c.depthTexture&&(this._depthTexture=null,this._depthTextureInit=!0);c.textureFilterAnisotropic&&(this._textureFilterAnisotropic=
null,this._textureFilterAnisotropicInit=!0);c.compressedTextureS3TC&&(this._compressedTextureS3TC=null,this._compressedTextureS3TCInit=!0);c.shaderTextureLOD&&(this._shaderTextureLOD=null,this._shaderTextureLODInit=!0);c.disjointTimerQuery&&(this._disjointTimerQuery=null,this._disjointTimerQueryInit=!0);c.textureFloat&&(this._textureFloat=null,this._textureFloatInit=!0);c.textureFloatLinear&&(this._textureFloatLinear=null,this._textureFloatLinearInit=!0);c.colorBufferFloat&&(this._colorBufferFloat=
null,this._colorBufferFloatInit=!0)}}Object.defineProperty(a.prototype,"vao",{get:function(){this._vaoInit||(this._vao=this._gl.getExtension("OES_vertex_array_object")||this._gl.getExtension("MOZ_OES_vertex_array_object")||this._gl.getExtension("WEBKIT_OES_vertex_array_object"),this._vaoInit=!0);return this._vao},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"angleInstancedArrays",{get:function(){this._angleInstancedArraysInit||(this._angleInstancedArrays=this._gl.getExtension("ANGLE_instanced_arrays"),
this._angleInstancedArraysInit=!0);return this._angleInstancedArrays},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"standardDerivatives",{get:function(){this._standardDerivativesInit||(this._standardDerivatives=this._gl.getExtension("OES_standard_derivatives"),this._standardDerivativesInit=!0);return this._standardDerivatives},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"elementIndexUint",{get:function(){this._elementIndexUintInit||(this._elementIndexUint=
this._gl.getExtension("OES_element_index_uint"),this._elementIndexUintInit=!0);return this._elementIndexUint},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"depthTexture",{get:function(){this._depthTextureInit||(this._depthTexture=this._gl.getExtension("WEBGL_depth_texture")||this._gl.getExtension("MOZ_WEBGL_depth_texture")||this._gl.getExtension("WEBKIT_WEBGL_depth_texture"),this._depthTextureInit=!0);return this._depthTexture},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"textureFilterAnisotropic",{get:function(){this._textureFilterAnisotropicInit||(this._textureFilterAnisotropic=this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this._textureFilterAnisotropicInit=!0);return this._textureFilterAnisotropic},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"shaderTextureLOD",{get:function(){this._shaderTextureLODInit||(this._shaderTextureLOD=
this._gl.getExtension("EXT_shader_texture_lod"),this._shaderTextureLODInit=!0);return this._shaderTextureLOD},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"compressedTextureS3TC",{get:function(){this._compressedTextureS3TCInit||(this._compressedTextureS3TC=this._gl.getExtension("WEBGL_compressed_texture_s3tc"),this._compressedTextureS3TCInit=!0);return this._compressedTextureS3TC},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"disjointTimerQuery",{get:function(){this._disjointTimerQueryInit||
(this._disjointTimerQuery=this._gl.getExtension("EXT_disjoint_timer_query"),this._disjointTimerQueryInit=!0);return this._disjointTimerQuery},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textureFloat",{get:function(){this._textureFloatInit||(this._textureFloat=this._gl.getExtension("OES_texture_float"),this._textureFloatInit=!0);return this._textureFloat},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textureFloatLinear",{get:function(){this._textureFloatLinearInit||
(this._textureFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._textureFloatLinearInit=!0);return this._textureFloatLinear},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"colorBufferFloat",{get:function(){this._colorBufferFloatInit||(this._colorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),this._colorBufferFloatInit=!0);return this._colorBufferFloat},enumerable:!0,configurable:!0});return a}()})},"esri/layers/vectorTiles/views/webgl/webgl-utils":function(){define([],
function(){var b=function(b,a){for(var c=["webgl","experimental-webgl","webkit-3d","moz-webgl"],d=null,e=0;e<c.length;++e){try{d=b.getContext(c[e],a)}catch(g){}if(d)break}return d};return{create3DContext:b,setupWebGL:function(e,a){function c(a){var b=e.parentNode;b&&(b.innerHTML='\x3ctable style\x3d"background-color: #8CE; width: 100%; height: 100%;"\x3e\x3ctr\x3e\x3ctd align\x3d"center"\x3e\x3cdiv style\x3d"display: table-cell; vertical-align: middle;"\x3e\x3cdiv style\x3d""\x3e'+a+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}
if(!window.WebGLRenderingContext)return c('This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e'),[null,'This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e'];var d=b(e,a);return d?[d]:(c('It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'),
[null,'It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'])},detectWebGL:function(){var e;try{e=window.WebGLRenderingContext}catch(c){e=[!1,0]}var a;try{a=b(document.createElement("canvas"))}catch(c){a=[!1,1]}e?a?(e=a,e=[!0,{VERSION:e.getParameter(e.VERSION),SHADING_LANGUAGE_VERSION:e.getParameter(e.SHADING_LANGUAGE_VERSION),VENDOR:e.getParameter(e.VENDOR),RENDERER:e.getParameter(e.RENDERER),
EXTENSIONS:e.getSupportedExtensions(),MAX_TEXTURE_SIZE:e.getParameter(e.MAX_TEXTURE_SIZE),MAX_RENDERBUFFER_SIZE:e.getParameter(e.MAX_RENDERBUFFER_SIZE),MAX_VERTEX_TEXTURE_IMAGE_UNITS:e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)}]):e=[!1,1]:e=[!1,0];return e}}})},"esri/layers/vectorTiles/views/2d/engine/webgl/painter/WGLPainter":function(){define(["require","exports"],function(b,e){return function(){function a(){}a.prototype.initialize=function(a){};a.prototype.update=function(a,b){};return a}()})},
"esri/layers/vectorTiles/views/2d/FrameBudget":function(){define(["require","exports","../../core/now"],function(b,e,a){return function(){function b(a){void 0===a&&(a=Number.MAX_VALUE);this._budget=this._begin=0;this.enabled=!0;this.reset(a)}b.now=function(){return a()};Object.defineProperty(b.prototype,"done",{get:function(){return this.enabled&&this.elapsed>=this._budget},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"elapsed",{get:function(){return a()-this._begin},enumerable:!0,
configurable:!0});Object.defineProperty(b.prototype,"remaining",{get:function(){return Math.max(this._budget-this.elapsed,0)},enumerable:!0,configurable:!0});b.prototype.reset=function(b){void 0===b&&(b=Number.MAX_VALUE);this._begin=a();this._budget=this.enabled?b:Number.MAX_VALUE};return b}()})},"esri/layers/vectorTiles/views/2d/tiling/TileInfoView":function(){define("require exports ./LODInfo ./TileKey ./TileSpan ./TileCoverage".split(" "),function(b,e,a,c,d,f){var g=function(){function a(a,b,c,
d,e,f,g,h){this.x=a;this.ymin=b;this.ymax=c;this.invM=d;this.leftAdjust=e;this.rightAdjust=f;this.leftBound=g;this.rightBound=h}a.create=function(b,c){b[1]>c[1]&&(d=[c,b],b=d[0],c=d[1]);var d=b[0],e=b[1],f=c[0],g=c[1],h=f-d,k=g-e,k=0!==k?h/k:0,l=(Math.ceil(e)-e)*k,m=(Math.floor(e)-e)*k;return new a(d,Math.floor(e),Math.ceil(g),k,0>h?l:m,0>h?m:l,0>h?f:d,0>h?d:f);var d};a.prototype.incrRow=function(){this.x+=this.invM};a.prototype.getLeftCol=function(){return Math.max(this.x+this.leftAdjust,this.leftBound)};
a.prototype.getRightCol=function(){return Math.min(this.x+this.rightAdjust,this.rightBound)};return a}(),h=[[0,0],[0,0],[0,0],[0,0]];return function(){function b(b,c){var d=this;this.tileInfo=b;this.fullExtent=c;this.scales=[];this._lodInfos=null;this._infoByScale={};this._infoByLevel={};var e=b.lods.slice();e.sort(function(a,b){return b.scale-a.scale});var f=this._lodInfos=e.map(function(d){return a.create(b,d,c)});e.forEach(function(a,b){d._infoByLevel[a.level]=f[b];d._infoByScale[a.scale]=f[b];
d.scales[b]=a.scale},this);this._wrap=b.isWrappable}b.prototype.getTileBounds=function(a,b){var c=this._infoByLevel[b.level];return c?c.getTileBounds(a,b):a};b.prototype.getTileCoords=function(a,b){var c=this._infoByLevel[b.level];return c?c.getTileCoords(a,b):a};b.prototype.getTileCoverage=function(a){var b=this.getClosestInfoForScale(a.scale),c=f.pool.acquire(b),e=this._wrap,k;k=Infinity;var m=-Infinity,r,u,w=c.spans;h[0][0]=h[0][1]=h[1][1]=h[3][0]=0;h[1][0]=h[2][0]=a.size[0];h[2][1]=h[3][1]=a.size[1];
for(var v=0;v<h.length;v++){var y=h[v];a.toMap(y,y);y[0]=b.getColumnForX(y[0]);y[1]=b.getRowForY(y[1])}a=[];y=3;for(v=0;4>v;v++){if(h[v][1]!==h[y][1]){var x=g.create(h[v],h[y]);k=Math.min(x.ymin,k);m=Math.max(x.ymax,m);void 0===a[x.ymin]&&(a[x.ymin]=[]);a[x.ymin].push(x)}y=v}if(null==k||null==m||100<m-k)return null;for(y=[];k<m;){null!=a[k]&&(y=y.concat(a[k]));r=Infinity;u=-Infinity;for(v=y.length-1;0<=v;v--)x=y[v],r=Math.min(r,x.getLeftCol()),u=Math.max(u,x.getRightCol());r=Math.floor(r);u=Math.floor(u);
if(k>=b.first[1]&&k<=b.last[1])if(e)if(b.size[0]<b.worldSize[0])for(x=Math.floor(u/b.worldSize[0]),v=Math.floor(r/b.worldSize[0]);v<=x;v++)w.push(new d(k,Math.max(b.getFirstColumnForWorld(v),r),Math.min(b.getLastColumnForWorld(v),u)));else w.push(new d(k,r,u));else r>b.last[0]||u<b.first[0]||(r=Math.max(r,b.first[0]),u=Math.min(u,b.last[0]),w.push(new d(k,r,u)));k+=1;for(v=y.length-1;0<=v;v--)x=y[v],x.ymax>=k?x.incrRow():y.splice(v,1)}return c};b.prototype.getTileIdAtParent=function(a,b){var d=c.pool.acquire(b),
e=this._infoByLevel[d.level];if(a.resolution<e.resolution)throw Error("Cannot calculate parent tile. destination LOD's resolution "+a.resolution+" is not a parent resolution of "+e.resolution);return a.resolution===e.resolution?d.id:c.getId(a.level,Math.floor(d.row*e.resolution/a.resolution+.01),Math.floor(d.col*e.resolution/a.resolution+.01),d.world)};b.prototype.getTileParentId=function(a){a=c.pool.acquire(a);var b=this._lodInfos.indexOf(this._infoByLevel[a.level])-1;if(0>b)return c.pool.release(a),
null;b=this.getTileIdAtParent(this._lodInfos[b],a);c.pool.release(a);return b};b.prototype.getTileResolution=function(a){return(a=this._infoByLevel[a.level])?a.resolution:-1};b.prototype.getTileScale=function(a){return(a=this._infoByLevel[a.level])?a.scale:-1};b.prototype.intersects=function(a,b){var d=c.pool.acquire(b),e=this._infoByLevel[d.level],f=a.lodInfo;if(f.resolution>e.resolution){var g=c.pool.acquire(this.getTileIdAtParent(f,d)),h=f.denormalizeCol(g.col,g.world),k=a.spans.some(function(a){return a.row===
g.row&&a.colFrom<=h&&a.colTo>=h});c.pool.release(d);c.pool.release(g);return k}if(f.resolution<e.resolution){var l=a.spans.reduce(function(a,b){a[0]=Math.min(a[0],b.row);a[1]=Math.max(a[1],b.row);a[2]=Math.min(a[2],b.colFrom);a[3]=Math.max(a[3],b.colTo);return a},[Infinity,-Infinity,Infinity,-Infinity]),k=l[0],m=l[1],y=l[2],l=l[3],x=e.denormalizeCol(d.col,d.world),z=f.getColumnForX(e.getXForColumn(x)),A=f.getRowForY(e.getYForRow(d.row)),x=f.getColumnForX(e.getXForColumn(x+1))-1,e=f.getRowForY(e.getYForRow(d.row+
1))-1;c.pool.release(d);return!(z>l||x<y||A>m||e<k)}var B=f.denormalizeCol(d.col,d.world),k=a.spans.some(function(a){return a.row===d.row&&a.colFrom<=B&&a.colTo>=B});c.pool.release(d);return k};b.prototype.getClosestInfoForScale=function(a){var b=this.scales;this._infoByScale[a]||(a=b.reduce(function(b,c,d,e){return Math.abs(c-a)<Math.abs(b-a)?c:b},b[0]));return this._infoByScale[a]};return b}()})},"esri/layers/vectorTiles/views/2d/tiling/LODInfo":function(){define(["require","exports","./TileKey",
"../../../geometry/support/spatialReferenceUtils"],function(b,e,a,c){function d(a,b,c){a[0]=b;a[1]=c;return a}return function(){function b(a,b,c,d,e,f,n,q,t,r,u,w){this.level=a;this.resolution=b;this.scale=c;this.origin=d;this.first=e;this.last=f;this.size=n;this.norm=q;this.worldStart=t;this.worldEnd=r;this.worldSize=u;this.wrap=w}b.create=function(a,e,f){var g=c.getInfo(a.spatialReference),h=[a.origin.x,a.origin.y],m=[a.size[0]*e.resolution,a.size[1]*e.resolution],n=[-Infinity,-Infinity],q=[Infinity,
Infinity],t=[Infinity,Infinity];f&&(d(n,Math.max(0,Math.floor((f.xmin-h[0])/m[0])),Math.max(0,Math.floor((h[1]-f.ymax)/m[1]))),d(q,Math.max(0,Math.floor((f.xmax-h[0])/m[0])),Math.max(0,Math.floor((h[1]-f.ymin)/m[1]))),d(t,q[0]-n[0]+1,q[1]-n[1]+1));var r;a.isWrappable?(a=[Math.ceil(Math.round(2*g.origin[1]/e.resolution)/a.size[0]),t[1]],g=[Math.floor((g.origin[0]-h[0])/m[0]),n[1]],f=[a[0]+g[0]-1,q[1]],r=!0):(g=n,f=q,a=t,r=!1);return new b(e.level,e.resolution,e.scale,h,n,q,t,m,g,f,a,r)};b.prototype.normalizeCol=
function(a){if(!this.wrap)return a;var b=this.worldSize[0];return 0>a?b-1-Math.abs((a+1)%b):a%b};b.prototype.denormalizeCol=function(a,b){return this.wrap?this.worldSize[0]*b+a:a};b.prototype.getWorldForColumn=function(a){return this.wrap?Math.floor(a/this.worldSize[0]):0};b.prototype.getFirstColumnForWorld=function(a){return a*this.worldSize[0]+this.first[0]};b.prototype.getLastColumnForWorld=function(a){return a*this.worldSize[0]+this.first[0]+this.size[0]-1};b.prototype.getColumnForX=function(a){return(a-
this.origin[0])/this.norm[0]};b.prototype.getXForColumn=function(a){return this.origin[0]+a*this.norm[0]};b.prototype.getRowForY=function(a){return(this.origin[1]-a)/this.norm[1]};b.prototype.getYForRow=function(a){return this.origin[1]-a*this.norm[1]};b.prototype.getTileBounds=function(b,c){var d=a.pool.acquire(c),e=this.denormalizeCol(d.col,d.world),f=d.row,g=this.getXForColumn(e),h=this.getYForRow(f+1),e=this.getXForColumn(e+1),f=this.getYForRow(f);b[0]=g;b[1]=h;b[2]=e;b[3]=f;a.pool.release(d);
return b};b.prototype.getTileCoords=function(b,c){var e=a.pool.acquire(c);d(b,this.getXForColumn(this.denormalizeCol(e.col,e.world)),this.getYForRow(e.row));a.pool.release(e);return b};return b}()})},"esri/layers/vectorTiles/views/2d/tiling/TileSpan":function(){define(["require","exports","../../../core/ObjectPool"],function(b,e,a){return function(){function b(a,b,c){this.row=a;this.colFrom=b;this.colTo=c}b.pool=new a(b,!0);return b}()})},"esri/layers/vectorTiles/views/2d/tiling/TileCoverage":function(){define(["require",
"exports","../../../core/ObjectPool","../../../core/ArrayPool","./TileSpan"],function(b,e,a,c,d){return function(){function b(a){this.lodInfo=a;this.spans=c.acquire()}b.prototype.release=function(){for(var a=0,b=this.spans;a<b.length;a++)d.pool.release(b[a]);c.release(this.spans)};b.prototype.forEach=function(a,b){var c=this.spans,d=this.lodInfo,e=d.level;if(0!==c.length)for(var f=0;f<c.length;f++)for(var g=c[f],h=g.row,t=g.colTo,g=g.colFrom;g<=t;g++)a.call(b,e,h,d.normalizeCol(g),d.getWorldForColumn(g))};
b.pool=new a(b,!0);return b}()})},"esri/layers/vectorTiles/core/ArrayPool":function(){define(["require","exports","./ObjectPool"],function(b,e,a){function c(a){a.length=0}var d=Array.prototype.splice;b=function(){function b(b,d){void 0===b&&(b=50);void 0===d&&(d=50);this._pool=new a(Array,!1,c,d,b)}b.prototype.acquire=function(){return this._pool.acquire()};b.prototype.copy=function(a){var b=this.acquire();a.unshift(0,0);d.apply(b,a);a.splice(0,2);return b};b.prototype.release=function(a){this._pool.release(a)};
b.acquire=function(){return f.acquire()};b.copy=function(a){return f.copy(a)};b.release=function(a){return f.release(a)};return b}();var f=new b(100);return b})},"esri/layers/vectorTiles/views/2d/tiling/TileStrategy":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./TileKey"],function(b,e,a,c){var d=new c(0,0,0,0),f=new Map,g=[],h=[];return function(){function a(a){this._previousResolution=Number.POSITIVE_INFINITY;this.cachePolicy="keep";this.tileIndex=new Map;this.tiles=
[];this.acquireTile=a.acquireTile;this.releaseTile=a.releaseTile;this.tileInfoView=a.tileInfoView;a.cachePolicy&&(this.cachePolicy=a.cachePolicy)}a.prototype.destroy=function(){this.tileIndex.clear()};a.prototype.update=function(a){var b=this,c=this.tileIndex,e=this.tileInfoView.getTileCoverage(a.state);if(e){var k=e.spans,m=e.lodInfo,r=m.level,u=a.state.resolution,w=!a.stationary&&u>this._previousResolution;this._previousResolution=u;c.forEach(function(a){return a.visible=!0});this.tiles.length=
0;f.clear();var v=0,y=0;if(0<k.length)for(var x=0;x<k.length;x++){a=k[x];for(var z=a.row,A=a.colTo,B=a.colFrom;B<=A;B++)v++,a=d.set(r,z,m.normalizeCol(B),m.getWorldForColumn(B)).id,c.has(a)?(u=c.get(a),u.attached?(f.set(a,u),y++):u.attached||w||this._addParentTile(a,f)):(u=this.acquireTile(d),this.tileIndex.set(a,u),w||this._addParentTile(a,f))}var D=y===v;h.length=0;g.length=0;c.forEach(function(a,c){d.set(c);if(!f.has(c)){var k=b.tileInfoView.intersects(e,d);!k||!w&&D?"purge"===b.cachePolicy?g.push(c):
(d.level>r||!k)&&g.push(c):a.attached?h.push(c):w&&g.push(c)}});for(k=0;k<h.length;k++)a=h[k],(u=c.get(a))&&u.attached&&f.set(a,u);for(k=0;k<g.length;k++)a=g[k],u=c.get(a),this.releaseTile(u),c["delete"](a);f.forEach(function(a){return b.tiles.push(a)});c.forEach(function(a){f.has(a.key.id)||(a.visible=!1)});h.length=0;g.length=0;f.clear()}};a.prototype.clear=function(){var a=this,b=this.tileIndex;b.forEach(function(b){a.releaseTile(b)});b.clear()};a.prototype._addParentTile=function(a,b){for(var c=
a,d=null;;){c=this.tileInfoView.getTileParentId(c);if(!c)break;if(this.tileIndex.has(c)&&(d=this.tileIndex.get(c))&&d.attached){b.has(d.key.id)||b.set(d.key.id,d);break}}};return a}()})},"esri/layers/vectorTiles/views/2d/tiling/TileQueue":function(){define(["require","exports","../../../core/QueueProcessor"],function(b,e,a){function c(a,b){a.length=0;b.forEach(function(b){return a.push(b)});return a}var d=new Set,f=[],g=new Map;return function(){function b(b){var c=this;this.tileInfoView=b.tileInfoView;
this._queue=new a({concurrency:6,process:b.process,peeker:function(a){return c._peek(a)}})}Object.defineProperty(b.prototype,"length",{get:function(){return this._queue.length},enumerable:!0,configurable:!0});b.prototype.clear=function(){this._queue.clear()};b.prototype.find=function(a,b){return this._queue.find(a)};b.prototype.has=function(a){return this._queue.has(a)};b.prototype.pause=function(){return this._queue.pause()};b.prototype.push=function(a){return this._queue.push(a)};b.prototype.reset=
function(){return this._queue.reset()};b.prototype.resume=function(){return this._queue.resume()};b.prototype._peek=function(a){var b=this;if(!this.state)return a[0];var e=this.tileInfoView,h=Number.NEGATIVE_INFINITY,m=Number.POSITIVE_INFINITY;a.forEach(function(a){var c=b.tileInfoView.getTileScale(a);g.has(c)||(g.set(c,[]),h=Math.max(c,h),m=Math.min(c,m));g.get(c).push(a);d.add(c)});var q=this.state.scale;g.has(q)||(c(f,d),f.sort(),q=f.reduce(function(a,b,c,d){return Math.abs(b-q)<Math.abs(a-q)?
b:a},f[0]));q=Math.min(q,h);q=Math.max(q,m);a=g.get(q);var t=e.getClosestInfoForScale(q),r=t.getColumnForX(this.state.center[0]),u=t.getRowForY(this.state.center[1]);a.sort(function(a,b){var c=t.denormalizeCol(a.col,a.world),d=t.denormalizeCol(b.col,b.world);return Math.sqrt((r-c)*(r-c)+(u-a.row)*(u-a.row))-Math.sqrt((r-d)*(r-d)+(u-b.row)*(u-b.row))});d.clear();g.clear();return a[0]};return b}()})},"esri/layers/vectorTiles/core/QueueProcessor":function(){define(["require","exports","dojo/Deferred",
"./Queue"],function(b,e,a,c){var d={};return function(){function b(a){this._apiPromises=new Map;this._resolvingPromises=new Map;this._isPaused=!1;this.concurrency=1;a.concurrency&&(this.concurrency=a.concurrency);this._queue=new c(a.peeker?{peeker:a.peeker}:void 0);this.process=a.process}Object.defineProperty(b.prototype,"length",{get:function(){return this._resolvingPromises.size+this._queue.length},enumerable:!0,configurable:!0});b.prototype.clear=function(){this._queue.clear();var a=[];this._resolvingPromises.forEach(function(b){return a.push(b)});
this._resolvingPromises.clear();a.forEach(function(a){return a.cancel()});a.length=0;this._apiPromises.forEach(function(b){return a.push(b)});this._apiPromises.clear();a.forEach(function(a){return a.cancel()})};b.prototype.find=function(a,b){var c=this,d=void 0;this._apiPromises.forEach(function(e,f){a.call(b,f)&&(d=c._apiPromises.get(f).promise)});return d};b.prototype.has=function(a){return this._apiPromises.has(a)};b.prototype.pause=function(){this._isPaused=!0};b.prototype.push=function(b){var c=
this;if(this._apiPromises.has(b))return this._apiPromises.get(b).promise;var d=new a(function(a){c._resolvingPromises.has(b)?c._resolvingPromises.get(b).cancel(a):(c._remove(b),c._scheduleNext())});this._add(b,d);this._scheduleNext();return d.promise};b.prototype.reset=function(){var a=[];this._resolvingPromises.forEach(function(b){return a.push(b)});this._resolvingPromises.clear();a.forEach(function(a){return a.cancel(d)})};b.prototype.resume=function(){this._isPaused=!1;this._scheduleNext()};b.prototype._scheduleNext=
function(){this._isPaused||this._next()};b.prototype._next=function(){this._resolvingPromises.size!==this.concurrency&&this._process(this._queue.pop())};b.prototype._process=function(a){var b=this;if(null!=a){var c=this._apiPromises.get(a),e=this.process(a);e&&"function"===typeof e.then?(this._resolvingPromises.set(a,e),e.then(function(d){c.resolve(d);b._remove(a);b._scheduleNext()},function(e){e===d?b._process(a):(c.reject(e),b._remove(a),b._scheduleNext())})):(c.resolve(e),this._remove(a));this._scheduleNext()}};
b.prototype._add=function(a,b){this._apiPromises.set(a,b);this._queue.push(a)};b.prototype._remove=function(a){this._queue.remove(a);this._apiPromises.delete(a);this._resolvingPromises.delete(a)};return b}()})},"esri/layers/vectorTiles/core/Queue":function(){define(["require","exports"],function(b,e){return function(){function a(a){this._items=[];this._itemSet=new Set;this._peeker=function(a){return a[0]};this._length=0;a&&a.peeker&&(this._peeker=a.peeker)}Object.defineProperty(a.prototype,"length",
{get:function(){return this._length},enumerable:!0,configurable:!0});a.prototype.clear=function(){this._itemSet.clear();this._length=this._items.length=0};a.prototype.peek=function(){if(0!==this._length)return this._peeker(this._items)};a.prototype.push=function(a){this.contains(a)||this._add(a)};a.prototype.contains=function(a){return 0<this._length&&this._itemSet.has(a)};a.prototype.pop=function(){if(0!==this._length){var a=this.peek();this._remove(a);return a}};a.prototype.remove=function(a){this.contains(a)&&
this._remove(a)};a.prototype._add=function(a){this._items.push(a);this._itemSet.add(a);this._length++};a.prototype._remove=function(a){this._itemSet.delete(a);this._items.splice(this._items.indexOf(a),1);this._length--};return a}()})},"url:esri/layers/vectorTiles/views/vectorTiles/renderers/shaders/backgroundShaders.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"backgroundVS"\x3e\r\n    \x3c![CDATA[\r\n    precision mediump float;\r\n\r\n    attribute vec2 a_pos;\r\n\r\n  #ifdef ID\r\n    uniform mediump vec4 u_id;\r\n    varying mediump vec4 v_id;\r\n  #endif // ID\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  #ifdef PATTERN\r\n    uniform mediump mat3 u_pattern_matrix; // can we use medium precision?\r\n    varying mediump vec2 v_tileTextureCoord;\r\n  #endif // PATTERN\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  #ifdef PATTERN\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 tile coordinates\r\n      v_tileTextureCoord \x3d (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\r\n  #endif // PATTERN\r\n\r\n  #ifdef ID\r\n      v_id \x3d u_id / 255.0;\r\n  #endif // ID\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  #ifdef PATTERN\r\n    uniform lowp float u_opacity;\r\n    uniform mediump vec2 u_pattern_tl;\r\n    uniform mediump vec2 u_pattern_br;\r\n    uniform sampler2D u_texture;\r\n\r\n    varying mediump vec2 v_tileTextureCoord;\r\n  #else\r\n    uniform lowp vec4 u_color;\r\n  #endif // PATTERN\r\n\r\n  #ifdef ID\r\n    varying mediump vec4 v_id;\r\n  #endif // ID\r\n\r\n    void main() {\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\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(u_pattern_tl, u_pattern_br, normalizedTextureCoord);\r\n\r\n      // sample the sprite mosaic\r\n      lowp vec4 color \x3d texture2D(u_texture, samplePos);\r\n      gl_FragColor \x3d u_opacity * color;\r\n  #else\r\n      gl_FragColor \x3d u_color;\r\n  #endif // PATTERN\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',
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/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"fillVS"\x3e\r\n    \x3c![CDATA[\r\n      precision mediump float;\r\n\r\n      attribute vec2 a_pos;\r\n\r\n      uniform highp mat4 u_transformMatrix;\r\n      uniform highp vec2 u_normalized_origin;\r\n      uniform mediump float u_depth;\r\n\r\n    #ifdef PATTERN\r\n      uniform mediump mat3 u_pattern_matrix;\r\n      varying mediump vec2 v_tileTextureCoord;\r\n    #endif // PATTERN\r\n\r\n    #ifdef ID\r\n      uniform mediump vec4 u_id;\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n    #ifdef DD\r\n      attribute vec4 a_color;\r\n    #else\r\n      uniform lowp vec4 u_color;\r\n    #endif // DD\r\n      varying lowp vec4 v_color;\r\n\r\n      void main()\r\n      {\r\n      #ifdef DD\r\n        v_color \x3d a_color;\r\n      #else\r\n        v_color \x3d u_color;\r\n      #endif // DD\r\n\r\n      #ifdef ID\r\n        v_id \x3d u_id / 255.0;\r\n      #endif // ID\r\n\r\n      #ifdef PATTERN\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 tile coordinates\r\n        // (-4k to 8k -1) to texture coordinates.\r\n        v_tileTextureCoord \x3d (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\r\n      #endif // PATTERN\r\n\r\n        gl_Position \x3d vec4(u_normalized_origin, u_depth, 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\r\n    #ifdef PATTERN\r\n      uniform mediump vec2 u_pattern_tl;\r\n      uniform mediump vec2 u_pattern_br;\r\n      uniform lowp sampler2D u_texture;\r\n      varying mediump vec2 v_tileTextureCoord;\r\n    #endif // PATTERN\r\n\r\n    #ifdef ID\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      varying lowp vec4 v_color;\r\n\r\n      vec4 mixColors(vec4 color1, vec4 color2) {\r\n        // perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending)\r\n        // we use pre-multiplied colors hence the need for this kind of mixing. At lease we save ourselves an extra division...\r\n        float compositeAlpha \x3d color2.a + color1.a * (1.0 - color2.a);\r\n        vec3 compositeColor \x3d color2.rgb + color1.rgb * (1.0 - color2.a);\r\n\r\n        return vec4(compositeColor, compositeAlpha);\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\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(u_pattern_tl, u_pattern_br, normalizedTextureCoord);\r\n\r\n        // sample the sprite mosaic\r\n        lowp vec4 color \x3d texture2D(u_texture, samplePos);\r\n        gl_FragColor \x3d v_color[3] * color;\r\n      #else\r\n        gl_FragColor \x3d v_color;\r\n      #endif // PATTERN\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',
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/shaders/outlineShaders.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"outlineVS"\x3e\r\n    \x3c![CDATA[\r\n      attribute vec2 a_pos;\r\n      attribute vec2 a_offset;\r\n      attribute vec2 a_xnormal;\r\n\r\n    #ifdef DD\r\n      attribute vec4 a_color;\r\n    #else\r\n      uniform lowp vec4 u_color;\r\n    #endif // DD\r\n      varying lowp vec4 v_color;\r\n\r\n    #ifdef ID\r\n      uniform mediump vec4 u_id;\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      uniform highp mat4 u_transformMatrix;\r\n      uniform highp mat4 u_extrudeMatrix;\r\n      uniform highp vec2 u_normalized_origin;\r\n      uniform mediump float u_depth;\r\n      uniform mediump float u_outline_width;\r\n\r\n      varying lowp vec2 v_normal;\r\n\r\n      const float scale \x3d 1.0 / 15.0;\r\n\r\n      void main()\r\n      {\r\n      #ifdef DD\r\n        v_color \x3d a_color;\r\n      #else\r\n        v_color \x3d u_color;\r\n      #endif // DD\r\n\r\n      #ifdef ID\r\n        v_id \x3d u_id / 255.0;\r\n      #endif // ID\r\n\r\n        v_normal \x3d a_xnormal;\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        mediump vec4 dist \x3d vec4(u_outline_width * a_offset * scale, 0.0, 0.0);\r\n\r\n        // Remove the texture normal bit of the position before scaling it with the\r\n        // model/view matrix. Add the extrusion vector *after* the model/view matrix\r\n        // because we\'re extruding the line in pixel space, regardless of the current\r\n        // tile\'s zoom level.\r\n        gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * dist;\r\n      }\r\n    ]]\x3e\r\n  \x3c/snippet\x3e\r\n\r\n  \x3csnippet name\x3d"outlineFS"\x3e\r\n    \x3c![CDATA[\r\n      varying lowp vec4 v_color;\r\n      varying mediump vec2 v_normal;\r\n\r\n    #ifdef ID\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      void main()\r\n      {\r\n        // Calculate the distance of the pixel from the line in pixels.\r\n        lowp float dist \x3d abs(v_normal.y);\r\n\r\n        lowp float alpha \x3d smoothstep(1.0, 0.0, dist);\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',
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/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"lineVS"\x3e\r\n    \x3c![CDATA[\r\n      /* The implementation of the renderer is based on the article and implementation of MB described here:\r\n      * https://www.mapbox.com/blog/drawing-antialiased-lines/\r\n      */\r\n\r\n      attribute vec2 a_pos;\r\n      attribute vec4 a_offsetAndNormal;\r\n      attribute vec2 a_accumulatedDistance;\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\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\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      uniform mediump float u_blur; // the feather distance at which the line edge fades out\r\n\r\n      // the z of the layer. Given by the order of the layers in the style\r\n      uniform mediump float u_depth;\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\r\n      // the accumulated distance along the line. We need this information in order to render the dashes.\r\n      varying highp float v_accumulatedDistance;\r\n\r\n      const float scale \x3d 1.0 / 31.0;\r\n\r\n    #ifdef DD\r\n      attribute vec4 a_color;\r\n      attribute mediump float a_width;\r\n    #else\r\n      uniform lowp vec4 u_color;\r\n      uniform mediump float u_width;\r\n    #endif // DD\r\n\r\n    #ifdef ID\r\n      uniform mediump vec4 u_id;\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      varying lowp vec4 v_color;\r\n      varying mediump float v_lineHalfWidth; // the inset and outset of the line\r\n\r\n    #ifndef PATTERN\r\n      uniform mediump vec2 u_dasharray;\r\n      varying mediump vec2 v_dasharray;\r\n    #endif\r\n\r\n      void main()\r\n      {\r\n        v_normal \x3d a_offsetAndNormal.zw * scale;\r\n\r\n      #ifdef DD\r\n        v_lineHalfWidth \x3d a_width + u_blur;\r\n      #else\r\n        v_lineHalfWidth \x3d u_width + u_blur;\r\n      #endif // DD\r\n\r\n        v_lineHalfWidth *\x3d 0.5;\r\n\r\n      #ifndef PATTERN\r\n      #ifdef DD\r\n        v_dasharray \x3d u_dasharray * a_width;\r\n      #else\r\n        v_dasharray \x3d u_dasharray * u_width;\r\n      #endif // DD\r\n      #endif\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        mediump vec2 dist \x3d v_lineHalfWidth * a_offsetAndNormal.xy * scale;\r\n\r\n        // transform the vertex\r\n        gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * vec4(dist, 0.0, 0.0);\r\n\r\n        // the accumulated distance will be used to calculate the dashes (or the no-data...)\r\n        v_accumulatedDistance \x3d a_accumulatedDistance.x;\r\n\r\n        #ifdef DD\r\n          v_color \x3d a_color;\r\n        #else\r\n          v_color \x3d u_color;\r\n        #endif // DD\r\n\r\n        #ifdef ID\r\n          v_id \x3d u_id / 255.0;\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      uniform mediump float u_blur;\r\n\r\n      varying mediump vec2 v_normal;\r\n      varying highp float v_accumulatedDistance;\r\n\r\n      varying mediump float v_lineHalfWidth;\r\n      varying lowp vec4 v_color;\r\n\r\n    #ifdef PATTERN\r\n      uniform mediump vec2 u_pattern_tl;\r\n      uniform mediump vec2 u_pattern_br;\r\n      uniform mediump vec2 u_spriteSize;\r\n      uniform sampler2D u_texture;\r\n\r\n      // Horizontal scale is used to scale the horizontal texture coordinate v_normal.x before adding it as an offset to the\r\n      // accumulated distance. Most vertices will have v_normal.x \x3d\x3d 0, because the pattern must be sampled only depending on\r\n      // the v_accumulatedDistance value. But tessellation at caps can have vertices with v_normal.x !\x3d 0, thus allowing to\r\n      // "keep moving" for a few more pixel even when the line has ended or has not started yet.\r\n      const mediump float tileCoordRatio \x3d 8.0;\r\n    #else\r\n      varying mediump vec2 v_dasharray;\r\n    #endif\r\n\r\n    #ifdef ID\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      void main()\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        // We need to count for both sides of the line.\r\n        lowp float alpha \x3d clamp(min(fragDist + u_blur + 1.0, v_lineHalfWidth - fragDist) / u_blur, 0.0, 1.0);\r\n\r\n      #ifdef PATTERN\r\n        // we need to calculate the relative portion of the line texture along the line given the accumulated distance aliong 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((v_accumulatedDistance + v_normal.x * v_lineHalfWidth * tileCoordRatio) / u_spriteSize.x, 1.0);\r\n\r\n        // in order to calculate the texture coordinates perpendicular 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 should 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. Interpolated 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. Interpolated normal is -1.0\r\n\r\n        mediump float relativeTexY \x3d 0.5 + (v_normal.y * v_lineHalfWidth / u_spriteSize.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(u_pattern_tl, u_pattern_br, 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        // finally write the fragment value\r\n        gl_FragColor \x3d alpha * v_color[3] * color;\r\n      #else\r\n        // now calculate the dashes given the accumulated distance of the line:\r\n        // start with calculating a normalized position along the line\r\n        lowp float dashPos \x3d  mod(v_accumulatedDistance, v_dasharray.x + v_dasharray.y);\r\n\r\n        // calculate the contribution to the alpha of the dash part. It is provided by the shortest portion of the position along the dash.\r\n        // we must clamp since the value might be bigger than 1 or smaller than zero (when over a dash).\r\n        //   | \x3c--- pos along the dash part\r\n        // -------_______-------_______\r\n        // when the dashPos is over the \'gap\' part of the dash dasharray.x - dashPos is negative and therefore the alpha will\r\n        // get clamped to zero.\r\n        // when dasharray.x - dashPos is positive, or when dashPos is smaller than 1.0, it gives us a soft edge to each dash part.\r\n        // along the direction of the line.\r\n        lowp float dashAlpha \x3d clamp(min(dashPos, v_dasharray.x - dashPos) + 0.5, 0.0, 1.0);\r\n\r\n        // if we don\'t have a no-data part to the dash then it is a solid line\r\n        dashAlpha \x3d max(sign(-v_dasharray.y), dashAlpha);\r\n        // finally multiply the fragment\'s alpha by the calculated dash-alpha\r\n        alpha *\x3d dashAlpha;\r\n\r\n        // output the fragment color\r\n        gl_FragColor \x3d alpha * v_color;\r\n      #endif // PATTERN\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',
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/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 module:esri/views/vectorTiles/renderers/vtShaderSnippets vtShaderSnippets}\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  \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\"iconVS\"\x3e\r\n    \x3c![CDATA[\r\n      attribute vec2 a_pos;\r\n      attribute vec2 a_vertexOffset;\r\n      attribute vec4 a_tex;\r\n      attribute vec4 a_levelInfo;\r\n\r\n    #ifdef DD\r\n      attribute vec4 a_color;\r\n      attribute mediump float a_size;\r\n    #else\r\n      uniform lowp vec4 u_color;\r\n      uniform mediump float u_size;\r\n    #endif // DD\r\n\r\n    #ifdef ID\r\n      uniform mediump vec4 u_id;\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      varying lowp vec4 v_color;\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\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\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 z of the layer. Given by the order of the layers in the style\r\n      uniform mediump float u_depth;\r\n\r\n      // the map's rotation from the north\r\n      uniform mediump float u_mapRotation;\r\n      uniform mediump float u_level;\r\n\r\n      // indicate whether the current set of iconst should be kept upright when the map is rotated\r\n      uniform lowp float u_keepUpright;\r\n\r\n      // the rate of the change in the opacity (fade) of the icons\r\n      uniform mediump float u_fadeSpeed;\r\n\r\n      // the low level we transition (to/from)\r\n      uniform mediump float u_minfadeLevel;\r\n\r\n      // the high level we transition (to/from)\r\n      uniform mediump float u_maxfadeLevel;\r\n\r\n      // the amount of fade given teh current time past the last recorded level\r\n      uniform mediump float u_fadeChange;\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\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      varying mediump vec2 v_size;\r\n\r\n      // the vertex offsets are given in integers, therefore in order to maintain a reasonable precision we multiply the values\r\n      // by 16 and then at the shader devide by the same number\r\n      const float C_OFFSET_PRECISION \x3d 1.0 / 32.0;\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 tileCoordRatio \x3d 1.0 / 8.0;\r\n\r\n      void main()\r\n      {\r\n        mediump float a_labelMinLevel \x3d a_levelInfo[0];\r\n        mediump float a_angle         \x3d a_levelInfo[1];\r\n        mediump float a_minLevel      \x3d a_levelInfo[2];\r\n        mediump float a_maxLevel      \x3d a_levelInfo[3];\r\n\r\n        // if the given vertex should not be visible simply clip it by adding it a value that will push it outside the clipping plane\r\n        mediump float delta_z \x3d 0.0;\r\n\r\n        // If the label rotates with the map, and if the rotated label is upside down, hide it\r\n        mediump float rotated \x3d mod(a_angle + u_mapRotation, 256.0);\r\n        delta_z +\x3d (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated)); //ie. z +\x3d (flip \x3e 0) \x26\x26 (64 \x3c\x3d rotated) \x26\x26 (rotated \x3c 192)\r\n\r\n        // u_level is the current service level adjusted for the change in font size\r\n        delta_z +\x3d 1.0 - step(a_minLevel, u_level); // Test if (level \x3c minLevel)\r\n        delta_z +\x3d step(a_maxLevel, u_level); // Test if (maxLevel \x3c\x3d level)\r\n\r\n        // calculate the alpha given the change in the fade and the fade-speed\r\n        lowp float alpha \x3d clamp((u_fadeChange - a_labelMinLevel) / u_fadeSpeed, 0.0, 1.0);\r\n\r\n        // if the speed is positive we are zooming in and therefore we need to 'fade-in'. Else we need to 'fade-out'\r\n        v_transparency \x3d (u_fadeSpeed \x3e\x3d 0.0 ? alpha : 1.0 - alpha);\r\n\r\n        // now deal with the min/max fade-levels. If we exceeded the level we simply snap to 0 or 1\r\n        if (u_maxfadeLevel \x3c a_labelMinLevel)\r\n        {\r\n          v_transparency \x3d 0.0;\r\n        }\r\n        if (u_minfadeLevel \x3e\x3d a_labelMinLevel)\r\n        {\r\n          v_transparency \x3d 1.0;\r\n        }\r\n\r\n        // if label had been faded out, clip it\r\n        delta_z +\x3d step(v_transparency, 0.0);\r\n\r\n        vec2 offset \x3d C_OFFSET_PRECISION * a_vertexOffset;\r\n\r\n        v_size \x3d abs(offset);\r\n\r\n      #ifdef SDF\r\n        offset \x3d (120.0 / 86.0) * offset;\r\n      #endif // SDF\r\n\r\n      #ifdef DD\r\n        mediump float icon_size \x3d a_size;\r\n      #else\r\n        mediump float icon_size \x3d u_size;\r\n      #endif // DD\r\n        gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * icon_size * vec4(offset, delta_z, 0.0);\r\n\r\n        float opacity;\r\n\r\n      #ifdef SDF\r\n      #ifdef DD\r\n        v_color \x3d a_color;\r\n      #else\r\n        v_color \x3d u_color;\r\n      #endif // DD\r\n        opacity \x3d u_opacity;\r\n      #else // SDF\r\n      #ifdef DD\r\n        opacity \x3d a_color.w;\r\n      #else\r\n        opacity \x3d u_opacity;\r\n      #endif // DD\r\n      #endif // SDF\r\n\r\n      #ifdef ID\r\n        v_id \x3d u_id / 255.0;\r\n      #endif // ID\r\n\r\n        v_tex \x3d a_tex.xy / u_mosaicSize;\r\n        v_transparency *\x3d opacity;\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; // SDF texture\r\n    #ifdef SDF\r\n      uniform lowp vec4 u_color; // a color to override the one of the vertex\r\n      uniform lowp vec4 u_outlineColor;\r\n      uniform mediump float u_outlineSize;\r\n    #endif // SDF\r\n\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      varying mediump vec2 v_size;\r\n\r\n    #ifdef SDF\r\n      varying lowp vec4 v_color;\r\n    #endif // SDF\r\n\r\n    #ifdef ID\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      // we need the conversion function from RGBA to float\r\n      $rgba2floatFunc\r\n\r\n      vec4 mixColors(vec4 color1, vec4 color2) {\r\n        // perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending)\r\n        // we use pre-multiplied colors hence the need for this kind of mixing. At lease we save ourselves an extra division...\r\n        float compositeAlpha \x3d color2.a + color1.a * (1.0 - color2.a);\r\n        vec3 compositeColor \x3d color2.rgb + color1.rgb * (1.0 - color2.a);\r\n\r\n        return vec4(compositeColor, compositeAlpha);\r\n      }\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 rgba2float(texture2D(u_texture, v_tex)) - 0.5;\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        // 1 / 86 represents a single pixel given the the size of the SDF is 128 and we add 4 pixels margins to deal with\r\n        // other non SDF types.\r\n        // The rasterized geometry takes only 86 pixels because of the extra 16 pixels margin for the outline.\r\n        const float sofetEdgeRatio \x3d 0.248062016; // \x3d\x3d\x3e (32.0 / 86.0) / 1.5;\r\n        float size \x3d max(v_size.x, v_size.y);\r\n        float dist \x3d d * sofetEdgeRatio * size;\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 (u_outlineSize \x3e 0.25) {\r\n          lowp vec4 outlinePixelColor \x3d u_outlineColor;\r\n          // the outline limit ratio is derived from the 16 pixels allocated for the outline and the fact that 1/86 represents\r\n          // a single pixel.\r\n          const float outlineLimitRatio \x3d (16.0 / 86.0);\r\n          float clampedOutlineSize \x3d sofetEdgeRatio * min(u_outlineSize, outlineLimitRatio * max(v_size.x, v_size.y));\r\n\r\n          outlinePixelColor *\x3d clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\r\n\r\n          // finally combine the outline and the fill colors\r\n          gl_FragColor \x3d v_transparency * mixColors(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        gl_FragColor \x3d v_transparency * texColor;\r\n      #endif // SDF\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\r\n",
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/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 module:esri/views/vectorTiles/renderers/vtShaderSnippets vtShaderSnippets}\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  \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"textVS"\x3e\r\n    \x3c![CDATA[\r\n      attribute vec2 a_pos;\r\n      attribute vec2 a_vertexOffset;\r\n      attribute vec4 a_tex;\r\n      attribute vec4 a_levelInfo;\r\n\r\n      uniform lowp vec4 u_color; // always defined as halo does not support data driven but text does\r\n    #ifdef DD\r\n      attribute vec4 a_color;\r\n    #endif // DD\r\n      varying lowp vec4 v_color;\r\n\r\n    #ifdef DD\r\n      attribute mediump float a_size;\r\n    #else\r\n      uniform mediump float u_size;\r\n    #endif // DD\r\n      varying mediump float v_size;\r\n\r\n    #ifdef ID\r\n      uniform mediump vec4 u_id;\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n\r\n      // attribute bool a_visible; // --\x3e a one bit controlling the visibility of the vertex\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\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\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 z of the layer. Given by the order of the layers in the style\r\n      uniform mediump float u_depth;\r\n\r\n      // the map\'s rotation from the north\r\n      uniform mediump float u_mapRotation;\r\n      uniform mediump float u_level;\r\n\r\n      // indicate whether the current set of iconst should be kept upright when the map is rotated\r\n      uniform lowp float u_keepUpright;\r\n\r\n      // the rate of the change in the opacity (fade) of the icons\r\n      uniform mediump float u_fadeSpeed;\r\n\r\n      // the low level we transition (to/from)\r\n      uniform mediump float u_minfadeLevel;\r\n\r\n      // the high level we transition (to/from)\r\n      uniform mediump float u_maxfadeLevel;\r\n\r\n      // the amount of fade given teh current time past the last recorded level\r\n      uniform mediump float u_fadeChange;\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 lowp vec2 v_tex;\r\n\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\r\n      // outline position and appearance\r\n      const mediump float edgePos \x3d 0.75; // defined by the SDF encoding\r\n      uniform mediump float u_edgeDistance;\r\n      uniform mediump float u_edgeBlur;\r\n      uniform mediump float u_antialiasingWidth; // antialiasing (factors in the pixel_ratio for high res devices)\r\n\r\n      varying mediump float v_edgeDistance; // will factor in the size\r\n      varying mediump float v_edgeWidth; // will factor in the size\r\n\r\n      uniform lowp float u_halo; // needed to avoid using the color attribute for halo\r\n\r\n      void main()\r\n      {\r\n        mediump float a_labelMinLevel \x3d a_levelInfo[0];\r\n        mediump float a_angle        \x3d a_levelInfo[1];\r\n        mediump float a_minLevel    \x3d a_levelInfo[2];\r\n        mediump float a_maxLevel    \x3d a_levelInfo[3];\r\n\r\n        // if the given vertex should not be visible simply clip it by adding it a value that will push it outside the clipping plane\r\n        mediump float delta_z \x3d 0.0;\r\n\r\n        // TODO: force clipping the vertex in case that the vertex isn\'t visible\r\n        //delta_z +\x3d a_visible ? 0.0 : 1.0;\r\n\r\n        // If the label rotates with the map, and if the rotated label is upside down, hide it\r\n        mediump float rotated \x3d mod(a_angle + u_mapRotation, 256.0);\r\n        delta_z +\x3d (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated)); //ie. z +\x3d (flip \x3e 0) \x26\x26 (64 \x3c\x3d rotated) \x26\x26 (rotated \x3c 192)\r\n\r\n        // u_level is the current service level adjusted for the change in font size\r\n        delta_z +\x3d 1.0 - step(a_minLevel, u_level); // Test if (level \x3c minLevel)\r\n        delta_z +\x3d step(a_maxLevel, u_level); // Test if (maxLevel \x3c\x3d level)\r\n\r\n        // calculate the alpha given the change in the fade and the fade-speed\r\n        lowp float alpha \x3d clamp((u_fadeChange - a_labelMinLevel) / u_fadeSpeed, 0.0, 1.0);\r\n\r\n        // if the speed is positive we are zooming in and therefore we need to \'fade-in\'. Else we need to \'fade-out\'\r\n        v_transparency \x3d (u_fadeSpeed \x3e\x3d 0.0 ? alpha : 1.0 - alpha);\r\n\r\n        // now deal with the min/max fade-levels. If we exceeded the level we simply snap to 0 or 1\r\n        if (u_maxfadeLevel \x3c a_labelMinLevel)\r\n        {\r\n          v_transparency \x3d 0.0;\r\n        }\r\n        if (u_minfadeLevel \x3e\x3d a_labelMinLevel)\r\n        {\r\n          v_transparency \x3d 1.0;\r\n        }\r\n\r\n        // if label has been faded out, clip it\r\n        delta_z +\x3d step(v_transparency, 0.0);\r\n\r\n        v_tex \x3d a_tex.xy / u_mosaicSize;\r\n\r\n      #ifdef DD\r\n        if (u_halo \x3e 0.5)\r\n        {\r\n          v_color \x3d u_color;\r\n          v_transparency *\x3d u_opacity;\r\n        }\r\n        else\r\n        {\r\n          v_color \x3d a_color;\r\n          // opacity already factored in a_color\r\n        }\r\n      #else\r\n        v_color \x3d u_color;\r\n        v_transparency *\x3d u_opacity;\r\n      #endif // DD\r\n\r\n      #ifdef DD\r\n        v_size \x3d a_size;\r\n      #else\r\n        v_size \x3d u_size;\r\n      #endif // DD\r\n\r\n      #ifdef ID\r\n        v_id \x3d u_id / 255.0;\r\n      #endif // ID\r\n\r\n        v_edgeDistance \x3d edgePos - u_edgeDistance / v_size;\r\n        v_edgeWidth \x3d (u_antialiasingWidth + u_edgeBlur) / v_size;\r\n\r\n        gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * v_size * vec4(offsetPrecision * a_vertexOffset, delta_z, 0.0);\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      uniform lowp sampler2D u_texture;\r\n      uniform mediump float u_edgeDistance;\r\n\r\n      varying lowp vec2 v_tex;\r\n      varying lowp float v_transparency;\r\n      varying lowp vec4 v_color;\r\n      varying mediump float v_edgeWidth;\r\n      varying mediump float v_edgeDistance;\r\n\r\n    #ifdef ID\r\n      varying mediump vec4 v_id;\r\n    #endif // ID\r\n\r\n      // this is taken from http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf\r\n      // and https://www.mapbox.com/blog/text-signed-distance-fields/\r\n      // http://metalbyexample.com/rendering-text-in-metal-with-signed-distance-fields/\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        // use a smooth-step in order to calculate the geometry of the shape given by the distance field\r\n        mediump float alpha \x3d smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, 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\r\n\x3c/snippets\x3e\r\n\r\n',
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/shaders/tileInfo.vs.glsl":"attribute vec2 a_pos;\r\n\r\nuniform highp mat4 u_transformMatrix;\r\nuniform mediump vec2 u_normalized_origin;\r\nuniform mediump float u_depth;\r\nuniform mediump float u_coord_ratio;\r\nuniform mediump vec2 u_delta; // in tile coordinates\r\nuniform mediump vec2 u_dimensions; // in tile coordinates\r\n\r\nvarying mediump vec2 v_tex;\r\n\r\nvoid 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",
"url:esri/layers/vectorTiles/views/vectorTiles/renderers/shaders/tileInfo.fs.glsl":"uniform mediump sampler2D u_texture;\r\nvarying mediump vec2 v_tex;\r\n\r\nvoid 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","url:dijit/templates/Dialog.html":'\x3cdiv class\x3d"dijitDialog" role\x3d"dialog" aria-labelledby\x3d"${id}_title"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"titleBar" class\x3d"dijitDialogTitleBar"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitDialogTitle" id\x3d"${id}_title"\r\n\t\t\t\trole\x3d"heading" level\x3d"1"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"closeButtonNode" class\x3d"dijitDialogCloseIcon" data-dojo-attach-event\x3d"ondijitclick: onCancel" title\x3d"${buttonCancel}" role\x3d"button" tabindex\x3d"-1"\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"closeText" class\x3d"closeText" title\x3d"${buttonCancel}"\x3ex\x3c/span\x3e\r\n\t\t\x3c/span\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitDialogPaneContent"\x3e\x3c/div\x3e\r\n\t${!actionBarTemplate}\r\n\x3c/div\x3e\r\n\r\n',
"url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\r\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\r\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\ttabIndex\x3d"-1" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\r\n/\x3e\x3c/span\x3e\r\n',
"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip" data-dojo-attach-event\x3d"mouseenter:onMouseEnter,mouseleave:onMouseLeave"\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/bitblit.vs.glsl":"attribute vec2 a_pos;\r\nattribute vec2 a_tex;\r\n\r\nvarying mediump vec2 v_uv;\r\n\r\nvoid 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","url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/bitblit.fs.glsl":"\tuniform lowp sampler2D u_tex;\r\n\tuniform lowp float u_opacity;\r\n\r\n\tvarying mediump vec2 v_uv;\r\n\r\n\tvoid main() {\r\n\t\tlowp vec4 color \x3d texture2D(u_tex, v_uv);\r\n\r\n    // Note: output in pre-multiplied alpha for correct alpha compositing\r\n\t\tgl_FragColor \x3d color *  u_opacity;\r\n\t}\r\n",
"url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/stencil.vs.glsl":"attribute vec2 a_pos;\r\n\r\nvoid main() {\r\n  gl_Position \x3d vec4(a_pos, 0.0, 1.0);\r\n}\r\n","url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/stencil.fs.glsl":"void main() {\r\n  gl_FragColor \x3d vec4(1.0, 1.0, 1.0, 1.0);\r\n}\r\n","url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/background.vs.glsl":"attribute vec2 a_pos;\r\n\r\nuniform highp mat4 u_transformMatrix;\r\nuniform mediump vec2 u_normalized_origin;\r\nuniform mediump float u_coord_range;\r\nuniform mediump float u_depth;\r\n\r\nvoid 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",
"url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/background.fs.glsl":"uniform lowp vec4 u_color;\r\nvoid main() {\r\n  gl_FragColor \x3d u_color;\r\n}","url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/tileInfo.vs.glsl":"attribute vec2 a_pos;\r\n\r\nuniform highp mat4 u_transformMatrix;\r\nuniform mediump vec2 u_normalized_origin;\r\nuniform mediump float u_depth;\r\nuniform mediump float u_coord_ratio;\r\nuniform mediump vec2 u_delta; // in tile coordinates\r\nuniform mediump vec2 u_dimensions; // in tile coordinates\r\n\r\nvarying mediump vec2 v_tex;\r\n\r\nvoid 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",
"url:esri/layers/vectorTiles/views/2d/engine/webgl/shaders/tileInfo.fs.glsl":"uniform mediump sampler2D u_texture;\r\nvarying mediump vec2 v_tex;\r\n\r\nvoid 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","*now":function(b){b(['dojo/i18n!*preload*esri/layers/nls/VectorTileLayerImpl*["ar","az","ca","cs","da","de-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","ro","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},
"*noref":1}});
define("esri/layers/VectorTileLayerImpl","dojo/_base/lang dojo/has dojo/dom-construct dojo/dom-style dojo/io-query ../geometry/Extent ../geometry/screenUtils ../geometry/scaleUtils ../SpatialReference ../config ../lang ../domUtils ../urlUtils ../kernel ./layer ./TileInfo ./unitBezier ./vectorTiles/request ./vectorTiles/core/promiseUtils ./vectorTiles/core/urlUtils ./vectorTiles/geometry/support/spatialReferenceUtils ./vectorTiles/layers/support/vectorTileLayerLoader ./vectorTiles/views/vectorTiles/style/StyleRepository ./vectorTiles/views/vectorTiles/VectorTileContainer ./vectorTiles/views/vectorTiles/VectorTileDisplayObject ./vectorTiles/views/vectorTiles/TileHandler ./vectorTiles/views/2d/engine/StageGL ./vectorTiles/views/2d/FrameBudget ./vectorTiles/views/2d/tiling/TileInfoView ./vectorTiles/views/2d/tiling/TileStrategy ./vectorTiles/views/2d/tiling/TileKey ./vectorTiles/views/2d/tiling/TileQueue ./vectorTiles/views/webgl/webgl-utils".split(" "),function(b,
e,a,c,d,f,g,h,m,k,l,p,n,q,t,r,u,w,v,y,x,z,A,B,D,F,C,H,E,M,N,J,G){var I=u.ease;g=t.createSubclass({declaredClass:"esri.layers.VectorTileLayer",_mapsWithAttribution:["World_Basemap","World_Basemap_v2","World_Basemap_GCS_v2","World_Basemap_WGS84"],_eventMap:{"style-change":["style"]},constructor:function(a,b){this._frame=this._frame.bind(this);this._params=b||{};b&&b.tileServers&&b.tileServers.length&&(this.tileServers=b.tileServers=b.tileServers.map(function(a){return n.getAbsoluteUrl(a)},this));this._viewState=
{scale:0,width:0,height:0,size:[0,0],rotation:0,resolution:1,center:[0,0],worldScreenWidth:0,spatialReference:null,toScreen:function(a,b){var c=this.center[1]+this.resolution*this.height*.5;a[0]=(b[0]-(this.center[0]-this.resolution*this.width*.5))/this.resolution;a[1]=(c-b[1])/this.resolution;return a},toMap:function(a,b){var c=this.center[1]+this.resolution*this.height*.5;a[0]=this.center[0]-this.resolution*this.width*.5+b[0]*this.resolution;a[1]=c-b[1]*this.resolution;return a}};this._budget=new H(6);
this._renderParameters={budget:this._budget,state:this._viewState,devicePixelRatio:window.devicePixelRatio,stationary:!0};this._updateParameters={budget:this._budget,state:this._viewState,devicePixelRatio:window.devicePixelRatio,stationary:!0};this.setStyle(a);this.registerConnectEvents()},setStyle:function(a){return this.loadStyle(a)},getStyle:function(){return this.currentStyleInfo&&this.currentStyleInfo.style||null},opacity:1,setOpacity:function(a){if(this.opacity!=a)this.onOpacityChange(this.opacity=
a)},onOpacityChange:function(){},_pinching:!1,_refreshTS:null,_reCheckTS:/[\?\&]_ts=/ig,_reReplaceTS:/([\?\&]_ts=)[0-9]+/ig,addTimestampToURL:function(a){var b=this._refreshTS;b&&(a=this._reCheckTS.test(a)?a.replace(this._reReplaceTS,"$$$1"+b):a+((-1===a.indexOf("?")?"?":"\x26")+"_ts\x3d"+b));return a},getTileUrl:function(a,b,c){var e=this._getToken(),f=this._url&&this._url.query,g=this.tileServers[b%this.tileServers.length],g=g.replace(/\{z\}/gi,a.toString()).replace(/\{level\}/gi,a.toString()).replace(/\{y\}/gi,
b.toString()).replace(/\{row\}/gi,b.toString()).replace(/\{x\}/gi,c.toString()).replace(/\{col\}/gi,c.toString());f&&(g+="?"+d.objectToQuery(f));!e||f&&f.token||(g+=(-1===g.indexOf("?")?"?":"\x26")+"token\x3d"+e);g=this.addTimestampToURL(g);return n.addProxy(g)},loadStyle:function(a){if(this._loadingPromise&&"string"===typeof a&&this.url===a)return this._loadingPromise;this._stopDisplay();var b=this._loadingPromise;this._loadingPromise=z.loadMetadata(a).then(function(a){this.url=a.url;this._url=a.parsedUrl;
this.currentStyleInfo={serviceUrl:a.serviceUrl,styleUrl:a.styleUrl,style:a.style,layerDefinition:a.layerDefinition};this.styleRepository=new A(a.style,a);this._read(a.layerDefinition);this.onStyleChange(this.getStyle())}.bind(this)).then(function(){this.loaded||(this.loaded=!0,this.onLoad(this));this.suspended||this._tileHandler||this._startDisplay()}.bind(this)).otherwise(function(a){this._errorHandler(a);throw a;}.bind(this));b&&!b.isFulfilled()&&b.cancel();return this._loadingPromise},refresh:function(){this.suspended||
(this._refreshTS=Date.now(),this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD))},takeScreenshot:function(a){return this._stageGL?this._stageGL.takeScreenshot(a):v.reject("No valid GL context!")},_setMap:function(d,e,f){this.inherited(arguments);this._map=d;var g=this._div=a.create("div",null,e);c.set(g,{position:"absolute",width:d.width+"px",height:d.height+"px",overflow:"visible",opacity:this.opacity});this._onResizeHandle=d.on("resize",b.hitch(this,this._onResizeHandler));this._onOpacityHandle=
this.on("opacity-change",b.hitch(this,this._opacityChangeHandler));this._onScaleVisHandle=this.on("scale-visibility-change",b.hitch(this,function(){}));this._onVisibilityHandle=this.on("visibility-change",b.hitch(this,function(){}));this._stageGL=new C;this._stageGL.setElement(this._stageGL.createElement());this._div.appendChild(this._stageGL.element);this._stageGL.parent={requestChildRender:this._scheduleRender.bind(this)};this._stageGL.attach(this._renderParameters);this._startDisplay();this.evaluateSuspension();
if(this.suspended&&!d.loaded)var h=d.on("load",b.hitch(this,function(){h.remove();this.evaluateSuspension()}));return g},_unsetMap:function(b,c){this._map=null;this.suspended||this._stopDisplay();this._stageGL.detach(this._renderParameters);this._stageGL=null;a.destroy(this._div);this._div=null;this._handles&&this._handles.forEach(function(a){a.remove()});this._handles=null;this._onResizeHandle=this._onResizeHandle&&this._onResizeHandle.remove()&&null;this._onOpacityHandle=this._onOpacityHandle&&
this._onOpacityHandle.remove()&&null;this._onScaleVisHandle=this._onScaleVisHandle&&this._onScaleVisHandle.remove()&&null;this._onVisibilityHandle=this._onVisibilityHandle&&this._onVisibilityHandle.remove()&&null;this.inherited(arguments)},_read:function(a){this.version=a.currentVersion||a.version;this.fullExtent=new f(a.fullExtent);this.initialExtent=new f(a.initialExtent);this.spatialReference=this.fullExtent.spatialReference;this.tileInfo=new r(a.tileInfo);this.tileInfo.size=[this.tileInfo.cols,
this.tileInfo.height];this.tileInfo.spatialReference.isWrappable=this.tileInfo.spatialReference._isWrappable();this.tileInfo.scales=this.tileInfo.lods.map(function(a){return a.scale});this.tileInfo.scaleToZoom=function(a){for(var b=this.scales,c=b.length-1,d=0;d<c;d++){var e=b[d],f=b[d+1];if(e<=a)break;if(f===a)return d+1;if(e>a&&f<a)return d+1-(a-f)/(e-f)}return d};this._hasMin||this.setMinScale(a.minScale);this._hasMax||this.setMaxScale(a.maxScale);a.tileMap&&(this.tileIndexUrl=y.join(this.currentStyleInfo.serviceUrl,
a.tileMap));this._params.tileServers||(this.tileServers=this.currentStyleInfo.serviceUrl?a.tiles.map(function(a,b,c){return y.join(this.currentStyleInfo.serviceUrl,a)},this):a.tiles);a=null;this.currentStyleInfo.serviceUrl&&(a=y.urlToObject(this.currentStyleInfo.serviceUrl),a=this._getDefaultAttribution(a.path));a?(this.attributionDataUrl=a,this.hasAttributionData=!0):(this.attributionDataUrl=null,this.hasAttributionData=!1)},_getDefaultAttribution:function(a){var b=a.match(/^https?:\/\/(basemaps|basemapsbeta|basemapsdev)\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i);
if(b&&(a=b[3])){var b=b[2]||"",c;a=a.toLowerCase();for(var d=0,e=this._mapsWithAttribution.length;d<e;d++)if(c=this._mapsWithAttribution[d],-1<c.toLowerCase().indexOf(a))return a=window.location.protocol,("http:"===a||"https:"===a?a:"https:")+"//static.arcgis.com/attribution/Vector"+b+"/"+c}},_startDisplay:function(){var a={styleRepository:this.styleRepository,tileIndexUrl:this.tileIndexUrl,tileInfo:this.tileInfo,fullExtent:{width:this.fullExtent.getWidth()},getTileUrl:this.getTileUrl.bind(this)};
this._renderParameters.devicePixelRatio=this._updateParameters.devicePixelRatio=window.devicePixelRatio;this._vectorTileContainer=new B;this._stageGL.addChild(this._vectorTileContainer);this._viewState.spatialReference=this.tileInfo.spatialReference;this._tileInfoView=new E(this.tileInfo,this.fullExtent);this._tileRequests=new Map;this._tileHandler=new F(a,this._scheduleUpdate.bind(this),window.devicePixelRatio||1,!1,this._tileInfoView);this._viewState.spatialReference=this.spatialReference;this._tileHandler.start().then(function(){this._fetchQueue=
new J({tileInfoView:this._tileInfoView,process:this._getTileData.bind(this)});this._tileStrategy=new M({cachePolicy:"keep",acquireTile:this._acquireTile.bind(this),releaseTile:this._releaseTile.bind(this),tileInfoView:this._tileInfoView});this._vectorTileContainer.initialize(this._tileHandler.spriteMosaic,this._tileHandler.glyphMosaic,this.tileInfo,this._tileInfoView);this._scheduleUpdate()}.bind(this))},_stopDisplay:function(){this._tileStrategy&&(this._frameRequested=this._updateRequested=this._renderRequested=
!1,this._animation&&(this._animation.stop(),this._animation=null),this._tileRequests.forEach(function(a){a.cancel("cancel")}),this._vectorTileContainer.removeAllChildren(),this._stageGL.removeChild(this._vectorTileContainer),this._vectorTileContainer=null,this._tileHandler.stop(),this._tileHandler.destroy(),this._tileStrategy.destroy(),this._tileInfoView=this._tileHandler=this._tileStrategy=null)},_scheduleRender:function(){this._renderRequested=!0;this._map&&this._tileStrategy&&this._scheduleFrame()},
_scheduleUpdate:function(){this._updateRequested=!0;this._map&&this._tileStrategy&&this._scheduleFrame()},_scheduleFrame:function(){this._map&&!this._frameRequested&&(this._frameRequested=!0,K(this._frame))},_frame:function(){if(this._frameRequested){this._frameRequested=!1;this._renderParameters.devicePixelRatio!==window.devicePixelRatio&&(this._renderParameters.devicePixelRatio=this._updateParameters.devicePixelRatio=window.devicePixelRatio,this._stopDisplay(),this._startDisplay());this._animation&&
(this._animation.step(),this._animation.running||(this._animation=null));this._updateParameters.stationary=this._renderParameters.stationary=!this._animation&&!this._pinching&&!this._panning;this._budget.reset();this._viewState.resolution=this._viewState.scale/(39.37*h.getUnitValueForSR(this.spatialReference)*96);var a=0;this._viewState.spatialReference&&this._viewState.spatialReference._isWrappable()&&(a=x.getInfo(this._viewState.spatialReference),a=a.valid[1]-a.valid[0]);this._viewState.worldScreenWidth=
Math.round(a/this._viewState.resolution);this._renderRequested&&(this._renderRequested=!1,this._stageGL.doRender(this._renderParameters));this._updateRequested&&(this._updateRequested=!1,this._fetchQueue.pause(),this._fetchQueue.state=this._updateParameters.state,this._tileStrategy.update(this._updateParameters),this._fetchQueue.resume());this._animation&&(this._scheduleRender(),this._scheduleUpdate());this._checkUpdating()}},_setViewState:function(a){a=b.mixin(this._viewState,a);a.center.type&&(a.center=
[a.center.x,a.center.y]);this._scheduleRender();this._scheduleUpdate()},_animateViewState:function(a,b){var c=b.immediate||0===k.defaults.map.zoomDuration;this._animation=null;if(c)this._setViewState(a);else{var c=this._viewState,d=k.defaults.map.zoomDuration,e=P()+16,f=c.center[0],g=c.center[1],h=c.scale,l=Array.isArray(a.center)?a.center[0]:a.center.x,m=Array.isArray(a.center)?a.center[1]:a.center.y,n=a.scale||c.scale,p=this;this._animation={running:!0,stop:function(){this.running=!1},step:function(){if(this.running){var a=
(P()+16-e)/d;1<=a&&(a=1,this.running=!1);a=I(a);p._setViewState({center:[f+(l-f)*a,g+(m-g)*a],scale:h+(n-h)*a})}}};this._scheduleRender();this._scheduleUpdate()}},_checkUpdating:function(){var a=!0;this._tileRequests.forEach(function(b){a=a&&b.isFulfilled()});a&&(a=this._tileStrategy.tiles.every(function(a){return a.attached}));a?this._fireUpdateEnd():this._fireUpdateStart()},_acquireTile:function(a){var b=N.pool.acquire();b.set(a.level,a.row,a.col,a.world);a=this._tileHandler.getRefKey(b);var c=
this._tileHandler.getStyleRepository(),d=D.pool.acquire(b,a,this.tileInfo,c,this._tileHandler.glyphMosaic,0);a=this._fetchQueue.push(b).then(function(a){d.setData(a.tileData,a.workerId,a.connection);d.once("attach",this._scheduleUpdate.bind(this));this._vectorTileContainer.addChild(d)}.bind(this));this._tileRequests.set(b.id,a);return d},_releaseTile:function(a){var b=a.key.id,c=this._tileRequests.get(b);c.isFulfilled()||c.cancel();this._tileRequests["delete"](b);this._vectorTileContainer.removeChild(a);
this._scheduleUpdate();a.once("detach",function(){D.pool.release(a)})},_getTileData:function(a){return this._tileHandler.getTileData(a,0)},onStyleChange:function(a){},_opacityChangeHandler:function(a){this._div&&(this._div.style.opacity=a.opacity)},_onResizeHandler:function(a){var b=this._div&&this._div.style;b&&(b.width=a.width+"px",b.height=a.height+"px",this._setViewState({center:a.extent.getCenter(),width:a.width,height:a.height,size:[a.width,a.height]}))},onResume:function(){var a=this._map;
this.inherited(arguments);p.show(this._div);this._setViewState({center:a.extent.getCenter(),scale:a.getScale(),width:a.width,height:a.height,size:[a.width,a.height],spatialReference:a.spatialReference});this._handles=[a.on("pan-end",b.hitch(this,this._onPanEndHandler)),a.on("pan",b.hitch(this,this._onPanExtentChangeHandler)),a.on("extent-change",b.hitch(this,this._onExtentChangeHandler)),a.on("scale",b.hitch(this,this._onScaleHandler))]},onSuspend:function(){this.inherited(arguments);p.hide(this._div);
this._handles.forEach(function(a){a.remove()});this._handles=null},_onPanEndHandler:function(a){this._panning=!1;this._setViewState({center:a.extent.getCenter(),scale:this._map.getScale()})},_onPanExtentChangeHandler:function(a){this._panning=!0;this._animation&&(this._animation.stop(),this._animation=null);this._setViewState({center:a.extent.getCenter(),scale:this._map.getScale()})},_onExtentChangeHandler:function(a){var b=this._pinching||a.immediate;this._animateViewState({center:a.extent.getCenter(),
scale:a.lod.scale},{immediate:b});this._pinching=!1},_onScaleHandler:function(a){this._animation&&(this._animation.stop(),this._animation=null);var b=this._map;if(b._zoomAnimDiv.extent)this._pinching=this._panning=!1,this._animateViewState({center:b._zoomAnimDiv.extent.getCenter(),scale:b._zoomAnimDiv.newLod.scale},{immediate:a.immediate});else{var c=b.navigationManager,d=c._dragOrigin;a=b.extent.getCenter();var e=d.x-.5*b.width,d=d.y-.5*b.height,f=b.extent.getWidth()/b.width,g;c._pinchScale?(this._pinching=
!0,c=c._pinchScale,g=f/c,a.x-=e*(g-f),a.y+=d*(g-f),b=b.__LOD.scale/c,this._setViewState({center:a,scale:b})):c._zoomEndExtent&&(this._pinching=!1,c=b.getScale()/b.navigationManager._zoomEndLod.scale,g=f/c,a.x-=e*(g-f),a.y+=d*(g-f),b=b.navigationManager._zoomEndLod.scale,this._animateViewState({center:a,scale:b},{immediate:!1}))}}});g.ACCESS_TOKEN=null;g.supported=function(){return G.detectWebGL()[0]};var P=function(){var a,b=window.performance||{},c=b.now||b.webkitNow||b.msNow||b.oNow||b.mozNow;if(void 0!==
c)return function(){return c.call(b)};a=window.performance&&window.performance.timing&&window.performance.timing.navigationStart?window.performance.timing.navigationStart:(new Date).getTime();return function(){return(new Date).getTime()-a}}();m=e("ff");l=e("ie");q=e("webkit");e=e("opera");var L=(new Date).getTime(),K=window.requestAnimationFrame;K||(K=window[(q&&"webkit"||m&&"moz"||e&&"o"||l&&"ms")+"RequestAnimationFrame"])||(K=function(a){var b=P(),c=Math.max(0,16-(b-L)),d=window.setTimeout(function(){a(P())},
c);L=b+c;return d});return g});