!function(e){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=e();elseif("function"==typeofdefine&&define.amd)define([],e);else{vart;"undefined"!=typeofwindow?t=window:"undefined"!=typeofglobal?t=global:"undefined"!=typeofself&&(t=self),t.torque=e()}}(function(){vardefine,module,exports;returnfunctione(t,n,r){functioni(o,u){if(!n[o]){if(!t[o]){vara=typeofrequire=="function"&&require;if(!u&&a)returna(o,!0);if(s)returns(o,!0);varf=newError("Cannot find module '"+o+"'");throwf.code="MODULE_NOT_FOUND",f}varl=n[o]={exports:{}};t[o][0].call(l.exports,function(e){varn=t[o][1][e];returni(n?n:e)},l,l.exports,e,t,n,r)}returnn[o].exports}vars=typeofrequire=="function"&&require;for(varo=0;o<r.length;o++)i(r[o]);returni}({1:[function(e,t,n){varr=function(e,t){if(e<0)thrownewError("start must be a positive number");if(e>=t)thrownewError("start must be smaller than end");this.start=e,this.end=t};r.prototype={diff:function(){returnthis.end-this.start},isLast:function(e){return(e|0)===this.end}},t.exports=r},{}],2:[function(e,t,n){(function(n){functionu(e,t){if(!t.steps)thrownewError("steps option missing");this.options=t,this.running=!1,this._tick=this._tick.bind(this),this._t0=+(newDate),this.callback=e,this._time=0,this.itemsReady=!1,this.options=r.extend({animationDelay:0,maxDelta:.2,loop:t.loop===undefined?!0:t.loop},this.options),this.steps(t.steps)}varr=e("./"),i=e("./animator-steps-range"),s=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame||function(e){returnn.setTimeout(e,1e3/60)},o=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.msCancelAnimationFrame||function(e){clearTimeout(e)};u.prototype={start:function(){this.running=!0,s(this._tick),this.options.onStart&&this.options.onStart(),this.stepsRange().diff()===1&&(this.running=!1)},isRunning:function(){returnthis.running},stop:function(){this.pause(),this.time(this.stepsRange().start),this.options.onStop&&this.options.onStop()},time:function(e){if(!arguments.length)returnthis._time;this._time=e;vart=this.range(this.domain(this._time));this.callback(t)},toggle:function(){this.running?this.pause():this.start()},rescale:function(){returnthis.domainInv=r.math.linear(this.options.animationDelay,this.options.animationDelay+this.options.animationDuration),this.domain=this.domainInv.invert(),this.range=r.math.linear(0,this._defaultStepsRange.end),this.rangeInv=this.range.invert(),this.time(this._time),this.running?this.start():this.pause(),this},duration:function(e){returnarguments.length?(this.options.animationDuration=e,this.time()>e&&this.time(0),this.rescale(),this):this.options.animationDuration},steps:function(e){returnthis.options.steps=e,this._defaultStepsRange=newi(0,e),this.rescale()},stepsRange:function(e,t){if(arguments.length===2){if(e<this._defaultStepsRange.start)thrownewError("start must be within default steps range");if(t>this._defaultStepsRange.end)thrownewError("end must be within default steps range");this._customStepsRange=newi(e,t),this.options.onStepsRange&&this.options.onStepsRange();varn=this.step()|0;(n<e||n>t)&&this.step(e)}returnthis._customStepsRange||this._defaultStepsRange},removeCustomStepsRange:function(){this._customStepsRange=undefined,this.options.onStepsRange&&this.options.onStepsRange()},step:function(e){if(arguments.length===0)returnthis.range(this.domain(this._time));this._time=this.domainInv(this.rangeInv(e))},pause:function(){this.running=!1,o(this._tick),this.options.onPause&&this.options.onPause()},_tick:function(){vare=+(newDate),t=(e-this._t0)*.001;t=Math.min(this.options.maxDelta,t),this._t0=e,this._time+=t;varn=this.stepsRange();n.isLast(this.step())&&(this.options.loop?this.step(n.start):(this.time(this.options.animationDuration),this.pause())),this.running&&(this.time(this._time),s(this._tick))}},t.exports=u}).call(this,typeofglobal!="undefined"?global:typeofself!="undefined"?self:typeofwindow!="undefined"?window:{})},{"./":11,"./animator-steps-range":1}],3:[fun
,t,n){varr=this,i=1<<n,s={x:(t.x%i+i)%i,y:t.y};this.provider.getTileData(s,n,function(t){r._tileLoaded(e,t)})},drawTile:function(e){vart=e.canvas;if(!e.data)return;t.width=t.width,this.renderer.setCanvas(t);varn=this.renderer.accumulate(e.data,this.getKey());this.renderer.renderTileAccum(n,0,0)},setKey:function(e){this.keys=[e],this.redraw()},setCartoCSS:function(e){if(!this.renderer)thrownewError("renderer is not valid");returnthis.renderer.setCartoCSS(e)},setStepsRange:function(e,t){this.animator.stepsRange(e,t)},removeStepsRange:function(){this.animator.removeCustomStepsRange()},getStepsRange:function(){returnthis.animator.stepsRange()}}),t.exports={GMapsTiledTorqueLayer:f,GMapsTorqueLayer:a}}).call(this,typeofglobal!="undefined"?global:typeofself!="undefined"?self:typeofwindow!="undefined"?window:{})},{"../":11,"./CanvasLayer":6,"./canvas_tile_layer":7,"./gmaps_tileloader_mixin":8,carto:40}],11:[function(e,t,n){t.exports=e("./core"),t.exports.Animator=e("./animator"),t.exports.cartocss_reference=e("./cartocss_reference"),t.exports.common=e("./common"),t.exports.math=e("./math"),t.exports.Mercator=e("./mercator"),t.exports.net=e("./request"),t.exports.renderer=e("./renderer"),t.exports.providers=e("./provider"),e("./leaflet");varr=e("./gmaps");t.exports.GMapsTileLoader=r.GMapsTileLoader,t.exports.GMapsTorqueLayer=r.GMapsTorqueLayer,t.exports.GMapsTiledTorqueLayer=r.GMapsTiledTorqueLayer,e("./ol")},{"./animator":2,"./cartocss_reference":3,"./common":4,"./core":5,"./gmaps":9,"./leaflet":13,"./math":16,"./mercator":17,"./ol":19,"./provider":23,"./renderer":30,"./request":34}],12:[function(e,t,n){e("./leaflet_tileloader_mixin"),L.CanvasLayer=L.Layer.extend({includes:[L.Mixin.Events,L.Mixin.TileLoader],options:{minZoom:0,maxZoom:28,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:L.Browser.mobile,updateWhenIdle:L.Browser.mobile,tileLoader:!1,zoomAnimation:!0},initialize:function(e){vart=this;e=e||{},this.render=this.render.bind(this),L.Util.setOptions(this,e),this._canvas=this._createCanvas(),this.options.zoomAnimation&&(this._backCanvas=this._createCanvas()),this._ctx=this._canvas.getContext("2d"),this.currentAnimationFrame=-1,this.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){returnwindow.setTimeout(e,1e3/60)},this.cancelAnimationFrame=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){clearTimeout(e)}},_createCanvas:function(){vare;e=document.createElement("canvas"),e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.pointerEvents="none",e.style.zIndex=this.options.zIndex||0;vart="leaflet-tile-container";returnthis.options.zoomAnimation&&(t+=" leaflet-zoom-animated"),e.setAttribute("class",t),e},onAdd:function(e){this._map=e;vart=this._map._panes.tilePane,n=L.DomUtil.create("div","leaflet-layer");n.appendChild(this._canvas),this.options.zoomAnimation&&(n.appendChild(this._backCanvas),this._backCanvas.style.display="none"),t.appendChild(n),this._container=n,e.dragging._draggable.on("predrag",function(){vart=e.dragging._draggable;L.DomUtil.setPosition(this._canvas,{x:-t._newPos.x,y:-t._newPos.y})},this),e.on({viewreset:this._reset},this),e.on("move",this.redraw,this),e.on("resize",this._reset,this),this.options.zoomAnimation&&e.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim,moveend:this._reset},this),this.options.tileLoader&&this._initTileLoader(),this._reset()},_animateZoom:function(e){this._animating||(this._animating=!0);vart=this._backCanvas;t.width=this._canvas.width,t.height=this._canvas.height;varn=this._canvas._leaflet_pos||{x:0,y:0};t.getContext("2d").drawImage(this._canvas,0,0),L.DomUtil.setPosition(t,L.DomUtil.getPosition(this._canvas)),this._canvas.style.display="none",t.style.display="block";varr=this._map,i=r.getZoomScale(e.zoom),s=r._latLngToNewLayerPoint(r.getCenter(),e.zoom,e.center),o=r._latLngToNewLay
){for(vart=1;t<arguments.length;++t){varn=arguments[t];for(varrinn)e=e.replace(RegExp("\\{"+r+"\\}","g"),n[r])}returne}varr=e("../"),i=e("../profiler"),s=r.types.Uint8Array,o=r.types.Int32Array,u=r.types.Uint32Array,f=function(e){this._ready=!1,this._tileQueue=[],this.options=e,this.options.is_time=this.options.is_time===undefined?!0:this.options.is_time,this.options.tiler_protocol=e.tiler_protocol||"http",this.options.tiler_domain=e.tiler_domain||"cartodb.com",this.options.tiler_port=e.tiler_port||80,this.options.data_aggregation&&(this.options.cumulative=this.options.data_aggregation==="cumulative");if(e.resolution===undefined)thrownewError("resolution should be provided");if(e.steps===undefined)thrownewError("steps should be provided");e.start===undefined?this._fetchKeySpan():this._setReady(!0)};f.prototype={proccessTile:function(e,t,n){varr,a=news(e.length),f=news(e.length),l=i.metric("ProviderJSON:mem"),c=i.metric("ProviderJSON:point_count"),h=i.metric("ProviderJSON:process_time").start(),p=0,d=-1;for(r=0;r<e.length;++r){varv=e[r];p+=v.dates__uint16.length;for(varm=0;m<v.dates__uint16.length;++m)d=Math.max(d,v.dates__uint16[m])}this.options.cumulative&&(p=(1+d)*e.length);varg=this.options.cumulative?u:s,y=newo(d+1),b=newo(d+1),w=new(this.options.valueDataType||g)(p),E=newu(p);l.inc(4*d+4*d+p+p*4),c.inc(e.length);varS={};for(varr=0;r<e.length;++r){varv=e[r];a[r]=v.x__uint8*this.options.resolution,v.y__uint8===-1?f[r]=0:f[r]=v.y__uint8*this.options.resolution;varp=v.dates__uint16,x=v.vals__uint8;if(!this.options.cumulative)for(varT=0,N=p.length;T<N;++T){varC=S[p[T]]||(S[p[T]]=[]);this.options.cumulative&&(x[T]+=prev_val),prev_val=x[T],C.push([r,x[T]])}else{vark={};for(varT=0,N=p.length;T<N;++T)k[p[T]]=x[T];varL=0;for(varT=p[0];T<=d;++T){varC=S[T]||(S[T]=[]),A=k[T];A&&(L+=A),C.push([r,L])}}}varO=0,M=0,_=0;for(var_=0;_<=d;++_){varD=0,P=S[_];if(P)for(varr=0;r<P.length;++r){varC=P[r];++D,E[O]=C[0],w[O]=C[1],++O}y[_]=M,b[_]=D,M+=D}returnh.end(),{x:a,y:f,z:n,coord:{x:t.x,y:t.y,z:n},timeCount:b,timeIndex:y,renderDataPos:E,renderData:w,maxDate:d}},_host:function(){vare=this.options,t=e.sql_api_port,n=(e.user_name||e.user)+"."+(e.sql_api_domain||"cartodb.com")+(t?":"+t:""),r=e.sql_api_protocol||"http";returnthis.options.url||r+"://"+n+"/api/v2/sql"},url:function(e){vart=this.options,n=t.sql_api_protocol||"http";if(!this.options.cdn_url)returnthis._host();varr=n+"://";e&&(r+=e+".");vari=t.cdn_url;if(!i.http&&!i.https)thrownewError("cdn_host should contain http and/or https entries");returnr+=i[n]+"/"+(t.user_name||t.user)+"/api/v2/sql",r},_hash:function(e){vart=0;if(!e||e.length==0)returnt;for(varn=0,r=e.length;n<r;++n)t=(t<<5)-t+e.charCodeAt(n)|0;returnt},_extraParams:function(){if(this.options.extra_params){vare=[];for(vartinthis.options.extra_params){varn=this.options.extra_params[t];n&&e.push(t+"="+encodeURIComponent(n))}returne.join("&")}returnnull},isHttps:function(){returnthis.options.sql_api_protocol&&this.options.sql_api_protocol==="https"},sql:function(e,t,n){n=n||{};vari=this.options.subdomains||"0123";this.isHttps()&&(i=[null]);vars;n.no_cdn?s=this._host():s=this.url(i[Math.abs(this._hash(e))%i.length]);varo=this._extraParams();r.net.get(s+"?q="+encodeURIComponent(e)+(o?"&"+o:""),function(e){n.parseJSON&&(e=JSON.parse(e&&e.responseText)),t&&t(e)})},getTileData:function(e,t,n){this._ready?this._getTileData(e,t,n):this._tileQueue.push([e,t,n])},_setReady:function(e){this._ready=!0,this._processQueue(),this.options.ready&&this.options.ready()},_processQueue:function(){vare;while(e=this._tileQueue.pop())this._getTileData.apply(this,e)},_getTileData:function(e,t,n){varr=i.metric("ProviderJSON:tile_fetch_time").start();this.table=this.options.table;vars=1<<t,o=this.options.column;this.options.is_time&&(o=a("date_part('epoch', {column})",this.options));varu="WITHparAS(SELECTCDB_XYZ_Resolution({zoom})*{resolution}asres,256/{resolution}astile_size,CDB_XYZ_Extent({x},{y},{zoom})asext),cteAS(SELECTST_SnapToGrid(i.the_geom_webmercator,p.r
n[0]:n[1]!=r[1]?r[1]-n[1]:n[2]!=r[2]?r[2]-n[2]:r[3]-n[3]};returns},parsers:{primary:function(){vare,t=[];while((e=y(this.rule)||y(this.ruleset)||y(this.comment))||y(/^[\s\n]+/)||(e=y(this.invalid)))e&&t.push(e);returnt},invalid:function(){vare=y(/^[^;\n]*[;\n]/);if(e)returnnewi.Invalid(e,a)},comment:function(){vare;if(n.charAt(r)!=="/")return;if(n.charAt(r+1)==="/")returnnewi.Comment(y(/^\/\/.*/),!0);if(e=y(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))returnnewi.Comment(e)},entities:{quoted:function(){if(n.charAt(r)!=='"'&&n.charAt(r)!=="'")return;vare=y(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);if(e)returnnewi.Quoted(e[1]||e[2])},field:function(){if(!y("["))return;vare=y(/(^[^\]]+)/);if(!y("]"))return;if(e)returnnewi.Field(e[1])},comparison:function(){vare=y(/^=~|=|!=|<=|>=|<|>/);if(e)returne},keyword:function(){vare=y(/^[A-Za-z-]+[A-Za-z-0-9_]*/);if(e)returnnewi.Keyword(e)},call:function(){vare,t;if(!(e=/^([\w\-]+|%)\(/.exec(l[o])))return;e=e[1];if(e==="url")returnnull;r+=e.length,y("("),t=y(this.entities.arguments);if(!y(")"))return;if(e)returnnewi.Call(e,t,r)},arguments:function(){vare=[],t;while(t=y(this.expression)){e.push(t);if(!y(","))break}returne},literal:function(){returny(this.entities.dimension)||y(this.entities.keywordcolor)||y(this.entities.hexcolor)||y(this.entities.quoted)},url:function(){vare;if(n.charAt(r)!=="u"||!y(/^url\(/))return;returne=y(this.entities.quoted)||y(this.entities.variable)||y(/^[\-\w%@$\/.&=:;#+?~]+/)||"",y(")")?newi.URL(typeofe.value!="undefined"||einstanceofi.Variable?e:newi.Quoted(e)):newi.Invalid(e,a,"Missing closing ) in URL.")},variable:function(){vare,s=r;if(n.charAt(r)==="@"&&(e=y(/^@[\w-]+/)))returnnewi.Variable(e,s,t.filename)},hexcolor:function(){vare;if(n.charAt(r)==="#"&&(e=y(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))returnnewi.Color(e[1])},keywordcolor:function(){vare=l[o].match(/^[a-z]+/);if(e&&e[0]ini.Reference.data.colors)returnnewi.Color(i.Reference.data.colors[y(/^[a-z]+/)])},dimension:function(){vare=n.charCodeAt(r);if(e>57||e<45||e===47)return;vart=y(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);if(t)returnnewi.Dimension(t[1],t[2],a)}},variable:function(){vare;if(n.charAt(r)==="@"&&(e=y(/^(@[\w-]+)\s*:/)))returne[1]},entity:function(){returny(this.entities.call)||y(this.entities.literal)||y(this.entities.field)||y(this.entities.variable)||y(this.entities.url)||y(this.entities.keyword)},end:function(){returny(";")||b("}")},element:function(){vare=y(/^(?:[.#][\w\-]+|\*|Map)/);if(e)returnnewi.Element(e)},attachment:function(){vare=y(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)returne[1]},selector:function(){vare,t,s,o=[],u,f=newi.Filterset,l,c=[],h=i.FrameOffset.none;segments=0,conditions=0;while((s=y(this.element))||(l=y(this.zoom))||(fo=y(this.frame_offset))||(u=y(this.filter))||(e=y(this.attachment))){segments++;if(s)o.push(s);elseif(l)c.push(l),conditions++;elseif(fo)h=fo,conditions++;elseif(u){varp=f.add(u);if(p)throwE({message:p,index:r-1});conditions++}else{if(t)throwE({message:"Encountered second attachment name.",index:r-1});t=e}vard=n.charAt(r);if(d==="{"||d==="}"||d===";"||d===",")break}if(segments)returnnewi.Selector(f,c,h,o,t,conditions,a)},filter:function(){v();vare,n,r;if(!y("["))return;if(e=y(/^[a-zA-Z0-9\-_]+/)||y(this.entities.quoted)||y(this.entities.variable)||y(this.entities.keyword)||y(this.entities.field)){einstanceofi.Quoted&&(e=newi.Field(e.toString()));if((n=y(this.entities.comparison))&&(r=y(this.entities.quoted)||y(this.entities.variable)||y(this.entities.dimension)||y(this.entities.keyword)||y(this.entities.field))){if(!y("]"))throwE({message:"Missing closing ] of filter.",index:a-1});returne.is||(e=newi.Field(e)),newi.Filter(e,n,r,a,t.filename)}}},frame_offset:function(){v();vare,t;if(y(/^\[\s*frame-offset/g)&&(e=y(this.entities.comparison))&&(t=y(/^\d+/))&&y("]"))returni.FrameOffset(e,t,a)},zoom:function(){v();vare,t;if(y(/^\[\s*zoom/g)&&(e=y(this.entities.comparison))&&(t=y(this.entities.variable)||y(this.entities.dimension))&&y("]"))returnnewi.Zoom(e,t,a);m()},bloc
:1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse","rectangle"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"float",expression:!0},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"float",expression:!0},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color",expression:!0},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths
.isArray(t)?this.rgb=t.slice(0,3):t.length==6?this.rgb=t.match(/.{2}/g).map(function(e){returnparseInt(e,16)}):this.rgb=t.split("").map(function(e){returnparseInt(e+e,16)}),typeofn=="number"?this.alpha=n:t.length===4?this.alpha=t[3]:this.alpha=1},e.Color.prototype={is:"color",ev:function(){returnthis},toString:function(){returnthis.alpha<1?"rgba("+this.rgb.map(function(e){returnMath.round(e)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(e){returne=Math.round(e),e=(e>255?255:e<0?0:e).toString(16),e.length===1?"0"+e:e}).join("")},operate:function(t,n,r){vari=[];rinstanceofe.Color||(r=r.toColor());for(vars=0;s<3;s++)i[s]=e.operate(n,this.rgb[s],r.rgb[s]);returnnewe.Color(i)},toHSL:function(){vare=this.rgb[0]/255,t=this.rgb[1]/255,n=this.rgb[2]/255,r=this.alpha,i=Math.max(e,t,n),s=Math.min(e,t,n),o,u,a=(i+s)/2,f=i-s;if(i===s)o=u=0;else{u=a>.5?f/(2-i-s):f/(i+s);switch(i){casee:o=(t-n)/f+(t<n?6:0);break;caset:o=(n-e)/f+2;break;casen:o=(e-t)/f+4}o/=6}return{h:o*360,s:u,l:a,a:r}}}})(e("../tree"))},{"../tree":45}],48:[function(e,t,n){(function(e){e.Comment=function(t,n){this.value=t,this.silent=!!n},e.Comment.prototype={toString:function(e){return"<!--"+this.value+"-->"},ev:function(){returnthis}}})(e("../tree"))},{"../tree":45}],49:[function(e,t,n){(function(t){(function(n){functions(e){functiont(e){returne[1].toUpperCase()}returne.charAt(0).toUpperCase()+e.slice(1).replace(/\-./,t)+"Symbolizer"}functiono(e){returne.sort(function(e,t){returne[1]-t[1]}).map(function(e){returne[0]})}varr=e("assert"),i=t._||e("underscore");n.Definition=function(t,i){this.elements=t.elements,r.ok(t.filtersinstanceofn.Filterset),this.rules=i,this.ruleIndex={};for(vars=0;s<this.rules.length;s++)"zoom"inthis.rules[s]&&(this.rules[s]=this.rules[s].clone()),this.rules[s].zoom=t.zoom,this.ruleIndex[this.rules[s].updateID()]=!0;this.filters=t.filters,this.zoom=t.zoom,this.frame_offset=t.frame_offset,this.attachment=t.attachment||"__default__",this.specificity=t.specificity()},n.Definition.prototype.toString=function(){vare=this.filters.toString();for(vart=0;t<this.rules.length;t++)e+="\n "+this.rules[t];returne},n.Definition.prototype.clone=function(e){e&&r.ok(einstanceofn.Filterset);vart=Object.create(n.Definition.prototype);returnt.rules=this.rules.slice(),t.ruleIndex=i.clone(this.ruleIndex),t.filters=e?e:this.filters.clone(),t.attachment=this.attachment,t},n.Definition.prototype.addRules=function(e){vart=0;for(varn=0;n<e.length;n++)this.ruleIndex[e[n].id]||(this.rules.push(e[n]),this.ruleIndex[e[n].id]=!0,t++);returnt},n.Definition.prototype.appliesTo=function(e,t){for(varn=0,r=this.elements.length;n<r;n++){vari=this.elements[n];if(!(i.wildcard||i.type==="class"&&t[i.clean]||i.type==="id"&&e===i.clean))return!1}return!0},n.Definition.prototype.symbolizersToXML=function(e,t,r){vari=r.toXML(e).join("")+this.filters.toXML(e),u=[],a=[];for(varfint){a=[];for(varlint[f])a.push(t[f][l].index);varc=Math.min.apply(Math,a);u.push([f,c])}u=o(u);varh=0;for(varp=0;p<u.length;p++){vard=t[u[p]],v=u[p].split("/").pop();if(v==="*")continue;h++;varm=n.Reference.requiredProperties(v,d);if(m){varg=d[Object.keys(d).shift()];e.error({message:m,index:g.index,filename:g.filename})}vary=s(v),b=!0,w;i+=" <"+y+" ";for(varEind){v==="map"&&e.error({message:"Map properties are not permitted in other rules",index:d[E].index,filename:d[E].filename});varS=n.Reference.selector(d[E].name);S&&S.serialization&&S.serialization==="content"?(b=!1,w=d[E].ev(e).toXML(e,!0)):S&&S.serialization&&S.serialization==="tag"?(b=!1,w=d[E].ev(e).toXML(e,!0)):i+=d[E].ev(e).toXML(e)+" "}b?i+="/>\n":typeofw!="undefined"&&(w.indexOf("<")!=-1?i+=">"+w+"</"+y+">\n":i+="><![CDATA["+w+"]]></"+y+">\n")}return!h||!i?"":" <Rule>\n"+i+" </Rule>\n"},n.Definition.prototype.collectSymbolizers=function(e,t){varn={},r;for(vari=t;i<this.rules.length;i++){r=this.rules[i];vars=r.instance+"/"+r.symbolizer;e.current&r.zoom&&(!(sinn)||!(r.nameinn[s]))&&(e.current&=r.zoom,sinn||(n[s]={}),n[s][r.name]=r)}if(Object.keys(n).length)retur
),n<22&&e.push(" <MinScaleDenominator>"+r.Zoom.ranges[n+1]+"</MinScaleDenominator>\n")}returne},r.Zoom.prototype.toString=function(){vare="";for(vart=0;t<=r.Zoom.maxZoom;t++)e+=this.zoom&1<<t?"X":".";returne}},{"../tree":45}],74:[function(e,t,n){t.exports={_args:[[{raw:"carto@github:cartodb/carto#master",scope:null,escapedName:"carto",name:"carto",rawSpec:"github:cartodb/carto#master",spec:"github:cartodb/carto#master",type:"hosted",hosted:{type:"github",ssh:"git@github.com:cartodb/carto.git#master",sshUrl:"git+ssh://git@github.com/cartodb/carto.git#master",httpsUrl:"git+https://github.com/cartodb/carto.git#master",gitUrl:"git://github.com/cartodb/carto.git#master",shortcut:"github:cartodb/carto#master",directUrl:"https://raw.githubusercontent.com/cartodb/carto/master/package.json"}},"/Users/ruben/Projects/Carto/torque"]],_from:"cartodb/carto#master",_id:"carto@0.15.1-cdb4",_inCache:!0,_location:"/carto",_phantomChildren:{},_requested:{raw:"carto@github:cartodb/carto#master",scope:null,escapedName:"carto",name:"carto",rawSpec:"github:cartodb/carto#master",spec:"github:cartodb/carto#master",type:"hosted",hosted:{type:"github",ssh:"git@github.com:cartodb/carto.git#master",sshUrl:"git+ssh://git@github.com/cartodb/carto.git#master",httpsUrl:"git+https://github.com/cartodb/carto.git#master",gitUrl:"git://github.com/cartodb/carto.git#master",shortcut:"github:cartodb/carto#master",directUrl:"https://raw.githubusercontent.com/cartodb/carto/master/package.json"}},_requiredBy:["/"],_resolved:"git://github.com/cartodb/carto.git#cbe66020f98647429d2bb04b7cf73dcf194f2abf",_shasum:"81502a07a925021884ef159715147788290f7910",_shrinkwrap:null,_spec:"carto@github:cartodb/carto#master",_where:"/Users/ruben/Projects/Carto/torque",author:{name:"CartoDB",url:"http://cartodb.com/"},bin:{carto:"./bin/carto"},bugs:{url:"https://github.com/cartodb/carto/issues"},contributors:[{name:"Tom MacWright",email:"macwright@gmail.com"},{name:"Konstantin Käfer"},{name:"Alexis Sellier",email:"self@cloudhead.net"},{name:"Raul Ochoa",email:"rochoa@cartodb.com"},{name:"Javi Santana",email:"jsantana@cartodb.com"}],dependencies:{"mapnik-reference":"~6.0.2",optimist:"~0.6.0",underscore:"1.8.3"},description:"CartoCSS Stylesheet Compiler",devDependencies:{browserify:"~7.0.0",coveralls:"~2.10.1",istanbul:"~0.2.14",jshint:"0.2.x",mocha:"1.12.x",sax:"0.1.x","uglify-js":"1.3.3"},engines:{node:">=0.4.x"},gitHead:"cbe66020f98647429d2bb04b7cf73dcf194f2abf",homepage:"https://github.com/cartodb/carto#readme",keywords:["maps","css","stylesheets"],licenses:[{type:"Apache"}],main:"./lib/carto/index",man:["./man/carto.1"],name:"carto",optionalDependencies:{},readme:"# CartoCSS\n\n[![Build Status](https://travis-ci.org/CartoDB/carto.png?branch=master)](https://travis-ci.org/CartoDB/carto)\n\nIs as stylesheet renderer for javascript, It's an evolution of the Mapnik renderer from Mapbox.\nPlease, see original [Mapbox repo](http://github.com/mapbox/carto) for more information and credits\n\n## Quick Start\n\n```javascript\n// shader is a CartoCSS object\n\nvar cartocss = [\n '#layer {',\n ' marker-width: [property]',\n ' marker-fill: red',\n '}'\n].join('')\nvar shader = new carto.RendererJS().render(cartocss);\nvar layers = shader.getLayers()\nfor (var i = 0; i < layers.length; ++i) {\n var layer = layers[i];\n console.log(\"layer name: \", layer.fullName())\n console.log(\"- frames: \", layer.frames())\n console.log(\"- attachment: \",layer.attachment())\n\nvarlayerShader=layer.getStyle({property:1},{zoom:10})\nconsole.log(layerShader['marker-width'])// 1\n console.log(layerShader['marker-fill']) // #FF0000\n}\n\n```\n\n# API\n\n## RendererJS\n\n### render(cartocss)\n\n## CartoCSS\n\ncompiled cartocss object\n\n### getLayers\n\nreturn the layers, an array of ``CartoCSS.Layer`` object\n\n### getDefault\n\nreturn the default layer (``CartoCSS.Layer``), usually the Map layer\n\n\n### findLayer(where)\n\nfind a layer using where object.\n\n```\nshader.findLayer({ name: 'test' })\n```\n\n## CartoCSS.Layer\n\n### getStyle(props, con
)}varn=e.Promise;if(n&&Object.prototype.toString.call(n.resolve())==="[object Promise]"&&!n.cast)return;e.Promise=ct}varu;Array.isArray?u=Array.isArray:u=function(e){returnObject.prototype.toString.call(e)==="[object Array]"};vara=u,f=0,l,c,h=function(t,n){N[f]=t,N[f+1]=n,f+=2,f===2&&(c?c(C):L())},v=typeofwindow!="undefined"?window:undefined,m=v||{},g=m.MutationObserver||m.WebKitMutationObserver,y=typeofn!="undefined"&&{}.toString.call(n)==="[object process]",b=typeofUint8ClampedArray!="undefined"&&typeofimportScripts!="undefined"&&typeofMessageChannel!="undefined",N=newArray(1e3),L;y?L=w():g?L=S():b?L=x():v===undefined&&typeofe=="function"?L=k():L=T();varO=A,_=M,P=void0,H=1,B=2,j=newG,Y=newG,rt=nt,st=it,ut=ot,at=0,ct=ht;ht.all=rt,ht.race=st,ht.resolve=_,ht.reject=ut,ht._setScheduler=p,ht._setAsap=d,ht._asap=h,ht.prototype={constructor:ht,then:O,"catch":function(e){returnthis.then(null,e)}};varpt=dt;dt.prototype._validationError=function(){returnnewError("Array Methods must be provided an Array")},dt.prototype._enumerate=function(){vare=this.length,t=this._input;for(varn=0;this._state===P&&n<e;n++)this._eachEntry(t[n],n)},dt.prototype._eachEntry=function(e,t){varn=this._instanceConstructor,r=n.resolve;if(r===_){vari=q(e);if(i===O&&e._state!==P)this._settledAt(e._state,t,e._result);elseif(typeofi!="function")this._remaining--,this._result[t]=e;elseif(n===ct){vars=newn(D);W(s,e,i),this._willSettleAt(s,t)}elsethis._willSettleAt(newn(function(t){t(e)}),t)}elsethis._willSettleAt(r(e),t)},dt.prototype._settledAt=function(e,t,n){varr=this.promise;r._state===P&&(this._remaining--,e===B?J(r,n):this._result[t]=n),this._remaining===0&&$(r,this._result)},dt.prototype._willSettleAt=function(e,t){varn=this;K(e,undefined,function(e){n._settledAt(H,t,e)},function(e){n._settledAt(B,t,e)})};varmt=vt,gt={Promise:ct,polyfill:mt};typeofdefine=="function"&&define.amd?define(function(){returngt}):typeoft!="undefined"&&t.exports?t.exports=gt:typeofthis!="undefined"&&(this.ES6Promise=gt),mt()}).call(this)}).call(this,e("_process"),typeofglobal!="undefined"?global:typeofself!="undefined"?self:typeofwindow!="undefined"?window:{})},{_process:118}],83:[function(e,t,n){n.read=function(e,t,n,r,i){vars,o,u=i*8-r-1,a=(1<<u)-1,f=a>>1,l=-7,c=n?i-1:0,h=n?-1:1,p=e[t+c];c+=h,s=p&(1<<-l)-1,p>>=-l,l+=u;for(;l>0;s=s*256+e[t+c],c+=h,l-=8);o=s&(1<<-l)-1,s>>=-l,l+=r;for(;l>0;o=o*256+e[t+c],c+=h,l-=8);if(s===0)s=1-f;else{if(s===a)returno?NaN:(p?-1:1)*Infinity;o+=Math.pow(2,r),s-=f}return(p?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){varo,u,a,f=s*8-i-1,l=(1<<f)-1,c=l>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,d=r?1:-1,v=t<0||t===0&&1/t<0?1:0;t=Math.abs(t),isNaN(t)||t===Infinity?(u=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+c>=1?t+=h/a:t+=h*Math.pow(2,1-c),t*a>=2&&(o++,a/=2),o+c>=l?(u=0,o=l):o+c>=1?(u=(t*a-1)*Math.pow(2,i),o+=c):(u=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));for(;i>=8;e[n+p]=u&255,p+=d,u/=256,i-=8);o=o<<i|u,f+=i;for(;f>0;e[n+p]=o&255,p+=d,o/=256,f-=8);e[n+p-d]|=v*128}},{}],84:[function(e,t,n){varr=Array.isArray,i=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],85:[function(e,t,n){(function(n){"use strict";varr=n.Base64,i="2.1.9",s;if(typeoft!="undefined"&&t.exports)try{s=e("buffer").Buffer}catch(o){}varu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){vart={};for(varn=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;returnt}(u),f=String.fromCharCode,l=function(e){if(e.length<2){vart=e.charCodeAt(0);returnt<128?e:t<2048?f(192|t>>>6)+f(128|t&63):f(224|t>>>12&15)+f(128|t>>>6&63)+f(128|t&63)}vart=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);returnf(240|t>>>18&7)+f(128|t>>>12&63)+f(128|t>>>6&63)+f(128|t&63)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(e){returne.replace(c,l)},p=function(e){vart=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),r=[u.charAt(n>>>18),u.charAt(n>>>12
(function(){vare=r.processor.plugins[r.plugin],i=r.run(e);r.plugin+=1,g(i)?i.then(function(){r.asyncTick(t,n)}).catch(function(t){r.handleError(t,e),r.processed=!0,n(t)}):r.asyncTick(t,n)})()}catch(i){this.processed=!0,n(i)}},e.prototype.async=function(){vart=this;returnthis.processed?newPromise(function(e,n){t.error?n(t.error):e(t.stringify())}):this.processing?this.processing:(this.processing=(newPromise(function(e,n){if(t.error)returnn(t.error);t.plugin=0,t.asyncTick(e,n)})).then(function(){returnt.processed=!0,t.stringify()}),this.processing)},e.prototype.sync=function(){if(this.processed)returnthis.result;this.processed=!0;if(this.processing)thrownewError("Use process(css).then(cb) to work with async plugins");if(this.error)throwthis.error;for(vart=this.result.processor.plugins,n=Array.isArray(t),r=0,t=n?t:t[Symbol.iterator]();;){vari;if(n){if(r>=t.length)break;i=t[r++]}else{r=t.next();if(r.done)break;i=r.value}vars=i,o=this.run(s);if(g(o))thrownewError("Use process(css).then(cb) to work with async plugins")}returnthis.result},e.prototype.run=function(t){this.result.lastPlugin=t;try{returnt(this.result.root,this.result)}catch(n){throwthis.handleError(n,t),n}},e.prototype.stringify=function(){if(this.stringified)returnthis.result;this.stringified=!0,this.sync();vart=this.result.opts,n=a.default;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);varr=newo.default(n,this.result.root,this.result.opts),i=r.generate();returnthis.result.css=i[0],this.result.map=i[1],this.result},r(e,[{key:"processor",get:function(){returnthis.result.processor}},{key:"opts",get:function(){returnthis.result.opts}},{key:"css",get:function(){returnthis.stringify().css}},{key:"content",get:function(){returnthis.stringify().content}},{key:"map",get:function(){returnthis.stringify().map}},{key:"root",get:function(){returnthis.sync().root}},{key:"messages",get:function(){returnthis.sync().messages}}]),e}();n.default=y,t.exports=n["default"]},{"./map-generator":102,"./parse":104,"./result":109,"./stringify":113,"./warn-once":116}],101:[function(e,t,n){"use strict";n.__esModule=!0;varr={split:functioni(e,t,n){varr=[],s="",i=!1,o=0,u=!1,a=!1;for(varf=0;f<e.length;f++){varl=e[f];u?a?a=!1:l==="\\"?a=!0:l===u&&(u=!1):l==='"'||l==="'"?u=l:l==="("?o+=1:l===")"?o>0&&(o-=1):o===0&&t.indexOf(l)!==-1&&(i=!0),i?(s!==""&&r.push(s.trim()),s="",i=!1):s+=l}return(n||s!=="")&&r.push(s.trim()),r},space:function(t){varn=[" ","\n"," "];returnr.split(t,n)},comma:functions(e){vars=",";returnr.split(e,[s],!0)}};n.default=r,t.exports=n["default"]},{}],102:[function(e,t,n){"use strict";functiona(e){returne&&e.__esModule?e:{"default":e}}functionf(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}n.__esModule=!0;varr=e("js-base64"),i=e("source-map"),s=a(i),o=e("path"),u=a(o),l=function(){functione(t,n,r){f(this,e),this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r}returne.prototype.isMap=function(){returntypeofthis.opts.map!="undefined"?!!this.opts.map:this.previous().length>0},e.prototype.previous=function(){vart=this;returnthis.previousMaps||(this.previousMaps=[],this.root.walk(function(e){if(e.source&&e.source.input.map){varn=e.source.input.map;t.previousMaps.indexOf(n)===-1&&t.previousMaps.push(n)}})),this.previousMaps},e.prototype.isInline=function(){if(typeofthis.mapOpts.inline!="undefined")returnthis.mapOpts.inline;vart=this.mapOpts.annotation;returntypeoft!="undefined"&&t!==!0?!1:this.previous().length?this.previous().some(function(e){returne.inline}):!0},e.prototype.isSourcesContent=function(){returntypeofthis.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(e){returne.withContent()}):!0},e.prototype.clearAnnotation=function(){if(this.mapOpts.annotation===!1)return;vart=undefined;for(varn=this.root.nodes.length-1;n>=0;n--){t=this.root.nodes[n];if(t.type!=="comment")continue;t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}},e.pro
n.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){returnthis._sections.every(function(e){returne.consumer.hasContentsOfAllSources()})},c.prototype.sourceContentFor=function(t,n){for(varr=0;r<this._sections.length;r++){vari=this._sections[r],s=i.consumer.sourceContentFor(t,!0);if(s)returns}if(n)returnnull;thrownewError('"'+t+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){for(varn=0;n<this._sections.length;n++){vari=this._sections[n];if(i.consumer.sources.indexOf(r.getArg(t,"source"))===-1)continue;vars=i.consumer.generatedPositionFor(t);if(s){varo={line:s.line+(i.generatedOffset.generatedLine-1),column:s.column+(i.generatedOffset.generatedLine===s.line?i.generatedOffset.generatedColumn-1:0)};returno}}return{line:null,column:null}},c.prototype._parseMappings=function(t,n){this.__generatedMappings=[],this.__originalMappings=[];for(vari=0;i<this._sections.length;i++){vars=this._sections[i],o=s.consumer._generatedMappings;for(vara=0;a<o.length;a++){varf=o[a],l=s.consumer._sources.at(f.source);s.consumer.sourceRoot!==null&&(l=r.join(s.consumer.sourceRoot,l)),this._sources.add(l),l=this._sources.indexOf(l);varc=s.consumer._names.at(f.name);this._names.add(c),c=this._names.indexOf(c);varh={source:l,generatedLine:f.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:f.generatedColumn+(s.generatedOffset.generatedLine===f.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:f.originalLine,originalColumn:f.originalColumn,name:c};this.__generatedMappings.push(h),typeofh.originalLine=="number"&&this.__originalMappings.push(h)}}u(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),u(this.__originalMappings,r.compareByOriginalPositions)},n.IndexedSourceMapConsumer=c},{"./array-set":120,"./base64-vlq":121,"./binary-search":123,"./quick-sort":125,"./util":129}],127:[function(e,t,n){functionu(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=news,this._names=news,this._mappings=newo,this._sourcesContents=null}varr=e("./base64-vlq"),i=e("./util"),s=e("./array-set").ArraySet,o=e("./mapping-list").MappingList;u.prototype._version=3,u.fromSourceMap=function(t){varn=t.sourceRoot,r=newu({file:t.file,sourceRoot:n});returnt.eachMapping(function(e){vart={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(t.source=e.source,n!=null&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(t.name=e.name)),r.addMapping(t)}),t.sources.forEach(function(e){varn=t.sourceContentFor(e);n!=null&&r.setSourceContent(e,n)}),r},u.prototype.addMapping=function(t){varn=i.getArg(t,"generated"),r=i.getArg(t,"original",null),s=i.getArg(t,"source",null),o=i.getArg(t,"name",null);this._skipValidation||this._validateMapping(n,r,s,o),s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:s,name:o})},u.prototype.setSourceContent=function(t,n){varr=t;this._sourceRoot!=null&&(r=i.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(deletethis._sourcesContents[i.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},u.prototype.applySourceMap=function(t,n,r){varo=n;if(n==null){if(t.file==null)thrownewError('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');o=t.file}varu=this._sourceRoot;u!=null&&(o=i.relative(u,o));vara=news,f=news;this._mappings.unsortedForEach(function(e){if(e.source===o&&e.originalLine!=null){varn=t.ori