All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
3 lines
84 KiB
JavaScript
3 lines
84 KiB
JavaScript
/*! For license information please see decap-cms-backend-azure.js.LICENSE.txt */
|
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("decap-cms-lib-util"),require("react"),require("@emotion/react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendAzure",["decap-cms-lib-util","react","@emotion/react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],e):"object"==typeof exports?exports.DecapCmsBackendAzure=e(require("decap-cms-lib-util"),require("react"),require("@emotion/react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):t.DecapCmsBackendAzure=e(t.DecapCmsLibUtil,t.React,t.DecapCmsDefaultExports.EmotionCore,t.DecapCmsDefaultExports.PropTypes,t.DecapCmsLibAuth,t.DecapCmsUiDefault)}(window,((t,e,r,n,i,o)=>(()=>{var a={5766:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=s(t),a=o[0],u=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;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)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;s<c;s+=a)o.push(u(t,s,s+a>c?c:s+a));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(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 u(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8834:(t,e,r)=>{"use strict";const n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=u,e.h2=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(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 f(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=s(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(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(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(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 u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|d(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.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 l(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 f(t){return l(t),s(t<0?0:0|d(t))}function h(t){const e=t.length<0?0:0|d(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(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,u.prototype),n}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(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 i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:J(t).length;e=(""+e).toLowerCase(),i=!0}}function y(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 P(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(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 v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,a=1,s=t.length,u=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;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(t,o+n)!==c(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(Y(n))return a;t[r+a]=n}return a}function x(t,e,r,n){return V(J(e,t.length-r),t,r,n)}function E(t,e,r,n){return V(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 _(t,e,r,n){return V(G(e),t,r,n)}function A(t,e,r,n){return V(function(t,e){let r,n,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));return r}(n)}u.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}}(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(K(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.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 i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(K(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.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},u.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},u.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},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?C(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.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+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(K(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.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===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=t.slice(e,r);for(let t=0;t<s;++t)if(c[t]!==l[t]){o=c[t],a=l[t];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},u.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 i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return E(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function R(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function S(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function P(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function T(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function U(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 k(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i){$(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function L(t,e,r,n,i){$(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.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,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Z((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=Z((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Z((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(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)})),u.prototype.readBigInt64BE=Z((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(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)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||k(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||k(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||k(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||k(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},u.prototype.writeBigUInt64LE=Z((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);k(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);k(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||k(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},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||k(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},u.prototype.writeBigInt64LE=Z((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.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 i=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),i},u.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&&!u.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 i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%a]}return this};const q={};function M(t,e,r){q[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 N(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 $(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new q.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function z(t,e){if("number"!=typeof t)throw new q.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new q.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}M("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),M("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=N(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=N(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function J(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Z(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},2333:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*g}},9612:(t,e,r)=>{var n=r(2118),i=r(6909),o=r(8138),a=r(4174),s=r(7942);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},6504:(t,e,r)=>{var n=r(9413),i=r(3620);function o(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,t.exports=o},235:(t,e,r)=>{var n=r(3945),i=r(1846),o=r(8028),a=r(2344),s=r(4769);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},5859:(t,e,r)=>{var n=r(9413),i=r(3620);function o(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,t.exports=o},326:(t,e,r)=>{var n=r(8761)(r(7772),"Map");t.exports=n},6738:(t,e,r)=>{var n=r(2411),i=r(6417),o=r(6928),a=r(9493),s=r(4150);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},857:(t,e,r)=>{var n=r(7772).Symbol;t.exports=n},3215:(t,e,r)=>{var n=r(8761)(r(7772),"WeakMap");t.exports=n},9432:t=>{t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},2517:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},8333:(t,e,r)=>{var n=r(7832);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},343:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},217:t=>{t.exports=function(t){return t.split("")}},2218:(t,e,r)=>{var n=r(1225);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},9413:(t,e,r)=>{var n=r(9259),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},1359:t=>{t.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},3366:(t,e,r)=>{var n=r(857),i=r(2107),o=r(7157),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},7832:(t,e,r)=>{var n=r(1359),i=r(2195),o=r(6024);t.exports=function(t,e,r){return e==e?o(t,e,r):n(t,i,r)}},2195:t=>{t.exports=function(t){return t!=t}},6840:(t,e,r)=>{var n=r(1049),i=r(7394),o=r(9259),a=r(7035),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?h:s).test(a(t))}},3620:t=>{t.exports=function(){}},6060:(t,e,r)=>{var n=r(3059),i=r(3114),o=r(5251);t.exports=function(t,e){return o(i(t,e,n),t+"")}},4817:(t,e,r)=>{var n=r(3059),i=r(529),o=i?function(t,e){return i.set(t,e),t}:n;t.exports=o},6532:(t,e,r)=>{var n=r(6874),i=r(3043),o=r(3059),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=a},9872:t=>{t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}},1054:(t,e,r)=>{var n=r(857),i=r(343),o=r(6152),a=r(4795),s=n?n.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},1704:(t,e,r)=>{var n=r(2153),i=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(i,""):t}},7297:(t,e,r)=>{var n=r(6152),i=r(1401),o=r(4452),a=r(6188);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(a(t))}},3895:(t,e,r)=>{var n=r(9872);t.exports=function(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:n(t,e,r)}},768:(t,e,r)=>{var n=r(7832);t.exports=function(t,e){for(var r=t.length;r--&&n(e,t[r],0)>-1;);return r}},1821:(t,e,r)=>{var n=r(7832);t.exports=function(t,e){for(var r=-1,i=t.length;++r<i&&n(e,t[r],0)>-1;);return r}},1495:t=>{var e=Math.max;t.exports=function(t,r,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=r.length,l=e(a-s,0),f=Array(c+l),h=!i;++u<c;)f[u]=r[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}},152:t=>{var e=Math.max;t.exports=function(t,r,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=r.length,f=e(a-u,0),h=Array(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=r[c];for(;++s<u;)(p||o<a)&&(h[d+n[s]]=t[o++]);return h}},1522:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},4019:(t,e,r)=>{var n=r(7772)["__core-js_shared__"];t.exports=n},1176:t=>{t.exports=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}},3485:(t,e,r)=>{var n=r(2248),i=r(7772);t.exports=function(t,e,r){var o=1&e,a=n(t);return function e(){return(this&&this!==i&&this instanceof e?a:t).apply(o?r:this,arguments)}}},2248:(t,e,r)=>{var n=r(9413),i=r(9259);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=n(t.prototype),o=t.apply(r,e);return i(o)?o:r}}},8462:(t,e,r)=>{var n=r(9432),i=r(2248),o=r(764),a=r(7891),s=r(3325),u=r(527),c=r(7772);t.exports=function(t,e,r){var l=i(t);return function i(){for(var f=arguments.length,h=Array(f),p=f,d=s(i);p--;)h[p]=arguments[p];var g=f<3&&h[0]!==d&&h[f-1]!==d?[]:u(h,d);return(f-=g.length)<r?a(t,e,o,i.placeholder,void 0,h,g,void 0,void 0,r-f):n(this&&this!==c&&this instanceof i?l:t,this,h)}}},764:(t,e,r)=>{var n=r(1495),i=r(152),o=r(1176),a=r(2248),s=r(7891),u=r(3325),c=r(3418),l=r(527),f=r(7772);t.exports=function t(e,r,h,p,d,g,y,m,v,b){var w=128&r,x=1&r,E=2&r,_=24&r,A=512&r,O=E?void 0:a(e);return function C(){for(var B=arguments.length,R=Array(B),S=B;S--;)R[S]=arguments[S];if(_)var P=u(C),T=o(R,P);if(p&&(R=n(R,p,d,_)),g&&(R=i(R,g,y,_)),B-=T,_&&B<b){var U=l(R,P);return s(e,r,t,C.placeholder,h,R,U,m,v,b-B)}var k=x?h:this,I=E?k[e]:e;return B=R.length,m?R=c(R,m):A&&B>1&&R.reverse(),w&&v<B&&(R.length=v),this&&this!==f&&this instanceof C&&(I=O||a(I)),I.apply(k,R)}}},5468:(t,e,r)=>{var n=r(9432),i=r(2248),o=r(7772);t.exports=function(t,e,r,a){var s=1&e,u=i(t);return function e(){for(var i=-1,c=arguments.length,l=-1,f=a.length,h=Array(f+c),p=this&&this!==o&&this instanceof e?u:t;++l<f;)h[l]=a[l];for(;c--;)h[l++]=arguments[++i];return n(p,s?r:this,h)}}},7891:(t,e,r)=>{var n=r(3735),i=r(9890),o=r(5877);t.exports=function(t,e,r,a,s,u,c,l,f,h){var p=8&e;e|=p?32:64,4&(e&=~(p?64:32))||(e&=-4);var d=[t,e,s,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,f,h],g=r.apply(void 0,d);return n(t)&&i(g,d),g.placeholder=a,o(g,t,e)}},7902:(t,e,r)=>{var n=r(4817),i=r(3485),o=r(8462),a=r(764),s=r(5468),u=r(8203),c=r(9e3),l=r(9890),f=r(5877),h=r(8101),p=Math.max;t.exports=function(t,e,r,d,g,y,m,v){var b=2&e;if(!b&&"function"!=typeof t)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(e&=-97,d=g=void 0),m=void 0===m?m:p(h(m),0),v=void 0===v?v:h(v),w-=g?g.length:0,64&e){var x=d,E=g;d=g=void 0}var _=b?void 0:u(t),A=[t,e,r,d,g,x,E,y,m,v];if(_&&c(A,_),t=A[0],e=A[1],r=A[2],d=A[3],g=A[4],!(v=A[9]=void 0===A[9]?b?0:t.length:p(A[9]-w,0))&&24&e&&(e&=-25),e&&1!=e)O=8==e||16==e?o(t,e,v):32!=e&&33!=e||g.length?a.apply(void 0,A):s(t,e,r,d);else var O=i(t,e,r);return f((_?n:l)(O,A),t,e)}},3043:(t,e,r)=>{var n=r(8761),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},1242:(t,e,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},8203:(t,e,r)=>{var n=r(529),i=r(4291),o=n?function(t){return n.get(t)}:i;t.exports=o},9350:(t,e,r)=>{var n=r(9212),i=Object.prototype.hasOwnProperty;t.exports=function(t){for(var e=t.name+"",r=n[e],o=i.call(n,e)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==t)return a.name}return e}},3325:t=>{t.exports=function(t){return t.placeholder}},7937:(t,e,r)=>{var n=r(8304);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},8761:(t,e,r)=>{var n=r(6840),i=r(8109);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},2107:(t,e,r)=>{var n=r(857),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=a.call(t);return n&&(e?t[s]=r:delete t[s]),i}},8109:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},4842:t=>{var e=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;t.exports=function(t){var n=t.match(e);return n?n[1].split(r):[]}},3880:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},2118:(t,e,r)=>{var n=r(9191);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},6909:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},8138:(t,e,r)=>{var n=r(9191),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},4174:(t,e,r)=>{var n=r(9191),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},7942:(t,e,r)=>{var n=r(9191);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},8442:t=>{var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=function(t,r){var n=r.length;if(!n)return t;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+r+"] */\n")}},9045:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},1401:(t,e,r)=>{var n=r(6152),i=r(4795),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},8304:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},3735:(t,e,r)=>{var n=r(6504),i=r(8203),o=r(9350),a=r(8674);t.exports=function(t){var e=o(t),r=a[e];if("function"!=typeof r||!(e in n.prototype))return!1;if(t===r)return!0;var s=i(r);return!!s&&t===s[0]}},7394:(t,e,r)=>{var n,i=r(4019),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},3945:t=>{t.exports=function(){this.__data__=[],this.size=0}},1846:(t,e,r)=>{var n=r(2218),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},8028:(t,e,r)=>{var n=r(2218);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},2344:(t,e,r)=>{var n=r(2218);t.exports=function(t){return n(this.__data__,t)>-1}},4769:(t,e,r)=>{var n=r(2218);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},2411:(t,e,r)=>{var n=r(9612),i=r(235),o=r(326);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},6417:(t,e,r)=>{var n=r(7937);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6928:(t,e,r)=>{var n=r(7937);t.exports=function(t){return n(this,t).get(t)}},9493:(t,e,r)=>{var n=r(7937);t.exports=function(t){return n(this,t).has(t)}},4150:(t,e,r)=>{var n=r(7937);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},7777:(t,e,r)=>{var n=r(733);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},9e3:(t,e,r)=>{var n=r(1495),i=r(152),o=r(527),a="__lodash_placeholder__",s=Math.min;t.exports=function(t,e){var r=t[1],u=e[1],c=r|u,l=c<131,f=128==u&&8==r||128==u&&256==r&&t[7].length<=e[8]||384==u&&e[7].length<=e[8]&&8==r;if(!l&&!f)return t;1&u&&(t[2]=e[2],c|=1&r?0:4);var h=e[3];if(h){var p=t[3];t[3]=p?n(p,h,e[4]):h,t[4]=p?o(t[3],a):e[4]}return(h=e[5])&&(p=t[5],t[5]=p?i(p,h,e[6]):h,t[6]=p?o(t[5],a):e[6]),(h=e[7])&&(t[7]=h),128&u&&(t[8]=null==t[8]?e[8]:s(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=c,t}},529:(t,e,r)=>{var n=r(3215),i=n&&new n;t.exports=i},9191:(t,e,r)=>{var n=r(8761)(Object,"create");t.exports=n},7157:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},3114:(t,e,r)=>{var n=r(9432),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=r(u),n(t,this,c)}}},9212:t=>{t.exports={}},3418:(t,e,r)=>{var n=r(1522),i=r(9045),o=Math.min;t.exports=function(t,e){for(var r=t.length,a=o(e.length,r),s=n(t);a--;){var u=e[a];t[a]=i(u,r)?s[u]:void 0}return t}},527:t=>{var e="__lodash_placeholder__";t.exports=function(t,r){for(var n=-1,i=t.length,o=0,a=[];++n<i;){var s=t[n];s!==r&&s!==e||(t[n]=e,a[o++]=n)}return a}},7772:(t,e,r)=>{var n=r(1242),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},9890:(t,e,r)=>{var n=r(4817),i=r(7787)(n);t.exports=i},5251:(t,e,r)=>{var n=r(6532),i=r(7787)(n);t.exports=i},5877:(t,e,r)=>{var n=r(4842),i=r(8442),o=r(5251),a=r(6985);t.exports=function(t,e,r){var s=e+"";return o(t,i(s,a(n(s),r)))}},7787:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var i=e(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},6024:t=>{t.exports=function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}},8435:(t,e,r)=>{var n=r(217),i=r(3880),o=r(3344);t.exports=function(t){return i(t)?o(t):n(t)}},4452:(t,e,r)=>{var n=r(7777),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)})),e}));t.exports=a},3812:(t,e,r)=>{var n=r(4795);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},7035:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2153:t=>{var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},3344:t=>{var e="\\ud800-\\udfff",r="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+u+")*",f="(?:"+[o+n+"?",n,a,s,r].join("|")+")",h=RegExp(i+"(?="+i+")|"+f+l,"g");t.exports=function(t){return t.match(h)||[]}},6985:(t,e,r)=>{var n=r(2517),i=r(8333),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return n(o,(function(r){var n="_."+r[0];e&r[1]&&!i(t,n)&&t.push(n)})),t.sort()}},7366:(t,e,r)=>{var n=r(6504),i=r(5859),o=r(1522);t.exports=function(t){if(t instanceof n)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=o(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}},6874:t=>{t.exports=function(t){return function(){return t}}},1225:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3059:t=>{t.exports=function(t){return t}},6152:t=>{var e=Array.isArray;t.exports=e},1049:(t,e,r)=>{var n=r(3366),i=r(9259);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},9259:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5125:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},4795:(t,e,r)=>{var n=r(3366),i=r(5125);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},733:(t,e,r)=>{var n=r(6738);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},4291:t=>{t.exports=function(){}},3465:(t,e,r)=>{var n=r(6060),i=r(7902),o=r(3325),a=r(527),s=n((function(t,e){var r=a(e,o(s));return i(t,32,void 0,e,r)}));s.placeholder={},t.exports=s},6346:(t,e,r)=>{var n=r(7297),i=r(1049),o=r(3812);t.exports=function(t,e,r){var a=-1,s=(e=n(e,t)).length;for(s||(s=1,t=void 0);++a<s;){var u=null==t?void 0:t[o(e[a])];void 0===u&&(a=s,u=r),t=i(u)?u.call(t):u}return t}},5707:(t,e,r)=>{var n=r(7642);t.exports=function(t){return t?Infinity===(t=n(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},8101:(t,e,r)=>{var n=r(5707);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},7642:(t,e,r)=>{var n=r(1704),i=r(9259),o=r(4795),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},6188:(t,e,r)=>{var n=r(1054);t.exports=function(t){return null==t?"":n(t)}},5648:(t,e,r)=>{var n=r(1054),i=r(1704),o=r(3895),a=r(768),s=r(1821),u=r(8435),c=r(6188);t.exports=function(t,e,r){if((t=c(t))&&(r||void 0===e))return i(t);if(!t||!(e=n(e)))return t;var l=u(t),f=u(e),h=s(l,f),p=a(l,f)+1;return o(l,h,p).join("")}},3433:(t,e,r)=>{var n=r(1054),i=r(3895),o=r(1821),a=r(8435),s=r(6188),u=/^\s+/;t.exports=function(t,e,r){if((t=s(t))&&(r||void 0===e))return t.replace(u,"");if(!t||!(e=n(e)))return t;var c=a(t),l=o(c,a(e));return i(c,l).join("")}},8674:(t,e,r)=>{var n=r(6504),i=r(5859),o=r(3620),a=r(6152),s=r(5125),u=r(7366),c=Object.prototype.hasOwnProperty;function l(t){if(s(t)&&!a(t)&&!(t instanceof n)){if(t instanceof i)return t;if(c.call(t,"__wrapped__"))return u(t)}return new i(t)}l.prototype=o.prototype,l.prototype.constructor=l,t.exports=l},1023:t=>{"use strict";function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)r=t.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,s):n=t.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,i=47===a.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,c=a<u?a:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);if(0===f)return r.slice(s+f)}else a>c&&(47===t.charCodeAt(i+f)?l=f:0===f&&(l=0));break}var h=t.charCodeAt(i+f);if(h!==r.charCodeAt(s+f))break;47===h&&(l=f)}var p="";for(f=i+l+1;f<=o;++f)f!==o&&47!==t.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(s+l):(s+=l,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,u=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(c===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,c=!0,l=t.length-1,f=0;l>=n;--l)if(47!==(i=t.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(r.name=t.slice(1,a),r.base=t.slice(1,u)):(r.name=t.slice(s,a),r.base=t.slice(s,u)),r.ext=t.slice(a,u)),s>0?r.dir=t.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},3252:function(t){!function(e){"use strict";var r=function(t){setTimeout(t,0)};"undefined"!=typeof process&&process&&"function"==typeof process.nextTick&&(r=process.nextTick),t.exports=function(t){var e={capacity:t||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===e.firstHere){e.current++,e.firstHere=!0;var t=1}else t=0;var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(e.leave)},e.current+r.n-t>e.capacity)return 1===t&&(e.current--,e.firstHere=!1),e.queue.push(r);e.current+=r.n-t,r.task(e.leave),1===t&&(e.firstHere=!1)},leave:function(t){if(t=t||1,e.current-=t,e.queue.length){var n=e.queue[0];n.n+e.current>e.capacity||(e.queue.shift(),e.current+=n.n,r(n.task))}else if(e.current<0)throw new Error("leave called too many times.")},available:function(t){return t=t||1,e.current+t<=e.capacity}};return e}}()},2244:t=>{"use strict";t.exports=e},1756:t=>{"use strict";t.exports=r},2673:t=>{"use strict";t.exports=n},82:t=>{"use strict";t.exports=i},4688:e=>{"use strict";e.exports=t},3327:t=>{"use strict";t.exports=o}},s={};function u(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return a[t].call(r.exports,r,r.exports,u),r.exports}u.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return u.d(e,{a:e}),e},u.d=(t,e)=>{for(var r in e)u.o(e,r)&&!u.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),u.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendAzure:()=>It});var t=u(5648),e=u.n(t),r=u(3433),n=u.n(r),i=u(3252),o=u.n(i),a=u(4688);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(this,arguments)}var l=u(2244),f=u.n(l);function h(t){var e=Object.create(null);return function(r){return void 0===e[r]&&(e[r]=t(r)),e[r]}}var p=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=h((function(t){return p.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),g=u(1756),y=function(t,e,r){var n=t.key+"-"+e.name;!1===r&&void 0===t.registered[n]&&(t.registered[n]=e.styles)},m={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},v=/[A-Z]|^ms/g,b=/_EMO_([^_]+?)_([^]*?)_EMO_/g,w=function(t){return 45===t.charCodeAt(1)},x=function(t){return null!=t&&"boolean"!=typeof t},E=h((function(t){return w(t)?t:t.replace(v,"-$&").toLowerCase()})),_=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(b,(function(t,e,r){return O={name:e,styles:r,next:O},e}))}return 1===m[t]||w(t)||"number"!=typeof e||0===e?e:e+"px"};function A(t,e,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return O={name:r.name,styles:r.styles,next:O},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)O={name:n.name,styles:n.styles,next:O},n=n.next;return r.styles+";"}return function(t,e,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=A(t,e,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a)null!=e&&void 0!==e[a]?n+=o+"{"+e[a]+"}":x(a)&&(n+=E(o)+":"+_(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=e&&void 0!==e[a[0]]){var s=A(t,e,a);switch(o){case"animation":case"animationName":n+=E(o)+":"+s+";";break;default:n+=o+"{"+s+"}"}}else for(var u=0;u<a.length;u++)x(a[u])&&(n+=E(o)+":"+_(o,a[u])+";")}return n}(t,e,r);case"function":if(void 0!==t){var i=O,o=r(t);return O=i,A(t,e,o)}}if(null==e)return r;var a=e[r];return void 0!==a?a:r}var O,C=/label:\s*([^\s;\n{]+)\s*(;|$)/g,B=!!l.useInsertionEffect&&l.useInsertionEffect,R=B||function(t){return t()},S=(B||l.useLayoutEffect,d),P=function(t){return"theme"!==t},T=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?S:P},U=function(t,e,r){var n;if(e){var i=e.shouldForwardProp;n=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof n&&r&&(n=t.__emotion_forwardProp),n},k=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return y(e,r,n),R((function(){return function(t,e,r){y(t,e,r);var n=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+n:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}}(e,r,n)})),null},I=function t(e,r){var n,i,o=e.__emotion_real===e,a=o&&e.__emotion_base||e;void 0!==r&&(n=r.label,i=r.target);var u=U(e,r,o),c=u||T(a),f=!c("as");return function(){var h=arguments,p=o&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==n&&p.push("label:"+n+";"),null==h[0]||void 0===h[0].raw)p.push.apply(p,h);else{p.push(h[0][0]);for(var d=h.length,y=1;y<d;y++)p.push(h[y],h[0][y])}var m=(0,g.withEmotionCache)((function(t,e,r){var n,o,s,h,d=f&&t.as||a,y="",m=[],v=t;if(null==t.theme){for(var b in v={},t)v[b]=t[b];v.theme=l.useContext(g.ThemeContext)}"string"==typeof t.className?(n=e.registered,o=m,s=t.className,h="",s.split(" ").forEach((function(t){void 0!==n[t]?o.push(n[t]+";"):h+=t+" "})),y=h):null!=t.className&&(y=t.className+" ");var w=function(t,e,r){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var n=!0,i="";O=void 0;var o=t[0];null==o||void 0===o.raw?(n=!1,i+=A(r,e,o)):i+=o[0];for(var a=1;a<t.length;a++)i+=A(r,e,t[a]),n&&(i+=o[a]);C.lastIndex=0;for(var s,u="";null!==(s=C.exec(i));)u+="-"+s[1];var c=function(t){for(var e,r=0,n=0,i=t.length;i>=4;++n,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+(59797*(e>>>16)<<16),r=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&t.charCodeAt(n+2))<<16;case 2:r^=(255&t.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:O}}(p.concat(m),e.registered,v);y+=e.key+"-"+w.name,void 0!==i&&(y+=" "+i);var x=f&&void 0===u?T(d):c,E={};for(var _ in t)f&&"as"===_||x(_)&&(E[_]=t[_]);return E.className=y,E.ref=r,l.createElement(l.Fragment,null,l.createElement(k,{cache:e,serialized:w,isStringTag:"string"==typeof d}),l.createElement(d,E))}));return m.displayName=void 0!==n?n:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=e.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=p,m.__emotion_forwardProp=u,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(e,n){return t(e,s({},r,n,{shouldForwardProp:U(m,n,!0)})).apply(void 0,p)},m}},L=u(2673),j=u.n(L),F=u(82),D=u(3327);function q(t,e,r){var n;return(e="symbol"==typeof(n=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e))?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const M=I(D.Icon,{target:"e1n0346u0",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"});class N extends f().Component{constructor(...t){super(...t),q(this,"state",{}),q(this,"handleLogin",(t=>{t.preventDefault(),this.auth.authenticate({scope:"vso.code_full,user.read",resource:"499b84ac-1321-427f-aa17-267ca6975798",prompt:"select_account"},((t,e)=>{t?this.setState({loginError:t.toString()}):this.props.onLogin(e)}))}))}componentDidMount(){this.auth=new F.ImplicitAuthenticator({base_url:`https://login.microsoftonline.com/${this.props.config.backend.tenant_id}`,auth_endpoint:"oauth2/authorize",app_id:this.props.config.backend.app_id,clearHash:this.props.clearHash}),this.auth.completeAuth(((t,e)=>{t?alert(t):this.props.onLogin(e)}))}render(){const{inProgress:t,config:e,t:r}=this.props;return(0,g.jsx)(D.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:t,loginErrorMessage:this.state.loginError,logoUrl:e.logo_url,renderButtonContent:()=>(0,g.jsx)(f().Fragment,null,(0,g.jsx)(M,{type:"azure"}),r(t?"auth.loggingIn":"auth.loginWithAzure")),t:r})}}q(N,"propTypes",{onLogin:j().func.isRequired,inProgress:j().bool,base_url:j().string,siteId:j().string,authEndpoint:j().string,config:j().object.isRequired,clearHash:j().func,t:j().func.isRequired});var $=u(6346),z=u.n($),W=u(3465),H=u.n(W),J=u(8834).lW;const G="function"==typeof atob,V="function"==typeof btoa,K="function"==typeof J,Y="function"==typeof TextDecoder?new TextDecoder:void 0,X="function"==typeof TextEncoder?new TextEncoder:void 0,Z=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Q=(t=>{let e={};return t.forEach(((t,r)=>e[t]=r)),e})(Z),tt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,et=String.fromCharCode.bind(String),rt="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),nt=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),it=V?t=>btoa(t):K?t=>J.from(t,"binary").toString("base64"):t=>{let e,r,n,i,o="";const a=t.length%3;for(let a=0;a<t.length;){if((r=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,o+=Z[e>>18&63]+Z[e>>12&63]+Z[e>>6&63]+Z[63&e]}return a?o.slice(0,a-3)+"===".substring(a):o},ot=K?t=>J.from(t).toString("base64"):t=>{let e=[];for(let r=0,n=t.length;r<n;r+=4096)e.push(et.apply(null,t.subarray(r,r+4096)));return it(e.join(""))},at=t=>{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?et(192|e>>>6)+et(128|63&e):et(224|e>>>12&15)+et(128|e>>>6&63)+et(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return et(240|e>>>18&7)+et(128|e>>>12&63)+et(128|e>>>6&63)+et(128|63&e)},st=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ut=K?t=>J.from(t,"utf8").toString("base64"):X?t=>ot(X.encode(t)):t=>it(t.replace(st,at)),ct=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,lt=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return et(55296+(e>>>10))+et(56320+(1023&e));case 3:return et((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return et((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},ft=G?t=>atob(nt(t)):K?t=>J.from(t,"base64").toString("binary"):t=>{if(t=t.replace(/\s+/g,""),!tt.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let e,r,n,i="";for(let o=0;o<t.length;)e=Q[t.charAt(o++)]<<18|Q[t.charAt(o++)]<<12|(r=Q[t.charAt(o++)])<<6|(n=Q[t.charAt(o++)]),i+=64===r?et(e>>16&255):64===n?et(e>>16&255,e>>8&255):et(e>>16&255,e>>8&255,255&e);return i},ht=K?t=>rt(J.from(t,"base64")):t=>rt(ft(t).split("").map((t=>t.charCodeAt(0)))),pt=K?t=>J.from(t,"base64").toString("utf8"):Y?t=>Y.decode(ht(t)):t=>ft(t).replace(ct,lt),dt=(t,e=!1)=>e?(t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_")))(ut(t)):ut(t),gt=t=>pt(nt(t.replace(/[-_]/g,(t=>"-"==t?"+":"/"))));var yt=u(1023);function mt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(r),!0).forEach((function(e){bt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bt(t,e,r){var n;return(e="symbol"==typeof(n=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e))?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const wt="Azure DevOps",xt="api-version";var Et=function(t){return t.ERROR="error",t.FAILED="failed",t.NOT_APPLICABLE="notApplicable",t.NOT_SET="notSet",t.PENDING="pending",t.SUCCEEDED="succeeded",t}(Et||{}),_t=function(t){return t.ADD="add",t.DELETE="delete",t.RENAME="rename",t.EDIT="edit",t}(_t||{}),At=function(t){return t.BASE64="base64encoded",t}(At||{}),Ot=function(t){return t.ACTIVE="active",t.COMPLETED="completed",t.ABANDONED="abandoned",t}(Ot||{}),Ct=function(t){return t.CONFLICTS="conflicts",t.FAILURE="failure",t.QUEUED="queued",t.REJECTED="rejectedByPolicy",t.SUCCEEDED="succeeded",t}(Ct||{}),Bt=function(t){return t.BLOB="blob",t.TREE="tree",t}(Bt||{});function Rt(t){return new Promise((e=>setTimeout(e,t)))}function St(t){switch(t.action){case _t.ADD:return{changeType:_t.ADD,item:{path:t.path},newContent:{content:t.base64Content,contentType:At.BASE64}};case _t.EDIT:return{changeType:_t.EDIT,item:{path:t.path},newContent:{content:t.base64Content,contentType:At.BASE64}};case _t.DELETE:return{changeType:_t.DELETE,item:{path:t.path}};case _t.RENAME:return{changeType:_t.RENAME,item:{path:t.path},sourceServerItem:t.oldPath};default:return{}}}class Pt{constructor(t,r){bt(this,"apiVersion",void 0),bt(this,"token",void 0),bt(this,"branch",void 0),bt(this,"mergeStrategy",void 0),bt(this,"endpointUrl",void 0),bt(this,"initialWorkflowStatus",void 0),bt(this,"cmsLabelPrefix",void 0),bt(this,"withHeaders",(t=>a.unsentRequest.withHeaders({Authorization:`Bearer ${this.token}`,"Content-Type":"application/json; charset=utf-8"},t))),bt(this,"withAzureFeatures",(t=>t.hasIn(["params",xt])?t:a.unsentRequest.withParams({[xt]:`${this.apiVersion}`},t))),bt(this,"buildRequest",(t=>{const e=this.withHeaders(t),r=this.withAzureFeatures(e);return r.has("cache")?r:a.unsentRequest.withNoCache(r)})),bt(this,"request",(t=>{try{return(0,a.requestWithBackoff)(this,t)}catch(t){throw new a.APIError(t.message,null,wt)}})),bt(this,"responseToJSON",(0,a.responseParser)({format:"json",apiName:wt})),bt(this,"responseToBlob",(0,a.responseParser)({format:"blob",apiName:wt})),bt(this,"responseToText",(0,a.responseParser)({format:"text",apiName:wt})),bt(this,"requestJSON",(t=>this.request(t).then(this.responseToJSON))),bt(this,"requestText",(t=>this.request(t).then(this.responseToText))),bt(this,"toBase64",(t=>Promise.resolve(dt(t)))),bt(this,"fromBase64",(t=>gt(t))),bt(this,"branchToRef",(t=>`refs/heads/${t}`)),bt(this,"refToBranch",(t=>t.slice(11))),bt(this,"user",(async()=>{var t,e,r,n,i,o,a;const s=await this.requestJSON({url:"https://app.vssps.visualstudio.com/_apis/profile/profiles/me",params:{[xt]:"6.1-preview.2"}}),u=null===(t=s.coreAttributes)||void 0===t||null===(e=t.DisplayName)||void 0===e?void 0:e.value,c=null===(r=s.coreAttributes)||void 0===r||null===(n=r.EmailAddress)||void 0===n?void 0:n.value;return{name:u||c||"",avatar_url:`data:image/png;base64,${null===(i=s.coreAttributes)||void 0===i||null===(o=i.Avatar)||void 0===o||null===(a=o.value)||void 0===a?void 0:a.value}`,email:c}})),bt(this,"readFile",((t,e,{parseText:r=!0,branch:n=this.branch}={})=>(0,a.readFile)(e,(()=>this.request({url:`${this.endpointUrl}/items/`,params:{version:n,path:t},cache:"no-store"}).then(r?this.responseToText:this.responseToBlob)),a.localForage,r))),bt(this,"listFiles",(async(t,e,r=this.branch)=>{try{const{value:i}=await this.requestJSON({url:`${this.endpointUrl}/items/`,params:{version:r,scopePath:t,recursionLevel:e?"full":"oneLevel"}});return i.filter((t=>t.gitObjectType===Bt.BLOB)).map((t=>({id:t.objectId,path:n()(t.path,"/"),name:(0,yt.basename)(t.path)})))}catch(t){if(t&&404===t.status)return console.log("This 404 was expected and handled appropriately."),[];throw t}}));const{repo:i}=t,o=e()(t.apiRoot,"/");this.endpointUrl=`${o}/${i.org}/${i.project}/_apis/git/repositories/${i.repoName}`,this.token=r,this.branch=t.branch,this.mergeStrategy=t.squashMerges?"squash":"noFastForward",this.initialWorkflowStatus=t.initialWorkflowStatus,this.apiVersion=t.apiVersion,this.cmsLabelPrefix=t.cmsLabelPrefix}async readFileMetadata(t,e,{branch:r=this.branch}={}){return await(0,a.readFileMetadata)(e,(async()=>{try{const{value:e}=await this.requestJSON({url:`${this.endpointUrl}/commits/`,params:{"searchCriteria.itemPath":t,"searchCriteria.itemVersion.version":r,"searchCriteria.$top":1}}),[n]=e;return{author:n.author.name||n.author.email,updatedOn:n.author.date}}catch(t){return{author:"",updatedOn:""}}}),a.localForage)}async getRef(t=this.branch){const{value:e}=await this.requestJSON({url:`${this.endpointUrl}/refs`,params:{$top:"1",filter:"heads/"+t}});return e.find((e=>e.name==this.branchToRef(t)))}async deleteRef(t){const e=[{name:t.name,oldObjectId:t.objectId,newObjectId:"0000000000000000000000000000000000000000"}];await this.requestJSON({method:"POST",url:`${this.endpointUrl}/refs`,body:JSON.stringify(e)})}async uploadAndCommit(t,e,r,n){const i=await this.getRef(n?this.branch:r),o={refUpdates:[{name:this.branchToRef(r),oldObjectId:i.objectId}],commits:[{comment:e,changes:t.map((t=>St(t)))}]};return this.requestJSON({url:`${this.endpointUrl}/pushes`,method:"POST",body:JSON.stringify(o)})}async retrieveUnpublishedEntryData(t){var e,r;const{collection:i,slug:o}=(0,a.parseContentKey)(t),s=(0,a.branchFromContentKey)(t),u=await this.getBranchPullRequest(s),c=await this.getDifferences(u.sourceRefName),l=await Promise.all(c.map((async t=>{const e=n()(t.item.path,"/"),r=t.changeType===_t.ADD;return{id:t.item.objectId,path:e,newFile:r}}))),f=u.labels.find((t=>(0,a.isCMSLabel)(t.name,this.cmsLabelPrefix))),h=f&&f.name?f.name:this.cmsLabelPrefix;return{collection:i,slug:o,status:(0,a.labelToStatus)(h,this.cmsLabelPrefix),diffs:l,updatedAt:u.closedDate?u.closedDate:u.creationDate,pullRequestAuthor:(null===(e=u.createdBy)||void 0===e?void 0:e.displayName)||(null===(r=u.createdBy)||void 0===r?void 0:r.uniqueName)}}async getPullRequestStatues(t){const{value:e}=await this.requestJSON({url:`${this.endpointUrl}/pullrequests/${t.pullRequestId}/commits`,params:{$top:1}}),{value:r}=await this.requestJSON({url:`${this.endpointUrl}/commits/${e[0].commitId}/statuses`,params:{latestOnly:!0}});return r}async getStatuses(t,e){const r=(0,a.generateContentKey)(t,e),n=(0,a.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);return(await this.getPullRequestStatues(i)).map((({context:t,state:e,targetUrl:r})=>({context:t.name,state:e===Et.SUCCEEDED?a.PreviewState.Success:a.PreviewState.Other,target_url:r})))}async getCommitItems(t,e){const r=await Promise.all(t.map((async t=>{const[r,n]=await Promise.all([z()(t,"toBase64",H()(this.toBase64,t.raw)),this.isFileExists(t.path,e)]),i=t.newPath||t.path,o=t.path,a=i!==o?_t.RENAME:_t.EDIT;return{action:n?a:_t.ADD,base64Content:r,path:i,oldPath:o}})));for(const t of r.filter((t=>t.oldPath&&t.action===_t.RENAME))){const n=(0,yt.dirname)(t.oldPath),i=(0,yt.dirname)(t.path);(await this.listFiles(n,!0,e)).filter((e=>e.path!==t.oldPath)).forEach((t=>{r.push({action:_t.RENAME,path:t.path.replace(n,i),oldPath:t.path})}))}return r}async persistFiles(t,e,r){const n=[...t,...e];if(r.useWorkflow){const e=t[0].slug;return this.editorialWorkflowGit(n,e,r)}{const t=await this.getCommitItems(n,this.branch);return this.uploadAndCommit(t,r.commitMessage,this.branch,!0)}}async deleteFiles(t,e){const r=await this.getRef(this.branch),n={refUpdates:[{name:r.name,oldObjectId:r.objectId}],commits:[{comment:e,changes:t.map((t=>St({action:_t.DELETE,path:t})))}]};return this.requestJSON({url:`${this.endpointUrl}/pushes`,method:"POST",body:JSON.stringify(n)})}async getPullRequests(t){const{value:e}=await this.requestJSON({url:`${this.endpointUrl}/pullrequests`,params:vt({"searchCriteria.status":"active","searchCriteria.targetRefName":this.branchToRef(this.branch),"searchCriteria.includeLinks":!1},t?{"searchCriteria.sourceRefName":this.branchToRef(t)}:{})});return e.filter((t=>t.labels.some((t=>(0,a.isCMSLabel)(t.name,this.cmsLabelPrefix)))))}async listUnpublishedBranches(){return(await this.getPullRequests()).map((t=>this.refToBranch(t.sourceRefName)))}async isFileExists(t,e){try{return await this.requestText({url:`${this.endpointUrl}/items/`,params:{version:e,path:t},cache:"no-store"}),!0}catch(t){if(t instanceof a.APIError&&404===t.status)return!1;throw t}}async createPullRequest(t,e,r){const n={sourceRefName:this.branchToRef(t),targetRefName:this.branchToRef(this.branch),title:e,description:a.DEFAULT_PR_BODY,labels:[{name:(0,a.statusToLabel)(r,this.cmsLabelPrefix)}]};await this.requestJSON({method:"POST",url:`${this.endpointUrl}/pullrequests`,params:{supportsIterations:!1},body:JSON.stringify(n)})}async getBranchPullRequest(t){const e=await this.getPullRequests(t);if(e.length<=0)throw new a.EditorialWorkflowError("content is not under editorial workflow",!0);return e[0]}async getDifferences(t){return(await this.requestJSON({url:`${this.endpointUrl}/diffs/commits`,params:{baseVersion:this.branch,targetVersion:this.refToBranch(t)}})).changes.filter((t=>t.item.gitObjectType===Bt.BLOB&&Object.values(_t).includes(t.changeType)))}async editorialWorkflowGit(t,e,r){const n=(0,a.generateContentKey)(r.collectionName,e),i=(0,a.branchFromContentKey)(n);if(r.unpublished){const e=await this.getCommitItems(t,i);await this.uploadAndCommit(e,r.commitMessage,i,!1)}else{const e=await this.getCommitItems(t,this.branch);await this.uploadAndCommit(e,r.commitMessage,i,!0),await this.createPullRequest(i,r.commitMessage,r.status||this.initialWorkflowStatus)}}async updateUnpublishedEntryStatus(t,e,r){const n=(0,a.generateContentKey)(t,e),i=(0,a.branchFromContentKey)(n),o=await this.getBranchPullRequest(i),s=[...o.labels.filter((t=>!(0,a.isCMSLabel)(t.name,this.cmsLabelPrefix))).map((t=>t.name)),(0,a.statusToLabel)(r,this.cmsLabelPrefix)];await this.updatePullRequestLabels(o,s)}async deleteUnpublishedEntry(t,e){const r=(0,a.generateContentKey)(t,e),n=(0,a.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.abandonPullRequest(i)}async publishUnpublishedEntry(t,e){const r=(0,a.generateContentKey)(t,e),n=(0,a.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.completePullRequest(i)}async updatePullRequestLabels(t,e){const r=t.labels.filter((t=>(0,a.isCMSLabel)(t.name,this.cmsLabelPrefix)));await Promise.all(r.map((e=>this.requestText({method:"DELETE",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(t.pullRequestId)}/labels/${encodeURIComponent(e.id)}`})))),await Promise.all(e.map((e=>this.requestText({method:"POST",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(t.pullRequestId)}/labels`,body:JSON.stringify({name:e})}))))}async completePullRequest(t){const e={status:Ot.COMPLETED,lastMergeSourceCommit:t.lastMergeSourceCommit,completionOptions:{deleteSourceBranch:!0,mergeCommitMessage:a.MERGE_COMMIT_MESSAGE,mergeStrategy:this.mergeStrategy}};let r=await this.requestJSON({method:"PATCH",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(t.pullRequestId)}`,body:JSON.stringify(e)}),n=1;for(;r.mergeStatus===Ct.QUEUED&&n<=10;)await Rt(500),r=await this.requestJSON({url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(t.pullRequestId)}`}),n+=1}async abandonPullRequest(t){const e={status:Ot.ABANDONED};await this.requestJSON({method:"PATCH",url:`${this.endpointUrl}/pullrequests/${encodeURIComponent(t.pullRequestId)}`,body:JSON.stringify(e)}),await this.deleteRef({name:t.sourceRefName,objectId:t.lastMergeSourceCommit.commitId})}}function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tt(Object(r),!0).forEach((function(e){kt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kt(t,e,r){var n;return(e="symbol"==typeof(n=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e))?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const It={AzureBackend:class{constructor(t,r={}){kt(this,"lock",void 0),kt(this,"api",void 0),kt(this,"options",void 0),kt(this,"repo",void 0),kt(this,"branch",void 0),kt(this,"apiRoot",void 0),kt(this,"apiVersion",void 0),kt(this,"token",void 0),kt(this,"squashMerges",void 0),kt(this,"cmsLabelPrefix",void 0),kt(this,"mediaFolder",void 0),kt(this,"previewContext",void 0),kt(this,"_mediaDisplayURLSem",void 0),this.options=Ut({initialWorkflowStatus:""},r),this.repo=function(t){const{repo:e}=t.backend;if("string"!=typeof e)throw new Error('The Azure backend needs a "repo" in the backend configuration.');const r=e.split("/");if(3!==r.length)throw new Error("The Azure backend must be in a the format of {org}/{project}/{repo}");const[n,i,o]=r;return{org:n,project:i,repoName:o}}(t),this.branch=t.backend.branch||"master",this.apiRoot=t.backend.api_root||"https://dev.azure.com",this.apiVersion=t.backend.api_version||"6.1-preview",this.token="",this.squashMerges=t.backend.squash_merges||!1,this.cmsLabelPrefix=t.backend.cms_label_prefix||"",this.mediaFolder=e()(t.media_folder,"/"),this.previewContext=t.backend.preview_context||"",this.lock=(0,a.asyncLock)()}isGitBackend(){return!0}async status(){return{auth:{status:await this.api.user().then((t=>!!t)).catch((t=>(console.warn("Failed getting Azure user",t),!1)))||!1},api:{status:!0,statusPage:""}}}authComponent(){return N}restoreUser(t){return this.authenticate(t)}async authenticate(t){this.token=t.token,this.api=new Pt({apiRoot:this.apiRoot,apiVersion:this.apiVersion,repo:this.repo,branch:this.branch,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus},this.token);const e=await this.api.user();return Ut({token:t.token},e)}logout(){this.token=null}getToken(){return Promise.resolve(this.token)}async entriesByFolder(t,e,r){return await(0,a.entriesByFolder)((async()=>(await this.api.listFiles(t,r>1)).filter((t=>(0,a.filterByExtension)({path:t.path},e))).map((t=>({id:t.id,path:t.path})))),this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),wt)}entriesByFiles(t){return(0,a.entriesByFiles)(t,this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),wt)}async getEntry(t){return{file:{path:t},data:await this.api.readFile(t)}}async getMedia(){const t=await this.api.listFiles(this.mediaFolder,!1);return await Promise.all(t.map((async({id:t,path:e,name:r})=>({id:t,name:r,displayURL:await this.getMediaDisplayURL({id:t,path:e}),path:e}))))}getMediaDisplayURL(t){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||o()(10),(0,a.getMediaDisplayURL)(t,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(t){const e=(0,a.basename)(t),r=await(0,a.getMediaAsBlob)(t,null,this.api.readFile.bind(this.api)),n=new File([r],e),i=URL.createObjectURL(n);return{id:await(0,a.getBlobSHA)(r),displayURL:i,path:t,name:e,size:n.size,file:n,url:i}}async persistEntry(t,e){const r=t.assets;await this.api.persistFiles(t.dataFiles,r,e)}async persistMedia(t,e){const r=t.fileObj,[i]=await Promise.all([(0,a.getBlobSHA)(r),this.api.persistFiles([],[t],e)]),{path:o}=t,s=URL.createObjectURL(r);return{displayURL:s,path:n()(o,"/"),name:r.name,size:r.size,file:r,url:s,id:i}}async deleteFiles(t,e){await this.api.deleteFiles(t,e)}async loadMediaFile(t,e){const r=await(0,a.getMediaAsBlob)(e.path,null,((e,r,{parseText:n})=>this.api.readFile(e,r,{branch:t,parseText:n}))),n=(0,a.basename)(e.path),i=new File([r],n);return{id:e.path,displayURL:URL.createObjectURL(i),path:e.path,name:n,size:i.size,file:i}}async loadEntryMediaFiles(t,e){return await Promise.all(e.map((e=>this.loadMediaFile(t,e))))}async unpublishedEntries(){return await(0,a.unpublishedEntries)((()=>this.api.listUnpublishedBranches().then((t=>t.map((t=>(0,a.contentKeyFromBranch)(t)))))))}async unpublishedEntry({id:t,collection:e,slug:r}){if(t)return await this.api.retrieveUnpublishedEntryData(t);if(e&&r){const t=(0,a.generateContentKey)(e,r);return await this.api.retrieveUnpublishedEntryData(t)}throw new Error("Missing unpublished entry id or collection and slug")}getBranch(t,e){const r=(0,a.generateContentKey)(t,e);return(0,a.branchFromContentKey)(r)}async unpublishedEntryMediaFile(t,e,r,n){const i=this.getBranch(t,e);return await this.loadMediaFile(i,{path:r,id:n})}async unpublishedEntryDataFile(t,e,r,n){const i=this.getBranch(t,e);return await this.api.readFile(r,n,{branch:i})}updateUnpublishedEntryStatus(t,e,r){return(0,a.runWithLock)(this.lock,(()=>this.api.updateUnpublishedEntryStatus(t,e,r)),"Failed to acquire update entry status lock")}deleteUnpublishedEntry(t,e){return(0,a.runWithLock)(this.lock,(()=>this.api.deleteUnpublishedEntry(t,e)),"Failed to acquire delete entry lock")}publishUnpublishedEntry(t,e){return(0,a.runWithLock)(this.lock,(()=>this.api.publishUnpublishedEntry(t,e)),"Failed to acquire publish entry lock")}async getDeployPreview(t,e){try{const r=await this.api.getStatuses(t,e),n=(0,a.getPreviewStatus)(r,this.previewContext);if(n){const{target_url:t,state:e}=n;return{url:t,status:e}}return null}catch(t){return null}}},API:Pt,AuthenticationPage:N}})(),c.DecapCmsBackendAzure})()));
|
|
//# sourceMappingURL=decap-cms-backend-azure.js.map
|