chromatic
Version:
Automate visual testing across browsers. Gather UI feedback. Versioned documentation.
18 lines (13 loc) • 13.1 kB
JavaScript
;
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e0f78623-2882-5418-b96e-0a6dc73d1d89")}catch(e){}}();
var chunkTKGT252T_js = require('./chunk-TKGT252T.js');
var ee=chunkTKGT252T_js.c((We,Z)=>{var D=chunkTKGT252T_js.a("constants"),Se=process.cwd,Y=null,ve=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Y||(Y=Se.call(process)),Y};try{process.cwd();}catch{}typeof process.chdir=="function"&&(K=process.chdir,process.chdir=function(e){Y=null,K.call(process,e);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,K));var K;Z.exports=we;function we(e){D.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&n(e),e.lutimes||a(e),e.chown=y(e.chown),e.fchown=y(e.fchown),e.lchown=y(e.lchown),e.chmod=s(e.chmod),e.fchmod=s(e.fchmod),e.lchmod=s(e.lchmod),e.chownSync=O(e.chownSync),e.fchownSync=O(e.fchownSync),e.lchownSync=O(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=j(e.stat),e.fstat=j(e.fstat),e.lstat=j(e.lstat),e.statSync=T(e.statSync),e.fstatSync=T(e.fstatSync),e.lstatSync=T(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(t,f,o){o&&process.nextTick(o);},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(t,f,o,r){r&&process.nextTick(r);},e.lchownSync=function(){}),ve==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(t){function f(o,r,u){var m=Date.now(),p=0;t(o,r,function v(R){if(R&&(R.code==="EACCES"||R.code==="EPERM"||R.code==="EBUSY")&&Date.now()-m<6e4){setTimeout(function(){e.stat(r,function(L,C){L&&L.code==="ENOENT"?t(o,r,v):u(R);});},p),p<100&&(p+=10);return}u&&u(R);});}return Object.setPrototypeOf&&Object.setPrototypeOf(f,t),f}(e.rename)),e.read=typeof e.read!="function"?e.read:function(t){function f(o,r,u,m,p,v){var R;if(v&&typeof v=="function"){var L=0;R=function(C,H,X){if(C&&C.code==="EAGAIN"&&L<10)return L++,t.call(e,o,r,u,m,p,R);v.apply(this,arguments);};}return t.call(e,o,r,u,m,p,R)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,t),f}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(t){return function(f,o,r,u,m){for(var p=0;;)try{return t.call(e,f,o,r,u,m)}catch(v){if(v.code==="EAGAIN"&&p<10){p++;continue}throw v}}}(e.readSync);function n(t){t.lchmod=function(f,o,r){t.open(f,D.O_WRONLY|D.O_SYMLINK,o,function(u,m){if(u){r&&r(u);return}t.fchmod(m,o,function(p){t.close(m,function(v){r&&r(p||v);});});});},t.lchmodSync=function(f,o){var r=t.openSync(f,D.O_WRONLY|D.O_SYMLINK,o),u=!0,m;try{m=t.fchmodSync(r,o),u=!1;}finally{if(u)try{t.closeSync(r);}catch{}else t.closeSync(r);}return m};}function a(t){D.hasOwnProperty("O_SYMLINK")&&t.futimes?(t.lutimes=function(f,o,r,u){t.open(f,D.O_SYMLINK,function(m,p){if(m){u&&u(m);return}t.futimes(p,o,r,function(v){t.close(p,function(R){u&&u(v||R);});});});},t.lutimesSync=function(f,o,r){var u=t.openSync(f,D.O_SYMLINK),m,p=!0;try{m=t.futimesSync(u,o,r),p=!1;}finally{if(p)try{t.closeSync(u);}catch{}else t.closeSync(u);}return m}):t.futimes&&(t.lutimes=function(f,o,r,u){u&&process.nextTick(u);},t.lutimesSync=function(){});}function s(t){return t&&function(f,o,r){return t.call(e,f,o,function(u){I(u)&&(u=null),r&&r.apply(this,arguments);})}}function i(t){return t&&function(f,o){try{return t.call(e,f,o)}catch(r){if(!I(r))throw r}}}function y(t){return t&&function(f,o,r,u){return t.call(e,f,o,r,function(m){I(m)&&(m=null),u&&u.apply(this,arguments);})}}function O(t){return t&&function(f,o,r){try{return t.call(e,f,o,r)}catch(u){if(!I(u))throw u}}}function j(t){return t&&function(f,o,r){typeof o=="function"&&(r=o,o=null);function u(m,p){p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),r&&r.apply(this,arguments);}return o?t.call(e,f,o,u):t.call(e,f,u)}}function T(t){return t&&function(f,o){var r=o?t.call(e,f,o):t.call(e,f);return r&&(r.uid<0&&(r.uid+=4294967296),r.gid<0&&(r.gid+=4294967296)),r}}function I(t){if(!t||t.code==="ENOSYS")return !0;var f=!process.getuid||process.getuid()!==0;return !!(f&&(t.code==="EINVAL"||t.code==="EPERM"))}}});var re=chunkTKGT252T_js.c((Ce,ne)=>{var te=chunkTKGT252T_js.a("stream").Stream;ne.exports=ge;function ge(e){return {ReadStream:n,WriteStream:a};function n(s,i){if(!(this instanceof n))return new n(s,i);te.call(this);var y=this;this.path=s,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var O=Object.keys(i),j=0,T=O.length;j<T;j++){var I=O[j];this[I]=i[I];}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){y._read();});return}e.open(this.path,this.flags,this.mode,function(t,f){if(t){y.emit("error",t),y.readable=!1;return}y.fd=f,y.emit("open",f),y._read();});}function a(s,i){if(!(this instanceof a))return new a(s,i);te.call(this),this.path=s,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var y=Object.keys(i),O=0,j=y.length;O<j;O++){var T=y[O];this[T]=i[T];}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}});var ce=chunkTKGT252T_js.c((Ye,ie)=>{ie.exports=Oe;var Fe=Object.getPrototypeOf||function(e){return e.__proto__};function Oe(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var n={__proto__:Fe(e)};else var n=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(e,a));}),n}});var fe=chunkTKGT252T_js.c((Ae,z)=>{var g=chunkTKGT252T_js.a("fs"),Ee=ee(),_e=re(),be=ce(),A=chunkTKGT252T_js.a("util"),P,G;typeof Symbol=="function"&&typeof Symbol.for=="function"?(P=Symbol.for("graceful-fs.queue"),G=Symbol.for("graceful-fs.previous")):(P="___graceful-fs.queue",G="___graceful-fs.previous");function Ne(){}function ae(e,n){Object.defineProperty(e,P,{get:function(){return n}});}var M=Ne;A.debuglog?M=A.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(M=function(){var e=A.format.apply(A,arguments);e="GFS4: "+e.split(/\n/).join(`
GFS4: `),console.error(e);});g[P]||(oe=global[P]||[],ae(g,oe),g.close=function(e){function n(a,s){return e.call(g,a,function(i){i||ue(),typeof s=="function"&&s.apply(this,arguments);})}return Object.defineProperty(n,G,{value:e}),n}(g.close),g.closeSync=function(e){function n(a){e.apply(g,arguments),ue();}return Object.defineProperty(n,G,{value:e}),n}(g.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){M(g[P]),chunkTKGT252T_js.a("assert").equal(g[P].length,0);}));var oe;global[P]||ae(global,g[P]);z.exports=Q(be(g));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!g.__patched&&(z.exports=Q(g),g.__patched=!0);function Q(e){Ee(e),e.gracefulify=Q,e.createReadStream=H,e.createWriteStream=X;var n=e.readFile;e.readFile=a;function a(c,h,l){return typeof h=="function"&&(l=h,h=null),_(c,h,l);function _(b,E,w,F){return n(b,E,function(d){d&&(d.code==="EMFILE"||d.code==="ENFILE")?q([_,[b,E,w],d,F||Date.now(),Date.now()]):typeof w=="function"&&w.apply(this,arguments);})}}var s=e.writeFile;e.writeFile=i;function i(c,h,l,_){return typeof l=="function"&&(_=l,l=null),b(c,h,l,_);function b(E,w,F,d,N){return s(E,w,F,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?q([b,[E,w,F,d],S,N||Date.now(),Date.now()]):typeof d=="function"&&d.apply(this,arguments);})}}var y=e.appendFile;y&&(e.appendFile=O);function O(c,h,l,_){return typeof l=="function"&&(_=l,l=null),b(c,h,l,_);function b(E,w,F,d,N){return y(E,w,F,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?q([b,[E,w,F,d],S,N||Date.now(),Date.now()]):typeof d=="function"&&d.apply(this,arguments);})}}var j=e.copyFile;j&&(e.copyFile=T);function T(c,h,l,_){return typeof l=="function"&&(_=l,l=0),b(c,h,l,_);function b(E,w,F,d,N){return j(E,w,F,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?q([b,[E,w,F,d],S,N||Date.now(),Date.now()]):typeof d=="function"&&d.apply(this,arguments);})}}var I=e.readdir;e.readdir=f;var t=/^v[0-5]\./;function f(c,h,l){typeof h=="function"&&(l=h,h=null);var _=t.test(process.version)?function(w,F,d,N){return I(w,b(w,F,d,N))}:function(w,F,d,N){return I(w,F,b(w,F,d,N))};return _(c,h,l);function b(E,w,F,d){return function(N,S){N&&(N.code==="EMFILE"||N.code==="ENFILE")?q([_,[E,w,F],N,d||Date.now(),Date.now()]):(S&&S.sort&&S.sort(),typeof F=="function"&&F.call(this,N,S));}}}if(process.version.substr(0,4)==="v0.8"){var o=_e(e);v=o.ReadStream,L=o.WriteStream;}var r=e.ReadStream;r&&(v.prototype=Object.create(r.prototype),v.prototype.open=R);var u=e.WriteStream;u&&(L.prototype=Object.create(u.prototype),L.prototype.open=C),Object.defineProperty(e,"ReadStream",{get:function(){return v},set:function(c){v=c;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return L},set:function(c){L=c;},enumerable:!0,configurable:!0});var m=v;Object.defineProperty(e,"FileReadStream",{get:function(){return m},set:function(c){m=c;},enumerable:!0,configurable:!0});var p=L;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(c){p=c;},enumerable:!0,configurable:!0});function v(c,h){return this instanceof v?(r.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function R(){var c=this;U(c.path,c.flags,c.mode,function(h,l){h?(c.autoClose&&c.destroy(),c.emit("error",h)):(c.fd=l,c.emit("open",l),c.read());});}function L(c,h){return this instanceof L?(u.apply(this,arguments),this):L.apply(Object.create(L.prototype),arguments)}function C(){var c=this;U(c.path,c.flags,c.mode,function(h,l){h?(c.destroy(),c.emit("error",h)):(c.fd=l,c.emit("open",l));});}function H(c,h){return new e.ReadStream(c,h)}function X(c,h){return new e.WriteStream(c,h)}var me=e.open;e.open=U;function U(c,h,l,_){return typeof l=="function"&&(_=l,l=null),b(c,h,l,_);function b(E,w,F,d,N){return me(E,w,F,function(S,qe){S&&(S.code==="EMFILE"||S.code==="ENFILE")?q([b,[E,w,F,d],S,N||Date.now(),Date.now()]):typeof d=="function"&&d.apply(this,arguments);})}}return e}function q(e){M("ENQUEUE",e[0].name,e[1]),g[P].push(e),J();}var B;function ue(){for(var e=Date.now(),n=0;n<g[P].length;++n)g[P][n].length>2&&(g[P][n][3]=e,g[P][n][4]=e);J();}function J(){if(clearTimeout(B),B=void 0,g[P].length!==0){var e=g[P].shift(),n=e[0],a=e[1],s=e[2],i=e[3],y=e[4];if(i===void 0)M("RETRY",n.name,a),n.apply(null,a);else if(Date.now()-i>=6e4){M("TIMEOUT",n.name,a);var O=a.pop();typeof O=="function"&&O.call(null,s);}else {var j=Date.now()-y,T=Math.max(y-i,1),I=Math.min(T*1.2,100);j>=I?(M("RETRY",n.name,a),n.apply(null,a.concat([i]))):g[P].push(e);}B===void 0&&(B=setTimeout(J,0));}}});var le=chunkTKGT252T_js.c(V=>{V.fromCallback=function(e){return Object.defineProperty(function(...n){if(typeof n[n.length-1]=="function")e.apply(this,n);else return new Promise((a,s)=>{n.push((i,y)=>i!=null?s(i):a(y)),e.apply(this,n);})},"name",{value:e.name})};V.fromPromise=function(e){return Object.defineProperty(function(...n){let a=n[n.length-1];if(typeof a!="function")return e.apply(this,n);n.pop(),e.apply(this,n).then(s=>a(null,s),a);},"name",{value:e.name})};});var he=chunkTKGT252T_js.c((Ge,se)=>{function Pe(e,{EOL:n=`
`,finalEOL:a=!0,replacer:s=null,spaces:i}={}){let y=a?n:"";return JSON.stringify(e,s,i).replace(/\n/g,n)+y}function Le(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}se.exports={stringify:Pe,stripBom:Le};});var $e=chunkTKGT252T_js.c((ke,de)=>{var W;try{W=fe();}catch{W=chunkTKGT252T_js.a("fs");}var k=le(),{stringify:pe,stripBom:ye}=he();async function je(e,n={}){typeof n=="string"&&(n={encoding:n});let a=n.fs||W,s="throws"in n?n.throws:!0,i=await k.fromCallback(a.readFile)(e,n);i=ye(i);let y;try{y=JSON.parse(i,n?n.reviver:null);}catch(O){if(s)throw O.message=`${e}: ${O.message}`,O;return null}return y}var Re=k.fromPromise(je);function Te(e,n={}){typeof n=="string"&&(n={encoding:n});let a=n.fs||W,s="throws"in n?n.throws:!0;try{let i=a.readFileSync(e,n);return i=ye(i),JSON.parse(i,n.reviver)}catch(i){if(s)throw i.message=`${e}: ${i.message}`,i;return null}}async function Ie(e,n,a={}){let s=a.fs||W,i=pe(n,a);await k.fromCallback(s.writeFile)(e,i,a);}var De=k.fromPromise(Ie);function xe(e,n,a={}){let s=a.fs||W,i=pe(n,a);return s.writeFileSync(e,i,a)}var Me={readFile:Re,readFileSync:Te,writeFile:De,writeFileSync:xe};de.exports=Me;});
exports.a = fe;
exports.b = le;
exports.c = he;
exports.d = $e;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-LTE3MQL2.js.map
//# debugId=e0f78623-2882-5418-b96e-0a6dc73d1d89