// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.7/esri/copyright.txt for details. //>>built define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/i18n!./Print/nls/Print ../core/Logger ../core/urlUtils ../core/watchUtils ../core/accessorSupport/decorators ../tasks/support/PrintTemplate ./Widget ./Print/FileLink ./Print/PrintViewModel ./Print/TemplateOptions ./support/widget".split(" "),function(D,E,x,g,c,y,z,k,h,A,B,C,u,q,a){var m=y.getLogger("esri.widgets.Print");return function(w){function d(a){a=w.call(this)||this;a._exportedFileNameMap={}; a._layoutTabSelected=!0;a._advancedOptionsVisibleForLayout=!1;a._advancedOptionsVisibleForMapOnly=!1;a._pendingExportScroll=!1;a._rootNode=null;a._templatesInfo=null;a._awaitingServerResponse=!1;a.iconClass="esri-icon-printer";a.label=c.widgetLabel;a.templateOptions=new q;a.printServiceUrl=null;a.view=null;a.viewModel=new u;return a}x(d,w);d.prototype.postInitialize=function(){var a=this,b=this.templateOptions,c=b.format,d=b.height,f=b.layout,g=b.scale,h=b.scaleEnabled,b=b.width;this.own([k.init(this, "viewModel.templatesInfo",function(b){if(b){a._templatesInfo=b;var e=f===b.layout.defaultValue||f&&"MAP_ONLY"===f.toUpperCase()||b.layout.choiceList&&-1=b?a.templateOptions.dpi=1:a.scheduleRender()}),k.init(this,"viewModel.view.scale",function(b){h&&g||(a.templateOptions.scale=b)}),k.whenOnce(this,"printServiceUrl",function(){var b=setTimeout(function(){a._awaitingServerResponse=!0;a.scheduleRender()},500);a.viewModel.load().then(function(){return clearTimeout(b)})})]);this.templateOptions.width=b||800;this.templateOptions.height=d||1100};d.prototype.render=function(){var e=this,b=this.templateOptions, d=b.attributionEnabled,r=b.author,f=b.copyright,g=b.dpi,h=b.format,k=b.height,m=b.layout,u=b.legendEnabled,v=b.title,t=b.scaleEnabled,q=b.scale,b=b.width,v=a.tsx("div",{class:"esri-print__form-section-container"},a.tsx("label",null,this._layoutTabSelected?c.title:c.fileName,a.tsx("input",{type:"text",tabIndex:0,placeholder:this._layoutTabSelected?c.titlePlaceHolder:c.fileNamePlaceHolder,class:this.classes("esri-print__input-text","esri-input"),value:v,"data-input-name":"title",oninput:this._updateInputValue, bind:this}))),n=this.get("_templatesInfo.format.choiceList")||[],n=0