ultisuite-client/out/_next/static/chunks/6269.d7e6b6a92653dcf9.js
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

1 line
31 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6269],{6269:t=>{t.exports=(function t(e,r,A){function i(a,o){if(!r[a]){if(!e[a]){if(n)return n(a,!0);var s=Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var h=r[a]={exports:{}};e[a][0].call(h.exports,function(t){return i(e[a][1][t]||t)},h,h.exports,t,e,r,A)}return r[a].exports}for(var n=void 0,a=0;a<A.length;a++)i(A[a]);return i})({1:[function(t,e,r){var A=t("inherits"),i=t("multimath"),n=t("./mm_unsharp_mask"),a=t("./mm_resize");function o(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(n),this.use(a)}A(o,i),o.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=o},{"./mm_resize":4,"./mm_unsharp_mask":9,inherits:19,multimath:20}],2:[function(t,e,r){function A(t){return t<0?0:t>255?255:t}e.exports={convolveHorizontally:function(t,e,r,i,n,a){var o,s,h,u,c,f,l,g,p,m,d,I=0,w=0;for(p=0;p<i;p++){for(m=0,c=0;m<n;m++){for(f=a[c++],l=a[c++],g=I+4*f|0,o=s=h=u=0;l>0;l--)u=u+(d=a[c++])*t[g+3]|0,h=h+d*t[g+2]|0,s=s+d*t[g+1]|0,o=o+d*t[g]|0,g=g+4|0;e[w+3]=A(u+8192>>14),e[w+2]=A(h+8192>>14),e[w+1]=A(s+8192>>14),e[w]=A(o+8192>>14),w=w+4*i|0}w=(p+1)*4|0,I=(p+1)*r*4|0}},convolveVertically:function(t,e,r,i,n,a){var o,s,h,u,c,f,l,g,p,m,d,I=0,w=0;for(p=0;p<i;p++){for(m=0,c=0;m<n;m++){for(f=a[c++],l=a[c++],g=I+4*f|0,o=s=h=u=0;l>0;l--)u=u+(d=a[c++])*t[g+3]|0,h=h+d*t[g+2]|0,s=s+d*t[g+1]|0,o=o+d*t[g]|0,g=g+4|0;e[w+3]=A(u+8192>>14),e[w+2]=A(h+8192>>14),e[w+1]=A(s+8192>>14),e[w]=A(o+8192>>14),w=w+4*i|0}w=(p+1)*4|0,I=(p+1)*r*4|0}}}},{}],3:[function(t,e,r){e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs="},{}],4:[function(t,e,r){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){var A=t("./resize_filter_gen"),i=t("./convolve").convolveHorizontally,n=t("./convolve").convolveVertically;e.exports=function(t){var e=t.src,r=t.width,a=t.height,o=t.toWidth,s=t.toHeight,h=t.scaleX||t.toWidth/t.width,u=t.scaleY||t.toHeight/t.height,c=t.offsetX||0,f=t.offsetY||0,l=t.dest||new Uint8Array(o*s*4),g=void 0===t.quality?3:t.quality,p=t.alpha||!1,m=A(g,r,o,h,c),d=A(g,a,s,u,f),I=new Uint8Array(o*a*4);return i(e,I,r,a,o,m),n(I,l,a,o,s,d),p||function(t,e,r){for(var A=3,i=e*r*4|0;A<i;)t[A]=255,A=A+4|0}(l,o,s),l}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,r){var A=t("./resize_filter_info");function i(t){return Math.round(16383*t)}e.exports=function(t,e,r,n,a){var o,s,h,u,c,f,l,g,p,m,d,I,w,_,B,b,v,y=A[t].filter,Q=1/n,C=Math.min(1,n),E=A[t].win/C,x=new Int16Array((Math.floor((E+1)*2)+2)*r),M=0,D=!x.subarray||!x.set;for(o=0;o<r;o++){for(h=Math.max(0,Math.floor((s=(o+.5)*Q+a)-E)),f=new Float32Array(c=(u=Math.min(e-1,Math.ceil(s+E)))-h+1),l=new Int16Array(c),g=0,p=h,m=0;p<=u;p++,m++)g+=d=y((p+.5-s)*C),f[m]=d;for(m=0,I=0;m<f.length;m++)I+=w=f[m]/g,l[m]=i(w);for(l[r>>1]+=i(1-I),_=0;_<l.length&&0===l[_];)_++;if(_<l.length){for(B=l.length-1;B>0&&0===l[B];)B--;if(b=h+_,v=B-_+1,x[M++]=b,x[M++]=v,D)for(m=_;m<=B;m++)x[M++]=l[m];else x.set(l.subarray(_,B+1),M),M+=v}else x[M++]=0,x[M++]=0}return x}},{"./resize_filter_info":7}],7:[function(t,e,r){e.exports=[{win:.5,filter:function(t){return+(t>=-.5&&t<.5)}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-11920929e-14&&t<11920929e-14)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-11920929e-14&&t<11920929e-14)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-11920929e-14&&t<11920929e-14)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,r){var A=t("./resize_filter_gen"),i=!0;try{i=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(t){}function n(t,e,r){if(i)return void e.set(new Uint8Array(t.buffer,0,t.byteLength),r);for(var A=r,n=0;n<t.length;n++){var a=t[n];e[A++]=255&a,e[A++]=a>>8&255}}e.exports=function(t){var e=t.src,r=t.width,i=t.height,a=t.toWidth,o=t.toHeight,s=t.scaleX||t.toWidth/t.width,h=t.scaleY||t.toHeight/t.height,u=t.offsetX||0,c=t.offsetY||0,f=t.dest||new Uint8Array(a*o*4),l=void 0===t.quality?3:t.quality,g=t.alpha||!1,p=A(l,r,a,s,u),m=A(l,i,o,h,c),d=this.__align(0+Math.max(e.byteLength,f.byteLength)),I=this.__align(d+i*a*4),w=this.__align(I+p.byteLength),_=w+m.byteLength,B=this.__instance("resize",_),b=new Uint8Array(this.__memory.buffer),v=new Uint32Array(this.__memory.buffer),y=new Uint32Array(e.buffer);return v.set(y),n(p,b,I),n(m,b,w),(B.exports.convolveHV||B.exports._convolveHV)(I,w,d,r,i,a,o),new Uint32Array(f.buffer).set(new Uint32Array(this.__memory.buffer,0,o*a)),g||function(t,e,r){for(var A=3,i=e*r*4|0;A<i;)t[A]=255,A=A+4|0}(f,a,o),f}},{"./resize_filter_gen":6}],9:[function(t,e,r){e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(t,e,r){var A=t("glur/mono16");e.exports=function(t,e,r,i,n,a){if(0!==i&&!(n<.5)){n>2&&(n=2);var o,s,h,u,c,f=function(t,e,r){for(var A,i,n,a,o=e*r,s=new Uint16Array(o),h=0;h<o;h++)A=t[4*h],i=t[4*h+1],n=t[4*h+2],a=A>=i&&A>=n?A:i>=n&&i>=A?i:n,s[h]=a<<8;return s}(t,e,r),l=new Uint16Array(f);A(l,e,r,n);for(var g=i/100*4096+.5|0,p=a<<8,m=e*r,d=0;d<m;d++)Math.abs(u=(o=f[d])-l[d])>=p&&(h=((s=(s=(s=o+(g*u+2048>>12))>65280?65280:s)<0?0:s)<<12)/(o=0!==o?o:1)|0,t[c=4*d]=t[c]*h+2048>>12,t[c+1]=t[c+1]*h+2048>>12,t[c+2]=t[c+2]*h+2048>>12)}}},{"glur/mono16":18}],11:[function(t,e,r){e.exports=function(t,e,r,A,i,n){if(0!==A&&!(i<.5)){i>2&&(i=2);var a=e*r,o=4*a,s=2*a,h=2*a,u=4*Math.max(e,r),c=o+s,f=c+h,l=f+h,g=this.__instance("unsharp_mask",o+s+2*h+u+32,{exp:Math.exp}),p=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(p);var m=g.exports.hsv_v16||g.exports._hsv_v16;m(0,o,e,r),(m=g.exports.blurMono16||g.exports._blurMono16)(o,c,f,l,l+u,e,r,i),(m=g.exports.unsharp||g.exports._unsharp)(0,0,o,c,e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UEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(t,e,r){function A(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}A.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},A.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout(function(){return e.gc()},100))},A.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter(function(r){return!(e-r.lastUsed>t.idle)||(r.destroy(),!1)}),0!==this.available.length?this.timeoutId=setTimeout(function(){return t.gc()},100):this.timeoutId=0},e.exports=A},{}],14:[function(t,e,r){e.exports=function(t,e,r,A,i,n){var a=r/t,o=A/e,s=(2*n+2+1)/i;if(s>.5)return[[r,A]];var h=Math.ceil(Math.log(Math.min(a,o))/Math.log(s));if(h<=1)return[[r,A]];for(var u=[],c=0;c<h;c++){var f=Math.round(Math.pow(Math.pow(t,h-c-1)*Math.pow(r,c+1),1/h)),l=Math.round(Math.pow(Math.pow(e,h-c-1)*Math.pow(A,c+1),1/h));u.push([f,l])}return u}},{}],15:[function(t,e,r){function A(t){var e=Math.round(t);return 1e-5>Math.abs(t-e)?e:Math.floor(t)}function i(t){var e=Math.round(t);return 1e-5>Math.abs(t-e)?e:Math.ceil(t)}e.exports=function(t){var e,r,n,a,o,s,h=t.toWidth/t.width,u=t.toHeight/t.height,c=A(t.srcTileSize*h)-2*t.destTileBorder,f=A(t.srcTileSize*u)-2*t.destTileBorder;if(c<1||f<1)throw Error("Internal error in pica: target tile width/height is too small.");var l=[];for(a=0;a<t.toHeight;a+=f)for(n=0;n<t.toWidth;n+=c)(e=n-t.destTileBorder)<0&&(e=0),o=n+c+t.destTileBorder-e,e+o>=t.toWidth&&(o=t.toWidth-e),(r=a-t.destTileBorder)<0&&(r=0),s=a+f+t.destTileBorder-r,r+s>=t.toHeight&&(s=t.toHeight-r),l.push({toX:e,toY:r,toWidth:o,toHeight:s,toInnerX:n,toInnerY:a,toInnerWidth:c,toInnerHeight:f,offsetX:e/h-A(e/h),offsetY:r/u-A(r/u),scaleX:h,scaleY:u,x:A(e/h),y:A(r/u),width:i(o/h),height:i(s/u)});return l}},{}],16:[function(t,e,r){function A(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=A(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===A(t)},e.exports.isImageBitmap=function(t){return"[object ImageBitmap]"===A(t)},e.exports.limiter=function(t){var e=0,r=[];function A(){e<t&&r.length&&(e++,r.shift()())}return function(t){return new Promise(function(i,n){r.push(function(){t().then(function(t){i(t),e--,A()},function(t){n(t),e--,A()})}),A()})}},e.exports.cib_quality_name=function(t){switch(t){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},e.exports.cib_support=function(t){return Promise.resolve().then(function(){if("u"<typeof createImageBitmap)return!1;var e=t(100,100);return createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then(function(t){var r=10===t.width;return t.close(),e=null,r})}).catch(function(){return!1})},e.exports.worker_offscreen_canvas_support=function(){return new Promise(function(t,e){if("u"<typeof OffscreenCanvas)return void t(!1);var r=btoa("(".concat((function(t){"u"<typeof createImageBitmap?t.postMessage(!1):Promise.resolve().then(function(){var t=new OffscreenCanvas(10,10);return t.getContext("2d").rect(0,0,1,1),createImageBitmap(t,0,0,1,1)}).then(function(){return t.postMessage(!0)},function(){return t.postMessage(!1)})}).toString(),")(self);")),A=new Worker("data:text/javascript;base64,".concat(r));A.onmessage=function(e){return t(e.data)},A.onerror=e}).then(function(t){return t},function(){return!1})},e.exports.can_use_canvas=function(t){var e=!1;try{var r=t(2,1).getContext("2d"),A=r.createImageData(2,1);A.data[0]=12,A.data[1]=23,A.data[2]=34,A.data[3]=255,A.data[4]=45,A.data[5]=56,A.data[6]=67,A.data[7]=255,r.putImageData(A,0,0),A=null,A=r.getImageData(0,0,2,1),12===A.data[0]&&23===A.data[1]&&34===A.data[2]&&255===A.data[3]&&45===A.data[4]&&56===A.data[5]&&67===A.data[6]&&255===A.data[7]&&(e=!0)}catch(t){}return e},e.exports.cib_can_use_region=function(){return new Promise(function(t){if("u"<typeof createImageBitmap)return void t(!1);var e=new Image;e.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",e.onload=function(){createImageBitmap(e,0,0,e.width,e.height).then(function(r){r.width===e.width&&r.height===e.height?t(!0):t(!1)},function(){return t(!1)})},e.onerror=function(){return t(!1)}})}},{}],17:[function(t,e,r){e.exports=function(){var e,r=t("./mathlib");onmessage=function(t){var A=t.data.opts;if(!A.src&&A.srcBitmap){var i=new OffscreenCanvas(A.width,A.height),n=i.getContext("2d",{alpha:!!A.alpha});n.drawImage(A.srcBitmap,0,0),A.src=n.getImageData(0,0,A.width,A.height).data,i.width=i.height=0,i=null,A.srcBitmap.close(),A.srcBitmap=null}e||(e=new r(t.data.features));var a=e.resizeAndUnsharp(A);postMessage({data:a},[a.buffer])}}},{"./mathlib":1}],18:[function(t,e,r){var A,i,n,a,o,s,h,u;function c(t,e,r,A,i,n){var a,o,s,h,u,c,f,l,g,p,m,d,I,w;for(g=0;g<n;g++){for(p=0,c=g*i,f=g,l=0,h=u=(a=t[c])*A[6],m=A[0],d=A[1],I=A[4],w=A[5];p<i;p++)s=(o=t[c])*m+a*d+h*I+u*w,u=h,h=s,a=o,r[l]=h,l++,c++;for(c--,l--,f+=n*(i-1),h=u=(a=t[c])*A[7],o=a,m=A[2],d=A[3],p=i-1;p>=0;p--)s=o*m+a*d+h*I+u*w,u=h,h=s,a=o,o=t[c],e[f]=r[l]+h,c--,l--,f-=n}}e.exports=function(t,e,r,f){if(f){var l,g,p,m,d,I=new Uint16Array(t.length),w=new Float32Array(Math.max(e,r)),_=((l=f)<.5&&(l=.5),p=Math.exp(-(g=Math.exp(.527076)/l)),m=Math.exp(-2*g),A=d=(1-p)*(1-p)/(1+2*g*p-m),i=d*(g-1)*p,n=d*(g+1)*p,a=-d*m,h=(A+i)/(1-(o=2*p)-(s=-m)),u=(n+a)/(1-o-s),new Float32Array([A,i,n,a,o,s,h,u]));c(t,I,w,_,e,r,f),c(I,t,w,_,r,e,f)}}},{}],19:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],20:[function(t,e,r){var A=t("object-assign"),i=t("./lib/base64decode"),n=t("./lib/wa_detect"),a={js:!0,wasm:!0};function o(t){if(!(this instanceof o))return new o(t);var e=A({},a,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw Error('mathlib: at least "js" or "wasm" should be enabled')}o.prototype.has_wasm=n,o.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},o.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map(function(e){var r=t.__modules[e];return t.options.wasm&&t.has_wasm()&&r.wasm_fn&&!t.__wasm[e]?WebAssembly.compile(t.__base64decode(r.wasm_src)).then(function(r){t.__wasm[e]=r}):null})).then(function(){return t}),this.__init_promise},o.prototype.__base64decode=i,o.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e<t&&this.__memory.grow(Math.ceil((t-e)/65536)),this.__memory},o.prototype.__instance=function(t,e,r){if(e&&this.__reallocate(e),!this.__wasm[t]){var i=this.__modules[t];this.__wasm[t]=new WebAssembly.Module(this.__base64decode(i.wasm_src))}if(!this.__cache[t]){var n={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[t]=new WebAssembly.Instance(this.__wasm[t],{env:A(n,r||{})})}return this.__cache[t]},o.prototype.__align=function(t,e){var r=t%(e=e||8);return t+(r?e-r:0)},e.exports=o},{"./lib/base64decode":21,"./lib/wa_detect":22,"object-assign":23}],21:[function(t,e,r){e.exports=function(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,A=new Uint8Array(3*r>>2),i=0,n=0,a=0;a<r;a++)a%4==0&&a&&(A[n++]=i>>16&255,A[n++]=i>>8&255,A[n++]=255&i),i=i<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(a));var o=r%4*6;return 0===o?(A[n++]=i>>16&255,A[n++]=i>>8&255,A[n++]=255&i):18===o?(A[n++]=i>>10&255,A[n++]=i>>2&255):12===o&&(A[n++]=i>>4&255),A}},{}],22:[function(t,e,r){var A;e.exports=function(){if(void 0!==A||(A=!1,"u"<typeof WebAssembly))return A;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t),r=new WebAssembly.Instance(e,{});0!==r.exports.test(4)&&(A=!0)}catch(t){}return A}},{}],23:[function(t,e,r){var A=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var A=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==A.join(""))return!1;var i={};if("abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},i)).join(""))return!1;return!0}catch(t){return!1}}()?function(t,e){for(var r,a,o=function(t){if(null==t)throw TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s<arguments.length;s++){for(var h in r=Object(arguments[s]))i.call(r,h)&&(o[h]=r[h]);if(A){a=A(r);for(var u=0;u<a.length;u++)n.call(r,a[u])&&(o[a[u]]=r[a[u]])}}return o}:Object.assign},{}],24:[function(t,e,r){var A=arguments[3],i=arguments[4],n=arguments[5],a=JSON.stringify;e.exports=function(t,e){for(var r,o=Object.keys(n),s=0,h=o.length;s<h;s++){var u=o[s],c=n[u].exports;if(c===t||c&&c.default===t){r=u;break}}if(!r){r=Math.floor(0x100000000*Math.random()).toString(16);for(var f={},s=0,h=o.length;s<h;s++){var u=o[s];f[u]=u}i[r]=["function(require,module,exports){"+t+"(self); }",f]}var l=Math.floor(0x100000000*Math.random()).toString(16),g={};g[r]=r,i[l]=["function(require,module,exports){var f = require("+a(r)+");(f.default ? f.default : f)(self);}",g];var p={};!function t(e){for(var r in p[e]=!0,i[e][1]){var A=i[e][1][r];p[A]||t(A)}}(l);var m="("+A+")({"+Object.keys(p).map(function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"}).join(",")+"},{},["+a(l)+"])",d=window.URL||window.webkitURL||window.mozURL||window.msURL,I=new Blob([m],{type:"text/javascript"});if(e&&e.bare)return I;var w=d.createObjectURL(I),_=new Worker(w);return _.objectURL=w,_}},{}],"/index.js":[function(t,e,r){function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,A=Array(e);r<e;r++)A[r]=t[r];return A}var i=t("object-assign"),n=t("webworkify"),a=t("./lib/mathlib"),o=t("./lib/pool"),s=t("./lib/utils"),h=t("./lib/worker"),u=t("./lib/stepper"),c=t("./lib/tiler"),f={},l=!1;try{"u">typeof navigator&&navigator.userAgent&&(l=navigator.userAgent.indexOf("Safari")>=0)}catch(t){}var g=1;"u">typeof navigator&&(g=Math.min(navigator.hardwareConcurrency||1,4));var p={tile:1024,concurrency:g,features:["js","wasm","ww"],idle:2e3,createCanvas:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}},m={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},d=!1,I=!1,w=!1,_=!1,B=!1;function b(){return{value:n(h),destroy:function(){if(this.value.terminate(),"u">typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function v(t){if(!(this instanceof v))return new v(t);this.options=i({},p,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=f[e]||s.limiter(this.options.concurrency),f[e]||(f[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}v.prototype.init=function(){var e,r,A=this;if(this.__initPromise)return this.__initPromise;if("u">typeof ImageData&&"u">typeof Uint8ClampedArray)try{new ImageData(new Uint8ClampedArray(400),10,10),d=!0}catch(t){}"u">typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?I=!0:this.debug("ImageBitmap does not support .close(), disabled"));var n=this.options.features.slice();if(n.indexOf("all")>=0&&(n=["cib","wasm","js","ww"]),this.__requested_features=n,this.__mathlib=new a(n),n.indexOf("ww")>=0&&"u">typeof window&&"Worker"in window)try{t("webworkify")(function(){}).terminate(),this.features.ww=!0;var h="wp_".concat(JSON.stringify(this.options));f[h]?this.__workersPool=f[h]:(this.__workersPool=new o(b,this.options.idle),f[h]=this.__workersPool)}catch(t){}var u=this.__mathlib.init().then(function(t){i(A.features,t.features)});e=I?s.cib_support(this.options.createCanvas).then(function(t){A.features.cib&&0>n.indexOf("cib")?A.debug("createImageBitmap() resize supported, but disabled by config"):n.indexOf("cib")>=0&&(A.features.cib=t)}):Promise.resolve(!1),w=s.can_use_canvas(this.options.createCanvas),r=(r=I&&d&&-1!==n.indexOf("ww")?s.worker_offscreen_canvas_support():Promise.resolve(!1)).then(function(t){_=t});var c=s.cib_can_use_region().then(function(t){B=t});return this.__initPromise=Promise.all([u,e,r,c]).then(function(){return A}),this.__initPromise},v.prototype.__invokeResize=function(t,e){var r=this;return e.__mathCache=e.__mathCache||{},Promise.resolve().then(function(){return r.features.ww?new Promise(function(A,i){var n=r.__workersPool.acquire();e.cancelToken&&e.cancelToken.catch(function(t){return i(t)}),n.value.onmessage=function(t){n.release(),t.data.err?i(t.data.err):A(t.data)};var a=[];t.src&&a.push(t.src.buffer),t.srcBitmap&&a.push(t.srcBitmap),n.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},a)}):{data:r.__mathlib.resizeAndUnsharp(t,e.__mathCache)}})},v.prototype.__extractTileData=function(t,e,r,A,i){if(this.features.ww&&_&&(s.isCanvas(e)||B))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(A.srcImageBitmap||e,t.x,t.y,t.width,t.height).then(function(t){return i.srcBitmap=t,i});if(s.isCanvas(e))return A.srcCtx||(A.srcCtx=e.getContext("2d",{alpha:!!r.alpha})),this.debug("Get tile pixel data"),i.src=A.srcCtx.getImageData(t.x,t.y,t.width,t.height).data,i;this.debug("Draw tile imageBitmap/image to temporary canvas");var n=this.options.createCanvas(t.width,t.height),a=n.getContext("2d",{alpha:!!r.alpha});return a.globalCompositeOperation="copy",a.drawImage(A.srcImageBitmap||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),this.debug("Get tile pixel data"),i.src=a.getImageData(0,0,t.width,t.height).data,n.width=n.height=0,i},v.prototype.__landTileData=function(t,e,r){var A;if(this.debug("Convert raw rgba tile result to ImageData"),e.bitmap)return r.toCtx.drawImage(e.bitmap,t.toX,t.toY),null;if(d)A=new ImageData(new Uint8ClampedArray(e.data),t.toWidth,t.toHeight);else if((A=r.toCtx.createImageData(t.toWidth,t.toHeight)).data.set)A.data.set(e.data);else for(var i=A.data.length-1;i>=0;i--)A.data[i]=e.data[i];return this.debug("Draw tile"),l?r.toCtx.putImageData(A,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):r.toCtx.putImageData(A,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null},v.prototype.__tileAndResize=function(t,e,r){var A=this,i={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null};return Promise.resolve().then(function(){if(i.toCtx=e.getContext("2d",{alpha:!!r.alpha}),s.isCanvas(t))return null;if(s.isImageBitmap(t))return i.srcImageBitmap=t,i.isImageBitmapReused=!0,null;if(s.isImage(t))return I?(A.debug("Decode image via createImageBitmap"),createImageBitmap(t).then(function(t){i.srcImageBitmap=t}).catch(function(t){return null})):null;throw Error('Pica: ".from" should be Image, Canvas or ImageBitmap')}).then(function(){if(r.canceled)return r.cancelToken;A.debug("Calculate tiles");var n=c({width:r.width,height:r.height,srcTileSize:A.options.tile,toWidth:r.toWidth,toHeight:r.toHeight,destTileBorder:r.__destTileBorder}).map(function(e){return A.__limit(function(){if(r.canceled)return r.cancelToken;var n={width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:r.quality,alpha:r.alpha,unsharpAmount:r.unsharpAmount,unsharpRadius:r.unsharpRadius,unsharpThreshold:r.unsharpThreshold};return A.debug("Invoke resize math"),Promise.resolve(n).then(function(n){return A.__extractTileData(e,t,r,i,n)}).then(function(t){return A.debug("Invoke resize math"),A.__invokeResize(t,r)}).then(function(t){return r.canceled?r.cancelToken:(i.srcImageData=null,A.__landTileData(e,t,i))})})});function a(t){t.srcImageBitmap&&(t.isImageBitmapReused||t.srcImageBitmap.close(),t.srcImageBitmap=null)}return A.debug("Process tiles"),Promise.all(n).then(function(){return A.debug("Finished!"),a(i),e},function(t){throw a(i),t})})},v.prototype.__processStages=function(t,e,r,n){var a,o,s=this;if(n.canceled)return n.cancelToken;var h=function(t){if(Array.isArray(t))return t}(a=t.shift())||function(t){var e,r,A=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=A){var i=[],n=!0,a=!1;try{for(A=A.call(t);!(n=(e=A.next()).done)&&(i.push(e.value),2!==i.length);n=!0);}catch(t){a=!0,r=t}finally{try{n||null==A.return||A.return()}finally{if(a)throw r}}return i}}(a)||function(t){if(t){if("string"==typeof t)return A(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return A(t,2)}}(a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=h[0],c=h[1],f=0===t.length;return n=i({},n,{toWidth:u,toHeight:c,quality:f?n.quality:Math.min(1,n.quality)}),f||(o=this.options.createCanvas(u,c)),this.__tileAndResize(e,f?r:o,n).then(function(){return f?r:(n.width=u,n.height=c,s.__processStages(t,o,r,n))}).then(function(t){return o&&(o.width=o.height=0),t})},v.prototype.__resizeViaCreateImageBitmap=function(t,e,r){var A=this,i=e.getContext("2d",{alpha:!!r.alpha});return this.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:s.cib_quality_name(r.quality)}).then(function(t){if(r.canceled)return r.cancelToken;if(!r.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,A.debug("Finished!"),e;A.debug("Unsharp result");var n=A.options.createCanvas(r.toWidth,r.toHeight),a=n.getContext("2d",{alpha:!!r.alpha});a.drawImage(t,0,0),t.close();var o=a.getImageData(0,0,r.toWidth,r.toHeight);return A.__mathlib.unsharp_mask(o.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(o,0,0),n.width=n.height=0,o=a=n=i=null,A.debug("Finished!"),e})},v.prototype.resize=function(t,e,r){var A=this;this.debug("Start resize...");var n=i({},m);return(isNaN(r)?r&&(n=i(n,r)):n=i(n,{quality:r}),n.toWidth=e.width,n.toHeight=e.height,n.width=t.naturalWidth||t.width,n.height=t.naturalHeight||t.height,0===e.width||0===e.height)?Promise.reject(Error("Invalid output size: ".concat(e.width,"x").concat(e.height))):(n.unsharpRadius>2&&(n.unsharpRadius=2),n.canceled=!1,n.cancelToken&&(n.cancelToken=n.cancelToken.then(function(t){throw n.canceled=!0,t},function(t){throw n.canceled=!0,t})),n.__destTileBorder=Math.ceil(Math.max(3,2.5*n.unsharpRadius|0)),this.init().then(function(){if(n.canceled)return n.cancelToken;if(A.features.cib)return A.__resizeViaCreateImageBitmap(t,e,n);if(!w){var r=Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw r.code="ERR_GET_IMAGE_DATA",r}var i=u(n.width,n.height,n.toWidth,n.toHeight,A.options.tile,n.__destTileBorder);return A.__processStages(i,t,e,n)}))},v.prototype.resizeBuffer=function(t){var e=this,r=i({},m,t);return this.init().then(function(){return e.__mathlib.resizeAndUnsharp(r)})},v.prototype.toBlob=function(t,e,r){return e=e||"image/png",new Promise(function(A){if(t.toBlob)return void t.toBlob(function(t){return A(t)},e,r);if(t.convertToBlob)return void A(t.convertToBlob({type:e,quality:r}));for(var i=atob(t.toDataURL(e,r).split(",")[1]),n=i.length,a=new Uint8Array(n),o=0;o<n;o++)a[o]=i.charCodeAt(o);A(new Blob([a],{type:e}))})},v.prototype.debug=function(){},e.exports=v},{"./lib/mathlib":1,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":23,webworkify:24}]},{},[])("/index.js")}}]);