// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"url:jimu/dijit/templates/ExportChooser.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"export-mask" data-dojo-attach-point\x3d"exportMask"\x3e\x3c/div\x3e\r\n  \x3cdiv class\x3d"export-format jimu-corner-all" data-dojo-attach-point\x3d"exportFormats"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/ExportChooser.html dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/dom-class dojo/dom-style dojo/dom-geometry dojo/on dojo/Evented".split(" "),function(h,k,l,m,n,e,p,f,q,d,r,g,t){return h([k,l,m,t],{templateString:n,baseClass:"jimu-export-chooser",declaredClass:"jimu.dijit.ExportChooser",dataSource:null,nls:null,postMixInProperties:function(){this.nls=window.jimuNls.exportTo},
postCreate:function(){this.inherited(arguments);if(this.dataSource){var a=this.dataSource.getSupportExportFormats();0<a.length&&(this.initFormats(a),this.own(g(this.exportFormats,"click",e.hitch(this,this._onFormatClick))),this.own(g(this.exportMask,"click",e.hitch(this,this.hide))))}},initFormats:function(a){p.forEach(a,function(b){b=f.create("div",{"class":"export-item jimu-ellipsis","data-value":b.value,innerHTML:b.label});f.place(b,this.exportFormats)},this)},_onFormatClick:function(a){a.preventDefault();
a.stopPropagation();a=a.target||a.srcElement;q.contains(a,"export-item")&&(this.hide(),a=a.getAttribute("data-value"),this.dataSource.setFormat(a),this.dataSource.download(),this.emit("start-downloading",a))},show:function(a,b){d.set(this.domNode,{left:"-1000px",top:"0px",display:"block"});var c=r.getMarginSize(this.domNode);d.set(this.domNode,{left:(window.isRTL?a+c.w>window.innerWidth?window.innerWidth-c.w:0>a?0:a:0>a-c.w?0:a>window.innerWidth?window.innerWidth-c.w:a-c.w)+"px",top:(c.h>window.innerHeight?
0:b+c.h>window.innerHeight?window.innerHeight-c.h:b+c.h+5<window.innerHeight?b+5:b)+"px"})},hide:function(){d.set(this.domNode,"display","none")}})});