/**

* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/

!function(e,t){var n=t();“undefined”!=typeof define&&define.amd&&define(n),e.Mapnya=n}(this,function(){var e,t,n;return function®{function o(e,t){return v.call(e,t)}function a(e,t){var n,r,o,a,i,l,c,s,f,u,p,d=t&&t.split(“/”),x=_.map,m=x&&x||{};if(e&&“.”===e.charAt(0))if(t){for(d=d.slice(0,d.length-1),e=e.split(“/”),i=e.length-1,_.nodeIdCompat&&z.test(e)&&(e=e.replace(z,“”)),e=d.concat(e),f=0;f,“.”===p)e.splice(f,1),f-=1;else if(“..”===p){if(1===f&&(“..”===e||“..”===e))break;f>0&&(e.splice(f-1,2),f-=2)}e=e.join(“/”)}else 0===e.indexOf(“./”)&&(e=e.substring(2));if((d||m)&&x){for(n=e.split(“/”),f=n.length;f>0;f-=1){if(r=n.slice(0,f).join(“/”),d)for(u=d.length;u>0;u-=1)if(o=x,o&&(o=o)){a=o,l=f;break}if(a)break;!c&&m&&m&&(c=m,s=f)}!a&&c&&(a=c,l=s),a&&(n.splice(0,l,a),e=n.join(“/”))}return e}function i(e,t){return function(){return d.apply(r,b.call(arguments,0).concat())}}function l(e){return function(t){return a(t,e)}}function c(e){return function(t){h=t}}function s(e){if(o(g,e)){var t=g;delete g,y=!0,p.apply(r,t)}if(!o(h,e)&&!o(y,e))throw new Error(“No ”+e);return h}function f(e){var t,n=e?e.indexOf(“!”):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),}function u(e){return function(){return _&&_.config&&_.config||{}}}var p,d,x,m,h={},g={},_={},y={},v=Object.prototype.hasOwnProperty,b=[].slice,z=/.js$/;x=function(e,t){var n,r=f(e),o=r;return e=r,o&&(o=a(o,t),n=s(o)),o?e=n&&n.normalize?n.normalize(e,l(t)):a(e,t):(e=a(e,t),r=f(e),o=r,e=r,o&&(n=s(o))),{f:o?o+“!”+e:e,n:e,pr:o,p:n}},m={require:function(e){return i(e)},exports:function(e){var t=h;return“undefined”!=typeof t?t:h={}},module:function(e){return{id:e,uri:“”,exports:h,config:u(e)}}},p=function(e,t,n,a){var l,f,u,p,d,_,v=[],b=typeof n;if(a=a||e,“undefined”===b||“function”===b){for(t=!t.length&&n.length?:t,d=0;d,a),f=p.f,“require”===f)v=m.require(e);else if(“exports”===f)v=m.exports(e),_=!0;else if(“module”===f)l=v=m.module(e);else if(o(h,f)||o(g,f)||o(y,f))v=s(f);else{if(!p.p)throw new Error(e+“ missing ”+f);p.p.load(p.n,i(a,!0),c(f),{}),v=h}u=n?n.apply(h,v):void 0,e&&(l&&l.exports!==r&&l.exports!==h?h=l.exports:u===r&&_||(h=u))}else e&&(h=n)},e=t=d=function(e,t,n,o,a){if(“string”==typeof e)return m?m(t):s(x(e,t).f);if(!e.splice){if(_=e,_.deps&&d(.deps,.callback),!t)return;t.splice?(e=t,t=n,n=null):e=r}return t=t||function(){},“function”==typeof n&&(n=o,o=a),o?p(r,e,t,n):setTimeout(function(){p(r,e,t,n)},4),d},d.config=function(e){return d(e)},e._defined=h,n=function(e,t,n){t.splice||(n=t,t=[]),o(h,e)||o(g,e)||(g=[e,t,n])},n.amd={jQuery:!0}}(),n(“contrib/almond/almond”,function(){}),n(“tools”,[],function(){var e={STL:Nyaplot.STL,:Nyaplot.,uuid:Nyaplot.uuid,Manager:Nyaplot.Manager};return e}),n(“components/scale”,,function(e){function t(e,t){Math.abs(t.x-t.x),Math.abs(t.y-t.y);return this.offset={x:0,y:0},this.scale=1,this}e._;return t.prototype.init=function(e){this.projection=e},t.prototype.get=function(e,t){var n=this.projection();return{x:n*this.scale+this.offset.x,y:n*this.scale+this.offset.y}},t.prototype.setTranslate=function(e,t){this.offset.x=e,this.offset.y=t},t.prototype.setScale=function(e){this.scale=e},t}),n(“components/axis”,,function(e){function t(t,n,r){var o=e._,a=e.Manager,i={width:0,height:0,margin:{top:0,bottom:0,left:0,right:0},x_label:“X”,y_label:“Y”,zoom:!0,zoom_range:,rotate_x_label:0,rotate_y_label:0,pane_uuid:null,z_index:0,extra:{}},l={df_id:null,map_data:null,cca3:null,fill_by:null,color:,text_color:“#fff”,text_size:“1em”,stroke_color:“#000”,no_data_color:“none”,center:,scale:1e3};arguments.length>2&&(o.extend(i,r),o.extend(l,r.extra),i.extra=l);var c=function(){var e=o.map(i.extra.map_data.features,function(e){return e.properties.iso_a3});if(o.every(e,function(e){return“undefined”==typeof e}))return d3.scale.ordinal().range(i.extra.color);if(null!=i.extra.fill_by){var t=a.getData(i.extra.df_id),n=t.scale(i.extra.fill_by,i.extra.color),r=t.column(i.extra.fill_by),l=t.column(i.extra.cca3);return d3.scale.ordinal().domain(e).range(o.map(e,function(e){var t=l.indexOf(e);return-1!=t?n(r):i.extra.no_data_color}))}return d3.scale.ordinal().domain(e).range(i.extra.color)}(),s=t.append(“g”),f=“clip”+i.pane_uuid;s.append(“clipPath”).attr(“id”,f).append(“rect”).attr({x:0,y:0,width:i.width,height:i.height}),s.attr(“clip-path”,“url(#”f“)”).append(“g”).attr(“class”,“map”).style(“z-index”,i.z_index);var u=d3.geo.mercator().center(i.extra.center).scale(i.extra.scale);n.init(u);var p=d3.geo.path().projection(u),d=d3.geo.graticule();s.select(“.map”).append(“path”).datum(d).attr({d:p,stroke:“#fff”,“stroke-width”:2});s.select(“.map”).selectAll(“path”).data(i.extra.map_data.features).enter().append(“path”).attr(“d”,p).attr(“stroke”,i.extra.stroke_color).attr(“fill”,function(e){return“undefined”==typeof e.properties.iso_a3?i.extra.no_data_color:c(e.properties.iso_a3)});i.zoom&&t.call(d3.behavior.zoom().scaleExtent(i.zoom_range).on(“zoom”,function(){var e=d3.event.translate,r=d3.event.scale;n.setTranslate(e,e),n.setScale®,t.select(“.context_child”).attr(“transform”,“translate(”e“) scale(”r“)”),s.select(“.map”).attr(“transform”,“translate(”e“) scale(”r“)”)}))}return t}),n(“main”,,function(e){var t={};return t.Nya={scale:e(“components/scale”),axis:e(“components/axis”)},t}),t(“main”)});