qa-regulatory-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/PolygonPipeline-04baeb41.js

2 lines
11 KiB
JavaScript
Raw Normal View History

2023-11-07 10:04:37 +08:00
define(["exports","./Cartesian2-bd414876","./Cartesian3-e0307675","./Check-741c5f3c","./ComponentDatatype-aaeec80f","./defaultValue-81eec7ed","./EllipsoidRhumbLine-592e8885","./GeometryAttribute-2b42a913","./Math-e73894ab","./WebGLConstants-508b9636"],(function(e,t,n,r,i,a,u,x,o,s){"use strict";var p=h,l=h;function h(e,t,n){n=n||2;var r,i,a,u,x,o,s,p=t&&t.length,l=p?t[0]*n:e.length,h=f(e,0,l,n,!0),v=[];if(!h||h.next===h.prev)return v;if(p&&(h=function(e,t,n,r){var i,a,u,x=[];for(i=0,a=t.length;i<a;i++)(u=f(e,t[i]*r,i<a-1?t[i+1]*r:e.length,r,!1))===u.next&&(u.steiner=!0),x.push(M(u));for(x.sort(g),i=0;i<x.length;i++)n=y(n=w(x[i],n),n.next);return n}(e,t,h,n)),e.length>80*n){r=a=e[0],i=u=e[1];for(var d=n;d<l;d+=n)(x=e[d])<r&&(r=x),(o=e[d+1])<i&&(i=o),x>a&&(a=x),o>u&&(u=o);s=0!==(s=Math.max(a-r,u-i))?1/s:0}return c(h,v,n,r,i,s),v}function f(e,t,n,r,i){var a,u;if(i===P(e,t,n,r)>0)for(a=t;a<n;a+=r)u=T(a,e[a],e[a+1],u);else for(a=n-r;a>=t;a-=r)u=T(a,e[a],e[a+1],u);return u&&z(u,u.next)&&(W(u),u=u.next),u}function y(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!z(r,r.next)&&0!==A(r.prev,r,r.next))r=r.next;else{if(W(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function c(e,t,n,r,i,a,u){if(e){!u&&a&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=E(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,u,x,o,s=1;do{for(n=e,e=null,a=null,u=0;n;){for(u++,r=n,x=0,t=0;t<s&&(x++,r=r.nextZ);t++);for(o=s;x>0||o>0&&r;)0!==x&&(0===o||!r||n.z<=r.z)?(i=n,n=n.nextZ,x--):(i=r,r=r.nextZ,o--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,s*=2}while(u>1)}(i)}(e,r,i,a);for(var x,o,s=e;e.prev!==e.next;)if(x=e.prev,o=e.next,a?d(e,r,i,a):v(e))t.push(x.i/n),t.push(e.i/n),t.push(o.i/n),W(e),e=o.next,s=o.next;else if((e=o)===s){u?1===u?c(e=m(y(e),t,n),t,n,r,i,a,2):2===u&&C(e,t,n,r,i,a):c(y(e),t,n,r,i,a,1);break}}}function v(e){var t=e.prev,n=e,r=e.next;if(A(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Z(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&A(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function d(e,t,n,r){var i=e.prev,a=e,u=e.next;if(A(i,a,u)>=0)return!1;for(var x=i.x<a.x?i.x<u.x?i.x:u.x:a.x<u.x?a.x:u.x,o=i.y<a.y?i.y<u.y?i.y:u.y:a.y<u.y?a.y:u.y,s=i.x>a.x?i.x>u.x?i.x:u.x:a.x>u.x?a.x:u.x,p=i.y>a.y?i.y>u.y?i.y:u.y:a.y>u.y?a.y:u.y,l=E(x,o,t,n,r),h=E(s,p,t,n,r),f=e.prevZ,y=e.nextZ;f&&f.z>=l&&y&&y.z<=h;){if(f!==e.prev&&f!==e.next&&Z(i.x,i.y,a.x,a.y,u.x,u.y,f.x,f.y)&&A(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,y!==e.prev&&y!==e.next&&Z(i.x,i.y,a.x,a.y,u.x,u.y,y.x,y.y)&&A(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;f&&f.z>=l;){if(f!==e.prev&&f!==e.next&&Z(i.x,i.y,a.x,a.y,u.x,u.y,f.x,f.y)&&A(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;y&&y.z<=h;){if(y!==e.prev&&y!==e.next&&Z(i.x,i.y,a.x,a.y,u.x,u.y,y.x,y.y)&&A(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function m(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!z(i,a)&&R(i,r,r.next,a)&&G(i,a)&&G(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),W(r),W(r.next),r=e=a),r=r.next}while(r!==e);return y(r)}function C(e,t,n,r,i,a){var u=e;do{for(var x=u.next.next;x!==u.prev;){if(u.i!==x.i&&S(u,x)){var o=O(u,x);return u=y(u,u.next),o=y(o,o.next),c(u,t,n,r,i,a),void c(o,t,n,r,i,a)}x=x.next}u=u.next}while(u!==e)}function g(e,t){return e.x-t.x}function w(e,t){var n=function(e,t){var n,r=t,i=e.x,a=e.y,u=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var x=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(x<=i&&x>u){if(u=x,x===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===u)return n;var o,s=n,p=n.x,l=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=p&&i!==r.x&&Z(a<l?i:u,a,p,l,a<l?u:i,a,r.x,r.y)&&(o=Math.abs(a-r.y)/(i-r.x),G(r,e)&&(o<h||o===h&&(r.x>n.x||r.x===n.x&&b(n,r)))&&(n=r,h=o)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=O(n,e),i=y(n,n.next);return y(r,r.next),t===n?i:t}function b(e,t){return A(e.prev,e,t.prev)<0&&A(t.next,e,e.next)<0}function E(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e