2 lines
86 KiB
JavaScript
2 lines
86 KiB
JavaScript
|
/*! For license information please see vendor-52b1f3361986b6c6a4fe.js.LICENSE.txt */
|
||
|
(self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[]).push([[736],{4881:function(t){t.exports=function(){function t(e,r,n){function i(o,A){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o<n.length;o++)i(n[o]);return i}return t}()({1:[function(t,e,r){"use strict";var n=t("inherits"),i=t("multimath"),a=t("./mm_unsharp_mask"),o=t("./mm_resize");function A(t){var e=t||[],r={js:e.indexOf("js")>=0,wasm:e.indexOf("wasm")>=0};i.call(this,r),this.features={js:r.js,wasm:r.wasm&&this.has_wasm()},this.use(a),this.use(o)}n(A,i),A.prototype.resizeAndUnsharp=function(t,e){var r=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(r,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),r},e.exports=A},{"./mm_resize":4,"./mm_unsharp_mask":9,inherits:19,multimath:20}],2:[function(t,e,r){"use strict";function n(t){return t<0?0:t>255?255:t}function i(t,e,r,i,a,o){var A,s,u,c,h,f,l,g,p,d,m,w=0,_=0;for(p=0;p<i;p++){for(h=0,d=0;d<a;d++){for(f=o[h++],l=o[h++],g=w+4*f|0,A=s=u=c=0;l>0;l--)c=c+(m=o[h++])*t[g+3]|0,u=u+m*t[g+2]|0,s=s+m*t[g+1]|0,A=A+m*t[g]|0,g=g+4|0;e[_+3]=n(c+8192>>14),e[_+2]=n(u+8192>>14),e[_+1]=n(s+8192>>14),e[_]=n(A+8192>>14),_=_+4*i|0}_=4*(p+1)|0,w=(p+1)*r*4|0}}function a(t,e,r,i,a,o){var A,s,u,c,h,f,l,g,p,d,m,w=0,_=0;for(p=0;p<i;p++){for(h=0,d=0;d<a;d++){for(f=o[h++],l=o[h++],g=w+4*f|0,A=s=u=c=0;l>0;l--)c=c+(m=o[h++])*t[g+3]|0,u=u+m*t[g+2]|0,s=s+m*t[g+1]|0,A=A+m*t[g]|0,g=g+4|0;e[_+3]=n(c+8192>>14),e[_+2]=n(u+8192>>14),e[_+1]=n(s+8192>>14),e[_]=n(A+8192>>14),_=_+4*i|0}_=4*(p+1)|0,w=(p+1)*r*4|0}}e.exports={convolveHorizontally:i,convolveVertically:a}},{}],3:[function(t,e,r){"use strict";e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs="},{}],4:[function(t,e,r){"use strict";e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,r){"use strict";var n=t("./resize_filter_gen"),i=t("./convolve").convolveHorizontally,a=t("./convolve").convolveVertically;function o(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}e.exports=function(t){var e=t.src,r=t.width,A=t.height,s=t.toWidth,u=t.toHeight,c=t.scaleX||t.toWidth/t.width,h=t.scaleY||t.toHeight/t.height,f=t.offsetX||0,l=t.offsetY||0,g=t.dest||new Uint8Array(s*u*4),p=void 0===t.quality?3:t.quality,d=t.alpha||!1,m=n(p,r,s,c,f),w=n(p,A,u,h,l),_=new Uint8Array(s*A*4);return i(e,_,r,A,s,m),a(_,g,A,s,u,w),d||o(g,s,u),g}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,r){"use strict";var n=t("./resize_filter_info"),i=14;function a(t){return Math.round(t*((1<<i)-1))}e.exports=function(t,e,r,i,o){var A,s,u,c,h,f,l,g,p,d,m,w,_,I,v,b,y,B=n[t].filter,E=1/i,C=Math.min(1,i),Q=n[t].win/C,x=Math.floor(2*(Q+1)),M=new Int16Array((x+2)*r),D=0,k=!M.subarray||!M.set;for(A=0;A<r;A++){for(s=(A+.5)*E+o,u=Math.max(0,Math.floor(s-Q)),h=(c=Math.min(e-1,Math.ceil(s+Q)))-u+1,f=new Float32Array(h),l=new Int16Array(h),g=0,p=u,d=0;p<=c;p++,d++)g+=m=B((p+.5-s)*C),f[d]=m;for(w=0,d=0;d<f.length;d
|