swc/crates/swc_ecma_minifier/tests/full/feedback-mapbox/2c796e83-0724e2af5f19128a/output.js

2 lines
917 KiB
JavaScript
Raw Normal View History

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[634],{6158:function(a,b,c){var d=c(3454);!function(b,c){a.exports=c()}(this,function(){"use strict";var a,b,c;function e(d,e){if(a)if(b){var f="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+a+")(sharedChunk); ("+b+")(sharedChunk); self.onerror = null;",g={};a(g),c=e(g),"undefined"!=typeof window&&window&&window.URL&&window.URL.createObjectURL&&(c.workerUrl=window.URL.createObjectURL(new Blob([f],{type:"text/javascript"})))}else b=e;else a=e}return e(["exports"],function(a){"use strict";var b,c="2.7.0",e=f;function f(a,b,c,d){this.cx=3*a,this.bx=3*(c-a)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(d-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=a,this.p1y=d,this.p2x=c,this.p2y=d}f.prototype.sampleCurveX=function(a){return((this.ax*a+this.bx)*a+this.cx)*a},f.prototype.sampleCurveY=function(a){return((this.ay*a+this.by)*a+this.cy)*a},f.prototype.sampleCurveDerivativeX=function(a){return(3*this.ax*a+2*this.bx)*a+this.cx},f.prototype.solveCurveX=function(a,b){var c,d,e,f,g;for(void 0===b&&(b=1e-6),e=a,g=0;g<8;g++){if(Math.abs(f=this.sampleCurveX(e)-a)<b)return e;var h=this.sampleCurveDerivativeX(e);if(1e-6>Math.abs(h))break;e-=f/h}if((e=a)<(c=0))return c;if(e>(d=1))return d;for(;c<d;){if(Math.abs((f=this.sampleCurveX(e))-a)<b)return e;a>f?c=e:d=e,e=.5*(d-c)+c}return e},f.prototype.solve=function(a,b){return this.sampleCurveY(this.solveCurveX(a,b))};var g=h;function h(a,b){this.x=a,this.y=b}h.prototype={clone:function(){return new h(this.x,this.y)},add:function(a){return this.clone()._add(a)},sub:function(a){return this.clone()._sub(a)},multByPoint:function(a){return this.clone()._multByPoint(a)},divByPoint:function(a){return this.clone()._divByPoint(a)},mult:function(a){return this.clone()._mult(a)},div:function(a){return this.clone()._div(a)},rotate:function(a){return this.clone()._rotate(a)},rotateAround:function(a,b){return this.clone()._rotateAround(a,b)},matMult:function(a){return this.clone()._matMult(a)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(a){return this.x===a.x&&this.y===a.y},dist:function(a){return Math.sqrt(this.distSqr(a))},distSqr:function(a){var b=a.x-this.x,c=a.y-this.y;return b*b+c*c},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(a){return Math.atan2(this.y-a.y,this.x-a.x)},angleWith:function(a){return this.angleWithSep(a.x,a.y)},angleWithSep:function(a,b){return Math.atan2(this.x*b-this.y*a,this.x*a+this.y*b)},_matMult:function(a){var b=a[2]*this.x+a[3]*this.y;return this.x=a[0]*this.x+a[1]*this.y,this.y=b,this},_add:function(a){return this.x+=a.x,this.y+=a.y,this},_sub:function(a){return this.x-=a.x,this.y-=a.y,this},_mult:function(a){return this.x*=a,this.y*=a,this},_div:function(a){return this.x/=a,this.y/=a,this},_multByPoint:function(a){return this.x*=a.x,this.y*=a.y,this},_divByPoint:function(a){return this.x/=a.x,this.y/=a.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var a=this.y;return this.y=this.x,this.x=-a,this},_rotate:function(a){var b=Math.cos(a),c=Math.sin(a),d=c*this.x+b*this.y;return this.x=b*this.x-c*this.y,this.y=d,this},_rotateAround:function(a,b){var c=Math.cos(a),d=Math.sin(a),e=b.y+d*(this.x-b.x)+c*(this.y-b.y);return this.x=b.x+c*(this.x-b.x)-d*(this.y-b.y),this.y=e,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},h.convert=function(a){return a instanceof h?a:Array.isArray(a)?new h(a[0],a[1]):a};var i="undefined"!=typeof self?self:{},j="undefined"!=typeof Float32Array?Float32Array:Array;function k(){var a=new j(9);return j!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[5]=0,a[6]=0,a[7]=0),a[0]=1,a[4]=1,a[8]=1,a}function l(a){return a[0]=1,a[1]