blowfish/node_modules/robust-predicates/umd/predicates.min.js

2 lines
25 KiB
JavaScript
Raw Normal View History

2023-01-29 16:30:24 -06:00
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).predicates={})}(this,(function(t){"use strict";const n=11102230246251565e-32,e=134217729,r=(3+8*n)*n;function s(t,n,e,r,s){let o,a,c,u,f=n[0],i=r[0],h=0,b=0;i>f==i>-f?(o=f,f=n[++h]):(o=i,i=r[++b]);let M=0;if(h<t&&b<e)for(i>f==i>-f?(a=f+o,c=o-(a-f),f=n[++h]):(a=i+o,c=o-(a-i),i=r[++b]),o=a,0!==c&&(s[M++]=c);h<t&&b<e;)i>f==i>-f?(a=o+f,u=a-o,c=o-(a-u)+(f-u),f=n[++h]):(a=o+i,u=a-o,c=o-(a-u)+(i-u),i=r[++b]),o=a,0!==c&&(s[M++]=c);for(;h<t;)a=o+f,u=a-o,c=o-(a-u)+(f-u),f=n[++h],o=a,0!==c&&(s[M++]=c);for(;b<e;)a=o+i,u=a-o,c=o-(a-u)+(i-u),i=r[++b],o=a,0!==c&&(s[M++]=c);return 0===o&&0!==M||(s[M++]=o),M}function o(t,n,e,r,o,a,c,u){return s(s(t,n,e,r,c),c,o,a,u)}function a(t,n,r,s){let o,a,c,u,f,i,h,b,M,l,d;h=e*r,l=h-(h-r),d=r-l;let p=n[0];o=p*r,h=e*p,b=h-(h-p),M=p-b,c=M*d-(o-b*l-M*l-b*d);let y=0;0!==c&&(s[y++]=c);for(let x=1;x<t;x++)p=n[x],u=p*r,h=e*p,b=h-(h-p),M=p-b,f=M*d-(u-b*l-M*l-b*d),a=o+f,i=a-o,c=o-(a-i)+(f-i),0!==c&&(s[y++]=c),o=u+a,c=a-(o-u),0!==c&&(s[y++]=c);return 0===o&&0!==y||(s[y++]=o),y}function c(t,n){for(let e=0;e<t;e++)n[e]=-n[e];return t}function u(t,n){let e=n[0];for(let r=1;r<t;r++)e+=n[r];return e}function f(t){return new Float64Array(t)}const i=f(4),h=f(8),b=f(12),M=f(16),l=f(4);const d=f(4),p=f(4),y=f(4),x=f(4),g=f(4),j=f(4),m=f(4),T=f(4),_=f(4),v=f(8),w=f(8),A=f(8),F=f(4),O=f(8),P=f(8),k=f(8),q=f(12);let z=f(192),B=f(192);function C(t,n,e){t=s(t,z,n,e,B);const r=z;return z=B,B=r,t}function D(t,n,r,s,o,a,c,u){let f,i,h,b,M,l,d,p,y,x,g,j,m,T,_;return 0===t?0===n?(c[0]=0,u[0]=0,1):(_=-n,x=_*r,i=e*_,h=i-(i-_),b=_-h,i=e*r,M=i-(i-r),l=r-M,c[0]=b*l-(x-h*M-b*M-h*l),c[1]=x,x=n*o,i=e*n,h=i-(i-n),b=n-h,i=e*o,M=i-(i-o),l=o-M,u[0]=b*l-(x-h*M-b*M-h*l),u[1]=x,2):0===n?(x=t*s,i=e*t,h=i-(i-t),b=t-h,i=e*s,M=i-(i-s),l=s-M,c[0]=b*l-(x-h*M-b*M-h*l),c[1]=x,_=-t,x=_*a,i=e*_,h=i-(i-_),b=_-h,i=e*a,M=i-(i-a),l=a-M,u[0]=b*l-(x-h*M-b*M-h*l),u[1]=x,2):(x=t*s,i=e*t,h=i-(i-t),b=t-h,i=e*s,M=i-(i-s),l=s-M,g=b*l-(x-h*M-b*M-h*l),j=n*r,i=e*n,h=i-(i-n),b=n-h,i=e*r,M=i-(i-r),l=r-M,m=b*l-(j-h*M-b*M-h*l),d=g-m,f=g-d,c[0]=g-(d+f)+(f-m),p=x+d,f=p-x,y=x-(p-f)+(d-f),d=y-j,f=y-d,c[1]=y-(d+f)+(f-j),T=p+d,f=T-p,c[2]=p-(T-f)+(d-f),c[3]=T,x=n*o,i=e*n,h=i-(i-n),b=n-h,i=e*o,M=i-(i-o),l=o-M,g=b*l-(x-h*M-b*M-h*l),j=t*a,i=e*t,h=i-(i-t),b=t-h,i=e*a,M=i-(i-a),l=a-M,m=b*l-(j-h*M-b*M-h*l),d=g-m,f=g-d,u[0]=g-(d+f)+(f-m),p=x+d,f=p-x,y=x-(p-f)+(d-f),d=y-j,f=y-d,u[1]=y-(d+f)+(f-j),T=p+d,f=T-p,u[2]=p-(T-f)+(d-f),u[3]=T,4)}function E(t,n,r,s,o){let a,c,u,f,i,h,b,M,l,d,p,y,x;return p=n*r,c=e*n,u=c-(c-n),f=n-u,c=e*r,i=c-(c-r),h=r-i,y=f*h-(p-u*i-f*i-u*h),c=e*s,i=c-(c-s),h=s-i,b=y*s,c=e*y,u=c-(c-y),f=y-u,F[0]=f*h-(b-u*i-f*i-u*h),M=p*s,c=e*p,u=c-(c-p),f=p-u,d=f*h-(M-u*i-f*i-u*h),l=b+d,a=l-b,F[1]=b-(l-a)+(d-a),x=M+l,F[2]=l-(x-M),F[3]=x,t=C(t,4,F),0!==o&&(c=e*o,i=c-(c-o),h=o-i,b=y*o,c=e*y,u=c-(c-y),f=y-u,F[0]=f*h-(b-u*i-f*i-u*h),M=p*o,c=e*p,u=c-(c-p),f=p-u,d=f*h-(M-u*i-f*i-u*h),l=b+d,a=l-b,F[1]=b-(l-a)+(d-a),x=M+l,F[2]=l-(x-M),F[3]=x,t=C(t,4,F)),t}const G=f(4),H=f(4),I=f(4),J=f(4),K=f(4),L=f(4),N=f(4),Q=f(4),R=f(8),S=f(8),U=f(8),V=f(8),W=f(8),X=f(8),Y=f(8),Z=f(8),$=f(8),tt=f(4),nt=f(4),et=f(4),rt=f(8),st=f(16),ot=f(16),at=f(16),ct=f(32),ut=f(32),ft=f(48),it=f(64);let ht=f(1152),bt=f(1152);function Mt(t,n,e){t=s(t,ht,n,e,bt);const r=ht;return ht=bt,bt=r,t}const lt=f(4),dt=f(4),pt=f(4),yt=f(4),xt=f(4),gt=f(4),jt=f(4),mt=f(4),Tt=f(4),_t=f(4),vt=f(24),wt=f(24),At=f(24),Ft=f(24),Ot=f(24),Pt=f(24),kt=f(24),qt=f(24),zt=f(24),Bt=f(24),Ct=f(1152),Dt=f(1152),Et=f(1152),Gt=f(1152),Ht=f(1152),It=f(2304),Jt=f(2304),Kt=f(3456),Lt=f(5760),Nt=f(8),Qt=f(8),Rt=f(8),St=f(16),Ut=f(24),Vt=f(48),Wt=f(48),Xt=f(96),Yt=f(192),Zt=f(384),$t=f(384),tn=f(384),nn=f(768);function en(t,n,e,r,s,c,u){return o(a(4,t,r,Nt),Nt,a(4,n,s,Qt),Qt,a(4,e,c,Rt),Rt,St,u)}function rn(t,n,e,r,u,f,i,h,b,M,l,d){const p=s(s(t,n,e,r,Vt),Vt,c(s(u,f,i,h,Wt),Wt),Wt,Xt);return o(a(a(p,Xt,b,Yt),Yt,b,Zt),Zt,a(a(p,Xt,M,Yt),Yt,M,$t),$t,a(a(p,Xt,