{"size": 47199, "ext": "js", "max_stars_repo_path": "react-dashboard/build/static/js/93.24eee065.chunk.js", "max_stars_repo_name": "dulfrey/unfpa-visual-analytics", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "react-dashboard/build/static/js/93.24eee065.chunk.js", "max_issues_repo_name": "dulfrey/unfpa-visual-analytics", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "react-dashboard/build/static/js/93.24eee065.chunk.js", "max_forks_repo_name": "dulfrey/unfpa-visual-analytics", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23599.5, "max_line_length": 47153, "alphanum_fraction": 0.7124091612}
(this["webpackJsonpunfpa-front"]=this["webpackJsonpunfpa-front"]||[]).push([[93],{1034:function(e,t,r){"use strict";function a(e){var t,r=e.layer;return"floorInfo"in r&&null!=(t=r.floorInfo)&&t.floorField&&"floors"in e.view?o(e.view.floors,r.floorInfo.floorField):null}function n(e,t){var r;return"floorInfo"in t&&null!=(r=t.floorInfo)&&r.floorField?o(e,t.floorInfo.floorField):null}function i(e,t){var r=t.definitionExpression;return e?r?"(".concat(r,") AND (").concat(e,")"):e:r}function o(e,t){if(null==e||!e.length)return null;var r=e.filter((function(e){return""!==e})).map((function(e){return"'".concat(e,"'")}));return r.push("''"),"".concat(t," IN (").concat(r.join(","),") OR ").concat(t," IS NULL")}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n}))},1110:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var a=r(2),n=r(4),i=r(5),o=r(0),s=r(37),l=r(25),u=r(1),c=(r(13),r(17),r(12),r(7)),p=new s.a({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"}),b=function(e){Object(n.a)(r,e);var t=Object(i.a)(r);function r(e){var n;return Object(a.a)(this,r),(n=t.call(this,e)).description=null,n.type=null,n}return r}(l.a);Object(o.a)([Object(u.b)({type:String,json:{write:!0}})],b.prototype,"description",void 0),Object(o.a)([Object(u.b)({type:String,json:{read:p.read,write:p.write}})],b.prototype,"type",void 0);var f=b=Object(o.a)([Object(c.a)("esri.rest.support.GPMessage")],b)},1376:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return Et}));var a=r(6),n=r.n(a),i=r(15),o=r(11),s=r(2),l=r(3),u=r(4),c=r(5),p=r(0),b=r(37),f=r(1),y=(r(13),r(17)),d=(r(12),r(7)),m=r(27),v=r(14),h=r(82),O=r(81),g=r(75),j=r(22),x=r(8),w=r(39),S=r(29),k=r(121),P=r(552),D=r(33),I=r(57),L=r(48),M=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(){var e;return Object(s.a)(this,r),(e=t.apply(this,arguments)).outSpatialReference=null,e.processExtent=null,e.processSpatialReference=null,e.returnFeatureCollection=!1,e.returnM=!1,e.returnZ=!1,e}return r}(D.a);Object(p.a)([Object(f.b)({type:L.a})],M.prototype,"outSpatialReference",void 0),Object(p.a)([Object(f.b)({type:I.a})],M.prototype,"processExtent",void 0),Object(p.a)([Object(f.b)({type:L.a})],M.prototype,"processSpatialReference",void 0),Object(p.a)([Object(f.b)({nonNullable:!0})],M.prototype,"returnFeatureCollection",void 0),Object(p.a)([Object(f.b)({nonNullable:!0})],M.prototype,"returnM",void 0),Object(p.a)([Object(f.b)({nonNullable:!0})],M.prototype,"returnZ",void 0),(M=Object(p.a)([Object(d.a)("esri/rest/geoprocessor/GPOptions")],M)).from=Object(y.m)(M);var G=M,T=r(344),V=r(278),J=r(25),N=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(){var e;return Object(s.a)(this,r),(e=t.apply(this,arguments)).extent=null,e.height=null,e.href=null,e.opacity=1,e.rotation=0,e.scale=null,e.visible=!0,e.width=null,e}return r}(J.a);Object(p.a)([Object(f.b)({type:I.a})],N.prototype,"extent",void 0),Object(p.a)([Object(f.b)()],N.prototype,"height",void 0),Object(p.a)([Object(f.b)()],N.prototype,"href",void 0),Object(p.a)([Object(f.b)()],N.prototype,"opacity",void 0),Object(p.a)([Object(f.b)()],N.prototype,"rotation",void 0),Object(p.a)([Object(f.b)()],N.prototype,"scale",void 0),Object(p.a)([Object(f.b)()],N.prototype,"visible",void 0),Object(p.a)([Object(f.b)()],N.prototype,"width",void 0);var F=N=Object(p.a)([Object(d.a)("esri.layer.support.MapImage")],N),R=r(97),E=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e){var a;return Object(s.a)(this,r),(a=t.call(this,e)).itemId=null,a.url=null,a}return r}(J.a);Object(p.a)([Object(f.b)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],E.prototype,"itemId",void 0),Object(p.a)([Object(f.b)({type:String,json:{write:!0}})],E.prototype,"url",void 0);var A=E=Object(p.a)([Object(d.a)("esri.rest.support.DataFile")],E),C=r(145),U=new b.a({esriMeters:"meters",esriFeet:"feet",esriKilometers:"kilometers",esriMiles:"miles",esriNauticalMiles:"nautical-miles",esriYards:"yards"},{ignoreUnknown:!1}),_=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e){var a;return Object(s.a)(this,r),(a=t.call(this,e)).distance=0,a.units=null,a}return r}(J.a);Object(p.a)([Object(f.b)({json:{write:!0}})],_.prototype,"distance",void 0),Object(p.a)([Object(f.b)({json:{read:U.read,write:U.write}})],_.prototype,"units",void 0);var q=_=Object(p.a)([Object(d.a)("esri/rest/support/LinearUnit")],_),z=new b.a({GPBoolean:"boolean",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",GPField:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string","GPMultiValue:GPBoolean":"multi-value","GPMultiValue:GPDataFile":"multi-value","GPMultiValue:GPDate":"multi-value","GPMultiValue:GPDouble":"multi-value","GPMultiValue:GPFeatureRecordSetLayer":"multi-value","GPMultiValue:GPField":"multi-value","GPMultiValue:GPLinearUnit":"multi-value","GPMultiValue:GPLong":"multi-value","GPMultiValue:GPRasterData":"multi-value","GPMultiValue:GPRasterDataLayer":"multi-value","GPMultiValue:GPRecordSet":"multi-value","GPMultiValue:GPString":"multi-value"}),B=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e){var a;return Object(s.a)(this,r),(a=t.call(this,e)).dataType=null,a.value=null,a}return r}(J.a);Object(p.a)([Object(f.b)({json:{read:z.read,write:z.write}})],B.prototype,"dataType",void 0),Object(p.a)([Object(f.b)()],B.prototype,"value",void 0);var K=B=Object(p.a)([Object(d.a)("esri.rest.support.ParameterValue")],B),W=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e){var a;return Object(s.a)(this,r),(a=t.call(this,e)).format=null,a.itemId=null,a.url=null,a}return r}(J.a);Object(p.a)([Object(f.b)()],W.prototype,"format",void 0),Object(p.a)([Object(f.b)({json:{read:{source:"itemID"},write:{target:"itemID"}}})],W.prototype,"itemId",void 0),Object(p.a)([Object(f.b)()],W.prototype,"url",void 0);var Z=W=Object(p.a)([Object(d.a)("esri/rest/support/RasterData")],W);function Q(e,t,r,a,n){return Y.apply(this,arguments)}function Y(){return(Y=Object(i.a)(n.a.mark((function e(t,r,a,i,s){var l,u,c;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l={},u={},c=[],e.abrupt("return",(H(i,c,l),Object(T.a)(c).then((function(e){var n=a.outSpatialReference,c=a.processExtent,p=a.processSpatialReference,b=a.returnFeatureCollection,f=a.returnM,y=a.returnZ,d=Object(R.c)(t).path;for(var m in l){var v=l[m];u[m]=e.slice(v[0],v[1])}var h=n?n.wkid||n:null,O=p?p.wkid||p:null,j="execute"===r?{returnFeatureCollection:b||void 0,returnM:f||void 0,returnZ:y||void 0}:null,x=X(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},c?{context:{extent:c,outSR:h,processSR:O}}:{"env:outSR":h,"env:processSR":O}),i),j),{},{f:"json"}),null,u),w=Object(o.a)(Object(o.a)({},s),{},{query:x});return Object(g.default)("".concat(d,"/").concat(r),w)}))));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(e,t,r){for(var a in e){var n=e[a];if(n&&"object"==typeof n&&n instanceof C.default){var i=n.features;r[a]=[t.length,t.length+i.length],i.forEach((function(e){t.push(e.geometry)}))}}}function $(e){var t=e.dataType,r=K.fromJSON(e);switch(t){case"GPBoolean":case"GPDouble":case"GPLong":case"GPString":case"GPMultiValue:GPBoolean":case"GPMultiValue:GPDouble":case"GPMultiValue:GPLong":case"GPMultiValue:GPString":return r;case"GPDate":r.value=new Date(r.value);break;case"GPDataFile":r.value=A.fromJSON(r.value);break;case"GPLinearUnit":r.value=q.fromJSON(r.value);break;case"GPFeatureRecordSetLayer":case"GPRecordSet":var a=e.value.url;r.value=a?A.fromJSON(r.value):C.default.fromJSON(r.value);break;case"GPRasterData":case"GPRasterDataLayer":var n=e.value.mapImage;r.value=n?F.fromJSON(n):Z.fromJSON(r.value);break;case"GPField":r.value=V.a.fromJSON(r.value);break;case"GPMultiValue:GPDate":var i=r.value;r.value=i.map((function(e){return new Date(e)}));break;case"GPMultiValue:GPDataFile":r.value=r.value.map((function(e){return A.fromJSON(e)}));break;case"GPMultiValue:GPLinearUnit":r.value=r.value.map((function(e){return q.fromJSON(e)}));break;case"GPMultiValue:GPFeatureRecordSetLayer":case"GPMultiValue:GPRecordSet":r.value=r.value.map((function(e){return C.default.fromJSON(e)}));break;case"GPMultiValue:GPRasterData":case"GPMultiValue:GPRasterDataLayer":r.value=r.value.map((function(e){return e?F.fromJSON(e):Z.fromJSON(r.value)}));break;case"GPMultiValue:GPField":r.value=r.value.map((function(e){return V.a.fromJSON(e)}))}return r}function X(e,t,r){for(var a in e){var n=e[a];Array.isArray(n)?e[a]=JSON.stringify(n.map((function(e){return X({item:e},!0).item}))):n instanceof Date&&(e[a]=n.getTime())}return Object(R.b)(e,t,r)}var ee=r(1110);function te(e,t,r,a){return re.apply(this,arguments)}function re(){return(re=Object(i.a)(n.a.mark((function e(t,r,a,i){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(a=G.from(a||{}),Q(t,"execute",a,r,i).then((function(e){var t=e.data.results||[],r=e.data.messages||[];return{results:t.map($),messages:r.map((function(e){return ee.a.fromJSON(e)}))}}))));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ae,ne=r(28),ie=new b.a({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"}),oe=ae=function(e){Object(u.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(s.a)(this,a),(r=t.call(this,e)).jobId=null,r.jobStatus=null,r.messages=null,r.requestOptions=null,r.sourceUrl=null,r._timer=null,r}return Object(l.a)(a,[{key:"cancelJob",value:function(e){var t=this,r=this.jobId,a=this.sourceUrl,n=Object(R.c)(a).path,i=Object(o.a)(Object(o.a)(Object(o.a)({},this.requestOptions),e),{},{query:{f:"json"}});return this._clearTimer(),Object(g.default)("".concat(n,"/jobs/").concat(r,"/cancel"),i).then((function(e){var r=ae.fromJSON(e.data);return t.messages=r.messages,t.jobStatus=r.jobStatus,t}))}},{key:"destroy",value:function(){clearInterval(this._timer)}},{key:"checkJobStatus",value:function(e){var t=this,r=Object(R.c)(this.sourceUrl).path,a=Object(o.a)(Object(o.a)(Object(o.a)({},this.requestOptions),e),{},{query:{f:"json"}}),n="".concat(r,"/jobs/").concat(this.jobId);return Object(g.default)(n,a).then((function(e){var r=e.data,a=ae.fromJSON(r);return t.messages=a.messages,t.jobStatus=a.jobStatus,t}))}},{key:"fetchResultData",value:function(e,t,r){var a=t=G.from(t||{}),n=a.returnFeatureCollection,i=a.returnM,s=a.returnZ,l=a.outSpatialReference,u=Object(R.c)(this.sourceUrl).path,c=X({returnFeatureCollection:n,returnM:i,returnZ:s,outSR:l,returnType:"data",f:"json"},null),p=Object(o.a)(Object(o.a)(Object(o.a)({},this.requestOptions),r),{},{query:c}),b="".concat(u,"/jobs/").concat(this.jobId,"/results/").concat(e);return Object(g.default)(b,p).then((function(e){return $(e.data)}))}},{key:"fetchResultImage",value:function(e,t,r){var a=Object(R.c)(this.sourceUrl).path,n=X(Object(o.a)(Object(o.a)({},t.toJSON()),{},{f:"json"})),i=Object(o.a)(Object(o.a)(Object(o.a)({},this.requestOptions),r),{},{query:n}),s="".concat(a,"/jobs/").concat(this.jobId,"/results/").concat(e);return Object(g.default)(s,i).then((function(e){return $(e.data)}))}},{key:"fetchResultMapImageLayer",value:function(){var e=Object(i.a)(n.a.mark((function e(){var t,a,i,o;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(R.c)(this.sourceUrl),a=t.path,i=a.indexOf("/GPServer/"),o="".concat(a.substring(0,i),"/MapServer/jobs/").concat(this.jobId),e.next=4,Promise.all([r.e(18),r.e(87)]).then(r.bind(null,1191));case 4:return e.t0=e.sent.default,e.t1={url:o},e.abrupt("return",new e.t0(e.t1));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"waitForJobCompletion",value:function(){var e=Object(i.a)(n.a.mark((function e(){var t,r,a,i,o,s=this,l=arguments;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l.length>0&&void 0!==l[0]?l[0]:{},r=t.interval,a=void 0===r?1e3:r,i=t.signal,o=t.statusCallback,e.abrupt("return",new Promise((function(e,t){Object(ne.q)(i,(function(){s._clearTimer(),t(Object(ne.e)())})),s._clearTimer();var r=setInterval((function(){s._timer||t(Object(ne.e)()),s.checkJobStatus(s.requestOptions).then((function(r){var a=r.jobStatus;switch(s.jobStatus=a,a){case"job-succeeded":s._clearTimer(),e(s);break;case"job-submitted":case"job-executing":case"job-waiting":case"job-new":o&&o(s);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-timed-out":case"job-failed":s._clearTimer(),t(s)}}))}),a);s._timer=r})));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"_clearTimer",value:function(){this._timer&&(clearInterval(this._timer),this._timer=null)}}]),a}(J.a);Object(p.a)([Object(f.b)()],oe.prototype,"jobId",void 0),Object(p.a)([Object(f.b)({json:{read:ie.read}})],oe.prototype,"jobStatus",void 0),Object(p.a)([Object(f.b)({type:[ee.a]})],oe.prototype,"messages",void 0),Object(p.a)([Object(f.b)()],oe.prototype,"requestOptions",void 0),Object(p.a)([Object(f.b)({json:{write:!0}})],oe.prototype,"sourceUrl",void 0);var se=oe=ae=Object(p.a)([Object(d.a)("esri.rest.support.JobInfo")],oe);function le(e,t,r,a){return ue.apply(this,arguments)}function ue(){return(ue=Object(i.a)(n.a.mark((function e(t,r,a,i){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(a=G.from(a||{}),Q(t,"submitJob",a,r,i).then((function(e){var r=se.fromJSON(e.data);return r.sourceUrl=t,r}))));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ce=new b.a({PDF:"pdf",PNG32:"png32",PNG8:"png8",JPG:"jpg",GIF:"gif",EPS:"eps",SVG:"svg",SVGZ:"svgz"}),pe=(ce.fromJSON.bind(ce),ce.toJSON.bind(ce)),be=new b.a({MAP_ONLY:"map-only","A3 Landscape":"a3-landscape","A3 Portrait":"a3-portrait","A4 Landscape":"a4-landscape","A4 Portrait":"a4-portrait","Letter ANSI A Landscape":"letter-ansi-a-landscape","Letter ANSI A Portrait":"letter-ansi-a-portrait","Tabloid ANSI B Landscape":"tabloid-ansi-b-landscape","Tabloid ANSI B Portrait":"tabloid-ansi-b-portrait"}),fe=(be.fromJSON.bind(be),be.toJSON.bind(be)),ye="simple-marker",de="simple-line";function me(e,t){var r=t.graphic,a=t.renderer,n=t.symbol,i=n.type;if("text"!==i&&"shield-label-symbol"!==i&&"visualVariables"in a&&a.visualVariables){var o=a.getVisualVariablesForType("size"),s=a.getVisualVariablesForType("color"),l=a.getVisualVariablesForType("opacity"),u=a.getVisualVariablesForType("rotation"),c=o[0],p=s[0],b=l[0],f=u[0];if(c){var y=i===ye?n.style:null,d=Object(P.getSize)(c,r,{shape:y});null!=d&&(i===ye?e.size=Object(w.d)(d):"picture-marker"===i?(e.width=Object(w.d)(d),e.height=Object(w.d)(d)):i===de?e.width=Object(w.d)(d):e.outline&&(e.outline.width=Object(w.d)(d)))}if(p){var m=Object(P.getColor)(p,r);(m&&i===ye||i===de||"simple-fill"===i)&&(e.color=m?m.toJSON():void 0)}if(b){var v=Object(P.getOpacity)(b,r);null!=v&&e.color&&(e.color[3]=Math.round(255*v))}f&&(e.angle=-Object(P.getRotationAngle)(a,r))}}function ve(e){var t,r,a,n,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,l=e.canvas.width,u=e.canvas.height,c=e.getImageData(0,0,l,u).data;e:for(r=u;r--;)for(t=l;t--;)if(c[4*(l*r+t)+3]>s){o=r;break e}if(!o)return null;e:for(t=l;t--;)for(r=o+1;r--;)if(c[4*(l*r+t)+3]>s){i=t;break e}e:for(t=0;t<=i;++t)for(r=o+1;r--;)if(c[4*(l*r+t)+3]>s){a=t;break e}e:for(r=0;r<=o;++r)for(t=a;t<=i;++t)if(c[4*(l*r+t)+3]>s){n=r;break e}return{x:a,y:n,width:i-a,height:o-n}}function he(e,t){var r=e.allLayerViews.items;if(t===e.scale)return r.filter((function(e){return!e.suspended}));var a,n=new Array,i=Object(v.a)(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;ke(o.parent)&&!n.includes(o.parent)||!o.visible||t&&"isVisibleAtScale"in o&&!o.isVisibleAtScale(t)||n.push(o)}}catch(s){i.e(s)}finally{i.f()}return n}function Oe(e){return e&&"bing-maps"===e.type}function ge(e){return e&&"csv"===e.type}function je(e){return e&&"feature"===e.type}function xe(e){return e&&"geojson"===e.type}function we(e){return e&&"graphics"===e.type}function Se(e){return e&&"group"===e.type}function ke(e){return e&&"esri.views.2d.layers.GroupLayerView2D"===e.declaredClass}function Pe(e){return e&&"imagery"===e.type}function De(e){return e&&"kml"===e.type}function Ie(e){return e&&"map-image"===e.type}function Le(e){return e&&"map-notes"===e.type}function Me(e){return e&&"open-street-map"===e.type}function Ge(e){return e&&"stream"===e.type}function Te(e){return e&&"tile"===e.type}function Ve(e){return e&&"vector-tile"===e.type}function Je(e){return e&&"web-tile"===e.type}function Ne(e){return e&&"wms"===e.type}function Fe(e){return e&&"wmts"===e.type}var Re=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e){var a;return Object(s.a)(this,r),(a=t.call(this,e)).attributionVisible=!0,a.exportOptions={width:800,height:1100,dpi:96},a.forceFeatureAttributes=!1,a.format="png32",a.label=null,a.layout="map-only",a.layoutOptions=null,a.outScale=0,a.scalePreserved=!0,a.showLabels=!0,a}return r}(D.a);Object(p.a)([Object(f.b)()],Re.prototype,"attributionVisible",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"exportOptions",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"forceFeatureAttributes",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"format",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"label",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"layout",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"layoutOptions",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"outScale",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"scalePreserved",void 0),Object(p.a)([Object(f.b)()],Re.prototype,"showLabels",void 0);var Ee=Re=Object(p.a)([Object(d.a)("esri.rest.support.PrintTemplate")],Re),Ae=r(570),Ce=r(1034),Ue={Feet:"ft",Kilometers:"km",Meters:"m",Miles:"mi"},_e=new b.a({esriFeet:"Feet",esriKilometers:"Kilometers",esriMeters:"Meters",esriMiles:"Miles"}),qe=new b.a({esriExecutionTypeSynchronous:"sync",esriExecutionTypeAsynchronous:"async"}),ze=new Map;function Be(){return(Be=Object(i.a)(n.a.mark((function e(t,r,a){var i,o;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Ye(t),o=ze.get(i),e.abrupt("return",Promise.resolve().then((function(){return o?{data:o.gpMetadata}:(o={gpServerUrl:i,is11xService:!1,legendLayerNameMap:[],legendLayers:[]},Object(g.default)(i,{query:{f:"json"}}))})).then((function(e){return o.gpMetadata=e.data,o.cimVersion=o.gpMetadata.cimVersion,o.is11xService=!!o.cimVersion,ze.set(i,o),Ke(r,o)})).then((function(e){var n,i=Vt(o),s=function(e){return"sync"===i?e.results&&e.results[0]&&e.results[0].value:n.fetchResultData("Output_File",null,a).then((function(e){return e.value}))};return"async"===i?le(t,e,null,a).then((function(e){return n=e,e.waitForJobCompletion({interval:r.updateDelay}).then(s)})):te(t,e,null,a).then(s)})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ke(e,t){return We.apply(this,arguments)}function We(){return(We=Object(i.a)(n.a.mark((function e(t,r){var a,i,o,s,l,u,c,p,b,f,y,d,m,v,h,O,g;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=r||{is11xService:!1,legendLayerNameMap:[],legendLayers:[]},null==(a=t.template||new Ee).showLabels&&(a.showLabels=!0),i=a.exportOptions,s=fe(a.layout),i&&(o={dpi:i.dpi},("map_only"===s.toLowerCase()||""===s)&&(l=i.width,u=i.height,o.outputSize=[l,u])),(c=a.layoutOptions)&&("Miles"===c.scalebarUnit||"Kilometers"===c.scalebarUnit?(b="Kilometers",f="Miles"):"Meters"!==c.scalebarUnit&&"Feet"!==c.scalebarUnit||(b="Meters",f="Feet"),p={titleText:c.titleText,authorText:c.authorText,copyrightText:c.copyrightText,customTextElements:c.customTextElements,scaleBarOptions:{metricUnit:_e.toJSON(b),metricLabel:Ue[b],nonMetricUnit:_e.toJSON(f),nonMetricLabel:Ue[f]}}),y=null,c&&c.legendLayers&&(y=c.legendLayers.map((function(e){r.legendLayerNameMap[e.layerId]=e.title;var t={id:e.layerId};return e.subLayerIds&&(t.subLayerIds=e.subLayerIds),t}))),e.next=12,Ze(t,a,r);case 12:return(d=e.sent).operationalLayers&&(m=new RegExp("[\\u4E00-\\u9FFF\\u0E00-\\u0E7F\\u0900-\\u097F\\u3040-\\u309F\\u30A0-\\u30FF\\u31F0-\\u31FF]"),v=/[\u0600-\u06FF]/,h=function(e){var t=e.text,r=e.font,a=r&&r.family&&r.family.toLowerCase();t&&r&&("arial"===a||"arial unicode ms"===a)&&(r.family=m.test(t)?"Arial Unicode MS":"Arial","normal"!==r.style&&v.test(t)&&(r.family="Arial Unicode MS"))},O=function(){throw new j.a("print-task:cim-symbol-unsupported","CIMSymbol is not supported by a print service published from ArcMap")},d.operationalLayers.forEach((function(e){var t,a,n;null!=(t=e.featureCollection)&&t.layers?e.featureCollection.layers.forEach((function(e){var t,a,n,i;if(null!=(t=e.layerDefinition)&&null!=(a=t.drawingInfo)&&null!=(n=a.renderer)&&n.symbol){var o=e.layerDefinition.drawingInfo.renderer;"esriTS"===o.symbol.type?h(o.symbol):"CIMSymbolReference"!==o.symbol.type||r.is11xService||O()}null!=(i=e.featureSet)&&i.features&&e.featureSet.features.forEach((function(e){e.symbol&&("esriTS"===e.symbol.type?h(e.symbol):"CIMSymbolReference"!==e.symbol.type||r.is11xService||O())}))})):!r.is11xService&&null!=(a=e.layerDefinition)&&null!=(n=a.drawingInfo)&&n.renderer&&JSON.stringify(e.layerDefinition.drawingInfo.renderer).includes('"type":"CIMSymbolReference"')&&O()}))),t.outSpatialReference&&(d.mapOptions.spatialReference=t.outSpatialReference.toJSON()),Object.assign(d,{exportOptions:o,layoutOptions:p||{}}),Object.assign(d.layoutOptions,{legendOptions:{operationalLayers:null!=y?y:r.legendLayers.slice()}}),r.legendLayers.length=0,ze.set(r.gpServerUrl,r),g={Web_Map_as_JSON:JSON.stringify(d),Format:pe(a.format),Layout_Template:s},e.abrupt("return",(t.extraParameters&&Object.assign(g,t.extraParameters),g));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ze(e,t,r){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(i.a)(n.a.mark((function e(t,r,a){var i,o,s,l,u,c;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.view,o=i.spatialReference,e.next=4,He(i,r,a);case 4:return e.t0=e.sent,s={operationalLayers:e.t0},l=a.ssExtent||t.extent||i.extent,o&&o.isWrappable&&(l=l.clone()._normalize(!0),o=l.spatialReference),s.mapOptions={extent:l&&l.toJSON(),spatialReference:o&&o.toJSON(),showAttribution:r.attributionVisible},a.ssExtent=null,i.background&&(s.background=i.background.toJSON()),i.rotation&&(s.mapOptions.rotation=-i.rotation),r.scalePreserved&&(s.mapOptions.scale=r.outScale||i.scale),i.timeExtent&&(u=Object(x.j)(i.timeExtent.start)?i.timeExtent.start.getTime():null,c=Object(x.j)(i.timeExtent.end)?i.timeExtent.end.getTime():null,s.mapOptions.time=[u,c]),e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(e){var t=e,r=t.lastIndexOf("/GPServer/");return r>0&&(t=t.slice(0,r+9)),t}function He(e,t,r){return $e.apply(this,arguments)}function $e(){return($e=Object(i.a)(n.a.mark((function e(t,r,a){var i,o,s,l,u,c,p,b,f,y;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[],o={layerView:null,printTemplate:r,view:t},s=0,r.scalePreserved&&(s=r.outScale||t.scale),l=he(t,s),u=Object(v.a)(l),e.prev=5,u.s();case 7:if((c=u.n()).done){e.next=116;break}if(p=c.value,(b=p.layer).loaded&&!Se(b)){e.next=12;break}return e.abrupt("continue",114);case 12:if(f=void 0,o.layerView=p,!Oe(b)){e.next=18;break}e.t0=Xe(b),e.next=112;break;case 18:if(!ge(b)){e.next=24;break}return e.next=21,et(b,o,a);case 21:e.t1=e.sent,e.next=111;break;case 24:if(!je(b)){e.next=30;break}return e.next=27,nt(b,o,a);case 27:e.t2=e.sent,e.next=110;break;case 30:if(!xe(b)){e.next=36;break}return e.next=33,ot(b,o,a);case 33:e.t3=e.sent,e.next=109;break;case 36:if(!we(b)){e.next=42;break}return e.next=39,lt(b,o,a);case 39:e.t4=e.sent,e.next=108;break;case 42:if(!Pe(b)){e.next=46;break}e.t5=ct(b,a),e.next=107;break;case 46:if(!De(b)){e.next=52;break}return e.next=49,pt(b,o,a);case 49:e.t6=e.sent,e.next=106;break;case 52:if(!Ie(b)){e.next=56;break}e.t7=ft(b,o,a),e.next=105;break;case 56:if(!Le(b)){e.next=62;break}return e.next=59,yt(o,a);case 59:e.t8=e.sent,e.next=104;break;case 62:if(!Me(b)){e.next=66;break}e.t9={type:"OpenStreetMap"},e.next=103;break;case 66:if(!Ge(b)){e.next=72;break}return e.next=69,ht(b,o,a);case 69:e.t10=e.sent,e.next=102;break;case 72:if(!Te(b)){e.next=76;break}e.t11=gt(b),e.next=101;break;case 76:if(!Ve(b)){e.next=82;break}return e.next=79,jt(b,o,a);case 79:e.t12=e.sent,e.next=100;break;case 82:if(!Je(b)){e.next=86;break}e.t13=wt(b),e.next=99;break;case 86:if(!Ne(b)){e.next=90;break}e.t14=St(b),e.next=98;break;case 90:if(!Fe(b)){e.next=94;break}e.t15=kt(b),e.next=97;break;case 94:return e.next=96,mt(b,o,a);case 96:e.t15=e.sent;case 97:e.t14=e.t15;case 98:e.t13=e.t14;case 99:e.t12=e.t13;case 100:e.t11=e.t12;case 101:e.t10=e.t11;case 102:e.t9=e.t10;case 103:e.t8=e.t9;case 104:e.t7=e.t8;case 105:e.t6=e.t7;case 106:e.t5=e.t6;case 107:e.t4=e.t5;case 108:e.t3=e.t4;case 109:e.t2=e.t3;case 110:e.t1=e.t2;case 111:e.t0=e.t1;case 112:(f=e.t0)&&(Array.isArray(f)?i.push.apply(i,Object(m.a)(f)):(f.id=b.id,f.title=a.legendLayerNameMap[b.id]||b.title,f.opacity=b.opacity,f.minScale=b.minScale||0,f.maxScale=b.maxScale||0,i.push(f)));case 114:e.next=7;break;case 116:e.next=121;break;case 118:e.prev=118,e.t16=e.catch(5),u.e(e.t16);case 121:return e.prev=121,u.f(),e.finish(121);case 124:if(s&&i.forEach((function(e){e.minScale=0,e.maxScale=0})),!t.graphics||!t.graphics.length){e.next=129;break}return e.next=127,rt(null,t.graphics,r,a);case 127:(y=e.sent)&&i.push(y);case 129:return e.abrupt("return",i);case 130:case"end":return e.stop()}}),e,null,[[5,118,121,124]])})))).apply(this,arguments)}function Xe(e){return{culture:e.culture,key:e.key,type:"BingMaps"+("aerial"===e.style?"Aerial":"hybrid"===e.style?"Hybrid":"Road")}}function et(e,t,r){return tt.apply(this,arguments)}function tt(){return(tt=Object(i.a)(n.a.mark((function e(t,r,a){var i,o,s;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.legendLayers&&a.legendLayers.push({id:t.id}),i=r.layerView,o=r.printTemplate,a.is11xService&&!i.filter){e.next=11;break}return e.t0=rt,e.t1=t,e.next=7,Gt(i);case 7:return e.t2=e.sent,e.t3=o,e.t4=a,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 11:return e.abrupt("return",(s={type:"CSV"},t.write(s,{origin:"web-map"}),delete s.popupInfo,delete s.layerType,s.showLabels=o.showLabels&&t.labelsVisible,s));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rt(e,t,r,a){return at.apply(this,arguments)}function at(){return(at=Object(i.a)(n.a.mark((function e(t,r,a,i){var o,s,l,u,c,p,b,f,y,d,m,h,O,g,j,x,w,S,P,D,I,L,M,G,T,V,J;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s={layerDefinition:{name:"polygonLayer",geometryType:"esriGeometryPolygon",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPolygon",features:[]}},l={layerDefinition:{name:"polylineLayer",geometryType:"esriGeometryPolyline",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPolyline",features:[]}},u={layerDefinition:{name:"pointLayer",geometryType:"esriGeometryPoint",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPoint",features:[]}},c={layerDefinition:{name:"multipointLayer",geometryType:"esriGeometryMultipoint",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryMultipoint",features:[]}},(p={layerDefinition:{name:"pointLayer",geometryType:"esriGeometryPoint",drawingInfo:{renderer:null}},featureSet:{geometryType:"esriGeometryPoint",features:[]}}).layerDefinition.name="textLayer",delete p.layerDefinition.drawingInfo,t&&("esri.layers.FeatureLayer"===t.declaredClass||"esri.layers.StreamLayer"===t.declaredClass?s.layerDefinition.name=l.layerDefinition.name=u.layerDefinition.name=c.layerDefinition.name=i.legendLayerNameMap[t.id]||t.get("arcgisProps.title")||t.title:"esri.layers.GraphicsLayer"===t.declaredClass&&(r=t.graphics.items),t.renderer&&(b=t.renderer.toJSON(),s.layerDefinition.drawingInfo.renderer=b,l.layerDefinition.drawingInfo.renderer=b,u.layerDefinition.drawingInfo.renderer=b,c.layerDefinition.drawingInfo.renderer=b),a.showLabels&&t.labelsVisible&&"function"==typeof t.write&&(d=null==(f=t.write({},{origin:"web-map"}).layerDefinition)||null==(y=f.drawingInfo)?void 0:y.labelingInfo)&&(o=!0,s.layerDefinition.drawingInfo.labelingInfo=d,l.layerDefinition.drawingInfo.labelingInfo=d,u.layerDefinition.drawingInfo.labelingInfo=d,c.layerDefinition.drawingInfo.labelingInfo=d)),null!=t&&t.renderer||o||(delete s.layerDefinition.drawingInfo,delete l.layerDefinition.drawingInfo,delete u.layerDefinition.drawingInfo,delete c.layerDefinition.drawingInfo),h=null==t?void 0:t.fieldsIndex,O=null==t?void 0:t.renderer,!h){e.next=12;break}if(!O||"function"!=typeof O.collectRequiredFields){e.next=10;break}return g=new Set,e.next=9,O.collectRequiredFields(g,h);case 9:m=Array.from(g);case 10:j=h.fields.map((function(e){return e.toJSON()})),s.layerDefinition.fields=j,l.layerDefinition.fields=j,u.layerDefinition.fields=j,c.layerDefinition.fields=j;case 12:x=r&&r.length,S=0;case 14:if(!(S<x)){e.next=46;break}if(!1!==(P=r[S]||r.getItemAt(S)).visible&&P.geometry){e.next=18;break}return e.abrupt("continue",43);case 18:if((w=P.toJSON()).hasOwnProperty("popupTemplate")&&delete w.popupTemplate,w.geometry&&w.geometry.z&&delete w.geometry.z,!w.symbol||!w.symbol.outline||"esriCLS"!==w.symbol.outline.type||i.is11xService){e.next=20;break}return e.abrupt("continue",43);case 20:if(!i.is11xService&&w.symbol&&w.symbol.outline&&w.symbol.outline.color&&w.symbol.outline.color[3]&&(w.symbol.outline.color[3]=255),D=t&&t.renderer&&("valueExpression"in t.renderer&&t.renderer.valueExpression||"hasVisualVariables"in t.renderer&&t.renderer.hasVisualVariables()),w.symbol||!t||!t.renderer||!D||i.is11xService){e.next=30;break}return I=t.renderer,e.next=26,I.getSymbolAsync(P);case 26:if(L=e.sent){e.next=29;break}return e.abrupt("continue",43);case 29:w.symbol=L.toJSON(),"hasVisualVariables"in I&&I.hasVisualVariables()&&me(w.symbol,{renderer:I,graphic:P,symbol:L});case 30:if(e.t0=w.symbol,!e.t0){e.next=40;break}if(w.symbol.angle||delete w.symbol.angle,!Jt(w.symbol)){e.next=39;break}return e.next=36,Dt(w.symbol,i);case 36:w.symbol=e.sent,e.next=40;break;case 39:w.symbol.text&&delete w.attributes;case 40:if(a&&a.forceFeatureAttributes||!m||!m.length){e.next=42;break}!function(){var e={};m.forEach((function(t){w.attributes&&w.attributes.hasOwnProperty(t)&&(e[t]=w.attributes[t])})),w.attributes=e}();case 42:"polygon"===P.geometry.type?s.featureSet.features.push(w):"polyline"===P.geometry.type?l.featureSet.features.push(w):"point"===P.geometry.type?w.symbol&&w.symbol.text?p.featureSet.features.push(w):u.featureSet.features.push(w):"multipoint"===P.geometry.type?c.featureSet.features.push(w):"extent"===P.geometry.type&&(w.geometry=k.a.fromExtent(P.geometry).toJSON(),s.featureSet.features.push(w));case 43:S++,e.next=14;break;case 46:M=[s,l,c,u,p].filter((function(e){return e.featureSet.features.length>0})),G=Object(v.a)(M),e.prev=48,G.s();case 50:if((T=G.n()).done){e.next=61;break}if(V=T.value,J=V.featureSet.features.every((function(e){return e.symbol})),!J||a&&a.forceFeatureAttributes||V.featureSet.features.forEach((function(e){delete e.attributes})),J&&delete V.layerDefinition.drawingInfo,e.t1=V.layerDefinition.drawingInfo&&V.layerDefinition.drawingInfo.renderer,!e.t1){e.next=59;break}return e.next=59,Lt(V.layerDefinition.drawingInfo.renderer,i);case 59:e.next=50;break;case 61:e.next=66;break;case 63:e.prev=63,e.t2=e.catch(48),G.e(e.t2);case 66:return e.prev=66,G.f(),e.finish(66);case 69:return e.abrupt("return",M.length?{featureCollection:{layers:M},showLabels:o}:null);case 70:case"end":return e.stop()}}),e,null,[[48,63,66,69]])})))).apply(this,arguments)}function nt(e,t,r){return it.apply(this,arguments)}function it(){return(it=Object(i.a)(n.a.mark((function e(t,r,a){var i,o,s,l,u,c,p,b,f,y,d,m,v,h,O,g;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.legendLayers&&a.legendLayers.push({id:t.id}),l=t.renderer,!(t.featureReduction||l&&"dot-density"===l.type&&(!a.is11xService||parseFloat(a.cimVersion)<2.6))){e.next=4;break}return e.abrupt("return",mt(t,r,a));case 4:if(u=r.layerView,c=r.printTemplate,p=r.view,b=l&&("valueExpression"in l&&l.valueExpression||"hasVisualVariables"in l&&l.hasVisualVariables()),f="feature-layer"!==(null==(i=t.source)?void 0:i.type)&&"ogc-feature"!==(null==(o=t.source)?void 0:o.type),!(!a.is11xService&&b||t.featureReduction||u.filter||f)&&l&&(!("field"in l)||null==l.field||"string"==typeof l.field&&t.getField(l.field))){e.next=14;break}return e.next=8,Gt(u);case 8:return y=e.sent,e.next=11,rt(t,y,c,a);case 11:s=e.sent,e.next=29;break;case 14:if((s={id:(g=t.write()).id,title:g.title,opacity:g.opacity,minScale:g.minScale,maxScale:g.maxScale,url:g.url,layerType:g.layerType,customParameters:g.customParameters,layerDefinition:g.layerDefinition}).showLabels=c.showLabels&&t.labelsVisible,Pt(s,t),e.t0=null!=(d=s.layerDefinition)&&null!=(m=d.drawingInfo)&&m.renderer,!e.t0){e.next=24;break}return delete s.layerDefinition.minScale,delete s.layerDefinition.maxScale,e.next=23,Lt(s.layerDefinition.drawingInfo.renderer,a);case 23:e.t0="visualVariables"in l&&l.visualVariables&&l.visualVariables[0];case 24:if(!e.t0){e.next=27;break}"size"===(v=l.visualVariables[0]).type&&v.maxSize&&"number"!=typeof v.maxSize&&v.minSize&&"number"!=typeof v.minSize&&(h=Object(P.getSizeRangeAtScale)(v,p.scale),s.layerDefinition.drawingInfo.renderer.visualVariables[0].minSize=h.minSize,s.layerDefinition.drawingInfo.renderer.visualVariables[0].maxSize=h.maxSize);case 27:(O=Object(Ce.b)(u))&&(s.layerDefinition||(s.layerDefinition={}),s.layerDefinition.definitionExpression=s.layerDefinition.definitionExpression?"(".concat(s.layerDefinition.definitionExpression,") AND (").concat(O,")"):O);case 29:return e.abrupt("return",s);case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ot(e,t,r){return st.apply(this,arguments)}function st(){return(st=Object(i.a)(n.a.mark((function e(t,r,a){var i,o;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.layerView,o=r.printTemplate,a.legendLayers&&a.legendLayers.push({id:t.id}),e.t0=rt,e.t1=t,e.next=6,Gt(i);case 6:return e.t2=e.sent,e.t3=o,e.t4=a,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lt(e,t,r){return ut.apply(this,arguments)}function ut(){return(ut=Object(i.a)(n.a.mark((function e(t,r,a){var i;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.printTemplate,e.abrupt("return",rt(t,null,i,a));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ct(e,t){t.legendLayers&&t.legendLayers.push({id:e.id});var r,a={layerType:(r=e.write()).layerType,customParameters:r.customParameters};if(a.bandIds=e.bandIds,a.compressionQuality=e.compressionQuality,a.format=e.format,a.interpolation=e.interpolation,(e.mosaicRule||e.definitionExpression)&&(a.mosaicRule=e.exportImageServiceParameters.mosaicRule.toJSON()),e.renderingRule||e.renderer)if(t.is11xService)e.renderingRule&&(a.renderingRule=e.renderingRule.toJSON()),e.renderer&&(a.layerDefinition=a.layerDefinition||{},a.layerDefinition.drawingInfo=a.layerDefinition.drawingInfo||{},a.layerDefinition.drawingInfo.renderer=e.renderer.toJSON());else{var n=e.exportImageServiceParameters.combineRendererWithRenderingRule();n&&(a.renderingRule=n.toJSON())}return Pt(a,e),a}function pt(e,t,r){return bt.apply(this,arguments)}function bt(){return(bt=Object(i.a)(n.a.mark((function e(t,r,a){var i,s,l,u,c,p;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r.printTemplate,!a.is11xService){e.next=4;break}return s={type:"kml"},e.abrupt("return",(t.write(s,{origin:"web-map"}),delete s.layerType,s.url=Object(S.D)(t.url),s));case 4:return l=[],(u=r.layerView).allVisibleMapImages.forEach((function(e,r){var a={id:"".concat(t.id,"_image").concat(r),type:"image",title:t.id,minScale:t.minScale||0,maxScale:t.maxScale||0,opacity:t.opacity,extent:e.extent};"data:image/png;base64,"===e.href.substr(0,22)?a.imageData=e.href.substr(22):a.url=e.href,l.push(a)})),c=[].concat(Object(m.a)(u.allVisiblePoints.items),Object(m.a)(u.allVisiblePolylines.items),Object(m.a)(u.allVisiblePolygons.items)),e.t0=o.a,e.t1={id:t.id},e.next=11,rt(null,c,i,a);case 11:return e.t2=e.sent,p=(0,e.t0)(e.t1,e.t2),e.abrupt("return",(l.push(p),l));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ft(e,t,r){var a,n,i=t.view,o={id:e.id,subLayerIds:[]},s=[],l=i.scale;return e.sublayers&&e.sublayers.forEach((function e(t){var r=0===l,a=0===t.minScale||l<=t.minScale,n=0===t.maxScale||l>=t.maxScale;if(t.visible&&(r||a&&n))if(t.sublayers)t.sublayers.forEach(e);else{var i=t.toExportImageJSON(),u={id:t.id,name:t.title,layerDefinition:{drawingInfo:i.drawingInfo,definitionExpression:i.definitionExpression,source:i.source}};s.unshift(u),o.subLayerIds.push(t.id)}})),s.length&&(s=s.map((function(e){return{id:e.id,name:e.name,layerDefinition:e.layerDefinition}})),(a={layerType:(n=e.write()).layerType,customParameters:n.customParameters}).layers=s,a.visibleLayers=e.capabilities.exportMap.supportsDynamicLayers?void 0:o.subLayerIds,Pt(a,e),r.legendLayers.push(o)),a}function yt(e,t){return dt.apply(this,arguments)}function dt(){return(dt=Object(i.a)(n.a.mark((function e(t,r){var a,i,o,s,l,u,c,p,b,f,y,d;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.layerView,i=t.printTemplate,o=[],s=a.layer,!Object(x.j)(s.featureCollections)){e.next=24;break}l=Object(v.a)(s.featureCollections),e.prev=4,l.s();case 6:if((u=l.n()).done){e.next=14;break}return c=u.value,e.next=10,rt(c,c.source,i,r);case 10:(p=e.sent)&&o.push.apply(o,Object(m.a)(p.featureCollection.layers));case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),l.e(e.t0);case 19:return e.prev=19,l.f(),e.finish(19);case 22:e.next=44;break;case 24:if(!Object(x.j)(s.sublayers)){e.next=44;break}b=Object(v.a)(s.sublayers),e.prev=26,b.s();case 28:if((f=b.n()).done){e.next=36;break}return y=f.value,e.next=32,rt(null,y.graphics,i,r);case 32:(d=e.sent)&&o.push.apply(o,Object(m.a)(d.featureCollection.layers));case 34:e.next=28;break;case 36:e.next=41;break;case 38:e.prev=38,e.t1=e.catch(26),b.e(e.t1);case 41:return e.prev=41,b.f(),e.finish(41);case 44:return e.abrupt("return",{featureCollection:{layers:o}});case 45:case"end":return e.stop()}}),e,null,[[4,16,19,22],[26,38,41,44]])})))).apply(this,arguments)}function mt(e,t,r){return vt.apply(this,arguments)}function vt(){return(vt=Object(i.a)(n.a.mark((function e(t,r,a){var i,o,s,l,u,c,p,b,f,y,d,m,v;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.printTemplate,o=r.view,s={type:"image"},l={format:"png",ignoreBackground:!0,layers:[t],rotation:0},u=a.ssExtent||o.extent.clone(),c=96,p=!0,b=!0,i.exportOptions&&((f=i.exportOptions).dpi>0&&(c=f.dpi),f.width>0&&(p=f.width%2==o.width%2),f.height>0&&(b=f.height%2==o.height%2)),"map-only"!==i.layout||!i.scalePreserved||i.outScale&&i.outScale!==o.scale||96!==c||p&&b||(l.area={x:0,y:0,width:o.width,height:o.height},p||(l.area.width-=1),b||(l.area.height-=1),a.ssExtent)||(y=o.toMap(Object(w.a)(l.area.width,l.area.height)),u.ymin=y.y,u.xmax=y.x,a.ssExtent=u),s.extent=u.clone()._normalize(!0).toJSON(),e.next=8,o.takeScreenshot(l);case 8:return d=e.sent,m=Object(S.i)(d.dataUrl),v=m.data,e.abrupt("return",(s.imageData=v,s));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(e,t,r){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(i.a)(n.a.mark((function e(t,r,a){var i,o;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.layerView,o=r.printTemplate,a.legendLayers&&a.legendLayers.push({id:t.id}),e.t0=rt,e.t1=t,e.next=6,Gt(i);case 6:return e.t2=e.sent,e.t3=o,e.t4=a,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gt(e){var t,r={layerType:(t=e.write()).layerType,customParameters:t.customParameters};return Pt(r,e),r}function jt(e,t,r){return xt.apply(this,arguments)}function xt(){return(xt=Object(i.a)(n.a.mark((function e(t,r,a){var i,o,s;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.is11xService&&t.serviceUrl&&t.styleUrl)){e.next=5;break}if(i=O.b&&O.b.findCredential(t.styleUrl),o=O.b&&O.b.findCredential(t.serviceUrl),(i||o)&&"2.1.0"===a.cimVersion){e.next=5;break}return s={type:"VectorTileLayer"},e.abrupt("return",(s.styleUrl=Object(S.D)(t.styleUrl),i&&(s.token=i.token),o&&o.token!==s.token&&(s.additionalTokens=[{url:t.serviceUrl,token:o.token}]),s));case 5:return e.abrupt("return",mt(t,r,a));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wt(e){var t={type:"WebTiledLayer",urlTemplate:e.urlTemplate.replace(/\${/g,"{"),credits:e.copyright};return e.subDomains&&e.subDomains.length>0&&(t.subDomains=e.subDomains),t}function St(e){var t,r=[];return e.sublayers&&e.sublayers.forEach((function e(t){t.visible&&(t.sublayers?t.sublayers.forEach(e):t.name&&r.unshift(t.name))})),r.length&&(t={type:"wms",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,transparentBackground:e.imageTransparency,visibleLayers:r,url:Object(S.D)(e.url),version:e.version}),t}function kt(e){var t=e.activeLayer;return{type:"wmts",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,format:t.imageFormat,layer:t.id,style:t.styleId,tileMatrixSet:t.tileMatrixSetId,url:Object(S.D)(e.url)}}function Pt(e,t){if(t.url)if(e.url=Object(S.D)(e.url||t.url),"apiKey"in t&&t.apiKey)e.token=t.apiKey;else if(h.a.apiKey&&Object(Ae.a)(t.url))e.token=h.a.apiKey;else{var r,a;e.token=null==(r=O.b)||null==(a=r.findCredential(t.url))?void 0:a.token}}function Dt(e,t){return It.apply(this,arguments)}function It(){return(It=Object(i.a)(n.a.mark((function e(t,r){var a,i,o,s,l,u,c,p,b,f,y,d,m,v,h;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.canvas||(r.canvas=document.createElement("canvas")),a=1024,r.canvas.width=a,r.canvas.height=a,i=r.canvas.getContext("2d"),!t.path){e.next=20;break}if((u=new Path2D(t.path)).closePath(),i.fillStyle=Array.isArray(t.color)?"rgba(".concat(t.color[0],",").concat(t.color[1],",").concat(t.color[2],",").concat(t.color[3]/255,")"):"rgb(0,0,0)",i.fill(u),c=ve(i)){e.next=10;break}return e.abrupt("return",null);case 10:i.clearRect(0,0,a,a),p=Object(w.c)(t.size)/Math.max(c.width,c.height),i.scale(p,p),f=(b=a/p)/2-c.width/2-c.x,y=b/2-c.height/2-c.y,i.translate(f,y),Array.isArray(t.color)&&i.fill(u),null!=(l=t.outline)&&l.width&&Array.isArray(t.outline.color)&&(d=t.outline,i.lineWidth=Object(w.c)(d.width)/p,i.lineJoin="round",i.strokeStyle="rgba(".concat(d.color[0],",").concat(d.color[1],",").concat(d.color[2],",").concat(d.color[3]/255,")"),i.stroke(u),c.width+=i.lineWidth,c.height+=i.lineWidth),c.width*=p,c.height*=p,m=i.getImageData(a/2-c.width/2,a/2-c.height/2,Math.ceil(c.width),Math.ceil(c.height)),o=m.width,s=m.height,i.canvas.width=o,i.canvas.height=s,i.putImageData(m,0,0),e.next=25;break;case 20:return v="image/svg+xml"===t.contentType?"data:image/svg+xml;base64,"+t.imageData:t.url,e.next=23,Object(g.default)(v,{responseType:"image"});case 23:h=e.sent.data,o=Object(w.c)(t.width),s=Object(w.c)(t.height),i.canvas.width=o,i.canvas.height=s,i.drawImage(h,0,0,i.canvas.width,i.canvas.height);case 25:return e.abrupt("return",{type:"esriPMS",imageData:i.canvas.toDataURL("image/png").substr(22),angle:t.angle,contentType:"image/png",height:p(s),width:p(o),xoffset:t.xoffset,yoffset:t.yoffset});case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,t){return Mt.apply(this,arguments)}function Mt(){return(Mt=Object(i.a)(n.a.mark((function e(t,r){var a,i,o,s,l;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("simple"!==(a=t.type)||!Jt(t.symbol)){e.next=7;break}return e.next=4,Dt(t.symbol,r);case 4:t.symbol=e.sent,e.next=35;break;case 7:if("uniqueValue"!==a&&"classBreaks"!==a){e.next=35;break}if(e.t0=Jt(t.defaultSymbol),!e.t0){e.next=13;break}return e.next=12,Dt(t.defaultSymbol,r);case 12:t.defaultSymbol=e.sent;case 13:if(!(i=t["uniqueValue"===a?"uniqueValueInfos":"classBreakInfos"])){e.next=35;break}o=Object(v.a)(i),e.prev=16,o.s();case 18:if((s=o.n()).done){e.next=27;break}if(l=s.value,e.t1=Jt(l.symbol),!e.t1){e.next=25;break}return e.next=24,Dt(l.symbol,r);case 24:l.symbol=e.sent;case 25:e.next=18;break;case 27:e.next=32;break;case 29:e.prev=29,e.t2=e.catch(16),o.e(e.t2);case 32:return e.prev=32,o.f(),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[16,29,32,35]])})))).apply(this,arguments)}function Gt(e){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(i.a)(n.a.mark((function e(t){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.queryFeatures(t.createQuery()).then((function(e){return e.features})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(e){return e.gpMetadata&&e.gpMetadata.executionType?qe.fromJSON(e.gpMetadata.executionType):"sync"}function Jt(e){return e&&(e.path||"image/svg+xml"===e.contentType||e.url&&e.url.endsWith(".svg"))}var Nt=r(549),Ft=new b.a({esriExecutionTypeSynchronous:"sync",esriExecutionTypeAsynchronous:"async"}),Rt=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(){var e;Object(s.a)(this,r);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n)))._gpMetadata=null,e.updateDelay=1e3,e}return Object(l.a)(r,[{key:"mode",get:function(){return this._gpMetadata&&this._gpMetadata.executionType?Ft.fromJSON(this._gpMetadata.executionType):"sync"}},{key:"execute",value:function(e,t){return e&&(e.updateDelay=this.updateDelay),function(e,t,r){return Be.apply(this,arguments)}(this.url,e,Object(o.a)(Object(o.a)({},this.requestOptions),t))}},{key:"_getGpPrintParams",value:function(){var e=Object(i.a)(n.a.mark((function e(t){var r,a;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ye(this.url),a=ze.get(r),e.abrupt("return",Ke(t,a));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),r}(Nt.a);Object(p.a)([Object(f.b)()],Rt.prototype,"_gpMetadata",void 0),Object(p.a)([Object(f.b)({readOnly:!0})],Rt.prototype,"mode",null),Object(p.a)([Object(f.b)()],Rt.prototype,"updateDelay",void 0);var Et=Rt=Object(p.a)([Object(d.a)("esri.tasks.PrintTask")],Rt)}}]);
//# sourceMappingURL=93.24eee065.chunk.js.map