UNPKG

chromatic

Version:

Automate visual testing across browsers. Gather UI feedback. Versioned documentation.

1,088 lines • 649 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5bd0cf83-9093-5fca-9983-f27edef825c3")}catch(e){}}();
const e=require("./rolldown-runtime-DMt3xDJx.cjs"),t=require("./noPackageJson-DJz3Fwwy.cjs"),n=require("./e2ePackage-Osg93awL.cjs"),r=require("./getConfiguration-CWNd4Fym.cjs"),i=require("./icons-Cd4LHEK-.cjs"),a=require("./log-CBUJ6DPe.cjs"),o=require("./jsonfile-D2nKcmor.cjs"),s=require("./projectFiles-1_t6i9OT.cjs"),c=require("./meowImportMeta-ATHx7qtc.cjs"),l=require("./setExitCode-BDUkPwrs.cjs"),u=require("./trimStatsFile-CUG9YVKA.cjs"),d=require("./v1-DYg5fzlf.cjs"),f=require("./lib-DxWMkdTe.cjs"),p=require("./command-v5ha1WS9.cjs"),m=require("./build-DVAiPD5p.cjs"),h=require("./validateStorybookVersion-0beL_TJF.cjs"),g=require("./readStatsFile-B5yEbDcl.cjs"),_=require("./lib-BvaMHbms.cjs"),v=require("./strip-ansi-BHN-EOBd.cjs");let y=require("fs"),b=require("path");b=e.a(b);let x=require("os"),S=require("crypto"),C=require("semver");C=e.a(C);let w=require("util"),T=require("node:util"),E=require("node:child_process");E=e.a(E,1);let D=require("node:fs"),O=require("node:os");O=e.a(O,1);let k=require("node:path"),A=e.a(k,1);k=e.a(k);let j=require("node:readline");j=e.a(j,1);let M=require("node:process");M=e.a(M,1);let N=require("node:url"),P=require("node:module"),F=require("node:buffer"),I=require("node:timers/promises"),L=require("fs/promises"),R=require("node:tty"),z=require("readline");var ee=/* @__PURE__ */ e.t(((e,t)=>{let n=Symbol(`@@any-observable/REGISTRATION`),r;t.exports=(e,t)=>(i,a={})=>{let o=a.global!==!1;if(o&&!r&&(r=e[n]),r&&i&&r.implementation!==i)throw Error(`any-observable already defined as \`${r.implementation}\`. You can only register an implementation before the first call to \`require('any-observable')\` and an implementation cannot be changed`);return r||(r=i&&a.Observable?{Observable:a.Observable,implementation:i}:t(i),o&&(e[n]=r)),r}})),te=/* @__PURE__ */ e.t(((e,t)=>{t.exports=ee()(global,n);function n(e){let t;if(e===`global.Observable`)t={Observable:global.Observable,implementation:`global.Observable`};else if(e){let n=require(e);t={Observable:n.Observable||n.default||n,implementation:e}}else t=r();if(!t)throw Error("Cannot find any-observable implementation nor `global.Observable`. You must install polyfill or call `require('any-observable/register') with your preferred implementation, for example, `require('any-observable/register')('rxjs')` on app load prior to any `require('any-observable').");return t}function r(){for(let e of[`rxjs`,`zen-observable`])try{return n(e)}catch{}}})),ne=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;let t=e=>!!Symbol[e],n=e=>t(e)?Symbol[e]:`@@`+e,r=n(`iterator`),i=n(`observable`),a=n(`species`);function o(e,t){let n=e[t];if(n!=null){if(typeof n!=`function`)throw TypeError(n+` is not a function`);return n}}function s(e){let t=e.constructor;return t!==void 0&&(t=t[a],t===null&&(t=void 0)),t===void 0?_:t}function c(e){return e instanceof _}function l(e){l.log?l.log(e):setTimeout(()=>{throw e})}function u(e){Promise.resolve().then(()=>{try{e()}catch(e){l(e)}})}function d(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,t))try{if(typeof t==`function`)t();else{let e=o(t,`unsubscribe`);e&&e.call(t)}}catch(e){l(e)}}function f(e){e._observer=void 0,e._queue=void 0,e._state=`closed`}function p(e){let t=e._queue;if(t){e._queue=void 0,e._state=`ready`;for(let n=0;n<t.length&&(m(e,t[n].type,t[n].value),e._state!==`closed`);++n);}}function m(e,t,n){e._state=`running`;let r=e._observer;try{let i=o(r,t);switch(t){case`next`:i&&i.call(r,n);break;case`error`:if(f(e),i)i.call(r,n);else throw n;break;case`complete`:f(e),i&&i.call(r)}}catch(e){l(e)}e._state===`closed`?d(e):e._state===`running`&&(e._state=`ready`)}function h(e,t,n){e._state!==`closed`&&(e._state===`buffering`?e._queue.push({type:t,value:n}):e._state===`ready`?m(e,t,n):(e._state=`buffering`,e._queue=[{type:t,value:n}],u(()=>p(e))))}var g=class{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state=`initializing`;let n=this,r={get closed(){return n._state===`closed`},next(e){h(n,`next`,e)},error(e){h(n,`error`,e)},complete(){h(n,`complete`)}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}this._state===`initializing`&&(this._state=`ready`)}get closed(){return this._state===`closed`}unsubscribe(){this._state!==`closed`&&(f(this),d(this))}},_=class e{constructor(t){if(!(this instanceof e))throw TypeError(`Observable cannot be called as a function`);if(typeof t!=`function`)throw TypeError(`Observable initializer must be a function`);this._subscriber=t}subscribe(e){return typeof e==`object`&&e||(e={next:e,error:arguments[1],complete:arguments[2]}),new g(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if(typeof e!=`function`){n(/* @__PURE__ */ TypeError(e+` is not a function`));return}function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if(typeof e!=`function`)throw TypeError(e+` is not a function`);return new(s(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if(typeof e!=`function`)throw TypeError(e+` is not a function`);return new(s(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if(typeof e!=`function`)throw TypeError(e+` is not a function`);let t=s(this),n=arguments.length>1,r=!1,i=arguments[1];return new t(t=>this.subscribe({next(a){let o=!r;if(r=!0,!o||n)try{i=e(i,a)}catch(e){return t.error(e)}else i=a},error(e){t.error(e)},complete(){if(!r&&!n)return t.error(/* @__PURE__ */ TypeError(`Cannot reduce an empty sequence`));t.next(i),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=s(this);return new t(n=>{let r,i=0;function a(o){r=o.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):a(t.from(e[i++]))}})}return a(this),()=>{r&&=(r.unsubscribe(),void 0)}})}flatMap(e){if(typeof e!=`function`)throw TypeError(e+` is not a function`);let t=s(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let o=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(o);e>=0&&r.splice(e,1),a()}});r.push(o)},error(e){n.error(e)},complete(){a()}});function a(){i.closed&&r.length===0&&n.complete()}return()=>{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[i](){return this}static from(n){let a=typeof this==`function`?this:e;if(n==null)throw TypeError(n+` is not an object`);let s=o(n,i);if(s){let e=s.call(n);if(Object(e)!==e)throw TypeError(e+` is not an object`);return c(e)&&e.constructor===a?e:new a(t=>e.subscribe(t))}if(t(`iterator`)&&(s=o(n,r),s))return new a(e=>{u(()=>{if(!e.closed){for(let t of s.call(n))if(e.next(t),e.closed)return;e.complete()}})});if(Array.isArray(n))return new a(e=>{u(()=>{if(!e.closed){for(let t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})});throw TypeError(n+` is not observable`)}static of(...t){return new(typeof this==`function`?this:e)(e=>{u(()=>{if(!e.closed){for(let n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})})}static get[a](){return this}};e.Observable=_,Object.defineProperty(_,Symbol(`extensions`),{value:{symbol:i,hostReportError:l},configurable:!0})})),re=/* @__PURE__ */ e.t(((e,t)=>{t.exports=ne().Observable}));te()(`zen-observable`,{Observable:re()});var B=/* @__PURE__ */ e.t(((e,t)=>{let n=(e,t,n)=>new Promise((r,i)=>{if(n=Object.assign({concurrency:1/0},n),typeof t!=`function`)throw TypeError(`Mapper function is required`);let{concurrency:a}=n;if(!(typeof a==`number`&&a>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${a}\` (${typeof a})`);let o=[],s=e[Symbol.iterator](),c=!1,l=!1,u=0,d=0,f=()=>{if(c)return;let e=s.next(),n=d;d++,e.done?(l=!0,u===0&&r(o)):(u++,Promise.resolve(e.value).then(e=>t(e,n)).then(e=>{o[n]=e,u--,f()},e=>{c=!0,i(e)}))};for(let e=0;e<a&&(f(),!l);e++);});t.exports=n,t.exports.default=n})),V=/* @__PURE__ */ e.t(((e,t)=>{t.exports=n,t.exports.default=n;function n(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&typeof e.then==`function`}})),ie=/* @__PURE__ */ e.t(((e,t)=>{t.exports=te()().Observable})),ae=/* @__PURE__ */ e.t(((e,t)=>{let n=ie();function r(e,t,n){let r=e===!1?!1:e||t;if(n&&!r||r&&typeof r!=`string`)throw TypeError(t+`Event must be a string.`);return r}t.exports=(e,t)=>{t||={};let i=!1,a=[],o=t.await,s=r(t.dataEvent,`data`,!0),c=r(t.errorEvent,`error`),l=r(t.endEvent,`end`);function u(){i=!0,a.forEach(t=>{e.removeListener(s,t)}),a=null}let d=new Promise((t,n)=>{function r(e){o?o.then(t):t(e)}l?e.once(l,r):o&&r(),c&&e.once(c,n),o&&o.catch(n)}).catch(e=>{throw u(),e}).then(e=>(u(),e));return new n(t=>{if(d.then(t.complete.bind(t)).catch(t.error.bind(t)),i)return null;let n=e=>{t.next(e)};return e.on(s,n),a.push(n),()=>{if(e.removeListener(s,n),i)return;let t=a.indexOf(n);t!==-1&&a.splice(t,1)}})}})),oe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return typeof e==`function`}e.isFunction=t})),se=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=!1;e.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e?console.warn(`DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: 
`+(/* @__PURE__ */ Error()).stack):t&&console.log(`RxJS: Back to a better error behavior. Thank you. <3`),t=e},get useDeprecatedSynchronousErrorHandling(){return t}}})),ce=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){setTimeout(function(){throw e},0)}e.hostReportError=t})),le=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=se(),n=ce();e.empty={closed:!0,next:function(e){},error:function(e){if(t.config.useDeprecatedSynchronousErrorHandling)throw e;n.hostReportError(e)},complete:function(){}}})),H=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=(function(){return Array.isArray||(function(e){return e&&typeof e.length==`number`})})()})),ue=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return typeof e==`object`&&!!e}e.isObject=t})),de=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UnsubscriptionError=(function(){function e(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
`+e.map(function(e,t){return t+1+`) `+e.toString()}).join(`
  `):``,this.name=`UnsubscriptionError`,this.errors=e,this}return e.prototype=Object.create(Error.prototype),e})()})),U=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=H(),n=ue(),r=oe(),i=de();e.Subscription=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var o;if(!this.closed){var s=this,c=s._parentOrParents,l=s._ctorUnsubscribe,u=s._unsubscribe,d=s._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,c instanceof e)c.remove(this);else if(c!==null)for(var f=0;f<c.length;++f)c[f].remove(this);if(r.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){o=e instanceof i.UnsubscriptionError?a(e.errors):[e]}}if(t.isArray(d))for(var f=-1,p=d.length;++f<p;){var m=d[f];if(n.isObject(m))try{m.unsubscribe()}catch(e){o||=[],e instanceof i.UnsubscriptionError?o=o.concat(a(e.errors)):o.push(e)}}if(o)throw new i.UnsubscriptionError(o)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case`function`:n=new e(t);case`object`:if(n===this||n.closed||typeof n.unsubscribe!=`function`)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;n=new e,n._subscriptions=[r]}break;default:throw Error(`unrecognized teardown `+t+` added to Subscription.`)}var i=n._parentOrParents;if(i===null)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else if(i.indexOf(this)===-1)i.push(this);else return n;var a=this._subscriptions;return a===null?this._subscriptions=[n]:a.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function a(e){return e.reduce(function(e,t){return e.concat(t instanceof i.UnsubscriptionError?t.errors:t)},[])}})),fe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.rxSubscriber=(function(){return typeof Symbol==`function`?Symbol(`rxSubscriber`):`@@rxSubscriber_`+Math.random()})(),e.$$rxSubscriber=e.rxSubscriber})),W=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=oe(),a=le(),o=U(),s=fe(),c=se(),l=ce(),u=function(e){r(t,e);function t(n,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a.empty;break;case 1:if(!n){o.destination=a.empty;break}if(typeof n==`object`){n instanceof t?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new d(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new d(o,n,r,i)}return o}return t.prototype[s.rxSubscriber]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(o.Subscription);e.Subscriber=u;var d=function(e){r(t,e);function t(t,n,r,o){var s=e.call(this)||this;s._parentSubscriber=t;var c,l=s;return i.isFunction(n)?c=n:n&&(c=n.next,r=n.error,o=n.complete,n!==a.empty&&(l=Object.create(n),i.isFunction(l.unsubscribe)&&s.add(l.unsubscribe.bind(l)),l.unsubscribe=s.unsubscribe.bind(s))),s._context=l,s._next=c,s._error=r,s._complete=o,s}return t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;!c.config.useDeprecatedSynchronousErrorHandling||!t.syncErrorThrowable?this.__tryOrUnsub(this._next,e):this.__tryOrSetError(t,this._next,e)&&this.unsubscribe()}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=c.config.useDeprecatedSynchronousErrorHandling;if(this._error)!n||!t.syncErrorThrowable?(this.__tryOrUnsub(this._error,e),this.unsubscribe()):(this.__tryOrSetError(t,this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):l.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;l.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};!c.config.useDeprecatedSynchronousErrorHandling||!t.syncErrorThrowable?(this.__tryOrUnsub(n),this.unsubscribe()):(this.__tryOrSetError(t,n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw e;l.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!c.config.useDeprecatedSynchronousErrorHandling)throw Error(`bad call`);try{t.call(this._context,n)}catch(t){return c.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(l.hostReportError(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(u);e.SafeSubscriber=d})),pe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=W();function n(e){for(;e;){var n=e,r=n.closed,i=n.destination,a=n.isStopped;if(r||a)return!1;e=i&&i instanceof t.Subscriber?i:null}return!0}e.canReportError=n})),me=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=W(),n=fe(),r=le();function i(e,i,a){if(e){if(e instanceof t.Subscriber)return e;if(e[n.rxSubscriber])return e[n.rxSubscriber]()}return!e&&!i&&!a?new t.Subscriber(r.empty):new t.Subscriber(e,i,a)}e.toSubscriber=i})),he=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observable=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})()})),ge=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return e}e.identity=t})),_e=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ge();function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(e)}e.pipe=n;function r(e){return e.length===0?t.identity:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}e.pipeFromArray=r})),G=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=pe(),n=me(),r=he(),i=_e(),a=se();e.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,r){var i=this.operator,o=n.toSubscriber(e,t,r);if(i?o.add(i.call(o,this.source)):o.add(this.source||a.config.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),a.config.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){a.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),t.canReportError(e)?e.error(n):console.warn(n)}},e.prototype.forEach=function(e,t){var n=this;return t=o(t),new t(function(t,r){var i=n.subscribe(function(t){try{e(t)}catch(e){r(e),i&&i.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[r.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:i.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=o(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function o(e){if(e||=a.config.Promise||Promise,!e)throw Error(`no Promise impl found`);return e}})),ve=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUnsubscribedError=(function(){function e(){return Error.call(this),this.message=`object unsubscribed`,this.name=`ObjectUnsubscribedError`,this}return e.prototype=Object.create(Error.prototype),e})()})),ye=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.SubjectSubscription=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,!(!t||t.length===0||e.isStopped||e.closed)){var n=t.indexOf(this.subscriber);n!==-1&&t.splice(n,1)}}},t}(U().Subscription)})),be=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=G(),a=W(),o=U(),s=ve(),c=ye(),l=fe(),u=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return t}(a.Subscriber);e.SubjectSubscriber=u;var d=function(e){r(t,e);function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype[l.rxSubscriber]=function(){return new u(this)},t.prototype.lift=function(e){var t=new f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new s.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new s.ObjectUnsubscribedError;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new s.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),o.Subscription.EMPTY):this.isStopped?(e.complete(),o.Subscription.EMPTY):(this.observers.push(e),new c.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);e.Subject=d;var f=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):o.Subscription.EMPTY},t}(d);e.AnonymousSubject=f})),xe=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=W();function a(){return function(e){return e.lift(new o(e))}}e.refCount=a;var o=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new s(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),s=function(e){r(t,e);function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return t.prototype._unsubscribe=function(){var e=this.connectable;if(!e)this.connection=null;else{this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()}}},t}(i.Subscriber)})),Se=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=be(),a=G(),o=W(),s=U(),c=xe(),l=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,e=this._connection=new s.Subscription,e.add(this.source.subscribe(new u(this.getSubject(),this))),e.closed&&(this._connection=null,e=s.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(a.Observable);e.ConnectableObservable=l,e.connectableObservableDescriptor=(function(){var e=l.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}})();var u=function(e){r(t,e);function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(i.SubjectSubscriber);(function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new d(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e})();var d=function(e){r(t,e);function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return t.prototype._unsubscribe=function(){var e=this.connectable;if(!e)this.connection=null;else{this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,r&&(!n||r===n)&&r.unsubscribe()}}},t}(o.Subscriber)})),Ce=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=W(),a=U(),o=G(),s=be();function c(e,t,n,r){return function(i){return i.lift(new l(e,t,n,r))}}e.groupBy=c;var l=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),u=function(e){r(t,e);function t(t,n,r,i,a){var o=e.call(this,t)||this;return o.keySelector=n,o.elementSelector=r,o.durationSelector=i,o.subjectSelector=a,o.groups=null,o.attemptedToUnsubscribe=!1,o.count=0,o}return t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||=this.groups=/* @__PURE__ */ new Map;var r=n.get(t),i;if(this.elementSelector)try{i=this.elementSelector(e)}catch(e){this.error(e)}else i=e;if(!r){r=this.subjectSelector?this.subjectSelector():new s.Subject,n.set(t,r);var a=new f(t,r,this);if(this.destination.next(a),this.durationSelector){var o=void 0;try{o=this.durationSelector(new f(t,r))}catch(e){this.error(e);return}this.add(o.subscribe(new d(t,r,this)))}}r.closed||r.next(i)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,n){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){r(t,e);function t(t,n,r){var i=e.call(this,n)||this;return i.key=t,i.group=n,i.parent=r,i}return t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this,t=e.parent,n=e.key;this.key=this.parent=null,t&&t.removeGroup(n)},t}(i.Subscriber),f=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return t.prototype._subscribe=function(e){var t=new a.Subscription,n=this,r=n.refCountSubscription,i=n.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(i.subscribe(e)),t},t}(o.Observable);e.GroupedObservable=f;var p=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return t.prototype.unsubscribe=function(){var t=this.parent;!t.closed&&!this.closed&&(e.prototype.unsubscribe.call(this),--t.count,t.count===0&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)})),we=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=be(),a=ve();e.BehaviorSubject=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new a.ObjectUnsubscribedError;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)})),Te=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Action=function(e){r(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(U().Subscription)})),Ee=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncAction=function(e){r(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!==null&&this.delay===n&&this.pending===!1)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,r!==-1&&n.splice(r,1),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(Te().Action)})),De=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueAction=function(e){r(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0||r===null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(Ee().AsyncAction)})),Oe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=function(){function e(t,n){n===void 0&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}()})),ke=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=Oe();e.AsyncScheduler=function(e){r(t,e);function t(n,r){r===void 0&&(r=i.Scheduler.now);var a=e.call(this,n,function(){return t.delegate&&t.delegate!==a?t.delegate.now():r()})||this;return a.actions=[],a.active=!1,a.scheduled=void 0,a}return t.prototype.schedule=function(n,r,i){return r===void 0&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.Scheduler)})),Ae=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueScheduler=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ke().AsyncScheduler)})),je=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=De();e.queueScheduler=new(Ae()).QueueScheduler(t.QueueAction),e.queue=e.queueScheduler})),Me=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G();e.EMPTY=new t.Observable(function(e){return e.complete()});function n(t){return t?r(t):e.EMPTY}e.empty=n;function r(e){return new t.Observable(function(t){return e.schedule(function(){return t.complete()})})}})),Ne=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return e&&typeof e.schedule==`function`}e.isScheduler=t})),Pe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeToArray=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}}})),Fe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=U();function r(e,r){return new t.Observable(function(t){var i=new n.Subscription,a=0;return i.add(r.schedule(function(){a===e.length?t.complete():(t.next(e[a++]),t.closed||i.add(this.schedule()))})),i})}e.scheduleArray=r})),Ie=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=Pe(),r=Fe();function i(e,i){return i?r.scheduleArray(e,i):new t.Observable(n.subscribeToArray(e))}e.fromArray=i})),Le=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ne(),n=Ie(),r=Fe();function i(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var a=e[e.length-1];return t.isScheduler(a)?(e.pop(),r.scheduleArray(e,a)):n.fromArray(e)}e.of=i})),Re=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G();function n(e,n){return n?new t.Observable(function(t){return n.schedule(r,0,{error:e,subscriber:t})}):new t.Observable(function(t){return t.error(e)})}e.throwError=n;function r(e){var t=e.error;e.subscriber.error(t)}})),ze=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Me(),n=Le(),r=Re();(function(e){e.NEXT=`N`,e.ERROR=`E`,e.COMPLETE=`C`})(e.NotificationKind||={}),e.Notification=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e===`N`}return e.prototype.observe=function(e){switch(this.kind){case`N`:return e.next&&e.next(this.value);case`E`:return e.error&&e.error(this.error);case`C`:return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case`N`:return e&&e(this.value);case`E`:return t&&t(this.error);case`C`:return n&&n()}},e.prototype.accept=function(e,t,n){return e&&typeof e.next==`function`?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case`N`:return n.of(this.value);case`E`:return r.throwError(this.error);case`C`:return t.empty()}throw Error(`unexpected notification kind value`)},e.createNext=function(t){return t===void 0?e.undefinedValueNotification:new e(`N`,t)},e.createError=function(t){return new e(`E`,void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e(`C`),e.undefinedValueNotification=new e(`N`,void 0),e}()})),Be=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=W(),a=ze();function o(e,t){return t===void 0&&(t=0),function(n){return n.lift(new s(e,t))}}e.observeOn=o;var s=function(){function e(e,t){t===void 0&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.scheduler,this.delay))},e}();e.ObserveOnOperator=s;var c=function(e){r(t,e);function t(t,n,r){r===void 0&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new l(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);e.ObserveOnSubscriber=c;var l=function(){function e(e,t){this.notification=e,this.destination=t}return e}();e.ObserveOnMessage=l})),Ve=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=be(),a=je(),o=U(),s=Be(),c=ve(),l=ye();e.ReplaySubject=function(e){r(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===1/0?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new u(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t=this._infiniteTimeWindow,n=t?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,i=n.length,a;if(this.closed)throw new c.ObjectUnsubscribedError;if(this.isStopped||this.hasError?a=o.Subscription.EMPTY:(this.observers.push(e),a=new l.SubjectSubscription(this,e)),r&&e.add(e=new s.ObserveOnSubscriber(e,r)),t)for(var u=0;u<i&&!e.closed;u++)e.next(n[u]);else for(var u=0;u<i&&!e.closed;u++)e.next(n[u].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),a},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,a=0;a<i&&!(e-r[a].time<n);)a++;return i>t&&(a=Math.max(a,i-t)),a>0&&r.splice(0,a),r},t}(i.Subject);var u=function(){function e(e,t){this.time=e,this.value=t}return e}()})),He=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=be(),a=U();e.AsyncSubject=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)})),Ue=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=1,n=(function(){return Promise.resolve()})(),r={};function i(e){return e in r&&(delete r[e],!0)}e.Immediate={setImmediate:function(e){var a=t++;return r[a]=!0,n.then(function(){return i(a)&&e()}),a},clearImmediate:function(e){i(e)}},e.TestTools={pending:function(){return Object.keys(r).length}}})),We=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=Ue();e.AsapAction=function(e){r(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||=i.Immediate.setImmediate(t.flush.bind(t,null)))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r!==null&&r>0||r===null&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);t.actions.length===0&&(i.Immediate.clearImmediate(n),t.scheduled=void 0)},t}(Ee().AsyncAction)})),Ge=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapScheduler=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t=this.actions,n,r=-1,i=t.length;e||=t.shift();do if(n=e.execute(e.state,e.delay))break;while(++r<i&&(e=t.shift()));if(this.active=!1,n){for(;++r<i&&(e=t.shift());)e.unsubscribe();throw n}},t}(ke().AsyncScheduler)})),Ke=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=We();e.asapScheduler=new(Ge()).AsapScheduler(t.AsapAction),e.asap=e.asapScheduler})),qe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ee();e.asyncScheduler=new(ke()).AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler})),Je=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameAction=function(e){r(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||=requestAnimationFrame(function(){return t.flush(null)}))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r!==null&&r>0||r===null&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);t.actions.length===0&&(cancelAnimationFrame(n),t.scheduled=void 0)},t}(Ee().AsyncAction)})),Ye=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameScheduler=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t=this.actions,n,r=-1,i=t.length;e||=t.shift();do if(n=e.execute(e.state,e.delay))break;while(++r<i&&(e=t.shift()));if(this.active=!1,n){for(;++r<i&&(e=t.shift());)e.unsubscribe();throw n}},t}(ke().AsyncScheduler)})),Xe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Je();e.animationFrameScheduler=new(Ye()).AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler})),Ze=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=Ee();e.VirtualTimeScheduler=function(e){r(t,e);function t(t,n){t===void 0&&(t=a),n===void 0&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return t.prototype.flush=function(){for(var e=this,t=e.actions,n=e.maxFrames,r,i;(i=t[0])&&i.delay<=n&&(t.shift(),this.frame=i.delay,!(r=i.execute(i.state,i.delay))););if(r){for(;i=t.shift();)i.unsubscribe();throw r}},t.frameTimeFactor=10,t}(ke().AsyncScheduler);var a=function(e){r(t,e);function t(t,n,r){r===void 0&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return t.prototype.schedule=function(n,r){if(r===void 0&&(r=0),!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},t.prototype.requestAsyncId=function(e,n,r){r===void 0&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){n===void 0&&(n=0)},t.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(i.AsyncAction);e.VirtualAction=a})),Qe=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(){}e.noop=t})),$e=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G();function n(e){return!!e&&(e instanceof t.Observable||typeof e.lift==`function`&&typeof e.subscribe==`function`)}e.isObservable=n})),et=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=(function(){function e(){return Error.call(this),this.message=`argument out of range`,this.name=`ArgumentOutOfRangeError`,this}return e.prototype=Object.create(Error.prototype),e})()})),tt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=(function(){function e(){return Error.call(this),this.message=`no elements in sequence`,this.name=`EmptyError`,this}return e.prototype=Object.create(Error.prototype),e})()})),nt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TimeoutError=(function(){function e(){return Error.call(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this}return e.prototype=Object.create(Error.prototype),e})()})),rt=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=W();function a(e,t){return function(n){if(typeof e!=`function`)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new o(e,t))}}e.map=a;var o=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();e.MapOperator=o;var s=function(e){r(t,e);function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)})),it=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=He(),r=rt(),i=pe(),a=H(),o=Ne();function s(e,l,u){if(l){if(o.isScheduler(l))u=l;else return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s(e,u).apply(void 0,t).pipe(r.map(function(e){return a.isArray(e)?l.apply(void 0,e):l(e)}))}}return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var o=this,s,l={context:o,subject:s,callbackFunc:e,scheduler:u};return new t.Observable(function(t){if(u){var a={args:r,subscriber:t,params:l};return u.schedule(c,0,a)}if(!s){s=new n.AsyncSubject;var d=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];s.next(e.length<=1?e[0]:e),s.complete()};try{e.apply(o,r.concat([d]))}catch(e){i.canReportError(s)?s.error(e):console.warn(e)}}return s.subscribe(t)})}}e.bindCallback=s;function c(e){var t=this,r=e.args,i=e.subscriber,a=e.params,o=a.callbackFunc,s=a.context,c=a.scheduler,u=a.subject;if(!u){u=a.subject=new n.AsyncSubject;var d=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.length<=1?e[0]:e;t.add(c.schedule(l,0,{value:r,subject:u}))};try{o.apply(s,r.concat([d]))}catch(e){u.error(e)}}this.add(u.subscribe(i))}function l(e){var t=e.value,n=e.subject;n.next(t),n.complete()}})),at=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=He(),r=rt(),i=pe(),a=Ne(),o=H();function s(e,l,u){if(l){if(a.isScheduler(l))u=l;else return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s(e,u).apply(void 0,t).pipe(r.map(function(e){return o.isArray(e)?l.apply(void 0,e):l(e)}))}}return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var o={subject:void 0,args:r,callbackFunc:e,scheduler:u,context:this};return new t.Observable(function(t){var a=o.context,s=o.subject;if(u)return u.schedule(c,0,{params:o,subscriber:t,context:a});if(!s){s=o.subject=new n.AsyncSubject;var l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.shift();n?s.error(n):(s.next(e.length<=1?e[0]:e),s.complete())};try{e.apply(a,r.concat([l]))}catch(e){i.canReportError(s)?s.error(e):console.warn(e)}}return s.subscribe(t)})}}e.bindNodeCallback=s;function c(e){var t=this,r=e.params,i=e.subscriber,a=e.context,o=r.callbackFunc,s=r.args,c=r.scheduler,d=r.subject;if(!d){d=r.subject=new n.AsyncSubject;var f=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.shift();if(r)t.add(c.schedule(u,0,{err:r,subject:d}));else{var i=e.length<=1?e[0]:e;t.add(c.schedule(l,0,{value:i,subject:d}))}};try{o.apply(a,s.concat([f]))}catch(e){this.add(c.schedule(u,0,{err:e,subject:d}))}}this.add(d.subscribe(i))}function l(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function u(e){var t=e.err;e.subject.error(t)}})),ot=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OuterSubscriber=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(W().Subscriber)})),st=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.InnerSubscriber=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(W().Subscriber)})),ct=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ce();e.subscribeToPromise=function(e){return function(n){return e.then(function(e){n.closed||(n.next(e),n.complete())},function(e){return n.error(e)}).then(null,t.hostReportError),n}}})),lt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}e.getSymbolIterator=t,e.iterator=t(),e.$$iterator=e.iterator})),ut=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lt();e.subscribeToIterable=function(e){return function(n){var r=e[t.iterator]();do{var i=void 0;try{i=r.next()}catch(e){return n.error(e),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}while(1);return typeof r.return==`function`&&n.add(function(){r.return&&r.return()}),n}}})),dt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=he();e.subscribeToObservable=function(e){return function(n){var r=e[t.observable]();if(typeof r.subscribe!=`function`)throw TypeError(`Provided object does not correctly implement Symbol.observable`);return r.subscribe(n)}}})),ft=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`})})),pt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){return!!e&&typeof e.subscribe!=`function`&&typeof e.then==`function`}e.isPromise=t})),mt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Pe(),n=ct(),r=ut(),i=dt(),a=ft(),o=pt(),s=ue(),c=lt(),l=he();e.subscribeTo=function(e){if(e&&typeof e[l.observable]==`function`)return i.subscribeToObservable(e);if(a.isArrayLike(e))return t.subscribeToArray(e);if(o.isPromise(e))return n.subscribeToPromise(e);if(e&&typeof e[c.iterator]==`function`)return r.subscribeToIterable(e);var u=`You provided `+(s.isObject(e)?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw TypeError(u)}})),ht=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=st(),n=mt(),r=G();function i(e,i,a,o,s){if(s===void 0&&(s=new t.InnerSubscriber(e,a,o)),!s.closed)return i instanceof r.Observable?i.subscribe(s):n.subscribeTo(i)(s)}e.subscribeToResult=i})),gt=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=Ne(),a=H(),o=ot(),s=ht(),c=Ie(),l={};function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return i.isScheduler(e[e.length-1])&&(r=e.pop()),typeof e[e.length-1]==`function`&&(n=e.pop()),e.length===1&&a.isArray(e[0])&&(e=e[0]),c.fromArray(e,r).lift(new d(n))}e.combineLatest=u;var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();e.CombineLatestOperator=d;var f=function(e){r(t,e);function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return t.prototype._next=function(e){this.values.push(l),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(t===0)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(s.subscribeToResult(this,r,void 0,n))}}},t.prototype.notifyComplete=function(e){--this.active===0&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n){var r=this.values,i=r[n],a=this.toRespond?i===l?--this.toRespond:this.toRespond:0;r[n]=t,a===0&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(o.OuterSubscriber);e.CombineLatestSubscriber=f})),_t=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=U(),r=he();function i(e,i){return new t.Observable(function(t){var a=new n.Subscription;return a.add(i.schedule(function(){var n=e[r.observable]();a.add(n.subscribe({next:function(e){a.add(i.schedule(function(){return t.next(e)}))},error:function(e){a.add(i.schedule(function(){return t.error(e)}))},complete:function(){a.add(i.schedule(function(){return t.complete()}))}}))})),a})}e.scheduleObservable=i})),vt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=U();function r(e,r){return new t.Observable(function(t){var i=new n.Subscription;return i.add(r.schedule(function(){return e.then(function(e){i.add(r.schedule(function(){t.next(e),i.add(r.schedule(function(){return t.complete()}))}))},function(e){i.add(r.schedule(function(){return t.error(e)}))})})),i})}e.schedulePromise=r})),yt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=U(),r=lt();function i(e,i){if(!e)throw Error(`Iterable cannot be null`);return new t.Observable(function(t){var a=new n.Subscription,o;return a.add(function(){o&&typeof o.return==`function`&&o.return()}),a.add(i.schedule(function(){o=e[r.iterator](),a.add(i.schedule(function(){if(!t.closed){var e,n;try{var r=o.next();e=r.value,n=r.done}catch(e){t.error(e);return}n?t.complete():(t.next(e),this.schedule())}}))})),a})}e.scheduleIterable=i})),bt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=he();function n(e){return e&&typeof e[t.observable]==`function`}e.isInteropObservable=n})),xt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lt();function n(e){return e&&typeof e[t.iterator]==`function`}e.isIterable=n})),St=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=_t(),n=vt(),r=Fe(),i=yt(),a=bt(),o=pt(),s=ft(),c=xt();function l(e,l){if(e!=null){if(a.isInteropObservable(e))return t.scheduleObservable(e,l);if(o.isPromise(e))return n.schedulePromise(e,l);if(s.isArrayLike(e))return r.scheduleArray(e,l);if(c.isIterable(e)||typeof e==`string`)return i.scheduleIterable(e,l)}throw TypeError((e!==null&&typeof e||e)+` is not observable`)}e.scheduled=l})),Ct=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=mt(),r=St();function i(e,i){return i?r.scheduled(e,i):e instanceof t.Observable?e:new t.Observable(n.subscribeTo(e))}e.from=i})),wt=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=W(),a=G(),o=mt();e.SimpleInnerSubscriber=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n.parent=t,n}return t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),e.ComplexInnerSubscriber=function(e){r(t,e);function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i}return t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),e.SimpleOuterSubscriber=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),e.ComplexOuterSubscriber=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.notifyNext=function(e,t,n,r){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber);function s(e,t){if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);var n;try{n=o.subscribeTo(e)(t)}catch(e){t.error(e)}return n}}e.innerSubscribe=s})),Tt=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=rt(),a=Ct(),o=wt();function s(e,t,n){return n===void 0&&(n=1/0),typeof t==`function`?function(r){return r.pipe(s(function(n,r){return a.from(e(n,r)).pipe(i.map(function(e,i){return t(n,e,r,i)}))},n))}:(typeof t==`number`&&(n=t),function(t){return t.lift(new c(e,n))})}e.mergeMap=s;var c=function(){function e(e,t){t===void 0&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project,this.concurrent))},e}();e.MergeMapOperator=c;var l=function(e){r(t,e);function t(t,n,r){r===void 0&&(r=1/0);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new o.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=o.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},t}(o.SimpleOuterSubscriber);e.MergeMapSubscriber=l,e.flatMap=s})),Et=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Tt(),n=ge();function r(e){return e===void 0&&(e=1/0),t.mergeMap(n.identity,e)}e.mergeAll=r})),Dt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Et();function n(){return t.mergeAll(1)}e.concatAll=n})),Ot=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Le(),n=Dt();function r(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n.concatAll()(t.of.apply(void 0,e))}e.concat=r})),kt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=Ct(),r=Me();function i(e){return new t.Observable(function(t){var i;try{i=e()}catch(e){t.error(e);return}return(i?n.from(i):r.empty()).subscribe(t)})}e.defer=i})),At=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=H(),r=rt(),i=ue(),a=Ct();function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){var a=e[0];if(n.isArray(a))return s(a,null);if(i.isObject(a)&&Object.getPrototypeOf(a)===Object.prototype){var o=Object.keys(a);return s(o.map(function(e){return a[e]}),o)}}if(typeof e[e.length-1]==`function`){var c=e.pop();return e=e.length===1&&n.isArray(e[0])?e[0]:e,s(e,null).pipe(r.map(function(e){return c.apply(void 0,e)}))}return s(e,null)}e.forkJoin=o;function s(e,n){return new t.Observable(function(t){var r=e.length;if(r===0)t.complete();else for(var i=Array(r),o=0,s=0,c=function(c){var l=a.from(e[c]),u=!1;t.add(l.subscribe({next:function(e){u||(u=!0,s++),i[c]=e},error:function(e){return t.error(e)},complete:function(){o++,o!==r&&u||(s===r&&t.next(n?n.reduce(function(e,t,n){return e[t]=i[n],e},{}):i),t.complete())}}))},l=0;l<r;l++)c(l)})}})),jt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=H(),r=oe(),i=rt();function a(e,s,c,l){return r.isFunction(c)&&(l=c,c=void 0),l?a(e,s,c).pipe(i.map(function(e){return n.isArray(e)?l.apply(void 0,e):l(e)})):new t.Observable(function(t){function n(e){arguments.length>1?t.next(Array.prototype.slice.call(arguments)):t.next(e)}o(e,s,n,t,c)})}e.fromEvent=a;function o(e,t,n,r,i){var a;if(l(e)){var u=e;e.addEventListener(t,n,i),a=function(){return u.removeEventListener(t,n,i)}}else if(c(e)){var d=e;e.on(t,n),a=function(){return d.off(t,n)}}else if(s(e)){var f=e;e.addListener(t,n),a=function(){return f.removeListener(t,n)}}else if(e&&e.length)for(var p=0,m=e.length;p<m;p++)o(e[p],t,n,r,i);else throw TypeError(`Invalid event target`);r.add(a)}function s(e){return e&&typeof e.addListener==`function`&&typeof e.removeListener==`function`}function c(e){return e&&typeof e.on==`function`&&typeof e.off==`function`}function l(e){return e&&typeof e.addEventListener==`function`&&typeof e.removeEventListener==`function`}})),Mt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=H(),r=oe(),i=rt();function a(e,o,s){return s?a(e,o).pipe(i.map(function(e){return n.isArray(e)?s.apply(void 0,e):s(e)})):new t.Observable(function(t){var n=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.next(e.length===1?e[0]:e)},i;try{i=e(n)}catch(e){t.error(e);return}if(r.isFunction(o))return function(){return o(n,i)}})}e.fromEventPattern=a})),Nt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=ge(),r=Ne();function i(e,i,o,s,c){var l,u;if(arguments.length==1){var d=e;u=d.initialState,i=d.condition,o=d.iterate,l=d.resultSelector||n.identity,c=d.scheduler}else s===void 0||r.isScheduler(s)?(u=e,l=n.identity,c=s):(u=e,l=s);return new t.Observable(function(e){var t=u;if(c)return c.schedule(a,0,{subscriber:e,iterate:o,condition:i,resultSelector:l,state:t});do{if(i){var n=void 0;try{n=i(t)}catch(t){e.error(t);return}if(!n){e.complete();break}}var r=void 0;try{r=l(t)}catch(t){e.error(t);return}if(e.next(r),e.closed)break;try{t=o(t)}catch(t){e.error(t);return}}while(1)})}e.generate=i;function a(e){var t=e.subscriber,n=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){t.error(e);return}else e.needIterate=!0;if(n){var r=void 0;try{r=n(e.state)}catch(e){t.error(e);return}if(!r){t.complete();return}if(t.closed)return}var i;try{i=e.resultSelector(e.state)}catch(e){t.error(e);return}if(!t.closed&&(t.next(i),!t.closed))return this.schedule(e)}}})),Pt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),n=Me();function r(e,r,i){return r===void 0&&(r=n.EMPTY),i===void 0&&(i=n.EMPTY),t.defer(function(){return e()?r:i})}e.iif=r})),Ft=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=H();function n(e){return!t.isArray(e)&&e-parseFloat(e)+1>=0}e.isNumeric=n})),It=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=qe(),r=Ft();function i(e,i){return e===void 0&&(e=0),i===void 0&&(i=n.async),(!r.isNumeric(e)||e<0)&&(e=0),i&&typeof i.schedule==`function`||(i=n.async),new t.Observable(function(t){return t.add(i.schedule(a,e,{subscriber:t,counter:0,period:e})),t})}e.interval=i;function a(e){var t=e.subscriber,n=e.counter,r=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:r},r)}})),Lt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=Ne(),r=Et(),i=Ie();function a(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var o=1/0,s=null,c=e[e.length-1];return n.isScheduler(c)?(s=e.pop(),e.length>1&&typeof e[e.length-1]==`number`&&(o=e.pop())):typeof c==`number`&&(o=e.pop()),s===null&&e.length===1&&e[0]instanceof t.Observable?e[0]:r.mergeAll(o)(i.fromArray(e,s))}e.merge=a})),Rt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=Qe();e.NEVER=new t.Observable(n.noop);function r(){return e.NEVER}e.never=r})),zt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=Ct(),r=H(),i=Me();function a(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];if(e.length===0)return i.EMPTY;var s=e[0],c=e.slice(1);return e.length===1&&r.isArray(s)?a.apply(void 0,s):new t.Observable(function(e){var t=function(){return e.add(a.apply(void 0,c).subscribe(e))};return n.from(s).subscribe({next:function(t){e.next(t)},error:t,complete:t})})}e.onErrorResumeNext=a})),Bt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=U();function r(e,r){return r?new t.Observable(function(t){var a=Object.keys(e),o=new n.Subscription;return o.add(r.schedule(i,0,{keys:a,index:0,subscriber:t,subscription:o,obj:e})),o}):new t.Observable(function(t){for(var n=Object.keys(e),r=0;r<n.length&&!t.closed;r++){var i=n[r];e.hasOwnProperty(i)&&t.next([i,e[i]])}t.complete()})}e.pairs=r;function i(e){var t=e.keys,n=e.index,r=e.subscriber,i=e.subscription,a=e.obj;if(!r.closed){if(n<t.length){var o=t[n];r.next([o,a[o]]),i.add(this.schedule({keys:t,index:n+1,subscriber:r,subscription:i,obj:a}))}else r.complete()}}e.dispatch=i})),Vt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}e.not=t})),Ht=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=W();function a(e,t){return function(n){return n.lift(new o(e,t))}}e.filter=a;var o=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){r(t,e);function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)})),Ut=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Vt(),n=mt(),r=Ht(),i=G();function a(e,a,o){return[r.filter(a,o)(new i.Observable(n.subscribeTo(e))),r.filter(t.not(a,o))(new i.Observable(n.subscribeTo(e)))]}e.partition=a})),Wt=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=H(),a=Ie(),o=ot(),s=ht();function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){if(i.isArray(e[0]))e=e[0];else return e[0]}return a.fromArray(e,void 0).lift(new l)}e.race=c;var l=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}();e.RaceOperator=l;var u=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(t===0)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],i=s.subscribeToResult(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(t)},t}(o.OuterSubscriber);e.RaceSubscriber=u})),Gt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G();function n(e,n,i){return e===void 0&&(e=0),new t.Observable(function(t){n===void 0&&(n=e,e=0);var a=0,o=e;if(i)return i.schedule(r,0,{index:a,count:n,start:e,subscriber:t});do{if(a++>=n){t.complete();break}if(t.next(o++),t.closed)break}while(1)})}e.range=n;function r(e){var t=e.start,n=e.index,r=e.count,i=e.subscriber;n>=r?i.complete():(i.next(t),i.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}e.dispatch=r})),Kt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=qe(),r=Ft(),i=Ne();function a(e,a,s){e===void 0&&(e=0);var c=-1;return r.isNumeric(a)?c=Number(a)<1&&1||Number(a):i.isScheduler(a)&&(s=a),i.isScheduler(s)||(s=n.async),new t.Observable(function(t){var n=r.isNumeric(e)?e:+e-s.now();return s.schedule(o,n,{index:0,period:c,subscriber:t})})}e.timer=a;function o(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(n===-1)return r.complete();e.index=t+1,this.schedule(e,n)}}})),qt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=G(),n=Ct(),r=Me();function i(e,i){return new t.Observable(function(t){var a;try{a=e()}catch(e){t.error(e);return}var o;try{o=i(a)}catch(e){t.error(e);return}var s=(o?n.from(o):r.EMPTY).subscribe(t);return function(){s.unsubscribe(),a&&a.unsubscribe()}})}e.using=i})),Jt=/* @__PURE__ */ e.t(((e,t,n)=>{var r=n&&n.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=Ie(),a=H(),o=W(),s=lt(),c=wt();function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return typeof n==`function`&&e.pop(),i.fromArray(e,void 0).lift(new u(n))}e.zip=l;var u=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();e.ZipOperator=u;var d=function(e){r(t,e);function t(t,n,r){r===void 0&&(r=Object.create(null));var i=e.call(this,t)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector=typeof n==`function`?n:void 0,i}return t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new p(e)):typeof e[s.iterator]==`function`?t.push(new f(e[s.iterator]())):t.push(new m(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),t===0)this.destination.complete();else{this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}}},t.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){var i=e[r];if(typeof i.hasValue==`function`&&!i.hasValue())return}for(var a=!1,o=[],r=0;r<t;r++){var i=e[r],s=i.next();if(i.hasCompleted()&&(a=!0),s.done){n.complete();return}o.push(s.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),a&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(o.Subscriber);e.ZipSubscriber=d;var f=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[s.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),m=function(e){r(t,e);function t(t,n,r){var i=e.call(this,t)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return t.prototype[s.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return e.length===0&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return c.innerSubscribe(this.observable,new c.SimpleInnerSubscriber(this))},t}(c.SimpleOuterSubscriber)})),Yt=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=G().Observable,e.ConnectableObservable=Se().ConnectableObservable,e.GroupedObservable=Ce().GroupedObservable,e.observable=he().observable,e.Subject=be().Subject,e.BehaviorSubject=we().BehaviorSubject,e.ReplaySubject=Ve().ReplaySubject,e.AsyncSubject=He().AsyncSubject;var t=Ke();e.asap=t.asap,e.asapScheduler=t.asapScheduler;var n=qe();e.async=n.async,e.asyncScheduler=n.asyncScheduler;var r=je();e.queue=r.queue,e.queueScheduler=r.queueScheduler;var i=Xe();e.animationFrame=i.animationFrame,e.animationFrameScheduler=i.animationFrameScheduler;var a=Ze();e.VirtualTimeScheduler=a.VirtualTimeScheduler,e.VirtualAction=a.VirtualAction,e.Scheduler=Oe().Scheduler,e.Subscription=U().Subscription,e.Subscriber=W().Subscriber;var o=ze();e.Notification=o.Notification,e.NotificationKind=o.NotificationKind,e.pipe=_e().pipe,e.noop=Qe().noop,e.identity=ge().identity,e.isObservable=$e().isObservable,e.ArgumentOutOfRangeError=et().ArgumentOutOfRangeError,e.EmptyError=tt().EmptyError,e.ObjectUnsubscribedError=ve().ObjectUnsubscribedError,e.UnsubscriptionError=de().UnsubscriptionError,e.TimeoutError=nt().TimeoutError,e.bindCallback=it().bindCallback,e.bindNodeCallback=at().bindNodeCallback,e.combineLatest=gt().combineLatest,e.concat=Ot().concat,e.defer=kt().defer,e.empty=Me().empty,e.forkJoin=At().forkJoin,e.from=Ct().from,e.fromEvent=jt().fromEvent,e.fromEventPattern=Mt().fromEventPattern,e.generate=Nt().generate,e.iif=Pt().iif,e.interval=It().interval,e.merge=Lt().merge,e.never=Rt().never,e.of=Le().of,e.onErrorResumeNext=zt().onErrorResumeNext,e.pairs=Bt().pairs,e.partition=Ut().partition,e.race=Wt().race,e.range=Gt().range,e.throwError=Re().throwError,e.timer=Kt().timer,e.using=qt().using,e.zip=Jt().zip,e.scheduled=St().scheduled,e.EMPTY=Me().EMPTY,e.NEVER=Rt().NEVER,e.config=se().config})),Xt=/* @__PURE__ */ e.t(((e,t)=>{t.exports=class{static get nonTTY(){return!0}render(){}end(){}}})),Zt=/* @__PURE__ */ e.t(((e,t)=>{var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),Qt=/* @__PURE__ */ e.t(((e,t)=>{let n=Zt(),r=process.platform,i={tick:`✔`,cross:`✖`,star:`★`,square:`▇`,squareSmall:`◻`,squareSmallFilled:`◼`,play:`▶`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,circleQuestionMark:`?⃝`,bullet:`●`,dot:`․`,line:`─`,ellipsis:`…`,pointer:`❯`,pointerSmall:`›`,info:`ℹ`,warning:`⚠`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,heart:`♥`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,questionMarkPrefix:`?⃝`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneSeventh:`⅐`,oneEighth:`⅛`,oneNinth:`⅑`,oneTenth:`⅒`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`},a={tick:`√`,cross:`×`,star:`*`,square:`█`,squareSmall:`[ ]`,squareSmallFilled:`[█]`,play:`►`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,circleQuestionMark:`(?)`,bullet:`*`,dot:`.`,line:`─`,ellipsis:`...`,pointer:`>`,pointerSmall:`»`,info:`i`,warning:`‼`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,heart:i.heart,arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,questionMarkPrefix:`?`,oneHalf:`1/2`,oneThird:`1/3`,oneQuarter:`1/4`,oneFifth:`1/5`,oneSixth:`1/6`,oneSeventh:`1/7`,oneEighth:`1/8`,oneNinth:`1/9`,oneTenth:`1/10`,twoThirds:`2/3`,twoFifths:`2/5`,threeQuarters:`3/4`,threeFifths:`3/5`,threeEighths:`3/8`,fourFifths:`4/5`,fiveSixths:`5/6`,fiveEighths:`5/8`,sevenEighths:`7/8`};r===`linux`&&(i.questionMarkPrefix=`?`);let o=r===`win32`?a:i;t.exports=Object.assign(e=>(o===i||Object.keys(i).forEach(t=>{i[t]!==o[t]&&(e=e.replace(new RegExp(n(i[t]),`g`),o[t]))}),e),o)})),$t=/* @__PURE__ */ e.t(((e,t)=>{t.exports=(e,t)=>{for(let n of Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e}})),en=/* @__PURE__ */ e.t(((e,t)=>{let n=$t();t.exports=(e,t)=>{if(t===!0)throw TypeError(`The second argument is now an options object`);if(typeof e!=`function`)throw TypeError(`Expected a function`);t||={};let r,i=!1,a=e.displayName||e.name||`<anonymous>`,o=function(){if(i){if(t.throw===!0)throw Error(`Function \`${a}\` can only be called once`);return r}return i=!0,r=e.apply(this,arguments),e=null,r};return n(o,e),o}})),tn=/* @__PURE__ */ e.t(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),nn=/* @__PURE__ */ e.t(((e,t)=>{var n=global.process;let r=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};
/* istanbul ignore if */
if(!r(n))t.exports=function(){return function(){}};else{var i=require("assert"),a=tn(),o=/^win/i.test(n.platform),s=require("events");
/* istanbul ignore if */
typeof s!=`function`&&(s=s.EventEmitter);var c;n.__signal_exit_emitter__?c=n.__signal_exit_emitter__:(c=n.__signal_exit_emitter__=new s,c.count=0,c.emitted={}),c.infinite||(c.setMaxListeners(1/0),c.infinite=!0),t.exports=function(e,t){
/* istanbul ignore if */
if(!r(global.process))return function(){};i.equal(typeof e,`function`,`a callback must be provided for exit handler`),f===!1&&p();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),c.on(n,e),function(){c.removeListener(n,e),c.listeners(`exit`).length===0&&c.listeners(`afterexit`).length===0&&l()}};var l=function(){f&&r(global.process)&&(f=!1,a.forEach(function(e){try{n.removeListener(e,d[e])}catch{}}),n.emit=g,n.reallyExit=m,--c.count)};t.exports.unload=l;var u=function(e,t,n){
/* istanbul ignore if */
c.emitted[e]||(c.emitted[e]=!0,c.emit(e,t,n))},d={};a.forEach(function(e){d[e]=function(){
/* istanbul ignore if */
r(global.process)&&n.listeners(e).length===c.count&&
/* istanbul ignore next */
(l(),u(`exit`,null,e),u(`afterexit`,null,e),o&&e===`SIGHUP`&&(e=`SIGINT`),n.kill(n.pid,e))}}),t.exports.signals=function(){return a};var f=!1,p=function(){!f&&r(global.process)&&(f=!0,c.count+=1,a=a.filter(function(e){try{return n.on(e,d[e]),!0}catch{return!1}}),n.emit=_,n.reallyExit=h)};t.exports.load=p;var m=n.reallyExit,h=function(e){
/* istanbul ignore if */
r(global.process)&&
/* istanbul ignore next */
(n.exitCode=e||/* istanbul ignore next */0,u(`exit`,n.exitCode,null),u(`afterexit`,n.exitCode,null),m.call(n,n.exitCode))},g=n.emit,_=function(e,t){if(e===`exit`&&r(global.process)){
/* istanbul ignore else */
t!==void 0&&(n.exitCode=t);var i=g.apply(this,arguments);
/* istanbul ignore next */
return u(`exit`,n.exitCode,null),u(`afterexit`,n.exitCode,null),i}return g.apply(this,arguments)}}})),rn=/* @__PURE__ */ e.t(((e,t)=>{let n=en(),r=nn();t.exports=n(()=>{r(()=>{process.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})})})),an=/* @__PURE__ */ e.t((e=>{let t=rn(),n=!1;e.show=e=>{let t=e||process.stderr;t.isTTY&&(n=!1,t.write(`\x1B[?25h`))},e.hide=e=>{let r=e||process.stderr;r.isTTY&&(t(),n=!0,r.write(`\x1B[?25l`))},e.toggle=(t,r)=>{t!==void 0&&(n=t),n?e.show(r):e.hide(r)}})),on=/* @__PURE__ */ e.t(((e,t)=>{t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})),sn=/* @__PURE__ */ e.t(((e,t)=>{var n=on(),r={};for(var i in n)n.hasOwnProperty(i)&&(r[n[i]]=i);var a=t.exports={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};for(var o in a)if(a.hasOwnProperty(o)){if(!(`channels`in a[o]))throw Error(`missing channels property: `+o);if(!(`labels`in a[o]))throw Error(`missing channel labels property: `+o);if(a[o].labels.length!==a[o].channels)throw Error(`channel and label counts mismatch: `+o);var s=a[o].channels,c=a[o].labels;delete a[o].channels,delete a[o].labels,Object.defineProperty(a[o],"channels",{value:s}),Object.defineProperty(a[o],"labels",{value:c})}a.rgb.hsl=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c,l;return a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360),l=(i+a)/2,c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},a.rgb.hsv=function(e){var t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};return u===0?i=a=0:(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[i*360,a*100,l*100]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]},a.rgb.cmyk=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i,a,o,s=Math.min(1-t,1-n,1-r);return i=(1-t-s)/(1-s)||0,a=(1-n-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,[i*100,a*100,o*100,s*100]};function l(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.keyword=function(e){var t=r[e];if(t)return t;var i=1/0,a;for(var o in n)if(n.hasOwnProperty(o)){var s=n[o],c=l(e,s);c<i&&(i=c,a=o)}return a},a.keyword.rgb=function(e){return n[e]},a.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;var i=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2],o,s,c;return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,o=116*r-16,s=500*(n-r),c=200*(r-i),[o,s,c]},a.hsl.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o,s,c;if(n===0)return c=r*255,[c,c,c];a=r<.5?r*(1+n):r+n-r*n,i=2*r-a,s=[0,0,0];for(var l=0;l<3;l++)o=t+1/3*-(l-1),o<0&&o++,o>1&&o--,c=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[l]=c*255;return s},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01),o,s;return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,s=(r+n)/2,o=r===0?2*i/(a+i):2*n/(r+n),[t,o*100,s*100]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o,s=(2-n)*r;return a=(2-n)*i,o=n*i,o/=a<=1?a:2-a,o||=0,s/=2,[t,o*100,s*100]},a.hwb.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a,o,s,c;i>1&&(n/=i,r/=i),a=Math.floor(6*t),o=1-r,s=6*t-a,a&1&&(s=1-s),c=n+s*(o-n);var l,u,d;switch(a){default:case 6:case 0:l=o,u=c,d=n;break;case 1:l=c,u=o,d=n;break;case 2:l=n,u=o,d=c;break;case 3:l=n,u=c,d=o;break;case 4:l=c,u=n,d=o;break;case 5:l=o,u=n,d=c}return[l*255,u*255,d*255]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},a.xyz.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057;return i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2],i,a,o;return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=116*n-16,a=500*(t-n),o=200*(n-r),[i,a,o]},a.lab.xyz=function(e){var t=e[0],n=e[1],r=e[2],i,a=(t+16)/116,o;i=n/500+a,o=a-r/200;var s=a**3,c=i**3,l=o**3;return a=s>.008856?s:(a-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},a.lab.lch=function(e){var t=e[0],n=e[1],r=e[2],i=Math.atan2(r,n)*360/2/Math.PI,a;return i<0&&(i+=360),a=Math.sqrt(n*n+r*r),[t,a,i]},a.lch.lab=function(e){var t=e[0],n=e[1],r=e[2],i,a,o=r/360*2*Math.PI;return i=n*Math.cos(o),a=n*Math.sin(o),[t,i,a]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return i===2&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var n=(~~(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=(e-232)*10+8;return[t,t,t]}e-=16;var n;return[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];t[0].length===3&&(n=n.split(``).map(function(e){return e+e}).join(``));var r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},a.rgb.hcg=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o+4;return c/=6,c%=1,[c*360,o*100,s*100]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return r=n<.5?2*t*n:2*t*(1-n),r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];var i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}})),cn=/* @__PURE__ */ e.t(((e,t)=>{var n=sn();function r(){for(var e={},t=Object.keys(n),r=t.length,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}function i(e){var t=r(),i=[e];for(t[e].distance=0;i.length;)for(var a=i.pop(),o=Object.keys(n[a]),s=o.length,c=0;c<s;c++){var l=o[c],u=t[l];u.distance===-1&&(u.distance=t[a].distance+1,u.parent=a,i.unshift(l))}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){for(var r=[t[e].parent,e],i=n[t[e].parent][e],o=t[e].parent;t[o].parent;)r.unshift(t[o].parent),i=a(n[t[o].parent][o],i),o=t[o].parent;return i.conversion=r,i}t.exports=function(e){for(var t=i(e),n={},r=Object.keys(t),a=r.length,s=0;s<a;s++){var c=r[s];t[c].parent!==null&&(n[c]=o(c,t))}return n}})),ln=/* @__PURE__ */ e.t(((e,t)=>{var n=sn(),r=cn(),i={},a=Object.keys(n);function o(e){var t=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function s(e){var t=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if(typeof n==`object`)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return`conversion`in e&&(t.conversion=e.conversion),t}a.forEach(function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});var t=r(e);Object.keys(t).forEach(function(n){var r=t[n];i[e][n]=s(r),i[e][n].raw=o(r)})}),t.exports=i})),un=/* @__PURE__ */ e.t(((e,t)=>{let n=ln(),r=(e,t)=>function(){return`\u001B[${e.apply(n,arguments)+t}m`},i=(e,t)=>function(){let r=e.apply(n,arguments);return`\u001B[${38+t};5;${r}m`},a=(e,t)=>function(){let r=e.apply(n,arguments);return`\u001B[${38+t};2;${r[0]};${r[1]};${r[2]}m`};function o(){let e=/* @__PURE__ */ new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.grey=t.color.gray;for(let n of Object.keys(t)){let r=t[n];for(let n of Object.keys(r)){let i=r[n];t[n]={open:`\u001B[${i[0]}m`,close:`\u001B[${i[1]}m`},r[n]=t[n],e.set(i[0],i[1])}Object.defineProperty(t,n,{value:r,enumerable:!1}),Object.defineProperty(t,"codes",{value:e,enumerable:!1})}let o=e=>e,s=(e,t,n)=>[e,t,n];t.color.close=`\x1B[39m`,t.bgColor.close=`\x1B[49m`,t.color.ansi={ansi:r(o,0)},t.color.ansi256={ansi256:i(o,0)},t.color.ansi16m={rgb:a(s,0)},t.bgColor.ansi={ansi:r(o,10)},t.bgColor.ansi256={ansi256:i(o,10)},t.bgColor.ansi16m={rgb:a(s,10)};for(let e of Object.keys(n)){if(typeof n[e]!=`object`)continue;let o=n[e];e===`ansi16`&&(e=`ansi`),`ansi16`in o&&(t.color.ansi[e]=r(o.ansi16,0),t.bgColor.ansi[e]=r(o.ansi16,10)),`ansi256`in o&&(t.color.ansi256[e]=i(o.ansi256,0),t.bgColor.ansi256[e]=i(o.ansi256,10)),`rgb`in o&&(t.color.ansi16m[e]=a(o.rgb,0),t.bgColor.ansi16m[e]=a(o.rgb,10))}return t}Object.defineProperty(t,"exports",{enumerable:!0,get:o})})),dn=/* @__PURE__ */ e.t(((e,t)=>{t.exports=(e,t)=>{t||=process.argv;let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),fn=/* @__PURE__ */ e.t(((e,t)=>{let n=require("os"),r=dn(),i=process.env,a;r(`no-color`)||r(`no-colors`)||r(`color=false`)?a=!1:(r(`color`)||r(`colors`)||r(`color=true`)||r(`color=always`))&&(a=!0),`FORCE_COLOR`in i&&(a=i.FORCE_COLOR.length===0||parseInt(i.FORCE_COLOR,10)!==0);function o(e){return e!==0&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(e){if(a===!1)return 0;if(r(`color=16m`)||r(`color=full`)||r(`color=truecolor`))return 3;if(r(`color=256`))return 2;if(e&&!e.isTTY&&a!==!0)return 0;let t=+!!a;if(process.platform===`win32`){let e=n.release().split(`.`);return Number(process.versions.node.split(`.`)[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in i)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`].some(e=>e in i)||i.CI_NAME===`codeship`?1:t;if(`TEAMCITY_VERSION`in i)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION);if(i.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in i){let e=parseInt((i.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(i.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||`COLORTERM`in i?1:(i.TERM,t)}function c(e){return o(s(e))}t.exports={supportsColor:c,stdout:c(process.stdout),stderr:c(process.stderr)}})),pn=/* @__PURE__ */ e.t(((e,t)=>{let n=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,i=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,a=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,o=/* @__PURE__ */ new Map([[`n`,`
`],[`r`,`\r`],[`t`,`	`],[`b`,`\b`],[`f`,`\f`],[`v`,`\v`],[`0`,`\0`],[`\\`,`\\`],[`e`,`\x1B`],[`a`,`\x07`]]);function s(e){return e[0]===`u`&&e.length===5||e[0]===`x`&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):o.get(e)||e}function c(e,t){let n=[],r=t.trim().split(/\s*,\s*/g),o;for(let t of r)if(!isNaN(t))n.push(Number(t));else if(o=t.match(i))n.push(o[2].replace(a,(e,t,n)=>t?s(t):n));else throw Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);return n}function l(e){r.lastIndex=0;let t=[],n;for(;(n=r.exec(e))!==null;){let e=n[1];if(n[2]){let r=c(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function u(e,t){let n={};for(let e of t)for(let t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(let e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw Error(`Unknown Chalk style: ${e}`);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}t.exports=(e,t)=>{let r=[],i=[],a=[];if(t.replace(n,(t,n,o,c,d,f)=>{if(n)a.push(s(n));else if(c){let t=a.join(``);a=[],i.push(r.length===0?t:u(e,r)(t)),r.push({inverse:o,styles:l(c)})}else if(d){if(r.length===0)throw Error(`Found extraneous } in Chalk template literal`);i.push(u(e,r)(a.join(``))),a=[],r.pop()}else a.push(f)}),i.push(a.join(``)),r.length>0){let e=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?``:`s`} (\`}\`)`;throw Error(e)}return i.join(``)}})),mn=/* @__PURE__ */ e.t(((e,t)=>{let n=Zt(),r=un(),i=fn().stdout,a=pn(),o=process.platform===`win32`&&!(process.env.TERM||``).toLowerCase().startsWith(`xterm`),s=[`ansi`,`ansi`,`ansi256`,`ansi16m`],c=/* @__PURE__ */ new Set([`gray`]),l=Object.create(null);function u(e,t){t||={};let n=i?i.level:0;e.level=t.level===void 0?n:t.level,e.enabled=`enabled`in t?t.enabled:e.level>0}function d(e){if(!this||!(this instanceof d)||this.template){let t={};return u(t,e),t.template=function(){let e=[].slice.call(arguments);return h.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,d.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=d,t.template}u(this,e)}o&&(r.blue.open=`\x1B[94m`);for(let e of Object.keys(r))r[e].closeRe=new RegExp(n(r[e].close),`g`),l[e]={get(){let t=r[e];return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};l.visible={get(){return p.call(this,this._styles||[],!0,`visible`)}},r.color.closeRe=new RegExp(n(r.color.close),`g`);for(let e of Object.keys(r.color.ansi))c.has(e)||(l[e]={get(){let t=this.level;return function(){let n={open:r.color[s[t]][e].apply(null,arguments),close:r.color.close,closeRe:r.color.closeRe};return p.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}});r.bgColor.closeRe=new RegExp(n(r.bgColor.close),`g`);for(let e of Object.keys(r.bgColor.ansi)){if(c.has(e))continue;let t=`bg`+e[0].toUpperCase()+e.slice(1);l[t]={get(){let t=this.level;return function(){let n={open:r.bgColor[s[t]][e].apply(null,arguments),close:r.bgColor.close,closeRe:r.bgColor.closeRe};return p.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}}}let f=Object.defineProperties(()=>{},l);function p(e,t,n){let r=function(){return m.apply(r,arguments)};r._styles=e,r._empty=t;let i=this;return Object.defineProperty(r,"level",{enumerable:!0,get(){return i.level},set(e){i.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get(){return i.enabled},set(e){i.enabled=e}}),r.hasGrey=this.hasGrey||n===`gray`||n===`grey`,r.__proto__=f,r}function m(){let e=arguments,t=e.length,n=String(arguments[0]);if(t===0)return``;if(t>1)for(let r=1;r<t;r++)n+=` `+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?``:n;let i=r.dim.open;o&&this.hasGrey&&(r.dim.open=``);for(let e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return r.dim.open=i,n}function h(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(` `);let n=[].slice.call(arguments,2),r=[t.raw[0]];for(let e=1;e<t.length;e++)r.push(String(n[e-1]).replace(/[{}\\]/g,`\\$&`)),r.push(String(t.raw[e]));return a(e,r.join(``))}Object.defineProperties(d.prototype,l),t.exports=d(),t.exports.supportsColor=i,t.exports.default=t.exports})),hn=/* @__PURE__ */ e.t(((e,t)=>{var n=6e4;t.exports=function(e){var t=new Date(e.getTime()),r=t.getTimezoneOffset();t.setSeconds(0,0);var i=t.getTime()%n;return r*n+i}})),gn=/* @__PURE__ */ e.t(((e,t)=>{function n(e){return e instanceof Date}t.exports=n})),_n=/* @__PURE__ */ e.t(((e,t)=>{var n=hn(),r=gn(),i=36e5,a=6e4,o=2,s=/[T ]/,c=/:/,l=/^(\d{2})$/,u=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],d=/^(\d{4})/,f=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],p=/^-(\d{2})$/,m=/^-?(\d{3})$/,h=/^-?(\d{2})-?(\d{2})$/,g=/^-?W(\d{2})$/,_=/^-?W(\d{2})-?(\d{1})$/,v=/^(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,b=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,x=/([Z+-].*)$/,S=/^(Z)$/,C=/^([+-])(\d{2})$/,w=/^([+-])(\d{2}):?(\d{2})$/;function T(e,t){if(r(e))return new Date(e.getTime());if(typeof e!=`string`)return new Date(e);var i=(t||{}).additionalDigits;i=i==null?o:Number(i);var s=E(e),c=D(s.date,i),l=c.year,u=c.restDateString,d=O(u,l);if(d){var f=d.getTime(),p=0,m;if(s.time&&(p=k(s.time)),s.timezone)m=A(s.timezone)*a;else{var h=f+p,g=new Date(h);m=n(g);var _=new Date(h);_.setDate(g.getDate()+1);var v=n(_)-n(g);v>0&&(m+=v)}return new Date(f+p+m)}return new Date(e)}function E(e){var t={},n=e.split(s),r;if(c.test(n[0])?(t.date=null,r=n[0]):(t.date=n[0],r=n[1]),r){var i=x.exec(r);i?(t.time=r.replace(i[1],``),t.timezone=i[1]):t.time=r}return t}function D(e,t){var n=u[t],r=f[t],i=d.exec(e)||r.exec(e);if(i){var a=i[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(i=l.exec(e)||n.exec(e),i){var o=i[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}return{year:null}}function O(e,t){if(t===null)return null;var n,r,i,a;if(e.length===0)return r=/* @__PURE__ */ new Date(0),r.setUTCFullYear(t),r;if(n=p.exec(e),n)return r=/* @__PURE__ */ new Date(0),i=parseInt(n[1],10)-1,r.setUTCFullYear(t,i),r;if(n=m.exec(e),n){r=/* @__PURE__ */ new Date(0);var o=parseInt(n[1],10);return r.setUTCFullYear(t,0,o),r}if(n=h.exec(e),n){r=/* @__PURE__ */ new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return r.setUTCFullYear(t,i,s),r}if(n=g.exec(e),n)return a=parseInt(n[1],10)-1,j(t,a);if(n=_.exec(e),n){a=parseInt(n[1],10)-1;var c=parseInt(n[2],10)-1;return j(t,a,c)}return null}function k(e){var t=v.exec(e),n,r;if(t)return n=parseFloat(t[1].replace(`,`,`.`)),n%24*i;if(t=y.exec(e),t)return n=parseInt(t[1],10),r=parseFloat(t[2].replace(`,`,`.`)),n%24*i+r*a;if(t=b.exec(e),t){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(`,`,`.`));return n%24*i+r*a+o*1e3}return null}function A(e){var t=S.exec(e),n;return t?0:(t=C.exec(e),t?(n=parseInt(t[2],10)*60,t[1]===`+`?-n:n):(t=w.exec(e),t?(n=parseInt(t[2],10)*60+parseInt(t[3],10),t[1]===`+`?-n:n):0))}function j(e,t,n){t||=0,n||=0;var r=/* @__PURE__ */ new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,a=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}t.exports=T})),vn=/* @__PURE__ */ e.t(((e,t)=>{var n=_n();function r(e){var t=n(e),r=/* @__PURE__ */ new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}t.exports=r})),yn=/* @__PURE__ */ e.t(((e,t)=>{var n=_n();function r(e){var t=n(e);return t.setHours(0,0,0,0),t}t.exports=r})),bn=/* @__PURE__ */ e.t(((e,t)=>{var n=yn(),r=6e4,i=864e5;function a(e,t){var a=n(e),o=n(t),s=a.getTime()-a.getTimezoneOffset()*r,c=o.getTime()-o.getTimezoneOffset()*r;return Math.round((s-c)/i)}t.exports=a})),xn=/* @__PURE__ */ e.t(((e,t)=>{var n=_n(),r=vn(),i=bn();function a(e){var t=n(e);return i(t,r(t))+1}t.exports=a})),Sn=/* @__PURE__ */ e.t(((e,t)=>{var n=_n();function r(e,t){var r=t&&Number(t.weekStartsOn)||0,i=n(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}t.exports=r})),Cn=/* @__PURE__ */ e.t(((e,t)=>{var n=Sn();function r(e){return n(e,{weekStartsOn:1})}t.exports=r})),wn=/* @__PURE__ */ e.t(((e,t)=>{var n=_n(),r=Cn();function i(e){var t=n(e),i=t.getFullYear(),a=/* @__PURE__ */ new Date(0);a.setFullYear(i+1,0,4),a.setHours(0,0,0,0);var o=r(a),s=/* @__PURE__ */ new Date(0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);var c=r(s);return t.getTime()>=o.getTime()?i+1:t.getTime()>=c.getTime()?i:i-1}t.exports=i})),Tn=/* @__PURE__ */ e.t(((e,t)=>{var n=wn(),r=Cn();function i(e){var t=n(e),i=/* @__PURE__ */ new Date(0);return i.setFullYear(t,0,4),i.setHours(0,0,0,0),r(i)}t.exports=i})),En=/* @__PURE__ */ e.t(((e,t)=>{var n=_n(),r=Cn(),i=Tn(),a=6048e5;function o(e){var t=n(e),o=r(t).getTime()-i(t).getTime();return Math.round(o/a)+1}t.exports=o})),Dn=/* @__PURE__ */ e.t(((e,t)=>{var n=gn();function r(e){if(n(e))return!isNaN(e);throw TypeError(toString.call(e)+` is not an instance of Date`)}t.exports=r})),On=/* @__PURE__ */ e.t(((e,t)=>{function n(){var e={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}};function t(t,n,r){r||={};var i=typeof e[t]==`string`?e[t]:n===1?e[t].one:e[t].other.replace(`{{count}}`,n);return r.addSuffix?r.comparison>0?`in `+i:i+` ago`:i}return{localize:t}}t.exports=n})),kn=/* @__PURE__ */ e.t(((e,t)=>{var n=/* @__PURE__ */ `M.MM.Q.D.DD.DDD.DDDD.d.E.W.WW.YY.YYYY.GG.GGGG.H.HH.h.hh.m.mm.s.ss.S.SS.SSS.Z.ZZ.X.x`.split(`.`);function r(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);var i=n.concat(t).sort().reverse();return RegExp(`(\\[[^\\[]*\\])|(\\\\)?(`+i.join(`|`)+`|.)`,`g`)}t.exports=r})),An=/* @__PURE__ */ e.t(((e,t)=>{var n=kn();function r(){var e=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],t=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],r=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],a=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],o=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],s=[`AM`,`PM`],c=[`am`,`pm`],l=[`a.m.`,`p.m.`],u={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return r[e.getDay()]},ddd:function(e){return a[e.getDay()]},dddd:function(e){return o[e.getDay()]},A:function(e){return e.getHours()/12>=1?s[1]:s[0]},a:function(e){return e.getHours()/12>=1?c[1]:c[0]},aa:function(e){return e.getHours()/12>=1?l[1]:l[0]}};return[`M`,`D`,`DDD`,`d`,`Q`,`W`].forEach(function(e){u[e+`o`]=function(t,n){return i(n[e](t))}}),{formatters:u,formattingTokensRegExp:n(u)}}function i(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+`st`;case 2:return e+`nd`;case 3:return e+`rd`}return e+`th`}t.exports=r})),jn=/* @__PURE__ */ e.t(((e,t)=>{var n=On(),r=An();t.exports={distanceInWords:n(),format:r()}})),Mn=/* @__PURE__ */ e.t(((e,t)=>{var n=xn(),r=En(),i=wn(),a=_n(),o=Dn(),s=jn();function c(e,t,n){var r=t?String(t):`YYYY-MM-DDTHH:mm:ss.SSSZ`,i=(n||{}).locale,c=s.format.formatters,l=s.format.formattingTokensRegExp;i&&i.format&&i.format.formatters&&(c=i.format.formatters,i.format.formattingTokensRegExp&&(l=i.format.formattingTokensRegExp));var d=a(e);return o(d)?u(r,c,l)(d):`Invalid Date`}var l={M:function(e){return e.getMonth()+1},MM:function(e){return p(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return p(e.getDate(),2)},DDD:function(e){return n(e)},DDDD:function(e){return p(n(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return r(e)},WW:function(e){return p(r(e),2)},YY:function(e){return p(e.getFullYear(),4).substr(2)},YYYY:function(e){return p(e.getFullYear(),4)},GG:function(e){return String(i(e)).substr(2)},GGGG:function(e){return i(e)},H:function(e){return e.getHours()},HH:function(e){return p(e.getHours(),2)},h:function(e){var t=e.getHours();return t===0?12:t>12?t%12:t},hh:function(e){return p(l.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return p(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return p(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return p(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return p(e.getMilliseconds(),3)},Z:function(e){return f(e.getTimezoneOffset(),`:`)},ZZ:function(e){return f(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function u(e,t,n){for(var r=e.match(n),i=r.length,a=0,o;a<i;a++)o=t[r[a]]||l[r[a]],o?r[a]=o:r[a]=d(r[a]);return function(e){for(var t=``,n=0;n<i;n++)r[n]instanceof Function?t+=r[n](e,l):t+=r[n];return t}}function d(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,``):e.replace(/\\/g,``)}function f(e,t){t||=``;var n=e>0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=r%60;return n+p(i,2)+t+p(a,2)}function p(e,t){for(var n=Math.abs(e).toString();n.length<t;)n=`0`+n;return n}t.exports=c})),Nn=/* @__PURE__ */ e.t((e=>{let t=mn(),n=Mn();e.log=(e,r)=>{if(e.dateFormat===!1){console.log(r);return}let i=n(/* @__PURE__ */ new Date,e.dateFormat);console.log(t.dim(`[${i}]`)+` ${r}`)}})),Pn=/* @__PURE__ */ e.t(((e,t)=>{let n=Qt(),r=an(),i=Nn(),a=(e,t,r)=>{let a=i.log.bind(void 0,r);if(t.type===`STATE`){let t=e.isPending()?`started`:e.state;a(`${e.title} [${t}]`),e.isSkipped()&&e.output&&a(`${n.arrowRight} ${e.output}`)}else t.type===`DATA`?a(`${n.arrowRight} ${t.data}`):t.type===`TITLE`&&a(`${e.title} [title changed]`)},o=(e,t)=>{for(let n of e)n.subscribe(e=>{e.type===`SUBTASKS`?o(n.subtasks,t):a(n,e,t)},e=>{console.log(e)})};t.exports=class{constructor(e,t){this._tasks=e,this._options=Object.assign({dateFormat:`HH:mm:ss`},t)}static get nonTTY(){return!0}render(){r.hide(),o(this._tasks,this._options)}end(){r.show()}}})),Fn=/* @__PURE__ */ e.t(((e,t)=>{let n=t.exports,r=process.env.TERM_PROGRAM===`Apple_Terminal`;n.cursorTo=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");return typeof t==`number`?`\x1B[`+(t+1)+`;`+(e+1)+`H`:`\x1B[`+(e+1)+`G`},n.cursorMove=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");let n=``;return e<0?n+=`\x1B[`+-e+`D`:e>0&&(n+=`\x1B[`+e+`C`),t<0?n+=`\x1B[`+-t+`A`:t>0&&(n+=`\x1B[`+t+`B`),n},n.cursorUp=e=>`\x1B[`+(typeof e==`number`?e:1)+`A`,n.cursorDown=e=>`\x1B[`+(typeof e==`number`?e:1)+`B`,n.cursorForward=e=>`\x1B[`+(typeof e==`number`?e:1)+`C`,n.cursorBackward=e=>`\x1B[`+(typeof e==`number`?e:1)+`D`,n.cursorLeft=`\x1B[G`,n.cursorSavePosition=`\x1B[`+(r?`7`:`s`),n.cursorRestorePosition=`\x1B[`+(r?`8`:`u`),n.cursorGetPosition=`\x1B[6n`,n.cursorNextLine=`\x1B[E`,n.cursorPrevLine=`\x1B[F`,n.cursorHide=`\x1B[?25l`,n.cursorShow=`\x1B[?25h`,n.eraseLines=e=>{let t=``;for(let r=0;r<e;r++)t+=n.eraseLine+(r<e-1?n.cursorUp():``);return e&&(t+=n.cursorLeft),t},n.eraseEndLine=`\x1B[K`,n.eraseStartLine=`\x1B[1K`,n.eraseLine=`\x1B[2K`,n.eraseDown=`\x1B[J`,n.eraseUp=`\x1B[1J`,n.eraseScreen=`\x1B[2J`,n.scrollUp=`\x1B[S`,n.scrollDown=`\x1B[T`,n.clearScreen=`\x1Bc`,n.clearTerminal=process.platform===`win32`?`${n.eraseScreen}`:`${n.eraseScreen}`,n.beep=`\x07`,n.link=(e,t)=>[`\x1B]`,`8`,`;`,`;`,t,`\x07`,e,`\x1B]`,`8`,`;`,`;`,`\x07`].join(``),n.image=(e,t)=>{t||={};let n=`\x1B]1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(n+=`;preserveAspectRatio=0`),n+`:`+e.toString(`base64`)+`\x07`},n.iTerm={},n.iTerm.setCwd=e=>`\x1B]50;CurrentDir=`+(e||process.cwd())+`\x07`})),In=/* @__PURE__ */ e.t(((e,t)=>{t.exports=()=>/* @__PURE__ */ RegExp(`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[a-zA-Z\\d]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))`,`g`)})),Ln=/* @__PURE__ */ e.t(((e,t)=>{let n=In();t.exports=e=>typeof e==`string`?e.replace(n(),``):e})),Rn=/* @__PURE__ */ e.t(((e,t)=>{t.exports=e=>!Number.isNaN(e)&&e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)})),zn=/* @__PURE__ */ e.t(((e,t)=>{let n=Ln(),r=Rn();t.exports=e=>{if(typeof e!=`string`||e.length===0)return 0;e=n(e);let t=0;for(let n=0;n<e.length;n++){let i=e.codePointAt(n);i<=31||i>=127&&i<=159||i>=768&&i<=879||(i>65535&&n++,t+=r(i)?2:1)}return t}})),Bn=/* @__PURE__ */ e.t(((e,t)=>{let n=zn(),r=Ln(),i=/* @__PURE__ */ new Set([`\x1B`,`›`]),a=/* @__PURE__ */ new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[90,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49]]),o=e=>`${i.values().next().value}[${e}m`,s=e=>e.split(` `).map(e=>n(e)),c=(e,t,a)=>{let o=Array.from(t),s=!1,c=n(r(e[e.length-1]));for(let t of o.entries()){let r=t[0],l=t[1],u=n(l);if(c+u<=a?e[e.length-1]+=l:(e.push(l),c=0),i.has(l))s=!0;else if(s&&l===`m`){s=!1;continue}s||(c+=u,c===a&&r<o.length-1&&(e.push(``),c=0))}!c&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},l=(e,t,r)=>{let l=r||{};if(e.trim()===``)return l.trim===!1?e:e.trim();let u=``,d=``,f,p=s(e),m=e.split(` `),h=[``];for(let e of Array.from(m).entries()){let r=e[0],i=e[1];h[h.length-1]=l.trim===!1?h[h.length-1]:h[h.length-1].trim();let a=n(h[h.length-1]);if((a||i===``)&&(a===t&&l.wordWrap===!1&&(h.push(``),a=0),h[h.length-1]+=` `,a++),p[r]>t&&l.hard)a&&h.push(``),c(h,i,t);else{if(a+p[r]>t&&a>0){if(l.wordWrap===!1&&a<t){c(h,i,t);continue}h.push(``)}a+p[r]>t&&l.wordWrap===!1?c(h,i,t):h[h.length-1]+=i}}u=h.map(e=>l.trim===!1?e:e.trim()).join(`
`);for(let e of Array.from(u).entries()){let t=e[0],n=e[1];if(d+=n,i.has(n)){let e=parseFloat(/\d[^m]*/.exec(u.slice(t,t+4)));f=e===39?null:e}let r=a.get(Number(f));f&&r&&(u[t+1]===`
`?d+=o(r):n===`
`&&(d+=o(f)))}return d};t.exports=(e,t,n)=>String(e).normalize().split(`
`).map(e=>l(e,t,n)).join(`
`)})),Vn=/* @__PURE__ */ e.t(((e,t)=>{let n=Fn(),r=an(),i=Bn(),a=e=>{let t=e.columns;return t?process.platform===`win32`?t-1:t:80},o=(e,t)=>{t=Object.assign({showCursor:!1},t);let o=0,s=function(){t.showCursor||r.hide();let s=[].join.call(arguments,` `)+`
`;s=i(s,a(e),{trim:!1,hard:!0,wordWrap:!1}),e.write(n.eraseLines(o)+s),o=s.split(`
`).length};return s.clear=()=>{e.write(n.eraseLines(o)),o=0},s.done=()=>{o=0,t.showCursor||r.show()},s};t.exports=o(process.stdout),t.exports.stderr=o(process.stderr),t.exports.create=o})),Hn=/* @__PURE__ */ e.t(((e,t)=>{function n(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var n=e[t];Object.keys(n).forEach(function(t){var r=n[t];e[t]=n[t]={open:`\x1B[`+r[0]+`m`,close:`\x1B[`+r[1]+`m`}}),Object.defineProperty(e,t,{value:n,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:n})})),Un=/* @__PURE__ */ e.t(((e,t)=>{t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}})),Wn=/* @__PURE__ */ e.t(((e,t)=>{var n=Un()();t.exports=function(e){return typeof e==`string`?e.replace(n,``):e}})),Gn=/* @__PURE__ */ e.t(((e,t)=>{t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}})),Kn=/* @__PURE__ */ e.t(((e,t)=>{var n=Gn(),r=new RegExp(n().source);t.exports=r.test.bind(r)})),qn=/* @__PURE__ */ e.t(((e,t)=>{var n=process.argv,r=n.indexOf(`--`),i=function(e){e=`--`+e;var t=n.indexOf(e);return t!==-1&&(r===-1||t<r)};t.exports=(function(){return`FORCE_COLOR`in process.env?!0:i(`no-color`)||i(`no-colors`)||i(`color=false`)?!1:i(`color`)||i(`colors`)||i(`color=true`)||i(`color=always`)?!0:process.stdout&&!process.stdout.isTTY?!1:process.platform===`win32`||`COLORTERM`in process.env||process.env.TERM!==`dumb`&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)})()})),Jn=/* @__PURE__ */ e.t(((e,t)=>{var n=Zt(),r=Hn(),i=Wn(),a=Kn(),o=qn(),s=Object.defineProperties,c=process.platform===`win32`&&!/^xterm/i.test(process.env.TERM);function l(e){this.enabled=!e||e.enabled===void 0?o:e.enabled}c&&(r.blue.open=`\x1B[94m`);var u=(function(){var e={};return Object.keys(r).forEach(function(t){r[t].closeRe=new RegExp(n(r[t].close),`g`),e[t]={get:function(){return f.call(this,this._styles.concat(t))}}}),e})(),d=s(function(){},u);function f(e){var t=function(){return p.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=d,t}function p(){var e=arguments,t=e.length,n=t!==0&&String(arguments[0]);if(t>1)for(var i=1;i<t;i++)n+=` `+e[i];if(!this.enabled||!n)return n;var a=this._styles,o=a.length,s=r.dim.open;for(c&&(a.indexOf(`gray`)!==-1||a.indexOf(`grey`)!==-1)&&(r.dim.open=``);o--;){var l=r[a[o]];n=l.open+n.replace(l.closeRe,l.open)+l.close}return r.dim.open=s,n}function m(){var e={};return Object.keys(u).forEach(function(t){e[t]={get:function(){return f.call(this,[t])}}}),e}s(l.prototype,m()),t.exports=new l,t.exports.styles=r,t.exports.hasColor=a,t.exports.stripColor=i,t.exports.supportsColor=o})),Yn=/* @__PURE__ */ e.t(((e,t)=>{
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=/* @__PURE__ */ new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),Xn=/* @__PURE__ */ e.t(((e,t)=>{var n=Yn(),r=Zt(),i=process.platform,a={tick:`✔`,cross:`✖`,star:`★`,square:`▇`,squareSmall:`◻`,squareSmallFilled:`◼`,play:`▶`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,circleQuestionMark:`?⃝`,bullet:`●`,dot:`․`,line:`─`,ellipsis:`…`,pointer:`❯`,pointerSmall:`›`,info:`ℹ`,warning:`⚠`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,heart:`♥`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,questionMarkPrefix:`?⃝`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneSeventh:`⅐`,oneEighth:`⅛`,oneNinth:`⅑`,oneTenth:`⅒`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`},o={tick:`√`,cross:`×`,star:`*`,square:`█`,squareSmall:`[ ]`,squareSmallFilled:`[█]`,play:`►`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,circleQuestionMark:`(?)`,bullet:`*`,dot:`.`,line:`─`,ellipsis:`...`,pointer:`>`,pointerSmall:`»`,info:`i`,warning:`‼`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,heart:a.heart,arrowUp:a.arrowUp,arrowDown:a.arrowDown,arrowLeft:a.arrowLeft,arrowRight:a.arrowRight,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,questionMarkPrefix:`?`,oneHalf:`1/2`,oneThird:`1/3`,oneQuarter:`1/4`,oneFifth:`1/5`,oneSixth:`1/6`,oneSeventh:`1/7`,oneEighth:`1/8`,oneNinth:`1/9`,oneTenth:`1/10`,twoThirds:`2/3`,twoFifths:`2/5`,threeQuarters:`3/4`,threeFifths:`3/5`,threeEighths:`3/8`,fourFifths:`4/5`,fiveSixths:`5/6`,fiveEighths:`5/8`,sevenEighths:`7/8`};i===`linux`&&(a.questionMarkPrefix=`?`);var s=i===`win32`?o:a;t.exports=n(function(e){return s===a||Object.keys(a).forEach(function(t){a[t]!==s[t]&&(e=e.replace(new RegExp(r(a[t]),`g`),s[t]))}),e},s)})),Zn=/* @__PURE__ */ e.t(((e,t)=>{t.exports=(e,t,n)=>{let r=typeof n==`object`?Object.assign({indent:` `},n):{indent:n||` `};if(t=t===void 0?1:t,typeof e!=`string`)throw TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!=`number`)throw TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!=`string`)throw TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let i=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(i,r.indent.repeat(t))}})),Qn=/* @__PURE__ */ e.t(((e,t)=>{var n=[`\x1B`,`›`],r=39,i={0:0,1:22,2:22,3:23,4:24,7:27,8:28,9:29,30:39,31:39,32:39,33:39,34:39,35:39,36:39,37:39,90:39,40:49,41:49,42:49,43:49,44:49,45:49,46:49,47:49};function a(e){return n[0]+`[`+e+`m`}t.exports=function(e,t,o){o||=e.length;for(var s=!1,c,l=0,u=``,d=0;d<e.length;d++){var f=!1,p=e[d];if(n.indexOf(p)!==-1){s=!0;var m=/[0-9][^m]*/.exec(e.slice(d,d+4));c=m===r?null:m}else s&&p===`m`&&(s=!1,f=!0);if(!s&&!f&&++l,l>t&&l<=o)u+=p;else if(l===t&&c!==void 0&&c!==r)u+=a(c);else if(l>=o){c!==void 0&&(u+=a(i[c]||r));break}}return u}})),$n=/* @__PURE__ */ e.t(((e,t)=>{t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}})),er=/* @__PURE__ */ e.t(((e,t)=>{var n=$n()();t.exports=function(e){return typeof e==`string`?e.replace(n,``):e}})),tr=/* @__PURE__ */ e.t(((e,t)=>{t.exports=function(e,t){if(e==null)throw TypeError();e=String(e);var n=e.length,r=t?Number(t):0;if(Number.isNaN(r)&&(r=0),!(r<0||r>=n)){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var a=e.charCodeAt(r+1);if(a>=56320&&a<=57343)return(i-55296)*1024+a-56320+65536}return i}}})),nr=/* @__PURE__ */ e.t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),rr=/* @__PURE__ */ e.t(((e,t)=>{var n=nr();t.exports=function(e){return!n(e)&&e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)}})),ir=/* @__PURE__ */ e.t(((e,t)=>{var n=er(),r=tr(),i=rr();t.exports=function(e){if(typeof e!=`string`||e.length===0)return 0;var t=0;e=n(e);for(var a=0;a<e.length;a++){var o=r(e,a);o<=31||o>=127&&o<=159||(o>=65536&&a++,i(o)?t+=2:t++)}return t}})),ar=/* @__PURE__ */ e.t(((e,t)=>{var n=Qn(),r=ir();t.exports=function(e,t,i){i||={};var a=i.position||`end`,o=`…`;if(typeof e!=`string`)throw TypeError("Expected `input` to be a string, got "+typeof e);if(typeof t!=`number`)throw TypeError("Expected `columns` to be a number, got "+typeof t);if(t<1)return``;if(t===1)return o;var s=r(e);if(s<=t)return e;if(a===`start`)return o+n(e,s-t+1,s);if(a===`middle`){var c=Math.floor(t/2);return n(e,0,c)+o+n(e,s-(t-c)+1,s)}if(a===`end`)return n(e,0,t-1)+o;throw Error("Expected `options.position` to be either `start`, `middle` or `end`, got "+a)}})),or=/* @__PURE__ */ e.t(((e,t)=>{var n=Jn(),r={info:n.blue(`ℹ`),success:n.green(`✔`),warning:n.yellow(`⚠`),error:n.red(`✖`)},i={info:n.blue(`i`),success:n.green(`√`),warning:n.yellow(`‼`),error:n.red(`×`)};t.exports=process.platform===`win32`?i:r})),sr=/* @__PURE__ */ e.t(((e,t)=>{var n=process.platform===`win32`?[`-`,`\\`,`|`,`/`]:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];t.exports=function(){var e=0;return function(){return n[e=++e%n.length]}},t.exports.frames=n})),cr=/* @__PURE__ */ e.t((e=>{let t=Jn(),n=or(),r=Xn(),i=sr(),a=t.yellow(r.pointer),o=t.yellow(r.arrowDown);e.isDefined=e=>e!=null,e.getSymbol=(e,r)=>(e.spinner||=i(),e.isPending()?r.showSubtasks!==!1&&e.subtasks.length>0?a:t.yellow(e.spinner()):e.isCompleted()?n.success:e.hasFailed()?e.subtasks.length>0?a:n.error:e.isSkipped()?o:` `)})),lr=/* @__PURE__ */ e.t(((e,t)=>{let n=Vn(),r=Jn(),i=Xn(),a=Zn(),o=ar(),s=Wn(),c=cr(),l=(e,t,n)=>{n||=0;let u=[];for(let d of e)if(d.isEnabled()){let e=d.isSkipped()?` ${r.dim(`[skipped]`)}`:``;if(u.push(a(` ${c.getSymbol(d,t)} ${d.title}${e}`,n,`  `)),(d.isPending()||d.isSkipped()||d.hasFailed())&&c.isDefined(d.output)){let e=d.output;if(typeof e==`string`&&(e=s(e.trim().split(`
`).filter(Boolean).pop()),e===``&&(e=void 0)),c.isDefined(e)){let t=a(`${i.arrowRight} ${e}`,n,`  `);u.push(`   ${r.gray(o(t,process.stdout.columns-3))}`)}}(d.isPending()||d.hasFailed()||t.collapse===!1)&&(d.hasFailed()||t.showSubtasks!==!1)&&d.subtasks.length>0&&(u=u.concat(l(d.subtasks,t,n+1)))}return u.join(`
`)},u=(e,t)=>{n(l(e,t))};t.exports=class{constructor(e,t){this._tasks=e,this._options=Object.assign({showSubtasks:!0,collapse:!0,clearOutput:!1},t)}render(){this._id||=setInterval(()=>{u(this._tasks,this._options)},100)}end(e){this._id&&=(clearInterval(this._id),void 0),u(this._tasks,this._options),this._options.clearOutput&&e===void 0?n.clear():n.done()}}})),ur=/* @__PURE__ */ e.t((e=>{let t={silent:Xt(),verbose:Pn(),default:lr()},n=e=>process.stdout.isTTY===!0||e.nonTTY===!0,r=e=>typeof e==`string`?t[e]||t.default:typeof e==`function`?e:t.default;e.getRenderer=(e,i)=>{let a=r(e);return n(a)||(a=r(i),a&&n(a)||(a=t.verbose)),a}})),dr=/* @__PURE__ */ e.t(((e,t)=>{let n={PENDING:0,COMPLETED:1,FAILED:2,SKIPPED:3};n.toString=e=>{switch(e){case n.PENDING:return`pending`;case n.COMPLETED:return`completed`;case n.FAILED:return`failed`;case n.SKIPPED:return`skipped`;default:return`unknown`}},t.exports=n})),fr=/* @__PURE__ */ e.t(((e,t)=>{var n=t.exports=function(e){return typeof e==`object`&&!!e&&typeof e.pipe==`function`};n.writable=function(e){return n(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`},n.readable=function(e){return n(e)&&e.readable!==!1&&typeof e._read==`function`&&typeof e._readableState==`object`},n.duplex=function(e){return n.writable(e)&&n.readable(e)},n.transform=function(e){return n.duplex(e)&&typeof e._transform==`function`&&typeof e._transformState==`object`}})),pr=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t,n=e.Symbol;return typeof n==`function`?n.observable?t=n.observable:(t=n(`observable`),n.observable=t):t=`@@observable`,t}})),mr=/* @__PURE__ */ e.t(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=r(pr());function r(e){return e&&e.__esModule?e:{default:e}}var i=typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:t===void 0?Function(`return this`)():t;e.default=(0,n.default)(i)})),hr=/* @__PURE__ */ e.t(((e,t)=>{let n=mr().default;t.exports=e=>!!(e&&e[n]&&e===e[n]())})),gr=/* @__PURE__ */ e.t((e=>{let t=fr(),n=typeof Symbol==`function`&&Symbol.observable||`@@observable`,r=e=>!!(e&&e[n]&&e===e[n]())||hr()(e);e.isListr=e=>!!(e&&e.setRenderer&&e.add&&e.run),e.isObservable=e=>r(e),e.isStream=e=>t(e)&&!r(e)})),_r=/* @__PURE__ */ e.t(((e,t)=>{t.exports=class extends Error{constructor(e){super(e),this.name=`ListrError`}}})),vr=/* @__PURE__ */ e.t(((e,t)=>{let n=V(),r=ae(),i=Yt().Subject,a=ur(),o=dr(),s=gr(),c=_r(),l=()=>!1;t.exports=class extends i{constructor(e,t,n){if(super(),!t)throw TypeError(`Expected a task`);if(typeof t.title!=`string`)throw TypeError(`Expected property \`title\` to be of type \`string\`, got \`${typeof t.title}\``);if(typeof t.task!=`function`)throw TypeError(`Expected property \`task\` to be of type \`function\`, got \`${typeof t.task}\``);if(t.skip&&typeof t.skip!=`function`)throw TypeError(`Expected property \`skip\` to be of type \`function\`, got \`${typeof t.skip}\``);if(t.enabled&&typeof t.enabled!=`function`)throw TypeError(`Expected property \`enabled\` to be of type \`function\`, got \`${typeof t.enabled}\``);this._listr=e,this._options=n||{},this._subtasks=[],this._enabledFn=t.enabled,this._isEnabled=!0,this.output=void 0,this.title=t.title,this.skip=t.skip||l,this.task=t.task}get subtasks(){return this._subtasks}set state(e){this._state=e,this.next({type:`STATE`})}get state(){return o.toString(this._state)}check(e){if(this._state===void 0&&this._enabledFn){let t=this._enabledFn(e);this._isEnabled!==t&&(this._isEnabled=t,this.next({type:`ENABLED`,data:t}))}}hasSubtasks(){return this._subtasks.length>0}isPending(){return this._state===o.PENDING}isSkipped(){return this._state===o.SKIPPED}isCompleted(){return this._state===o.COMPLETED}isEnabled(){return this._isEnabled}hasFailed(){return this._state===o.FAILED}run(e,t){let i=t=>s.isListr(t)?(t._options=Object.assign(this._options,t._options),t.exitOnError=t._options.exitOnError,t.setRenderer(a.getRenderer(`silent`)),this._subtasks=t.tasks,this.next({type:`SUBTASKS`}),t.run(e)):(s.isStream(t)&&(t=r(t)),s.isObservable(t)&&(t=new Promise((e,n)=>{t.subscribe({next:e=>{this.output=e,this.next({type:`DATA`,data:e})},error:n,complete:e})})),n(t)?t.then(i):t);return Promise.resolve().then(()=>(this.state=o.PENDING,this.skip(e))).then(n=>{if(n)typeof n==`string`&&(this.output=n),this.state=o.SKIPPED;else return i(this.task(e,t))}).then(()=>{this.isPending()&&(this.state=o.COMPLETED)}).catch(e=>{if(this.state=o.FAILED,e instanceof c)t.report(e);else if(this.hasSubtasks()||(this.output=e.message),this.next({type:`DATA`,data:e.message}),t.report(e),this._listr.exitOnError!==!1)throw e}).then(()=>{this.complete()})}}})),yr=/* @__PURE__ */ e.t(((e,t)=>{let n=dr(),r=_r();t.exports=class{constructor(e,t){this._task=e,this._errors=t}set title(e){this._task.title=e,this._task.next({type:`TITLE`,data:e})}set output(e){this._task.output=e,this._task.next({type:`DATA`,data:e})}get title(){return this._task.title}report(e){if(e instanceof r)for(let t of e.errors)this._errors.push(t);else this._errors.push(e)}skip(e){if(e&&typeof e!=`string`)throw TypeError(`Expected \`message\` to be of type \`string\`, got \`${typeof e}\``);e&&(this._task.output=e),this._task.state=n.SKIPPED}run(e){return this._task.run(e,this)}}})),br=/* @__PURE__ */ e.t(((e,t)=>{let n=B(),r=vr(),i=yr(),a=ur(),o=_r(),s=(e,t,n)=>e.isEnabled()?new i(e,n).run(t):Promise.resolve();t.exports=class{constructor(e,t){if(e&&!Array.isArray(e)&&typeof e==`object`){if(typeof e.title==`string`&&typeof e.task==`function`)throw TypeError(`Expected an array of tasks or an options object, got a task object`);t=e,e=[]}if(e&&!Array.isArray(e))throw TypeError(`Expected an array of tasks`);this._options=Object.assign({showSubtasks:!0,concurrent:!1,renderer:`default`,nonTTYRenderer:`verbose`},t),this._tasks=[],this.concurrency=1,this._options.concurrent===!0?this.concurrency=1/0:typeof this._options.concurrent==`number`&&(this.concurrency=this._options.concurrent),this._RendererClass=a.getRenderer(this._options.renderer,this._options.nonTTYRenderer),this.exitOnError=this._options.exitOnError,this.add(e||[])}_checkAll(e){for(let t of this._tasks)t.check(e)}get tasks(){return this._tasks}setRenderer(e){this._RendererClass=a.getRenderer(e)}add(e){let t=Array.isArray(e)?e:[e];for(let e of t)this._tasks.push(new r(this,e,this._options));return this}render(){return this._renderer||=new this._RendererClass(this._tasks,this._options),this._renderer.render()}run(e){this.render(),e||=Object.create(null);let t=[];return this._checkAll(e),n(this._tasks,n=>(this._checkAll(e),s(n,e,t)),{concurrency:this.concurrency}).then(()=>{if(t.length>0){let e=new o(`Something went wrong`);throw e.errors=t,e}return this._renderer.end(),e}).catch(t=>{throw t.context=e,this._renderer.end(t),t})}}}));const K=[];for(let e=0;e<256;++e)K.push((e+256).toString(16).slice(1));function xr(e,t=0){return(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+`-`+K[e[t+4]]+K[e[t+5]]+`-`+K[e[t+6]]+K[e[t+7]]+`-`+K[e[t+8]]+K[e[t+9]]+`-`+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase()}const Sr=/* @__PURE__ */ new Uint8Array(16);function Cr(){return crypto.getRandomValues(Sr)}function wr(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Tr(e,t,n)}function Tr(e,t,n){e||={};let r=e.random??e.rng?.()??Cr();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return xr(r)}var Er=/* @__PURE__ */ e.a(br()),Dr=/* @__PURE__ */ e.a(n.kt()),Or=class{constructor(e,t,r){if(!t)throw Error("Option `endpoint` required.");this.endpoint=t,this.client=new n.Et(e,r),this.headers={"Content-Type":`application/json`}}setAuthorization(e){this.headers.Authorization=`Bearer ${e}`}async runQuery(e,t,{endpoint:n=this.endpoint,headers:r={},retries:i=2}={}){return(0,Dr.default)(async a=>{let{data:o,errors:s}=await this.client.fetch(n,{body:JSON.stringify({query:e,variables:t}),headers:{...this.headers,...r},method:`post`},{retries:i}).then(e=>e.json()).catch(a);if(!s)return o;if(!Array.isArray(s))return a(s);this.client.log.debug({errors:s},`GraphQL errors`);for(let e of s){if(e.extensions&&e.extensions.code===`RETRYABLE_ERROR_CODE`)throw e;e.name=e.name||`GraphQLError`}return a({...s[0],errors:s})},{retries:i})}};async function kr(e,t){return e.http=new n.Et(e),e.client=new Or(e,`${e.env.CHROMATIC_INDEX_URL}/graphql`,{headers:{"x-chromatic-session-id":e.sessionId,"x-chromatic-cli-version":e.pkg.version,"apollographql-client-name":`chromatic-cli`,"apollographql-client-version":e.pkg.version},retries:3}),e.configuration=await r.t(t),e.configuration.gitTimeout&&e.configuration.gitTimeout!==20&&e.log.debug(`git timeout was set to ${e.configuration.gitTimeout}, which is different than the default 20 seconds`),e}var Ar={detect({env:e}){return!!e.APPVEYOR},configuration({env:e}){let t=e.APPVEYOR_PULL_REQUEST_NUMBER,n=!!t;return{name:`Appveyor`,service:`appveyor`,commit:e.APPVEYOR_REPO_COMMIT,tag:e.APPVEYOR_REPO_TAG_NAME,build:e.APPVEYOR_BUILD_NUMBER,buildUrl:`https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/${e.APPVEYOR_BUILD_VERSION}`,branch:e.APPVEYOR_REPO_BRANCH,job:e.APPVEYOR_JOB_NUMBER,jobUrl:`https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/job/${e.APPVEYOR_JOB_ID}`,pr:t,isPr:n,prBranch:e.APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH,slug:e.APPVEYOR_REPO_NAME,root:e.APPVEYOR_BUILD_FOLDER}}};function jr(e){return(/\d+(?!.*\d+)/.exec(e)||[])[0]}function Mr(e){return e?/^(?:refs\/heads\/)?(?<branch>.+)$/i.exec(e)[1]:void 0}var Nr={detect({env:e}){return!!e.BUILD_BUILDURI},configuration({env:e}){let t=e.SYSTEM_PULLREQUEST_PULLREQUESTID,n=!!t;return{name:`Azure Pipelines`,service:`azurePipelines`,commit:e.BUILD_SOURCEVERSION,build:e.BUILD_BUILDNUMBER,branch:Mr(n?e.SYSTEM_PULLREQUEST_TARGETBRANCH:e.BUILD_SOURCEBRANCH),pr:t,isPr:n,prBranch:Mr(n?e.SYSTEM_PULLREQUEST_SOURCEBRANCH:void 0),root:e.BUILD_REPOSITORY_LOCALPATH}}},Pr={detect({env:e}){return!!e.bamboo_agentId},configuration({env:e}){return{name:`Bamboo`,service:`bamboo`,commit:e.bamboo_planRepository_1_revision,build:e.bamboo_buildNumber,buildUrl:e.bamboo_buildResultsUrl,branch:e.bamboo_planRepository_1_branchName,job:e.bamboo_buildKey,root:e.bamboo_build_working_directory}}},Fr={detect({env:e}){return!!e.BITBUCKET_BUILD_NUMBER},configuration({env:e}){return{name:`Bitbucket Pipelines`,service:`bitbucket`,commit:e.BITBUCKET_COMMIT,tag:e.BITBUCKET_TAG,build:e.BITBUCKET_BUILD_NUMBER,buildUrl:`https://bitbucket.org/${e.BITBUCKET_REPO_FULL_NAME}/addon/pipelines/home#!/results/${e.BITBUCKET_BUILD_NUMBER}`,branch:e.BITBUCKET_BRANCH,slug:e.BITBUCKET_REPO_FULL_NAME,root:e.BITBUCKET_CLONE_DIR}}},Ir={detect({env:e}){return!!e.BITRISE_IO},configuration({env:e}){let t=e.BITRISE_PULL_REQUEST===`false`?void 0:e.BITRISE_PULL_REQUEST,n=!!t;return{name:`Bitrise`,service:`bitrise`,commit:e.BITRISE_GIT_COMMIT,tag:e.BITRISE_GIT_TAG,build:e.BITRISE_BUILD_NUMBER,buildUrl:e.BITRISE_BUILD_URL,branch:n?e.BITRISEIO_GIT_BRANCH_DEST:e.BITRISE_GIT_BRANCH,pr:t,isPr:n,prBranch:n?e.BITRISE_GIT_BRANCH:void 0,slug:e.BITRISE_APP_SLUG}}},Lr={detect({env:e}){return!!e.BUDDY_WORKSPACE_ID},configuration({env:e}){let t=jr(e.BUDDY_EXECUTION_PULL_REQUEST_ID),n=!!t;return{name:`Buddy`,service:`buddy`,commit:e.BUDDY_EXECUTION_REVISION,tag:e.BUDDY_EXECUTION_TAG,build:e.BUDDY_EXECUTION_ID,buildUrl:e.BUDDY_EXECUTION_URL,branch:n?e.BUDDY_EXECUTION_PULL_REQUEST_HEAD_BRANCH:e.BUDDY_EXECUTION_BRANCH,pr:t,isPr:n,slug:e.BUDDY_REPO_SLUG}}},Rr=/* @__PURE__ */ e.t(((e,t)=>{t.exports=a,a.sync=o;var n=require("fs");function r(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function i(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:r(t,n)}function a(e,t,r){n.stat(e,function(n,a){r(n,!n&&i(a,e,t))})}function o(e,t){return i(n.statSync(e),e,t)}})),zr=/* @__PURE__ */ e.t(((e,t)=>{t.exports=r,r.sync=i;var n=require("fs");function r(e,t,r){n.stat(e,function(e,n){r(e,!e&&a(n,t))})}function i(e,t){return a(n.statSync(e),t)}function a(e,t){return e.isFile()&&o(e,t)}function o(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),Br=/* @__PURE__ */ e.t(((e,t)=>{require("fs");var n=process.platform===`win32`||global.TESTING_WINDOWS?Rr():zr();t.exports=r,r.sync=i;function r(e,t,i){if(typeof t==`function`&&(i=t,t={}),!i){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,i){r(e,t||{},function(e,t){e?i(e):n(t)})})}n(e,t||{},function(e,n){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,n=!1),i(e,n)})}function i(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),Vr=/* @__PURE__ */ e.t(((e,t)=>{let n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=require("path"),i=n?`;`:`:`,a=Br(),o=e=>Object.assign(/* @__PURE__ */ Error(`not found: ${e}`),{code:`ENOENT`}),s=(e,t)=>{let r=t.colon||i,a=e.match(/\//)||n&&e.match(/\\/)?[``]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||
/* istanbul ignore next: very unusual */``).split(r)],o=n?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=n?o.split(r):[``];return n&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:a,pathExt:s,pathExtExe:o}},c=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:i,pathExt:c,pathExtExe:l}=s(e,t),u=[],d=n=>new Promise((a,s)=>{if(n===i.length)return t.all&&u.length?a(u):s(o(e));let c=i[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=r.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;a(f(p,n,0))}),f=(e,n,r)=>new Promise((i,o)=>{if(r===c.length)return i(d(n+1));let s=c[r];a(e+s,{pathExt:l},(a,o)=>{if(!a&&o){if(t.all)u.push(e+s);else return i(e+s)}return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};t.exports=c,c.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:i,pathExtExe:c}=s(e,t),l=[];for(let o=0;o<n.length;o++){let s=n[o],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<i.length;e++){let n=f+i[e];try{if(a.sync(n,{pathExt:c})){if(t.all)l.push(n);else return n}}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw o(e)}})),Hr=/* @__PURE__ */ e.t(((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),Ur=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=Vr(),i=Hr();function a(e,t){let a=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=r.sync(e.command,{path:a[i({env:a})],pathExt:t?n.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=n.resolve(s?e.options.cwd:``,l),l}function o(e){return a(e)||a(e,!0)}t.exports=o})),Wr=/* @__PURE__ */ e.t(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),Gr=/* @__PURE__ */ e.t(((e,t)=>{t.exports=/^#!(.*)/})),Kr=/* @__PURE__ */ e.t(((e,t)=>{let n=Gr();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),qr=/* @__PURE__ */ e.t(((e,t)=>{let n=require("fs"),r=Kr();function i(e){let t=Buffer.alloc(150),i;try{i=n.openSync(e,`r`),n.readSync(i,t,0,150,0),n.closeSync(i)}catch{}return r(t.toString())}t.exports=i})),Jr=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=Ur(),i=Wr(),a=qr(),o=process.platform===`win32`,s=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(e){e.file=r(e);let t=e.file&&a(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}function u(e){if(!o)return e;let t=l(e),r=!s.test(t);if(e.options.forceShell||r){let r=c.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map(e=>i.argument(e,r)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function d(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}t.exports=d})),Yr=/* @__PURE__ */ e.t(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(/* @__PURE__ */ Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),Xr=/* @__PURE__ */ e.t(((e,t)=>{let n=require("child_process"),r=Jr(),i=Yr();function a(e,t,a){let o=r(e,t,a),s=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(s,o),s}function o(e,t,a){let o=r(e,t,a),s=n.spawnSync(o.command,o.args,o.options);return s.error=s.error||i.verifyENOENTSync(s.status,o),s}t.exports=a,t.exports.spawn=a,t.exports.sync=o,t.exports._parse=r,t.exports._enoent=i})),Zr=/* @__PURE__ */ e.a(Xr(),1);function Qr(e){let t=typeof e==`string`?`
`:10,n=typeof e==`string`?`\r`:13;return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}function $r(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`}const ei=({cwd:e=M.default.cwd(),path:t=M.default.env[$r()],preferLocal:n=!0,execPath:r=M.default.execPath,addExecPath:i=!0}={})=>{let a=e instanceof URL?(0,N.fileURLToPath)(e):e,o=A.default.resolve(a),s=[];return n&&ti(s,o),i&&ni(s,r,o),[...s,t].join(A.default.delimiter)},ti=(e,t)=>{let n;for(;n!==t;)e.push(A.default.join(t,`node_modules/.bin`)),n=t,t=A.default.resolve(t,`..`)},ni=(e,t,n)=>{let r=t instanceof URL?(0,N.fileURLToPath)(t):t;e.push(A.default.resolve(n,r,`..`))},ri=({env:e=M.default.env,...t}={})=>{e={...e};let n=$r({env:e});return t.path=e[n],e[n]=ei(t),e},ii=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);(ai(i,a)||!r)&&Object.defineProperty(e,n,a)},ai=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},oi=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},si=(e,t)=>`/* Wrapped ${e}*/\n${t}`,ci=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),li=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),ui=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=si.bind(null,r,t.toString());Object.defineProperty(i,"name",li),Object.defineProperty(e,"toString",{...ci,value:i})};function di(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))ii(e,t,r,n);return oi(e,t),ui(e,t,r),e}const fi=/* @__PURE__ */ new WeakMap,pi=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let n,r=0,i=e.displayName||e.name||`<anonymous>`,a=function(...o){if(fi.set(a,++r),r===1)n=e.apply(this,o),e=null;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return n};return di(a,e),fi.set(a,r),a};pi.callCount=e=>{if(!fi.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return fi.get(e)};const mi=()=>{let e=64-gi+1;return Array.from({length:e},hi)},hi=(e,t)=>({name:`SIGRT${t+1}`,number:gi+t,action:`terminate`,description:`Application-specific signal (realtime)`,standard:`posix`}),gi=34,_i=[{name:`SIGHUP`,number:1,action:`terminate`,description:`Terminal closed`,standard:`posix`},{name:`SIGINT`,number:2,action:`terminate`,description:`User interruption with CTRL-C`,standard:`ansi`},{name:`SIGQUIT`,number:3,action:`core`,description:`User interruption with CTRL-\\`,standard:`posix`},{name:`SIGILL`,number:4,action:`core`,description:`Invalid machine instruction`,standard:`ansi`},{name:`SIGTRAP`,number:5,action:`core`,description:`Debugger breakpoint`,standard:`posix`},{name:`SIGABRT`,number:6,action:`core`,description:`Aborted`,standard:`ansi`},{name:`SIGIOT`,number:6,action:`core`,description:`Aborted`,standard:`bsd`},{name:`SIGBUS`,number:7,action:`core`,description:`Bus error due to misaligned, non-existing address or paging error`,standard:`bsd`},{name:`SIGEMT`,number:7,action:`terminate`,description:`Command should be emulated but is not implemented`,standard:`other`},{name:`SIGFPE`,number:8,action:`core`,description:`Floating point arithmetic error`,standard:`ansi`},{name:`SIGKILL`,number:9,action:`terminate`,description:`Forced termination`,standard:`posix`,forced:!0},{name:`SIGUSR1`,number:10,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGSEGV`,number:11,action:`core`,description:`Segmentation fault`,standard:`ansi`},{name:`SIGUSR2`,number:12,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGPIPE`,number:13,action:`terminate`,description:`Broken pipe or socket`,standard:`posix`},{name:`SIGALRM`,number:14,action:`terminate`,description:`Timeout or timer`,standard:`posix`},{name:`SIGTERM`,number:15,action:`terminate`,description:`Termination`,standard:`ansi`},{name:`SIGSTKFLT`,number:16,action:`terminate`,description:`Stack is empty or overflowed`,standard:`other`},{name:`SIGCHLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`posix`},{name:`SIGCLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`other`},{name:`SIGCONT`,number:18,action:`unpause`,description:`Unpaused`,standard:`posix`,forced:!0},{name:`SIGSTOP`,number:19,action:`pause`,description:`Paused`,standard:`posix`,forced:!0},{name:`SIGTSTP`,number:20,action:`pause`,description:`Paused using CTRL-Z or "suspend"`,standard:`posix`},{name:`SIGTTIN`,number:21,action:`pause`,description:`Background process cannot read terminal input`,standard:`posix`},{name:`SIGBREAK`,number:21,action:`terminate`,description:`User interruption with CTRL-BREAK`,standard:`other`},{name:`SIGTTOU`,number:22,action:`pause`,description:`Background process cannot write to terminal output`,standard:`posix`},{name:`SIGURG`,number:23,action:`ignore`,description:`Socket received out-of-band data`,standard:`bsd`},{name:`SIGXCPU`,number:24,action:`core`,description:`Process timed out`,standard:`bsd`},{name:`SIGXFSZ`,number:25,action:`core`,description:`File too big`,standard:`bsd`},{name:`SIGVTALRM`,number:26,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGPROF`,number:27,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGWINCH`,number:28,action:`ignore`,description:`Terminal window size changed`,standard:`bsd`},{name:`SIGIO`,number:29,action:`terminate`,description:`I/O is available`,standard:`other`},{name:`SIGPOLL`,number:29,action:`terminate`,description:`Watched event`,standard:`other`},{name:`SIGINFO`,number:29,action:`ignore`,description:`Request for process information`,standard:`other`},{name:`SIGPWR`,number:30,action:`terminate`,description:`Device running out of power`,standard:`systemv`},{name:`SIGSYS`,number:31,action:`core`,description:`Invalid system call`,standard:`other`},{name:`SIGUNUSED`,number:31,action:`terminate`,description:`Invalid system call`,standard:`other`}],vi=()=>{let e=mi();return[..._i,...e].map(yi)},yi=({name:e,number:t,description:n,action:r,forced:i=!1,standard:a})=>{let{signals:{[e]:o}}=O.constants,s=o!==void 0;return{name:e,number:s?o:t,description:n,supported:s,action:r,forced:i,standard:a}},bi=()=>{let e=vi();return Object.fromEntries(e.map(xi))},xi=({name:e,number:t,description:n,supported:r,action:i,forced:a,standard:o})=>[e,{name:e,number:t,description:n,supported:r,action:i,forced:a,standard:o}],Si=bi(),Ci=()=>{let e=vi(),t=Array.from({length:65},(t,n)=>wi(n,e));return Object.assign({},...t)},wi=(e,t)=>{let n=Ti(e,t);if(n===void 0)return{};let{name:r,description:i,supported:a,action:o,forced:s,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:a,action:o,forced:s,standard:c}}},Ti=(e,t)=>{let n=t.find(({name:t})=>O.constants.signals[t]===e);return n===void 0?t.find(t=>t.number===e):n};Ci();const Ei=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:a,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?`was canceled`:n===void 0?r===void 0?a===void 0?`failed`:`failed with exit code ${a}`:`was killed with ${r} (${i})`:`failed with ${n}`,Di=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:a,command:o,escapedCommand:s,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d,cwd:f=M.default.cwd()}}})=>{a=a===null?void 0:a,i=i===null?void 0:i;let p=i===void 0?void 0:Si[i].description,m=r&&r.code,h=`Command ${Ei({timedOut:c,timeout:d,errorCode:m,signal:i,signalDescription:p,exitCode:a,isCanceled:l})}: ${o}`,g=Object.prototype.toString.call(r)===`[object Error]`,_=g?`${h}\n${r.message}`:h,v=[_,t,e].filter(Boolean).join(`
`);return g?(r.originalMessage=r.message,r.message=v):r=Error(v),r.shortMessage=_,r.command=o,r.escapedCommand=s,r.exitCode=a,r.signal=i,r.signalDescription=p,r.stdout=e,r.stderr=t,r.cwd=f,n!==void 0&&(r.all=n),`bufferedData`in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=l,r.killed=u&&!c,r},Oi=[`stdin`,`stdout`,`stderr`],ki=e=>Oi.some(t=>e[t]!==void 0),Ai=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return Oi.map(t=>e[t]);if(ki(e))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${Oi.map(e=>`\`${e}\``).join(`, `)}`);if(typeof t==`string`)return t;if(!Array.isArray(t))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,Oi.length);return Array.from({length:n},(e,n)=>t[n])},ji=[];ji.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&ji.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&ji.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const Mi=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,Ni=Symbol.for(`signal-exit emitter`),Pi=globalThis,Fi=Object.defineProperty.bind(Object);var Ii=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Pi[Ni])return Pi[Ni];Fi(Pi,Ni,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);
/* c8 ignore start */
r!==-1&&
/* c8 ignore stop */
(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},Li=class{};const Ri=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var zi=class extends Li{onExit(){return()=>{}}load(){}unload(){}},Bi=class extends Li{
/* c8 ignore start */
#e=Vi.platform===`win32`?`SIGINT`:`SIGHUP`;
/* c8 ignore stop */
#t=new Ii;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of ji)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;
/* c8 ignore stop */
if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){
/* c8 ignore start */
if(!Mi(this.#n))return()=>{};
/* c8 ignore stop */
this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of ji)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,ji.forEach(e=>{let t=this.#a[e];
/* c8 ignore start */
if(!t)throw Error(`Listener not defined for signal: `+e);
/* c8 ignore stop */
try{this.#n.removeListener(e,t)}catch{}
/* c8 ignore stop */
}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return Mi(this.#n)?
/* c8 ignore stop */
(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&Mi(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);
/* c8 ignore start */
let r=n.call(this.#n,e,...t);
/* c8 ignore stop */
return this.#t.emit(`exit`,this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}};const Vi=globalThis.process,{onExit:Hi,load:Ui,unload:Wi}=Ri(Mi(Vi)?new Bi(Vi):new zi),Gi=(e,t=`SIGTERM`,n={})=>{let r=e(t);return Ki(e,t,n,r),r},Ki=(e,t,n,r)=>{if(!qi(t,n,r))return;let i=Yi(n),a=setTimeout(()=>{e(`SIGKILL`)},i);
// istanbul ignore else
a.unref&&a.unref()},qi=(e,{forceKillAfterTimeout:t},n)=>Ji(e)&&t!==!1&&n,Ji=e=>e===O.default.constants.signals.SIGTERM||typeof e==`string`&&e.toUpperCase()===`SIGTERM`,Yi=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Xi=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Zi=(e,t,n)=>{e.kill(t),n(Object.assign(/* @__PURE__ */ Error(`Timed out`),{timedOut:!0,signal:t}))},Qi=(e,{timeout:t,killSignal:n=`SIGTERM`},r)=>{if(t===0||t===void 0)return r;let i,a=new Promise((r,a)=>{i=setTimeout(()=>{Zi(e,n,a)},t)}),o=r.finally(()=>{clearTimeout(i)});return Promise.race([a,o])},$i=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},ea=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=Hi(()=>{e.kill()});return r.finally(()=>{i()})};function ta(e){return typeof e==`object`&&!!e&&typeof e.pipe==`function`}function na(e){return ta(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`}const ra=e=>e instanceof E.ChildProcess&&typeof e.then==`function`,ia=(e,t,n)=>{if(typeof n==`string`)return e[t].pipe((0,D.createWriteStream)(n)),e;if(na(n))return e[t].pipe(n),e;if(!ra(n))throw TypeError(`The second argument must be a string, a stream or an Execa child process.`);if(!na(n.stdin))throw TypeError(`The target child process's stdin must be available.`);return e[t].pipe(n.stdin),n},aa=e=>{e.stdout!==null&&(e.pipeStdout=ia.bind(void 0,e,`stdout`)),e.stderr!==null&&(e.pipeStderr=ia.bind(void 0,e,`stderr`)),e.all!==void 0&&(e.pipeAll=ia.bind(void 0,e,`all`))},oa=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:i,addChunk:a,getFinalChunk:o,finalize:s},{maxBuffer:c=1/0}={})=>{if(!ua(e))throw Error(`The first argument must be a Readable, a ReadableStream, or an async iterable.`);let l=t();l.length=0;try{for await(let t of e){let e=n[da(t)](t,l);ca({convertedChunk:e,state:l,getSize:r,truncateChunk:i,addChunk:a,maxBuffer:c})}return sa({state:l,convertChunk:n,getSize:r,truncateChunk:i,addChunk:a,getFinalChunk:o,maxBuffer:c}),s(l)}catch(e){throw e.bufferedData=s(l),e}},sa=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:i,maxBuffer:a})=>{let o=i(e);o!==void 0&&ca({convertedChunk:o,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:a})},ca=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:i,maxBuffer:a})=>{let o=n(e),s=t.length+o;if(s<=a){la(e,t,i,s);return}let c=r(e,a-t.length);throw c!==void 0&&la(c,t,i,a),new pa},la=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},ua=e=>typeof e==`object`&&!!e&&typeof e[Symbol.asyncIterator]==`function`,da=e=>{let t=typeof e;if(t===`string`)return`string`;if(t!==`object`||e===null)return`others`;if(globalThis.Buffer?.isBuffer(e))return`buffer`;let n=fa.call(e);return n===`[object ArrayBuffer]`?`arrayBuffer`:n===`[object DataView]`?`dataView`:Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&fa.call(e.buffer)===`[object ArrayBuffer]`?`typedArray`:`others`},{toString:fa}=Object.prototype;var pa=class extends Error{name=`MaxBufferError`;constructor(){super(`maxBuffer exceeded`)}};const ma=e=>e,ha=()=>void 0,ga=({contents:e})=>e,_a=e=>{throw Error(`Streams in object mode are not supported: ${String(e)}`)},va=e=>e.length;async function ya(e,t){return oa(e,Na,t)}const ba=()=>({contents:/* @__PURE__ */ new ArrayBuffer(0)}),xa=e=>Sa.encode(e),Sa=new TextEncoder,Ca=e=>new Uint8Array(e),wa=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Ta=(e,t)=>e.slice(0,t),Ea=(e,{contents:t,length:n},r)=>{let i=Ma()?Oa(t,r):Da(t,r);return new Uint8Array(i).set(e,n),i},Da=(e,t)=>{if(t<=e.byteLength)return e;let n=new ArrayBuffer(ka(t));return new Uint8Array(n).set(new Uint8Array(e),0),n},Oa=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let n=new ArrayBuffer(t,{maxByteLength:ka(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n},ka=e=>Aa**Math.ceil(Math.log(e)/Math.log(Aa)),Aa=2,ja=({contents:e,length:t})=>Ma()?e:e.slice(0,t),Ma=()=>`resize`in ArrayBuffer.prototype,Na={init:ba,convertChunk:{string:xa,buffer:Ca,arrayBuffer:Ca,dataView:wa,typedArray:wa,others:_a},getSize:va,truncateChunk:Ta,addChunk:Ea,getFinalChunk:ha,finalize:ja};async function Pa(e,t){if(!(`Buffer`in globalThis))throw Error(`getStreamAsBuffer() is only supported in Node.js`);try{return Fa(await ya(e,t))}catch(e){throw e.bufferedData!==void 0&&(e.bufferedData=Fa(e.bufferedData)),e}}const Fa=e=>globalThis.Buffer.from(e);async function Ia(e,t){return oa(e,za,t)}const La=()=>({contents:``,textDecoder:new TextDecoder}),Ra=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),za={init:La,convertChunk:{string:ma,buffer:Ra,arrayBuffer:Ra,dataView:Ra,typedArray:Ra,others:_a},getSize:va,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{let t=e.decode();return t===``?void 0:t},finalize:ga};var Ba=/* @__PURE__ */ e.t(((e,t)=>{let{PassThrough:n}=require("stream");t.exports=function(){var e=[],t=new n({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=i,t.on(`unpipe`,a),Array.prototype.slice.call(arguments).forEach(r),t;function r(n){return Array.isArray(n)?(n.forEach(r),this):(e.push(n),n.once(`end`,a.bind(null,n)),n.once(`error`,t.emit.bind(t,`error`)),n.pipe(t,{end:!1}),this)}function i(){return e.length==0}function a(n){e=e.filter(function(e){return e!==n}),!e.length&&t.readable&&t.end()}}})),Va=/* @__PURE__ */ e.a(Ba(),1);const Ha=e=>{if(e!==void 0)throw TypeError("The `input` and `inputFile` options cannot be both set.")},Ua=({input:e,inputFile:t})=>typeof t==`string`?(Ha(e),(0,D.readFileSync)(t)):e,Wa=e=>{let t=Ua(e);if(ta(t))throw TypeError("The `input` option cannot be a stream in sync mode");return t},Ga=({input:e,inputFile:t})=>typeof t==`string`?(Ha(e),(0,D.createReadStream)(t)):e,Ka=(e,t)=>{let n=Ga(t);n!==void 0&&(ta(n)?n.pipe(e.stdin):e.stdin.end(n))},qa=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,Va.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},Ja=async(e,t)=>{if(e&&t!==void 0){await(0,I.setTimeout)(0),e.destroy();try{return await t}catch(e){return e.bufferedData}}},Ya=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t===`utf8`||t===`utf-8`?Ia(e,{maxBuffer:r}):t===null||t===`buffer`?Pa(e,{maxBuffer:r}):Xa(e,r,t)},Xa=async(e,t,n)=>(await Pa(e,{maxBuffer:t})).toString(n),Za=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:a},o)=>{let s=Ya(e,{encoding:r,buffer:i,maxBuffer:a}),c=Ya(t,{encoding:r,buffer:i,maxBuffer:a}),l=Ya(n,{encoding:r,buffer:i,maxBuffer:a*2});try{return await Promise.all([o,s,c,l])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},Ja(e,s),Ja(t,c),Ja(n,l)])}},Qa=(async()=>{})().constructor.prototype,$a=[`then`,`catch`,`finally`].map(e=>[e,Reflect.getOwnPropertyDescriptor(Qa,e)]),eo=(e,t)=>{for(let[n,r]of $a){let i=typeof t==`function`?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}},to=e=>new Promise((t,n)=>{e.on(`exit`,(e,n)=>{t({exitCode:e,signal:n})}),e.on(`error`,e=>{n(e)}),e.stdin&&e.stdin.on(`error`,e=>{n(e)})}),no=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],ro=/^[\w.-]+$/,io=e=>typeof e!=`string`||ro.test(e)?e:`"${e.replaceAll(`"`,`\\"`)}"`,ao=(e,t)=>no(e,t).join(` `),oo=(e,t)=>no(e,t).map(e=>io(e)).join(` `),so=/ +/g,co=e=>{let t=typeof e;if(t===`string`)return e;if(t===`number`)return String(e);if(t===`object`&&e!==null&&!(e instanceof E.ChildProcess)&&`stdout`in e){let t=typeof e.stdout;if(t===`string`)return e.stdout;if(F.Buffer.isBuffer(e.stdout))return e.stdout.toString();throw TypeError(`Unexpected "${t}" stdout in template expression`)}throw TypeError(`Unexpected "${t}" in template expression`)},lo=(e,t,n)=>n||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],uo=({templates:e,expressions:t,tokens:n,index:r,template:i})=>{let a=i??e.raw[r],o=a.split(so).filter(Boolean),s=lo(n,o,a.startsWith(` `));if(r===t.length)return s;let c=t[r],l=Array.isArray(c)?c.map(e=>co(e)):[co(c)];return lo(s,l,a.endsWith(` `))},fo=(e,t)=>{let n=[];for(let[r,i]of e.entries())n=uo({templates:e,expressions:t,tokens:n,index:r,template:i});return n},po=(0,T.debuglog)(`execa`).enabled,mo=(e,t)=>String(e).padStart(t,`0`),ho=()=>{let e=/* @__PURE__ */ new Date;return`${mo(e.getHours(),2)}:${mo(e.getMinutes(),2)}:${mo(e.getSeconds(),2)}.${mo(e.getMilliseconds(),3)}`},go=(e,{verbose:t})=>{t&&M.default.stderr.write(`[${ho()}] ${e}\n`)},_o=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let a=t?{...M.default.env,...e}:e;return n?ri({env:a,cwd:r,execPath:i}):a},vo=(e,t,n={})=>{let r=Zr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||M.default.cwd(),execPath:M.default.execPath,encoding:`utf8`,reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:po,...n},n.env=_o(n),n.stdio=Ai(n),M.default.platform===`win32`&&A.default.basename(e,`.exe`)===`cmd`&&t.unshift(`/q`),{file:e,args:t,options:n,parsed:r}},yo=(e,t,n)=>typeof t!=`string`&&!F.Buffer.isBuffer(t)?n===void 0?void 0:``:e.stripFinalNewline?Qr(t):t;function bo(e,t,n){let r=vo(e,t,n),i=ao(e,t),a=oo(e,t);go(a,r.options),$i(r.options);let o;try{o=E.default.spawn(r.file,r.args,r.options)}catch(e){let t=new E.default.ChildProcess,n=Promise.reject(Di({error:e,stdout:``,stderr:``,all:``,command:i,escapedCommand:a,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return eo(t,n),t}let s=to(o),c=Qi(o,r.options,s),l=ea(o,r.options,c),u={isCanceled:!1};o.kill=Gi.bind(null,o.kill.bind(o)),o.cancel=Xi.bind(null,o,u);let d=pi(async()=>{let[{error:e,exitCode:t,signal:n,timedOut:s},c,d,f]=await Za(o,r.options,l),p=yo(r.options,c),m=yo(r.options,d),h=yo(r.options,f);if(e||t!==0||n!==null){let c=Di({error:e,exitCode:t,signal:n,stdout:p,stderr:m,all:h,command:i,escapedCommand:a,parsed:r,timedOut:s,isCanceled:u.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:o.killed});if(!r.options.reject)return c;throw c}return{command:i,escapedCommand:a,exitCode:0,stdout:p,stderr:m,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return Ka(o,r.options),o.all=qa(o,r.options),aa(o),eo(o,d),o}function xo(e,t,n){let r=vo(e,t,n),i=ao(e,t),a=oo(e,t);go(a,r.options);let o=Wa(r.options),s;try{s=E.default.spawnSync(r.file,r.args,{...r.options,input:o})}catch(e){throw Di({error:e,stdout:``,stderr:``,all:``,command:i,escapedCommand:a,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let c=yo(r.options,s.stdout,s.error),l=yo(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let e=Di({stdout:c,stderr:l,error:s.error,signal:s.signal,exitCode:s.status,command:i,escapedCommand:a,parsed:r,timedOut:s.error&&s.error.code===`ETIMEDOUT`,isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return e;throw e}return{command:i,escapedCommand:a,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}const So=({input:e,inputFile:t,stdio:n})=>e===void 0&&t===void 0&&n===void 0?{stdin:`inherit`}:{},Co=(e={})=>({preferLocal:!0,...So(e),...e});function wo(e){function t(t,...n){if(!Array.isArray(t))return wo({...e,...t});let[r,...i]=fo(t,n);return bo(r,i,Co(e))}return t.sync=(t,...n)=>{if(!Array.isArray(t))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[r,...i]=fo(t,n);return xo(r,i,Co(e))},t}wo();function To(e){try{return xo(`git`,[`rev-parse`,`HEAD`],e).stdout}catch{return}}function Eo(e){try{let t=xo(`git`,[`rev-parse`,`--abbrev-ref`,`HEAD`],e).stdout;if(t===`HEAD`){let t=xo(`git`,[`show`,`-s`,`--pretty=%d`,`HEAD`],e).stdout.replace(/^\(|\)$/g,``).split(`, `).find(e=>e.startsWith(`origin/`));return t?t.match(/^origin\/(?<branch>.+)/)[1]:void 0}return t}catch{return}}const Do=/^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/,Oo=/^\/(.*)\.git$/;function ko(e){if(e){if(e.match(Do))return e.replace(Do,`$1`);try{return new URL(e).pathname.replace(Oo,`$1`)}catch{return}}}var Ao={detect({env:e}){return!!e.BUILDKITE},configuration({env:e}){let t=e.BUILDKITE_PULL_REQUEST===`false`?void 0:e.BUILDKITE_PULL_REQUEST,n=!!t;return{name:`Buildkite`,service:`buildkite`,build:e.BUILDKITE_BUILD_NUMBER,buildUrl:e.BUILDKITE_BUILD_URL,commit:e.BUILDKITE_COMMIT,tag:e.BUILDKITE_TAG,branch:n?e.BUILDKITE_PULL_REQUEST_BASE_BRANCH:e.BUILDKITE_BRANCH,slug:ko(e.BUILDKITE_REPO),pr:t,isPr:n,prBranch:n?e.BUILDKITE_BRANCH:void 0,root:e.BUILDKITE_BUILD_CHECKOUT_PATH}}},jo={detect({env:e}){return!!e.CIRCLECI},configuration({env:e}){let t=e.CIRCLE_PR_NUMBER||jr(e.CIRCLE_PULL_REQUEST||e.CI_PULL_REQUEST),n=!!t;return{name:`CircleCI`,service:`circleci`,build:e.CIRCLE_BUILD_NUM,buildUrl:e.CIRCLE_BUILD_URL,job:`${e.CIRCLE_BUILD_NUM}.${e.CIRCLE_NODE_INDEX}`,commit:e.CIRCLE_SHA1,tag:e.CIRCLE_TAG,branch:n?void 0:e.CIRCLE_BRANCH,pr:t,isPr:n,prBranch:n?e.CIRCLE_BRANCH:void 0,slug:`${e.CIRCLE_PROJECT_USERNAME}/${e.CIRCLE_PROJECT_REPONAME}`}}};const Mo=`https://cirrus-ci.com`;var No={detect({env:e}){return!!e.CIRRUS_CI},configuration({env:e}){let t=e.CIRRUS_PR,n=!!t;return{name:`Cirrus CI`,service:`cirrus`,commit:e.CIRRUS_CHANGE_IN_REPO,tag:e.CIRRUS_TAG,build:e.CIRRUS_BUILD_ID,buildUrl:`${Mo}/build/${e.CIRRUS_BUILD_ID}`,job:e.CIRRUS_TASK_ID,jobUrl:`${Mo}/task/${e.CIRRUS_TASK_ID}`,branch:n?e.CIRRUS_BASE_BRANCH:e.CIRRUS_BRANCH,pr:t,isPr:n,prBranch:n?e.CIRRUS_BRANCH:void 0,slug:e.CIRRUS_REPO_FULL_NAME,root:e.CIRRUS_WORKING_DIR}}},Po={detect({env:e}){return e.CF_PAGES===`1`},configuration({env:e}){return{name:`Cloudflare Pages`,service:`cloudflarePages`,commit:e.CF_PAGES_COMMIT_SHA,branch:e.CF_PAGES_BRANCH,root:e.PWD}}},Fo={detect({env:e}){return!!e.CODEBUILD_BUILD_ID},configuration({env:e,cwd:t}){return{name:`AWS CodeBuild`,service:`codebuild`,commit:To({env:e,cwd:t}),build:e.CODEBUILD_BUILD_ID,branch:Eo({env:e,cwd:t}),buildUrl:`https://console.aws.amazon.com/codebuild/home?region=${e.AWS_REGION}#/builds/${e.CODEBUILD_BUILD_ID}/view/new`,root:e.PWD}}},Io={detect({env:e}){return!!e.CF_BUILD_ID},configuration({env:e}){let t=e.CF_PULL_REQUEST_NUMBER,n=!!t;return{name:`Codefresh`,service:`codefresh`,commit:e.CF_REVISION,build:e.CF_BUILD_ID,buildUrl:e.CF_BUILD_URL,branch:n?e.CF_PULL_REQUEST_TARGET:e.CF_BRANCH,pr:t,isPr:n,prBranch:n?e.CF_BRANCH:void 0,slug:`${e.CF_REPO_OWNER}/${e.CF_REPO_NAME}`,root:e.CF_VOLUME_PATH}}},Lo={detect({env:e}){return e.CI_NAME&&e.CI_NAME===`codeship`},configuration({env:e}){return{name:`Codeship`,service:`codeship`,build:e.CI_BUILD_NUMBER,buildUrl:e.CI_BUILD_URL,commit:e.CI_COMMIT_ID,branch:e.CI_BRANCH,slug:e.CI_REPO_NAME}}},Ro={detect({env:e}){return!!e.DRONE},configuration({env:e}){let t=e.DRONE_BUILD_EVENT===`pull_request`;return{name:`Drone`,service:`drone`,commit:e.DRONE_COMMIT_SHA,tag:e.DRONE_TAG,build:e.DRONE_BUILD_NUMBER,buildUrl:e.DRONE_BUILD_LINK,branch:t?e.DRONE_TARGET_BRANCH:e.DRONE_BRANCH,job:e.DRONE_JOB_NUMBER,jobUrl:e.DRONE_BUILD_LINK,pr:e.DRONE_PULL_REQUEST,isPr:t,prBranch:t?e.DRONE_SOURCE_BRANCH:void 0,slug:`${e.DRONE_REPO_OWNER}/${e.DRONE_REPO_NAME}`,root:e.DRONE_WORKSPACE}}},zo={configuration(e){return{commit:To(e),branch:Eo(e)}}};const Bo=({env:e})=>{try{let t=e.GITHUB_EVENT_PATH?JSON.parse((0,D.readFileSync)(e.GITHUB_EVENT_PATH,`utf-8`)):void 0;if(t&&t.pull_request)return{branch:t.pull_request.base?Mr(t.pull_request.base.ref):void 0,pr:t.pull_request.number}}catch{}return{pr:void 0,branch:void 0}},Vo=e=>{let t=e.GITHUB_EVENT_PATH?JSON.parse((0,D.readFileSync)(e.GITHUB_EVENT_PATH,`utf-8`)):void 0;return t&&t.pull_request?t.pull_request.number:void 0};var Ho={detect({env:e}){return!!e.GITHUB_ACTIONS},configuration({env:e,cwd:t}){let n=e.GITHUB_EVENT_NAME===`pull_request`||e.GITHUB_EVENT_NAME===`pull_request_target`,r=Mr(e.GITHUB_EVENT_NAME===`pull_request_target`?`refs/pull/${Vo(e)}/merge`:e.GITHUB_REF);return{name:`GitHub Actions`,service:`github`,commit:e.GITHUB_SHA,build:e.GITHUB_RUN_ID,buildUrl:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`,isPr:n,branch:r,prBranch:n?r:void 0,slug:e.GITHUB_REPOSITORY,root:e.GITHUB_WORKSPACE,...n?Bo({env:e,cwd:t}):void 0}}},Uo={detect({env:e}){return!!e.GITLAB_CI},configuration({env:e}){let t=e.CI_MERGE_REQUEST_ID,n=!!t;return{name:`GitLab CI/CD`,service:`gitlab`,commit:e.CI_COMMIT_SHA,tag:e.CI_COMMIT_TAG,build:e.CI_PIPELINE_ID,buildUrl:`${e.CI_PROJECT_URL}/pipelines/${e.CI_PIPELINE_ID}`,job:e.CI_JOB_ID,jobUrl:`${e.CI_PROJECT_URL}/-/jobs/${e.CI_JOB_ID}`,branch:n?e.CI_MERGE_REQUEST_TARGET_BRANCH_NAME:e.CI_COMMIT_REF_NAME,pr:t,isPr:n,prBranch:e.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME,slug:e.CI_PROJECT_PATH,root:e.CI_PROJECT_DIR}}},Wo={detect({env:e}){return!!e.JENKINS_URL},configuration({env:e,cwd:t}){let n=e.ghprbPullId||e.gitlabMergeRequestId||e.CHANGE_ID,r=!!n,i=e.GIT_LOCAL_BRANCH||e.GIT_BRANCH||e.gitlabBranch||e.BRANCH_NAME;return{name:`Jenkins`,service:`jenkins`,commit:e.ghprbActualCommit||e.GIT_COMMIT||To({env:e,cwd:t}),branch:r?e.ghprbTargetBranch||e.gitlabTargetBranch:i,build:e.BUILD_NUMBER,buildUrl:e.BUILD_URL,root:e.WORKSPACE,pr:n,isPr:r,prBranch:r?e.ghprbSourceBranch||e.gitlabSourceBranch||i:void 0}}},Go={detect({env:e}){return e.NETLIFY===`true`},configuration({env:e}){let t=e.PULL_REQUEST===`true`;return{name:`Netlify`,service:`netlify`,commit:e.COMMIT_REF,build:e.DEPLOY_ID,buildUrl:`https://app.netlify.com/sites/${e.SITE_NAME}/deploys/${e.DEPLOY_ID}`,branch:t?void 0:e.HEAD,pr:e.REVIEW_ID,isPr:t,prBranch:t?e.HEAD:void 0,slug:e.REPOSITORY_URL.match(/[^/:]+\/[^/]+?$/)[0],root:e.PWD}}},Ko={detect({env:e}){return!!e.DISTELLI_APPNAME},configuration({env:e}){return{name:`Puppet`,service:`puppet`,build:e.DISTELLI_BUILDNUM,buildUrl:e.DISTELLI_RELEASE,commit:e.DISTELLI_RELREVISION,branch:e.DISTELLI_RELBRANCH,root:e.DISTELLI_INSTALLHOME}}},qo={detect({env:e}){return!!e.SAILCI},configuration({env:e}){let t=e.SAIL_PULL_REQUEST_NUMBER,n=!!t;return{name:`Sail CI`,service:`sail`,commit:e.SAIL_COMMIT_SHA,branch:n?void 0:e.SAIL_COMMIT_BRANCH,pr:t,isPr:n,slug:`${e.SAIL_REPO_OWNER}/${e.SAIL_REPO_NAME}`,root:e.SAIL_CLONE_DIR}}},Jo={detect({env:e}){return!!e.SCREWDRIVER},configuration({env:e}){let t=e.SD_PULL_REQUEST,n=!!t;return{name:`Screwdriver.cd`,service:`screwdriver`,branch:n?e.PR_BASE_BRANCH_NAME:e.GIT_BRANCH,prBranch:n?e.PR_BRANCH_NAME:void 0,commit:e.SD_BUILD_SHA,build:e.SD_BUILD_ID,buildUrl:e.SD_UI_BUILD_URL,job:e.SD_JOB_ID,pr:t,isPr:n,slug:e.SD_PIPELINE_NAME,root:e.SD_ROOT_DIR}}},Yo={detect({env:e}){return!!e.SCRUTINIZER},configuration({env:e}){let t=e.SCRUTINIZER_PR_NUMBER,n=!!t;return{name:`Scrutinizer`,service:`scrutinizer`,commit:e.SCRUTINIZER_SHA1,build:e.SCRUTINIZER_INSPECTION_UUID,branch:e.SCRUTINIZER_BRANCH,pr:t,isPr:n,prBranch:e.SCRUTINIZER_PR_SOURCE_BRANCH}}},Xo={detect({env:e}){return!!e.SEMAPHORE},configuration({env:e,cwd:t}){let n=e.SEMAPHORE_GIT_PR_NUMBER||e.PULL_REQUEST_NUMBER,r=!!n;return{name:`Semaphore`,service:`semaphore`,commit:e.SEMAPHORE_GIT_SHA||To({env:e,cwd:t}),tag:e.SEMAPHORE_GIT_TAG_NAME,build:e.SEMAPHORE_JOB_ID||e.SEMAPHORE_BUILD_NUMBER,branch:e.SEMAPHORE_GIT_BRANCH||(r?void 0:e.BRANCH_NAME),pr:n,isPr:r,prBranch:e.SEMAPHORE_GIT_PR_BRANCH||(r?e.BRANCH_NAME:void 0),slug:e.SEMAPHORE_GIT_REPO_SLUG||e.SEMAPHORE_REPO_SLUG,root:e.SEMAPHORE_GIT_DIR||e.SEMAPHORE_PROJECT_DIR}}},Zo={detect({env:e}){return!!e.SHIPPABLE},configuration({env:e}){let t=e.IS_PULL_REQUEST===`true`?e.PULL_REQUEST:void 0,n=!!t;return{name:`Shippable`,service:`shippable`,commit:e.COMMIT,tag:e.GIT_TAG_NAME,build:e.BUILD_NUMBER,buildUrl:e.BUILD_URL,branch:n?e.BASE_BRANCH:e.BRANCH,job:e.JOB_NUMBER,pr:t,isPr:n,prBranch:n?e.HEAD_BRANCH:void 0,slug:e.SHIPPABLE_REPO_SLUG,root:e.SHIPPABLE_BUILD_DIR}}},Qo=/* @__PURE__ */ e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.of=e.PropertiesFile=void 0;var t=n(require("fs"));function n(e){return e&&e.__esModule?e:{default:e}}var r=class{constructor(...e){this.objs={},e.length&&this.of.apply(this,e)}makeKeys(e){if(e&&e.indexOf(`#`)!==0){let t=[`=`,`:`].map(t=>e.indexOf(t)).filter(e=>e>-1),n=Math.min(...t),r=e.substring(0,n).trim(),i=e.substring(n+1).trim();if(this.objs.hasOwnProperty(r)){if(Array.isArray(this.objs[r]))this.objs[r].push(i);else{let e=this.objs[r];this.objs[r]=[e,i]}}else{let e=i.replace(/"/g,`\\"`).replace(/\\:/g,`:`).replace(/\\=/g,`=`);this.objs[r]=unescape(JSON.parse(`"`+e+`"`))}}}addFile(e){let n=t.default.readFileSync(e,`utf-8`).split(/\r?\n/),r=this;for(let e=0;e<n.length;e++){let t=n[e];for(;t.substring(t.length-1)===`\\`;){t=t.slice(0,-1);let r=n[e+1];t+=r.trim(),e++}r.makeKeys(t)}}of(...e){for(let t=0;t<e.length;t++)this.addFile(e[t])}get(e,t){if(this.objs.hasOwnProperty(e)){if(Array.isArray(this.objs[e])){let t=[];for(let n=0;n<this.objs[e].length;n++)t[n]=this.interpolate(this.objs[e][n]);return t}return this.objs[e]===void 0?``:this.interpolate(this.objs[e])}return t}getLast(e,t){if(this.objs.hasOwnProperty(e)){if(Array.isArray(this.objs[e])){var n=this.objs[e].length;return this.interpolate(this.objs[e][n-1])}return this.objs[e]===void 0?``:this.interpolate(this.objs[e])}return t}getFirst(e,t){return this.objs.hasOwnProperty(e)?Array.isArray(this.objs[e])?this.interpolate(this.objs[e][0]):this.objs[e]===void 0?``:this.interpolate(this.objs[e]):t}getInt(e,t){let n=this.getLast(e);return n?parseInt(n,10):t}getFloat(e,t){let n=this.getLast(e);return n?parseFloat(n):t}getBoolean(e,t){function n(e){return!/^(false|0)$/i.test(e)&&!!e}let r=this.getLast(e);return r?n(r):t||!1}set(e,t){this.objs[e]=t}interpolate(e){let t=this;return e.replace(/\\\\/g,`\\`).replace(/\$\{([A-Za-z0-9\.\-\_]*)\}/g,function(e){return t.getLast(e.substring(2,e.length-1))})}getKeys(){let e=[];for(let t in this.objs)e.push(t);return e}getMatchingKeys(e){let t=[];for(let n in this.objs)n.search(e)!==-1&&t.push(n);return t}reset(){this.objs={}}};e.PropertiesFile=r,e.of=function(...e){let t=new r;return t.of.apply(t,e),t}})),$o=/* @__PURE__ */ e.a(Qo(),1);const es={root:`teamcity.build.workingDir`,branch:`teamcity.build.branch`},ts=e=>{try{return $o.default.of(e)}catch{return}},ns=({env:e,cwd:t})=>{let n=e.TEAMCITY_BUILD_PROPERTIES_FILE?ts(e.TEAMCITY_BUILD_PROPERTIES_FILE):void 0,r=n?n.get(`teamcity.configuration.properties.file`):void 0,i=r&&ts(r);return Object.fromEntries(Object.keys(es).map(r=>[r,(n?n.get(es[r]):void 0)||(i?i.get(es[r]):void 0)||(r===`branch`?Eo({env:e,cwd:t}):void 0)]))},rs={appveyor:Ar,azurePipelines:Nr,bamboo:Pr,bitbucket:Fr,bitrise:Ir,buddy:Lr,buildkite:Ao,circleci:jo,cirrus:No,cloudflarePages:Po,codebuild:Fo,codefresh:Io,codeship:Lo,drone:Ro,github:Ho,gitlab:Uo,jenkins:Wo,netlify:Go,puppet:Ko,sail:qo,screwdriver:Jo,scrutinizer:Yo,semaphore:Xo,shippable:Zo,teamcity:{detect({env:e}){return!!e.TEAMCITY_VERSION},configuration({env:e,cwd:t}){return{name:`TeamCity`,service:`teamcity`,commit:e.BUILD_VCS_NUMBER,build:e.BUILD_NUMBER,slug:e.TEAMCITY_BUILDCONF_NAME,...ns({env:e,cwd:t})}}},travis:{detect({env:e}){return!!e.TRAVIS},configuration({env:e}){let t=e.TRAVIS_PULL_REQUEST===`false`?void 0:e.TRAVIS_PULL_REQUEST,n=!!t;return{name:`Travis CI`,service:`travis`,commit:e.TRAVIS_COMMIT,tag:e.TRAVIS_TAG,build:e.TRAVIS_BUILD_NUMBER,buildUrl:e.TRAVIS_BUILD_WEB_URL,branch:e.TRAVIS_BRANCH,job:e.TRAVIS_JOB_NUMBER,jobUrl:e.TRAVIS_JOB_WEB_URL,pr:t,isPr:n,prBranch:e.TRAVIS_PULL_REQUEST_BRANCH,slug:e.TRAVIS_REPO_SLUG,root:e.TRAVIS_BUILD_DIR}}},vela:{detect({env:e}){return!!e.VELA},configuration({env:e}){let t=e.VELA_BUILD_EVENT===`pull_request`;return{name:`Vela`,service:`vela`,branch:t?e.VELA_PULL_REQUEST_TARGET:e.VELA_BUILD_BRANCH,commit:e.VELA_BUILD_COMMIT,tag:e.VELA_BUILD_TAG,build:e.VELA_BUILD_NUMBER,buildUrl:e.VELA_BUILD_LINK,job:void 0,jobUrl:void 0,isPr:t,pr:e.VELA_BUILD_PULL_REQUEST,prBranch:e.VELA_PULL_REQUEST_SOURCE,slug:e.VELA_REPO_FULL_NAME,root:e.VELA_BUILD_WORKSPACE}}},vercel:{detect({env:e}){return!!e.VERCEL||!!e.NOW_GITHUB_DEPLOYMENT},configuration({env:e}){let t=`Vercel`,n=`vercel`;return e.VERCEL?{name:t,service:n,commit:e.VERCEL_GIT_COMMIT_SHA,branch:e.VERCEL_GIT_COMMIT_REF,slug:`${e.VERCEL_GIT_REPO_OWNER}/${e.VERCEL_GIT_REPO_SLUG}`}:{name:t,service:n,commit:e.NOW_GITHUB_COMMIT_SHA,branch:e.NOW_GITHUB_COMMIT_REF,slug:`${e.NOW_GITHUB_ORG}/${e.NOW_GITHUB_REPO}`}}},wercker:{detect({env:e}){return!!e.WERCKER_MAIN_PIPELINE_STARTED},configuration({env:e}){return{name:`Wercker`,service:`wercker`,commit:e.WERCKER_GIT_COMMIT,build:e.WERCKER_MAIN_PIPELINE_STARTED,buildUrl:e.WERCKER_RUN_URL,branch:e.WERCKER_GIT_BRANCH,slug:`${e.WERCKER_GIT_OWNER}/${e.WERCKER_GIT_REPOSITORY}`,root:e.WERCKER_ROOT}}},woodpecker:{detect({env:e}){return e.CI&&e.CI===`woodpecker`},configuration({env:e}){let t=e.CI_PIPELINE_EVENT===`pull_request`;return{name:`Woodpecker CI`,service:`woodpecker`,commit:e.CI_COMMIT_SHA,tag:e.CI_COMMIT_TAG,build:e.CI_PIPELINE_NUMBER,buildUrl:e.CI_PIPELINE_URL,branch:t?e.CI_COMMIT_TARGET_BRANCH:e.CI_COMMIT_BRANCH,job:e.CI_STEP_NUMBER,jobUrl:e.CI_STEP_URL,pr:e.CI_COMMIT_PULL_REQUEST,isPr:t,prBranch:t?e.CI_COMMIT_SOURCE_BRANCH:void 0,slug:`${e.CI_REPO_OWNER}/${e.CI_REPO_NAME}`,root:e.CI_WORKSPACE}}},jetbrainsSpace:{detect({env:e}){return!!e.JB_SPACE_EXECUTION_NUMBER},configuration({env:e}){let t=e.JB_SPACE_PROJECT_KEY,n=e.JB_SPACE_GIT_REPOSITORY_NAME;return{name:`JetBrains Space`,service:`jetbrainsSpace`,commit:e.JB_SPACE_GIT_REVISION,build:e.JB_SPACE_EXECUTION_NUMBER,branch:Mr(e.JB_SPACE_GIT_BRANCH),slug:t&&n?`${t.toLowerCase()}/${n}`:void 0}}}};var is=({env:e=process.env,cwd:t=process.cwd()}={})=>{for(let n of Object.keys(rs))if(rs[n].detect({env:e,cwd:t}))return{isCi:!0,...rs[n].configuration({env:e,cwd:t})};return{isCi:!!e.CI,...zo.configuration({env:e,cwd:t})}},q=/* @__PURE__ */ e.a(i.o()),J=i.a(),as=()=>(0,J.dedent)(q.default`
    ${i.t} {bold Cross-fork PR builds unsupported in custom GitHub workflows}
    GitHub actions triggered by a fork do not report their repository owner, so cannot be properly linked to a pull request in Chromatic.
    Consider using the official Chromatic GitHub Action, or set CHROMATIC_BRANCH to include the forked repository owner (e.g. owner:branch).
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/github-actions`)}
  `),os=(e=!1)=>e?(0,J.dedent)(q.default`
      ${i.t} {bold Found only one commit}
      This typically means you have ran into one of the following scenarios:
      - You've checked out a shallow copy of the Git repository, which {bold actions/checkout} does by default.
        In order for Chromatic to correctly determine baseline commits, we need access to the full Git history graph.
        With {bold actions/checkout}, you can enable this by setting 'fetch-depth: 0'.
        ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/github-actions`)}
      - You've only made a single commit so far. 
        Please make at least one additional commit in order for Chromatic to be able to detect what's changed. 
    `):(0,J.dedent)(q.default`
      ${i.t} {bold Found only one commit}
      This typically means you have ran into one of the following scenarios:
      - You've checked out a shallow copy of the Git repository, which some CI systems do by default.
        In order for Chromatic to correctly determine baseline commits, we need access to the full Git history graph.
        Refer to your CI provider's documentation for details.
      - You've only made a single commit so far.  
        Please make at least one additional commit in order for Chromatic to be able to detect what's changed.
    `),ss=({GITHUB_EVENT_NAME:e})=>(0,J.dedent)(q.default`
    ${i.t} {bold Missing GitHub environment variable}
    \`GITHUB_EVENT_NAME\` environment variable is set to '${e}', but \`GITHUB_SHA\` and \`GITHUB_HEAD_REF\` are not both set.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/github-actions`)}
  `),cs=({TRAVIS_EVENT_TYPE:e})=>(0,J.dedent)(q.default`
    ${i.t} {bold Missing Travis environment variable}
    \`TRAVIS_EVENT_TYPE\` environment variable set to '${e}', but
    \`TRAVIS_PULL_REQUEST_SHA\` and \`TRAVIS_PULL_REQUEST_BRANCH\` are not both set.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/travisci/`)}
  `),ls=()=>(0,J.dedent)(q.default`
    ${i.n} {bold Use our GitHub Action}
    It appears you are using a GitHub Actions workflow, but are not using the official GitHub Action for Chromatic.
    Find it at ${n.Tt(`https://github.com/marketplace/actions/publish-to-chromatic`)}
  `),us=({ref:e,sha:t,env:r})=>e?(0,J.dedent)(q.default`
      ${i.i} {bold Branch '${e}' does not exist}
      We tried to retrieve its latest commit but couldn't find it in your Git history.
      Falling back to ${t.slice(0,7)}, but commit details (date, author) will be missing.
      We will not be able to retain baselines from builds created by the Visual Tests addon.
      Pull request status updates likely won't work properly.
      Please use our official GitHub Action or forward the pull_request event info to us.
      ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/github-actions`)}
    `):r?(0,J.dedent)(q.default`
      ${i.i} {bold Commit ${t.slice(0,7)} does not exist}
      We tried to retrieve the commit details but couldn't find it in your Git history.
      Check your {bold ${r}} environment variable.
      Using it anyway, but commit details (date, author) will be missing.
      We will not be able to retain baselines from builds created by the Visual Tests addon.
    `):(0,J.dedent)(q.default`
    ${i.i} {bold Commit ${t.slice(0,7)} does not exist}
    We tried to retrieve the commit details but couldn't find it in your Git history.
    Using it anyway, but commit details (date, author) will be missing.
    We will not be able to retain baselines from builds created by the Visual Tests addon.
  `),ds=()=>(0,J.dedent)(q.default`
    ${i.i} {bold Running on a Travis PR build from an internal branch}
    It is recommended to run Chromatic on the push builds from Travis where possible.
    We advise turning on push builds and disabling Chromatic for internal PR builds.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/travisci/`)}
  `);const fs=/^origin\//,ps=e=>e&&e!==`HEAD`?e:!1;function ms(e){try{return is()}catch(t){return e.debug(`Error while parsing CI environment variables`,t),{}}}async function hs(e,{branchName:t,patchBaseRef:r,ci:i}={}){let{log:a}=e,o=await n.H(e),s=ps(t)||ps(r)||await n.L(e),c,{TRAVIS_COMMIT:l,TRAVIS_EVENT_TYPE:u,TRAVIS_PULL_REQUEST_SLUG:d,TRAVIS_REPO_SLUG:f,TRAVIS_PULL_REQUEST_SHA:p,TRAVIS_PULL_REQUEST_BRANCH:m,GITHUB_ACTIONS:h,GITHUB_EVENT_NAME:g,GITHUB_REPOSITORY:_,GITHUB_BASE_REF:v,GITHUB_HEAD_REF:y,GITHUB_SHA:b,CHROMATIC_SHA:x,CHROMATIC_BRANCH:S,CHROMATIC_PULL_REQUEST_SHA:C,CHROMATIC_SLUG:w}=process.env,{isCi:T,service:E,prBranch:D,branch:O,commit:k,slug:A}=ms(a),j=x&&S,M=u===`pull_request`,N=h===`true`,P=g===`pull_request`;if(!await n.tt(e)){let e=os(N);if(T)throw Error(e);a.warn(e)}if(j)o=await n.H(e,x).catch(e=>(a.warn(us({sha:x,env:`CHROMATIC_SHA`})),a.debug(e),{commit:x,committedAt:Date.now()})),C&&(o.mergeCommit=C),s=S,c=w;else if(M){if(d===f&&a.warn(ds()),!p||!m)throw Error(cs({TRAVIS_EVENT_TYPE:u}));o=await n.H(e,p).catch(e=>(a.warn(us({sha:p,env:`TRAVIS_PULL_REQUEST_SHA`})),a.debug(e),{commit:p,committedAt:Date.now()})),l&&(o.mergeCommit=l),s=m,c=d}else if(P){if(a.info(ls()),!y||!b)throw Error(ss({GITHUB_EVENT_NAME:g}));if(v===y)throw Error(as());o=await n.H(e,y).catch(e=>(a.warn(us({ref:y,sha:b,env:`GITHUB_HEAD_REF`})),a.debug(e),{commit:b,committedAt:Date.now()})),o.mergeCommit=b,s=y,c=_}let F=process.env.CHROMATIC_ACTION?`chromaui/action`:E;c||=A,ps(s)||(o=await n.H(e,k).catch(e=>(a.warn(us({sha:k})),a.debug(e),{commit:k,committedAt:Date.now()})),s=ps(D)||ps(O)||ps(process.env.HEAD)||ps(process.env.GERRIT_BRANCH)||ps(process.env.GITHUB_REF)||ps(process.env.CI_BRANCH)||`HEAD`);let I=T||!!i||!!process.env.CI||!!process.env.REPOSITORY_URL||!!process.env.GITHUB_REPOSITORY;return!t&&!j&&fs.test(s)&&(a.warn(`Ignoring 'origin/' prefix in branch name.`),s=s.replace(fs,``)),a.debug(`git info: ${JSON.stringify({commit:o,branch:s,slug:c,fromCI:I,ciService:F})}`),{...o,branch:s,slug:c,fromCI:I,ciService:F}}var gs=/* @__PURE__ */ e.t(((e,t)=>{t.exports=function(e){try{return e()}catch{}}})),_s=/* @__PURE__ */ e.t(((e,t)=>{t.exports=c,c.sync=l;var n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=require("path"),i=n?`;`:`:`,a=Br();function o(e){var t=/* @__PURE__ */ Error(`not found: `+e);return t.code=`ENOENT`,t}function s(e,t){var r=t.colon||i,a=t.path||process.env.PATH||``,o=[``];a=a.split(r);var s=``;return n&&(a.unshift(process.cwd()),s=t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`,o=s.split(r),e.indexOf(`.`)!==-1&&o[0]!==``&&o.unshift(``)),(e.match(/\//)||n&&e.match(/\\/))&&(a=[``]),{env:a,ext:o,extExe:s}}function c(e,t,n){typeof t==`function`&&(n=t,t={});var i=s(e,t),c=i.env,l=i.ext,u=i.extExe,d=[];(function i(s,f){if(s===f)return t.all&&d.length?n(null,d):n(o(e));var p=c[s];p.charAt(0)===`"`&&p.slice(-1)===`"`&&(p=p.slice(1,-1));var m=r.join(p,e);!p&&/^\.[\\\/]/.test(e)&&(m=e.slice(0,2)+m),(function e(r,o){if(r===o)return i(s+1,f);var c=l[r];a(m+c,{pathExt:u},function(i,a){if(!i&&a){if(t.all)d.push(m+c);else return n(null,m+c)}return e(r+1,o)})})(0,l.length)})(0,c.length)}function l(e,t){t||={};for(var n=s(e,t),i=n.env,c=n.ext,l=n.extExe,u=[],d=0,f=i.length;d<f;d++){var p=i[d];p.charAt(0)===`"`&&p.slice(-1)===`"`&&(p=p.slice(1,-1));var m=r.join(p,e);!p&&/^\.[\\\/]/.test(e)&&(m=e.slice(0,2)+m);for(var h=0,g=c.length;h<g;h++){var _=m+c[h],v;try{if(v=a.sync(_,{pathExt:l}),v){if(t.all)u.push(_);else return _}}catch{}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw o(e)}})),vs=/* @__PURE__ */ e.t(((e,t)=>{t.exports=e=>{e||={};let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`}})),ys=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=_s(),i=vs()();function a(e,t){let a=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0;if(s)try{process.chdir(e.options.cwd)}catch{}let c;try{c=r.sync(e.command,{path:(e.options.env||process.env)[i],pathExt:t?n.delimiter:void 0})}catch{}finally{s&&process.chdir(a)}return c&&=n.resolve(o?e.options.cwd:``,c),c}function o(e){return a(e)||a(e,!0)}t.exports=o})),bs=/* @__PURE__ */ e.t(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),xs=/* @__PURE__ */ e.t(((e,t)=>{t.exports=/^#!.*/})),Ss=/* @__PURE__ */ e.t(((e,t)=>{var n=xs();t.exports=function(e){var t=e.match(n);if(!t)return null;var r=t[0].replace(/#! ?/,``).split(` `),i=r[0].split(`/`).pop(),a=r[1];return i===`env`?a:i+(a?` `+a:``)}})),Cs=/* @__PURE__ */ e.t(((e,t)=>{let n=require("fs"),r=Ss();function i(e){let t;Buffer.alloc?t=Buffer.alloc(150):(t=new Buffer(150),t.fill(0));let i;try{i=n.openSync(e,`r`),n.readSync(i,t,0,150,0),n.closeSync(i)}catch{}return r(t.toString())}t.exports=i})),ws=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=gs(),i=ys(),a=bs(),o=Cs(),s=require("semver"),c=process.platform===`win32`,l=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,d=r(()=>s.satisfies(process.version,`^4.8.0 || ^5.7.0 || >= 6.0.0`,!0))||!1;function f(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function p(e){if(!c)return e;let t=f(e),r=!l.test(t);if(e.options.forceShell||r){let r=u.test(t);e.command=n.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,r)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function m(e){if(d)return e;let t=[e.command].concat(e.args).join(` `);return c?(e.command=typeof e.options.shell==`string`?e.options.shell:process.env.comspec||`cmd.exe`,e.args=[`/d`,`/s`,`/c`,`"${t}"`],e.options.windowsVerbatimArguments=!0):(e.command=typeof e.options.shell==`string`?e.options.shell:process.platform===`android`?`/system/bin/sh`:`/bin/sh`,e.args=[`-c`,t]),e}function h(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?m(r):p(r)}t.exports=h})),Ts=/* @__PURE__ */ e.t(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(/* @__PURE__ */ Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t,`spawn`);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),Es=/* @__PURE__ */ e.t(((e,t)=>{let n=require("child_process"),r=ws(),i=Ts();function a(e,t,a){let o=r(e,t,a),s=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(s,o),s}function o(e,t,a){let o=r(e,t,a),s=n.spawnSync(o.command,o.args,o.options);return s.error=s.error||i.verifyENOENTSync(s.status,o),s}t.exports=a,t.exports.spawn=a,t.exports.sync=o,t.exports._parse=r,t.exports._enoent=i})),Ds=/* @__PURE__ */ e.t(((e,t)=>{let n=(e,...t)=>new Promise(n=>{n(e(...t))});t.exports=n,t.exports.default=n})),Os=/* @__PURE__ */ e.t(((e,t)=>{let n=Ds(),r=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))return Promise.reject(/* @__PURE__ */ TypeError("Expected `concurrency` to be a number from 1 and up"));let t=[],r=0,i=()=>{r--,t.length>0&&t.shift()()},a=(e,t,...a)=>{r++;let o=n(e,...a);t(o),o.then(i,i)},o=(n,i,...o)=>{r<e?a(n,i,...o):t.push(a.bind(null,n,i,...o))},s=(e,...t)=>new Promise(n=>o(e,n,...t));return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),s};t.exports=r,t.exports.default=r})),ks=/* @__PURE__ */ e.t(((e,t)=>{let n=Os();var r=class extends Error{constructor(e){super(),this.value=e}};let i=async(e,t)=>t(await e),a=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new r(t[0]);return!1},o=async(e,t,o)=>{o={concurrency:1/0,preserveOrder:!0,...o};let s=n(o.concurrency),c=[...e].map(e=>[e,s(i,e,t)]),l=n(o.preserveOrder?1:1/0);try{await Promise.all(c.map(e=>l(a,e)))}catch(e){if(e instanceof r)return e.value;throw e}};t.exports=o,t.exports.default=o})),As=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=require("fs"),{promisify:i}=require("util"),a=ks(),o=i(r.stat),s=i(r.lstat),c={directory:`isDirectory`,file:`isFile`};function l({type:e}){if(!(e in c))throw Error(`Invalid type specified: ${e}`)}let u=(e,t)=>e===void 0||t[c[e]]();t.exports=async(e,t)=>{t={cwd:process.cwd(),type:`file`,allowSymlinks:!0,...t},l(t);let r=t.allowSymlinks?o:s;return a(e,async e=>{try{let i=await r(n.resolve(t.cwd,e));return u(t.type,i)}catch{return!1}},t)},t.exports.sync=(e,t)=>{t={cwd:process.cwd(),allowSymlinks:!0,type:`file`,...t},l(t);let i=t.allowSymlinks?r.statSync:r.lstatSync;for(let r of e)try{let e=i(n.resolve(t.cwd,r));if(u(t.type,e))return r}catch{}}})),js=/* @__PURE__ */ e.t(((e,t)=>{let n=require("fs"),{promisify:r}=require("util"),i=r(n.access);t.exports=async e=>{try{return await i(e),!0}catch{return!1}},t.exports.sync=e=>{try{return n.accessSync(e),!0}catch{return!1}}})),Ms=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=As(),i=js(),a=Symbol(`findUp.stop`);t.exports=async(e,t={})=>{let i=n.resolve(t.cwd||``),{root:o}=n.parse(i),s=[].concat(e),c=async t=>{if(typeof e!=`function`)return r(s,t);let n=await e(t.cwd);return typeof n==`string`?r([n],t):n};for(;;){let e=await c({...t,cwd:i});if(e===a)return;if(e)return n.resolve(i,e);if(i===o)return;i=n.dirname(i)}},t.exports.sync=(e,t={})=>{let i=n.resolve(t.cwd||``),{root:o}=n.parse(i),s=[].concat(e),c=t=>{if(typeof e!=`function`)return r.sync(s,t);let n=e(t.cwd);return typeof n==`string`?r.sync([n],t):n};for(;;){let e=c({...t,cwd:i});if(e===a)return;if(e)return n.resolve(i,e);if(i===o)return;i=n.dirname(i)}},t.exports.exists=i,t.exports.sync.exists=i.sync,t.exports.stop=a})),Ns=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path"),r=Ms(),i=async e=>{let t=await r(`package.json`,{cwd:e});return t&&n.dirname(t)};t.exports=i,t.exports.default=i,t.exports.sync=e=>{let t=r.sync(`package.json`,{cwd:e});return t&&n.dirname(t)}})),Ps=(/* @__PURE__ */ e.t(((e,t)=>{let n=require("fs"),r=require("path"),i=Es(),a=Ns(),o,s,c;function l(){o=void 0,s=void 0,c=void 0}function u(){if(o!==void 0)return o;try{let e=i.sync(`yarn`,[`--version`]);o=!!(e.stdout&&e.stdout.toString().trim())}catch{o=!1}return o}function d(){if(s!==void 0)return s;try{let e=i.sync(`npm`,[`--version`]);s=!!(e.stdout&&e.stdout.toString().trim())}catch{s=!1}return s}function f(){if(c!==void 0)return c;let e=a.sync();if(e){let t=r.join(e,`package-lock.json`),i=r.join(e,`yarn.lock`);try{return n.statSync(i),c=`yarn`,c}catch{}try{return n.statSync(t),c=`npm`,c}catch{}}return u()?`yarn`:`npm`}function p(...e){return e.unshift(f()),i(...e)}function m(...e){return e.unshift(f()),i.sync(...e)}f.hasYarn=u,f.hasNpm=d,f.spawn=p,f.spawn.sync=m,f.clearCache=l,t.exports=f})))(),Fs=(e,t,n=!1)=>{let r=n?`yarn upgrade chromatic --latest`:`npm install chromatic@latest --save-dev`;return(0,J.dedent)(q.default`
    ${i.i} {bold Using outdated package}
    You are using an outdated version of the Chromatic CLI (v${e.pkg.version}).
    A new major version is available (v${t}).
    Run {bold ${r}} to upgrade.
  `)};function Is(e,t={}){return new Promise((n,r)=>{let i=``,a=``,o=(0,Ps.spawn)(e,t);o.stdout?.on(`data`,e=>{i+=e}),o.stderr?.on(`data`,e=>{a+=e}),o.on(`error`,r),o.on(`close`,e=>{e===0?n(i.trim()):r(Error(a))})})}async function Ls(e){if(e.options.skipUpdateCheck===!0){e.log.info(`Skipping update check`);return}if(!C.default.valid(e.pkg.version)){e.log.warn(`Invalid semver version in package.json: ${e.pkg.version}`);return}let t;try{let n=await Is([`config`,`get`,`registry`]).catch(()=>`https://registry.npmjs.org/`);[`https://registry.npmjs.org/`,`https://registry.yarnpkg.com`].includes(n)||e.log.info(`Using custom npm registry: ${n}`);let r=new URL(e.pkg.name,n).href,{"dist-tags":i={}}=await(await a._(e.http.fetch(r),5e3)).json();if(!C.default.valid(i.latest)){e.log.warn(`Invalid dist-tag 'latest' returned from registry; skipping update check`);return}t=i.latest}catch(t){Rs(t)&&n.jt(t),e.log.warn(`Could not retrieve package info from registry; skipping update check`),e.log.warn(t);return}C.default.major(e.pkg.version)<C.default.major(t)&&e.log.warn(Fs(e,t,(0,Ps.hasYarn)()))}function Rs(e){if(!(e instanceof Error))return!1;let t=e instanceof TypeError&&e.message.includes(`Invalid URL`),n=e.message.includes(`HTTPClient failed to fetch`);return!(t||n)}var zs=(e,t)=>(0,J.dedent)(q.default`
    ${i.i} {bold Unsupported Node.js version}
    You are running Node.js {bold v${e}}, but Chromatic supports {bold ${t}}.
    Chromatic may not work as expected. Please upgrade Node.js to a supported version based on Node's release schedule:
    ${n.Tt(`https://github.com/nodejs/release#release-schedule`)}
  `);function Bs(e,t){t&&((0,C.satisfies)(process.versions.node,t)||e.warn(zs(process.versions.node,t)))}var Vs=/* @__PURE__ */ e.t(((e,t)=>{let n=process.stdin,r=process.stdout,i={prompt:u,confirm:d,multiline:f};function a(e){"use strict";let t={},n=0;return new Promise(function(r,a){function o(e){let r=e.key,a=e.msg,o=i[e.fn];if(!r)throw Error("A value for `key` must be defined for question "+n);if(!a)throw Error("A value for `msg` must be defined for question "+n);if(!o)throw Error('A value for `fn` must be "prompt", "confirm", or "multiline" for question '+n);o&&o(a,r,t).then(function(){s()})}function s(){if(n<e.length){var i=e[n];n++,o(i)}else r(t)}s()})}function o(e,t){"use strict";return new Promise(function(i){if(r.write(e),n.setEncoding(`utf8`),t){let e=[];r.write(`
`),n.on(`data`,function(t){t==`
`||t==`\r
`?(n.pause(),n.removeAllListeners(`data`),i(e.join(`
`)),e=null):e.push(t.slice(0,-1))}).resume()}else n.once(`data`,function(e){n.pause(),i(e.slice(0,-1))}).resume()})}function s(e){"use strict";return o(e,!1).then(function(e){return/^y|yes|ok|true$/i.test(e)})}function c(e){"use strict";return o(e,!0)}function l(e,t,n,r){"use strict";return n||={},r(e).then(function(e){return n[t]=e,n})}function u(e,t,n){return l(e,t,n,o)}function d(e,t,n){return l(e,t,n,s)}function f(e,t,n){return l(e,t,n,c)}t.exports={ask:a,confirm:s,multiline:c,prompt:o}})),Hs=/* @__PURE__ */ e.a(o.t()),Us=Vs(),Ws=e=>(0,J.dedent)(q.default`
    ${i.r} {bold Added script '${e}' to package.json}
    You can now run it here or in CI with 'npm run ${e}' or 'yarn ${e}'.

    ${i.n} Your project token was added to the script via the {bold --project-token} flag.
    If you're running Chromatic via continuous integration, we recommend setting
    the {bold CHROMATIC_PROJECT_TOKEN} environment variable in your CI environment.
    You can then remove the {bold --project-token} from your package.json script.
  `),Gs=(e,t)=>{let n=J.dedent`
    "scripts": {
      "${e}": "${t}"
    }
  `;return(0,J.dedent)(q.default`
    ${i.n} No problem. You can add it to your package.json yourself like so:
    {dim ${n}}
  `)},Ks=e=>(0,J.dedent)(q.default`
    ${i.i} {bold No '${e}' script found in your package.json}
    Would you like me to add it for you? [y/N]
  `);const{writeFile:qs}=Hs.default,Js=`chromatic`,Ys=e=>e[Js]||Object.values(e).find(e=>e.startsWith(Js));async function Xs(e){let{log:t,options:n,packageJson:r,packagePath:i}=e;if(n.interactive)try{let{readme:e,_id:a,...o}=r;if(o.scripts||={},Ys(o.scripts))return;let s=`npx chromatic ${n.originalArgv.join(` `)}`;t.info(``),await(0,Us.confirm)(Ks(Js))?(o.scripts[Js]=s,await qs(i,o,{spaces:2}),t.info(``),t.info(Ws(Js))):(t.info(``),t.info(Gs(Js,s)))}catch(e){t.warn(e)}}function Zs(e){return(0,S.createHash)(`md5`).update(e.trim().toLowerCase()).digest(`hex`)}function Qs(e){let t=t=>e.build?.[t]??e.rebuildForBuild?.[t];return{code:e.exitCode,url:t(`webUrl`),buildUrl:t(`webUrl`),storybookUrl:e.build?.storybookUrl||e.storybookUrl,specCount:t(`specCount`),componentCount:t(`componentCount`),testCount:t(`testCount`),changeCount:t(`changeCount`),pendingCount:t(`pendingCount`),ignoredCount:t(`ignoredCount`),errorCount:t(`errorCount`),interactionTestFailuresCount:t(`interactionTestFailuresCount`),actualTestCount:t(`actualTestCount`),actualCaptureCount:t(`actualCaptureCount`),inheritedCaptureCount:t(`inheritedCaptureCount`)}}var $s=/* @__PURE__ */ e.a(lr()),ec=class{static{this.nonTTY=!1}constructor(e,t){this.tasks=e,this.options=t,this.updateRenderer=new $s.default(e,t)}render(){this.updateRenderer.render();for(let e of this.tasks){let t;e.subscribe(n=>{n.type===`TITLE`&&this.options.log.file(`${e.title}`),n.type===`DATA`&&n.data&&t!==n.data&&(t=n.data,this.options.log.file(`    → ${n.data}`))})}}end(){this.updateRenderer.end()}},tc=/* @__PURE__ */ e.a(a.v());function nc(e,t){return typeof t==`string`&&t.length>0?(0,tc.default)(t,{bash:!0})(e):!!t}var rc=class{static{this.nonTTY=!0}constructor(e,t){this.tasks=e,this.options=t}render(){for(let e of this.tasks){let t;e.subscribe(n=>{n.type===`TITLE`&&this.options.log.info(`${e.title}`),n.type===`DATA`&&n.data&&t!==n.data&&(t=n.data,this.options.log.info(`    → ${n.data}`))})}}end(){}},ic={name:`chromatic`,version:`18.15.3`,description:`Automate visual testing across browsers. Gather UI feedback. Versioned documentation.`,keywords:[`storybook-addon`,`storybook`,`addon`,`test`,`popular`],homepage:`https://www.chromatic.com`,bugs:{url:`https://github.com/chromaui/chromatic-cli`,email:`support@chromatic.com`},repository:{type:`git`,url:`git+https://github.com/chromaui/chromatic-cli.git`},license:`MIT`,author:{name:`Chromatic`,email:`support@chromatic.com`},exports:{".":{types:`./isChromatic.d.ts`,require:`./isChromatic.js`,import:`./isChromatic.mjs`},"./node":{types:`./dist/node.d.cts`,require:`./dist/node.cjs`,node:`./dist/node.cjs`},"./isChromatic":{types:`./isChromatic.d.ts`,require:`./isChromatic.js`,import:`./isChromatic.mjs`},"./package.json":`./package.json`},main:`isChromatic.js`,module:`isChromatic.mjs`,typesVersions:{"*":{"*":[`./isChromatic.d.ts`],isChromatic:[`./isChromatic.d.ts`],node:[`dist/node.d.cts`]}},bin:{chroma:`dist/bin.cjs`,chromatic:`dist/bin.cjs`,"chromatic-cli":`dist/bin.cjs`},files:[`dist/*.cjs`,`dist/node.d.cts`,`isChromatic.js`,`isChromatic.mjs`,`isChromatic.d.ts`],resolutions:{"any-observable":`^0.5.1`,"es-toolkit":`1.46.0`,lodash:`4.18.1`,"@types/minimatch":`5.1.2`,"fetch-blob":`patch:fetch-blob@npm%3A3.2.0#~/.yarn/patches/fetch-blob-npm-3.2.0-28e01becfc.patch`},dependenciesMeta:{"@sentry/cli":{built:!0},esbuild:{built:!0}},dependencies:{semver:`^7.3.5`},devDependencies:{"@actions/core":`^1.10.0`,"@actions/github":`^9.1.1`,"@antfu/ni":`^0.21.5`,"@auto-it/slack":`^11.1.6`,"@clack/prompts":`^1.4.0`,"@discoveryjs/json-ext":`^0.5.7`,"@eslint-community/eslint-plugin-eslint-comments":`^4.3.0`,"@eslint/js":`^9.39.4`,"@expo/config-plugins":`55.0.8`,"@expo/config-types":`55.0.5`,"@sentry/cli":`^3.8.2`,"@sentry/node":`^8.30.0`,"@snyk/dep-graph":`^2.9.0`,"@storybook/addon-docs":`^10.6.5`,"@storybook/builder-vite":`^10.6.5`,"@storybook/html-vite":`^10.6.5`,"@tsconfig/node16":`^16.1.1`,"@types/async-retry":`^1.4.3`,"@types/cross-spawn":`^6.0.2`,"@types/fs-extra":`^11.0.4`,"@types/jsonfile":`^6.0.1`,"@types/listr":`^0.14.4`,"@types/mime-types":`^3.0.1`,"@types/node":`18.x`,"@types/picomatch":`^2.3.0`,"@types/prompts":`^2.4.9`,"@types/semver":`^7.3.9`,"@types/ws":`^8`,"@types/yazl":`^3.3.0`,"@vitest/coverage-v8":`^5.1.0`,"adm-zip":`^0.6.1`,"ansi-html":`0.0.9`,"any-observable":`^0.5.1`,"async-retry":`^1.3.3`,auto:`^11.0.5`,boxen:`^9.0.0`,chalk:`^4.1.2`,"clean-package":`^2.2.0`,cpy:`^8.1.2`,"cross-env":`^10.1.0`,"cross-spawn":`^7.0.2`,debug:`^4.3.2`,dotenv:`^17.4.2`,"env-ci":`^11.1.0`,eslint:`^9.39.4`,"eslint-plugin-jsdoc":`^62.4.1`,"eslint-plugin-prettier":`^5.5.5`,"eslint-plugin-security":`^4.2.1`,"eslint-plugin-simple-import-sort":`^12.1.1`,"eslint-plugin-sort-class-members":`^1.21.0`,"eslint-plugin-unicorn":`^59.0.1`,execa:`^10.2.1`,"fake-tag":`^5.0.0`,filesize:`^11.0.29`,"formdata-node":`^6.0.3`,"fs-extra":`^11.4.1`,globals:`^15.3.0`,"https-proxy-agent":`^9.1.0`,jiti:`^2.7.0`,json5:`^2.2.3`,jsonfile:`^6.0.1`,"junit-report-builder":`3.1.0`,knip:`^6.43.0`,listr:`0.14.3`,"listr-update-renderer":`^0.5.0`,meow:`^14.1.0`,"mime-types":`^3.0.2`,"mock-fs":`^5.1.2`,"no-proxy":`^1.0.3`,"node-ask":`^1.0.1`,"node-fetch":`3.2.10`,"os-browserify":`^0.3.0`,"p-limit":`7.3.3`,"path-browserify":`^1.0.1`,picocolors:`^1.1.1`,picomatch:`2.2.2`,pluralize:`^8.0.0`,prettier:`^3.2.5`,prompts:`^2.4.2`,"read-package-up":`^12.0.0`,"simple-plist":`^1.4.0`,"snyk-nodejs-lockfile-parser":`2.10.4`,"snyk-nodejs-plugin":`2.2.1`,storybook:`^10.6.5`,"string-argv":`^0.4.0`,"strip-ansi":`^7.1.0`,"tmp-promise":`3.0.2`,"ts-dedent":`^1.0.0`,tsdown:`^0.23.7`,typescript:`^5.2.2`,"typescript-eslint":`^8.5.8`,uuid:`^14.0.3`,vite:`^8.3.8`,"vite-tsconfig-paths":`^6.1.1`,vitest:`^5.0.5`,"wrap-ansi":`^10.0.0`,ws:`^8.18.2`,"xxhash-wasm":`^1.0.2`,"yarn-or-npm":`^3.0.1`,yazl:`patch:yazl@npm%3A3.3.1#~/.yarn/patches/yazl-npm-3.3.1-2e7f415791.patch`,"zen-observable":`^0.10.0`,zod:`^3.22.2`},peerDependencies:{"@chromatic-com/cypress":`^0.*.* || ^1.0.0`,"@chromatic-com/playwright":`^0.*.* || ^1.0.0`,"@chromatic-com/vitest":`^0.*.* || ^1.0.0`},peerDependenciesMeta:{"@chromatic-com/cypress":{optional:!0},"@chromatic-com/playwright":{optional:!0},"@chromatic-com/vitest":{optional:!0}},publishConfig:{access:`public`,registry:`https://registry.npmjs.org/`},engines:{node:`>=22.0.0`},docs:`https://www.chromatic.com/docs/cli`,storybook:{icon:`https://user-images.githubusercontent.com/263385/101995175-2e087800-3c96-11eb-9a33-9860a1c3ce62.gif`,displayName:`Chromatic`}};function ac(e){let{input:t,flags:n,help:r}=c.n(`
    Chromatic CLI
      https://www.chromatic.com/docs/cli

    Usage
      $ chromatic --project-token <token>

    Required options
      --project-token, -t <token>               The unique code for your project. Alternatively, set CHROMATIC_PROJECT_TOKEN.

    Storybook options
      --build-script-name, -b [name]            The npm script Chromatic uses to build your Storybook before capturing snapshots. Use this if your Storybook build script is named differently. [build-storybook]
      --build-command <command>                 The command Chromatic uses to build your Storybook before capturing snapshots. Use this if your Storybook build command does not exist in "scripts" of your package.json (like using NX). Requires --output-dir.
      --output-dir, -o <dirname>                Relative path to target directory for building your Storybook, in case you want to preserve it. Otherwise a temporary directory is used if possible.
      --storybook-build-dir, -d <dirname>       If you have already built your Storybook, provide the path to the static build directory.

    Chromatic options
      --auto-accept-changes [branch]            If there are any changes to the build, automatically accept them. Only for [branch], if specified. Globs are supported via picomatch.
      --branch-name <branch>                    Override the branch name. Only meant to be used for unsupported CI integrations and fixing cross-fork PR comparisons. Also accepts <owner>:<branch> format.
      --ci                                      Mark this build as a CI build. Alternatively, set the 'CI' environment variable (present in most CI systems). This option implies --no-interactive.
      --config-file, -c <path>                  Path to a configuration file containing the options listed in JSON format. Uses "chromatic.config.json" by default.
      --exit-once-uploaded [branch]             Exit with 0 once the built version has been published to Chromatic. Only for [branch], if specified. Globs are supported via picomatch.
      --exit-zero-on-changes [branch]           If all tests render successfully but visual changes are found, exit with code 0 rather than the usual exit code 1. Only for [branch], if specified. Globs are supported via picomatch.
      --externals <filepath>                    Disable TurboSnap when any of these files have changed since the baseline build. Globs are supported via picomatch. This flag can be specified multiple times. Requires --only-changed.
      --ignore-last-build-on-branch <branch>    Do not use the last build on this branch as a baseline if it is no longer in history (i.e. branch was rebased). Globs are supported via picomatch.
      --only-changed [branch]                   Enables TurboSnap: Only run stories potentially affected by files changed since the baseline build. Only for [branch], if specified. Globs are supported via picomatch. For all other snapshots, TurboSnap will copy the baselines from the previous commit.
      --only-story-files <filepath>             Only run a single story or a subset of stories by their filename(s). Specify the full path to the story file relative to the root of your Storybook project. Globs are supported via picomatch. This flag can be specified multiple times.
      --only-story-names <storypath>            Only run a single story or a subset of stories. Story paths typically look like "Path/To/Story". Globs are supported via picomatch. This flag can be specified multiple times.
      --patch-build <headbranch...basebranch>   Create a patch build to fix a missing PR comparison.
      --repository-slug <slug>                  Override the repository slug. Only meant to be used for unsupported CI integrations and fixing cross-fork PR comparisons. Format: <ownerName>/<repoName>.
      --skip [branch]                           Skip Chromatic tests, but mark the commit as passing. Avoids blocking PRs due to required merge checks. Only for [branch], if specified. Globs are supported via picomatch.
      --storybook-base-dir <dirname>            Relative path from repository root to Storybook project root. Use with --only-changed and --storybook-build-dir when running Chromatic from a different directory than your Storybook.
      --storybook-config-dir <dirname>          Relative path from where you run Chromatic to your Storybook config directory ('.storybook'). Use with --only-changed and --storybook-build-dir when using a custom --config-dir (-c) flag for Storybook. [.storybook]
      --untraced <filepath>                     Disregard these files and their dependencies when tracing dependent stories for TurboSnap. Globs are supported via picomatch. This flag can be specified multiple times. Requires --only-changed.
      --zip                                     Publish your Storybook to Chromatic as a single zip file instead of individual content files.
      --skip-update-check                       Skip checking for available Chromatic package update.

    Debug options
      --debug                          Output verbose debugging information. This option implies --no-interactive, --diagnostics-file, --log-file.
      --diagnostics-file [filepath]    Write process context information to a JSON file. Disable via --no-diagnostics-file. [chromatic-diagnostics.json]
      --dry-run                        Run without actually publishing to Chromatic.
      --force-rebuild [branch]         Do not skip build when a rebuild is detected. Only for [branch], if specified. Globs are supported via picomatch.
      --junit-report [filepath]        Write build results to a JUnit XML file. {buildNumber} will be replaced with the actual build number. [chromatic-build-{buildNumber}.xml]
      --list                           List available stories. This requires running a full build.
      --log-file [filepath]            Write log output to a file. Disable via --no-log-file. [chromatic.log]
      --log-level <level>              One of "silent", "error", "warn", "info", "debug". Defaults to "info".
      --log-prefix <prefix>            Prefix for each log line. Defaults to current timestamp except in interactive mode. Set to "" to disable.
      --no-file-hashing                Disable file hashing. This will cause all files to be uploaded on every build.
      --no-interactive                 Don't ask interactive questions about your setup and don't overwrite output. Always true in non-TTY environments.
      --storybook-log-file [filepath]  Write Storybook build output to a file. Disable via --no-storybook-log-file. [storybook-build.log]
      --trace-changed [mode]           Print dependency trace for changed files to potentially affected story files. Set to "expanded" to list individual modules. Requires --only-changed.
      --upload-metadata                Upload Chromatic metadata files as part of the published Storybook. Includes diagnostics and log files, among others. This option enables --diagnostics-file, --log-file and --storybook-log-file, unless explicitly disabled via the 'no-' prefix. Defaults to enabled when running with TurboSnap.

    Deprecated options
      --preserve-missing            Treat missing stories as unchanged rather than deleted when comparing to the baseline.
    `,{importMeta:c.t,argv:e,booleanDefault:void 0,description:!1,pkg:{},version:ic.version,flags:{projectToken:{type:`string`,shortFlag:`t`,isMultiple:!0},buildScriptName:{type:`string`,shortFlag:`b`},buildCommand:{type:`string`},outputDir:{type:`string`,shortFlag:`o`,isMultiple:!0},storybookBuildDir:{type:`string`,shortFlag:`d`,isMultiple:!0},autoAcceptChanges:{type:`string`},branchName:{type:`string`},ci:{type:`boolean`},configFile:{type:`string`,shortFlag:`c`},exitOnceUploaded:{type:`string`},exitZeroOnChanges:{type:`string`},externals:{type:`string`,isMultiple:!0},ignoreLastBuildOnBranch:{type:`string`},onlyChanged:{type:`string`},onlyStoryFiles:{type:`string`,isMultiple:!0},onlyStoryNames:{type:`string`,isMultiple:!0},patchBuild:{type:`string`},repositorySlug:{type:`string`},skip:{type:`string`},storybookBaseDir:{type:`string`},storybookConfigDir:{type:`string`},untraced:{type:`string`,isMultiple:!0},zip:{type:`boolean`},debug:{type:`boolean`},diagnosticsFile:{type:`string`},dryRun:{type:`boolean`},fileHashing:{type:`boolean`,default:!0},forceRebuild:{type:`string`},interactive:{type:`boolean`,default:!0},junitReport:{type:`string`},list:{type:`boolean`},logFile:{type:`string`},logLevel:{type:`string`,choices:[`silent`,`error`,`warn`,`info`,`debug`]},logPrefix:{type:`string`},storybookLogFile:{type:`string`},traceChanged:{type:`string`},uploadMetadata:{type:`boolean`},preserveMissing:{type:`boolean`}}});return{argv:e,input:t,flags:n,help:r,pkg:ic}}var oc=/* @__PURE__ */ e.t(((e,t)=>{
/*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*/
let n=require("fs"),r=require("os"),i=require("path"),a=require("crypto"),o={fs:n.constants,os:r.constants},s=/XXXXXX/,c=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),l=r.platform()===`win32`,u=o.EBADF||o.os.errno.EBADF,d=o.ENOENT||o.os.errno.ENOENT,f=[],p=n.rmdirSync.bind(n),m=!1;function h(e,t){return n.rm(e,{recursive:!0},t)}function g(e){return n.rmSync(e,{recursive:!0})}function _(e,t){let r=j(e,t),i=r[0],a=r[1];R(i,function(e,t){if(e)return a(e);let r=t.tries;(function e(){try{let i=P(t);n.stat(i,function(t){
/* istanbul ignore else */
if(!t)return r-->0?e():a(/* @__PURE__ */ Error(`Could not get a unique tmp filename, max tries reached `+i));a(null,i)})}catch(e){a(e)}})()})}function v(e){let t=j(e)[0],r=z(t),i=r.tries;do{let e=P(r);try{n.statSync(e)}catch{return e}}while(i-->0);throw Error(`Could not get a unique tmp filename, max tries reached`)}function y(e,t){let r=j(e,t),i=r[0],a=r[1];_(i,function(e,t){
/* istanbul ignore else */
if(e)return a(e);n.open(t,c,i.mode||384,function(e,r){if(e)return a(e);if(i.discardDescriptor)return n.close(r,function(e){return a(e,t,void 0,T(t,-1,i,!1))});{let e=i.discardDescriptor||i.detachDescriptor;a(null,t,r,T(t,e?-1:r,i,!1))}})})}function b(e){let t=j(e)[0],r=t.discardDescriptor||t.detachDescriptor,i=v(t),a=n.openSync(i,c,t.mode||384);return t.discardDescriptor&&(n.closeSync(a),a=void 0),{name:i,fd:a,removeCallback:T(i,r?-1:a,t,!0)}}function x(e,t){let r=j(e,t),i=r[0],a=r[1];_(i,function(e,t){
/* istanbul ignore else */
if(e)return a(e);n.mkdir(t,i.mode||448,function(e){
/* istanbul ignore else */
if(e)return a(e);a(null,t,E(t,i,!1))})})}function S(e){let t=j(e)[0],r=v(t);return n.mkdirSync(r,t.mode||448),{name:r,removeCallback:E(r,t,!0)}}function C(e,t){let r=function(e){if(e&&!te(e))return t(e);t()};0<=e[0]?n.close(e[0],function(){n.unlink(e[1],r)}):n.unlink(e[1],r)}function w(e){let t=null;try{0<=e[0]&&n.closeSync(e[0])}catch(e){if(!ee(e)&&!te(e))throw e}finally{try{n.unlinkSync(e[1])}catch(e){te(e)||(t=e)}}if(t!==null)throw t}function T(e,t,n,r){let i=D(w,[t,e],r),a=D(C,[t,e],r,i);return n.keep||f.unshift(i),r?i:a}function E(e,t,r){let i=t.unsafeCleanup?h:n.rmdir.bind(n),a=D(t.unsafeCleanup?g:p,e,r),o=D(i,e,r,a);return t.keep||f.unshift(a),r?a:o}function D(e,t,n,r){let i=!1;return function a(o){
/* istanbul ignore else */
if(!i){let s=r||a,c=f.indexOf(s);return c>=0&&f.splice(c,1),i=!0,n||e===p||e===g?e(t):e(t,o||function(){})}}}function O(){
/* istanbul ignore else */
if(m)for(;f.length;)try{f[0]()}catch{}}function k(e){let t=[],n=null;try{n=a.randomBytes(e)}catch{n=a.pseudoRandomBytes(e)}for(let r=0;r<e;r++)t.push(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`[n[r]%62]);return t.join(``)}function A(e){return e===void 0}function j(e,t){
/* istanbul ignore else */
if(typeof e==`function`)return[{},e];
/* istanbul ignore else */
if(A(e))return[{},t];let n={};for(let t of Object.getOwnPropertyNames(e))n[t]=e[t];return[n,t]}function M(e,t,r){let a=i.isAbsolute(e)?e:i.join(t,e);n.stat(a,function(e){e?n.realpath(i.dirname(a),function(e,t){if(e)return r(e);r(null,i.join(t,i.basename(a)))}):n.realpath(a,r)})}function N(e,t){let r=i.isAbsolute(e)?e:i.join(t,e);try{return n.statSync(r),n.realpathSync(r)}catch{let e=n.realpathSync(i.dirname(r));return i.join(e,i.basename(r))}}function P(e){let t=e.tmpdir;
/* istanbul ignore else */
if(!A(e.name))return i.join(t,e.dir,e.name);
/* istanbul ignore else */
if(!A(e.template))return i.join(t,e.dir,e.template).replace(s,k(6));let n=[e.prefix?e.prefix:`tmp`,`-`,process.pid,`-`,k(12),e.postfix?`-`+e.postfix:``].join(``);return i.join(t,e.dir,n)}function F(e){if(!A(e.name)){let t=e.name;if(i.isAbsolute(t))throw Error(`name option must not contain an absolute path, found "${t}".`);let n=i.basename(t);if(n===`..`||n===`.`||n!==t)throw Error(`name option must not contain a path, found "${t}".`)}
/* istanbul ignore else */
if(!A(e.template)&&!e.template.match(s))throw Error(`Invalid template, found "${e.template}".`);
/* istanbul ignore else */
if(!A(e.tries)&&isNaN(e.tries)||e.tries<0)throw Error(`Invalid tries, found "${e.tries}".`);e.tries=A(e.name)?e.tries||3:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.prefix=A(e.prefix)?``:e.prefix,e.postfix=A(e.postfix)?``:e.postfix}function I(e,t,n,r){if(A(t))return r(null);M(t,n,function(t,a){if(t)return r(t);let o=i.relative(n,a);if(!a.startsWith(n))return r(/* @__PURE__ */ Error(`${e} option must be relative to "${n}", found "${o}".`));r(null,o)})}function L(e,t,n){if(A(t))return;let r=N(t,n),a=i.relative(n,r);if(!r.startsWith(n))throw Error(`${e} option must be relative to "${n}", found "${a}".`);return a}function R(e,t){B(e,function(n,r){if(n)return t(n);e.tmpdir=r;try{F(e,r)}catch(e){return t(e)}I(`dir`,e.dir,r,function(n,i){if(n)return t(n);e.dir=A(i)?``:i,I(`template`,e.template,r,function(n,r){if(n)return t(n);e.template=r,t(null,e)})})})}function z(e){let t=e.tmpdir=V(e);F(e,t);let n=L(`dir`,e.dir,t);return e.dir=A(n)?``:n,e.template=L(`template`,e.template,t),e}function ee(e){return ne(e,-u,`EBADF`)}function te(e){return ne(e,-d,`ENOENT`)}function ne(e,t,n){return l?e.code===n:e.code===n&&e.errno===t}function re(){m=!0}function B(e,t){return n.realpath(e&&e.tmpdir||r.tmpdir(),t)}function V(e){return n.realpathSync(e&&e.tmpdir||r.tmpdir())}process.addListener(`exit`,O),Object.defineProperty(t.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return V()}}),t.exports.dir=x,t.exports.dirSync=S,t.exports.file=y,t.exports.fileSync=b,t.exports.tmpName=_,t.exports.tmpNameSync=v,t.exports.setGracefulCleanup=re})),sc=/* @__PURE__ */ e.t(((e,t)=>{let{promisify:n}=require("util"),r=oc();t.exports.fileSync=r.fileSync;let i=n((e,t)=>r.file(e,(e,r,i,a)=>e?t(e):t(void 0,{path:r,fd:i,cleanup:n(a)})));t.exports.file=async e=>i(e),t.exports.withFile=async function(e,n){let{path:r,fd:i,cleanup:a}=await t.exports.file(n);try{return await e({path:r,fd:i})}finally{await a()}},t.exports.dirSync=r.dirSync;let a=n((e,t)=>r.dir(e,(e,r,i)=>e?t(e):t(void 0,{path:r,cleanup:n(i)})));t.exports.dir=async e=>a(e),t.exports.withDir=async function(e,n){let{path:r,cleanup:i}=await t.exports.dir(n);try{return await e({path:r})}finally{await i()}},t.exports.tmpNameSync=r.tmpNameSync,t.exports.tmpName=n(r.tmpName),t.exports.tmpdir=r.tmpdir,t.exports.setGracefulCleanup=r.setGracefulCleanup})),cc=/* @__PURE__ */ e.a(sc());
/**
* filesize
*
* @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 11.0.30
*/
const lc=`jedec`,uc=`byte`,dc=`array`,fc=`object`,pc=`string`,mc=`exponent`,hc=`round`,gc={symbol:{iec:{bits:[`bit`,`Kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],bytes:[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`]},jedec:{bits:[`bit`,`Kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],bytes:[`B`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`]}},fullform:{iec:[``,`kibi`,`mebi`,`gibi`,`tebi`,`pebi`,`exbi`,`zebi`,`yobi`],jedec:[``,`kilo`,`mega`,`giga`,`tera`,`peta`,`exa`,`zetta`,`yotta`]}},_c=[1,1024,1048576,1073741824,1099511627776,0x4000000000000,0x1000000000000000,0x400000000000000000,12089258196146292e8],vc=[1,1e3,1e6,1e9,0xe8d4a51000,0x38d7ea4c68000,0xde0b6b3a7640000,1e21,1e24],yc=Math.log(1024),bc=Math.log(1e3),xc={si:{isDecimal:!0,ceil:1e3,actualStandard:lc},iec:{isDecimal:!1,ceil:1024,actualStandard:`iec`},[lc]:{isDecimal:!1,ceil:1024,actualStandard:lc}};function Sc(e,t){return xc[e]?xc[e]:t===2?{isDecimal:!1,ceil:1024,actualStandard:`iec`}:{isDecimal:!0,ceil:1e3,actualStandard:lc}}function Cc(e,t,n,r,i,a,o,s,c,l,u,d=``,f={},p=``){let m;return m=e>0?0 .toPrecision(e):c&&l>0?0 .toFixed(l):0,o===mc?0:(m=Oc(e<=0&&(d===!0||d.length>0)?0:m,d,f,p,c&&e<=0,l,Math.round),u||=n?gc.symbol[t].bits[0]:gc.symbol[t].bytes[0],r[u]&&(u=r[u]),i&&(a[0]?u=a[0]:(u=gc.fullform[t][0],u+=n?`bit`:uc)),o===dc?[m,u]:o===fc?{value:m,symbol:u,exponent:0,unit:u}:m+s+u)}function wc(e,t,n,r,i,a=!0){let o;o=n?vc[t]:_c[t];let s=e/o;return r&&(s*=8,a&&s>=i&&t<8&&(s/=i,t++)),{result:s,e:t}}function Tc(e,t,n,r,i){if(typeof t==`string`&&(t=Number(t)),t===-1||isNaN(t)){if(t=0,r)for(;t<8&&e>=10n**BigInt(3*(t+1));)t++;else for(;t<8&&e>=1024n**BigInt(t+1);)t++}else t=t<0?0:Math.floor(t);return t>8?(i>0&&(i+=8-t),{e:8,precision:i}):{e:t,precision:i}}function Ec(e,t,n,r,i,a=!0){let o=n?10n**BigInt(3*t):1024n**BigInt(t),s=10n**16n,c=Number(e*s/o)/Number(s);return r&&(c*=8,a&&c>=i&&t<8&&(c/=i,t++)),{result:c,e:t}}function Dc(e,t,n,r,i,a,o,s,c,l){if(typeof e==`string`&&(e=parseFloat(e)),typeof t!=`number`||isNaN(t)||(t=Math.floor(t),t<1||t>100))throw TypeError(`Invalid precision`);let u=e.toPrecision(t),d=l===-1||isNaN(l);if(u.includes(`e`)&&n<8&&d){n++;let{result:e}=wc(r,n,i,a,o),l;l=c>0?10**c:1;let d;d=l===1?s(e):s(e*l)/l,u=d.toPrecision(t)}return{value:u,e:n}}function Oc(e,t,n,r,i,a,o){let s=e,c=i&&a>0?{minimumFractionDigits:a,maximumFractionDigits:a}:void 0;if((t===!0||t.length>0)&&typeof s==`string`&&Number(s)!==0&&(s=parseFloat(s)),t===!0)s=s.toLocaleString(void 0,c);else if(t.length>0)s=s.toLocaleString(t,{...n,...c});else{if(r.length>0&&i&&a>0){let e=10**a;s=o(s*e)/e}typeof s==`number`&&isFinite(s)&&s.toString().includes(`e`)&&(s=s.toLocaleString(`en-US`,{useGrouping:!1,maximumFractionDigits:20})),r.length>0&&(s=s.toString().replace(`.`,r))}if(i&&a>0&&t!==!0&&t.length===0){let e=s.toString(),t=r||`.`,n=e.split(t),i=n[1]||``;s=`${n[0]}${t}${i.padEnd(a,`0`)}`}return s}function kc(e,t,n,r,i){return typeof t==`string`&&(t=Number(t)),t===-1||isNaN(t)?(t=Math.floor(r?Math.log(e)/bc:Math.log(e)/yc),t<0&&(t=0)):t=t<0?0:Math.floor(t),t>8?(i>0&&(i+=8-t),{e:8,precision:i}):{e:t,precision:i}}function Ac(e,t,n,r,i,a){let o;o=n>0&&r>0?10**r:1;let s;return s=o===1?i(e):i(e*o)/o,s===t&&n<8&&a&&(s=1,n++),{value:s,e:n}}function jc(e,t,n,r){let i=gc.symbol[e][t?`bits`:`bytes`],a;return a=r&&n===1?t?`kbit`:`kB`:i[n],a}function Mc(e,t,n,r,i,a,o,s,c,l,u,d,f,p){t&&(e[0]=typeof e[0]==`string`?`-${e[0]}`:e[0]===0?`-0`:-e[0]),n[e[1]]&&(e[1]=n[e[1]]);let m;if(m=typeof e[0]==`string`?parseFloat(e[0]):e[0],e[0]=Oc(e[0],r,i,a,o,s,p),c){let t;t=f?`bit`:uc;let n;n=Math.abs(m)===1?``:`s`,e[1]=l[d]?l[d]:gc.fullform[u][d]+t+n}}function Nc(e,t,n,r,i){if(r!==dc&&r!==fc&&r!==pc&&r!==mc)throw TypeError(`Invalid output: ${r}`);if(r===dc)return e;if(r===fc)return{value:e[0],symbol:e[1],exponent:t,unit:n};let a;return a=i===` `?`${e[0]} ${e[1]}`:e.join(i),a}function Pc(e,{bits:t=!1,pad:n=!1,base:r=-1,round:i=2,locale:a=``,localeOptions:o={},separator:s=``,spacer:c=` `,symbols:l={},standard:u=``,output:d=pc,fullform:f=!1,fullforms:p=[],exponent:m=-1,roundingMethod:h=hc,precision:g=0}={}){let _=m,v,y=[],b=0,x=``,S=typeof e==`bigint`;if(v=Number(e),isNaN(v)||!isFinite(v))throw TypeError(`Invalid number`);let{isDecimal:C,ceil:w,actualStandard:T}=Sc(u,r),E=f===!0,D=v<0,O=Math[h];if(h!==hc&&h!==`floor`&&h!==`ceil`)throw TypeError(`Invalid rounding method`);if(D&&(v=-v),v===0)return Cc(g,T,t,l,E,p,d,c,n,i,void 0,a,o,s);let k=S?D?-BigInt(e):BigInt(e):null,A=g;if(S){let{e,precision:t}=Tc(k,_,m,C,g);_=e,A=t}else{let{e,precision:t}=kc(v,_,m,C,g);_=e,A=t}let j=m===-1||isNaN(m),M;M=S?Ec(k,_,C,t,w,j):wc(v,_,C,t,w,j),b=M.result,_=M.e;let N=Ac(b,w,_,i,O,j);if(y[0]=N.value,_=N.e,A>0){let e=Dc(y[0],A,_,v,C,t,w,O,i,m);y[0]=e.value,_=e.e}return d===mc?_:(x=jc(T,t,_,C),y[1]=x,Mc(y,D,l,a,o,s,n,i,E,p,T,_,t,O),Nc(y,_,x,d,c))}var Fc=({announcedBuild:e,build:t},n,r=/* @__PURE__ */ new Date)=>`<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Build ${e.number} metadata files</title>
    <style>
      body {
        -webkit-font-smoothing: antialiased;
        font-family: 'Nunito Sans', sans-serif;
        font-size: 14px;
        line-height: 1;
        background: #F6F9FC;
        color: #5C6870;
        margin: 20px;
      }
      h1 {
        margin: 0 0 6px 0;
        color: #2E3438;
        font-size: 28px;
        font-weight: 700;
      }
      ul {
        margin: 1em 2em;
        padding: 0;
        line-height: 1.7;
      }
      a {
        display: inline-block;
        color: #029cfd;
        text-decoration: none;
        font-weight: bold;
      }
      a:hover {
        text-decoration: underline;
      }
      svg {
        width: 20px;
        height: 20px;
      }
      path {
        fill: currentColor;
      }
    </style>
    <link rel="stylesheet" data-href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap"/>
  </head>
  <body>
    <h1>Build ${e.number} ${t?`<a href="${t.webUrl}"><svg viewBox="0 0 1024 1024"><path d="M743.52 529.234c5.616-5.616 83.048-83.046 88.462-88.46 30.944-32.778 47.97-75.636 47.97-120.792 0-47.048-18.304-91.26-51.542-124.484-33.228-33.22-77.43-51.516-124.458-51.516-45.024 0-87.792 16.94-120.536 47.72l-104.458 104.456c-30.792 32.738-47.734 75.512-47.734 120.548 0 41.916 14.576 81.544 41.248 113.196 3.264 3.876 6.666 7.664 10.292 11.29 4.258 4.258 8.704 8.262 13.304 12.022 0.054 0.080 0.096 0.152 0.148 0.232 9.572 7.308 15.778 18.804 15.778 31.776 0 22.094-17.914 40-40.004 40-8.542 0-16.442-2.696-22.938-7.26-2.746-1.93-20.622-17.43-30.35-28.050-0.008-0.010-0.018-0.018-0.026-0.028-4.992-5.432-13.234-15.23-18.552-22.65s-16.556-25.872-17.036-26.736c-0.7-1.262-2.974-5.526-3.422-6.39-0.69-1.334-6.118-12.67-6.114-12.67-14.342-31.96-22.332-67.4-22.332-104.728 0-60.826 21.198-116.648 56.58-160.544 0.252-0.314 4.61-5.594 6.594-7.866 0.304-0.35 5.038-5.636 7.16-7.874 0.252-0.268 105.86-105.874 106.128-106.126 45.902-43.584 107.958-70.314 176.264-70.314 141.382 0 255.998 114.5 255.998 256 0 68.516-26.882 130.688-70.652 176.61-0.144 0.148-109.854 109.546-112.090 111.528-0.958 0.848-5.072 4.352-5.072 4.352-6.448 5.434-13.132 10.592-20.1 15.378 0.412-6.836 0.644-13.702 0.644-20.6 0-26.46-3.108-52.206-8.918-76.918l-0.236-1.102zM616.144 767.82c35.382-43.896 56.58-99.718 56.58-160.544 0-37.328-7.99-72.768-22.332-104.728 0.004 0 0.006-0.002 0.010-0.004-0.258-0.576-0.538-1.14-0.8-1.714-0.686-1.498-2.894-6.112-3.296-6.93-0.668-1.344-2.952-5.732-3.386-6.604-3.48-6.982-8.708-15.126-9.49-16.366-0.498-0.792-0.996-1.58-1.502-2.364-0.834-1.29-15.364-22.066-26.656-34.466-0.008-0.010-0.018-0.018-0.026-0.028-7.056-8.448-24.932-24.198-30.35-28.050-6.47-4.602-14.396-7.26-22.938-7.26-22.090 0-40.004 17.906-40.004 40 0 12.97 6.206 24.466 15.778 31.776 0.052 0.080 0.094 0.152 0.148 0.232 4.602 3.76 20.334 19.434 23.598 23.31 26.672 31.65 41.248 71.28 41.248 113.196 0 45.038-16.944 87.81-47.734 120.548l-104.458 104.456c-32.742 30.782-75.512 47.72-120.536 47.72-47.028 0-91.228-18.294-124.458-51.516-33.236-33.224-51.542-77.436-51.542-124.484 0-45.154 17.028-88.014 47.97-120.792 5.414-5.414 40.812-40.812 68.958-68.958 7.176-7.176 13.888-13.886 19.504-19.502v-0.002c-0.356-1.562-0.246-1.096-0.246-1.096-5.81-24.712-8.918-50.458-8.918-76.918 0-6.898 0.232-13.764 0.644-20.6-6.966 4.788-20.1 15.33-20.1 15.33-0.734 0.62-9.518 8.388-11.68 10.45-0.16 0.154-105.338 105.33-105.482 105.478-43.77 45.922-70.652 108.094-70.652 176.61 0 141.5 114.616 256 255.998 256 68.306 0 130.362-26.73 176.264-70.314 0.27-0.254 105.876-105.86 106.128-106.126 0.004-0.002 13.506-15.426 13.758-15.74z"></path></svg></a>`:``} </h1>
    <span>Metadata files</span>
    <ul>
    ${n.map(({targetPath:e,contentLength:t})=>{let n=e.replace(/^\.chromatic\//,``);return`<li><a href="${n}">${n}</a> <small>(${Pc(t)})</small></li>`}).join(``)}
    </ul>
    <small>Generated on ${r.toLocaleString(`en`,{timeStyle:`medium`,dateStyle:`full`,hourCycle:`h24`,timeZone:`UTC`})} UTC</small>
  </body>
</html>`,Y=/* @__PURE__ */ e.a(d.u()),Ic=(e,t)=>{let r=(0,Y.default)(`metadata file`,t.length,!0),a=`- ${t.map(e=>e.targetPath.replace(/^\.chromatic\//,``)).join(`
- `)}`;return q.default`${i.n} Uploading {bold ${r}} to ${n.Tt(e)}\n${a}`};const Lc=({fileCount:e,maxFileCount:t})=>(0,J.dedent)(q.default`
    ${i.t} {bold Attempted to upload too many files}
    You're not allowed to upload more than ${t} files per build.
    Your Storybook contains ${e} files. This is a very high number.
    Do you have files in a static/public directory that shouldn't be there?
    Contact customer support if you need to increase this limit.
  `),Rc=({filePaths:e,maxFileSize:t})=>(0,J.dedent)(q.default`
    ${i.t} {bold Attempted to exceed maximum file size}
    You're attempting to upload files that exceed the maximum file size of ${Pc(t)}.
    Contact customer support if you need to increase this limit.
    - ${e.map(e=>e).join(`
- `)}
  `);function zc({target:e},t=!1){let n=Bc(e.targetPath)===e.targetPath?`The file may have been modified during the upload process.`:`It seems the file path may contain illegal characters.`,r=(0,J.dedent)(q.default`
    ${i.t} Failed to upload {bold ${e.localPath}} to {bold ${e.targetPath}}
    ${n}
    ${t?``:q.default`Enable the {bold debug} option to get more information.`}
  `);return t?r+JSON.stringify(e,void 0,2):r}function Bc(e){return e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}var Vc=/* @__PURE__ */ e.t(((e,t)=>{function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}let r=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function i(e){if(Buffer.isBuffer(e))return e;if(typeof e==`number`)return Buffer.alloc(e);if(typeof e==`string`)return Buffer.from(e);throw Error(`input must be buffer, number, or string, received `+typeof e)}function a(e){let t=i(4);return t.writeInt32BE(e,0),t}function o(e,t){e=i(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let n=~~t^-1;for(var a=0;a<e.length;a++)n=r[(n^e[a])&255]^n>>>8;return n^-1}function s(){return a(o.apply(null,arguments))}s.signed=function(){return o.apply(null,arguments)},s.unsigned=function(){return o.apply(null,arguments)>>>0},t.exports=/* @__PURE__ */ n(s)})),Hc=(/* @__PURE__ */ e.t((e=>{var t=require("fs"),n=require("stream").Transform,r=require("stream").PassThrough,i=require("zlib"),a=require("util"),o=require("events").EventEmitter,s=require("events").errorMonitor,c=Vc();e.ZipFile=l,a.inherits(l,o);function l(){this.outputStream=new r,this.entries=[],this.firstNotDoneEntryIndex=0,this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1,this.errored=!1,this.on(s,function(){this.errored=!0})}l.prototype.addFile=function(e,n,r){var i=this;if(n=x(n,!1),r??={},!g(i)){var a=new C(n,!1,r);i.entries.push(a),t.stat(e,function(n,o){if(n)return i.emit(`error`,n);if(!o.isFile())return i.emit(`error`,/* @__PURE__ */ Error(`not a file: `+e));a.uncompressedSize=o.size,r.mtime??a.setLastModDate(o.mtime),r.mode??a.setFileAttributesMode(o.mode),a.setFileDataPumpFunction(function(){var n=t.createReadStream(e);a.state=C.FILE_DATA_IN_PROGRESS,n.on(`error`,function(e){i.emit(`error`,e)}),f(i,a,n)}),m(i)})}},l.prototype.addReadStream=function(e,t,n){this.addReadStreamLazy(t,n,function(t){t(null,e)})},l.prototype.addReadStreamLazy=function(e,t,n){var r=this;if(typeof t==`function`&&(n=t,t=null),t??={},e=x(e,!1),!g(r)){var i=new C(e,!1,t);r.entries.push(i),i.setFileDataPumpFunction(function(){i.state=C.FILE_DATA_IN_PROGRESS,n(function(e,t){if(e)return r.emit(`error`,e);f(r,i,t)})}),m(r)}},l.prototype.addBuffer=function(e,t,n){var r=this;if(t=x(t,!1),e.length>1073741823)throw Error(`buffer too large: `+e.length+` > 1073741823`);if(n??={},n.size!=null)throw Error(`options.size not allowed`);if(g(r))return;var a=new C(t,!1,n);a.uncompressedSize=e.length,a.crc32=c.unsigned(e),a.crcAndFileSizeKnown=!0,r.entries.push(a),a.compressionLevel===0?o(e):i.deflateRaw(e,{level:a.compressionLevel},function(e,t){o(t)});function o(e){a.compressedSize=e.length,a.setFileDataPumpFunction(function(){d(r,e),d(r,a.getDataDescriptor()),a.state=C.FILE_DATA_DONE,setImmediate(function(){m(r)})}),m(r)}},l.prototype.addEmptyDirectory=function(e,t){var n=this;if(e=x(e,!0),t??={},t.size!=null)throw Error(`options.size not allowed`);if(t.compress!=null)throw Error(`options.compress not allowed`);if(t.compressionLevel!=null)throw Error(`options.compressionLevel not allowed`);if(!g(n)){var r=new C(e,!0,t);n.entries.push(r),r.setFileDataPumpFunction(function(){d(n,r.getDataDescriptor()),r.state=C.FILE_DATA_DONE,m(n)}),m(n)}};var u=V([80,75,5,6]);l.prototype.end=function(e,t){if(typeof e==`function`&&(t=e,e=null),e??={},!this.ended&&(this.ended=!0,!this.errored)){if(this.calculatedTotalSizeCallback=t,this.forceZip64Eocd=!!e.forceZip64Format,e.comment){if(this.comment=typeof e.comment==`string`?re(e.comment):e.comment,this.comment.length>65535)throw Error(`comment is too large`);if(ie(this.comment,u))throw Error(`comment contains end of central directory record signature`)}else this.comment=S;m(this)}};function d(e,t){e.outputStream.write(t),e.outputStreamCursor+=t.length}function f(e,t,n){var a=new ee,o=new z,s=t.compressionLevel===0?new r:new i.DeflateRaw({level:t.compressionLevel}),c=new z;n.pipe(a).pipe(o).pipe(s).pipe(c).pipe(e.outputStream,{end:!1}),c.on(`end`,function(){if(t.crc32=a.crc32,t.uncompressedSize==null)t.uncompressedSize=o.byteCount;else if(t.uncompressedSize!==o.byteCount)return e.emit(`error`,/* @__PURE__ */ Error(`file data stream has unexpected number of bytes`));t.compressedSize=c.byteCount,e.outputStreamCursor+=t.compressedSize,d(e,t.getDataDescriptor()),t.state=C.FILE_DATA_DONE,m(e)})}function p(e){if(e.compress!=null&&e.compressionLevel!=null&&!!e.compress!=!!e.compressionLevel)throw Error(`conflicting settings for compress and compressionLevel`);return e.compressionLevel==null?e.compress===!1?0:6:e.compressionLevel}function m(e){if(e.allDone||e.errored)return;if(e.ended&&e.calculatedTotalSizeCallback!=null){var t=h(e);t!=null&&(e.calculatedTotalSizeCallback(t),e.calculatedTotalSizeCallback=null)}var n=r();function r(){for(var t=e.firstNotDoneEntryIndex;t<e.entries.length;t++){var n=e.entries[t];if(n.state<C.FILE_DATA_DONE)return e.firstNotDoneEntryIndex=t,n}return e.firstNotDoneEntryIndex=e.entries.length,null}if(n!=null){if(n.state<C.READY_TO_PUMP_FILE_DATA||n.state===C.FILE_DATA_IN_PROGRESS)return;n.relativeOffsetOfLocalHeader=e.outputStreamCursor,d(e,n.getLocalFileHeader()),n.doFileDataPump()}else e.ended&&(e.offsetOfStartOfCentralDirectory=e.outputStreamCursor,e.entries.forEach(function(t){d(e,t.getCentralDirectoryRecord())}),d(e,b(e)),e.outputStream.end(),e.allDone=!0)}function h(e){for(var t=0,n=0,r=0;r<e.entries.length;r++){var i=e.entries[r];if(i.compressionLevel!==0)return-1;if(i.state>=C.READY_TO_PUMP_FILE_DATA){if(i.uncompressedSize==null)return-1}else if(i.uncompressedSize==null)return null;i.relativeOffsetOfLocalHeader=t;var a=i.useZip64Format();t+=w+i.utf8FileName.length,t+=i.uncompressedSize,i.crcAndFileSizeKnown||(t+=a?j:A),n+=M+i.utf8FileName.length+i.fileComment.length,i.forceDosTimestamp||(n+=N),a&&(n+=P)}var o=0;return(e.forceZip64Eocd||e.entries.length>=65535||n>=65535||t>=4294967295)&&(o+=_+v),o+=y+e.comment.length,t+n+o}function g(e){if(e.ended)throw Error(`cannot add entries after calling end()`);return!!e.errored}var _=56,v=20,y=22;function b(e,t){var n=!1,r=e.entries.length;(e.forceZip64Eocd||e.entries.length>=65535)&&(r=65535,n=!0);var i=e.outputStreamCursor-e.offsetOfStartOfCentralDirectory,a=i;(e.forceZip64Eocd||i>=4294967295)&&(a=4294967295,n=!0);var o=e.offsetOfStartOfCentralDirectory;if((e.forceZip64Eocd||e.offsetOfStartOfCentralDirectory>=4294967295)&&(o=4294967295,n=!0),t)return n?_+v+y:y;var s=B(y+e.comment.length);if(s.writeUInt32LE(101010256,0),s.writeUInt16LE(0,4),s.writeUInt16LE(0,6),s.writeUInt16LE(r,8),s.writeUInt16LE(r,10),s.writeUInt32LE(a,12),s.writeUInt32LE(o,16),s.writeUInt16LE(e.comment.length,20),e.comment.copy(s,22),!n)return s;var c=B(_);c.writeUInt32LE(101075792,0),R(c,_-12,4),c.writeUInt16LE(D,12),c.writeUInt16LE(E,14),c.writeUInt32LE(0,16),c.writeUInt32LE(0,20),R(c,e.entries.length,24),R(c,e.entries.length,32),R(c,i,40),R(c,e.offsetOfStartOfCentralDirectory,48);var l=B(v);return l.writeUInt32LE(117853008,0),l.writeUInt32LE(0,4),R(l,e.outputStreamCursor,8),l.writeUInt32LE(1,16),Buffer.concat([c,l,s])}function x(e,t){if(e===``)throw Error(`empty metadataPath`);if(e=e.replace(/\\/g,`/`),/^[a-zA-Z]:/.test(e)||/^\//.test(e))throw Error(`absolute path: `+e);if(e.split(`/`).indexOf(`..`)!==-1)throw Error(`invalid relative path: `+e);var n=/\/$/.test(e);if(t)n||(e+=`/`);else if(n)throw Error(`file path cannot end with '/': `+e);return e}var S=B(0);function C(e,t,n){if(this.utf8FileName=V(e),this.utf8FileName.length>65535)throw Error(`utf8 file name too long. `+utf8FileName.length+` > 65535`);if(this.isDirectory=t,this.state=C.WAITING_FOR_METADATA,this.setLastModDate(n.mtime==null?/* @__PURE__ */ new Date:n.mtime),this.forceDosTimestamp=!!n.forceDosTimestamp,n.mode==null?this.setFileAttributesMode(t?16893:33204):this.setFileAttributesMode(n.mode),t?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,n.size!=null&&(this.uncompressedSize=n.size)),this.compressionLevel=t?0:p(n),this.forceZip64Format=!!n.forceZip64Format,n.fileComment){if(this.fileComment=typeof n.fileComment==`string`?V(n.fileComment,`utf-8`):n.fileComment,this.fileComment.length>65535)throw Error(`fileComment is too large`)}else this.fileComment=S}C.WAITING_FOR_METADATA=0,C.READY_TO_PUMP_FILE_DATA=1,C.FILE_DATA_IN_PROGRESS=2,C.FILE_DATA_DONE=3,C.prototype.setLastModDate=function(e){this.mtime=e;var t=L(e);this.lastModFileTime=t.time,this.lastModFileDate=t.date},C.prototype.setFileAttributesMode=function(e){if((e&65535)!==e)throw Error(`invalid mode. expected: 0 <= `+e+` <= 65535`);this.externalFileAttributes=e<<16>>>0},C.prototype.setFileDataPumpFunction=function(e){this.doFileDataPump=e,this.state=C.READY_TO_PUMP_FILE_DATA},C.prototype.useZip64Format=function(){return this.forceZip64Format||this.uncompressedSize!=null&&this.uncompressedSize>4294967294||this.compressedSize!=null&&this.compressedSize>4294967294||this.relativeOffsetOfLocalHeader!=null&&this.relativeOffsetOfLocalHeader>4294967294};var w=30,T=20,E=45,D=831,O=2048,k=8;C.prototype.getLocalFileHeader=function(){var e=0,t=0,n=0;this.crcAndFileSizeKnown&&(e=this.crc32,t=this.compressedSize,n=this.uncompressedSize);var r=B(w),i=O;return this.crcAndFileSizeKnown||(i|=k),r.writeUInt32LE(67324752,0),r.writeUInt16LE(T,4),r.writeUInt16LE(i,6),r.writeUInt16LE(this.getCompressionMethod(),8),r.writeUInt16LE(this.lastModFileTime,10),r.writeUInt16LE(this.lastModFileDate,12),r.writeUInt32LE(e,14),r.writeUInt32LE(t,18),r.writeUInt32LE(n,22),r.writeUInt16LE(this.utf8FileName.length,26),r.writeUInt16LE(0,28),Buffer.concat([r,this.utf8FileName])};var A=16,j=24;C.prototype.getDataDescriptor=function(){if(this.crcAndFileSizeKnown)return S;if(this.useZip64Format()){var e=B(j);return e.writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),R(e,this.compressedSize,8),R(e,this.uncompressedSize,16),e}var e=B(A);return e.writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),e.writeUInt32LE(this.compressedSize,8),e.writeUInt32LE(this.uncompressedSize,12),e};var M=46,N=9,P=28;C.prototype.getCentralDirectoryRecord=function(){var e=B(M),t=O;this.crcAndFileSizeKnown||(t|=k);var n=S;if(!this.forceDosTimestamp){n=B(N),n.writeUInt16LE(21589,0),n.writeUInt16LE(N-4,2),n.writeUInt8(3,4);var r=Math.floor(this.mtime.getTime()/1e3);r<-2147483648&&(r=-2147483648),r>2147483647&&(r=2147483647),n.writeUInt32LE(r,5)}var i=this.compressedSize,a=this.uncompressedSize,o=this.relativeOffsetOfLocalHeader,s=T,c=S;return this.useZip64Format()&&(i=4294967295,a=4294967295,o=4294967295,s=E,c=B(P),c.writeUInt16LE(1,0),c.writeUInt16LE(P-4,2),R(c,this.uncompressedSize,4),R(c,this.compressedSize,12),R(c,this.relativeOffsetOfLocalHeader,20)),e.writeUInt32LE(33639248,0),e.writeUInt16LE(D,4),e.writeUInt16LE(s,6),e.writeUInt16LE(t,8),e.writeUInt16LE(this.getCompressionMethod(),10),e.writeUInt16LE(this.lastModFileTime,12),e.writeUInt16LE(this.lastModFileDate,14),e.writeUInt32LE(this.crc32,16),e.writeUInt32LE(i,20),e.writeUInt32LE(a,24),e.writeUInt16LE(this.utf8FileName.length,28),e.writeUInt16LE(n.length+c.length,30),e.writeUInt16LE(this.fileComment.length,32),e.writeUInt16LE(0,34),e.writeUInt16LE(0,36),e.writeUInt32LE(this.externalFileAttributes,38),e.writeUInt32LE(o,42),Buffer.concat([e,this.utf8FileName,n,c,this.fileComment])},C.prototype.getCompressionMethod=function(){return this.compressionLevel===0?0:8};var F=new Date(1980,0,1),I=new Date(2107,11,31,23,59,58);function L(e){e<F?e=F:e>I&&(e=I);var t=0;t|=e.getDate()&31,t|=(e.getMonth()+1&15)<<5,t|=(e.getFullYear()-1980&127)<<9;var n=0;return n|=Math.floor(e.getSeconds()/2),n|=(e.getMinutes()&63)<<5,n|=(e.getHours()&31)<<11,{date:t,time:n}}function R(e,t,n){var r=Math.floor(t/4294967296),i=t%4294967296;e.writeUInt32LE(i,n),e.writeUInt32LE(r,n+4)}a.inherits(z,n);function z(e){n.call(this,e),this.byteCount=0}z.prototype._transform=function(e,t,n){this.byteCount+=e.length,n(null,e)},a.inherits(ee,n);function ee(e){n.call(this,e),this.crc32=0}ee.prototype._transform=function(e,t,n){this.crc32=c.unsigned(e,this.crc32),n(null,e)};var te=`\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xA0`;if(te.length!==256)throw Error(`assertion failure`);var ne=null;function re(e){if(/^[\x20-\x7e]*$/.test(e))return V(e,`utf-8`);if(ne==null){ne={};for(var t=0;t<te.length;t++)ne[te[t]]=t}for(var n=B(e.length),t=0;t<e.length;t++){var r=ne[e[t]];if(r==null)throw Error(`character not encodable in CP437: `+JSON.stringify(e[t]));n[t]=r}return n}function B(e){B=t;try{return B(e)}catch{return B=n,B(e)}function t(e){return Buffer.allocUnsafe(e)}function n(e){return new Buffer(e)}}function V(e,t){V=n;try{return V(e,t)}catch{return V=r,V(e,t)}function n(e,t){return Buffer.from(e,t)}function r(e,t){return new Buffer(e,t)}}function ie(e,t){ie=n;try{return ie(e,t)}catch{return ie=r,ie(e,t)}function n(e,t){return e.includes(t)}function r(e,t){for(var n=0;n<=e.length-t.length;n++)for(var r=0;;r++){if(r===t.length)return!0;if(e[n+r]!==t[r])break}return!1}}})))();async function Uc(e,t){let n=new Hc.ZipFile,r=await(0,cc.file)({postfix:`.zip`}),i=(0,y.createWriteStream)(``,{fd:r.fd});return new Promise((a,o)=>{let s=e=>{o(e),n.outputStream.destroy(),i.destroy(),(0,L.rm)(r.path,{force:!0}).catch(()=>{})};i.on(`close`,()=>{a({path:r.path,size:i.bytesWritten})}),i.on(`error`,s),n.on(`error`,s),n.outputStream.pipe(i);try{for(let{localPath:r,targetPath:i}of t)e.log.debug(`Adding to zip archive: ${i}`),n.addFile(r,i,{compressionLevel:9,forceDosTimestamp:!0});e.log.debug(`Finalizing zip archive`),n.end()}catch(e){s(e)}})}var Wc=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},X=(e,t,n)=>(Wc(e,t,`read from private field`),n?n.call(e):t.get(e)),Gc=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Kc=(e,t,n,r)=>(Wc(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),qc=(e,t,n)=>(Wc(e,t,`access private method`),n),Z=e=>typeof e==`function`,Jc=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Yc=e=>Jc(e)&&Z(e[Symbol.asyncIterator]),Xc=65536;async function*Zc(e){if(e.byteLength<=Xc){yield e;return}let t=0;for(;t<e.byteLength;){let n=Math.min(e.byteLength-t,Xc),r=e.buffer.slice(t,t+n);t+=r.byteLength,yield new Uint8Array(r)}}async function*Qc(e){let t=e.getReader();for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}async function*$c(e){for await(let t of e)yield*Zc(t)}var el=e=>{if(Yc(e))return $c(e);if(Z(e.getReader))return $c(Qc(e));throw TypeError(`Unsupported data source: Expected either ReadableStream or async iterable.`)};async function*tl(e){let t=0;for(;t!==e.size;){let n=await e.slice(t,Math.min(e.size,t+Xc)).arrayBuffer();t+=n.byteLength,yield new Uint8Array(n)}}async function*nl(e,t=!1){for(let n of e)ArrayBuffer.isView(n)?t?yield*Zc(n):yield n:Z(n.stream)?yield*el(n.stream()):yield*tl(n)}function*rl(e,t,n=0,r){r??=t;let i=n<0?Math.max(t+n,0):Math.min(n,t),a=r<0?Math.max(t+r,0):Math.min(r,t),o=Math.max(a-i,0),s=0;for(let t of e){if(s>=o)break;let e=ArrayBuffer.isView(t)?t.byteLength:t.size;if(i&&e<=i)i-=e,a-=e;else{let n;ArrayBuffer.isView(t)?(n=t.subarray(i,Math.min(e,a)),s+=n.byteLength):(n=t.slice(i,Math.min(e,a)),s+=n.size),a-=e,i=0,yield n}}}var il,al,ol,sl=class e{constructor(t=[],n={}){if(Gc(this,il,[]),Gc(this,al,``),Gc(this,ol,0),n??={},typeof t!=`object`||!t)throw TypeError(`Failed to construct 'Blob': The provided value cannot be converted to a sequence.`);if(!Z(t[Symbol.iterator]))throw TypeError(`Failed to construct 'Blob': The object must have a callable @@iterator property.`);if(typeof n!=`object`&&!Z(n))throw TypeError(`Failed to construct 'Blob': parameter 2 cannot convert to dictionary.`);let r=new TextEncoder;for(let n of t){let t;t=ArrayBuffer.isView(n)?new Uint8Array(n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)):n instanceof ArrayBuffer?new Uint8Array(n.slice(0)):n instanceof e?n:r.encode(String(n)),Kc(this,ol,X(this,ol)+(ArrayBuffer.isView(t)?t.byteLength:t.size)),X(this,il).push(t)}let i=n.type===void 0?``:String(n.type);Kc(this,al,/^[\x20-\x7E]*$/.test(i)?i:``)}static[Symbol.hasInstance](e){return!!(e&&typeof e==`object`&&Z(e.constructor)&&(Z(e.stream)||Z(e.arrayBuffer))&&/^(Blob|File)$/.test(e[Symbol.toStringTag]))}get type(){return X(this,al)}get size(){return X(this,ol)}slice(t,n,r){return new e(rl(X(this,il),this.size,t,n),{type:r})}async text(){let e=new TextDecoder,t=``;for await(let n of nl(X(this,il)))t+=e.decode(n,{stream:!0});return t+=e.decode(),t}async arrayBuffer(){let e=new Uint8Array(this.size),t=0;for await(let n of nl(X(this,il)))e.set(n,t),t+=n.length;return e.buffer}stream(){let e=nl(X(this,il),!0);return new ReadableStream({async pull(t){let{value:n,done:r}=await e.next();if(r)return queueMicrotask(()=>t.close());t.enqueue(n)},async cancel(){await e.return()}})}get[Symbol.toStringTag](){return`Blob`}};il=/* @__PURE__ */ new WeakMap,al=/* @__PURE__ */ new WeakMap,ol=/* @__PURE__ */ new WeakMap;var cl=sl;Object.defineProperties(cl.prototype,{type:{enumerable:!0},size:{enumerable:!0},slice:{enumerable:!0},stream:{enumerable:!0},text:{enumerable:!0},arrayBuffer:{enumerable:!0}});var ll=e=>e instanceof cl,ul,dl,fl=class extends cl{constructor(e,t,n={}){if(super(e,n),Gc(this,ul,void 0),Gc(this,dl,0),arguments.length<2)throw TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);Kc(this,ul,String(t));let r=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(r)||Kc(this,dl,r)}static[Symbol.hasInstance](e){return e instanceof cl&&e[Symbol.toStringTag]===`File`&&typeof e.name==`string`}get name(){return X(this,ul)}
/* c8 ignore next 3 */
get webkitRelativePath(){return``}get lastModified(){return X(this,dl)}get[Symbol.toStringTag](){return`File`}};ul=/* @__PURE__ */ new WeakMap,dl=/* @__PURE__ */ new WeakMap;var pl=e=>e instanceof fl,ml,hl,gl,_l=class{constructor(){Gc(this,hl),Gc(this,ml,/* @__PURE__ */ new Map)}static[Symbol.hasInstance](e){if(!e)return!1;let t=e;return!!(Z(t.constructor)&&t[Symbol.toStringTag]===`FormData`&&Z(t.append)&&Z(t.set)&&Z(t.get)&&Z(t.getAll)&&Z(t.has)&&Z(t.delete)&&Z(t.entries)&&Z(t.values)&&Z(t.keys)&&Z(t[Symbol.iterator])&&Z(t.forEach))}append(e,t,n){qc(this,hl,gl).call(this,{name:e,fileName:n,append:!0,rawValue:t,argsLength:arguments.length})}set(e,t,n){qc(this,hl,gl).call(this,{name:e,fileName:n,append:!1,rawValue:t,argsLength:arguments.length})}get(e){let t=X(this,ml).get(String(e));return t?t[0]:null}getAll(e){let t=X(this,ml).get(String(e));return t?t.slice():[]}has(e){return X(this,ml).has(String(e))}delete(e){X(this,ml).delete(String(e))}*keys(){for(let e of X(this,ml).keys())yield e}*entries(){for(let e of this.keys()){let t=this.getAll(e);for(let n of t)yield[e,n]}}*values(){for(let[,e]of this)yield e}[Symbol.iterator](){return this.entries()}forEach(e,t){for(let[n,r]of this)e.call(t,r,n,this)}get[Symbol.toStringTag](){return`FormData`}};ml=/* @__PURE__ */ new WeakMap,hl=/* @__PURE__ */ new WeakSet,gl=function({name:e,rawValue:t,append:n,fileName:r,argsLength:i}){let a=n?`append`:`set`;if(i<2)throw TypeError(`Failed to execute '${a}' on 'FormData': 2 arguments required, but only ${i} present.`);e=String(e);let o;if(pl(t))o=r===void 0?t:new fl([t],r,{type:t.type,lastModified:t.lastModified});else if(ll(t))o=new fl([t],r===void 0?`blob`:r,{type:t.type});else if(r)throw TypeError(`Failed to execute '${a}' on 'FormData': parameter 2 is not of type 'Blob'.`);else o=String(t);let s=X(this,ml).get(e);s&&n?s.push(o):X(this,ml).set(e,[o])};
/*! Based on fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> & David Frank */
let vl;var yl=class{static{vl=Symbol.toStringTag}constructor(e,t,n){this[vl]=`Blob`,this.size=t,this.readStream=(0,y.createReadStream)(e),this.readStream.on(`data`,e=>n(e.length))}stream(){return this.readStream}};async function bl(e,t,r){let{experimental_abortSignal:i}=e.options,a=n.wt(10),o=0;await Promise.all(t.map(({contentLength:t,filePath:n,formAction:s,formFields:c,localPath:l})=>{let u=0;return e.log.debug(`Uploading ${n} (${Pc(t)}) to ${s}`),a(()=>(0,Dr.default)(async a=>{if(i?.aborted)return a(i.reason||/* @__PURE__ */ Error(`Aborted`));let d=new yl(l,t,e=>{u+=e,o+=e,r?.(o)}),f=new _l;for(let[e,t]of Object.entries(c))f.append(e,t);f.append(`file`,d);try{await e.http.fetch(s,{body:f,method:`POST`,signal:i},{retries:0}),e.log.debug(`Uploaded ${n} (${Pc(t)})`)}catch{throw Error(l)}},{retries:e.env.CHROMATIC_RETRIES,onRetry:t=>{o-=u,u=0,e.log.debug(`Retrying upload for %s, %O`,l,t),r?.(o)}}))}))}async function xl(e,t,n){let{experimental_abortSignal:r}=e.options,{contentLength:i,filePath:a,formAction:o,formFields:s,localPath:c}=t,l=0;return e.log.debug(`Uploading ${a} (${Pc(i)})`),(0,Dr.default)(async t=>{if(r?.aborted)return t(r.reason||/* @__PURE__ */ Error(`Aborted`));let u=new yl(c,i,e=>{l+=e,n?.(l)}),d=new _l;for(let[e,t]of Object.entries(s))d.append(e,t);d.append(`file`,u);let f=await e.http.fetch(o,{body:d,method:`POST`,signal:r},{retries:0});if(!f.ok)throw e.log.debug(`Uploading ${c} failed: %O`,f),Error(c);e.log.debug(`Uploaded ${a} (${Pc(i)})`)},{retries:e.env.CHROMATIC_RETRIES,onRetry:t=>{l=0,e.log.debug(`Retrying upload for %s, %O`,c,t),n(l)}})}function Sl(e,t=[]){let n=t.includes(`android`),r=t.includes(`ios`);return e.filter(e=>!!(e.targetPath===`manifest.json`||n&&e.targetPath===`storybook.apk`||r&&e.targetPath.startsWith(`storybook.app`)))}function Cl(e,t){let n=new Map(t.toReversed().map(e=>[e.targetPath,e]));return e.map(e=>({...n.get(e.filePath),...e}))}async function wl(e,t,r={}){let i=[],a=0,o=0,s=`UNUSED`;e.turboSnap&&(s=e.turboSnap.bailReason?`BAILED`:`APPLIED`);let c=[],l,u=e.announcedBuild?.browsers||[],d=e.isReactNativeApp?Sl(t,u):t,f=[];for(let[e,t]of d.entries()){let n=Math.floor(e/1e3);f[n]||(f[n]=[]),f[n].push(t)}for(let[t,u]of f.entries()){e.log.debug(`Running uploadBuild batch ${t+1} / ${f.length}`);let{uploadBuild:d}=await e.client.runQuery(`
  mutation UploadBuildMutation(
    $buildId: ObjID!
    $files: [FileUploadInput!]!
    $zip: Boolean
    $onlyStoryFiles: [String!]
    $turboSnapStatus: TurboSnapStatus
  ) {
    uploadBuild(
      buildId: $buildId
      files: $files
      zip: $zip
      onlyStoryFiles: $onlyStoryFiles
      turboSnapStatus: $turboSnapStatus
    ) {
      info {
        sentinelUrls
        targets {
          contentType
          fileKey
          filePath
          formAction
          formFields
        }
        zipTarget {
          contentType
          fileKey
          filePath
          formAction
          formFields
        }
      }
      build {
        id
        status
        ancestorBuilds {
          status
          webUrl
          snapshotCount
        }
      }
      userErrors {
        __typename
        ... on UserError {
          message
        }
        ... on MaxFileCountExceededError {
          maxFileCount
          fileCount
        }
        ... on MaxFileSizeExceededError {
          maxFileSize
          filePaths
        }
      }
    }
  }
`,{buildId:e.announcedBuild.id,files:u.map(({contentHash:e,contentLength:t,targetPath:n})=>({contentHash:e,contentLength:t,filePath:n})),zip:e.options.zip,onlyStoryFiles:e.onlyStoryFiles,turboSnapStatus:s});if(d.userErrors.length>0){for(let t of d.userErrors)t.__typename===`MaxFileCountExceededError`?e.log.error(Lc(t)):t.__typename===`MaxFileSizeExceededError`?e.log.error(Rc(t)):e.log.error(t.message);return r.onError?.(/* @__PURE__ */ Error(`Upload rejected due to user error`)),{sentinelUrls:i,uploadedBytes:a,uploadedFiles:o}}if(d.build?.status===`SKIPPED`){e.log.debug(`Build ${d.build.id} skipped via TurboSnap, not uploading build files`),await e.client.runQuery(`
mutation PrepareBuild(
  $buildId: ObjID!
  $runtimeSpecs: [RuntimeSpecInput!]!
  $skipped: Boolean
) {
  prepareBuild(id: $buildId, runtimeSpecs: $runtimeSpecs, skipped: $skipped)
}
`,{buildId:d.build.id,runtimeSpecs:[],skipped:!0},{retries:3}).catch(t=>{e.log.error(`Failed to prepare skipped build ${d.build?.id}, continuing`,t),n.jt(t)});let t;try{let{app:n}=await e.client.runQuery(`
  query SkippedBuildQuery($number: Int!) {
    app {
      build(number: $number) {
        specCount
        componentCount
        testCount
        changeCount
        errorCount: testCount(statuses: [BROKEN])
        actualTestCount: testCount(statuses: [IN_PROGRESS])
        interactionTestFailuresCount
        actualCaptureCount
        inheritedCaptureCount
      }
    }
  }
`,{number:e.announcedBuild.number},{headers:{Authorization:`Bearer ${e.announcedBuild.reportToken}`}});t=n.build}catch(t){e.log.error(`Failed to query fields for skipped build ${d.build?.id}, continuing`,t),n.jt(t)}return{sentinelUrls:i,uploadedBytes:a,uploadedFiles:o,skippedByTurboSnap:!0,ancestorBuild:d.build.ancestorBuilds?.[0],skippedBuild:t}}i.push(...d.info?.sentinelUrls||[]),c.push(...Cl(d.info?.targets||[],u)),d.info?.zipTarget&&(l=d.info.zipTarget)}if(c.length===0)return e.log.debug(`No new files to upload, continuing`),{sentinelUrls:i,uploadedBytes:a,uploadedFiles:o};let p=c.reduce((e,{contentLength:t})=>e+t,0);if(l)try{let{path:t,size:n}=await Uc(e,c),s=p&&(p-n)/p;return e.log.debug(`Compression reduced upload size by ${Math.round(s*100)}%`),await xl(e,{...l,contentLength:n,localPath:t},e=>r.onProgress?.(e,n)),a+=n,o+=c.length,{sentinelUrls:i,uploadedBytes:a,uploadedFiles:o}}catch(t){e.log.debug({err:t},`Error uploading zip, falling back to uploading individual files`)}try{await bl(e,c,e=>r.onProgress?.(e,p)),a+=p,o+=c.length}catch(t){let n=c.find(e=>e.localPath===t.message);n&&e.log.error(zc({target:n},e.log.getLevel()===`debug`)),r.onError?.(t,n?.localPath)}return{sentinelUrls:i,uploadedBytes:a,uploadedFiles:o}}async function Tl(e,t){let{uploadMetadata:n}=await e.client.runQuery(`
  mutation UploadMetadataMutation($buildId: ObjID!, $files: [FileUploadInput!]!) {
    uploadMetadata(buildId: $buildId, files: $files) {
      info {
        targets {
          contentType
          fileKey
          filePath
          formAction
          formFields
        }
      }
      userErrors {
        ... on UserError {
          message
        }
      }
    }
  }
`,{buildId:e.announcedBuild.id,files:t.map(({contentHash:e,contentLength:t,targetPath:n})=>({contentHash:e,contentLength:t,filePath:n}))});n.info&&await bl(e,Cl(n.info.targets,t)),n.userErrors.length>0&&n.userErrors.map(t=>e.log.warn(t.message))}const El=e=>new Promise(t=>(0,y.stat)(e,(e,n)=>t(e?0:n.size)));async function Dl(e){if(!e.announcedBuild)e.log.warn(`No build announced, skipping metadata upload.`);else try{return await Ol(e,async()=>{let t=[e.options.logFile,e.options.diagnosticsFile,e.options.storybookLogFile,e.sourceDir&&s.o(e.sourceDir),await n.v(e.options.storybookConfigDir,n.h).catch(()=>void 0),await n.v(e.options.storybookConfigDir,n.g).catch(()=>void 0),e.fileInfo?.statsPath&&await u.t(e.fileInfo.statsPath).catch(t=>{e.log.debug(`Failed to trim stats file: ${t}`)})].filter(e=>!!e),r=(await Promise.all(t.map(async e=>{let t=await El(e),n=`.chromatic/${b.default.basename(e)}`;return t&&{contentLength:t,localPath:e,targetPath:n}}))).filter(e=>!!e).sort((e,t)=>e.targetPath.localeCompare(t.targetPath,`en`,{numeric:!0}));r.length===0?e.log.warn(`No metadata files found, skipping metadata upload.`):await(0,cc.withFile)(async({path:t})=>{let n=Fc(e,r);(0,y.writeFileSync)(t,n),r.push({contentLength:n.length,localPath:t,targetPath:`.chromatic/index.html`});let i=`${e.build.storybookUrl}.chromatic/`;e.log.info(Ic(i,r)),await Tl(e,r)})})}catch(t){e.log.debug(`Failed to upload metadata files to Chromatic`,t),n.jt(t)}}async function Ol(e,t){e.log.pause();try{return await t()}finally{e.log.resume()}}var kl=(e,t)=>q.default`${i.n} Wrote ${t} report to {bold ${e}}`;const{writeFile:Al}=Hs.default;async function jl(e){if(e.options.diagnosticsFile)try{(0,y.mkdirSync)(b.default.dirname(e.options.diagnosticsFile),{recursive:!0}),await Al(e.options.diagnosticsFile,Nl(e),{spaces:2}),e.log.info(kl(e.options.diagnosticsFile,`Chromatic diagnostics`))}catch(t){e.log.error(t)}}function Ml(e){if(e.options.diagnosticsFile)try{(0,y.rmSync)(e.options.diagnosticsFile,{force:!0})}catch(t){e.log.error(t)}}function Nl(e){let{analytics:t,argv:n,client:r,env:i,help:o,http:s,log:c,pkg:l,title:u,...d}=e,f=a.h(a.p(d,`originalArgv`,`projectToken`,`reportToken`,`userToken`),a.a(e));return Object.fromEntries(Object.keys(f).sort((e,t)=>e.localeCompare(t)).map(e=>[e,f[e]]))}var Pl=/* @__PURE__ */ e.a(f.n());const Fl={success:Pl.default.green,error:Pl.default.red,warning:Pl.default.yellow,info:Pl.default.cyan,debug:Pl.default.gray,cta:Pl.default.cyan,muted:Pl.default.dim},Il=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),Ll=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Rl=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,zl=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Bl=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Vl=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Hl=/\t{1,1000}/y,Ul=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,Wl=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Gl=/\p{M}+/gu,Kl={limit:1/0,ellipsis:``},ql=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?ql(i,Kl,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Wl,l],[zl,0],[Bl,o],[Hl,s],[Ul,c],[Vl,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Gl,``)){let t=e.codePointAt(0)||0;if(S=Ll(t)?2:Rl(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Vl?Il(e.slice(p,n.lastIndex)):n===Ul?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},Jl={limit:1/0,ellipsis:``,ellipsisWidth:0},Yl=(e,t={})=>ql(e,Jl,t).width,Xl=`]8;;`,Zl=RegExp(`(?:\\[(?<code>\\d+)m|\\${Xl}(?<uri>.*))`,`y`),Ql=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},$l=e=>`[${e}m`,eu=e=>`${Xl}${e}`,tu=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:Yl(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=Yl(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(Xl,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},nu=e=>{let t=e.split(` `),n=t.length;for(;n&&!Yl(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},ru=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=Yl(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=Yl(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),tu(s,r,t),c=Yl(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){tu(s,r,t),c=Yl(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(tu(s,r,t),c=Yl(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>nu(e)));let l=s.join(`
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===`›`){Zl.lastIndex=e+1;let t=Zl.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
`){a&&(r+=eu(``));let e=i?Ql(i):void 0;i&&e&&(r+=$l(e))}else t===`
`&&(i&&Ql(i)&&(r+=$l(i)),a&&(r+=eu(a)))}return r},iu=/\r?\n/;function au(e,t,n){return String(e).normalize().split(iu).map(e=>ru(e,t,n)).join(`
`)}var ou=t.l();const su={actions:/* @__PURE__ */ new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:/* @__PURE__ */ new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,accessible:void 0,date:{monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function cu(e,t){if(typeof e==`string`)return su.aliases.get(e)===t;for(let n of e)if(n!==void 0&&cu(n,t))return!0;return!1}const lu=globalThis.process.platform.startsWith(`win`);function uu({input:e=M.stdin,output:t=M.stdout,overwrite:n=!0,hideCursor:r=!0}={}){let i=j.createInterface({input:e,output:t,prompt:``,tabSize:1});j.emitKeypressEvents(e,i),e instanceof R.ReadStream&&e.isTTY&&e.setRawMode(!0);let a=(i,{name:o,sequence:s})=>{if(cu([String(i),o,s],`cancel`)){r&&t.write(ou.cursor.show),process.exit(0);return}if(!n)return;let c=o===`return`?0:-1,l=o===`return`?-1:0;j.moveCursor(t,c,l,()=>{j.clearLine(t,1,()=>{e.once(`keypress`,a)})})};return r&&t.write(ou.cursor.hide),e.once(`keypress`,a),()=>{e.off(`keypress`,a),r&&t.write(ou.cursor.show),e instanceof R.ReadStream&&e.isTTY&&!lu&&e.setRawMode(!1),i.terminal=!1,i.close()}}const du=e=>`columns`in e&&typeof e.columns==`number`?e.columns:80;function fu(){return M.default.platform===`win32`?!!M.default.env.CI||!!M.default.env.WT_SESSION||!!M.default.env.TERMINUS_SUBLIME||M.default.env.ConEmuTask===`{cmd::Cmder}`||M.default.env.TERM_PROGRAM===`Terminus-Sublime`||M.default.env.TERM_PROGRAM===`vscode`||M.default.env.TERM===`xterm-256color`||M.default.env.TERM===`alacritty`||M.default.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:M.default.env.TERM!==`linux`}const pu=fu(),mu=()=>process.env.CI===`true`,hu=e=>e.isTTY===!0,Q=(e,t)=>pu?e:t,gu=Q(`■`,`x`),_u=Q(`▲`,`x`),vu=Q(`◇`,`o`),yu=Q(`┌`,`T`),bu=Q(`│`,`|`),xu=Q(`●`,`•`),Su=Q(`◆`,`*`),Cu=Q(`▲`,`!`),wu=Q(`■`,`x`);`${(0,T.styleText)(`dim`,`↑/↓`)}`,`${(0,T.styleText)(`dim`,`Space:`)}`,`${(0,T.styleText)(`dim`,`Enter:`)}`;const $={message:(e=[],{symbol:t=(0,T.styleText)(`gray`,bu),secondarySymbol:n=(0,T.styleText)(`gray`,bu),output:r=process.stdout,spacing:i=1,withGuide:a}={})=>{let o=[],s=a??su.withGuide,c=s?n:``,l=s?`${t}  `:``,u=s?`${n}  `:``;for(let e=0;e<i;e++)o.push(c);let d=Array.isArray(e)?e:e.split(`
`);if(d.length>0){let[e,...r]=d;e.length>0?o.push(`${l}${e}`):o.push(s?t:``);for(let e of r)e.length>0?o.push(`${u}${e}`):o.push(s?n:``)}r.write(`${o.join(`
`)}
`)},info:(e,t)=>{$.message(e,{...t,symbol:(0,T.styleText)(`blue`,xu)})},success:(e,t)=>{$.message(e,{...t,symbol:(0,T.styleText)(`green`,Su)})},step:(e,t)=>{$.message(e,{...t,symbol:(0,T.styleText)(`green`,vu)})},warn:(e,t)=>{$.message(e,{...t,symbol:(0,T.styleText)(`yellow`,Cu)})},warning:(e,t)=>{$.warn(e,t)},error:(e,t)=>{$.message(e,{...t,symbol:(0,T.styleText)(`red`,wu)})}},Tu=(e=``,t)=>{let n=t?.output??process.stdout,r=t?.withGuide??su.withGuide?`${(0,T.styleText)(`gray`,yu)}  `:``;n.write(`${r}${e}
`)},Eu=e=>(0,T.styleText)(`magenta`,e),Du=({indicator:e=`dots`,onCancel:t,output:n=process.stdout,cancelMessage:r,errorMessage:i,frames:a=pu?[`◒`,`◐`,`◓`,`◑`]:[`•`,`o`,`O`,`0`],delay:o=pu?80:120,signal:s,...c}={})=>{let l=mu(),u,d,f=!1,p=!1,m=``,h,g=performance.now(),_=du(n),v=c?.styleFrame??Eu,y=e=>{let n=e>1?i??su.messages.error:r??su.messages.cancel;p=e===1,f&&(A(n,e),p&&typeof t==`function`&&t())},b=()=>y(2),x=()=>y(1),S=()=>{process.on(`uncaughtExceptionMonitor`,b),process.on(`unhandledRejection`,b),process.on(`SIGINT`,x),process.on(`SIGTERM`,x),process.on(`exit`,y),s&&s.addEventListener(`abort`,x)},C=()=>{process.removeListener(`uncaughtExceptionMonitor`,b),process.removeListener(`unhandledRejection`,b),process.removeListener(`SIGINT`,x),process.removeListener(`SIGTERM`,x),process.removeListener(`exit`,y),s&&s.removeEventListener(`abort`,x)},w=()=>{if(h===void 0)return;l&&n.write(`
`);let e=au(h,_,{hard:!0,trim:!1}).split(`
`);e.length>1&&n.write(ou.cursor.up(e.length-1)),n.write(ou.cursor.to(0)),n.write(ou.erase.down())},E=e=>e.replace(/\.+$/,``),D=e=>{let t=(performance.now()-e)/1e3,n=Math.floor(t/60),r=Math.floor(t%60);return n>0?`[${n}m ${r}s]`:`[${r}s]`},O=c.withGuide??su.withGuide,k=(t=``)=>{f=!0,u=uu({output:n}),m=E(t),g=performance.now(),O&&n.write(`${(0,T.styleText)(`gray`,bu)}
`);let r=0,i=0;S(),d=setInterval(()=>{if(l&&m===h)return;w(),h=m;let t=v(a[r]),o;if(l)o=`${t}  ${m}...`;else if(e===`timer`)o=`${t}  ${m} ${D(g)}`;else{let e=`.`.repeat(Math.floor(i)).slice(0,3);o=`${t}  ${m}${e}`}let s=au(o,_,{hard:!0,trim:!1});n.write(s),r=r+1<a.length?r+1:0,i=i<4?i+.125:0},o)},A=(t=``,r=0,i=!1)=>{if(!f)return;f=!1,clearInterval(d),w();let a=r===0?(0,T.styleText)(`green`,vu):r===1?(0,T.styleText)(`red`,gu):(0,T.styleText)(`red`,_u);m=t??m,i||(e===`timer`?n.write(`${a}  ${m} ${D(g)}
`):n.write(`${a}  ${m}
`)),C(),u()};return{start:k,stop:(e=``)=>A(e,0),message:(e=``)=>{m=E(e??m)},cancel:(e=``)=>A(e,1),error:(e=``)=>A(e,2),clear:()=>A(``,0,!0),get isCancelled(){return p}}},Ou={light:Q(`─`,`-`),heavy:Q(`━`,`=`),block:Q(`█`,`#`)};function ku({style:e=`heavy`,max:t=100,size:n=40,...r}={}){let i=Du(r),a=0,o=``,s=Math.max(1,t),c=Math.max(1,n),l=e=>{switch(e){case`initial`:case`active`:return e=>(0,T.styleText)(`magenta`,e);case`error`:case`cancel`:return e=>(0,T.styleText)(`red`,e);case`submit`:return e=>(0,T.styleText)(`green`,e);default:return e=>(0,T.styleText)(`magenta`,e)}},u=(t,n)=>{let r=Math.floor(a/s*c);return`${l(t)(Ou[e].repeat(r))}${(0,T.styleText)(`dim`,Ou[e].repeat(c-r))} ${n}`},d=(e=``)=>{o=e,i.start(u(`initial`,e))},f=(e=1,t)=>{a=Math.min(s,e+a),i.message(u(`active`,t??o)),o=t??o};return{start:d,stop:i.stop,cancel:i.cancel,error:i.error,clear:i.clear,advance:f,isCancelled:i.isCancelled,message:e=>f(0,e)}}`${(0,T.styleText)(`dim`,`↑/↓`)}`,`${(0,T.styleText)(`dim`,`Enter:`)}`,`${(0,T.styleText)(`gray`,bu)}`;const Au=e=>e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g,``),ju=e=>{let t=e.output??process.stdout,n=du(t),r=(0,T.styleText)(`gray`,bu),i=e.spacing??1,a=e.retainLog===!0,o=!mu()&&hu(t);t.write(`${r}
`),t.write(`${(0,T.styleText)(`green`,vu)}  ${e.title}
`);for(let e=0;e<i;e++)t.write(`${r}
`);let s=[{value:``,full:``}],c=!1,l=e=>{if(s.length===0)return;let r=0;e&&(r+=i+2);for(let e of s){let{value:t,result:i}=e,a=i?.message??t;if(a.length===0)continue;i===void 0&&e.header!==void 0&&e.header!==``&&(a+=`
${e.header}`);let o=a.split(`
`).reduce((e,t)=>t===``?e+1:e+Math.ceil((t.length+3)/n),0);r+=o}r>0&&(r+=1,t.write(ou.erase.lines(r)))},u=(e,n,a)=>{let o=a?`${e.full}
${e.value}`:e.value;e.header!==void 0&&e.header!==``&&$.message(e.header.split(`
`).map(e=>(0,T.styleText)(`bold`,e)),{output:t,secondarySymbol:r,symbol:r,spacing:0}),$.message(o.split(`
`).map(e=>(0,T.styleText)(`dim`,e)),{output:t,secondarySymbol:r,symbol:r,spacing:n??i})},d=()=>{for(let e of s){let{header:t,value:n,full:r}=e;(t===void 0||t.length===0)&&n.length===0||u(e,void 0,a===!0&&r.length>0)}},f=(t,n,r)=>{if(l(!1),r?.raw===!0&&c||t.value===``||(t.value+=`
`),t.value+=Au(n),c=r?.raw===!0,e.limit!==void 0){let n=t.value.split(`
`),r=n.length-e.limit;if(r>0){let e=n.splice(0,r);a&&(t.full+=(t.full===``?``:`
`)+e.join(`
`))}t.value=n.join(`
`)}o&&p()},p=()=>{for(let e of s)e.result?e.result.status===`error`?$.error(e.result.message,{output:t,secondarySymbol:r,spacing:0}):$.success(e.result.message,{output:t,secondarySymbol:r,spacing:0}):e.value!==``&&u(e,0)},m=(e,t)=>{l(!1),e.result=t,o&&p()};return{message(e,t){f(s[0],e,t)},group(e){let t={header:e,value:``,full:``};return s.push(t),{message(e,n){f(t,e,n)},error(e){m(t,{status:`error`,message:e})},success(e){m(t,{status:`success`,message:e})}}},error(e,n){l(!0),$.error(e,{output:t,secondarySymbol:r,spacing:1}),n?.showLog!==!1&&d(),s.splice(1,s.length-1),s[0].value=``,s[0].full=``},success(e,n){l(!0),$.success(e,{output:t,secondarySymbol:r,spacing:1}),n?.showLog===!0&&d(),s.splice(1,s.length-1),s[0].value=``,s[0].full=``}}},Mu=/\u001B\[[0-9;]*m|\u001B\]8;;[^\u0007]*\u0007|\u001B\]8;;\u0007/g,Nu=/(https?:\/\/[^\s\u0000-\u001F\u007F]+)/g,Pu=`\x1B]8;;`,Fu=`${Pu}`;function Iu(){try{return process.stdout.columns||80}catch{return 80}}function Lu(){try{let e=(process.env.TERM_PROGRAM||``).trim(),t=(process.env.TERM_PROGRAM_VERSION||``).trim();switch(e){case`iTerm.app`:if(t){let[e,n]=t.split(`.`).map(Number);return e>3||e===3&&n>=1}return!0;case`Apple_Terminal`:return!1;default:return!0}}catch{return!1}}function Ru(e){return e.replaceAll(Mu,``)}function zu(e){return Ru(e).length}function Bu(e,t){let n=t?.maxLineWidth??Iu(),r=Math.floor(Iu()*.8),i=Lu();return e.replaceAll(Nu,(a,o,s)=>{if(!i||Vu(e,s))return a;let c=zu(Hu(e,s)),l=n-c,u=t?.maxUrlLength??r,d=Math.min(u,r,l);if((o.length<=20||d<20)&&(d=o.length),o.length>d){let e=o.slice(0,Math.max(0,d-3))+`...`;return`${Pu}${o}${e}${Fu}`}return`${Pu}${o}${o}${Fu}`})}function Vu(e,t){let n=0;for(;;){let r=e.indexOf(Pu,n);if(r===-1)return!1;let i=e.indexOf(Fu,r);if(i===-1)n=r+1;else{if(t>=r&&t<i+Fu.length)return!0;n=i+1}}}function Hu(e,t){let n=e.slice(0,Math.max(0,t)),r=n.lastIndexOf(`
`);return r===-1?n:n.slice(Math.max(0,r+1))}function Uu(e,n){let r=n||Iu(),i=Math.max(r-10,40),a=Math.min(i,80),o=Bu(e,{maxLineWidth:a});return t.o(o,a,{hard:!0})}const Wu=(e,t)=>{Tu(e,{output:t})},Gu=(e,t)=>{$.message(Uu(e),{output:t})};function Ku({pkg:e},t){Wu(`Chromatic CLI v${e.version}`,t),Gu(Fl.muted(e.docs),t)}var qu=({projectId:e})=>(0,J.dedent)(q.default`
    ${i.t} Invalid project ID: ${e}
    You may not sufficient permissions to create builds on this project, or it may not exist.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/quickstart/`)}
  `),Ju=({projectToken:e})=>(0,J.dedent)(q.default`
    ${i.t} Invalid {bold --project-token} '${e}'
    You can find your project token on the Manage screen in your Chromatic project.
    Sign in to Chromatic at ${n.Tt(`https://www.chromatic.com/start`)}
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/quickstart/`)}
  `);const Yu=async(e,t)=>{switch(t.mode){case`cli`:{let{cliToken:n}=await e.client.runQuery(`
  mutation CreateCLITokenMutation($projectId: String!) {
    cliToken: createCLIToken(projectId: $projectId)
  }
`,{projectId:t.projectId},{endpoint:`${e.env.CHROMATIC_INDEX_URL}/api`,headers:{Authorization:`Bearer ${t.userToken}`}});return n}case`app`:{let{appToken:n}=await e.client.runQuery(`
  mutation CreateAppTokenMutation($projectToken: String!) {
    appToken: createAppToken(code: $projectToken)
  }
`,{projectToken:t.projectToken});return n}default:return t}},Xu=async(e,t)=>{try{let n=await Yu(e,t);e.client.setAuthorization(n)}catch(e){let n=e?.message,r={exitCode:l.n.GRAPHQL_ERROR};if(n?.match(`No Access`)){let e=t.mode===`cli`?t.projectId:``;throw new l.t(qu({projectId:e}),r)}throw n?.match(`No app with code`)?new l.t(Ju({projectToken:t.projectToken}),r):e}let n=!1;try{let{app:t}=await e.client.runQuery(`
  query CLIAppInfo {
    app {
      features {
        isReactNativeApp
      }
    }
  }
`,{});n=t?.features?.isReactNativeApp??!1}catch{e.log.warn(`Failed to fetch app info; assuming web storybook for build script check.`)}return{kind:`continue`,output:{isReactNativeApp:n}}},Zu=(e,t)=>{e.isReactNativeApp=t.isReactNativeApp},Qu=e=>{let{projectId:t,projectToken:r,userToken:i}=e.options;if(t&&i)return{mode:`cli`,projectId:t,userToken:i,projectToken:r};if(!r)throw Error(n.Ct());return{mode:`app`,projectToken:r}},$u=e=>`*`.repeat(e.length-4)+e.slice(-4),ed=e=>e.includes(`dev`)?` [dev]`:e.includes(`staging`)?` [staging]`:``,td={status:`initial`,title:`Authenticate`},nd=e=>({status:`pending`,title:`Authenticating with Chromatic${ed(e.env.CHROMATIC_INDEX_URL)}`,output:`Connecting to ${e.env.CHROMATIC_INDEX_URL}`}),rd=e=>({status:`success`,title:`Authenticated with Chromatic${ed(e.env.CHROMATIC_INDEX_URL)}`,output:e.options.projectToken?`Using project token '${$u(e.options.projectToken)}'`:`Using project ID '${e.options.projectId}' and user token`}),id=e=>({log:e.log,client:e.client,http:e.http,env:e.env,options:e.options,runtime:e.runtime,analytics:e.analytics,pkg:e.pkg,sessionId:e.sessionId,packageJson:e.packageJson,report:()=>{}});async function ad(e,t,n,r){switch(r.kind){case`continue`:await e.applyOutput?.(t,r.output),e.transitions?.success&&dd(e.transitions.success,!0)(t,n);return;case`partial`:if(await e.applyPartial?.(t,r.output),e.transitions?.partial){let{title:i,output:a}=e.transitions.partial(t,r.output);ld(i,a)(t,n)}t.skip=!0;return;case`skip`:t.skip=!0;return;case`skip-self`:return}}async function od(e,t,n){t.options.experimental_abortSignal?.throwIfAborted(),e.transitions?.pending&&dd(e.transitions.pending)(t,n);let r=e.extractInput(t,n);await ad(e,t,n,await e.run(id(t),r))}async function sd(e,t,n){for(let r of e.steps)t.options.experimental_abortSignal?.throwIfAborted(),await r(t,n)}function cd(e){let{name:t,title:n,skip:r}=e;return{title:n,skip:r,task:async(r,i)=>{r.task=t,r.title=n,r.startedAt=Number.isInteger(r.now)?r.now:Date.now(),r.options.experimental_onTaskStart?.({...r}),await(`run`in e?od(e,r,i):sd(e,r,i)),r.options.experimental_onTaskComplete?.({...r})}}}const ld=(e,t)=>(n,r)=>{let i=typeof e==`function`?e(n,r):e,a=typeof t==`function`?t(n,r):t;r.title=a?`${i}\n${q.default.dim(`    → ${a}`)}`:i},ud=e=>(t,n)=>{n.output=typeof e==`function`?e(t,n):e},dd=(e,t=!1)=>(n,r)=>{let{title:i,output:a}=e(n);ld(i,t?a:void 0)(n,r),!t&&a&&ud(a)(n,r)},fd=e=>{let t=Number.isInteger(e.now)?e.now:Date.now(),n=e.startedAt||0,r=Math.round((t-n)/1e3),i=(0,Y.default)(`second`,Math.floor(r%60),!0);if(r<60)return i;let a=(0,Y.default)(`minute`,Math.floor(r/60),!0);return r%60?`${a} ${i}`:a};async function pd(e,t,n){if(e.skip){e.log.debug(`Skipping task '${t.name}' due to upstream skip`);return}e.task=t.name,e.title=t.title,e.startedAt=Number.isInteger(e.now)?e.now:Date.now(),e.options.experimental_abortSignal?.throwIfAborted(),e.options.experimental_onTaskStart?.({...e});let r=t.transitions.pending(e);n.start(r);try{let r=t.extractInput(e),i={...id(e),report:md(e,n)};await hd(e,t,await t.run(i,r),n)}catch(i){throw i instanceof l.t&&l.r(e,i.exitCode,i.userError),n.fail(gd(e,t,i,r.title)),i}e.options.experimental_onTaskComplete?.({...e})}function md(e,t){return n=>{n.title!==void 0&&(e.title=n.title),n.build!==void 0&&(e.build=n.build),t.update({title:e.title,output:n.output,progress:n.progress}),n.progress&&e.options.experimental_onTaskProgress?.({...e},n.progress)}}async function hd(e,t,n,r){switch(n.kind){case`continue`:{await t.applyOutput?.(e,n.output);let i=t.transitions.success(e,n.output);e.title=i.title,r.succeed(i);return}case`partial`:{await t.applyPartial?.(e,n.output);let i=t.transitions.partial?.(e,n.output)??t.transitions.success(e);e.title=i.title,r.succeed(i),e.skip=!0;return}case`skip`:r.succeed({...t.transitions.pending(e),output:n.reason}),e.skip=!0;return;case`skip-self`:{let i=t.transitions.skipped?.(e)??{...t.transitions.pending(e),output:n.reason};e.title=i.title,r.succeed(i);return}}}function gd(e,t,n,r){return t.transitions.failure?.(e,n)??_d(r,n)}function _d(e,t){return{status:`error`,title:`${e} failed`,output:t.message}}function vd(e){return Uu(e.output?e.title+`
`+Fl.muted(e.output):e.title)}function yd(e){let t;return{start:n=>{t=ju({title:n.title,spacing:0,output:e}),n.output&&t.message(Uu(n.output))},update:e=>{t.message(Uu(e.output||e.title))},succeed:e=>{t.success(vd(e))},fail:e=>{t.error(Uu(e.title),{showLog:!1})}}}function bd(e,t){let n=n=>r=>{for(let i of e)try{i[n](r)}catch(e){try{t(e,n)}catch{}}};return{start:n(`start`),update:n(`update`),succeed:n(`succeed`),fail:n(`fail`)}}function xd(e){let t,n=n=>{n.output&&n.output!==t&&(t=n.output,e(`    → ${n.output}`))},r=t=>{e(t.title),n(t)};return{start:r,update:n,succeed:r,fail:r}}function Sd(e,t){return bd(e.options.interactive?[t(),xd(e.log.file)]:[xd(e.log.info)],(t,n)=>e.log.file(`renderer ${n} hook threw`,t))}async function Cd(e){await pd(e,{name:`auth`,title:td.title,transitions:{pending:nd,success:rd},extractInput:Qu,run:Xu,applyOutput:Zu},Sd(e,yd))}const wd=()=>({status:`pending`,title:`Building your React Native Storybook`,output:`Building`}),Td=()=>({status:`updating`,title:`Generating story manifest`,output:`Generating manifest.json file for React Native build`}),Ed=e=>({status:`updating`,title:`Building your React Native Storybook`,output:e?.androidBuildCommand?`Running command: ${e.androidBuildCommand}`:`Building Android`}),Dd=e=>({status:`updating`,title:`Building your React Native Storybook`,output:e?.iosBuildCommand?`Running command: ${e.iosBuildCommand}`:`Building iOS`}),Od=e=>({status:`success`,title:`React Native Storybook built in ${fd(e)}`,output:e.options.storybookBuildDir?`Using prebuilt React Native assets at ${e.options.storybookBuildDir}`:`View build log at ${e.reactNativeBuildLogFile}`}),kd=()=>({status:`skipped`,title:`Build React Native Storybook [skipped]`,output:`Using prebuilt React Native assets`}),Ad=()=>({status:`error`,title:`Building your React Native Storybook`,output:`Unable to build for React Native, your project does not include any supported platforms`}),jd=({options:e,buildCommand:t,buildLogFile:r,runtimeMetadata:a},{message:o},s)=>{let{buildScriptName:c,buildCommand:l}=e,u=s?.split(x.EOL).filter(e=>e&&!e.startsWith(`<s>`))||[],d=c||l,f=c?q.default`{bold npm run ${d}} or {bold yarn ${d}}`:q.default`{bold ${d}}`;return[(0,J.dedent)(q.default`
      The CLI tried to run your {bold ${d}} script, but the command failed. This indicates a problem with your Storybook. Here's what to do:

      - Check the Storybook build log printed below.
      - Run ${f} yourself and make sure it outputs a valid Storybook by opening the generated {bold index.html} in your browser.
      - Review the build-storybook CLI options at ${n.Tt(`https://storybook.js.org/docs/api/cli-options#build`)}
    `),o,q.default`${i.n} Build command:\n{dim ${t}}`,q.default`${i.n} Runtime metadata:\n{dim ${JSON.stringify(a,void 0,2)}}`,q.default`${i.n} Storybook build output:\n{dim ${r}}`,u.join(`
`)].join(`

`)},Md=({reactNativeBuildLogFile:e,runtimeMetadata:t},{message:n},r)=>[(0,J.dedent)(q.default`
      The CLI tried to build your React Native app, but failed. This may indicate a problem with your Storybook. Here's what to do:

      - Check the React Native build log.
      - Run the build steps in the log yourself and make sure it outputs a valid APK/APP.
    `),n,q.default`${i.n} Runtime metadata:\n{dim ${JSON.stringify(t,void 0,2)}}`,q.default`${i.n} Build log:\n{dim ${e}}`,r].join(`

`);async function Nd(e,t){return new Promise((n,r)=>{let i=[],a=(0,z.createInterface)({input:(0,y.createReadStream)(e),crlfDelay:1/0});a.on(`line`,e=>{i.push(e),i.length>t&&i.shift()}),a.on(`close`,()=>n(i.join(`
`))),a.on(`error`,r)})}const Pd=async(e,t,n,r)=>{e.log.debug(`Running React Native build command:`,n);try{let[e,...i]=p.t(n);await m.r(e,i,{env:{CHROMATIC_ARTIFACT_DIRECTORY:t}},r)}catch(e){throw Error(`React Native build command failed: ${n}\n${e.message}`)}},Fd=e=>(e??[]).filter(e=>e===`ios`||e===`android`),Id=async(e,t,n)=>{let{title:r,output:i}=Ed(e.options.reactNative);e.report({title:r,output:i});let{androidBuildCommand:a,androidBuildArchitectures:o}=e.options.reactNative??{};e.log.debug({androidBuildCommand:a},`Running Android build`),a?(o?.length&&e.log.debug(`androidBuildArchitectures is ignored when androidBuildCommand is set`),await Pd(e,t,a,n)):await m.t(b.default.join(t,`storybook.apk`),n,o)},Ld=async(e,t,n)=>{let{title:r,output:i}=Dd(e.options.reactNative);e.report({title:r,output:i});let{iosBuildCommand:a}=e.options.reactNative??{};if(e.log.debug({iosBuildCommand:a},`Running iOS build`),a)await Pd(e,t,a,n);else{let e=await m.i();await m.n(e.name,b.default.join(t,`storybook.app`),n)}},Rd=async(e,t)=>{let n=Fd(t.browsers),r=n.includes(`android`),i=n.includes(`ios`);if(!r&&!i)throw e.log.debug(`No supported platforms found for React Native build:`,n),new l.t(Ad().output,{exitCode:l.n.NPM_BUILD_STORYBOOK_FAILED,userError:!0});(0,y.mkdirSync)(b.default.join(t.sourceDir,`.chromatic`),{recursive:!0});let a=b.default.join(t.sourceDir,`.chromatic`,`react-native-build.log`),o=await m.s(a);try{r&&await Id(e,t.sourceDir,o),i&&await Ld(e,t.sourceDir,o),await new Promise(e=>o.end(e))}catch(n){await new Promise(e=>o.end(e));let r=await Nd(a,20);throw e.log.error(Md({reactNativeBuildLogFile:a,runtimeMetadata:t.runtimeMetadata},n,r)),new l.t(`Build failed, see logs at ${a}`,{exitCode:l.n.NPM_BUILD_STORYBOOK_FAILED,userError:!0})}return{reactNativeBuildLogFile:a}},zd=async(e,t)=>(e.log.debug(`Generating manifest.json file for React Native build`),await h.n(e,{sourceDir:t.sourceDir})),Bd={CLI_STORYBOOK_BUILD_FAILED:`CLI_STORYBOOK_BUILD_FAILED`};function Vd(e){let t=e.match(/:\d+(?::\d+)?$/)?.[0]??``,n=(t?e.slice(0,-t.length):e).match(/[^/\\]+$/)?.[0]??``;return n?`<path>/${n}${t}`:`<path>${t}`}function Hd(e){return e?e.slice(0,8e3).replaceAll(/(["`]).*?\1/g,`<redacted>`).replaceAll(/[\w.+-]+@[\w.-]+\.[A-Za-z]{2,}/g,`<email>`).replaceAll(/~\w*\/[^\s)]+|\/[^\s)]+|[A-Za-z]:\\[^\s)]+/g,Vd):``}var Ud=({dependencyName:e,flag:t,workingDir:n})=>(0,J.dedent)(q.default`
      ${i.t} Failed to import \`${e}\`, is it installed in \`package.json\`?

      ${i.n} To run \`chromatic --${t}\` you must have \`${e}\` installed.
      ${n?`\n${i.n} Chromatic looked in \`${n}\`. If that's not the right directory, you might need to set the \`workingDir\` option to the action.`:``}
    `);const Wd=`build-archive-storybook`,Gd=e=>!e.startsWith(`--`)&&e.includes(` `)?JSON.stringify(e):e,Kd=((e,t)=>({npm:`npm exec -- {0}`,yarn:`yarn {0}`,"yarn@berry":`yarn {0}`,pnpm:`pnpm exec {0}`,"pnpm@6":`pnpm exec {0}`,bun:`bun run {0}`})[e].replace(`{0}`,t.map(e=>Gd(e)).join(` `)).trim());async function qd(e,n,r){let i=`@chromatic-com/${n}`;if(e.options.inAction){if(!process.versions.pnp)try{return[`node`,(0,P.createRequire)(k.default.join(process.cwd(),`package.json`)).resolve(`${i}/bin/${Wd}`),...r].join(` `)}catch{}return await t.n(Kd,[Wd,...r],{programmatic:!0})}try{return[`node`,require.resolve(`${i}/bin/${Wd}`),...r].join(` `)}catch(t){throw t.code===`MODULE_NOT_FOUND`?(e.log.error(Ud({dependencyName:i,flag:n})),new l.t(Ud({dependencyName:i,flag:n}),{exitCode:l.n.MISSING_DEPENDENCY,userError:!0})):t}}var Jd=({flag:e,errorMessage:t})=>(0,J.dedent)(q.default`
      ${i.t} Failed to run \`chromatic --${e}\`:
      
      ${t}
    `);function Yd(e){return[`command not found`,`[\\W]?${Wd}[\\W]? not found`,`code E404`,`exit code 127`,`command failed.*${Wd}.*$`].some(t=>new RegExp(t,`gi`).test(e))}function Xd(e,t,r){let i=n.n(r),a=e.message;if(Yd(a)){let e=`@chromatic-com/${i}`;return{exitCode:l.n.MISSING_DEPENDENCY,message:Ud({dependencyName:e,flag:i,workingDir:t})}}return{exitCode:l.n.E2E_BUILD_FAILED,message:Jd({flag:i,errorMessage:a})}}function Zd(e,t,r,i,a){if(n.St(e.options)){let n=Xd(r,process.cwd(),e.options);throw Qd(e,t,n.exitCode===l.n.MISSING_DEPENDENCY?`e2e_missing_dependency`:`e2e_build_failed`,r),e.log.error(n.message),new l.t(`Command failed: ${t.buildCommand}`,{exitCode:n.exitCode,userError:!0})}a?.aborted&&(Qd(e,t,`aborted`,r),a.throwIfAborted()),Qd(e,t,`storybook_build_failed`,r);let o=i&&(0,y.readFileSync)(i,`utf8`);throw e.log.error(jd({options:e.options,buildCommand:t.buildCommand,buildLogFile:i,runtimeMetadata:t.runtimeMetadata},r,o)),new l.t(`Command failed: ${t.buildCommand}`,{exitCode:l.n.NPM_BUILD_STORYBOOK_FAILED,userError:!0})}function Qd(e,t,r,i){try{e.analytics?.trackEvent(Bd.CLI_STORYBOOK_BUILD_FAILED,{errorCategory:r,stackTrace:Hd(i?.stack),buildCommand:t.buildCommand,source:`cli`,cliVersion:e.pkg?.version,storybookVersion:t.storybook?.version,isCI:!!process.env.CI,ciService:t.git?.ciService,gitUserEmailHash:t.git?.gitUserEmail?Zs(t.git.gitUserEmail):void 0})}catch(e){n.jt(e)}}const $d=async(e,t)=>{let r,i;e.options.storybookLogFile&&(i=b.default.resolve(e.options.storybookLogFile),r=await m.s(i));let{experimental_abortSignal:a}=e.options;try{if(e.log.debug(`Running build command:`,t.buildCommand),e.log.debug(`Runtime metadata:`,JSON.stringify(t.runtimeMetadata,void 0,2)),!t.buildCommand)throw Error(`No build command configured`);await n.ct(t.buildCommand,{stdio:[void 0,r,void 0],preferLocal:!1,cancelSignal:a,timeout:e.env.STORYBOOK_BUILD_TIMEOUT,env:{CI:`1`,NODE_ENV:e.env.STORYBOOK_NODE_ENV||`production`,STORYBOOK_INVOKED_BY:`chromatic`,CHROMATIC_PROJECT_ID:t.projectId}})}catch(n){Zd(e,t,n,i,a)}finally{r?.end()}return{buildLogFile:i}},ef=async()=>t.n(t.r,[],{programmatic:!0}),tf=async e=>t.n(t.a,e,{programmatic:!0}),nf=async e=>{if(!e)throw Error(`No package manager provided`);let t=`${e} --version`,{stdout:r}=await n.ct(t);if(r===void 0)throw Error(`Unexpected missing output for command: '${t}'`);let[i]=r.toString().trim().split(`
`,1);return i.trim().replace(/^v/,``)};function rf(e){return e.env.CHROMATIC_TURBOSNAP_DISABLE_HASHES||e.options.onlyChanged===!1}function af(e){return!!e.turboSnap&&!e.turboSnap.unavailable}function of(e){return af(e)&&!!e.git.changedFiles}const sf=e=>!e?.version||C.default.gte(C.default.coerce(e.version)||`0.0.0`,`6.2.0`),cf=e=>e?.version&&C.default.gte(C.default.coerce(e.version)||`0.0.0`,`8.5.0`)?`--stats-json`:`--webpack-stats-json`;function lf(e,t,r){return sf(t.storybook)?af(t)?!0:!(rf(e)||n.St(e.options)||r):!1}const uf=async(e,t)=>{let r=t.flags?.buildCommand||e.options.buildCommand,i=[];if(r||i.push(`--output-dir=${t.sourceDir}`),lf(e,t,r)?i.push(`${cf(t.storybook)}=${t.sourceDir}`):af(t)&&e.log.warn(`Storybook version 6.2.0 or later is required to use the --only-changed flag`),r)return`${r} ${i.join(` `)}`;if(n.St(e.options))return qd(e,n.n(e.options),i);if(!e.options.buildScriptName)throw Error(`Unable to determine build script`);return tf([e.options.buildScriptName,...i])},df=async(e,t)=>t.sourceDir?t.sourceDir:e.options.outputDir?e.options.outputDir:t.storybook?.version&&C.default.lt(t.storybook.version,`5.0.0`)?`storybook-static`:(await cc.default.dir({unsafeCleanup:!0,prefix:`chromatic-`})).path;async function ff(e,t){let{storybookBuildDir:n}=e.options;if(n&&(0,y.existsSync)(b.default.resolve(n,`manifest.json`)))return{kind:`continue`,output:{sourceDir:n,skippedWithPrebuilt:!0}};let r=await df({options:e.options},{sourceDir:n??t.sourceDir,storybook:t.storybook}),i;n||(i=(await Rd({options:e.options,log:e.log,report:e.report},{sourceDir:r,browsers:t.browsers,runtimeMetadata:t.runtimeMetadata})).reactNativeBuildLogFile);let{title:a,output:o}=Td();return e.report({title:a,output:o}),await zd({options:e.options,log:e.log},{sourceDir:r}),{kind:`continue`,output:{sourceDir:r,skippedWithPrebuilt:!1,reactNativeBuildLogFile:i}}}async function pf(e,t){let{storybookBuildDir:n}=e.options;if(n)return{kind:`continue`,output:{sourceDir:n,skippedWithPrebuilt:!0}};let r=await df({options:e.options},{sourceDir:t.sourceDir,storybook:t.storybook}),i=await uf({options:e.options,log:e.log,env:e.env},{sourceDir:r,flags:t.flags,storybook:t.storybook,turboSnap:t.turboSnap});e.report({output:`Running command: ${i}`});let{buildLogFile:a}=await $d({options:e.options,log:e.log,env:e.env,analytics:e.analytics,pkg:e.pkg},{buildCommand:i,projectId:t.projectId,runtimeMetadata:t.runtimeMetadata,storybook:t.storybook,git:t.git});return{kind:`continue`,output:{sourceDir:r,skippedWithPrebuilt:!1,buildCommand:i,buildLogFile:a}}}async function mf(e,t){return t.isReactNativeApp?ff(e,t):pf(e,t)}const hf=e=>({isReactNativeApp:!!e.isReactNativeApp,sourceDir:e.sourceDir,storybook:e.storybook,flags:e.flags,browsers:e.announcedBuild?.browsers,projectId:e.announcedBuild?.app?.id,runtimeMetadata:e.runtimeMetadata,git:e.git,turboSnap:e.turboSnap}),gf=(e,t)=>{e.sourceDir=t.sourceDir,t.buildCommand&&(e.buildCommand=t.buildCommand),t.buildLogFile&&(e.buildLogFile=t.buildLogFile),t.reactNativeBuildLogFile&&(e.reactNativeBuildLogFile=t.reactNativeBuildLogFile)},_f=e=>({status:`initial`,title:`Build ${d.o(e)}`}),vf=e=>({status:`pending`,title:`Building your ${d.o(e)}`,output:e.buildCommand?`Running command: ${e.buildCommand}`:void 0}),yf=e=>({status:`success`,title:`${d.s(d.o(e))} built in ${fd(e)}`,output:`View build log at ${e.buildLogFile}`}),bf=e=>({status:`skipped`,title:`Build ${d.o(e)} [skipped]`,output:`Using prebuilt ${d.o(e)} at ${e.options.storybookBuildDir}`});function xf(e){let t;return{start:n=>{t=Du({output:e}),t.start(n.title)},update:e=>{t.message(Uu(e.output||e.title))},succeed:n=>{t.clear(),$.success(vd(n),{output:e,spacing:0})},fail:n=>{t.clear(),$.error(Uu(n.title),{output:e,spacing:0})}}}async function Sf(e){await pd(e,{name:`build`,title:_f(e).title,transitions:{pending:e=>e.isReactNativeApp?wd():vf(e),success:(e,t)=>e.isReactNativeApp?t?.skippedWithPrebuilt?kd():Od(e):t?.skippedWithPrebuilt?bf(e):yf(e)},extractInput:hf,run:mf,applyOutput:gf},Sd(e,xf))}function Cf(e,...t){let n=``;for(let[r,i]of e.entries())n+=i,r in t&&(n+=t[r]);return n}function wf({options:e},t){return e.isLocalBuild?{localBuildEmailHash:Zs(t.gitUserEmail||``)}:t.committerEmail?{localBuildEmailHash:Zs(t.committerEmail)}:{isLocalBuild:!1}}const Tf=Cf`
  query BaselineCommitsQuery(
    $branch: String!
    $parentCommits: [String!]!
    $localBuilds: LocalBuildsSpecifierInput!
  ) {
    app {
      baselineBuilds(branch: $branch, parentCommits: $parentCommits, localBuilds: $localBuilds) {
        id
        number
        status(legacy: false)
        commit
        committedAt
        uncommittedHash
        isLocalBuild
        changeCount
      }
    }
  }
`;async function Ef(e,{branch:t,parentCommits:n,git:r}){let{app:i}=await e.client.runQuery(Tf,{branch:t,parentCommits:n,localBuilds:wf(e,r)});return i.baselineBuilds}const Df=Cf`
  query AncestorBuildsQuery($buildNumber: Int!, $skip: Int!, $limit: Int!) {
    app {
      build(number: $buildNumber) {
        ancestorBuilds(skip: $skip, limit: $limit) {
          id
          number
          commit
          uncommittedHash
          isLocalBuild
        }
      }
    }
  }
`;async function Of(e,t,{page:r=10,limit:i=80}={}){let a=0;for(;a<i;){let o;try{({app:o}=await e.client.runQuery(Df,{buildNumber:t,skip:a,limit:Math.min(r,i-a)}))}catch(e){throw n.vt(e)?new n.gt({cause:e}):new n._t({cause:e})}let s=await Promise.all(o.build.ancestorBuilds.map(async t=>[t,await n.M(e,t.commit)])),c=s.find(([e,t])=>!(e.isLocalBuild&&e.uncommittedHash)&&t);if(c)return c[0];if(s.length<r)return;a+=r}}async function kf(e,t){try{if(t.isLocalBuild&&t.uncommittedHash)throw new n.dt(t.commit);return{changedFiles:await n.R(e,t.commit)||[]}}catch(r){if(e.log.debug(`Got error fetching commit for #${t.number}(${t.commit}): ${r.message}`),r instanceof n.lt||r instanceof n.dt){let r=await Of(e,t.number);if(r)return e.log.debug(`Found replacement build for #${t.number}(${t.commit}): #${r.number}(${r.commit})`),{changedFiles:await n.R(e,r.commit)||[],replacementBuild:r};e.log.debug(`Couldn't find replacement for #${t.number}(${t.commit})`)}throw r}}const Af=Cf`
  query FirstCommittedAtQuery($branch: String!, $localBuilds: LocalBuildsSpecifierInput!) {
    app {
      firstBuild(sortByCommittedAt: true, localBuilds: $localBuilds) {
        committedAt
      }
      lastBuild(branch: $branch, sortByCommittedAt: true, localBuilds: $localBuilds) {
        commit
        committedAt
      }
    }
  }
`,jf=Cf`
  query HasBuildsWithCommitsQuery($commits: [String!]!, $localBuilds: LocalBuildsSpecifierInput!) {
    app {
      hasBuildsWithCommits(commits: $commits, localBuilds: $localBuilds)
    }
  }
`,Mf=Cf`
  query MergeCommitsQuery($mergeInfoList: [MergedInfoInput]!) {
    app {
      mergedPullRequests(mergeInfoList: $mergeInfoList) {
        mergeCommitSha
        lastHeadBuild {
          commit
        }
      }
    }
  }
`;function Nf(e){return e.map(e=>e.trim()).join(` `)}const Pf=/^(?:[\da-f]{40}|[\da-f]{64})$/;function Ff(e){return e.split(/\r?\n/).filter(e=>Pf.test(e))}async function If(e,t,{firstCommittedAtSeconds:r,commitsWithBuilds:i,commitsWithoutBuilds:a}){let o=`git rev-list HEAD \
      ${r?`--since ${r}`:``} \
      -n ${t+a.length} --not ${Nf(i)}`,s=Ff(await n.ot(e,o)),c=new Set(i),l=s.filter(e=>!c.has(e)),u=new Set(a);return{visitedCommitsWithoutBuilds:l,candidateCommits:l.filter(e=>!u.has(e)).slice(0,t)}}async function Lf(e,t,n,{firstCommittedAtSeconds:r,commitsWithBuilds:i,commitsWithoutBuilds:a}){let{options:o,client:s,log:c}=e;c.debug(`step: checking ${n} up to ${r}`),c.debug(`step: commitsWithBuilds: ${i}`),c.debug(`step: commitsWithoutBuilds: ${a}`);let{candidateCommits:l,visitedCommitsWithoutBuilds:u}=await If({options:o,log:c},n,{firstCommittedAtSeconds:r,commitsWithBuilds:i,commitsWithoutBuilds:a});c.debug(`step: candidateCommits: ${l}, visitedCommitsWithoutBuilds: ${u}`);let d=l.filter(e=>t.shallowBoundaryCommits?.includes(e));if(d.length>0&&c.debug({hitBoundaries:d},`step: reached shallow boundary commit(s) during walk`),l.length===0)return c.debug(`step: no candidateCommits; we are done`),{commitsWithBuilds:i,visitedCommitsWithoutBuilds:u};let{app:{hasBuildsWithCommits:f}}=await s.runQuery(jf,{commits:l,localBuilds:wf({options:o},t)});c.debug(`step: newCommitsWithBuilds: ${f}`);let p=l.filter(e=>!f.includes(e));return Lf(e,t,n*2,{firstCommittedAtSeconds:r,commitsWithBuilds:[...i,...f],commitsWithoutBuilds:[...a,...p]})}async function Rf(e,t){if(t.length===0)return t;let r=t.map(e=>`"${e}^@"`),i=`git rev-list ${Nf(t)} --not ${Nf(r)}`;return Ff(await n.ot(e,i))}async function zf(e,{git:t,ignoreLastBuildOnBranch:r=!1}){let{options:i,client:a,log:o}=e,{branch:s,committedAt:c}=t,{app:l}=await a.runQuery(Af,{branch:s,localBuilds:wf({options:i},t)},{retries:5}),{firstBuild:u,lastBuild:d}=l;if(o.debug(`App firstBuild: %o, lastBuild: %o`,u,d),!u)return o.debug(`App has no builds, returning []`),{ancestorCommits:[],visitedCommits:[]};let f=[],p=[];if(s!==`HEAD`&&!r&&d&&d.committedAt<=c){if(await n.M(e,d.commit))o.debug(`Adding last branch build commit ${d.commit} to commits with builds`),f.push(d.commit);else{let e=t.shallowBoundaryCommits?.includes(d.commit);o.debug(`Last branch build commit ${d.commit} not in index${e?` (shallow boundary)`:``}, blindly appending to parents`),p.push(d.commit)}}let{commitsWithBuilds:m,visitedCommitsWithoutBuilds:h}=await Lf(e,t,20,{firstCommittedAtSeconds:u.committedAt&&u.committedAt/1e3,commitsWithBuilds:f,commitsWithoutBuilds:[]}),g=h.map(e=>({commit:e,baseRefName:s})),{app:{mergedPullRequests:_}}=await a.runQuery(Mf,{mergeInfoList:g.slice(0,100)},{retries:5}),v=/* @__PURE__ */ new Set,y=await n.N(e,[...new Set(_.flatMap(e=>e.lastHeadBuild?.commit??[]))]);for(let e of _){let n=e.lastHeadBuild?.commit;if(n){if(y.has(n))o.debug(`Adding merged PR build commit ${n} to commits with builds`),m.push(n);else{let e=t.shallowBoundaryCommits?.includes(n);o.debug(`Merged PR build commit ${n} not in index${e?` (shallow boundary)`:``}, blindly appending to parents`),p.push(n)}e.mergeCommitSha&&v.add(e.mergeCommitSha)}}o.debug(`Final commitsWithBuilds: ${m}`);let b=await Rf({log:o,options:i},m),x=[...p,...b],S=[.../* @__PURE__ */ new Set([...h,...m])],C=new Set(m),w=(await n.et(e,S)).map(({commit:e,parentCommits:n,isProbableSquashMerge:r})=>({commit:e,parentCommits:n,hasBuild:C.has(e),isMergePoint:[...v].some(t=>e.startsWith(t)),isProbableSquashMerge:r,isShallowBoundary:!!t.shallowBoundaryCommits?.includes(e)}));return o.debug(`visitedCommits: total=${S.length}, withBuilds=${C.size}, mergePoints=${v.size}`),{ancestorCommits:x,visitedCommits:w}}const Bf=/* @__PURE__ */ new Set([`react-router`,`react-router-dom`,`remix`,`@tanstack/react-router`,`expo-router`,`@reach/router`,`react-easy-router`,`@remix-run/router`,`wouter`,`wouter-preact`,`preact-router`,`vue-router`,`unplugin-vue-router`,`@angular/router`,`@solidjs/router`,`next`,`react-scripts`,`gatsby`,`nuxt`,`@sveltejs/kit`]);function Vf(e){return Object.keys(e?.dependencies??{}).some(e=>Bf.has(e))}var Hf=()=>`${(0,J.dedent)(q.default`
    ${i.t} {bold Failed to find the current git user's email}
    We were unable to find your git email so this local build
    will not belong to you and will not affect your future baselines.
    Read more: ${n.Tt(`https://www.chromatic.com/docs/visual-tests-addon/#what-are-local-builds-and-how-are-they-different-from-builds`)}
    
    In order to associate your local changes with later CI builds, you
    need to configure git with the email address you'll commit with.
    You can do this with \`git config --global user.email YOUR_EMAIL\`.

    Once you've done so, please run this build again.
  `)}`;const Uf=({commit:e,branch:t,parentCommits:n,changedFiles:r},{ownerName:i},a={})=>{let o=a.bailReason?`; TurboSnap disabled`:``,s=i?`${i}:${t}`:t,c=`Commit '${e.slice(0,7)}' on branch '${s}'`;return n?.length?(c+=`; found ${(0,Y.default)(`parent build`,n.length,!0)}`,r&&(c+=` and ${(0,Y.default)(`changed file`,r.length,!0)}`),`${c}${o}`):`${c}; no ancestor found${o}`},Wf={status:`initial`,title:`Retrieve git information`},Gf=()=>({status:`pending`,title:`Retrieving git information`}),Kf=e=>({status:`updating`,title:`Skipping build`,output:`Skipping build for commit ${e.commit.slice(0,7)}`}),qf=e=>({status:`success`,title:`Skipping build`,output:`Skipped build for commit ${e.git.commit.slice(0,7)} due to --skip`}),Jf=()=>({status:`error`,title:`Skipping build`,output:`Failed to skip build`}),Yf=()=>({status:`success`,title:`Skipping build`,output:`Skipping rebuild of an already fully passed/accepted build`}),Xf=e=>({status:`success`,title:`Retrieved git information`,output:Uf(e.git,e.options,e.turboSnap)});var Zf=()=>(0,J.dedent)(q.default`
    ${i.n} {bold ${Yf().output}}
    A build for the same commit as the last build on the branch is considered a rebuild.
    If the last build is passed or accepted, the rebuild is skipped because it shouldn't change anything.
    You can override this using the {bold --force-rebuild} flag.
  `);function Qf(e){return e.commit.slice(0,7)}var $f=({replacedBuild:e,replacementBuild:t})=>(0,J.dedent)(q.default`
    ${i.n} {bold Missing commit detected}
    When detecting git changes for TurboSnap, we couldn't find the commit (${Qf(e)}) for the most recent build (#${e.number}).
    To avoid recapturing snapshots for tests we know haven't changed, we copied from the most recent build (#${t.number}) that did have a commit (${Qf(t)}) instead.
  `),ep=e=>{let t=e.length===1?`file`:`${e.length} files`,r=e.map(e=>q.default.bold(e)),a=e.length===1?r[0]:q.default`\n{dim →} ${r.join(q.default`\n{dim →} `)}`;return(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap disabled due to matching --externals}
    Found ${t} with changes: ${a}
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/turbosnap#how-it-works`)}
  `)},tp=()=>(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap disabled due to missing git history}
    Could not retrieve changed files since baseline commit(s).
    This typically happens after rebasing, force pushing, or when running against an ephemeral merge commit.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/turbosnap#how-it-works`)}
  `),np=()=>(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap disabled due to rebuild}
    You appear to be rerunning an earlier build, because the baseline build has the same commit and branch name.
    Comparing against the same commit would yield zero changed files, so we would end up running a build with no captured snapshots.
    That's probably not what you want when rerunning a build, so we're just going to run a full build instead.
  `),rp=()=>(0,J.dedent)(q.default`
    ${i.i} Removing unknown owner prefix from branch name.
    You may wish to set the branch directly to avoid incorrect values.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/faq/override-branch-name/`)}
  `);const ip=/^undefined:/;async function ap(e,t){let{log:r,client:i,options:o,runtime:s,packageJson:c,report:l}=e,{branchName:u,ownerName:f,repositorySlug:p,patchBaseRef:m,fromCI:h,interactive:g,isLocalBuild:_,skip:v,ignoreLastBuildOnBranch:y,onlyChanged:b,externals:x,untraced:S}=t,C=await n.$({log:r,options:o}),w=await hs({log:r,options:o},{branchName:u,patchBaseRef:m,ci:h}),T={version:C,gitUserEmail:await n.Q({log:r,options:o}).catch(e=>{r.debug(`Failed to retrieve Git user email`,e)}),uncommittedHash:await n.X({log:r,options:o},[o.logFile,o.diagnosticsFile,o.storybookLogFile]).catch(e=>{r.warn(`Failed to retrieve uncommitted files hash`,e)}),rootPath:await n.K({log:r,options:o}),...w},E={};try{E={hasRouter:Vf(c),creationDate:await n.G({log:r,options:o}),storybookCreationDate:await n.Y({log:r,options:o}),numberOfCommitters:await n.W({log:r,options:o}),numberOfAppFiles:await n.U({log:r,options:o},[`page`,`screen`],[`js`,`jsx`,`ts`,`tsx`])}}catch(e){r.debug(`Failed to gather project metadata`,e)}if(_&&!T.gitUserEmail)throw Error(Hf());if(!T.slug)try{T.slug=await n.J({log:r,options:o})}catch(e){r.debug(`Failed to retrieve Git repository slug`,e)}f?(T.branch=T.branch.replace(/[^:]+:/,``),T.slug=p||T.slug?.replace(/[^/]+/,f)):ip.test(T.branch)&&(r.warn(rp()),T.branch=T.branch.replace(ip,``));let[D,O]=await Promise.all([n.B({log:r,options:o}).catch(e=>{r.debug({err:e},`Failed to detect clone depth`)}),n.V({log:r,options:o}).catch(e=>{r.debug({err:e},`Failed to detect clone filter`)})]),k=D===`shallow`?await n.q({log:r,options:o}).catch(e=>(r.debug({err:e},`Failed to retrieve shallow boundary commits`),[])):[];r.debug(`Git clone type: ${JSON.stringify({cloneDepth:D,cloneFilter:O,shallowBoundaryCommitCount:k.length,firstShallowBoundaryCommits:k.slice(0,50)})}`),T.cloneDepth=D,T.cloneFilter=O,k.length>0&&(T.shallowBoundaryCommits=k);let{branch:A,commit:j,slug:M}=T;if(T.matchesBranch=e=>nc(A,e),T.matchesBranch(v)){let{title:e,output:t}=Kf(T);if(l({title:e,output:t}),await i.runQuery(`
  mutation SkipBuildMutation($commit: String!, $branch: String, $slug: String) {
    skipBuild(commit: $commit, branch: $branch, slug: $slug)
  }
`,{commit:j,branch:A,slug:M}))return{kind:`partial`,output:{phase:`skip-commit`,git:T,projectMetadata:E},reason:`skipped-for-commit`};throw Error(Jf().output)}let{ancestorCommits:N,visitedCommits:P}=await zf({log:r,client:i,options:o},{git:T,ignoreLastBuildOnBranch:T.matchesBranch(y||!1)});T.parentCommits=N,T.visitedCommits=P,r.debug(`Found parentCommits: ${N.join(`, `)}`);let F=await i.runQuery(`
  query LastBuildQuery($commit: String!, $branch: String!) {
    app {
      isOnboarding
      lastBuild(ref: $commit, branch: $branch) {
        id
        status(legacy: false)
        storybookUrl
        webUrl
        specCount
        componentCount
        testCount
        changeCount
        errorCount: testCount(statuses: [BROKEN])
        pendingCount: testCount(statuses: [PENDING])
        ignoredCount: testCount(statuses: [IGNORED])
        actualTestCount: testCount(statuses: [IN_PROGRESS])
        actualCaptureCount
        inheritedCaptureCount
        interactionTestFailuresCount
      }
    }
  }
`,{commit:j,branch:A}),I=F.app.isOnboarding,L;if(N.length===1&&N[0]===j){let e=F?.app?.lastBuild;if(e&&(L=e.id,[`PASSED`,`ACCEPTED`].includes(e.status)&&!T.matchesBranch(I?!0:s.forceRebuild)))return r.info(Zf()),{kind:`partial`,output:{phase:`rebuild-noop`,git:T,projectMetadata:E,isOnboarding:I,rebuildForBuildId:L,rebuildForBuild:F.app.lastBuild,storybookUrl:F.app.lastBuild.storybookUrl,setForceRebuild:I},reason:`rebuild-noop`}}let R=T.matchesBranch(b)?{}:void 0,z;if(R){if(N.length===0)return R.bailReason={noAncestorBuild:!0},{kind:`continue`,output:{git:T,projectMetadata:E,isOnboarding:I,turboSnap:R,build:z,setForceRebuild:I,rebuildForBuildId:L}};if(L)return R.bailReason={rebuild:!0},r.warn(np()),{kind:`continue`,output:{git:T,projectMetadata:E,isOnboarding:I,turboSnap:R,build:z,setForceRebuild:I,rebuildForBuildId:L}};let e=await Ef({options:o,client:i},{branch:A,parentCommits:N,git:T});T.baselineCommits=e.map(e=>e.commit),r.debug(`Found baselineCommits: ${T.baselineCommits.join(`, `)}`),z=e.sort((e,t)=>t.committedAt-e.committedAt)[0];try{let t=await Promise.all(e.map(async e=>({build:e,...await kf({log:r,client:i,options:o},e)})));T.changedFiles=[...new Set(t.flatMap(({changedFiles:e})=>e))];let n=S??[];if(T.packageMetadataChanges=t.flatMap(({build:e,changedFiles:t,replacementBuild:r})=>{let i=t.filter(e=>!n.some(t=>a.f(t,e))).filter(e=>a.u(e));return i.length>0?[{changedFiles:i,commit:r?.commit??e.commit}]:[]}),T.replacementBuildIds=t.filter(e=>!!e.replacementBuild).map(({build:e,replacementBuild:t})=>(r.info(``),r.info($f({replacedBuild:e,replacementBuild:t})),[e.id,t.id])),!g){let e=T.changedFiles.length>0?`:\n${T.changedFiles.map(e=>`  ${e}`).join(`
`)}`:``;r.info(`Found ${T.changedFiles.length} changed files${e}`)}}catch(e){let{bailSubreason:t}=d.i(e);R.bailReason={invalidChangedFiles:!0,bailSubreason:t,sentryEventId:d.a(e,{bailSubreason:t,bailPath:`gitInfo.invalidChangedFiles`})},T.changedFiles=void 0,T.replacementBuildIds=void 0,r.warn(tp()),r.debug(e)}if(x&&T.changedFiles&&T.changedFiles.length>0)for(let e of x){let t=T.changedFiles.filter(t=>a.f(e,t));if(t.length>0){R.bailReason={changedExternalFiles:t},r.warn(ep(t)),T.changedFiles=void 0,T.replacementBuildIds=void 0;break}}}return{kind:`continue`,output:{git:T,projectMetadata:E,isOnboarding:I,turboSnap:R,build:z,setForceRebuild:I,rebuildForBuildId:L}}}const op=e=>({branchName:e.options.branchName,ownerName:e.options.ownerName,repositorySlug:e.options.repositorySlug,patchBaseRef:e.options.patchBaseRef,fromCI:e.options.fromCI,interactive:e.options.interactive,isLocalBuild:e.options.isLocalBuild,skip:e.options.skip,ignoreLastBuildOnBranch:e.options.ignoreLastBuildOnBranch,onlyChanged:e.options.onlyChanged,externals:e.options.externals,untraced:e.options.untraced}),sp=(e,t)=>{e.git=t.git,e.projectMetadata=t.projectMetadata,e.isOnboarding=t.isOnboarding,t.turboSnap&&(e.turboSnap=t.turboSnap),t.build&&(e.build=t.build),t.rebuildForBuildId&&(e.rebuildForBuildId=t.rebuildForBuildId),t.setForceRebuild&&(e.runtime.forceRebuild=!0)},cp=(e,t)=>{e.git=t.git,e.projectMetadata=t.projectMetadata,l.r(e,l.n.OK),t.phase===`rebuild-noop`&&(e.isOnboarding=t.isOnboarding,e.rebuildForBuildId=t.rebuildForBuildId,e.rebuildForBuild=t.rebuildForBuild,e.storybookUrl=t.storybookUrl,t.setForceRebuild&&(e.runtime.forceRebuild=!0))};async function lp(e){await pd(e,{name:`gitInfo`,title:Wf.title,transitions:{pending:Gf,success:Xf,partial:(e,t)=>t.phase===`skip-commit`?qf(e):Yf()},extractInput:op,run:ap,applyOutput:sp,applyPartial:cp},Sd(e,yd))}var up=class{constructor({client:e,logger:t}){this.pending=[],this.client=e,this.logger=t}trackEvent(e,t){this.logger.debug(`[analytics] trackEvent: ${e}`,JSON.stringify(t));let r={event:e,properties:t},i=this.client.runQuery(`
  mutation TrackCLITelemetryEvent($input: TrackCLITelemetryEventInput!) {
    trackCLITelemetryEvent(input: $input)
  }
`,{input:r},{retries:0}).catch(e=>{this.logger.debug(`[analytics] trackEvent failed`,e),n.jt(e)});this.pending.push(i)}async shutdown(){this.logger.debug(`[analytics] shutdown: flushing ${this.pending.length} pending event(s)`);let e,t=new Promise(t=>{e=setTimeout(()=>{this.logger.debug(`[analytics] shutdown timed out before all events flushed`),t()},5e3)});await Promise.race([Promise.all(this.pending).then(()=>{this.logger.debug(`[analytics] shutdown: finished flushing pending events`)}),t]),e&&clearTimeout(e)}},dp=class{constructor(e){this.logger=e}trackEvent(e,t){this.logger.debug(`[analytics] trackEvent: ${e}`,JSON.stringify(t))}async shutdown(){this.logger.debug(`[analytics] shutdown`)}};function fp(e){return[`CHROMATIC_DISABLE_ANALYTICS`,`CHROMATIC_DISABLE_TELEMETRY`,`DO_NOT_TRACK`].some(e=>pp(process.env[e]))?(e.log.debug(`[analytics] disabled via environment variable, using log-only client`),new dp(e.log)):(e.log.debug(`[analytics] initializing Index analytics client`),new up({client:e.client,logger:e.log}))}function pp(e){return[`1`,`true`,`yes`].includes((e||``).toLowerCase())}async function mp(e,t,n){try{let r=await(0,L.readFile)(b.default.join(t,`COMPONENTOWNERS`),`utf8`);await e.client.runQuery(`
  mutation SetComponentOwners($buildId: ObjID!, $content: String!) {
    setComponentOwners(buildId: $buildId, content: $content) {
      buildId
    }
  }
`,{buildId:n,content:r}),(e.options.interactive?e.log.file:e.log.info)(`Uploaded COMPONENTOWNERS`)}catch(t){if(t.code===`ENOENT`){e.log.debug(`No COMPONENTOWNERS file found at the repository root. Skipping.`);return}e.log.warn(`Unable to set component owners.`,t)}}var hp=()=>(0,J.dedent)(q.default`
    ${i.t} {bold TurboSnap is not supported for Storybook React Native projects.}
    Remove the {bold \`--only-changed\`} flag and re-run the command to continue.
  `);const gp=`https://www.chromatic.com/docs/quickstart/#why-do-i-see-build-x-is-based-on-a-commit-without-ancestor-builds`;var _p=({announcedBuild:e,turboSnap:t})=>t?(0,J.dedent)(q.default`
      ${i.i} {bold TurboSnap disabled due to missing ancestor build}
      An ancestor is required to determine which files have changed since the last Chromatic build.
      This usually happens when rebasing, force-pushing, squash-merging or running against an ephemeral merge commit.
      ${i.n} Read more at ${n.Tt(gp)}
    `):(0,J.dedent)(q.default`
      ${i.i} {bold No ancestor build found}
      Build ${e.number} is based on a commit without ancestor builds, which is unusual.
      This usually happens when rebasing, force-pushing, squash-merging or running against an ephemeral merge commit.
      ${i.n} Read more at ${n.Tt(gp)}
    `);const vp=(e,t)=>{let{patchBaseRef:r,patchHeadRef:i,preserveMissingSpecs:a,isLocalBuild:o}=e.options,{version:s,matchesBranch:c,changedFiles:l,changedDependencyNames:u,replacementBuildIds:d,committedAt:f,baselineCommits:p,packageMetadataChanges:m,gitUserEmail:h,rootPath:g,visitedCommits:_,cloneFilter:v,cloneDepth:y,shallowBoundaryCommits:b,...x}=t.git,{rebuildForBuildId:S,turboSnap:C}=t;return{autoAcceptChanges:c?.(e.options.autoAcceptChanges),patchBaseRef:r,patchHeadRef:i,preserveMissingSpecs:a,...h&&{gitUserEmailHash:Zs(h)},...x,committedAt:new Date(f),ciVariables:t.environment,isLocalBuild:o,needsBaselines:!!C&&!C.bailReason,packageVersion:e.pkg.version,...t.runtimeMetadata,rebuildForBuildId:S,storybookAddons:t.storybook.addons,storybookRefs:t.storybook.refs,storybookVersion:t.storybook.version,projectMetadata:{...t.projectMetadata,storybookBaseDir:n.u(g??process.cwd(),t.storybook.projectRoot)||`.`}}},yp=async(e,t)=>{let r=vp(e,t),{announceBuild:i}=await e.client.runQuery(`
  mutation AnnounceBuildMutation($input: AnnounceBuildInput!) {
    announceBuild(input: $input) {
      id
      number
      browsers
      # no need for legacy:false on AnnouncedBuild.status
      status
      autoAcceptChanges
      reportToken
      features {
        uiTests
        uiReview
        isReactNativeApp
      }
      app {
        id
        turboSnapAvailability
        isOnboarding
      }
    }
  }
`,{input:r},{retries:3});return n.It(`app_id`,i.app.id),n.Ft(`build`,{id:i.id}),i},bp=e=>{let t={};for(let[n,r]of Object.entries(process.env))r&&e.env.ENVIRONMENT_WHITELIST.some(e=>n.match(e))&&(t[n]=r);return e.log.debug(`Got environment:\n${JSON.stringify(t,void 0,2)}`),t},xp=async e=>{let t={nodePlatform:process.platform,nodeVersion:process.versions.node};try{let e=await ef();if(!e)throw Error(`Failed to determine package manager`);t.packageManager=e,n.It(`packageManager`,e);let r=await nf(e);t.packageManagerVersion=r,n.It(`packageManagerVersion`,r)}catch(t){e.log.debug(`Failed to fully determine runtime metadata: ${t.message}`)}return t};async function Sp(e,t){let n=bp(e),r=await xp(e),i=await yp(e,{...t.partialAnnounceBuildInput,environment:n,runtimeMetadata:r}),{rootPath:a}=t.partialAnnounceBuildInput.git;return a?await mp(e,a,i.id):e.log.warn(`git.rootPath unexpectedly undefined. Should have been set in the gitInfo task upstream.`),{kind:`continue`,output:{environment:n,runtimeMetadata:r,announcedBuild:i}}}const Cp=e=>({partialAnnounceBuildInput:{git:e.git,turboSnap:e.turboSnap,rebuildForBuildId:e.rebuildForBuildId,storybook:e.storybook,projectMetadata:e.projectMetadata}}),wp=async(e,t)=>{if(e.environment=t.environment,e.runtimeMetadata=t.runtimeMetadata,e.announcedBuild=t.announcedBuild,e.isOnboarding=e.isOnboarding||t.announcedBuild.app.isOnboarding,e.isReactNativeApp=t.announcedBuild.features?.isReactNativeApp??!1,e.turboSnap&&t.announcedBuild.app.turboSnapAvailability===`UNAVAILABLE`&&(e.turboSnap.unavailable=!0),e.analytics=fp(e),e.isReactNativeApp&&await h.t(e),e.turboSnap&&e.isReactNativeApp)throw Error(hp());e.isOnboarding||e.git.parentCommits&&e.git.parentCommits.length!==0||e.log.warn(_p(e))},Tp={status:`initial`,title:`Initialize build`},Ep=()=>({status:`pending`,title:`Initializing build`}),Dp=e=>({status:`success`,title:`Initialized build`,output:`Build ${e.announcedBuild.number} initialized`});async function Op(e){await pd(e,{name:`initialize`,title:Tp.title,transitions:{pending:Ep,success:Dp},extractInput:Cp,run:Sp,applyOutput:wp},Sd(e,yd))}function kp(e){switch(e){case`NO_ANCESTORS`:return`this build has no ancestor builds`;case`NO_ANCESTOR_HASHES`:return`no ancestor build has file hashes to compare against`;case`NO_ANCESTOR_CONFIGURATION_MATCH`:return`the Storybook configuration differs from every ancestor build`;default:return`this build could not be compared against its ancestor builds`}}var Ap=({hashBasedTurboSnap:e})=>(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap 2.0 disabled}
    A full build is required because ${kp(e.bailReason)}.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/turbosnap`)}
  `);const jp=e=>({status:`initial`,title:`Prepare your built ${d.o(e)}`}),Mp=e=>({status:`pending`,title:`Prepare your built ${d.o(e)}`,output:`Validating ${d.o(e)} files`}),Np=(e,t)=>{let n=`Invalid ${d.o(e)} build at ${e.sourceDir}`;return e.buildLogFile&&(n+=` (check the build log)`),t&&(n+=`: ${t.message}`),{status:`error`,title:`Preparing your built ${d.o(e)}`,output:n}},Pp=e=>({status:`error`,title:`Preparing your built React Native Storybook`,output:`Your storybook.apk contains native libraries but does not include x86_64 support. Chromatic only supports x86_64.`}),Fp=e=>({status:`error`,title:`Preparing your built React Native Storybook`,output:`platform`in e?`Your storybook.app was built for ${e.platform}, not the iOS simulator. Chromatic only supports iOS simulator builds.`:`Your storybook.app supports ${e.families} but not iPhone. Chromatic captures iOS stories on iPhone simulators, so add iPhone to the app's targeted device families.`}),Ip=(e,t=[])=>{let n=[];if(t.length>0){let e=t.includes(`storybook.apk`),r=t.includes(`storybook.app`),i=t.filter(e=>e!==`storybook.apk`&&e!==`storybook.app`);if(n.push(`Missing files:`),e&&r?n.push(`→ This build is missing the storybook.app (iOS) and storybook.apk (Android) files required for React Native Storybook.`,`  Please ensure that the files are present in the output directory and named correctly before running the CLI.`):e?n.push(`→ This build is missing the storybook.apk file required for React Native Storybook for Android.`,`  Please ensure that the file is present in the output directory and named correctly before running the CLI.`):r&&n.push(`→ This build is missing the storybook.app file required for React Native Storybook for iOS.`,`  Please ensure that the file is present in the output directory and named correctly before running the CLI.`),i.length>0)for(let e of i)n.push(`  → ${e}`)}return n.push(``,`Invalid React Native Storybook build in directory ${b.default.resolve(e.sourceDir)}`),{status:`error`,title:`Preparing your built React Native Storybook`,output:n.join(`
`)}},Lp=e=>{let t=(0,Y.default)(`file`,e.git.changedFiles?.length,!0);return{status:`updating`,title:`Retrieving ${d.l(e)} files potentially affected by recent changes`,output:`Traversing dependencies for ${t} that changed since the last build`}},Rp=e=>{let{changedPackageFiles:t,changedStorybookFiles:n,changedStaticFiles:r}=e.turboSnap?.bailReason||{},i=t||n||r,o=i?.every(e=>a.l(e))?`dependency `:``,[s,...c]=i||[],l=(0,Y.default)(`sibling`,c.length,!0),u=`Found a ${o}change in ${s}`;return c.length===1&&(u+=` or its sibling`),c.length>1&&(u+=` or one of its ${l}`),{status:`updating`,title:`TurboSnap disabled`,output:u}},zp=e=>{let t=(0,Y.default)(`${d.l(e)} file`,e.onlyStoryFiles?.length,!0);return{status:`updating`,title:`Retrieved ${d.l(e)} files potentially affected by recent changes`,output:`Found ${t} potentially affected by recent changes`}},Bp=e=>e.hashBasedTurboSnap.bailed?{status:`updating`,title:`TurboSnap 2.0 disabled`,output:`A full build is required because ${kp(e.hashBasedTurboSnap.bailReason)}`}:{status:`updating`,title:`Using TurboSnap 2.0`,output:`Chromatic will compare file hashes to find ${d.l(e)} files potentially affected by recent changes`},Vp=e=>({status:`updating`,title:`Prepare your built ${d.o(e)}`,output:`Calculating file hashes`}),Hp=e=>({status:`success`,title:`Preparation complete`,output:`${d.s(d.o(e))} files validated and prepared for upload`});async function Up(e,t){if(!e.options.fileHashing)return{};e.report(Vp({options:e.options}));try{let n=Date.now(),r=await s.r({files:t.fileInfo.paths,directory:t.sourceDir,concurrency:e.env.CHROMATIC_HASH_CONCURRENCY});return e.log.debug(`Calculated file hashes in ${Date.now()-n}ms`),{hashes:r}}catch(t){return e.log.warn(`Failed to calculate file hashes`),e.log.debug(t),{}}}var Wp=({legacy:e})=>(0,J.dedent)(q.default`
    ${i.t} {bold TurboSnap requires a stats file}
    Did not find {bold preview-stats.json} in your built Storybook.
    Make sure you pass {bold ${e?`--webpack-stats-json`:`--stats-json`}} when building your Storybook.
  `);const Gp=({filepath:e,glob:t})=>q.default`{bold ${e}} (via {bold ${t}})`;var Kp=({matches:e})=>{let t=e.length===1?q.default`{bold --untraced} matches ${Gp(e[0])}.`:[q.default`{bold --untraced} matches these files:`,...e.map(e=>q.default`{dim →} ${Gp(e)}`)].join(`
`);return(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap can miss changes to untraced Storybook config files}
    ${t}
    Changing your Storybook's {bold main}, {bold preview}, {bold preview-head.html}, or {bold preview-body.html} file can affect every story. TurboSnap ignores changes to untraced files and to files only they import, so it may not retest the stories those changes affect.
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/turbosnap`)}
  `)},qp=e=>(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap 2.0 could not find your Storybook config}
    Did not find a Storybook main config file ({bold main.js}, {bold main.ts}, etc.) in {bold ${e}}.
    TurboSnap 2.0 skipped this build. When TurboSnap is enabled, the build uses TurboSnap 1.0, so your current TurboSnap behavior is unaffected.
    If your Storybook config lives somewhere else, pass {bold --storybook-config-dir <dir>} so Chromatic can find it.
  `),Jp=e=>(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap 2.0 could not find your story files}
    The stats file has a stories entry, but none of the modules it imports is a story file on disk under the Storybook project root {bold ${e}}.
    TurboSnap 2.0 skipped this build. When TurboSnap is enabled, the build uses TurboSnap 1.0, so your current TurboSnap behavior is unaffected.
    If Storybook was built in another directory, pass {bold --storybook-base-dir <dir>} pointing at it, relative to the repository root.
  `);async function Yp(e,t,n,r){let i={buildId:t,storybookHash:n.storybookHash,storybookConfigHashes:Object.fromEntries(n.storybookConfigHashes),storyFileHashes:Object.fromEntries(n.storyFileHashes),flags:r},{buildUploadHashes:a}=await e.runQuery(`
  mutation BuildUploadHashes($input: BuildUploadHashesInput!) {
    buildUploadHashes(input: $input) {
      ... on BuildUploadHashesSuccess {
        build {
          turboSnapStatus
          turboSnapMechanism
          turboSnapHashBailReason
        }
      }
      ... on BuildUploadHashesFailure {
        errors {
          ... on MutationError {
            message
          }
        }
      }
    }
  }
`,{input:i},{retries:3});return a}async function Xp(e){let t;try{t=await s.a(e.stats,{...e,gitRoot:Qp(e.gitRoot)})}catch(t){return t instanceof s.l?(e.log[e.failureLogLevel](qp(t.configDirectory)),{status:`fallback`}):t instanceof s.i?(e.log[e.failureLogLevel](Jp(t.projectRoot)),{status:`fallback`}):t instanceof s.n||t instanceof n.S?(e.log[e.failureLogLevel](`${t.message} TurboSnap 2.0 skipped this build. When TurboSnap is enabled, the build uses TurboSnap 1.0, so your current TurboSnap behavior is unaffected.`),{status:`fallback`}):$p(e,`Failed to build manifest for TurboSnap 2.0`,t)}e.log.debug(`Generated manifest for TurboSnap 2.0`);try{s.c(t,e.manifestPath,e.projectFiles)}catch(t){return $p(e,`Failed to write manifest for TurboSnap 2.0`,t)}e.log.debug(`Wrote manifest for TurboSnap 2.0 to ${e.manifestPath}`);let r;try{if(r=await Yp(e.graphqlClient,e.buildId,t,{onlyChanged:e.onlyChanged}),r.errors?.length){let e=r.errors.map(e=>e.message??`unknown error`).join(`; `);throw Error(`The backend API rejected the hash upload: ${e}`)}}catch(t){return $p(e,`Failed to upload hashes for TurboSnap 2.0`,t)}return e.log.debug(`Uploaded hashes for TurboSnap 2.0 to Chromatic: ${JSON.stringify(r.build)}`),{status:`fallback`,hashBased:Zp(r.build)}}function Zp(e){if(e?.turboSnapMechanism!==`HASH_BASED`)return;let t=e.turboSnapStatus===`BAILED`;return{bailed:t,...t&&e.turboSnapHashBailReason&&{bailReason:e.turboSnapHashBailReason}}}function Qp(e){if(!e)throw Error(`git.rootPath unexpectedly undefined. Should have been set in the gitInfo task upstream.`);return e}function $p(e,t,r){return e.log[e.failureLogLevel](t,r),n.jt(r),{status:`fallback`}}async function em(e,t={}){let{hashBased:n,...r}=await nm(e,t);return{...r,outcome:tm(e,r,n)}}function tm(e,t,n){return n?{mechanism:`v2`,...n}:af(e)?{mechanism:`v1`,bailed:t.status!==`traced`}:{mechanism:`none`}}async function nm(e,{onTraceWithV1:t}){let{statsPath:n,buildId:r}=e;if(!n){if(af(e))throw cm(e);return e.log.debug(`No stats file; skipping TurboSnap hash collection`),{status:`skipped`}}let i=!!r&&rm(e),a=of(e);if(!i&&!a)return{status:`skipped`};await sm(e);let o=await g.t(n),s=i?await lm(e,o,r):void 0;return a?im(e,o,n,{hashBased:s,onTraceWithV1:t}):{status:`skipped`,...s&&{hashBased:s}}}function rm(e){return!rf(e)&&!e.options.playwright&&!e.options.cypress}async function im(e,t,n,{hashBased:r,onTraceWithV1:i}){if(am(e,r))return{status:`skipped`,hashBased:r};if(e.log.debug(`Tracing changed files with TurboSnap 1.0`),!r)return i?.(),d.t(e,t,n);let a={...e.log,info:e.log.debug,warn:e.log.debug};return{...await d.t({...e,log:a},t,n),hashBased:r}}function am(e,t){return e.env.CHROMATIC_TURBOSNAP_DISABLE_V1?(e.log.debug(t?`CHROMATIC_TURBOSNAP_DISABLE_V1 is set and Chromatic applied TurboSnap 2.0 to this build; skipping TurboSnap 1.0`:`CHROMATIC_TURBOSNAP_DISABLE_V1 is set, but Chromatic did not apply TurboSnap 2.0 to this build; tracing with TurboSnap 1.0`),!!t):!1}const om=e=>(0,L.realpath)(e).catch(()=>e);async function sm(e){let t=(e.options.untraced??[]).filter(Boolean),{rootPath:r}=e.git;if(t.length===0||!r)return;let i=await om(e.storybook.configDir),o=n.u(await om(r),i),s=(await(0,L.readdir)(i).catch(()=>[])).flatMap(e=>{let r=`${o}/${e}`;if(!n.m(r,o))return[];let i=t.find(e=>a.f(e,r));return i?[{filepath:r,glob:i}]:[]});s.length>0&&e.log[e.turboSnap?`warn`:`debug`](Kp({matches:s}))}function cm(e){let t=e.storybook.version&&C.default.gte(C.default.coerce(e.storybook.version)||`0.0.0`,`8.0.0`);return Error(Wp({legacy:!t}))}async function lm(e,t,r){let i=!!e.turboSnap,a=i?`error`:`debug`;i||e.log.debug(`Running TurboSnap 2.0 to populate file hashes for future TurboSnap builds. This will not affect what stories are captured.`);try{return await n.kn(async o=>{o.setTag(`turbosnap`,`v2`),o.setTag(`turbosnap_requested`,i?`true`:`false`),o.setTag(`storybook_build_dir`,e.options.storybookBuildDir?`true`:`false`),o.setContext(`turbosnap_v2`,{cwd:process.cwd(),projectRoot:e.storybook.projectRoot,configDir:e.storybook.configDir,storybookBuildDir:e.options.storybookBuildDir}),e.log.debug(`Tracing changed files with TurboSnap 2.0`);let c=await Xp({log:e.log,failureLogLevel:a,onlyChanged:i,graphqlClient:e.client,buildId:r,stats:t,manifestPath:s.o(e.sourceDir),projectRoot:e.storybook.projectRoot,gitRoot:e.git.rootPath,untraced:e.options.untraced??[],configDir:e.storybook.configDir,e2ePackage:n.t(e.options),staticDirs:e.storybook.staticDirs,externals:e.options.externals??[],projectFiles:s.t({log:e.log,options:e.options})});return c.status===`fallback`?c.hashBased:void 0})}catch(t){e.log[a](`Failed to trace changed files with TurboSnap 2.0; this does not affect TurboSnap 1.0`,t),n.jt(t);return}}var um=({options:e,onlyStoryFiles:t=[],hashBased:n})=>{if(n)return(0,J.dedent)(q.default`
      ${i.r} {bold TurboSnap 2.0 enabled (dry run)}
      Chromatic decides which ${(0,Y.default)(d.l({options:e}))} to capture by comparing file hashes after your ${d.o({options:e})} is published.
      Dry runs skip publishing, so there's nothing to compare yet and no potentially affected ${(0,Y.default)(d.l({options:e}))} to list.
    `);let r=(0,Y.default)(`${d.l({options:e})} file`,t.length,!0);return(0,J.dedent)(q.default`
    ${i.r} {bold TurboSnap enabled (dry run)}
    Found ${r} potentially affected by recent changes.
  `)};const dm=/([$()*+?[\]^])/g;async function fm(e,t){let{log:n,options:r,env:i,client:o}=e;try{let a=await em({...t,log:n,options:r,env:i,client:o},{onTraceWithV1:()=>e.report(Lp({git:t.git,options:r}))}),s=pm(a);return a.outcome.mechanism===`v2`?hm(e,a.outcome):mm(e,a,s.onlyStoryFiles),s}catch(i){if(!af(t))return{turboSnapOutcome:{mechanism:`none`}};if(!r.interactive){let{statsPath:r}=t,{changedFiles:a}=t.git;n.info(`Failed to retrieve dependent ${d.l(e)} files`,{statsPath:r,changedFiles:a,err:i})}throw a.m(i,`Could not retrieve dependent ${d.l(e)} files.\n${i.message}`)}}function pm(e){let t=e.outcome;if(e.status===`skipped`)return{turboSnapOutcome:t};if(e.status===`bailed`)return{turboSnapOutcome:t,turboSnap:e.turboSnap};let n=Object.keys(e.onlyStoryFiles).map(e=>e.replaceAll(dm,String.raw`\$1`));return{turboSnapOutcome:t,turboSnap:e.turboSnap,onlyStoryFiles:n,untracedFiles:e.untracedFiles,changedDependencyNames:e.changedDependencyNames}}function mm(e,t,n){t.status===`bailed`&&e.report(Rp({turboSnap:t.turboSnap})),t.status===`traced`&&(e.options.interactive||(e.options.traceChanged||e.log.info(`Found potentially affected ${d.l(e)} files:\n${Object.entries(t.onlyStoryFiles).flatMap(([e,t])=>t.map(t=>`  ${t} [${e}]`)).join(`
`)}`),t.untracedFiles.length>0&&e.log.info(`Encountered ${t.untracedFiles.length} untraced files:\n${a.o(t.untracedFiles)}`)),e.report(zp({options:e.options,onlyStoryFiles:n})),e.options.dryRun&&e.log.info(um({options:e.options,onlyStoryFiles:n})))}function hm(e,t){e.report(Bp({options:e.options,hashBasedTurboSnap:t})),t.bailed?e.log.warn(Ap({hashBasedTurboSnap:t})):e.options.dryRun&&e.log.info(um({options:e.options,hashBased:!0}))}var gm=/* @__PURE__ */ e.t(((e,t)=>{t.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}})),_m=/* @__PURE__ */ e.t((e=>{let t={INVALID_LOC:`Invalid LOC header (bad signature)`,INVALID_CEN:`Invalid CEN header (bad signature)`,INVALID_END:`Invalid END header (bad signature)`,DESCRIPTOR_NOT_EXIST:`No descriptor present`,DESCRIPTOR_UNKNOWN:`Unknown descriptor format`,DESCRIPTOR_FAULTY:`Descriptor data is malformed`,NO_DATA:`Nothing to decompress`,BAD_CRC:`CRC32 checksum failed {0}`,MAX_OUTPUT_EXCEEDED:`Decompressed data exceeds the declared uncompressed size`,FILE_IN_THE_WAY:`There is a file in the way: {0}`,UNKNOWN_METHOD:`Invalid/unsupported compression method`,AVAIL_DATA:`inflate::Available inflate data did not terminate`,INVALID_DISTANCE:`inflate::Invalid literal/length or distance code in fixed or dynamic block`,TO_MANY_CODES:`inflate::Dynamic block code description: too many length or distance codes`,INVALID_REPEAT_LEN:`inflate::Dynamic block code description: repeat more than specified lengths`,INVALID_REPEAT_FIRST:`inflate::Dynamic block code description: repeat lengths with no first length`,INCOMPLETE_CODES:`inflate::Dynamic block code description: code lengths codes incomplete`,INVALID_DYN_DISTANCE:`inflate::Dynamic block code description: invalid distance code lengths`,INVALID_CODES_LEN:`inflate::Dynamic block code description: invalid literal/length code lengths`,INVALID_STORE_BLOCK:`inflate::Stored block length did not match one's complement`,INVALID_BLOCK_TYPE:`inflate::Invalid block type (type == 3)`,CANT_EXTRACT_FILE:`Could not extract the file`,CANT_OVERRIDE:`Target file already exists`,DISK_ENTRY_TOO_LARGE:`Number of disk entries is too large`,NO_ZIP:`No zip file was loaded`,NO_ENTRY:`Entry doesn't exist`,DUPLICATE_ENTRY:`Duplicate entry name {0}`,DIRECTORY_CONTENT_ERROR:`A directory cannot have content`,FILE_NOT_FOUND:`File not found: "{0}"`,NOT_IMPLEMENTED:`Not implemented`,INVALID_FILENAME:`Invalid filename`,INVALID_FORMAT:`Invalid or unsupported zip format. No END header found`,ZIP64_VALUE_TOO_LARGE:`Zip64 value exceeds the maximum safe integer`,INVALID_PASS_PARAM:`Incompatible password parameter`,WRONG_PASSWORD:`Wrong Password`,COMMENT_TOO_LONG:`Comment is too long`,EXTRA_FIELD_PARSE_ERROR:`Extra field parsing error`};function n(e){return function(...t){return t.length&&(e=e.replace(/\{(\d)\}/g,(e,n)=>t[n]||``)),/* @__PURE__ */ Error(`ADM-ZIP: `+e)}}for(let r of Object.keys(t))e[r]=n(t[r])})),vm=/* @__PURE__ */ e.t(((e,t)=>{let n=require("fs"),r=require("path"),i=gm(),a=_m(),o=typeof process==`object`&&process.platform===`win32`,s=e=>typeof e==`object`&&!!e,c=(/* @__PURE__ */ new Uint32Array(256)).map((e,t)=>{for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t>>>=1;return t>>>0});function l(e){this.sep=r.sep,this.fs=n,s(e)&&s(e.fs)&&typeof e.fs.statSync==`function`&&(this.fs=e.fs)}t.exports=l,l.prototype.makeDir=function(e){let t=this;function n(e){let n=e.split(t.sep)[0];e.split(t.sep).forEach(function(e){if(e&&e.substr(-1,1)!==`:`){n+=t.sep+e;var r;try{r=t.fs.statSync(n)}catch(e){if(e.message&&e.message.startsWith(`ENOENT`))t.fs.mkdirSync(n);else throw e}if(r&&r.isFile())throw a.FILE_IN_THE_WAY(`"${n}"`)}})}n(e)},l.prototype.writeFileTo=function(e,t,n,i){let a=this;if(a.fs.existsSync(e)&&(!n||a.fs.statSync(e).isDirectory()))return!1;var o=r.dirname(e);a.fs.existsSync(o)||a.makeDir(o);var s;try{s=a.fs.openSync(e,`w`,438)}catch{a.fs.chmodSync(e,438),s=a.fs.openSync(e,`w`,438)}if(s)try{a.fs.writeSync(s,t,0,t.length,0)}finally{a.fs.closeSync(s)}return a.fs.chmodSync(e,i||438),!0},l.prototype.writeFileToAsync=function(e,t,n,i,a){typeof i==`function`&&(a=i,i=void 0);let o=this;o.fs.exists(e,function(s){if(s&&!n)return a(!1);o.fs.stat(e,function(n,c){if(s&&c&&c.isDirectory())return a(!1);var l=r.dirname(e);o.fs.exists(l,function(n){if(!n)try{o.makeDir(l)}catch{return a(!1)}let r=function(n){o.fs.write(n,t,0,t.length,0,function(t){o.fs.close(n,function(){if(t)return a(!1);o.fs.chmod(e,i||438,function(){a(!0)})})})};o.fs.open(e,`w`,438,function(t,n){t?o.fs.chmod(e,438,function(){o.fs.open(e,`w`,438,function(e,t){if(e||!t)return a(!1);r(t)})}):n?r(n):a(!1)})})})})},l.prototype.assertPathSafe=function(e,t){let n=this;if(typeof n.fs.lstatSync!=`function`)return;let i=r.resolve(e),o=r.resolve(t);if(o===i)return;let s=r.relative(i,o);if(!s||s===`..`||s.startsWith(`..`+r.sep)||r.isAbsolute(s))return;let c=i;for(let e of s.split(r.sep)){if(!e||e===`.`)continue;c=r.join(c,e);let t;try{t=n.fs.lstatSync(c)}catch{break}if(t.isSymbolicLink())throw a.FILE_IN_THE_WAY(`"${c}"`)}},l.prototype.findFiles=function(e){let t=this,n=typeof t.fs.lstatSync==`function`,i=t.fs.realpathSync(e);function a(e){if(!n||!t.fs.lstatSync(e).isSymbolicLink())return!1;let a;try{a=t.fs.realpathSync(e)}catch{return!0}return!(a===i||a.startsWith(i+r.sep))}function o(e,n,i,s){typeof n==`boolean`&&(i=n,n=void 0);let c=[];return t.fs.readdirSync(e).forEach(function(l){let u=r.join(e,l);if(a(u))return;let d=t.fs.statSync(u);if((!n||n.test(u))&&c.push(r.normalize(u)+(d.isDirectory()?t.sep:``)),d.isDirectory()&&i){let e=t.fs.realpathSync(u);s.has(e)||(s.add(e),c=c.concat(o(u,n,i,s)))}}),c}return o(e,void 0,!0,/* @__PURE__ */ new Set([i]))},l.prototype.findFilesAsync=function(e,t){let n=this,i=[],a=!1,o=function(e){a||(a=!0,t(e,e?void 0:i))},s=typeof n.fs.lstat==`function`,c=null,l=function(e,t){if(!s)return t(null,!1);n.fs.lstat(e,function(i,a){if(i)return t(i);if(!a||!a.isSymbolicLink())return t(null,!1);n.fs.realpath(e,function(e,n){if(e)return t(null,!0);t(null,!(n===c||n.startsWith(c+r.sep)))})})},u=function(e,t,a){n.fs.readdir(e,function(o,s){if(o)return a(o);let c=s.length;if(!c)return a();s.forEach(function(o){let s=r.join(e,o);l(s,function(e,o){if(e)return a(e);o?--c||a():n.fs.stat(s,function(e,o){if(e)return a(e);o?(i.push(r.normalize(s)+(o.isDirectory()?n.sep:``)),o.isDirectory()?n.fs.realpath(s,function(e,n){if(e)return a(e);t.has(n)?--c||a():(t.add(n),u(s,t,function(e){if(e)return a(e);--c||a()}))}):--c||a()):--c||a()})})})})};n.fs.realpath(e,function(t,n){if(t)return o(t);c=n,u(e,/* @__PURE__ */ new Set([n]),o)})},l.prototype.getAttributes=function(){},l.prototype.setAttributes=function(){},l.crc32update=function(e,t){return c[(e^t)&255]^e>>>8},l.crc32=function(e){typeof e==`string`&&(e=Buffer.from(e,`utf8`));let t=e.length,n=-1;for(let r=0;r<t;)n=l.crc32update(n,e[r++]);return~n>>>0},l.methodToString=function(e){switch(e){case i.STORED:return`STORED (`+e+`)`;case i.DEFLATED:return`DEFLATED (`+e+`)`;default:return`UNSUPPORTED (`+e+`)`}},l.canonical=function(e){if(!e)return``;let t=r.posix.normalize(`/`+e.split(`\\`).join(`/`));return r.join(`.`,t)},l.zipnamefix=function(e){if(!e)return``;let t=r.posix.normalize(`/`+e.split(`\\`).join(`/`));return r.posix.join(`.`,t)},l.findLast=function(e,t){if(!Array.isArray(e))throw TypeError(`arr is not array`);let n=e.length>>>0;for(let r=n-1;r>=0;r--)if(t(e[r],r,e))return e[r]},l.sanitize=function(e,t){e=r.resolve(r.normalize(e));for(var n=t.split(`/`),i=0,a=n.length;i<a;i++){var o=r.normalize(r.join(e,n.slice(i,a).join(r.sep)));if(o===e||o.startsWith(e+r.sep))return o}return r.normalize(r.join(e,r.basename(t)))},l.toBuffer=function(e,t){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):typeof e==`string`?t(e):Buffer.alloc(0)},l.readBigUInt64LE=function(e,t){let n=e.readUInt32LE(t),r=e.readUInt32LE(t+4)*4294967296+n;if(r>2**53-1)throw a.ZIP64_VALUE_TOO_LARGE();return r},l.writeBigUInt64LE=function(e,t,n){let r=t>>>0,i=Math.floor(t/4294967296)>>>0;e.writeUInt32LE(r,n),e.writeUInt32LE(i,n+4)},l.fromDOS2Date=function(e){return new Date((e>>25&127)+1980,Math.max((e>>21&15)-1,0),Math.max(e>>16&31,1),e>>11&31,e>>5&63,(e&31)<<1)},l.fromDate2DOS=function(e){let t=0,n=0;return e.getFullYear()>1979&&(t=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1),t<<16|n},l.isWin=o,l.crcTable=c})),ym=/* @__PURE__ */ e.t(((e,t)=>{let n=require("path");t.exports=function(e,{fs:t}){var r=e||``,i=o(),a=null;function o(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return r&&t.existsSync(r)?(a=t.statSync(r),i.directory=a.isDirectory(),i.mtime=a.mtime,i.atime=a.atime,i.executable=!!(73&a.mode),i.readonly=!(128&a.mode),i.hidden=n.basename(r)[0]===`.`):console.warn(`Invalid path: `+r),{get directory(){return i.directory},get readOnly(){return i.readonly},get hidden(){return i.hidden},get mtime(){return i.mtime},get atime(){return i.atime},get executable(){return i.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:i.directory,isReadOnly:i.readonly,isHidden:i.hidden,isExecutable:i.executable,mTime:i.mtime,aTime:i.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,`	`)}}}})),bm=/* @__PURE__ */ e.t(((e,t)=>{t.exports={efs:!0,encode:e=>Buffer.from(e,`utf8`),decode:e=>e.toString(`utf8`)}})),xm=/* @__PURE__ */ e.t(((e,t)=>{t.exports=vm(),t.exports.Constants=gm(),t.exports.Errors=_m(),t.exports.FileAttr=ym(),t.exports.decoder=bm()})),Sm=/* @__PURE__ */ e.t(((e,t)=>{var n=xm(),r=n.Constants;t.exports=function(){var e=20,t=10,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0;e|=n.isWin?2560:768,i|=r.FLG_EFS;let _={extraLen:0},v=e=>Math.max(0,e)>>>0,y=e=>Math.max(0,e)&255;return o=n.fromDate2DOS(/* @__PURE__ */ new Date),{get made(){return e},set made(t){e=t},get version(){return t},set version(e){t=e},get flags(){return i},set flags(e){i=e},get flags_efs(){return(i&r.FLG_EFS)>0},set flags_efs(e){e?i|=r.FLG_EFS:i&=~r.FLG_EFS},get flags_desc(){return(i&r.FLG_DESC)>0},set flags_desc(e){e?i|=r.FLG_DESC:i&=~r.FLG_DESC},get method(){return a},set method(e){switch(e){case r.STORED:this.version=10;break;case r.DEFLATED:default:this.version=20}a=e},get time(){return n.fromDOS2Date(this.timeval)},set time(e){e=new Date(e),this.timeval=n.fromDate2DOS(e)},get timeval(){return o},set timeval(e){o=v(e)},get timeHighByte(){return y(o>>>8)},get crc(){return s},set crc(e){s=v(e)},get compressedSize(){return c},set compressedSize(e){c=v(e)},get size(){return l},set size(e){l=v(e)},get fileNameLength(){return u},set fileNameLength(e){u=e},get extraLength(){return d},set extraLength(e){d=e},get extraLocalLength(){return _.extraLen},set extraLocalLength(e){_.extraLen=e},get commentLength(){return f},set commentLength(e){f=e},get diskNumStart(){return p},set diskNumStart(e){p=v(e)},get inAttr(){return m},set inAttr(e){m=v(e)},get attr(){return h},set attr(e){h=v(e)},get fileAttr(){return(h||0)>>16&511},get offset(){return g},set offset(e){g=v(e)},get encrypted(){return(i&r.FLG_ENC)===r.FLG_ENC},get centralHeaderSize(){return r.CENHDR+u+d+f},get realDataOffset(){return g+r.LOCHDR+_.fnameLen+_.extraLen},get localHeader(){return _},loadLocalHeaderFromBinary:function(e){if(g<0||g+r.LOCHDR>e.length)throw n.Errors.INVALID_LOC();var t=e.slice(g,g+r.LOCHDR);if(t.readUInt32LE(0)!==r.LOCSIG)throw n.Errors.INVALID_LOC();_.version=t.readUInt16LE(r.LOCVER),_.flags=t.readUInt16LE(r.LOCFLG),_.flags_desc=(_.flags&r.FLG_DESC)>0,_.method=t.readUInt16LE(r.LOCHOW),_.time=t.readUInt32LE(r.LOCTIM),_.crc=t.readUInt32LE(r.LOCCRC),_.compressedSize=t.readUInt32LE(r.LOCSIZ),_.size=t.readUInt32LE(r.LOCLEN),_.fnameLen=t.readUInt16LE(r.LOCNAM),_.extraLen=t.readUInt16LE(r.LOCEXT);let i=g+r.LOCHDR+_.fnameLen,a=i+_.extraLen;return e.slice(i,a)},loadFromBinary:function(_){if(_.length!==r.CENHDR||_.readUInt32LE(0)!==r.CENSIG)throw n.Errors.INVALID_CEN();e=_.readUInt16LE(r.CENVEM),t=_.readUInt16LE(r.CENVER),i=_.readUInt16LE(r.CENFLG),a=_.readUInt16LE(r.CENHOW),o=_.readUInt32LE(r.CENTIM),s=_.readUInt32LE(r.CENCRC),c=_.readUInt32LE(r.CENSIZ),l=_.readUInt32LE(r.CENLEN),u=_.readUInt16LE(r.CENNAM),d=_.readUInt16LE(r.CENEXT),f=_.readUInt16LE(r.CENCOM),p=_.readUInt16LE(r.CENDSK),m=_.readUInt16LE(r.CENATT),h=_.readUInt32LE(r.CENATX),g=_.readUInt32LE(r.CENOFF)},localHeaderToBinary:function(){var e=Buffer.alloc(r.LOCHDR);return e.writeUInt32LE(r.LOCSIG,0),e.writeUInt16LE(t,r.LOCVER),e.writeUInt16LE(i&~r.FLG_DESC,r.LOCFLG),e.writeUInt16LE(a,r.LOCHOW),e.writeUInt32LE(o,r.LOCTIM),e.writeUInt32LE(s,r.LOCCRC),e.writeUInt32LE(c,r.LOCSIZ),e.writeUInt32LE(l,r.LOCLEN),e.writeUInt16LE(u,r.LOCNAM),e.writeUInt16LE(_.extraLen,r.LOCEXT),e},centralHeaderToBinary:function(){var n=Buffer.alloc(r.CENHDR+u+d+f);return n.writeUInt32LE(r.CENSIG,0),n.writeUInt16LE(e,r.CENVEM),n.writeUInt16LE(t,r.CENVER),n.writeUInt16LE(i&~r.FLG_DESC,r.CENFLG),n.writeUInt16LE(a,r.CENHOW),n.writeUInt32LE(o,r.CENTIM),n.writeUInt32LE(s,r.CENCRC),n.writeUInt32LE(c,r.CENSIZ),n.writeUInt32LE(l,r.CENLEN),n.writeUInt16LE(u,r.CENNAM),n.writeUInt16LE(d,r.CENEXT),n.writeUInt16LE(f,r.CENCOM),n.writeUInt16LE(p,r.CENDSK),n.writeUInt16LE(m,r.CENATT),n.writeUInt32LE(h,r.CENATX),n.writeUInt32LE(g,r.CENOFF),n},toJSON:function(){let o=function(e){return e+` bytes`};return{made:e,version:t,flags:i,method:n.methodToString(a),time:this.time,crc:`0x`+s.toString(16).toUpperCase(),compressedSize:o(c),size:o(l),fileNameLength:o(u),extraLength:o(d),commentLength:o(f),diskNumStart:p,inAttr:m,attr:h,offset:g,centralHeaderSize:o(r.CENHDR+u+d+f)}},toString:function(){return JSON.stringify(this.toJSON(),null,`	`)}}}})),Cm=/* @__PURE__ */ e.t(((e,t)=>{var n=xm(),r=n.Constants;t.exports=function(){var e=0,t=0,i=0,a=0,o=0;let s=()=>e>r.EF_ZIP64_OR_16||t>r.EF_ZIP64_OR_16||i>r.EF_ZIP64_OR_32||a>r.EF_ZIP64_OR_32;return{get diskEntries(){return e},set diskEntries(n){e=t=n},get totalEntries(){return t},set totalEntries(n){t=e=n},get size(){return i},set size(e){i=e},get offset(){return a},set offset(e){a=e},get commentLength(){return o},set commentLength(e){o=e},get mainHeaderSize(){return(s()?r.ZIP64HDR+r.END64HDR:0)+r.ENDHDR+o},loadFromBinary:function(s){if((s.length!==r.ENDHDR||s.readUInt32LE(0)!==r.ENDSIG)&&(s.length<r.ZIP64HDR||s.readUInt32LE(0)!==r.ZIP64SIG))throw n.Errors.INVALID_END();s.readUInt32LE(0)===r.ENDSIG?(e=s.readUInt16LE(r.ENDSUB),t=s.readUInt16LE(r.ENDTOT),i=s.readUInt32LE(r.ENDSIZ),a=s.readUInt32LE(r.ENDOFF),o=s.readUInt16LE(r.ENDCOM)):(e=n.readBigUInt64LE(s,r.ZIP64SUB),t=n.readBigUInt64LE(s,r.ZIP64TOT),i=n.readBigUInt64LE(s,r.ZIP64SIZB),a=n.readBigUInt64LE(s,r.ZIP64OFF),o=0)},toBinary:function(){if(!s()){var c=Buffer.alloc(r.ENDHDR+o);return c.writeUInt32LE(r.ENDSIG,0),c.writeUInt32LE(0,4),c.writeUInt16LE(e,r.ENDSUB),c.writeUInt16LE(t,r.ENDTOT),c.writeUInt32LE(i,r.ENDSIZ),c.writeUInt32LE(a,r.ENDOFF),c.writeUInt16LE(o,r.ENDCOM),c.fill(` `,r.ENDHDR),c}var c=Buffer.alloc(this.mainHeaderSize);let l=0;c.writeUInt32LE(r.ZIP64SIG,l),n.writeBigUInt64LE(c,r.ZIP64HDR-r.ZIP64LEAD,l+r.ZIP64SIZE),c.writeUInt16LE(45,l+r.ZIP64VEM),c.writeUInt16LE(45,l+r.ZIP64VER),c.writeUInt32LE(0,l+r.ZIP64DSK),c.writeUInt32LE(0,l+r.ZIP64DSKDIR),n.writeBigUInt64LE(c,e,l+r.ZIP64SUB),n.writeBigUInt64LE(c,t,l+r.ZIP64TOT),n.writeBigUInt64LE(c,i,l+r.ZIP64SIZB),n.writeBigUInt64LE(c,a,l+r.ZIP64OFF);let u=a+i;return l+=r.ZIP64HDR,c.writeUInt32LE(r.END64SIG,l),c.writeUInt32LE(0,l+r.END64START),n.writeBigUInt64LE(c,u,l+r.END64OFF),c.writeUInt32LE(1,l+r.END64NUMDISKS),l+=r.END64HDR,c.writeUInt32LE(r.ENDSIG,l),c.writeUInt32LE(0,l+4),c.writeUInt16LE(Math.min(e,r.EF_ZIP64_OR_16),l+r.ENDSUB),c.writeUInt16LE(Math.min(t,r.EF_ZIP64_OR_16),l+r.ENDTOT),c.writeUInt32LE(Math.min(i,r.EF_ZIP64_OR_32),l+r.ENDSIZ),c.writeUInt32LE(Math.min(a,r.EF_ZIP64_OR_32),l+r.ENDOFF),c.writeUInt16LE(o,l+r.ENDCOM),c.fill(` `,l+r.ENDHDR),c},toJSON:function(){return{diskEntries:e,totalEntries:t,size:i+` bytes`,offset:function(e,t){let n=e.toString(16).toUpperCase();for(;n.length<t;)n=`0`+n;return`0x`+n}(a,4),commentLength:o}},toString:function(){return JSON.stringify(this.toJSON(),null,`	`)}}}})),wm=/* @__PURE__ */ e.t((e=>{e.EntryHeader=Sm(),e.MainHeader=Cm()})),Tm=/* @__PURE__ */ e.t(((e,t)=>{t.exports=function(e){var t=require("zlib"),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,n)},deflateAsync:function(r){var i=t.createDeflateRaw(n),a=[],o=0;i.on(`data`,function(e){a.push(e),o+=e.length}),i.on(`end`,function(){var e=Buffer.alloc(o),t=0;e.fill(0);for(var n=0;n<a.length;n++){var i=a[n];i.copy(e,t),t+=i.length}r&&r(e)}),i.end(e)}}}})),Em=/* @__PURE__ */ e.t(((e,t)=>{let n=+(process?.versions?.node??``).split(`.`)[0]||0,r=_m();t.exports=function(e,t){var i=require("zlib");let a=t>0?t:1,o=n>=15?{maxOutputLength:a}:{};return{inflate:function(){return i.inflateRawSync(e,o)},inflateAsync:function(t){var n=i.createInflateRaw(o),s=[],c=0,l=!1;let u=function(e){l||(l=!0,n.destroy(),t&&t(Buffer.alloc(0),e))};n.on(`error`,function(e){u(e)}),n.on(`data`,function(e){if(!l){if(c+=e.length,c>a)return u(r.MAX_OUTPUT_EXCEEDED());s.push(e)}}),n.on(`end`,function(){if(!l){l=!0;var e=Buffer.alloc(c),n=0;e.fill(0);for(var r=0;r<s.length;r++){var i=s[r];i.copy(e,n),n+=i.length}t&&t(e)}}),n.end(e)}}}})),Dm=/* @__PURE__ */ e.t(((e,t)=>{let{randomFillSync:n}=require("crypto"),r=_m(),i=(/* @__PURE__ */ new Uint32Array(256)).map((e,t)=>{for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t>>>=1;return t>>>0}),a=(e,t)=>Math.imul(e,t)>>>0,o=(e,t)=>i[(e^t)&255]^e>>>8,s=()=>typeof n==`function`?n(Buffer.alloc(12)):s.node();s.node=()=>{let e=Buffer.alloc(12),t=e.length;for(let n=0;n<t;n++)e[n]=Math.random()*256&255;return e};let c={genSalt:s};function l(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let e=0;e<t.length;e++)this.updateKeys(t[e])}l.prototype.updateKeys=function(e){let t=this.keys;return t[0]=o(t[0],e),t[1]+=t[0]&255,t[1]=a(t[1],134775813)+1,t[2]=o(t[2],t[1]>>>24),e},l.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return a(e,e^1)>>8&255};function u(e){let t=new l(e);return function(e){let n=Buffer.alloc(e.length),r=0;for(let i of e)n[r++]=t.updateKeys(i^t.next());return n}}function d(e){let t=new l(e);return function(e,n,r=0){n||=Buffer.alloc(e.length);for(let i of e){let e=t.next();n[r++]=i^e,t.updateKeys(i)}return n}}function f(e,t,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let i=u(n),a=i(e.slice(0,12)),o=(t.flags&8)==8?t.timeHighByte:t.crc>>>24;if(a[11]!==o)throw r.WRONG_PASSWORD();return i(e.slice(12))}function p(e){Buffer.isBuffer(e)&&e.length>=12?c.genSalt=function(){return e.slice(0,12)}:e===`node`?c.genSalt=s.node:c.genSalt=s}function m(e,t,n,r=!1){e??=Buffer.alloc(0),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));let i=d(n),a=c.genSalt();a[11]=t.crc>>>24&255,r&&(a[10]=t.crc>>>16&255);let o=Buffer.alloc(e.length+12);return i(a,o),i(e,o,12)}t.exports={decrypt:f,encrypt:m,_salter:p}})),Om=/* @__PURE__ */ e.t((e=>{e.Deflater=Tm(),e.Inflater=Em(),e.ZipCrypto=Dm()})),km=/* @__PURE__ */ e.t(((e,t)=>{var n=xm(),r=wm(),i=n.Constants,a=Om();t.exports=function(e,t){var o=new r.EntryHeader,s=Buffer.alloc(0),c=Buffer.alloc(0),l=!1,u=null,d=Buffer.alloc(0),f=Buffer.alloc(0),p=!0;let m=e,h=typeof m.decoder==`object`?m.decoder:n.decoder;p=h.hasOwnProperty(`efs`)?h.efs:!1;function g(){if(!t||!(t instanceof Uint8Array))return Buffer.alloc(0);f=o.loadLocalHeaderFromBinary(t);let e=o.realDataOffset,r=e+o.compressedSize;if(e<0||r<e||r>t.length)throw n.Errors.INVALID_LOC();return t.slice(e,r)}function _(e){let t=o.flags_desc||o.localHeader.flags_desc?o.crc:o.localHeader.crc;return n.crc32(e)===t}function v(e,t,r){if(t===void 0&&typeof e==`string`&&(r=e,e=void 0),l)return e&&t&&t(Buffer.alloc(0),n.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var i;try{if(i=g(),i.length===0)return e&&t&&t(i),i;if(o.encrypted){if(typeof r!=`string`&&!Buffer.isBuffer(r))throw n.Errors.INVALID_PASS_PARAM();i=a.ZipCrypto.decrypt(i,o,r)}}catch(n){if(e&&t)return t(Buffer.alloc(0),n),Buffer.alloc(0);throw n}var c;switch(o.method){case n.Constants.STORED:if(c=Buffer.alloc(i.length),i.copy(c),_(c))return e&&t&&t(c),c;throw e&&t&&t(c,n.Errors.BAD_CRC()),n.Errors.BAD_CRC();case n.Constants.DEFLATED:var u=new a.Inflater(i,o.size);if(e)u.inflateAsync(function(e,r){t&&(r?t(Buffer.alloc(0),r):_(e)?t(e):t(e,n.Errors.BAD_CRC()))});else{if(c=u.inflate(),!_(c))throw n.Errors.BAD_CRC(`"${h.decode(s)}"`);return c}break;default:throw e&&t&&t(Buffer.alloc(0),n.Errors.UNKNOWN_METHOD()),n.Errors.UNKNOWN_METHOD()}}function y(e,r){if((!u||!u.length)&&Buffer.isBuffer(t))return e&&r&&r(g()),g();if(u.length&&!l){var i;switch(o.method){case n.Constants.STORED:return o.compressedSize=o.size,i=Buffer.alloc(u.length),u.copy(i),e&&r&&r(i),i;default:case n.Constants.DEFLATED:var s=new a.Deflater(u);if(e)s.deflateAsync(function(e){i=Buffer.alloc(e.length),o.compressedSize=e.length,e.copy(i),r&&r(i)});else{var c=s.deflate();return o.compressedSize=c.length,c}s=null}}else if(e&&r)r(Buffer.alloc(0));else return Buffer.alloc(0)}function b(e,t){return n.readBigUInt64LE(e,t)}function x(e){try{for(var t=0,r,a,o;t+4<e.length;)r=e.readUInt16LE(t),t+=2,a=e.readUInt16LE(t),t+=2,o=e.slice(t,t+a),t+=a,i.ID_ZIP64===r&&S(o)}catch{throw n.Errors.EXTRA_FIELD_PARSE_ERROR()}}function S(e){var t,n,r,a;e.length>=i.EF_ZIP64_SCOMP&&(t=b(e,i.EF_ZIP64_SUNCOMP),o.size===i.EF_ZIP64_OR_32&&(o.size=t)),e.length>=i.EF_ZIP64_RHO&&(n=b(e,i.EF_ZIP64_SCOMP),o.compressedSize===i.EF_ZIP64_OR_32&&(o.compressedSize=n)),e.length>=i.EF_ZIP64_DSN&&(r=b(e,i.EF_ZIP64_RHO),o.offset===i.EF_ZIP64_OR_32&&(o.offset=r)),e.length>=i.EF_ZIP64_DSN+4&&(a=e.readUInt32LE(i.EF_ZIP64_DSN),o.diskNumStart===i.EF_ZIP64_OR_16&&(o.diskNumStart=a))}return{get entryName(){return h.decode(s)},get rawEntryName(){return s},set entryName(e){s=n.toBuffer(e,h.encode);var t=s[s.length-1];l=t===47||t===92,o.fileNameLength=s.length},get efs(){return typeof p==`function`?p(this.entryName):p},get extra(){return d},set extra(e){d=e,o.extraLength=e.length,x(e)},get comment(){return h.decode(c)},set comment(e){if(c=n.toBuffer(e,h.encode),o.commentLength=c.length,c.length>65535)throw n.Errors.COMMENT_TOO_LONG()},get name(){let e=h.decode(s);return l?e.replace(/[/\\]$/,``).split(`/`).pop():e.split(`/`).pop()},get isDirectory(){return l},getCompressedData:function(){return y(!1,null)},getCompressedDataAsync:function(e){y(!0,e)},setData:function(e){u=n.toBuffer(e,n.decoder.encode),!l&&u.length?(o.size=u.length,o.method=n.Constants.DEFLATED,o.crc=n.crc32(e),o.changed=!0):o.method=n.Constants.STORED},getData:function(e){return o.changed?u:v(!1,null,e)},getDataAsync:function(e,t){o.changed?e(u):v(!0,e,t)},set attr(e){o.attr=e},get attr(){return o.attr},set header(e){o.loadFromBinary(e)},get header(){return o},packCentralHeader:function(){o.flags_efs=this.efs,o.extraLength=d.length;var e=o.centralHeaderToBinary(),t=n.Constants.CENHDR;return s.copy(e,t),t+=s.length,d.copy(e,t),t+=o.extraLength,c.copy(e,t),e},packLocalHeader:function(){let e=0;o.flags_efs=this.efs,o.extraLocalLength=f.length;let t=o.localHeaderToBinary(),n=Buffer.alloc(t.length+s.length+o.extraLocalLength);return t.copy(n,e),e+=t.length,s.copy(n,e),e+=s.length,f.copy(n,e),e+=f.length,n},toJSON:function(){let e=function(e){return`<`+(e&&e.length+` bytes buffer`||`null`)+`>`};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:o.toJSON(),compressedData:e(t),data:e(u)}},toString:function(){return JSON.stringify(this.toJSON(),null,`	`)}}}})),Am=/* @__PURE__ */ e.t(((e,t)=>{let n=km(),r=wm(),i=xm();t.exports=function(e,t){var a=[],o=Object.create(null),s=Buffer.alloc(0),c=new r.MainHeader,l=!1;let u=/* @__PURE__ */ new Set,d=t,{noSort:f,decoder:p}=d;e?g(d.readEntries):l=!0;function m(){let e=/* @__PURE__ */ new Set;for(let t of Object.keys(o)){let n=t.split(`/`);if(n.pop(),n.length)for(let t=0;t<n.length;t++){let r=n.slice(0,t+1).join(`/`)+`/`;e.add(r)}}for(let t of e)if(!(t in o)){let e=new n(d);e.entryName=t,e.attr=16,e.temporary=!0,a.push(e),o[e.entryName]=e,u.add(e)}}function h(){if(l=!0,o=Object.create(null),c.diskEntries>(e.length-c.offset)/i.Constants.CENHDR)throw i.Errors.DISK_ENTRY_TOO_LARGE();a=Array(c.diskEntries);for(var t=c.offset,r=0;r<a.length;r++){var s=t,f=new n(d,e);if(f.header=e.slice(s,s+=i.Constants.CENHDR),f.entryName=e.slice(s,s+=f.header.fileNameLength),f.header.extraLength&&(f.extra=e.slice(s,s+=f.header.extraLength)),f.header.commentLength&&(f.comment=e.slice(s,s+f.header.commentLength)),t+=f.header.centralHeaderSize,f.entryName in o)throw i.Errors.DUPLICATE_ENTRY(`"${f.entryName}"`);a[r]=f,o[f.entryName]=f}u.clear(),m()}function g(t){var n=e.length-i.Constants.ENDHDR,r=Math.max(0,n-65535),a=r,o=e.length,l=-1,u=0;for(typeof d.trailingSpace==`boolean`&&d.trailingSpace&&(r=0);n>=a;n--)if(e[n]===80){if(e.readUInt32LE(n)===i.Constants.ENDSIG)l=n,u=n,o=n+i.Constants.ENDHDR,a=n-i.Constants.END64HDR;else if(e.readUInt32LE(n)===i.Constants.END64SIG)a=r;else if(e.readUInt32LE(n)===i.Constants.ZIP64SIG){l=n,o=n+i.readBigUInt64LE(e,n+i.Constants.ZIP64SIZE)+i.Constants.ZIP64LEAD;break}}if(l==-1)throw i.Errors.INVALID_FORMAT();c.loadFromBinary(e.slice(l,o)),c.commentLength&&(s=e.slice(u+i.Constants.ENDHDR)),t&&h()}function _(){a.length>1&&!f&&(a=a.map(e=>({entry:e,key:e.entryName.toLowerCase()})).sort((e,t)=>e.key.localeCompare(t.key)).map(e=>e.entry))}return{get entries(){return l||h(),a.filter(e=>!u.has(e))},get comment(){return p.decode(s)},set comment(e){s=i.toBuffer(e,p.encode),c.commentLength=s.length},getEntryCount:function(){return l?a.length:c.diskEntries},forEach:function(e){this.entries.forEach(e)},getEntry:function(e){return l||h(),o[e]||null},setEntry:function(e){l||h(),a.push(e),o[e.entryName]=e,c.totalEntries=a.length},deleteFile:function(e,t=!0){l||h();let n=o[e];this.getEntryChildren(n,t).map(e=>e.entryName).forEach(this.deleteEntry)},deleteEntry:function(e){l||h();let t=o[e],n=a.indexOf(t);n>=0&&(a.splice(n,1),delete o[e],c.totalEntries=a.length)},getEntryChildren:function(e,t=!0){if(l||h(),typeof e==`object`){if(e.isDirectory&&t){let t=[],n=e.entryName;for(let e of a)e.entryName.startsWith(n)&&t.push(e);return t}return[e]}return[]},getChildCount:function(e){if(e&&e.isDirectory){let t=this.getEntryChildren(e);return t.includes(e)?t.length-1:t.length}return 0},compressToBuffer:function(){l||h(),_();let t=[],n=[],r=0,i=0;c.size=0,c.offset=0;let a=0;for(let e of this.entries){let o=e.getCompressedData();e.header.offset=i;let s=e.packLocalHeader(),l=s.length+o.length;i+=l,t.push(s),t.push(o);let u=e.packCentralHeader();n.push(u),c.size+=u.length,r+=l+u.length,a++}r+=c.mainHeaderSize,c.offset=i,c.totalEntries=a,i=0;let o=Buffer.alloc(r);for(let e of t)e.copy(o,i),i+=e.length;for(let e of n)e.copy(o,i),i+=e.length;let u=c.toBinary();return s&&s.copy(u,u.length-s.length),u.copy(o,i),e=o,l=!1,o},toAsyncBuffer:function(t,n,r,i){try{l||h(),_();let n=[],a=[],o=0,u=0,d=0;c.size=0,c.offset=0;let f=function(p){if(p.length>0){let e=p.shift(),t=e.entryName+e.extra.toString();r&&r(t),e.getCompressedDataAsync(function(r){i&&i(t),e.header.offset=u;let s=e.packLocalHeader(),l=s.length+r.length;u+=l,n.push(s),n.push(r);let m=e.packCentralHeader();a.push(m),c.size+=m.length,o+=l+m.length,d++,f(p)})}else{o+=c.mainHeaderSize,c.offset=u,c.totalEntries=d,u=0;let r=Buffer.alloc(o);n.forEach(function(e){e.copy(r,u),u+=e.length}),a.forEach(function(e){e.copy(r,u),u+=e.length});let i=c.toBinary();s&&s.copy(i,i.length-s.length),i.copy(r,u),e=r,l=!1,t(r)}};f(Array.from(this.entries))}catch(e){n(e)}}}}})),jm=/* @__PURE__ */ e.t(((e,t)=>{let n=xm(),r=require("path"),i=km(),a=Am(),o=(...e)=>n.findLast(e,e=>typeof e==`boolean`),s=(...e)=>n.findLast(e,e=>typeof e==`string`),c=(...e)=>n.findLast(e,e=>typeof e==`function`),l={noSort:!1,readEntries:!1,method:n.Constants.NONE,fs:null};t.exports=function(e,t){let u=null,d=Object.assign(Object.create(null),l);e&&typeof e==`object`&&(e instanceof Uint8Array||(Object.assign(d,e),e=d.input?d.input:void 0,d.input&&delete d.input),Buffer.isBuffer(e)&&(u=e,d.method=n.Constants.BUFFER,e=void 0)),Object.assign(d,t);let f=new n(d),p=e=>{e.filter(e=>e.attr).sort((e,t)=>t.path.length-e.path.length).forEach(e=>f.fs.chmodSync(e.path,e.attr))};if((typeof d.decoder!=`object`||typeof d.decoder.encode!=`function`||typeof d.decoder.decode!=`function`)&&(d.decoder=n.decoder),e&&typeof e==`string`){if(f.fs.existsSync(e))d.method=n.Constants.FILE,d.filename=e,u=f.fs.readFileSync(e);else throw n.Errors.INVALID_FILENAME()}let m=new a(u,d),{canonical:h,sanitize:g,zipnamefix:_}=n;function v(e){if(e&&m){var t;if(typeof e==`string`&&(t=m.getEntry(r.posix.normalize(e))),typeof e==`object`&&e.entryName!==void 0&&e.header!==void 0&&(t=m.getEntry(e.entryName)),t)return t}return null}function y(e){let{join:t,normalize:n,sep:i}=r.posix;return t(r.isAbsolute(e)?`/`:`.`,n(i+e.split(`\\`).join(i)+i))}function b(e){return e instanceof RegExp?(function(e){return function(t){return e.test(t)}})(e):typeof e==`function`?e:()=>!0}let x=(e,t)=>{let n=t.slice(-1);return n=n===f.sep?f.sep:``,r.relative(e,t)+n};return{readFile:function(e,t){var n=v(e);return n&&n.getData(t)||null},childCount:function(e){let t=v(e);if(t)return m.getChildCount(t)},readFileAsync:function(e,t){var n=v(e);n?n.getDataAsync(t):t(null,`getEntry failed for:`+e)},readAsText:function(e,t){var n=v(e);if(n){var r=n.getData();if(r&&r.length)return r.toString(t||`utf8`)}return``},readAsTextAsync:function(e,t,n){var r=v(e);r?r.getDataAsync(function(e,r){r?t(e,r):e&&e.length?t(e.toString(n||`utf8`)):t(``)}):t(``)},deleteFile:function(e,t=!0){var n=v(e);n&&m.deleteFile(n.entryName,t)},deleteEntry:function(e){var t=v(e);t&&m.deleteEntry(t.entryName)},addZipComment:function(e){m.comment=e},getZipComment:function(){return m.comment||``},addZipEntryComment:function(e,t){var n=v(e);n&&(n.comment=t)},getZipEntryComment:function(e){var t=v(e);return t&&t.comment||``},updateFile:function(e,t){var n=v(e);n&&n.setData(t)},addLocalFile:function(e,t,i,a){if(f.fs.existsSync(e)){t=t?y(t):``;let n=r.win32.basename(r.win32.normalize(e));t+=i||n;let o=f.fs.statSync(e),s=o.isFile()?f.fs.readFileSync(e):Buffer.alloc(0);o.isDirectory()&&(t+=f.sep),this.addFile(t,s,a,o)}else throw n.Errors.FILE_NOT_FOUND(e)},addLocalFileAsync:function(e,t){e=typeof e==`object`?e:{localPath:e};let n=r.resolve(e.localPath),{comment:i}=e,{zipPath:a,zipName:o}=e,s=this;f.fs.stat(n,function(e,c){if(e)return t(e,!1);a=a?y(a):``;let l=r.win32.basename(r.win32.normalize(n));if(a+=o||l,c.isFile())f.fs.readFile(n,function(e,n){return e?t(e,!1):(s.addFile(a,n,i,c),setImmediate(t,void 0,!0))});else if(c.isDirectory())return a+=f.sep,s.addFile(a,Buffer.alloc(0),i,c),setImmediate(t,void 0,!0)})},addLocalFolder:function(e,t,i){if(i=b(i),t=t?y(t):``,e=r.normalize(e),f.fs.existsSync(e)){let n=f.findFiles(e),a=this;if(n.length)for(let o of n){let n=r.join(t,x(e,o));i(n)&&a.addLocalFile(o,r.dirname(n))}}else throw n.Errors.FILE_NOT_FOUND(e)},addLocalFolderAsync:function(e,t,i,a){a=b(a),i=i?y(i):``,e=r.normalize(e);var o=this;f.fs.open(e,`r`,function(r){if(r&&r.code===`ENOENT`)t(void 0,n.Errors.FILE_NOT_FOUND(e));else if(r)t(void 0,r);else{var s=f.findFiles(e),c=-1,l=function(){if(c+=1,c<s.length){var n=s[c],r=x(e,n).split(`\\`).join(`/`);r=r.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/[^\x20-\x7E]/g,``),a(r)?f.fs.stat(n,function(e,a){e&&t(void 0,e),a.isFile()?f.fs.readFile(n,function(e,n){e?t(void 0,e):(o.addFile(i+r,n,``,a),l())}):(o.addFile(i+r+`/`,Buffer.alloc(0),``,a),l())}):process.nextTick(()=>{l()})}else t(!0,void 0)};l()}})},addLocalFolderAsync2:function(e,t){let i=this;e=typeof e==`object`?e:{localPath:e};let a=r.resolve(e.localPath),{zipPath:o,filter:s,namefix:c}=e;s instanceof RegExp?s=(function(e){return function(t){return e.test(t)}})(s):typeof s!=`function`&&(s=function(){return!0}),o=o?y(o):``,c===`latin1`&&(c=e=>e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/[^\x20-\x7E]/g,``)),typeof c!=`function`&&(c=e=>e);let l=e=>r.join(o,c(x(a,e))),u=e=>r.win32.basename(r.win32.normalize(c(e)));f.fs.open(a,`r`,function(e){e&&e.code===`ENOENT`?t(n.Errors.FILE_NOT_FOUND(a),!1):e?t(e,!1):f.findFilesAsync(a,function(e,n){if(e)return t(e,!1);if(n=n.filter(e=>s(l(e))),!n.length)return t(void 0,!0);setImmediate(n.reverse().reduce(function(e,t){return function(n,a){if(n||a===!1)return setImmediate(e,n,!1);i.addLocalFileAsync({localPath:t,zipPath:r.dirname(l(t)),zipName:u(t)},e)}},t))})})},addLocalFolderPromise:function(e,t){return new Promise((n,r)=>{this.addLocalFolderAsync2(Object.assign({localPath:e},t),(e,t)=>{if(e)return r(e);t&&n(this)})})},addFile:function(e,t,n,r){e=_(e);let a=v(e),o=a!=null;o||(a=new i(d),a.entryName=e),a.comment=n||``;let s=typeof r==`object`&&r instanceof f.fs.Stats;s&&(a.header.time=r.mtime);var c=a.isDirectory?16:0;let l=a.isDirectory?16384:32768;return l|=s?4095&r.mode:typeof r==`number`?4095&r:a.isDirectory?493:420,c=(c|l<<16)>>>0,a.attr=c,a.setData(t),o||m.setEntry(a),a},getEntries:function(e){return m.password=e,m?m.entries:[]},getEntry:function(e){return v(e)},getEntryCount:function(){return m.getEntryCount()},forEach:function(e){return m.forEach(e)},extractEntryTo:function(e,t,i,a,c,l){a=o(!1,a),c=o(!1,c),i=o(!0,i),l=s(c,l);var u=v(e);if(!u)throw n.Errors.NO_ENTRY();var d=h(u.entryName),p=g(t,l&&!u.isDirectory?h(l):i?d:r.basename(d));if(u.isDirectory)return m.getEntryChildren(u).forEach(function(e){if(e.isDirectory)return;var r=e.getData();if(!r)throw n.Errors.CANT_EXTRACT_FILE();var o=h(i?e.entryName:e.entryName.substring(u.entryName.length)),s=g(t,o);f.assertPathSafe(t,s);let l=c?e.header.fileAttr:void 0;f.writeFileTo(s,r,a,l)}),!0;var _=u.getData(m.password);if(!_)throw n.Errors.CANT_EXTRACT_FILE();if(f.assertPathSafe(t,p),f.fs.existsSync(p)&&!a)throw n.Errors.CANT_OVERRIDE();let y=c?e.header.fileAttr:void 0;return f.writeFileTo(p,_,a,y),!0},test:function(e){if(!m)return!1;for(var t of m.entries)try{if(t.isDirectory)continue;if(!t.getData(e))return!1}catch{return!1}return!0},extractAllTo:function(e,t,r,i){if(r=o(!1,r),i=s(r,i),t=o(!1,t),!m)throw n.Errors.NO_ZIP();let a=[];m.entries.forEach(function(o){var s=g(e,h(o.entryName));if(f.assertPathSafe(e,s),o.isDirectory){f.makeDir(s),r&&a.push({path:s,attr:o.header.fileAttr});return}var c=o.getData(i);if(!c)throw n.Errors.CANT_EXTRACT_FILE();let l=r?o.header.fileAttr:void 0;f.writeFileTo(s,c,t,l);try{f.fs.utimesSync(s,o.header.time,o.header.time)}catch{}}),p(a)},extractAllToAsync:function(e,t,i,a){if(a=c(t,i,a),i=o(!1,i),t=o(!1,t),!a)return new Promise((n,r)=>{this.extractAllToAsync(e,t,i,function(e){e?r(e):n(this)})});if(!m){a(n.Errors.NO_ZIP());return}e=r.resolve(e);let s=t=>g(e,r.normalize(h(t.entryName))),l=(e,t)=>/* @__PURE__ */ Error(e+`: "`+t+`"`),u=[],d=[];m.entries.forEach(e=>{e.isDirectory?u.push(e):d.push(e)});let _=[];for(let t of u){let n=s(t),r=i?t.header.fileAttr:void 0;try{f.assertPathSafe(e,n),f.makeDir(n)}catch{a(l(`Unable to create folder`,n));continue}r&&_.push({path:n,attr:r});try{f.fs.utimesSync(n,t.header.time,t.header.time)}catch{}}d.reverse().reduce(function(a,o){return function(s){if(s)a(s);else{let s=r.normalize(h(o.entryName)),c=g(e,s);try{f.assertPathSafe(e,c)}catch(e){return a(e)}o.getDataAsync(function(e,r){if(r)a(r);else if(!e)a(n.Errors.CANT_EXTRACT_FILE());else{let n=i?o.header.fileAttr:void 0;f.writeFileToAsync(c,e,t,n,function(e){if(!e)return a(l(`Unable to write file`,c));f.fs.utimes(c,o.header.time,o.header.time,function(){a()})})}})}}},e=>{if(!e)try{p(_)}catch(e){return a(l(`Unable to set folder permissions`,e.path||``))}a(e)})()},writeZip:function(e,t){if(arguments.length===1&&typeof e==`function`&&(t=e,e=``),!e&&d.filename&&(e=d.filename),e){var n=m.compressToBuffer();if(n){var r=f.writeFileTo(e,n,!0);typeof t==`function`&&t(r?null:/* @__PURE__ */ Error(`failed`),``)}}},writeZipPromise:function(e,t){let{overwrite:n,perm:r}=Object.assign({overwrite:!0},t);return new Promise((t,i)=>{!e&&d.filename&&(e=d.filename),e||i(`ADM-ZIP: ZIP File Name Missing`),this.toBufferPromise().then(a=>{f.writeFileToAsync(e,a,n,r,e=>e?t(e):i(`ADM-ZIP: Wasn't able to write zip file`))},i)})},toBufferPromise:function(){return new Promise((e,t)=>{m.toAsyncBuffer(e,t)})},toBuffer:function(e,t,n,r){return typeof e==`function`?(m.toAsyncBuffer(e,t,n,r),null):m.compressToBuffer()}}}})),Mm=/* @__PURE__ */ e.a(jm());async function Nm(e){if(!e.browsers?.includes(`android`))return;let t=b.default.join(e.sourceDir,`storybook.apk`),n=new Mm.default(t).getEntries(),r=/* @__PURE__ */ new Set;for(let e of n){let t=e.entryName.match(/^lib\/([^/]+)\//);t&&r.add(t[1])}if(r.size>0&&!r.has(`x86_64`))throw Error(Pp().output)}const Pm=(e,t)=>{if(!t)return``;if(t.includes(`npm run `))return(0,J.dedent)(q.default`
      It appears you're using {bold "npm run"} which is known to cause this problem.
      You can fix this by invoking {bold build-storybook} from your {bold "${e}"} script directly.
    `);let n=/(^| )build-storybook( |;|&&)/.test(t),r=/build-storybook.*(&&|;)/.test(t);return n&&r?(0,J.dedent)(q.default`
      This happens if {bold build-storybook} is not the last command in the script (e.g. you're using {bold &&} or {bold ;} to chain commands).
      You should use an npm {bold post*} script instead of command chaining.
    `):``};var Fm=({sourceDir:e,options:t,packageJson:n},r)=>{let{buildScriptName:a}=t,o=n.scripts&&a&&n.scripts[a];return(0,J.dedent)(q.default`
    ${i.i} {bold Unexpected build directory}
    The CLI tried to build your Storybook at {bold ${e}}
    but instead it was built at {bold ${r}}
    Make sure your {bold "${a}"} script forwards the {bold --output-dir (-o)} flag to the {bold build-storybook} CLI.

    ${Pm(a,o)}
  `).trim()};function Im(e,t,n,r=`.`){if(r===`.chromatic`)return[];try{return(0,y.readdirSync)(b.default.join(t,r)).flatMap(i=>{let a=b.default.join(r,i),o=(0,y.statSync)(b.default.join(t,a));return o.isDirectory()?Im(e,t,n,a):[{pathname:a,contentLength:o.size}]})}catch(r){throw e.log.debug(r),Error(Np({sourceDir:t,buildLogFile:n,options:e.options},r).output)}}function Lm(e){let t=(0,w.stripVTControlCharacters)(e).split(`
`);for(let e=t.length-1;e>=0;--e){let n=t[e].lastIndexOf(`Output directory:`);if(n===-1)continue;let r=t[e].slice(n+17).trim();if(r)return r;for(let n=e+1;n<t.length;n+=1){let e=t[n].replace(/^[\s\u2500-\u257F]+/u,``).trim();if(e)return e}}}function Rm(e,t,r){let i=Im(e,t,r).map(e=>({...e,knownAs:n.d(e.pathname)})),a=i.map(({contentLength:e})=>e).reduce((e,t)=>e+t,0),o=[],s=``;for(let{knownAs:e}of i)e.endsWith(`preview-stats.json`)?s=b.default.join(t,e):e.endsWith(`manager-stats.json`)||o.push(e);return{lengths:i,paths:o,statsPath:s,total:a}}const zm=({paths:e,total:t})=>{let n=[`iframe.html`,`index.html`].filter(t=>!e.includes(t));return{valid:t>0&&n.length===0,missingFiles:n}},Bm=({paths:e,total:t},n=[])=>{let r=n.includes(`android`),i=n.includes(`ios`),a=[];return!r&&!i?{valid:!1,missingFiles:a}:(e.includes(`manifest.json`)||a.push(`manifest.json`),r&&!e.includes(`storybook.apk`)&&a.push(`storybook.apk`),i&&!e.some(e=>e.startsWith(`storybook.app/`))&&a.push(`storybook.app`),{valid:t>0&&a.length===0,missingFiles:a})};async function Vm(e,t){let n=t.isReactNativeApp?Bm:zm,{browsers:r,buildLogFile:i}=t,{sourceDir:a}=t,o=Rm(e,a,i);if(!n(o,r).valid&&i)try{let t=Lm((0,y.readFileSync)(i,`utf8`));t&&t!==a&&(e.log.warn(Fm({sourceDir:a,options:e.options,packageJson:e.packageJson},t)),a=t,o=Rm(e,a,i))}catch(t){e.log.debug(t)}let s=n(o,r);if(!s.valid)throw Error(t.isReactNativeApp?Ip({sourceDir:a},s.missingFiles).output:Np({sourceDir:a,buildLogFile:i,options:e.options}).output);return{fileInfo:o,sourceDir:a}}var Hm=m.a();const Um={iphoneos:`iPhoneOS`,iphonesimulator:`iPhoneSimulator`},Wm={2:`iPad`,3:`Apple TV`,4:`Apple Watch`,6:`Mac`,7:`Apple Vision`};function Gm(e){let t=Array.isArray(e.CFBundleSupportedPlatforms)?e.CFBundleSupportedPlatforms.filter(e=>typeof e==`string`):[];if(t.length===0&&typeof e.DTPlatformName==`string`&&e.DTPlatformName){let n=e.DTPlatformName;t=[Object.hasOwn(Um,n)?Um[n]:n]}if(t.length!==0&&!t.some(e=>e.toLowerCase()===`iphonesimulator`))return t.join(`, `)}function Km(e){let t=Array.isArray(e.UIDeviceFamily)?e.UIDeviceFamily.filter(e=>typeof e==`number`||typeof e==`string`&&e.trim()!==``).map(Number).filter(e=>Number.isInteger(e)):[];if(!(t.length===0||t.includes(1)))return t.map(e=>Wm[e]??`device family ${e}`).join(`, `)}async function qm(e){if(!e.browsers?.includes(`ios`))return;let t;try{t=(0,Hm.readFileSync)(b.default.join(e.sourceDir,`storybook.app`,`Info.plist`))}catch{return}if(!t)return;let n=Gm(t);if(n)throw Error(Fp({platform:n}).output);let r=Km(t);if(r)throw Error(Fp({families:r}).output)}async function Jm(e,t){let n=t.announcedBuild?.browsers,{fileInfo:r,sourceDir:i}=await Vm(e,{isReactNativeApp:t.isReactNativeApp,sourceDir:t.sourceDir,buildLogFile:t.buildLogFile,browsers:n});await Nm({sourceDir:i,browsers:n}),await qm({sourceDir:i,browsers:n});let a=await fm(e,{buildId:t.announcedBuild?.id,git:t.git,storybook:t.storybook,turboSnap:t.turboSnap,sourceDir:i,statsPath:r.statsPath}),{hashes:o}=await Up(e,{fileInfo:r,sourceDir:i});return o&&(r.hashes=o),{kind:`continue`,output:{...a,fileInfo:r,sourceDir:i}}}const Ym=e=>({isReactNativeApp:!!e.isReactNativeApp,sourceDir:e.sourceDir,buildLogFile:e.buildLogFile,announcedBuild:e.announcedBuild,git:e.git,storybook:e.storybook,turboSnap:e.turboSnap}),Xm=(e,t)=>{e.fileInfo=t.fileInfo,e.sourceDir=t.sourceDir,e.turboSnapOutcome=t.turboSnapOutcome,t.turboSnap&&(e.turboSnap=t.turboSnap),t.onlyStoryFiles&&(e.onlyStoryFiles=t.onlyStoryFiles),t.untracedFiles&&(e.untracedFiles=t.untracedFiles),t.changedDependencyNames&&(e.git.changedDependencyNames=t.changedDependencyNames)};async function Zm(e){await pd(e,{name:`prepare`,title:jp(e).title,transitions:{pending:Mp,success:Hp,failure:(e,t)=>_d(e.isReactNativeApp?`Preparing your built React Native Storybook`:Mp(e).title,t)},extractInput:Ym,run:Jm,applyOutput:Xm},Sd(e,yd))}async function Qm(){let e=await t.n(t.i,[],{programmatic:!0});if(!e)throw Error(`Unable to determine the package manager install command`);return n.ct(e,{timeout:6e5})}var $m=({patchHeadRef:e,patchBaseRef:t})=>(0,J.dedent)(q.default`
    ${i.t} {bold Failed to retrieve the merge base}
    Are you sure the head branch is a descendant (i.e. fork) of the base branch?
    Try running this command yourself: {bold git merge-base ${e} ${t}}
    ${i.n} Read more at ${n.Tt(`https://www.chromatic.com/docs/branching-and-baselines#how-is-merge-base-calculated`)}
  `),eh=()=>(0,J.dedent)(q.default`
    ${i.t} {bold Workspace not clean}
    The git working directory must be clean before running a patch build.
    Use {bold git stash --include-untracked --keep-index} to stash changes before you continue.
  `),th=e=>q.default`${i.t} {bold Workspace not up-to-date with remote}\n${e}`;const nh=()=>({status:`pending`,title:`Restoring your workspace`,output:`Discarding changes and restoring head location`}),rh=()=>({status:`success`,title:`Restored your workspace`});async function ih(e){e.log.info(nh().output),await n.P(e),await n.j(e),await Qm(),await n.P(e),e.log.info(rh().title)}const ah=e=>({patchHeadRef:e.options.patchHeadRef,patchBaseRef:e.options.patchBaseRef}),oh=async(e,t)=>{let{patchHeadRef:r,patchBaseRef:i}=t;if(!await n.nt(e))throw e.log.error(eh()),new l.t(`Working directory is not clean`,{exitCode:l.n.GIT_NOT_CLEAN,userError:!0});if(!await n.rt(e))throw e.log.error(th(await n.Z(e))),new l.t(`Workspace not up-to-date with remote`,{exitCode:l.n.GIT_OUT_OF_DATE,userError:!0});e.report({output:`Looking up the git merge base for '${r}' on '${i}'`});let a=await n.I(e,r,i);if(!a)throw e.log.error($m(e.options)),new l.t(`Could not find a merge base`,{exitCode:l.n.GIT_NO_MERGE_BASE,userError:!0});e.report({output:`Checking out merge base commit '${a.slice(0,7)}'`}),await n.k(e,a),e.report({output:`Installing dependencies`});try{await Qm()}catch(t){throw e.log.error(t),await ih(e),new l.t(`Failed to install dependencies`,{exitCode:l.n.NPM_INSTALL_FAILED})}return{kind:`continue`,output:{mergeBase:a}}},sh=(e,t)=>{e.mergeBase=t.mergeBase},ch={status:`initial`,title:`Prepare workspace`},lh=()=>({status:`pending`,title:`Preparing your workspace`,output:`Ensuring your git workspace is clean and up-to-date`}),uh=e=>({status:`success`,title:`Prepared your workspace`,output:`Checked out commit '${e.mergeBase?.slice(0,7)}' on '${e.options.patchBaseRef}'`});async function dh(e){await pd(e,{name:`prepareWorkspace`,title:ch.title,transitions:{pending:lh,success:uh},extractInput:ah,run:oh,applyOutput:sh},Sd(e,yd))}var fh=/* @__PURE__ */ e.t(((e,t)=>{let n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),ph=/* @__PURE__ */ e.t(((e,t)=>{let{EMPTY_BUFFER:n}=fh(),r=Buffer[Symbol.species];function i(e,t){if(e.length===0)return n;if(e.length===1)return e[0];let i=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let n=e[t];i.set(n,a),a+=n.length}return a<t?new r(i.buffer,i.byteOffset,a):i}function a(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function s(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function c(e){if(c.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new r(e):ArrayBuffer.isView(e)?t=new r(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),c.readOnly=!1),t}
/* istanbul ignore else  */
if(t.exports={concat:i,mask:a,toArrayBuffer:s,toBuffer:c,unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{let e=require("bufferutil");t.exports.mask=function(t,n,r,i,o){o<48?a(t,n,r,i,o):e.mask(t,n,r,i,o)},t.exports.unmask=function(t,n){t.length<32?o(t,n):e.unmask(t,n)}}catch{}})),mh=/* @__PURE__ */ e.t(((e,t)=>{let n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),hh=/* @__PURE__ */ e.t(((e,t)=>{let n=require("zlib"),r=ph(),i=mh(),{kStatusCode:a}=fh(),o=Buffer[Symbol.species],s=Buffer.from([0,0,255,255]),c=Symbol(`permessage-deflate`),l=Symbol(`total-length`),u=Symbol(`callback`),d=Symbol(`buffers`),f=Symbol(`error`),p;t.exports=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!p){let e=this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit;p=new i(e)}}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[u];this._deflate.close(),this._deflate=null,e&&e(/* @__PURE__ */ Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){p.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){p.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,i){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[l]=0,this._inflate[d]=[],this._inflate.on(`error`,g),this._inflate.on(`data`,h)}this._inflate[u]=i,this._inflate.write(e),t&&this._inflate.write(s),this._inflate.flush(()=>{let e=this._inflate[f];if(e){this._inflate.close(),this._inflate=null,i(e);return}let n=r.concat(this._inflate[d],this._inflate[l]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[d]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),i(null,n)})}_compress(e,t,i){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:n.Z_DEFAULT_WINDOWBITS;this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[l]=0,this._deflate[d]=[],this._deflate.on(`data`,m)}this._deflate[u]=i,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=r.concat(this._deflate[d],this._deflate[l]);t&&(e=new o(e.buffer,e.byteOffset,e.length-4)),this._deflate[u]=null,this._deflate[l]=0,this._deflate[d]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),i(null,e)})}};function m(e){this[d].push(e),this[l]+=e.length}function h(e){this[l]+=e.length,this[c]._maxPayload<1||this[l]<=this[c]._maxPayload?this[d].push(e):(this[f]=/* @__PURE__ */ RangeError(`Max payload size exceeded`),this[f].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[f][a]=1009,this.removeListener(`data`,h),this.reset())}function g(e){this[c]._inflate=null,this[f]?this[u](this[f]):(e[a]=1007,this[u](e))}})),gh=/* @__PURE__ */ e.t(((e,t)=>{let{isUtf8:n}=require("buffer"),{hasBlob:r}=fh(),i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function a(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function o(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}function s(e){return r&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(t.exports={isBlob:s,isValidStatusCode:a,isValidUTF8:o,tokenChars:i},n)t.exports.isValidUTF8=function(e){return e.length<24?o(e):n(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=require("utf-8-validate");t.exports.isValidUTF8=function(t){return t.length<32?o(t):e(t)}}catch{}})),_h=/* @__PURE__ */ e.t(((e,t)=>{let{Writable:n}=require("stream"),r=hh(),{BINARY_TYPES:i,EMPTY_BUFFER:a,kStatusCode:o,kWebSocket:s}=fh(),{concat:c,toArrayBuffer:l,unmask:u}=ph(),{isValidStatusCode:d,isValidUTF8:f}=gh(),p=Buffer[Symbol.species];t.exports=class extends n{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0||e.allowSynchronousEvents,this._binaryType=e.binaryType||i[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[s]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,n){if(this._opcode===8&&this._state==0)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e),new p(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new p(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[r.extensionName])e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));else{if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=1:this._payloadLength===127?this._state=2:this.haveLength(e)}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);n>2**21-1?e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`)):(this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`)):this._state=this._masked?3:4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=a;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&u(t,this._mask)}this._opcode>7?this.controlMessage(t,e):this._compressed?(this._state=5,this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e))}decompress(e,t){this._extensions[r.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._fragments.push(n)}this.dataMessage(t),this._state===0&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=0;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?c(n,t):this._binaryType===`arraybuffer`?l(c(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!0),this._state=0,this.startLoop(e)}))}else{let r=c(n,t);if(!this._skipUTF8Validation&&!f(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===5||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit(`message`,r,!1),this._state=0,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,a),this.end();else{let n=e.readUInt16BE(0);if(!d(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!f(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=0}else this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0):(this._state=6,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=0,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[o]=r,a}}})),vh=/* @__PURE__ */ e.t(((e,t)=>{let{Duplex:n}=require("stream"),{randomFillSync:r}=require("crypto"),i=hh(),{EMPTY_BUFFER:a,kWebSocket:o,NOOP:s}=fh(),{isBlob:c,isValidStatusCode:l}=gh(),{mask:u,toBuffer:d}=ph(),f=Symbol(`kByteLength`),p=Buffer.alloc(4),m=8192,h,g=m;t.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=s,this[o]=void 0}static frame(e,t){let n,i=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||p,t.generateMask?t.generateMask(n):(g===m&&(h===void 0&&(h=Buffer.alloc(m)),r(h,0,m),g=0),n[0]=h[g++],n[1]=h[g++],n[2]=h[g++],n[3]=h[g++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[f]!==void 0?s=t[f]:(e=Buffer.from(e),s=e.length):(s=e.length,i=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(i?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:i?(u(e,n,l,a,s),[l]):(u(e,n,e,0,s),[l,e])}close(t,n,r,i){let o;if(t===void 0)o=a;else if(typeof t!=`number`||!l(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);o=Buffer.allocUnsafe(2+e),o.writeUInt16BE(t,0),typeof n==`string`?o.write(n,2):o.set(n,2)}let s={[f]:o.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===0?this.sendFrame(e.frame(o,s),i):this.enqueue([this.dispatch,o,!1,s,i])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):c(t)?(i=t.size,a=!1):(t=d(t),i=t.length,a=d.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[f]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};c(t)?this._state===0?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===0?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):c(t)?(i=t.size,a=!1):(t=d(t),i=t.length,a=d.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[f]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};c(t)?this._state===0?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===0?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[i.extensionName],a=t.binary?2:1,o=t.compress,s,l;typeof e==`string`?(s=Buffer.byteLength(e),l=!1):c(e)?(s=e.size,l=!1):(e=d(e),s=e.length,l=d.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(o=s>=r._threshold),this._compress=o):(o=!1,a=0),t.fin&&(this._firstFragment=!0);let u={[f]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:l,rsv1:o};c(e)?this._state===0?this.getBlobData(e,this._compress,u,n):this.enqueue([this.getBlobData,e,this._compress,u,n]):this._state===0?this.dispatch(e,this._compress,u,n):this.enqueue([this.dispatch,e,this._compress,u,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[f],this._state=2,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=/* @__PURE__ */ Error(`The socket was closed while the blob was being read`);process.nextTick(_,this,e,i);return}this._bufferedBytes-=r[f];let a=d(t);n?this.dispatch(a,n,r,i):(this._state=0,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(v,this,e,i)})}dispatch(t,n,r,a){if(!n){this.sendFrame(e.frame(t,r),a);return}let o=this._extensions[i.extensionName];this._bufferedBytes+=r[f],this._state=1,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){let e=/* @__PURE__ */ Error(`The socket was closed while data was being compressed`);_(this,e,a)}else this._bufferedBytes-=r[f],this._state=0,r.readOnly=!1,this.sendFrame(e.frame(n,r),a),this.dequeue()})}dequeue(){for(;this._state===0&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][f],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][f],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function _(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}function v(e,t,n){_(e,t,n),e.onerror(t)}})),yh=/* @__PURE__ */ e.t(((e,t)=>{let{kForOnEventAttribute:n,kListener:r}=fh(),i=Symbol(`kCode`),a=Symbol(`kData`),o=Symbol(`kError`),s=Symbol(`kMessage`),c=Symbol(`kReason`),l=Symbol(`kTarget`),u=Symbol(`kType`),d=Symbol(`kWasClean`);var f=class{constructor(e){this[l]=null,this[u]=e}get target(){return this[l]}get type(){return this[u]}};Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});var p=class extends f{constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[c]=t.reason===void 0?``:t.reason,this[d]=t.wasClean!==void 0&&t.wasClean}get code(){return this[i]}get reason(){return this[c]}get wasClean(){return this[d]}};Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});var m=class extends f{constructor(e,t={}){super(e),this[o]=t.error===void 0?null:t.error,this[s]=t.message===void 0?``:t.message}get error(){return this[o]}get message(){return this[s]}};Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});var h=class extends f{constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(h.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:m,Event:f,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=function(e,n){let r=new h(`message`,{data:n?e:e.toString()});r[l]=this,g(t,this,r)};else if(e===`close`)a=function(e,n){let r=new p(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,g(t,this,r)};else if(e===`error`)a=function(e){let n=new m(`error`,{error:e,message:e.message});n[l]=this,g(t,this,n)};else if(e===`open`)a=function(){let e=new f(`open`);e[l]=this,g(t,this,e)};else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:h};function g(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}})),bh=/* @__PURE__ */ e.t(((e,t)=>{let{tokenChars:n}=gh();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function i(e){let t=Object.create(null),i=Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0){if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`)}else if(l===void 0){if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`)}else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||=!0,o=!1}else if(s){if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`)}else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&=(n=n.replace(/\\/g,``),!1),r(i,l,n),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}t.exports={format:a,parse:i}})),xh=/* @__PURE__ */ e.t(((e,t)=>{let n=require("events"),r=require("https"),i=require("http"),a=require("net"),o=require("tls"),{randomBytes:s,createHash:c}=require("crypto"),{Duplex:l,Readable:u}=require("stream"),{URL:d}=require("url"),f=hh(),p=_h(),m=vh(),{isBlob:h}=gh(),{BINARY_TYPES:g,CLOSE_TIMEOUT:_,EMPTY_BUFFER:v,GUID:y,kForOnEventAttribute:b,kListener:x,kStatusCode:S,kWebSocket:C,NOOP:w}=fh(),{EventTarget:{addEventListener:T,removeEventListener:E}}=yh(),{format:D,parse:O}=bh(),{toBuffer:k}=ph(),A=Symbol(`kAborted`),j=[8,13],M=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],N=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;var P=class e extends n{constructor(t,n,r){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),F(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}
/* istanbul ignore next */
get onclose(){return null}
/* istanbul ignore next */
get onerror(){return null}
/* istanbul ignore next */
get onopen(){return null}
/* istanbul ignore next */
get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let i=new p({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),a=new m(t,this._extensions,r.generateMask);this._receiver=i,this._sender=a,this._socket=t,i[C]=this,a[C]=this,t[C]=this,i.on(`conclude`,te),i.on(`drain`,ne),i.on(`error`,re),i.on(`message`,V),i.on(`ping`,ie),i.on(`pong`,ae),a.onerror=se,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on(`close`,le),t.on(`data`,H),t.on(`end`,ue),t.on(`error`,de),this._readyState=e.OPEN,this.emit(`open`)}emitClose(){this._socket?(this._extensions[f.extensionName]&&this._extensions[f.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage)):(this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage))}close(t,n){this.readyState!==e.CLOSED&&(this.readyState===e.CONNECTING?z(this,this._req,`WebSocket was closed before the connection was established`):this.readyState===e.CLOSING?this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end():(this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),ce(this)))}pause(){this.readyState!==e.CONNECTING&&this.readyState!==e.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState===e.OPEN?(n===void 0&&(n=!this._isServer),this._sender.ping(t||v,n,r)):ee(this,t,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState===e.OPEN?(n===void 0&&(n=!this._isServer),this._sender.pong(t||v,n,r)):ee(this,t,r)}resume(){this.readyState!==e.CONNECTING&&this.readyState!==e.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof n==`function`&&(r=n,n={}),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){ee(this,t,r);return}let i={binary:typeof t!=`string`,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[f.extensionName]||(i.compress=!1),this._sender.send(t||v,i,r)}terminate(){this.readyState!==e.CLOSED&&(this.readyState===e.CONNECTING?z(this,this._req,`WebSocket was closed before the connection was established`):this._socket&&(this._readyState=e.CLOSING,this._socket.destroy()))}};Object.defineProperty(P,"CONNECTING",{enumerable:!0,value:M.indexOf(`CONNECTING`)}),Object.defineProperty(P.prototype,"CONNECTING",{enumerable:!0,value:M.indexOf(`CONNECTING`)}),Object.defineProperty(P,"OPEN",{enumerable:!0,value:M.indexOf(`OPEN`)}),Object.defineProperty(P.prototype,"OPEN",{enumerable:!0,value:M.indexOf(`OPEN`)}),Object.defineProperty(P,"CLOSING",{enumerable:!0,value:M.indexOf(`CLOSING`)}),Object.defineProperty(P.prototype,"CLOSING",{enumerable:!0,value:M.indexOf(`CLOSING`)}),Object.defineProperty(P,"CLOSED",{enumerable:!0,value:M.indexOf(`CLOSED`)}),Object.defineProperty(P.prototype,"CLOSED",{enumerable:!0,value:M.indexOf(`CLOSED`)}),[`binaryType`,`bufferedAmount`,`extensions`,`isPaused`,`protocol`,`readyState`,`url`].forEach(e=>{Object.defineProperty(P.prototype,e,{enumerable:!0})}),[`open`,`error`,`close`,`message`].forEach(e=>{Object.defineProperty(P.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[b])return t[x];return null},set(t){for(let t of this.listeners(e))if(t[b]){this.removeListener(e,t);break}typeof t==`function`&&this.addEventListener(e,t,{[b]:!0})}})}),P.prototype.addEventListener=T,P.prototype.removeEventListener=E,t.exports=P;function F(e,t,n,a){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:_,protocolVersion:j[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...a,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:`GET`,host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!j.includes(o.protocolVersion))throw RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${j.join(`, `)})`);let l;if(t instanceof d)l=t;else try{l=new d(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}l.protocol===`http:`?l.protocol=`ws:`:l.protocol===`https:`&&(l.protocol=`wss:`),e._url=l.href;let u=l.protocol===`wss:`,p=l.protocol===`ws+unix:`,m;if(l.protocol!==`ws:`&&!u&&!p?m=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:p&&!l.pathname?m=`The URL's pathname is empty`:l.hash&&(m=`The URL contains a fragment identifier`),m){let t=SyntaxError(m);if(e._redirects===0)throw t;I(e,t);return}let h=u?443:80,g=s(16).toString(`base64`),v=u?r.request:i.request,b=/* @__PURE__ */ new Set,x;if(o.createConnection=o.createConnection||(u?R:L),o.defaultPort=o.defaultPort||h,o.port=l.port||h,o.host=l.hostname.startsWith(`[`)?l.hostname.slice(1,-1):l.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":g,Connection:`Upgrade`,Upgrade:`websocket`},o.path=l.pathname+l.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(x=new f({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers[`Sec-WebSocket-Extensions`]=D({[f.extensionName]:x.offer()})),n.length){for(let e of n){if(typeof e!=`string`||!N.test(e)||b.has(e))throw SyntaxError(`An invalid or duplicated subprotocol was specified`);b.add(e)}o.headers[`Sec-WebSocket-Protocol`]=n.join(`,`)}if(o.origin&&(o.protocolVersion<13?o.headers[`Sec-WebSocket-Origin`]=o.origin:o.headers.Origin=o.origin),(l.username||l.password)&&(o.auth=`${l.username}:${l.password}`),p){let e=o.path.split(`:`);o.socketPath=e[0],o.path=e[1]}let S;if(o.followRedirects){if(e._redirects===0){e._originalIpc=p,e._originalSecure=u,e._originalHostOrSocketPath=p?o.socketPath:l.host;let t=a&&a.headers;if(a={...a,headers:{}},t)for(let[e,n]of Object.entries(t))a.headers[e.toLowerCase()]=n}else if(e.listenerCount(`redirect`)===0){let t=p?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:!e._originalIpc&&l.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!u)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!a.headers.authorization&&(a.headers.authorization=`Basic `+Buffer.from(o.auth).toString(`base64`)),S=e._req=v(o),e._redirects&&e.emit(`redirect`,e.url,S)}else S=e._req=v(o);o.timeout&&S.on(`timeout`,()=>{z(e,S,`Opening handshake has timed out`)}),S.on(`error`,t=>{S===null||S[A]||(S=e._req=null,I(e,t))}),S.on(`response`,r=>{let i=r.headers.location,s=r.statusCode;if(i&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects){z(e,S,`Maximum redirects exceeded`);return}S.abort();let r;try{r=new d(i,t)}catch{I(e,/* @__PURE__ */ SyntaxError(`Invalid URL: ${i}`));return}F(e,r,n,a)}else e.emit(`unexpected-response`,S,r)||z(e,S,`Unexpected server response: ${r.statusCode}`)}),S.on(`upgrade`,(t,n,r)=>{if(e.emit(`upgrade`,t),e.readyState!==P.CONNECTING)return;S=e._req=null;let i=t.headers.upgrade;if(i===void 0||i.toLowerCase()!==`websocket`){z(e,n,`Invalid Upgrade header`);return}let a=c(`sha1`).update(g+y).digest(`base64`);if(t.headers[`sec-websocket-accept`]!==a){z(e,n,`Invalid Sec-WebSocket-Accept header`);return}let s=t.headers[`sec-websocket-protocol`],l;if(s===void 0?b.size&&(l=`Server sent no subprotocol`):b.size?b.has(s)||(l=`Server sent an invalid subprotocol`):l=`Server sent a subprotocol but none was requested`,l){z(e,n,l);return}s&&(e._protocol=s);let u=t.headers[`sec-websocket-extensions`];if(u!==void 0){if(!x){z(e,n,`Server sent a Sec-WebSocket-Extensions header but no extension was requested`);return}let t;try{t=O(u)}catch{z(e,n,`Invalid Sec-WebSocket-Extensions header`);return}let r=Object.keys(t);if(r.length!==1||r[0]!==f.extensionName){z(e,n,`Server indicated an extension that was not requested`);return}try{x.accept(t[f.extensionName])}catch{z(e,n,`Invalid Sec-WebSocket-Extensions header`);return}e._extensions[f.extensionName]=x}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(S,e):S.end()}function I(e,t){e._readyState=P.CLOSING,e._errorEmitted=!0,e.emit(`error`,t),e.emitClose()}function L(e){return e.path=e.socketPath,a.connect(e)}function R(e){return e.path=void 0,!e.servername&&e.servername!==``&&(e.servername=a.isIP(e.host)?``:e.host),o.connect(e)}function z(e,t,n){e._readyState=P.CLOSING;let r=Error(n);Error.captureStackTrace(r,z),t.setHeader?(t[A]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(I,e,r)):(t.destroy(r),t.once(`error`,e.emit.bind(e,`error`)),t.once(`close`,e.emitClose.bind(e)))}function ee(e,t,n){if(t){let n=h(t)?t.size:k(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){let t=/* @__PURE__ */ Error(`WebSocket is not open: readyState ${e.readyState} (${M[e.readyState]})`);process.nextTick(n,t)}}function te(e,t){let n=this[C];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[C]!==void 0&&(n._socket.removeListener(`data`,H),process.nextTick(oe,n._socket),e===1005?n.close():n.close(e,t))}function ne(){let e=this[C];e.isPaused||e._socket.resume()}function re(e){let t=this[C];t._socket[C]!==void 0&&(t._socket.removeListener(`data`,H),process.nextTick(oe,t._socket),t.close(e[S])),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e))}function B(){this[C].emitClose()}function V(e,t){this[C].emit(`message`,e,t)}function ie(e){let t=this[C];t._autoPong&&t.pong(e,!this._isServer,w),t.emit(`ping`,e)}function ae(e){this[C].emit(`pong`,e)}function oe(e){e.resume()}function se(e){let t=this[C];t.readyState!==P.CLOSED&&(t.readyState===P.OPEN&&(t._readyState=P.CLOSING,ce(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e)))}function ce(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function le(){let e=this[C];if(this.removeListener(`close`,le),this.removeListener(`data`,H),this.removeListener(`end`,ue),e._readyState=P.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[C]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on(`error`,B),e._receiver.on(`finish`,B))}function H(e){this[C]._receiver.write(e)||this.pause()}function ue(){let e=this[C];e._readyState=P.CLOSING,e._receiver.end(),this.end()}function de(){let e=this[C];this.removeListener(`error`,de),this.on(`error`,w),e&&(e._readyState=P.CLOSING,this.destroy())}})),Sh=/* @__PURE__ */ e.t(((e,t)=>{xh();let{Duplex:n}=require("stream");function r(e){e.emit(`close`)}function i(){!this.destroyed&&this._writableState.finished&&this.destroy()}function a(e){this.removeListener(`error`,a),this.destroy(),this.listenerCount(`error`)===0&&this.emit(`error`,e)}function o(e,t){let o=!0,s=new n({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on(`message`,function(t,n){let r=!n&&s._readableState.objectMode?t.toString():t;s.push(r)||e.pause()}),e.once(`error`,function(e){s.destroyed||(o=!1,s.destroy(e))}),e.once(`close`,function(){s.destroyed||s.push(null)}),s._destroy=function(t,n){if(e.readyState===e.CLOSED){n(t),process.nextTick(r,s);return}let i=!1;e.once(`error`,function(e){i=!0,n(e)}),e.once(`close`,function(){i||n(t),process.nextTick(r,s)}),o&&e.terminate()},s._final=function(t){e.readyState===e.CONNECTING?e.once(`open`,function(){s._final(t)}):e._socket!==null&&(e._socket._writableState.finished?(t(),s._readableState.endEmitted&&s.destroy()):(e._socket.once(`finish`,function(){t()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(t,n,r){e.readyState===e.CONNECTING?e.once(`open`,function(){s._write(t,n,r)}):e.send(t,r)},s.on(`end`,i),s.on(`error`,a),s}t.exports=o})),Ch=/* @__PURE__ */ e.t(((e,t)=>{let{tokenChars:n}=gh();function r(e){let t=/* @__PURE__ */ new Set,r=-1,i=-1,a=0;for(;a<e.length;a++){let o=e.charCodeAt(a);if(i===-1&&n[o]===1)r===-1&&(r=a);else if(a!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=a);else if(o===44){if(r===-1)throw SyntaxError(`Unexpected character at index ${a}`);i===-1&&(i=a);let n=e.slice(r,i);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);t.add(n),r=i=-1}else throw SyntaxError(`Unexpected character at index ${a}`)}if(r===-1||i!==-1)throw SyntaxError(`Unexpected end of input`);let o=e.slice(r,a);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}t.exports={parse:r}})),wh=/* @__PURE__ */ e.t(((e,t)=>{let n=require("events"),r=require("http"),{Duplex:i}=require("stream"),{createHash:a}=require("crypto"),o=bh(),s=hh(),c=Ch(),l=xh(),{CLOSE_TIMEOUT:u,GUID:d,kWebSocket:f}=fh(),p=/^[+/0-9A-Za-z]{22}==$/;t.exports=class extends n{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:u,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:l,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`);if(e.port==null?e.server&&(this._server=e.server):(this._server=r.createServer((e,t)=>{let n=r.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":`text/plain`}),t.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)),this._server){let e=this.emit.bind(this,`connection`);this._removeListeners=m(this._server,{listening:this.emit.bind(this,`listening`),error:this.emit.bind(this,`error`),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=/* @__PURE__ */ new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw Error(`The server is operating in "noServer" mode`);return this._server?this._server.address():null}close(e){if(this._state===2)e&&this.once(`close`,()=>{e(/* @__PURE__ */ Error(`The server is not running`))}),process.nextTick(h,this);else if(e&&this.once(`close`,e),this._state!==1){if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(h,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{h(this)})}}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf(`?`);if((t===-1?e.url:e.url.slice(0,t))!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on(`error`,g);let i=e.headers[`sec-websocket-key`],a=e.headers.upgrade,l=+e.headers[`sec-websocket-version`];if(e.method!==`GET`){v(this,e,t,405,`Invalid HTTP method`);return}if(a===void 0||a.toLowerCase()!==`websocket`){v(this,e,t,400,`Invalid Upgrade header`);return}if(i===void 0||!p.test(i)){v(this,e,t,400,`Missing or invalid Sec-WebSocket-Key header`);return}if(l!==13&&l!==8){v(this,e,t,400,`Missing or invalid Sec-WebSocket-Version header`,{"Sec-WebSocket-Version":`13, 8`});return}if(!this.shouldHandle(e)){_(t,400);return}let u=e.headers[`sec-websocket-protocol`],d=/* @__PURE__ */ new Set;if(u!==void 0)try{d=c.parse(u)}catch{v(this,e,t,400,`Invalid Sec-WebSocket-Protocol header`);return}let f=e.headers[`sec-websocket-extensions`],m={};if(this.options.perMessageDeflate&&f!==void 0){let n=new s({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=o.parse(f);e[s.extensionName]&&(n.accept(e[s.extensionName]),m[s.extensionName]=n)}catch{v(this,e,t,400,`Invalid or unacceptable Sec-WebSocket-Extensions header`);return}}if(this.options.verifyClient){let a={origin:e.headers[`${l===8?`sec-websocket-origin`:`origin`}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(a,(a,o,s,c)=>{if(!a)return _(t,o||401,s,c);this.completeUpgrade(m,i,d,e,t,n,r)});return}if(!this.options.verifyClient(a))return _(t,401)}this.completeUpgrade(m,i,d,e,t,n,r)}completeUpgrade(e,t,n,r,i,c,l){if(!i.readable||!i.writable)return i.destroy();if(i[f])throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`);if(this._state>0)return _(i,503);let u=[`HTTP/1.1 101 Switching Protocols`,`Upgrade: websocket`,`Connection: Upgrade`,`Sec-WebSocket-Accept: ${a(`sha1`).update(t+d).digest(`base64`)}`],p=new this.options.WebSocket(null,void 0,this.options);if(n.size){let e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),p._protocol=e)}if(e[s.extensionName]){let t=e[s.extensionName].params,n=o.format({[s.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${n}`),p._extensions=e}this.emit(`headers`,u,r),i.write(u.concat(`\r
`).join(`\r
`)),i.removeListener(`error`,g),p.setSocket(i,c,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on(`close`,()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(h,this)})),l(p,r)}};function m(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function h(e){e._state=2,e.emit(`close`)}function g(){this.destroy()}function _(e,t,n,i){n||=r.STATUS_CODES[t],i={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...i},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${r.STATUS_CODES[t]}\r\n`+Object.keys(i).map(e=>`${e}: ${i[e]}`).join(`\r
`)+`\r
\r
`+n)}function v(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,v),e.emit(`wsClientError`,r,n,t)}else _(n,r,i,a)}}));Sh(),bh(),hh(),_h(),vh(),Ch();var Th=/* @__PURE__ */ e.a(xh(),1);wh();var Eh=Th.default;const Dh=1e3,Oh=`Build complete`,kh=r.r({completedAt:r.n().positive().optional(),inProgressCount:r.n().min(0),status:r.i()});var Ah=class extends Error{constructor(e,t,n,r){super(e),this.statusCode=t,this.reason=n,this.originalError=r,this.name=`NotifyServiceError`}},jh=class extends Ah{constructor(e,t,n,r){super(e,t,n,r),this.name=`NotifyConnectionError`}},Mh=class extends Ah{constructor(e,t,n,r){super(e,t,n,r),this.name=`NotifyServiceMessageTimeoutError`}},Nh=class extends Ah{constructor(e,t,n,r){super(e,t,n,r),this.name=`NotifyServiceAuthenticationError`}};async function Ph({notifyServiceUrl:e,buildId:t,progressMessageCallback:n,log:r,headers:i}){let a=`${e}/build/${t}`,o=new Eh(a,{handshakeTimeout:4e3,headers:i});return await new Promise((e,t)=>{o.on(`open`,()=>{r.debug(`notify service handshake successful at ${a}`)}),o.on(`unexpected-response`,(e,n)=>{let i=n.statusCode;switch(r.debug(`notify service unexpected response: ${i}`),i){case 400:t(new Nh(`Invalid build ID`,i));break;case 401:t(new Nh(`Unauthorized request`,i));break;case 403:t(new Nh(`Access denied to build`,i));break;case 404:t(new Nh(`Build not found`,i));break;default:t(new Ah(`Unexpected response from notify service`,i))}}),o.on(`close`,(n,i)=>{let a=i.toString();r.debug(`notify service connection closed with code ${n}: ${a}`),n===Dh&&a===Oh&&e(),i.toString().includes(`408 Request Timeout`)&&t(new Mh(`Timed out waiting for message from notify service`,408,i.toString())),n===1006&&t(new jh(`Failed to connect to notify service`,n,a)),t(new Ah(`Notify service connection closed unexpectedly`,n,a))}),o.on(`error`,e=>{let n=e.code;(n===`ECONNREFUSED`||n===`ENOTFOUND`||n===`ETIMEDOUT`||n===`HPE_INVALID_CONSTANT`||e.message&&e.message.includes(`Opening handshake has timed out`))&&t(new jh(`Failed to connect to notify service`,n,void 0,e)),t(new Ah(`Notify service error occurred`,n,void 0,e))}),o.on(`message`,i=>{try{let t=kh.parse(JSON.parse(i.toString()));n&&n(t),t.completedAt&&(r.debug(`notify service: build complete`),o.close(Dh,Oh),e())}catch(e){t(new Ah(`Unexpected error handling notify service message`,void 0,void 0,e))}})})}const Fh=({testCount:e,hasAccessibility:t})=>(0,Y.default)(t?`visual and accessibility changes`:`visual changes`,e,!0),Ih=({testCount:e,hasAccessibility:t})=>`${Fh({testCount:e,hasAccessibility:t})} must be accepted as ${(0,Y.default)(`baseline`,e)}`,Lh=({testCount:e,hasAccessibility:t})=>`${Fh({testCount:e,hasAccessibility:t})} accepted as ${(0,Y.default)(`baseline`,e)}`,Rh=({testCount:e,hasAccessibility:t})=>`${Fh({testCount:e,hasAccessibility:t})} denied`,zh=e=>e.features?.accessibilityTests?.enabled??!1,Bh={PENDING:{format:Ih,count:e=>e.pendingCount},ACCEPTED:{format:Lh,count:e=>e.acceptedCount},DENIED:{format:Rh,count:e=>e.deniedCount}},Vh=e=>{let t=Bh[e.status],n=t?.count(e)??0;if(!(n<1))return t.format({testCount:n,hasAccessibility:zh(e)})},Hh=e=>{let t=e.acceptedCount??0;if(!(t<1))return`Auto-accepted ${Fh({testCount:t,hasAccessibility:zh(e)})}`},Uh=(e,t)=>{if(t)return e;try{let t=new URL(e);return t.searchParams.set(`expandIgnored`,`true`),t.toString()}catch{return e}};var Wh=({ignoredCount:e=0,url:t,isOnboarding:r})=>{if(!(e<1))return q.default`{bold ${(0,Y.default)(`test`,e,!0)} ${(0,Y.default)(`was`,e)} ignored in this build.} Review at ${n.Tt(Uh(t,r))}`},Gh=({build:e,exitCode:t,isOnboarding:r})=>{let a=r?e.app.setupUrl:e.webUrl,o=Vh(e)??`This build has changes`,s=q.default`${i.t} {bold ${o}.} Review at ${n.Tt(a)}`,c=Wh({ignoredCount:e.ignoredCount,url:a,isOnboarding:r});return(0,J.dedent)(q.default`
    ${[s,c].filter(Boolean).join(`

`)}

    ${i.n} For CI/CD use cases, this command failed with exit code ${t}
    Pass {bold --exit-zero-on-changes} to succeed this command regardless of changes.
    Pass {bold --auto-accept-changes} to succeed and automatically accept any changes.
  `)},Kh=({build:e,exitCode:t,isOnboarding:r})=>{let{errorCount:a,interactionTestFailuresCount:o,webUrl:s}=e,c=o>0,l=a-o>0,u=(0,Y.default)(`failed test`,o,!0),d;return d=c&&l?`Encountered ${(0,Y.default)(`build error`,a-o,!0)} and ${u}`:c?`Encountered ${u}`:`Encountered ${(0,Y.default)(`build error`,a,!0)}`,(0,J.dedent)(q.default`
    ${i.t} {bold ${d}}: failing with exit code ${t}
    ${i.n} Review the errors at ${n.Tt(r?e.app.setupUrl:s)}
  `)};const qh=e=>({status:`initial`,title:`Test your ${d.c(e)}`}),Jh=e=>({status:`skipped`,title:`Test your ${d.c(e)}`,output:`Skipped due to --dry-run`}),Yh=({build:e})=>({tests:(0,Y.default)(`test`,e.actualTestCount,!0),errors:(0,Y.default)(`component error`,e.errorCount,!0),e2eErrors:(0,Y.default)(`test error`,e.errorCount,!0),changes:(0,Y.default)(`change`,e.changeCount,!0),stories:(0,Y.default)(`story`,e.specCount,!0),e2eTests:(0,Y.default)(`test`,e.specCount,!0),components:(0,Y.default)(`component`,e.componentCount,!0),skips:(0,Y.default)(`test`,e.testCount-e.actualTestCount,!0),snapshots:(0,Y.default)(`snapshot`,e.actualCaptureCount,!0)}),Xh=(e,{cursor:t=0,label:r=``}={})=>{let{build:i,options:a,turboSnapOutcome:o={mechanism:`none`}}=e,s=o.mechanism!==`none`&&!o.bailed;if(!i||a.dryRun)return{status:`pending`,title:`Test your ${d.c({options:a})}`,output:`This may take a few minutes`};if(i.actualTestCount===0)return{status:`pending`,title:`Finalizing build`,output:s?`All tests skipped`:`No tests run`};let{errors:c,e2eErrors:l,tests:u,skips:f}=Yh(e),p=n.St(a)?``:` for ${(0,Y.default)(d.l(e))}`,m=a.onlyStoryNames?`${p} matching ${a.onlyStoryNames.map(e=>`'${e}'`).join(`, `)}`:``,h=s?` potentially affected by recent changes`:``,g=i.testCount>i.actualTestCount?` (skipping ${f})`:``,_=Math.min(t,i.actualTestCount),v=Math.round(_/i.actualTestCount*100),y=`${_}/${i.actualTestCount}`,b=``;return i.errorCount&&(b=n.St(e.options)?`(${l}) `:`(${c}) `),{status:`pending`,title:`Running ${u}${m}${h}${g}`,output:t?`${v}% ${y} ${b} ${r}`:`This may take a few minutes`}},Zh=e=>{let{snapshots:t,components:r,stories:i,e2eTests:a}=Yh(e),o=n.St(e.options)?`Tested ${a}; captured ${t} in ${fd(e)}`:`Tested ${i} across ${r}; captured ${t} in ${fd(e)}`;return{status:`success`,title:`Build ${e.build.number} passed!`,output:o}},Qh=e=>{let{snapshots:t,components:r,stories:i,e2eTests:a}=Yh(e),o=n.St(e.options)?`Tested ${a}; captured ${t} in ${fd(e)}`:`Tested ${i} across ${r}; captured ${t} in ${fd(e)}`;return{status:`success`,title:e.build.autoAcceptChanges?`Build ${e.build.number} auto-accepted`:`Build ${e.build.number} completed`,output:o}},$h=e=>{let{snapshots:t,components:r,stories:i,e2eTests:a,errors:o,e2eErrors:s}=Yh(e),c=n.St(e.options)?`Tested ${a}; captured ${t} and found ${s}`:`Tested ${i} across ${r}; captured ${t} and found ${o}`;return{status:`error`,title:`Build ${e.build.number} failed after ${fd(e)}`,output:c}},eg=e=>({status:`error`,title:`Build ${e.build.number} failed due to system error`,output:`Please try again, or contact us if the problem persists`}),tg=e=>({status:`error`,title:`Build ${e.build.number} canceled`,output:`Someone canceled the build before it completed`}),ng=e=>({status:`skipped`,title:`Test your ${d.c(e)}`,output:e.isPublishOnly?`No UI tests or UI review enabled`:`Skipped due to ${e.options.list?`--list`:`--exit-once-uploaded`}`}),rg=e=>{switch(e.build.status){case`PASSED`:return Zh(e);case`BROKEN`:return $h(e);case`FAILED`:return eg(e);case`CANCELLED`:return tg(e);default:return Qh(e)}},ig=e=>{let t=e.autoAcceptChanges?Hh(e):Vh(e);return t?`${t}.`:`No changes were found in this build.`};var ag=e=>{let{build:t,isOnboarding:r}=e,a=r?t.app.setupUrl:t.webUrl,o=Wh({ignoredCount:t.ignoredCount,url:a,isOnboarding:r}),s=t.status===`PASSED`||t.status===`ACCEPTED`||t.autoAcceptChanges;if(r){let{snapshots:r,components:a,stories:c,e2eTests:l}=Yh({build:t}),u=n.St(e.options)?`We found ${l} and captured ${r}.`:`We found ${a} with ${c} and captured ${r}.`;return(0,J.dedent)(q.default`
      ${i.r} {bold ${s?`Build passed. Welcome to Chromatic!`:`Build completed. Welcome to Chromatic!`}}
      ${[u,o].filter(Boolean).join(`
`)}
      ${i.n} Please continue setup at ${n.Tt(t.app.setupUrl)}
    `)}let c=s?`Build ${t.number} passed!`:`Build ${t.number} completed`;return(0,J.dedent)(q.default`
    ${i.r} {bold ${c}}
    ${[ig(t),o].filter(Boolean).join(`
`)}
    ${i.n} View build details at ${n.Tt(t.webUrl)}
  `)};const og={github:`GitHub`,gitlab:`GitLab`,bitbucket:`Bitbucket`,azure:`Azure DevOps`};var sg=(e,t)=>(0,J.dedent)(q.default`
    ${i.n} {bold Speed up Continuous Integration}
    Your project is linked to ${og[e]} so Chromatic will report results there.
    This means you can ${t?"add `exitOnceUploaded: true` to the `with` inputs of your workflow step":"pass the `--exit-once-uploaded` flag"} to skip waiting for build results.
    Read more here: ${n.Tt(`https://www.chromatic.com/docs/configure/`)}
  `);async function cg(e,t){let{client:n,log:r,env:i,options:o}=e,{skipSnapshots:s,uploadedBytes:c,matchesBranch:u,turboSnapOutcome:d}=t;if(s||o.dryRun)return{kind:`skip-self`};let f=t.build,{app:p,number:m,tests:h,testCount:g,actualTestCount:_,reportToken:v}=f;p.repository&&c&&!o.junitReport&&!o.isLocalBuild&&r.info(sg(p.repository.provider,o.inAction));let y=o.interactive&&g===_&&h?.map(({spec:e,parameters:t,mode:n})=>{let r=n.name||`[${t.viewport}px]`,i=t.viewportIsDefault?``:r;return`${e.component.displayName} › ${e.name} ${i}`}),b=a.g(({cursor:t,label:n})=>{e.report({output:Xh({build:f,options:o,turboSnapOutcome:d},{cursor:t,label:n}).output,progress:{progress:t,total:_,unit:`snapshots`},build:f})},o.interactive?i.CHROMATIC_POLL_INTERVAL:i.CHROMATIC_OUTPUT_INTERVAL),x=e=>{if(_>0){let{inProgressCount:t=0}=e,n=_-t+1,r=y&&y[n-1]||``;b({cursor:n,label:r})}},S=async()=>{let e={headers:{Authorization:`Bearer ${v}`}},t=await n.runQuery(`
  query SnapshotBuildQuery($number: Int!) {
    app {
      build(number: $number) {
        id
        status(legacy: false)
        autoAcceptChanges
        inProgressCount: testCount(statuses: [IN_PROGRESS])
        testCount
        changeCount
        errorCount: testCount(statuses: [BROKEN])
        ignoredCount: testCount(statuses: [IGNORED])
        pendingCount: testCount(statuses: [PENDING])
        acceptedCount: testCount(statuses: [ACCEPTED])
        deniedCount: testCount(statuses: [DENIED])
        completedAt
      }
    }
  }
`,{number:m},e);return f={...f,...t.app.build},f.completedAt?f:(x(f),await a.i(i.CHROMATIC_POLL_INTERVAL),S())};_>0&&await lg(e,f.id,x,v);let C=await S();switch(C.status){case`PASSED`:return{kind:`continue`,output:{exitCode:l.n.OK,userError:!1,log:`passed`,build:C}};case`ACCEPTED`:case`PENDING`:case`DENIED`:return C.autoAcceptChanges||o?.exitZeroOnChanges===`true`||u?.(o?.exitZeroOnChanges||!1)?{kind:`continue`,output:{exitCode:l.n.OK,userError:!1,log:`passed`,build:C}}:{kind:`continue`,output:{exitCode:l.n.BUILD_HAS_CHANGES,userError:!0,log:`changes`,build:C}};case`BROKEN`:return{kind:`continue`,output:{exitCode:l.n.BUILD_HAS_ERRORS,userError:!0,log:`errors`,build:C}};case`FAILED`:return{kind:`continue`,output:{exitCode:l.n.BUILD_FAILED,userError:!1,build:C}};case`CANCELLED`:return{kind:`continue`,output:{exitCode:l.n.BUILD_WAS_CANCELED,userError:!0,build:C}};default:throw Error(`Unexpected build status: ${C.status}`)}}async function lg(e,t,r,i){let{env:a,log:o}=e;try{await Ph({notifyServiceUrl:a.CHROMATIC_NOTIFY_SERVICE_URL,buildId:t,progressMessageCallback:r,log:o,headers:{Authorization:`Bearer ${i}`}})}catch(e){n.jt(e),e instanceof jh?o.debug(`Failed to connect to notify service, falling back to polling: code: ${e.statusCode}, original error: ${e.originalError?.message}`):e instanceof Mh?o.debug(`Timed out waiting for message from notify service, falling back to polling`):e instanceof Nh?o.debug(`Error authenticating with notify service: ${e.statusCode} ${e.message}`):e instanceof Ah?o.debug(`Error getting updates from notify service: ${e.message} code: ${e.statusCode}, reason: ${e.reason}, original error: ${e.originalError?.message}`):o.error(`Unexpected error from notify service: ${e.message}`)}}const ug=e=>({build:e.build,skipSnapshots:e.skipSnapshots,uploadedBytes:e.uploadedBytes,matchesBranch:e.git.matchesBranch,turboSnapOutcome:e.turboSnapOutcome}),dg=(e,t)=>{switch(e.build=t.build,l.r(e,t.exitCode,t.userError),t.log){case`passed`:e.log.info(ag(e));return;case`changes`:e.log.error(Gh(e));return;case`errors`:e.log.error(Kh(e));return;default:return}};function fg(e){let t,n,r=0;return{start:i=>{r=0,t=ju({title:i.title,spacing:0,output:e}),n=ku({output:e,style:`heavy`,max:100,withGuide:!1}),n.start(`0%`)},update:e=>{let t=e.output||e.title;if(!e.progress){n.message(t);return}let i=pg(e.progress);n.advance(i-r,t),r=i},succeed:e=>{n.clear(),t.success(vd(e))},fail:e=>{n.clear(),t.error(Uu(e.title),{showLog:!1})}}}function pg({progress:e,total:t}){return t<=0?0:Math.max(0,Math.min(100,Math.round(e/t*100)))}async function mg(e){await pd(e,{name:`snapshot`,title:qh(e).title,transitions:{pending:Xh,success:rg,skipped:e=>e.skipSnapshots?ng(e):Jh(e)},extractInput:ug,run:cg,applyOutput:dg},Sd(e,fg))}var hg=_.t();const gg=e=>{let{builder:t,storybookPackages:r,storybookVersion:i}=e,a=typeof t==`string`?t:t?.name;return a?{name:a,packageVersion:r?.[n.E[a]]?.version}:{name:`webpack4`,packageVersion:i}},_g=async e=>{let t=await(0,Hs.readFile)(e),r=Object.keys(n.w).find(e=>n.w[e]===t.framework.name||e===t.framework.name),i=gg(t);return{version:t.storybookPackages&&r?t.storybookPackages[r].version:``,builder:i}};async function vg(e,t){let n=await yg(e,t),r=e.options.storybookBuildDir&&b.default.resolve(e.options.storybookBuildDir,`project.json`);if(!r||!(0,hg.pathExistsSync)(r))return await bg(n,e,t);try{let i=await _g(r);return await bg({...n,...i},e,t)}catch(r){return e.log.debug(r),await bg(n,e,t)}}async function yg(e,t){try{return await n.y(e,t)}catch(t){return e.log.debug(t),{}}}async function bg(e,t,r){return{...e,projectRoot:r,configDir:e.configDir??await n._(t,r),staticDirs:e.staticDirs??[]}}var xg=e=>(0,J.dedent)(q.default`
    ${i.t} {bold Build script not found}
    The CLI didn't find a script called {bold "${e}"} in your {bold package.json}.
    Make sure you set the {bold --build-script-name} option to the value of the script name that builds your Storybook.
  `);const Sg=e=>({gitRootPath:e.git?.rootPath,isReactNativeApp:e.isReactNativeApp??!1}),Cg=async(e,t)=>{if(!t.isReactNativeApp&&!e.options.storybookBuildDir&&!e.options.buildCommand&&!n.St(e.options)){let{buildScriptName:t}=e.options,n=e.packageJson.scripts??{};if(!t||!n[t])throw Error(xg(t??``))}return{kind:`continue`,output:{storybook:await vg(e,n.l({storybookBaseDir:e.options.storybookBaseDir,gitRootPath:t.gitRootPath}))}}},wg=(e,{storybook:t})=>{e.storybook=t,t.version&&n.It(`storybookVersion`,t.version);let{projectRoot:r,configDir:i,staticDirs:a,...o}=t;n.Ft(`storybook`,o)},Tg=e=>({status:`initial`,title:`Collect ${d.o(e)} metadata`}),Eg=e=>({status:`pending`,title:`Collecting ${d.o(e)} metadata`}),Dg=e=>({status:`success`,title:`Collected ${d.o(e)} metadata`,output:`Build metadata gathered`});async function Og(e){await pd(e,{name:`storybookInfo`,title:Tg(e).title,transitions:{pending:Eg,success:Dg},extractInput:Sg,run:Cg,applyOutput:wg},Sd(e,yd))}async function kg(e,{name:t,url:n}){let{experimental_abortSignal:r}=e.options;return e.log.debug(`Waiting for '${t}' sentinel file to appear at ${n}`),(0,Dr.default)(async i=>{if(r?.aborted)return i(r.reason||/* @__PURE__ */ Error(`Aborted`));try{let a=await(await e.http.fetch(n,{signal:r},{retries:0,noLogErrorBody:!0})).text();if(a!==`OK`)return e.log.debug(`Sentinel file '${t}' not OK, got '${a}'.`),i(/* @__PURE__ */ Error(`Sentinel file '${t}' not OK.`));e.log.debug(`Sentinel file '${t}' OK.`)}catch(n){let{message:r,response:a={}}=n;if(a.status===403)return i(/* @__PURE__ */ Error(`Provided signature expired.`));if(a.status===404)throw Error(`Sentinel file '${t}' not present.`);return e.log.getLevel()===`debug`&&e.log.debug(await a.text()),i(Error(r))}},{retries:185,minTimeout:1e3,maxTimeout:1e3})}const Ag={PENDING:`The pending status will be carried over from the most recent ancestor build that has unreviewed changes.`,PASSED:`The passed status will be carried over from the most recent ancestor build.`,ACCEPTED:`The accepted status will be carried over from the most recent ancestor build.`,DENIED:`The denied status will be carried over from the most recent ancestor build.`};var jg=({ancestorBuild:e})=>{let t=[q.default`${i.r} {bold This build was skipped and will not be displayed in Chromatic.}`],r=e&&Ag[e.status];return e&&r&&t.push(r,`${i.n} View ancestor build details at ${n.Tt(e.webUrl)}`),`${(0,J.dedent)(q.default`${t.join(`
`)}`)}\n`};const Mg=({turboSnapOutcome:e})=>e?.mechanism===`v2`&&!e.bailed?`TurboSnap 2.0`:`TurboSnap`,Ng=e=>{let t=e.ancestorBuild?(0,Y.default)(`snapshot`,e.ancestorBuild.snapshotCount,!0):`snapshots`;return(0,J.dedent)(q.default`
    ${i.r} {bold ${Mg(e)} enabled}
    Bypassed ${t} because no frontend files were changed.
  `)};var Pg=({build:e,options:t,skipSnapshots:n,turboSnapOutcome:r})=>{let a=Mg({turboSnapOutcome:r}),o=(0,Y.default)(`snapshot`,e.actualCaptureCount,!0),s=(0,Y.default)(`snapshot`,e.inheritedCaptureCount,!0);return!t.interactive||n?(0,J.dedent)(q.default`
      ${i.r} {bold ${a} enabled}
      Capturing ${o}; copying ${s} with TurboSnap.
    `):(0,J.dedent)(q.default`
      ${i.r} {bold ${a} enabled}
      Captured ${o}; copied ${s} with TurboSnap.
    `)},Fg=()=>(0,J.dedent)(q.default`
    ${i.i} {bold Deduplication failed, falling back to uploading all files}
    An error occurred while waiting for the server to deduplicate files.
    Retrying the upload without deduplication.
  `);const Ig=e=>({status:`initial`,title:`Publish your built ${d.o(e)}`}),Lg=e=>({status:`skipped`,title:`Publish your built ${d.o(e)}`,output:`Skipped due to --dry-run`}),Rg=(e,t)=>{let n=`Invalid ${d.o(e)} build at ${e.sourceDir}`;return e.buildLogFile&&(n+=` (check the build log)`),t&&(n+=`: ${t.message}`),{status:`error`,title:`Publishing your built ${d.o(e)}`,output:n}},zg=e=>({status:`pending`,title:`Publishing your built ${d.o(e)}`,output:`Starting publish`}),Bg=(e,{percentage:t})=>({status:`pending`,title:`Publishing your built ${d.o(e)}`,output:`${t}%`}),Vg=e=>({status:`pending`,title:`Publishing your built ${d.o(e)}`,output:`Finalizing upload`}),Hg=e=>{let t=(0,Y.default)(`file`,e.uploadedFiles,!0),n=Pc(e.uploadedBytes||0),r=e.fileInfo?.paths.length&&e.uploadedFiles&&e.fileInfo.paths.length>e.uploadedFiles?`, skipped ${(0,Y.default)(`file`,e.fileInfo.paths.length-e.uploadedFiles,!0)}`:``;return{status:`success`,title:e.uploadedBytes?`Publish complete in ${fd(e)}`:`Publish complete`,output:e.uploadedBytes?`Uploaded ${t} (${n})${r}`:`No new files to upload`}},Ug=()=>({status:`skipped`,title:`Publish skipped`}),Wg=(e,{path:t})=>({status:`error`,title:`Publishing your built ${d.o(e)}`,output:`Failed to upload ${t}`}),Gg=(e,t,n)=>{let{fileInfo:r,sourceDir:i}=t,a=new Map(r?.lengths.map(({knownAs:e,contentLength:t})=>[e,t])),o=r?.paths.map(e=>({...n&&r.hashes&&{contentHash:r.hashes[e]},contentLength:a.get(e)??-1,localPath:b.default.join(i,e),targetPath:e}));if(!o)throw Error(Rg({...t,options:e.options}).output);return o},Kg=async(e,t,n)=>{let{log:r,client:i,http:o,env:s,options:c}=e,l=await wl({...t,log:r,client:i,http:o,env:s,options:c},n,{onProgress:a.g((t,n)=>{let r=Math.round(t/n*100);e.report({output:Bg(e,{percentage:r}).output,progress:{progress:t,total:n,unit:`bytes`}})},c.interactive?100:s.CHROMATIC_OUTPUT_INTERVAL),onError:(t,n)=>{throw n===t.message?Error(Wg(e,{path:n}).output):t}});if(l.skippedByTurboSnap||l.sentinelUrls.length===0)return l;e.report({output:Vg(e).output});let u=Object.fromEntries(l.sentinelUrls.map(e=>{let{host:t,pathname:n}=new URL(e);return[t+n,{name:n.split(`/`).at(-1)||``,url:e}]}));return await Promise.all(Object.values(u).map(t=>kg(e,t))),l},qg=(e,t,n)=>{let{ancestorBuild:r}=n;return e.log.info(Ng({ancestorBuild:r,turboSnapOutcome:t.turboSnapOutcome})),e.log.info(jg({ancestorBuild:r})),{kind:`partial`,output:n}};async function Jg(e,t){if(e.options.dryRun)return{kind:`skip-self`};let n;try{n=await Kg(e,t,Gg(e,t,!0))}catch{e.log.warn(Fg()),n=await Kg(e,t,Gg(e,t,!1))}return n.skippedByTurboSnap?qg(e,t,n):{kind:`continue`,output:n}}const Yg=e=>({fileInfo:e.fileInfo,sourceDir:e.sourceDir,buildLogFile:e.buildLogFile,isReactNativeApp:e.isReactNativeApp,announcedBuild:e.announcedBuild,turboSnap:e.turboSnap,onlyStoryFiles:e.onlyStoryFiles,turboSnapOutcome:e.turboSnapOutcome}),Xg=(e,t)=>{e.sentinelUrls=t.sentinelUrls,e.uploadedBytes=t.uploadedBytes,e.uploadedFiles=t.uploadedFiles},Zg=(e,t)=>{e.build={...e.build,...t.skippedBuild},e.ancestorBuild=t.ancestorBuild};async function Qg(e){await pd(e,{name:`upload`,title:Ig(e).title,transitions:{pending:zg,success:Hg,skipped:Lg,partial:Ug,failure:(e,t)=>_d(e.isReactNativeApp?`Publishing your built React Native Storybook`:zg(e).title,t)},extractInput:Yg,run:Jg,applyOutput:Xg,applyPartial:Zg},Sd(e,fg))}const $g=e=>({status:`initial`,title:`Verify your ${d.o(e)}`}),e_=e=>({status:`skipped`,title:`Verify your ${d.o(e)}`,output:`Skipped due to --dry-run`}),t_=e=>({status:`pending`,title:`Verifying your ${d.o(e)}`,output:`This may take a few minutes`}),n_=e=>({status:`error`,title:`Verifying your ${d.o(e)}`,output:`Failed to publish build`}),r_=e=>({status:`pending`,title:`Starting partial build`,output:e.options.onlyStoryFiles?`Snapshots will be limited to ${d.l(e)} files matching ${e.options.onlyStoryFiles.map(e=>`'${e}'`).join(`, `)}`:`Snapshots will be limited to ${(0,Y.default)(`${d.l(e)} files`,e.onlyStoryFiles?.length,!0)} potentially affected by recent changes`}),i_=e=>({status:`pending`,title:`Starting partial build`,output:`Snapshots will be limited to ${(0,Y.default)(d.l(e))} matching ${e.options.onlyStoryNames?.map(e=>`'${e}'`).join(`, `)}`}),a_=(e,t)=>{let n=t.filter(e=>!e.completedAt).length,r=(0,Y.default)(`upgrade build`,t.length,!0);return{status:`pending`,title:`Verifying your ${d.o(e)}`,output:`Waiting for ${n}/${r} to complete`}},o_=e=>({status:`success`,title:e.isPublishOnly?`Published your ${d.o(e)}`:`Started build ${e.build.number}`,output:e.isOnboarding?`Continue setup at ${e.build.app.setupUrl}`:`View build details at ${e.build.webUrl}`}),s_=async(e,t)=>{let{client:n}=e,{announcedBuild:r,replacementBuildIds:i,turboSnap:a}=t,{id:o,reportToken:s}=r,{onlyStoryNames:c,onlyStoryFiles:u=t.onlyStoryFiles}=t.options,{publishBuild:d}=await n.runQuery(`
  mutation PublishBuildMutation($id: ID!, $input: PublishBuildInput!) {
    publishBuild(id: $id, input: $input) {
      # no need for legacy:false on PublishedBuild.status
      status
      storybookUrl
    }
  }
`,{id:o,input:{...u&&{onlyStoryFiles:u},...c&&{onlyStoryNames:[c].flat()},...i&&{replacementBuildIds:i},...c_(a)}},{headers:{Authorization:`Bearer ${s}`},retries:3});if(d.status===`FAILED`)throw new l.t(n_(t).output,{exitCode:l.n.BUILD_FAILED});return{announcedBuild:{...r,...d},storybookUrl:d.storybookUrl}};function c_(e){if(!e)return{turboSnapStatus:`UNUSED`};let{bailReason:t,previewConfigInStats:n}=e;return{...t&&{turboSnapBailReason:t},...n!==void 0&&{turboSnapPreviewConfigInStats:n},turboSnapStatus:t?`BAILED`:`APPLIED`}}var l_=(e,{failureReason:t,storybookUrl:r})=>{let a=e.isReactNativeApp?``:`\n    Visit your published Storybook at ${n.Tt(r)}`;return e.options?.vitest?(0,J.dedent)(q.default`
      ${i.t} {bold Failed to process your Vitest test run}
      This is usually caused by an issue with your test or configuration, not Chromatic.
      Review the error below, then update the affected test or configuration and rerun Vitest.

      ${t.trim()}

      View the published archives at ${n.Tt(r)}
    `):`${(0,J.dedent)(q.default`
    ${i.t} {bold Failed to extract stories from your Storybook}
    This is usually a problem with your published Storybook, not with Chromatic.

    Build and open your Storybook locally and check the browser console for errors.${a}
    The following error was encountered while running your Storybook:
  `)}\n\n${t.trim()}`};const u_=({spec:e})=>q.default`{dim → }${e.component.name}/${e.name}`;var d_=e=>(0,J.dedent)(q.default`
    {bold Listing available stories:}
    ${e.map(e=>u_(e)).join(`
`)}

    ${i.n} Use {bold --only-story-names} to run a build for a specific component or story.
    Globs are supported, for example: {bold --only-story-names "${e[0].spec.component.name}/**"}
  `),f_=e=>{if(!e.storybookUrl)throw Error(`No Storybook URL provided`);let t=[q.default`${i.r} {bold ${d.s(d.o(e))} published}`];if(e.build.componentCount&&e.build.specCount){let{components:r,stories:i,e2eTests:a}=Yh({build:e.build});t.push(n.St(e.options)?`We found ${a}.`:`We found ${r} with ${i}.`)}return e.isReactNativeApp||t.push(`${i.n} View your ${d.o(e)} at ${n.Tt(e.storybookUrl)}`),(0,J.dedent)(q.default`${t.join(`
`)}`)},p_=({billingUrl:e})=>(0,J.dedent)(q.default`
    ${i.i} {bold Build limited}
    Visit ${n.Tt(e)} to verify your billing details.
  `),m_=({billingUrl:e})=>(0,J.dedent)(q.default`
    ${i.i} {bold Payment required}
    This build is limited because your account has a payment past due.
    Visit ${n.Tt(e)} to update your billing details.
  `),h_=({billingUrl:e})=>(0,J.dedent)(q.default`
    ${i.i} {bold Billed snapshot limit reached}
    This build is limited because your account reached its billed snapshot limit for this billing period.
    Visit ${n.Tt(e)} to upgrade your plan.
  `),g_=({build:e})=>(0,J.dedent)(q.default`
    ${i.i} {bold TurboSnap not available for your account}
    To ensure your project is fully setup and baselines are properly established,
    TurboSnap is not available until at least 10 builds are created from CI.

    ${i.n} Review your TurboSnap availability on the Manage screen:
    ${n.Tt(e.app.manageUrl)}
  `);const __=async(e,t)=>{let{client:n,env:r,log:i,report:o}=e,{announcedBuild:s,storybookUrl:c,turboSnap:u,turboSnapOutcome:d,matchesBranch:f}=t,{list:p,onlyStoryNames:m,onlyStoryFiles:h=t.onlyStoryFiles}=t.options;h&&d?.mechanism!==`v2`&&o(r_(t)),m&&o(i_(t));let g=t.build,_=Date.now(),v=async()=>{let{number:e,reportToken:u}=s,d={number:e},f={headers:{Authorization:`Bearer ${u}`}},{app:{build:p}}=await n.runQuery(`
  query StartedBuildQuery($number: Int!) {
    app {
      build(number: $number) {
        startedAt
        failureReason
        upgradeBuilds {
          completedAt
        }
      }
    }
  }
`,d,f);if(p.failureReason)throw i.warn(l_(t,{failureReason:p.failureReason,storybookUrl:c})),new l.t(n_(t).output,{exitCode:l.n.STORYBOOK_BROKEN,userError:!0});if(!p.startedAt){if(p.upgradeBuilds?.some(e=>!e.completedAt))o({output:a_(t,p.upgradeBuilds).output}),_=Date.now()+r.CHROMATIC_POLL_INTERVAL;else if(Date.now()-_>r.STORYBOOK_VERIFY_TIMEOUT)throw new l.t(`Build verification timed out`,{exitCode:l.n.VERIFICATION_TIMEOUT});await a.i(r.CHROMATIC_POLL_INTERVAL),await v();return}let{app:{build:m}}=await n.runQuery(`
  query VerifyBuildQuery($number: Int!) {
    app {
      build(number: $number) {
        id
        number
        status(legacy: false)
        specCount
        componentCount
        testCount
        changeCount
        errorCount: testCount(statuses: [BROKEN])
        actualTestCount: testCount(statuses: [IN_PROGRESS])
        actualCaptureCount
        inheritedCaptureCount
        interactionTestFailuresCount
        webUrl
        browsers {
          browser
        }
        features {
          uiTests
          uiReview
          isReactNativeApp
          accessibilityTests {
            enabled
          }
        }
        autoAcceptChanges
        turboSnapEnabled
        wasLimited
        app {
          manageUrl
          setupUrl
          account {
            exceededThreshold
            paymentRequired
            billingUrl
          }
          repository {
            provider
          }
        }
        tests {
          spec {
            name
            component {
              name
              displayName
            }
          }
          parameters {
            viewport
            viewportIsDefault
          }
          mode {
            name
          }
        }
      }
    }
  }
`,d,f);g={...s,...g,...m}};await Promise.race([v(),new Promise((e,t)=>setTimeout(t,r.CHROMATIC_UPGRADE_TIMEOUT,/* @__PURE__ */ Error(`Timed out waiting for upgrade builds to complete`)))]);let y=!g.features?.uiReview&&!g.features?.uiTests;p&&g.tests&&i.info(d_(g.tests)),u&&(u.unavailable?i.warn(g_({build:g})):g.turboSnapEnabled&&i.info(Pg({build:g,options:t.options,turboSnapOutcome:d})));let b;if(g.wasLimited){let{account:e}=g.app;e?.exceededThreshold?(i.warn(h_(e)),b={code:l.n.ACCOUNT_QUOTA_REACHED,userError:!0}):e?.paymentRequired?(i.warn(m_(e)),b={code:l.n.ACCOUNT_PAYMENT_REQUIRED,userError:!0}):(e&&i.warn(p_(e)),b={code:l.n.BUILD_WAS_LIMITED,userError:!0})}g&&c&&i.info(f_({storybookUrl:c,build:g,options:t.options,isReactNativeApp:t.isReactNativeApp}));let x=!!(p||y||f?.(t.options.exitOnceUploaded));return{build:g,isPublishOnly:y,skipSnapshots:x,limitExitCode:b}};async function v_(e,t){if(e.options.dryRun)return{kind:`skip-self`};let{announcedBuild:n,storybookUrl:r}=await s_(e,{announcedBuild:t.announcedBuild,options:t.options,replacementBuildIds:t.replacementBuildIds,onlyStoryFiles:t.onlyStoryFiles,turboSnap:t.turboSnap}),{build:i,isPublishOnly:a,skipSnapshots:o,limitExitCode:s}=await __(e,{announcedBuild:n,build:t.build,storybookUrl:r,options:t.options,onlyStoryFiles:t.onlyStoryFiles,matchesBranch:t.matchesBranch,turboSnap:t.turboSnap,turboSnapOutcome:t.turboSnapOutcome,isReactNativeApp:t.isReactNativeApp});return{kind:`continue`,output:{announcedBuild:n,storybookUrl:r,build:i,isPublishOnly:a,skipSnapshots:o,limitExitCode:s}}}const y_=e=>({announcedBuild:e.announcedBuild,build:e.build,replacementBuildIds:e.git.replacementBuildIds,options:e.options,onlyStoryFiles:e.onlyStoryFiles,matchesBranch:e.git.matchesBranch,turboSnap:e.turboSnap,turboSnapOutcome:e.turboSnapOutcome,isReactNativeApp:e.isReactNativeApp}),b_=(e,t)=>{e.announcedBuild=t.announcedBuild,e.storybookUrl=t.storybookUrl,e.build=t.build,e.isPublishOnly=t.isPublishOnly,t.limitExitCode&&l.r(e,t.limitExitCode.code,t.limitExitCode.userError),t.skipSnapshots&&(l.r(e,l.n.OK),e.skipSnapshots=!0)};async function x_(e){await pd(e,{name:`verify`,title:$g(e).title,transitions:{pending:t_,success:o_,skipped:e_},extractInput:y_,run:v_,applyOutput:b_},Sd(e,xf))}var S_=/* @__PURE__ */ e.t(((e,t)=>{let n=require("fs"),r=require("path"),{promisify:i}=require("util"),a=require("semver").satisfies(process.version,`>=10.12.0`),o=e=>{if(process.platform===`win32`&&/[<>:"|?*]/.test(e.replace(r.parse(e).root,``))){let t=/* @__PURE__ */ Error(`Path contains invalid characters: ${e}`);throw t.code=`EINVAL`,t}},s=e=>({mode:511,fs:n,...e}),c=e=>{let t=/* @__PURE__ */ Error(`operation not permitted, mkdir '${e}'`);return t.code=`EPERM`,t.errno=-4048,t.path=e,t.syscall=`mkdir`,t};t.exports=async(e,t)=>{o(e),t=s(t);let l=i(t.fs.mkdir),u=i(t.fs.stat);if(a&&t.fs.mkdir===n.mkdir){let n=r.resolve(e);return await l(n,{mode:t.mode,recursive:!0}),n}let d=async e=>{try{return await l(e,t.mode),e}catch(t){if(t.code===`EPERM`)throw t;if(t.code===`ENOENT`){if(r.dirname(e)===e)throw c(e);if(t.message.includes(`null bytes`))throw t;return await d(r.dirname(e)),d(e)}try{if(!(await u(e)).isDirectory())throw Error(`The path is not a directory`)}catch{throw t}return e}};return d(r.resolve(e))},t.exports.sync=(e,t)=>{if(o(e),t=s(t),a&&t.fs.mkdirSync===n.mkdirSync){let i=r.resolve(e);return n.mkdirSync(i,{mode:t.mode,recursive:!0}),i}let i=e=>{try{t.fs.mkdirSync(e,t.mode)}catch(n){if(n.code===`EPERM`)throw n;if(n.code===`ENOENT`){if(r.dirname(e)===e)throw c(e);if(n.message.includes(`null bytes`))throw n;return i(r.dirname(e)),i(e)}try{if(!t.fs.statSync(e).isDirectory())throw Error(`The path is not a directory`)}catch{throw n}}return e};return i(r.resolve(e))}})),C_=/* @__PURE__ */ e.t(((e,t)=>{function n(e,t){for(var n=e.toString();n.length<t;)n=`0`+n;return n}function r(e){return n(e,2)}function i(e){var t=Math.abs(e),n=String(Math.floor(t/60)),r=String(t%60);return n=(`0`+n).slice(-2),r=(`0`+r).slice(-2),e===0?`Z`:(e<0?`+`:`-`)+n+`:`+r}function a(e,a){typeof e!=`string`&&(a=e,e=t.exports.ISO8601_FORMAT),a||=t.exports.now();var o=r(a.getDate()),s=r(a.getMonth()+1),c=r(a.getFullYear()),l=r(c.substring(2,4)),u=e.indexOf(`yyyy`)>-1?c:l,d=r(a.getHours()),f=r(a.getMinutes()),p=r(a.getSeconds()),m=n(a.getMilliseconds(),3),h=i(a.getTimezoneOffset());return e.replace(/dd/g,o).replace(/MM/g,s).replace(/y{1,4}/g,u).replace(/hh/g,d).replace(/mm/g,f).replace(/ss/g,p).replace(/SSS/g,m).replace(/O/g,h)}function o(e,t,n,r){e[`set`+(r?``:`UTC`)+t](n)}function s(e,n,r){var i=e.indexOf(`O`)<0,a=[{pattern:/y{1,4}/,regexp:`\\d{1,4}`,fn:function(e,t){o(e,`FullYear`,t,i)}},{pattern:/MM/,regexp:`\\d{1,2}`,fn:function(e,t){o(e,`Month`,t-1,i)}},{pattern:/dd/,regexp:`\\d{1,2}`,fn:function(e,t){o(e,`Date`,t,i)}},{pattern:/hh/,regexp:`\\d{1,2}`,fn:function(e,t){o(e,`Hours`,t,i)}},{pattern:/mm/,regexp:`\\d\\d`,fn:function(e,t){o(e,`Minutes`,t,i)}},{pattern:/ss/,regexp:`\\d\\d`,fn:function(e,t){o(e,`Seconds`,t,i)}},{pattern:/SSS/,regexp:`\\d\\d\\d`,fn:function(e,t){o(e,`Milliseconds`,t,i)}},{pattern:/O/,regexp:`[+-]\\d{1,2}:?\\d{2}?|Z`,fn:function(e,t){t=t===`Z`?0:t.replace(`:`,``);var n=Math.abs(t),r=(t>0?-1:1)*(n%100+Math.floor(n/100)*60);e.setUTCMinutes(e.getUTCMinutes()+r)}}],s=a.reduce(function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,`(`+t.regexp+`)`)):t.index=-1,e},{regexp:e,index:[]}),c=a.filter(function(e){return e.index>-1});c.sort(function(e,t){return e.index-t.index});var l=new RegExp(s.regexp).exec(n);if(l){var u=r||t.exports.now();return c.forEach(function(e,t){e.fn(u,l[t+1])}),u}throw Error(`String '`+n+`' could not be parsed as '`+e+`'`)}function c(e,t,n){if(!e)throw Error(`pattern must be supplied`);return s(e,t,n)}
// istanbul ignore next
function l(){return/* @__PURE__ */ new Date}t.exports=a,t.exports.asString=a,t.exports.parse=c,t.exports.now=l,t.exports.ISO8601_FORMAT=`yyyy-MM-ddThh:mm:ss.SSS`,t.exports.ISO8601_WITH_TZ_OFFSET_FORMAT=`yyyy-MM-ddThh:mm:ss.SSSO`,t.exports.DATETIME_FORMAT=`dd MM yyyy hh:mm:ss.SSS`,t.exports.ABSOLUTETIME_FORMAT=`hh:mm:ss.SSS`})),w_=/* @__PURE__ */ e.t(((e,t)=>{var n=d.r(),r=C_().asString;function i(e){this._factory=e,this._attributes={},this._testCases=[],this._properties=[]}i.prototype.name=function(e){return this._attributes.name=e,this},i.prototype.time=function(e){return this._attributes.time=e,this},i.prototype.timestamp=function(e){return n.isDate(e)?this._attributes.timestamp=r(`yyyy-MM-ddThh:mm:ss`,e):this._attributes.timestamp=e,this},i.prototype.property=function(e,t){return this._properties.push({name:e,value:t}),this},i.prototype.testCase=function(){var e=this._factory.newTestCase();return this._testCases.push(e),e},i.prototype.getFailureCount=function(){return this._sumTestCaseCounts(function(e){return e.getFailureCount()})},i.prototype.getErrorCount=function(){return this._sumTestCaseCounts(function(e){return e.getErrorCount()})},i.prototype.getSkippedCount=function(){return this._sumTestCaseCounts(function(e){return e.getSkippedCount()})},i.prototype._sumTestCaseCounts=function(e){var t=n.map(this._testCases,e);return n.sum(t)},i.prototype.build=function(e){this._attributes.tests=this._testCases.length,this._attributes.failures=this.getFailureCount(),this._attributes.errors=this.getErrorCount(),this._attributes.skipped=this.getSkippedCount();var t=e.ele(`testsuite`,this._attributes);if(this._properties.length){var r=t.ele(`properties`);n.forEach(this._properties,function(e){r.ele(`property`,{name:e.name,value:e.value})})}n.forEach(this._testCases,function(e){e.build(t)})},t.exports=i})),T_=/* @__PURE__ */ e.t(((e,t)=>{var n=d.r();function r(){this._error=!1,this._failure=!1,this._skipped=!1,this._standardOutput=void 0,this._standardError=void 0,this._stacktrace=void 0,this._attributes={},this._errorAttributes={},this._failureAttributes={},this._errorAttachment=void 0,this._errorContent=void 0,this._properties=[]}r.prototype.className=function(e){return this._attributes.classname=e,this},r.prototype.name=function(e){return this._attributes.name=e,this},r.prototype.time=function(e){return this._attributes.time=e,this},r.prototype.file=function(e){return this._attributes.file=e,this},r.prototype.failure=function(e,t){return this._failure=!0,e&&(this._failureAttributes.message=e),t&&(this._failureAttributes.type=t),this},r.prototype.error=function(e,t,n){return this._error=!0,e&&(this._errorAttributes.message=e),t&&(this._errorAttributes.type=t),n&&(this._errorContent=n),this},r.prototype.stacktrace=function(e){return this._failure=!0,this._stacktrace=e,this},r.prototype.skipped=function(){return this._skipped=!0,this},r.prototype.standardOutput=function(e){return this._standardOutput=e,this},r.prototype.standardError=function(e){return this._standardError=e,this},r.prototype.getFailureCount=function(){return Number(this._failure)},r.prototype.getErrorCount=function(){return Number(this._error)},r.prototype.getSkippedCount=function(){return Number(this._skipped)},r.prototype.errorAttachment=function(e){return this._errorAttachment=e,this},r.prototype.property=function(e,t){return this._properties.push({name:e,value:t}),this},r.prototype.build=function(e){var t=e.ele(`testcase`,this._attributes);if(this._properties.length){var r=t.ele(`properties`);n.forEach(this._properties,function(e){r.ele(`property`,{name:e.name,value:e.value})})}if(this._failure){var i=t.ele(`failure`,this._failureAttributes);this._stacktrace&&i.cdata(this._stacktrace)}if(this._error){var a=t.ele(`error`,this._errorAttributes);this._errorContent&&a.cdata(this._errorContent)}this._skipped&&t.ele(`skipped`),this._standardOutput&&t.ele(`system-out`).cdata(this._standardOutput);var o;this._standardError&&(o=t.ele(`system-err`).cdata(this._standardError),this._errorAttachment&&o.txt(`[[ATTACHMENT|`+this._errorAttachment+`]]`))},t.exports=r})),E_=/* @__PURE__ */ e.t(((e,t)=>{var n=d.r(),r=m.o(),i=require("path"),a=S_(),o=require("fs");w_(),T_();function s(e){this._factory=e,this._testSuitesAndCases=[]}s.prototype.writeTo=function(e){a.sync(i.dirname(e)),o.writeFileSync(e,this.build(),`utf8`)},s.prototype.build=function(){var e=r.create(`testsuites`,{encoding:`UTF-8`,invalidCharReplacement:``});return n.forEach(this._testSuitesAndCases,function(t){t.build(e)}),e.end({pretty:!0})},s.prototype.testSuite=function(){var e=this._factory.newTestSuite();return this._testSuitesAndCases.push(e),e},s.prototype.testCase=function(){var e=this._factory.newTestCase();return this._testSuitesAndCases.push(e),e},s.prototype.newBuilder=function(){return this._factory.newBuilder()},t.exports=s})),D_=/* @__PURE__ */ e.t(((e,t)=>{var n=E_(),r=w_(),i=T_();function a(){}a.prototype.newBuilder=function(){return new n(this)},a.prototype.newTestSuite=function(){return new r(this)},a.prototype.newTestCase=function(){return new i(this)},t.exports=a})),O_=/* @__PURE__ */ e.t(((e,t)=>{t.exports=new(D_())().newBuilder()})),k_=/* @__PURE__ */ e.a(O_());const A_={status:`initial`,title:`Generate build report`},j_=()=>({status:`pending`,title:`Generating build report`,output:`Collecting build information`}),M_=e=>({status:`success`,title:`Generated build report`,output:`View report at ${e.reportPath}`}),N_=async e=>{let{log:t}=e,{junitReport:n}=e.options,{number:r}=e.build,i=typeof n==`boolean`&&n?`chromatic-build-{buildNumber}.xml`:n;if(!i){t.debug(`junit report not configured, skipping`);return}e.reportPath=b.default.resolve(i.replaceAll(`{buildNumber}`,String(r)));let a=await P_(e),o=(a.completedAt||Date.now())-a.createdAt,s=k_.default.testSuite().name(`Chromatic build ${a.number}`).time(Math.round(o/1e3)).timestamp(new Date(a.createdAt).toISOString()).property(`buildNumber`,a.number).property(`buildStatus`,a.status).property(`buildUrl`,a.webUrl).property(`storybookUrl`,a.storybookUrl);for(let e of a.tests)F_(s,e);k_.default.writeTo(e.reportPath),t.info(kl(e.reportPath,`JUnit XML`))},P_=async e=>{let t=1e3,n=0,r=[];for(;;){let{app:{build:i}}=await e.client.runQuery(`
  query ReportQuery($buildNumber: Int!, $skip: Int, $limit: Int) {
    app {
      build(number: $buildNumber) {
        number
        status(legacy: false)
        storybookUrl
        webUrl
        createdAt
        completedAt
        tests(skip: $skip, limit: $limit) {
          status
          result
          spec {
            name
            component {
              name
              displayName
            }
          }
          parameters {
            viewport
            viewportIsDefault
          }
          mode {
            name
          }
        }
      }
    }
  }
`,{buildNumber:e.build.number,skip:n,limit:t},{headers:{Authorization:`Bearer ${e.build.reportToken}`}});if(r.push(...i.tests),i.tests.length<t)return{...i,tests:r};n+=t}},F_=(e,t)=>{let{status:n,result:r,spec:i,parameters:a,mode:o}=t,s=o.name||`[${a.viewport}px]`,c=a.viewportIsDefault?``:s,l=e.testCase().className(i.component.name.replaceAll(/[/|]/g,`.`));switch(l.property(`result`,n).name(`${i.name} ${c}`),n){case`FAILED`:l.error(`Server error while capturing snapshot, please try again`,n);break;case`BROKEN`:l.error(`Snapshot is broken due to an error in your Storybook`,n);break;case`DENIED`:l.failure(`Snapshot was denied by a user`,n);break;case`PENDING`:l.failure(`Snapshot contains visual changes and must be reviewed`,n);break;default:[`SKIPPED`,`PRESERVED`].includes(r)&&l.skipped()}};function I_(e){return cd({name:`report`,title:A_.title,skip:e=>e.skip,steps:[dd(j_),N_,dd(M_,!0)]})}var L_=/* @__PURE__ */ e.t(((e,t)=>{t.exports={"application/1d-interleaved-parityfec":{source:`iana`},"application/3gpdash-qoe-report+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/3gpp-ims+xml":{source:`iana`,compressible:!0},"application/3gpphal+json":{source:`iana`,compressible:!0},"application/3gpphalforms+json":{source:`iana`,compressible:!0},"application/a2l":{source:`iana`},"application/ace+cbor":{source:`iana`},"application/ace+json":{source:`iana`,compressible:!0},"application/ace-groupcomm+cbor":{source:`iana`},"application/ace-trl+cbor":{source:`iana`},"application/activemessage":{source:`iana`},"application/activity+json":{source:`iana`,compressible:!0},"application/aif+cbor":{source:`iana`},"application/aif+json":{source:`iana`,compressible:!0},"application/alto-cdni+json":{source:`iana`,compressible:!0},"application/alto-cdnifilter+json":{source:`iana`,compressible:!0},"application/alto-costmap+json":{source:`iana`,compressible:!0},"application/alto-costmapfilter+json":{source:`iana`,compressible:!0},"application/alto-directory+json":{source:`iana`,compressible:!0},"application/alto-endpointcost+json":{source:`iana`,compressible:!0},"application/alto-endpointcostparams+json":{source:`iana`,compressible:!0},"application/alto-endpointprop+json":{source:`iana`,compressible:!0},"application/alto-endpointpropparams+json":{source:`iana`,compressible:!0},"application/alto-error+json":{source:`iana`,compressible:!0},"application/alto-networkmap+json":{source:`iana`,compressible:!0},"application/alto-networkmapfilter+json":{source:`iana`,compressible:!0},"application/alto-propmap+json":{source:`iana`,compressible:!0},"application/alto-propmapparams+json":{source:`iana`,compressible:!0},"application/alto-tips+json":{source:`iana`,compressible:!0},"application/alto-tipsparams+json":{source:`iana`,compressible:!0},"application/alto-updatestreamcontrol+json":{source:`iana`,compressible:!0},"application/alto-updatestreamparams+json":{source:`iana`,compressible:!0},"application/aml":{source:`iana`},"application/andrew-inset":{source:`iana`,extensions:[`ez`]},"application/appinstaller":{compressible:!1,extensions:[`appinstaller`]},"application/applefile":{source:`iana`},"application/applixware":{source:`apache`,extensions:[`aw`]},"application/appx":{compressible:!1,extensions:[`appx`]},"application/appxbundle":{compressible:!1,extensions:[`appxbundle`]},"application/at+jwt":{source:`iana`},"application/atf":{source:`iana`},"application/atfx":{source:`iana`},"application/atom+xml":{source:`iana`,compressible:!0,extensions:[`atom`]},"application/atomcat+xml":{source:`iana`,compressible:!0,extensions:[`atomcat`]},"application/atomdeleted+xml":{source:`iana`,compressible:!0,extensions:[`atomdeleted`]},"application/atomicmail":{source:`iana`},"application/atomsvc+xml":{source:`iana`,compressible:!0,extensions:[`atomsvc`]},"application/atsc-dwd+xml":{source:`iana`,compressible:!0,extensions:[`dwd`]},"application/atsc-dynamic-event-message":{source:`iana`},"application/atsc-held+xml":{source:`iana`,compressible:!0,extensions:[`held`]},"application/atsc-rdt+json":{source:`iana`,compressible:!0},"application/atsc-rsat+xml":{source:`iana`,compressible:!0,extensions:[`rsat`]},"application/atxml":{source:`iana`},"application/auth-policy+xml":{source:`iana`,compressible:!0},"application/automationml-aml+xml":{source:`iana`,compressible:!0,extensions:[`aml`]},"application/automationml-amlx+zip":{source:`iana`,compressible:!1,extensions:[`amlx`]},"application/bacnet-xdd+zip":{source:`iana`,compressible:!1},"application/batch-smtp":{source:`iana`},"application/bdoc":{compressible:!1,extensions:[`bdoc`]},"application/beep+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/bufr":{source:`iana`},"application/c2pa":{source:`iana`},"application/calendar+json":{source:`iana`,compressible:!0},"application/calendar+xml":{source:`iana`,compressible:!0,extensions:[`xcs`]},"application/call-completion":{source:`iana`},"application/cals-1840":{source:`iana`},"application/captive+json":{source:`iana`,compressible:!0},"application/cbor":{source:`iana`},"application/cbor-seq":{source:`iana`},"application/cccex":{source:`iana`},"application/ccmp+xml":{source:`iana`,compressible:!0},"application/ccxml+xml":{source:`iana`,compressible:!0,extensions:[`ccxml`]},"application/cda+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/cdfx+xml":{source:`iana`,compressible:!0,extensions:[`cdfx`]},"application/cdmi-capability":{source:`iana`,extensions:[`cdmia`]},"application/cdmi-container":{source:`iana`,extensions:[`cdmic`]},"application/cdmi-domain":{source:`iana`,extensions:[`cdmid`]},"application/cdmi-object":{source:`iana`,extensions:[`cdmio`]},"application/cdmi-queue":{source:`iana`,extensions:[`cdmiq`]},"application/cdni":{source:`iana`},"application/ce+cbor":{source:`iana`},"application/cea":{source:`iana`},"application/cea-2018+xml":{source:`iana`,compressible:!0},"application/cellml+xml":{source:`iana`,compressible:!0},"application/cfw":{source:`iana`},"application/cid-edhoc+cbor-seq":{source:`iana`},"application/city+json":{source:`iana`,compressible:!0},"application/city+json-seq":{source:`iana`},"application/clr":{source:`iana`},"application/clue+xml":{source:`iana`,compressible:!0},"application/clue_info+xml":{source:`iana`,compressible:!0},"application/cms":{source:`iana`},"application/cnrp+xml":{source:`iana`,compressible:!0},"application/coap-eap":{source:`iana`},"application/coap-group+json":{source:`iana`,compressible:!0},"application/coap-payload":{source:`iana`},"application/commonground":{source:`iana`},"application/concise-problem-details+cbor":{source:`iana`},"application/conference-info+xml":{source:`iana`,compressible:!0},"application/cose":{source:`iana`},"application/cose-key":{source:`iana`},"application/cose-key-set":{source:`iana`},"application/cose-x509":{source:`iana`},"application/cpl+xml":{source:`iana`,compressible:!0,extensions:[`cpl`]},"application/csrattrs":{source:`iana`},"application/csta+xml":{source:`iana`,compressible:!0},"application/cstadata+xml":{source:`iana`,compressible:!0},"application/csvm+json":{source:`iana`,compressible:!0},"application/cu-seeme":{source:`apache`,extensions:[`cu`]},"application/cwl":{source:`iana`,extensions:[`cwl`]},"application/cwl+json":{source:`iana`,compressible:!0},"application/cwl+yaml":{source:`iana`},"application/cwt":{source:`iana`},"application/cybercash":{source:`iana`},"application/dart":{compressible:!0},"application/dash+xml":{source:`iana`,compressible:!0,extensions:[`mpd`]},"application/dash-patch+xml":{source:`iana`,compressible:!0,extensions:[`mpp`]},"application/dashdelta":{source:`iana`},"application/davmount+xml":{source:`iana`,compressible:!0,extensions:[`davmount`]},"application/dca-rft":{source:`iana`},"application/dcd":{source:`iana`},"application/dec-dx":{source:`iana`},"application/dialog-info+xml":{source:`iana`,compressible:!0},"application/dicom":{source:`iana`,extensions:[`dcm`]},"application/dicom+json":{source:`iana`,compressible:!0},"application/dicom+xml":{source:`iana`,compressible:!0},"application/dii":{source:`iana`},"application/dit":{source:`iana`},"application/dns":{source:`iana`},"application/dns+json":{source:`iana`,compressible:!0},"application/dns-message":{source:`iana`},"application/docbook+xml":{source:`apache`,compressible:!0,extensions:[`dbk`]},"application/dots+cbor":{source:`iana`},"application/dpop+jwt":{source:`iana`},"application/dskpp+xml":{source:`iana`,compressible:!0},"application/dssc+der":{source:`iana`,extensions:[`dssc`]},"application/dssc+xml":{source:`iana`,compressible:!0,extensions:[`xdssc`]},"application/dvcs":{source:`iana`},"application/eat+cwt":{source:`iana`},"application/eat+jwt":{source:`iana`},"application/eat-bun+cbor":{source:`iana`},"application/eat-bun+json":{source:`iana`,compressible:!0},"application/eat-ucs+cbor":{source:`iana`},"application/eat-ucs+json":{source:`iana`,compressible:!0},"application/ecmascript":{source:`apache`,compressible:!0,extensions:[`ecma`]},"application/edhoc+cbor-seq":{source:`iana`},"application/edi-consent":{source:`iana`},"application/edi-x12":{source:`iana`,compressible:!1},"application/edifact":{source:`iana`,compressible:!1},"application/efi":{source:`iana`},"application/elm+json":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/elm+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.cap+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/emergencycalldata.comment+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.control+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.ecall.msd":{source:`iana`},"application/emergencycalldata.legacyesn+json":{source:`iana`,compressible:!0},"application/emergencycalldata.providerinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:`iana`,compressible:!0},"application/emergencycalldata.veds+xml":{source:`iana`,compressible:!0},"application/emma+xml":{source:`iana`,compressible:!0,extensions:[`emma`]},"application/emotionml+xml":{source:`iana`,compressible:!0,extensions:[`emotionml`]},"application/encaprtp":{source:`iana`},"application/entity-statement+jwt":{source:`iana`},"application/epp+xml":{source:`iana`,compressible:!0},"application/epub+zip":{source:`iana`,compressible:!1,extensions:[`epub`]},"application/eshop":{source:`iana`},"application/exi":{source:`iana`,extensions:[`exi`]},"application/expect-ct-report+json":{source:`iana`,compressible:!0},"application/express":{source:`iana`,extensions:[`exp`]},"application/fastinfoset":{source:`iana`},"application/fastsoap":{source:`iana`},"application/fdf":{source:`iana`,extensions:[`fdf`]},"application/fdt+xml":{source:`iana`,compressible:!0,extensions:[`fdt`]},"application/fhir+json":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/fhir+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:`iana`},"application/flexfec":{source:`iana`},"application/font-sfnt":{source:`iana`},"application/font-tdpfr":{source:`iana`,extensions:[`pfr`]},"application/font-woff":{source:`iana`,compressible:!1},"application/framework-attributes+xml":{source:`iana`,compressible:!0},"application/geo+json":{source:`iana`,compressible:!0,extensions:[`geojson`]},"application/geo+json-seq":{source:`iana`},"application/geopackage+sqlite3":{source:`iana`},"application/geopose+json":{source:`iana`,compressible:!0},"application/geoxacml+json":{source:`iana`,compressible:!0},"application/geoxacml+xml":{source:`iana`,compressible:!0},"application/gltf-buffer":{source:`iana`},"application/gml+xml":{source:`iana`,compressible:!0,extensions:[`gml`]},"application/gnap-binding-jws":{source:`iana`},"application/gnap-binding-jwsd":{source:`iana`},"application/gnap-binding-rotation-jws":{source:`iana`},"application/gnap-binding-rotation-jwsd":{source:`iana`},"application/gpx+xml":{source:`apache`,compressible:!0,extensions:[`gpx`]},"application/grib":{source:`iana`},"application/gxf":{source:`apache`,extensions:[`gxf`]},"application/gzip":{source:`iana`,compressible:!1,extensions:[`gz`]},"application/h224":{source:`iana`},"application/held+xml":{source:`iana`,compressible:!0},"application/hjson":{extensions:[`hjson`]},"application/hl7v2+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/http":{source:`iana`},"application/hyperstudio":{source:`iana`,extensions:[`stk`]},"application/ibe-key-request+xml":{source:`iana`,compressible:!0},"application/ibe-pkg-reply+xml":{source:`iana`,compressible:!0},"application/ibe-pp-data":{source:`iana`},"application/iges":{source:`iana`},"application/im-iscomposing+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/index":{source:`iana`},"application/index.cmd":{source:`iana`},"application/index.obj":{source:`iana`},"application/index.response":{source:`iana`},"application/index.vnd":{source:`iana`},"application/inkml+xml":{source:`iana`,compressible:!0,extensions:[`ink`,`inkml`]},"application/iotp":{source:`iana`},"application/ipfix":{source:`iana`,extensions:[`ipfix`]},"application/ipp":{source:`iana`},"application/isup":{source:`iana`},"application/its+xml":{source:`iana`,compressible:!0,extensions:[`its`]},"application/java-archive":{source:`iana`,compressible:!1,extensions:[`jar`,`war`,`ear`]},"application/java-serialized-object":{source:`apache`,compressible:!1,extensions:[`ser`]},"application/java-vm":{source:`apache`,compressible:!1,extensions:[`class`]},"application/javascript":{source:`apache`,charset:`UTF-8`,compressible:!0,extensions:[`js`]},"application/jf2feed+json":{source:`iana`,compressible:!0},"application/jose":{source:`iana`},"application/jose+json":{source:`iana`,compressible:!0},"application/jrd+json":{source:`iana`,compressible:!0},"application/jscalendar+json":{source:`iana`,compressible:!0},"application/jscontact+json":{source:`iana`,compressible:!0},"application/json":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`json`,`map`]},"application/json-patch+json":{source:`iana`,compressible:!0},"application/json-seq":{source:`iana`},"application/json5":{extensions:[`json5`]},"application/jsonml+json":{source:`apache`,compressible:!0,extensions:[`jsonml`]},"application/jsonpath":{source:`iana`},"application/jwk+json":{source:`iana`,compressible:!0},"application/jwk-set+json":{source:`iana`,compressible:!0},"application/jwk-set+jwt":{source:`iana`},"application/jwt":{source:`iana`},"application/kpml-request+xml":{source:`iana`,compressible:!0},"application/kpml-response+xml":{source:`iana`,compressible:!0},"application/ld+json":{source:`iana`,compressible:!0,extensions:[`jsonld`]},"application/lgr+xml":{source:`iana`,compressible:!0,extensions:[`lgr`]},"application/link-format":{source:`iana`},"application/linkset":{source:`iana`},"application/linkset+json":{source:`iana`,compressible:!0},"application/load-control+xml":{source:`iana`,compressible:!0},"application/logout+jwt":{source:`iana`},"application/lost+xml":{source:`iana`,compressible:!0,extensions:[`lostxml`]},"application/lostsync+xml":{source:`iana`,compressible:!0},"application/lpf+zip":{source:`iana`,compressible:!1},"application/lxf":{source:`iana`},"application/mac-binhex40":{source:`iana`,extensions:[`hqx`]},"application/mac-compactpro":{source:`apache`,extensions:[`cpt`]},"application/macwriteii":{source:`iana`},"application/mads+xml":{source:`iana`,compressible:!0,extensions:[`mads`]},"application/manifest+json":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`webmanifest`]},"application/marc":{source:`iana`,extensions:[`mrc`]},"application/marcxml+xml":{source:`iana`,compressible:!0,extensions:[`mrcx`]},"application/mathematica":{source:`iana`,extensions:[`ma`,`nb`,`mb`]},"application/mathml+xml":{source:`iana`,compressible:!0,extensions:[`mathml`]},"application/mathml-content+xml":{source:`iana`,compressible:!0},"application/mathml-presentation+xml":{source:`iana`,compressible:!0},"application/mbms-associated-procedure-description+xml":{source:`iana`,compressible:!0},"application/mbms-deregister+xml":{source:`iana`,compressible:!0},"application/mbms-envelope+xml":{source:`iana`,compressible:!0},"application/mbms-msk+xml":{source:`iana`,compressible:!0},"application/mbms-msk-response+xml":{source:`iana`,compressible:!0},"application/mbms-protection-description+xml":{source:`iana`,compressible:!0},"application/mbms-reception-report+xml":{source:`iana`,compressible:!0},"application/mbms-register+xml":{source:`iana`,compressible:!0},"application/mbms-register-response+xml":{source:`iana`,compressible:!0},"application/mbms-schedule+xml":{source:`iana`,compressible:!0},"application/mbms-user-service-description+xml":{source:`iana`,compressible:!0},"application/mbox":{source:`iana`,extensions:[`mbox`]},"application/media-policy-dataset+xml":{source:`iana`,compressible:!0,extensions:[`mpf`]},"application/media_control+xml":{source:`iana`,compressible:!0},"application/mediaservercontrol+xml":{source:`iana`,compressible:!0,extensions:[`mscml`]},"application/merge-patch+json":{source:`iana`,compressible:!0},"application/metalink+xml":{source:`apache`,compressible:!0,extensions:[`metalink`]},"application/metalink4+xml":{source:`iana`,compressible:!0,extensions:[`meta4`]},"application/mets+xml":{source:`iana`,compressible:!0,extensions:[`mets`]},"application/mf4":{source:`iana`},"application/mikey":{source:`iana`},"application/mipc":{source:`iana`},"application/missing-blocks+cbor-seq":{source:`iana`},"application/mmt-aei+xml":{source:`iana`,compressible:!0,extensions:[`maei`]},"application/mmt-usd+xml":{source:`iana`,compressible:!0,extensions:[`musd`]},"application/mods+xml":{source:`iana`,compressible:!0,extensions:[`mods`]},"application/moss-keys":{source:`iana`},"application/moss-signature":{source:`iana`},"application/mosskey-data":{source:`iana`},"application/mosskey-request":{source:`iana`},"application/mp21":{source:`iana`,extensions:[`m21`,`mp21`]},"application/mp4":{source:`iana`,extensions:[`mp4`,`mpg4`,`mp4s`,`m4p`]},"application/mpeg4-generic":{source:`iana`},"application/mpeg4-iod":{source:`iana`},"application/mpeg4-iod-xmt":{source:`iana`},"application/mrb-consumer+xml":{source:`iana`,compressible:!0},"application/mrb-publish+xml":{source:`iana`,compressible:!0},"application/msc-ivr+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/msc-mixer+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/msix":{compressible:!1,extensions:[`msix`]},"application/msixbundle":{compressible:!1,extensions:[`msixbundle`]},"application/msword":{source:`iana`,compressible:!1,extensions:[`doc`,`dot`]},"application/mud+json":{source:`iana`,compressible:!0},"application/multipart-core":{source:`iana`},"application/mxf":{source:`iana`,extensions:[`mxf`]},"application/n-quads":{source:`iana`,extensions:[`nq`]},"application/n-triples":{source:`iana`,extensions:[`nt`]},"application/nasdata":{source:`iana`},"application/news-checkgroups":{source:`iana`,charset:`US-ASCII`},"application/news-groupinfo":{source:`iana`,charset:`US-ASCII`},"application/news-transmission":{source:`iana`},"application/nlsml+xml":{source:`iana`,compressible:!0},"application/node":{source:`iana`,extensions:[`cjs`]},"application/nss":{source:`iana`},"application/oauth-authz-req+jwt":{source:`iana`},"application/oblivious-dns-message":{source:`iana`},"application/ocsp-request":{source:`iana`},"application/ocsp-response":{source:`iana`},"application/octet-stream":{source:`iana`,compressible:!0,extensions:[`bin`,`dms`,`lrf`,`mar`,`so`,`dist`,`distz`,`pkg`,`bpk`,`dump`,`elc`,`deploy`,`exe`,`dll`,`deb`,`dmg`,`iso`,`img`,`msi`,`msp`,`msm`,`buffer`]},"application/oda":{source:`iana`,extensions:[`oda`]},"application/odm+xml":{source:`iana`,compressible:!0},"application/odx":{source:`iana`},"application/oebps-package+xml":{source:`iana`,compressible:!0,extensions:[`opf`]},"application/ogg":{source:`iana`,compressible:!1,extensions:[`ogx`]},"application/ohttp-keys":{source:`iana`},"application/omdoc+xml":{source:`apache`,compressible:!0,extensions:[`omdoc`]},"application/onenote":{source:`apache`,extensions:[`onetoc`,`onetoc2`,`onetmp`,`onepkg`,`one`,`onea`]},"application/opc-nodeset+xml":{source:`iana`,compressible:!0},"application/oscore":{source:`iana`},"application/oxps":{source:`iana`,extensions:[`oxps`]},"application/p21":{source:`iana`},"application/p21+zip":{source:`iana`,compressible:!1},"application/p2p-overlay+xml":{source:`iana`,compressible:!0,extensions:[`relo`]},"application/parityfec":{source:`iana`},"application/passport":{source:`iana`},"application/patch-ops-error+xml":{source:`iana`,compressible:!0,extensions:[`xer`]},"application/pdf":{source:`iana`,compressible:!1,extensions:[`pdf`]},"application/pdx":{source:`iana`},"application/pem-certificate-chain":{source:`iana`},"application/pgp-encrypted":{source:`iana`,compressible:!1,extensions:[`pgp`]},"application/pgp-keys":{source:`iana`,extensions:[`asc`]},"application/pgp-signature":{source:`iana`,extensions:[`sig`,`asc`]},"application/pics-rules":{source:`apache`,extensions:[`prf`]},"application/pidf+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/pidf-diff+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/pkcs10":{source:`iana`,extensions:[`p10`]},"application/pkcs12":{source:`iana`},"application/pkcs7-mime":{source:`iana`,extensions:[`p7m`,`p7c`]},"application/pkcs7-signature":{source:`iana`,extensions:[`p7s`]},"application/pkcs8":{source:`iana`,extensions:[`p8`]},"application/pkcs8-encrypted":{source:`iana`},"application/pkix-attr-cert":{source:`iana`,extensions:[`ac`]},"application/pkix-cert":{source:`iana`,extensions:[`cer`]},"application/pkix-crl":{source:`iana`,extensions:[`crl`]},"application/pkix-pkipath":{source:`iana`,extensions:[`pkipath`]},"application/pkixcmp":{source:`iana`,extensions:[`pki`]},"application/pls+xml":{source:`iana`,compressible:!0,extensions:[`pls`]},"application/poc-settings+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/postscript":{source:`iana`,compressible:!0,extensions:[`ai`,`eps`,`ps`]},"application/ppsp-tracker+json":{source:`iana`,compressible:!0},"application/private-token-issuer-directory":{source:`iana`},"application/private-token-request":{source:`iana`},"application/private-token-response":{source:`iana`},"application/problem+json":{source:`iana`,compressible:!0},"application/problem+xml":{source:`iana`,compressible:!0},"application/provenance+xml":{source:`iana`,compressible:!0,extensions:[`provx`]},"application/provided-claims+jwt":{source:`iana`},"application/prs.alvestrand.titrax-sheet":{source:`iana`},"application/prs.cww":{source:`iana`,extensions:[`cww`]},"application/prs.cyn":{source:`iana`,charset:`7-BIT`},"application/prs.hpub+zip":{source:`iana`,compressible:!1},"application/prs.implied-document+xml":{source:`iana`,compressible:!0},"application/prs.implied-executable":{source:`iana`},"application/prs.implied-object+json":{source:`iana`,compressible:!0},"application/prs.implied-object+json-seq":{source:`iana`},"application/prs.implied-object+yaml":{source:`iana`},"application/prs.implied-structure":{source:`iana`},"application/prs.mayfile":{source:`iana`},"application/prs.nprend":{source:`iana`},"application/prs.plucker":{source:`iana`},"application/prs.rdf-xml-crypt":{source:`iana`},"application/prs.vcfbzip2":{source:`iana`},"application/prs.xsf+xml":{source:`iana`,compressible:!0,extensions:[`xsf`]},"application/pskc+xml":{source:`iana`,compressible:!0,extensions:[`pskcxml`]},"application/pvd+json":{source:`iana`,compressible:!0},"application/qsig":{source:`iana`},"application/raml+yaml":{compressible:!0,extensions:[`raml`]},"application/raptorfec":{source:`iana`},"application/rdap+json":{source:`iana`,compressible:!0},"application/rdf+xml":{source:`iana`,compressible:!0,extensions:[`rdf`,`owl`]},"application/reginfo+xml":{source:`iana`,compressible:!0,extensions:[`rif`]},"application/relax-ng-compact-syntax":{source:`iana`,extensions:[`rnc`]},"application/remote-printing":{source:`apache`},"application/reputon+json":{source:`iana`,compressible:!0},"application/resolve-response+jwt":{source:`iana`},"application/resource-lists+xml":{source:`iana`,compressible:!0,extensions:[`rl`]},"application/resource-lists-diff+xml":{source:`iana`,compressible:!0,extensions:[`rld`]},"application/rfc+xml":{source:`iana`,compressible:!0},"application/riscos":{source:`iana`},"application/rlmi+xml":{source:`iana`,compressible:!0},"application/rls-services+xml":{source:`iana`,compressible:!0,extensions:[`rs`]},"application/route-apd+xml":{source:`iana`,compressible:!0,extensions:[`rapd`]},"application/route-s-tsid+xml":{source:`iana`,compressible:!0,extensions:[`sls`]},"application/route-usd+xml":{source:`iana`,compressible:!0,extensions:[`rusd`]},"application/rpki-checklist":{source:`iana`},"application/rpki-ghostbusters":{source:`iana`,extensions:[`gbr`]},"application/rpki-manifest":{source:`iana`,extensions:[`mft`]},"application/rpki-publication":{source:`iana`},"application/rpki-roa":{source:`iana`,extensions:[`roa`]},"application/rpki-signed-tal":{source:`iana`},"application/rpki-updown":{source:`iana`},"application/rsd+xml":{source:`apache`,compressible:!0,extensions:[`rsd`]},"application/rss+xml":{source:`apache`,compressible:!0,extensions:[`rss`]},"application/rtf":{source:`iana`,compressible:!0,extensions:[`rtf`]},"application/rtploopback":{source:`iana`},"application/rtx":{source:`iana`},"application/samlassertion+xml":{source:`iana`,compressible:!0},"application/samlmetadata+xml":{source:`iana`,compressible:!0},"application/sarif+json":{source:`iana`,compressible:!0},"application/sarif-external-properties+json":{source:`iana`,compressible:!0},"application/sbe":{source:`iana`},"application/sbml+xml":{source:`iana`,compressible:!0,extensions:[`sbml`]},"application/scaip+xml":{source:`iana`,compressible:!0},"application/scim+json":{source:`iana`,compressible:!0},"application/scvp-cv-request":{source:`iana`,extensions:[`scq`]},"application/scvp-cv-response":{source:`iana`,extensions:[`scs`]},"application/scvp-vp-request":{source:`iana`,extensions:[`spq`]},"application/scvp-vp-response":{source:`iana`,extensions:[`spp`]},"application/sdp":{source:`iana`,extensions:[`sdp`]},"application/secevent+jwt":{source:`iana`},"application/senml+cbor":{source:`iana`},"application/senml+json":{source:`iana`,compressible:!0},"application/senml+xml":{source:`iana`,compressible:!0,extensions:[`senmlx`]},"application/senml-etch+cbor":{source:`iana`},"application/senml-etch+json":{source:`iana`,compressible:!0},"application/senml-exi":{source:`iana`},"application/sensml+cbor":{source:`iana`},"application/sensml+json":{source:`iana`,compressible:!0},"application/sensml+xml":{source:`iana`,compressible:!0,extensions:[`sensmlx`]},"application/sensml-exi":{source:`iana`},"application/sep+xml":{source:`iana`,compressible:!0},"application/sep-exi":{source:`iana`},"application/session-info":{source:`iana`},"application/set-payment":{source:`iana`},"application/set-payment-initiation":{source:`iana`,extensions:[`setpay`]},"application/set-registration":{source:`iana`},"application/set-registration-initiation":{source:`iana`,extensions:[`setreg`]},"application/sgml":{source:`iana`},"application/sgml-open-catalog":{source:`iana`},"application/shf+xml":{source:`iana`,compressible:!0,extensions:[`shf`]},"application/sieve":{source:`iana`,extensions:[`siv`,`sieve`]},"application/simple-filter+xml":{source:`iana`,compressible:!0},"application/simple-message-summary":{source:`iana`},"application/simplesymbolcontainer":{source:`iana`},"application/sipc":{source:`iana`},"application/slate":{source:`iana`},"application/smil":{source:`apache`},"application/smil+xml":{source:`iana`,compressible:!0,extensions:[`smi`,`smil`]},"application/smpte336m":{source:`iana`},"application/soap+fastinfoset":{source:`iana`},"application/soap+xml":{source:`iana`,compressible:!0},"application/sparql-query":{source:`iana`,extensions:[`rq`]},"application/sparql-results+xml":{source:`iana`,compressible:!0,extensions:[`srx`]},"application/spdx+json":{source:`iana`,compressible:!0},"application/spirits-event+xml":{source:`iana`,compressible:!0},"application/sql":{source:`iana`,extensions:[`sql`]},"application/srgs":{source:`iana`,extensions:[`gram`]},"application/srgs+xml":{source:`iana`,compressible:!0,extensions:[`grxml`]},"application/sru+xml":{source:`iana`,compressible:!0,extensions:[`sru`]},"application/ssdl+xml":{source:`apache`,compressible:!0,extensions:[`ssdl`]},"application/sslkeylogfile":{source:`iana`},"application/ssml+xml":{source:`iana`,compressible:!0,extensions:[`ssml`]},"application/st2110-41":{source:`iana`},"application/stix+json":{source:`iana`,compressible:!0},"application/stratum":{source:`iana`},"application/swid+cbor":{source:`iana`},"application/swid+xml":{source:`iana`,compressible:!0,extensions:[`swidtag`]},"application/tamp-apex-update":{source:`iana`},"application/tamp-apex-update-confirm":{source:`iana`},"application/tamp-community-update":{source:`iana`},"application/tamp-community-update-confirm":{source:`iana`},"application/tamp-error":{source:`iana`},"application/tamp-sequence-adjust":{source:`iana`},"application/tamp-sequence-adjust-confirm":{source:`iana`},"application/tamp-status-query":{source:`iana`},"application/tamp-status-response":{source:`iana`},"application/tamp-update":{source:`iana`},"application/tamp-update-confirm":{source:`iana`},"application/tar":{compressible:!0},"application/taxii+json":{source:`iana`,compressible:!0},"application/td+json":{source:`iana`,compressible:!0},"application/tei+xml":{source:`iana`,compressible:!0,extensions:[`tei`,`teicorpus`]},"application/tetra_isi":{source:`iana`},"application/thraud+xml":{source:`iana`,compressible:!0,extensions:[`tfi`]},"application/timestamp-query":{source:`iana`},"application/timestamp-reply":{source:`iana`},"application/timestamped-data":{source:`iana`,extensions:[`tsd`]},"application/tlsrpt+gzip":{source:`iana`},"application/tlsrpt+json":{source:`iana`,compressible:!0},"application/tm+json":{source:`iana`,compressible:!0},"application/tnauthlist":{source:`iana`},"application/toc+cbor":{source:`iana`},"application/token-introspection+jwt":{source:`iana`},"application/toml":{source:`iana`,compressible:!0,extensions:[`toml`]},"application/trickle-ice-sdpfrag":{source:`iana`},"application/trig":{source:`iana`,extensions:[`trig`]},"application/trust-chain+json":{source:`iana`,compressible:!0},"application/trust-mark+jwt":{source:`iana`},"application/trust-mark-delegation+jwt":{source:`iana`},"application/ttml+xml":{source:`iana`,compressible:!0,extensions:[`ttml`]},"application/tve-trigger":{source:`iana`},"application/tzif":{source:`iana`},"application/tzif-leap":{source:`iana`},"application/ubjson":{compressible:!1,extensions:[`ubj`]},"application/uccs+cbor":{source:`iana`},"application/ujcs+json":{source:`iana`,compressible:!0},"application/ulpfec":{source:`iana`},"application/urc-grpsheet+xml":{source:`iana`,compressible:!0},"application/urc-ressheet+xml":{source:`iana`,compressible:!0,extensions:[`rsheet`]},"application/urc-targetdesc+xml":{source:`iana`,compressible:!0,extensions:[`td`]},"application/urc-uisocketdesc+xml":{source:`iana`,compressible:!0},"application/vc":{source:`iana`},"application/vc+cose":{source:`iana`},"application/vc+jwt":{source:`iana`},"application/vcard+json":{source:`iana`,compressible:!0},"application/vcard+xml":{source:`iana`,compressible:!0},"application/vemmi":{source:`iana`},"application/vividence.scriptfile":{source:`apache`},"application/vnd.1000minds.decision-model+xml":{source:`iana`,compressible:!0,extensions:[`1km`]},"application/vnd.1ob":{source:`iana`},"application/vnd.3gpp-prose+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-prose-pc3a+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-prose-pc3ach+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-prose-pc8+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:`iana`},"application/vnd.3gpp.5gnas":{source:`iana`},"application/vnd.3gpp.5gsa2x":{source:`iana`},"application/vnd.3gpp.5gsa2x-local-service-information":{source:`iana`},"application/vnd.3gpp.5gsv2x":{source:`iana`},"application/vnd.3gpp.5gsv2x-local-service-information":{source:`iana`},"application/vnd.3gpp.access-transfer-events+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.bsf+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.crs+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.current-location-discovery+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.gmop+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.gtpc":{source:`iana`},"application/vnd.3gpp.interworking-data":{source:`iana`},"application/vnd.3gpp.lpp":{source:`iana`},"application/vnd.3gpp.mc-signalling-ear":{source:`iana`},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:`iana`},"application/vnd.3gpp.mcdata-regroup+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:`iana`},"application/vnd.3gpp.mcdata-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-regroup+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-regroup+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.ngap":{source:`iana`},"application/vnd.3gpp.pfcp":{source:`iana`},"application/vnd.3gpp.pic-bw-large":{source:`iana`,extensions:[`plb`]},"application/vnd.3gpp.pic-bw-small":{source:`iana`,extensions:[`psb`]},"application/vnd.3gpp.pic-bw-var":{source:`iana`,extensions:[`pvb`]},"application/vnd.3gpp.pinapp-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.s1ap":{source:`iana`},"application/vnd.3gpp.seal-group-doc+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-location-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-mbms-usage-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-network-qos-management-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-ue-config-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-unicast-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.seal-user-profile-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.sms":{source:`iana`},"application/vnd.3gpp.sms+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.ussd+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp.v2x":{source:`iana`},"application/vnd.3gpp.vae-info+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:`iana`,compressible:!0},"application/vnd.3gpp2.sms":{source:`iana`},"application/vnd.3gpp2.tcap":{source:`iana`,extensions:[`tcap`]},"application/vnd.3lightssoftware.imagescal":{source:`iana`},"application/vnd.3m.post-it-notes":{source:`iana`,extensions:[`pwn`]},"application/vnd.accpac.simply.aso":{source:`iana`,extensions:[`aso`]},"application/vnd.accpac.simply.imp":{source:`iana`,extensions:[`imp`]},"application/vnd.acm.addressxfer+json":{source:`iana`,compressible:!0},"application/vnd.acm.chatbot+json":{source:`iana`,compressible:!0},"application/vnd.acucobol":{source:`iana`,extensions:[`acu`]},"application/vnd.acucorp":{source:`iana`,extensions:[`atc`,`acutc`]},"application/vnd.adobe.air-application-installer-package+zip":{source:`apache`,compressible:!1,extensions:[`air`]},"application/vnd.adobe.flash.movie":{source:`iana`},"application/vnd.adobe.formscentral.fcdt":{source:`iana`,extensions:[`fcdt`]},"application/vnd.adobe.fxp":{source:`iana`,extensions:[`fxp`,`fxpl`]},"application/vnd.adobe.partial-upload":{source:`iana`},"application/vnd.adobe.xdp+xml":{source:`iana`,compressible:!0,extensions:[`xdp`]},"application/vnd.adobe.xfdf":{source:`apache`,extensions:[`xfdf`]},"application/vnd.aether.imp":{source:`iana`},"application/vnd.afpc.afplinedata":{source:`iana`},"application/vnd.afpc.afplinedata-pagedef":{source:`iana`},"application/vnd.afpc.cmoca-cmresource":{source:`iana`},"application/vnd.afpc.foca-charset":{source:`iana`},"application/vnd.afpc.foca-codedfont":{source:`iana`},"application/vnd.afpc.foca-codepage":{source:`iana`},"application/vnd.afpc.modca":{source:`iana`},"application/vnd.afpc.modca-cmtable":{source:`iana`},"application/vnd.afpc.modca-formdef":{source:`iana`},"application/vnd.afpc.modca-mediummap":{source:`iana`},"application/vnd.afpc.modca-objectcontainer":{source:`iana`},"application/vnd.afpc.modca-overlay":{source:`iana`},"application/vnd.afpc.modca-pagesegment":{source:`iana`},"application/vnd.age":{source:`iana`,extensions:[`age`]},"application/vnd.ah-barcode":{source:`apache`},"application/vnd.ahead.space":{source:`iana`,extensions:[`ahead`]},"application/vnd.airzip.filesecure.azf":{source:`iana`,extensions:[`azf`]},"application/vnd.airzip.filesecure.azs":{source:`iana`,extensions:[`azs`]},"application/vnd.amadeus+json":{source:`iana`,compressible:!0},"application/vnd.amazon.ebook":{source:`apache`,extensions:[`azw`]},"application/vnd.amazon.mobi8-ebook":{source:`iana`},"application/vnd.americandynamics.acc":{source:`iana`,extensions:[`acc`]},"application/vnd.amiga.ami":{source:`iana`,extensions:[`ami`]},"application/vnd.amundsen.maze+xml":{source:`iana`,compressible:!0},"application/vnd.android.ota":{source:`iana`},"application/vnd.android.package-archive":{source:`apache`,compressible:!1,extensions:[`apk`]},"application/vnd.anki":{source:`iana`},"application/vnd.anser-web-certificate-issue-initiation":{source:`iana`,extensions:[`cii`]},"application/vnd.anser-web-funds-transfer-initiation":{source:`apache`,extensions:[`fti`]},"application/vnd.antix.game-component":{source:`iana`,extensions:[`atx`]},"application/vnd.apache.arrow.file":{source:`iana`},"application/vnd.apache.arrow.stream":{source:`iana`},"application/vnd.apache.parquet":{source:`iana`},"application/vnd.apache.thrift.binary":{source:`iana`},"application/vnd.apache.thrift.compact":{source:`iana`},"application/vnd.apache.thrift.json":{source:`iana`},"application/vnd.apexlang":{source:`iana`},"application/vnd.api+json":{source:`iana`,compressible:!0},"application/vnd.aplextor.warrp+json":{source:`iana`,compressible:!0},"application/vnd.apothekende.reservation+json":{source:`iana`,compressible:!0},"application/vnd.apple.installer+xml":{source:`iana`,compressible:!0,extensions:[`mpkg`]},"application/vnd.apple.keynote":{source:`iana`,extensions:[`key`]},"application/vnd.apple.mpegurl":{source:`iana`,extensions:[`m3u8`]},"application/vnd.apple.numbers":{source:`iana`,extensions:[`numbers`]},"application/vnd.apple.pages":{source:`iana`,extensions:[`pages`]},"application/vnd.apple.pkpass":{compressible:!1,extensions:[`pkpass`]},"application/vnd.arastra.swi":{source:`apache`},"application/vnd.aristanetworks.swi":{source:`iana`,extensions:[`swi`]},"application/vnd.artisan+json":{source:`iana`,compressible:!0},"application/vnd.artsquare":{source:`iana`},"application/vnd.astraea-software.iota":{source:`iana`,extensions:[`iota`]},"application/vnd.audiograph":{source:`iana`,extensions:[`aep`]},"application/vnd.autodesk.fbx":{extensions:[`fbx`]},"application/vnd.autopackage":{source:`iana`},"application/vnd.avalon+json":{source:`iana`,compressible:!0},"application/vnd.avistar+xml":{source:`iana`,compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:`iana`,compressible:!0,extensions:[`bmml`]},"application/vnd.balsamiq.bmpr":{source:`iana`},"application/vnd.banana-accounting":{source:`iana`},"application/vnd.bbf.usp.error":{source:`iana`},"application/vnd.bbf.usp.msg":{source:`iana`},"application/vnd.bbf.usp.msg+json":{source:`iana`,compressible:!0},"application/vnd.bekitzur-stech+json":{source:`iana`,compressible:!0},"application/vnd.belightsoft.lhzd+zip":{source:`iana`,compressible:!1},"application/vnd.belightsoft.lhzl+zip":{source:`iana`,compressible:!1},"application/vnd.bint.med-content":{source:`iana`},"application/vnd.biopax.rdf+xml":{source:`iana`,compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:`iana`},"application/vnd.blueice.multipass":{source:`iana`,extensions:[`mpm`]},"application/vnd.bluetooth.ep.oob":{source:`iana`},"application/vnd.bluetooth.le.oob":{source:`iana`},"application/vnd.bmi":{source:`iana`,extensions:[`bmi`]},"application/vnd.bpf":{source:`iana`},"application/vnd.bpf3":{source:`iana`},"application/vnd.businessobjects":{source:`iana`,extensions:[`rep`]},"application/vnd.byu.uapi+json":{source:`iana`,compressible:!0},"application/vnd.bzip3":{source:`iana`},"application/vnd.c3voc.schedule+xml":{source:`iana`,compressible:!0},"application/vnd.cab-jscript":{source:`iana`},"application/vnd.canon-cpdl":{source:`iana`},"application/vnd.canon-lips":{source:`iana`},"application/vnd.capasystems-pg+json":{source:`iana`,compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:`iana`},"application/vnd.century-systems.tcp_stream":{source:`iana`},"application/vnd.chemdraw+xml":{source:`iana`,compressible:!0,extensions:[`cdxml`]},"application/vnd.chess-pgn":{source:`iana`},"application/vnd.chipnuts.karaoke-mmd":{source:`iana`,extensions:[`mmd`]},"application/vnd.ciedi":{source:`iana`},"application/vnd.cinderella":{source:`iana`,extensions:[`cdy`]},"application/vnd.cirpack.isdn-ext":{source:`iana`},"application/vnd.citationstyles.style+xml":{source:`iana`,compressible:!0,extensions:[`csl`]},"application/vnd.claymore":{source:`iana`,extensions:[`cla`]},"application/vnd.cloanto.rp9":{source:`iana`,extensions:[`rp9`]},"application/vnd.clonk.c4group":{source:`iana`,extensions:[`c4g`,`c4d`,`c4f`,`c4p`,`c4u`]},"application/vnd.cluetrust.cartomobile-config":{source:`iana`,extensions:[`c11amc`]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:`iana`,extensions:[`c11amz`]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{source:`iana`},"application/vnd.cncf.helm.chart.provenance.v1.prov":{source:`iana`},"application/vnd.cncf.helm.config.v1+json":{source:`iana`,compressible:!0},"application/vnd.coffeescript":{source:`iana`},"application/vnd.collabio.xodocuments.document":{source:`iana`},"application/vnd.collabio.xodocuments.document-template":{source:`iana`},"application/vnd.collabio.xodocuments.presentation":{source:`iana`},"application/vnd.collabio.xodocuments.presentation-template":{source:`iana`},"application/vnd.collabio.xodocuments.spreadsheet":{source:`iana`},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:`iana`},"application/vnd.collection+json":{source:`iana`,compressible:!0},"application/vnd.collection.doc+json":{source:`iana`,compressible:!0},"application/vnd.collection.next+json":{source:`iana`,compressible:!0},"application/vnd.comicbook+zip":{source:`iana`,compressible:!1},"application/vnd.comicbook-rar":{source:`iana`},"application/vnd.commerce-battelle":{source:`iana`},"application/vnd.commonspace":{source:`iana`,extensions:[`csp`]},"application/vnd.contact.cmsg":{source:`iana`,extensions:[`cdbcmsg`]},"application/vnd.coreos.ignition+json":{source:`iana`,compressible:!0},"application/vnd.cosmocaller":{source:`iana`,extensions:[`cmc`]},"application/vnd.crick.clicker":{source:`iana`,extensions:[`clkx`]},"application/vnd.crick.clicker.keyboard":{source:`iana`,extensions:[`clkk`]},"application/vnd.crick.clicker.palette":{source:`iana`,extensions:[`clkp`]},"application/vnd.crick.clicker.template":{source:`iana`,extensions:[`clkt`]},"application/vnd.crick.clicker.wordbank":{source:`iana`,extensions:[`clkw`]},"application/vnd.criticaltools.wbs+xml":{source:`iana`,compressible:!0,extensions:[`wbs`]},"application/vnd.cryptii.pipe+json":{source:`iana`,compressible:!0},"application/vnd.crypto-shade-file":{source:`iana`},"application/vnd.cryptomator.encrypted":{source:`iana`},"application/vnd.cryptomator.vault":{source:`iana`},"application/vnd.ctc-posml":{source:`iana`,extensions:[`pml`]},"application/vnd.ctct.ws+xml":{source:`iana`,compressible:!0},"application/vnd.cups-pdf":{source:`iana`},"application/vnd.cups-postscript":{source:`iana`},"application/vnd.cups-ppd":{source:`iana`,extensions:[`ppd`]},"application/vnd.cups-raster":{source:`iana`},"application/vnd.cups-raw":{source:`iana`},"application/vnd.curl":{source:`iana`},"application/vnd.curl.car":{source:`apache`,extensions:[`car`]},"application/vnd.curl.pcurl":{source:`apache`,extensions:[`pcurl`]},"application/vnd.cyan.dean.root+xml":{source:`iana`,compressible:!0},"application/vnd.cybank":{source:`iana`},"application/vnd.cyclonedx+json":{source:`iana`,compressible:!0},"application/vnd.cyclonedx+xml":{source:`iana`,compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:`iana`,compressible:!1},"application/vnd.d3m-dataset":{source:`iana`},"application/vnd.d3m-problem":{source:`iana`},"application/vnd.dart":{source:`iana`,compressible:!0,extensions:[`dart`]},"application/vnd.data-vision.rdz":{source:`iana`,extensions:[`rdz`]},"application/vnd.datalog":{source:`iana`},"application/vnd.datapackage+json":{source:`iana`,compressible:!0},"application/vnd.dataresource+json":{source:`iana`,compressible:!0},"application/vnd.dbf":{source:`iana`,extensions:[`dbf`]},"application/vnd.dcmp+xml":{source:`iana`,compressible:!0,extensions:[`dcmp`]},"application/vnd.debian.binary-package":{source:`iana`},"application/vnd.dece.data":{source:`iana`,extensions:[`uvf`,`uvvf`,`uvd`,`uvvd`]},"application/vnd.dece.ttml+xml":{source:`iana`,compressible:!0,extensions:[`uvt`,`uvvt`]},"application/vnd.dece.unspecified":{source:`iana`,extensions:[`uvx`,`uvvx`]},"application/vnd.dece.zip":{source:`iana`,extensions:[`uvz`,`uvvz`]},"application/vnd.denovo.fcselayout-link":{source:`iana`,extensions:[`fe_launch`]},"application/vnd.desmume.movie":{source:`iana`},"application/vnd.dir-bi.plate-dl-nosuffix":{source:`iana`},"application/vnd.dm.delegation+xml":{source:`iana`,compressible:!0},"application/vnd.dna":{source:`iana`,extensions:[`dna`]},"application/vnd.document+json":{source:`iana`,compressible:!0},"application/vnd.dolby.mlp":{source:`apache`,extensions:[`mlp`]},"application/vnd.dolby.mobile.1":{source:`iana`},"application/vnd.dolby.mobile.2":{source:`iana`},"application/vnd.doremir.scorecloud-binary-document":{source:`iana`},"application/vnd.dpgraph":{source:`iana`,extensions:[`dpg`]},"application/vnd.dreamfactory":{source:`iana`,extensions:[`dfac`]},"application/vnd.drive+json":{source:`iana`,compressible:!0},"application/vnd.ds-keypoint":{source:`apache`,extensions:[`kpxx`]},"application/vnd.dtg.local":{source:`iana`},"application/vnd.dtg.local.flash":{source:`iana`},"application/vnd.dtg.local.html":{source:`iana`},"application/vnd.dvb.ait":{source:`iana`,extensions:[`ait`]},"application/vnd.dvb.dvbisl+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.dvbj":{source:`iana`},"application/vnd.dvb.esgcontainer":{source:`iana`},"application/vnd.dvb.ipdcdftnotifaccess":{source:`iana`},"application/vnd.dvb.ipdcesgaccess":{source:`iana`},"application/vnd.dvb.ipdcesgaccess2":{source:`iana`},"application/vnd.dvb.ipdcesgpdd":{source:`iana`},"application/vnd.dvb.ipdcroaming":{source:`iana`},"application/vnd.dvb.iptv.alfec-base":{source:`iana`},"application/vnd.dvb.iptv.alfec-enhancement":{source:`iana`},"application/vnd.dvb.notif-aggregate-root+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-container+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.notif-init+xml":{source:`iana`,compressible:!0},"application/vnd.dvb.pfr":{source:`iana`},"application/vnd.dvb.service":{source:`iana`,extensions:[`svc`]},"application/vnd.dxr":{source:`iana`},"application/vnd.dynageo":{source:`iana`,extensions:[`geo`]},"application/vnd.dzr":{source:`iana`},"application/vnd.easykaraoke.cdgdownload":{source:`iana`},"application/vnd.ecdis-update":{source:`iana`},"application/vnd.ecip.rlp":{source:`iana`},"application/vnd.eclipse.ditto+json":{source:`iana`,compressible:!0},"application/vnd.ecowin.chart":{source:`iana`,extensions:[`mag`]},"application/vnd.ecowin.filerequest":{source:`iana`},"application/vnd.ecowin.fileupdate":{source:`iana`},"application/vnd.ecowin.series":{source:`iana`},"application/vnd.ecowin.seriesrequest":{source:`iana`},"application/vnd.ecowin.seriesupdate":{source:`iana`},"application/vnd.efi.img":{source:`iana`},"application/vnd.efi.iso":{source:`iana`},"application/vnd.eln+zip":{source:`iana`,compressible:!1},"application/vnd.emclient.accessrequest+xml":{source:`iana`,compressible:!0},"application/vnd.enliven":{source:`iana`,extensions:[`nml`]},"application/vnd.enphase.envoy":{source:`iana`},"application/vnd.eprints.data+xml":{source:`iana`,compressible:!0},"application/vnd.epson.esf":{source:`iana`,extensions:[`esf`]},"application/vnd.epson.msf":{source:`iana`,extensions:[`msf`]},"application/vnd.epson.quickanime":{source:`iana`,extensions:[`qam`]},"application/vnd.epson.salt":{source:`iana`,extensions:[`slt`]},"application/vnd.epson.ssf":{source:`iana`,extensions:[`ssf`]},"application/vnd.ericsson.quickcall":{source:`iana`},"application/vnd.erofs":{source:`iana`},"application/vnd.espass-espass+zip":{source:`iana`,compressible:!1},"application/vnd.eszigno3+xml":{source:`iana`,compressible:!0,extensions:[`es3`,`et3`]},"application/vnd.etsi.aoc+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.asic-e+zip":{source:`iana`,compressible:!1},"application/vnd.etsi.asic-s+zip":{source:`iana`,compressible:!1},"application/vnd.etsi.cug+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.mcid+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.mheg5":{source:`iana`},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.pstn+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.sci+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.simservs+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.timestamp-token":{source:`iana`},"application/vnd.etsi.tsl+xml":{source:`iana`,compressible:!0},"application/vnd.etsi.tsl.der":{source:`iana`},"application/vnd.eu.kasparian.car+json":{source:`iana`,compressible:!0},"application/vnd.eudora.data":{source:`iana`},"application/vnd.evolv.ecig.profile":{source:`iana`},"application/vnd.evolv.ecig.settings":{source:`iana`},"application/vnd.evolv.ecig.theme":{source:`iana`},"application/vnd.exstream-empower+zip":{source:`iana`,compressible:!1},"application/vnd.exstream-package":{source:`iana`},"application/vnd.ezpix-album":{source:`iana`,extensions:[`ez2`]},"application/vnd.ezpix-package":{source:`iana`,extensions:[`ez3`]},"application/vnd.f-secure.mobile":{source:`iana`},"application/vnd.familysearch.gedcom+zip":{source:`iana`,compressible:!1},"application/vnd.fastcopy-disk-image":{source:`iana`},"application/vnd.fdf":{source:`apache`,extensions:[`fdf`]},"application/vnd.fdsn.mseed":{source:`iana`,extensions:[`mseed`]},"application/vnd.fdsn.seed":{source:`iana`,extensions:[`seed`,`dataless`]},"application/vnd.fdsn.stationxml+xml":{source:`iana`,charset:`XML-BASED`,compressible:!0},"application/vnd.ffsns":{source:`iana`},"application/vnd.ficlab.flb+zip":{source:`iana`,compressible:!1},"application/vnd.filmit.zfc":{source:`iana`},"application/vnd.fints":{source:`iana`},"application/vnd.firemonkeys.cloudcell":{source:`iana`},"application/vnd.flographit":{source:`iana`,extensions:[`gph`]},"application/vnd.fluxtime.clip":{source:`iana`,extensions:[`ftc`]},"application/vnd.font-fontforge-sfd":{source:`iana`},"application/vnd.framemaker":{source:`iana`,extensions:[`fm`,`frame`,`maker`,`book`]},"application/vnd.freelog.comic":{source:`iana`},"application/vnd.frogans.fnc":{source:`apache`,extensions:[`fnc`]},"application/vnd.frogans.ltf":{source:`apache`,extensions:[`ltf`]},"application/vnd.fsc.weblaunch":{source:`iana`,extensions:[`fsc`]},"application/vnd.fujifilm.fb.docuworks":{source:`iana`},"application/vnd.fujifilm.fb.docuworks.binder":{source:`iana`},"application/vnd.fujifilm.fb.docuworks.container":{source:`iana`},"application/vnd.fujifilm.fb.jfi+xml":{source:`iana`,compressible:!0},"application/vnd.fujitsu.oasys":{source:`iana`,extensions:[`oas`]},"application/vnd.fujitsu.oasys2":{source:`iana`,extensions:[`oa2`]},"application/vnd.fujitsu.oasys3":{source:`iana`,extensions:[`oa3`]},"application/vnd.fujitsu.oasysgp":{source:`iana`,extensions:[`fg5`]},"application/vnd.fujitsu.oasysprs":{source:`iana`,extensions:[`bh2`]},"application/vnd.fujixerox.art-ex":{source:`iana`},"application/vnd.fujixerox.art4":{source:`iana`},"application/vnd.fujixerox.ddd":{source:`iana`,extensions:[`ddd`]},"application/vnd.fujixerox.docuworks":{source:`iana`,extensions:[`xdw`]},"application/vnd.fujixerox.docuworks.binder":{source:`iana`,extensions:[`xbd`]},"application/vnd.fujixerox.docuworks.container":{source:`iana`},"application/vnd.fujixerox.hbpl":{source:`iana`},"application/vnd.fut-misnet":{source:`iana`},"application/vnd.futoin+cbor":{source:`iana`},"application/vnd.futoin+json":{source:`iana`,compressible:!0},"application/vnd.fuzzysheet":{source:`iana`,extensions:[`fzs`]},"application/vnd.ga4gh.passport+jwt":{source:`iana`},"application/vnd.genomatix.tuxedo":{source:`iana`,extensions:[`txd`]},"application/vnd.genozip":{source:`iana`},"application/vnd.gentics.grd+json":{source:`iana`,compressible:!0},"application/vnd.gentoo.catmetadata+xml":{source:`iana`,compressible:!0},"application/vnd.gentoo.ebuild":{source:`iana`},"application/vnd.gentoo.eclass":{source:`iana`},"application/vnd.gentoo.gpkg":{source:`iana`},"application/vnd.gentoo.manifest":{source:`iana`},"application/vnd.gentoo.pkgmetadata+xml":{source:`iana`,compressible:!0},"application/vnd.gentoo.xpak":{source:`iana`},"application/vnd.geo+json":{source:`apache`,compressible:!0},"application/vnd.geocube+xml":{source:`apache`,compressible:!0},"application/vnd.geogebra.file":{source:`iana`,extensions:[`ggb`]},"application/vnd.geogebra.pinboard":{source:`iana`},"application/vnd.geogebra.slides":{source:`iana`,extensions:[`ggs`]},"application/vnd.geogebra.tool":{source:`iana`,extensions:[`ggt`]},"application/vnd.geometry-explorer":{source:`iana`,extensions:[`gex`,`gre`]},"application/vnd.geonext":{source:`iana`,extensions:[`gxt`]},"application/vnd.geoplan":{source:`iana`,extensions:[`g2w`]},"application/vnd.geospace":{source:`iana`,extensions:[`g3w`]},"application/vnd.gerber":{source:`iana`},"application/vnd.globalplatform.card-content-mgt":{source:`iana`},"application/vnd.globalplatform.card-content-mgt-response":{source:`iana`},"application/vnd.gmx":{source:`iana`,extensions:[`gmx`]},"application/vnd.gnu.taler.exchange+json":{source:`iana`,compressible:!0},"application/vnd.gnu.taler.merchant+json":{source:`iana`,compressible:!0},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{compressible:!1,extensions:[`gdoc`]},"application/vnd.google-apps.drawing":{compressible:!1,extensions:[`gdraw`]},"application/vnd.google-apps.drive-sdk":{compressible:!1},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{compressible:!1},"application/vnd.google-apps.form":{compressible:!1,extensions:[`gform`]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{compressible:!1,extensions:[`gjam`]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{compressible:!1,extensions:[`gmap`]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{compressible:!1,extensions:[`gslides`]},"application/vnd.google-apps.script":{compressible:!1,extensions:[`gscript`]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{compressible:!1,extensions:[`gsite`]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:[`gsheet`]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{source:`iana`,compressible:!0,extensions:[`kml`]},"application/vnd.google-earth.kmz":{source:`iana`,compressible:!1,extensions:[`kmz`]},"application/vnd.gov.sk.e-form+xml":{source:`apache`,compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:`iana`,compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:`iana`,compressible:!0,extensions:[`xdcf`]},"application/vnd.gpxsee.map+xml":{source:`iana`,compressible:!0},"application/vnd.grafeq":{source:`iana`,extensions:[`gqf`,`gqs`]},"application/vnd.gridmp":{source:`iana`},"application/vnd.groove-account":{source:`iana`,extensions:[`gac`]},"application/vnd.groove-help":{source:`iana`,extensions:[`ghf`]},"application/vnd.groove-identity-message":{source:`iana`,extensions:[`gim`]},"application/vnd.groove-injector":{source:`iana`,extensions:[`grv`]},"application/vnd.groove-tool-message":{source:`iana`,extensions:[`gtm`]},"application/vnd.groove-tool-template":{source:`iana`,extensions:[`tpl`]},"application/vnd.groove-vcard":{source:`iana`,extensions:[`vcg`]},"application/vnd.hal+json":{source:`iana`,compressible:!0},"application/vnd.hal+xml":{source:`iana`,compressible:!0,extensions:[`hal`]},"application/vnd.handheld-entertainment+xml":{source:`iana`,compressible:!0,extensions:[`zmm`]},"application/vnd.hbci":{source:`iana`,extensions:[`hbci`]},"application/vnd.hc+json":{source:`iana`,compressible:!0},"application/vnd.hcl-bireports":{source:`iana`},"application/vnd.hdt":{source:`iana`},"application/vnd.heroku+json":{source:`iana`,compressible:!0},"application/vnd.hhe.lesson-player":{source:`iana`,extensions:[`les`]},"application/vnd.hp-hpgl":{source:`iana`,extensions:[`hpgl`]},"application/vnd.hp-hpid":{source:`iana`,extensions:[`hpid`]},"application/vnd.hp-hps":{source:`iana`,extensions:[`hps`]},"application/vnd.hp-jlyt":{source:`iana`,extensions:[`jlt`]},"application/vnd.hp-pcl":{source:`iana`,extensions:[`pcl`]},"application/vnd.hp-pclxl":{source:`iana`,extensions:[`pclxl`]},"application/vnd.hsl":{source:`iana`},"application/vnd.httphone":{source:`iana`},"application/vnd.hydrostatix.sof-data":{source:`iana`,extensions:[`sfd-hdstx`]},"application/vnd.hyper+json":{source:`iana`,compressible:!0},"application/vnd.hyper-item+json":{source:`iana`,compressible:!0},"application/vnd.hyperdrive+json":{source:`iana`,compressible:!0},"application/vnd.hzn-3d-crossword":{source:`iana`},"application/vnd.ibm.afplinedata":{source:`apache`},"application/vnd.ibm.electronic-media":{source:`iana`},"application/vnd.ibm.minipay":{source:`iana`,extensions:[`mpy`]},"application/vnd.ibm.modcap":{source:`apache`,extensions:[`afp`,`listafp`,`list3820`]},"application/vnd.ibm.rights-management":{source:`iana`,extensions:[`irm`]},"application/vnd.ibm.secure-container":{source:`iana`,extensions:[`sc`]},"application/vnd.iccprofile":{source:`iana`,extensions:[`icc`,`icm`]},"application/vnd.ieee.1905":{source:`iana`},"application/vnd.igloader":{source:`iana`,extensions:[`igl`]},"application/vnd.imagemeter.folder+zip":{source:`iana`,compressible:!1},"application/vnd.imagemeter.image+zip":{source:`iana`,compressible:!1},"application/vnd.immervision-ivp":{source:`iana`,extensions:[`ivp`]},"application/vnd.immervision-ivu":{source:`iana`,extensions:[`ivu`]},"application/vnd.ims.imsccv1p1":{source:`iana`},"application/vnd.ims.imsccv1p2":{source:`iana`},"application/vnd.ims.imsccv1p3":{source:`iana`},"application/vnd.ims.lis.v2.result+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:`iana`,compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:`iana`,compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:`iana`,compressible:!0},"application/vnd.informix-visionary":{source:`apache`},"application/vnd.infotech.project":{source:`iana`},"application/vnd.infotech.project+xml":{source:`iana`,compressible:!0},"application/vnd.innopath.wamp.notification":{source:`iana`},"application/vnd.insors.igm":{source:`iana`,extensions:[`igm`]},"application/vnd.intercon.formnet":{source:`iana`,extensions:[`xpw`,`xpx`]},"application/vnd.intergeo":{source:`iana`,extensions:[`i2g`]},"application/vnd.intertrust.digibox":{source:`iana`},"application/vnd.intertrust.nncp":{source:`iana`},"application/vnd.intu.qbo":{source:`iana`,extensions:[`qbo`]},"application/vnd.intu.qfx":{source:`iana`,extensions:[`qfx`]},"application/vnd.ipfs.ipns-record":{source:`iana`},"application/vnd.ipld.car":{source:`iana`},"application/vnd.ipld.dag-cbor":{source:`iana`},"application/vnd.ipld.dag-json":{source:`iana`},"application/vnd.ipld.raw":{source:`iana`},"application/vnd.iptc.g2.catalogitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:`iana`,compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:`iana`,compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:`iana`,extensions:[`rcprofile`]},"application/vnd.irepository.package+xml":{source:`iana`,compressible:!0,extensions:[`irp`]},"application/vnd.is-xpr":{source:`iana`,extensions:[`xpr`]},"application/vnd.isac.fcs":{source:`iana`,extensions:[`fcs`]},"application/vnd.iso11783-10+zip":{source:`iana`,compressible:!1},"application/vnd.jam":{source:`iana`,extensions:[`jam`]},"application/vnd.japannet-directory-service":{source:`iana`},"application/vnd.japannet-jpnstore-wakeup":{source:`iana`},"application/vnd.japannet-payment-wakeup":{source:`iana`},"application/vnd.japannet-registration":{source:`iana`},"application/vnd.japannet-registration-wakeup":{source:`iana`},"application/vnd.japannet-setstore-wakeup":{source:`iana`},"application/vnd.japannet-verification":{source:`iana`},"application/vnd.japannet-verification-wakeup":{source:`iana`},"application/vnd.jcp.javame.midlet-rms":{source:`iana`,extensions:[`rms`]},"application/vnd.jisp":{source:`iana`,extensions:[`jisp`]},"application/vnd.joost.joda-archive":{source:`iana`,extensions:[`joda`]},"application/vnd.jsk.isdn-ngn":{source:`iana`},"application/vnd.kahootz":{source:`iana`,extensions:[`ktz`,`ktr`]},"application/vnd.kde.karbon":{source:`iana`,extensions:[`karbon`]},"application/vnd.kde.kchart":{source:`iana`,extensions:[`chrt`]},"application/vnd.kde.kformula":{source:`iana`,extensions:[`kfo`]},"application/vnd.kde.kivio":{source:`iana`,extensions:[`flw`]},"application/vnd.kde.kontour":{source:`iana`,extensions:[`kon`]},"application/vnd.kde.kpresenter":{source:`iana`,extensions:[`kpr`,`kpt`]},"application/vnd.kde.kspread":{source:`iana`,extensions:[`ksp`]},"application/vnd.kde.kword":{source:`iana`,extensions:[`kwd`,`kwt`]},"application/vnd.kdl":{source:`iana`},"application/vnd.kenameaapp":{source:`iana`,extensions:[`htke`]},"application/vnd.keyman.kmp+zip":{source:`iana`,compressible:!1},"application/vnd.keyman.kmx":{source:`iana`},"application/vnd.kidspiration":{source:`iana`,extensions:[`kia`]},"application/vnd.kinar":{source:`iana`,extensions:[`kne`,`knp`]},"application/vnd.koan":{source:`iana`,extensions:[`skp`,`skd`,`skt`,`skm`]},"application/vnd.kodak-descriptor":{source:`iana`,extensions:[`sse`]},"application/vnd.las":{source:`iana`},"application/vnd.las.las+json":{source:`iana`,compressible:!0},"application/vnd.las.las+xml":{source:`iana`,compressible:!0,extensions:[`lasxml`]},"application/vnd.laszip":{source:`iana`},"application/vnd.ldev.productlicensing":{source:`iana`},"application/vnd.leap+json":{source:`iana`,compressible:!0},"application/vnd.liberty-request+xml":{source:`iana`,compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:`iana`,extensions:[`lbd`]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:`iana`,compressible:!0,extensions:[`lbe`]},"application/vnd.logipipe.circuit+zip":{source:`iana`,compressible:!1},"application/vnd.loom":{source:`iana`},"application/vnd.lotus-1-2-3":{source:`iana`,extensions:[`123`]},"application/vnd.lotus-approach":{source:`iana`,extensions:[`apr`]},"application/vnd.lotus-freelance":{source:`iana`,extensions:[`pre`]},"application/vnd.lotus-notes":{source:`iana`,extensions:[`nsf`]},"application/vnd.lotus-organizer":{source:`iana`,extensions:[`org`]},"application/vnd.lotus-screencam":{source:`iana`,extensions:[`scm`]},"application/vnd.lotus-wordpro":{source:`iana`,extensions:[`lwp`]},"application/vnd.macports.portpkg":{source:`iana`,extensions:[`portpkg`]},"application/vnd.mapbox-vector-tile":{source:`iana`,extensions:[`mvt`]},"application/vnd.marlin.drm.actiontoken+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.license+xml":{source:`iana`,compressible:!0},"application/vnd.marlin.drm.mdcf":{source:`iana`},"application/vnd.mason+json":{source:`iana`,compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:`iana`,compressible:!1},"application/vnd.maxmind.maxmind-db":{source:`iana`},"application/vnd.mcd":{source:`iana`,extensions:[`mcd`]},"application/vnd.mdl":{source:`iana`},"application/vnd.mdl-mbsdf":{source:`iana`},"application/vnd.medcalcdata":{source:`iana`,extensions:[`mc1`]},"application/vnd.mediastation.cdkey":{source:`iana`,extensions:[`cdkey`]},"application/vnd.medicalholodeck.recordxr":{source:`iana`},"application/vnd.meridian-slingshot":{source:`iana`},"application/vnd.mermaid":{source:`iana`},"application/vnd.mfer":{source:`iana`,extensions:[`mwf`]},"application/vnd.mfmp":{source:`iana`,extensions:[`mfm`]},"application/vnd.micro+json":{source:`iana`,compressible:!0},"application/vnd.micrografx.flo":{source:`iana`,extensions:[`flo`]},"application/vnd.micrografx.igx":{source:`iana`,extensions:[`igx`]},"application/vnd.microsoft.portable-executable":{source:`iana`},"application/vnd.microsoft.windows.thumbnail-cache":{source:`iana`},"application/vnd.miele+json":{source:`iana`,compressible:!0},"application/vnd.mif":{source:`iana`,extensions:[`mif`]},"application/vnd.minisoft-hp3000-save":{source:`iana`},"application/vnd.mitsubishi.misty-guard.trustweb":{source:`iana`},"application/vnd.mobius.daf":{source:`iana`,extensions:[`daf`]},"application/vnd.mobius.dis":{source:`iana`,extensions:[`dis`]},"application/vnd.mobius.mbk":{source:`iana`,extensions:[`mbk`]},"application/vnd.mobius.mqy":{source:`iana`,extensions:[`mqy`]},"application/vnd.mobius.msl":{source:`iana`,extensions:[`msl`]},"application/vnd.mobius.plc":{source:`iana`,extensions:[`plc`]},"application/vnd.mobius.txf":{source:`iana`,extensions:[`txf`]},"application/vnd.modl":{source:`iana`},"application/vnd.mophun.application":{source:`iana`,extensions:[`mpn`]},"application/vnd.mophun.certificate":{source:`iana`,extensions:[`mpc`]},"application/vnd.motorola.flexsuite":{source:`iana`},"application/vnd.motorola.flexsuite.adsi":{source:`iana`},"application/vnd.motorola.flexsuite.fis":{source:`iana`},"application/vnd.motorola.flexsuite.gotap":{source:`iana`},"application/vnd.motorola.flexsuite.kmr":{source:`iana`},"application/vnd.motorola.flexsuite.ttc":{source:`iana`},"application/vnd.motorola.flexsuite.wem":{source:`iana`},"application/vnd.motorola.iprm":{source:`iana`},"application/vnd.mozilla.xul+xml":{source:`iana`,compressible:!0,extensions:[`xul`]},"application/vnd.ms-3mfdocument":{source:`iana`},"application/vnd.ms-artgalry":{source:`iana`,extensions:[`cil`]},"application/vnd.ms-asf":{source:`iana`},"application/vnd.ms-cab-compressed":{source:`iana`,extensions:[`cab`]},"application/vnd.ms-color.iccprofile":{source:`apache`},"application/vnd.ms-excel":{source:`iana`,compressible:!1,extensions:[`xls`,`xlm`,`xla`,`xlc`,`xlt`,`xlw`]},"application/vnd.ms-excel.addin.macroenabled.12":{source:`iana`,extensions:[`xlam`]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:`iana`,extensions:[`xlsb`]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:`iana`,extensions:[`xlsm`]},"application/vnd.ms-excel.template.macroenabled.12":{source:`iana`,extensions:[`xltm`]},"application/vnd.ms-fontobject":{source:`iana`,compressible:!0,extensions:[`eot`]},"application/vnd.ms-htmlhelp":{source:`iana`,extensions:[`chm`]},"application/vnd.ms-ims":{source:`iana`,extensions:[`ims`]},"application/vnd.ms-lrm":{source:`iana`,extensions:[`lrm`]},"application/vnd.ms-office.activex+xml":{source:`iana`,compressible:!0},"application/vnd.ms-officetheme":{source:`iana`,extensions:[`thmx`]},"application/vnd.ms-opentype":{source:`apache`,compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:[`msg`]},"application/vnd.ms-package.obfuscated-opentype":{source:`apache`},"application/vnd.ms-pki.seccat":{source:`apache`,extensions:[`cat`]},"application/vnd.ms-pki.stl":{source:`apache`,extensions:[`stl`]},"application/vnd.ms-playready.initiator+xml":{source:`iana`,compressible:!0},"application/vnd.ms-powerpoint":{source:`iana`,compressible:!1,extensions:[`ppt`,`pps`,`pot`]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:`iana`,extensions:[`ppam`]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:`iana`,extensions:[`pptm`]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:`iana`,extensions:[`sldm`]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:`iana`,extensions:[`ppsm`]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:`iana`,extensions:[`potm`]},"application/vnd.ms-printdevicecapabilities+xml":{source:`iana`,compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:`apache`,compressible:!0},"application/vnd.ms-printschematicket+xml":{source:`iana`,compressible:!0},"application/vnd.ms-project":{source:`iana`,extensions:[`mpp`,`mpt`]},"application/vnd.ms-tnef":{source:`iana`},"application/vnd.ms-visio.viewer":{extensions:[`vdx`]},"application/vnd.ms-windows.devicepairing":{source:`iana`},"application/vnd.ms-windows.nwprinting.oob":{source:`iana`},"application/vnd.ms-windows.printerpairing":{source:`iana`},"application/vnd.ms-windows.wsd.oob":{source:`iana`},"application/vnd.ms-wmdrm.lic-chlg-req":{source:`iana`},"application/vnd.ms-wmdrm.lic-resp":{source:`iana`},"application/vnd.ms-wmdrm.meter-chlg-req":{source:`iana`},"application/vnd.ms-wmdrm.meter-resp":{source:`iana`},"application/vnd.ms-word.document.macroenabled.12":{source:`iana`,extensions:[`docm`]},"application/vnd.ms-word.template.macroenabled.12":{source:`iana`,extensions:[`dotm`]},"application/vnd.ms-works":{source:`iana`,extensions:[`wps`,`wks`,`wcm`,`wdb`]},"application/vnd.ms-wpl":{source:`iana`,extensions:[`wpl`]},"application/vnd.ms-xpsdocument":{source:`iana`,compressible:!1,extensions:[`xps`]},"application/vnd.msa-disk-image":{source:`iana`},"application/vnd.mseq":{source:`iana`,extensions:[`mseq`]},"application/vnd.msgpack":{source:`iana`},"application/vnd.msign":{source:`iana`},"application/vnd.multiad.creator":{source:`iana`},"application/vnd.multiad.creator.cif":{source:`iana`},"application/vnd.music-niff":{source:`iana`},"application/vnd.musician":{source:`iana`,extensions:[`mus`]},"application/vnd.muvee.style":{source:`iana`,extensions:[`msty`]},"application/vnd.mynfc":{source:`iana`,extensions:[`taglet`]},"application/vnd.nacamar.ybrid+json":{source:`iana`,compressible:!0},"application/vnd.nato.bindingdataobject+cbor":{source:`iana`},"application/vnd.nato.bindingdataobject+json":{source:`iana`,compressible:!0},"application/vnd.nato.bindingdataobject+xml":{source:`iana`,compressible:!0,extensions:[`bdo`]},"application/vnd.nato.openxmlformats-package.iepd+zip":{source:`iana`,compressible:!1},"application/vnd.ncd.control":{source:`iana`},"application/vnd.ncd.reference":{source:`iana`},"application/vnd.nearst.inv+json":{source:`iana`,compressible:!0},"application/vnd.nebumind.line":{source:`iana`},"application/vnd.nervana":{source:`iana`},"application/vnd.netfpx":{source:`iana`},"application/vnd.neurolanguage.nlu":{source:`iana`,extensions:[`nlu`]},"application/vnd.nimn":{source:`iana`},"application/vnd.nintendo.nitro.rom":{source:`iana`},"application/vnd.nintendo.snes.rom":{source:`iana`},"application/vnd.nitf":{source:`iana`,extensions:[`ntf`,`nitf`]},"application/vnd.noblenet-directory":{source:`iana`,extensions:[`nnd`]},"application/vnd.noblenet-sealer":{source:`iana`,extensions:[`nns`]},"application/vnd.noblenet-web":{source:`iana`,extensions:[`nnw`]},"application/vnd.nokia.catalogs":{source:`iana`},"application/vnd.nokia.conml+wbxml":{source:`iana`},"application/vnd.nokia.conml+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:`iana`},"application/vnd.nokia.landmark+wbxml":{source:`iana`},"application/vnd.nokia.landmark+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:`iana`,compressible:!0,extensions:[`ac`]},"application/vnd.nokia.n-gage.data":{source:`iana`,extensions:[`ngdat`]},"application/vnd.nokia.n-gage.symbian.install":{source:`apache`,extensions:[`n-gage`]},"application/vnd.nokia.ncd":{source:`iana`},"application/vnd.nokia.pcd+wbxml":{source:`iana`},"application/vnd.nokia.pcd+xml":{source:`iana`,compressible:!0},"application/vnd.nokia.radio-preset":{source:`iana`,extensions:[`rpst`]},"application/vnd.nokia.radio-presets":{source:`iana`,extensions:[`rpss`]},"application/vnd.novadigm.edm":{source:`iana`,extensions:[`edm`]},"application/vnd.novadigm.edx":{source:`iana`,extensions:[`edx`]},"application/vnd.novadigm.ext":{source:`iana`,extensions:[`ext`]},"application/vnd.ntt-local.content-share":{source:`iana`},"application/vnd.ntt-local.file-transfer":{source:`iana`},"application/vnd.ntt-local.ogw_remote-access":{source:`iana`},"application/vnd.ntt-local.sip-ta_remote":{source:`iana`},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:`iana`},"application/vnd.oai.workflows":{source:`iana`},"application/vnd.oai.workflows+json":{source:`iana`,compressible:!0},"application/vnd.oai.workflows+yaml":{source:`iana`},"application/vnd.oasis.opendocument.base":{source:`iana`},"application/vnd.oasis.opendocument.chart":{source:`iana`,extensions:[`odc`]},"application/vnd.oasis.opendocument.chart-template":{source:`iana`,extensions:[`otc`]},"application/vnd.oasis.opendocument.database":{source:`apache`,extensions:[`odb`]},"application/vnd.oasis.opendocument.formula":{source:`iana`,extensions:[`odf`]},"application/vnd.oasis.opendocument.formula-template":{source:`iana`,extensions:[`odft`]},"application/vnd.oasis.opendocument.graphics":{source:`iana`,compressible:!1,extensions:[`odg`]},"application/vnd.oasis.opendocument.graphics-template":{source:`iana`,extensions:[`otg`]},"application/vnd.oasis.opendocument.image":{source:`iana`,extensions:[`odi`]},"application/vnd.oasis.opendocument.image-template":{source:`iana`,extensions:[`oti`]},"application/vnd.oasis.opendocument.presentation":{source:`iana`,compressible:!1,extensions:[`odp`]},"application/vnd.oasis.opendocument.presentation-template":{source:`iana`,extensions:[`otp`]},"application/vnd.oasis.opendocument.spreadsheet":{source:`iana`,compressible:!1,extensions:[`ods`]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:`iana`,extensions:[`ots`]},"application/vnd.oasis.opendocument.text":{source:`iana`,compressible:!1,extensions:[`odt`]},"application/vnd.oasis.opendocument.text-master":{source:`iana`,extensions:[`odm`]},"application/vnd.oasis.opendocument.text-master-template":{source:`iana`},"application/vnd.oasis.opendocument.text-template":{source:`iana`,extensions:[`ott`]},"application/vnd.oasis.opendocument.text-web":{source:`iana`,extensions:[`oth`]},"application/vnd.obn":{source:`iana`},"application/vnd.ocf+cbor":{source:`iana`},"application/vnd.oci.image.manifest.v1+json":{source:`iana`,compressible:!0},"application/vnd.oftn.l10n+json":{source:`iana`,compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:`iana`},"application/vnd.oipf.dae.svg+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.pae.gem":{source:`iana`},"application/vnd.oipf.spdiscovery+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.spdlist+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:`iana`,compressible:!0},"application/vnd.oipf.userprofile+xml":{source:`iana`,compressible:!0},"application/vnd.olpc-sugar":{source:`iana`,extensions:[`xo`]},"application/vnd.oma-scws-config":{source:`iana`},"application/vnd.oma-scws-http-request":{source:`iana`},"application/vnd.oma-scws-http-response":{source:`iana`},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:`apache`,compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.ltkm":{source:`iana`},"application/vnd.oma.bcast.notification+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:`iana`},"application/vnd.oma.bcast.sgboot":{source:`iana`},"application/vnd.oma.bcast.sgdd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.sgdu":{source:`iana`},"application/vnd.oma.bcast.simple-symbol-container":{source:`iana`},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:`apache`,compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:`iana`,compressible:!0},"application/vnd.oma.bcast.stkm":{source:`iana`},"application/vnd.oma.cab-address-book+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:`iana`,compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:`iana`,compressible:!0},"application/vnd.oma.dcd":{source:`iana`},"application/vnd.oma.dcdc":{source:`iana`},"application/vnd.oma.dd2+xml":{source:`iana`,compressible:!0,extensions:[`dd2`]},"application/vnd.oma.drm.risd+xml":{source:`iana`,compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:`iana`,compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:`iana`},"application/vnd.oma.lwm2m+json":{source:`iana`,compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:`iana`},"application/vnd.oma.pal+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.groups+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:`iana`,compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:`iana`,compressible:!0},"application/vnd.oma.push":{source:`iana`},"application/vnd.oma.scidm.messages+xml":{source:`iana`,compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:`iana`,compressible:!0},"application/vnd.omads-email+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omads-file+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omads-folder+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.omaloc-supl-init":{source:`iana`},"application/vnd.onepager":{source:`iana`},"application/vnd.onepagertamp":{source:`iana`},"application/vnd.onepagertamx":{source:`iana`},"application/vnd.onepagertat":{source:`iana`},"application/vnd.onepagertatp":{source:`iana`},"application/vnd.onepagertatx":{source:`iana`},"application/vnd.onvif.metadata":{source:`iana`},"application/vnd.openblox.game+xml":{source:`iana`,compressible:!0,extensions:[`obgx`]},"application/vnd.openblox.game-binary":{source:`iana`},"application/vnd.openeye.oeb":{source:`iana`},"application/vnd.openofficeorg.extension":{source:`apache`,extensions:[`oxt`]},"application/vnd.openstreetmap.data+xml":{source:`iana`,compressible:!0,extensions:[`osm`]},"application/vnd.opentimestamps.ots":{source:`iana`},"application/vnd.openvpi.dspx+json":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:`iana`,compressible:!1,extensions:[`pptx`]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:`iana`,extensions:[`sldx`]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:`iana`,extensions:[`ppsx`]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:`iana`,extensions:[`potx`]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:`iana`,compressible:!1,extensions:[`xlsx`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:`iana`,extensions:[`xltx`]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:`iana`},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:`iana`,compressible:!1,extensions:[`docx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:`iana`,extensions:[`dotx`]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:`iana`,compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:`iana`,compressible:!0},"application/vnd.oracle.resource+json":{source:`iana`,compressible:!0},"application/vnd.orange.indata":{source:`iana`},"application/vnd.osa.netdeploy":{source:`iana`},"application/vnd.osgeo.mapguide.package":{source:`iana`,extensions:[`mgp`]},"application/vnd.osgi.bundle":{source:`iana`},"application/vnd.osgi.dp":{source:`iana`,extensions:[`dp`]},"application/vnd.osgi.subsystem":{source:`iana`,extensions:[`esa`]},"application/vnd.otps.ct-kip+xml":{source:`iana`,compressible:!0},"application/vnd.oxli.countgraph":{source:`iana`},"application/vnd.pagerduty+json":{source:`iana`,compressible:!0},"application/vnd.palm":{source:`iana`,extensions:[`pdb`,`pqa`,`oprc`]},"application/vnd.panoply":{source:`iana`},"application/vnd.paos.xml":{source:`iana`},"application/vnd.patentdive":{source:`iana`},"application/vnd.patientecommsdoc":{source:`iana`},"application/vnd.pawaafile":{source:`iana`,extensions:[`paw`]},"application/vnd.pcos":{source:`iana`},"application/vnd.pg.format":{source:`iana`,extensions:[`str`]},"application/vnd.pg.osasli":{source:`iana`,extensions:[`ei6`]},"application/vnd.piaccess.application-licence":{source:`iana`},"application/vnd.picsel":{source:`iana`,extensions:[`efif`]},"application/vnd.pmi.widget":{source:`iana`,extensions:[`wg`]},"application/vnd.poc.group-advertisement+xml":{source:`iana`,compressible:!0},"application/vnd.pocketlearn":{source:`iana`,extensions:[`plf`]},"application/vnd.powerbuilder6":{source:`iana`,extensions:[`pbd`]},"application/vnd.powerbuilder6-s":{source:`iana`},"application/vnd.powerbuilder7":{source:`iana`},"application/vnd.powerbuilder7-s":{source:`iana`},"application/vnd.powerbuilder75":{source:`iana`},"application/vnd.powerbuilder75-s":{source:`iana`},"application/vnd.preminet":{source:`iana`},"application/vnd.previewsystems.box":{source:`iana`,extensions:[`box`]},"application/vnd.procrate.brushset":{extensions:[`brushset`]},"application/vnd.procreate.brush":{extensions:[`brush`]},"application/vnd.procreate.dream":{extensions:[`drm`]},"application/vnd.proteus.magazine":{source:`iana`,extensions:[`mgz`]},"application/vnd.psfs":{source:`iana`},"application/vnd.pt.mundusmundi":{source:`iana`},"application/vnd.publishare-delta-tree":{source:`iana`,extensions:[`qps`]},"application/vnd.pvi.ptid1":{source:`iana`,extensions:[`ptid`]},"application/vnd.pwg-multiplexed":{source:`iana`},"application/vnd.pwg-xhtml-print+xml":{source:`iana`,compressible:!0,extensions:[`xhtm`]},"application/vnd.qualcomm.brew-app-res":{source:`iana`},"application/vnd.quarantainenet":{source:`iana`},"application/vnd.quark.quarkxpress":{source:`iana`,extensions:[`qxd`,`qxt`,`qwd`,`qwt`,`qxl`,`qxb`]},"application/vnd.quobject-quoxdocument":{source:`iana`},"application/vnd.radisys.moml+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:`iana`,compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:`iana`,compressible:!0},"application/vnd.rainstor.data":{source:`iana`},"application/vnd.rapid":{source:`iana`},"application/vnd.rar":{source:`iana`,extensions:[`rar`]},"application/vnd.realvnc.bed":{source:`iana`,extensions:[`bed`]},"application/vnd.recordare.musicxml":{source:`iana`,extensions:[`mxl`]},"application/vnd.recordare.musicxml+xml":{source:`iana`,compressible:!0,extensions:[`musicxml`]},"application/vnd.relpipe":{source:`iana`},"application/vnd.renlearn.rlprint":{source:`iana`},"application/vnd.resilient.logic":{source:`iana`},"application/vnd.restful+json":{source:`iana`,compressible:!0},"application/vnd.rig.cryptonote":{source:`iana`,extensions:[`cryptonote`]},"application/vnd.rim.cod":{source:`apache`,extensions:[`cod`]},"application/vnd.rn-realmedia":{source:`apache`,extensions:[`rm`]},"application/vnd.rn-realmedia-vbr":{source:`apache`,extensions:[`rmvb`]},"application/vnd.route66.link66+xml":{source:`iana`,compressible:!0,extensions:[`link66`]},"application/vnd.rs-274x":{source:`iana`},"application/vnd.ruckus.download":{source:`iana`},"application/vnd.s3sms":{source:`iana`},"application/vnd.sailingtracker.track":{source:`iana`,extensions:[`st`]},"application/vnd.sar":{source:`iana`},"application/vnd.sbm.cid":{source:`iana`},"application/vnd.sbm.mid2":{source:`iana`},"application/vnd.scribus":{source:`iana`},"application/vnd.sealed.3df":{source:`iana`},"application/vnd.sealed.csf":{source:`iana`},"application/vnd.sealed.doc":{source:`iana`},"application/vnd.sealed.eml":{source:`iana`},"application/vnd.sealed.mht":{source:`iana`},"application/vnd.sealed.net":{source:`iana`},"application/vnd.sealed.ppt":{source:`iana`},"application/vnd.sealed.tiff":{source:`iana`},"application/vnd.sealed.xls":{source:`iana`},"application/vnd.sealedmedia.softseal.html":{source:`iana`},"application/vnd.sealedmedia.softseal.pdf":{source:`iana`},"application/vnd.seemail":{source:`iana`,extensions:[`see`]},"application/vnd.seis+json":{source:`iana`,compressible:!0},"application/vnd.sema":{source:`iana`,extensions:[`sema`]},"application/vnd.semd":{source:`iana`,extensions:[`semd`]},"application/vnd.semf":{source:`iana`,extensions:[`semf`]},"application/vnd.shade-save-file":{source:`iana`},"application/vnd.shana.informed.formdata":{source:`iana`,extensions:[`ifm`]},"application/vnd.shana.informed.formtemplate":{source:`iana`,extensions:[`itp`]},"application/vnd.shana.informed.interchange":{source:`iana`,extensions:[`iif`]},"application/vnd.shana.informed.package":{source:`iana`,extensions:[`ipk`]},"application/vnd.shootproof+json":{source:`iana`,compressible:!0},"application/vnd.shopkick+json":{source:`iana`,compressible:!0},"application/vnd.shp":{source:`iana`},"application/vnd.shx":{source:`iana`},"application/vnd.sigrok.session":{source:`iana`},"application/vnd.simtech-mindmapper":{source:`iana`,extensions:[`twd`,`twds`]},"application/vnd.siren+json":{source:`iana`,compressible:!0},"application/vnd.sketchometry":{source:`iana`},"application/vnd.smaf":{source:`iana`,extensions:[`mmf`]},"application/vnd.smart.notebook":{source:`iana`},"application/vnd.smart.teacher":{source:`iana`,extensions:[`teacher`]},"application/vnd.smintio.portals.archive":{source:`iana`},"application/vnd.snesdev-page-table":{source:`iana`},"application/vnd.software602.filler.form+xml":{source:`iana`,compressible:!0,extensions:[`fo`]},"application/vnd.software602.filler.form-xml-zip":{source:`iana`},"application/vnd.solent.sdkm+xml":{source:`iana`,compressible:!0,extensions:[`sdkm`,`sdkd`]},"application/vnd.spotfire.dxp":{source:`iana`,extensions:[`dxp`]},"application/vnd.spotfire.sfs":{source:`iana`,extensions:[`sfs`]},"application/vnd.sqlite3":{source:`iana`},"application/vnd.sss-cod":{source:`iana`},"application/vnd.sss-dtf":{source:`iana`},"application/vnd.sss-ntf":{source:`iana`},"application/vnd.stardivision.calc":{source:`apache`,extensions:[`sdc`]},"application/vnd.stardivision.draw":{source:`apache`,extensions:[`sda`]},"application/vnd.stardivision.impress":{source:`apache`,extensions:[`sdd`]},"application/vnd.stardivision.math":{source:`apache`,extensions:[`smf`]},"application/vnd.stardivision.writer":{source:`apache`,extensions:[`sdw`,`vor`]},"application/vnd.stardivision.writer-global":{source:`apache`,extensions:[`sgl`]},"application/vnd.stepmania.package":{source:`iana`,extensions:[`smzip`]},"application/vnd.stepmania.stepchart":{source:`iana`,extensions:[`sm`]},"application/vnd.street-stream":{source:`iana`},"application/vnd.sun.wadl+xml":{source:`iana`,compressible:!0,extensions:[`wadl`]},"application/vnd.sun.xml.calc":{source:`apache`,extensions:[`sxc`]},"application/vnd.sun.xml.calc.template":{source:`apache`,extensions:[`stc`]},"application/vnd.sun.xml.draw":{source:`apache`,extensions:[`sxd`]},"application/vnd.sun.xml.draw.template":{source:`apache`,extensions:[`std`]},"application/vnd.sun.xml.impress":{source:`apache`,extensions:[`sxi`]},"application/vnd.sun.xml.impress.template":{source:`apache`,extensions:[`sti`]},"application/vnd.sun.xml.math":{source:`apache`,extensions:[`sxm`]},"application/vnd.sun.xml.writer":{source:`apache`,extensions:[`sxw`]},"application/vnd.sun.xml.writer.global":{source:`apache`,extensions:[`sxg`]},"application/vnd.sun.xml.writer.template":{source:`apache`,extensions:[`stw`]},"application/vnd.sus-calendar":{source:`iana`,extensions:[`sus`,`susp`]},"application/vnd.svd":{source:`iana`,extensions:[`svd`]},"application/vnd.swiftview-ics":{source:`iana`},"application/vnd.sybyl.mol2":{source:`iana`},"application/vnd.sycle+xml":{source:`iana`,compressible:!0},"application/vnd.syft+json":{source:`iana`,compressible:!0},"application/vnd.symbian.install":{source:`apache`,extensions:[`sis`,`sisx`]},"application/vnd.syncml+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`xsm`]},"application/vnd.syncml.dm+wbxml":{source:`iana`,charset:`UTF-8`,extensions:[`bdm`]},"application/vnd.syncml.dm+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`xdm`]},"application/vnd.syncml.dm.notification":{source:`iana`},"application/vnd.syncml.dmddf+wbxml":{source:`iana`},"application/vnd.syncml.dmddf+xml":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`ddf`]},"application/vnd.syncml.dmtnds+wbxml":{source:`iana`},"application/vnd.syncml.dmtnds+xml":{source:`iana`,charset:`UTF-8`,compressible:!0},"application/vnd.syncml.ds.notification":{source:`iana`},"application/vnd.tableschema+json":{source:`iana`,compressible:!0},"application/vnd.tao.intent-module-archive":{source:`iana`,extensions:[`tao`]},"application/vnd.tcpdump.pcap":{source:`iana`,extensions:[`pcap`,`cap`,`dmp`]},"application/vnd.think-cell.ppttc+json":{source:`iana`,compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:`iana`,compressible:!0},"application/vnd.tml":{source:`iana`},"application/vnd.tmobile-livetv":{source:`iana`,extensions:[`tmo`]},"application/vnd.tri.onesource":{source:`iana`},"application/vnd.trid.tpt":{source:`iana`,extensions:[`tpt`]},"application/vnd.triscape.mxs":{source:`iana`,extensions:[`mxs`]},"application/vnd.trueapp":{source:`iana`,extensions:[`tra`]},"application/vnd.truedoc":{source:`iana`},"application/vnd.ubisoft.webplayer":{source:`iana`},"application/vnd.ufdl":{source:`iana`,extensions:[`ufd`,`ufdl`]},"application/vnd.uic.osdm+json":{source:`iana`,compressible:!0},"application/vnd.uiq.theme":{source:`iana`,extensions:[`utz`]},"application/vnd.umajin":{source:`iana`,extensions:[`umj`]},"application/vnd.unity":{source:`iana`,extensions:[`unityweb`]},"application/vnd.uoml+xml":{source:`iana`,compressible:!0,extensions:[`uoml`,`uo`]},"application/vnd.uplanet.alert":{source:`iana`},"application/vnd.uplanet.alert-wbxml":{source:`iana`},"application/vnd.uplanet.bearer-choice":{source:`iana`},"application/vnd.uplanet.bearer-choice-wbxml":{source:`iana`},"application/vnd.uplanet.cacheop":{source:`iana`},"application/vnd.uplanet.cacheop-wbxml":{source:`iana`},"application/vnd.uplanet.channel":{source:`iana`},"application/vnd.uplanet.channel-wbxml":{source:`iana`},"application/vnd.uplanet.list":{source:`iana`},"application/vnd.uplanet.list-wbxml":{source:`iana`},"application/vnd.uplanet.listcmd":{source:`iana`},"application/vnd.uplanet.listcmd-wbxml":{source:`iana`},"application/vnd.uplanet.signal":{source:`iana`},"application/vnd.uri-map":{source:`iana`},"application/vnd.valve.source.material":{source:`iana`},"application/vnd.vcx":{source:`iana`,extensions:[`vcx`]},"application/vnd.vd-study":{source:`iana`},"application/vnd.vectorworks":{source:`iana`},"application/vnd.vel+json":{source:`iana`,compressible:!0},"application/vnd.veraison.tsm-report+cbor":{source:`iana`},"application/vnd.veraison.tsm-report+json":{source:`iana`,compressible:!0},"application/vnd.verimatrix.vcas":{source:`iana`},"application/vnd.veritone.aion+json":{source:`iana`,compressible:!0},"application/vnd.veryant.thin":{source:`iana`},"application/vnd.ves.encrypted":{source:`iana`},"application/vnd.vidsoft.vidconference":{source:`iana`},"application/vnd.visio":{source:`iana`,extensions:[`vsd`,`vst`,`vss`,`vsw`,`vsdx`,`vtx`]},"application/vnd.visionary":{source:`iana`,extensions:[`vis`]},"application/vnd.vividence.scriptfile":{source:`iana`},"application/vnd.vocalshaper.vsp4":{source:`iana`},"application/vnd.vsf":{source:`iana`,extensions:[`vsf`]},"application/vnd.wap.sic":{source:`iana`},"application/vnd.wap.slc":{source:`iana`},"application/vnd.wap.wbxml":{source:`iana`,charset:`UTF-8`,extensions:[`wbxml`]},"application/vnd.wap.wmlc":{source:`iana`,extensions:[`wmlc`]},"application/vnd.wap.wmlscriptc":{source:`iana`,extensions:[`wmlsc`]},"application/vnd.wasmflow.wafl":{source:`iana`},"application/vnd.webturbo":{source:`iana`,extensions:[`wtb`]},"application/vnd.wfa.dpp":{source:`iana`},"application/vnd.wfa.p2p":{source:`iana`},"application/vnd.wfa.wsc":{source:`iana`},"application/vnd.windows.devicepairing":{source:`iana`},"application/vnd.wmc":{source:`iana`},"application/vnd.wmf.bootstrap":{source:`iana`},"application/vnd.wolfram.mathematica":{source:`iana`},"application/vnd.wolfram.mathematica.package":{source:`iana`},"application/vnd.wolfram.player":{source:`iana`,extensions:[`nbp`]},"application/vnd.wordlift":{source:`iana`},"application/vnd.wordperfect":{source:`iana`,extensions:[`wpd`]},"application/vnd.wqd":{source:`iana`,extensions:[`wqd`]},"application/vnd.wrq-hp3000-labelled":{source:`iana`},"application/vnd.wt.stf":{source:`iana`,extensions:[`stf`]},"application/vnd.wv.csp+wbxml":{source:`iana`},"application/vnd.wv.csp+xml":{source:`iana`,compressible:!0},"application/vnd.wv.ssp+xml":{source:`iana`,compressible:!0},"application/vnd.xacml+json":{source:`iana`,compressible:!0},"application/vnd.xara":{source:`iana`,extensions:[`xar`]},"application/vnd.xarin.cpj":{source:`iana`},"application/vnd.xecrets-encrypted":{source:`iana`},"application/vnd.xfdl":{source:`iana`,extensions:[`xfdl`]},"application/vnd.xfdl.webform":{source:`iana`},"application/vnd.xmi+xml":{source:`iana`,compressible:!0},"application/vnd.xmpie.cpkg":{source:`iana`},"application/vnd.xmpie.dpkg":{source:`iana`},"application/vnd.xmpie.plan":{source:`iana`},"application/vnd.xmpie.ppkg":{source:`iana`},"application/vnd.xmpie.xlim":{source:`iana`},"application/vnd.yamaha.hv-dic":{source:`iana`,extensions:[`hvd`]},"application/vnd.yamaha.hv-script":{source:`iana`,extensions:[`hvs`]},"application/vnd.yamaha.hv-voice":{source:`iana`,extensions:[`hvp`]},"application/vnd.yamaha.openscoreformat":{source:`iana`,extensions:[`osf`]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:`iana`,compressible:!0,extensions:[`osfpvg`]},"application/vnd.yamaha.remote-setup":{source:`iana`},"application/vnd.yamaha.smaf-audio":{source:`iana`,extensions:[`saf`]},"application/vnd.yamaha.smaf-phrase":{source:`iana`,extensions:[`spf`]},"application/vnd.yamaha.through-ngn":{source:`iana`},"application/vnd.yamaha.tunnel-udpencap":{source:`iana`},"application/vnd.yaoweme":{source:`iana`},"application/vnd.yellowriver-custom-menu":{source:`iana`,extensions:[`cmp`]},"application/vnd.zul":{source:`iana`,extensions:[`zir`,`zirz`]},"application/vnd.zzazz.deck+xml":{source:`iana`,compressible:!0,extensions:[`zaz`]},"application/voicexml+xml":{source:`iana`,compressible:!0,extensions:[`vxml`]},"application/voucher-cms+json":{source:`iana`,compressible:!0},"application/voucher-jws+json":{source:`iana`,compressible:!0},"application/vp":{source:`iana`},"application/vp+cose":{source:`iana`},"application/vp+jwt":{source:`iana`},"application/vq-rtcpxr":{source:`iana`},"application/wasm":{source:`iana`,compressible:!0,extensions:[`wasm`]},"application/watcherinfo+xml":{source:`iana`,compressible:!0,extensions:[`wif`]},"application/webpush-options+json":{source:`iana`,compressible:!0},"application/whoispp-query":{source:`iana`},"application/whoispp-response":{source:`iana`},"application/widget":{source:`iana`,extensions:[`wgt`]},"application/winhlp":{source:`apache`,extensions:[`hlp`]},"application/wita":{source:`iana`},"application/wordperfect5.1":{source:`iana`},"application/wsdl+xml":{source:`iana`,compressible:!0,extensions:[`wsdl`]},"application/wspolicy+xml":{source:`iana`,compressible:!0,extensions:[`wspolicy`]},"application/x-7z-compressed":{source:`apache`,compressible:!1,extensions:[`7z`]},"application/x-abiword":{source:`apache`,extensions:[`abw`]},"application/x-ace-compressed":{source:`apache`,extensions:[`ace`]},"application/x-amf":{source:`apache`},"application/x-apple-diskimage":{source:`apache`,extensions:[`dmg`]},"application/x-arj":{compressible:!1,extensions:[`arj`]},"application/x-authorware-bin":{source:`apache`,extensions:[`aab`,`x32`,`u32`,`vox`]},"application/x-authorware-map":{source:`apache`,extensions:[`aam`]},"application/x-authorware-seg":{source:`apache`,extensions:[`aas`]},"application/x-bcpio":{source:`apache`,extensions:[`bcpio`]},"application/x-bdoc":{compressible:!1,extensions:[`bdoc`]},"application/x-bittorrent":{source:`apache`,extensions:[`torrent`]},"application/x-blender":{extensions:[`blend`]},"application/x-blorb":{source:`apache`,extensions:[`blb`,`blorb`]},"application/x-bzip":{source:`apache`,compressible:!1,extensions:[`bz`]},"application/x-bzip2":{source:`apache`,compressible:!1,extensions:[`bz2`,`boz`]},"application/x-cbr":{source:`apache`,extensions:[`cbr`,`cba`,`cbt`,`cbz`,`cb7`]},"application/x-cdlink":{source:`apache`,extensions:[`vcd`]},"application/x-cfs-compressed":{source:`apache`,extensions:[`cfs`]},"application/x-chat":{source:`apache`,extensions:[`chat`]},"application/x-chess-pgn":{source:`apache`,extensions:[`pgn`]},"application/x-chrome-extension":{extensions:[`crx`]},"application/x-cocoa":{source:`nginx`,extensions:[`cco`]},"application/x-compress":{source:`apache`},"application/x-compressed":{extensions:[`rar`]},"application/x-conference":{source:`apache`,extensions:[`nsc`]},"application/x-cpio":{source:`apache`,extensions:[`cpio`]},"application/x-csh":{source:`apache`,extensions:[`csh`]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:`apache`,extensions:[`deb`,`udeb`]},"application/x-dgc-compressed":{source:`apache`,extensions:[`dgc`]},"application/x-director":{source:`apache`,extensions:[`dir`,`dcr`,`dxr`,`cst`,`cct`,`cxt`,`w3d`,`fgd`,`swa`]},"application/x-doom":{source:`apache`,extensions:[`wad`]},"application/x-dtbncx+xml":{source:`apache`,compressible:!0,extensions:[`ncx`]},"application/x-dtbook+xml":{source:`apache`,compressible:!0,extensions:[`dtb`]},"application/x-dtbresource+xml":{source:`apache`,compressible:!0,extensions:[`res`]},"application/x-dvi":{source:`apache`,compressible:!1,extensions:[`dvi`]},"application/x-envoy":{source:`apache`,extensions:[`evy`]},"application/x-eva":{source:`apache`,extensions:[`eva`]},"application/x-font-bdf":{source:`apache`,extensions:[`bdf`]},"application/x-font-dos":{source:`apache`},"application/x-font-framemaker":{source:`apache`},"application/x-font-ghostscript":{source:`apache`,extensions:[`gsf`]},"application/x-font-libgrx":{source:`apache`},"application/x-font-linux-psf":{source:`apache`,extensions:[`psf`]},"application/x-font-pcf":{source:`apache`,extensions:[`pcf`]},"application/x-font-snf":{source:`apache`,extensions:[`snf`]},"application/x-font-speedo":{source:`apache`},"application/x-font-sunos-news":{source:`apache`},"application/x-font-type1":{source:`apache`,extensions:[`pfa`,`pfb`,`pfm`,`afm`]},"application/x-font-vfont":{source:`apache`},"application/x-freearc":{source:`apache`,extensions:[`arc`]},"application/x-futuresplash":{source:`apache`,extensions:[`spl`]},"application/x-gca-compressed":{source:`apache`,extensions:[`gca`]},"application/x-glulx":{source:`apache`,extensions:[`ulx`]},"application/x-gnumeric":{source:`apache`,extensions:[`gnumeric`]},"application/x-gramps-xml":{source:`apache`,extensions:[`gramps`]},"application/x-gtar":{source:`apache`,extensions:[`gtar`]},"application/x-gzip":{source:`apache`},"application/x-hdf":{source:`apache`,extensions:[`hdf`]},"application/x-httpd-php":{compressible:!0,extensions:[`php`]},"application/x-install-instructions":{source:`apache`,extensions:[`install`]},"application/x-ipynb+json":{compressible:!0,extensions:[`ipynb`]},"application/x-iso9660-image":{source:`apache`,extensions:[`iso`]},"application/x-iwork-keynote-sffkey":{extensions:[`key`]},"application/x-iwork-numbers-sffnumbers":{extensions:[`numbers`]},"application/x-iwork-pages-sffpages":{extensions:[`pages`]},"application/x-java-archive-diff":{source:`nginx`,extensions:[`jardiff`]},"application/x-java-jnlp-file":{source:`apache`,compressible:!1,extensions:[`jnlp`]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:[`kdbx`]},"application/x-latex":{source:`apache`,compressible:!1,extensions:[`latex`]},"application/x-lua-bytecode":{extensions:[`luac`]},"application/x-lzh-compressed":{source:`apache`,extensions:[`lzh`,`lha`]},"application/x-makeself":{source:`nginx`,extensions:[`run`]},"application/x-mie":{source:`apache`,extensions:[`mie`]},"application/x-mobipocket-ebook":{source:`apache`,extensions:[`prc`,`mobi`]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:`apache`,extensions:[`application`]},"application/x-ms-shortcut":{source:`apache`,extensions:[`lnk`]},"application/x-ms-wmd":{source:`apache`,extensions:[`wmd`]},"application/x-ms-wmz":{source:`apache`,extensions:[`wmz`]},"application/x-ms-xbap":{source:`apache`,extensions:[`xbap`]},"application/x-msaccess":{source:`apache`,extensions:[`mdb`]},"application/x-msbinder":{source:`apache`,extensions:[`obd`]},"application/x-mscardfile":{source:`apache`,extensions:[`crd`]},"application/x-msclip":{source:`apache`,extensions:[`clp`]},"application/x-msdos-program":{extensions:[`exe`]},"application/x-msdownload":{source:`apache`,extensions:[`exe`,`dll`,`com`,`bat`,`msi`]},"application/x-msmediaview":{source:`apache`,extensions:[`mvb`,`m13`,`m14`]},"application/x-msmetafile":{source:`apache`,extensions:[`wmf`,`wmz`,`emf`,`emz`]},"application/x-msmoney":{source:`apache`,extensions:[`mny`]},"application/x-mspublisher":{source:`apache`,extensions:[`pub`]},"application/x-msschedule":{source:`apache`,extensions:[`scd`]},"application/x-msterminal":{source:`apache`,extensions:[`trm`]},"application/x-mswrite":{source:`apache`,extensions:[`wri`]},"application/x-netcdf":{source:`apache`,extensions:[`nc`,`cdf`]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:[`pac`]},"application/x-nzb":{source:`apache`,extensions:[`nzb`]},"application/x-perl":{source:`nginx`,extensions:[`pl`,`pm`]},"application/x-pilot":{source:`nginx`,extensions:[`prc`,`pdb`]},"application/x-pkcs12":{source:`apache`,compressible:!1,extensions:[`p12`,`pfx`]},"application/x-pkcs7-certificates":{source:`apache`,extensions:[`p7b`,`spc`]},"application/x-pkcs7-certreqresp":{source:`apache`,extensions:[`p7r`]},"application/x-pki-message":{source:`iana`},"application/x-rar-compressed":{source:`apache`,compressible:!1,extensions:[`rar`]},"application/x-redhat-package-manager":{source:`nginx`,extensions:[`rpm`]},"application/x-research-info-systems":{source:`apache`,extensions:[`ris`]},"application/x-sea":{source:`nginx`,extensions:[`sea`]},"application/x-sh":{source:`apache`,compressible:!0,extensions:[`sh`]},"application/x-shar":{source:`apache`,extensions:[`shar`]},"application/x-shockwave-flash":{source:`apache`,compressible:!1,extensions:[`swf`]},"application/x-silverlight-app":{source:`apache`,extensions:[`xap`]},"application/x-sql":{source:`apache`,extensions:[`sql`]},"application/x-stuffit":{source:`apache`,compressible:!1,extensions:[`sit`]},"application/x-stuffitx":{source:`apache`,extensions:[`sitx`]},"application/x-subrip":{source:`apache`,extensions:[`srt`]},"application/x-sv4cpio":{source:`apache`,extensions:[`sv4cpio`]},"application/x-sv4crc":{source:`apache`,extensions:[`sv4crc`]},"application/x-t3vm-image":{source:`apache`,extensions:[`t3`]},"application/x-tads":{source:`apache`,extensions:[`gam`]},"application/x-tar":{source:`apache`,compressible:!0,extensions:[`tar`]},"application/x-tcl":{source:`apache`,extensions:[`tcl`,`tk`]},"application/x-tex":{source:`apache`,extensions:[`tex`]},"application/x-tex-tfm":{source:`apache`,extensions:[`tfm`]},"application/x-texinfo":{source:`apache`,extensions:[`texinfo`,`texi`]},"application/x-tgif":{source:`apache`,extensions:[`obj`]},"application/x-ustar":{source:`apache`,extensions:[`ustar`]},"application/x-virtualbox-hdd":{compressible:!0,extensions:[`hdd`]},"application/x-virtualbox-ova":{compressible:!0,extensions:[`ova`]},"application/x-virtualbox-ovf":{compressible:!0,extensions:[`ovf`]},"application/x-virtualbox-vbox":{compressible:!0,extensions:[`vbox`]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:[`vbox-extpack`]},"application/x-virtualbox-vdi":{compressible:!0,extensions:[`vdi`]},"application/x-virtualbox-vhd":{compressible:!0,extensions:[`vhd`]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:[`vmdk`]},"application/x-wais-source":{source:`apache`,extensions:[`src`]},"application/x-web-app-manifest+json":{compressible:!0,extensions:[`webapp`]},"application/x-www-form-urlencoded":{source:`iana`,compressible:!0},"application/x-x509-ca-cert":{source:`iana`,extensions:[`der`,`crt`,`pem`]},"application/x-x509-ca-ra-cert":{source:`iana`},"application/x-x509-next-ca-cert":{source:`iana`},"application/x-xfig":{source:`apache`,extensions:[`fig`]},"application/x-xliff+xml":{source:`apache`,compressible:!0,extensions:[`xlf`]},"application/x-xpinstall":{source:`apache`,compressible:!1,extensions:[`xpi`]},"application/x-xz":{source:`apache`,extensions:[`xz`]},"application/x-zip-compressed":{extensions:[`zip`]},"application/x-zmachine":{source:`apache`,extensions:[`z1`,`z2`,`z3`,`z4`,`z5`,`z6`,`z7`,`z8`]},"application/x400-bp":{source:`iana`},"application/xacml+xml":{source:`iana`,compressible:!0},"application/xaml+xml":{source:`apache`,compressible:!0,extensions:[`xaml`]},"application/xcap-att+xml":{source:`iana`,compressible:!0,extensions:[`xav`]},"application/xcap-caps+xml":{source:`iana`,compressible:!0,extensions:[`xca`]},"application/xcap-diff+xml":{source:`iana`,compressible:!0,extensions:[`xdf`]},"application/xcap-el+xml":{source:`iana`,compressible:!0,extensions:[`xel`]},"application/xcap-error+xml":{source:`iana`,compressible:!0},"application/xcap-ns+xml":{source:`iana`,compressible:!0,extensions:[`xns`]},"application/xcon-conference-info+xml":{source:`iana`,compressible:!0},"application/xcon-conference-info-diff+xml":{source:`iana`,compressible:!0},"application/xenc+xml":{source:`iana`,compressible:!0,extensions:[`xenc`]},"application/xfdf":{source:`iana`,extensions:[`xfdf`]},"application/xhtml+xml":{source:`iana`,compressible:!0,extensions:[`xhtml`,`xht`]},"application/xhtml-voice+xml":{source:`apache`,compressible:!0},"application/xliff+xml":{source:`iana`,compressible:!0,extensions:[`xlf`]},"application/xml":{source:`iana`,compressible:!0,extensions:[`xml`,`xsl`,`xsd`,`rng`]},"application/xml-dtd":{source:`iana`,compressible:!0,extensions:[`dtd`]},"application/xml-external-parsed-entity":{source:`iana`},"application/xml-patch+xml":{source:`iana`,compressible:!0},"application/xmpp+xml":{source:`iana`,compressible:!0},"application/xop+xml":{source:`iana`,compressible:!0,extensions:[`xop`]},"application/xproc+xml":{source:`apache`,compressible:!0,extensions:[`xpl`]},"application/xslt+xml":{source:`iana`,compressible:!0,extensions:[`xsl`,`xslt`]},"application/xspf+xml":{source:`apache`,compressible:!0,extensions:[`xspf`]},"application/xv+xml":{source:`iana`,compressible:!0,extensions:[`mxml`,`xhvml`,`xvml`,`xvm`]},"application/yaml":{source:`iana`},"application/yang":{source:`iana`,extensions:[`yang`]},"application/yang-data+cbor":{source:`iana`},"application/yang-data+json":{source:`iana`,compressible:!0},"application/yang-data+xml":{source:`iana`,compressible:!0},"application/yang-patch+json":{source:`iana`,compressible:!0},"application/yang-patch+xml":{source:`iana`,compressible:!0},"application/yang-sid+json":{source:`iana`,compressible:!0},"application/yin+xml":{source:`iana`,compressible:!0,extensions:[`yin`]},"application/zip":{source:`iana`,compressible:!1,extensions:[`zip`]},"application/zip+dotlottie":{extensions:[`lottie`]},"application/zlib":{source:`iana`},"application/zstd":{source:`iana`},"audio/1d-interleaved-parityfec":{source:`iana`},"audio/32kadpcm":{source:`iana`},"audio/3gpp":{source:`iana`,compressible:!1,extensions:[`3gpp`]},"audio/3gpp2":{source:`iana`},"audio/aac":{source:`iana`,extensions:[`adts`,`aac`]},"audio/ac3":{source:`iana`},"audio/adpcm":{source:`apache`,extensions:[`adp`]},"audio/amr":{source:`iana`,extensions:[`amr`]},"audio/amr-wb":{source:`iana`},"audio/amr-wb+":{source:`iana`},"audio/aptx":{source:`iana`},"audio/asc":{source:`iana`},"audio/atrac-advanced-lossless":{source:`iana`},"audio/atrac-x":{source:`iana`},"audio/atrac3":{source:`iana`},"audio/basic":{source:`iana`,compressible:!1,extensions:[`au`,`snd`]},"audio/bv16":{source:`iana`},"audio/bv32":{source:`iana`},"audio/clearmode":{source:`iana`},"audio/cn":{source:`iana`},"audio/dat12":{source:`iana`},"audio/dls":{source:`iana`},"audio/dsr-es201108":{source:`iana`},"audio/dsr-es202050":{source:`iana`},"audio/dsr-es202211":{source:`iana`},"audio/dsr-es202212":{source:`iana`},"audio/dv":{source:`iana`},"audio/dvi4":{source:`iana`},"audio/eac3":{source:`iana`},"audio/encaprtp":{source:`iana`},"audio/evrc":{source:`iana`},"audio/evrc-qcp":{source:`iana`},"audio/evrc0":{source:`iana`},"audio/evrc1":{source:`iana`},"audio/evrcb":{source:`iana`},"audio/evrcb0":{source:`iana`},"audio/evrcb1":{source:`iana`},"audio/evrcnw":{source:`iana`},"audio/evrcnw0":{source:`iana`},"audio/evrcnw1":{source:`iana`},"audio/evrcwb":{source:`iana`},"audio/evrcwb0":{source:`iana`},"audio/evrcwb1":{source:`iana`},"audio/evs":{source:`iana`},"audio/flac":{source:`iana`},"audio/flexfec":{source:`iana`},"audio/fwdred":{source:`iana`},"audio/g711-0":{source:`iana`},"audio/g719":{source:`iana`},"audio/g722":{source:`iana`},"audio/g7221":{source:`iana`},"audio/g723":{source:`iana`},"audio/g726-16":{source:`iana`},"audio/g726-24":{source:`iana`},"audio/g726-32":{source:`iana`},"audio/g726-40":{source:`iana`},"audio/g728":{source:`iana`},"audio/g729":{source:`iana`},"audio/g7291":{source:`iana`},"audio/g729d":{source:`iana`},"audio/g729e":{source:`iana`},"audio/gsm":{source:`iana`},"audio/gsm-efr":{source:`iana`},"audio/gsm-hr-08":{source:`iana`},"audio/ilbc":{source:`iana`},"audio/ip-mr_v2.5":{source:`iana`},"audio/isac":{source:`apache`},"audio/l16":{source:`iana`},"audio/l20":{source:`iana`},"audio/l24":{source:`iana`,compressible:!1},"audio/l8":{source:`iana`},"audio/lpc":{source:`iana`},"audio/matroska":{source:`iana`},"audio/melp":{source:`iana`},"audio/melp1200":{source:`iana`},"audio/melp2400":{source:`iana`},"audio/melp600":{source:`iana`},"audio/mhas":{source:`iana`},"audio/midi":{source:`apache`,extensions:[`mid`,`midi`,`kar`,`rmi`]},"audio/midi-clip":{source:`iana`},"audio/mobile-xmf":{source:`iana`,extensions:[`mxmf`]},"audio/mp3":{compressible:!1,extensions:[`mp3`]},"audio/mp4":{source:`iana`,compressible:!1,extensions:[`m4a`,`mp4a`,`m4b`]},"audio/mp4a-latm":{source:`iana`},"audio/mpa":{source:`iana`},"audio/mpa-robust":{source:`iana`},"audio/mpeg":{source:`iana`,compressible:!1,extensions:[`mpga`,`mp2`,`mp2a`,`mp3`,`m2a`,`m3a`]},"audio/mpeg4-generic":{source:`iana`},"audio/musepack":{source:`apache`},"audio/ogg":{source:`iana`,compressible:!1,extensions:[`oga`,`ogg`,`spx`,`opus`]},"audio/opus":{source:`iana`},"audio/parityfec":{source:`iana`},"audio/pcma":{source:`iana`},"audio/pcma-wb":{source:`iana`},"audio/pcmu":{source:`iana`},"audio/pcmu-wb":{source:`iana`},"audio/prs.sid":{source:`iana`},"audio/qcelp":{source:`iana`},"audio/raptorfec":{source:`iana`},"audio/red":{source:`iana`},"audio/rtp-enc-aescm128":{source:`iana`},"audio/rtp-midi":{source:`iana`},"audio/rtploopback":{source:`iana`},"audio/rtx":{source:`iana`},"audio/s3m":{source:`apache`,extensions:[`s3m`]},"audio/scip":{source:`iana`},"audio/silk":{source:`apache`,extensions:[`sil`]},"audio/smv":{source:`iana`},"audio/smv-qcp":{source:`iana`},"audio/smv0":{source:`iana`},"audio/sofa":{source:`iana`},"audio/sp-midi":{source:`iana`},"audio/speex":{source:`iana`},"audio/t140c":{source:`iana`},"audio/t38":{source:`iana`},"audio/telephone-event":{source:`iana`},"audio/tetra_acelp":{source:`iana`},"audio/tetra_acelp_bb":{source:`iana`},"audio/tone":{source:`iana`},"audio/tsvcis":{source:`iana`},"audio/uemclip":{source:`iana`},"audio/ulpfec":{source:`iana`},"audio/usac":{source:`iana`},"audio/vdvi":{source:`iana`},"audio/vmr-wb":{source:`iana`},"audio/vnd.3gpp.iufp":{source:`iana`},"audio/vnd.4sb":{source:`iana`},"audio/vnd.audiokoz":{source:`iana`},"audio/vnd.celp":{source:`iana`},"audio/vnd.cisco.nse":{source:`iana`},"audio/vnd.cmles.radio-events":{source:`iana`},"audio/vnd.cns.anp1":{source:`iana`},"audio/vnd.cns.inf1":{source:`iana`},"audio/vnd.dece.audio":{source:`iana`,extensions:[`uva`,`uvva`]},"audio/vnd.digital-winds":{source:`iana`,extensions:[`eol`]},"audio/vnd.dlna.adts":{source:`iana`},"audio/vnd.dolby.heaac.1":{source:`iana`},"audio/vnd.dolby.heaac.2":{source:`iana`},"audio/vnd.dolby.mlp":{source:`iana`},"audio/vnd.dolby.mps":{source:`iana`},"audio/vnd.dolby.pl2":{source:`iana`},"audio/vnd.dolby.pl2x":{source:`iana`},"audio/vnd.dolby.pl2z":{source:`iana`},"audio/vnd.dolby.pulse.1":{source:`iana`},"audio/vnd.dra":{source:`iana`,extensions:[`dra`]},"audio/vnd.dts":{source:`iana`,extensions:[`dts`]},"audio/vnd.dts.hd":{source:`iana`,extensions:[`dtshd`]},"audio/vnd.dts.uhd":{source:`iana`},"audio/vnd.dvb.file":{source:`iana`},"audio/vnd.everad.plj":{source:`iana`},"audio/vnd.hns.audio":{source:`iana`},"audio/vnd.lucent.voice":{source:`iana`,extensions:[`lvp`]},"audio/vnd.ms-playready.media.pya":{source:`iana`,extensions:[`pya`]},"audio/vnd.nokia.mobile-xmf":{source:`iana`},"audio/vnd.nortel.vbk":{source:`iana`},"audio/vnd.nuera.ecelp4800":{source:`iana`,extensions:[`ecelp4800`]},"audio/vnd.nuera.ecelp7470":{source:`iana`,extensions:[`ecelp7470`]},"audio/vnd.nuera.ecelp9600":{source:`iana`,extensions:[`ecelp9600`]},"audio/vnd.octel.sbc":{source:`iana`},"audio/vnd.presonus.multitrack":{source:`iana`},"audio/vnd.qcelp":{source:`apache`},"audio/vnd.rhetorex.32kadpcm":{source:`iana`},"audio/vnd.rip":{source:`iana`,extensions:[`rip`]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:`iana`},"audio/vnd.vmx.cvsd":{source:`iana`},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:`iana`,compressible:!1},"audio/vorbis-config":{source:`iana`},"audio/wav":{compressible:!1,extensions:[`wav`]},"audio/wave":{compressible:!1,extensions:[`wav`]},"audio/webm":{source:`apache`,compressible:!1,extensions:[`weba`]},"audio/x-aac":{source:`apache`,compressible:!1,extensions:[`aac`]},"audio/x-aiff":{source:`apache`,extensions:[`aif`,`aiff`,`aifc`]},"audio/x-caf":{source:`apache`,compressible:!1,extensions:[`caf`]},"audio/x-flac":{source:`apache`,extensions:[`flac`]},"audio/x-m4a":{source:`nginx`,extensions:[`m4a`]},"audio/x-matroska":{source:`apache`,extensions:[`mka`]},"audio/x-mpegurl":{source:`apache`,extensions:[`m3u`]},"audio/x-ms-wax":{source:`apache`,extensions:[`wax`]},"audio/x-ms-wma":{source:`apache`,extensions:[`wma`]},"audio/x-pn-realaudio":{source:`apache`,extensions:[`ram`,`ra`]},"audio/x-pn-realaudio-plugin":{source:`apache`,extensions:[`rmp`]},"audio/x-realaudio":{source:`nginx`,extensions:[`ra`]},"audio/x-tta":{source:`apache`},"audio/x-wav":{source:`apache`,extensions:[`wav`]},"audio/xm":{source:`apache`,extensions:[`xm`]},"chemical/x-cdx":{source:`apache`,extensions:[`cdx`]},"chemical/x-cif":{source:`apache`,extensions:[`cif`]},"chemical/x-cmdf":{source:`apache`,extensions:[`cmdf`]},"chemical/x-cml":{source:`apache`,extensions:[`cml`]},"chemical/x-csml":{source:`apache`,extensions:[`csml`]},"chemical/x-pdb":{source:`apache`},"chemical/x-xyz":{source:`apache`,extensions:[`xyz`]},"font/collection":{source:`iana`,extensions:[`ttc`]},"font/otf":{source:`iana`,compressible:!0,extensions:[`otf`]},"font/sfnt":{source:`iana`},"font/ttf":{source:`iana`,compressible:!0,extensions:[`ttf`]},"font/woff":{source:`iana`,extensions:[`woff`]},"font/woff2":{source:`iana`,extensions:[`woff2`]},"image/aces":{source:`iana`,extensions:[`exr`]},"image/apng":{source:`iana`,compressible:!1,extensions:[`apng`]},"image/avci":{source:`iana`,extensions:[`avci`]},"image/avcs":{source:`iana`,extensions:[`avcs`]},"image/avif":{source:`iana`,compressible:!1,extensions:[`avif`]},"image/bmp":{source:`iana`,compressible:!0,extensions:[`bmp`,`dib`]},"image/cgm":{source:`iana`,extensions:[`cgm`]},"image/dicom-rle":{source:`iana`,extensions:[`drle`]},"image/dpx":{source:`iana`,extensions:[`dpx`]},"image/emf":{source:`iana`,extensions:[`emf`]},"image/fits":{source:`iana`,extensions:[`fits`]},"image/g3fax":{source:`iana`,extensions:[`g3`]},"image/gif":{source:`iana`,compressible:!1,extensions:[`gif`]},"image/heic":{source:`iana`,extensions:[`heic`]},"image/heic-sequence":{source:`iana`,extensions:[`heics`]},"image/heif":{source:`iana`,extensions:[`heif`]},"image/heif-sequence":{source:`iana`,extensions:[`heifs`]},"image/hej2k":{source:`iana`,extensions:[`hej2`]},"image/ief":{source:`iana`,extensions:[`ief`]},"image/j2c":{source:`iana`},"image/jaii":{source:`iana`,extensions:[`jaii`]},"image/jais":{source:`iana`,extensions:[`jais`]},"image/jls":{source:`iana`,extensions:[`jls`]},"image/jp2":{source:`iana`,compressible:!1,extensions:[`jp2`,`jpg2`]},"image/jpeg":{source:`iana`,compressible:!1,extensions:[`jpg`,`jpeg`,`jpe`]},"image/jph":{source:`iana`,extensions:[`jph`]},"image/jphc":{source:`iana`,extensions:[`jhc`]},"image/jpm":{source:`iana`,compressible:!1,extensions:[`jpm`,`jpgm`]},"image/jpx":{source:`iana`,compressible:!1,extensions:[`jpx`,`jpf`]},"image/jxl":{source:`iana`,extensions:[`jxl`]},"image/jxr":{source:`iana`,extensions:[`jxr`]},"image/jxra":{source:`iana`,extensions:[`jxra`]},"image/jxrs":{source:`iana`,extensions:[`jxrs`]},"image/jxs":{source:`iana`,extensions:[`jxs`]},"image/jxsc":{source:`iana`,extensions:[`jxsc`]},"image/jxsi":{source:`iana`,extensions:[`jxsi`]},"image/jxss":{source:`iana`,extensions:[`jxss`]},"image/ktx":{source:`iana`,extensions:[`ktx`]},"image/ktx2":{source:`iana`,extensions:[`ktx2`]},"image/naplps":{source:`iana`},"image/pjpeg":{compressible:!1,extensions:[`jfif`]},"image/png":{source:`iana`,compressible:!1,extensions:[`png`]},"image/prs.btif":{source:`iana`,extensions:[`btif`,`btf`]},"image/prs.pti":{source:`iana`,extensions:[`pti`]},"image/pwg-raster":{source:`iana`},"image/sgi":{source:`apache`,extensions:[`sgi`]},"image/svg+xml":{source:`iana`,compressible:!0,extensions:[`svg`,`svgz`]},"image/t38":{source:`iana`,extensions:[`t38`]},"image/tiff":{source:`iana`,compressible:!1,extensions:[`tif`,`tiff`]},"image/tiff-fx":{source:`iana`,extensions:[`tfx`]},"image/vnd.adobe.photoshop":{source:`iana`,compressible:!0,extensions:[`psd`]},"image/vnd.airzip.accelerator.azv":{source:`iana`,extensions:[`azv`]},"image/vnd.clip":{source:`iana`},"image/vnd.cns.inf2":{source:`iana`},"image/vnd.dece.graphic":{source:`iana`,extensions:[`uvi`,`uvvi`,`uvg`,`uvvg`]},"image/vnd.djvu":{source:`iana`,extensions:[`djvu`,`djv`]},"image/vnd.dvb.subtitle":{source:`iana`,extensions:[`sub`]},"image/vnd.dwg":{source:`iana`,extensions:[`dwg`]},"image/vnd.dxf":{source:`iana`,extensions:[`dxf`]},"image/vnd.fastbidsheet":{source:`iana`,extensions:[`fbs`]},"image/vnd.fpx":{source:`iana`,extensions:[`fpx`]},"image/vnd.fst":{source:`iana`,extensions:[`fst`]},"image/vnd.fujixerox.edmics-mmr":{source:`iana`,extensions:[`mmr`]},"image/vnd.fujixerox.edmics-rlc":{source:`iana`,extensions:[`rlc`]},"image/vnd.globalgraphics.pgb":{source:`iana`},"image/vnd.microsoft.icon":{source:`iana`,compressible:!0,extensions:[`ico`]},"image/vnd.mix":{source:`iana`},"image/vnd.mozilla.apng":{source:`iana`},"image/vnd.ms-dds":{compressible:!0,extensions:[`dds`]},"image/vnd.ms-modi":{source:`iana`,extensions:[`mdi`]},"image/vnd.ms-photo":{source:`apache`,extensions:[`wdp`]},"image/vnd.net-fpx":{source:`iana`,extensions:[`npx`]},"image/vnd.pco.b16":{source:`iana`,extensions:[`b16`]},"image/vnd.radiance":{source:`iana`},"image/vnd.sealed.png":{source:`iana`},"image/vnd.sealedmedia.softseal.gif":{source:`iana`},"image/vnd.sealedmedia.softseal.jpg":{source:`iana`},"image/vnd.svf":{source:`iana`},"image/vnd.tencent.tap":{source:`iana`,extensions:[`tap`]},"image/vnd.valve.source.texture":{source:`iana`,extensions:[`vtf`]},"image/vnd.wap.wbmp":{source:`iana`,extensions:[`wbmp`]},"image/vnd.xiff":{source:`iana`,extensions:[`xif`]},"image/vnd.zbrush.pcx":{source:`iana`,extensions:[`pcx`]},"image/webp":{source:`iana`,extensions:[`webp`]},"image/wmf":{source:`iana`,extensions:[`wmf`]},"image/x-3ds":{source:`apache`,extensions:[`3ds`]},"image/x-adobe-dng":{extensions:[`dng`]},"image/x-cmu-raster":{source:`apache`,extensions:[`ras`]},"image/x-cmx":{source:`apache`,extensions:[`cmx`]},"image/x-emf":{source:`iana`},"image/x-freehand":{source:`apache`,extensions:[`fh`,`fhc`,`fh4`,`fh5`,`fh7`]},"image/x-icon":{source:`apache`,compressible:!0,extensions:[`ico`]},"image/x-jng":{source:`nginx`,extensions:[`jng`]},"image/x-mrsid-image":{source:`apache`,extensions:[`sid`]},"image/x-ms-bmp":{source:`nginx`,compressible:!0,extensions:[`bmp`]},"image/x-pcx":{source:`apache`,extensions:[`pcx`]},"image/x-pict":{source:`apache`,extensions:[`pic`,`pct`]},"image/x-portable-anymap":{source:`apache`,extensions:[`pnm`]},"image/x-portable-bitmap":{source:`apache`,extensions:[`pbm`]},"image/x-portable-graymap":{source:`apache`,extensions:[`pgm`]},"image/x-portable-pixmap":{source:`apache`,extensions:[`ppm`]},"image/x-rgb":{source:`apache`,extensions:[`rgb`]},"image/x-tga":{source:`apache`,extensions:[`tga`]},"image/x-wmf":{source:`iana`},"image/x-xbitmap":{source:`apache`,extensions:[`xbm`]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:`apache`,extensions:[`xpm`]},"image/x-xwindowdump":{source:`apache`,extensions:[`xwd`]},"message/bhttp":{source:`iana`},"message/cpim":{source:`iana`},"message/delivery-status":{source:`iana`},"message/disposition-notification":{source:`iana`,extensions:[`disposition-notification`]},"message/external-body":{source:`iana`},"message/feedback-report":{source:`iana`},"message/global":{source:`iana`,extensions:[`u8msg`]},"message/global-delivery-status":{source:`iana`,extensions:[`u8dsn`]},"message/global-disposition-notification":{source:`iana`,extensions:[`u8mdn`]},"message/global-headers":{source:`iana`,extensions:[`u8hdr`]},"message/http":{source:`iana`,compressible:!1},"message/imdn+xml":{source:`iana`,compressible:!0},"message/mls":{source:`iana`},"message/news":{source:`apache`},"message/ohttp-req":{source:`iana`},"message/ohttp-res":{source:`iana`},"message/partial":{source:`iana`,compressible:!1},"message/rfc822":{source:`iana`,compressible:!0,extensions:[`eml`,`mime`,`mht`,`mhtml`]},"message/s-http":{source:`apache`},"message/sip":{source:`iana`},"message/sipfrag":{source:`iana`},"message/tracking-status":{source:`iana`},"message/vnd.si.simp":{source:`apache`},"message/vnd.wfa.wsc":{source:`iana`,extensions:[`wsc`]},"model/3mf":{source:`iana`,extensions:[`3mf`]},"model/e57":{source:`iana`},"model/gltf+json":{source:`iana`,compressible:!0,extensions:[`gltf`]},"model/gltf-binary":{source:`iana`,compressible:!0,extensions:[`glb`]},"model/iges":{source:`iana`,compressible:!1,extensions:[`igs`,`iges`]},"model/jt":{source:`iana`,extensions:[`jt`]},"model/mesh":{source:`iana`,compressible:!1,extensions:[`msh`,`mesh`,`silo`]},"model/mtl":{source:`iana`,extensions:[`mtl`]},"model/obj":{source:`iana`,extensions:[`obj`]},"model/prc":{source:`iana`,extensions:[`prc`]},"model/step":{source:`iana`,extensions:[`step`,`stp`,`stpnc`,`p21`,`210`]},"model/step+xml":{source:`iana`,compressible:!0,extensions:[`stpx`]},"model/step+zip":{source:`iana`,compressible:!1,extensions:[`stpz`]},"model/step-xml+zip":{source:`iana`,compressible:!1,extensions:[`stpxz`]},"model/stl":{source:`iana`,extensions:[`stl`]},"model/u3d":{source:`iana`,extensions:[`u3d`]},"model/vnd.bary":{source:`iana`,extensions:[`bary`]},"model/vnd.cld":{source:`iana`,extensions:[`cld`]},"model/vnd.collada+xml":{source:`iana`,compressible:!0,extensions:[`dae`]},"model/vnd.dwf":{source:`iana`,extensions:[`dwf`]},"model/vnd.flatland.3dml":{source:`iana`},"model/vnd.gdl":{source:`iana`,extensions:[`gdl`]},"model/vnd.gs-gdl":{source:`apache`},"model/vnd.gs.gdl":{source:`iana`},"model/vnd.gtw":{source:`iana`,extensions:[`gtw`]},"model/vnd.moml+xml":{source:`iana`,compressible:!0},"model/vnd.mts":{source:`iana`,extensions:[`mts`]},"model/vnd.opengex":{source:`iana`,extensions:[`ogex`]},"model/vnd.parasolid.transmit.binary":{source:`iana`,extensions:[`x_b`]},"model/vnd.parasolid.transmit.text":{source:`iana`,extensions:[`x_t`]},"model/vnd.pytha.pyox":{source:`iana`,extensions:[`pyo`,`pyox`]},"model/vnd.rosette.annotated-data-model":{source:`iana`},"model/vnd.sap.vds":{source:`iana`,extensions:[`vds`]},"model/vnd.usda":{source:`iana`,extensions:[`usda`]},"model/vnd.usdz+zip":{source:`iana`,compressible:!1,extensions:[`usdz`]},"model/vnd.valve.source.compiled-map":{source:`iana`,extensions:[`bsp`]},"model/vnd.vtu":{source:`iana`,extensions:[`vtu`]},"model/vrml":{source:`iana`,compressible:!1,extensions:[`wrl`,`vrml`]},"model/x3d+binary":{source:`apache`,compressible:!1,extensions:[`x3db`,`x3dbz`]},"model/x3d+fastinfoset":{source:`iana`,extensions:[`x3db`]},"model/x3d+vrml":{source:`apache`,compressible:!1,extensions:[`x3dv`,`x3dvz`]},"model/x3d+xml":{source:`iana`,compressible:!0,extensions:[`x3d`,`x3dz`]},"model/x3d-vrml":{source:`iana`,extensions:[`x3dv`]},"multipart/alternative":{source:`iana`,compressible:!1},"multipart/appledouble":{source:`iana`},"multipart/byteranges":{source:`iana`},"multipart/digest":{source:`iana`},"multipart/encrypted":{source:`iana`,compressible:!1},"multipart/form-data":{source:`iana`,compressible:!1},"multipart/header-set":{source:`iana`},"multipart/mixed":{source:`iana`},"multipart/multilingual":{source:`iana`},"multipart/parallel":{source:`iana`},"multipart/related":{source:`iana`,compressible:!1},"multipart/report":{source:`iana`},"multipart/signed":{source:`iana`,compressible:!1},"multipart/vnd.bint.med-plus":{source:`iana`},"multipart/voice-message":{source:`iana`},"multipart/x-mixed-replace":{source:`iana`},"text/1d-interleaved-parityfec":{source:`iana`},"text/cache-manifest":{source:`iana`,compressible:!0,extensions:[`appcache`,`manifest`]},"text/calendar":{source:`iana`,extensions:[`ics`,`ifb`]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:[`coffee`,`litcoffee`]},"text/cql":{source:`iana`},"text/cql-expression":{source:`iana`},"text/cql-identifier":{source:`iana`},"text/css":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`css`]},"text/csv":{source:`iana`,compressible:!0,extensions:[`csv`]},"text/csv-schema":{source:`iana`},"text/directory":{source:`iana`},"text/dns":{source:`iana`},"text/ecmascript":{source:`apache`},"text/encaprtp":{source:`iana`},"text/enriched":{source:`iana`},"text/fhirpath":{source:`iana`},"text/flexfec":{source:`iana`},"text/fwdred":{source:`iana`},"text/gff3":{source:`iana`},"text/grammar-ref-list":{source:`iana`},"text/hl7v2":{source:`iana`},"text/html":{source:`iana`,compressible:!0,extensions:[`html`,`htm`,`shtml`]},"text/jade":{extensions:[`jade`]},"text/javascript":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`js`,`mjs`]},"text/jcr-cnd":{source:`iana`},"text/jsx":{compressible:!0,extensions:[`jsx`]},"text/less":{compressible:!0,extensions:[`less`]},"text/markdown":{source:`iana`,compressible:!0,extensions:[`md`,`markdown`]},"text/mathml":{source:`nginx`,extensions:[`mml`]},"text/mdx":{compressible:!0,extensions:[`mdx`]},"text/mizar":{source:`iana`},"text/n3":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`n3`]},"text/parameters":{source:`iana`,charset:`UTF-8`},"text/parityfec":{source:`iana`},"text/plain":{source:`iana`,compressible:!0,extensions:[`txt`,`text`,`conf`,`def`,`list`,`log`,`in`,`ini`]},"text/provenance-notation":{source:`iana`,charset:`UTF-8`},"text/prs.fallenstein.rst":{source:`iana`},"text/prs.lines.tag":{source:`iana`,extensions:[`dsc`]},"text/prs.prop.logic":{source:`iana`},"text/prs.texi":{source:`iana`},"text/raptorfec":{source:`iana`},"text/red":{source:`iana`},"text/rfc822-headers":{source:`iana`},"text/richtext":{source:`iana`,compressible:!0,extensions:[`rtx`]},"text/rtf":{source:`iana`,compressible:!0,extensions:[`rtf`]},"text/rtp-enc-aescm128":{source:`iana`},"text/rtploopback":{source:`iana`},"text/rtx":{source:`iana`},"text/sgml":{source:`iana`,extensions:[`sgml`,`sgm`]},"text/shaclc":{source:`iana`},"text/shex":{source:`iana`,extensions:[`shex`]},"text/slim":{extensions:[`slim`,`slm`]},"text/spdx":{source:`iana`,extensions:[`spdx`]},"text/strings":{source:`iana`},"text/stylus":{extensions:[`stylus`,`styl`]},"text/t140":{source:`iana`},"text/tab-separated-values":{source:`iana`,compressible:!0,extensions:[`tsv`]},"text/troff":{source:`iana`,extensions:[`t`,`tr`,`roff`,`man`,`me`,`ms`]},"text/turtle":{source:`iana`,charset:`UTF-8`,extensions:[`ttl`]},"text/ulpfec":{source:`iana`},"text/uri-list":{source:`iana`,compressible:!0,extensions:[`uri`,`uris`,`urls`]},"text/vcard":{source:`iana`,compressible:!0,extensions:[`vcard`]},"text/vnd.a":{source:`iana`},"text/vnd.abc":{source:`iana`},"text/vnd.ascii-art":{source:`iana`},"text/vnd.curl":{source:`iana`,extensions:[`curl`]},"text/vnd.curl.dcurl":{source:`apache`,extensions:[`dcurl`]},"text/vnd.curl.mcurl":{source:`apache`,extensions:[`mcurl`]},"text/vnd.curl.scurl":{source:`apache`,extensions:[`scurl`]},"text/vnd.debian.copyright":{source:`iana`,charset:`UTF-8`},"text/vnd.dmclientscript":{source:`iana`},"text/vnd.dvb.subtitle":{source:`iana`,extensions:[`sub`]},"text/vnd.esmertec.theme-descriptor":{source:`iana`,charset:`UTF-8`},"text/vnd.exchangeable":{source:`iana`},"text/vnd.familysearch.gedcom":{source:`iana`,extensions:[`ged`]},"text/vnd.ficlab.flt":{source:`iana`},"text/vnd.fly":{source:`iana`,extensions:[`fly`]},"text/vnd.fmi.flexstor":{source:`iana`,extensions:[`flx`]},"text/vnd.gml":{source:`iana`},"text/vnd.graphviz":{source:`iana`,extensions:[`gv`]},"text/vnd.hans":{source:`iana`},"text/vnd.hgl":{source:`iana`},"text/vnd.in3d.3dml":{source:`iana`,extensions:[`3dml`]},"text/vnd.in3d.spot":{source:`iana`,extensions:[`spot`]},"text/vnd.iptc.newsml":{source:`iana`},"text/vnd.iptc.nitf":{source:`iana`},"text/vnd.latex-z":{source:`iana`},"text/vnd.motorola.reflex":{source:`iana`},"text/vnd.ms-mediapackage":{source:`iana`},"text/vnd.net2phone.commcenter.command":{source:`iana`},"text/vnd.radisys.msml-basic-layout":{source:`iana`},"text/vnd.senx.warpscript":{source:`iana`},"text/vnd.si.uricatalogue":{source:`apache`},"text/vnd.sosi":{source:`iana`},"text/vnd.sun.j2me.app-descriptor":{source:`iana`,charset:`UTF-8`,extensions:[`jad`]},"text/vnd.trolltech.linguist":{source:`iana`,charset:`UTF-8`},"text/vnd.vcf":{source:`iana`},"text/vnd.wap.si":{source:`iana`},"text/vnd.wap.sl":{source:`iana`},"text/vnd.wap.wml":{source:`iana`,extensions:[`wml`]},"text/vnd.wap.wmlscript":{source:`iana`,extensions:[`wmls`]},"text/vnd.zoo.kcl":{source:`iana`},"text/vtt":{source:`iana`,charset:`UTF-8`,compressible:!0,extensions:[`vtt`]},"text/wgsl":{source:`iana`,extensions:[`wgsl`]},"text/x-asm":{source:`apache`,extensions:[`s`,`asm`]},"text/x-c":{source:`apache`,extensions:[`c`,`cc`,`cxx`,`cpp`,`h`,`hh`,`dic`]},"text/x-component":{source:`nginx`,extensions:[`htc`]},"text/x-fortran":{source:`apache`,extensions:[`f`,`for`,`f77`,`f90`]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:[`hbs`]},"text/x-java-source":{source:`apache`,extensions:[`java`]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:[`lua`]},"text/x-markdown":{compressible:!0,extensions:[`mkd`]},"text/x-nfo":{source:`apache`,extensions:[`nfo`]},"text/x-opml":{source:`apache`,extensions:[`opml`]},"text/x-org":{compressible:!0,extensions:[`org`]},"text/x-pascal":{source:`apache`,extensions:[`p`,`pas`]},"text/x-processing":{compressible:!0,extensions:[`pde`]},"text/x-sass":{extensions:[`sass`]},"text/x-scss":{extensions:[`scss`]},"text/x-setext":{source:`apache`,extensions:[`etx`]},"text/x-sfv":{source:`apache`,extensions:[`sfv`]},"text/x-suse-ymp":{compressible:!0,extensions:[`ymp`]},"text/x-uuencode":{source:`apache`,extensions:[`uu`]},"text/x-vcalendar":{source:`apache`,extensions:[`vcs`]},"text/x-vcard":{source:`apache`,extensions:[`vcf`]},"text/xml":{source:`iana`,compressible:!0,extensions:[`xml`]},"text/xml-external-parsed-entity":{source:`iana`},"text/yaml":{compressible:!0,extensions:[`yaml`,`yml`]},"video/1d-interleaved-parityfec":{source:`iana`},"video/3gpp":{source:`iana`,extensions:[`3gp`,`3gpp`]},"video/3gpp-tt":{source:`iana`},"video/3gpp2":{source:`iana`,extensions:[`3g2`]},"video/av1":{source:`iana`},"video/bmpeg":{source:`iana`},"video/bt656":{source:`iana`},"video/celb":{source:`iana`},"video/dv":{source:`iana`},"video/encaprtp":{source:`iana`},"video/evc":{source:`iana`},"video/ffv1":{source:`iana`},"video/flexfec":{source:`iana`},"video/h261":{source:`iana`,extensions:[`h261`]},"video/h263":{source:`iana`,extensions:[`h263`]},"video/h263-1998":{source:`iana`},"video/h263-2000":{source:`iana`},"video/h264":{source:`iana`,extensions:[`h264`]},"video/h264-rcdo":{source:`iana`},"video/h264-svc":{source:`iana`},"video/h265":{source:`iana`},"video/h266":{source:`iana`},"video/iso.segment":{source:`iana`,extensions:[`m4s`]},"video/jpeg":{source:`iana`,extensions:[`jpgv`]},"video/jpeg2000":{source:`iana`},"video/jpm":{source:`apache`,extensions:[`jpm`,`jpgm`]},"video/jxsv":{source:`iana`},"video/lottie+json":{source:`iana`,compressible:!0},"video/matroska":{source:`iana`},"video/matroska-3d":{source:`iana`},"video/mj2":{source:`iana`,extensions:[`mj2`,`mjp2`]},"video/mp1s":{source:`iana`},"video/mp2p":{source:`iana`},"video/mp2t":{source:`iana`,extensions:[`ts`,`m2t`,`m2ts`,`mts`]},"video/mp4":{source:`iana`,compressible:!1,extensions:[`mp4`,`mp4v`,`mpg4`]},"video/mp4v-es":{source:`iana`},"video/mpeg":{source:`iana`,compressible:!1,extensions:[`mpeg`,`mpg`,`mpe`,`m1v`,`m2v`]},"video/mpeg4-generic":{source:`iana`},"video/mpv":{source:`iana`},"video/nv":{source:`iana`},"video/ogg":{source:`iana`,compressible:!1,extensions:[`ogv`]},"video/parityfec":{source:`iana`},"video/pointer":{source:`iana`},"video/quicktime":{source:`iana`,compressible:!1,extensions:[`qt`,`mov`]},"video/raptorfec":{source:`iana`},"video/raw":{source:`iana`},"video/rtp-enc-aescm128":{source:`iana`},"video/rtploopback":{source:`iana`},"video/rtx":{source:`iana`},"video/scip":{source:`iana`},"video/smpte291":{source:`iana`},"video/smpte292m":{source:`iana`},"video/ulpfec":{source:`iana`},"video/vc1":{source:`iana`},"video/vc2":{source:`iana`},"video/vnd.cctv":{source:`iana`},"video/vnd.dece.hd":{source:`iana`,extensions:[`uvh`,`uvvh`]},"video/vnd.dece.mobile":{source:`iana`,extensions:[`uvm`,`uvvm`]},"video/vnd.dece.mp4":{source:`iana`},"video/vnd.dece.pd":{source:`iana`,extensions:[`uvp`,`uvvp`]},"video/vnd.dece.sd":{source:`iana`,extensions:[`uvs`,`uvvs`]},"video/vnd.dece.video":{source:`iana`,extensions:[`uvv`,`uvvv`]},"video/vnd.directv.mpeg":{source:`iana`},"video/vnd.directv.mpeg-tts":{source:`iana`},"video/vnd.dlna.mpeg-tts":{source:`iana`},"video/vnd.dvb.file":{source:`iana`,extensions:[`dvb`]},"video/vnd.fvt":{source:`iana`,extensions:[`fvt`]},"video/vnd.hns.video":{source:`iana`},"video/vnd.iptvforum.1dparityfec-1010":{source:`iana`},"video/vnd.iptvforum.1dparityfec-2005":{source:`iana`},"video/vnd.iptvforum.2dparityfec-1010":{source:`iana`},"video/vnd.iptvforum.2dparityfec-2005":{source:`iana`},"video/vnd.iptvforum.ttsavc":{source:`iana`},"video/vnd.iptvforum.ttsmpeg2":{source:`iana`},"video/vnd.motorola.video":{source:`iana`},"video/vnd.motorola.videop":{source:`iana`},"video/vnd.mpegurl":{source:`iana`,extensions:[`mxu`,`m4u`]},"video/vnd.ms-playready.media.pyv":{source:`iana`,extensions:[`pyv`]},"video/vnd.nokia.interleaved-multimedia":{source:`iana`},"video/vnd.nokia.mp4vr":{source:`iana`},"video/vnd.nokia.videovoip":{source:`iana`},"video/vnd.objectvideo":{source:`iana`},"video/vnd.planar":{source:`iana`},"video/vnd.radgamettools.bink":{source:`iana`},"video/vnd.radgamettools.smacker":{source:`apache`},"video/vnd.sealed.mpeg1":{source:`iana`},"video/vnd.sealed.mpeg4":{source:`iana`},"video/vnd.sealed.swf":{source:`iana`},"video/vnd.sealedmedia.softseal.mov":{source:`iana`},"video/vnd.uvvu.mp4":{source:`iana`,extensions:[`uvu`,`uvvu`]},"video/vnd.vivo":{source:`iana`,extensions:[`viv`]},"video/vnd.youtube.yt":{source:`iana`},"video/vp8":{source:`iana`},"video/vp9":{source:`iana`},"video/webm":{source:`apache`,compressible:!1,extensions:[`webm`]},"video/x-f4v":{source:`apache`,extensions:[`f4v`]},"video/x-fli":{source:`apache`,extensions:[`fli`]},"video/x-flv":{source:`apache`,compressible:!1,extensions:[`flv`]},"video/x-m4v":{source:`apache`,extensions:[`m4v`]},"video/x-matroska":{source:`apache`,compressible:!1,extensions:[`mkv`,`mk3d`,`mks`]},"video/x-mng":{source:`apache`,extensions:[`mng`]},"video/x-ms-asf":{source:`apache`,extensions:[`asf`,`asx`]},"video/x-ms-vob":{source:`apache`,extensions:[`vob`]},"video/x-ms-wm":{source:`apache`,extensions:[`wm`]},"video/x-ms-wmv":{source:`apache`,compressible:!1,extensions:[`wmv`]},"video/x-ms-wmx":{source:`apache`,extensions:[`wmx`]},"video/x-ms-wvx":{source:`apache`,extensions:[`wvx`]},"video/x-msvideo":{source:`apache`,extensions:[`avi`]},"video/x-sgi-movie":{source:`apache`,extensions:[`movie`]},"video/x-smv":{source:`apache`,extensions:[`smv`]},"x-conference/x-cooltalk":{source:`apache`,extensions:[`ice`]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}})),R_=/* @__PURE__ */ e.t(((e,t)=>{
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/
t.exports=L_()})),z_=/* @__PURE__ */ e.t(((e,t)=>{var n={"prs.":100,"x-":200,"x.":300,"vnd.":400,default:900},r={nginx:10,apache:20,iana:40,default:30},i={application:1,font:2,audio:2,video:3,default:0};t.exports=function(e,t=`default`){if(e===`application/octet-stream`)return 0;let[a,o]=e.split(`/`),s=n[o.replace(/(\.|x-).*/,`$1`)]||n.default,c=r[t]||r.default,l=i[a]||i.default,u=1-e.length/100;return s+c+l+u}})),B_=(/* @__PURE__ */ e.t((e=>{
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
var t=R_(),n=require("path").extname,r=z_(),i=/^\s*([^;\s]*)(?:;|\s|$)/,a=/^text\//i;e.charset=o,e.charsets={lookup:o},e.contentType=s,e.extension=c,e.extensions=Object.create(null),e.lookup=l,e.types=Object.create(null),e._extensionConflicts=[],u(e.extensions,e.types);function o(e){if(!e||typeof e!=`string`)return!1;var n=i.exec(e),r=n&&t[n[1].toLowerCase()];return r&&r.charset?r.charset:n&&a.test(n[1])?`UTF-8`:!1}function s(t){if(!t||typeof t!=`string`)return!1;var n=t.indexOf(`/`)===-1?e.lookup(t):t;if(!n)return!1;if(n.indexOf(`charset`)===-1){var r=e.charset(n);r&&(n+=`; charset=`+r.toLowerCase())}return n}function c(t){if(!t||typeof t!=`string`)return!1;var n=i.exec(t),r=n&&e.extensions[n[1].toLowerCase()];return!r||!r.length?!1:r[0]}function l(t){if(!t||typeof t!=`string`)return!1;var r=n(`x.`+t).toLowerCase().slice(1);return r&&e.types[r]||!1}function u(n,r){Object.keys(t).forEach(function(i){var a=t[i].extensions;if(a&&a.length){n[i]=a;for(var o=0;o<a.length;o++){var s=a[o];r[s]=d(s,r[s],i);let t=f(s,r[s],i);t!==r[s]&&e._extensionConflicts.push([s,t,r[s]])}}})}function d(e,n,i){return(n?r(n,t[n].source):0)>(i?r(i,t[i].source):0)?n:i}function f(n,r,i){var a=[`nginx`,`apache`,void 0,`iana`],o=r?a.indexOf(t[r].source):0,s=i?a.indexOf(t[i].source):0;return e.types[c]!==`application/octet-stream`&&(o>s||o===s&&e.types[c]?.slice(0,12)===`application/`)||o>s?r:i}})))();const V_=e=>({status:`initial`,title:`Upload your Storybook for sharing`}),H_=e=>({status:`pending`,title:`Uploading your Storybook for sharing`,output:`Starting upload`}),U_=e=>({status:`success`,title:`Storybook uploaded for sharing`}),W_=async e=>{let{paths:t=[],lengths:n=[]}=e.fileInfo??{};if(!e.share)throw Error(`Missing share context`);if(!t.includes(`index.html`))throw Error(`Missing index.html — cannot publish without an entry point`);let{formAction:r,formFields:i,keyPrefix:o}=e.share.target,s=new Map(n.map(({knownAs:e,contentLength:t})=>[e,t])),c=t=>{let n=(0,B_.contentType)(b.default.extname(t))||`application/octet-stream`;return{filePath:t,formAction:r,formFields:{...i,key:`${o}/${t}`,"Content-Type":n},contentType:n,fileKey:``,targetPath:t,localPath:b.default.join(e.sourceDir,t),contentLength:s.get(t)??0}},l=[],u,d=0;for(let e of t){let t=c(e);d+=t.contentLength,e===`index.html`?u=t:l.push(t)}let f=0,p=0,m=-1,h=a.g(t=>{p=Math.max(p,t);let n=f+p;n!==m&&(m=n,e.options.experimental_onTaskProgress?.({...e},{progress:n,total:d,unit:`bytes`}))},e.env.CHROMATIC_SHARE_PROGRESS_INTERVAL);await bl(e,l,h),f+=p,p=0,u&&await bl(e,[u],h)};function G_(e){return cd({name:`share`,title:V_(e).title,steps:[dd(H_),W_,dd(U_,!0)]})}const K_=[G_];function q_(e){return(e.options.junitReport?[I_]:[]).map(t=>t(e))}var J_=()=>(0,J.dedent)(q.default`
    ${i.t} {bold Build canceled}
    The build was canceled before it completed.
  `);function Y_(e,t,r=(/* @__PURE__ */ new Date()).toISOString()){let{flags:i,extraOptions:o,configuration:s,sessionId:c,pkg:l,packageJson:u}=e,{scripts:d={}}=u,f=n.Tt(l.bugs.email),p=n.Tt(l.docs),m=[t].flat(),{git:h,storybook:g,runtimeMetadata:_,exitCode:y,exitCodeKey:b,announcedBuild:x,build:S=x,buildCommand:C}=e,w=a.p({timestamp:r,sessionId:c,gitVersion:h?.version,gitBranch:h?.branch,gitSlug:h?.slug,fromCI:h?.fromCI,ciService:h?.ciService,nodePlatform:process?.platform,nodeVersion:process?.versions?.node,..._,packageName:l.name,packageVersion:l.version,...g?{storybook:g}:{},flags:i,...o&&{extraOptions:o},...s&&{configuration:s},...`options`in e&&e.options?.isLocalBuild?{isLocalBuild:e.options.isLocalBuild}:{},...`options`in e&&e.options?.buildScriptName?{buildScript:d[e.options.buildScriptName]}:{},...C&&{buildCommand:C},exitCode:y,exitCodeKey:b,errorType:m.map(e=>e.name).join(`
`),errorMessage:v.t(m[0].message.split(`
`)[0].trim()),...S&&{build:X_(S)}},`projectToken`,`reportToken`,`userToken`),T=m.map(e=>e.stack).filter(Boolean);return[m.map(e=>e.message).join(`
`),T.length>0?q.default`{dim → View the full ${(0,Y.default)(`stacktrace`,T.length)} below}\n`:``,(0,J.dedent)(q.default`
      If you need help, please chat with us at ${p} for the fastest response.
      You can also email the team at ${f} if chat is not an option.

      Please provide us with the above CLI output and the following info:
    `),q.default`{bold ${JSON.stringify(w,void 0,2)}}`,T.length>0?q.default`\n{dim ${T.join(`

`)}}`:``].join(`
`)}function X_({id:e,number:t,storybookUrl:n=void 0,webUrl:r=void 0}){return{id:e,number:t,...n&&{storybookUrl:n},...r&&{webUrl:r}}}function Z_({title:e},{error:t,response:r,statusCode:o}={}){let s=t?q.default`\n{dim → ${t.message||t.toString()}}`:``,c=r&&r.statusText?` ${r.statusText}`:``,l=o?q.default`\n{dim → Status: ${o}${c}}`:``;return(0,J.dedent)(q.default`
    ${i.t} {bold Failed to ${a.d(e)}}

    Could not connect to the Chromatic API. Check your internet connection or try again later.
    Service status updates are provided at ${n.Tt(`https://status.chromatic.com`)}
    ${s}${l}
  `)}const Q_=e=>`${e.charAt(0).toLowerCase()}${e.slice(1)}`;function $_({title:e},t){let r=(t.errors??[t]).filter(({message:e})=>e).map(({message:e,extensions:t})=>t&&t.code?`${t.code}: ${e}`:e),a=[...new Set(r)].map(e=>q.default`\n{dim → ${e}}`).join(``);return(0,J.dedent)(q.default`
    ${i.t} {bold Failed to ${Q_(e)}}

    Error communicating with the Chromatic API. Check if your Chromatic client is up-to-date.
    Service status updates are provided at ${n.Tt(`https://status.chromatic.com`)}
    ${a}
  `)}var ev=({options:e,buildLogFile:t})=>{let{buildScriptName:r}=e;return(0,J.dedent)(q.default`
    ${i.t} {bold Cannot run a build with no stories}

    Your statically built Storybook exposes no stories. This indicates a problem with your Storybook. Here's what to do:

    - Check the build log at {bold ${t}}
    - Run {bold npm run ${r}} or {bold yarn ${r}} yourself and make sure it outputs a valid Storybook by opening the generated {bold index.html} in your browser.
    - Make sure you haven't accidently ignored all stories. See ${n.Tt(`https://www.chromatic.com/docs/disable-snapshots/`)} for details.
  `)};function tv({runtimeErrors:e=[],runtimeWarnings:t=[]}){let n=[...e,...t].map(e=>e.message||e.toString()),r=[...e,...t].map(e=>e.stack).filter(Boolean),a=r.length>0?q.default`\n{dim → View the full ${(0,Y.default)(`stacktrace`,r.length)} below}`:``,o=e.length,s=t.length,c=[o&&(0,Y.default)(`runtime error`,o,!0),o&&s&&`and`,s&&(0,Y.default)(`warning`,s,!0)].filter(Boolean).join(` `),l=(0,J.dedent)(q.default`
      If you want to continue despite runtime errors, you can pass the
      {bold --allow-console-errors} flag, but this is not recommended.`),u=(0,J.dedent)(q.default`
    You should probably fix these warnings, but we'll continue anyway.`);return(0,J.dedent)(q.default`
    ${o?i.t:i.i} {bold Detected ${c} in your Storybook}
    ${n.join(`
`)}${a}

    This is usually a problem with your Storybook, not with Chromatic.
    Run your Storybook locally and check your browser console for errors.

    ${o?l:u}
    ${r.length>0?q.default`\n{dim ${r.join(`

`)}}`:``}
  `)}function nv({title:e},t){return[q.default`${i.t} {bold Failed to ${rv(e)}}`,t.message].join(`
`)}function rv(e){return`${e.charAt(0).toLowerCase()}${e.slice(1)}`}var iv=({pkg:e})=>(0,J.dedent)(q.default`
    {bold Chromatic CLI v${e.version}}
    {dim ${e.docs}}
  `),av=()=>(0,J.dedent)(q.default`
    ${i.i} {bold Skipping Chromatic build locally because --skip is enabled, but no project token was available, so no build was reported to Chromatic. This may leave the Chromatic GitHub checks pending.}
  `);async function ov(e,t){if(!e.share?.shareId)throw Error(`Missing share ID in context`);let{confirmStorybookShare:n}=await e.client.runQuery(`
  mutation ConfirmShare($shareId: ID!, $status: ShareStatus!) {
    confirmStorybookShare(shareId: $shareId, status: $status) {
      status
      daysToExpire
    }
  }
`,{shareId:e.share.shareId,status:t},{endpoint:`${e.env.CHROMATIC_INDEX_URL}/api`,headers:{Authorization:`Bearer ${e.options.userToken}`}});return n}async function sv(e){let{uploadStorybookShare:t}=await e.client.runQuery(`
  mutation UploadShareMutation {
    uploadStorybookShare {
      shareId
      shareUrl
      target {
        formAction
        formFields
        keyPrefix
      }
    }
  }
`,{},{endpoint:`${e.env.CHROMATIC_INDEX_URL}/api`,headers:{Authorization:`Bearer ${e.options.userToken}`}});return t}async function cv(e){let{onUrl:t,onError:n}=e,r;try{r=await dv(e)}catch(e){if(n)return n(e),{shareUrl:``};throw e}try{r.share=await sv(r),r.git={branch:``,commit:``,committedAt:0,fromCI:!1},t?.(r.share.shareUrl);let e=await lv(r);return{shareUrl:r.share.shareUrl,daysToExpire:e}}catch(e){if(n)return n(e),{shareUrl:r.share?.shareUrl??``};throw e}}async function lv(e){let t=`complete`,n;try{await fv(e)}catch(r){t=e.options.experimental_abortSignal?.aborted?`cancelled`:`error`,n=r}let r=await uv(e,t);if(n)throw n;return r}async function uv(e,t){try{let{daysToExpire:n}=await ov(e,t);return n}catch(n){e.log.warn(`Failed to confirm share status (${t}): ${n.message}`);return}}async function dv(e){let{userToken:r,onProgress:i,abortSignal:o,logFile:c}=e,l={userToken:r,...o&&{experimental_abortSignal:o},...i&&{experimental_onTaskProgress:(e,t)=>{i(t.progress,t.total)}}},u={...ac([]),extraOptions:l},d=a.t(u.flags,l),f=await t.u({cwd:process.cwd(),normalize:!1});if(!f)throw Error(`No package.json found`);let{path:p,packageJson:m}=f,h={...u,flags:{...u.flags,interactive:!1},packagePath:p,packageJson:m,env:s.u(),log:d,sessionId:wr()};h=await kr(h);let g=h;return g.options=n.bt(h),g.options.logFile=c,g.log.setSecrets(a.a(g)),g.log.setLogFile(g.options.logFile),g.runtime={forceRebuild:g.options.forceRebuild},g}async function fv(e){let t={log:e.log,renderer:rc};try{await Sf(e),await Zm(e),await new Er.default(K_.map(t=>t(e)),t).run(e),e.log.debug(`Tasks completed`)}finally{e.log.flush()}}async function pv({argv:e=[],flags:n,options:r}){let i={...ac(e),...n&&{flags:n},...r&&{extraOptions:r}},{sessionId:o=wr(),env:c=s.u(),log:l=a.t(i.flags,i.extraOptions)}=r||{};Bs(l,i.pkg.engines?.node);let u=await t.u({cwd:process.cwd(),normalize:!1});u||(l.error(t.t()),process.exit(253));let{path:d,packageJson:f}=u,p={...i,packagePath:d,packageJson:f,env:c,log:l,sessionId:o};return await mv(p),Qs(p)}async function mv(e){let t=t=>{e.log.info(``),e.log.error(Y_(e,[t].flat())),e.extraOptions?.experimental_onTaskError?.(e,{formattedError:Y_(e,[t].flat()),originalError:t}),l.r(e,l.n.INVALID_OPTIONS,!0)},r;try{e=await kr(e,e.extraOptions?.configFile||e.flags.configFile);let t=n.xt(e);if(t.interactive?(Ku(e),e.log.file(iv(e))):e.log.info(iv(e)),await yv(e,t)){e.log.warn(av()),l.r(e,l.n.OK);return}r=e,r.options=n.bt(r,t),r.runtime={forceRebuild:r.options.forceRebuild},r.log.setSecrets(a.a(r)),r.log.setLogFile(r.options.logFile),l.r(r,l.n.OK)}catch(e){return t(e)}await Promise.all([xv(r),Ls(r)]).catch(e=>{n.jt(e),t(e)}),gv(r)&&(r.options.diagnosticsFile??=n.yt,await jl(r)),_v(r)&&(r.options.uploadMetadata===void 0&&vv(r)&&r.log.info(`Uploading metadata files automatically because TurboSnap was enabled`),await Dl(r)),hv(r),!n.St(r.options)&&[0,1].includes(r.exitCode)&&await Xs(r)}function hv(e){e.options.logFile&&!e.options.persistLogFile&&e.log.removeLogFile(),e.options.diagnosticsFile&&!e.options.persistDiagnosticsFile&&Ml(e)}function gv(e){return!!e.options.diagnosticsFile||_v(e)}function _v(e){return e.build?.storybookUrl?e.options.uploadMetadata??vv(e):!1}function vv(e){return!!e.turboSnap}async function yv(e,t){if(!t.skip||t.projectToken||t.projectId&&t.userToken)return!1;let n=await bv(e,t);return!(!n||!nc(n,t.skip))}async function bv(e,t){try{let{branch:n}=await hs({log:e.log,options:t},{branchName:t.branchName,patchBaseRef:t.patchBaseRef,ci:t.fromCI});return n}catch(t){return e.log.debug(`Failed to determine branch while handling --skip without a project token`,t),!1}}async function xv(e){try{try{let t={log:e.log,renderer:rc};e.options.interactive&&(t.renderer=ec,e.log.queue()),e.options.patchHeadRef&&e.options.patchBaseRef&&await dh(e),await Cd(e),await lp(e),await Og(e),await Op(e),await Sf(e),await Zm(e),await Qg(e),await x_(e),await mg(e),await new Er.default(q_(e),t).run(e),e.log.debug(`Tasks completed`)}catch(t){throw n.jt(t),t.code===`ECONNREFUSED`||t.name===`StatusCodeError`?(l.r(e,l.n.FETCH_ERROR),a.m(t,Z_(e,t))):t.name===`GraphQLError`?(l.r(e,l.n.GRAPHQL_ERROR),a.m(t,$_(e,t))):t.message.startsWith(`Cannot run a build with no stories`)?(l.r(e,l.n.BUILD_NO_STORIES),a.m(t,ev(e))):e.options.experimental_abortSignal?.aborted?(l.r(e,l.n.BUILD_WAS_CANCELED,!0),a.m(t,J_())):a.m(t,nv(e,t))}finally{if(e.mergeBase)try{await ih(e)}catch(t){n.jt(t),e.log.error(`Failed to restore your workspace to its original branch: ${t.message}`)}let{runtimeErrors:t,runtimeWarnings:r}=e;(t&&t.length>0||r&&r.length>0)&&(e.log.info(``),e.log.error(tv(e))),e.log.flush();try{await e.analytics?.shutdown()}catch(e){n.jt(e)}}}catch(t){let n=Y_(e,t);e.options.experimental_onTaskError?.(e,{formattedError:n,originalError:t}),e.userError||(e.log.info(``),e.log.error(n)),e.exitCode||l.r(e,l.n.UNKNOWN_ERROR)}}async function Sv(e){let t={log:e.log,options:{...e.options}},r;try{r=await n.J(t)}catch{r=``}let i=await n.L(t)||``,a=await n.H(t),o=await n.Q(t)||``,s=Zs(o),c=await n.K(t)||``,[l,u,...d]=r?r.split(`/`):[],f=!!l&&!!u&&d.length===0,p=await n.X(t).catch(e=>(t.log.warn(`Failed to retrieve uncommitted files hash`,e),``)),m=await n.B(t),h=await n.V(t);return{slug:f?r:``,branch:i,...a,uncommittedHash:p,userEmail:o,userEmailHash:s,repositoryRootDir:c,cloneDepth:m,cloneFilter:h}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return cv}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return _v}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return pv}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return mv}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Sv}});
//# sourceMappingURL=node-src-42EtdXGz.cjs.map
//# debugId=5bd0cf83-9093-5fca-9983-f27edef825c3