imgproxyjs
Version:
ImgProxy javascript client for node/browser
2 lines • 40.9 kB
JavaScript
/*! For license information please see index.browser.js.LICENSE.txt */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{var t={742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=u(t),s=i[0],f=i[1],p=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,f)),a=0,c=f>0?s-4:s;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],p[a++]=e>>16&255,p[a++]=e>>8&255,p[a++]=255&e;return 2===f&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,p[a++]=255&e),1===f&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,p[a++]=e>>8&255,p[a++]=255&e),p},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,u=0,p=n-o;u<p;u+=s)i.push(f(t,u,u+s>p?p:u+s));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,n){for(var o,i,s=[],u=e;u<n;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,r)=>{"use strict";const n=r(742),o=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=f,e.h2=50;const s=2147483647;function u(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return p(t,e,r)}function p(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=u(r);const o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){const e=new Uint8Array(t);return l(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return l(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return l(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);const o=function(t){if(f.isBuffer(t)){const e=0|y(t.length),r=u(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?u(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return a(t),u(t<0?0:0|y(t))}function h(t){const e=t.length<0?0:0|y(t.length),r=u(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,f.prototype),n}function y(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(o)return n?-1:Y(t).length;e=(""+e).toLowerCase(),o=!0}}function d(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return U(this,e,r);case"latin1":case"binary":return j(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){let i,s=1,u=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,f/=2,r/=2}function p(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let n=-1;for(i=r;i<u;i++)if(p(t,i)===p(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===f)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+f>u&&(r=u-f),i=r;i>=0;i--){let r=!0;for(let n=0;n<f;n++)if(p(t,i+n)!==p(e,n)){r=!1;break}if(r)return i}return-1}function O(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(J(n))return s;t[r+s]=n}return s}function v(t,e,r,n){return H(Y(e,t.length-r),t,r,n)}function _(t,e,r,n){return H(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function B(t,e,r,n){return H(V(e),t,r,n)}function E(t,e,r,n){return H(function(t,e){let r,n,o;const i=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,s=e>239?4:e>223?3:e>191?2:1;if(o+s<=r){let r,n,u,f;switch(s){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(f=(31&e)<<6|63&r,f>127&&(i=f));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(f=(15&e)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(i=f));break;case 4:r=t[o+1],n=t[o+2],u=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&u)&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&u,f>65535&&f<1114112&&(i=f))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(t){const e=t.length;if(e<=I)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=I));return r}(n)}f.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(t,e,r){return p(t,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,r){return function(t,e,r){return a(t),t<=0?u(t):void 0!==e?"string"==typeof r?u(t).fill(e,r):u(t).fill(e):u(t)}(t,e,r)},f.allocUnsafe=function(t){return c(t)},f.allocUnsafeSlow=function(t){return c(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(Q(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),Q(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=f.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(Q(e,Uint8Array))o+e.length>n.length?(f.isBuffer(e)||(e=f.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!f.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},f.byteLength=g,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},f.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},f.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},f.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):d.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){let t="";const r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(f.prototype[i]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,o){if(Q(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const u=Math.min(i,s),p=this.slice(n,o),a=t.slice(e,r);for(let t=0;t<u;++t)if(p[t]!==a[t]){i=p[t],s=a[t];break}return i<s?-1:s<i?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return O(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return B(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function U(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function j(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function R(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=Z[t[n]];return o}function k(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function S(t,e,r,n,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function z(t,e,r,n,o){F(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function L(t,e,r,n,o){F(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function C(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,i){return e=+e,r>>>=0,i||C(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return e=+e,r>>>=0,i||C(t,0,r,8),o.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,f.prototype),n},f.prototype.readUintLE=f.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},f.prototype.readUintBE=f.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=K((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),f.prototype.readBigUInt64BE=K((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=K((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),f.prototype.readBigInt64BE=K((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),f.prototype.readFloatLE=function(t,e){return t>>>=0,e||T(t,4,this.length),o.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),o.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),o.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),o.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||S(this,t,e,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||S(this,t,e,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=K((function(t,e=0){return z(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeBigUInt64BE=K((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}let o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=K((function(t,e=0){return z(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeBigInt64BE=K((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=f.isBuffer(t)?t:f.from(t,n),s=i.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%s]}return this};const N={};function $(t,e,r){N[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function D(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function F(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){q(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||G(e,t.length-(r+1))}(n,o,i)}function q(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function G(t,e,r){if(Math.floor(t)!==t)throw q(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=D(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=D(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function V(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function K(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}},645:(t,e)=>{e.read=function(t,e,r,n,o){var i,s,u=8*o-n-1,f=(1<<u)-1,p=f>>1,a=-7,c=r?o-1:0,h=r?-1:1,l=t[e+c];for(c+=h,i=l&(1<<-a)-1,l>>=-a,a+=u;a>0;i=256*i+t[e+c],c+=h,a-=8);for(s=i&(1<<-a)-1,i>>=-a,a+=n;a>0;s=256*s+t[e+c],c+=h,a-=8);if(0===i)i=1-p;else{if(i===f)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),i-=p}return(l?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,u,f,p=8*i-o-1,a=(1<<p)-1,c=a>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,y=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=a):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),(e+=s+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(s++,f/=2),s+c>=a?(u=0,s=a):s+c>=1?(u=(e*f-1)*Math.pow(2,o),s+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;t[r+l]=255&u,l+=y,u/=256,o-=8);for(s=s<<o|u,p+=o;p>0;t[r+l]=255&s,l+=y,s/=256,p-=8);t[r+l-y]|=128*g}},31:()=>{}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{ImgProxy:()=>f});var t,e=r(764),o=r(31),i=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},s=function(){function t(){}return t.prototype.isObject=function(t){if(!t||"object"!=typeof t)throw new Error("Need to be an object param")},t.prototype.stringify=function(t){return t.map((function(t){return null!=t?t:""})).join(":")},t.prototype.tresize=function(t){this.isObject(t);var e=null!=t?t:{},r=e.resizing_type,n=e.width,o=e.height,i=e.enlarge,s=e.extend;return this.stringify([r,n,o,i,s])},t.prototype.tsize=function(t){this.isObject(t);var e=null!=t?t:{},r=e.width,n=e.height,o=e.enlarge,i=e.extend;return this.stringify([r,n,o,i])},t.prototype.textend=function(t){this.isObject(t);var e=null!=t?t:{},r=e.extend,n=e.gravity,o=e.x_offset,i=e.y_offset;return this.stringify([r,n,o,i])},t.prototype.textendAspectRatio=function(t){this.isObject(t);var e=null!=t?t:{},r=e.extend,n=e.gravity,o=e.x_offset,i=e.y_offset;return this.stringify([r,n,o,i])},t.prototype.tgravity=function(t){this.isObject(t);var e=null!=t?t:{},r=e.gravity_type,n=e.x_offset,o=e.y_offset;return this.stringify([r,n,o])},t.prototype.tcrop=function(t){this.isObject(t);var e=null!=t?t:{},r=e.width,n=e.height,o=e.gravity,i=e.x_offset,s=e.y_offset;return this.stringify([r,n,o,i,s])},t.prototype.ttrim=function(t){this.isObject(t);var e=null!=t?t:{},r=e.threshold,n=e.color,o=e.equal_hor,i=e.equal_ver;return this.stringify([r,n,o,i])},t.prototype.tpadding=function(t){this.isObject(t);var e=null!=t?t:{},r=e.top,n=e.right,o=e.bottom,i=e.left;return this.stringify([r,n,o,i])},t.prototype.tbackground=function(t){var e;return"object"==typeof t&&"r"in t&&"g"in t&&"b"in t?"".concat(t.r,":").concat(t.g,":").concat(t.b):null===(e=null==t?void 0:t.replace)||void 0===e?void 0:e.call(t,"#","")},t.prototype.tadjust=function(t){this.isObject(t);var e=null!=t?t:{},r=e.brightness,n=e.contrast,o=e.saturation;return this.stringify([r,n,o])},t.prototype.tunsharpMasking=function(t){this.isObject(t);var e=null!=t?t:{},r=e.mode,n=e.weight,o=e.divider;return this.stringify([r,n,o])},t.prototype.tblurDetections=function(t){this.isObject(t);var e=null!=t?t:{},r=e.sigma,n=e.classNames;return this.stringify(i([r],null!=n?n:[],!0))},t.prototype.tdrawDetections=function(t){this.isObject(t);var e=null!=t?t:{},r=e.draw,n=e.classNames;return this.stringify(i([r],null!=n?n:[],!0))},t.prototype.tgradient=function(t){this.isObject(t);var e=null!=t?t:{},r=e.opacity,n=e.color,o=e.direction,i=e.start,s=e.stop;return this.stringify([r,n,o,i,s])},t.prototype.tskipProcessing=function(t){return this.stringify(i([],null!=t?t:[],!0))},t.prototype.tpreset=function(t){return this.stringify(i([],null!=t?t:[],!0))},t.prototype.twatermark=function(t){this.isObject(t);var e=null!=t?t:{},r=e.opacity,n=e.position,o=e.x_offset,i=e.y_offset,s=e.scale;return this.stringify([r,n,o,i,s])},t.prototype.tformatQuality=function(t){this.isObject(t);var e=null!=t?t:{};return this.stringify(Object.entries(e).flat())},t.prototype.tjpegOptions=function(t){this.isObject(t);var e=null!=t?t:{},r=e.progressive,n=e.no_subsample,o=e.trellis_quant,i=e.overshoot_deringing,s=e.optimize_scans,u=e.quant_table;return this.stringify([r,n,o,i,s,u])},t.prototype.tpngOptions=function(t){this.isObject(t);var e=null!=t?t:{},r=e.png_interlaced,n=e.png_quantize,o=e.png_quantization_colors;return this.stringify([r,n,o])},t.prototype.tgifOptions=function(t){this.isObject(t);var e=null!=t?t:{},r=e.gif_optimize_frames,n=e.gif_optimize_transparency;return this.stringify([r,n])},t.prototype.zoomOptions=function(t){this.isObject(t);var e=null!=t?t:{},r=e.zoom_x_y,n=e.zoom_x,o=e.zoom_y;return void 0!==r?this.stringify([r]):void 0!==n&&void 0!==o?this.stringify([n,o]):this.stringify([1])},t}(),u=(t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)},function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),f=function(t){function r(e,r){var n=e.url,o=e.key,i=e.salt,s=e.autoreset;void 0===r&&(r={});var u=t.call(this)||this;for(var f in u.options={config:{url:"",autoreset:!0},defaultOpts:{},settings:{}},u.abbreviations={resize:"rs",size:"size",resizing_type:"rt",resizing_algorithm:"ra",width:"w",height:"h",min_width:"mw",min_height:"mh",zoom:"z",enlarge:"el",extend:"ex",extend_aspect_ratio:"exar",gravity:"g",crop:"c",padding:"pd",trim:"t",quality:"q",max_bytes:"mb",background:"bg",adjust:"a",brightness:"br",contrast:"co",saturation:"sa",blur:"bl",sharpen:"sh",pixelate:"pix",unsharpening:"ush",watermark:"wm",watermark_url:"wmu",video_thumbnail_second:"vts",style:"st",jpeg_options:"jpgo",png_options:"pngo",gif_options:"gifo",webp_options:"webpo",preset:"pr",cachebuster:"cb",strip_metadata:"sm",strip_color_profile:"scp",unsharp_masking:"ush",blur_detections:"bd",auto_rotate:"ar",rotate:"rot",filename:"fn",format:"ext",enforce_thumbnail:"eth",format_quality:"fq",skip_processing:"skp",expires:"exp",return_attachment:"att",max_src_resolution:"msr",max_src_file_size:"msfs",max_animation_frames:"maf",max_animation_frame_resolution:"mafr",fallback_image_url:"fiu"},u.transformers={resize:u.tresize,size:u.tsize,extend:u.textend,extend_aspect_ratio:u.textendAspectRatio,gravity:u.tgravity,crop:u.tcrop,padding:u.tpadding,background:u.tbackground,trim:u.ttrim,adjust:u.tadjust,watermark:u.twatermark,jpeg_options:u.tjpegOptions,png_options:u.tpngOptions,gif_options:u.tgifOptions,unsharp_masking:u.tunsharpMasking,blur_detections:u.tblurDetections,draw_detections:u.tdrawDetections,skip_processing:u.tskipProcessing,zoom:u.zoomOptions,gradient:u.tgradient},u.options.config={key:o,salt:i,url:n,autoreset:!0===s||!!s},u.isObject(r),r)u.setOption(f,r[f]);return u}return u(r,t),r.prototype.setAutoreset=function(t){return this.options.config.autoreset=t,this},r.prototype.setOption=function(t,e){var r,n,o,i,s,u;return null===e?this.resetOption(t):(this.options.settings[t]="".concat(null!==(n=null===(r=this.abbreviations)||void 0===r?void 0:r[t])&&void 0!==n?n:t,":").concat(null!==(u=null===(s=null===(i=null===(o=this.transformers)||void 0===o?void 0:o[t])||void 0===i?void 0:i.call)||void 0===s?void 0:s.call(i,this,e))&&void 0!==u?u:e),this)},r.prototype.setOptions=function(t){for(var e in this.isObject(t),t)this.setOption(e,t[e])},r.prototype.setDefaultOptions=function(t){return this.isObject(t),this.options.defaultOpts=t,this.setOptions(t),this},r.prototype.resetDefaultOptions=function(){return this.options.defaultOpts={},this},r.prototype.resetOptions=function(){return this.options.settings={},this.setOptions(this.options.defaultOpts),this},r.prototype.resetOption=function(t){var e,r,n;return null===(e=this.options.settings)||void 0===e||delete e[null!==(n=null===(r=this.abbreviations)||void 0===r?void 0:r[t])&&void 0!==n?n:t],this},r.prototype.resize=function(t){return this.setOption("resize",t)},r.prototype.crop=function(t){return this.setOption("crop",t)},r.prototype.size=function(t){return this.setOption("size",t)},r.prototype.fallbackImageUrl=function(t){return this.setOption("fallback_image_url",t)},r.prototype.skipProcessing=function(t){return this.setOption("skip_processing",t)},r.prototype.expires=function(t){return this.setOption("expires",t)},r.prototype.extend=function(t){return this.setOption("extend",t)},r.prototype.trim=function(t){return this.setOption("trim",t)},r.prototype.adjust=function(t){return this.setOption("adjust",t)},r.prototype.maxSrcResolution=function(t){return this.setOption("max_src_resolution","".concat(t))},r.prototype.maxSrcFileSize=function(t){return this.setOption("max_src_file_size","".concat(t))},r.prototype.maxAnimationFrames=function(t){return this.setOption("max_animation_frames","".concat(t))},r.prototype.maxAnimationFramesResolution=function(t){return this.setOption("max_animation_frame_resolution","".concat(t))},r.prototype.resizingType=function(t){return this.setOption("resizing_type",t)},r.prototype.enforceThumbnail=function(t){return this.setOption("enforce_thumbnail","".concat(t))},r.prototype.formatQuality=function(t){return this.setOption("format_quality",t)},r.prototype.resizingAlgorithm=function(t){return this.setOption("resizing_algorithm",t)},r.prototype.width=function(t){return this.setOption("width","".concat(t))},r.prototype.height=function(t){return this.setOption("height","".concat(t))},r.prototype.minWidth=function(t){return this.setOption("min_width","".concat(t))},r.prototype.minHeight=function(t){return this.setOption("min_height","".concat(t))},r.prototype.dpr=function(t){return Number(t)>0?this.setOption("dpr","".concat(t)):this},r.prototype.dpi=function(t){return Number(t)>0?this.setOption("dpi","".concat(t)):this},r.prototype.gradient=function(t){return Number(t)>0?this.setOption("gradient",t):this},r.prototype.maxBytes=function(t){return this.setOption("max_bytes","".concat(t))},r.prototype.padding=function(t){return this.setOption("padding",t)},r.prototype.enlarge=function(t){return this.setOption("enlarge","".concat(t))},r.prototype.pixelate=function(t){return this.setOption("pixelate","".concat(t))},r.prototype.gravity=function(t){return this.setOption("gravity",t)},r.prototype.quality=function(t){return this.setOption("quality","".concat(t))},r.prototype.background=function(t){return this.setOption("background",t)},r.prototype.backgroundAlpha=function(t){return this.setOption("background_alpha","".concat(t))},r.prototype.blur=function(t){return this.setOption("blur","".concat(t))},r.prototype.blurDetections=function(t){return this.setOption("blur_detections",t)},r.prototype.unsharpMasking=function(t){return this.setOption("unsharp_masking",t)},r.prototype.drawDetections=function(t){return this.setOption("draw_detections",t)},r.prototype.raw=function(t){return this.setOption("raw","".concat(t))},r.prototype.returnAttachment=function(t){return this.setOption("return_attachment","".concat(t))},r.prototype.saturation=function(t){return this.setOption("saturation","".concat(t))},r.prototype.contrast=function(t){return this.setOption("contrast","".concat(t))},r.prototype.brightness=function(t){return this.setOption("brightness","".concat(t))},r.prototype.sharpen=function(t){return this.setOption("sharpen","".concat(t))},r.prototype.watermark=function(t){return this.setOption("watermark",t)},r.prototype.watermarkUrl=function(t){return this.setOption("watermark_url",t)},r.prototype.preset=function(t){return this.setOption("preset",t)},r.prototype.cacheBuster=function(t){return this.setOption("cachebuster",t)},r.prototype.format=function(t){return this.setOption("format",t)},r.prototype.filename=function(t){return this.setOption("filename",t)},r.prototype.rotate=function(t){return this.setOption("rotate",t)},r.prototype.autoRotate=function(t){return this.setOption("auto_rotate",t)},r.prototype.style=function(t){return this.setOption("style",t)},r.prototype.page=function(t){return this.setOption("page","".concat(t))},r.prototype.zoom=function(t){return this.setOption("zoom",t)},r.prototype.videoThumbnailSecond=function(t){return this.setOption("video_thumbnail_second","".concat(t))},r.prototype.webpOptions=function(t){return this.setOption("webp_options","".concat(t))},r.prototype.stripMetadata=function(t){return this.setOption("strip_metadata","".concat(t))},r.prototype.keepCopyright=function(t){return this.setOption("keep_copyright","".concat(t))},r.prototype.stripColorProfile=function(t){return this.setOption("strip_color_profile","".concat(t))},r.prototype.gifOptions=function(t){return this.setOption("gif_options",t)},r.prototype.pngOptions=function(t){return this.setOption("png_options",t)},r.prototype.sign=function(t){var e,n,i=null!==(n=null===(e=this.options)||void 0===e?void 0:e.config)&&void 0!==n?n:{},s=i.key,u=i.salt;if(!s||!u)throw Error("Missing required params: key, salt");var f=r.hexDecode(s),p=r.hexDecode(u),a=(0,o.createHmac)("sha256",f);return a.update(p),a.update(t),r.urlSafeBase64(a.digest())},r.hexDecode=function(t){return e.lW.from(t,"hex")},r.urlSafeBase64=function(t){return e.lW.from(t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},r.prototype.get=function(t){var e=this.options,n=e.settings,o=e.config;if(!t)throw Error("Missing required param: image");var i,s=r.urlSafeBase64(t),u=Object.values(n).join("/"),f=u?"/".concat(u,"/").concat(s):"/".concat(s);return i=o.key&&o.salt?"".concat(o.url,"/").concat(this.sign(f)).concat(f):"".concat(o.url,"/insecure").concat(f),this.options.config.autoreset&&this.resetOptions(),i},r}(s)})(),n})()));