velloo 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUN-LICENSE.md +4 -3
- package/THIRD-PARTY-NOTICES.md +3 -3
- package/canvas/assets/index-DFOlwAKW.js +31 -0
- package/canvas/assets/{lucide-all-Cezxn40A.js → lucide-all-CezGNjGW.js} +1 -1
- package/canvas/index.html +1 -1
- package/{chunk-mqtnj8ws.js → chunk-00n2d68z.js} +1 -1
- package/{chunk-45wv1fs5.js → chunk-02gpgqj4.js} +5 -5
- package/{chunk-m0v3d581.js → chunk-0ztxyzac.js} +1 -1
- package/{chunk-07fxzrx2.js → chunk-2x5rw009.js} +3 -3
- package/{chunk-w30zfv3m.js → chunk-3f2p94wa.js} +1 -1
- package/{chunk-zgwvkgsz.js → chunk-3jqbybmp.js} +1 -1
- package/{chunk-mqx96m2g.js → chunk-5tatkt2j.js} +1 -1
- package/{chunk-qqagacne.js → chunk-640swnrm.js} +1 -1
- package/{chunk-v6ks5v53.js → chunk-6600wkmq.js} +1 -1
- package/{chunk-esg0x95a.js → chunk-6adv9eke.js} +1 -1
- package/{chunk-s1cwck4c.js → chunk-6wfvb07c.js} +1 -1
- package/{chunk-dqqpbmxt.js → chunk-8a2agf28.js} +1 -1
- package/{chunk-asqpx5v7.js → chunk-8kn6tp4b.js} +2 -2
- package/{chunk-cq2q36d1.js → chunk-9b4akcfp.js} +1 -1
- package/{chunk-8n07n0cr.js → chunk-9kvbe53e.js} +2 -2
- package/{chunk-3612470d.js → chunk-a5mxgvcz.js} +1 -1
- package/{chunk-sjxp2bx3.js → chunk-as4rn21e.js} +1 -1
- package/{chunk-qx83fdv2.js → chunk-avewjans.js} +4 -4
- package/chunk-bpb97rsk.js +17 -0
- package/{chunk-q7wwqn03.js → chunk-bsn761jv.js} +1 -1
- package/{chunk-rg86bhtb.js → chunk-c11n1tve.js} +1 -1
- package/{chunk-emty5315.js → chunk-cfksd3zh.js} +1 -1
- package/{chunk-hsk91jms.js → chunk-ck3bg8rf.js} +1 -1
- package/{chunk-r5y1sh4f.js → chunk-cy1nmr0f.js} +1 -1
- package/{chunk-nx0ex7qw.js → chunk-dqy6a75x.js} +1 -1
- package/{chunk-qgbat4fv.js → chunk-f8jchnwe.js} +1 -1
- package/{chunk-d19ttv1a.js → chunk-fejhav0p.js} +1 -1
- package/{chunk-x84qrz4q.js → chunk-fzqt4rsz.js} +1 -1
- package/{chunk-rrrn1mkq.js → chunk-g7pbfad5.js} +1 -1
- package/{chunk-cg0sjdqt.js → chunk-gv209d5j.js} +1 -1
- package/chunk-j4rt31qb.js +2 -0
- package/{chunk-t08391mh.js → chunk-kmsbcb3q.js} +1 -1
- package/{chunk-nrxqr4v5.js → chunk-ktps9v0k.js} +1 -1
- package/{chunk-rhfzy9c0.js → chunk-ktsdzzgx.js} +1 -1
- package/{chunk-8ztgcajz.js → chunk-kvxn1cyx.js} +1 -1
- package/{chunk-xg49s85z.js → chunk-n70zfv0m.js} +902 -902
- package/{chunk-djwvt6jx.js → chunk-n8pr0kc8.js} +1 -1
- package/{chunk-dy7qwj3t.js → chunk-pasvz8xw.js} +1 -1
- package/{chunk-t61vyqpd.js → chunk-qewarcqf.js} +1 -1
- package/{chunk-b4hny6hw.js → chunk-qf1c6jxh.js} +1 -1
- package/chunk-qn05hn7a.js +5 -0
- package/{chunk-majd3gx9.js → chunk-qvdvxqs0.js} +1 -1
- package/{chunk-aefn23tr.js → chunk-r014f76h.js} +1 -1
- package/{chunk-32cq4wpr.js → chunk-seaar5na.js} +1 -1
- package/{chunk-g3k8k6fq.js → chunk-tax7fxav.js} +1 -1
- package/{chunk-c4164x55.js → chunk-tmjs6xas.js} +1 -1
- package/{chunk-z6r6wxm6.js → chunk-v6w8akph.js} +1 -1
- package/{chunk-xxw67jpk.js → chunk-w40pqmyz.js} +4 -4
- package/{chunk-yjwtdm71.js → chunk-x05grjd9.js} +1 -1
- package/{chunk-ffm2jpxp.js → chunk-x61f42fj.js} +2 -2
- package/{chunk-h3ser37q.js → chunk-xc6mats8.js} +1 -1
- package/chunk-yp39f93e.js +815 -0
- package/{chunk-ez720ked.js → chunk-ysf9388d.js} +1 -1
- package/{chunk-6w42sr61.js → chunk-z3r8px3d.js} +1 -1
- package/{chunk-8qf0ne1p.js → chunk-z9kcdgj8.js} +1 -1
- package/chunk-zexzy6zv.js +2 -0
- package/chunk-zjbbd87h.js +2 -0
- package/cli.js +1 -1
- package/package.json +9 -9
- package/pkgs/schema/src/index.ts +1 -0
- package/pkgs/schema/src/snippet-resolve.ts +43 -0
- package/canvas/assets/index-CcPwhD7W.js +0 -31
- package/chunk-4g4c9h7k.js +0 -2
- package/chunk-9g45c5md.js +0 -815
- package/chunk-bntsn3wj.js +0 -2
- package/chunk-ejpccmcj.js +0 -18
- package/chunk-jxgwdz2r.js +0 -5
- package/chunk-kvq7pcph.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{isCssIdent,sanitizeCssTokenValue,neutralizeCssText,sanitizeGoogleFontSpec,isComponentNode,isSnippetInstance,isParamRef,isTextNode,repoKey,PARAM_TAG_REF,STATIC_REF,nodeShape,isNode,mapComponentTypes,ScreenSchema,resolveSnippetArgs,substituteSnippetParams,applySnippetOverrides,applySnippetExtraClassName,spacingCssTokens,ThemeSchema,typesetCss}from"./chunk-xxw67jpk.js";import{__toESM,__commonJS,__exportCjs,__require}from"./chunk-2smsg2ct.js";var require_chunkstream=__commonJS(function(exports,module){var util=__require("util"),Stream=__require("stream"),ChunkStream=module.exports=function(){Stream.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};util.inherits(ChunkStream,Stream);ChunkStream.prototype.read=function(length,callback){this._reads.push({length:Math.abs(length),allowLess:length<0,func:callback}),process.nextTick(function(){if(this._process(),this._paused&&this._reads&&this._reads.length>0)this._paused=!1,this.emit("drain")}.bind(this))};ChunkStream.prototype.write=function(data,encoding){if(!this.writable)return this.emit("error",Error("Stream not writable")),!1;let dataBuffer;if(Buffer.isBuffer(data))dataBuffer=data;else dataBuffer=Buffer.from(data,encoding||this._encoding);if(this._buffers.push(dataBuffer),this._buffered+=dataBuffer.length,this._process(),this._reads&&this._reads.length===0)this._paused=!0;return this.writable&&!this._paused};ChunkStream.prototype.end=function(data,encoding){if(data)this.write(data,encoding);if(this.writable=!1,!this._buffers)return;if(this._buffers.length===0)this._end();else this._buffers.push(null),this._process()};ChunkStream.prototype.destroySoon=ChunkStream.prototype.end;ChunkStream.prototype._end=function(){if(this._reads.length>0)this.emit("error",Error("Unexpected end of input"));this.destroy()};ChunkStream.prototype.destroy=function(){if(!this._buffers)return;this.writable=!1,this._reads=null,this._buffers=null,this.emit("close")};ChunkStream.prototype._processReadAllowingLess=function(read){this._reads.shift();let smallerBuf=this._buffers[0];if(smallerBuf.length>read.length)this._buffered-=read.length,this._buffers[0]=smallerBuf.slice(read.length),read.func.call(this,smallerBuf.slice(0,read.length));else this._buffered-=smallerBuf.length,this._buffers.shift(),read.func.call(this,smallerBuf)};ChunkStream.prototype._processRead=function(read){this._reads.shift();let pos=0,count=0,data=Buffer.alloc(read.length);while(pos<read.length){let buf=this._buffers[count++],len=Math.min(buf.length,read.length-pos);if(buf.copy(data,pos,0,len),pos+=len,len!==buf.length)this._buffers[--count]=buf.slice(len)}if(count>0)this._buffers.splice(0,count);this._buffered-=read.length,read.func.call(this,data)};ChunkStream.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let read=this._reads[0];if(read.allowLess)this._processReadAllowingLess(read);else if(this._buffered>=read.length)this._processRead(read);else break}if(this._buffers&&!this.writable)this._end()}catch(ex){this.emit("error",ex)}}});var require_interlace=__commonJS(function(exports){var imagePasses=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];exports.getImagePasses=function(width,height){let images=[],xLeftOver=width%8,yLeftOver=height%8,xRepeats=(width-xLeftOver)/8,yRepeats=(height-yLeftOver)/8;for(let i=0;i<imagePasses.length;i++){let pass=imagePasses[i],passWidth=xRepeats*pass.x.length,passHeight=yRepeats*pass.y.length;for(let j=0;j<pass.x.length;j++)if(pass.x[j]<xLeftOver)passWidth++;else break;for(let j=0;j<pass.y.length;j++)if(pass.y[j]<yLeftOver)passHeight++;else break;if(passWidth>0&&passHeight>0)images.push({width:passWidth,height:passHeight,index:i})}return images};exports.getInterlaceIterator=function(width){return function(x,y,pass){let outerXLeftOver=x%imagePasses[pass].x.length,outerX=(x-outerXLeftOver)/imagePasses[pass].x.length*8+imagePasses[pass].x[outerXLeftOver],outerYLeftOver=y%imagePasses[pass].y.length,outerY=(y-outerYLeftOver)/imagePasses[pass].y.length*8+imagePasses[pass].y[outerYLeftOver];return outerX*4+outerY*width*4}}});var require_paeth_predictor=__commonJS(function(exports,module){module.exports=function(left,above,upLeft){let paeth=left+above-upLeft,pLeft=Math.abs(paeth-left),pAbove=Math.abs(paeth-above),pUpLeft=Math.abs(paeth-upLeft);if(pLeft<=pAbove&&pLeft<=pUpLeft)return left;if(pAbove<=pUpLeft)return above;return upLeft}});var require_filter_parse=__commonJS(function(exports,module){var interlaceUtils=require_interlace(),paethPredictor=require_paeth_predictor();function getByteWidth(width,bpp,depth){let byteWidth=width*bpp;if(depth!==8)byteWidth=Math.ceil(byteWidth/(8/depth));return byteWidth}var Filter=module.exports=function(bitmapInfo,dependencies){let{width,height,interlace,bpp,depth}=bitmapInfo;if(this.read=dependencies.read,this.write=dependencies.write,this.complete=dependencies.complete,this._imageIndex=0,this._images=[],interlace){let passes=interlaceUtils.getImagePasses(width,height);for(let i=0;i<passes.length;i++)this._images.push({byteWidth:getByteWidth(passes[i].width,bpp,depth),height:passes[i].height,lineIndex:0})}else this._images.push({byteWidth:getByteWidth(width,bpp,depth),height,lineIndex:0});if(depth===8)this._xComparison=bpp;else if(depth===16)this._xComparison=bpp*2;else this._xComparison=1};Filter.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};Filter.prototype._unFilterType1=function(rawData,unfilteredLine,byteWidth){let xComparison=this._xComparison,xBiggerThan=xComparison-1;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f1Left=x>xBiggerThan?unfilteredLine[x-xComparison]:0;unfilteredLine[x]=rawByte+f1Left}};Filter.prototype._unFilterType2=function(rawData,unfilteredLine,byteWidth){let lastLine=this._lastLine;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f2Up=lastLine?lastLine[x]:0;unfilteredLine[x]=rawByte+f2Up}};Filter.prototype._unFilterType3=function(rawData,unfilteredLine,byteWidth){let xComparison=this._xComparison,xBiggerThan=xComparison-1,lastLine=this._lastLine;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f3Up=lastLine?lastLine[x]:0,f3Left=x>xBiggerThan?unfilteredLine[x-xComparison]:0,f3Add=Math.floor((f3Left+f3Up)/2);unfilteredLine[x]=rawByte+f3Add}};Filter.prototype._unFilterType4=function(rawData,unfilteredLine,byteWidth){let xComparison=this._xComparison,xBiggerThan=xComparison-1,lastLine=this._lastLine;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f4Up=lastLine?lastLine[x]:0,f4Left=x>xBiggerThan?unfilteredLine[x-xComparison]:0,f4UpLeft=x>xBiggerThan&&lastLine?lastLine[x-xComparison]:0,f4Add=paethPredictor(f4Left,f4Up,f4UpLeft);unfilteredLine[x]=rawByte+f4Add}};Filter.prototype._reverseFilterLine=function(rawData){let filter=rawData[0],unfilteredLine,currentImage=this._images[this._imageIndex],byteWidth=currentImage.byteWidth;if(filter===0)unfilteredLine=rawData.slice(1,byteWidth+1);else switch(unfilteredLine=Buffer.alloc(byteWidth),filter){case 1:this._unFilterType1(rawData,unfilteredLine,byteWidth);break;case 2:this._unFilterType2(rawData,unfilteredLine,byteWidth);break;case 3:this._unFilterType3(rawData,unfilteredLine,byteWidth);break;case 4:this._unFilterType4(rawData,unfilteredLine,byteWidth);break;default:throw Error("Unrecognised filter type - "+filter)}if(this.write(unfilteredLine),currentImage.lineIndex++,currentImage.lineIndex>=currentImage.height)this._lastLine=null,this._imageIndex++,currentImage=this._images[this._imageIndex];else this._lastLine=unfilteredLine;if(currentImage)this.read(currentImage.byteWidth+1,this._reverseFilterLine.bind(this));else this._lastLine=null,this.complete()}});var require_filter_parse_async=__commonJS(function(exports,module){var util=__require("util"),ChunkStream=require_chunkstream(),Filter=require_filter_parse(),FilterAsync=module.exports=function(bitmapInfo){ChunkStream.call(this);let buffers=[],that=this;this._filter=new Filter(bitmapInfo,{read:this.read.bind(this),write:function(buffer){buffers.push(buffer)},complete:function(){that.emit("complete",Buffer.concat(buffers))}}),this._filter.start()};util.inherits(FilterAsync,ChunkStream)});var require_constants=__commonJS(function(exports,module){module.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var require_crc=__commonJS(function(exports,module){var crcTable=[];(function(){for(let i=0;i<256;i++){let currentCrc=i;for(let j=0;j<8;j++)if(currentCrc&1)currentCrc=3988292384^currentCrc>>>1;else currentCrc=currentCrc>>>1;crcTable[i]=currentCrc}})();var CrcCalculator=module.exports=function(){this._crc=-1};CrcCalculator.prototype.write=function(data){for(let i=0;i<data.length;i++)this._crc=crcTable[(this._crc^data[i])&255]^this._crc>>>8;return!0};CrcCalculator.prototype.crc32=function(){return this._crc^-1};CrcCalculator.crc32=function(buf){let crc=-1;for(let i=0;i<buf.length;i++)crc=crcTable[(crc^buf[i])&255]^crc>>>8;return crc^-1}});var require_parser=__commonJS(function(exports,module){var constants=require_constants(),CrcCalculator=require_crc(),Parser=module.exports=function(options,dependencies){this._options=options,options.checkCRC=options.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[constants.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[constants.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[constants.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[constants.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[constants.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[constants.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=dependencies.read,this.error=dependencies.error,this.metadata=dependencies.metadata,this.gamma=dependencies.gamma,this.transColor=dependencies.transColor,this.palette=dependencies.palette,this.parsed=dependencies.parsed,this.inflateData=dependencies.inflateData,this.finished=dependencies.finished,this.simpleTransparency=dependencies.simpleTransparency,this.headersFinished=dependencies.headersFinished||function(){}};Parser.prototype.start=function(){this.read(constants.PNG_SIGNATURE.length,this._parseSignature.bind(this))};Parser.prototype._parseSignature=function(data){let signature=constants.PNG_SIGNATURE;for(let i=0;i<signature.length;i++)if(data[i]!==signature[i]){this.error(Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};Parser.prototype._parseChunkBegin=function(data){let length=data.readUInt32BE(0),type=data.readUInt32BE(4),name="";for(let i=4;i<8;i++)name+=String.fromCharCode(data[i]);let ancillary=Boolean(data[4]&32);if(!this._hasIHDR&&type!==constants.TYPE_IHDR){this.error(Error("Expected IHDR on beggining"));return}if(this._crc=new CrcCalculator,this._crc.write(Buffer.from(name)),this._chunks[type])return this._chunks[type](length);if(!ancillary){this.error(Error("Unsupported critical chunk type "+name));return}this.read(length+4,this._skipChunk.bind(this))};Parser.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};Parser.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};Parser.prototype._parseChunkEnd=function(data){let fileCrc=data.readInt32BE(0),calcCrc=this._crc.crc32();if(this._options.checkCRC&&calcCrc!==fileCrc){this.error(Error("Crc error - "+fileCrc+" - "+calcCrc));return}if(!this._hasIEND)this.read(8,this._parseChunkBegin.bind(this))};Parser.prototype._handleIHDR=function(length){this.read(length,this._parseIHDR.bind(this))};Parser.prototype._parseIHDR=function(data){this._crc.write(data);let width=data.readUInt32BE(0),height=data.readUInt32BE(4),depth=data[8],colorType=data[9],compr=data[10],filter=data[11],interlace=data[12];if(depth!==8&&depth!==4&&depth!==2&&depth!==1&&depth!==16){this.error(Error("Unsupported bit depth "+depth));return}if(!(colorType in constants.COLORTYPE_TO_BPP_MAP)){this.error(Error("Unsupported color type"));return}if(compr!==0){this.error(Error("Unsupported compression method"));return}if(filter!==0){this.error(Error("Unsupported filter method"));return}if(interlace!==0&&interlace!==1){this.error(Error("Unsupported interlace method"));return}this._colorType=colorType;let bpp=constants.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width,height,depth,interlace:Boolean(interlace),palette:Boolean(colorType&constants.COLORTYPE_PALETTE),color:Boolean(colorType&constants.COLORTYPE_COLOR),alpha:Boolean(colorType&constants.COLORTYPE_ALPHA),bpp,colorType}),this._handleChunkEnd()};Parser.prototype._handlePLTE=function(length){this.read(length,this._parsePLTE.bind(this))};Parser.prototype._parsePLTE=function(data){this._crc.write(data);let entries=Math.floor(data.length/3);for(let i=0;i<entries;i++)this._palette.push([data[i*3],data[i*3+1],data[i*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};Parser.prototype._handleTRNS=function(length){this.simpleTransparency(),this.read(length,this._parseTRNS.bind(this))};Parser.prototype._parseTRNS=function(data){if(this._crc.write(data),this._colorType===constants.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(Error("Transparency chunk must be after palette"));return}if(data.length>this._palette.length){this.error(Error("More transparent colors than palette size"));return}for(let i=0;i<data.length;i++)this._palette[i][3]=data[i];this.palette(this._palette)}if(this._colorType===constants.COLORTYPE_GRAYSCALE)this.transColor([data.readUInt16BE(0)]);if(this._colorType===constants.COLORTYPE_COLOR)this.transColor([data.readUInt16BE(0),data.readUInt16BE(2),data.readUInt16BE(4)]);this._handleChunkEnd()};Parser.prototype._handleGAMA=function(length){this.read(length,this._parseGAMA.bind(this))};Parser.prototype._parseGAMA=function(data){this._crc.write(data),this.gamma(data.readUInt32BE(0)/constants.GAMMA_DIVISION),this._handleChunkEnd()};Parser.prototype._handleIDAT=function(length){if(!this._emittedHeadersFinished)this._emittedHeadersFinished=!0,this.headersFinished();this.read(-length,this._parseIDAT.bind(this,length))};Parser.prototype._parseIDAT=function(length,data){if(this._crc.write(data),this._colorType===constants.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw Error("Expected palette not found");this.inflateData(data);let leftOverLength=length-data.length;if(leftOverLength>0)this._handleIDAT(leftOverLength);else this._handleChunkEnd()};Parser.prototype._handleIEND=function(length){this.read(length,this._parseIEND.bind(this))};Parser.prototype._parseIEND=function(data){if(this._crc.write(data),this._hasIEND=!0,this._handleChunkEnd(),this.finished)this.finished()}});var require_bitmapper=__commonJS(function(exports){var interlaceUtils=require_interlace(),pixelBppMapper=[function(){},function(pxData,data,pxPos,rawPos){if(rawPos===data.length)throw Error("Ran out of data");let pixel=data[rawPos];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=255},function(pxData,data,pxPos,rawPos){if(rawPos+1>=data.length)throw Error("Ran out of data");let pixel=data[rawPos];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=data[rawPos+1]},function(pxData,data,pxPos,rawPos){if(rawPos+2>=data.length)throw Error("Ran out of data");pxData[pxPos]=data[rawPos],pxData[pxPos+1]=data[rawPos+1],pxData[pxPos+2]=data[rawPos+2],pxData[pxPos+3]=255},function(pxData,data,pxPos,rawPos){if(rawPos+3>=data.length)throw Error("Ran out of data");pxData[pxPos]=data[rawPos],pxData[pxPos+1]=data[rawPos+1],pxData[pxPos+2]=data[rawPos+2],pxData[pxPos+3]=data[rawPos+3]}],pixelBppCustomMapper=[function(){},function(pxData,pixelData,pxPos,maxBit){let pixel=pixelData[0];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=maxBit},function(pxData,pixelData,pxPos){let pixel=pixelData[0];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=pixelData[1]},function(pxData,pixelData,pxPos,maxBit){pxData[pxPos]=pixelData[0],pxData[pxPos+1]=pixelData[1],pxData[pxPos+2]=pixelData[2],pxData[pxPos+3]=maxBit},function(pxData,pixelData,pxPos){pxData[pxPos]=pixelData[0],pxData[pxPos+1]=pixelData[1],pxData[pxPos+2]=pixelData[2],pxData[pxPos+3]=pixelData[3]}];function bitRetriever(data,depth){let leftOver=[],i=0;function split(){if(i===data.length)throw Error("Ran out of data");let byte=data[i];i++;let byte8,byte7,byte6,byte5,byte4,byte3,byte2,byte1;switch(depth){default:throw Error("unrecognised depth");case 16:byte2=data[i],i++,leftOver.push((byte<<8)+byte2);break;case 4:byte2=byte&15,byte1=byte>>4,leftOver.push(byte1,byte2);break;case 2:byte4=byte&3,byte3=byte>>2&3,byte2=byte>>4&3,byte1=byte>>6&3,leftOver.push(byte1,byte2,byte3,byte4);break;case 1:byte8=byte&1,byte7=byte>>1&1,byte6=byte>>2&1,byte5=byte>>3&1,byte4=byte>>4&1,byte3=byte>>5&1,byte2=byte>>6&1,byte1=byte>>7&1,leftOver.push(byte1,byte2,byte3,byte4,byte5,byte6,byte7,byte8);break}}return{get:function(count){while(leftOver.length<count)split();let returner=leftOver.slice(0,count);return leftOver=leftOver.slice(count),returner},resetAfterLine:function(){leftOver.length=0},end:function(){if(i!==data.length)throw Error("extra data found")}}}function mapImage8Bit(image,pxData,getPxPos,bpp,data,rawPos){let{width:imageWidth,height:imageHeight,index:imagePass}=image;for(let y=0;y<imageHeight;y++)for(let x=0;x<imageWidth;x++){let pxPos=getPxPos(x,y,imagePass);pixelBppMapper[bpp](pxData,data,pxPos,rawPos),rawPos+=bpp}return rawPos}function mapImageCustomBit(image,pxData,getPxPos,bpp,bits,maxBit){let{width:imageWidth,height:imageHeight,index:imagePass}=image;for(let y=0;y<imageHeight;y++){for(let x=0;x<imageWidth;x++){let pixelData=bits.get(bpp),pxPos=getPxPos(x,y,imagePass);pixelBppCustomMapper[bpp](pxData,pixelData,pxPos,maxBit)}bits.resetAfterLine()}}exports.dataToBitMap=function(data,bitmapInfo){let{width,height,depth,bpp,interlace}=bitmapInfo,bits;if(depth!==8)bits=bitRetriever(data,depth);let pxData;if(depth<=8)pxData=Buffer.alloc(width*height*4);else pxData=new Uint16Array(width*height*4);let maxBit=Math.pow(2,depth)-1,rawPos=0,images,getPxPos;if(interlace)images=interlaceUtils.getImagePasses(width,height),getPxPos=interlaceUtils.getInterlaceIterator(width,height);else{let nonInterlacedPxPos=0;getPxPos=function(){let returner=nonInterlacedPxPos;return nonInterlacedPxPos+=4,returner},images=[{width,height}]}for(let imageIndex=0;imageIndex<images.length;imageIndex++)if(depth===8)rawPos=mapImage8Bit(images[imageIndex],pxData,getPxPos,bpp,data,rawPos);else mapImageCustomBit(images[imageIndex],pxData,getPxPos,bpp,bits,maxBit);if(depth===8){if(rawPos!==data.length)throw Error("extra data found")}else bits.end();return pxData}});var require_format_normaliser=__commonJS(function(exports,module){function dePalette(indata,outdata,width,height,palette){let pxPos=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){let color=palette[indata[pxPos]];if(!color)throw Error("index "+indata[pxPos]+" not in palette");for(let i=0;i<4;i++)outdata[pxPos+i]=color[i];pxPos+=4}}function replaceTransparentColor(indata,outdata,width,height,transColor){let pxPos=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){let makeTrans=!1;if(transColor.length===1){if(transColor[0]===indata[pxPos])makeTrans=!0}else if(transColor[0]===indata[pxPos]&&transColor[1]===indata[pxPos+1]&&transColor[2]===indata[pxPos+2])makeTrans=!0;if(makeTrans)for(let i=0;i<4;i++)outdata[pxPos+i]=0;pxPos+=4}}function scaleDepth(indata,outdata,width,height,depth){let maxOutSample=255,maxInSample=Math.pow(2,depth)-1,pxPos=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){for(let i=0;i<4;i++)outdata[pxPos+i]=Math.floor(indata[pxPos+i]*maxOutSample/maxInSample+0.5);pxPos+=4}}module.exports=function(indata,imageData,skipRescale=!1){let{depth,width,height,colorType,transColor,palette}=imageData,outdata=indata;if(colorType===3)dePalette(indata,outdata,width,height,palette);else{if(transColor)replaceTransparentColor(indata,outdata,width,height,transColor);if(depth!==8&&!skipRescale){if(depth===16)outdata=Buffer.alloc(width*height*4);scaleDepth(indata,outdata,width,height,depth)}}return outdata}});var require_parser_async=__commonJS(function(exports,module){var util=__require("util"),zlib=__require("zlib"),ChunkStream=require_chunkstream(),FilterAsync=require_filter_parse_async(),Parser=require_parser(),bitmapper=require_bitmapper(),formatNormaliser=require_format_normaliser(),ParserAsync=module.exports=function(options){ChunkStream.call(this),this._parser=new Parser(options,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=options,this.writable=!0,this._parser.start()};util.inherits(ParserAsync,ChunkStream);ParserAsync.prototype._handleError=function(err){if(this.emit("error",err),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy)this._inflate.destroy();if(this._filter)this._filter.destroy(),this._filter.on("error",function(){});this.errord=!0};ParserAsync.prototype._inflateData=function(data){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=zlib.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let imageSize=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,chunkSize=Math.max(imageSize,zlib.Z_MIN_CHUNK);this._inflate=zlib.createInflate({chunkSize});let leftToInflate=imageSize,emitError=this.emit.bind(this,"error");this._inflate.on("error",function(err){if(!leftToInflate)return;emitError(err)}),this._filter.on("complete",this._complete.bind(this));let filterWrite=this._filter.write.bind(this._filter);this._inflate.on("data",function(chunk){if(!leftToInflate)return;if(chunk.length>leftToInflate)chunk=chunk.slice(0,leftToInflate);leftToInflate-=chunk.length,filterWrite(chunk)}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(data)};ParserAsync.prototype._handleMetaData=function(metaData){this._metaData=metaData,this._bitmapInfo=Object.create(metaData),this._filter=new FilterAsync(this._bitmapInfo)};ParserAsync.prototype._handleTransColor=function(transColor){this._bitmapInfo.transColor=transColor};ParserAsync.prototype._handlePalette=function(palette){this._bitmapInfo.palette=palette};ParserAsync.prototype._simpleTransparency=function(){this._metaData.alpha=!0};ParserAsync.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};ParserAsync.prototype._finished=function(){if(this.errord)return;if(!this._inflate)this.emit("error","No Inflate block");else this._inflate.end()};ParserAsync.prototype._complete=function(filteredData){if(this.errord)return;let normalisedBitmapData;try{let bitmapData=bitmapper.dataToBitMap(filteredData,this._bitmapInfo);normalisedBitmapData=formatNormaliser(bitmapData,this._bitmapInfo,this._options.skipRescale),bitmapData=null}catch(ex){this._handleError(ex);return}this.emit("parsed",normalisedBitmapData)}});var require_bitpacker=__commonJS(function(exports,module){var constants=require_constants();module.exports=function(dataIn,width,height,options){let outHasAlpha=[constants.COLORTYPE_COLOR_ALPHA,constants.COLORTYPE_ALPHA].indexOf(options.colorType)!==-1;if(options.colorType===options.inputColorType){let bigEndian=function(){let buffer=new ArrayBuffer(2);return new DataView(buffer).setInt16(0,256,!0),new Int16Array(buffer)[0]!==256}();if(options.bitDepth===8||options.bitDepth===16&&bigEndian)return dataIn}let data=options.bitDepth!==16?dataIn:new Uint16Array(dataIn.buffer),maxValue=255,inBpp=constants.COLORTYPE_TO_BPP_MAP[options.inputColorType];if(inBpp===4&&!options.inputHasAlpha)inBpp=3;let outBpp=constants.COLORTYPE_TO_BPP_MAP[options.colorType];if(options.bitDepth===16)maxValue=65535,outBpp*=2;let outData=Buffer.alloc(width*height*outBpp),inIndex=0,outIndex=0,bgColor=options.bgColor||{};if(bgColor.red===void 0)bgColor.red=maxValue;if(bgColor.green===void 0)bgColor.green=maxValue;if(bgColor.blue===void 0)bgColor.blue=maxValue;function getRGBA(){let red,green,blue,alpha=maxValue;switch(options.inputColorType){case constants.COLORTYPE_COLOR_ALPHA:alpha=data[inIndex+3],red=data[inIndex],green=data[inIndex+1],blue=data[inIndex+2];break;case constants.COLORTYPE_COLOR:red=data[inIndex],green=data[inIndex+1],blue=data[inIndex+2];break;case constants.COLORTYPE_ALPHA:alpha=data[inIndex+1],red=data[inIndex],green=red,blue=red;break;case constants.COLORTYPE_GRAYSCALE:red=data[inIndex],green=red,blue=red;break;default:throw Error("input color type:"+options.inputColorType+" is not supported at present")}if(options.inputHasAlpha){if(!outHasAlpha)alpha/=maxValue,red=Math.min(Math.max(Math.round((1-alpha)*bgColor.red+alpha*red),0),maxValue),green=Math.min(Math.max(Math.round((1-alpha)*bgColor.green+alpha*green),0),maxValue),blue=Math.min(Math.max(Math.round((1-alpha)*bgColor.blue+alpha*blue),0),maxValue)}return{red,green,blue,alpha}}for(let y=0;y<height;y++)for(let x=0;x<width;x++){let rgba=getRGBA(data,inIndex);switch(options.colorType){case constants.COLORTYPE_COLOR_ALPHA:case constants.COLORTYPE_COLOR:if(options.bitDepth===8){if(outData[outIndex]=rgba.red,outData[outIndex+1]=rgba.green,outData[outIndex+2]=rgba.blue,outHasAlpha)outData[outIndex+3]=rgba.alpha}else if(outData.writeUInt16BE(rgba.red,outIndex),outData.writeUInt16BE(rgba.green,outIndex+2),outData.writeUInt16BE(rgba.blue,outIndex+4),outHasAlpha)outData.writeUInt16BE(rgba.alpha,outIndex+6);break;case constants.COLORTYPE_ALPHA:case constants.COLORTYPE_GRAYSCALE:{let grayscale=(rgba.red+rgba.green+rgba.blue)/3;if(options.bitDepth===8){if(outData[outIndex]=grayscale,outHasAlpha)outData[outIndex+1]=rgba.alpha}else if(outData.writeUInt16BE(grayscale,outIndex),outHasAlpha)outData.writeUInt16BE(rgba.alpha,outIndex+2);break}default:throw Error("unrecognised color Type "+options.colorType)}inIndex+=inBpp,outIndex+=outBpp}return outData}});var require_filter_pack=__commonJS(function(exports,module){var paethPredictor=require_paeth_predictor();function filterNone(pxData,pxPos,byteWidth,rawData,rawPos){for(let x=0;x<byteWidth;x++)rawData[rawPos+x]=pxData[pxPos+x]}function filterSumNone(pxData,pxPos,byteWidth){let sum=0,length=pxPos+byteWidth;for(let i=pxPos;i<length;i++)sum+=Math.abs(pxData[i]);return sum}function filterSub(pxData,pxPos,byteWidth,rawData,rawPos,bpp){for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,val=pxData[pxPos+x]-left;rawData[rawPos+x]=val}}function filterSumSub(pxData,pxPos,byteWidth,bpp){let sum=0;for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,val=pxData[pxPos+x]-left;sum+=Math.abs(val)}return sum}function filterUp(pxData,pxPos,byteWidth,rawData,rawPos){for(let x=0;x<byteWidth;x++){let up=pxPos>0?pxData[pxPos+x-byteWidth]:0,val=pxData[pxPos+x]-up;rawData[rawPos+x]=val}}function filterSumUp(pxData,pxPos,byteWidth){let sum=0,length=pxPos+byteWidth;for(let x=pxPos;x<length;x++){let up=pxPos>0?pxData[x-byteWidth]:0,val=pxData[x]-up;sum+=Math.abs(val)}return sum}function filterAvg(pxData,pxPos,byteWidth,rawData,rawPos,bpp){for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,val=pxData[pxPos+x]-(left+up>>1);rawData[rawPos+x]=val}}function filterSumAvg(pxData,pxPos,byteWidth,bpp){let sum=0;for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,val=pxData[pxPos+x]-(left+up>>1);sum+=Math.abs(val)}return sum}function filterPaeth(pxData,pxPos,byteWidth,rawData,rawPos,bpp){for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,upleft=pxPos>0&&x>=bpp?pxData[pxPos+x-(byteWidth+bpp)]:0,val=pxData[pxPos+x]-paethPredictor(left,up,upleft);rawData[rawPos+x]=val}}function filterSumPaeth(pxData,pxPos,byteWidth,bpp){let sum=0;for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,upleft=pxPos>0&&x>=bpp?pxData[pxPos+x-(byteWidth+bpp)]:0,val=pxData[pxPos+x]-paethPredictor(left,up,upleft);sum+=Math.abs(val)}return sum}var filters={0:filterNone,1:filterSub,2:filterUp,3:filterAvg,4:filterPaeth},filterSums={0:filterSumNone,1:filterSumSub,2:filterSumUp,3:filterSumAvg,4:filterSumPaeth};module.exports=function(pxData,width,height,options,bpp){let filterTypes;if(!("filterType"in options)||options.filterType===-1)filterTypes=[0,1,2,3,4];else if(typeof options.filterType==="number")filterTypes=[options.filterType];else throw Error("unrecognised filter types");if(options.bitDepth===16)bpp*=2;let byteWidth=width*bpp,rawPos=0,pxPos=0,rawData=Buffer.alloc((byteWidth+1)*height),sel=filterTypes[0];for(let y=0;y<height;y++){if(filterTypes.length>1){let min=1/0;for(let i=0;i<filterTypes.length;i++){let sum=filterSums[filterTypes[i]](pxData,pxPos,byteWidth,bpp);if(sum<min)sel=filterTypes[i],min=sum}}rawData[rawPos]=sel,rawPos++,filters[sel](pxData,pxPos,byteWidth,rawData,rawPos,bpp),rawPos+=byteWidth,pxPos+=byteWidth}return rawData}});var require_packer=__commonJS(function(exports,module){var constants=require_constants(),CrcStream=require_crc(),bitPacker=require_bitpacker(),filter=require_filter_pack(),zlib=__require("zlib"),Packer=module.exports=function(options){if(this._options=options,options.deflateChunkSize=options.deflateChunkSize||32768,options.deflateLevel=options.deflateLevel!=null?options.deflateLevel:9,options.deflateStrategy=options.deflateStrategy!=null?options.deflateStrategy:3,options.inputHasAlpha=options.inputHasAlpha!=null?options.inputHasAlpha:!0,options.deflateFactory=options.deflateFactory||zlib.createDeflate,options.bitDepth=options.bitDepth||8,options.colorType=typeof options.colorType==="number"?options.colorType:constants.COLORTYPE_COLOR_ALPHA,options.inputColorType=typeof options.inputColorType==="number"?options.inputColorType:constants.COLORTYPE_COLOR_ALPHA,[constants.COLORTYPE_GRAYSCALE,constants.COLORTYPE_COLOR,constants.COLORTYPE_COLOR_ALPHA,constants.COLORTYPE_ALPHA].indexOf(options.colorType)===-1)throw Error("option color type:"+options.colorType+" is not supported at present");if([constants.COLORTYPE_GRAYSCALE,constants.COLORTYPE_COLOR,constants.COLORTYPE_COLOR_ALPHA,constants.COLORTYPE_ALPHA].indexOf(options.inputColorType)===-1)throw Error("option input color type:"+options.inputColorType+" is not supported at present");if(options.bitDepth!==8&&options.bitDepth!==16)throw Error("option bit depth:"+options.bitDepth+" is not supported at present")};Packer.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};Packer.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};Packer.prototype.filterData=function(data,width,height){let packedData=bitPacker(data,width,height,this._options),bpp=constants.COLORTYPE_TO_BPP_MAP[this._options.colorType];return filter(packedData,width,height,this._options,bpp)};Packer.prototype._packChunk=function(type,data){let len=data?data.length:0,buf=Buffer.alloc(len+12);if(buf.writeUInt32BE(len,0),buf.writeUInt32BE(type,4),data)data.copy(buf,8);return buf.writeInt32BE(CrcStream.crc32(buf.slice(4,buf.length-4)),buf.length-4),buf};Packer.prototype.packGAMA=function(gamma){let buf=Buffer.alloc(4);return buf.writeUInt32BE(Math.floor(gamma*constants.GAMMA_DIVISION),0),this._packChunk(constants.TYPE_gAMA,buf)};Packer.prototype.packIHDR=function(width,height){let buf=Buffer.alloc(13);return buf.writeUInt32BE(width,0),buf.writeUInt32BE(height,4),buf[8]=this._options.bitDepth,buf[9]=this._options.colorType,buf[10]=0,buf[11]=0,buf[12]=0,this._packChunk(constants.TYPE_IHDR,buf)};Packer.prototype.packIDAT=function(data){return this._packChunk(constants.TYPE_IDAT,data)};Packer.prototype.packIEND=function(){return this._packChunk(constants.TYPE_IEND,null)}});var require_packer_async=__commonJS(function(exports,module){var util=__require("util"),Stream=__require("stream"),constants=require_constants(),Packer=require_packer(),PackerAsync=module.exports=function(opt){Stream.call(this);let options=opt||{};this._packer=new Packer(options),this._deflate=this._packer.createDeflate(),this.readable=!0};util.inherits(PackerAsync,Stream);PackerAsync.prototype.pack=function(data,width,height,gamma){if(this.emit("data",Buffer.from(constants.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(width,height)),gamma)this.emit("data",this._packer.packGAMA(gamma));let filteredData=this._packer.filterData(data,width,height);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(compressedData){this.emit("data",this._packer.packIDAT(compressedData))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(filteredData)}});var require_sync_inflate=__commonJS(function(exports,module){var assert=__require("assert").ok,zlib=__require("zlib"),util=__require("util"),kMaxLength=__require("buffer").kMaxLength;function Inflate(opts){if(!(this instanceof Inflate))return new Inflate(opts);if(opts&&opts.chunkSize<zlib.Z_MIN_CHUNK)opts.chunkSize=zlib.Z_MIN_CHUNK;if(zlib.Inflate.call(this,opts),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,opts&&opts.maxLength!=null)this._maxLength=opts.maxLength}function createInflate(opts){return new Inflate(opts)}function _close(engine,callback){if(callback)process.nextTick(callback);if(!engine._handle)return;engine._handle.close(),engine._handle=null}Inflate.prototype._processChunk=function(chunk,flushFlag,asyncCb){if(typeof asyncCb==="function")return zlib.Inflate._processChunk.call(this,chunk,flushFlag,asyncCb);let self=this,availInBefore=chunk&&chunk.length,availOutBefore=this._chunkSize-this._offset,leftToInflate=this._maxLength,inOff=0,buffers=[],nread=0,error;this.on("error",function(err){error=err});function handleChunk(availInAfter,availOutAfter){if(self._hadError)return;let have=availOutBefore-availOutAfter;if(assert(have>=0,"have should not go down"),have>0){let out=self._buffer.slice(self._offset,self._offset+have);if(self._offset+=have,out.length>leftToInflate)out=out.slice(0,leftToInflate);if(buffers.push(out),nread+=out.length,leftToInflate-=out.length,leftToInflate===0)return!1}if(availOutAfter===0||self._offset>=self._chunkSize)availOutBefore=self._chunkSize,self._offset=0,self._buffer=Buffer.allocUnsafe(self._chunkSize);if(availOutAfter===0)return inOff+=availInBefore-availInAfter,availInBefore=availInAfter,!0;return!1}assert(this._handle,"zlib binding closed");let res;do res=this._handle.writeSync(flushFlag,chunk,inOff,availInBefore,this._buffer,this._offset,availOutBefore),res=res||this._writeState;while(!this._hadError&&handleChunk(res[0],res[1]));if(this._hadError)throw error;if(nread>=kMaxLength)throw _close(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+kMaxLength.toString(16)+" bytes");let buf=Buffer.concat(buffers,nread);return _close(this),buf};util.inherits(Inflate,zlib.Inflate);function zlibBufferSync(engine,buffer){if(typeof buffer==="string")buffer=Buffer.from(buffer);if(!(buffer instanceof Buffer))throw TypeError("Not a string or buffer");let flushFlag=engine._finishFlushFlag;if(flushFlag==null)flushFlag=zlib.Z_FINISH;return engine._processChunk(buffer,flushFlag)}function inflateSync(buffer,opts){return zlibBufferSync(new Inflate(opts),buffer)}module.exports=exports=inflateSync;exports.Inflate=Inflate;exports.createInflate=createInflate;exports.inflateSync=inflateSync});var require_sync_reader=__commonJS(function(exports,module){var SyncReader=module.exports=function(buffer){this._buffer=buffer,this._reads=[]};SyncReader.prototype.read=function(length,callback){this._reads.push({length:Math.abs(length),allowLess:length<0,func:callback})};SyncReader.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let read=this._reads[0];if(this._buffer.length&&(this._buffer.length>=read.length||read.allowLess)){this._reads.shift();let buf=this._buffer;this._buffer=buf.slice(read.length),read.func.call(this,buf.slice(0,read.length))}else break}if(this._reads.length>0)throw Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw Error("unrecognised content at end of stream")}});var require_filter_parse_sync=__commonJS(function(exports){var SyncReader=require_sync_reader(),Filter=require_filter_parse();exports.process=function(inBuffer,bitmapInfo){let outBuffers=[],reader=new SyncReader(inBuffer);return new Filter(bitmapInfo,{read:reader.read.bind(reader),write:function(bufferPart){outBuffers.push(bufferPart)},complete:function(){}}).start(),reader.process(),Buffer.concat(outBuffers)}});var require_parser_sync=__commonJS(function(exports,module){var hasSyncZlib=!0,zlib=__require("zlib"),inflateSync=require_sync_inflate();if(!zlib.deflateSync)hasSyncZlib=!1;var SyncReader=require_sync_reader(),FilterSync=require_filter_parse_sync(),Parser=require_parser(),bitmapper=require_bitmapper(),formatNormaliser=require_format_normaliser();module.exports=function(buffer,options){if(!hasSyncZlib)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let err;function handleError(_err_){err=_err_}let metaData;function handleMetaData(_metaData_){metaData=_metaData_}function handleTransColor(transColor){metaData.transColor=transColor}function handlePalette(palette){metaData.palette=palette}function handleSimpleTransparency(){metaData.alpha=!0}let gamma;function handleGamma(_gamma_){gamma=_gamma_}let inflateDataList=[];function handleInflateData(inflatedData){inflateDataList.push(inflatedData)}let reader=new SyncReader(buffer);if(new Parser(options,{read:reader.read.bind(reader),error:handleError,metadata:handleMetaData,gamma:handleGamma,palette:handlePalette,transColor:handleTransColor,inflateData:handleInflateData,simpleTransparency:handleSimpleTransparency}).start(),reader.process(),err)throw err;let inflateData=Buffer.concat(inflateDataList);inflateDataList.length=0;let inflatedData;if(metaData.interlace)inflatedData=zlib.inflateSync(inflateData);else{let imageSize=((metaData.width*metaData.bpp*metaData.depth+7>>3)+1)*metaData.height;inflatedData=inflateSync(inflateData,{chunkSize:imageSize,maxLength:imageSize})}if(inflateData=null,!inflatedData||!inflatedData.length)throw Error("bad png - invalid inflate data response");let unfilteredData=FilterSync.process(inflatedData,metaData);inflateData=null;let bitmapData=bitmapper.dataToBitMap(unfilteredData,metaData);unfilteredData=null;let normalisedBitmapData=formatNormaliser(bitmapData,metaData,options.skipRescale);return metaData.data=normalisedBitmapData,metaData.gamma=gamma||0,metaData}});var require_packer_sync=__commonJS(function(exports,module){var hasSyncZlib=!0,zlib=__require("zlib");if(!zlib.deflateSync)hasSyncZlib=!1;var constants=require_constants(),Packer=require_packer();module.exports=function(metaData,opt){if(!hasSyncZlib)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let packer=new Packer(opt||{}),chunks=[];if(chunks.push(Buffer.from(constants.PNG_SIGNATURE)),chunks.push(packer.packIHDR(metaData.width,metaData.height)),metaData.gamma)chunks.push(packer.packGAMA(metaData.gamma));let filteredData=packer.filterData(metaData.data,metaData.width,metaData.height),compressedData=zlib.deflateSync(filteredData,packer.getDeflateOptions());if(filteredData=null,!compressedData||!compressedData.length)throw Error("bad png - invalid compressed data response");return chunks.push(packer.packIDAT(compressedData)),chunks.push(packer.packIEND()),Buffer.concat(chunks)}});var require_png_sync=__commonJS(function(exports){var parse=require_parser_sync(),pack=require_packer_sync();exports.read=function(buffer,options){return parse(buffer,options||{})};exports.write=function(png,options){return pack(png,options)}});var require_png=__commonJS(function(exports){var util=__require("util"),Stream=__require("stream"),Parser=require_parser_async(),Packer=require_packer_async(),PNGSync=require_png_sync(),PNG=exports.PNG=function(options){if(Stream.call(this),options=options||{},this.width=options.width|0,this.height=options.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,options.fill&&this.data)this.data.fill(0);this.gamma=0,this.readable=this.writable=!0,this._parser=new Parser(options),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(data){this.data=data,this.emit("parsed",data)}.bind(this)),this._packer=new Packer(options),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};util.inherits(PNG,Stream);PNG.sync=PNGSync;PNG.prototype.pack=function(){if(!this.data||!this.data.length)return this.emit("error","No data provided"),this;return process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this};PNG.prototype.parse=function(data,callback){if(callback){let onParsed,onError;onParsed=function(parsedData){this.removeListener("error",onError),this.data=parsedData,callback(null,this)}.bind(this),onError=function(err){this.removeListener("parsed",onParsed),callback(err,null)}.bind(this),this.once("parsed",onParsed),this.once("error",onError)}return this.end(data),this};PNG.prototype.write=function(data){return this._parser.write(data),!0};PNG.prototype.end=function(data){this._parser.end(data)};PNG.prototype._metadata=function(metadata){this.width=metadata.width,this.height=metadata.height,this.emit("metadata",metadata)};PNG.prototype._gamma=function(gamma){this.gamma=gamma};PNG.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable)this.emit("close")};PNG.bitblt=function(src,dst,srcX,srcY,width,height,deltaX,deltaY){if(srcX|=0,srcY|=0,width|=0,height|=0,deltaX|=0,deltaY|=0,srcX>src.width||srcY>src.height||srcX+width>src.width||srcY+height>src.height)throw Error("bitblt reading outside image");if(deltaX>dst.width||deltaY>dst.height||deltaX+width>dst.width||deltaY+height>dst.height)throw Error("bitblt writing outside image");for(let y=0;y<height;y++)src.data.copy(dst.data,(deltaY+y)*dst.width+deltaX<<2,(srcY+y)*src.width+srcX<<2,(srcY+y)*src.width+srcX+width<<2)};PNG.prototype.bitblt=function(dst,srcX,srcY,width,height,deltaX,deltaY){return PNG.bitblt(this,dst,srcX,srcY,width,height,deltaX,deltaY),this};PNG.adjustGamma=function(src){if(src.gamma){for(let y=0;y<src.height;y++)for(let x=0;x<src.width;x++){let idx=src.width*y+x<<2;for(let i=0;i<3;i++){let sample=src.data[idx+i]/255;sample=Math.pow(sample,0.45454545454545453/src.gamma),src.data[idx+i]=Math.round(sample*255)}}src.gamma=0}};PNG.prototype.adjustGamma=function(){PNG.adjustGamma(this)}});var require_react_development=__commonJS(function(exports,module){(function(){function defineDeprecationWarning(methodName,info){Object.defineProperty(Component.prototype,methodName,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",info[0],info[1])}})}function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!=="object")return null;return maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"],typeof maybeIterable==="function"?maybeIterable:null}function warnNoop(publicInstance,callerName){publicInstance=(publicInstance=publicInstance.constructor)&&(publicInstance.displayName||publicInstance.name)||"ReactClass";var warningKey=publicInstance+"."+callerName;didWarnStateUpdateForUnmountedComponent[warningKey]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",callerName,publicInstance),didWarnStateUpdateForUnmountedComponent[warningKey]=!0)}function Component(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}function ComponentDummy(){}function PureComponent(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}function noop(){}function testStringCoercion(value){return""+value}function checkKeyStringCoercion(value){try{testStringCoercion(value);var JSCompiler_inline_result=!1}catch(e){JSCompiler_inline_result=!0}if(JSCompiler_inline_result){JSCompiler_inline_result=console;var JSCompiler_temp_const=JSCompiler_inline_result.error,JSCompiler_inline_result$jscomp$0=typeof Symbol==="function"&&Symbol.toStringTag&&value[Symbol.toStringTag]||value.constructor.name||"Object";return JSCompiler_temp_const.call(JSCompiler_inline_result,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",JSCompiler_inline_result$jscomp$0),testStringCoercion(value)}}function getComponentNameFromType(type){if(type==null)return null;if(typeof type==="function")return type.$$typeof===REACT_CLIENT_REFERENCE?null:type.displayName||type.name||null;if(typeof type==="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList";case REACT_ACTIVITY_TYPE:return"Activity"}if(typeof type==="object")switch(typeof type.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),type.$$typeof){case REACT_PORTAL_TYPE:return"Portal";case REACT_CONTEXT_TYPE:return type.displayName||"Context";case REACT_CONSUMER_TYPE:return(type._context.displayName||"Context")+".Consumer";case REACT_FORWARD_REF_TYPE:var innerType=type.render;return type=type.displayName,type||(type=innerType.displayName||innerType.name||"",type=type!==""?"ForwardRef("+type+")":"ForwardRef"),type;case REACT_MEMO_TYPE:return innerType=type.displayName||null,innerType!==null?innerType:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:innerType=type._payload,type=type._init;try{return getComponentNameFromType(type(innerType))}catch(x){}}return null}function getTaskName(type){if(type===REACT_FRAGMENT_TYPE)return"<>";if(typeof type==="object"&&type!==null&&type.$$typeof===REACT_LAZY_TYPE)return"<...>";try{var name=getComponentNameFromType(type);return name?"<"+name+">":"<...>"}catch(x){return"<...>"}}function getOwner(){var dispatcher=ReactSharedInternals.A;return dispatcher===null?null:dispatcher.getOwner()}function UnknownOwner(){return Error("react-stack-top-frame")}function hasValidKey(config){if(hasOwnProperty.call(config,"key")){var getter=Object.getOwnPropertyDescriptor(config,"key").get;if(getter&&getter.isReactWarning)return!1}return config.key!==void 0}function defineKeyPropWarningGetter(props,displayName){function warnAboutAccessingKey(){specialPropKeyWarningShown||(specialPropKeyWarningShown=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",displayName))}warnAboutAccessingKey.isReactWarning=!0,Object.defineProperty(props,"key",{get:warnAboutAccessingKey,configurable:!0})}function elementRefGetterWithDeprecationWarning(){var componentName=getComponentNameFromType(this.type);return didWarnAboutElementRef[componentName]||(didWarnAboutElementRef[componentName]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),componentName=this.props.ref,componentName!==void 0?componentName:null}function ReactElement(type,key,props,owner,debugStack,debugTask){var refProp=props.ref;return type={$$typeof:REACT_ELEMENT_TYPE,type,key,props,_owner:owner},(refProp!==void 0?refProp:null)!==null?Object.defineProperty(type,"ref",{enumerable:!1,get:elementRefGetterWithDeprecationWarning}):Object.defineProperty(type,"ref",{enumerable:!1,value:null}),type._store={},Object.defineProperty(type._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(type,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(type,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:debugStack}),Object.defineProperty(type,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:debugTask}),Object.freeze&&(Object.freeze(type.props),Object.freeze(type)),type}function cloneAndReplaceKey(oldElement,newKey){return newKey=ReactElement(oldElement.type,newKey,oldElement.props,oldElement._owner,oldElement._debugStack,oldElement._debugTask),oldElement._store&&(newKey._store.validated=oldElement._store.validated),newKey}function validateChildKeys(node){isValidElement(node)?node._store&&(node._store.validated=1):typeof node==="object"&&node!==null&&node.$$typeof===REACT_LAZY_TYPE&&(node._payload.status==="fulfilled"?isValidElement(node._payload.value)&&node._payload.value._store&&(node._payload.value._store.validated=1):node._store&&(node._store.validated=1))}function isValidElement(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE}function escape(key){var escaperLookup={"=":"=0",":":"=2"};return"$"+key.replace(/[=:]/g,function(match){return escaperLookup[match]})}function getElementKey(element,index){return typeof element==="object"&&element!==null&&element.key!=null?(checkKeyStringCoercion(element.key),escape(""+element.key)):index.toString(36)}function resolveThenable(thenable){switch(thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason;default:switch(typeof thenable.status==="string"?thenable.then(noop,noop):(thenable.status="pending",thenable.then(function(fulfilledValue){thenable.status==="pending"&&(thenable.status="fulfilled",thenable.value=fulfilledValue)},function(error){thenable.status==="pending"&&(thenable.status="rejected",thenable.reason=error)})),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason}}throw thenable}function mapIntoArray(children,array,escapedPrefix,nameSoFar,callback){var type=typeof children;if(type==="undefined"||type==="boolean")children=null;var invokeCallback=!1;if(children===null)invokeCallback=!0;else switch(type){case"bigint":case"string":case"number":invokeCallback=!0;break;case"object":switch(children.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:invokeCallback=!0;break;case REACT_LAZY_TYPE:return invokeCallback=children._init,mapIntoArray(invokeCallback(children._payload),array,escapedPrefix,nameSoFar,callback)}}if(invokeCallback){invokeCallback=children,callback=callback(invokeCallback);var childKey=nameSoFar===""?"."+getElementKey(invokeCallback,0):nameSoFar;return isArrayImpl(callback)?(escapedPrefix="",childKey!=null&&(escapedPrefix=childKey.replace(userProvidedKeyEscapeRegex,"$&/")+"/"),mapIntoArray(callback,array,escapedPrefix,"",function(c){return c})):callback!=null&&(isValidElement(callback)&&(callback.key!=null&&(invokeCallback&&invokeCallback.key===callback.key||checkKeyStringCoercion(callback.key)),escapedPrefix=cloneAndReplaceKey(callback,escapedPrefix+(callback.key==null||invokeCallback&&invokeCallback.key===callback.key?"":(""+callback.key).replace(userProvidedKeyEscapeRegex,"$&/")+"/")+childKey),nameSoFar!==""&&invokeCallback!=null&&isValidElement(invokeCallback)&&invokeCallback.key==null&&invokeCallback._store&&!invokeCallback._store.validated&&(escapedPrefix._store.validated=2),callback=escapedPrefix),array.push(callback)),1}if(invokeCallback=0,childKey=nameSoFar===""?".":nameSoFar+":",isArrayImpl(children))for(var i=0;i<children.length;i++)nameSoFar=children[i],type=childKey+getElementKey(nameSoFar,i),invokeCallback+=mapIntoArray(nameSoFar,array,escapedPrefix,type,callback);else if(i=getIteratorFn(children),typeof i==="function")for(i===children.entries&&(didWarnAboutMaps||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),didWarnAboutMaps=!0),children=i.call(children),i=0;!(nameSoFar=children.next()).done;)nameSoFar=nameSoFar.value,type=childKey+getElementKey(nameSoFar,i++),invokeCallback+=mapIntoArray(nameSoFar,array,escapedPrefix,type,callback);else if(type==="object"){if(typeof children.then==="function")return mapIntoArray(resolveThenable(children),array,escapedPrefix,nameSoFar,callback);throw array=String(children),Error("Objects are not valid as a React child (found: "+(array==="[object Object]"?"object with keys {"+Object.keys(children).join(", ")+"}":array)+"). If you meant to render a collection of children, use an array instead.")}return invokeCallback}function mapChildren(children,func,context){if(children==null)return children;var result=[],count=0;return mapIntoArray(children,result,"","",function(child){return func.call(context,child,count++)}),result}function lazyInitializer(payload){if(payload._status===-1){var ioInfo=payload._ioInfo;ioInfo!=null&&(ioInfo.start=ioInfo.end=performance.now()),ioInfo=payload._result;var thenable=ioInfo();if(thenable.then(function(moduleObject){if(payload._status===0||payload._status===-1){payload._status=1,payload._result=moduleObject;var _ioInfo=payload._ioInfo;_ioInfo!=null&&(_ioInfo.end=performance.now()),thenable.status===void 0&&(thenable.status="fulfilled",thenable.value=moduleObject)}},function(error){if(payload._status===0||payload._status===-1){payload._status=2,payload._result=error;var _ioInfo2=payload._ioInfo;_ioInfo2!=null&&(_ioInfo2.end=performance.now()),thenable.status===void 0&&(thenable.status="rejected",thenable.reason=error)}}),ioInfo=payload._ioInfo,ioInfo!=null){ioInfo.value=thenable;var displayName=thenable.displayName;typeof displayName==="string"&&(ioInfo.name=displayName)}payload._status===-1&&(payload._status=0,payload._result=thenable)}if(payload._status===1)return ioInfo=payload._result,ioInfo===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
import{isCssIdent,sanitizeCssTokenValue,neutralizeCssText,sanitizeGoogleFontSpec,isComponentNode,isSnippetInstance,isParamRef,isTextNode,repoKey,PARAM_TAG_REF,STATIC_REF,nodeShape,isNode,mapComponentTypes,ScreenSchema,resolveSnippetArgs,substituteSnippetParams,applySnippetOverrides,applySnippetExtraClassName,spacingCssTokens,ThemeSchema,typesetCss}from"./chunk-w40pqmyz.js";import{__toESM,__commonJS,__exportCjs,__require}from"./chunk-2smsg2ct.js";var require_react_development=__commonJS(function(exports,module){(function(){function defineDeprecationWarning(methodName,info){Object.defineProperty(Component.prototype,methodName,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",info[0],info[1])}})}function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!=="object")return null;return maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"],typeof maybeIterable==="function"?maybeIterable:null}function warnNoop(publicInstance,callerName){publicInstance=(publicInstance=publicInstance.constructor)&&(publicInstance.displayName||publicInstance.name)||"ReactClass";var warningKey=publicInstance+"."+callerName;didWarnStateUpdateForUnmountedComponent[warningKey]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",callerName,publicInstance),didWarnStateUpdateForUnmountedComponent[warningKey]=!0)}function Component(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}function ComponentDummy(){}function PureComponent(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}function noop(){}function testStringCoercion(value){return""+value}function checkKeyStringCoercion(value){try{testStringCoercion(value);var JSCompiler_inline_result=!1}catch(e){JSCompiler_inline_result=!0}if(JSCompiler_inline_result){JSCompiler_inline_result=console;var JSCompiler_temp_const=JSCompiler_inline_result.error,JSCompiler_inline_result$jscomp$0=typeof Symbol==="function"&&Symbol.toStringTag&&value[Symbol.toStringTag]||value.constructor.name||"Object";return JSCompiler_temp_const.call(JSCompiler_inline_result,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",JSCompiler_inline_result$jscomp$0),testStringCoercion(value)}}function getComponentNameFromType(type){if(type==null)return null;if(typeof type==="function")return type.$$typeof===REACT_CLIENT_REFERENCE?null:type.displayName||type.name||null;if(typeof type==="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList";case REACT_ACTIVITY_TYPE:return"Activity"}if(typeof type==="object")switch(typeof type.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),type.$$typeof){case REACT_PORTAL_TYPE:return"Portal";case REACT_CONTEXT_TYPE:return type.displayName||"Context";case REACT_CONSUMER_TYPE:return(type._context.displayName||"Context")+".Consumer";case REACT_FORWARD_REF_TYPE:var innerType=type.render;return type=type.displayName,type||(type=innerType.displayName||innerType.name||"",type=type!==""?"ForwardRef("+type+")":"ForwardRef"),type;case REACT_MEMO_TYPE:return innerType=type.displayName||null,innerType!==null?innerType:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:innerType=type._payload,type=type._init;try{return getComponentNameFromType(type(innerType))}catch(x){}}return null}function getTaskName(type){if(type===REACT_FRAGMENT_TYPE)return"<>";if(typeof type==="object"&&type!==null&&type.$$typeof===REACT_LAZY_TYPE)return"<...>";try{var name=getComponentNameFromType(type);return name?"<"+name+">":"<...>"}catch(x){return"<...>"}}function getOwner(){var dispatcher=ReactSharedInternals.A;return dispatcher===null?null:dispatcher.getOwner()}function UnknownOwner(){return Error("react-stack-top-frame")}function hasValidKey(config){if(hasOwnProperty.call(config,"key")){var getter=Object.getOwnPropertyDescriptor(config,"key").get;if(getter&&getter.isReactWarning)return!1}return config.key!==void 0}function defineKeyPropWarningGetter(props,displayName){function warnAboutAccessingKey(){specialPropKeyWarningShown||(specialPropKeyWarningShown=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",displayName))}warnAboutAccessingKey.isReactWarning=!0,Object.defineProperty(props,"key",{get:warnAboutAccessingKey,configurable:!0})}function elementRefGetterWithDeprecationWarning(){var componentName=getComponentNameFromType(this.type);return didWarnAboutElementRef[componentName]||(didWarnAboutElementRef[componentName]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),componentName=this.props.ref,componentName!==void 0?componentName:null}function ReactElement(type,key,props,owner,debugStack,debugTask){var refProp=props.ref;return type={$$typeof:REACT_ELEMENT_TYPE,type,key,props,_owner:owner},(refProp!==void 0?refProp:null)!==null?Object.defineProperty(type,"ref",{enumerable:!1,get:elementRefGetterWithDeprecationWarning}):Object.defineProperty(type,"ref",{enumerable:!1,value:null}),type._store={},Object.defineProperty(type._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(type,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(type,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:debugStack}),Object.defineProperty(type,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:debugTask}),Object.freeze&&(Object.freeze(type.props),Object.freeze(type)),type}function cloneAndReplaceKey(oldElement,newKey){return newKey=ReactElement(oldElement.type,newKey,oldElement.props,oldElement._owner,oldElement._debugStack,oldElement._debugTask),oldElement._store&&(newKey._store.validated=oldElement._store.validated),newKey}function validateChildKeys(node){isValidElement(node)?node._store&&(node._store.validated=1):typeof node==="object"&&node!==null&&node.$$typeof===REACT_LAZY_TYPE&&(node._payload.status==="fulfilled"?isValidElement(node._payload.value)&&node._payload.value._store&&(node._payload.value._store.validated=1):node._store&&(node._store.validated=1))}function isValidElement(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE}function escape(key){var escaperLookup={"=":"=0",":":"=2"};return"$"+key.replace(/[=:]/g,function(match){return escaperLookup[match]})}function getElementKey(element,index){return typeof element==="object"&&element!==null&&element.key!=null?(checkKeyStringCoercion(element.key),escape(""+element.key)):index.toString(36)}function resolveThenable(thenable){switch(thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason;default:switch(typeof thenable.status==="string"?thenable.then(noop,noop):(thenable.status="pending",thenable.then(function(fulfilledValue){thenable.status==="pending"&&(thenable.status="fulfilled",thenable.value=fulfilledValue)},function(error){thenable.status==="pending"&&(thenable.status="rejected",thenable.reason=error)})),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason}}throw thenable}function mapIntoArray(children,array,escapedPrefix,nameSoFar,callback){var type=typeof children;if(type==="undefined"||type==="boolean")children=null;var invokeCallback=!1;if(children===null)invokeCallback=!0;else switch(type){case"bigint":case"string":case"number":invokeCallback=!0;break;case"object":switch(children.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:invokeCallback=!0;break;case REACT_LAZY_TYPE:return invokeCallback=children._init,mapIntoArray(invokeCallback(children._payload),array,escapedPrefix,nameSoFar,callback)}}if(invokeCallback){invokeCallback=children,callback=callback(invokeCallback);var childKey=nameSoFar===""?"."+getElementKey(invokeCallback,0):nameSoFar;return isArrayImpl(callback)?(escapedPrefix="",childKey!=null&&(escapedPrefix=childKey.replace(userProvidedKeyEscapeRegex,"$&/")+"/"),mapIntoArray(callback,array,escapedPrefix,"",function(c){return c})):callback!=null&&(isValidElement(callback)&&(callback.key!=null&&(invokeCallback&&invokeCallback.key===callback.key||checkKeyStringCoercion(callback.key)),escapedPrefix=cloneAndReplaceKey(callback,escapedPrefix+(callback.key==null||invokeCallback&&invokeCallback.key===callback.key?"":(""+callback.key).replace(userProvidedKeyEscapeRegex,"$&/")+"/")+childKey),nameSoFar!==""&&invokeCallback!=null&&isValidElement(invokeCallback)&&invokeCallback.key==null&&invokeCallback._store&&!invokeCallback._store.validated&&(escapedPrefix._store.validated=2),callback=escapedPrefix),array.push(callback)),1}if(invokeCallback=0,childKey=nameSoFar===""?".":nameSoFar+":",isArrayImpl(children))for(var i=0;i<children.length;i++)nameSoFar=children[i],type=childKey+getElementKey(nameSoFar,i),invokeCallback+=mapIntoArray(nameSoFar,array,escapedPrefix,type,callback);else if(i=getIteratorFn(children),typeof i==="function")for(i===children.entries&&(didWarnAboutMaps||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),didWarnAboutMaps=!0),children=i.call(children),i=0;!(nameSoFar=children.next()).done;)nameSoFar=nameSoFar.value,type=childKey+getElementKey(nameSoFar,i++),invokeCallback+=mapIntoArray(nameSoFar,array,escapedPrefix,type,callback);else if(type==="object"){if(typeof children.then==="function")return mapIntoArray(resolveThenable(children),array,escapedPrefix,nameSoFar,callback);throw array=String(children),Error("Objects are not valid as a React child (found: "+(array==="[object Object]"?"object with keys {"+Object.keys(children).join(", ")+"}":array)+"). If you meant to render a collection of children, use an array instead.")}return invokeCallback}function mapChildren(children,func,context){if(children==null)return children;var result=[],count=0;return mapIntoArray(children,result,"","",function(child){return func.call(context,child,count++)}),result}function lazyInitializer(payload){if(payload._status===-1){var ioInfo=payload._ioInfo;ioInfo!=null&&(ioInfo.start=ioInfo.end=performance.now()),ioInfo=payload._result;var thenable=ioInfo();if(thenable.then(function(moduleObject){if(payload._status===0||payload._status===-1){payload._status=1,payload._result=moduleObject;var _ioInfo=payload._ioInfo;_ioInfo!=null&&(_ioInfo.end=performance.now()),thenable.status===void 0&&(thenable.status="fulfilled",thenable.value=moduleObject)}},function(error){if(payload._status===0||payload._status===-1){payload._status=2,payload._result=error;var _ioInfo2=payload._ioInfo;_ioInfo2!=null&&(_ioInfo2.end=performance.now()),thenable.status===void 0&&(thenable.status="rejected",thenable.reason=error)}}),ioInfo=payload._ioInfo,ioInfo!=null){ioInfo.value=thenable;var displayName=thenable.displayName;typeof displayName==="string"&&(ioInfo.name=displayName)}payload._status===-1&&(payload._status=0,payload._result=thenable)}if(payload._status===1)return ioInfo=payload._result,ioInfo===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
3
3
|
|
|
4
4
|
Your code should look like:
|
|
5
5
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -11,7 +11,7 @@ Your code should look like:
|
|
|
11
11
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
12
12
|
2. You might be breaking the Rules of Hooks
|
|
13
13
|
3. You might have more than one copy of React in the same app
|
|
14
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),dispatcher}function releaseAsyncTransition(){ReactSharedInternals.asyncTransitions--}function enqueueTask(task){if(enqueueTaskImpl===null)try{var requireString=("require"+Math.random()).slice(0,7);enqueueTaskImpl=(module&&module[requireString]).call(module,"timers").setImmediate}catch(_err){enqueueTaskImpl=function(callback){didWarnAboutMessageChannel===!1&&(didWarnAboutMessageChannel=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var channel=new MessageChannel;channel.port1.onmessage=callback,channel.port2.postMessage(void 0)}}return enqueueTaskImpl(task)}function aggregateErrors(errors){return 1<errors.length&&typeof AggregateError==="function"?AggregateError(errors):errors[0]}function popActScope(prevActQueue,prevActScopeDepth){prevActScopeDepth!==actScopeDepth-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),actScopeDepth=prevActScopeDepth}function recursivelyFlushAsyncActWork(returnValue,resolve,reject){var queue=ReactSharedInternals.actQueue;if(queue!==null)if(queue.length!==0)try{flushActQueue(queue),enqueueTask(function(){return recursivelyFlushAsyncActWork(returnValue,resolve,reject)});return}catch(error){ReactSharedInternals.thrownErrors.push(error)}else ReactSharedInternals.actQueue=null;0<ReactSharedInternals.thrownErrors.length?(queue=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,reject(queue)):resolve(returnValue)}function flushActQueue(queue){if(!isFlushing){isFlushing=!0;var i=0;try{for(;i<queue.length;i++){var callback=queue[i];do{ReactSharedInternals.didUsePromise=!1;var continuation=callback(!1);if(continuation!==null){if(ReactSharedInternals.didUsePromise){queue[i]=callback,queue.splice(0,i);return}callback=continuation}else break}while(1)}queue.length=0}catch(error){queue.splice(0,i+1),ReactSharedInternals.thrownErrors.push(error)}finally{isFlushing=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,didWarnStateUpdateForUnmountedComponent={},ReactNoopUpdateQueue={isMounted:function(){return!1},enqueueForceUpdate:function(publicInstance){warnNoop(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance){warnNoop(publicInstance,"replaceState")},enqueueSetState:function(publicInstance){warnNoop(publicInstance,"setState")}},assign=Object.assign,emptyObject={};Object.freeze(emptyObject),Component.prototype.isReactComponent={},Component.prototype.setState=function(partialState,callback){if(typeof partialState!=="object"&&typeof partialState!=="function"&&partialState!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")},Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")};var deprecatedAPIs={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(fnName in deprecatedAPIs)deprecatedAPIs.hasOwnProperty(fnName)&&defineDeprecationWarning(fnName,deprecatedAPIs[fnName]);ComponentDummy.prototype=Component.prototype,deprecatedAPIs=PureComponent.prototype=new ComponentDummy,deprecatedAPIs.constructor=PureComponent,assign(deprecatedAPIs,Component.prototype),deprecatedAPIs.isPureReactComponent=!0;var isArrayImpl=Array.isArray,REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference"),ReactSharedInternals={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},hasOwnProperty=Object.prototype.hasOwnProperty,createTask=console.createTask?console.createTask:function(){return null};deprecatedAPIs={react_stack_bottom_frame:function(callStackForError){return callStackForError()}};var specialPropKeyWarningShown,didWarnAboutOldJSXRuntime,didWarnAboutElementRef={},unknownOwnerDebugStack=deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs,UnknownOwner)(),unknownOwnerDebugTask=createTask(getTaskName(UnknownOwner)),didWarnAboutMaps=!1,userProvidedKeyEscapeRegex=/\/+/g,reportGlobalError=typeof reportError==="function"?reportError:function(error){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var event=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof error==="object"&&error!==null&&typeof error.message==="string"?String(error.message):String(error),error});if(!window.dispatchEvent(event))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",error);return}console.error(error)},didWarnAboutMessageChannel=!1,enqueueTaskImpl=null,actScopeDepth=0,didWarnNoAwaitAct=!1,isFlushing=!1,queueSeveralMicrotasks=typeof queueMicrotask==="function"?function(callback){queueMicrotask(function(){return queueMicrotask(callback)})}:enqueueTask;deprecatedAPIs=Object.freeze({__proto__:null,c:function(size){return resolveDispatcher().useMemoCache(size)}});var fnName={map:mapChildren,forEach:function(children,forEachFunc,forEachContext){mapChildren(children,function(){forEachFunc.apply(this,arguments)},forEachContext)},count:function(children){var n=0;return mapChildren(children,function(){n++}),n},toArray:function(children){return mapChildren(children,function(child){return child})||[]},only:function(children){if(!isValidElement(children))throw Error("React.Children.only expected to receive a single React element child.");return children}};exports.Activity=REACT_ACTIVITY_TYPE,exports.Children=fnName,exports.Component=Component,exports.Fragment=REACT_FRAGMENT_TYPE,exports.Profiler=REACT_PROFILER_TYPE,exports.PureComponent=PureComponent,exports.StrictMode=REACT_STRICT_MODE_TYPE,exports.Suspense=REACT_SUSPENSE_TYPE,exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ReactSharedInternals,exports.__COMPILER_RUNTIME=deprecatedAPIs,exports.act=function(callback){var prevActQueue=ReactSharedInternals.actQueue,prevActScopeDepth=actScopeDepth;actScopeDepth++;var queue=ReactSharedInternals.actQueue=prevActQueue!==null?prevActQueue:[],didAwaitActCall=!1;try{var result=callback()}catch(error){ReactSharedInternals.thrownErrors.push(error)}if(0<ReactSharedInternals.thrownErrors.length)throw popActScope(prevActQueue,prevActScopeDepth),callback=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,callback;if(result!==null&&typeof result==="object"&&typeof result.then==="function"){var thenable=result;return queueSeveralMicrotasks(function(){didAwaitActCall||didWarnNoAwaitAct||(didWarnNoAwaitAct=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(resolve,reject){didAwaitActCall=!0,thenable.then(function(returnValue){if(popActScope(prevActQueue,prevActScopeDepth),prevActScopeDepth===0){try{flushActQueue(queue),enqueueTask(function(){return recursivelyFlushAsyncActWork(returnValue,resolve,reject)})}catch(error$0){ReactSharedInternals.thrownErrors.push(error$0)}if(0<ReactSharedInternals.thrownErrors.length){var _thrownError=aggregateErrors(ReactSharedInternals.thrownErrors);ReactSharedInternals.thrownErrors.length=0,reject(_thrownError)}}else resolve(returnValue)},function(error){popActScope(prevActQueue,prevActScopeDepth),0<ReactSharedInternals.thrownErrors.length?(error=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,reject(error)):reject(error)})}}}var returnValue$jscomp$0=result;if(popActScope(prevActQueue,prevActScopeDepth),prevActScopeDepth===0&&(flushActQueue(queue),queue.length!==0&&queueSeveralMicrotasks(function(){didAwaitActCall||didWarnNoAwaitAct||(didWarnNoAwaitAct=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),ReactSharedInternals.actQueue=null),0<ReactSharedInternals.thrownErrors.length)throw callback=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,callback;return{then:function(resolve,reject){didAwaitActCall=!0,prevActScopeDepth===0?(ReactSharedInternals.actQueue=queue,enqueueTask(function(){return recursivelyFlushAsyncActWork(returnValue$jscomp$0,resolve,reject)})):resolve(returnValue$jscomp$0)}}},exports.cache=function(fn){return function(){return fn.apply(null,arguments)}},exports.cacheSignal=function(){return null},exports.captureOwnerStack=function(){var getCurrentStack=ReactSharedInternals.getCurrentStack;return getCurrentStack===null?null:getCurrentStack()},exports.cloneElement=function(element,config,children){if(element===null||element===void 0)throw Error("The argument must be a React element, but you passed "+element+".");var props=assign({},element.props),{key,_owner:owner}=element;if(config!=null){var JSCompiler_inline_result;a:{if(hasOwnProperty.call(config,"ref")&&(JSCompiler_inline_result=Object.getOwnPropertyDescriptor(config,"ref").get)&&JSCompiler_inline_result.isReactWarning){JSCompiler_inline_result=!1;break a}JSCompiler_inline_result=config.ref!==void 0}JSCompiler_inline_result&&(owner=getOwner()),hasValidKey(config)&&(checkKeyStringCoercion(config.key),key=""+config.key);for(propName in config)!hasOwnProperty.call(config,propName)||propName==="key"||propName==="__self"||propName==="__source"||propName==="ref"&&config.ref===void 0||(props[propName]=config[propName])}var propName=arguments.length-2;if(propName===1)props.children=children;else if(1<propName){JSCompiler_inline_result=Array(propName);for(var i=0;i<propName;i++)JSCompiler_inline_result[i]=arguments[i+2];props.children=JSCompiler_inline_result}props=ReactElement(element.type,key,props,owner,element._debugStack,element._debugTask);for(key=2;key<arguments.length;key++)validateChildKeys(arguments[key]);return props},exports.createContext=function(defaultValue){return defaultValue={$$typeof:REACT_CONTEXT_TYPE,_currentValue:defaultValue,_currentValue2:defaultValue,_threadCount:0,Provider:null,Consumer:null},defaultValue.Provider=defaultValue,defaultValue.Consumer={$$typeof:REACT_CONSUMER_TYPE,_context:defaultValue},defaultValue._currentRenderer=null,defaultValue._currentRenderer2=null,defaultValue},exports.createElement=function(type,config,children){for(var i=2;i<arguments.length;i++)validateChildKeys(arguments[i]);i={};var key=null;if(config!=null)for(propName in didWarnAboutOldJSXRuntime||!("__self"in config)||"key"in config||(didWarnAboutOldJSXRuntime=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),hasValidKey(config)&&(checkKeyStringCoercion(config.key),key=""+config.key),config)hasOwnProperty.call(config,propName)&&propName!=="key"&&propName!=="__self"&&propName!=="__source"&&(i[propName]=config[propName]);var childrenLength=arguments.length-2;if(childrenLength===1)i.children=children;else if(1<childrenLength){for(var childArray=Array(childrenLength),_i=0;_i<childrenLength;_i++)childArray[_i]=arguments[_i+2];Object.freeze&&Object.freeze(childArray),i.children=childArray}if(type&&type.defaultProps)for(propName in childrenLength=type.defaultProps,childrenLength)i[propName]===void 0&&(i[propName]=childrenLength[propName]);key&&defineKeyPropWarningGetter(i,typeof type==="function"?type.displayName||type.name||"Unknown":type);var propName=1e4>ReactSharedInternals.recentlyCreatedOwnerStacks++;return ReactElement(type,key,i,getOwner(),propName?Error("react-stack-top-frame"):unknownOwnerDebugStack,propName?createTask(getTaskName(type)):unknownOwnerDebugTask)},exports.createRef=function(){var refObject={current:null};return Object.seal(refObject),refObject},exports.forwardRef=function(render){render!=null&&render.$$typeof===REACT_MEMO_TYPE?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof render!=="function"?console.error("forwardRef requires a render function but was given %s.",render===null?"null":typeof render):render.length!==0&&render.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",render.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),render!=null&&render.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var elementType={$$typeof:REACT_FORWARD_REF_TYPE,render},ownName;return Object.defineProperty(elementType,"displayName",{enumerable:!1,configurable:!0,get:function(){return ownName},set:function(name){ownName=name,render.name||render.displayName||(Object.defineProperty(render,"name",{value:name}),render.displayName=name)}}),elementType},exports.isValidElement=isValidElement,exports.lazy=function(ctor){ctor={_status:-1,_result:ctor};var lazyType={$$typeof:REACT_LAZY_TYPE,_payload:ctor,_init:lazyInitializer},ioInfo={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return ctor._ioInfo=ioInfo,lazyType._debugInfo=[{awaited:ioInfo}],lazyType},exports.memo=function(type,compare){type==null&&console.error("memo: The first argument must be a component. Instead received: %s",type===null?"null":typeof type),compare={$$typeof:REACT_MEMO_TYPE,type,compare:compare===void 0?null:compare};var ownName;return Object.defineProperty(compare,"displayName",{enumerable:!1,configurable:!0,get:function(){return ownName},set:function(name){ownName=name,type.name||type.displayName||(Object.defineProperty(type,"name",{value:name}),type.displayName=name)}}),compare},exports.startTransition=function(scope){var prevTransition=ReactSharedInternals.T,currentTransition={};currentTransition._updatedFibers=new Set,ReactSharedInternals.T=currentTransition;try{var returnValue=scope(),onStartTransitionFinish=ReactSharedInternals.S;onStartTransitionFinish!==null&&onStartTransitionFinish(currentTransition,returnValue),typeof returnValue==="object"&&returnValue!==null&&typeof returnValue.then==="function"&&(ReactSharedInternals.asyncTransitions++,returnValue.then(releaseAsyncTransition,releaseAsyncTransition),returnValue.then(noop,reportGlobalError))}catch(error){reportGlobalError(error)}finally{prevTransition===null&¤tTransition._updatedFibers&&(scope=currentTransition._updatedFibers.size,currentTransition._updatedFibers.clear(),10<scope&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),prevTransition!==null&¤tTransition.types!==null&&(prevTransition.types!==null&&prevTransition.types!==currentTransition.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),prevTransition.types=currentTransition.types),ReactSharedInternals.T=prevTransition}},exports.unstable_useCacheRefresh=function(){return resolveDispatcher().useCacheRefresh()},exports.use=function(usable){return resolveDispatcher().use(usable)},exports.useActionState=function(action,initialState,permalink){return resolveDispatcher().useActionState(action,initialState,permalink)},exports.useCallback=function(callback,deps){return resolveDispatcher().useCallback(callback,deps)},exports.useContext=function(Context){var dispatcher=resolveDispatcher();return Context.$$typeof===REACT_CONSUMER_TYPE&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),dispatcher.useContext(Context)},exports.useDebugValue=function(value,formatterFn){return resolveDispatcher().useDebugValue(value,formatterFn)},exports.useDeferredValue=function(value,initialValue){return resolveDispatcher().useDeferredValue(value,initialValue)},exports.useEffect=function(create,deps){return create==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),resolveDispatcher().useEffect(create,deps)},exports.useEffectEvent=function(callback){return resolveDispatcher().useEffectEvent(callback)},exports.useId=function(){return resolveDispatcher().useId()},exports.useImperativeHandle=function(ref,create,deps){return resolveDispatcher().useImperativeHandle(ref,create,deps)},exports.useInsertionEffect=function(create,deps){return create==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),resolveDispatcher().useInsertionEffect(create,deps)},exports.useLayoutEffect=function(create,deps){return create==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),resolveDispatcher().useLayoutEffect(create,deps)},exports.useMemo=function(create,deps){return resolveDispatcher().useMemo(create,deps)},exports.useOptimistic=function(passthrough,reducer){return resolveDispatcher().useOptimistic(passthrough,reducer)},exports.useReducer=function(reducer,initialArg,init){return resolveDispatcher().useReducer(reducer,initialArg,init)},exports.useRef=function(initialValue){return resolveDispatcher().useRef(initialValue)},exports.useState=function(initialState){return resolveDispatcher().useState(initialState)},exports.useSyncExternalStore=function(subscribe,getSnapshot,getServerSnapshot){return resolveDispatcher().useSyncExternalStore(subscribe,getSnapshot,getServerSnapshot)},exports.useTransition=function(){return resolveDispatcher().useTransition()},exports.version="19.2.8",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var require_react_dom_development=__commonJS(function(exports){var React=__toESM(require_react_development());(function(){function noop(){}function testStringCoercion(value){return""+value}function createPortal$1(children,containerInfo,implementation){var key=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{testStringCoercion(key);var JSCompiler_inline_result=!1}catch(e){JSCompiler_inline_result=!0}return JSCompiler_inline_result&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&key[Symbol.toStringTag]||key.constructor.name||"Object"),testStringCoercion(key)),{$$typeof:REACT_PORTAL_TYPE,key:key==null?null:""+key,children,containerInfo,implementation}}function getCrossOriginStringAs(as,input){if(as==="font")return"";if(typeof input==="string")return input==="use-credentials"?input:""}function getValueDescriptorExpectingObjectForWarning(thing){return thing===null?"`null`":thing===void 0?"`undefined`":thing===""?"an empty string":'something with type "'+typeof thing+'"'}function getValueDescriptorExpectingEnumForWarning(thing){return thing===null?"`null`":thing===void 0?"`undefined`":thing===""?"an empty string":typeof thing==="string"?JSON.stringify(thing):typeof thing==="number"?"`"+thing+"`":'something with type "'+typeof thing+'"'}function resolveDispatcher(){var dispatcher=ReactSharedInternals.H;return dispatcher===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
14
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),dispatcher}function releaseAsyncTransition(){ReactSharedInternals.asyncTransitions--}function enqueueTask(task){if(enqueueTaskImpl===null)try{var requireString=("require"+Math.random()).slice(0,7);enqueueTaskImpl=(module&&module[requireString]).call(module,"timers").setImmediate}catch(_err){enqueueTaskImpl=function(callback){didWarnAboutMessageChannel===!1&&(didWarnAboutMessageChannel=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var channel=new MessageChannel;channel.port1.onmessage=callback,channel.port2.postMessage(void 0)}}return enqueueTaskImpl(task)}function aggregateErrors(errors){return 1<errors.length&&typeof AggregateError==="function"?AggregateError(errors):errors[0]}function popActScope(prevActQueue,prevActScopeDepth){prevActScopeDepth!==actScopeDepth-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),actScopeDepth=prevActScopeDepth}function recursivelyFlushAsyncActWork(returnValue,resolve,reject){var queue=ReactSharedInternals.actQueue;if(queue!==null)if(queue.length!==0)try{flushActQueue(queue),enqueueTask(function(){return recursivelyFlushAsyncActWork(returnValue,resolve,reject)});return}catch(error){ReactSharedInternals.thrownErrors.push(error)}else ReactSharedInternals.actQueue=null;0<ReactSharedInternals.thrownErrors.length?(queue=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,reject(queue)):resolve(returnValue)}function flushActQueue(queue){if(!isFlushing){isFlushing=!0;var i=0;try{for(;i<queue.length;i++){var callback=queue[i];do{ReactSharedInternals.didUsePromise=!1;var continuation=callback(!1);if(continuation!==null){if(ReactSharedInternals.didUsePromise){queue[i]=callback,queue.splice(0,i);return}callback=continuation}else break}while(1)}queue.length=0}catch(error){queue.splice(0,i+1),ReactSharedInternals.thrownErrors.push(error)}finally{isFlushing=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,didWarnStateUpdateForUnmountedComponent={},ReactNoopUpdateQueue={isMounted:function(){return!1},enqueueForceUpdate:function(publicInstance){warnNoop(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance){warnNoop(publicInstance,"replaceState")},enqueueSetState:function(publicInstance){warnNoop(publicInstance,"setState")}},assign=Object.assign,emptyObject={};Object.freeze(emptyObject),Component.prototype.isReactComponent={},Component.prototype.setState=function(partialState,callback){if(typeof partialState!=="object"&&typeof partialState!=="function"&&partialState!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")},Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")};var deprecatedAPIs={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(fnName in deprecatedAPIs)deprecatedAPIs.hasOwnProperty(fnName)&&defineDeprecationWarning(fnName,deprecatedAPIs[fnName]);ComponentDummy.prototype=Component.prototype,deprecatedAPIs=PureComponent.prototype=new ComponentDummy,deprecatedAPIs.constructor=PureComponent,assign(deprecatedAPIs,Component.prototype),deprecatedAPIs.isPureReactComponent=!0;var isArrayImpl=Array.isArray,REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference"),ReactSharedInternals={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},hasOwnProperty=Object.prototype.hasOwnProperty,createTask=console.createTask?console.createTask:function(){return null};deprecatedAPIs={react_stack_bottom_frame:function(callStackForError){return callStackForError()}};var specialPropKeyWarningShown,didWarnAboutOldJSXRuntime,didWarnAboutElementRef={},unknownOwnerDebugStack=deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs,UnknownOwner)(),unknownOwnerDebugTask=createTask(getTaskName(UnknownOwner)),didWarnAboutMaps=!1,userProvidedKeyEscapeRegex=/\/+/g,reportGlobalError=typeof reportError==="function"?reportError:function(error){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var event=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof error==="object"&&error!==null&&typeof error.message==="string"?String(error.message):String(error),error});if(!window.dispatchEvent(event))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",error);return}console.error(error)},didWarnAboutMessageChannel=!1,enqueueTaskImpl=null,actScopeDepth=0,didWarnNoAwaitAct=!1,isFlushing=!1,queueSeveralMicrotasks=typeof queueMicrotask==="function"?function(callback){queueMicrotask(function(){return queueMicrotask(callback)})}:enqueueTask;deprecatedAPIs=Object.freeze({__proto__:null,c:function(size){return resolveDispatcher().useMemoCache(size)}});var fnName={map:mapChildren,forEach:function(children,forEachFunc,forEachContext){mapChildren(children,function(){forEachFunc.apply(this,arguments)},forEachContext)},count:function(children){var n=0;return mapChildren(children,function(){n++}),n},toArray:function(children){return mapChildren(children,function(child){return child})||[]},only:function(children){if(!isValidElement(children))throw Error("React.Children.only expected to receive a single React element child.");return children}};exports.Activity=REACT_ACTIVITY_TYPE,exports.Children=fnName,exports.Component=Component,exports.Fragment=REACT_FRAGMENT_TYPE,exports.Profiler=REACT_PROFILER_TYPE,exports.PureComponent=PureComponent,exports.StrictMode=REACT_STRICT_MODE_TYPE,exports.Suspense=REACT_SUSPENSE_TYPE,exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ReactSharedInternals,exports.__COMPILER_RUNTIME=deprecatedAPIs,exports.act=function(callback){var prevActQueue=ReactSharedInternals.actQueue,prevActScopeDepth=actScopeDepth;actScopeDepth++;var queue=ReactSharedInternals.actQueue=prevActQueue!==null?prevActQueue:[],didAwaitActCall=!1;try{var result=callback()}catch(error){ReactSharedInternals.thrownErrors.push(error)}if(0<ReactSharedInternals.thrownErrors.length)throw popActScope(prevActQueue,prevActScopeDepth),callback=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,callback;if(result!==null&&typeof result==="object"&&typeof result.then==="function"){var thenable=result;return queueSeveralMicrotasks(function(){didAwaitActCall||didWarnNoAwaitAct||(didWarnNoAwaitAct=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(resolve,reject){didAwaitActCall=!0,thenable.then(function(returnValue){if(popActScope(prevActQueue,prevActScopeDepth),prevActScopeDepth===0){try{flushActQueue(queue),enqueueTask(function(){return recursivelyFlushAsyncActWork(returnValue,resolve,reject)})}catch(error$0){ReactSharedInternals.thrownErrors.push(error$0)}if(0<ReactSharedInternals.thrownErrors.length){var _thrownError=aggregateErrors(ReactSharedInternals.thrownErrors);ReactSharedInternals.thrownErrors.length=0,reject(_thrownError)}}else resolve(returnValue)},function(error){popActScope(prevActQueue,prevActScopeDepth),0<ReactSharedInternals.thrownErrors.length?(error=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,reject(error)):reject(error)})}}}var returnValue$jscomp$0=result;if(popActScope(prevActQueue,prevActScopeDepth),prevActScopeDepth===0&&(flushActQueue(queue),queue.length!==0&&queueSeveralMicrotasks(function(){didAwaitActCall||didWarnNoAwaitAct||(didWarnNoAwaitAct=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),ReactSharedInternals.actQueue=null),0<ReactSharedInternals.thrownErrors.length)throw callback=aggregateErrors(ReactSharedInternals.thrownErrors),ReactSharedInternals.thrownErrors.length=0,callback;return{then:function(resolve,reject){didAwaitActCall=!0,prevActScopeDepth===0?(ReactSharedInternals.actQueue=queue,enqueueTask(function(){return recursivelyFlushAsyncActWork(returnValue$jscomp$0,resolve,reject)})):resolve(returnValue$jscomp$0)}}},exports.cache=function(fn){return function(){return fn.apply(null,arguments)}},exports.cacheSignal=function(){return null},exports.captureOwnerStack=function(){var getCurrentStack=ReactSharedInternals.getCurrentStack;return getCurrentStack===null?null:getCurrentStack()},exports.cloneElement=function(element,config,children){if(element===null||element===void 0)throw Error("The argument must be a React element, but you passed "+element+".");var props=assign({},element.props),{key,_owner:owner}=element;if(config!=null){var JSCompiler_inline_result;a:{if(hasOwnProperty.call(config,"ref")&&(JSCompiler_inline_result=Object.getOwnPropertyDescriptor(config,"ref").get)&&JSCompiler_inline_result.isReactWarning){JSCompiler_inline_result=!1;break a}JSCompiler_inline_result=config.ref!==void 0}JSCompiler_inline_result&&(owner=getOwner()),hasValidKey(config)&&(checkKeyStringCoercion(config.key),key=""+config.key);for(propName in config)!hasOwnProperty.call(config,propName)||propName==="key"||propName==="__self"||propName==="__source"||propName==="ref"&&config.ref===void 0||(props[propName]=config[propName])}var propName=arguments.length-2;if(propName===1)props.children=children;else if(1<propName){JSCompiler_inline_result=Array(propName);for(var i=0;i<propName;i++)JSCompiler_inline_result[i]=arguments[i+2];props.children=JSCompiler_inline_result}props=ReactElement(element.type,key,props,owner,element._debugStack,element._debugTask);for(key=2;key<arguments.length;key++)validateChildKeys(arguments[key]);return props},exports.createContext=function(defaultValue){return defaultValue={$$typeof:REACT_CONTEXT_TYPE,_currentValue:defaultValue,_currentValue2:defaultValue,_threadCount:0,Provider:null,Consumer:null},defaultValue.Provider=defaultValue,defaultValue.Consumer={$$typeof:REACT_CONSUMER_TYPE,_context:defaultValue},defaultValue._currentRenderer=null,defaultValue._currentRenderer2=null,defaultValue},exports.createElement=function(type,config,children){for(var i=2;i<arguments.length;i++)validateChildKeys(arguments[i]);i={};var key=null;if(config!=null)for(propName in didWarnAboutOldJSXRuntime||!("__self"in config)||"key"in config||(didWarnAboutOldJSXRuntime=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),hasValidKey(config)&&(checkKeyStringCoercion(config.key),key=""+config.key),config)hasOwnProperty.call(config,propName)&&propName!=="key"&&propName!=="__self"&&propName!=="__source"&&(i[propName]=config[propName]);var childrenLength=arguments.length-2;if(childrenLength===1)i.children=children;else if(1<childrenLength){for(var childArray=Array(childrenLength),_i=0;_i<childrenLength;_i++)childArray[_i]=arguments[_i+2];Object.freeze&&Object.freeze(childArray),i.children=childArray}if(type&&type.defaultProps)for(propName in childrenLength=type.defaultProps,childrenLength)i[propName]===void 0&&(i[propName]=childrenLength[propName]);key&&defineKeyPropWarningGetter(i,typeof type==="function"?type.displayName||type.name||"Unknown":type);var propName=1e4>ReactSharedInternals.recentlyCreatedOwnerStacks++;return ReactElement(type,key,i,getOwner(),propName?Error("react-stack-top-frame"):unknownOwnerDebugStack,propName?createTask(getTaskName(type)):unknownOwnerDebugTask)},exports.createRef=function(){var refObject={current:null};return Object.seal(refObject),refObject},exports.forwardRef=function(render){render!=null&&render.$$typeof===REACT_MEMO_TYPE?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof render!=="function"?console.error("forwardRef requires a render function but was given %s.",render===null?"null":typeof render):render.length!==0&&render.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",render.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),render!=null&&render.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var elementType={$$typeof:REACT_FORWARD_REF_TYPE,render},ownName;return Object.defineProperty(elementType,"displayName",{enumerable:!1,configurable:!0,get:function(){return ownName},set:function(name){ownName=name,render.name||render.displayName||(Object.defineProperty(render,"name",{value:name}),render.displayName=name)}}),elementType},exports.isValidElement=isValidElement,exports.lazy=function(ctor){ctor={_status:-1,_result:ctor};var lazyType={$$typeof:REACT_LAZY_TYPE,_payload:ctor,_init:lazyInitializer},ioInfo={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return ctor._ioInfo=ioInfo,lazyType._debugInfo=[{awaited:ioInfo}],lazyType},exports.memo=function(type,compare){type==null&&console.error("memo: The first argument must be a component. Instead received: %s",type===null?"null":typeof type),compare={$$typeof:REACT_MEMO_TYPE,type,compare:compare===void 0?null:compare};var ownName;return Object.defineProperty(compare,"displayName",{enumerable:!1,configurable:!0,get:function(){return ownName},set:function(name){ownName=name,type.name||type.displayName||(Object.defineProperty(type,"name",{value:name}),type.displayName=name)}}),compare},exports.startTransition=function(scope){var prevTransition=ReactSharedInternals.T,currentTransition={};currentTransition._updatedFibers=new Set,ReactSharedInternals.T=currentTransition;try{var returnValue=scope(),onStartTransitionFinish=ReactSharedInternals.S;onStartTransitionFinish!==null&&onStartTransitionFinish(currentTransition,returnValue),typeof returnValue==="object"&&returnValue!==null&&typeof returnValue.then==="function"&&(ReactSharedInternals.asyncTransitions++,returnValue.then(releaseAsyncTransition,releaseAsyncTransition),returnValue.then(noop,reportGlobalError))}catch(error){reportGlobalError(error)}finally{prevTransition===null&¤tTransition._updatedFibers&&(scope=currentTransition._updatedFibers.size,currentTransition._updatedFibers.clear(),10<scope&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),prevTransition!==null&¤tTransition.types!==null&&(prevTransition.types!==null&&prevTransition.types!==currentTransition.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),prevTransition.types=currentTransition.types),ReactSharedInternals.T=prevTransition}},exports.unstable_useCacheRefresh=function(){return resolveDispatcher().useCacheRefresh()},exports.use=function(usable){return resolveDispatcher().use(usable)},exports.useActionState=function(action,initialState,permalink){return resolveDispatcher().useActionState(action,initialState,permalink)},exports.useCallback=function(callback,deps){return resolveDispatcher().useCallback(callback,deps)},exports.useContext=function(Context){var dispatcher=resolveDispatcher();return Context.$$typeof===REACT_CONSUMER_TYPE&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),dispatcher.useContext(Context)},exports.useDebugValue=function(value,formatterFn){return resolveDispatcher().useDebugValue(value,formatterFn)},exports.useDeferredValue=function(value,initialValue){return resolveDispatcher().useDeferredValue(value,initialValue)},exports.useEffect=function(create,deps){return create==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),resolveDispatcher().useEffect(create,deps)},exports.useEffectEvent=function(callback){return resolveDispatcher().useEffectEvent(callback)},exports.useId=function(){return resolveDispatcher().useId()},exports.useImperativeHandle=function(ref,create,deps){return resolveDispatcher().useImperativeHandle(ref,create,deps)},exports.useInsertionEffect=function(create,deps){return create==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),resolveDispatcher().useInsertionEffect(create,deps)},exports.useLayoutEffect=function(create,deps){return create==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),resolveDispatcher().useLayoutEffect(create,deps)},exports.useMemo=function(create,deps){return resolveDispatcher().useMemo(create,deps)},exports.useOptimistic=function(passthrough,reducer){return resolveDispatcher().useOptimistic(passthrough,reducer)},exports.useReducer=function(reducer,initialArg,init){return resolveDispatcher().useReducer(reducer,initialArg,init)},exports.useRef=function(initialValue){return resolveDispatcher().useRef(initialValue)},exports.useState=function(initialState){return resolveDispatcher().useState(initialState)},exports.useSyncExternalStore=function(subscribe,getSnapshot,getServerSnapshot){return resolveDispatcher().useSyncExternalStore(subscribe,getSnapshot,getServerSnapshot)},exports.useTransition=function(){return resolveDispatcher().useTransition()},exports.version="19.2.8",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var require_chunkstream=__commonJS(function(exports,module){var util=__require("util"),Stream=__require("stream"),ChunkStream=module.exports=function(){Stream.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};util.inherits(ChunkStream,Stream);ChunkStream.prototype.read=function(length,callback){this._reads.push({length:Math.abs(length),allowLess:length<0,func:callback}),process.nextTick(function(){if(this._process(),this._paused&&this._reads&&this._reads.length>0)this._paused=!1,this.emit("drain")}.bind(this))};ChunkStream.prototype.write=function(data,encoding){if(!this.writable)return this.emit("error",Error("Stream not writable")),!1;let dataBuffer;if(Buffer.isBuffer(data))dataBuffer=data;else dataBuffer=Buffer.from(data,encoding||this._encoding);if(this._buffers.push(dataBuffer),this._buffered+=dataBuffer.length,this._process(),this._reads&&this._reads.length===0)this._paused=!0;return this.writable&&!this._paused};ChunkStream.prototype.end=function(data,encoding){if(data)this.write(data,encoding);if(this.writable=!1,!this._buffers)return;if(this._buffers.length===0)this._end();else this._buffers.push(null),this._process()};ChunkStream.prototype.destroySoon=ChunkStream.prototype.end;ChunkStream.prototype._end=function(){if(this._reads.length>0)this.emit("error",Error("Unexpected end of input"));this.destroy()};ChunkStream.prototype.destroy=function(){if(!this._buffers)return;this.writable=!1,this._reads=null,this._buffers=null,this.emit("close")};ChunkStream.prototype._processReadAllowingLess=function(read){this._reads.shift();let smallerBuf=this._buffers[0];if(smallerBuf.length>read.length)this._buffered-=read.length,this._buffers[0]=smallerBuf.slice(read.length),read.func.call(this,smallerBuf.slice(0,read.length));else this._buffered-=smallerBuf.length,this._buffers.shift(),read.func.call(this,smallerBuf)};ChunkStream.prototype._processRead=function(read){this._reads.shift();let pos=0,count=0,data=Buffer.alloc(read.length);while(pos<read.length){let buf=this._buffers[count++],len=Math.min(buf.length,read.length-pos);if(buf.copy(data,pos,0,len),pos+=len,len!==buf.length)this._buffers[--count]=buf.slice(len)}if(count>0)this._buffers.splice(0,count);this._buffered-=read.length,read.func.call(this,data)};ChunkStream.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let read=this._reads[0];if(read.allowLess)this._processReadAllowingLess(read);else if(this._buffered>=read.length)this._processRead(read);else break}if(this._buffers&&!this.writable)this._end()}catch(ex){this.emit("error",ex)}}});var require_interlace=__commonJS(function(exports){var imagePasses=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];exports.getImagePasses=function(width,height){let images=[],xLeftOver=width%8,yLeftOver=height%8,xRepeats=(width-xLeftOver)/8,yRepeats=(height-yLeftOver)/8;for(let i=0;i<imagePasses.length;i++){let pass=imagePasses[i],passWidth=xRepeats*pass.x.length,passHeight=yRepeats*pass.y.length;for(let j=0;j<pass.x.length;j++)if(pass.x[j]<xLeftOver)passWidth++;else break;for(let j=0;j<pass.y.length;j++)if(pass.y[j]<yLeftOver)passHeight++;else break;if(passWidth>0&&passHeight>0)images.push({width:passWidth,height:passHeight,index:i})}return images};exports.getInterlaceIterator=function(width){return function(x,y,pass){let outerXLeftOver=x%imagePasses[pass].x.length,outerX=(x-outerXLeftOver)/imagePasses[pass].x.length*8+imagePasses[pass].x[outerXLeftOver],outerYLeftOver=y%imagePasses[pass].y.length,outerY=(y-outerYLeftOver)/imagePasses[pass].y.length*8+imagePasses[pass].y[outerYLeftOver];return outerX*4+outerY*width*4}}});var require_paeth_predictor=__commonJS(function(exports,module){module.exports=function(left,above,upLeft){let paeth=left+above-upLeft,pLeft=Math.abs(paeth-left),pAbove=Math.abs(paeth-above),pUpLeft=Math.abs(paeth-upLeft);if(pLeft<=pAbove&&pLeft<=pUpLeft)return left;if(pAbove<=pUpLeft)return above;return upLeft}});var require_filter_parse=__commonJS(function(exports,module){var interlaceUtils=require_interlace(),paethPredictor=require_paeth_predictor();function getByteWidth(width,bpp,depth){let byteWidth=width*bpp;if(depth!==8)byteWidth=Math.ceil(byteWidth/(8/depth));return byteWidth}var Filter=module.exports=function(bitmapInfo,dependencies){let{width,height,interlace,bpp,depth}=bitmapInfo;if(this.read=dependencies.read,this.write=dependencies.write,this.complete=dependencies.complete,this._imageIndex=0,this._images=[],interlace){let passes=interlaceUtils.getImagePasses(width,height);for(let i=0;i<passes.length;i++)this._images.push({byteWidth:getByteWidth(passes[i].width,bpp,depth),height:passes[i].height,lineIndex:0})}else this._images.push({byteWidth:getByteWidth(width,bpp,depth),height,lineIndex:0});if(depth===8)this._xComparison=bpp;else if(depth===16)this._xComparison=bpp*2;else this._xComparison=1};Filter.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};Filter.prototype._unFilterType1=function(rawData,unfilteredLine,byteWidth){let xComparison=this._xComparison,xBiggerThan=xComparison-1;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f1Left=x>xBiggerThan?unfilteredLine[x-xComparison]:0;unfilteredLine[x]=rawByte+f1Left}};Filter.prototype._unFilterType2=function(rawData,unfilteredLine,byteWidth){let lastLine=this._lastLine;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f2Up=lastLine?lastLine[x]:0;unfilteredLine[x]=rawByte+f2Up}};Filter.prototype._unFilterType3=function(rawData,unfilteredLine,byteWidth){let xComparison=this._xComparison,xBiggerThan=xComparison-1,lastLine=this._lastLine;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f3Up=lastLine?lastLine[x]:0,f3Left=x>xBiggerThan?unfilteredLine[x-xComparison]:0,f3Add=Math.floor((f3Left+f3Up)/2);unfilteredLine[x]=rawByte+f3Add}};Filter.prototype._unFilterType4=function(rawData,unfilteredLine,byteWidth){let xComparison=this._xComparison,xBiggerThan=xComparison-1,lastLine=this._lastLine;for(let x=0;x<byteWidth;x++){let rawByte=rawData[1+x],f4Up=lastLine?lastLine[x]:0,f4Left=x>xBiggerThan?unfilteredLine[x-xComparison]:0,f4UpLeft=x>xBiggerThan&&lastLine?lastLine[x-xComparison]:0,f4Add=paethPredictor(f4Left,f4Up,f4UpLeft);unfilteredLine[x]=rawByte+f4Add}};Filter.prototype._reverseFilterLine=function(rawData){let filter=rawData[0],unfilteredLine,currentImage=this._images[this._imageIndex],byteWidth=currentImage.byteWidth;if(filter===0)unfilteredLine=rawData.slice(1,byteWidth+1);else switch(unfilteredLine=Buffer.alloc(byteWidth),filter){case 1:this._unFilterType1(rawData,unfilteredLine,byteWidth);break;case 2:this._unFilterType2(rawData,unfilteredLine,byteWidth);break;case 3:this._unFilterType3(rawData,unfilteredLine,byteWidth);break;case 4:this._unFilterType4(rawData,unfilteredLine,byteWidth);break;default:throw Error("Unrecognised filter type - "+filter)}if(this.write(unfilteredLine),currentImage.lineIndex++,currentImage.lineIndex>=currentImage.height)this._lastLine=null,this._imageIndex++,currentImage=this._images[this._imageIndex];else this._lastLine=unfilteredLine;if(currentImage)this.read(currentImage.byteWidth+1,this._reverseFilterLine.bind(this));else this._lastLine=null,this.complete()}});var require_filter_parse_async=__commonJS(function(exports,module){var util=__require("util"),ChunkStream=require_chunkstream(),Filter=require_filter_parse(),FilterAsync=module.exports=function(bitmapInfo){ChunkStream.call(this);let buffers=[],that=this;this._filter=new Filter(bitmapInfo,{read:this.read.bind(this),write:function(buffer){buffers.push(buffer)},complete:function(){that.emit("complete",Buffer.concat(buffers))}}),this._filter.start()};util.inherits(FilterAsync,ChunkStream)});var require_constants=__commonJS(function(exports,module){module.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var require_crc=__commonJS(function(exports,module){var crcTable=[];(function(){for(let i=0;i<256;i++){let currentCrc=i;for(let j=0;j<8;j++)if(currentCrc&1)currentCrc=3988292384^currentCrc>>>1;else currentCrc=currentCrc>>>1;crcTable[i]=currentCrc}})();var CrcCalculator=module.exports=function(){this._crc=-1};CrcCalculator.prototype.write=function(data){for(let i=0;i<data.length;i++)this._crc=crcTable[(this._crc^data[i])&255]^this._crc>>>8;return!0};CrcCalculator.prototype.crc32=function(){return this._crc^-1};CrcCalculator.crc32=function(buf){let crc=-1;for(let i=0;i<buf.length;i++)crc=crcTable[(crc^buf[i])&255]^crc>>>8;return crc^-1}});var require_parser=__commonJS(function(exports,module){var constants=require_constants(),CrcCalculator=require_crc(),Parser=module.exports=function(options,dependencies){this._options=options,options.checkCRC=options.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[constants.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[constants.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[constants.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[constants.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[constants.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[constants.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=dependencies.read,this.error=dependencies.error,this.metadata=dependencies.metadata,this.gamma=dependencies.gamma,this.transColor=dependencies.transColor,this.palette=dependencies.palette,this.parsed=dependencies.parsed,this.inflateData=dependencies.inflateData,this.finished=dependencies.finished,this.simpleTransparency=dependencies.simpleTransparency,this.headersFinished=dependencies.headersFinished||function(){}};Parser.prototype.start=function(){this.read(constants.PNG_SIGNATURE.length,this._parseSignature.bind(this))};Parser.prototype._parseSignature=function(data){let signature=constants.PNG_SIGNATURE;for(let i=0;i<signature.length;i++)if(data[i]!==signature[i]){this.error(Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};Parser.prototype._parseChunkBegin=function(data){let length=data.readUInt32BE(0),type=data.readUInt32BE(4),name="";for(let i=4;i<8;i++)name+=String.fromCharCode(data[i]);let ancillary=Boolean(data[4]&32);if(!this._hasIHDR&&type!==constants.TYPE_IHDR){this.error(Error("Expected IHDR on beggining"));return}if(this._crc=new CrcCalculator,this._crc.write(Buffer.from(name)),this._chunks[type])return this._chunks[type](length);if(!ancillary){this.error(Error("Unsupported critical chunk type "+name));return}this.read(length+4,this._skipChunk.bind(this))};Parser.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};Parser.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};Parser.prototype._parseChunkEnd=function(data){let fileCrc=data.readInt32BE(0),calcCrc=this._crc.crc32();if(this._options.checkCRC&&calcCrc!==fileCrc){this.error(Error("Crc error - "+fileCrc+" - "+calcCrc));return}if(!this._hasIEND)this.read(8,this._parseChunkBegin.bind(this))};Parser.prototype._handleIHDR=function(length){this.read(length,this._parseIHDR.bind(this))};Parser.prototype._parseIHDR=function(data){this._crc.write(data);let width=data.readUInt32BE(0),height=data.readUInt32BE(4),depth=data[8],colorType=data[9],compr=data[10],filter=data[11],interlace=data[12];if(depth!==8&&depth!==4&&depth!==2&&depth!==1&&depth!==16){this.error(Error("Unsupported bit depth "+depth));return}if(!(colorType in constants.COLORTYPE_TO_BPP_MAP)){this.error(Error("Unsupported color type"));return}if(compr!==0){this.error(Error("Unsupported compression method"));return}if(filter!==0){this.error(Error("Unsupported filter method"));return}if(interlace!==0&&interlace!==1){this.error(Error("Unsupported interlace method"));return}this._colorType=colorType;let bpp=constants.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width,height,depth,interlace:Boolean(interlace),palette:Boolean(colorType&constants.COLORTYPE_PALETTE),color:Boolean(colorType&constants.COLORTYPE_COLOR),alpha:Boolean(colorType&constants.COLORTYPE_ALPHA),bpp,colorType}),this._handleChunkEnd()};Parser.prototype._handlePLTE=function(length){this.read(length,this._parsePLTE.bind(this))};Parser.prototype._parsePLTE=function(data){this._crc.write(data);let entries=Math.floor(data.length/3);for(let i=0;i<entries;i++)this._palette.push([data[i*3],data[i*3+1],data[i*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};Parser.prototype._handleTRNS=function(length){this.simpleTransparency(),this.read(length,this._parseTRNS.bind(this))};Parser.prototype._parseTRNS=function(data){if(this._crc.write(data),this._colorType===constants.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(Error("Transparency chunk must be after palette"));return}if(data.length>this._palette.length){this.error(Error("More transparent colors than palette size"));return}for(let i=0;i<data.length;i++)this._palette[i][3]=data[i];this.palette(this._palette)}if(this._colorType===constants.COLORTYPE_GRAYSCALE)this.transColor([data.readUInt16BE(0)]);if(this._colorType===constants.COLORTYPE_COLOR)this.transColor([data.readUInt16BE(0),data.readUInt16BE(2),data.readUInt16BE(4)]);this._handleChunkEnd()};Parser.prototype._handleGAMA=function(length){this.read(length,this._parseGAMA.bind(this))};Parser.prototype._parseGAMA=function(data){this._crc.write(data),this.gamma(data.readUInt32BE(0)/constants.GAMMA_DIVISION),this._handleChunkEnd()};Parser.prototype._handleIDAT=function(length){if(!this._emittedHeadersFinished)this._emittedHeadersFinished=!0,this.headersFinished();this.read(-length,this._parseIDAT.bind(this,length))};Parser.prototype._parseIDAT=function(length,data){if(this._crc.write(data),this._colorType===constants.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw Error("Expected palette not found");this.inflateData(data);let leftOverLength=length-data.length;if(leftOverLength>0)this._handleIDAT(leftOverLength);else this._handleChunkEnd()};Parser.prototype._handleIEND=function(length){this.read(length,this._parseIEND.bind(this))};Parser.prototype._parseIEND=function(data){if(this._crc.write(data),this._hasIEND=!0,this._handleChunkEnd(),this.finished)this.finished()}});var require_bitmapper=__commonJS(function(exports){var interlaceUtils=require_interlace(),pixelBppMapper=[function(){},function(pxData,data,pxPos,rawPos){if(rawPos===data.length)throw Error("Ran out of data");let pixel=data[rawPos];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=255},function(pxData,data,pxPos,rawPos){if(rawPos+1>=data.length)throw Error("Ran out of data");let pixel=data[rawPos];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=data[rawPos+1]},function(pxData,data,pxPos,rawPos){if(rawPos+2>=data.length)throw Error("Ran out of data");pxData[pxPos]=data[rawPos],pxData[pxPos+1]=data[rawPos+1],pxData[pxPos+2]=data[rawPos+2],pxData[pxPos+3]=255},function(pxData,data,pxPos,rawPos){if(rawPos+3>=data.length)throw Error("Ran out of data");pxData[pxPos]=data[rawPos],pxData[pxPos+1]=data[rawPos+1],pxData[pxPos+2]=data[rawPos+2],pxData[pxPos+3]=data[rawPos+3]}],pixelBppCustomMapper=[function(){},function(pxData,pixelData,pxPos,maxBit){let pixel=pixelData[0];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=maxBit},function(pxData,pixelData,pxPos){let pixel=pixelData[0];pxData[pxPos]=pixel,pxData[pxPos+1]=pixel,pxData[pxPos+2]=pixel,pxData[pxPos+3]=pixelData[1]},function(pxData,pixelData,pxPos,maxBit){pxData[pxPos]=pixelData[0],pxData[pxPos+1]=pixelData[1],pxData[pxPos+2]=pixelData[2],pxData[pxPos+3]=maxBit},function(pxData,pixelData,pxPos){pxData[pxPos]=pixelData[0],pxData[pxPos+1]=pixelData[1],pxData[pxPos+2]=pixelData[2],pxData[pxPos+3]=pixelData[3]}];function bitRetriever(data,depth){let leftOver=[],i=0;function split(){if(i===data.length)throw Error("Ran out of data");let byte=data[i];i++;let byte8,byte7,byte6,byte5,byte4,byte3,byte2,byte1;switch(depth){default:throw Error("unrecognised depth");case 16:byte2=data[i],i++,leftOver.push((byte<<8)+byte2);break;case 4:byte2=byte&15,byte1=byte>>4,leftOver.push(byte1,byte2);break;case 2:byte4=byte&3,byte3=byte>>2&3,byte2=byte>>4&3,byte1=byte>>6&3,leftOver.push(byte1,byte2,byte3,byte4);break;case 1:byte8=byte&1,byte7=byte>>1&1,byte6=byte>>2&1,byte5=byte>>3&1,byte4=byte>>4&1,byte3=byte>>5&1,byte2=byte>>6&1,byte1=byte>>7&1,leftOver.push(byte1,byte2,byte3,byte4,byte5,byte6,byte7,byte8);break}}return{get:function(count){while(leftOver.length<count)split();let returner=leftOver.slice(0,count);return leftOver=leftOver.slice(count),returner},resetAfterLine:function(){leftOver.length=0},end:function(){if(i!==data.length)throw Error("extra data found")}}}function mapImage8Bit(image,pxData,getPxPos,bpp,data,rawPos){let{width:imageWidth,height:imageHeight,index:imagePass}=image;for(let y=0;y<imageHeight;y++)for(let x=0;x<imageWidth;x++){let pxPos=getPxPos(x,y,imagePass);pixelBppMapper[bpp](pxData,data,pxPos,rawPos),rawPos+=bpp}return rawPos}function mapImageCustomBit(image,pxData,getPxPos,bpp,bits,maxBit){let{width:imageWidth,height:imageHeight,index:imagePass}=image;for(let y=0;y<imageHeight;y++){for(let x=0;x<imageWidth;x++){let pixelData=bits.get(bpp),pxPos=getPxPos(x,y,imagePass);pixelBppCustomMapper[bpp](pxData,pixelData,pxPos,maxBit)}bits.resetAfterLine()}}exports.dataToBitMap=function(data,bitmapInfo){let{width,height,depth,bpp,interlace}=bitmapInfo,bits;if(depth!==8)bits=bitRetriever(data,depth);let pxData;if(depth<=8)pxData=Buffer.alloc(width*height*4);else pxData=new Uint16Array(width*height*4);let maxBit=Math.pow(2,depth)-1,rawPos=0,images,getPxPos;if(interlace)images=interlaceUtils.getImagePasses(width,height),getPxPos=interlaceUtils.getInterlaceIterator(width,height);else{let nonInterlacedPxPos=0;getPxPos=function(){let returner=nonInterlacedPxPos;return nonInterlacedPxPos+=4,returner},images=[{width,height}]}for(let imageIndex=0;imageIndex<images.length;imageIndex++)if(depth===8)rawPos=mapImage8Bit(images[imageIndex],pxData,getPxPos,bpp,data,rawPos);else mapImageCustomBit(images[imageIndex],pxData,getPxPos,bpp,bits,maxBit);if(depth===8){if(rawPos!==data.length)throw Error("extra data found")}else bits.end();return pxData}});var require_format_normaliser=__commonJS(function(exports,module){function dePalette(indata,outdata,width,height,palette){let pxPos=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){let color=palette[indata[pxPos]];if(!color)throw Error("index "+indata[pxPos]+" not in palette");for(let i=0;i<4;i++)outdata[pxPos+i]=color[i];pxPos+=4}}function replaceTransparentColor(indata,outdata,width,height,transColor){let pxPos=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){let makeTrans=!1;if(transColor.length===1){if(transColor[0]===indata[pxPos])makeTrans=!0}else if(transColor[0]===indata[pxPos]&&transColor[1]===indata[pxPos+1]&&transColor[2]===indata[pxPos+2])makeTrans=!0;if(makeTrans)for(let i=0;i<4;i++)outdata[pxPos+i]=0;pxPos+=4}}function scaleDepth(indata,outdata,width,height,depth){let maxOutSample=255,maxInSample=Math.pow(2,depth)-1,pxPos=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){for(let i=0;i<4;i++)outdata[pxPos+i]=Math.floor(indata[pxPos+i]*maxOutSample/maxInSample+0.5);pxPos+=4}}module.exports=function(indata,imageData,skipRescale=!1){let{depth,width,height,colorType,transColor,palette}=imageData,outdata=indata;if(colorType===3)dePalette(indata,outdata,width,height,palette);else{if(transColor)replaceTransparentColor(indata,outdata,width,height,transColor);if(depth!==8&&!skipRescale){if(depth===16)outdata=Buffer.alloc(width*height*4);scaleDepth(indata,outdata,width,height,depth)}}return outdata}});var require_parser_async=__commonJS(function(exports,module){var util=__require("util"),zlib=__require("zlib"),ChunkStream=require_chunkstream(),FilterAsync=require_filter_parse_async(),Parser=require_parser(),bitmapper=require_bitmapper(),formatNormaliser=require_format_normaliser(),ParserAsync=module.exports=function(options){ChunkStream.call(this),this._parser=new Parser(options,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=options,this.writable=!0,this._parser.start()};util.inherits(ParserAsync,ChunkStream);ParserAsync.prototype._handleError=function(err){if(this.emit("error",err),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy)this._inflate.destroy();if(this._filter)this._filter.destroy(),this._filter.on("error",function(){});this.errord=!0};ParserAsync.prototype._inflateData=function(data){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=zlib.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let imageSize=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,chunkSize=Math.max(imageSize,zlib.Z_MIN_CHUNK);this._inflate=zlib.createInflate({chunkSize});let leftToInflate=imageSize,emitError=this.emit.bind(this,"error");this._inflate.on("error",function(err){if(!leftToInflate)return;emitError(err)}),this._filter.on("complete",this._complete.bind(this));let filterWrite=this._filter.write.bind(this._filter);this._inflate.on("data",function(chunk){if(!leftToInflate)return;if(chunk.length>leftToInflate)chunk=chunk.slice(0,leftToInflate);leftToInflate-=chunk.length,filterWrite(chunk)}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(data)};ParserAsync.prototype._handleMetaData=function(metaData){this._metaData=metaData,this._bitmapInfo=Object.create(metaData),this._filter=new FilterAsync(this._bitmapInfo)};ParserAsync.prototype._handleTransColor=function(transColor){this._bitmapInfo.transColor=transColor};ParserAsync.prototype._handlePalette=function(palette){this._bitmapInfo.palette=palette};ParserAsync.prototype._simpleTransparency=function(){this._metaData.alpha=!0};ParserAsync.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};ParserAsync.prototype._finished=function(){if(this.errord)return;if(!this._inflate)this.emit("error","No Inflate block");else this._inflate.end()};ParserAsync.prototype._complete=function(filteredData){if(this.errord)return;let normalisedBitmapData;try{let bitmapData=bitmapper.dataToBitMap(filteredData,this._bitmapInfo);normalisedBitmapData=formatNormaliser(bitmapData,this._bitmapInfo,this._options.skipRescale),bitmapData=null}catch(ex){this._handleError(ex);return}this.emit("parsed",normalisedBitmapData)}});var require_bitpacker=__commonJS(function(exports,module){var constants=require_constants();module.exports=function(dataIn,width,height,options){let outHasAlpha=[constants.COLORTYPE_COLOR_ALPHA,constants.COLORTYPE_ALPHA].indexOf(options.colorType)!==-1;if(options.colorType===options.inputColorType){let bigEndian=function(){let buffer=new ArrayBuffer(2);return new DataView(buffer).setInt16(0,256,!0),new Int16Array(buffer)[0]!==256}();if(options.bitDepth===8||options.bitDepth===16&&bigEndian)return dataIn}let data=options.bitDepth!==16?dataIn:new Uint16Array(dataIn.buffer),maxValue=255,inBpp=constants.COLORTYPE_TO_BPP_MAP[options.inputColorType];if(inBpp===4&&!options.inputHasAlpha)inBpp=3;let outBpp=constants.COLORTYPE_TO_BPP_MAP[options.colorType];if(options.bitDepth===16)maxValue=65535,outBpp*=2;let outData=Buffer.alloc(width*height*outBpp),inIndex=0,outIndex=0,bgColor=options.bgColor||{};if(bgColor.red===void 0)bgColor.red=maxValue;if(bgColor.green===void 0)bgColor.green=maxValue;if(bgColor.blue===void 0)bgColor.blue=maxValue;function getRGBA(){let red,green,blue,alpha=maxValue;switch(options.inputColorType){case constants.COLORTYPE_COLOR_ALPHA:alpha=data[inIndex+3],red=data[inIndex],green=data[inIndex+1],blue=data[inIndex+2];break;case constants.COLORTYPE_COLOR:red=data[inIndex],green=data[inIndex+1],blue=data[inIndex+2];break;case constants.COLORTYPE_ALPHA:alpha=data[inIndex+1],red=data[inIndex],green=red,blue=red;break;case constants.COLORTYPE_GRAYSCALE:red=data[inIndex],green=red,blue=red;break;default:throw Error("input color type:"+options.inputColorType+" is not supported at present")}if(options.inputHasAlpha){if(!outHasAlpha)alpha/=maxValue,red=Math.min(Math.max(Math.round((1-alpha)*bgColor.red+alpha*red),0),maxValue),green=Math.min(Math.max(Math.round((1-alpha)*bgColor.green+alpha*green),0),maxValue),blue=Math.min(Math.max(Math.round((1-alpha)*bgColor.blue+alpha*blue),0),maxValue)}return{red,green,blue,alpha}}for(let y=0;y<height;y++)for(let x=0;x<width;x++){let rgba=getRGBA(data,inIndex);switch(options.colorType){case constants.COLORTYPE_COLOR_ALPHA:case constants.COLORTYPE_COLOR:if(options.bitDepth===8){if(outData[outIndex]=rgba.red,outData[outIndex+1]=rgba.green,outData[outIndex+2]=rgba.blue,outHasAlpha)outData[outIndex+3]=rgba.alpha}else if(outData.writeUInt16BE(rgba.red,outIndex),outData.writeUInt16BE(rgba.green,outIndex+2),outData.writeUInt16BE(rgba.blue,outIndex+4),outHasAlpha)outData.writeUInt16BE(rgba.alpha,outIndex+6);break;case constants.COLORTYPE_ALPHA:case constants.COLORTYPE_GRAYSCALE:{let grayscale=(rgba.red+rgba.green+rgba.blue)/3;if(options.bitDepth===8){if(outData[outIndex]=grayscale,outHasAlpha)outData[outIndex+1]=rgba.alpha}else if(outData.writeUInt16BE(grayscale,outIndex),outHasAlpha)outData.writeUInt16BE(rgba.alpha,outIndex+2);break}default:throw Error("unrecognised color Type "+options.colorType)}inIndex+=inBpp,outIndex+=outBpp}return outData}});var require_filter_pack=__commonJS(function(exports,module){var paethPredictor=require_paeth_predictor();function filterNone(pxData,pxPos,byteWidth,rawData,rawPos){for(let x=0;x<byteWidth;x++)rawData[rawPos+x]=pxData[pxPos+x]}function filterSumNone(pxData,pxPos,byteWidth){let sum=0,length=pxPos+byteWidth;for(let i=pxPos;i<length;i++)sum+=Math.abs(pxData[i]);return sum}function filterSub(pxData,pxPos,byteWidth,rawData,rawPos,bpp){for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,val=pxData[pxPos+x]-left;rawData[rawPos+x]=val}}function filterSumSub(pxData,pxPos,byteWidth,bpp){let sum=0;for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,val=pxData[pxPos+x]-left;sum+=Math.abs(val)}return sum}function filterUp(pxData,pxPos,byteWidth,rawData,rawPos){for(let x=0;x<byteWidth;x++){let up=pxPos>0?pxData[pxPos+x-byteWidth]:0,val=pxData[pxPos+x]-up;rawData[rawPos+x]=val}}function filterSumUp(pxData,pxPos,byteWidth){let sum=0,length=pxPos+byteWidth;for(let x=pxPos;x<length;x++){let up=pxPos>0?pxData[x-byteWidth]:0,val=pxData[x]-up;sum+=Math.abs(val)}return sum}function filterAvg(pxData,pxPos,byteWidth,rawData,rawPos,bpp){for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,val=pxData[pxPos+x]-(left+up>>1);rawData[rawPos+x]=val}}function filterSumAvg(pxData,pxPos,byteWidth,bpp){let sum=0;for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,val=pxData[pxPos+x]-(left+up>>1);sum+=Math.abs(val)}return sum}function filterPaeth(pxData,pxPos,byteWidth,rawData,rawPos,bpp){for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,upleft=pxPos>0&&x>=bpp?pxData[pxPos+x-(byteWidth+bpp)]:0,val=pxData[pxPos+x]-paethPredictor(left,up,upleft);rawData[rawPos+x]=val}}function filterSumPaeth(pxData,pxPos,byteWidth,bpp){let sum=0;for(let x=0;x<byteWidth;x++){let left=x>=bpp?pxData[pxPos+x-bpp]:0,up=pxPos>0?pxData[pxPos+x-byteWidth]:0,upleft=pxPos>0&&x>=bpp?pxData[pxPos+x-(byteWidth+bpp)]:0,val=pxData[pxPos+x]-paethPredictor(left,up,upleft);sum+=Math.abs(val)}return sum}var filters={0:filterNone,1:filterSub,2:filterUp,3:filterAvg,4:filterPaeth},filterSums={0:filterSumNone,1:filterSumSub,2:filterSumUp,3:filterSumAvg,4:filterSumPaeth};module.exports=function(pxData,width,height,options,bpp){let filterTypes;if(!("filterType"in options)||options.filterType===-1)filterTypes=[0,1,2,3,4];else if(typeof options.filterType==="number")filterTypes=[options.filterType];else throw Error("unrecognised filter types");if(options.bitDepth===16)bpp*=2;let byteWidth=width*bpp,rawPos=0,pxPos=0,rawData=Buffer.alloc((byteWidth+1)*height),sel=filterTypes[0];for(let y=0;y<height;y++){if(filterTypes.length>1){let min=1/0;for(let i=0;i<filterTypes.length;i++){let sum=filterSums[filterTypes[i]](pxData,pxPos,byteWidth,bpp);if(sum<min)sel=filterTypes[i],min=sum}}rawData[rawPos]=sel,rawPos++,filters[sel](pxData,pxPos,byteWidth,rawData,rawPos,bpp),rawPos+=byteWidth,pxPos+=byteWidth}return rawData}});var require_packer=__commonJS(function(exports,module){var constants=require_constants(),CrcStream=require_crc(),bitPacker=require_bitpacker(),filter=require_filter_pack(),zlib=__require("zlib"),Packer=module.exports=function(options){if(this._options=options,options.deflateChunkSize=options.deflateChunkSize||32768,options.deflateLevel=options.deflateLevel!=null?options.deflateLevel:9,options.deflateStrategy=options.deflateStrategy!=null?options.deflateStrategy:3,options.inputHasAlpha=options.inputHasAlpha!=null?options.inputHasAlpha:!0,options.deflateFactory=options.deflateFactory||zlib.createDeflate,options.bitDepth=options.bitDepth||8,options.colorType=typeof options.colorType==="number"?options.colorType:constants.COLORTYPE_COLOR_ALPHA,options.inputColorType=typeof options.inputColorType==="number"?options.inputColorType:constants.COLORTYPE_COLOR_ALPHA,[constants.COLORTYPE_GRAYSCALE,constants.COLORTYPE_COLOR,constants.COLORTYPE_COLOR_ALPHA,constants.COLORTYPE_ALPHA].indexOf(options.colorType)===-1)throw Error("option color type:"+options.colorType+" is not supported at present");if([constants.COLORTYPE_GRAYSCALE,constants.COLORTYPE_COLOR,constants.COLORTYPE_COLOR_ALPHA,constants.COLORTYPE_ALPHA].indexOf(options.inputColorType)===-1)throw Error("option input color type:"+options.inputColorType+" is not supported at present");if(options.bitDepth!==8&&options.bitDepth!==16)throw Error("option bit depth:"+options.bitDepth+" is not supported at present")};Packer.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};Packer.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};Packer.prototype.filterData=function(data,width,height){let packedData=bitPacker(data,width,height,this._options),bpp=constants.COLORTYPE_TO_BPP_MAP[this._options.colorType];return filter(packedData,width,height,this._options,bpp)};Packer.prototype._packChunk=function(type,data){let len=data?data.length:0,buf=Buffer.alloc(len+12);if(buf.writeUInt32BE(len,0),buf.writeUInt32BE(type,4),data)data.copy(buf,8);return buf.writeInt32BE(CrcStream.crc32(buf.slice(4,buf.length-4)),buf.length-4),buf};Packer.prototype.packGAMA=function(gamma){let buf=Buffer.alloc(4);return buf.writeUInt32BE(Math.floor(gamma*constants.GAMMA_DIVISION),0),this._packChunk(constants.TYPE_gAMA,buf)};Packer.prototype.packIHDR=function(width,height){let buf=Buffer.alloc(13);return buf.writeUInt32BE(width,0),buf.writeUInt32BE(height,4),buf[8]=this._options.bitDepth,buf[9]=this._options.colorType,buf[10]=0,buf[11]=0,buf[12]=0,this._packChunk(constants.TYPE_IHDR,buf)};Packer.prototype.packIDAT=function(data){return this._packChunk(constants.TYPE_IDAT,data)};Packer.prototype.packIEND=function(){return this._packChunk(constants.TYPE_IEND,null)}});var require_packer_async=__commonJS(function(exports,module){var util=__require("util"),Stream=__require("stream"),constants=require_constants(),Packer=require_packer(),PackerAsync=module.exports=function(opt){Stream.call(this);let options=opt||{};this._packer=new Packer(options),this._deflate=this._packer.createDeflate(),this.readable=!0};util.inherits(PackerAsync,Stream);PackerAsync.prototype.pack=function(data,width,height,gamma){if(this.emit("data",Buffer.from(constants.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(width,height)),gamma)this.emit("data",this._packer.packGAMA(gamma));let filteredData=this._packer.filterData(data,width,height);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(compressedData){this.emit("data",this._packer.packIDAT(compressedData))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(filteredData)}});var require_sync_inflate=__commonJS(function(exports,module){var assert=__require("assert").ok,zlib=__require("zlib"),util=__require("util"),kMaxLength=__require("buffer").kMaxLength;function Inflate(opts){if(!(this instanceof Inflate))return new Inflate(opts);if(opts&&opts.chunkSize<zlib.Z_MIN_CHUNK)opts.chunkSize=zlib.Z_MIN_CHUNK;if(zlib.Inflate.call(this,opts),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,opts&&opts.maxLength!=null)this._maxLength=opts.maxLength}function createInflate(opts){return new Inflate(opts)}function _close(engine,callback){if(callback)process.nextTick(callback);if(!engine._handle)return;engine._handle.close(),engine._handle=null}Inflate.prototype._processChunk=function(chunk,flushFlag,asyncCb){if(typeof asyncCb==="function")return zlib.Inflate._processChunk.call(this,chunk,flushFlag,asyncCb);let self=this,availInBefore=chunk&&chunk.length,availOutBefore=this._chunkSize-this._offset,leftToInflate=this._maxLength,inOff=0,buffers=[],nread=0,error;this.on("error",function(err){error=err});function handleChunk(availInAfter,availOutAfter){if(self._hadError)return;let have=availOutBefore-availOutAfter;if(assert(have>=0,"have should not go down"),have>0){let out=self._buffer.slice(self._offset,self._offset+have);if(self._offset+=have,out.length>leftToInflate)out=out.slice(0,leftToInflate);if(buffers.push(out),nread+=out.length,leftToInflate-=out.length,leftToInflate===0)return!1}if(availOutAfter===0||self._offset>=self._chunkSize)availOutBefore=self._chunkSize,self._offset=0,self._buffer=Buffer.allocUnsafe(self._chunkSize);if(availOutAfter===0)return inOff+=availInBefore-availInAfter,availInBefore=availInAfter,!0;return!1}assert(this._handle,"zlib binding closed");let res;do res=this._handle.writeSync(flushFlag,chunk,inOff,availInBefore,this._buffer,this._offset,availOutBefore),res=res||this._writeState;while(!this._hadError&&handleChunk(res[0],res[1]));if(this._hadError)throw error;if(nread>=kMaxLength)throw _close(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+kMaxLength.toString(16)+" bytes");let buf=Buffer.concat(buffers,nread);return _close(this),buf};util.inherits(Inflate,zlib.Inflate);function zlibBufferSync(engine,buffer){if(typeof buffer==="string")buffer=Buffer.from(buffer);if(!(buffer instanceof Buffer))throw TypeError("Not a string or buffer");let flushFlag=engine._finishFlushFlag;if(flushFlag==null)flushFlag=zlib.Z_FINISH;return engine._processChunk(buffer,flushFlag)}function inflateSync(buffer,opts){return zlibBufferSync(new Inflate(opts),buffer)}module.exports=exports=inflateSync;exports.Inflate=Inflate;exports.createInflate=createInflate;exports.inflateSync=inflateSync});var require_sync_reader=__commonJS(function(exports,module){var SyncReader=module.exports=function(buffer){this._buffer=buffer,this._reads=[]};SyncReader.prototype.read=function(length,callback){this._reads.push({length:Math.abs(length),allowLess:length<0,func:callback})};SyncReader.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let read=this._reads[0];if(this._buffer.length&&(this._buffer.length>=read.length||read.allowLess)){this._reads.shift();let buf=this._buffer;this._buffer=buf.slice(read.length),read.func.call(this,buf.slice(0,read.length))}else break}if(this._reads.length>0)throw Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw Error("unrecognised content at end of stream")}});var require_filter_parse_sync=__commonJS(function(exports){var SyncReader=require_sync_reader(),Filter=require_filter_parse();exports.process=function(inBuffer,bitmapInfo){let outBuffers=[],reader=new SyncReader(inBuffer);return new Filter(bitmapInfo,{read:reader.read.bind(reader),write:function(bufferPart){outBuffers.push(bufferPart)},complete:function(){}}).start(),reader.process(),Buffer.concat(outBuffers)}});var require_parser_sync=__commonJS(function(exports,module){var hasSyncZlib=!0,zlib=__require("zlib"),inflateSync=require_sync_inflate();if(!zlib.deflateSync)hasSyncZlib=!1;var SyncReader=require_sync_reader(),FilterSync=require_filter_parse_sync(),Parser=require_parser(),bitmapper=require_bitmapper(),formatNormaliser=require_format_normaliser();module.exports=function(buffer,options){if(!hasSyncZlib)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let err;function handleError(_err_){err=_err_}let metaData;function handleMetaData(_metaData_){metaData=_metaData_}function handleTransColor(transColor){metaData.transColor=transColor}function handlePalette(palette){metaData.palette=palette}function handleSimpleTransparency(){metaData.alpha=!0}let gamma;function handleGamma(_gamma_){gamma=_gamma_}let inflateDataList=[];function handleInflateData(inflatedData){inflateDataList.push(inflatedData)}let reader=new SyncReader(buffer);if(new Parser(options,{read:reader.read.bind(reader),error:handleError,metadata:handleMetaData,gamma:handleGamma,palette:handlePalette,transColor:handleTransColor,inflateData:handleInflateData,simpleTransparency:handleSimpleTransparency}).start(),reader.process(),err)throw err;let inflateData=Buffer.concat(inflateDataList);inflateDataList.length=0;let inflatedData;if(metaData.interlace)inflatedData=zlib.inflateSync(inflateData);else{let imageSize=((metaData.width*metaData.bpp*metaData.depth+7>>3)+1)*metaData.height;inflatedData=inflateSync(inflateData,{chunkSize:imageSize,maxLength:imageSize})}if(inflateData=null,!inflatedData||!inflatedData.length)throw Error("bad png - invalid inflate data response");let unfilteredData=FilterSync.process(inflatedData,metaData);inflateData=null;let bitmapData=bitmapper.dataToBitMap(unfilteredData,metaData);unfilteredData=null;let normalisedBitmapData=formatNormaliser(bitmapData,metaData,options.skipRescale);return metaData.data=normalisedBitmapData,metaData.gamma=gamma||0,metaData}});var require_packer_sync=__commonJS(function(exports,module){var hasSyncZlib=!0,zlib=__require("zlib");if(!zlib.deflateSync)hasSyncZlib=!1;var constants=require_constants(),Packer=require_packer();module.exports=function(metaData,opt){if(!hasSyncZlib)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let packer=new Packer(opt||{}),chunks=[];if(chunks.push(Buffer.from(constants.PNG_SIGNATURE)),chunks.push(packer.packIHDR(metaData.width,metaData.height)),metaData.gamma)chunks.push(packer.packGAMA(metaData.gamma));let filteredData=packer.filterData(metaData.data,metaData.width,metaData.height),compressedData=zlib.deflateSync(filteredData,packer.getDeflateOptions());if(filteredData=null,!compressedData||!compressedData.length)throw Error("bad png - invalid compressed data response");return chunks.push(packer.packIDAT(compressedData)),chunks.push(packer.packIEND()),Buffer.concat(chunks)}});var require_png_sync=__commonJS(function(exports){var parse=require_parser_sync(),pack=require_packer_sync();exports.read=function(buffer,options){return parse(buffer,options||{})};exports.write=function(png,options){return pack(png,options)}});var require_png=__commonJS(function(exports){var util=__require("util"),Stream=__require("stream"),Parser=require_parser_async(),Packer=require_packer_async(),PNGSync=require_png_sync(),PNG=exports.PNG=function(options){if(Stream.call(this),options=options||{},this.width=options.width|0,this.height=options.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,options.fill&&this.data)this.data.fill(0);this.gamma=0,this.readable=this.writable=!0,this._parser=new Parser(options),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(data){this.data=data,this.emit("parsed",data)}.bind(this)),this._packer=new Packer(options),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};util.inherits(PNG,Stream);PNG.sync=PNGSync;PNG.prototype.pack=function(){if(!this.data||!this.data.length)return this.emit("error","No data provided"),this;return process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this};PNG.prototype.parse=function(data,callback){if(callback){let onParsed,onError;onParsed=function(parsedData){this.removeListener("error",onError),this.data=parsedData,callback(null,this)}.bind(this),onError=function(err){this.removeListener("parsed",onParsed),callback(err,null)}.bind(this),this.once("parsed",onParsed),this.once("error",onError)}return this.end(data),this};PNG.prototype.write=function(data){return this._parser.write(data),!0};PNG.prototype.end=function(data){this._parser.end(data)};PNG.prototype._metadata=function(metadata){this.width=metadata.width,this.height=metadata.height,this.emit("metadata",metadata)};PNG.prototype._gamma=function(gamma){this.gamma=gamma};PNG.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable)this.emit("close")};PNG.bitblt=function(src,dst,srcX,srcY,width,height,deltaX,deltaY){if(srcX|=0,srcY|=0,width|=0,height|=0,deltaX|=0,deltaY|=0,srcX>src.width||srcY>src.height||srcX+width>src.width||srcY+height>src.height)throw Error("bitblt reading outside image");if(deltaX>dst.width||deltaY>dst.height||deltaX+width>dst.width||deltaY+height>dst.height)throw Error("bitblt writing outside image");for(let y=0;y<height;y++)src.data.copy(dst.data,(deltaY+y)*dst.width+deltaX<<2,(srcY+y)*src.width+srcX<<2,(srcY+y)*src.width+srcX+width<<2)};PNG.prototype.bitblt=function(dst,srcX,srcY,width,height,deltaX,deltaY){return PNG.bitblt(this,dst,srcX,srcY,width,height,deltaX,deltaY),this};PNG.adjustGamma=function(src){if(src.gamma){for(let y=0;y<src.height;y++)for(let x=0;x<src.width;x++){let idx=src.width*y+x<<2;for(let i=0;i<3;i++){let sample=src.data[idx+i]/255;sample=Math.pow(sample,0.45454545454545453/src.gamma),src.data[idx+i]=Math.round(sample*255)}}src.gamma=0}};PNG.prototype.adjustGamma=function(){PNG.adjustGamma(this)}});var require_react_dom_development=__commonJS(function(exports){var React=__toESM(require_react_development());(function(){function noop(){}function testStringCoercion(value){return""+value}function createPortal$1(children,containerInfo,implementation){var key=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{testStringCoercion(key);var JSCompiler_inline_result=!1}catch(e){JSCompiler_inline_result=!0}return JSCompiler_inline_result&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&key[Symbol.toStringTag]||key.constructor.name||"Object"),testStringCoercion(key)),{$$typeof:REACT_PORTAL_TYPE,key:key==null?null:""+key,children,containerInfo,implementation}}function getCrossOriginStringAs(as,input){if(as==="font")return"";if(typeof input==="string")return input==="use-credentials"?input:""}function getValueDescriptorExpectingObjectForWarning(thing){return thing===null?"`null`":thing===void 0?"`undefined`":thing===""?"an empty string":'something with type "'+typeof thing+'"'}function getValueDescriptorExpectingEnumForWarning(thing){return thing===null?"`null`":thing===void 0?"`undefined`":thing===""?"an empty string":typeof thing==="string"?JSON.stringify(thing):typeof thing==="number"?"`"+thing+"`":'something with type "'+typeof thing+'"'}function resolveDispatcher(){var dispatcher=ReactSharedInternals.H;return dispatcher===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
15
15
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
16
16
|
2. You might be breaking the Rules of Hooks
|
|
17
17
|
3. You might have more than one copy of React in the same app
|
|
@@ -76,15 +76,28 @@ Check the top-level render call using <`+componentName+">."),componentName="",di
|
|
|
76
76
|
`,VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,validatedTagCache=new Map,endTagCache=new Map,shellTimeRuntimeScript="requestAnimationFrame(function(){$RT=performance.now()});",placeholder1='<template id="',placeholder2='"></template>',startCompletedSuspenseBoundary="<!--$-->",startPendingSuspenseBoundary1='<!--$?--><template id="',startPendingSuspenseBoundary2='"></template>',startClientRenderedSuspenseBoundary="<!--$!-->",endSuspenseBoundary="<!--/$-->",clientRenderedSuspenseBoundaryError1="<template",clientRenderedSuspenseBoundaryErrorAttrInterstitial='"',clientRenderedSuspenseBoundaryError1A=' data-dgst="',clientRenderedSuspenseBoundaryError1B=' data-msg="',clientRenderedSuspenseBoundaryError1C=' data-stck="',clientRenderedSuspenseBoundaryError1D=' data-cstck="',clientRenderedSuspenseBoundaryError2="></template>",startSegmentHTML='<div hidden id="',startSegmentHTML2='">',endSegmentHTML="</div>",startSegmentSVG='<svg aria-hidden="true" style="display:none" id="',startSegmentSVG2='">',endSegmentSVG="</svg>",startSegmentMathML='<math aria-hidden="true" style="display:none" id="',startSegmentMathML2='">',endSegmentMathML="</math>",startSegmentTable='<table hidden id="',startSegmentTable2='">',endSegmentTable="</table>",startSegmentTableBody='<table hidden><tbody id="',startSegmentTableBody2='">',endSegmentTableBody="</tbody></table>",startSegmentTableRow='<table hidden><tr id="',startSegmentTableRow2='">',endSegmentTableRow="</tr></table>",startSegmentColGroup='<table hidden><colgroup id="',startSegmentColGroup2='">',endSegmentColGroup="</colgroup></table>",completeSegmentScript1Full='$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("',completeSegmentScript1Partial='$RS("',completeSegmentScript2='","',completeSegmentScriptEnd='")</script>',completeBoundaryScriptFunctionOnly=`$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
|
|
77
77
|
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`,completeBoundaryScript1Partial='$RC("',completeBoundaryWithStylesScript1FullPartial=`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
|
|
78
78
|
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
|
|
79
|
-
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`,completeBoundaryWithStylesScript1Partial='$RR("',completeBoundaryScript2='","',completeBoundaryScript3a='",',completeBoundaryScript3b='"',completeBoundaryScriptEnd=")</script>",clientRenderScriptFunctionOnly='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',clientRenderScript1Full='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("',clientRenderScript1Partial='$RX("',clientRenderScript1A='"',clientRenderErrorScriptArgInterstitial=",",clientRenderScriptEnd=")</script>",regexForJSStringsInInstructionScripts=/[<\u2028\u2029]/g,regexForJSStringsInScripts=/[&><\u2028\u2029]/g,lateStyleTagResourceOpen1=' media="not all" data-precedence="',lateStyleTagResourceOpen2='" data-href="',lateStyleTagResourceOpen3='">',lateStyleTagTemplateClose="</style>",currentlyRenderingBoundaryHasStylesToHoist=!1,destinationHasCapacity=!0,stylesheetFlushingQueue=[],styleTagResourceOpen1=' data-precedence="',styleTagResourceOpen2='" data-href="',spaceSeparator=" ",styleTagResourceOpen3='">',styleTagResourceClose="</style>",completedShellIdAttributeStart=' id="',arrayFirstOpenBracket="[",arraySubsequentOpenBracket=",[",arrayInterstitial=",",arrayCloseBracket="]",PENDING$1=0,PRELOADED=1,PREAMBLE=2,LATE=3,regexForHrefInLinkHeaderURLContext=/[<>\r\n]/g,regexForLinkHeaderQuotedParamValueContext=/["';,\r\n]/g,doctypeChunk="",bind=Function.prototype.bind,REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference"),emptyContextObject={};Object.freeze(emptyContextObject);var rendererSigil={},currentActiveSnapshot=null,didWarnAboutNoopUpdateForComponent={},didWarnAboutDeprecatedWillMount={},didWarnAboutUninitializedState=new Set,didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate=new Set,didWarnAboutLegacyLifecyclesAndDerivedState=new Set,didWarnAboutDirectlyAssigningPropsToState=new Set,didWarnAboutUndefinedDerivedState=new Set,didWarnAboutContextTypes$1=new Set,didWarnAboutChildContextTypes=new Set,didWarnAboutInvalidateContextType=new Set,didWarnOnInvalidCallback=new Set,classComponentUpdater={enqueueSetState:function(inst,payload,callback){var internals=inst._reactInternals;internals.queue===null?warnNoop(inst,"setState"):(internals.queue.push(payload),callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback))},enqueueReplaceState:function(inst,payload,callback){inst=inst._reactInternals,inst.replace=!0,inst.queue=[payload],callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)},enqueueForceUpdate:function(inst,callback){inst._reactInternals.queue===null?warnNoop(inst,"forceUpdate"):callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)}},emptyTreeContext={id:1,overflow:""},clz32=Math.clz32?Math.clz32:clz32Fallback,{log,LN2}=Math,SuspenseException=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),suspendedThenable=null,objectIs=typeof Object.is==="function"?Object.is:is,currentlyRenderingComponent=null,currentlyRenderingTask=null,currentlyRenderingRequest=null,currentlyRenderingKeyPath=null,firstWorkInProgressHook=null,workInProgressHook=null,isReRender=!1,didScheduleRenderPhaseUpdate=!1,localIdCounter=0,actionStateCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,thenableState=null,renderPhaseUpdates=null,numberOfReRenders=0,isInHookUserCodeInDev=!1,currentHookNameInDev,HooksDispatcher={readContext,use:function(usable){if(usable!==null&&typeof usable==="object"){if(typeof usable.then==="function")return unwrapThenable(usable);if(usable.$$typeof===REACT_CONTEXT_TYPE)return readContext(usable)}throw Error("An unsupported type was passed to use(): "+String(usable))},useContext:function(context){return currentHookNameInDev="useContext",resolveCurrentlyRenderingComponent(),context._currentValue2},useMemo,useReducer,useRef:function(initialValue){currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook();var previousRef=workInProgressHook.memoizedState;return previousRef===null?(initialValue={current:initialValue},Object.seal(initialValue),workInProgressHook.memoizedState=initialValue):previousRef},useState:function(initialState){return currentHookNameInDev="useState",useReducer(basicStateReducer,initialState)},useInsertionEffect:noop,useLayoutEffect:noop,useCallback:function(callback,deps){return useMemo(function(){return callback},deps)},useImperativeHandle:noop,useEffect:noop,useDebugValue:noop,useDeferredValue:function(value,initialValue){return resolveCurrentlyRenderingComponent(),initialValue!==void 0?initialValue:value},useTransition:function(){return resolveCurrentlyRenderingComponent(),[!1,unsupportedStartTransition]},useId:function(){var treeId=currentlyRenderingTask.treeContext,overflow=treeId.overflow;treeId=treeId.id,treeId=(treeId&~(1<<32-clz32(treeId)-1)).toString(32)+overflow;var resumableState=currentResumableState;if(resumableState===null)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");return overflow=localIdCounter++,treeId="_"+resumableState.idPrefix+"R_"+treeId,0<overflow&&(treeId+="H"+overflow.toString(32)),treeId+"_"},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){if(getServerSnapshot===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return getServerSnapshot()},useOptimistic:function(passthrough){return resolveCurrentlyRenderingComponent(),[passthrough,unsupportedSetOptimisticState]},useActionState,useFormState:useActionState,useHostTransitionStatus:function(){return resolveCurrentlyRenderingComponent(),NotPending},useMemoCache:function(size){for(var data=Array(size),i=0;i<size;i++)data[i]=REACT_MEMO_CACHE_SENTINEL;return data},useCacheRefresh:function(){return unsupportedRefresh},useEffectEvent:function(){return throwOnUseEffectEventCall}},currentResumableState=null,currentTaskInDEV=null,DefaultAsyncDispatcher={getCacheForType:function(){throw Error("Not implemented.")},cacheSignal:function(){throw Error("Not implemented.")},getOwner:function(){return currentTaskInDEV===null?null:currentTaskInDEV.componentStack}},disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;disabledLog.__reactDisabledLog=!0;var prefix,suffix,reentry=!1,componentFrameCache=new(typeof WeakMap==="function"?WeakMap:Map),callComponent={react_stack_bottom_frame:function(Component,props,secondArg){return Component(props,secondArg)}},callComponentInDEV=callComponent.react_stack_bottom_frame.bind(callComponent),callRender={react_stack_bottom_frame:function(instance){return instance.render()}},callRenderInDEV=callRender.react_stack_bottom_frame.bind(callRender),callLazyInit={react_stack_bottom_frame:function(lazy){var init=lazy._init;return init(lazy._payload)}},callLazyInitInDEV=callLazyInit.react_stack_bottom_frame.bind(callLazyInit),lastResetTime=0;if(typeof performance==="object"&&typeof performance.now==="function")var localPerformance=performance,getCurrentTime=function(){return localPerformance.now()};else{var localDate=Date;getCurrentTime=function(){return localDate.now()}}var CLIENT_RENDERED=4,PENDING=0,COMPLETED=1,FLUSHED=2,ABORTED=3,ERRORED=4,POSTPONED=5,CLOSED=14,currentRequest=null,didWarnAboutBadClass={},didWarnAboutContextTypes={},didWarnAboutContextTypeOnFunctionComponent={},didWarnAboutGetDerivedStateOnFunctionComponent={},didWarnAboutReassigningProps=!1,didWarnAboutGenerators=!1,didWarnAboutMaps=!1,flushedByteSize=0,flushingPartialBoundaries=!1;exports.renderToStaticMarkup=function(children,options){return renderToStringImpl(children,options,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},exports.renderToString=function(children,options){return renderToStringImpl(children,options,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},exports.version="19.2.8"})()});var TAILWIND_CLASSNAME={kind:"tailwind-classname",prop:"className",needsTailwindJit:!0,editorLabel:"Tailwind classes"},SX_PROP={kind:"sx",prop:"sx",needsTailwindJit:!1,editorLabel:"sx props"},STYLE_PROP={kind:"style",prop:"style",needsTailwindJit:!1,editorLabel:"Inline styles"},STYLE_CHANNELS={"tailwind-classname":TAILWIND_CLASSNAME,sx:SX_PROP,style:STYLE_PROP},CSS_FRAMEWORK_CHANNEL={tailwind:"tailwind-classname",none:"style"};function catalogFromManifest(manifest,opts){return manifest.map((descriptor)=>({id:descriptor.id,installed:opts.installed??!0,importPath:opts.importPath}))}function identifierRef(path){if(!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(path))throw Error(`identifierRef: "${path}" is not a bare identifier path`);return{$identifier:path}}function styleChannelOf(p,folderCss){let adapter=p,allowed=adapter.styleChannels??[adapter.styleChannel?.kind??"tailwind-classname"],fallback=allowed[0]??"tailwind-classname";if(folderCss){let wanted=CSS_FRAMEWORK_CHANNEL[folderCss];if(allowed.includes(wanted))return STYLE_CHANNELS[wanted]}return STYLE_CHANNELS[fallback]}class UnknownProviderError extends Error{id;constructor(id,message){super(message??`Unknown component provider: "${id}"`);this.name="UnknownProviderError",this.id=id}}function createProviderLoader(factories){return async(library)=>{let factory=factories[library.id];if(!factory){let known=Object.keys(factories).sort();throw new UnknownProviderError(library.id,`Unknown component provider: "${library.id}". Known providers: ${known.join(", ")}.`)}return factory(library)}}var COMPONENT_GROUPS=[{id:"actions",label:"Actions"},{id:"forms",label:"Forms & Inputs"},{id:"display",label:"Display"},{id:"feedback",label:"Feedback"},{id:"navigation",label:"Navigation"},{id:"overlays",label:"Overlays"},{id:"layout",label:"Layout"},{id:"typography",label:"Typography"},{id:"visuals",label:"Visuals"},{id:"chat",label:"Chat & AI"}],UNGROUPED_LABEL="Components";function ownEntry(record,key){return Object.hasOwn(record,key)?record[key]:void 0}function lookup(library,ref,node){return typeof library==="function"?library(ref,node):ownEntry(library,ref)}function resolveNodeIdentity(value,ctx){let shape=nodeShape(value);if(shape.kind!=="named")return shape;let{node,ref}=shape,extension=ctx.extensions?ownEntry(ctx.extensions,ref):void 0;if(extension)return{kind:"extension",node,ref,extension};let entry=lookup(ctx.library,ref,node);if(entry===void 0)return{kind:"unresolved",node,ref};return{kind:"component",node,ref,entry}}import{existsSync,readdirSync}from"fs";import{join}from"path";var package_default={name:"@velloo/renderer",version:"0.0.0",license:"Apache-2.0",private:!0,type:"module",description:"Headless renderer: design JSON \u2192 HTML + screenshot",exports:{".":"./src/index.ts","./iframe-protocol":"./src/iframe-protocol.ts"},dependencies:{"@velloo/provider":"workspace:*","@velloo/schema":"workspace:*",pixelmatch:"7.2.0",pngjs:"7.0.0",react:"19.2.8","react-dom":"19.2.8"},devDependencies:{"@types/pngjs":"6.0.5","@types/react":"19.2.18","@types/react-dom":"19.2.7","@velloo/shadcn-snapshot":"workspace:*",playwright:"1.62.1","playwright-core":"1.62.1"}};var PLAYWRIGHT_VERSION=package_default.devDependencies["playwright-core"],PLAYWRIGHT_PIN=`playwright@${PLAYWRIGHT_VERSION}`,CHROMIUM_INSTALL_ARGV=[process.execPath,"x",PLAYWRIGHT_PIN,"install","chromium","--only-shell"],CHROMIUM_INSTALL_CMD="velloo browser install",CHROMIUM_FULL_INSTALL_ARGV=[process.execPath,"x",PLAYWRIGHT_PIN,"install","chromium"],CHROMIUM_FULL_INSTALL_CMD="velloo browser install --full",CHROMIUM_DEPS_INSTALL_ARGV=[process.execPath,"x",PLAYWRIGHT_PIN,"install-deps","chromium"],CHROMIUM_DEPS_INSTALL_CMD="velloo browser install --with-deps",INSTALL_HINT=`Velloo screenshots need a headless browser. Install it once with:
|
|
79
|
+
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`,completeBoundaryWithStylesScript1Partial='$RR("',completeBoundaryScript2='","',completeBoundaryScript3a='",',completeBoundaryScript3b='"',completeBoundaryScriptEnd=")</script>",clientRenderScriptFunctionOnly='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',clientRenderScript1Full='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("',clientRenderScript1Partial='$RX("',clientRenderScript1A='"',clientRenderErrorScriptArgInterstitial=",",clientRenderScriptEnd=")</script>",regexForJSStringsInInstructionScripts=/[<\u2028\u2029]/g,regexForJSStringsInScripts=/[&><\u2028\u2029]/g,lateStyleTagResourceOpen1=' media="not all" data-precedence="',lateStyleTagResourceOpen2='" data-href="',lateStyleTagResourceOpen3='">',lateStyleTagTemplateClose="</style>",currentlyRenderingBoundaryHasStylesToHoist=!1,destinationHasCapacity=!0,stylesheetFlushingQueue=[],styleTagResourceOpen1=' data-precedence="',styleTagResourceOpen2='" data-href="',spaceSeparator=" ",styleTagResourceOpen3='">',styleTagResourceClose="</style>",completedShellIdAttributeStart=' id="',arrayFirstOpenBracket="[",arraySubsequentOpenBracket=",[",arrayInterstitial=",",arrayCloseBracket="]",PENDING$1=0,PRELOADED=1,PREAMBLE=2,LATE=3,regexForHrefInLinkHeaderURLContext=/[<>\r\n]/g,regexForLinkHeaderQuotedParamValueContext=/["';,\r\n]/g,doctypeChunk="",bind=Function.prototype.bind,REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference"),emptyContextObject={};Object.freeze(emptyContextObject);var rendererSigil={},currentActiveSnapshot=null,didWarnAboutNoopUpdateForComponent={},didWarnAboutDeprecatedWillMount={},didWarnAboutUninitializedState=new Set,didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate=new Set,didWarnAboutLegacyLifecyclesAndDerivedState=new Set,didWarnAboutDirectlyAssigningPropsToState=new Set,didWarnAboutUndefinedDerivedState=new Set,didWarnAboutContextTypes$1=new Set,didWarnAboutChildContextTypes=new Set,didWarnAboutInvalidateContextType=new Set,didWarnOnInvalidCallback=new Set,classComponentUpdater={enqueueSetState:function(inst,payload,callback){var internals=inst._reactInternals;internals.queue===null?warnNoop(inst,"setState"):(internals.queue.push(payload),callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback))},enqueueReplaceState:function(inst,payload,callback){inst=inst._reactInternals,inst.replace=!0,inst.queue=[payload],callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)},enqueueForceUpdate:function(inst,callback){inst._reactInternals.queue===null?warnNoop(inst,"forceUpdate"):callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)}},emptyTreeContext={id:1,overflow:""},clz32=Math.clz32?Math.clz32:clz32Fallback,{log,LN2}=Math,SuspenseException=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),suspendedThenable=null,objectIs=typeof Object.is==="function"?Object.is:is,currentlyRenderingComponent=null,currentlyRenderingTask=null,currentlyRenderingRequest=null,currentlyRenderingKeyPath=null,firstWorkInProgressHook=null,workInProgressHook=null,isReRender=!1,didScheduleRenderPhaseUpdate=!1,localIdCounter=0,actionStateCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,thenableState=null,renderPhaseUpdates=null,numberOfReRenders=0,isInHookUserCodeInDev=!1,currentHookNameInDev,HooksDispatcher={readContext,use:function(usable){if(usable!==null&&typeof usable==="object"){if(typeof usable.then==="function")return unwrapThenable(usable);if(usable.$$typeof===REACT_CONTEXT_TYPE)return readContext(usable)}throw Error("An unsupported type was passed to use(): "+String(usable))},useContext:function(context){return currentHookNameInDev="useContext",resolveCurrentlyRenderingComponent(),context._currentValue2},useMemo,useReducer,useRef:function(initialValue){currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook();var previousRef=workInProgressHook.memoizedState;return previousRef===null?(initialValue={current:initialValue},Object.seal(initialValue),workInProgressHook.memoizedState=initialValue):previousRef},useState:function(initialState){return currentHookNameInDev="useState",useReducer(basicStateReducer,initialState)},useInsertionEffect:noop,useLayoutEffect:noop,useCallback:function(callback,deps){return useMemo(function(){return callback},deps)},useImperativeHandle:noop,useEffect:noop,useDebugValue:noop,useDeferredValue:function(value,initialValue){return resolveCurrentlyRenderingComponent(),initialValue!==void 0?initialValue:value},useTransition:function(){return resolveCurrentlyRenderingComponent(),[!1,unsupportedStartTransition]},useId:function(){var treeId=currentlyRenderingTask.treeContext,overflow=treeId.overflow;treeId=treeId.id,treeId=(treeId&~(1<<32-clz32(treeId)-1)).toString(32)+overflow;var resumableState=currentResumableState;if(resumableState===null)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");return overflow=localIdCounter++,treeId="_"+resumableState.idPrefix+"R_"+treeId,0<overflow&&(treeId+="H"+overflow.toString(32)),treeId+"_"},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){if(getServerSnapshot===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return getServerSnapshot()},useOptimistic:function(passthrough){return resolveCurrentlyRenderingComponent(),[passthrough,unsupportedSetOptimisticState]},useActionState,useFormState:useActionState,useHostTransitionStatus:function(){return resolveCurrentlyRenderingComponent(),NotPending},useMemoCache:function(size){for(var data=Array(size),i=0;i<size;i++)data[i]=REACT_MEMO_CACHE_SENTINEL;return data},useCacheRefresh:function(){return unsupportedRefresh},useEffectEvent:function(){return throwOnUseEffectEventCall}},currentResumableState=null,currentTaskInDEV=null,DefaultAsyncDispatcher={getCacheForType:function(){throw Error("Not implemented.")},cacheSignal:function(){throw Error("Not implemented.")},getOwner:function(){return currentTaskInDEV===null?null:currentTaskInDEV.componentStack}},disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;disabledLog.__reactDisabledLog=!0;var prefix,suffix,reentry=!1,componentFrameCache=new(typeof WeakMap==="function"?WeakMap:Map),callComponent={react_stack_bottom_frame:function(Component,props,secondArg){return Component(props,secondArg)}},callComponentInDEV=callComponent.react_stack_bottom_frame.bind(callComponent),callRender={react_stack_bottom_frame:function(instance){return instance.render()}},callRenderInDEV=callRender.react_stack_bottom_frame.bind(callRender),callLazyInit={react_stack_bottom_frame:function(lazy){var init=lazy._init;return init(lazy._payload)}},callLazyInitInDEV=callLazyInit.react_stack_bottom_frame.bind(callLazyInit),lastResetTime=0;if(typeof performance==="object"&&typeof performance.now==="function")var localPerformance=performance,getCurrentTime=function(){return localPerformance.now()};else{var localDate=Date;getCurrentTime=function(){return localDate.now()}}var CLIENT_RENDERED=4,PENDING=0,COMPLETED=1,FLUSHED=2,ABORTED=3,ERRORED=4,POSTPONED=5,CLOSED=14,currentRequest=null,didWarnAboutBadClass={},didWarnAboutContextTypes={},didWarnAboutContextTypeOnFunctionComponent={},didWarnAboutGetDerivedStateOnFunctionComponent={},didWarnAboutReassigningProps=!1,didWarnAboutGenerators=!1,didWarnAboutMaps=!1,flushedByteSize=0,flushingPartialBoundaries=!1;exports.renderToStaticMarkup=function(children,options){return renderToStringImpl(children,options,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},exports.renderToString=function(children,options){return renderToStringImpl(children,options,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},exports.version="19.2.8"})()});var exports_react_dom_server_bun_development={};__exportCjs(exports_react_dom_server_bun_development,{renderToReadableStream:()=>$renderToReadableStream,version:()=>$version},{renderToReadableStream:(value)=>$renderToReadableStream=value,version:(value)=>$version=value});var TAILWIND_CLASSNAME={kind:"tailwind-classname",prop:"className",needsTailwindJit:!0,editorLabel:"Tailwind classes"},SX_PROP={kind:"sx",prop:"sx",needsTailwindJit:!1,editorLabel:"sx props"},STYLE_PROP={kind:"style",prop:"style",needsTailwindJit:!1,editorLabel:"Inline styles"},STYLE_CHANNELS={"tailwind-classname":TAILWIND_CLASSNAME,sx:SX_PROP,style:STYLE_PROP},CSS_FRAMEWORK_CHANNEL={tailwind:"tailwind-classname",none:"style"};function catalogFromManifest(manifest,opts){return manifest.map((descriptor)=>({id:descriptor.id,installed:opts.installed??!0,importPath:opts.importPath}))}function identifierRef(path){if(!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(path))throw Error(`identifierRef: "${path}" is not a bare identifier path`);return{$identifier:path}}function styleChannelOf(p,folderCss){let adapter=p,allowed=adapter.styleChannels??[adapter.styleChannel?.kind??"tailwind-classname"],fallback=allowed[0]??"tailwind-classname";if(folderCss){let wanted=CSS_FRAMEWORK_CHANNEL[folderCss];if(allowed.includes(wanted))return STYLE_CHANNELS[wanted]}return STYLE_CHANNELS[fallback]}class UnknownProviderError extends Error{id;constructor(id,message){super(message??`Unknown component provider: "${id}"`);this.name="UnknownProviderError",this.id=id}}function createProviderLoader(factories){return async(library)=>{let factory=factories[library.id];if(!factory){let known=Object.keys(factories).sort();throw new UnknownProviderError(library.id,`Unknown component provider: "${library.id}". Known providers: ${known.join(", ")}.`)}return factory(library)}}var COMPONENT_GROUPS=[{id:"actions",label:"Actions"},{id:"forms",label:"Forms & Inputs"},{id:"display",label:"Display"},{id:"feedback",label:"Feedback"},{id:"navigation",label:"Navigation"},{id:"overlays",label:"Overlays"},{id:"layout",label:"Layout"},{id:"typography",label:"Typography"},{id:"visuals",label:"Visuals"},{id:"chat",label:"Chat & AI"}],UNGROUPED_LABEL="Components";function ownEntry(record,key){return Object.hasOwn(record,key)?record[key]:void 0}function lookup(library,ref,node){return typeof library==="function"?library(ref,node):ownEntry(library,ref)}function resolveNodeIdentity(value,ctx){let shape=nodeShape(value);if(shape.kind!=="named")return shape;let{node,ref}=shape,extension=ctx.extensions?ownEntry(ctx.extensions,ref):void 0;if(extension)return{kind:"extension",node,ref,extension};let entry=lookup(ctx.library,ref,node);if(entry===void 0)return{kind:"unresolved",node,ref};return{kind:"component",node,ref,entry}}function buildBoardComposite(frames,options={}){let maxWidth=options.maxWidth??1600,labelPad=options.labels?26:0,minX=Math.min(...frames.map(({frame})=>frame.x)),minY=Math.min(...frames.map(({frame})=>frame.y)),maxX=Math.max(...frames.map(({frame})=>frame.x+frame.w)),maxY=Math.max(...frames.map(({frame})=>frame.y+frame.h)),w=maxX-minX+48,h=maxY-minY+48+labelPad,scale=Math.min(1,maxWidth/w),outW=Math.max(1,Math.round(w*scale)),outH=Math.max(1,Math.round(h*scale)),esc=(s)=>s.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),pieces=frames.map(({frame,html,label})=>{let left=frame.x-minX+24,top=frame.y-minY+24+labelPad;return(options.labels&&label?`<div class="label" style="left:${left}px;top:${top-26}px">${esc(label)}</div>`:"")+`<iframe scrolling="no" srcdoc="${esc(html)}" style="position:absolute;left:${left}px;top:${top}px;width:${frame.w}px;height:${frame.h}px"></iframe>`}).join(`
|
|
80
|
+
`);return{html:`<!doctype html>
|
|
81
|
+
<html><head><meta charset="utf-8"><style>
|
|
82
|
+
*{box-sizing:border-box}
|
|
83
|
+
body{margin:0;background:#f4f4f5;width:${outW}px;height:${outH}px;overflow:hidden}
|
|
84
|
+
.canvas{position:relative;width:${w}px;height:${h}px;transform:scale(${scale});transform-origin:0 0}
|
|
85
|
+
.label{position:absolute;font:600 12px/1 ui-sans-serif,system-ui,sans-serif;color:#71717a;padding:4px 0}
|
|
86
|
+
iframe{border:1px solid #e4e4e7;background:#fff;display:block}
|
|
87
|
+
</style></head>
|
|
88
|
+
<body>
|
|
89
|
+
<div class="canvas">
|
|
90
|
+
${pieces}
|
|
91
|
+
</div>
|
|
92
|
+
</body></html>`,viewport:{w:outW,h:outH},scale}}import{existsSync,readdirSync}from"fs";import{join}from"path";var package_default={name:"@velloo/renderer",version:"0.0.0",license:"Apache-2.0",private:!0,type:"module",description:"Headless renderer: design JSON \u2192 HTML + screenshot",exports:{".":"./src/index.ts","./iframe-protocol":"./src/iframe-protocol.ts"},dependencies:{"@velloo/provider":"workspace:*","@velloo/schema":"workspace:*",pixelmatch:"7.2.0",pngjs:"7.0.0",react:"19.2.8","react-dom":"19.2.8"},devDependencies:{"@types/pngjs":"6.0.5","@types/react":"19.2.18","@types/react-dom":"19.2.7","@velloo/shadcn-snapshot":"workspace:*",playwright:"1.62.1","playwright-core":"1.62.1"}};var PLAYWRIGHT_VERSION=package_default.devDependencies["playwright-core"],PLAYWRIGHT_PIN=`playwright@${PLAYWRIGHT_VERSION}`,CHROMIUM_INSTALL_ARGV=[process.execPath,"x",PLAYWRIGHT_PIN,"install","chromium","--only-shell"],CHROMIUM_INSTALL_CMD="velloo browser install",CHROMIUM_FULL_INSTALL_ARGV=[process.execPath,"x",PLAYWRIGHT_PIN,"install","chromium"],CHROMIUM_FULL_INSTALL_CMD="velloo browser install --full",CHROMIUM_DEPS_INSTALL_ARGV=[process.execPath,"x",PLAYWRIGHT_PIN,"install-deps","chromium"],CHROMIUM_DEPS_INSTALL_CMD="velloo browser install --with-deps",INSTALL_HINT=`Velloo screenshots need a headless browser. Install it once with:
|
|
80
93
|
${CHROMIUM_INSTALL_CMD}
|
|
81
94
|
`+"Then just retry the tool \u2014 the browser is picked up on the next call, no server restart needed. "+"(It's an on-demand extra; the canvas itself never needs it.)";class BrowserMissingError extends Error{constructor(message=INSTALL_HINT){super(message);this.name="BrowserMissingError"}}async function chromiumExecutable(){try{let{chromium}=await import("playwright-core"),path=chromium.executablePath();if(!path)return null;if(existsSync(path))return path;let m=path.match(/^(.*)[/\\]chromium-(\d+)[/\\]/);if(!m?.[1]||!m[2])return null;let shellRoot=join(m[1],`chromium_headless_shell-${m[2]}`);if(!existsSync(shellRoot))return null;let bin=process.platform==="win32"?"chrome-headless-shell.exe":"chrome-headless-shell";for(let sub of readdirSync(shellRoot)){let candidate=join(shellRoot,sub,bin);if(existsSync(candidate))return candidate}return null}catch{return null}}async function launchBrowser(){let chromium;try{({chromium}=await import("playwright-core"))}catch{throw new BrowserMissingError}try{return await chromium.launch()}catch(e){let msg=e instanceof Error?e.message:String(e);if(/Executable doesn't exist|playwright install|browserType\.launch/i.test(msg))throw new BrowserMissingError;let firstLine=msg.split(`
|
|
82
95
|
`).find((l)=>l.trim()!=="")?.trim()??msg;throw new BrowserMissingError(`Chromium failed to launch: ${firstLine}
|
|
83
96
|
If the browser isn't installed, run:
|
|
84
97
|
${CHROMIUM_INSTALL_CMD}
|
|
85
|
-
Then retry \u2014 no server restart needed.`)}}var MAX_CONCURRENT_RENDERS=3,renderSlots=MAX_CONCURRENT_RENDERS,renderQueue=[];async function acquireRenderSlot(){if(renderSlots>0)renderSlots-=1;else await new Promise((resolve)=>renderQueue.push(resolve));let released=!1;return()=>{if(released)return;released=!0;let next=renderQueue.shift();if(next)next();else renderSlots+=1}}var pooledBrowser=null,browserLaunch=null;async function closePooledBrowser(){let browser=pooledBrowser??(browserLaunch?await browserLaunch.catch(()=>null):null);pooledBrowser=null,await browser?.close().catch(()=>{return})}async function pooledChromium(){if(pooledBrowser?.isConnected())return pooledBrowser;if(!browserLaunch)browserLaunch=launchBrowser().then((b)=>(pooledBrowser=b,b.on("disconnected",()=>{if(pooledBrowser===b)pooledBrowser=null}),b)).finally(()=>{browserLaunch=null});return browserLaunch}function isBrowserGone(err){let m=err instanceof Error?err.message:String(err);return/has been closed|Target closed|browser closed|Connection closed|crashed/i.test(m)}async function withContext(options,fn){let release=await acquireRenderSlot();try{return await runInContext(options,fn)}catch(err){if(!isBrowserGone(err))throw err;return pooledBrowser=null,await runInContext(options,fn)}finally{release()}}async function runInContext(options,fn){let context=await(await pooledChromium()).newContext(options);try{return await fn(context)}finally{await context.close().catch(()=>{return})}}var CAPTURE_TIMEOUT_MS=20000;function isCaptureTimeout(err){return err instanceof Error&&err.name==="TimeoutError"}import{createHash}from"crypto";import{existsSync as existsSync2,mkdirSync,readdirSync as readdirSync2,readFileSync,realpathSync,rmSync,statSync,writeFileSync}from"fs";import{homedir}from"os";import{join as join2,resolve}from"path";var SECOND_LEVEL_SUFFIXES=new Set(["ac","asn","biz","co","com","edu","gov","govt","id","in","info","int","ltd","me","mil","ne","net","nom","or","org","plc","sch","web"]);function isHostLiteral(host){if(host.includes(":"))return!0;if(/^\d+(\.\d+){3}$/.test(host))return!0;return!host.includes(".")}function registrableDomain(host){let h=host.replace(/^\.+/,"").toLowerCase();if(isHostLiteral(h))return h;let labels=h.split(".").filter((l)=>l.length>0);if(labels.length<=2)return labels.join(".");let tld=labels[labels.length-1]??"",sld=labels[labels.length-2]??"",take=tld.length<=3&&SECOND_LEVEL_SUFFIXES.has(sld)?3:2;return labels.slice(-take).join(".")}function withinRegistrableDomain(host,base){let h=host.replace(/^\.+/,"").toLowerCase();return h===base||h.endsWith(`.${base}`)}function scopeStorageState(state,capturedOrigins,now=Date.now()){let bases=new Set;for(let origin of capturedOrigins)try{bases.add(registrableDomain(new URL(origin).hostname))}catch{}let nowSec=Math.floor(now/1000),cookies=state.cookies.filter((c)=>{if(c.expires!==-1&&c.expires<=nowSec)return!1;let host=c.domain.replace(/^\./,"").toLowerCase();for(let base of bases)if(withinRegistrableDomain(host,base))return!0;return!1}),origins=state.origins.filter((o)=>{try{let host=new URL(o.origin).hostname;for(let base of bases)if(withinRegistrableDomain(host,base))return!0}catch{return!1}return!1});return{cookies,origins}}var SESSION_TTL_MS=1209600000;function sessionExpired(writtenAt,now=Date.now()){return now-writtenAt>SESSION_TTL_MS}function vellooHome(){return process.env.VELLOO_HOME??join2(homedir(),".velloo")}function folderKey(root,folderId){if(folderId)return folderId;let real=root;try{real=realpathSync(root)}catch{real=resolve(root)}return createHash("sha256").update(real).digest("hex").slice(0,16)}function capturesDir(root,folderId){return join2(vellooHome(),"captures",folderKey(root,folderId))}function sessionsDir(root,folderId){return join2(vellooHome(),"sessions",folderKey(root,folderId))}function sessionStatePath(root,origin,folderId){let key=createHash("sha256").update(origin).digest("hex").slice(0,12);return join2(sessionsDir(root,folderId),`${key}.json`)}var MANIFEST="capture.json";function ensureDir(dir){mkdirSync(dir,{recursive:!0,mode:448})}function captureDir(root,id,folderId){return join2(capturesDir(root,folderId),id)}function writeCaptureManifest(dir,manifest){ensureDir(dir),writeFileSync(join2(dir,MANIFEST),`${JSON.stringify(manifest,null,2)}
|
|
98
|
+
Then retry \u2014 no server restart needed.`)}}var MAX_CONCURRENT_RENDERS=3,renderSlots=MAX_CONCURRENT_RENDERS,renderQueue=[];async function acquireRenderSlot(){if(renderSlots>0)renderSlots-=1;else await new Promise((resolve)=>renderQueue.push(resolve));let released=!1;return()=>{if(released)return;released=!0;let next=renderQueue.shift();if(next)next();else renderSlots+=1}}var pooledBrowser=null,browserLaunch=null;async function closePooledBrowser(){let browser=pooledBrowser??(browserLaunch?await browserLaunch.catch(()=>null):null);pooledBrowser=null,await browser?.close().catch(()=>{return})}async function pooledChromium(){if(pooledBrowser?.isConnected())return pooledBrowser;if(!browserLaunch)browserLaunch=launchBrowser().then((b)=>(pooledBrowser=b,b.on("disconnected",()=>{if(pooledBrowser===b)pooledBrowser=null}),b)).finally(()=>{browserLaunch=null});return browserLaunch}function isBrowserGone(err){let m=err instanceof Error?err.message:String(err);return/has been closed|Target closed|browser closed|Connection closed|crashed/i.test(m)}async function withContext(options,fn){let release=await acquireRenderSlot();try{return await runInContext(options,fn)}catch(err){if(!isBrowserGone(err))throw err;return pooledBrowser=null,await runInContext(options,fn)}finally{release()}}async function runInContext(options,fn){let context=await(await pooledChromium()).newContext(options);try{return await fn(context)}finally{await context.close().catch(()=>{return})}}var CAPTURE_TIMEOUT_MS=20000;function isCaptureTimeout(err){return err instanceof Error&&err.name==="TimeoutError"}import{randomBytes}from"crypto";import{existsSync as existsSync3,mkdirSync as mkdirSync3}from"fs";import{createHash as createHash2}from"crypto";import{mkdirSync as mkdirSync2,writeFileSync as writeFileSync2}from"fs";import{join as join3}from"path";import{createHash}from"crypto";import{existsSync as existsSync2,mkdirSync,readdirSync as readdirSync2,readFileSync,realpathSync,rmSync,statSync,writeFileSync}from"fs";import{homedir}from"os";import{join as join2,resolve}from"path";var SECOND_LEVEL_SUFFIXES=new Set(["ac","asn","biz","co","com","edu","gov","govt","id","in","info","int","ltd","me","mil","ne","net","nom","or","org","plc","sch","web"]);function isHostLiteral(host){if(host.includes(":"))return!0;if(/^\d+(\.\d+){3}$/.test(host))return!0;return!host.includes(".")}function registrableDomain(host){let h=host.replace(/^\.+/,"").toLowerCase();if(isHostLiteral(h))return h;let labels=h.split(".").filter((l)=>l.length>0);if(labels.length<=2)return labels.join(".");let tld=labels[labels.length-1]??"",sld=labels[labels.length-2]??"",take=tld.length<=3&&SECOND_LEVEL_SUFFIXES.has(sld)?3:2;return labels.slice(-take).join(".")}function withinRegistrableDomain(host,base){let h=host.replace(/^\.+/,"").toLowerCase();return h===base||h.endsWith(`.${base}`)}function scopeStorageState(state,capturedOrigins,now=Date.now()){let bases=new Set;for(let origin of capturedOrigins)try{bases.add(registrableDomain(new URL(origin).hostname))}catch{}let nowSec=Math.floor(now/1000),cookies=state.cookies.filter((c)=>{if(c.expires!==-1&&c.expires<=nowSec)return!1;let host=c.domain.replace(/^\./,"").toLowerCase();for(let base of bases)if(withinRegistrableDomain(host,base))return!0;return!1}),origins=state.origins.filter((o)=>{try{let host=new URL(o.origin).hostname;for(let base of bases)if(withinRegistrableDomain(host,base))return!0}catch{return!1}return!1});return{cookies,origins}}var SESSION_TTL_MS=1209600000;function sessionExpired(writtenAt,now=Date.now()){return now-writtenAt>SESSION_TTL_MS}function vellooHome(){return process.env.VELLOO_HOME??join2(homedir(),".velloo")}function folderKey(root,folderId){if(folderId)return folderId;let real=root;try{real=realpathSync(root)}catch{real=resolve(root)}return createHash("sha256").update(real).digest("hex").slice(0,16)}function capturesDir(root,folderId){return join2(vellooHome(),"captures",folderKey(root,folderId))}function sessionsDir(root,folderId){return join2(vellooHome(),"sessions",folderKey(root,folderId))}function sessionStatePath(root,origin,folderId){let key=createHash("sha256").update(origin).digest("hex").slice(0,12);return join2(sessionsDir(root,folderId),`${key}.json`)}var MANIFEST="capture.json";function ensureDir(dir){mkdirSync(dir,{recursive:!0,mode:448})}function captureDir(root,id,folderId){return join2(capturesDir(root,folderId),id)}function writeCaptureManifest(dir,manifest){ensureDir(dir),writeFileSync(join2(dir,MANIFEST),`${JSON.stringify(manifest,null,2)}
|
|
86
99
|
`,{mode:384})}function listCaptures(root,folderId){let dir=capturesDir(root,folderId);if(!existsSync2(dir))return[];let out=[];for(let entry of readdirSync2(dir))try{let raw=readFileSync(join2(dir,entry,MANIFEST),"utf8");out.push(JSON.parse(raw))}catch{}return out.sort((a,b)=>b.capturedAt.localeCompare(a.capturedAt))}function readCaptureManifest(root,id,folderId){try{let raw=readFileSync(join2(captureDir(root,id,folderId),MANIFEST),"utf8");return JSON.parse(raw)}catch{return null}}function deleteCapture(root,id,folderId){if(!isSafeCaptureId(id))return!1;let dir=captureDir(root,id,folderId);if(!existsSync2(dir))return!1;return rmSync(dir,{recursive:!0,force:!0}),!0}function isSafeCaptureId(id){return/^[A-Za-z0-9_-]{1,64}$/.test(id)}function isSafeCaptureFile(file){return/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(file)&&!file.includes("..")}function newCaptureId(){return`${new Date().toISOString().replace(/[-:.TZ]/g,"").slice(0,14)}-${createHash("sha256").update(`${Math.random()}${Date.now()}`).digest("hex").slice(0,6)}`}function writeSessionState(path,state,capturedOrigins){let scoped=scopeStorageState(state,capturedOrigins);return ensureDir(join2(path,"..")),writeFileSync(path,`${JSON.stringify(scoped,null,2)}
|
|
87
|
-
`,{mode:384}),path}function readSessionState(path){try{if(!existsSync2(path))return null;let age=statSync(path).mtimeMs;if(sessionExpired(age))return rmSync(path,{force:!0}),null;let parsed=JSON.parse(readFileSync(path,"utf8"));if(!Array.isArray(parsed.cookies)||!Array.isArray(parsed.origins))return null;return parsed}catch{return null}}import{randomBytes}from"crypto";import{existsSync as existsSync3,mkdirSync as mkdirSync3}from"fs";import{createHash as createHash2}from"crypto";import{mkdirSync as mkdirSync2,writeFileSync as writeFileSync2}from"fs";import{join as join3}from"path";function pixelmatch(img1,img2,output,width,height,options={}){let{threshold=0.1,alpha=0.1,aaColor=[255,255,0],diffColor=[255,0,0],checkerboard=!0,includeAA,diffColorAlt,diffMask}=options;if(!isPixelData(img1)||!isPixelData(img2)||output&&!isPixelData(output))throw Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(img1.length!==img2.length||output&&output.length!==img1.length)throw Error(`Image sizes do not match. Image 1 size: ${img1.length}, image 2 size: ${img2.length}`);if(img1.length!==width*height*4)throw Error(`Image data size does not match width/height. Expecting ${width*height*4}. Got ${img1.length}`);let len=width*height,a32=new Uint32Array(img1.buffer,img1.byteOffset,len),b32=new Uint32Array(img2.buffer,img2.byteOffset,len),identical=!0;for(let i=0;i<len;i++)if(a32[i]!==b32[i]){identical=!1;break}if(identical){if(output&&!diffMask)for(let i=0,pos=0;i<len;i++,pos+=4)drawGrayPixel(img1,pos,alpha,output);return 0}let maxDelta=35215*threshold*threshold,[aaR,aaG,aaB]=aaColor,[diffR,diffG,diffB]=diffColor,[altR,altG,altB]=diffColorAlt||diffColor,diff=0;for(let i=0,pos=0;i<len;i++,pos+=4){let delta=a32[i]===b32[i]?0:colorDelta(img1,img2,pos,pos,checkerboard);if(Math.abs(delta)>maxDelta){let x=i%width,y=i/width|0;if(!includeAA&&(antialiased(img1,x,y,width,height,a32,b32,checkerboard)||antialiased(img2,x,y,width,height,b32,a32,checkerboard))){if(output&&!diffMask)drawPixel(output,pos,aaR,aaG,aaB)}else{if(output)if(delta<0)drawPixel(output,pos,altR,altG,altB);else drawPixel(output,pos,diffR,diffG,diffB);diff++}}else if(output&&!diffMask)drawGrayPixel(img1,pos,alpha,output)}return diff}function isPixelData(arr){return ArrayBuffer.isView(arr)&&arr.BYTES_PER_ELEMENT===1}function antialiased(img,x1,y1,width,height,a32,b32,checkerboard){let x0=Math.max(x1-1,0),y0=Math.max(y1-1,0),x2=Math.min(x1+1,width-1),y2=Math.min(y1+1,height-1),pos4=(y1*width+x1)*4,cr=img[pos4],cg=img[pos4+1],cb=img[pos4+2],ca=img[pos4+3],zeroes=x1===x0||x1===x2||y1===y0||y1===y2?1:0,min=0,max=0,minX=0,minY=0,maxX=0,maxY=0;for(let x=x0;x<=x2;x++)for(let y=y0;y<=y2;y++){if(x===x1&&y===y1)continue;let delta=brightnessDelta(img,pos4,(y*width+x)*4,cr,cg,cb,ca,checkerboard);if(delta===0){if(zeroes++,zeroes>2)return!1}else if(delta<min)min=delta,minX=x,minY=y;else if(delta>max)max=delta,maxX=x,maxY=y}if(min===0||max===0)return!1;return hasManySiblings(a32,minX,minY,width,height)&&hasManySiblings(b32,minX,minY,width,height)||hasManySiblings(a32,maxX,maxY,width,height)&&hasManySiblings(b32,maxX,maxY,width,height)}function hasManySiblings(img,x1,y1,width,height){let x0=Math.max(x1-1,0),y0=Math.max(y1-1,0),x2=Math.min(x1+1,width-1),y2=Math.min(y1+1,height-1),val=img[y1*width+x1],zeroes=x1===x0||x1===x2||y1===y0||y1===y2?1:0;for(let x=x0;x<=x2;x++)for(let y=y0;y<=y2;y++){if(x===x1&&y===y1)continue;if(zeroes+=+(val===img[y*width+x]),zeroes>2)return!0}return!1}function colorDelta(img1,img2,k,m,checkerboard){let r1=img1[k],g1=img1[k+1],b1=img1[k+2],a1=img1[k+3],r2=img2[m],g2=img2[m+1],b2=img2[m+2],a2=img2[m+3],dr=r1-r2,dg=g1-g2,db=b1-b2,da=a1-a2;if(a1<255||a2<255){let rb=255,gb=255,bb=255;if(checkerboard)rb=48+159*(k%2),gb=48+159*((k/1.618033988749895|0)%2),bb=48+159*((k/2.618033988749895|0)%2);dr=(r1*a1-r2*a2-rb*da)/255,dg=(g1*a1-g2*a2-gb*da)/255,db=(b1*a1-b2*a2-bb*da)/255}let y=dr*0.29889531+dg*0.58662247+db*0.11448223,i=dr*0.59597799-dg*0.2741761-db*0.32180189,q=dr*0.21147017-dg*0.52261711+db*0.31114694,delta=0.5053*y*y+0.299*i*i+0.1957*q*q;return y>0?-delta:delta}function brightnessDelta(img,k,m,r1,g1,b1,a1,checkerboard){let r2=img[m],g2=img[m+1],b2=img[m+2],a2=img[m+3],dr=r1-r2,dg=g1-g2,db=b1-b2,da=a1-a2;if(!dr&&!dg&&!db&&!da)return 0;if(a1<255||a2<255){let rb=255,gb=255,bb=255;if(checkerboard)rb=48+159*(k%2),gb=48+159*((k/1.618033988749895|0)%2),bb=48+159*((k/2.618033988749895|0)%2);dr=(r1*a1-r2*a2-rb*da)/255,dg=(g1*a1-g2*a2-gb*da)/255,db=(b1*a1-b2*a2-bb*da)/255}return dr*0.29889531+dg*0.58662247+db*0.11448223}function drawPixel(output,pos,r,g,b){output[pos]=r,output[pos+1]=g,output[pos+2]=b,output[pos+3]=255}function drawGrayPixel(img,i,alpha,output){let val=255+(img[i]*0.29889531+img[i+1]*0.58662247+img[i+2]*0.11448223-255)*alpha*img[i+3]/255;drawPixel(output,i,val,val,val)}var import_pngjs=__toESM(require_png(),1);function padToUnion(png,width,height){if(png.width===width&&png.height===height)return png;let out=new import_pngjs.PNG({width,height,fill:!0});return import_pngjs.PNG.bitblt(png,out,0,0,png.width,png.height,0,0),out}function clusterRegions(mask,width,height,cellSize,maxRegions){let cols=Math.ceil(width/cellSize),rows=Math.ceil(height/cellSize),dirty=new Uint8Array(cols*rows);for(let y=0;y<height;y++)for(let x=0;x<width;x++)if(mask[y*width+x])dirty[Math.floor(y/cellSize)*cols+Math.floor(x/cellSize)]=1;let seen=new Uint8Array(cols*rows),regions=[];for(let cy=0;cy<rows;cy++)for(let cx=0;cx<cols;cx++){let idx=cy*cols+cx;if(!dirty[idx]||seen[idx])continue;let minX=cx,maxX=cx,minY=cy,maxY=cy,queue=[idx];seen[idx]=1;while(queue.length>0){let cur=queue.pop(),x=cur%cols,y=Math.floor(cur/cols);minX=Math.min(minX,x),maxX=Math.max(maxX,x),minY=Math.min(minY,y),maxY=Math.max(maxY,y);for(let[dx,dy]of[[1,0],[-1,0],[0,1],[0,-1]]){let nx=x+dx,ny=y+dy;if(nx<0||ny<0||nx>=cols||ny>=rows)continue;let nIdx=ny*cols+nx;if(dirty[nIdx]&&!seen[nIdx])seen[nIdx]=1,queue.push(nIdx)}}regions.push({x:minX*cellSize,y:minY*cellSize,w:Math.min((maxX+1)*cellSize,width)-minX*cellSize,h:Math.min((maxY+1)*cellSize,height)-minY*cellSize})}if(regions.sort((a,b)=>b.w*b.h-a.w*a.h),regions.length>maxRegions){let tail=regions.slice(maxRegions-1),minX=Math.min(...tail.map((r)=>r.x)),minY=Math.min(...tail.map((r)=>r.y)),maxX=Math.max(...tail.map((r)=>r.x+r.w)),maxY=Math.max(...tail.map((r)=>r.y+r.h));return[...regions.slice(0,maxRegions-1),{x:minX,y:minY,w:maxX-minX,h:maxY-minY}]}return regions}function diffPngs(before,after,options={}){let a=import_pngjs.PNG.sync.read(before),b=import_pngjs.PNG.sync.read(after),width=Math.max(a.width,b.width),height=Math.max(a.height,b.height),pa=padToUnion(a,width,height),pb=padToUnion(b,width,height),diff=new import_pngjs.PNG({width,height}),changedPixels=pixelmatch(pa.data,pb.data,diff.data,width,height,{threshold:options.threshold??0.1,includeAA:!1,alpha:0.6}),mask=new Uint8Array(width*height);if(changedPixels>0){let d=diff.data;for(let i=0;i<width*height;i++){let r=d[i*4],g=d[i*4+1],bch=d[i*4+2];if(r>200&&g<120&&bch<120)mask[i]=1}}let regions=changedPixels===0?[]:clusterRegions(mask,width,height,options.cellSize??16,options.maxRegions??10);for(let r of regions){let n=0;for(let y=r.y;y<r.y+r.h;y++){let row=y*width;for(let x=r.x;x<r.x+r.w;x++)n+=mask[row+x]}r.changedPixels=n}regions.sort((a,b)=>(b.changedPixels??0)-(a.changedPixels??0));let contentHeight=Math.min(a.height,b.height),contentLen=width*contentHeight*4,contentChangedPixels=contentHeight===height?changedPixels:pixelmatch(pa.data.subarray(0,contentLen),pb.data.subarray(0,contentLen),void 0,width,contentHeight,{threshold:options.threshold??0.1,includeAA:!1,alpha:0.6});return{changedPixels,changedRatio:changedPixels/(width*height),alignedChangedRatio:changedPixels===0?0:alignedChanged(pa.data,pb.data,mask,width,height,options.threshold??0.1)/(width*height),contentChangedRatio:contentChangedPixels/(width*contentHeight),heightDelta:b.height-a.height,width,height,regions,diffPng:import_pngjs.PNG.sync.write(diff)}}function alignedChanged(a,b,mask,width,height,threshold){let maxDelta=35215*threshold*threshold,remaining=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){if(!mask[y*width+x])continue;let here=(y*width+x)*4,matched=!1;for(let dy=-1;dy<=1&&!matched;dy++){let ny=y+dy;if(ny<0||ny>=height)continue;for(let dx=-1;dx<=1&&!matched;dx++){let nx=x+dx;if(nx<0||nx>=width||dx===0&&dy===0)continue;let there=(ny*width+nx)*4;if(colorDelta2(b,a,here,there)<=maxDelta)matched=!0;else if(colorDelta2(a,b,here,there)<=maxDelta)matched=!0}}if(!matched)remaining++}return remaining}function colorDelta2(a,b,ai,bi){let r1=a[ai],g1=a[ai+1],b1=a[ai+2],r2=b[bi],g2=b[bi+1],b2=b[bi+2],y=0.29889531*(r1-r2)+0.58662247*(g1-g2)+0.11448223*(b1-b2),i=0.59597799*(r1-r2)-0.2741761*(g1-g2)-0.32180189*(b1-b2),q=0.21147017*(r1-r2)-0.52261711*(g1-g2)+0.31114694*(b1-b2);return 0.5053*y*y+0.299*i*i+0.1957*q*q}function downscalePng(png,factor){if(!Number.isInteger(factor)||factor<=1)return png;let src=import_pngjs.PNG.sync.read(png),width=Math.max(1,Math.floor(src.width/factor)),height=Math.max(1,Math.floor(src.height/factor)),out=new import_pngjs.PNG({width,height});for(let y=0;y<height;y++)for(let x=0;x<width;x++){let r=0,g=0,b=0,a=0,n=0;for(let dy=0;dy<factor;dy++){let sy=y*factor+dy;if(sy>=src.height)break;for(let dx=0;dx<factor;dx++){let sx=x*factor+dx;if(sx>=src.width)break;let i=sy*src.width+sx<<2;r+=src.data[i]??0,g+=src.data[i+1]??0,b+=src.data[i+2]??0,a+=src.data[i+3]??0,n++}}let o=y*width+x<<2;out.data[o]=Math.round(r/n),out.data[o+1]=Math.round(g/n),out.data[o+2]=Math.round(b/n),out.data[o+3]=Math.round(a/n)}return import_pngjs.PNG.sync.write(out)}function resizePng(png,width,height){let src=import_pngjs.PNG.sync.read(png),outWidth=Math.max(1,Math.round(width)),outHeight=Math.max(1,Math.round(height));if(src.width===outWidth&&src.height===outHeight)return png;let out=new import_pngjs.PNG({width:outWidth,height:outHeight});for(let y=0;y<outHeight;y++){let sy=Math.max(0,Math.min(src.height-1,(y+0.5)*src.height/outHeight-0.5)),y0=Math.floor(sy),y1=Math.min(src.height-1,y0+1),fy=sy-y0;for(let x=0;x<outWidth;x++){let sx=Math.max(0,Math.min(src.width-1,(x+0.5)*src.width/outWidth-0.5)),x0=Math.floor(sx),x1=Math.min(src.width-1,x0+1),fx=sx-x0,dst=y*outWidth+x<<2;for(let channel=0;channel<4;channel++){let a=src.data[(y0*src.width+x0)*4+channel]??0,b=src.data[(y0*src.width+x1)*4+channel]??0,c=src.data[(y1*src.width+x0)*4+channel]??0,d=src.data[(y1*src.width+x1)*4+channel]??0,top=a+(b-a)*fx,bottom=c+(d-c)*fx;out.data[dst+channel]=Math.round(top+(bottom-top)*fy)}}}return import_pngjs.PNG.sync.write(out)}function pngSize(png){let p=import_pngjs.PNG.sync.read(png);return{width:p.width,height:p.height}}function cropPng(png,region,pad=24){let src=import_pngjs.PNG.sync.read(png),x=Math.max(0,region.x-pad),y=Math.max(0,region.y-pad),w=Math.min(src.width-x,region.w+pad*2),h=Math.min(src.height-y,region.h+pad*2),out=new import_pngjs.PNG({width:w,height:h});return import_pngjs.PNG.bitblt(src,out,x,y,w,h,0,0),import_pngjs.PNG.sync.write(out)}function sideBySidePng(left,right,gutter=12){let a=import_pngjs.PNG.sync.read(left),b=import_pngjs.PNG.sync.read(right),width=a.width+gutter+b.width,height=Math.max(a.height,b.height),out=new import_pngjs.PNG({width,height});return out.data.fill(255),import_pngjs.PNG.bitblt(a,out,0,0,a.width,a.height,0,0),import_pngjs.PNG.bitblt(b,out,0,0,b.width,b.height,a.width+gutter,0),import_pngjs.PNG.sync.write(out)}function unionRegion(regions){let minX=Math.min(...regions.map((r)=>r.x)),minY=Math.min(...regions.map((r)=>r.y)),maxX=Math.max(...regions.map((r)=>r.x+r.w)),maxY=Math.max(...regions.map((r)=>r.y+r.h));return{x:minX,y:minY,w:maxX-minX,h:maxY-minY}}var TOOLBAR_TAG="velloo-capture-toolbar",MAX_NODES=20000,MAX_DEPTH=24,MAX_TEXT=240,TRANSIENT_SCREENSHOT_ERROR=/Protocol error \(Page\.captureScreenshot\):\s*Unable to capture screenshot/i;async function retryTransientScreenshot(take){try{return await take()}catch(err){let message=err instanceof Error?err.message:String(err);if(!TRANSIENT_SCREENSHOT_ERROR.test(message))throw err;return await new Promise((resolve)=>setTimeout(resolve,100)),await take()}}async function capturePagePng(page,fullPage,timeout){return retryTransientScreenshot(()=>page.screenshot({fullPage,animations:"disabled",caret:"hide",...timeout===void 0?{}:{timeout}}))}var STYLE_PROPS=["display","position","boxSizing","flexDirection","flexWrap","alignItems","justifyContent","gap","gridTemplateColumns","padding","margin","width","maxWidth","height","minHeight","fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","textAlign","textTransform","color","backgroundColor","backgroundImage","borderRadius","borderWidth","borderColor","borderStyle","boxShadow","opacity","zIndex"];async function extractDom(page,limits={maxNodes:MAX_NODES,maxDepth:MAX_DEPTH,maxText:MAX_TEXT},toolbarTag=TOOLBAR_TAG){return page.evaluate(({props,maxNodes,maxDepth,maxText,toolbar})=>{let nodes=[],truncated=!1,ownText=(el)=>{let s="";for(let child of Array.from(el.childNodes))if(child.nodeType===3)s+=child.textContent??"";return s.replace(/\s+/g," ").trim().slice(0,maxText)},shown=(text,transform)=>{if(transform==="uppercase")return text.toUpperCase();if(transform==="lowercase")return text.toLowerCase();if(transform==="capitalize")return text.replace(/(^|\s)(\p{L})/gu,(m)=>m.toUpperCase());return text},lineOf=(el,cs)=>{let s="";for(let child of Array.from(el.childNodes)){if(child.nodeType===3){s+=shown(child.textContent??"",cs.textTransform);continue}if(child.nodeType!==1)continue;let inner=child;if(inner.tagName==="BR"){s+=" ";continue}let innerStyle=getComputedStyle(inner);if(innerStyle.display==="none"||innerStyle.visibility==="hidden")continue;let below=lineOf(inner,innerStyle);if(below===null)return null;if(below.trim()==="")continue;if(!(innerStyle.display.startsWith("inline")||innerStyle.display==="contents"))return null;s+=below}return s},signatureOf=(el)=>{let cls=(el.getAttribute("class")??"").trim();return`${el.tagName.toLowerCase()}|${cls}|${el.children.length}`},walk=(el,parent,depth)=>{if(nodes.length>=maxNodes){truncated=!0;return}if(depth>maxDepth){truncated=!0;return}if(el.tagName.toLowerCase()===toolbar)return;let cs=getComputedStyle(el);if(cs.display==="none"||cs.visibility==="hidden")return;if(cs.display==="contents"){for(let child of Array.from(el.children))walk(child,parent,depth);return}let r=el.getBoundingClientRect(),scrollX2=window.scrollX,scrollY2=window.scrollY;if(r.width===0&&r.height===0)return;let style={};for(let p of props){let v=cs[p];if(typeof v==="string"&&v!==""&&v!=="none"&&v!=="normal")style[p]=v}let i=nodes.length,entry={i,parent,depth,tag:el.tagName.toLowerCase(),rect:{x:Math.round(r.x+scrollX2),y:Math.round(r.y+scrollY2),w:Math.round(r.width),h:Math.round(r.height)},style},id=el.getAttribute("id");if(id)entry.id=id;let cls=el.getAttribute("class");if(cls)entry.class=cls.trim().slice(0,400);let role=el.getAttribute("role")??el.getAttribute("aria-label");if(role)entry.role=role;let t=ownText(el);if(t){if(entry.text=t,el.childElementCount>0){let line=lineOf(el,cs)?.replace(/\s+/g," ").trim().slice(0,maxText);if(line&&line!==shown(t,cs.textTransform))entry.line=line}}let src=el.getAttribute("src");if(src)entry.src=src;let href=el.getAttribute("href");if(href)entry.href=href.slice(0,300);let nodePath=el.getAttribute("data-node-path");if(nodePath!==null)entry.nodePath=nodePath;nodes.push(entry);let children=Array.from(el.children),counts=new Map;for(let c of children){let sig=signatureOf(c);counts.set(sig,(counts.get(sig)??0)+1)}let seen=new Set;for(let c of children){let before=nodes.length;walk(c,i,depth+1);let sig=signatureOf(c),n=counts.get(sig)??0;if(n>=3&&!seen.has(sig)&&nodes.length>before){seen.add(sig);let added=nodes[before];if(added)added.repeat={count:n,signature:sig}}}};if(document.body)walk(document.body,null,0);return{url:location.href,title:document.title,viewport:{w:window.innerWidth,h:window.innerHeight},documentHeight:Math.max(document.documentElement?.scrollHeight??0,document.body?.scrollHeight??0),nodes,truncated}},{props:STYLE_PROPS,maxNodes:limits.maxNodes,maxDepth:limits.maxDepth,maxText:limits.maxText,toolbar:toolbarTag})}async function extractThemeVars(page){return page.evaluate(()=>{let light={},dark={},fonts=new Set,isDarkSelector=(sel)=>/(^|[\s,>])(\.dark|\[data-theme["'=\s]*dark|\.theme-dark)/i.test(sel),readRule=(rule,intoDark)=>{let{style,selectorText:selector}=rule;if(!style||typeof selector!=="string")return;if(!/(^|,)\s*(:root|html|body|\.dark|\[data-theme)/i.test(selector))return;let target=intoDark||isDarkSelector(selector)?dark:light;for(let i=0;i<style.length;i++){let prop=style.item(i);if(!prop.startsWith("--"))continue;let value=style.getPropertyValue(prop).trim();if(value)target[prop]=value}let ff=style.getPropertyValue("font-family").trim();if(ff)fonts.add(ff)},walkRules=(rules,intoDark)=>{for(let rule of Array.from(rules)){let asStyle=rule;if(typeof asStyle.selectorText==="string"&&asStyle.style)readRule(rule,intoDark);let nested=rule.cssRules;if(nested&&nested.length>0){let cond=rule instanceof CSSConditionRule?rule.conditionText:"";walkRules(nested,intoDark||/prefers-color-scheme\s*:\s*dark/i.test(cond))}}};for(let sheet of Array.from(document.styleSheets))try{let rules=sheet.cssRules;if(rules)walkRules(rules,!1)}catch{}let rootStyle=getComputedStyle(document.documentElement);for(let prop of Array.from(rootStyle)){if(!prop.startsWith("--"))continue;if(light[prop]!==void 0)continue;let value=rootStyle.getPropertyValue(prop).trim();if(value)light[prop]=value}let bodyFont=getComputedStyle(document.body??document.documentElement).fontFamily;if(bodyFont)fonts.add(bodyFont);let block=(sel,vars)=>{let entries=Object.entries(vars);if(entries.length===0)return"";return`${sel} {
|
|
100
|
+
`,{mode:384}),path}function readSessionState(path){try{if(!existsSync2(path))return null;let age=statSync(path).mtimeMs;if(sessionExpired(age))return rmSync(path,{force:!0}),null;let parsed=JSON.parse(readFileSync(path,"utf8"));if(!Array.isArray(parsed.cookies)||!Array.isArray(parsed.origins))return null;return parsed}catch{return null}}function pixelmatch(img1,img2,output,width,height,options={}){let{threshold=0.1,alpha=0.1,aaColor=[255,255,0],diffColor=[255,0,0],checkerboard=!0,includeAA,diffColorAlt,diffMask}=options;if(!isPixelData(img1)||!isPixelData(img2)||output&&!isPixelData(output))throw Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(img1.length!==img2.length||output&&output.length!==img1.length)throw Error(`Image sizes do not match. Image 1 size: ${img1.length}, image 2 size: ${img2.length}`);if(img1.length!==width*height*4)throw Error(`Image data size does not match width/height. Expecting ${width*height*4}. Got ${img1.length}`);let len=width*height,a32=new Uint32Array(img1.buffer,img1.byteOffset,len),b32=new Uint32Array(img2.buffer,img2.byteOffset,len),identical=!0;for(let i=0;i<len;i++)if(a32[i]!==b32[i]){identical=!1;break}if(identical){if(output&&!diffMask)for(let i=0,pos=0;i<len;i++,pos+=4)drawGrayPixel(img1,pos,alpha,output);return 0}let maxDelta=35215*threshold*threshold,[aaR,aaG,aaB]=aaColor,[diffR,diffG,diffB]=diffColor,[altR,altG,altB]=diffColorAlt||diffColor,diff=0;for(let i=0,pos=0;i<len;i++,pos+=4){let delta=a32[i]===b32[i]?0:colorDelta(img1,img2,pos,pos,checkerboard);if(Math.abs(delta)>maxDelta){let x=i%width,y=i/width|0;if(!includeAA&&(antialiased(img1,x,y,width,height,a32,b32,checkerboard)||antialiased(img2,x,y,width,height,b32,a32,checkerboard))){if(output&&!diffMask)drawPixel(output,pos,aaR,aaG,aaB)}else{if(output)if(delta<0)drawPixel(output,pos,altR,altG,altB);else drawPixel(output,pos,diffR,diffG,diffB);diff++}}else if(output&&!diffMask)drawGrayPixel(img1,pos,alpha,output)}return diff}function isPixelData(arr){return ArrayBuffer.isView(arr)&&arr.BYTES_PER_ELEMENT===1}function antialiased(img,x1,y1,width,height,a32,b32,checkerboard){let x0=Math.max(x1-1,0),y0=Math.max(y1-1,0),x2=Math.min(x1+1,width-1),y2=Math.min(y1+1,height-1),pos4=(y1*width+x1)*4,cr=img[pos4],cg=img[pos4+1],cb=img[pos4+2],ca=img[pos4+3],zeroes=x1===x0||x1===x2||y1===y0||y1===y2?1:0,min=0,max=0,minX=0,minY=0,maxX=0,maxY=0;for(let x=x0;x<=x2;x++)for(let y=y0;y<=y2;y++){if(x===x1&&y===y1)continue;let delta=brightnessDelta(img,pos4,(y*width+x)*4,cr,cg,cb,ca,checkerboard);if(delta===0){if(zeroes++,zeroes>2)return!1}else if(delta<min)min=delta,minX=x,minY=y;else if(delta>max)max=delta,maxX=x,maxY=y}if(min===0||max===0)return!1;return hasManySiblings(a32,minX,minY,width,height)&&hasManySiblings(b32,minX,minY,width,height)||hasManySiblings(a32,maxX,maxY,width,height)&&hasManySiblings(b32,maxX,maxY,width,height)}function hasManySiblings(img,x1,y1,width,height){let x0=Math.max(x1-1,0),y0=Math.max(y1-1,0),x2=Math.min(x1+1,width-1),y2=Math.min(y1+1,height-1),val=img[y1*width+x1],zeroes=x1===x0||x1===x2||y1===y0||y1===y2?1:0;for(let x=x0;x<=x2;x++)for(let y=y0;y<=y2;y++){if(x===x1&&y===y1)continue;if(zeroes+=+(val===img[y*width+x]),zeroes>2)return!0}return!1}function colorDelta(img1,img2,k,m,checkerboard){let r1=img1[k],g1=img1[k+1],b1=img1[k+2],a1=img1[k+3],r2=img2[m],g2=img2[m+1],b2=img2[m+2],a2=img2[m+3],dr=r1-r2,dg=g1-g2,db=b1-b2,da=a1-a2;if(a1<255||a2<255){let rb=255,gb=255,bb=255;if(checkerboard)rb=48+159*(k%2),gb=48+159*((k/1.618033988749895|0)%2),bb=48+159*((k/2.618033988749895|0)%2);dr=(r1*a1-r2*a2-rb*da)/255,dg=(g1*a1-g2*a2-gb*da)/255,db=(b1*a1-b2*a2-bb*da)/255}let y=dr*0.29889531+dg*0.58662247+db*0.11448223,i=dr*0.59597799-dg*0.2741761-db*0.32180189,q=dr*0.21147017-dg*0.52261711+db*0.31114694,delta=0.5053*y*y+0.299*i*i+0.1957*q*q;return y>0?-delta:delta}function brightnessDelta(img,k,m,r1,g1,b1,a1,checkerboard){let r2=img[m],g2=img[m+1],b2=img[m+2],a2=img[m+3],dr=r1-r2,dg=g1-g2,db=b1-b2,da=a1-a2;if(!dr&&!dg&&!db&&!da)return 0;if(a1<255||a2<255){let rb=255,gb=255,bb=255;if(checkerboard)rb=48+159*(k%2),gb=48+159*((k/1.618033988749895|0)%2),bb=48+159*((k/2.618033988749895|0)%2);dr=(r1*a1-r2*a2-rb*da)/255,dg=(g1*a1-g2*a2-gb*da)/255,db=(b1*a1-b2*a2-bb*da)/255}return dr*0.29889531+dg*0.58662247+db*0.11448223}function drawPixel(output,pos,r,g,b){output[pos]=r,output[pos+1]=g,output[pos+2]=b,output[pos+3]=255}function drawGrayPixel(img,i,alpha,output){let val=255+(img[i]*0.29889531+img[i+1]*0.58662247+img[i+2]*0.11448223-255)*alpha*img[i+3]/255;drawPixel(output,i,val,val,val)}var import_pngjs=__toESM(require_png(),1);function padToUnion(png,width,height){if(png.width===width&&png.height===height)return png;let out=new import_pngjs.PNG({width,height,fill:!0});return import_pngjs.PNG.bitblt(png,out,0,0,png.width,png.height,0,0),out}function clusterRegions(mask,width,height,cellSize,maxRegions){let cols=Math.ceil(width/cellSize),rows=Math.ceil(height/cellSize),dirty=new Uint8Array(cols*rows);for(let y=0;y<height;y++)for(let x=0;x<width;x++)if(mask[y*width+x])dirty[Math.floor(y/cellSize)*cols+Math.floor(x/cellSize)]=1;let seen=new Uint8Array(cols*rows),regions=[];for(let cy=0;cy<rows;cy++)for(let cx=0;cx<cols;cx++){let idx=cy*cols+cx;if(!dirty[idx]||seen[idx])continue;let minX=cx,maxX=cx,minY=cy,maxY=cy,queue=[idx];seen[idx]=1;while(queue.length>0){let cur=queue.pop(),x=cur%cols,y=Math.floor(cur/cols);minX=Math.min(minX,x),maxX=Math.max(maxX,x),minY=Math.min(minY,y),maxY=Math.max(maxY,y);for(let[dx,dy]of[[1,0],[-1,0],[0,1],[0,-1]]){let nx=x+dx,ny=y+dy;if(nx<0||ny<0||nx>=cols||ny>=rows)continue;let nIdx=ny*cols+nx;if(dirty[nIdx]&&!seen[nIdx])seen[nIdx]=1,queue.push(nIdx)}}regions.push({x:minX*cellSize,y:minY*cellSize,w:Math.min((maxX+1)*cellSize,width)-minX*cellSize,h:Math.min((maxY+1)*cellSize,height)-minY*cellSize})}if(regions.sort((a,b)=>b.w*b.h-a.w*a.h),regions.length>maxRegions){let tail=regions.slice(maxRegions-1),minX=Math.min(...tail.map((r)=>r.x)),minY=Math.min(...tail.map((r)=>r.y)),maxX=Math.max(...tail.map((r)=>r.x+r.w)),maxY=Math.max(...tail.map((r)=>r.y+r.h));return[...regions.slice(0,maxRegions-1),{x:minX,y:minY,w:maxX-minX,h:maxY-minY}]}return regions}function diffPngs(before,after,options={}){let a=import_pngjs.PNG.sync.read(before),b=import_pngjs.PNG.sync.read(after),width=Math.max(a.width,b.width),height=Math.max(a.height,b.height),pa=padToUnion(a,width,height),pb=padToUnion(b,width,height),diff=new import_pngjs.PNG({width,height}),changedPixels=pixelmatch(pa.data,pb.data,diff.data,width,height,{threshold:options.threshold??0.1,includeAA:!1,alpha:0.6}),mask=new Uint8Array(width*height);if(changedPixels>0){let d=diff.data;for(let i=0;i<width*height;i++){let r=d[i*4],g=d[i*4+1],bch=d[i*4+2];if(r>200&&g<120&&bch<120)mask[i]=1}}let regions=changedPixels===0?[]:clusterRegions(mask,width,height,options.cellSize??16,options.maxRegions??10);for(let r of regions){let n=0;for(let y=r.y;y<r.y+r.h;y++){let row=y*width;for(let x=r.x;x<r.x+r.w;x++)n+=mask[row+x]}r.changedPixels=n}regions.sort((a,b)=>(b.changedPixels??0)-(a.changedPixels??0));let contentHeight=Math.min(a.height,b.height),contentLen=width*contentHeight*4,contentChangedPixels=contentHeight===height?changedPixels:pixelmatch(pa.data.subarray(0,contentLen),pb.data.subarray(0,contentLen),void 0,width,contentHeight,{threshold:options.threshold??0.1,includeAA:!1,alpha:0.6});return{changedPixels,changedRatio:changedPixels/(width*height),alignedChangedRatio:changedPixels===0?0:alignedChanged(pa.data,pb.data,mask,width,height,options.threshold??0.1)/(width*height),contentChangedRatio:contentChangedPixels/(width*contentHeight),heightDelta:b.height-a.height,width,height,regions,diffPng:import_pngjs.PNG.sync.write(diff)}}function alignedChanged(a,b,mask,width,height,threshold){let maxDelta=35215*threshold*threshold,remaining=0;for(let y=0;y<height;y++)for(let x=0;x<width;x++){if(!mask[y*width+x])continue;let here=(y*width+x)*4,matched=!1;for(let dy=-1;dy<=1&&!matched;dy++){let ny=y+dy;if(ny<0||ny>=height)continue;for(let dx=-1;dx<=1&&!matched;dx++){let nx=x+dx;if(nx<0||nx>=width||dx===0&&dy===0)continue;let there=(ny*width+nx)*4;if(colorDelta2(b,a,here,there)<=maxDelta)matched=!0;else if(colorDelta2(a,b,here,there)<=maxDelta)matched=!0}}if(!matched)remaining++}return remaining}function colorDelta2(a,b,ai,bi){let r1=a[ai],g1=a[ai+1],b1=a[ai+2],r2=b[bi],g2=b[bi+1],b2=b[bi+2],y=0.29889531*(r1-r2)+0.58662247*(g1-g2)+0.11448223*(b1-b2),i=0.59597799*(r1-r2)-0.2741761*(g1-g2)-0.32180189*(b1-b2),q=0.21147017*(r1-r2)-0.52261711*(g1-g2)+0.31114694*(b1-b2);return 0.5053*y*y+0.299*i*i+0.1957*q*q}function downscalePng(png,factor){if(!Number.isInteger(factor)||factor<=1)return png;let src=import_pngjs.PNG.sync.read(png),width=Math.max(1,Math.floor(src.width/factor)),height=Math.max(1,Math.floor(src.height/factor)),out=new import_pngjs.PNG({width,height});for(let y=0;y<height;y++)for(let x=0;x<width;x++){let r=0,g=0,b=0,a=0,n=0;for(let dy=0;dy<factor;dy++){let sy=y*factor+dy;if(sy>=src.height)break;for(let dx=0;dx<factor;dx++){let sx=x*factor+dx;if(sx>=src.width)break;let i=sy*src.width+sx<<2;r+=src.data[i]??0,g+=src.data[i+1]??0,b+=src.data[i+2]??0,a+=src.data[i+3]??0,n++}}let o=y*width+x<<2;out.data[o]=Math.round(r/n),out.data[o+1]=Math.round(g/n),out.data[o+2]=Math.round(b/n),out.data[o+3]=Math.round(a/n)}return import_pngjs.PNG.sync.write(out)}function resizePng(png,width,height){let src=import_pngjs.PNG.sync.read(png),outWidth=Math.max(1,Math.round(width)),outHeight=Math.max(1,Math.round(height));if(src.width===outWidth&&src.height===outHeight)return png;let out=new import_pngjs.PNG({width:outWidth,height:outHeight});for(let y=0;y<outHeight;y++){let sy=Math.max(0,Math.min(src.height-1,(y+0.5)*src.height/outHeight-0.5)),y0=Math.floor(sy),y1=Math.min(src.height-1,y0+1),fy=sy-y0;for(let x=0;x<outWidth;x++){let sx=Math.max(0,Math.min(src.width-1,(x+0.5)*src.width/outWidth-0.5)),x0=Math.floor(sx),x1=Math.min(src.width-1,x0+1),fx=sx-x0,dst=y*outWidth+x<<2;for(let channel=0;channel<4;channel++){let a=src.data[(y0*src.width+x0)*4+channel]??0,b=src.data[(y0*src.width+x1)*4+channel]??0,c=src.data[(y1*src.width+x0)*4+channel]??0,d=src.data[(y1*src.width+x1)*4+channel]??0,top=a+(b-a)*fx,bottom=c+(d-c)*fx;out.data[dst+channel]=Math.round(top+(bottom-top)*fy)}}}return import_pngjs.PNG.sync.write(out)}function pngSize(png){let p=import_pngjs.PNG.sync.read(png);return{width:p.width,height:p.height}}function cropPng(png,region,pad=24){let src=import_pngjs.PNG.sync.read(png),x=Math.max(0,region.x-pad),y=Math.max(0,region.y-pad),w=Math.min(src.width-x,region.w+pad*2),h=Math.min(src.height-y,region.h+pad*2),out=new import_pngjs.PNG({width:w,height:h});return import_pngjs.PNG.bitblt(src,out,x,y,w,h,0,0),import_pngjs.PNG.sync.write(out)}function sideBySidePng(left,right,gutter=12){let a=import_pngjs.PNG.sync.read(left),b=import_pngjs.PNG.sync.read(right),width=a.width+gutter+b.width,height=Math.max(a.height,b.height),out=new import_pngjs.PNG({width,height});return out.data.fill(255),import_pngjs.PNG.bitblt(a,out,0,0,a.width,a.height,0,0),import_pngjs.PNG.bitblt(b,out,0,0,b.width,b.height,a.width+gutter,0),import_pngjs.PNG.sync.write(out)}function unionRegion(regions){let minX=Math.min(...regions.map((r)=>r.x)),minY=Math.min(...regions.map((r)=>r.y)),maxX=Math.max(...regions.map((r)=>r.x+r.w)),maxY=Math.max(...regions.map((r)=>r.y+r.h));return{x:minX,y:minY,w:maxX-minX,h:maxY-minY}}var TOOLBAR_TAG="velloo-capture-toolbar",MAX_NODES=20000,MAX_DEPTH=24,MAX_TEXT=240,TRANSIENT_SCREENSHOT_ERROR=/Protocol error \(Page\.captureScreenshot\):\s*Unable to capture screenshot/i;async function retryTransientScreenshot(take){try{return await take()}catch(err){let message=err instanceof Error?err.message:String(err);if(!TRANSIENT_SCREENSHOT_ERROR.test(message))throw err;return await new Promise((resolve)=>setTimeout(resolve,100)),await take()}}async function capturePagePng(page,fullPage,timeout){return retryTransientScreenshot(()=>page.screenshot({fullPage,animations:"disabled",caret:"hide",...timeout===void 0?{}:{timeout}}))}var STYLE_PROPS=["display","position","boxSizing","flexDirection","flexWrap","alignItems","justifyContent","gap","gridTemplateColumns","padding","margin","width","maxWidth","height","minHeight","fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","textAlign","textTransform","color","backgroundColor","backgroundImage","borderRadius","borderWidth","borderColor","borderStyle","boxShadow","opacity","zIndex"];async function extractDom(page,limits={maxNodes:MAX_NODES,maxDepth:MAX_DEPTH,maxText:MAX_TEXT},toolbarTag=TOOLBAR_TAG){return page.evaluate(({props,maxNodes,maxDepth,maxText,toolbar})=>{let nodes=[],truncated=!1,ownText=(el)=>{let s="";for(let child of Array.from(el.childNodes))if(child.nodeType===3)s+=child.textContent??"";return s.replace(/\s+/g," ").trim().slice(0,maxText)},shown=(text,transform)=>{if(transform==="uppercase")return text.toUpperCase();if(transform==="lowercase")return text.toLowerCase();if(transform==="capitalize")return text.replace(/(^|\s)(\p{L})/gu,(m)=>m.toUpperCase());return text},lineOf=(el,cs)=>{let s="";for(let child of Array.from(el.childNodes)){if(child.nodeType===3){s+=shown(child.textContent??"",cs.textTransform);continue}if(child.nodeType!==1)continue;let inner=child;if(inner.tagName==="BR"){s+=" ";continue}let innerStyle=getComputedStyle(inner);if(innerStyle.display==="none"||innerStyle.visibility==="hidden")continue;let below=lineOf(inner,innerStyle);if(below===null)return null;if(below.trim()==="")continue;if(!(innerStyle.display.startsWith("inline")||innerStyle.display==="contents"))return null;s+=below}return s},signatureOf=(el)=>{let cls=(el.getAttribute("class")??"").trim();return`${el.tagName.toLowerCase()}|${cls}|${el.children.length}`},walk=(el,parent,depth)=>{if(nodes.length>=maxNodes){truncated=!0;return}if(depth>maxDepth){truncated=!0;return}if(el.tagName.toLowerCase()===toolbar)return;let cs=getComputedStyle(el);if(cs.display==="none"||cs.visibility==="hidden")return;if(cs.display==="contents"){for(let child of Array.from(el.children))walk(child,parent,depth);return}let r=el.getBoundingClientRect(),scrollX2=window.scrollX,scrollY2=window.scrollY;if(r.width===0&&r.height===0)return;let style={};for(let p of props){let v=cs[p];if(typeof v==="string"&&v!==""&&v!=="none"&&v!=="normal")style[p]=v}let i=nodes.length,entry={i,parent,depth,tag:el.tagName.toLowerCase(),rect:{x:Math.round(r.x+scrollX2),y:Math.round(r.y+scrollY2),w:Math.round(r.width),h:Math.round(r.height)},style},id=el.getAttribute("id");if(id)entry.id=id;let cls=el.getAttribute("class");if(cls)entry.class=cls.trim().slice(0,400);let role=el.getAttribute("role")??el.getAttribute("aria-label");if(role)entry.role=role;let t=ownText(el);if(t){if(entry.text=t,el.childElementCount>0){let line=lineOf(el,cs)?.replace(/\s+/g," ").trim().slice(0,maxText);if(line&&line!==shown(t,cs.textTransform))entry.line=line}}let src=el.getAttribute("src");if(src)entry.src=src;let href=el.getAttribute("href");if(href)entry.href=href.slice(0,300);let nodePath=el.getAttribute("data-node-path");if(nodePath!==null)entry.nodePath=nodePath;nodes.push(entry);let children=Array.from(el.children),counts=new Map;for(let c of children){let sig=signatureOf(c);counts.set(sig,(counts.get(sig)??0)+1)}let seen=new Set;for(let c of children){let before=nodes.length;walk(c,i,depth+1);let sig=signatureOf(c),n=counts.get(sig)??0;if(n>=3&&!seen.has(sig)&&nodes.length>before){seen.add(sig);let added=nodes[before];if(added)added.repeat={count:n,signature:sig}}}};if(document.body)walk(document.body,null,0);return{url:location.href,title:document.title,viewport:{w:window.innerWidth,h:window.innerHeight},documentHeight:Math.max(document.documentElement?.scrollHeight??0,document.body?.scrollHeight??0),nodes,truncated}},{props:STYLE_PROPS,maxNodes:limits.maxNodes,maxDepth:limits.maxDepth,maxText:limits.maxText,toolbar:toolbarTag})}async function extractThemeVars(page){return page.evaluate(()=>{let light={},dark={},fonts=new Set,isDarkSelector=(sel)=>/(^|[\s,>])(\.dark|\[data-theme["'=\s]*dark|\.theme-dark)/i.test(sel),readRule=(rule,intoDark)=>{let{style,selectorText:selector}=rule;if(!style||typeof selector!=="string")return;if(!/(^|,)\s*(:root|html|body|\.dark|\[data-theme)/i.test(selector))return;let target=intoDark||isDarkSelector(selector)?dark:light;for(let i=0;i<style.length;i++){let prop=style.item(i);if(!prop.startsWith("--"))continue;let value=style.getPropertyValue(prop).trim();if(value)target[prop]=value}let ff=style.getPropertyValue("font-family").trim();if(ff)fonts.add(ff)},walkRules=(rules,intoDark)=>{for(let rule of Array.from(rules)){let asStyle=rule;if(typeof asStyle.selectorText==="string"&&asStyle.style)readRule(rule,intoDark);let nested=rule.cssRules;if(nested&&nested.length>0){let cond=rule instanceof CSSConditionRule?rule.conditionText:"";walkRules(nested,intoDark||/prefers-color-scheme\s*:\s*dark/i.test(cond))}}};for(let sheet of Array.from(document.styleSheets))try{let rules=sheet.cssRules;if(rules)walkRules(rules,!1)}catch{}let rootStyle=getComputedStyle(document.documentElement);for(let prop of Array.from(rootStyle)){if(!prop.startsWith("--"))continue;if(light[prop]!==void 0)continue;let value=rootStyle.getPropertyValue(prop).trim();if(value)light[prop]=value}let bodyFont=getComputedStyle(document.body??document.documentElement).fontFamily;if(bodyFont)fonts.add(bodyFont);let block=(sel,vars)=>{let entries=Object.entries(vars);if(entries.length===0)return"";return`${sel} {
|
|
88
101
|
${entries.map(([k,v])=>` ${k}: ${v};`).join(`
|
|
89
102
|
`)}
|
|
90
103
|
}
|
|
@@ -283,73 +296,7 @@ Either install Google Chrome (velloo will use it directly, no download), or run:
|
|
|
283
296
|
// silently detaches the observer above. A slow poll costs nothing and means
|
|
284
297
|
// the toolbar can never go missing for more than a second.
|
|
285
298
|
window.setInterval(mountSafely, 1000);
|
|
286
|
-
})();`;function featuresMeanPopup(features){if(features.length===0)return!1;return!features.includes("toolbar")&&!features.includes("menubar")}async function startCaptureSession(opts){let sessionId=`cs_${Date.now().toString(36)}${randomBytes(3).toString("hex")}`,root=capturesDir(opts.folderRoot,opts.folderId);mkdirSync3(root,{recursive:!0,mode:448});let browser=await launchHeaded(),prior=opts.sessionStatePath&&existsSync3(opts.sessionStatePath)?readSessionState(opts.sessionStatePath):null,context=await browser.newContext({viewport:null,...prior?{storageState:prior}:{}}),made=[],capturedOrigins=new Set;if(opts.url)try{capturedOrigins.add(new URL(opts.url).origin)}catch{}let finish=()=>{},finished=new Promise((resolve)=>{finish=resolve}),closing=!1,primary=null,activePage=async()=>{if(primary&&!primary.isClosed())return primary;let page=context.pages().find((p)=>!p.isClosed());if(!page)throw Error("the browser has no open page to capture");return page},openedAsPopup=[],foldExtraTab=async(extra)=>{if(primary===null||extra===primary)return;if(openedAsPopup.shift()??!1){extra.once("close",()=>{primary?.bringToFront().catch(()=>{return})});return}let deadline=Date.now()+5000,url=extra.url();while((url===""||url==="about:blank")&&Date.now()<deadline){if(await new Promise((r)=>setTimeout(r,50)),extra.isClosed())break;url=extra.url()}if(await extra.close().catch(()=>{return}),url&&url!=="about:blank")await primary.goto(url,{waitUntil:"domcontentloaded",timeout:30000}).catch(()=>{return}),opts.onStatus?.(`opened ${url} in the capture tab`);await primary.bringToFront().catch(()=>{return})},runCapture=async(themeOnly)=>{let page=await activePage();try{capturedOrigins.add(new URL(page.url()).origin)}catch{}let{manifest}=await capturePage(page,{capturesRoot:root,themeOnly,sessionId});return made.push(manifest),opts.onCapture?.(manifest),manifest},toolbarPosition=null;await context.exposeBinding("__vellooCapture",async(_source,action,arg)=>{try{if(action==="position")return toolbarPosition;if(action==="move"){let p=arg;if(typeof p?.left==="number"&&typeof p?.top==="number")toolbarPosition={left:p.left,top:p.top};return"ok"}if(action==="quit")return close(),"done";let manifest=await runCapture(action==="theme"),label=action==="theme"?"theme captured":`captured ${manifest.title||"page"}`;return opts.onStatus?.(`${label} (${manifest.id})`),label}catch(err){let message=err instanceof Error?err.message:String(err);return opts.onStatus?.(`capture failed: ${message}`),"failed"}}),await context.addInitScript(TOOLBAR_SCRIPT);let close=async()=>{if(closing)return;if(closing=!0,opts.sessionStatePath)try{let state=await context.storageState();writeSessionState(opts.sessionStatePath,state,Array.from(capturedOrigins))}catch{}await context.close().catch(()=>{return}),await browser.close().catch(()=>{return}),finish()};browser.on("disconnected",()=>{if(!closing)closing=!0,finish()});let page=await context.newPage();primary=page;try{let cdp=await context.newCDPSession(page);await cdp.send("Page.enable"),cdp.on("Page.windowOpen",(e)=>{openedAsPopup.push(featuresMeanPopup(e.windowFeatures??[]))})}catch{}if(context.on("page",(extra)=>{foldExtraTab(extra).catch(()=>{return})}),opts.url)await page.goto(opts.url,{waitUntil:"domcontentloaded",timeout:30000}).catch(()=>{opts.onStatus?.(`couldn't open ${opts.url} \u2014 navigate manually in the window`)});return{sessionId,captures:()=>[...made],currentUrl:()=>primary&&!primary.isClosed()?primary.url():"",openTabs:()=>context.pages().filter((p)=>!p.isClosed()).length,capturePage:()=>runCapture(!1),captureTheme:()=>runCapture(!0),finished,close}}var exports_react_dom_server_bun_development={};__exportCjs(exports_react_dom_server_bun_development,{renderToReadableStream:()=>$renderToReadableStream,version:()=>$version},{renderToReadableStream:(value)=>$renderToReadableStream=value,version:(value)=>$version=value});var React=__toESM(require_react_development()),ReactDOM=__toESM(require_react_dom()),REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_SCOPE_TYPE=Symbol.for("react.scope"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),REACT_LEGACY_HIDDEN_TYPE=Symbol.for("react.legacy_hidden"),REACT_MEMO_CACHE_SENTINEL=Symbol.for("react.memo_cache_sentinel"),REACT_VIEW_TRANSITION_TYPE=Symbol.for("react.view_transition"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator;function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!=="object")return null;return maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"],typeof maybeIterable==="function"?maybeIterable:null}var isArrayImpl=Array.isArray,jsxPropsParents=new WeakMap,jsxChildrenParents=new WeakMap;function objectName(object){return object=Object.prototype.toString.call(object),object.slice(8,object.length-1)}function describeKeyForErrorMessage(key){var encodedKey=JSON.stringify(key);return'"'+key+'"'===encodedKey?key:encodedKey}function describeValueForErrorMessage(value){switch(typeof value){case"string":return JSON.stringify(10>=value.length?value:value.slice(0,10)+"...");case"object":if(isArrayImpl(value))return"[...]";if(value!==null&&value.$$typeof===CLIENT_REFERENCE_TAG)return"client";return value=objectName(value),value==="Object"?"{...}":value;case"function":return value.$$typeof===CLIENT_REFERENCE_TAG?"client":(value=value.displayName||value.name)?"function "+value:"function";default:return String(value)}}function describeElementType(type){if(typeof type==="string")return type;switch(type){case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type==="object")switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:return describeElementType(type.render);case REACT_MEMO_TYPE:return describeElementType(type.type);case REACT_LAZY_TYPE:var payload=type._payload;type=type._init;try{return describeElementType(type(payload))}catch(x){}}return""}var CLIENT_REFERENCE_TAG=Symbol.for("react.client.reference");function describeObjectForErrorMessage(objectOrArray,expandedName){var objKind=objectName(objectOrArray);if(objKind!=="Object"&&objKind!=="Array")return objKind;var start=-1,length=0;if(isArrayImpl(objectOrArray))if(jsxChildrenParents.has(objectOrArray)){var type=jsxChildrenParents.get(objectOrArray);objKind="<"+describeElementType(type)+">";for(var i=0;i<objectOrArray.length;i++){var value=objectOrArray[i];value=typeof value==="string"?value:typeof value==="object"&&value!==null?"{"+describeObjectForErrorMessage(value)+"}":"{"+describeValueForErrorMessage(value)+"}",""+i===expandedName?(start=objKind.length,length=value.length,objKind+=value):objKind=15>value.length&&40>objKind.length+value.length?objKind+value:objKind+"{...}"}objKind+="</"+describeElementType(type)+">"}else{objKind="[";for(type=0;type<objectOrArray.length;type++)0<type&&(objKind+=", "),i=objectOrArray[type],i=typeof i==="object"&&i!==null?describeObjectForErrorMessage(i):describeValueForErrorMessage(i),""+type===expandedName?(start=objKind.length,length=i.length,objKind+=i):objKind=10>i.length&&40>objKind.length+i.length?objKind+i:objKind+"...";objKind+="]"}else if(objectOrArray.$$typeof===REACT_ELEMENT_TYPE)objKind="<"+describeElementType(objectOrArray.type)+"/>";else{if(objectOrArray.$$typeof===CLIENT_REFERENCE_TAG)return"client";if(jsxPropsParents.has(objectOrArray)){objKind=jsxPropsParents.get(objectOrArray),objKind="<"+(describeElementType(objKind)||"..."),type=Object.keys(objectOrArray);for(i=0;i<type.length;i++){objKind+=" ",value=type[i],objKind+=describeKeyForErrorMessage(value)+"=";var _value2=objectOrArray[value],_substr2=value===expandedName&&typeof _value2==="object"&&_value2!==null?describeObjectForErrorMessage(_value2):describeValueForErrorMessage(_value2);typeof _value2!=="string"&&(_substr2="{"+_substr2+"}"),value===expandedName?(start=objKind.length,length=_substr2.length,objKind+=_substr2):objKind=10>_substr2.length&&40>objKind.length+_substr2.length?objKind+_substr2:objKind+"..."}objKind+=">"}else{objKind="{",type=Object.keys(objectOrArray);for(i=0;i<type.length;i++)0<i&&(objKind+=", "),value=type[i],objKind+=describeKeyForErrorMessage(value)+": ",_value2=objectOrArray[value],_value2=typeof _value2==="object"&&_value2!==null?describeObjectForErrorMessage(_value2):describeValueForErrorMessage(_value2),value===expandedName?(start=objKind.length,length=_value2.length,objKind+=_value2):objKind=10>_value2.length&&40>objKind.length+_value2.length?objKind+_value2:objKind+"...";objKind+="}"}}return expandedName===void 0?objKind:-1<start&&0<length?(objectOrArray=" ".repeat(start)+"^".repeat(length),`
|
|
287
|
-
`+objKind+`
|
|
288
|
-
`+objectOrArray):`
|
|
289
|
-
`+objKind}var scheduleMicrotask=queueMicrotask;function flushBuffered(destination){typeof destination.flush==="function"&&destination.flush()}function writeChunk(destination,chunk){chunk.length!==0&&destination.write(chunk)}function byteLengthOfChunk(chunk){return Buffer.byteLength(chunk,"utf8")}function closeWithError(destination,error){typeof destination.error==="function"?destination.error(error):destination.close()}var assign=Object.assign;function typeName(value){return typeof Symbol==="function"&&Symbol.toStringTag&&value[Symbol.toStringTag]||value.constructor.name||"Object"}function willCoercionThrow(value){try{return testStringCoercion(value),!1}catch(e){return!0}}function testStringCoercion(value){return""+value}function checkAttributeStringCoercion(value,attributeName){if(willCoercionThrow(value))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",attributeName,typeName(value)),testStringCoercion(value)}function checkCSSPropertyStringCoercion(value,propName){if(willCoercionThrow(value))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",propName,typeName(value)),testStringCoercion(value)}function checkHtmlStringCoercion(value){if(willCoercionThrow(value))return console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",typeName(value)),testStringCoercion(value)}var hasOwnProperty=Object.prototype.hasOwnProperty,VALID_ATTRIBUTE_NAME_REGEX=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),illegalAttributeNameCache={},validatedAttributeNameCache={};function isAttributeNameSafe(attributeName){if(hasOwnProperty.call(validatedAttributeNameCache,attributeName))return!0;if(hasOwnProperty.call(illegalAttributeNameCache,attributeName))return!1;if(VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))return validatedAttributeNameCache[attributeName]=!0;return illegalAttributeNameCache[attributeName]=!0,console.error("Invalid attribute name: `%s`",attributeName),!1}var unitlessNumbers=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),aliases=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hasReadOnlyValue={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function checkControlledValueProps(tagName,props){hasReadOnlyValue[props.type]||props.onChange||props.onInput||props.readOnly||props.disabled||props.value==null||(tagName==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),props.onChange||props.readOnly||props.disabled||props.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}var ariaProperties={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},warnedProperties$1={},rARIA$1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rARIACamel$1=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function validateProperty$1(tagName,name){if(hasOwnProperty.call(warnedProperties$1,name)&&warnedProperties$1[name])return!0;if(rARIACamel$1.test(name)){if(tagName="aria-"+name.slice(4).toLowerCase(),tagName=ariaProperties.hasOwnProperty(tagName)?tagName:null,tagName==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",name),warnedProperties$1[name]=!0;if(name!==tagName)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",name,tagName),warnedProperties$1[name]=!0}if(rARIA$1.test(name)){if(tagName=name.toLowerCase(),tagName=ariaProperties.hasOwnProperty(tagName)?tagName:null,tagName==null)return warnedProperties$1[name]=!0,!1;name!==tagName&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",name,tagName),warnedProperties$1[name]=!0)}return!0}function validateProperties$2(type,props){var invalidProps=[],key;for(key in props)validateProperty$1(type,key)||invalidProps.push(key);props=invalidProps.map(function(prop){return"`"+prop+"`"}).join(", "),invalidProps.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",props,type):1<invalidProps.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",props,type)}var didWarnValueNull=!1,possibleStandardNames={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},warnedProperties={},EVENT_NAME_REGEX=/^on./,INVALID_EVENT_NAME_REGEX=/^on[^A-Z]/,rARIA=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rARIACamel=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function validateProperty(tagName,name,value,eventRegistry){if(hasOwnProperty.call(warnedProperties,name)&&warnedProperties[name])return!0;var lowerCasedName=name.toLowerCase();if(lowerCasedName==="onfocusin"||lowerCasedName==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),warnedProperties[name]=!0;if(typeof value==="function"&&(tagName==="form"&&name==="action"||tagName==="input"&&name==="formAction"||tagName==="button"&&name==="formAction"))return!0;if(eventRegistry!=null){if(tagName=eventRegistry.possibleRegistrationNames,eventRegistry.registrationNameDependencies.hasOwnProperty(name))return!0;if(eventRegistry=tagName.hasOwnProperty(lowerCasedName)?tagName[lowerCasedName]:null,eventRegistry!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",name,eventRegistry),warnedProperties[name]=!0;if(EVENT_NAME_REGEX.test(name))return console.error("Unknown event handler property `%s`. It will be ignored.",name),warnedProperties[name]=!0}else if(EVENT_NAME_REGEX.test(name))return INVALID_EVENT_NAME_REGEX.test(name)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",name),warnedProperties[name]=!0;if(rARIA.test(name)||rARIACamel.test(name))return!0;if(lowerCasedName==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),warnedProperties[name]=!0;if(lowerCasedName==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),warnedProperties[name]=!0;if(lowerCasedName==="is"&&value!==null&&value!==void 0&&typeof value!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof value),warnedProperties[name]=!0;if(typeof value==="number"&&isNaN(value))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",name),warnedProperties[name]=!0;if(possibleStandardNames.hasOwnProperty(lowerCasedName)){if(lowerCasedName=possibleStandardNames[lowerCasedName],lowerCasedName!==name)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",name,lowerCasedName),warnedProperties[name]=!0}else if(name!==lowerCasedName)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",name,lowerCasedName),warnedProperties[name]=!0;switch(name){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof value){case"boolean":switch(name){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:if(lowerCasedName=name.toLowerCase().slice(0,5),lowerCasedName==="data-"||lowerCasedName==="aria-")return!0;return value?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',value,name,name,value,name):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',value,name,name,value,name,name,name),warnedProperties[name]=!0}case"function":case"symbol":return warnedProperties[name]=!0,!1;case"string":if(value==="false"||value==="true"){switch(name){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",value,name,value==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',name,value),warnedProperties[name]=!0}}return!0}function warnUnknownProperties(type,props,eventRegistry){var unknownProps=[],key;for(key in props)validateProperty(type,key,props[key],eventRegistry)||unknownProps.push(key);props=unknownProps.map(function(prop){return"`"+prop+"`"}).join(", "),unknownProps.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",props,type):1<unknownProps.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",props,type)}var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/,msPattern$1=/^-ms-/,hyphenPattern=/-(.)/g,badStyleValueWithSemicolonPattern=/;\s*$/,warnedStyleNames={},warnedStyleValues={},warnedForNaNValue=!1,warnedForInfinityValue=!1;function camelize(string){return string.replace(hyphenPattern,function(_,character){return character.toUpperCase()})}var matchHtmlRegExp=/["'&<>]/;function escapeTextForBrowser(text){if(typeof text==="boolean"||typeof text==="number"||typeof text==="bigint")return""+text;checkHtmlStringCoercion(text),text=""+text;var match=matchHtmlRegExp.exec(text);if(match){var html="",index,lastIndex=0;for(index=match.index;index<text.length;index++){switch(text.charCodeAt(index)){case 34:match=""";break;case 38:match="&";break;case 39:match="'";break;case 60:match="<";break;case 62:match=">";break;default:continue}lastIndex!==index&&(html+=text.slice(lastIndex,index)),lastIndex=index+1,html+=match}text=lastIndex!==index?html+text.slice(lastIndex,index):html}return text}var uppercasePattern=/([A-Z])/g,msPattern=/^ms-/,isJavaScriptProtocol=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sanitizeURL(url){return isJavaScriptProtocol.test(""+url)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":url}var ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ReactDOMSharedInternals=ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,NotPending=Object.freeze({pending:!1,data:null,method:null,action:null}),previousDispatcher=ReactDOMSharedInternals.d;ReactDOMSharedInternals.d={f:previousDispatcher.f,r:previousDispatcher.r,D:prefetchDNS,C:preconnect,L:preload,m:preloadModule,X:preinitScript,S:preinitStyle,M:preinitModuleScript};var NothingSent=0,SentCompleteSegmentFunction=1,SentCompleteBoundaryFunction=2,SentClientRenderFunction=4,SentStyleInsertionFunction=8,SentCompletedShellId=32,SentMarkShellTime=64,EXISTS=null,PRELOAD_NO_CREDS=[];Object.freeze(PRELOAD_NO_CREDS);var currentlyFlushingRenderState=null,endInlineScript="</script>";function escapeEntireInlineScriptContent(scriptText){return checkHtmlStringCoercion(scriptText),(""+scriptText).replace(scriptRegex,scriptReplacer)}var scriptRegex=/(<\/|<)(s)(cript)/gi;function scriptReplacer(match,prefix,s,suffix){return""+prefix+(s==="s"?"\\u0073":"\\u0053")+suffix}var didWarnForNewBooleanPropsWithEmptyValue;didWarnForNewBooleanPropsWithEmptyValue={};function createRenderState(resumableState,nonce,externalRuntimeConfig,importMap,onHeaders,maxHeadersLength){externalRuntimeConfig=typeof nonce==="string"?nonce:nonce&&nonce.script;var inlineScriptWithNonce=externalRuntimeConfig===void 0?"<script":'<script nonce="'+escapeTextForBrowser(externalRuntimeConfig)+'"',nonceStyle=typeof nonce==="string"?void 0:nonce&&nonce.style,inlineStyleWithNonce=nonceStyle===void 0?"<style":'<style nonce="'+escapeTextForBrowser(nonceStyle)+'"',idPrefix=resumableState.idPrefix,bootstrapChunks=[],{bootstrapScriptContent,bootstrapScripts,bootstrapModules}=resumableState;if(bootstrapScriptContent!==void 0&&(bootstrapChunks.push(inlineScriptWithNonce),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(endOfStartTag,escapeEntireInlineScriptContent(bootstrapScriptContent),endInlineScript)),bootstrapScriptContent=[],importMap!==void 0&&(bootstrapScriptContent.push('<script type="importmap">'),bootstrapScriptContent.push(escapeEntireInlineScriptContent(JSON.stringify(importMap))),bootstrapScriptContent.push("</script>")),onHeaders&&typeof maxHeadersLength==="number"&&0>=maxHeadersLength&&console.error("React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.",maxHeadersLength===0?"zero":maxHeadersLength),importMap=onHeaders?{preconnects:"",fontPreloads:"",highImagePreloads:"",remainingCapacity:2+(typeof maxHeadersLength==="number"?maxHeadersLength:2000)}:null,onHeaders={placeholderPrefix:idPrefix+"P:",segmentPrefix:idPrefix+"S:",boundaryPrefix:idPrefix+"B:",startInlineScript:inlineScriptWithNonce,startInlineStyle:inlineStyleWithNonce,preamble:createPreambleState(),externalRuntimeScript:null,bootstrapChunks,importMapChunks:bootstrapScriptContent,onHeaders,headers:importMap,resets:{font:{},dns:{},connect:{default:{},anonymous:{},credentials:{}},image:{},style:{}},charsetChunks:[],viewportChunks:[],hoistableChunks:[],preconnects:new Set,fontPreloads:new Set,highImagePreloads:new Set,styles:new Map,bootstrapScripts:new Set,scripts:new Set,bulkPreloads:new Set,preloads:{images:new Map,stylesheets:new Map,scripts:new Map,moduleScripts:new Map},nonce:{script:externalRuntimeConfig,style:nonceStyle},hoistableState:null,stylesToHoist:!1},bootstrapScripts!==void 0)for(importMap=0;importMap<bootstrapScripts.length;importMap++)maxHeadersLength=bootstrapScripts[importMap],inlineStyleWithNonce=nonceStyle=void 0,idPrefix={rel:"preload",as:"script",fetchPriority:"low",nonce},typeof maxHeadersLength==="string"?idPrefix.href=inlineScriptWithNonce=maxHeadersLength:(idPrefix.href=inlineScriptWithNonce=maxHeadersLength.src,idPrefix.integrity=inlineStyleWithNonce=typeof maxHeadersLength.integrity==="string"?maxHeadersLength.integrity:void 0,idPrefix.crossOrigin=nonceStyle=typeof maxHeadersLength==="string"||maxHeadersLength.crossOrigin==null?void 0:maxHeadersLength.crossOrigin==="use-credentials"?"use-credentials":""),preloadBootstrapScriptOrModule(resumableState,onHeaders,inlineScriptWithNonce,idPrefix),bootstrapChunks.push('<script src="',escapeTextForBrowser(inlineScriptWithNonce),attributeEnd),externalRuntimeConfig&&bootstrapChunks.push(' nonce="',escapeTextForBrowser(externalRuntimeConfig),attributeEnd),typeof inlineStyleWithNonce==="string"&&bootstrapChunks.push(' integrity="',escapeTextForBrowser(inlineStyleWithNonce),attributeEnd),typeof nonceStyle==="string"&&bootstrapChunks.push(' crossorigin="',escapeTextForBrowser(nonceStyle),attributeEnd),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(' async=""></script>');if(bootstrapModules!==void 0)for(nonce=0;nonce<bootstrapModules.length;nonce++)bootstrapScripts=bootstrapModules[nonce],inlineScriptWithNonce=maxHeadersLength=void 0,nonceStyle={rel:"modulepreload",fetchPriority:"low",nonce:externalRuntimeConfig},typeof bootstrapScripts==="string"?nonceStyle.href=importMap=bootstrapScripts:(nonceStyle.href=importMap=bootstrapScripts.src,nonceStyle.integrity=inlineScriptWithNonce=typeof bootstrapScripts.integrity==="string"?bootstrapScripts.integrity:void 0,nonceStyle.crossOrigin=maxHeadersLength=typeof bootstrapScripts==="string"||bootstrapScripts.crossOrigin==null?void 0:bootstrapScripts.crossOrigin==="use-credentials"?"use-credentials":""),preloadBootstrapScriptOrModule(resumableState,onHeaders,importMap,nonceStyle),bootstrapChunks.push('<script type="module" src="',escapeTextForBrowser(importMap),attributeEnd),externalRuntimeConfig&&bootstrapChunks.push(' nonce="',escapeTextForBrowser(externalRuntimeConfig),attributeEnd),typeof inlineScriptWithNonce==="string"&&bootstrapChunks.push(' integrity="',escapeTextForBrowser(inlineScriptWithNonce),attributeEnd),typeof maxHeadersLength==="string"&&bootstrapChunks.push(' crossorigin="',escapeTextForBrowser(maxHeadersLength),attributeEnd),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(' async=""></script>');return onHeaders}function createResumableState(identifierPrefix,externalRuntimeConfig,bootstrapScriptContent,bootstrapScripts,bootstrapModules){return{idPrefix:identifierPrefix===void 0?"":identifierPrefix,nextFormID:0,streamingFormat:0,bootstrapScriptContent,bootstrapScripts,bootstrapModules,instructions:NothingSent,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}}}function createPreambleState(){return{htmlChunks:null,headChunks:null,bodyChunks:null}}var ROOT_HTML_MODE=0,HTML_HTML_MODE=1,HTML_MODE=2,HTML_HEAD_MODE=3,SVG_MODE=4,MATHML_MODE=5,HTML_TABLE_MODE=6,HTML_TABLE_BODY_MODE=7,HTML_TABLE_ROW_MODE=8,HTML_COLGROUP_MODE=9;function createFormatContext(insertionMode,selectedValue,tagScope,viewTransition){return{insertionMode,selectedValue,tagScope,viewTransition}}function createRootFormatContext(namespaceURI){return createFormatContext(namespaceURI==="http://www.w3.org/2000/svg"?SVG_MODE:namespaceURI==="http://www.w3.org/1998/Math/MathML"?MATHML_MODE:ROOT_HTML_MODE,null,0,null)}function getChildFormatContext(parentContext,type,props){var subtreeScope=parentContext.tagScope&-25;switch(type){case"noscript":return createFormatContext(HTML_MODE,null,subtreeScope|1,null);case"select":return createFormatContext(HTML_MODE,props.value!=null?props.value:props.defaultValue,subtreeScope,null);case"svg":return createFormatContext(SVG_MODE,null,subtreeScope,null);case"picture":return createFormatContext(HTML_MODE,null,subtreeScope|2,null);case"math":return createFormatContext(MATHML_MODE,null,subtreeScope,null);case"foreignObject":return createFormatContext(HTML_MODE,null,subtreeScope,null);case"table":return createFormatContext(HTML_TABLE_MODE,null,subtreeScope,null);case"thead":case"tbody":case"tfoot":return createFormatContext(HTML_TABLE_BODY_MODE,null,subtreeScope,null);case"colgroup":return createFormatContext(HTML_COLGROUP_MODE,null,subtreeScope,null);case"tr":return createFormatContext(HTML_TABLE_ROW_MODE,null,subtreeScope,null);case"head":if(parentContext.insertionMode<HTML_MODE)return createFormatContext(HTML_HEAD_MODE,null,subtreeScope,null);break;case"html":if(parentContext.insertionMode===ROOT_HTML_MODE)return createFormatContext(HTML_HTML_MODE,null,subtreeScope,null)}return parentContext.insertionMode>=HTML_TABLE_MODE||parentContext.insertionMode<HTML_MODE?createFormatContext(HTML_MODE,null,subtreeScope,null):parentContext.tagScope!==subtreeScope?createFormatContext(parentContext.insertionMode,parentContext.selectedValue,subtreeScope,null):parentContext}function getSuspenseViewTransition(parentViewTransition){return parentViewTransition===null?null:{update:parentViewTransition.update,enter:"none",exit:"none",share:parentViewTransition.update,name:parentViewTransition.autoName,autoName:parentViewTransition.autoName,nameIdx:0}}function getSuspenseFallbackFormatContext(resumableState,parentContext){return parentContext.tagScope&32&&(resumableState.instructions|=128),createFormatContext(parentContext.insertionMode,parentContext.selectedValue,parentContext.tagScope|12,getSuspenseViewTransition(parentContext.viewTransition))}function getSuspenseContentFormatContext(resumableState,parentContext){resumableState=getSuspenseViewTransition(parentContext.viewTransition);var subtreeScope=parentContext.tagScope|16;return resumableState!==null&&resumableState.share!=="none"&&(subtreeScope|=64),createFormatContext(parentContext.insertionMode,parentContext.selectedValue,subtreeScope,resumableState)}function pushTextInstance(target,text,renderState,textEmbedded){if(text==="")return textEmbedded;return textEmbedded&&target.push("<!-- -->"),target.push(escapeTextForBrowser(text)),!0}function pushSegmentFinale(target,renderState,lastPushedText,textEmbedded){lastPushedText&&textEmbedded&&target.push("<!-- -->")}var styleNameCache=new Map,styleAttributeStart=' style="',styleAssign=":",styleSeparator=";";function pushStyleAttribute(target,style){if(typeof style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var isFirst=!0,styleName;for(styleName in style)if(hasOwnProperty.call(style,styleName)){var styleValue=style[styleName];if(styleValue!=null&&typeof styleValue!=="boolean"&&styleValue!==""){if(styleName.indexOf("--")===0){var nameChunk=escapeTextForBrowser(styleName);checkCSSPropertyStringCoercion(styleValue,styleName),styleValue=escapeTextForBrowser((""+styleValue).trim())}else{nameChunk=styleName;var value=styleValue;if(-1<nameChunk.indexOf("-")){var name=nameChunk;warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]||(warnedStyleNames[name]=!0,console.error("Unsupported style property %s. Did you mean %s?",name,camelize(name.replace(msPattern$1,"ms-"))))}else if(badVendoredStyleNamePattern.test(nameChunk))name=nameChunk,warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]||(warnedStyleNames[name]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",name,name.charAt(0).toUpperCase()+name.slice(1)));else if(badStyleValueWithSemicolonPattern.test(value)){name=nameChunk;var value$jscomp$0=value;warnedStyleValues.hasOwnProperty(value$jscomp$0)&&warnedStyleValues[value$jscomp$0]||(warnedStyleValues[value$jscomp$0]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,name,value$jscomp$0.replace(badStyleValueWithSemicolonPattern,"")))}typeof value==="number"&&(isNaN(value)?warnedForNaNValue||(warnedForNaNValue=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",nameChunk)):isFinite(value)||warnedForInfinityValue||(warnedForInfinityValue=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",nameChunk))),nameChunk=styleName,value=styleNameCache.get(nameChunk),value!==void 0?nameChunk=value:(value=escapeTextForBrowser(nameChunk.replace(uppercasePattern,"-$1").toLowerCase().replace(msPattern,"-ms-")),styleNameCache.set(nameChunk,value),nameChunk=value),typeof styleValue==="number"?styleValue=styleValue===0||unitlessNumbers.has(styleName)?""+styleValue:styleValue+"px":(checkCSSPropertyStringCoercion(styleValue,styleName),styleValue=escapeTextForBrowser((""+styleValue).trim()))}isFirst?(isFirst=!1,target.push(styleAttributeStart,nameChunk,styleAssign,styleValue)):target.push(styleSeparator,nameChunk,styleAssign,styleValue)}}isFirst||target.push(attributeEnd)}var attributeSeparator=" ",attributeAssign='="',attributeEnd='"',attributeEmptyString='=""';function pushBooleanAttribute(target,name,value){value&&typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeEmptyString)}function pushStringAttribute(target,name,value){typeof value!=="function"&&typeof value!=="symbol"&&typeof value!=="boolean"&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd)}var actionJavaScriptURL=escapeTextForBrowser("javascript:throw new Error('React form unexpectedly submitted.')");function pushAdditionalFormField(value,key){this.push('<input type="hidden"'),validateAdditionalFormField(value),pushStringAttribute(this,"name",key),pushStringAttribute(this,"value",value),this.push(endOfStartTagSelfClosing)}function validateAdditionalFormField(value){if(typeof value!=="string")throw Error("File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.")}function getCustomFormFields(resumableState,formAction){if(typeof formAction.$$FORM_ACTION==="function"){var id=resumableState.nextFormID++;resumableState=resumableState.idPrefix+id;try{var customFields=formAction.$$FORM_ACTION(resumableState);if(customFields){var formData=customFields.data;formData!=null&&formData.forEach(validateAdditionalFormField)}return customFields}catch(x){if(typeof x==="object"&&x!==null&&typeof x.then==="function")throw x;console.error(`Failed to serialize an action for progressive enhancement:
|
|
290
|
-
%s`,x)}}return null}function pushFormActionAttribute(target,resumableState,renderState,formAction,formEncType,formMethod,formTarget,name){var formData=null;if(typeof formAction==="function"){name===null||didWarnFormActionName||(didWarnFormActionName=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),formEncType===null&&formMethod===null||didWarnFormActionMethod||(didWarnFormActionMethod=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),formTarget===null||didWarnFormActionTarget||(didWarnFormActionTarget=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."));var customFields=getCustomFormFields(resumableState,formAction);customFields!==null?(name=customFields.name,formAction=customFields.action||"",formEncType=customFields.encType,formMethod=customFields.method,formTarget=customFields.target,formData=customFields.data):(target.push(attributeSeparator,"formAction",attributeAssign,actionJavaScriptURL,attributeEnd),formTarget=formMethod=formEncType=formAction=name=null,injectFormReplayingRuntime(resumableState,renderState))}return name!=null&&pushAttribute(target,"name",name),formAction!=null&&pushAttribute(target,"formAction",formAction),formEncType!=null&&pushAttribute(target,"formEncType",formEncType),formMethod!=null&&pushAttribute(target,"formMethod",formMethod),formTarget!=null&&pushAttribute(target,"formTarget",formTarget),formData}function pushAttribute(target,name,value){switch(name){case"className":pushStringAttribute(target,"class",value);break;case"tabIndex":pushStringAttribute(target,"tabindex",value);break;case"dir":case"role":case"viewBox":case"width":case"height":pushStringAttribute(target,name,value);break;case"style":pushStyleAttribute(target,value);break;case"src":case"href":if(value===""){name==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',name,name):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',name,name);break}case"action":case"formAction":if(value==null||typeof value==="function"||typeof value==="symbol"||typeof value==="boolean")break;checkAttributeStringCoercion(value,name),value=sanitizeURL(""+value),target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"autoFocus":case"multiple":case"muted":pushBooleanAttribute(target,name.toLowerCase(),value);break;case"xlinkHref":if(typeof value==="function"||typeof value==="symbol"||typeof value==="boolean")break;checkAttributeStringCoercion(value,name),value=sanitizeURL(""+value),target.push(attributeSeparator,"xlink:href",attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"inert":value!==""||didWarnForNewBooleanPropsWithEmptyValue[name]||(didWarnForNewBooleanPropsWithEmptyValue[name]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",name));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":value&&typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeEmptyString);break;case"capture":case"download":value===!0?target.push(attributeSeparator,name,attributeEmptyString):value!==!1&&typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"cols":case"rows":case"size":case"span":typeof value!=="function"&&typeof value!=="symbol"&&!isNaN(value)&&1<=value&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"rowSpan":case"start":typeof value==="function"||typeof value==="symbol"||isNaN(value)||target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"xlinkActuate":pushStringAttribute(target,"xlink:actuate",value);break;case"xlinkArcrole":pushStringAttribute(target,"xlink:arcrole",value);break;case"xlinkRole":pushStringAttribute(target,"xlink:role",value);break;case"xlinkShow":pushStringAttribute(target,"xlink:show",value);break;case"xlinkTitle":pushStringAttribute(target,"xlink:title",value);break;case"xlinkType":pushStringAttribute(target,"xlink:type",value);break;case"xmlBase":pushStringAttribute(target,"xml:base",value);break;case"xmlLang":pushStringAttribute(target,"xml:lang",value);break;case"xmlSpace":pushStringAttribute(target,"xml:space",value);break;default:if(!(2<name.length)||name[0]!=="o"&&name[0]!=="O"||name[1]!=="n"&&name[1]!=="N"){if(name=aliases.get(name)||name,isAttributeNameSafe(name)){switch(typeof value){case"function":case"symbol":return;case"boolean":var prefix=name.toLowerCase().slice(0,5);if(prefix!=="data-"&&prefix!=="aria-")return}target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd)}}}}var endOfStartTag=">",endOfStartTagSelfClosing="/>";function pushInnerHTML(target,innerHTML,children){if(innerHTML!=null){if(children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof innerHTML!=="object"||!("__html"in innerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");innerHTML=innerHTML.__html,innerHTML!==null&&innerHTML!==void 0&&(checkHtmlStringCoercion(innerHTML),target.push(""+innerHTML))}}var didWarnDefaultInputValue=!1,didWarnDefaultChecked=!1,didWarnDefaultSelectValue=!1,didWarnDefaultTextareaValue=!1,didWarnInvalidOptionChildren=!1,didWarnInvalidOptionInnerHTML=!1,didWarnSelectedSetOnOption=!1,didWarnFormActionType=!1,didWarnFormActionName=!1,didWarnFormActionTarget=!1,didWarnFormActionMethod=!1;function checkSelectProp(props,propName){var value=props[propName];value!=null&&(value=isArrayImpl(value),props.multiple&&!value?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.",propName):!props.multiple&&value&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",propName))}function flattenOptionChildren(children){var content="";return React.Children.forEach(children,function(child){child!=null&&(content+=child,didWarnInvalidOptionChildren||typeof child==="string"||typeof child==="number"||typeof child==="bigint"||(didWarnInvalidOptionChildren=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),content}var formReplayingRuntimeScript=`addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});`;function injectFormReplayingRuntime(resumableState,renderState){if((resumableState.instructions&16)===NothingSent){resumableState.instructions|=16;var{preamble,bootstrapChunks}=renderState;(preamble.htmlChunks||preamble.headChunks)&&bootstrapChunks.length===0?(bootstrapChunks.push(renderState.startInlineScript),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(endOfStartTag,formReplayingRuntimeScript,endInlineScript)):bootstrapChunks.unshift(renderState.startInlineScript,endOfStartTag,formReplayingRuntimeScript,endInlineScript)}}function pushLinkImpl(target,props){target.push(startChunkForTag("link"));for(var propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":case"dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTagSelfClosing),null}function escapeStyleTextContent(styleText){return checkHtmlStringCoercion(styleText),(""+styleText).replace(styleRegex,styleReplacer)}var styleRegex=/(<\/|<)(s)(tyle)/gi;function styleReplacer(match,prefix,s,suffix){return""+prefix+(s==="s"?"\\73 ":"\\53 ")+suffix}function pushSelfClosing(target,props,tag){target.push(startChunkForTag(tag));for(var propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":case"dangerouslySetInnerHTML":throw Error(tag+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTagSelfClosing),null}function pushTitleImpl(target,props){target.push(startChunkForTag("title"));var children=null,innerHTML=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":children=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),props=Array.isArray(children)?2>children.length?children[0]:null:children,typeof props!=="function"&&typeof props!=="symbol"&&props!==null&&props!==void 0&&target.push(escapeTextForBrowser(""+props)),pushInnerHTML(target,innerHTML,children),target.push(endChunkForTag("title")),null}function pushScriptImpl(target,props){target.push(startChunkForTag("script"));var children=null,innerHTML=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":children=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),children!=null&&typeof children!=="string"&&(props=typeof children==="number"?"a number for children":Array.isArray(children)?"an array for children":"something unexpected for children",console.error("A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.",props)),pushInnerHTML(target,innerHTML,children),typeof children==="string"&&target.push(escapeEntireInlineScriptContent(children)),target.push(endChunkForTag("script")),null}function pushStartSingletonElement(target,props,tag){target.push(startChunkForTag(tag));var innerHTML=tag=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":tag=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),pushInnerHTML(target,innerHTML,tag),tag}function pushStartGenericElement(target,props,tag){target.push(startChunkForTag(tag));var innerHTML=tag=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":tag=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),pushInnerHTML(target,innerHTML,tag),typeof tag==="string"?(target.push(escapeTextForBrowser(tag)),null):tag}var VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,validatedTagCache=new Map;function startChunkForTag(tag){var tagStartChunk=validatedTagCache.get(tag);if(tagStartChunk===void 0){if(!VALID_TAG_REGEX.test(tag))throw Error("Invalid tag: "+tag);tagStartChunk="<"+tag,validatedTagCache.set(tag,tagStartChunk)}return tagStartChunk}function pushStartInstance(target$jscomp$0,type,props,resumableState,renderState,preambleState,hoistableState,formatContext,textEmbedded){validateProperties$2(type,props),type!=="input"&&type!=="textarea"&&type!=="select"||props==null||props.value!==null||didWarnValueNull||(didWarnValueNull=!0,type==="select"&&props.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",type):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",type));b:if(type.indexOf("-")===-1)var JSCompiler_inline_result=!1;else switch(type){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":JSCompiler_inline_result=!1;break b;default:JSCompiler_inline_result=!0}switch(JSCompiler_inline_result||typeof props.is==="string"||warnUnknownProperties(type,props,null),!props.suppressContentEditableWarning&&props.contentEditable&&props.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),formatContext.insertionMode!==SVG_MODE&&formatContext.insertionMode!==MATHML_MODE&&type.indexOf("-")===-1&&type.toLowerCase()!==type&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",type),type){case"div":case"span":case"svg":case"path":break;case"a":target$jscomp$0.push(startChunkForTag("a"));var children=null,innerHTML=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":children=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;case"href":propValue===""?pushStringAttribute(target$jscomp$0,"href",""):pushAttribute(target$jscomp$0,propKey,propValue);break;default:pushAttribute(target$jscomp$0,propKey,propValue)}}if(target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML,children),typeof children==="string"){target$jscomp$0.push(escapeTextForBrowser(children));var JSCompiler_inline_result$jscomp$0=null}else JSCompiler_inline_result$jscomp$0=children;return JSCompiler_inline_result$jscomp$0;case"g":case"p":case"li":break;case"select":checkControlledValueProps("select",props),checkSelectProp(props,"value"),checkSelectProp(props,"defaultValue"),props.value===void 0||props.defaultValue===void 0||didWarnDefaultSelectValue||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),didWarnDefaultSelectValue=!0),target$jscomp$0.push(startChunkForTag("select"));var children$jscomp$0=null,innerHTML$jscomp$0=null,propKey$jscomp$0;for(propKey$jscomp$0 in props)if(hasOwnProperty.call(props,propKey$jscomp$0)){var propValue$jscomp$0=props[propKey$jscomp$0];if(propValue$jscomp$0!=null)switch(propKey$jscomp$0){case"children":children$jscomp$0=propValue$jscomp$0;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$0=propValue$jscomp$0;break;case"defaultValue":case"value":break;default:pushAttribute(target$jscomp$0,propKey$jscomp$0,propValue$jscomp$0)}}return target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$0,children$jscomp$0),children$jscomp$0;case"option":var selectedValue=formatContext.selectedValue;target$jscomp$0.push(startChunkForTag("option"));var children$jscomp$1=null,value=null,selected=null,innerHTML$jscomp$1=null,propKey$jscomp$1;for(propKey$jscomp$1 in props)if(hasOwnProperty.call(props,propKey$jscomp$1)){var propValue$jscomp$1=props[propKey$jscomp$1];if(propValue$jscomp$1!=null)switch(propKey$jscomp$1){case"children":children$jscomp$1=propValue$jscomp$1;break;case"selected":selected=propValue$jscomp$1,didWarnSelectedSetOnOption||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),didWarnSelectedSetOnOption=!0);break;case"dangerouslySetInnerHTML":innerHTML$jscomp$1=propValue$jscomp$1;break;case"value":value=propValue$jscomp$1;default:pushAttribute(target$jscomp$0,propKey$jscomp$1,propValue$jscomp$1)}}if(selectedValue!=null){if(value!==null){checkAttributeStringCoercion(value,"value");var stringValue=""+value}else innerHTML$jscomp$1===null||didWarnInvalidOptionInnerHTML||(didWarnInvalidOptionInnerHTML=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")),stringValue=flattenOptionChildren(children$jscomp$1);if(isArrayImpl(selectedValue)){for(var i=0;i<selectedValue.length;i++)if(checkAttributeStringCoercion(selectedValue[i],"value"),""+selectedValue[i]===stringValue){target$jscomp$0.push(' selected=""');break}}else checkAttributeStringCoercion(selectedValue,"select.value"),""+selectedValue===stringValue&&target$jscomp$0.push(' selected=""')}else selected&&target$jscomp$0.push(' selected=""');return target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$1,children$jscomp$1),children$jscomp$1;case"textarea":checkControlledValueProps("textarea",props),props.value===void 0||props.defaultValue===void 0||didWarnDefaultTextareaValue||(console.error("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components"),didWarnDefaultTextareaValue=!0),target$jscomp$0.push(startChunkForTag("textarea"));var value$jscomp$0=null,defaultValue=null,children$jscomp$2=null,propKey$jscomp$2;for(propKey$jscomp$2 in props)if(hasOwnProperty.call(props,propKey$jscomp$2)){var propValue$jscomp$2=props[propKey$jscomp$2];if(propValue$jscomp$2!=null)switch(propKey$jscomp$2){case"children":children$jscomp$2=propValue$jscomp$2;break;case"value":value$jscomp$0=propValue$jscomp$2;break;case"defaultValue":defaultValue=propValue$jscomp$2;break;case"dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:pushAttribute(target$jscomp$0,propKey$jscomp$2,propValue$jscomp$2)}}if(value$jscomp$0===null&&defaultValue!==null&&(value$jscomp$0=defaultValue),target$jscomp$0.push(endOfStartTag),children$jscomp$2!=null){if(console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),value$jscomp$0!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(isArrayImpl(children$jscomp$2)){if(1<children$jscomp$2.length)throw Error("<textarea> can only have at most one child.");checkHtmlStringCoercion(children$jscomp$2[0]),value$jscomp$0=""+children$jscomp$2[0]}checkHtmlStringCoercion(children$jscomp$2),value$jscomp$0=""+children$jscomp$2}return typeof value$jscomp$0==="string"&&value$jscomp$0[0]===`
|
|
291
|
-
`&&target$jscomp$0.push(`
|
|
292
|
-
`),value$jscomp$0!==null&&(checkAttributeStringCoercion(value$jscomp$0,"value"),target$jscomp$0.push(escapeTextForBrowser(""+value$jscomp$0))),null;case"input":checkControlledValueProps("input",props),target$jscomp$0.push(startChunkForTag("input"));var name=null,formAction=null,formEncType=null,formMethod=null,formTarget=null,value$jscomp$1=null,defaultValue$jscomp$0=null,checked=null,defaultChecked=null,propKey$jscomp$3;for(propKey$jscomp$3 in props)if(hasOwnProperty.call(props,propKey$jscomp$3)){var propValue$jscomp$3=props[propKey$jscomp$3];if(propValue$jscomp$3!=null)switch(propKey$jscomp$3){case"children":case"dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"name":name=propValue$jscomp$3;break;case"formAction":formAction=propValue$jscomp$3;break;case"formEncType":formEncType=propValue$jscomp$3;break;case"formMethod":formMethod=propValue$jscomp$3;break;case"formTarget":formTarget=propValue$jscomp$3;break;case"defaultChecked":defaultChecked=propValue$jscomp$3;break;case"defaultValue":defaultValue$jscomp$0=propValue$jscomp$3;break;case"checked":checked=propValue$jscomp$3;break;case"value":value$jscomp$1=propValue$jscomp$3;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$3,propValue$jscomp$3)}}formAction===null||props.type==="image"||props.type==="submit"||didWarnFormActionType||(didWarnFormActionType=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".'));var formData=pushFormActionAttribute(target$jscomp$0,resumableState,renderState,formAction,formEncType,formMethod,formTarget,name);return checked===null||defaultChecked===null||didWarnDefaultChecked||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components","A component",props.type),didWarnDefaultChecked=!0),value$jscomp$1===null||defaultValue$jscomp$0===null||didWarnDefaultInputValue||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components","A component",props.type),didWarnDefaultInputValue=!0),checked!==null?pushBooleanAttribute(target$jscomp$0,"checked",checked):defaultChecked!==null&&pushBooleanAttribute(target$jscomp$0,"checked",defaultChecked),value$jscomp$1!==null?pushAttribute(target$jscomp$0,"value",value$jscomp$1):defaultValue$jscomp$0!==null&&pushAttribute(target$jscomp$0,"value",defaultValue$jscomp$0),target$jscomp$0.push(endOfStartTagSelfClosing),formData!=null&&formData.forEach(pushAdditionalFormField,target$jscomp$0),null;case"button":target$jscomp$0.push(startChunkForTag("button"));var children$jscomp$3=null,innerHTML$jscomp$2=null,name$jscomp$0=null,formAction$jscomp$0=null,formEncType$jscomp$0=null,formMethod$jscomp$0=null,formTarget$jscomp$0=null,propKey$jscomp$4;for(propKey$jscomp$4 in props)if(hasOwnProperty.call(props,propKey$jscomp$4)){var propValue$jscomp$4=props[propKey$jscomp$4];if(propValue$jscomp$4!=null)switch(propKey$jscomp$4){case"children":children$jscomp$3=propValue$jscomp$4;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$2=propValue$jscomp$4;break;case"name":name$jscomp$0=propValue$jscomp$4;break;case"formAction":formAction$jscomp$0=propValue$jscomp$4;break;case"formEncType":formEncType$jscomp$0=propValue$jscomp$4;break;case"formMethod":formMethod$jscomp$0=propValue$jscomp$4;break;case"formTarget":formTarget$jscomp$0=propValue$jscomp$4;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$4,propValue$jscomp$4)}}formAction$jscomp$0===null||props.type==null||props.type==="submit"||didWarnFormActionType||(didWarnFormActionType=!0,console.error('A button can only specify a formAction along with type="submit" or no type.'));var formData$jscomp$0=pushFormActionAttribute(target$jscomp$0,resumableState,renderState,formAction$jscomp$0,formEncType$jscomp$0,formMethod$jscomp$0,formTarget$jscomp$0,name$jscomp$0);if(target$jscomp$0.push(endOfStartTag),formData$jscomp$0!=null&&formData$jscomp$0.forEach(pushAdditionalFormField,target$jscomp$0),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$2,children$jscomp$3),typeof children$jscomp$3==="string"){target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));var JSCompiler_inline_result$jscomp$1=null}else JSCompiler_inline_result$jscomp$1=children$jscomp$3;return JSCompiler_inline_result$jscomp$1;case"form":target$jscomp$0.push(startChunkForTag("form"));var children$jscomp$4=null,innerHTML$jscomp$3=null,formAction$jscomp$1=null,formEncType$jscomp$1=null,formMethod$jscomp$1=null,formTarget$jscomp$1=null,propKey$jscomp$5;for(propKey$jscomp$5 in props)if(hasOwnProperty.call(props,propKey$jscomp$5)){var propValue$jscomp$5=props[propKey$jscomp$5];if(propValue$jscomp$5!=null)switch(propKey$jscomp$5){case"children":children$jscomp$4=propValue$jscomp$5;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$3=propValue$jscomp$5;break;case"action":formAction$jscomp$1=propValue$jscomp$5;break;case"encType":formEncType$jscomp$1=propValue$jscomp$5;break;case"method":formMethod$jscomp$1=propValue$jscomp$5;break;case"target":formTarget$jscomp$1=propValue$jscomp$5;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$5,propValue$jscomp$5)}}var formData$jscomp$1=null,formActionName=null;if(typeof formAction$jscomp$1==="function"){formEncType$jscomp$1===null&&formMethod$jscomp$1===null||didWarnFormActionMethod||(didWarnFormActionMethod=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),formTarget$jscomp$1===null||didWarnFormActionTarget||(didWarnFormActionTarget=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."));var customFields=getCustomFormFields(resumableState,formAction$jscomp$1);customFields!==null?(formAction$jscomp$1=customFields.action||"",formEncType$jscomp$1=customFields.encType,formMethod$jscomp$1=customFields.method,formTarget$jscomp$1=customFields.target,formData$jscomp$1=customFields.data,formActionName=customFields.name):(target$jscomp$0.push(attributeSeparator,"action",attributeAssign,actionJavaScriptURL,attributeEnd),formTarget$jscomp$1=formMethod$jscomp$1=formEncType$jscomp$1=formAction$jscomp$1=null,injectFormReplayingRuntime(resumableState,renderState))}if(formAction$jscomp$1!=null&&pushAttribute(target$jscomp$0,"action",formAction$jscomp$1),formEncType$jscomp$1!=null&&pushAttribute(target$jscomp$0,"encType",formEncType$jscomp$1),formMethod$jscomp$1!=null&&pushAttribute(target$jscomp$0,"method",formMethod$jscomp$1),formTarget$jscomp$1!=null&&pushAttribute(target$jscomp$0,"target",formTarget$jscomp$1),target$jscomp$0.push(endOfStartTag),formActionName!==null&&(target$jscomp$0.push('<input type="hidden"'),pushStringAttribute(target$jscomp$0,"name",formActionName),target$jscomp$0.push(endOfStartTagSelfClosing),formData$jscomp$1!=null&&formData$jscomp$1.forEach(pushAdditionalFormField,target$jscomp$0)),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$3,children$jscomp$4),typeof children$jscomp$4==="string"){target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));var JSCompiler_inline_result$jscomp$2=null}else JSCompiler_inline_result$jscomp$2=children$jscomp$4;return JSCompiler_inline_result$jscomp$2;case"menuitem":target$jscomp$0.push(startChunkForTag("menuitem"));for(var propKey$jscomp$6 in props)if(hasOwnProperty.call(props,propKey$jscomp$6)){var propValue$jscomp$6=props[propKey$jscomp$6];if(propValue$jscomp$6!=null)switch(propKey$jscomp$6){case"children":case"dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:pushAttribute(target$jscomp$0,propKey$jscomp$6,propValue$jscomp$6)}}return target$jscomp$0.push(endOfStartTag),null;case"object":target$jscomp$0.push(startChunkForTag("object"));var children$jscomp$5=null,innerHTML$jscomp$4=null,propKey$jscomp$7;for(propKey$jscomp$7 in props)if(hasOwnProperty.call(props,propKey$jscomp$7)){var propValue$jscomp$7=props[propKey$jscomp$7];if(propValue$jscomp$7!=null)switch(propKey$jscomp$7){case"children":children$jscomp$5=propValue$jscomp$7;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$4=propValue$jscomp$7;break;case"data":checkAttributeStringCoercion(propValue$jscomp$7,"data");var sanitizedValue=sanitizeURL(""+propValue$jscomp$7);if(sanitizedValue===""){console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',propKey$jscomp$7,propKey$jscomp$7);break}target$jscomp$0.push(attributeSeparator,"data",attributeAssign,escapeTextForBrowser(sanitizedValue),attributeEnd);break;default:pushAttribute(target$jscomp$0,propKey$jscomp$7,propValue$jscomp$7)}}if(target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$4,children$jscomp$5),typeof children$jscomp$5==="string"){target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));var JSCompiler_inline_result$jscomp$3=null}else JSCompiler_inline_result$jscomp$3=children$jscomp$5;return JSCompiler_inline_result$jscomp$3;case"title":var noscriptTagInScope=formatContext.tagScope&1,isFallback=formatContext.tagScope&4;if(hasOwnProperty.call(props,"children")){var children$jscomp$6=props.children,child=Array.isArray(children$jscomp$6)?2>children$jscomp$6.length?children$jscomp$6[0]:null:children$jscomp$6;Array.isArray(children$jscomp$6)&&1<children$jscomp$6.length?console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.",children$jscomp$6.length):typeof child==="function"||typeof child==="symbol"?console.error("React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.",typeof child==="function"?"a Function":"a Sybmol"):child&&child.toString==={}.toString&&(child.$$typeof!=null?console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML."):console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>."))}if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope||props.itemProp!=null)var JSCompiler_inline_result$jscomp$4=pushTitleImpl(target$jscomp$0,props);else isFallback?JSCompiler_inline_result$jscomp$4=null:(pushTitleImpl(renderState.hoistableChunks,props),JSCompiler_inline_result$jscomp$4=void 0);return JSCompiler_inline_result$jscomp$4;case"link":var noscriptTagInScope$jscomp$0=formatContext.tagScope&1,isFallback$jscomp$0=formatContext.tagScope&4,{rel,href,precedence}=props;if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$0||props.itemProp!=null||typeof rel!=="string"||typeof href!=="string"||href===""){rel==="stylesheet"&&typeof props.precedence==="string"&&(typeof href==="string"&&href||console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',href===null?"`null`":href===void 0?"`undefined`":href===""?"an empty string":'something with type "'+typeof href+'"')),pushLinkImpl(target$jscomp$0,props);var JSCompiler_inline_result$jscomp$5=null}else if(props.rel==="stylesheet")if(typeof precedence!=="string"||props.disabled!=null||props.onLoad||props.onError){if(typeof precedence==="string"){if(props.disabled!=null)console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.');else if(props.onLoad||props.onError){var propDescription=props.onLoad&&props.onError?"`onLoad` and `onError` props":props.onLoad?"`onLoad` prop":"`onError` prop";console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',propDescription,propDescription)}}JSCompiler_inline_result$jscomp$5=pushLinkImpl(target$jscomp$0,props)}else{var styleQueue=renderState.styles.get(precedence),resourceState=resumableState.styleResources.hasOwnProperty(href)?resumableState.styleResources[href]:void 0;if(resourceState!==EXISTS){resumableState.styleResources[href]=EXISTS,styleQueue||(styleQueue={precedence:escapeTextForBrowser(precedence),rules:[],hrefs:[],sheets:new Map},renderState.styles.set(precedence,styleQueue));var resource={state:PENDING$1,props:assign({},props,{"data-precedence":props.precedence,precedence:null})};if(resourceState){resourceState.length===2&&adoptPreloadCredentials(resource.props,resourceState);var preloadResource=renderState.preloads.stylesheets.get(href);preloadResource&&0<preloadResource.length?preloadResource.length=0:resource.state=PRELOADED}styleQueue.sheets.set(href,resource),hoistableState&&hoistableState.stylesheets.add(resource)}else if(styleQueue){var _resource=styleQueue.sheets.get(href);_resource&&hoistableState&&hoistableState.stylesheets.add(_resource)}textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$5=null}else props.onLoad||props.onError?JSCompiler_inline_result$jscomp$5=pushLinkImpl(target$jscomp$0,props):(textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$5=isFallback$jscomp$0?null:pushLinkImpl(renderState.hoistableChunks,props));return JSCompiler_inline_result$jscomp$5;case"script":var noscriptTagInScope$jscomp$1=formatContext.tagScope&1,asyncProp=props.async;if(typeof props.src!=="string"||!props.src||!asyncProp||typeof asyncProp==="function"||typeof asyncProp==="symbol"||props.onLoad||props.onError||formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$1||props.itemProp!=null)var JSCompiler_inline_result$jscomp$6=pushScriptImpl(target$jscomp$0,props);else{var key=props.src;if(props.type==="module")var resources=resumableState.moduleScriptResources,preloads=renderState.preloads.moduleScripts;else resources=resumableState.scriptResources,preloads=renderState.preloads.scripts;var resourceState$jscomp$0=resources.hasOwnProperty(key)?resources[key]:void 0;if(resourceState$jscomp$0!==EXISTS){resources[key]=EXISTS;var scriptProps=props;if(resourceState$jscomp$0){resourceState$jscomp$0.length===2&&(scriptProps=assign({},props),adoptPreloadCredentials(scriptProps,resourceState$jscomp$0));var preloadResource$jscomp$0=preloads.get(key);preloadResource$jscomp$0&&(preloadResource$jscomp$0.length=0)}var resource$jscomp$0=[];renderState.scripts.add(resource$jscomp$0),pushScriptImpl(resource$jscomp$0,scriptProps)}textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$6=null}return JSCompiler_inline_result$jscomp$6;case"style":var noscriptTagInScope$jscomp$2=formatContext.tagScope&1;if(hasOwnProperty.call(props,"children")){var children$jscomp$7=props.children,child$jscomp$0=Array.isArray(children$jscomp$7)?2>children$jscomp$7.length?children$jscomp$7[0]:null:children$jscomp$7;(typeof child$jscomp$0==="function"||typeof child$jscomp$0==="symbol"||Array.isArray(child$jscomp$0))&&console.error("React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.",typeof child$jscomp$0==="function"?"a Function":typeof child$jscomp$0==="symbol"?"a Sybmol":"an Array")}var{precedence:precedence$jscomp$0,href:href$jscomp$0,nonce}=props;if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$2||props.itemProp!=null||typeof precedence$jscomp$0!=="string"||typeof href$jscomp$0!=="string"||href$jscomp$0===""){target$jscomp$0.push(startChunkForTag("style"));var children$jscomp$8=null,innerHTML$jscomp$5=null,propKey$jscomp$8;for(propKey$jscomp$8 in props)if(hasOwnProperty.call(props,propKey$jscomp$8)){var propValue$jscomp$8=props[propKey$jscomp$8];if(propValue$jscomp$8!=null)switch(propKey$jscomp$8){case"children":children$jscomp$8=propValue$jscomp$8;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$5=propValue$jscomp$8;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$8,propValue$jscomp$8)}}target$jscomp$0.push(endOfStartTag);var child$jscomp$1=Array.isArray(children$jscomp$8)?2>children$jscomp$8.length?children$jscomp$8[0]:null:children$jscomp$8;typeof child$jscomp$1!=="function"&&typeof child$jscomp$1!=="symbol"&&child$jscomp$1!==null&&child$jscomp$1!==void 0&&target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1)),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$5,children$jscomp$8),target$jscomp$0.push(endChunkForTag("style"));var JSCompiler_inline_result$jscomp$7=null}else{href$jscomp$0.includes(" ")&&console.error('React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is "%s".',href$jscomp$0);var styleQueue$jscomp$0=renderState.styles.get(precedence$jscomp$0),resourceState$jscomp$1=resumableState.styleResources.hasOwnProperty(href$jscomp$0)?resumableState.styleResources[href$jscomp$0]:void 0;if(resourceState$jscomp$1!==EXISTS){resumableState.styleResources[href$jscomp$0]=EXISTS,resourceState$jscomp$1&&console.error('React encountered a hoistable style tag for the same href as a preload: "%s". When using a style tag to inline styles you should not also preload it as a stylsheet.',href$jscomp$0),styleQueue$jscomp$0||(styleQueue$jscomp$0={precedence:escapeTextForBrowser(precedence$jscomp$0),rules:[],hrefs:[],sheets:new Map},renderState.styles.set(precedence$jscomp$0,styleQueue$jscomp$0));var nonceStyle=renderState.nonce.style;if(nonceStyle&&nonceStyle!==nonce)console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce "%s" that was included with this render.',precedence$jscomp$0,nonce,nonceStyle);else{!nonceStyle&&nonce&&console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',precedence$jscomp$0,nonce),styleQueue$jscomp$0.hrefs.push(escapeTextForBrowser(href$jscomp$0));var target=styleQueue$jscomp$0.rules,children$jscomp$9=null,innerHTML$jscomp$6=null,propKey$jscomp$9;for(propKey$jscomp$9 in props)if(hasOwnProperty.call(props,propKey$jscomp$9)){var propValue$jscomp$9=props[propKey$jscomp$9];if(propValue$jscomp$9!=null)switch(propKey$jscomp$9){case"children":children$jscomp$9=propValue$jscomp$9;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$6=propValue$jscomp$9}}var child$jscomp$2=Array.isArray(children$jscomp$9)?2>children$jscomp$9.length?children$jscomp$9[0]:null:children$jscomp$9;typeof child$jscomp$2!=="function"&&typeof child$jscomp$2!=="symbol"&&child$jscomp$2!==null&&child$jscomp$2!==void 0&&target.push(escapeStyleTextContent(child$jscomp$2)),pushInnerHTML(target,innerHTML$jscomp$6,children$jscomp$9)}}styleQueue$jscomp$0&&hoistableState&&hoistableState.styles.add(styleQueue$jscomp$0),textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$7=void 0}return JSCompiler_inline_result$jscomp$7;case"meta":var noscriptTagInScope$jscomp$3=formatContext.tagScope&1,isFallback$jscomp$1=formatContext.tagScope&4;if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$3||props.itemProp!=null)var JSCompiler_inline_result$jscomp$8=pushSelfClosing(target$jscomp$0,props,"meta");else textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$8=isFallback$jscomp$1?null:typeof props.charSet==="string"?pushSelfClosing(renderState.charsetChunks,props,"meta"):props.name==="viewport"?pushSelfClosing(renderState.viewportChunks,props,"meta"):pushSelfClosing(renderState.hoistableChunks,props,"meta");return JSCompiler_inline_result$jscomp$8;case"listing":case"pre":target$jscomp$0.push(startChunkForTag(type));var children$jscomp$10=null,innerHTML$jscomp$7=null,propKey$jscomp$10;for(propKey$jscomp$10 in props)if(hasOwnProperty.call(props,propKey$jscomp$10)){var propValue$jscomp$10=props[propKey$jscomp$10];if(propValue$jscomp$10!=null)switch(propKey$jscomp$10){case"children":children$jscomp$10=propValue$jscomp$10;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$7=propValue$jscomp$10;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$10,propValue$jscomp$10)}}if(target$jscomp$0.push(endOfStartTag),innerHTML$jscomp$7!=null){if(children$jscomp$10!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof innerHTML$jscomp$7!=="object"||!("__html"in innerHTML$jscomp$7))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");var html=innerHTML$jscomp$7.__html;html!==null&&html!==void 0&&(typeof html==="string"&&0<html.length&&html[0]===`
|
|
293
|
-
`?target$jscomp$0.push(`
|
|
294
|
-
`,html):(checkHtmlStringCoercion(html),target$jscomp$0.push(""+html)))}return typeof children$jscomp$10==="string"&&children$jscomp$10[0]===`
|
|
295
|
-
`&&target$jscomp$0.push(`
|
|
296
|
-
`),children$jscomp$10;case"img":var pictureOrNoScriptTagInScope=formatContext.tagScope&3,{src,srcSet}=props;if(!(props.loading==="lazy"||!src&&!srcSet||typeof src!=="string"&&src!=null||typeof srcSet!=="string"&&srcSet!=null||props.fetchPriority==="low"||pictureOrNoScriptTagInScope)&&(typeof src!=="string"||src[4]!==":"||src[0]!=="d"&&src[0]!=="D"||src[1]!=="a"&&src[1]!=="A"||src[2]!=="t"&&src[2]!=="T"||src[3]!=="a"&&src[3]!=="A")&&(typeof srcSet!=="string"||srcSet[4]!==":"||srcSet[0]!=="d"&&srcSet[0]!=="D"||srcSet[1]!=="a"&&srcSet[1]!=="A"||srcSet[2]!=="t"&&srcSet[2]!=="T"||srcSet[3]!=="a"&&srcSet[3]!=="A")){hoistableState!==null&&formatContext.tagScope&64&&(hoistableState.suspenseyImages=!0);var sizes=typeof props.sizes==="string"?props.sizes:void 0,key$jscomp$0=srcSet?srcSet+`
|
|
297
|
-
`+(sizes||""):src,promotablePreloads=renderState.preloads.images,resource$jscomp$1=promotablePreloads.get(key$jscomp$0);if(resource$jscomp$1){if(props.fetchPriority==="high"||10>renderState.highImagePreloads.size)promotablePreloads.delete(key$jscomp$0),renderState.highImagePreloads.add(resource$jscomp$1)}else if(!resumableState.imageResources.hasOwnProperty(key$jscomp$0)){resumableState.imageResources[key$jscomp$0]=PRELOAD_NO_CREDS;var input=props.crossOrigin,crossOrigin=typeof input==="string"?input==="use-credentials"?input:"":void 0,headers=renderState.headers,header;headers&&0<headers.remainingCapacity&&typeof props.srcSet!=="string"&&(props.fetchPriority==="high"||500>headers.highImagePreloads.length)&&(header=getPreloadAsHeader(src,"image",{imageSrcSet:props.srcSet,imageSizes:props.sizes,crossOrigin,integrity:props.integrity,nonce:props.nonce,type:props.type,fetchPriority:props.fetchPriority,referrerPolicy:props.refererPolicy}),0<=(headers.remainingCapacity-=header.length+2))?(renderState.resets.image[key$jscomp$0]=PRELOAD_NO_CREDS,headers.highImagePreloads&&(headers.highImagePreloads+=", "),headers.highImagePreloads+=header):(resource$jscomp$1=[],pushLinkImpl(resource$jscomp$1,{rel:"preload",as:"image",href:srcSet?void 0:src,imageSrcSet:srcSet,imageSizes:sizes,crossOrigin,integrity:props.integrity,type:props.type,fetchPriority:props.fetchPriority,referrerPolicy:props.referrerPolicy}),props.fetchPriority==="high"||10>renderState.highImagePreloads.size?renderState.highImagePreloads.add(resource$jscomp$1):(renderState.bulkPreloads.add(resource$jscomp$1),promotablePreloads.set(key$jscomp$0,resource$jscomp$1)))}}return pushSelfClosing(target$jscomp$0,props,"img");case"base":case"area":case"br":case"col":case"embed":case"hr":case"keygen":case"param":case"source":case"track":case"wbr":return pushSelfClosing(target$jscomp$0,props,type);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":break;case"head":if(formatContext.insertionMode<HTML_MODE){var preamble=preambleState||renderState.preamble;if(preamble.headChunks)throw Error("The `<head>` tag may only be rendered once.");preambleState!==null&&target$jscomp$0.push("<!--head-->"),preamble.headChunks=[];var JSCompiler_inline_result$jscomp$9=pushStartSingletonElement(preamble.headChunks,props,"head")}else JSCompiler_inline_result$jscomp$9=pushStartGenericElement(target$jscomp$0,props,"head");return JSCompiler_inline_result$jscomp$9;case"body":if(formatContext.insertionMode<HTML_MODE){var preamble$jscomp$0=preambleState||renderState.preamble;if(preamble$jscomp$0.bodyChunks)throw Error("The `<body>` tag may only be rendered once.");preambleState!==null&&target$jscomp$0.push("<!--body-->"),preamble$jscomp$0.bodyChunks=[];var JSCompiler_inline_result$jscomp$10=pushStartSingletonElement(preamble$jscomp$0.bodyChunks,props,"body")}else JSCompiler_inline_result$jscomp$10=pushStartGenericElement(target$jscomp$0,props,"body");return JSCompiler_inline_result$jscomp$10;case"html":if(formatContext.insertionMode===ROOT_HTML_MODE){var preamble$jscomp$1=preambleState||renderState.preamble;if(preamble$jscomp$1.htmlChunks)throw Error("The `<html>` tag may only be rendered once.");preambleState!==null&&target$jscomp$0.push("<!--html-->"),preamble$jscomp$1.htmlChunks=["<!DOCTYPE html>"];var JSCompiler_inline_result$jscomp$11=pushStartSingletonElement(preamble$jscomp$1.htmlChunks,props,"html")}else JSCompiler_inline_result$jscomp$11=pushStartGenericElement(target$jscomp$0,props,"html");return JSCompiler_inline_result$jscomp$11;default:if(type.indexOf("-")!==-1){target$jscomp$0.push(startChunkForTag(type));var children$jscomp$11=null,innerHTML$jscomp$8=null,propKey$jscomp$11;for(propKey$jscomp$11 in props)if(hasOwnProperty.call(props,propKey$jscomp$11)){var propValue$jscomp$11=props[propKey$jscomp$11];if(propValue$jscomp$11!=null){var attributeName=propKey$jscomp$11;switch(propKey$jscomp$11){case"children":children$jscomp$11=propValue$jscomp$11;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$8=propValue$jscomp$11;break;case"style":pushStyleAttribute(target$jscomp$0,propValue$jscomp$11);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"className":attributeName="class";default:if(isAttributeNameSafe(propKey$jscomp$11)&&typeof propValue$jscomp$11!=="function"&&typeof propValue$jscomp$11!=="symbol"&&propValue$jscomp$11!==!1){if(propValue$jscomp$11===!0)propValue$jscomp$11="";else if(typeof propValue$jscomp$11==="object")continue;target$jscomp$0.push(attributeSeparator,attributeName,attributeAssign,escapeTextForBrowser(propValue$jscomp$11),attributeEnd)}}}}return target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$8,children$jscomp$11),children$jscomp$11}}return pushStartGenericElement(target$jscomp$0,props,type)}var endTagCache=new Map;function endChunkForTag(tag){var chunk=endTagCache.get(tag);return chunk===void 0&&(chunk="</"+tag+">",endTagCache.set(tag,chunk)),chunk}function hoistPreambleState(renderState,preambleState){renderState=renderState.preamble,renderState.htmlChunks===null&&preambleState.htmlChunks&&(renderState.htmlChunks=preambleState.htmlChunks),renderState.headChunks===null&&preambleState.headChunks&&(renderState.headChunks=preambleState.headChunks),renderState.bodyChunks===null&&preambleState.bodyChunks&&(renderState.bodyChunks=preambleState.bodyChunks)}function writeBootstrap(destination,renderState){renderState=renderState.bootstrapChunks;for(var i=0;i<renderState.length-1;i++)writeChunk(destination,renderState[i]);return i<renderState.length?(i=renderState[i],renderState.length=0,!!destination.write(i)):!0}var shellTimeRuntimeScript="requestAnimationFrame(function(){$RT=performance.now()});",placeholder1='<template id="',placeholder2='"></template>',startCompletedSuspenseBoundary="<!--$-->",startPendingSuspenseBoundary1='<!--$?--><template id="',startPendingSuspenseBoundary2='"></template>',startClientRenderedSuspenseBoundary="<!--$!-->",endSuspenseBoundary="<!--/$-->",clientRenderedSuspenseBoundaryError1="<template",clientRenderedSuspenseBoundaryErrorAttrInterstitial='"',clientRenderedSuspenseBoundaryError1A=' data-dgst="',clientRenderedSuspenseBoundaryError1B=' data-msg="',clientRenderedSuspenseBoundaryError1C=' data-stck="',clientRenderedSuspenseBoundaryError1D=' data-cstck="',clientRenderedSuspenseBoundaryError2="></template>";function writeStartPendingSuspenseBoundary(destination,renderState,id){if(writeChunk(destination,startPendingSuspenseBoundary1),id===null)throw Error("An ID must have been assigned before we can complete the boundary.");return writeChunk(destination,renderState.boundaryPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startPendingSuspenseBoundary2)}var startSegmentHTML='<div hidden id="',startSegmentHTML2='">',endSegmentHTML="</div>",startSegmentSVG='<svg aria-hidden="true" style="display:none" id="',startSegmentSVG2='">',endSegmentSVG="</svg>",startSegmentMathML='<math aria-hidden="true" style="display:none" id="',startSegmentMathML2='">',endSegmentMathML="</math>",startSegmentTable='<table hidden id="',startSegmentTable2='">',endSegmentTable="</table>",startSegmentTableBody='<table hidden><tbody id="',startSegmentTableBody2='">',endSegmentTableBody="</tbody></table>",startSegmentTableRow='<table hidden><tr id="',startSegmentTableRow2='">',endSegmentTableRow="</tr></table>",startSegmentColGroup='<table hidden><colgroup id="',startSegmentColGroup2='">',endSegmentColGroup="</colgroup></table>";function writeStartSegment(destination,renderState,formatContext,id){switch(formatContext.insertionMode){case ROOT_HTML_MODE:case HTML_HTML_MODE:case HTML_HEAD_MODE:case HTML_MODE:return writeChunk(destination,startSegmentHTML),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentHTML2);case SVG_MODE:return writeChunk(destination,startSegmentSVG),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentSVG2);case MATHML_MODE:return writeChunk(destination,startSegmentMathML),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentMathML2);case HTML_TABLE_MODE:return writeChunk(destination,startSegmentTable),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentTable2);case HTML_TABLE_BODY_MODE:return writeChunk(destination,startSegmentTableBody),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentTableBody2);case HTML_TABLE_ROW_MODE:return writeChunk(destination,startSegmentTableRow),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentTableRow2);case HTML_COLGROUP_MODE:return writeChunk(destination,startSegmentColGroup),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentColGroup2);default:throw Error("Unknown insertion mode. This is a bug in React.")}}function writeEndSegment(destination,formatContext){switch(formatContext.insertionMode){case ROOT_HTML_MODE:case HTML_HTML_MODE:case HTML_HEAD_MODE:case HTML_MODE:return!!destination.write(endSegmentHTML);case SVG_MODE:return!!destination.write(endSegmentSVG);case MATHML_MODE:return!!destination.write(endSegmentMathML);case HTML_TABLE_MODE:return!!destination.write(endSegmentTable);case HTML_TABLE_BODY_MODE:return!!destination.write(endSegmentTableBody);case HTML_TABLE_ROW_MODE:return!!destination.write(endSegmentTableRow);case HTML_COLGROUP_MODE:return!!destination.write(endSegmentColGroup);default:throw Error("Unknown insertion mode. This is a bug in React.")}}var completeSegmentScript1Full='$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("',completeSegmentScript1Partial='$RS("',completeSegmentScript2='","',completeSegmentScriptEnd='")</script>',completeBoundaryScriptFunctionOnly=`$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
|
|
298
|
-
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`,completeBoundaryScript1Partial='$RC("',completeBoundaryWithStylesScript1FullPartial=`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
|
|
299
|
-
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
|
|
300
|
-
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`,completeBoundaryWithStylesScript1Partial='$RR("',completeBoundaryScript2='","',completeBoundaryScript3a='",',completeBoundaryScript3b='"',completeBoundaryScriptEnd=")</script>",clientRenderScriptFunctionOnly='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',clientRenderScript1Full='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("',clientRenderScript1Partial='$RX("',clientRenderScript1A='"',clientRenderErrorScriptArgInterstitial=",",clientRenderScriptEnd=")</script>",regexForJSStringsInInstructionScripts=/[<\u2028\u2029]/g;function escapeJSStringsForInstructionScripts(input){return JSON.stringify(input).replace(regexForJSStringsInInstructionScripts,function(match){switch(match){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var regexForJSStringsInScripts=/[&><\u2028\u2029]/g;function escapeJSObjectForInstructionScripts(input){return JSON.stringify(input).replace(regexForJSStringsInScripts,function(match){switch(match){case"&":return"\\u0026";case">":return"\\u003e";case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var lateStyleTagResourceOpen1=' media="not all" data-precedence="',lateStyleTagResourceOpen2='" data-href="',lateStyleTagResourceOpen3='">',lateStyleTagTemplateClose="</style>",currentlyRenderingBoundaryHasStylesToHoist=!1,destinationHasCapacity=!0;function flushStyleTagsLateForBoundary(styleQueue){var{rules,hrefs}=styleQueue;0<rules.length&&hrefs.length===0&&console.error("React expected to have at least one href for an a hoistable style but found none. This is a bug in React.");var i=0;if(hrefs.length){writeChunk(this,currentlyFlushingRenderState.startInlineStyle),writeChunk(this,lateStyleTagResourceOpen1),writeChunk(this,styleQueue.precedence);for(writeChunk(this,lateStyleTagResourceOpen2);i<hrefs.length-1;i++)writeChunk(this,hrefs[i]),writeChunk(this,spaceSeparator);writeChunk(this,hrefs[i]),writeChunk(this,lateStyleTagResourceOpen3);for(i=0;i<rules.length;i++)writeChunk(this,rules[i]);destinationHasCapacity=!!this.write(lateStyleTagTemplateClose),currentlyRenderingBoundaryHasStylesToHoist=!0,rules.length=0,hrefs.length=0}}function hasStylesToHoist(stylesheet){return stylesheet.state!==PREAMBLE?currentlyRenderingBoundaryHasStylesToHoist=!0:!1}function writeHoistablesForBoundary(destination,hoistableState,renderState){return currentlyRenderingBoundaryHasStylesToHoist=!1,destinationHasCapacity=!0,currentlyFlushingRenderState=renderState,hoistableState.styles.forEach(flushStyleTagsLateForBoundary,destination),currentlyFlushingRenderState=null,hoistableState.stylesheets.forEach(hasStylesToHoist),currentlyRenderingBoundaryHasStylesToHoist&&(renderState.stylesToHoist=!0),destinationHasCapacity}function flushResource(resource){for(var i=0;i<resource.length;i++)writeChunk(this,resource[i]);resource.length=0}var stylesheetFlushingQueue=[];function flushStyleInPreamble(stylesheet){pushLinkImpl(stylesheetFlushingQueue,stylesheet.props);for(var i=0;i<stylesheetFlushingQueue.length;i++)writeChunk(this,stylesheetFlushingQueue[i]);stylesheetFlushingQueue.length=0,stylesheet.state=PREAMBLE}var styleTagResourceOpen1=' data-precedence="',styleTagResourceOpen2='" data-href="',spaceSeparator=" ",styleTagResourceOpen3='">',styleTagResourceClose="</style>";function flushStylesInPreamble(styleQueue){var hasStylesheets=0<styleQueue.sheets.size;styleQueue.sheets.forEach(flushStyleInPreamble,this),styleQueue.sheets.clear();var rules=styleQueue.rules,hrefs=styleQueue.hrefs;if(!hasStylesheets||hrefs.length){if(writeChunk(this,currentlyFlushingRenderState.startInlineStyle),writeChunk(this,styleTagResourceOpen1),writeChunk(this,styleQueue.precedence),styleQueue=0,hrefs.length){for(writeChunk(this,styleTagResourceOpen2);styleQueue<hrefs.length-1;styleQueue++)writeChunk(this,hrefs[styleQueue]),writeChunk(this,spaceSeparator);writeChunk(this,hrefs[styleQueue])}writeChunk(this,styleTagResourceOpen3);for(styleQueue=0;styleQueue<rules.length;styleQueue++)writeChunk(this,rules[styleQueue]);writeChunk(this,styleTagResourceClose),rules.length=0,hrefs.length=0}}function preloadLateStyle(stylesheet){if(stylesheet.state===PENDING$1){stylesheet.state=PRELOADED;var props=stylesheet.props;pushLinkImpl(stylesheetFlushingQueue,{rel:"preload",as:"style",href:stylesheet.props.href,crossOrigin:props.crossOrigin,fetchPriority:props.fetchPriority,integrity:props.integrity,media:props.media,hrefLang:props.hrefLang,referrerPolicy:props.referrerPolicy});for(stylesheet=0;stylesheet<stylesheetFlushingQueue.length;stylesheet++)writeChunk(this,stylesheetFlushingQueue[stylesheet]);stylesheetFlushingQueue.length=0}}function preloadLateStyles(styleQueue){styleQueue.sheets.forEach(preloadLateStyle,this),styleQueue.sheets.clear()}var completedShellIdAttributeStart=' id="';function pushCompletedShellIdAttribute(target,resumableState){(resumableState.instructions&SentCompletedShellId)===NothingSent&&(resumableState.instructions|=SentCompletedShellId,target.push(completedShellIdAttributeStart,escapeTextForBrowser("_"+resumableState.idPrefix+"R_"),attributeEnd))}var arrayFirstOpenBracket="[",arraySubsequentOpenBracket=",[",arrayInterstitial=",",arrayCloseBracket="]";function writeStyleResourceDependenciesInJS(destination,hoistableState){writeChunk(destination,arrayFirstOpenBracket);var nextArrayOpenBrackChunk=arrayFirstOpenBracket;hoistableState.stylesheets.forEach(function(resource){if(resource.state!==PREAMBLE)if(resource.state===LATE)writeChunk(destination,nextArrayOpenBrackChunk),resource=resource.props.href,checkAttributeStringCoercion(resource,"href"),writeChunk(destination,escapeJSObjectForInstructionScripts(""+resource)),writeChunk(destination,arrayCloseBracket),nextArrayOpenBrackChunk=arraySubsequentOpenBracket;else{writeChunk(destination,nextArrayOpenBrackChunk);var precedence=resource.props["data-precedence"],props=resource.props,coercedHref=sanitizeURL(""+resource.props.href);writeChunk(destination,escapeJSObjectForInstructionScripts(coercedHref)),checkAttributeStringCoercion(precedence,"precedence"),precedence=""+precedence,writeChunk(destination,arrayInterstitial),writeChunk(destination,escapeJSObjectForInstructionScripts(precedence));for(var propKey in props)if(hasOwnProperty.call(props,propKey)&&(precedence=props[propKey],precedence!=null))switch(propKey){case"href":case"rel":case"precedence":case"data-precedence":break;case"children":case"dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:writeStyleResourceAttributeInJS(destination,propKey,precedence)}writeChunk(destination,arrayCloseBracket),nextArrayOpenBrackChunk=arraySubsequentOpenBracket,resource.state=LATE}}),writeChunk(destination,arrayCloseBracket)}function writeStyleResourceAttributeInJS(destination,name,value){var attributeName=name.toLowerCase();switch(typeof value){case"function":case"symbol":return}switch(name){case"innerHTML":case"dangerouslySetInnerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"style":case"ref":return;case"className":attributeName="class",checkAttributeStringCoercion(value,attributeName),name=""+value;break;case"hidden":if(value===!1)return;name="";break;case"src":case"href":value=sanitizeURL(value),checkAttributeStringCoercion(value,attributeName),name=""+value;break;default:if(2<name.length&&(name[0]==="o"||name[0]==="O")&&(name[1]==="n"||name[1]==="N")||!isAttributeNameSafe(name))return;checkAttributeStringCoercion(value,attributeName),name=""+value}writeChunk(destination,arrayInterstitial),writeChunk(destination,escapeJSObjectForInstructionScripts(attributeName)),writeChunk(destination,arrayInterstitial),writeChunk(destination,escapeJSObjectForInstructionScripts(name))}var PENDING$1=0,PRELOADED=1,PREAMBLE=2,LATE=3;function createHoistableState(){return{styles:new Set,stylesheets:new Set,suspenseyImages:!1}}function prefetchDNS(href){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(typeof href==="string"&&href){if(!resumableState.dnsResources.hasOwnProperty(href)){resumableState.dnsResources[href]=EXISTS,resumableState=renderState.headers;var header,JSCompiler_temp;if(JSCompiler_temp=resumableState&&0<resumableState.remainingCapacity)JSCompiler_temp=(header="<"+escapeHrefForLinkHeaderURLContext(href)+">; rel=dns-prefetch",0<=(resumableState.remainingCapacity-=header.length+2));JSCompiler_temp?(renderState.resets.dns[href]=EXISTS,resumableState.preconnects&&(resumableState.preconnects+=", "),resumableState.preconnects+=header):(header=[],pushLinkImpl(header,{href,rel:"dns-prefetch"}),renderState.preconnects.add(header))}enqueueFlush(request)}}else previousDispatcher.D(href)}function preconnect(href,crossOrigin){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(typeof href==="string"&&href){var bucket=crossOrigin==="use-credentials"?"credentials":typeof crossOrigin==="string"?"anonymous":"default";if(!resumableState.connectResources[bucket].hasOwnProperty(href)){resumableState.connectResources[bucket][href]=EXISTS,resumableState=renderState.headers;var header,JSCompiler_temp;if(JSCompiler_temp=resumableState&&0<resumableState.remainingCapacity){if(JSCompiler_temp="<"+escapeHrefForLinkHeaderURLContext(href)+">; rel=preconnect",typeof crossOrigin==="string"){var escapedCrossOrigin=escapeStringForLinkHeaderQuotedParamValueContext(crossOrigin,"crossOrigin");JSCompiler_temp+='; crossorigin="'+escapedCrossOrigin+'"'}JSCompiler_temp=(header=JSCompiler_temp,0<=(resumableState.remainingCapacity-=header.length+2))}JSCompiler_temp?(renderState.resets.connect[bucket][href]=EXISTS,resumableState.preconnects&&(resumableState.preconnects+=", "),resumableState.preconnects+=header):(bucket=[],pushLinkImpl(bucket,{rel:"preconnect",href,crossOrigin}),renderState.preconnects.add(bucket))}enqueueFlush(request)}}else previousDispatcher.C(href,crossOrigin)}function preload(href,as,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(as&&href){switch(as){case"image":if(options)var{imageSrcSet,imageSizes,fetchPriority}=options;var key=imageSrcSet?imageSrcSet+`
|
|
301
|
-
`+(imageSizes||""):href;if(resumableState.imageResources.hasOwnProperty(key))return;resumableState.imageResources[key]=PRELOAD_NO_CREDS,resumableState=renderState.headers;var header;resumableState&&0<resumableState.remainingCapacity&&typeof imageSrcSet!=="string"&&fetchPriority==="high"&&(header=getPreloadAsHeader(href,as,options),0<=(resumableState.remainingCapacity-=header.length+2))?(renderState.resets.image[key]=PRELOAD_NO_CREDS,resumableState.highImagePreloads&&(resumableState.highImagePreloads+=", "),resumableState.highImagePreloads+=header):(resumableState=[],pushLinkImpl(resumableState,assign({rel:"preload",href:imageSrcSet?void 0:href,as},options)),fetchPriority==="high"?renderState.highImagePreloads.add(resumableState):(renderState.bulkPreloads.add(resumableState),renderState.preloads.images.set(key,resumableState)));break;case"style":if(resumableState.styleResources.hasOwnProperty(href))return;imageSrcSet=[],pushLinkImpl(imageSrcSet,assign({rel:"preload",href,as},options)),resumableState.styleResources[href]=!options||typeof options.crossOrigin!=="string"&&typeof options.integrity!=="string"?PRELOAD_NO_CREDS:[options.crossOrigin,options.integrity],renderState.preloads.stylesheets.set(href,imageSrcSet),renderState.bulkPreloads.add(imageSrcSet);break;case"script":if(resumableState.scriptResources.hasOwnProperty(href))return;imageSrcSet=[],renderState.preloads.scripts.set(href,imageSrcSet),renderState.bulkPreloads.add(imageSrcSet),pushLinkImpl(imageSrcSet,assign({rel:"preload",href,as},options)),resumableState.scriptResources[href]=!options||typeof options.crossOrigin!=="string"&&typeof options.integrity!=="string"?PRELOAD_NO_CREDS:[options.crossOrigin,options.integrity];break;default:if(resumableState.unknownResources.hasOwnProperty(as)){if(imageSrcSet=resumableState.unknownResources[as],imageSrcSet.hasOwnProperty(href))return}else imageSrcSet={},resumableState.unknownResources[as]=imageSrcSet;if(imageSrcSet[href]=PRELOAD_NO_CREDS,(resumableState=renderState.headers)&&0<resumableState.remainingCapacity&&as==="font"&&(key=getPreloadAsHeader(href,as,options),0<=(resumableState.remainingCapacity-=key.length+2)))renderState.resets.font[href]=PRELOAD_NO_CREDS,resumableState.fontPreloads&&(resumableState.fontPreloads+=", "),resumableState.fontPreloads+=key;else switch(resumableState=[],href=assign({rel:"preload",href,as},options),pushLinkImpl(resumableState,href),as){case"font":renderState.fontPreloads.add(resumableState);break;default:renderState.bulkPreloads.add(resumableState)}}enqueueFlush(request)}}else previousDispatcher.L(href,as,options)}function preloadModule(href,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(href){var as=options&&typeof options.as==="string"?options.as:"script";switch(as){case"script":if(resumableState.moduleScriptResources.hasOwnProperty(href))return;as=[],resumableState.moduleScriptResources[href]=!options||typeof options.crossOrigin!=="string"&&typeof options.integrity!=="string"?PRELOAD_NO_CREDS:[options.crossOrigin,options.integrity],renderState.preloads.moduleScripts.set(href,as);break;default:if(resumableState.moduleUnknownResources.hasOwnProperty(as)){var resources=resumableState.unknownResources[as];if(resources.hasOwnProperty(href))return}else resources={},resumableState.moduleUnknownResources[as]=resources;as=[],resources[href]=PRELOAD_NO_CREDS}pushLinkImpl(as,assign({rel:"modulepreload",href},options)),renderState.bulkPreloads.add(as),enqueueFlush(request)}}else previousDispatcher.m(href,options)}function preinitStyle(href,precedence,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(href){precedence=precedence||"default";var styleQueue=renderState.styles.get(precedence),resourceState=resumableState.styleResources.hasOwnProperty(href)?resumableState.styleResources[href]:void 0;resourceState!==EXISTS&&(resumableState.styleResources[href]=EXISTS,styleQueue||(styleQueue={precedence:escapeTextForBrowser(precedence),rules:[],hrefs:[],sheets:new Map},renderState.styles.set(precedence,styleQueue)),precedence={state:PENDING$1,props:assign({rel:"stylesheet",href,"data-precedence":precedence},options)},resourceState&&(resourceState.length===2&&adoptPreloadCredentials(precedence.props,resourceState),(renderState=renderState.preloads.stylesheets.get(href))&&0<renderState.length?renderState.length=0:precedence.state=PRELOADED),styleQueue.sheets.set(href,precedence),enqueueFlush(request))}}else previousDispatcher.S(href,precedence,options)}function preinitScript(src,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(src){var resourceState=resumableState.scriptResources.hasOwnProperty(src)?resumableState.scriptResources[src]:void 0;resourceState!==EXISTS&&(resumableState.scriptResources[src]=EXISTS,options=assign({src,async:!0},options),resourceState&&(resourceState.length===2&&adoptPreloadCredentials(options,resourceState),src=renderState.preloads.scripts.get(src))&&(src.length=0),src=[],renderState.scripts.add(src),pushScriptImpl(src,options),enqueueFlush(request))}}else previousDispatcher.X(src,options)}function preinitModuleScript(src,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(src){var resourceState=resumableState.moduleScriptResources.hasOwnProperty(src)?resumableState.moduleScriptResources[src]:void 0;resourceState!==EXISTS&&(resumableState.moduleScriptResources[src]=EXISTS,options=assign({src,type:"module",async:!0},options),resourceState&&(resourceState.length===2&&adoptPreloadCredentials(options,resourceState),src=renderState.preloads.moduleScripts.get(src))&&(src.length=0),src=[],renderState.scripts.add(src),pushScriptImpl(src,options),enqueueFlush(request))}}else previousDispatcher.M(src,options)}function preloadBootstrapScriptOrModule(resumableState,renderState,href,props){(resumableState.scriptResources.hasOwnProperty(href)||resumableState.moduleScriptResources.hasOwnProperty(href))&&console.error('Internal React Error: React expected bootstrap script or module with src "%s" to not have been preloaded already. please file an issue',href),resumableState.scriptResources[href]=EXISTS,resumableState.moduleScriptResources[href]=EXISTS,resumableState=[],pushLinkImpl(resumableState,props),renderState.bootstrapScripts.add(resumableState)}function adoptPreloadCredentials(target,preloadState){target.crossOrigin==null&&(target.crossOrigin=preloadState[0]),target.integrity==null&&(target.integrity=preloadState[1])}function getPreloadAsHeader(href,as,params){href=escapeHrefForLinkHeaderURLContext(href),as=escapeStringForLinkHeaderQuotedParamValueContext(as,"as"),as="<"+href+'>; rel=preload; as="'+as+'"';for(var paramName in params)hasOwnProperty.call(params,paramName)&&(href=params[paramName],typeof href==="string"&&(as+="; "+paramName.toLowerCase()+'="'+escapeStringForLinkHeaderQuotedParamValueContext(href,paramName)+'"'));return as}var regexForHrefInLinkHeaderURLContext=/[<>\r\n]/g;function escapeHrefForLinkHeaderURLContext(hrefInput){return checkAttributeStringCoercion(hrefInput,"href"),(""+hrefInput).replace(regexForHrefInLinkHeaderURLContext,escapeHrefForLinkHeaderURLContextReplacer)}function escapeHrefForLinkHeaderURLContextReplacer(match){switch(match){case"<":return"%3C";case">":return"%3E";case`
|
|
302
|
-
`:return"%0A";case"\r":return"%0D";default:throw Error("escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}var regexForLinkHeaderQuotedParamValueContext=/["';,\r\n]/g;function escapeStringForLinkHeaderQuotedParamValueContext(value,name){return willCoercionThrow(value)&&(console.error("The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.",name,typeName(value)),testStringCoercion(value)),(""+value).replace(regexForLinkHeaderQuotedParamValueContext,escapeStringForLinkHeaderQuotedParamValueContextReplacer)}function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match){switch(match){case'"':return"%22";case"'":return"%27";case";":return"%3B";case",":return"%2C";case`
|
|
303
|
-
`:return"%0A";case"\r":return"%0D";default:throw Error("escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}function hoistStyleQueueDependency(styleQueue){this.styles.add(styleQueue)}function hoistStylesheetDependency(stylesheet){this.stylesheets.add(stylesheet)}function hoistHoistables(parentState,childState){childState.styles.forEach(hoistStyleQueueDependency,parentState),childState.stylesheets.forEach(hoistStylesheetDependency,parentState),childState.suspenseyImages&&(parentState.suspenseyImages=!0)}function hasSuspenseyContent(hoistableState){return 0<hoistableState.stylesheets.size||hoistableState.suspenseyImages}var bind=Function.prototype.bind,REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference");function getComponentNameFromType(type){if(type==null)return null;if(typeof type==="function")return type.$$typeof===REACT_CLIENT_REFERENCE?null:type.displayName||type.name||null;if(typeof type==="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList";case REACT_ACTIVITY_TYPE:return"Activity"}if(typeof type==="object")switch(typeof type.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),type.$$typeof){case REACT_PORTAL_TYPE:return"Portal";case REACT_CONTEXT_TYPE:return type.displayName||"Context";case REACT_CONSUMER_TYPE:return(type._context.displayName||"Context")+".Consumer";case REACT_FORWARD_REF_TYPE:var innerType=type.render;return type=type.displayName,type||(type=innerType.displayName||innerType.name||"",type=type!==""?"ForwardRef("+type+")":"ForwardRef"),type;case REACT_MEMO_TYPE:return innerType=type.displayName||null,innerType!==null?innerType:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:innerType=type._payload,type=type._init;try{return getComponentNameFromType(type(innerType))}catch(x){}}return null}var emptyContextObject={};Object.freeze(emptyContextObject);var rendererSigil;rendererSigil={};var currentActiveSnapshot=null;function popToNearestCommonAncestor(prev,next){if(prev!==next){prev.context._currentValue=prev.parentValue,prev=prev.parent;var parentNext=next.parent;if(prev===null){if(parentNext!==null)throw Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(parentNext===null)throw Error("The stacks must reach the root at the same time. This is a bug in React.");popToNearestCommonAncestor(prev,parentNext)}next.context._currentValue=next.value}}function popAllPrevious(prev){prev.context._currentValue=prev.parentValue,prev=prev.parent,prev!==null&&popAllPrevious(prev)}function pushAllNext(next){var parentNext=next.parent;parentNext!==null&&pushAllNext(parentNext),next.context._currentValue=next.value}function popPreviousToCommonLevel(prev,next){if(prev.context._currentValue=prev.parentValue,prev=prev.parent,prev===null)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");prev.depth===next.depth?popToNearestCommonAncestor(prev,next):popPreviousToCommonLevel(prev,next)}function popNextToCommonLevel(prev,next){var parentNext=next.parent;if(parentNext===null)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");prev.depth===parentNext.depth?popToNearestCommonAncestor(prev,parentNext):popNextToCommonLevel(prev,parentNext),next.context._currentValue=next.value}function switchContext(newSnapshot){var prev=currentActiveSnapshot;prev!==newSnapshot&&(prev===null?pushAllNext(newSnapshot):newSnapshot===null?popAllPrevious(prev):prev.depth===newSnapshot.depth?popToNearestCommonAncestor(prev,newSnapshot):prev.depth>newSnapshot.depth?popPreviousToCommonLevel(prev,newSnapshot):popNextToCommonLevel(prev,newSnapshot),currentActiveSnapshot=newSnapshot)}var didWarnAboutNoopUpdateForComponent={},didWarnAboutDeprecatedWillMount={},didWarnAboutUninitializedState,didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate,didWarnAboutLegacyLifecyclesAndDerivedState,didWarnAboutUndefinedDerivedState,didWarnAboutDirectlyAssigningPropsToState,didWarnAboutContextTypes$1,didWarnAboutChildContextTypes,didWarnAboutInvalidateContextType,didWarnOnInvalidCallback;didWarnAboutUninitializedState=new Set;didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate=new Set;didWarnAboutLegacyLifecyclesAndDerivedState=new Set;didWarnAboutDirectlyAssigningPropsToState=new Set;didWarnAboutUndefinedDerivedState=new Set;didWarnAboutContextTypes$1=new Set;didWarnAboutChildContextTypes=new Set;didWarnAboutInvalidateContextType=new Set;didWarnOnInvalidCallback=new Set;function warnOnInvalidCallback(callback){if(callback!==null&&typeof callback!=="function"){var key=String(callback);didWarnOnInvalidCallback.has(key)||(didWarnOnInvalidCallback.add(key),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",callback))}}function warnNoop(publicInstance,callerName){publicInstance=(publicInstance=publicInstance.constructor)&&getComponentNameFromType(publicInstance)||"ReactClass";var warningKey=publicInstance+"."+callerName;didWarnAboutNoopUpdateForComponent[warningKey]||(console.error(`Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.
|
|
304
|
-
|
|
305
|
-
Please check the code for the %s component.`,callerName,publicInstance),didWarnAboutNoopUpdateForComponent[warningKey]=!0)}var classComponentUpdater={enqueueSetState:function(inst,payload,callback){var internals=inst._reactInternals;internals.queue===null?warnNoop(inst,"setState"):(internals.queue.push(payload),callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback))},enqueueReplaceState:function(inst,payload,callback){inst=inst._reactInternals,inst.replace=!0,inst.queue=[payload],callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)},enqueueForceUpdate:function(inst,callback){inst._reactInternals.queue===null?warnNoop(inst,"forceUpdate"):callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)}},emptyTreeContext={id:1,overflow:""};function pushTreeContext(baseContext,totalChildren,index){var baseIdWithLeadingBit=baseContext.id;baseContext=baseContext.overflow;var baseLength=32-clz32(baseIdWithLeadingBit)-1;baseIdWithLeadingBit&=~(1<<baseLength),index+=1;var length=32-clz32(totalChildren)+baseLength;if(30<length){var numberOfOverflowBits=baseLength-baseLength%5;return length=(baseIdWithLeadingBit&(1<<numberOfOverflowBits)-1).toString(32),baseIdWithLeadingBit>>=numberOfOverflowBits,baseLength-=numberOfOverflowBits,{id:1<<32-clz32(totalChildren)+baseLength|index<<baseLength|baseIdWithLeadingBit,overflow:length+baseContext}}return{id:1<<length|index<<baseLength|baseIdWithLeadingBit,overflow:baseContext}}var clz32=Math.clz32?Math.clz32:clz32Fallback,{log,LN2}=Math;function clz32Fallback(x){return x>>>=0,x===0?32:31-(log(x)/LN2|0)|0}function noop(){}var SuspenseException=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.");function trackUsedThenable(thenableState,thenable,index){switch(index=thenableState[index],index===void 0?thenableState.push(thenable):index!==thenable&&(thenable.then(noop,noop),thenable=index),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason;default:switch(typeof thenable.status==="string"?thenable.then(noop,noop):(thenableState=thenable,thenableState.status="pending",thenableState.then(function(fulfilledValue){if(thenable.status==="pending"){var fulfilledThenable=thenable;fulfilledThenable.status="fulfilled",fulfilledThenable.value=fulfilledValue}},function(error){if(thenable.status==="pending"){var rejectedThenable=thenable;rejectedThenable.status="rejected",rejectedThenable.reason=error}})),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason}throw suspendedThenable=thenable,SuspenseException}}var suspendedThenable=null;function getSuspendedThenable(){if(suspendedThenable===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var thenable=suspendedThenable;return suspendedThenable=null,thenable}function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y}var objectIs=typeof Object.is==="function"?Object.is:is,currentlyRenderingComponent=null,currentlyRenderingTask=null,currentlyRenderingRequest=null,currentlyRenderingKeyPath=null,firstWorkInProgressHook=null,workInProgressHook=null,isReRender=!1,didScheduleRenderPhaseUpdate=!1,localIdCounter=0,actionStateCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,thenableState=null,renderPhaseUpdates=null,numberOfReRenders=0,isInHookUserCodeInDev=!1,currentHookNameInDev;function resolveCurrentlyRenderingComponent(){if(currentlyRenderingComponent===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
306
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
307
|
-
2. You might be breaking the Rules of Hooks
|
|
308
|
-
3. You might have more than one copy of React in the same app
|
|
309
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);return isInHookUserCodeInDev&&console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"),currentlyRenderingComponent}function createHook(){if(0<numberOfReRenders)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function createWorkInProgressHook(){return workInProgressHook===null?firstWorkInProgressHook===null?(isReRender=!1,firstWorkInProgressHook=workInProgressHook=createHook()):(isReRender=!0,workInProgressHook=firstWorkInProgressHook):workInProgressHook.next===null?(isReRender=!1,workInProgressHook=workInProgressHook.next=createHook()):(isReRender=!0,workInProgressHook=workInProgressHook.next),workInProgressHook}function getThenableStateAfterSuspending(){var state=thenableState;return thenableState=null,state}function resetHooksState(){isInHookUserCodeInDev=!1,currentlyRenderingKeyPath=currentlyRenderingRequest=currentlyRenderingTask=currentlyRenderingComponent=null,didScheduleRenderPhaseUpdate=!1,firstWorkInProgressHook=null,numberOfReRenders=0,workInProgressHook=renderPhaseUpdates=null}function readContext(context){return isInHookUserCodeInDev&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),context._currentValue}function basicStateReducer(state,action){return typeof action==="function"?action(state):action}function useReducer(reducer,initialArg,init){if(reducer!==basicStateReducer&&(currentHookNameInDev="useReducer"),currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook(),isReRender){if(init=workInProgressHook.queue,initialArg=init.dispatch,renderPhaseUpdates!==null){var firstRenderPhaseUpdate=renderPhaseUpdates.get(init);if(firstRenderPhaseUpdate!==void 0){renderPhaseUpdates.delete(init),init=workInProgressHook.memoizedState;do{var action=firstRenderPhaseUpdate.action;isInHookUserCodeInDev=!0,init=reducer(init,action),isInHookUserCodeInDev=!1,firstRenderPhaseUpdate=firstRenderPhaseUpdate.next}while(firstRenderPhaseUpdate!==null);return workInProgressHook.memoizedState=init,[init,initialArg]}}return[workInProgressHook.memoizedState,initialArg]}return isInHookUserCodeInDev=!0,reducer=reducer===basicStateReducer?typeof initialArg==="function"?initialArg():initialArg:init!==void 0?init(initialArg):initialArg,isInHookUserCodeInDev=!1,workInProgressHook.memoizedState=reducer,reducer=workInProgressHook.queue={last:null,dispatch:null},reducer=reducer.dispatch=dispatchAction.bind(null,currentlyRenderingComponent,reducer),[workInProgressHook.memoizedState,reducer]}function useMemo(nextCreate,deps){if(currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook(),deps=deps===void 0?null:deps,workInProgressHook!==null){var prevState=workInProgressHook.memoizedState;if(prevState!==null&&deps!==null){a:{var JSCompiler_inline_result=prevState[1];if(JSCompiler_inline_result===null)console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",currentHookNameInDev),JSCompiler_inline_result=!1;else{deps.length!==JSCompiler_inline_result.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
310
|
-
|
|
311
|
-
Previous: %s
|
|
312
|
-
Incoming: %s`,currentHookNameInDev,"["+deps.join(", ")+"]","["+JSCompiler_inline_result.join(", ")+"]");for(var i=0;i<JSCompiler_inline_result.length&&i<deps.length;i++)if(!objectIs(deps[i],JSCompiler_inline_result[i])){JSCompiler_inline_result=!1;break a}JSCompiler_inline_result=!0}}if(JSCompiler_inline_result)return prevState[0]}}return isInHookUserCodeInDev=!0,nextCreate=nextCreate(),isInHookUserCodeInDev=!1,workInProgressHook.memoizedState=[nextCreate,deps],nextCreate}function dispatchAction(componentIdentity,queue,action){if(25<=numberOfReRenders)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(componentIdentity===currentlyRenderingComponent)if(didScheduleRenderPhaseUpdate=!0,componentIdentity={action,next:null},renderPhaseUpdates===null&&(renderPhaseUpdates=new Map),action=renderPhaseUpdates.get(queue),action===void 0)renderPhaseUpdates.set(queue,componentIdentity);else{for(queue=action;queue.next!==null;)queue=queue.next;queue.next=componentIdentity}}function throwOnUseEffectEventCall(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}function unsupportedStartTransition(){throw Error("startTransition cannot be called during server rendering.")}function unsupportedSetOptimisticState(){throw Error("Cannot update optimistic state while rendering.")}function useActionState(action,initialState,permalink){resolveCurrentlyRenderingComponent();var actionStateHookIndex=actionStateCounter++,request=currentlyRenderingRequest;if(typeof action.$$FORM_ACTION==="function"){var nextPostbackStateKey=null,componentKeyPath=currentlyRenderingKeyPath;request=request.formState;var isSignatureEqual=action.$$IS_SIGNATURE_EQUAL;if(request!==null&&typeof isSignatureEqual==="function"){var postbackKey=request[1];isSignatureEqual.call(action,request[2],request[3])&&(nextPostbackStateKey=permalink!==void 0?"p"+permalink:"k"+Bun.hash(JSON.stringify([componentKeyPath,null,actionStateHookIndex])),postbackKey===nextPostbackStateKey&&(actionStateMatchingIndex=actionStateHookIndex,initialState=request[0]))}var boundAction=action.bind(null,initialState);return action=function(payload){boundAction(payload)},typeof boundAction.$$FORM_ACTION==="function"&&(action.$$FORM_ACTION=function(prefix){prefix=boundAction.$$FORM_ACTION(prefix),permalink!==void 0&&(checkAttributeStringCoercion(permalink,"target"),permalink+="",prefix.action=permalink);var formData=prefix.data;return formData&&(nextPostbackStateKey===null&&(nextPostbackStateKey=permalink!==void 0?"p"+permalink:"k"+Bun.hash(JSON.stringify([componentKeyPath,null,actionStateHookIndex]))),formData.append("$ACTION_KEY",nextPostbackStateKey)),prefix}),[initialState,action,!1]}var _boundAction=action.bind(null,initialState);return[initialState,function(payload){_boundAction(payload)},!1]}function unwrapThenable(thenable){var index=thenableIndexCounter;return thenableIndexCounter+=1,thenableState===null&&(thenableState=[]),trackUsedThenable(thenableState,thenable,index)}function unsupportedRefresh(){throw Error("Cache cannot be refreshed during server rendering.")}var HooksDispatcher={readContext,use:function(usable){if(usable!==null&&typeof usable==="object"){if(typeof usable.then==="function")return unwrapThenable(usable);if(usable.$$typeof===REACT_CONTEXT_TYPE)return readContext(usable)}throw Error("An unsupported type was passed to use(): "+String(usable))},useContext:function(context){return currentHookNameInDev="useContext",resolveCurrentlyRenderingComponent(),context._currentValue},useMemo,useReducer,useRef:function(initialValue){currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook();var previousRef=workInProgressHook.memoizedState;return previousRef===null?(initialValue={current:initialValue},Object.seal(initialValue),workInProgressHook.memoizedState=initialValue):previousRef},useState:function(initialState){return currentHookNameInDev="useState",useReducer(basicStateReducer,initialState)},useInsertionEffect:noop,useLayoutEffect:noop,useCallback:function(callback,deps){return useMemo(function(){return callback},deps)},useImperativeHandle:noop,useEffect:noop,useDebugValue:noop,useDeferredValue:function(value,initialValue){return resolveCurrentlyRenderingComponent(),initialValue!==void 0?initialValue:value},useTransition:function(){return resolveCurrentlyRenderingComponent(),[!1,unsupportedStartTransition]},useId:function(){var treeId=currentlyRenderingTask.treeContext,overflow=treeId.overflow;treeId=treeId.id,treeId=(treeId&~(1<<32-clz32(treeId)-1)).toString(32)+overflow;var resumableState=currentResumableState;if(resumableState===null)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");return overflow=localIdCounter++,treeId="_"+resumableState.idPrefix+"R_"+treeId,0<overflow&&(treeId+="H"+overflow.toString(32)),treeId+"_"},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){if(getServerSnapshot===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return getServerSnapshot()},useOptimistic:function(passthrough){return resolveCurrentlyRenderingComponent(),[passthrough,unsupportedSetOptimisticState]},useActionState,useFormState:useActionState,useHostTransitionStatus:function(){return resolveCurrentlyRenderingComponent(),NotPending},useMemoCache:function(size){for(var data=Array(size),i=0;i<size;i++)data[i]=REACT_MEMO_CACHE_SENTINEL;return data},useCacheRefresh:function(){return unsupportedRefresh},useEffectEvent:function(){return throwOnUseEffectEventCall}},currentResumableState=null,currentTaskInDEV=null,DefaultAsyncDispatcher={getCacheForType:function(){throw Error("Not implemented.")},cacheSignal:function(){throw Error("Not implemented.")},getOwner:function(){return currentTaskInDEV===null?null:currentTaskInDEV.componentStack}},disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;function disabledLog(){}disabledLog.__reactDisabledLog=!0;function disableLogs(){if(disabledDepth===0){prevLog=console.log,prevInfo=console.info,prevWarn=console.warn,prevError=console.error,prevGroup=console.group,prevGroupCollapsed=console.groupCollapsed,prevGroupEnd=console.groupEnd;var props={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:props,log:props,warn:props,error:props,group:props,groupCollapsed:props,groupEnd:props})}disabledDepth++}function reenableLogs(){if(disabledDepth--,disabledDepth===0){var props={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:assign({},props,{value:prevLog}),info:assign({},props,{value:prevInfo}),warn:assign({},props,{value:prevWarn}),error:assign({},props,{value:prevError}),group:assign({},props,{value:prevGroup}),groupCollapsed:assign({},props,{value:prevGroupCollapsed}),groupEnd:assign({},props,{value:prevGroupEnd})})}0>disabledDepth&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function formatOwnerStack(error){var prevPrepareStackTrace=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,error=error.stack,Error.prepareStackTrace=prevPrepareStackTrace,error.startsWith(`Error: react-stack-top-frame
|
|
313
|
-
`)&&(error=error.slice(29)),prevPrepareStackTrace=error.indexOf(`
|
|
314
|
-
`),prevPrepareStackTrace!==-1&&(error=error.slice(prevPrepareStackTrace+1)),prevPrepareStackTrace=error.indexOf("react_stack_bottom_frame"),prevPrepareStackTrace!==-1&&(prevPrepareStackTrace=error.lastIndexOf(`
|
|
315
|
-
`,prevPrepareStackTrace)),prevPrepareStackTrace!==-1)error=error.slice(0,prevPrepareStackTrace);else return"";return error}var prefix,suffix;function describeBuiltInComponentFrame(name){if(prefix===void 0)try{throw Error()}catch(x){var match=x.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||"",suffix=-1<x.stack.indexOf(`
|
|
316
|
-
at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
317
|
-
`+prefix+name+suffix}var reentry=!1,componentFrameCache;componentFrameCache=new(typeof WeakMap==="function"?WeakMap:Map);function describeNativeComponentFrame(fn,construct){if(!fn||reentry)return"";var frame=componentFrameCache.get(fn);if(frame!==void 0)return frame;reentry=!0,frame=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var previousDispatcher=null;previousDispatcher=ReactSharedInternals.H,ReactSharedInternals.H=null,disableLogs();try{var RunInRootFrame={DetermineComponentFrameRoot:function(){try{if(construct){var Fake=function(){throw Error()};if(Object.defineProperty(Fake.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(Fake,[])}catch(x){var control=x}Reflect.construct(fn,[],Fake)}else{try{Fake.call()}catch(x$0){control=x$0}fn.call(Fake.prototype)}}else{try{throw Error()}catch(x$1){control=x$1}(Fake=fn())&&typeof Fake.catch==="function"&&Fake.catch(function(){})}}catch(sample){if(sample&&control&&typeof sample.stack==="string")return[sample.stack,control.stack]}return[null,null]}};RunInRootFrame.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var namePropDescriptor=Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot,"name");namePropDescriptor&&namePropDescriptor.configurable&&Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _RunInRootFrame$Deter=RunInRootFrame.DetermineComponentFrameRoot(),sampleStack=_RunInRootFrame$Deter[0],controlStack=_RunInRootFrame$Deter[1];if(sampleStack&&controlStack){var sampleLines=sampleStack.split(`
|
|
318
|
-
`),controlLines=controlStack.split(`
|
|
319
|
-
`);for(_RunInRootFrame$Deter=namePropDescriptor=0;namePropDescriptor<sampleLines.length&&!sampleLines[namePropDescriptor].includes("DetermineComponentFrameRoot");)namePropDescriptor++;for(;_RunInRootFrame$Deter<controlLines.length&&!controlLines[_RunInRootFrame$Deter].includes("DetermineComponentFrameRoot");)_RunInRootFrame$Deter++;if(namePropDescriptor===sampleLines.length||_RunInRootFrame$Deter===controlLines.length)for(namePropDescriptor=sampleLines.length-1,_RunInRootFrame$Deter=controlLines.length-1;1<=namePropDescriptor&&0<=_RunInRootFrame$Deter&&sampleLines[namePropDescriptor]!==controlLines[_RunInRootFrame$Deter];)_RunInRootFrame$Deter--;for(;1<=namePropDescriptor&&0<=_RunInRootFrame$Deter;namePropDescriptor--,_RunInRootFrame$Deter--)if(sampleLines[namePropDescriptor]!==controlLines[_RunInRootFrame$Deter]){if(namePropDescriptor!==1||_RunInRootFrame$Deter!==1)do if(namePropDescriptor--,_RunInRootFrame$Deter--,0>_RunInRootFrame$Deter||sampleLines[namePropDescriptor]!==controlLines[_RunInRootFrame$Deter]){var _frame=`
|
|
320
|
-
`+sampleLines[namePropDescriptor].replace(" at new "," at ");return fn.displayName&&_frame.includes("<anonymous>")&&(_frame=_frame.replace("<anonymous>",fn.displayName)),typeof fn==="function"&&componentFrameCache.set(fn,_frame),_frame}while(1<=namePropDescriptor&&0<=_RunInRootFrame$Deter);break}}}finally{reentry=!1,ReactSharedInternals.H=previousDispatcher,reenableLogs(),Error.prepareStackTrace=frame}return sampleLines=(sampleLines=fn?fn.displayName||fn.name:"")?describeBuiltInComponentFrame(sampleLines):"",typeof fn==="function"&&componentFrameCache.set(fn,sampleLines),sampleLines}function describeComponentStackByType(type){if(typeof type==="string")return describeBuiltInComponentFrame(type);if(typeof type==="function")return type.prototype&&type.prototype.isReactComponent?describeNativeComponentFrame(type,!0):describeNativeComponentFrame(type,!1);if(typeof type==="object"&&type!==null){switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:return describeNativeComponentFrame(type.render,!1);case REACT_MEMO_TYPE:return describeNativeComponentFrame(type.type,!1);case REACT_LAZY_TYPE:var lazyComponent=type,payload=lazyComponent._payload;lazyComponent=lazyComponent._init;try{type=lazyComponent(payload)}catch(x){return describeBuiltInComponentFrame("Lazy")}return describeComponentStackByType(type)}if(typeof type.name==="string"){a:{if(payload=type.name,lazyComponent=type.env,type=type.debugLocation,type!=null){type=formatOwnerStack(type);var idx=type.lastIndexOf(`
|
|
321
|
-
`);if(type=idx===-1?type:type.slice(idx+1),type.indexOf(payload)!==-1){payload=`
|
|
322
|
-
`+type;break a}}payload=describeBuiltInComponentFrame(payload+(lazyComponent?" ["+lazyComponent+"]":""))}return payload}}switch(type){case REACT_SUSPENSE_LIST_TYPE:return describeBuiltInComponentFrame("SuspenseList");case REACT_SUSPENSE_TYPE:return describeBuiltInComponentFrame("Suspense")}return""}var callComponent={react_stack_bottom_frame:function(Component,props,secondArg){return Component(props,secondArg)}},callComponentInDEV=callComponent.react_stack_bottom_frame.bind(callComponent),callRender={react_stack_bottom_frame:function(instance){return instance.render()}},callRenderInDEV=callRender.react_stack_bottom_frame.bind(callRender),callLazyInit={react_stack_bottom_frame:function(lazy){var init=lazy._init;return init(lazy._payload)}},callLazyInitInDEV=callLazyInit.react_stack_bottom_frame.bind(callLazyInit),lastResetTime=0,getCurrentTime;if(typeof performance==="object"&&typeof performance.now==="function")localPerformance=performance,getCurrentTime=function(){return localPerformance.now()};else localDate=Date,getCurrentTime=function(){return localDate.now()};var localPerformance,localDate,CLIENT_RENDERED=4,PENDING=0,COMPLETED=1,FLUSHED=2,ABORTED=3,ERRORED=4,POSTPONED=5,CLOSED=14;function isEligibleForOutlining(request,boundary){return(500<boundary.byteSize||hasSuspenseyContent(boundary.contentState))&&boundary.contentPreamble===null}function defaultErrorHandler(error){if(typeof error==="object"&&error!==null&&typeof error.environmentName==="string"){var JSCompiler_inline_result=error.environmentName;error=[error].slice(0),typeof error[0]==="string"?error.splice(0,1,"%c%s%c "+error[0],"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px"," "+JSCompiler_inline_result+" ",""):error.splice(0,0,"%c%s%c","background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px"," "+JSCompiler_inline_result+" ",""),error.unshift(console),JSCompiler_inline_result=bind.apply(console.error,error),JSCompiler_inline_result()}else console.error(error);return null}function RequestInstance(resumableState,renderState,rootFormatContext,progressiveChunkSize,onError,onAllReady,onShellReady,onShellError,onFatalError,onPostpone,formState){var abortSet=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=resumableState,this.renderState=renderState,this.rootFormatContext=rootFormatContext,this.progressiveChunkSize=progressiveChunkSize===void 0?12800:progressiveChunkSize,this.status=10,this.fatalError=null,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=abortSet,this.pingedTasks=[],this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.trackedPostpones=null,this.onError=onError===void 0?defaultErrorHandler:onError,this.onPostpone=onPostpone===void 0?noop:onPostpone,this.onAllReady=onAllReady===void 0?noop:onAllReady,this.onShellReady=onShellReady===void 0?noop:onShellReady,this.onShellError=onShellError===void 0?noop:onShellError,this.onFatalError=onFatalError===void 0?noop:onFatalError,this.formState=formState===void 0?null:formState,this.didWarnForKey=null}function createRequest(children,resumableState,renderState,rootFormatContext,progressiveChunkSize,onError,onAllReady,onShellReady,onShellError,onFatalError,onPostpone,formState){var now=getCurrentTime();return 1000<now-lastResetTime&&(ReactSharedInternals.recentlyCreatedOwnerStacks=0,lastResetTime=now),resumableState=new RequestInstance(resumableState,renderState,rootFormatContext,progressiveChunkSize,onError,onAllReady,onShellReady,onShellError,onFatalError,onPostpone,formState),renderState=createPendingSegment(resumableState,0,null,rootFormatContext,!1,!1),renderState.parentFlushed=!0,children=createRenderTask(resumableState,null,children,-1,null,renderState,null,null,resumableState.abortableTasks,null,rootFormatContext,null,emptyTreeContext,null,null,emptyContextObject,null),pushComponentStack(children),resumableState.pingedTasks.push(children),resumableState}var currentRequest=null;function pingTask(request,task){request.pingedTasks.push(task),request.pingedTasks.length===1&&(request.flushScheduled=request.destination!==null,request.trackedPostpones!==null||request.status===10?scheduleMicrotask(function(){return performWork(request)}):setTimeout(function(){return performWork(request)},0))}function createSuspenseBoundary(request,row,fallbackAbortableTasks,contentPreamble,fallbackPreamble){return fallbackAbortableTasks={status:PENDING,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row,completedSegments:[],byteSize:0,fallbackAbortableTasks,errorDigest:null,contentState:createHoistableState(),fallbackState:createHoistableState(),contentPreamble,fallbackPreamble,trackedContentKeyPath:null,trackedFallbackNode:null,errorMessage:null,errorStack:null,errorComponentStack:null},row!==null&&(row.pendingTasks++,contentPreamble=row.boundaries,contentPreamble!==null&&(request.allPendingTasks++,fallbackAbortableTasks.pendingTasks++,contentPreamble.push(fallbackAbortableTasks)),request=row.inheritedHoistables,request!==null&&hoistHoistables(fallbackAbortableTasks.contentState,request)),fallbackAbortableTasks}function createRenderTask(request,thenableState,node,childIndex,blockedBoundary,blockedSegment,blockedPreamble,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,legacyContext,debugTask){request.allPendingTasks++,blockedBoundary===null?request.pendingRootTasks++:blockedBoundary.pendingTasks++,row!==null&&row.pendingTasks++;var task={replay:null,node,childIndex,ping:function(){return pingTask(request,task)},blockedBoundary,blockedSegment,blockedPreamble,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,thenableState};return task.debugTask=debugTask,abortSet.add(task),task}function createReplayTask(request,thenableState,replay,node,childIndex,blockedBoundary,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,legacyContext,debugTask){request.allPendingTasks++,blockedBoundary===null?request.pendingRootTasks++:blockedBoundary.pendingTasks++,row!==null&&row.pendingTasks++,replay.pendingTasks++;var task={replay,node,childIndex,ping:function(){return pingTask(request,task)},blockedBoundary,blockedSegment:null,blockedPreamble:null,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,thenableState};return task.debugTask=debugTask,abortSet.add(task),task}function createPendingSegment(request,index,boundary,parentFormatContext,lastPushedText,textEmbedded){return{status:PENDING,parentFlushed:!1,id:-1,index,chunks:[],children:[],preambleChildren:[],parentFormatContext,boundary,lastPushedText,textEmbedded}}function getCurrentStackInDEV(){if(currentTaskInDEV===null||currentTaskInDEV.componentStack===null)return"";var componentStack=currentTaskInDEV.componentStack;try{var info="";if(typeof componentStack.type==="string")info+=describeBuiltInComponentFrame(componentStack.type);else if(typeof componentStack.type==="function"){if(!componentStack.owner){var JSCompiler_temp_const=info,fn=componentStack.type,name=fn?fn.displayName||fn.name:"",JSCompiler_inline_result=name?describeBuiltInComponentFrame(name):"";info=JSCompiler_temp_const+JSCompiler_inline_result}}else componentStack.owner||(info+=describeComponentStackByType(componentStack.type));for(;componentStack;)JSCompiler_temp_const=null,componentStack.debugStack!=null?JSCompiler_temp_const=formatOwnerStack(componentStack.debugStack):(JSCompiler_inline_result=componentStack,JSCompiler_inline_result.stack!=null&&(JSCompiler_temp_const=typeof JSCompiler_inline_result.stack!=="string"?JSCompiler_inline_result.stack=formatOwnerStack(JSCompiler_inline_result.stack):JSCompiler_inline_result.stack)),(componentStack=componentStack.owner)&&JSCompiler_temp_const&&(info+=`
|
|
323
|
-
`+JSCompiler_temp_const);var JSCompiler_inline_result$jscomp$0=info}catch(x){JSCompiler_inline_result$jscomp$0=`
|
|
324
|
-
Error generating stack: `+x.message+`
|
|
325
|
-
`+x.stack}return JSCompiler_inline_result$jscomp$0}function pushHaltedAwaitOnComponentStack(task,debugInfo){if(debugInfo!=null)for(var i=debugInfo.length-1;0<=i;i--){var info=debugInfo[i];if(typeof info.name==="string")break;if(typeof info.time==="number")break;if(info.awaited!=null){var bestStack=info.debugStack==null?info.awaited:info;if(bestStack.debugStack!==void 0){task.componentStack={parent:task.componentStack,type:info,owner:bestStack.owner,stack:bestStack.debugStack},task.debugTask=bestStack.debugTask;break}}}}function pushServerComponentStack(task,debugInfo){if(debugInfo!=null)for(var i=0;i<debugInfo.length;i++){var componentInfo=debugInfo[i];typeof componentInfo.name==="string"&&componentInfo.debugStack!==void 0&&(task.componentStack={parent:task.componentStack,type:componentInfo,owner:componentInfo.owner,stack:componentInfo.debugStack},task.debugTask=componentInfo.debugTask)}}function pushComponentStack(task){var node=task.node;if(typeof node==="object"&&node!==null)switch(node.$$typeof){case REACT_ELEMENT_TYPE:var{type,_owner:owner,_debugStack:stack}=node;pushServerComponentStack(task,node._debugInfo),task.debugTask=node._debugTask,task.componentStack={parent:task.componentStack,type,owner,stack};break;case REACT_LAZY_TYPE:pushServerComponentStack(task,node._debugInfo);break;default:typeof node.then==="function"&&pushServerComponentStack(task,node._debugInfo)}}function replaceSuspenseComponentStackWithSuspenseFallbackStack(componentStack){return componentStack===null?null:{parent:componentStack.parent,type:"Suspense Fallback",owner:componentStack.owner,stack:componentStack.stack}}function getThrownInfo(node$jscomp$0){var errorInfo={};return node$jscomp$0&&Object.defineProperty(errorInfo,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var info="",node=node$jscomp$0;do info+=describeComponentStackByType(node.type),node=node.parent;while(node);var stack=info}catch(x){stack=`
|
|
326
|
-
Error generating stack: `+x.message+`
|
|
327
|
-
`+x.stack}return Object.defineProperty(errorInfo,"componentStack",{value:stack}),stack}}),errorInfo}function encodeErrorForBoundary(boundary,digest,error,thrownInfo,wasAborted){boundary.errorDigest=digest,error instanceof Error?(digest=String(error.message),error=String(error.stack)):(digest=typeof error==="object"&&error!==null?describeObjectForErrorMessage(error):String(error),error=null),wasAborted=wasAborted?`Switched to client rendering because the server rendering aborted due to:
|
|
328
|
-
|
|
329
|
-
`:`Switched to client rendering because the server rendering errored:
|
|
330
|
-
|
|
331
|
-
`,boundary.errorMessage=wasAborted+digest,boundary.errorStack=error!==null?wasAborted+error:null,boundary.errorComponentStack=thrownInfo.componentStack}function logRecoverableError(request,error,errorInfo,debugTask){if(request=request.onError,error=debugTask?debugTask.run(request.bind(null,error,errorInfo)):request(error,errorInfo),error!=null&&typeof error!=="string")console.error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',typeof error);else return error}function fatalError(request,error,errorInfo,debugTask){errorInfo=request.onShellError;var onFatalError=request.onFatalError;debugTask?(debugTask.run(errorInfo.bind(null,error)),debugTask.run(onFatalError.bind(null,error))):(errorInfo(error),onFatalError(error)),request.destination!==null?(request.status=CLOSED,closeWithError(request.destination,error)):(request.status=13,request.fatalError=error)}function finishSuspenseListRow(request,row){unblockSuspenseListRow(request,row.next,row.hoistables)}function unblockSuspenseListRow(request,unblockedRow,inheritedHoistables){for(;unblockedRow!==null;){inheritedHoistables!==null&&(hoistHoistables(unblockedRow.hoistables,inheritedHoistables),unblockedRow.inheritedHoistables=inheritedHoistables);var unblockedBoundaries=unblockedRow.boundaries;if(unblockedBoundaries!==null){unblockedRow.boundaries=null;for(var i=0;i<unblockedBoundaries.length;i++){var unblockedBoundary=unblockedBoundaries[i];inheritedHoistables!==null&&hoistHoistables(unblockedBoundary.contentState,inheritedHoistables),finishedTask(request,unblockedBoundary,null,null)}}if(unblockedRow.pendingTasks--,0<unblockedRow.pendingTasks)break;inheritedHoistables=unblockedRow.hoistables,unblockedRow=unblockedRow.next}}function tryToResolveTogetherRow(request,togetherRow){var boundaries=togetherRow.boundaries;if(boundaries!==null&&togetherRow.pendingTasks===boundaries.length){for(var allCompleteAndInlinable=!0,i=0;i<boundaries.length;i++){var rowBoundary=boundaries[i];if(rowBoundary.pendingTasks!==1||rowBoundary.parentFlushed||isEligibleForOutlining(request,rowBoundary)){allCompleteAndInlinable=!1;break}}allCompleteAndInlinable&&unblockSuspenseListRow(request,togetherRow,togetherRow.hoistables)}}function createSuspenseListRow(previousRow){var newRow={pendingTasks:1,boundaries:null,hoistables:createHoistableState(),inheritedHoistables:null,together:!1,next:null};return previousRow!==null&&0<previousRow.pendingTasks&&(newRow.pendingTasks++,newRow.boundaries=[],previousRow.next=newRow),newRow}function renderSuspenseListRows(request,task,keyPath,rows,revealOrder){var{keyPath:prevKeyPath,treeContext:prevTreeContext,row:prevRow,componentStack:previousComponentStack,debugTask:previousDebugTask}=task;pushServerComponentStack(task,task.node.props.children._debugInfo),task.keyPath=keyPath,keyPath=rows.length;var previousSuspenseListRow=null;if(task.replay!==null){var resumeSlots=task.replay.slots;if(resumeSlots!==null&&typeof resumeSlots==="object")for(var n=0;n<keyPath;n++){var i=revealOrder!=="backwards"&&revealOrder!=="unstable_legacy-backwards"?n:keyPath-1-n,node=rows[i];task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,i);var resumeSegmentID=resumeSlots[i];typeof resumeSegmentID==="number"?(resumeNode(request,task,resumeSegmentID,node,i),delete resumeSlots[i]):renderNode(request,task,node,i),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow)}else for(resumeSlots=0;resumeSlots<keyPath;resumeSlots++)n=revealOrder!=="backwards"&&revealOrder!=="unstable_legacy-backwards"?resumeSlots:keyPath-1-resumeSlots,i=rows[n],warnForMissingKey(request,task,i),task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,n),renderNode(request,task,i,n),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow)}else if(revealOrder!=="backwards"&&revealOrder!=="unstable_legacy-backwards")for(revealOrder=0;revealOrder<keyPath;revealOrder++)resumeSlots=rows[revealOrder],warnForMissingKey(request,task,resumeSlots),task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,revealOrder),renderNode(request,task,resumeSlots,revealOrder),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow);else{revealOrder=task.blockedSegment,resumeSlots=revealOrder.children.length,n=revealOrder.chunks.length;for(i=keyPath-1;0<=i;i--){node=rows[i],task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,i),resumeSegmentID=createPendingSegment(request,n,null,task.formatContext,i===0?revealOrder.lastPushedText:!0,!0),revealOrder.children.splice(resumeSlots,0,resumeSegmentID),task.blockedSegment=resumeSegmentID,warnForMissingKey(request,task,node);try{renderNode(request,task,node,i),pushSegmentFinale(resumeSegmentID.chunks,request.renderState,resumeSegmentID.lastPushedText,resumeSegmentID.textEmbedded),resumeSegmentID.status=COMPLETED,finishedSegment(request,task.blockedBoundary,resumeSegmentID),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow)}catch(thrownValue){throw resumeSegmentID.status=request.status===12?ABORTED:ERRORED,thrownValue}}task.blockedSegment=revealOrder,revealOrder.lastPushedText=!1}prevRow!==null&&previousSuspenseListRow!==null&&0<previousSuspenseListRow.pendingTasks&&(prevRow.pendingTasks++,previousSuspenseListRow.next=prevRow),task.treeContext=prevTreeContext,task.row=prevRow,task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask}function renderWithHooks(request,task,keyPath,Component,props,secondArg){var prevThenableState=task.thenableState;task.thenableState=null,currentlyRenderingComponent={},currentlyRenderingTask=task,currentlyRenderingRequest=request,currentlyRenderingKeyPath=keyPath,isInHookUserCodeInDev=!1,actionStateCounter=localIdCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,thenableState=prevThenableState;for(request=callComponentInDEV(Component,props,secondArg);didScheduleRenderPhaseUpdate;)didScheduleRenderPhaseUpdate=!1,actionStateCounter=localIdCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,numberOfReRenders+=1,workInProgressHook=null,request=Component(props,secondArg);return resetHooksState(),request}var didWarnAboutBadClass={},didWarnAboutContextTypes={},didWarnAboutContextTypeOnFunctionComponent={},didWarnAboutGetDerivedStateOnFunctionComponent={},didWarnAboutReassigningProps=!1,didWarnAboutGenerators=!1,didWarnAboutMaps=!1;function finishFunctionComponent(request,task,keyPath,children,hasId,actionStateCount,actionStateMatchingIndex){var didEmitActionStateMarkers=!1;if(actionStateCount!==0&&request.formState!==null){var segment=task.blockedSegment;if(segment!==null){didEmitActionStateMarkers=!0,segment=segment.chunks;for(var i=0;i<actionStateCount;i++)i===actionStateMatchingIndex?segment.push("<!--F!-->"):segment.push("<!--F-->")}}actionStateCount=task.keyPath,task.keyPath=keyPath,hasId?(keyPath=task.treeContext,task.treeContext=pushTreeContext(keyPath,1,0),renderNode(request,task,children,-1),task.treeContext=keyPath):didEmitActionStateMarkers?renderNode(request,task,children,-1):renderNodeDestructive(request,task,children,-1),task.keyPath=actionStateCount}function renderElement(request,task,keyPath,type,props,ref){if(typeof type==="function")if(type.prototype&&type.prototype.isReactComponent){var newProps=props;if("ref"in props){newProps={};for(var propName in props)propName!=="ref"&&(newProps[propName]=props[propName])}var defaultProps=type.defaultProps;if(defaultProps){newProps===props&&(newProps=assign({},newProps,props));for(var _propName in defaultProps)newProps[_propName]===void 0&&(newProps[_propName]=defaultProps[_propName])}var resolvedProps=newProps,context=emptyContextObject,contextType=type.contextType;if("contextType"in type&&contextType!==null&&(contextType===void 0||contextType.$$typeof!==REACT_CONTEXT_TYPE)&&!didWarnAboutInvalidateContextType.has(type)){didWarnAboutInvalidateContextType.add(type);var addendum=contextType===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof contextType!=="object"?" However, it is set to a "+typeof contextType+".":contextType.$$typeof===REACT_CONSUMER_TYPE?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(contextType).join(", ")+"}.";console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",getComponentNameFromType(type)||"Component",addendum)}typeof contextType==="object"&&contextType!==null&&(context=contextType._currentValue);var instance=new type(resolvedProps,context);if(typeof type.getDerivedStateFromProps==="function"&&(instance.state===null||instance.state===void 0)){var componentName=getComponentNameFromType(type)||"Component";didWarnAboutUninitializedState.has(componentName)||(didWarnAboutUninitializedState.add(componentName),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",componentName,instance.state===null?"null":"undefined",componentName))}if(typeof type.getDerivedStateFromProps==="function"||typeof instance.getSnapshotBeforeUpdate==="function"){var foundWillMountName=null,foundWillReceivePropsName=null,foundWillUpdateName=null;if(typeof instance.componentWillMount==="function"&&instance.componentWillMount.__suppressDeprecationWarning!==!0?foundWillMountName="componentWillMount":typeof instance.UNSAFE_componentWillMount==="function"&&(foundWillMountName="UNSAFE_componentWillMount"),typeof instance.componentWillReceiveProps==="function"&&instance.componentWillReceiveProps.__suppressDeprecationWarning!==!0?foundWillReceivePropsName="componentWillReceiveProps":typeof instance.UNSAFE_componentWillReceiveProps==="function"&&(foundWillReceivePropsName="UNSAFE_componentWillReceiveProps"),typeof instance.componentWillUpdate==="function"&&instance.componentWillUpdate.__suppressDeprecationWarning!==!0?foundWillUpdateName="componentWillUpdate":typeof instance.UNSAFE_componentWillUpdate==="function"&&(foundWillUpdateName="UNSAFE_componentWillUpdate"),foundWillMountName!==null||foundWillReceivePropsName!==null||foundWillUpdateName!==null){var _componentName=getComponentNameFromType(type)||"Component",newApiName=typeof type.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)||(didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
332
|
-
|
|
333
|
-
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
334
|
-
|
|
335
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
336
|
-
https://react.dev/link/unsafe-component-lifecycles`,_componentName,newApiName,foundWillMountName!==null?`
|
|
337
|
-
`+foundWillMountName:"",foundWillReceivePropsName!==null?`
|
|
338
|
-
`+foundWillReceivePropsName:"",foundWillUpdateName!==null?`
|
|
339
|
-
`+foundWillUpdateName:""))}}var name=getComponentNameFromType(type)||"Component";instance.render||(type.prototype&&typeof type.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",name):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",name)),!instance.getInitialState||instance.getInitialState.isReactClassApproved||instance.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",name),instance.getDefaultProps&&!instance.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",name),instance.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",name),type.childContextTypes&&!didWarnAboutChildContextTypes.has(type)&&(didWarnAboutChildContextTypes.add(type),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",name)),type.contextTypes&&!didWarnAboutContextTypes$1.has(type)&&(didWarnAboutContextTypes$1.add(type),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",name)),typeof instance.componentShouldUpdate==="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",name),type.prototype&&type.prototype.isPureReactComponent&&typeof instance.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",getComponentNameFromType(type)||"A pure component"),typeof instance.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",name),typeof instance.componentDidReceiveProps==="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",name),typeof instance.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",name),typeof instance.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",name);var hasMutatedProps=instance.props!==resolvedProps;instance.props!==void 0&&hasMutatedProps&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",name),instance.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",name,name),typeof instance.getSnapshotBeforeUpdate!=="function"||typeof instance.componentDidUpdate==="function"||didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type)||(didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",getComponentNameFromType(type))),typeof instance.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",name),typeof instance.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",name),typeof type.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",name);var state=instance.state;state&&(typeof state!=="object"||isArrayImpl(state))&&console.error("%s.state: must be set to an object or null",name),typeof instance.getChildContext==="function"&&typeof type.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",name);var initialState=instance.state!==void 0?instance.state:null;instance.updater=classComponentUpdater,instance.props=resolvedProps,instance.state=initialState;var internalInstance={queue:[],replace:!1};instance._reactInternals=internalInstance;var contextType$jscomp$0=type.contextType;if(instance.context=typeof contextType$jscomp$0==="object"&&contextType$jscomp$0!==null?contextType$jscomp$0._currentValue:emptyContextObject,instance.state===resolvedProps){var componentName$jscomp$0=getComponentNameFromType(type)||"Component";didWarnAboutDirectlyAssigningPropsToState.has(componentName$jscomp$0)||(didWarnAboutDirectlyAssigningPropsToState.add(componentName$jscomp$0),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",componentName$jscomp$0))}var getDerivedStateFromProps=type.getDerivedStateFromProps;if(typeof getDerivedStateFromProps==="function"){var partialState=getDerivedStateFromProps(resolvedProps,initialState);if(partialState===void 0){var componentName$jscomp$1=getComponentNameFromType(type)||"Component";didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1)||(didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",componentName$jscomp$1))}var JSCompiler_inline_result=partialState===null||partialState===void 0?initialState:assign({},initialState,partialState);instance.state=JSCompiler_inline_result}if(typeof type.getDerivedStateFromProps!=="function"&&typeof instance.getSnapshotBeforeUpdate!=="function"&&(typeof instance.UNSAFE_componentWillMount==="function"||typeof instance.componentWillMount==="function")){var oldState=instance.state;if(typeof instance.componentWillMount==="function"){if(instance.componentWillMount.__suppressDeprecationWarning!==!0){var componentName$jscomp$2=getComponentNameFromType(type)||"Unknown";didWarnAboutDeprecatedWillMount[componentName$jscomp$2]||(console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
340
|
-
|
|
341
|
-
* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
|
|
342
|
-
|
|
343
|
-
Please update the following components: %s`,componentName$jscomp$2),didWarnAboutDeprecatedWillMount[componentName$jscomp$2]=!0)}instance.componentWillMount()}if(typeof instance.UNSAFE_componentWillMount==="function"&&instance.UNSAFE_componentWillMount(),oldState!==instance.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",getComponentNameFromType(type)||"Component"),classComponentUpdater.enqueueReplaceState(instance,instance.state,null)),internalInstance.queue!==null&&0<internalInstance.queue.length){var{queue:oldQueue,replace:oldReplace}=internalInstance;if(internalInstance.queue=null,internalInstance.replace=!1,oldReplace&&oldQueue.length===1)instance.state=oldQueue[0];else{for(var nextState=oldReplace?oldQueue[0]:instance.state,dontMutate=!0,i=oldReplace?1:0;i<oldQueue.length;i++){var partial=oldQueue[i],partialState$jscomp$0=typeof partial==="function"?partial.call(instance,nextState,resolvedProps,void 0):partial;partialState$jscomp$0!=null&&(dontMutate?(dontMutate=!1,nextState=assign({},nextState,partialState$jscomp$0)):assign(nextState,partialState$jscomp$0))}instance.state=nextState}}else internalInstance.queue=null}var nextChildren=callRenderInDEV(instance);if(request.status===12)throw null;instance.props!==resolvedProps&&(didWarnAboutReassigningProps||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",getComponentNameFromType(type)||"a component"),didWarnAboutReassigningProps=!0);var prevKeyPath=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,nextChildren,-1),task.keyPath=prevKeyPath}else{if(type.prototype&&typeof type.prototype.render==="function"){var componentName$jscomp$3=getComponentNameFromType(type)||"Unknown";didWarnAboutBadClass[componentName$jscomp$3]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",componentName$jscomp$3,componentName$jscomp$3),didWarnAboutBadClass[componentName$jscomp$3]=!0)}var value=renderWithHooks(request,task,keyPath,type,props,void 0);if(request.status===12)throw null;var hasId=localIdCounter!==0,actionStateCount=actionStateCounter,actionStateMatchingIndex$jscomp$0=actionStateMatchingIndex;if(type.contextTypes){var _componentName$jscomp$0=getComponentNameFromType(type)||"Unknown";didWarnAboutContextTypes[_componentName$jscomp$0]||(didWarnAboutContextTypes[_componentName$jscomp$0]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",_componentName$jscomp$0))}if(type&&type.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
344
|
-
%s.childContextTypes = ...`,type.displayName||type.name||"Component"),typeof type.getDerivedStateFromProps==="function"){var componentName$jscomp$4=getComponentNameFromType(type)||"Unknown";didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4]||(console.error("%s: Function components do not support getDerivedStateFromProps.",componentName$jscomp$4),didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4]=!0)}if(typeof type.contextType==="object"&&type.contextType!==null){var _componentName2=getComponentNameFromType(type)||"Unknown";didWarnAboutContextTypeOnFunctionComponent[_componentName2]||(console.error("%s: Function components do not support contextType.",_componentName2),didWarnAboutContextTypeOnFunctionComponent[_componentName2]=!0)}finishFunctionComponent(request,task,keyPath,value,hasId,actionStateCount,actionStateMatchingIndex$jscomp$0)}else if(typeof type==="string"){var segment=task.blockedSegment;if(segment===null){var children=props.children,{formatContext:prevContext,keyPath:prevKeyPath$jscomp$0}=task;task.formatContext=getChildFormatContext(prevContext,type,props),task.keyPath=keyPath,renderNode(request,task,children,-1),task.formatContext=prevContext,task.keyPath=prevKeyPath$jscomp$0}else{var _children=pushStartInstance(segment.chunks,type,props,request.resumableState,request.renderState,task.blockedPreamble,task.hoistableState,task.formatContext,segment.lastPushedText);segment.lastPushedText=!1;var{formatContext:_prevContext2,keyPath:_prevKeyPath3}=task;if(task.keyPath=keyPath,(task.formatContext=getChildFormatContext(_prevContext2,type,props)).insertionMode===HTML_HEAD_MODE){var preambleSegment=createPendingSegment(request,0,null,task.formatContext,!1,!1);segment.preambleChildren.push(preambleSegment),task.blockedSegment=preambleSegment;try{preambleSegment.status=6,renderNode(request,task,_children,-1),pushSegmentFinale(preambleSegment.chunks,request.renderState,preambleSegment.lastPushedText,preambleSegment.textEmbedded),preambleSegment.status=COMPLETED,finishedSegment(request,task.blockedBoundary,preambleSegment)}finally{task.blockedSegment=segment}}else renderNode(request,task,_children,-1);task.formatContext=_prevContext2,task.keyPath=_prevKeyPath3;a:{var target=segment.chunks,resumableState=request.resumableState;switch(type){case"title":case"style":case"script":case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break a;case"body":if(_prevContext2.insertionMode<=HTML_HTML_MODE){resumableState.hasBody=!0;break a}break;case"html":if(_prevContext2.insertionMode===ROOT_HTML_MODE){resumableState.hasHtml=!0;break a}break;case"head":if(_prevContext2.insertionMode<=HTML_HTML_MODE)break a}target.push(endChunkForTag(type))}segment.lastPushedText=!1}}else{switch(type){case REACT_LEGACY_HIDDEN_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_PROFILER_TYPE:case REACT_FRAGMENT_TYPE:var prevKeyPath$jscomp$1=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,props.children,-1),task.keyPath=prevKeyPath$jscomp$1;return;case REACT_ACTIVITY_TYPE:var segment$jscomp$0=task.blockedSegment;if(segment$jscomp$0===null){if(props.mode!=="hidden"){var prevKeyPath$jscomp$2=task.keyPath;task.keyPath=keyPath,renderNode(request,task,props.children,-1),task.keyPath=prevKeyPath$jscomp$2}}else if(props.mode!=="hidden"){segment$jscomp$0.chunks.push("<!--&-->"),segment$jscomp$0.lastPushedText=!1;var _prevKeyPath4=task.keyPath;task.keyPath=keyPath,renderNode(request,task,props.children,-1),task.keyPath=_prevKeyPath4,segment$jscomp$0.chunks.push("<!--/&-->"),segment$jscomp$0.lastPushedText=!1}return;case REACT_SUSPENSE_LIST_TYPE:a:{var{children:children$jscomp$0,revealOrder}=props;if(revealOrder==="forwards"||revealOrder==="backwards"||revealOrder==="unstable_legacy-backwards"){if(isArrayImpl(children$jscomp$0)){renderSuspenseListRows(request,task,keyPath,children$jscomp$0,revealOrder);break a}var iteratorFn=getIteratorFn(children$jscomp$0);if(iteratorFn){var iterator=iteratorFn.call(children$jscomp$0);if(iterator){validateIterable(task,children$jscomp$0,-1,iterator,iteratorFn);var step=iterator.next();if(!step.done){var rows=[];do rows.push(step.value),step=iterator.next();while(!step.done);renderSuspenseListRows(request,task,keyPath,children$jscomp$0,revealOrder)}break a}}}if(revealOrder==="together"){var{keyPath:_prevKeyPath2,row:prevRow}=task,newRow=task.row=createSuspenseListRow(null);newRow.boundaries=[],newRow.together=!0,task.keyPath=keyPath,renderNodeDestructive(request,task,children$jscomp$0,-1),--newRow.pendingTasks===0&&finishSuspenseListRow(request,newRow),task.keyPath=_prevKeyPath2,task.row=prevRow,prevRow!==null&&0<newRow.pendingTasks&&(prevRow.pendingTasks++,newRow.next=prevRow)}else{var prevKeyPath$jscomp$3=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,children$jscomp$0,-1),task.keyPath=prevKeyPath$jscomp$3}}return;case REACT_VIEW_TRANSITION_TYPE:case REACT_SCOPE_TYPE:throw Error("ReactDOMServer does not yet support scope components.");case REACT_SUSPENSE_TYPE:a:if(task.replay!==null){var{keyPath:_prevKeyPath,formatContext:_prevContext,row:_prevRow}=task;task.keyPath=keyPath,task.formatContext=getSuspenseContentFormatContext(request.resumableState,_prevContext),task.row=null;var _content=props.children;try{renderNode(request,task,_content,-1)}finally{task.keyPath=_prevKeyPath,task.formatContext=_prevContext,task.row=_prevRow}}else{var{keyPath:prevKeyPath$jscomp$4,formatContext:prevContext$jscomp$0,row:prevRow$jscomp$0,blockedBoundary:parentBoundary,blockedPreamble:parentPreamble,hoistableState:parentHoistableState,blockedSegment:parentSegment}=task,{fallback,children:content}=props,fallbackAbortSet=new Set,newBoundary=task.formatContext.insertionMode<HTML_MODE?createSuspenseBoundary(request,task.row,fallbackAbortSet,createPreambleState(),createPreambleState()):createSuspenseBoundary(request,task.row,fallbackAbortSet,null,null);request.trackedPostpones!==null&&(newBoundary.trackedContentKeyPath=keyPath);var boundarySegment=createPendingSegment(request,parentSegment.chunks.length,newBoundary,task.formatContext,!1,!1);parentSegment.children.push(boundarySegment),parentSegment.lastPushedText=!1;var contentRootSegment=createPendingSegment(request,0,null,task.formatContext,!1,!1);if(contentRootSegment.parentFlushed=!0,request.trackedPostpones!==null){var suspenseComponentStack=task.componentStack,fallbackKeyPath=[keyPath[0],"Suspense Fallback",keyPath[2]],fallbackReplayNode=[fallbackKeyPath[1],fallbackKeyPath[2],[],null];request.trackedPostpones.workingMap.set(fallbackKeyPath,fallbackReplayNode),newBoundary.trackedFallbackNode=fallbackReplayNode,task.blockedSegment=boundarySegment,task.blockedPreamble=newBoundary.fallbackPreamble,task.keyPath=fallbackKeyPath,task.formatContext=getSuspenseFallbackFormatContext(request.resumableState,prevContext$jscomp$0),task.componentStack=replaceSuspenseComponentStackWithSuspenseFallbackStack(suspenseComponentStack),boundarySegment.status=6;try{renderNode(request,task,fallback,-1),pushSegmentFinale(boundarySegment.chunks,request.renderState,boundarySegment.lastPushedText,boundarySegment.textEmbedded),boundarySegment.status=COMPLETED,finishedSegment(request,parentBoundary,boundarySegment)}catch(thrownValue){throw boundarySegment.status=request.status===12?ABORTED:ERRORED,thrownValue}finally{task.blockedSegment=parentSegment,task.blockedPreamble=parentPreamble,task.keyPath=prevKeyPath$jscomp$4,task.formatContext=prevContext$jscomp$0}var suspendedPrimaryTask=createRenderTask(request,null,content,-1,newBoundary,contentRootSegment,newBoundary.contentPreamble,newBoundary.contentState,task.abortSet,keyPath,getSuspenseContentFormatContext(request.resumableState,task.formatContext),task.context,task.treeContext,null,suspenseComponentStack,emptyContextObject,task.debugTask);pushComponentStack(suspendedPrimaryTask),request.pingedTasks.push(suspendedPrimaryTask)}else{task.blockedBoundary=newBoundary,task.blockedPreamble=newBoundary.contentPreamble,task.hoistableState=newBoundary.contentState,task.blockedSegment=contentRootSegment,task.keyPath=keyPath,task.formatContext=getSuspenseContentFormatContext(request.resumableState,prevContext$jscomp$0),task.row=null,contentRootSegment.status=6;try{if(renderNode(request,task,content,-1),pushSegmentFinale(contentRootSegment.chunks,request.renderState,contentRootSegment.lastPushedText,contentRootSegment.textEmbedded),contentRootSegment.status=COMPLETED,finishedSegment(request,newBoundary,contentRootSegment),queueCompletedSegment(newBoundary,contentRootSegment),newBoundary.pendingTasks===0&&newBoundary.status===PENDING){if(newBoundary.status=COMPLETED,!isEligibleForOutlining(request,newBoundary)){prevRow$jscomp$0!==null&&--prevRow$jscomp$0.pendingTasks===0&&finishSuspenseListRow(request,prevRow$jscomp$0),request.pendingRootTasks===0&&task.blockedPreamble&&preparePreamble(request);break a}}else prevRow$jscomp$0!==null&&prevRow$jscomp$0.together&&tryToResolveTogetherRow(request,prevRow$jscomp$0)}catch(thrownValue$2){if(newBoundary.status=CLIENT_RENDERED,request.status===12){contentRootSegment.status=ABORTED;var error=request.fatalError}else contentRootSegment.status=ERRORED,error=thrownValue$2;var thrownInfo=getThrownInfo(task.componentStack),errorDigest=logRecoverableError(request,error,thrownInfo,task.debugTask);encodeErrorForBoundary(newBoundary,errorDigest,error,thrownInfo,!1),untrackBoundary(request,newBoundary)}finally{task.blockedBoundary=parentBoundary,task.blockedPreamble=parentPreamble,task.hoistableState=parentHoistableState,task.blockedSegment=parentSegment,task.keyPath=prevKeyPath$jscomp$4,task.formatContext=prevContext$jscomp$0,task.row=prevRow$jscomp$0}var suspendedFallbackTask=createRenderTask(request,null,fallback,-1,parentBoundary,boundarySegment,newBoundary.fallbackPreamble,newBoundary.fallbackState,fallbackAbortSet,[keyPath[0],"Suspense Fallback",keyPath[2]],getSuspenseFallbackFormatContext(request.resumableState,task.formatContext),task.context,task.treeContext,task.row,replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack),emptyContextObject,task.debugTask);pushComponentStack(suspendedFallbackTask),request.pingedTasks.push(suspendedFallbackTask)}}return}if(typeof type==="object"&&type!==null)switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:if("ref"in props){var propsWithoutRef={};for(var key in props)key!=="ref"&&(propsWithoutRef[key]=props[key])}else propsWithoutRef=props;var children$jscomp$1=renderWithHooks(request,task,keyPath,type.render,propsWithoutRef,ref);finishFunctionComponent(request,task,keyPath,children$jscomp$1,localIdCounter!==0,actionStateCounter,actionStateMatchingIndex);return;case REACT_MEMO_TYPE:renderElement(request,task,keyPath,type.type,props,ref);return;case REACT_CONTEXT_TYPE:var{value:value$jscomp$0,children:children$jscomp$2}=props,{context:prevSnapshot,keyPath:prevKeyPath$jscomp$5}=task,prevValue=type._currentValue;type._currentValue=value$jscomp$0,type._currentRenderer!==void 0&&type._currentRenderer!==null&&type._currentRenderer!==rendererSigil&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),type._currentRenderer=rendererSigil;var prevNode=currentActiveSnapshot,newNode={parent:prevNode,depth:prevNode===null?0:prevNode.depth+1,context:type,parentValue:prevValue,value:value$jscomp$0};currentActiveSnapshot=newNode,task.context=newNode,task.keyPath=keyPath,renderNodeDestructive(request,task,children$jscomp$2,-1);var prevSnapshot$jscomp$0=currentActiveSnapshot;if(prevSnapshot$jscomp$0===null)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");prevSnapshot$jscomp$0.context!==type&&console.error("The parent context is not the expected context. This is probably a bug in React."),prevSnapshot$jscomp$0.context._currentValue=prevSnapshot$jscomp$0.parentValue,type._currentRenderer!==void 0&&type._currentRenderer!==null&&type._currentRenderer!==rendererSigil&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),type._currentRenderer=rendererSigil;var JSCompiler_inline_result$jscomp$0=currentActiveSnapshot=prevSnapshot$jscomp$0.parent;task.context=JSCompiler_inline_result$jscomp$0,task.keyPath=prevKeyPath$jscomp$5,prevSnapshot!==task.context&&console.error("Popping the context provider did not return back to the original snapshot. This is a bug in React.");return;case REACT_CONSUMER_TYPE:var context$jscomp$0=type._context,render=props.children;typeof render!=="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var newChildren=render(context$jscomp$0._currentValue),prevKeyPath$jscomp$6=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,newChildren,-1),task.keyPath=prevKeyPath$jscomp$6;return;case REACT_LAZY_TYPE:var Component=callLazyInitInDEV(type);if(request.status===12)throw null;renderElement(request,task,keyPath,Component,props,ref);return}var info="";if(type===void 0||typeof type==="object"&&type!==null&&Object.keys(type).length===0)info+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((type==null?type:typeof type)+"."+info))}}function resumeNode(request,task,segmentId,node,childIndex){var{replay:prevReplay,blockedBoundary}=task,resumedSegment=createPendingSegment(request,0,null,task.formatContext,!1,!1);resumedSegment.id=segmentId,resumedSegment.parentFlushed=!0;try{task.replay=null,task.blockedSegment=resumedSegment,renderNode(request,task,node,childIndex),resumedSegment.status=COMPLETED,finishedSegment(request,blockedBoundary,resumedSegment),blockedBoundary===null?request.completedRootSegment=resumedSegment:(queueCompletedSegment(blockedBoundary,resumedSegment),blockedBoundary.parentFlushed&&request.partialBoundaries.push(blockedBoundary))}finally{task.replay=prevReplay,task.blockedSegment=null}}function replayElement(request,task,keyPath,name,keyOrIndex,childIndex,type,props,ref,replay){childIndex=replay.nodes;for(var i=0;i<childIndex.length;i++){var node=childIndex[i];if(keyOrIndex===node[1]){if(node.length===4){if(name!==null&&name!==node[0])throw Error("Expected the resume to render <"+node[0]+"> in this slot but instead it rendered <"+name+">. The tree doesn't match so React will fallback to client rendering.");var childNodes=node[2];name=node[3],keyOrIndex=task.node,task.replay={nodes:childNodes,slots:name,pendingTasks:1};try{if(renderElement(request,task,keyPath,type,props,ref),task.replay.pendingTasks===1&&0<task.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");task.replay.pendingTasks--}catch(x){if(typeof x==="object"&&x!==null&&(x===SuspenseException||typeof x.then==="function"))throw task.node===keyOrIndex?task.replay=replay:childIndex.splice(i,1),x;task.replay.pendingTasks--,type=getThrownInfo(task.componentStack),props=request,request=task.blockedBoundary,keyPath=x,ref=name,name=logRecoverableError(props,keyPath,type,task.debugTask),abortRemainingReplayNodes(props,request,childNodes,ref,keyPath,name,type,!1)}task.replay=replay}else{if(type!==REACT_SUSPENSE_TYPE)throw Error("Expected the resume to render <Suspense> in this slot but instead it rendered <"+(getComponentNameFromType(type)||"Unknown")+">. The tree doesn't match so React will fallback to client rendering.");a:{replay=void 0,name=node[5],type=node[2],ref=node[3],keyOrIndex=node[4]===null?[]:node[4][2],node=node[4]===null?null:node[4][3];var{keyPath:prevKeyPath,formatContext:prevContext,row:prevRow,replay:previousReplaySet,blockedBoundary:parentBoundary,hoistableState:parentHoistableState}=task,content=props.children,fallback=props.fallback,fallbackAbortSet=new Set;props=task.formatContext.insertionMode<HTML_MODE?createSuspenseBoundary(request,task.row,fallbackAbortSet,createPreambleState(),createPreambleState()):createSuspenseBoundary(request,task.row,fallbackAbortSet,null,null),props.parentFlushed=!0,props.rootSegmentID=name,task.blockedBoundary=props,task.hoistableState=props.contentState,task.keyPath=keyPath,task.formatContext=getSuspenseContentFormatContext(request.resumableState,prevContext),task.row=null,task.replay={nodes:type,slots:ref,pendingTasks:1};try{if(renderNode(request,task,content,-1),task.replay.pendingTasks===1&&0<task.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");if(task.replay.pendingTasks--,props.pendingTasks===0&&props.status===PENDING){props.status=COMPLETED,request.completedBoundaries.push(props);break a}}catch(error){props.status=CLIENT_RENDERED,childNodes=getThrownInfo(task.componentStack),replay=logRecoverableError(request,error,childNodes,task.debugTask),encodeErrorForBoundary(props,replay,error,childNodes,!1),task.replay.pendingTasks--,request.clientRenderedBoundaries.push(props)}finally{task.blockedBoundary=parentBoundary,task.hoistableState=parentHoistableState,task.replay=previousReplaySet,task.keyPath=prevKeyPath,task.formatContext=prevContext,task.row=prevRow}props=createReplayTask(request,null,{nodes:keyOrIndex,slots:node,pendingTasks:0},fallback,-1,parentBoundary,props.fallbackState,fallbackAbortSet,[keyPath[0],"Suspense Fallback",keyPath[2]],getSuspenseFallbackFormatContext(request.resumableState,task.formatContext),task.context,task.treeContext,task.row,replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack),emptyContextObject,task.debugTask),pushComponentStack(props),request.pingedTasks.push(props)}}childIndex.splice(i,1);break}}}function validateIterable(task,iterable,childIndex,iterator,iteratorFn){if(iterator===iterable){if(childIndex!==-1||task.componentStack===null||typeof task.componentStack.type!=="function"||Object.prototype.toString.call(task.componentStack.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(iterator)!=="[object Generator]")didWarnAboutGenerators||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),didWarnAboutGenerators=!0}else iterable.entries!==iteratorFn||didWarnAboutMaps||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),didWarnAboutMaps=!0)}function renderNodeDestructive(request,task,node,childIndex){task.replay!==null&&typeof task.replay.slots==="number"?resumeNode(request,task,task.replay.slots,node,childIndex):(task.node=node,task.childIndex=childIndex,node=task.componentStack,childIndex=task.debugTask,pushComponentStack(task),retryNode(request,task),task.componentStack=node,task.debugTask=childIndex)}function retryNode(request,task){var node=task.node,childIndex=task.childIndex;if(node!==null){if(typeof node==="object"){switch(node.$$typeof){case REACT_ELEMENT_TYPE:var type=node.type,key=node.key;node=node.props;var refProp=node.ref;refProp=refProp!==void 0?refProp:null;var debugTask=task.debugTask,name=getComponentNameFromType(type);key=key==null?childIndex===-1?0:childIndex:key;var keyPath=[task.keyPath,name,key];task.replay!==null?debugTask?debugTask.run(replayElement.bind(null,request,task,keyPath,name,key,childIndex,type,node,refProp,task.replay)):replayElement(request,task,keyPath,name,key,childIndex,type,node,refProp,task.replay):debugTask?debugTask.run(renderElement.bind(null,request,task,keyPath,type,node,refProp)):renderElement(request,task,keyPath,type,node,refProp);return;case REACT_PORTAL_TYPE:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case REACT_LAZY_TYPE:if(type=callLazyInitInDEV(node),request.status===12)throw null;renderNodeDestructive(request,task,type,childIndex);return}if(isArrayImpl(node)){renderChildrenArray(request,task,node,childIndex);return}if(key=getIteratorFn(node)){if(type=key.call(node)){if(validateIterable(task,node,childIndex,type,key),node=type.next(),!node.done){key=[];do key.push(node.value),node=type.next();while(!node.done);renderChildrenArray(request,task,key,childIndex)}return}}if(typeof node.then==="function")return task.thenableState=null,renderNodeDestructive(request,task,unwrapThenable(node),childIndex);if(node.$$typeof===REACT_CONTEXT_TYPE)return renderNodeDestructive(request,task,node._currentValue,childIndex);throw request=Object.prototype.toString.call(node),Error("Objects are not valid as a React child (found: "+(request==="[object Object]"?"object with keys {"+Object.keys(node).join(", ")+"}":request)+"). If you meant to render a collection of children, use an array instead.")}typeof node==="string"?(task=task.blockedSegment,task!==null&&(task.lastPushedText=pushTextInstance(task.chunks,node,request.renderState,task.lastPushedText))):typeof node==="number"||typeof node==="bigint"?(task=task.blockedSegment,task!==null&&(task.lastPushedText=pushTextInstance(task.chunks,""+node,request.renderState,task.lastPushedText))):(typeof node==="function"&&(request=node.displayName||node.name||"Component",console.error("Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",request,request)),typeof node==="symbol"&&console.error(`Symbols are not valid as a React child.
|
|
345
|
-
%s`,String(node)))}}function warnForMissingKey(request,task,child){if(child!==null&&typeof child==="object"&&(child.$$typeof===REACT_ELEMENT_TYPE||child.$$typeof===REACT_PORTAL_TYPE)&&child._store&&(!child._store.validated&&child.key==null||child._store.validated===2)){if(typeof child._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");child._store.validated=1;var didWarnForKey=request.didWarnForKey;if(didWarnForKey==null&&(didWarnForKey=request.didWarnForKey=new WeakSet),request=task.componentStack,request!==null&&!didWarnForKey.has(request)){didWarnForKey.add(request);var componentName=getComponentNameFromType(child.type);didWarnForKey=child._owner;var parentOwner=request.owner;if(request="",parentOwner&&typeof parentOwner.type<"u"){var name=getComponentNameFromType(parentOwner.type);name&&(request=`
|
|
346
|
-
|
|
347
|
-
Check the render method of \``+name+"`.")}request||componentName&&(request=`
|
|
348
|
-
|
|
349
|
-
Check the top-level render call using <`+componentName+">."),componentName="",didWarnForKey!=null&&parentOwner!==didWarnForKey&&(parentOwner=null,typeof didWarnForKey.type<"u"?parentOwner=getComponentNameFromType(didWarnForKey.type):typeof didWarnForKey.name==="string"&&(parentOwner=didWarnForKey.name),parentOwner&&(componentName=" It was passed a child from "+parentOwner+".")),didWarnForKey=task.componentStack,task.componentStack={parent:task.componentStack,type:child.type,owner:child._owner,stack:child._debugStack},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',request,componentName),task.componentStack=didWarnForKey}}}function renderChildrenArray(request,task,children,childIndex){var{keyPath:prevKeyPath,componentStack:previousComponentStack,debugTask:previousDebugTask}=task;if(pushServerComponentStack(task,task.node._debugInfo),childIndex!==-1&&(task.keyPath=[task.keyPath,"Fragment",childIndex],task.replay!==null)){for(var replay=task.replay,replayNodes=replay.nodes,j=0;j<replayNodes.length;j++){var node=replayNodes[j];if(node[1]===childIndex){childIndex=node[2],node=node[3],task.replay={nodes:childIndex,slots:node,pendingTasks:1};try{if(renderChildrenArray(request,task,children,-1),task.replay.pendingTasks===1&&0<task.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");task.replay.pendingTasks--}catch(x){if(typeof x==="object"&&x!==null&&(x===SuspenseException||typeof x.then==="function"))throw x;task.replay.pendingTasks--;var thrownInfo=getThrownInfo(task.componentStack);children=task.blockedBoundary;var error=x,resumeSlots=node;node=logRecoverableError(request,error,thrownInfo,task.debugTask),abortRemainingReplayNodes(request,children,childIndex,resumeSlots,error,node,thrownInfo,!1)}task.replay=replay,replayNodes.splice(j,1);break}}task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask;return}if(replay=task.treeContext,replayNodes=children.length,task.replay!==null&&(j=task.replay.slots,j!==null&&typeof j==="object")){for(childIndex=0;childIndex<replayNodes;childIndex++)node=children[childIndex],task.treeContext=pushTreeContext(replay,replayNodes,childIndex),error=j[childIndex],typeof error==="number"?(resumeNode(request,task,error,node,childIndex),delete j[childIndex]):renderNode(request,task,node,childIndex);task.treeContext=replay,task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask;return}for(j=0;j<replayNodes;j++)childIndex=children[j],warnForMissingKey(request,task,childIndex),task.treeContext=pushTreeContext(replay,replayNodes,j),renderNode(request,task,childIndex,j);task.treeContext=replay,task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask}function trackPostponedBoundary(request,trackedPostpones,boundary){if(boundary.status=POSTPONED,boundary.rootSegmentID=request.nextSegmentId++,request=boundary.trackedContentKeyPath,request===null)throw Error("It should not be possible to postpone at the root. This is a bug in React.");var fallbackReplayNode=boundary.trackedFallbackNode,children=[],boundaryNode=trackedPostpones.workingMap.get(request);if(boundaryNode===void 0)return boundary=[request[1],request[2],children,null,fallbackReplayNode,boundary.rootSegmentID],trackedPostpones.workingMap.set(request,boundary),addToReplayParent(boundary,request[0],trackedPostpones),boundary;return boundaryNode[4]=fallbackReplayNode,boundaryNode[5]=boundary.rootSegmentID,boundaryNode}function trackPostpone(request,trackedPostpones,task,segment){segment.status=POSTPONED;var keyPath=task.keyPath,boundary=task.blockedBoundary;if(boundary===null)segment.id=request.nextSegmentId++,trackedPostpones.rootSlots=segment.id,request.completedRootSegment!==null&&(request.completedRootSegment.status=POSTPONED);else{if(boundary!==null&&boundary.status===PENDING){var boundaryNode=trackPostponedBoundary(request,trackedPostpones,boundary);if(boundary.trackedContentKeyPath===keyPath&&task.childIndex===-1){segment.id===-1&&(segment.id=segment.parentFlushed?boundary.rootSegmentID:request.nextSegmentId++),boundaryNode[3]=segment.id;return}}if(segment.id===-1&&(segment.id=segment.parentFlushed&&boundary!==null?boundary.rootSegmentID:request.nextSegmentId++),task.childIndex===-1)keyPath===null?trackedPostpones.rootSlots=segment.id:(task=trackedPostpones.workingMap.get(keyPath),task===void 0?(task=[keyPath[1],keyPath[2],[],segment.id],addToReplayParent(task,keyPath[0],trackedPostpones)):task[3]=segment.id);else{if(keyPath===null){if(request=trackedPostpones.rootSlots,request===null)request=trackedPostpones.rootSlots={};else if(typeof request==="number")throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.")}else if(boundary=trackedPostpones.workingMap,boundaryNode=boundary.get(keyPath),boundaryNode===void 0)request={},boundaryNode=[keyPath[1],keyPath[2],[],request],boundary.set(keyPath,boundaryNode),addToReplayParent(boundaryNode,keyPath[0],trackedPostpones);else if(request=boundaryNode[3],request===null)request=boundaryNode[3]={};else if(typeof request==="number")throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.");request[task.childIndex]=segment.id}}}function untrackBoundary(request,boundary){request=request.trackedPostpones,request!==null&&(boundary=boundary.trackedContentKeyPath,boundary!==null&&(boundary=request.workingMap.get(boundary),boundary!==void 0&&(boundary.length=4,boundary[2]=[],boundary[3]=null)))}function spawnNewSuspendedReplayTask(request,task,thenableState){return createReplayTask(request,thenableState,task.replay,task.node,task.childIndex,task.blockedBoundary,task.hoistableState,task.abortSet,task.keyPath,task.formatContext,task.context,task.treeContext,task.row,task.componentStack,emptyContextObject,task.debugTask)}function spawnNewSuspendedRenderTask(request,task,thenableState){var segment=task.blockedSegment,newSegment=createPendingSegment(request,segment.chunks.length,null,task.formatContext,segment.lastPushedText,!0);return segment.children.push(newSegment),segment.lastPushedText=!1,createRenderTask(request,thenableState,task.node,task.childIndex,task.blockedBoundary,newSegment,task.blockedPreamble,task.hoistableState,task.abortSet,task.keyPath,task.formatContext,task.context,task.treeContext,task.row,task.componentStack,emptyContextObject,task.debugTask)}function renderNode(request,task,node,childIndex){var{formatContext:previousFormatContext,context:previousContext,keyPath:previousKeyPath,treeContext:previousTreeContext,componentStack:previousComponentStack,debugTask:previousDebugTask,blockedSegment:segment}=task;if(segment===null){segment=task.replay;try{return renderNodeDestructive(request,task,node,childIndex)}catch(thrownValue){if(resetHooksState(),node=thrownValue===SuspenseException?getSuspendedThenable():thrownValue,request.status!==12&&typeof node==="object"&&node!==null){if(typeof node.then==="function"){childIndex=thrownValue===SuspenseException?getThenableStateAfterSuspending():null,request=spawnNewSuspendedReplayTask(request,task,childIndex).ping,node.then(request,request),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.replay=segment,task.debugTask=previousDebugTask,switchContext(previousContext);return}if(node.message==="Maximum call stack size exceeded"){node=thrownValue===SuspenseException?getThenableStateAfterSuspending():null,node=spawnNewSuspendedReplayTask(request,task,node),request.pingedTasks.push(node),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.replay=segment,task.debugTask=previousDebugTask,switchContext(previousContext);return}}}}else{var childrenLength=segment.children.length,chunkLength=segment.chunks.length;try{return renderNodeDestructive(request,task,node,childIndex)}catch(thrownValue$3){if(resetHooksState(),segment.children.length=childrenLength,segment.chunks.length=chunkLength,node=thrownValue$3===SuspenseException?getSuspendedThenable():thrownValue$3,request.status!==12&&typeof node==="object"&&node!==null){if(typeof node.then==="function"){segment=node,node=thrownValue$3===SuspenseException?getThenableStateAfterSuspending():null,request=spawnNewSuspendedRenderTask(request,task,node).ping,segment.then(request,request),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask,switchContext(previousContext);return}if(node.message==="Maximum call stack size exceeded"){segment=thrownValue$3===SuspenseException?getThenableStateAfterSuspending():null,segment=spawnNewSuspendedRenderTask(request,task,segment),request.pingedTasks.push(segment),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask,switchContext(previousContext);return}}}}throw task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,switchContext(previousContext),node}function abortTaskSoft(task){var{blockedBoundary:boundary,blockedSegment:segment}=task;segment!==null&&(segment.status=ABORTED,finishedTask(this,boundary,task.row,segment))}function abortRemainingReplayNodes(request$jscomp$0,boundary,nodes,slots,error$jscomp$0,errorDigest$jscomp$0,errorInfo$jscomp$0,aborted){for(var i=0;i<nodes.length;i++){var node=nodes[i];if(node.length===4)abortRemainingReplayNodes(request$jscomp$0,boundary,node[2],node[3],error$jscomp$0,errorDigest$jscomp$0,errorInfo$jscomp$0,aborted);else{var request=request$jscomp$0;node=node[5];var error=error$jscomp$0,errorDigest=errorDigest$jscomp$0,errorInfo=errorInfo$jscomp$0,wasAborted=aborted,resumedBoundary=createSuspenseBoundary(request,null,new Set,null,null);resumedBoundary.parentFlushed=!0,resumedBoundary.rootSegmentID=node,resumedBoundary.status=CLIENT_RENDERED,encodeErrorForBoundary(resumedBoundary,errorDigest,error,errorInfo,wasAborted),resumedBoundary.parentFlushed&&request.clientRenderedBoundaries.push(resumedBoundary)}}if(nodes.length=0,slots!==null){if(boundary===null)throw Error("We should not have any resumable nodes in the shell. This is a bug in React.");if(boundary.status!==CLIENT_RENDERED&&(boundary.status=CLIENT_RENDERED,encodeErrorForBoundary(boundary,errorDigest$jscomp$0,error$jscomp$0,errorInfo$jscomp$0,aborted),boundary.parentFlushed&&request$jscomp$0.clientRenderedBoundaries.push(boundary)),typeof slots==="object")for(var index in slots)delete slots[index]}}function abortTask(task,request,error){var boundary=task.blockedBoundary,segment=task.blockedSegment;if(segment!==null){if(segment.status===6)return;segment.status=ABORTED}var errorInfo=getThrownInfo(task.componentStack),node=task.node;if(node!==null&&typeof node==="object"&&pushHaltedAwaitOnComponentStack(task,node._debugInfo),boundary===null){if(request.status!==13&&request.status!==CLOSED){if(boundary=task.replay,boundary===null){request.trackedPostpones!==null&&segment!==null?(boundary=request.trackedPostpones,logRecoverableError(request,error,errorInfo,task.debugTask),trackPostpone(request,boundary,task,segment),finishedTask(request,null,task.row,segment)):(logRecoverableError(request,error,errorInfo,task.debugTask),fatalError(request,error,errorInfo,task.debugTask));return}boundary.pendingTasks--,boundary.pendingTasks===0&&0<boundary.nodes.length&&(segment=logRecoverableError(request,error,errorInfo,null),abortRemainingReplayNodes(request,null,boundary.nodes,boundary.slots,error,segment,errorInfo,!0)),request.pendingRootTasks--,request.pendingRootTasks===0&&completeShell(request)}}else{if(node=request.trackedPostpones,boundary.status!==CLIENT_RENDERED){if(node!==null&&segment!==null)return logRecoverableError(request,error,errorInfo,task.debugTask),trackPostpone(request,node,task,segment),boundary.fallbackAbortableTasks.forEach(function(fallbackTask){return abortTask(fallbackTask,request,error)}),boundary.fallbackAbortableTasks.clear(),finishedTask(request,boundary,task.row,segment);boundary.status=CLIENT_RENDERED,segment=logRecoverableError(request,error,errorInfo,task.debugTask),boundary.status=CLIENT_RENDERED,encodeErrorForBoundary(boundary,segment,error,errorInfo,!0),untrackBoundary(request,boundary),boundary.parentFlushed&&request.clientRenderedBoundaries.push(boundary)}boundary.pendingTasks--,errorInfo=boundary.row,errorInfo!==null&&--errorInfo.pendingTasks===0&&finishSuspenseListRow(request,errorInfo),boundary.fallbackAbortableTasks.forEach(function(fallbackTask){return abortTask(fallbackTask,request,error)}),boundary.fallbackAbortableTasks.clear()}task=task.row,task!==null&&--task.pendingTasks===0&&finishSuspenseListRow(request,task),request.allPendingTasks--,request.allPendingTasks===0&&completeAll(request)}function safelyEmitEarlyPreloads(request,shellComplete){try{var renderState=request.renderState,onHeaders=renderState.onHeaders;if(onHeaders){var headers=renderState.headers;if(headers){renderState.headers=null;var linkHeader=headers.preconnects;if(headers.fontPreloads&&(linkHeader&&(linkHeader+=", "),linkHeader+=headers.fontPreloads),headers.highImagePreloads&&(linkHeader&&(linkHeader+=", "),linkHeader+=headers.highImagePreloads),!shellComplete){var queueIter=renderState.styles.values(),queueStep=queueIter.next();b:for(;0<headers.remainingCapacity&&!queueStep.done;queueStep=queueIter.next())for(var sheetIter=queueStep.value.sheets.values(),sheetStep=sheetIter.next();0<headers.remainingCapacity&&!sheetStep.done;sheetStep=sheetIter.next()){var sheet=sheetStep.value,props=sheet.props,key=props.href,props$jscomp$0=sheet.props,header=getPreloadAsHeader(props$jscomp$0.href,"style",{crossOrigin:props$jscomp$0.crossOrigin,integrity:props$jscomp$0.integrity,nonce:props$jscomp$0.nonce,type:props$jscomp$0.type,fetchPriority:props$jscomp$0.fetchPriority,referrerPolicy:props$jscomp$0.referrerPolicy,media:props$jscomp$0.media});if(0<=(headers.remainingCapacity-=header.length+2))renderState.resets.style[key]=PRELOAD_NO_CREDS,linkHeader&&(linkHeader+=", "),linkHeader+=header,renderState.resets.style[key]=typeof props.crossOrigin==="string"||typeof props.integrity==="string"?[props.crossOrigin,props.integrity]:PRELOAD_NO_CREDS;else break b}}linkHeader?onHeaders({Link:linkHeader}):onHeaders({})}}}catch(error){logRecoverableError(request,error,{},null)}}function completeShell(request){request.trackedPostpones===null&&safelyEmitEarlyPreloads(request,!0),request.trackedPostpones===null&&preparePreamble(request),request.onShellError=noop,request=request.onShellReady,request()}function completeAll(request){safelyEmitEarlyPreloads(request,request.trackedPostpones===null?!0:request.completedRootSegment===null||request.completedRootSegment.status!==POSTPONED),preparePreamble(request),request=request.onAllReady,request()}function queueCompletedSegment(boundary,segment){if(segment.chunks.length===0&&segment.children.length===1&&segment.children[0].boundary===null&&segment.children[0].id===-1){var childSegment=segment.children[0];childSegment.id=segment.id,childSegment.parentFlushed=!0,childSegment.status!==COMPLETED&&childSegment.status!==ABORTED&&childSegment.status!==ERRORED||queueCompletedSegment(boundary,childSegment)}else boundary.completedSegments.push(segment)}function finishedSegment(request,boundary,segment){if(byteLengthOfChunk!==null){segment=segment.chunks;for(var segmentByteSize=0,i=0;i<segment.length;i++)segmentByteSize+=byteLengthOfChunk(segment[i]);boundary===null?request.byteSize+=segmentByteSize:boundary.byteSize+=segmentByteSize}}function finishedTask(request,boundary,row,segment){if(row!==null&&(--row.pendingTasks===0?finishSuspenseListRow(request,row):row.together&&tryToResolveTogetherRow(request,row)),request.allPendingTasks--,boundary===null){if(segment!==null&&segment.parentFlushed){if(request.completedRootSegment!==null)throw Error("There can only be one root segment. This is a bug in React.");request.completedRootSegment=segment}request.pendingRootTasks--,request.pendingRootTasks===0&&completeShell(request)}else if(boundary.pendingTasks--,boundary.status!==CLIENT_RENDERED)if(boundary.pendingTasks===0){if(boundary.status===PENDING&&(boundary.status=COMPLETED),segment!==null&&segment.parentFlushed&&(segment.status===COMPLETED||segment.status===ABORTED)&&queueCompletedSegment(boundary,segment),boundary.parentFlushed&&request.completedBoundaries.push(boundary),boundary.status===COMPLETED)row=boundary.row,row!==null&&hoistHoistables(row.hoistables,boundary.contentState),isEligibleForOutlining(request,boundary)||(boundary.fallbackAbortableTasks.forEach(abortTaskSoft,request),boundary.fallbackAbortableTasks.clear(),row!==null&&--row.pendingTasks===0&&finishSuspenseListRow(request,row)),request.pendingRootTasks===0&&request.trackedPostpones===null&&boundary.contentPreamble!==null&&preparePreamble(request);else if(boundary.status===POSTPONED&&(boundary=boundary.row,boundary!==null)){if(request.trackedPostpones!==null){row=request.trackedPostpones;var postponedRow=boundary.next;if(postponedRow!==null&&(segment=postponedRow.boundaries,segment!==null))for(postponedRow.boundaries=null,postponedRow=0;postponedRow<segment.length;postponedRow++){var postponedBoundary=segment[postponedRow];trackPostponedBoundary(request,row,postponedBoundary),finishedTask(request,postponedBoundary,null,null)}}--boundary.pendingTasks===0&&finishSuspenseListRow(request,boundary)}}else segment===null||!segment.parentFlushed||segment.status!==COMPLETED&&segment.status!==ABORTED||(queueCompletedSegment(boundary,segment),boundary.completedSegments.length===1&&boundary.parentFlushed&&request.partialBoundaries.push(boundary)),boundary=boundary.row,boundary!==null&&boundary.together&&tryToResolveTogetherRow(request,boundary);request.allPendingTasks===0&&completeAll(request)}function performWork(request$jscomp$2){if(request$jscomp$2.status!==CLOSED&&request$jscomp$2.status!==13){var prevContext=currentActiveSnapshot,prevDispatcher=ReactSharedInternals.H;ReactSharedInternals.H=HooksDispatcher;var prevAsyncDispatcher=ReactSharedInternals.A;ReactSharedInternals.A=DefaultAsyncDispatcher;var prevRequest=currentRequest;currentRequest=request$jscomp$2;var prevGetCurrentStackImpl=ReactSharedInternals.getCurrentStack;ReactSharedInternals.getCurrentStack=getCurrentStackInDEV;var prevResumableState=currentResumableState;currentResumableState=request$jscomp$2.resumableState;try{var pingedTasks=request$jscomp$2.pingedTasks,i;for(i=0;i<pingedTasks.length;i++){var request=request$jscomp$2,task=pingedTasks[i],segment=task.blockedSegment;if(segment===null){var prevTaskInDEV=void 0,request$jscomp$0=request;if(request=task,request.replay.pendingTasks!==0){switchContext(request.context),prevTaskInDEV=currentTaskInDEV,currentTaskInDEV=request;try{if(typeof request.replay.slots==="number"?resumeNode(request$jscomp$0,request,request.replay.slots,request.node,request.childIndex):retryNode(request$jscomp$0,request),request.replay.pendingTasks===1&&0<request.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");request.replay.pendingTasks--,request.abortSet.delete(request),finishedTask(request$jscomp$0,request.blockedBoundary,request.row,null)}catch(thrownValue){resetHooksState();var x=thrownValue===SuspenseException?getSuspendedThenable():thrownValue;if(typeof x==="object"&&x!==null&&typeof x.then==="function"){var ping=request.ping;x.then(ping,ping),request.thenableState=thrownValue===SuspenseException?getThenableStateAfterSuspending():null}else{request.replay.pendingTasks--,request.abortSet.delete(request);var errorInfo=getThrownInfo(request.componentStack),errorDigest=void 0,request$jscomp$1=request$jscomp$0,boundary=request.blockedBoundary,error$jscomp$0=request$jscomp$0.status===12?request$jscomp$0.fatalError:x,errorInfo$jscomp$0=errorInfo,replayNodes=request.replay.nodes,resumeSlots=request.replay.slots;errorDigest=logRecoverableError(request$jscomp$1,error$jscomp$0,errorInfo$jscomp$0,request.debugTask),abortRemainingReplayNodes(request$jscomp$1,boundary,replayNodes,resumeSlots,error$jscomp$0,errorDigest,errorInfo$jscomp$0,!1),request$jscomp$0.pendingRootTasks--,request$jscomp$0.pendingRootTasks===0&&completeShell(request$jscomp$0),request$jscomp$0.allPendingTasks--,request$jscomp$0.allPendingTasks===0&&completeAll(request$jscomp$0)}}finally{currentTaskInDEV=prevTaskInDEV}}}else if(request$jscomp$0=prevTaskInDEV=void 0,errorDigest=task,request$jscomp$1=segment,request$jscomp$1.status===PENDING){request$jscomp$1.status=6,switchContext(errorDigest.context),request$jscomp$0=currentTaskInDEV,currentTaskInDEV=errorDigest;var childrenLength=request$jscomp$1.children.length,chunkLength=request$jscomp$1.chunks.length;try{retryNode(request,errorDigest),pushSegmentFinale(request$jscomp$1.chunks,request.renderState,request$jscomp$1.lastPushedText,request$jscomp$1.textEmbedded),errorDigest.abortSet.delete(errorDigest),request$jscomp$1.status=COMPLETED,finishedSegment(request,errorDigest.blockedBoundary,request$jscomp$1),finishedTask(request,errorDigest.blockedBoundary,errorDigest.row,request$jscomp$1)}catch(thrownValue){resetHooksState(),request$jscomp$1.children.length=childrenLength,request$jscomp$1.chunks.length=chunkLength;var x$jscomp$0=thrownValue===SuspenseException?getSuspendedThenable():request.status===12?request.fatalError:thrownValue;if(request.status===12&&request.trackedPostpones!==null){var trackedPostpones=request.trackedPostpones,thrownInfo=getThrownInfo(errorDigest.componentStack);errorDigest.abortSet.delete(errorDigest),logRecoverableError(request,x$jscomp$0,thrownInfo,errorDigest.debugTask),trackPostpone(request,trackedPostpones,errorDigest,request$jscomp$1),finishedTask(request,errorDigest.blockedBoundary,errorDigest.row,request$jscomp$1)}else if(typeof x$jscomp$0==="object"&&x$jscomp$0!==null&&typeof x$jscomp$0.then==="function"){request$jscomp$1.status=PENDING,errorDigest.thenableState=thrownValue===SuspenseException?getThenableStateAfterSuspending():null;var ping$jscomp$0=errorDigest.ping;x$jscomp$0.then(ping$jscomp$0,ping$jscomp$0)}else{var errorInfo$jscomp$1=getThrownInfo(errorDigest.componentStack);errorDigest.abortSet.delete(errorDigest),request$jscomp$1.status=ERRORED;var boundary$jscomp$0=errorDigest.blockedBoundary,row=errorDigest.row,debugTask=errorDigest.debugTask;if(row!==null&&--row.pendingTasks===0&&finishSuspenseListRow(request,row),request.allPendingTasks--,prevTaskInDEV=logRecoverableError(request,x$jscomp$0,errorInfo$jscomp$1,debugTask),boundary$jscomp$0===null)fatalError(request,x$jscomp$0,errorInfo$jscomp$1,debugTask);else if(boundary$jscomp$0.pendingTasks--,boundary$jscomp$0.status!==CLIENT_RENDERED){boundary$jscomp$0.status=CLIENT_RENDERED,encodeErrorForBoundary(boundary$jscomp$0,prevTaskInDEV,x$jscomp$0,errorInfo$jscomp$1,!1),untrackBoundary(request,boundary$jscomp$0);var boundaryRow=boundary$jscomp$0.row;boundaryRow!==null&&--boundaryRow.pendingTasks===0&&finishSuspenseListRow(request,boundaryRow),boundary$jscomp$0.parentFlushed&&request.clientRenderedBoundaries.push(boundary$jscomp$0),request.pendingRootTasks===0&&request.trackedPostpones===null&&boundary$jscomp$0.contentPreamble!==null&&preparePreamble(request)}request.allPendingTasks===0&&completeAll(request)}}finally{currentTaskInDEV=request$jscomp$0}}}pingedTasks.splice(0,i),request$jscomp$2.destination!==null&&flushCompletedQueues(request$jscomp$2,request$jscomp$2.destination)}catch(error){pingedTasks={},logRecoverableError(request$jscomp$2,error,pingedTasks,null),fatalError(request$jscomp$2,error,pingedTasks,null)}finally{currentResumableState=prevResumableState,ReactSharedInternals.H=prevDispatcher,ReactSharedInternals.A=prevAsyncDispatcher,ReactSharedInternals.getCurrentStack=prevGetCurrentStackImpl,prevDispatcher===HooksDispatcher&&switchContext(prevContext),currentRequest=prevRequest}}}function preparePreambleFromSubtree(request,segment,collectedPreambleSegments){segment.preambleChildren.length&&collectedPreambleSegments.push(segment.preambleChildren);for(var pendingPreambles=!1,i=0;i<segment.children.length;i++)pendingPreambles=preparePreambleFromSegment(request,segment.children[i],collectedPreambleSegments)||pendingPreambles;return pendingPreambles}function preparePreambleFromSegment(request,segment,collectedPreambleSegments){var boundary=segment.boundary;if(boundary===null)return preparePreambleFromSubtree(request,segment,collectedPreambleSegments);var{contentPreamble:preamble,fallbackPreamble}=boundary;if(preamble===null||fallbackPreamble===null)return!1;switch(boundary.status){case COMPLETED:if(hoistPreambleState(request.renderState,preamble),request.byteSize+=boundary.byteSize,segment=boundary.completedSegments[0],!segment)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");return preparePreambleFromSubtree(request,segment,collectedPreambleSegments);case POSTPONED:if(request.trackedPostpones!==null)return!0;case CLIENT_RENDERED:if(segment.status===COMPLETED)return hoistPreambleState(request.renderState,fallbackPreamble),preparePreambleFromSubtree(request,segment,collectedPreambleSegments);default:return!0}}function preparePreamble(request){if(request.completedRootSegment&&request.completedPreambleSegments===null){var collectedPreambleSegments=[],originalRequestByteSize=request.byteSize,hasPendingPreambles=preparePreambleFromSegment(request,request.completedRootSegment,collectedPreambleSegments),preamble=request.renderState.preamble;hasPendingPreambles===!1||preamble.headChunks&&preamble.bodyChunks?request.completedPreambleSegments=collectedPreambleSegments:request.byteSize=originalRequestByteSize}}function flushSubtree(request,destination,segment,hoistableState){switch(segment.parentFlushed=!0,segment.status){case PENDING:segment.id=request.nextSegmentId++;case POSTPONED:return hoistableState=segment.id,segment.lastPushedText=!1,segment.textEmbedded=!1,request=request.renderState,writeChunk(destination,placeholder1),writeChunk(destination,request.placeholderPrefix),request=hoistableState.toString(16),writeChunk(destination,request),!!destination.write(placeholder2);case COMPLETED:segment.status=FLUSHED;var r=!0,chunks=segment.chunks,chunkIdx=0;segment=segment.children;for(var childIdx=0;childIdx<segment.length;childIdx++){for(r=segment[childIdx];chunkIdx<r.index;chunkIdx++)writeChunk(destination,chunks[chunkIdx]);r=flushSegment(request,destination,r,hoistableState)}for(;chunkIdx<chunks.length-1;chunkIdx++)writeChunk(destination,chunks[chunkIdx]);return chunkIdx<chunks.length&&(r=!!destination.write(chunks[chunkIdx])),r;case ABORTED:return!0;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}var flushedByteSize=0;function flushSegment(request,destination,segment,hoistableState){var boundary=segment.boundary;if(boundary===null)return flushSubtree(request,destination,segment,hoistableState);if(boundary.parentFlushed=!0,boundary.status===CLIENT_RENDERED){var row=boundary.row;row!==null&&--row.pendingTasks===0&&finishSuspenseListRow(request,row),row=boundary.errorDigest;var errorMessage=boundary.errorMessage,errorStack=boundary.errorStack;boundary=boundary.errorComponentStack,destination.write(startClientRenderedSuspenseBoundary),writeChunk(destination,clientRenderedSuspenseBoundaryError1),row&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1A),writeChunk(destination,escapeTextForBrowser(row)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),errorMessage&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1B),writeChunk(destination,escapeTextForBrowser(errorMessage)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),errorStack&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1C),writeChunk(destination,escapeTextForBrowser(errorStack)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),boundary&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1D),writeChunk(destination,escapeTextForBrowser(boundary)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),destination.write(clientRenderedSuspenseBoundaryError2),flushSubtree(request,destination,segment,hoistableState)}else if(boundary.status!==COMPLETED)boundary.status===PENDING&&(boundary.rootSegmentID=request.nextSegmentId++),0<boundary.completedSegments.length&&request.partialBoundaries.push(boundary),writeStartPendingSuspenseBoundary(destination,request.renderState,boundary.rootSegmentID),hoistableState&&hoistHoistables(hoistableState,boundary.fallbackState),flushSubtree(request,destination,segment,hoistableState);else if(!flushingPartialBoundaries&&isEligibleForOutlining(request,boundary)&&(flushedByteSize+boundary.byteSize>request.progressiveChunkSize||hasSuspenseyContent(boundary.contentState)))boundary.rootSegmentID=request.nextSegmentId++,request.completedBoundaries.push(boundary),writeStartPendingSuspenseBoundary(destination,request.renderState,boundary.rootSegmentID),flushSubtree(request,destination,segment,hoistableState);else{if(flushedByteSize+=boundary.byteSize,hoistableState&&hoistHoistables(hoistableState,boundary.contentState),segment=boundary.row,segment!==null&&isEligibleForOutlining(request,boundary)&&--segment.pendingTasks===0&&finishSuspenseListRow(request,segment),destination.write(startCompletedSuspenseBoundary),segment=boundary.completedSegments,segment.length!==1)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");flushSegment(request,destination,segment[0],hoistableState)}return!!destination.write(endSuspenseBoundary)}function flushSegmentContainer(request,destination,segment,hoistableState){return writeStartSegment(destination,request.renderState,segment.parentFormatContext,segment.id),flushSegment(request,destination,segment,hoistableState),writeEndSegment(destination,segment.parentFormatContext)}function flushCompletedBoundary(request,destination,boundary){flushedByteSize=boundary.byteSize;for(var completedSegments=boundary.completedSegments,i=0;i<completedSegments.length;i++)flushPartiallyCompletedSegment(request,destination,boundary,completedSegments[i]);completedSegments.length=0,completedSegments=boundary.row,completedSegments!==null&&isEligibleForOutlining(request,boundary)&&--completedSegments.pendingTasks===0&&finishSuspenseListRow(request,completedSegments),writeHoistablesForBoundary(destination,boundary.contentState,request.renderState),completedSegments=request.resumableState,request=request.renderState,i=boundary.rootSegmentID,boundary=boundary.contentState;var requiresStyleInsertion=request.stylesToHoist;return request.stylesToHoist=!1,writeChunk(destination,request.startInlineScript),writeChunk(destination,endOfStartTag),requiresStyleInsertion?((completedSegments.instructions&SentClientRenderFunction)===NothingSent&&(completedSegments.instructions|=SentClientRenderFunction,writeChunk(destination,clientRenderScriptFunctionOnly)),(completedSegments.instructions&SentCompleteBoundaryFunction)===NothingSent&&(completedSegments.instructions|=SentCompleteBoundaryFunction,writeChunk(destination,completeBoundaryScriptFunctionOnly)),(completedSegments.instructions&SentStyleInsertionFunction)===NothingSent?(completedSegments.instructions|=SentStyleInsertionFunction,writeChunk(destination,completeBoundaryWithStylesScript1FullPartial)):writeChunk(destination,completeBoundaryWithStylesScript1Partial)):((completedSegments.instructions&SentCompleteBoundaryFunction)===NothingSent&&(completedSegments.instructions|=SentCompleteBoundaryFunction,writeChunk(destination,completeBoundaryScriptFunctionOnly)),writeChunk(destination,completeBoundaryScript1Partial)),completedSegments=i.toString(16),writeChunk(destination,request.boundaryPrefix),writeChunk(destination,completedSegments),writeChunk(destination,completeBoundaryScript2),writeChunk(destination,request.segmentPrefix),writeChunk(destination,completedSegments),requiresStyleInsertion?(writeChunk(destination,completeBoundaryScript3a),writeStyleResourceDependenciesInJS(destination,boundary)):writeChunk(destination,completeBoundaryScript3b),boundary=!!destination.write(completeBoundaryScriptEnd),writeBootstrap(destination,request)&&boundary}function flushPartiallyCompletedSegment(request,destination,boundary,segment){if(segment.status===FLUSHED)return!0;var hoistableState=boundary.contentState,segmentID=segment.id;if(segmentID===-1){if((segment.id=boundary.rootSegmentID)===-1)throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return flushSegmentContainer(request,destination,segment,hoistableState)}if(segmentID===boundary.rootSegmentID)return flushSegmentContainer(request,destination,segment,hoistableState);return flushSegmentContainer(request,destination,segment,hoistableState),boundary=request.resumableState,request=request.renderState,writeChunk(destination,request.startInlineScript),writeChunk(destination,endOfStartTag),(boundary.instructions&SentCompleteSegmentFunction)===NothingSent?(boundary.instructions|=SentCompleteSegmentFunction,writeChunk(destination,completeSegmentScript1Full)):writeChunk(destination,completeSegmentScript1Partial),writeChunk(destination,request.segmentPrefix),segmentID=segmentID.toString(16),writeChunk(destination,segmentID),writeChunk(destination,completeSegmentScript2),writeChunk(destination,request.placeholderPrefix),writeChunk(destination,segmentID),destination=!!destination.write(completeSegmentScriptEnd),destination}var flushingPartialBoundaries=!1;function flushCompletedQueues(request,destination){try{if(!(0<request.pendingRootTasks)){var i,completedRootSegment=request.completedRootSegment;if(completedRootSegment!==null){if(completedRootSegment.status===POSTPONED)return;var completedPreambleSegments=request.completedPreambleSegments;if(completedPreambleSegments===null)return;flushedByteSize=request.byteSize;var{resumableState,renderState}=request,preamble=renderState.preamble,{htmlChunks,headChunks}=preamble,i$jscomp$0;if(htmlChunks){for(i$jscomp$0=0;i$jscomp$0<htmlChunks.length;i$jscomp$0++)writeChunk(destination,htmlChunks[i$jscomp$0]);if(headChunks)for(i$jscomp$0=0;i$jscomp$0<headChunks.length;i$jscomp$0++)writeChunk(destination,headChunks[i$jscomp$0]);else writeChunk(destination,startChunkForTag("head")),writeChunk(destination,endOfStartTag)}else if(headChunks)for(i$jscomp$0=0;i$jscomp$0<headChunks.length;i$jscomp$0++)writeChunk(destination,headChunks[i$jscomp$0]);var charsetChunks=renderState.charsetChunks;for(i$jscomp$0=0;i$jscomp$0<charsetChunks.length;i$jscomp$0++)writeChunk(destination,charsetChunks[i$jscomp$0]);charsetChunks.length=0,renderState.preconnects.forEach(flushResource,destination),renderState.preconnects.clear();var viewportChunks=renderState.viewportChunks;for(i$jscomp$0=0;i$jscomp$0<viewportChunks.length;i$jscomp$0++)writeChunk(destination,viewportChunks[i$jscomp$0]);viewportChunks.length=0,renderState.fontPreloads.forEach(flushResource,destination),renderState.fontPreloads.clear(),renderState.highImagePreloads.forEach(flushResource,destination),renderState.highImagePreloads.clear(),currentlyFlushingRenderState=renderState,renderState.styles.forEach(flushStylesInPreamble,destination),currentlyFlushingRenderState=null;var importMapChunks=renderState.importMapChunks;for(i$jscomp$0=0;i$jscomp$0<importMapChunks.length;i$jscomp$0++)writeChunk(destination,importMapChunks[i$jscomp$0]);importMapChunks.length=0,renderState.bootstrapScripts.forEach(flushResource,destination),renderState.scripts.forEach(flushResource,destination),renderState.scripts.clear(),renderState.bulkPreloads.forEach(flushResource,destination),renderState.bulkPreloads.clear(),htmlChunks||headChunks||(resumableState.instructions|=SentCompletedShellId);var hoistableChunks=renderState.hoistableChunks;for(i$jscomp$0=0;i$jscomp$0<hoistableChunks.length;i$jscomp$0++)writeChunk(destination,hoistableChunks[i$jscomp$0]);for(resumableState=hoistableChunks.length=0;resumableState<completedPreambleSegments.length;resumableState++){var segments=completedPreambleSegments[resumableState];for(renderState=0;renderState<segments.length;renderState++)flushSegment(request,destination,segments[renderState],null)}var preamble$jscomp$0=request.renderState.preamble,headChunks$jscomp$0=preamble$jscomp$0.headChunks;(preamble$jscomp$0.htmlChunks||headChunks$jscomp$0)&&writeChunk(destination,endChunkForTag("head"));var bodyChunks=preamble$jscomp$0.bodyChunks;if(bodyChunks)for(completedPreambleSegments=0;completedPreambleSegments<bodyChunks.length;completedPreambleSegments++)writeChunk(destination,bodyChunks[completedPreambleSegments]);flushSegment(request,destination,completedRootSegment,null),request.completedRootSegment=null;var renderState$jscomp$0=request.renderState;if(request.allPendingTasks!==0||request.clientRenderedBoundaries.length!==0||request.completedBoundaries.length!==0||request.trackedPostpones!==null&&(request.trackedPostpones.rootNodes.length!==0||request.trackedPostpones.rootSlots!==null)){var resumableState$jscomp$0=request.resumableState;if((resumableState$jscomp$0.instructions&SentMarkShellTime)===NothingSent){if(resumableState$jscomp$0.instructions|=SentMarkShellTime,writeChunk(destination,renderState$jscomp$0.startInlineScript),(resumableState$jscomp$0.instructions&SentCompletedShellId)===NothingSent){resumableState$jscomp$0.instructions|=SentCompletedShellId;var shellId="_"+resumableState$jscomp$0.idPrefix+"R_";writeChunk(destination,completedShellIdAttributeStart),writeChunk(destination,escapeTextForBrowser(shellId)),writeChunk(destination,attributeEnd)}writeChunk(destination,endOfStartTag),writeChunk(destination,shellTimeRuntimeScript),destination.write(endInlineScript)}}writeBootstrap(destination,renderState$jscomp$0)}var renderState$jscomp$1=request.renderState;completedRootSegment=0;var viewportChunks$jscomp$0=renderState$jscomp$1.viewportChunks;for(completedRootSegment=0;completedRootSegment<viewportChunks$jscomp$0.length;completedRootSegment++)writeChunk(destination,viewportChunks$jscomp$0[completedRootSegment]);viewportChunks$jscomp$0.length=0,renderState$jscomp$1.preconnects.forEach(flushResource,destination),renderState$jscomp$1.preconnects.clear(),renderState$jscomp$1.fontPreloads.forEach(flushResource,destination),renderState$jscomp$1.fontPreloads.clear(),renderState$jscomp$1.highImagePreloads.forEach(flushResource,destination),renderState$jscomp$1.highImagePreloads.clear(),renderState$jscomp$1.styles.forEach(preloadLateStyles,destination),renderState$jscomp$1.scripts.forEach(flushResource,destination),renderState$jscomp$1.scripts.clear(),renderState$jscomp$1.bulkPreloads.forEach(flushResource,destination),renderState$jscomp$1.bulkPreloads.clear();var hoistableChunks$jscomp$0=renderState$jscomp$1.hoistableChunks;for(completedRootSegment=0;completedRootSegment<hoistableChunks$jscomp$0.length;completedRootSegment++)writeChunk(destination,hoistableChunks$jscomp$0[completedRootSegment]);hoistableChunks$jscomp$0.length=0;var clientRenderedBoundaries=request.clientRenderedBoundaries;for(i=0;i<clientRenderedBoundaries.length;i++){var boundary=clientRenderedBoundaries[i];renderState$jscomp$1=destination;var{resumableState:resumableState$jscomp$1,renderState:renderState$jscomp$2}=request,id=boundary.rootSegmentID,errorDigest=boundary.errorDigest,errorMessage=boundary.errorMessage,errorStack=boundary.errorStack,errorComponentStack=boundary.errorComponentStack;if(writeChunk(renderState$jscomp$1,renderState$jscomp$2.startInlineScript),writeChunk(renderState$jscomp$1,endOfStartTag),(resumableState$jscomp$1.instructions&SentClientRenderFunction)===NothingSent?(resumableState$jscomp$1.instructions|=SentClientRenderFunction,writeChunk(renderState$jscomp$1,clientRenderScript1Full)):writeChunk(renderState$jscomp$1,clientRenderScript1Partial),writeChunk(renderState$jscomp$1,renderState$jscomp$2.boundaryPrefix),writeChunk(renderState$jscomp$1,id.toString(16)),writeChunk(renderState$jscomp$1,clientRenderScript1A),errorDigest||errorMessage||errorStack||errorComponentStack)writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorDigest||""));if(errorMessage||errorStack||errorComponentStack)writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorMessage||""));if(errorStack||errorComponentStack)writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorStack||""));errorComponentStack&&(writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorComponentStack)));var JSCompiler_inline_result=!!renderState$jscomp$1.write(clientRenderScriptEnd);if(!JSCompiler_inline_result){request.destination=null,i++,clientRenderedBoundaries.splice(0,i);return}}clientRenderedBoundaries.splice(0,i);var completedBoundaries=request.completedBoundaries;for(i=0;i<completedBoundaries.length;i++)if(!flushCompletedBoundary(request,destination,completedBoundaries[i])){request.destination=null,i++,completedBoundaries.splice(0,i);return}completedBoundaries.splice(0,i),flushingPartialBoundaries=!0;var partialBoundaries=request.partialBoundaries;for(i=0;i<partialBoundaries.length;i++){a:{clientRenderedBoundaries=request,boundary=destination;var boundary$jscomp$0=partialBoundaries[i];flushedByteSize=boundary$jscomp$0.byteSize;var completedSegments=boundary$jscomp$0.completedSegments;for(JSCompiler_inline_result=0;JSCompiler_inline_result<completedSegments.length;JSCompiler_inline_result++)if(!flushPartiallyCompletedSegment(clientRenderedBoundaries,boundary,boundary$jscomp$0,completedSegments[JSCompiler_inline_result])){JSCompiler_inline_result++,completedSegments.splice(0,JSCompiler_inline_result);var JSCompiler_inline_result$jscomp$0=!1;break a}completedSegments.splice(0,JSCompiler_inline_result);var row=boundary$jscomp$0.row;row!==null&&row.together&&boundary$jscomp$0.pendingTasks===1&&(row.pendingTasks===1?unblockSuspenseListRow(clientRenderedBoundaries,row,row.hoistables):row.pendingTasks--),JSCompiler_inline_result$jscomp$0=writeHoistablesForBoundary(boundary,boundary$jscomp$0.contentState,clientRenderedBoundaries.renderState)}if(!JSCompiler_inline_result$jscomp$0){request.destination=null,i++,partialBoundaries.splice(0,i);return}}partialBoundaries.splice(0,i),flushingPartialBoundaries=!1;var largeBoundaries=request.completedBoundaries;for(i=0;i<largeBoundaries.length;i++)if(!flushCompletedBoundary(request,destination,largeBoundaries[i])){request.destination=null,i++,largeBoundaries.splice(0,i);return}largeBoundaries.splice(0,i)}}finally{flushingPartialBoundaries=!1,request.allPendingTasks===0&&request.clientRenderedBoundaries.length===0&&request.completedBoundaries.length===0?(request.flushScheduled=!1,i=request.resumableState,i.hasBody&&writeChunk(destination,endChunkForTag("body")),i.hasHtml&&writeChunk(destination,endChunkForTag("html")),flushBuffered(destination),request.abortableTasks.size!==0&&console.error("There was still abortable task at the root when we closed. This is a bug in React."),request.status=CLOSED,destination.end(),request.destination=null):flushBuffered(destination)}}function startWork(request){request.flushScheduled=request.destination!==null,scheduleMicrotask(function(){return performWork(request)}),setTimeout(function(){request.status===10&&(request.status=11),request.trackedPostpones===null&&safelyEmitEarlyPreloads(request,request.pendingRootTasks===0)},0)}function enqueueFlush(request){request.flushScheduled===!1&&request.pingedTasks.length===0&&request.destination!==null&&(request.flushScheduled=!0,setTimeout(function(){var destination=request.destination;destination?flushCompletedQueues(request,destination):request.flushScheduled=!1},0))}function abort(request,reason){if(request.status===11||request.status===10)request.status=12;try{var abortableTasks=request.abortableTasks;if(0<abortableTasks.size){var error=reason===void 0?Error("The render was aborted by the server without a reason."):typeof reason==="object"&&reason!==null&&typeof reason.then==="function"?Error("The render was aborted by the server with a promise."):reason;request.fatalError=error,abortableTasks.forEach(function(task){var prevTaskInDEV=currentTaskInDEV,prevGetCurrentStackImpl=ReactSharedInternals.getCurrentStack;currentTaskInDEV=task,ReactSharedInternals.getCurrentStack=getCurrentStackInDEV;try{abortTask(task,request,error)}finally{currentTaskInDEV=prevTaskInDEV,ReactSharedInternals.getCurrentStack=prevGetCurrentStackImpl}}),abortableTasks.clear()}request.destination!==null&&flushCompletedQueues(request,request.destination)}catch(error$4){reason={},logRecoverableError(request,error$4,reason,null),fatalError(request,error$4,reason,null)}}function addToReplayParent(node,parentKeyPath,trackedPostpones){if(parentKeyPath===null)trackedPostpones.rootNodes.push(node);else{var workingMap=trackedPostpones.workingMap,parentNode=workingMap.get(parentKeyPath);parentNode===void 0&&(parentNode=[parentKeyPath[1],parentKeyPath[2],[],null],workingMap.set(parentKeyPath,parentNode),addToReplayParent(parentNode,parentKeyPath[0],trackedPostpones)),parentNode[2].push(node)}}var isomorphicReactPackageVersion$jscomp$inline_766=React.version;if(isomorphicReactPackageVersion$jscomp$inline_766!=="19.2.8")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
350
|
-
- react: `+(isomorphicReactPackageVersion$jscomp$inline_766+`
|
|
351
|
-
- react-dom: 19.2.8
|
|
352
|
-
Learn more: https://react.dev/warnings/version-mismatch`));var $renderToReadableStream=function(children,options){return new Promise(function(resolve,reject){var onFatalError,onAllReady,allReady=new Promise(function(res,rej){onAllReady=res,onFatalError=rej}),onHeaders=options?options.onHeaders:void 0,onHeadersImpl;onHeaders&&(onHeadersImpl=function(headersDescriptor){onHeaders(new Headers(headersDescriptor))});var resumableState=createResumableState(options?options.identifierPrefix:void 0,options?options.unstable_externalRuntimeSrc:void 0,options?options.bootstrapScriptContent:void 0,options?options.bootstrapScripts:void 0,options?options.bootstrapModules:void 0),request$jscomp$0=createRequest(children,resumableState,createRenderState(resumableState,options?options.nonce:void 0,options?options.unstable_externalRuntimeSrc:void 0,options?options.importMap:void 0,onHeadersImpl,options?options.maxHeadersLength:void 0),createRootFormatContext(options?options.namespaceURI:void 0),options?options.progressiveChunkSize:void 0,options?options.onError:void 0,onAllReady,function(){var stream=new ReadableStream({type:"direct",pull:function(controller){var request=request$jscomp$0;if(request.status===13)request.status=CLOSED,closeWithError(controller,request.fatalError);else if(request.status!==CLOSED&&request.destination===null){request.destination=controller;try{flushCompletedQueues(request,controller)}catch(error){controller={},logRecoverableError(request,error,controller,null),fatalError(request,error,controller,null)}}},cancel:function(reason){request$jscomp$0.destination=null,abort(request$jscomp$0,reason)}},{highWaterMark:2048});stream.allReady=allReady,resolve(stream)},function(error){allReady.catch(function(){}),reject(error)},onFatalError,options?options.onPostpone:void 0,options?options.formState:void 0);if(options&&options.signal){var signal=options.signal;if(signal.aborted)abort(request$jscomp$0,signal.reason);else{var listener=function(){abort(request$jscomp$0,signal.reason),signal.removeEventListener("abort",listener)};signal.addEventListener("abort",listener)}}startWork(request$jscomp$0)})},$version="19.2.8";var react_dom_server_legacy_browser_development=__toESM(require_react_dom_server_legacy_browser_development()),b,l;b=exports_react_dom_server_bun_development,l=react_dom_server_legacy_browser_development;var $version2=b.version,$renderToReadableStream2=b.renderToReadableStream,$resume=b.resume,$renderToString=l.renderToString,$renderToStaticMarkup=l.renderToStaticMarkup;var import_react=__toESM(require_react_development(),1);function descend(body,index){return body===null?null:{snippetId:body.snippetId,path:[...body.path,index]}}function enterSnippet(body,snippetId){if(body===null)return{snippetId,path:[]};let here=`${body.snippetId}#${body.path.join(".")}`,outer=body.path.length===0?body.at??[]:[];return{snippetId,path:[],at:[here,...outer]}}function bodyAttributes(body){if(body===null)return{};return{"data-snippet-id":body.snippetId,"data-snippet-path":body.path.join("."),...body.at&&body.path.length===0?{"data-snippet-at":body.at.join(" ")}:{}}}var TEXT_CHILDREN_ATTRIBUTE="data-node-text";class UnknownComponentError extends Error{ref;constructor(ref){super(`Unknown component $ref="${ref}". Not in the active component provider's registry. ("$ref" is a library component or registered extension; the MCP compose tool resolves snippet tags to $snippet nodes.)`);this.ref=ref;this.name="UnknownComponentError"}}class UnknownSnippetError extends Error{snippetId;constructor(snippetId){super(`Unknown snippet $snippet="${snippetId}".`);this.snippetId=snippetId;this.name="UnknownSnippetError"}}class SnippetCycleError extends Error{snippetId;cycle;constructor(snippetId,stack){super(`Snippet cycle detected: ${[...stack,snippetId].join(" \u2192 ")}`);this.name="SnippetCycleError",this.snippetId=snippetId,this.cycle=stack}}class SnippetParamError extends Error{snippetId;paramName;constructor(snippetId,paramName,message){super(message??`Snippet "${snippetId}": required param "${paramName}" not supplied.`);this.snippetId=snippetId;this.paramName=paramName;this.name="SnippetParamError"}}class ParamRefError extends Error{paramName;constructor(paramName){super(`$param "${paramName}" appears outside a snippet body.`);this.paramName=paramName;this.name="ParamRefError"}}function resolveSnippetBody(instance,snippet){let{args,missing}=resolveSnippetArgs(snippet,instance.args??{});if(missing.length>0)throw new SnippetParamError(snippet.id,missing[0]);let substituted=substituteSnippetParams(snippet.tree,args);if(substituted.missing.length>0)throw new SnippetParamError(snippet.id,substituted.missing[0]);if(substituted.invalid.length>0){let bad=substituted.invalid[0];throw new SnippetParamError(snippet.id,bad.param,`Snippet "${snippet.id}": param "${bad.param}" resolved to ${bad.valueType==="null"?"null":`a ${bad.valueType}`} but sits in a \`children\` array, where content renders. A string or number there is text and a \`type:"node"\` param is a subtree; to show or hide something by a flag, use {"$if":"${bad.param}","then":\u2026}.`)}let body=substituted.value;if(instance.$overrides)body=applySnippetOverrides(body,instance.$overrides);let extra=instance.$extraClassName?.trim();if(!extra)return body;return applySnippetExtraClassName(body,extra)}function buildTree(node,opts,path=[],stack=[],lockedPath=null,body=null){let identity=resolveNodeIdentity(node,{library:opts.registry});switch(identity.kind){case"snippet":{let instance=identity.node,snippets=opts.snippets;if(!snippets)throw new UnknownSnippetError(instance.$snippet);let snippet=snippets.get(instance.$snippet);if(!snippet)throw new UnknownSnippetError(instance.$snippet);if(stack.includes(snippet.id))throw new SnippetCycleError(snippet.id,stack);let resolved=resolveSnippetBody(instance,snippet);return buildTree(resolved,opts,path,[...stack,snippet.id],lockedPath??path,enterSnippet(body,snippet.id))}case"param":throw new ParamRefError(identity.node.$param);case"text":return import_react.createElement(import_react.Fragment,{key:path.join(".")||"root"},identity.text);case"invalid":throw Error(`buildTree: expected a component, snippet instance, or node param in a node position but got ${JSON.stringify(identity.value)}`);case"repo":return buildRepoNode(identity.node,opts,path,stack,lockedPath,body);case"synthetic":if(identity.ref!==PARAM_TAG_REF)throw new UnknownComponentError(identity.ref);return buildComponentElement(identity.node,ParamTag,opts,path,stack,lockedPath,body);case"unresolved":throw new UnknownComponentError(identity.ref);case"component":return buildComponentElement(identity.node,identity.entry,opts,path,stack,lockedPath,body);case"extension":case"emit-as":{let Component=ownEntry(opts.registry,identity.ref);if(!Component)throw new UnknownComponentError(identity.ref);return buildComponentElement(identity.node,Component,opts,path,stack,lockedPath,body)}}}function buildChild(child,opts,path,stack,lockedPath,body){return isTextNode(child)?child.$text:buildTree(child,opts,path,stack,lockedPath,body)}function textChildrenAttribute(children,lockedPath){if(lockedPath!==null||!children)return{};let at=children.flatMap((child,i)=>!Array.isArray(child)&&nodeShape(child).kind==="text"?[i]:[]);return at.length>0?{[TEXT_CHILDREN_ATTRIBUTE]:at.join(",")}:{}}function buildComponentElement(node,Component,opts,path,stack,lockedPath,body){let{children:childrenProp,...restProps}=node.props??{},dataNodePath=(lockedPath??path).join("."),children;if(Array.isArray(node.children)&&node.children.length>0){if(children=node.children.flatMap((child,i)=>Array.isArray(child)?child.map((c,j)=>buildChild(c,opts,[...path,i,j],stack,lockedPath,null)):buildChild(child,opts,[...path,i],stack,lockedPath,descend(body,i))),Array.isArray(children)&&children.length===1)children=children[0]}else if(childrenProp!==void 0)children=resolvePropChildren(childrenProp,opts,path,stack,lockedPath);return import_react.createElement(Component,{...mapComponentTypes(restProps,(type)=>componentTypeFor(type,opts.registry)),"data-node-path":dataNodePath,...textChildrenAttribute(node.children,lockedPath),...bodyAttributes(body),key:dataNodePath||"root"},children)}function componentTypeFor(type,registry){let identity=resolveNodeIdentity(type,{library:registry});switch(identity.kind){case"component":return identity.entry;case"repo":return;case"extension":case"emit-as":return ownEntry(registry,identity.ref);case"synthetic":case"unresolved":throw new UnknownComponentError(identity.ref);case"snippet":case"param":case"text":case"invalid":return}}function resolvePropChildren(value,opts,path,stack,lockedPath){if(isNode(value))return buildTree(value,opts,path,stack,lockedPath);if(Array.isArray(value))return value.map((item,i)=>{if(!isNode(item))return item;let el=buildTree(item,opts,path,stack,lockedPath);return import_react.cloneElement(el,{key:`inline-${i}`})});return value}function buildRoot(node,opts){return import_react.createElement(import_react.Fragment,null,buildTree(node,opts))}function resolveSnippetBodyForEdit(body,paramDefaults,snippetId){if(isParamRef(body))return paramTagNode(body.$param);if(isSnippetInstance(body))return body;if(!isComponentNode(body))return body;let nextProps=body.props?substituteSnippetParams(body.props,paramDefaults).value:void 0,nextChildren=body.children?.map((c)=>resolveSnippetBodyForEdit(c,paramDefaults,snippetId));return{...body,...nextProps?{props:nextProps}:{},...nextChildren?{children:nextChildren}:{}}}function paramTagNode(name){return{$ref:PARAM_TAG_REF,props:{name}}}function snippetParamPlaceholder(param){if(param.default!==void 0)return param.default;switch(param.type){case"node":return paramTagNode(param.name);case"number":return 0;case"boolean":return!1;case"icon":return"Circle";case"color":return"#7c3aed";case"enum":return param.enum?.[0]??"";default:return`$${param.name}`}}var PARAM_TAG_STYLE={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",borderRadius:"0.375rem",border:"1px dashed var(--color-border, #d4d4d8)",padding:"0.05rem 0.4rem",color:"var(--color-muted-foreground, #71717a)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:"0.75rem",lineHeight:1.6,whiteSpace:"nowrap"};function ParamTag({name,...rest}){return import_react.createElement("span",{...rest,"data-velloo-param":name,style:PARAM_TAG_STYLE},`$${name}`)}function repoProxyInstance(node,snippet){let props=node.props??{},args={};for(let param of snippet.params)if(param.name==="children"&¶m.type==="node"&&node.children?.length)args.children=node.children.length===1?node.children[0]:node.children;else if(param.name in props)args[param.name]=props[param.name];return{$snippet:snippet.id,args}}function buildRepoNode(node,opts,path,stack,lockedPath,body){let proxy=node.$repo.proxy?opts.snippets?.get(node.$repo.proxy):void 0;if(proxy&&!stack.includes(proxy.id))return buildTree(repoProxyInstance(node,proxy),opts,path,stack,lockedPath??path);let dataNodePath=(lockedPath??path).join("."),textChild=node.props?.children,children=node.children&&node.children.length>0?node.children.flatMap((child,i)=>Array.isArray(child)?child.map((c,j)=>buildChild(c,opts,[...path,i,j],stack,lockedPath,null)):buildChild(child,opts,[...path,i],stack,lockedPath,descend(body,i))):typeof textChild==="string"||typeof textChild==="number"?textChild:null;return import_react.createElement(RepoPlaceholder,{label:node.$ref,source:node.$repo.importPath,"data-node-path":dataNodePath,...textChildrenAttribute(node.children,lockedPath),...bodyAttributes(body),key:dataNodePath||"root",children})}var REPO_FRAME_STYLE={position:"relative",border:"1px dashed var(--color-border, #d4d4d8)",borderRadius:"0.5rem",padding:"1.5rem 0.75rem 0.75rem",minHeight:"2.5rem"},REPO_LABEL_STYLE={position:"absolute",top:"0.25rem",left:"0.5rem",color:"var(--color-muted-foreground, #71717a)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:"0.6875rem",lineHeight:1.4,pointerEvents:"none"};function RepoPlaceholder({label,source,children,...rest}){return import_react.createElement("div",{...rest,"data-velloo-repo":label,style:REPO_FRAME_STYLE,title:`${label} from ${source}`},import_react.createElement("span",{style:REPO_LABEL_STYLE},`<${label}>`),children)}var CANVAS_SETTLED_EVENT="velloo:canvas-settled",CANVAS_RUNTIME=`
|
|
299
|
+
})();`;function featuresMeanPopup(features){if(features.length===0)return!1;return!features.includes("toolbar")&&!features.includes("menubar")}async function startCaptureSession(opts){let sessionId=`cs_${Date.now().toString(36)}${randomBytes(3).toString("hex")}`,root=capturesDir(opts.folderRoot,opts.folderId);mkdirSync3(root,{recursive:!0,mode:448});let browser=await launchHeaded(),prior=opts.sessionStatePath&&existsSync3(opts.sessionStatePath)?readSessionState(opts.sessionStatePath):null,context=await browser.newContext({viewport:null,...prior?{storageState:prior}:{}}),made=[],capturedOrigins=new Set;if(opts.url)try{capturedOrigins.add(new URL(opts.url).origin)}catch{}let finish=()=>{},finished=new Promise((resolve)=>{finish=resolve}),closing=!1,primary=null,activePage=async()=>{if(primary&&!primary.isClosed())return primary;let page=context.pages().find((p)=>!p.isClosed());if(!page)throw Error("the browser has no open page to capture");return page},openedAsPopup=[],foldExtraTab=async(extra)=>{if(primary===null||extra===primary)return;if(openedAsPopup.shift()??!1){extra.once("close",()=>{primary?.bringToFront().catch(()=>{return})});return}let deadline=Date.now()+5000,url=extra.url();while((url===""||url==="about:blank")&&Date.now()<deadline){if(await new Promise((r)=>setTimeout(r,50)),extra.isClosed())break;url=extra.url()}if(await extra.close().catch(()=>{return}),url&&url!=="about:blank")await primary.goto(url,{waitUntil:"domcontentloaded",timeout:30000}).catch(()=>{return}),opts.onStatus?.(`opened ${url} in the capture tab`);await primary.bringToFront().catch(()=>{return})},runCapture=async(themeOnly)=>{let page=await activePage();try{capturedOrigins.add(new URL(page.url()).origin)}catch{}let{manifest}=await capturePage(page,{capturesRoot:root,themeOnly,sessionId});return made.push(manifest),opts.onCapture?.(manifest),manifest},toolbarPosition=null;await context.exposeBinding("__vellooCapture",async(_source,action,arg)=>{try{if(action==="position")return toolbarPosition;if(action==="move"){let p=arg;if(typeof p?.left==="number"&&typeof p?.top==="number")toolbarPosition={left:p.left,top:p.top};return"ok"}if(action==="quit")return close(),"done";let manifest=await runCapture(action==="theme"),label=action==="theme"?"theme captured":`captured ${manifest.title||"page"}`;return opts.onStatus?.(`${label} (${manifest.id})`),label}catch(err){let message=err instanceof Error?err.message:String(err);return opts.onStatus?.(`capture failed: ${message}`),"failed"}}),await context.addInitScript(TOOLBAR_SCRIPT);let close=async()=>{if(closing)return;if(closing=!0,opts.sessionStatePath)try{let state=await context.storageState();writeSessionState(opts.sessionStatePath,state,Array.from(capturedOrigins))}catch{}await context.close().catch(()=>{return}),await browser.close().catch(()=>{return}),finish()};browser.on("disconnected",()=>{if(!closing)closing=!0,finish()});let page=await context.newPage();primary=page;try{let cdp=await context.newCDPSession(page);await cdp.send("Page.enable"),cdp.on("Page.windowOpen",(e)=>{openedAsPopup.push(featuresMeanPopup(e.windowFeatures??[]))})}catch{}if(context.on("page",(extra)=>{foldExtraTab(extra).catch(()=>{return})}),opts.url)await page.goto(opts.url,{waitUntil:"domcontentloaded",timeout:30000}).catch(()=>{opts.onStatus?.(`couldn't open ${opts.url} \u2014 navigate manually in the window`)});return{sessionId,captures:()=>[...made],currentUrl:()=>primary&&!primary.isClosed()?primary.url():"",openTabs:()=>context.pages().filter((p)=>!p.isClosed()).length,capturePage:()=>runCapture(!1),captureTheme:()=>runCapture(!0),finished,close}}var import_react=__toESM(require_react_development(),1);function descend(body,index){return body===null?null:{snippetId:body.snippetId,path:[...body.path,index]}}function enterSnippet(body,snippetId){if(body===null)return{snippetId,path:[]};let here=`${body.snippetId}#${body.path.join(".")}`,outer=body.path.length===0?body.at??[]:[];return{snippetId,path:[],at:[here,...outer]}}function bodyAttributes(body){if(body===null)return{};return{"data-snippet-id":body.snippetId,"data-snippet-path":body.path.join("."),...body.at&&body.path.length===0?{"data-snippet-at":body.at.join(" ")}:{}}}var TEXT_CHILDREN_ATTRIBUTE="data-node-text";class UnknownComponentError extends Error{ref;constructor(ref){super(`Unknown component $ref="${ref}". Not in the active component provider's registry. ("$ref" is a library component or registered extension; the MCP compose tool resolves snippet tags to $snippet nodes.)`);this.ref=ref;this.name="UnknownComponentError"}}class UnknownSnippetError extends Error{snippetId;constructor(snippetId){super(`Unknown snippet $snippet="${snippetId}".`);this.snippetId=snippetId;this.name="UnknownSnippetError"}}class SnippetCycleError extends Error{snippetId;cycle;constructor(snippetId,stack){super(`Snippet cycle detected: ${[...stack,snippetId].join(" \u2192 ")}`);this.name="SnippetCycleError",this.snippetId=snippetId,this.cycle=stack}}class SnippetParamError extends Error{snippetId;paramName;constructor(snippetId,paramName,message){super(message??`Snippet "${snippetId}": required param "${paramName}" not supplied.`);this.snippetId=snippetId;this.paramName=paramName;this.name="SnippetParamError"}}class ParamRefError extends Error{paramName;constructor(paramName){super(`$param "${paramName}" appears outside a snippet body.`);this.paramName=paramName;this.name="ParamRefError"}}function resolveSnippetBody(instance,snippet){let{args,missing}=resolveSnippetArgs(snippet,instance.args??{});if(missing.length>0)throw new SnippetParamError(snippet.id,missing[0]);let substituted=substituteSnippetParams(snippet.tree,args);if(substituted.missing.length>0)throw new SnippetParamError(snippet.id,substituted.missing[0]);if(substituted.invalid.length>0){let bad=substituted.invalid[0];throw new SnippetParamError(snippet.id,bad.param,`Snippet "${snippet.id}": param "${bad.param}" resolved to ${bad.valueType==="null"?"null":`a ${bad.valueType}`} but sits in a \`children\` array, where content renders. A string or number there is text and a \`type:"node"\` param is a subtree; to show or hide something by a flag, use {"$if":"${bad.param}","then":\u2026}.`)}let body=substituted.value;if(instance.$overrides)body=applySnippetOverrides(body,instance.$overrides);let extra=instance.$extraClassName?.trim();if(!extra)return body;return applySnippetExtraClassName(body,extra)}function buildTree(node,opts,path=[],stack=[],lockedPath=null,body=null){let identity=resolveNodeIdentity(node,{library:opts.registry});switch(identity.kind){case"snippet":{let instance=identity.node,snippets=opts.snippets;if(!snippets)throw new UnknownSnippetError(instance.$snippet);let snippet=snippets.get(instance.$snippet);if(!snippet)throw new UnknownSnippetError(instance.$snippet);if(stack.includes(snippet.id))throw new SnippetCycleError(snippet.id,stack);let resolved=resolveSnippetBody(instance,snippet);return buildTree(resolved,opts,path,[...stack,snippet.id],lockedPath??path,enterSnippet(body,snippet.id))}case"param":throw new ParamRefError(identity.node.$param);case"text":return import_react.createElement(import_react.Fragment,{key:path.join(".")||"root"},identity.text);case"invalid":throw Error(`buildTree: expected a component, snippet instance, or node param in a node position but got ${JSON.stringify(identity.value)}`);case"repo":return buildRepoNode(identity.node,opts,path,stack,lockedPath,body);case"synthetic":if(identity.ref!==PARAM_TAG_REF)throw new UnknownComponentError(identity.ref);return buildComponentElement(identity.node,ParamTag,opts,path,stack,lockedPath,body);case"unresolved":throw new UnknownComponentError(identity.ref);case"component":return buildComponentElement(identity.node,identity.entry,opts,path,stack,lockedPath,body);case"extension":case"emit-as":{let Component=ownEntry(opts.registry,identity.ref);if(!Component)throw new UnknownComponentError(identity.ref);return buildComponentElement(identity.node,Component,opts,path,stack,lockedPath,body)}}}function buildChild(child,opts,path,stack,lockedPath,body){return isTextNode(child)?child.$text:buildTree(child,opts,path,stack,lockedPath,body)}function textChildrenAttribute(children,lockedPath){if(lockedPath!==null||!children)return{};let at=children.flatMap((child,i)=>!Array.isArray(child)&&nodeShape(child).kind==="text"?[i]:[]);return at.length>0?{[TEXT_CHILDREN_ATTRIBUTE]:at.join(",")}:{}}function buildComponentElement(node,Component,opts,path,stack,lockedPath,body){let{children:childrenProp,...restProps}=node.props??{},dataNodePath=(lockedPath??path).join("."),children;if(Array.isArray(node.children)&&node.children.length>0){if(children=node.children.flatMap((child,i)=>Array.isArray(child)?child.map((c,j)=>buildChild(c,opts,[...path,i,j],stack,lockedPath,null)):buildChild(child,opts,[...path,i],stack,lockedPath,descend(body,i))),Array.isArray(children)&&children.length===1)children=children[0]}else if(childrenProp!==void 0)children=resolvePropChildren(childrenProp,opts,path,stack,lockedPath);return import_react.createElement(Component,{...mapComponentTypes(restProps,(type)=>componentTypeFor(type,opts.registry)),"data-node-path":dataNodePath,...textChildrenAttribute(node.children,lockedPath),...bodyAttributes(body),key:dataNodePath||"root"},children)}function componentTypeFor(type,registry){let identity=resolveNodeIdentity(type,{library:registry});switch(identity.kind){case"component":return identity.entry;case"repo":return;case"extension":case"emit-as":return ownEntry(registry,identity.ref);case"synthetic":case"unresolved":throw new UnknownComponentError(identity.ref);case"snippet":case"param":case"text":case"invalid":return}}function resolvePropChildren(value,opts,path,stack,lockedPath){if(isNode(value))return buildTree(value,opts,path,stack,lockedPath);if(Array.isArray(value))return value.map((item,i)=>{if(!isNode(item))return item;let el=buildTree(item,opts,path,stack,lockedPath);return import_react.cloneElement(el,{key:`inline-${i}`})});return value}function buildRoot(node,opts){return import_react.createElement(import_react.Fragment,null,buildTree(node,opts))}function resolveSnippetBodyForEdit(body,paramDefaults,snippetId){if(isParamRef(body))return paramTagNode(body.$param);if(isSnippetInstance(body))return body;if(!isComponentNode(body))return body;let nextProps=body.props?substituteSnippetParams(body.props,paramDefaults).value:void 0,nextChildren=body.children?.map((c)=>resolveSnippetBodyForEdit(c,paramDefaults,snippetId));return{...body,...nextProps?{props:nextProps}:{},...nextChildren?{children:nextChildren}:{}}}function paramTagNode(name){return{$ref:PARAM_TAG_REF,props:{name}}}function snippetParamPlaceholder(param){if(param.default!==void 0)return param.default;switch(param.type){case"node":return paramTagNode(param.name);case"number":return 0;case"boolean":return!1;case"icon":return"Circle";case"color":return"#7c3aed";case"enum":return param.enum?.[0]??"";default:return`$${param.name}`}}var PARAM_TAG_STYLE={display:"inline-flex",alignItems:"center",alignSelf:"flex-start",borderRadius:"0.375rem",border:"1px dashed var(--color-border, #d4d4d8)",padding:"0.05rem 0.4rem",color:"var(--color-muted-foreground, #71717a)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:"0.75rem",lineHeight:1.6,whiteSpace:"nowrap"};function ParamTag({name,...rest}){return import_react.createElement("span",{...rest,"data-velloo-param":name,style:PARAM_TAG_STYLE},`$${name}`)}function repoProxyInstance(node,snippet){let props=node.props??{},args={};for(let param of snippet.params)if(param.name==="children"&¶m.type==="node"&&node.children?.length)args.children=node.children.length===1?node.children[0]:node.children;else if(param.name in props)args[param.name]=props[param.name];return{$snippet:snippet.id,args}}function buildRepoNode(node,opts,path,stack,lockedPath,body){let proxy=node.$repo.proxy?opts.snippets?.get(node.$repo.proxy):void 0;if(proxy&&!stack.includes(proxy.id))return buildTree(repoProxyInstance(node,proxy),opts,path,stack,lockedPath??path);let dataNodePath=(lockedPath??path).join("."),textChild=node.props?.children,children=node.children&&node.children.length>0?node.children.flatMap((child,i)=>Array.isArray(child)?child.map((c,j)=>buildChild(c,opts,[...path,i,j],stack,lockedPath,null)):buildChild(child,opts,[...path,i],stack,lockedPath,descend(body,i))):typeof textChild==="string"||typeof textChild==="number"?textChild:null;return import_react.createElement(RepoPlaceholder,{label:node.$ref,source:node.$repo.importPath,"data-node-path":dataNodePath,...textChildrenAttribute(node.children,lockedPath),...bodyAttributes(body),key:dataNodePath||"root",children})}var REPO_FRAME_STYLE={position:"relative",border:"1px dashed var(--color-border, #d4d4d8)",borderRadius:"0.5rem",padding:"1.5rem 0.75rem 0.75rem",minHeight:"2.5rem"},REPO_LABEL_STYLE={position:"absolute",top:"0.25rem",left:"0.5rem",color:"var(--color-muted-foreground, #71717a)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:"0.6875rem",lineHeight:1.4,pointerEvents:"none"};function RepoPlaceholder({label,source,children,...rest}){return import_react.createElement("div",{...rest,"data-velloo-repo":label,style:REPO_FRAME_STYLE,title:`${label} from ${source}`},import_react.createElement("span",{style:REPO_LABEL_STYLE},`<${label}>`),children)}var HOST_FILES_PREFIX="/api/host-files",HOST_STYLESHEET_ATTRIBUTE="data-velloo-host-stylesheet";var CANVAS_SETTLED_EVENT="velloo:canvas-settled",CANVAS_RUNTIME=`
|
|
353
300
|
(() => {
|
|
354
301
|
if (window.__velloo_canvas) return;
|
|
355
302
|
window.__velloo_canvas = {};
|
|
@@ -503,915 +450,915 @@ Learn more: https://react.dev/warnings/version-mismatch`));var $renderToReadable
|
|
|
503
450
|
settleOnSsr("a module threw while the bundle loaded: " + String(error && error.message || error));
|
|
504
451
|
});
|
|
505
452
|
})();
|
|
506
|
-
`;var
|
|
453
|
+
`;var LIVE_GATE_MS=6000,LIVE_ISLANDS_MS=5000,LIVE_RUNTIME=`
|
|
507
454
|
(() => {
|
|
508
|
-
if (window.
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
let pendingHover = null;
|
|
512
|
-
|
|
513
|
-
const SELECT_CLASS = '__velloo-selected';
|
|
514
|
-
const HOVER_CLASS = '__velloo-hover';
|
|
515
|
-
|
|
516
|
-
// Inject highlight styles once. The ring is an outline pulled inside the
|
|
517
|
-
// border box by a negative offset: it lands where an inset shadow would,
|
|
518
|
-
// so an element at the iframe edge still shows a whole ring, but outlines
|
|
519
|
-
// paint on top of the stacking context rather than in the element's own
|
|
520
|
-
// background layer. An inset shadow sits *under* the descendants, so
|
|
521
|
-
// selecting anything whose child fills it \u2014 a Card inside the screen root
|
|
522
|
-
// \u2014 hid all but the few pixels the child didn't cover. Outline also leaves
|
|
523
|
-
// the design's own box-shadow alone, which the !important shadow ate.
|
|
524
|
-
const style = document.createElement('style');
|
|
525
|
-
style.textContent =
|
|
526
|
-
// Widths come from custom properties the parent drives with the board
|
|
527
|
-
// zoom via setChromeScale: the iframe is scaled, so a fixed 2px ring grows
|
|
528
|
-
// into a slab that swallows the parent's zoom-constant resize grips.
|
|
529
|
-
":root { --velloo-ring: 2px; --velloo-ring-hover: 1px; --velloo-ring-select: 0px; }" +
|
|
530
|
-
".__velloo-hover { outline: var(--velloo-ring-hover) solid ${HOVER_RING} !important;" +
|
|
531
|
-
" outline-offset: calc(-1 * var(--velloo-ring-hover)) !important; }" +
|
|
532
|
-
// The SELECTION box is normally not drawn here, hence the 0px default. An
|
|
533
|
-
// outline follows the element's border-radius, so on a rounded card the
|
|
534
|
-
// corner grips \u2014 which mark the bounding box a resize drag actually
|
|
535
|
-
// operates on \u2014 floated outside the visible line by radius x 0.29 x zoom.
|
|
536
|
-
// The board draws a square-cornered box in the parent instead and the grips
|
|
537
|
-
// land on it at any radius. Hover stays an outline: it has no handles to
|
|
538
|
-
// agree with, and hugging the real shape reads better for a transient cue.
|
|
539
|
-
// A preview with no grips and no parent overlay \u2014 the snippet editor \u2014 opts
|
|
540
|
-
// in by widening the property (buildDocument's selectionRing option),
|
|
541
|
-
// because a click there would otherwise select silently.
|
|
542
|
-
".__velloo-selected { outline: var(--velloo-ring-select) solid ${SELECT_RING} !important;" +
|
|
543
|
-
" outline-offset: calc(-1 * var(--velloo-ring-select)) !important; }" +
|
|
544
|
-
// Text beside elements has no box to outline, so it is tinted through the
|
|
545
|
-
// highlight registry instead \u2014 which paints the glyphs' own line boxes
|
|
546
|
-
// and adds nothing to the DOM a selector could match.
|
|
547
|
-
"::highlight(velloo-hover) { background-color: color-mix(in srgb, ${HOVER_RING} 22%, transparent); }" +
|
|
548
|
-
"::highlight(velloo-selected) { background-color: color-mix(in srgb, ${SELECT_RING} 30%, transparent); }" +
|
|
549
|
-
// The rest of the screen while a snippet is being edited in place.
|
|
550
|
-
".__velloo-dimmed { opacity: 0.28 !important; filter: saturate(0.4) !important; }" +
|
|
551
|
-
// Scrollable frames need a *visible* affordance: wheel events forward to
|
|
552
|
-
// the canvas (pan), so dragging a bar is the way to scroll \u2014 but macOS
|
|
553
|
-
// overlay scrollbars stay hidden until scrolled, and (verified in real
|
|
554
|
-
// Chrome) neither ::-webkit-scrollbar styling nor the standard
|
|
555
|
-
// properties reliably force persistent bars there. So the runtime draws
|
|
556
|
-
// its own thumb (below) whenever the native bar takes no layout space,
|
|
557
|
-
// and these rules style the native bar on platforms where it does.
|
|
558
|
-
// Standard properties gated away from engines with the webkit pseudo \u2014
|
|
559
|
-
// in Chrome 121+ they'd override and disable the webkit styling.
|
|
560
|
-
"::-webkit-scrollbar { width: 11px; height: 11px; }" +
|
|
561
|
-
"::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }" +
|
|
562
|
-
"::-webkit-scrollbar-thumb { background: rgba(127,127,127,0.55); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }" +
|
|
563
|
-
"::-webkit-scrollbar-thumb:hover { background: rgba(127,127,127,0.85); }" +
|
|
564
|
-
"@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: rgba(127,127,127,0.55) transparent; } }" +
|
|
565
|
-
".__velloo-scrollthumb { position: fixed; right: 2px; width: 9px; border-radius: 999px;" +
|
|
566
|
-
" background: rgba(127,127,127,0.55); box-shadow: 0 0 0 1px rgba(255,255,255,0.35);" +
|
|
567
|
-
" z-index: 2147483646; display: none; }" +
|
|
568
|
-
".__velloo-scrollthumb:hover, .__velloo-scrollthumb[data-dragging] { background: rgba(127,127,127,0.9); }";
|
|
569
|
-
document.head.appendChild(style);
|
|
570
|
-
|
|
571
|
-
// Persistent scroll indicator, drawn by the runtime (design-mode only).
|
|
572
|
-
// Hidden automatically on platforms whose native scrollbar already takes
|
|
573
|
-
// layout space (classic bars are visible there \u2014 no need to double up).
|
|
574
|
-
const thumb = document.createElement('div');
|
|
575
|
-
thumb.className = '__velloo-scrollthumb';
|
|
576
|
-
thumb.setAttribute('aria-hidden', 'true');
|
|
577
|
-
document.body.appendChild(thumb);
|
|
578
|
-
|
|
579
|
-
const TRACK_PAD = 2;
|
|
580
|
-
function scroller() {
|
|
581
|
-
return document.scrollingElement || document.documentElement;
|
|
582
|
-
}
|
|
455
|
+
if (window.__velloo_live) return;
|
|
456
|
+
window.__velloo_live = { ready: false };
|
|
457
|
+
const BUNDLE_URL = __VELLOO_LIVE_BUNDLE_URL__;
|
|
583
458
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
if (sh - vh < 24 || nativeVisible) {
|
|
592
|
-
thumb.style.display = 'none';
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
const trackH = vh - TRACK_PAD * 2;
|
|
596
|
-
const h = Math.max(28, trackH * (vh / sh));
|
|
597
|
-
const maxTop = trackH - h;
|
|
598
|
-
const top = TRACK_PAD + maxTop * (se.scrollTop / (sh - vh));
|
|
599
|
-
thumb.style.display = 'block';
|
|
600
|
-
thumb.style.height = h + 'px';
|
|
601
|
-
thumb.style.top = top + 'px';
|
|
459
|
+
// Each mount pass owns the flag only while it is the latest one: a pass
|
|
460
|
+
// superseded by a late canvas commit must not open the gate for its
|
|
461
|
+
// successor.
|
|
462
|
+
var pass = 0;
|
|
463
|
+
function setReady(value) {
|
|
464
|
+
window.__velloo_live_ready = value;
|
|
465
|
+
window.__velloo_live.ready = value;
|
|
602
466
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
window.addEventListener('resize', syncThumb, { passive: true });
|
|
606
|
-
// Content height changes after fonts/images land; track the document itself.
|
|
607
|
-
if (window.ResizeObserver) {
|
|
608
|
-
new ResizeObserver(syncThumb).observe(document.documentElement);
|
|
467
|
+
function markReady(run) {
|
|
468
|
+
if (run === pass) setReady(true);
|
|
609
469
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
//
|
|
613
|
-
//
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
470
|
+
// Measure the content the real component rendered into a marker's overlay
|
|
471
|
+
// mount and reserve it as the marker's height. Only for fit:"content"
|
|
472
|
+
// markers (aspect-video locks its own ratio). The mount is out of flow
|
|
473
|
+
// (absolute; inset:0), so without this the marker would only be as tall as
|
|
474
|
+
// the hidden skeleton \u2014 charts overflow their card and the page captures
|
|
475
|
+
// short.
|
|
476
|
+
//
|
|
477
|
+
// We measure the union of the mounted CHILDREN's boxes, not the overlay's
|
|
478
|
+
// own scrollHeight: an inset:0 overlay's client box is pinned to the
|
|
479
|
+
// marker's height, so its scrollHeight reads back the marker height (or the
|
|
480
|
+
// viewport) and would over-reserve. The children's intrinsic extent is the
|
|
481
|
+
// real chart height. No-op if it would shrink the marker (never reserve
|
|
482
|
+
// LESS than already laid out).
|
|
483
|
+
function reserveContentHeight(marker) {
|
|
484
|
+
if (marker.getAttribute('data-live-fit') !== 'content') return;
|
|
485
|
+
var mount = marker.querySelector('[data-live-mount]');
|
|
486
|
+
if (!mount) return;
|
|
487
|
+
var mountTop = mount.getBoundingClientRect().top;
|
|
488
|
+
var measured = 0;
|
|
489
|
+
var kids = mount.children;
|
|
490
|
+
for (var i = 0; i < kids.length; i++) {
|
|
491
|
+
var r = kids[i].getBoundingClientRect();
|
|
492
|
+
var bottom = r.bottom - mountTop;
|
|
493
|
+
if (bottom > measured) measured = bottom;
|
|
621
494
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
const ratio = (se.scrollHeight - vh) / Math.max(1, trackH - thumb.offsetHeight);
|
|
629
|
-
const move = (e) => {
|
|
630
|
-
se.scrollTop = startTop + (e.clientY - startY) * ratio;
|
|
631
|
-
};
|
|
632
|
-
const up = () => {
|
|
633
|
-
thumb.removeAttribute('data-dragging');
|
|
634
|
-
thumb.removeEventListener('pointermove', move);
|
|
635
|
-
thumb.removeEventListener('pointerup', up);
|
|
636
|
-
thumb.removeEventListener('pointercancel', up);
|
|
637
|
-
};
|
|
638
|
-
thumb.addEventListener('pointermove', move);
|
|
639
|
-
thumb.addEventListener('pointerup', up);
|
|
640
|
-
thumb.addEventListener('pointercancel', up);
|
|
641
|
-
});
|
|
495
|
+
measured = Math.ceil(measured);
|
|
496
|
+
if (measured <= 0) return;
|
|
497
|
+
var current = marker.getBoundingClientRect().height;
|
|
498
|
+
if (measured <= current) return;
|
|
499
|
+
marker.style.minHeight = measured + 'px';
|
|
500
|
+
}
|
|
642
501
|
|
|
643
|
-
//
|
|
644
|
-
//
|
|
645
|
-
//
|
|
646
|
-
//
|
|
647
|
-
//
|
|
648
|
-
//
|
|
649
|
-
//
|
|
650
|
-
//
|
|
651
|
-
//
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
502
|
+
// Wait until the island subtrees stop mutating, then mark ready. Charts
|
|
503
|
+
// animate their SVG via JS (recharts/react-smooth), which the CSS freeze
|
|
504
|
+
// below can't stop \u2014 a fixed 2-frame wait would capture a mid-entry frame
|
|
505
|
+
// (a Pie tweening from radius 0 reads as *empty*). Quiescence-detection
|
|
506
|
+
// lands the real final frame instead, and also covers a measure-then-
|
|
507
|
+
// rerender lib (ResponsiveContainer). Bounded by the pass's deadline so a
|
|
508
|
+
// looping animation that never quiesces still flips ready.
|
|
509
|
+
//
|
|
510
|
+
// After quiescence we ALSO require marker heights to be stable across two
|
|
511
|
+
// consecutive animation frames before flipping ready. A multi-island grid
|
|
512
|
+
// reflows asynchronously (ResponsiveContainer self-measures post-mount,
|
|
513
|
+
// lower rows settle later); DOM-quiescence alone could flip ready while a
|
|
514
|
+
// marker is still resizing, so the screenshot would measure a stale rect.
|
|
515
|
+
// Re-reserving fit:"content" heights on each stability check also lets a
|
|
516
|
+
// late reflow grow the reservation. Still bounded by the deadline so a
|
|
517
|
+
// never-quiescing loop can't hang the gate.
|
|
518
|
+
function settle(run, markers, deadline) {
|
|
519
|
+
var QUIET_MS = 250;
|
|
520
|
+
var lastMutation = Date.now();
|
|
521
|
+
var observer = new MutationObserver(function () {
|
|
522
|
+
lastMutation = Date.now();
|
|
523
|
+
});
|
|
524
|
+
markers.forEach(function (m) {
|
|
525
|
+
observer.observe(m, { subtree: true, childList: true, attributes: true });
|
|
526
|
+
});
|
|
527
|
+
function markerHeights() {
|
|
528
|
+
return markers.map(function (m) {
|
|
529
|
+
return Math.round(m.getBoundingClientRect().height);
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function sameHeights(a, b) {
|
|
533
|
+
if (a.length !== b.length) return false;
|
|
534
|
+
for (var i = 0; i < a.length; i++) {
|
|
535
|
+
if (a[i] !== b[i]) return false;
|
|
536
|
+
}
|
|
537
|
+
return true;
|
|
538
|
+
}
|
|
539
|
+
var prevHeights = null;
|
|
540
|
+
function tick() {
|
|
541
|
+
var now = Date.now();
|
|
542
|
+
if (run !== pass) { observer.disconnect(); return; }
|
|
543
|
+
var deadlineHit = now >= deadline;
|
|
544
|
+
if (now - lastMutation >= QUIET_MS || deadlineHit) {
|
|
545
|
+
// DOM is quiet (or we hit the deadline). Reserve content height, then
|
|
546
|
+
// confirm the layout has actually stopped moving across two frames.
|
|
547
|
+
markers.forEach(reserveContentHeight);
|
|
548
|
+
var heights = markerHeights();
|
|
549
|
+
if (deadlineHit || (prevHeights !== null && sameHeights(prevHeights, heights))) {
|
|
550
|
+
observer.disconnect();
|
|
551
|
+
markReady(run);
|
|
552
|
+
return;
|
|
660
553
|
}
|
|
554
|
+
prevHeights = heights;
|
|
555
|
+
} else {
|
|
556
|
+
// A mutation reset the quiet window \u2014 restart the stability check.
|
|
557
|
+
prevHeights = null;
|
|
661
558
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
559
|
+
requestAnimationFrame(tick);
|
|
560
|
+
}
|
|
561
|
+
requestAnimationFrame(tick);
|
|
665
562
|
}
|
|
666
563
|
|
|
667
|
-
// The
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
564
|
+
// The tree that owns the screen: the canvas mount's root once it has
|
|
565
|
+
// committed (the server render is hidden and stripped of identity by then),
|
|
566
|
+
// the server render otherwise \u2014 before the commit, after a fallback, or on a
|
|
567
|
+
// page with no mount at all.
|
|
568
|
+
function owner() {
|
|
569
|
+
var root = document.getElementById('velloo-canvas-root');
|
|
570
|
+
var ssr = document.getElementById('velloo-ssr');
|
|
571
|
+
if (root && ssr && ssr.style.display === 'none') return root;
|
|
572
|
+
return ssr || document;
|
|
674
573
|
}
|
|
675
574
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
575
|
+
var mountedIn = null;
|
|
576
|
+
|
|
577
|
+
function mountIslands() {
|
|
578
|
+
var run = ++pass;
|
|
579
|
+
mountedIn = owner();
|
|
580
|
+
var markers = Array.prototype.slice.call(mountedIn.querySelectorAll('[data-live-node]'));
|
|
581
|
+
if (markers.length === 0) { markReady(run); return; }
|
|
582
|
+
setReady(false);
|
|
583
|
+
mount(run, markers);
|
|
680
584
|
}
|
|
681
585
|
|
|
682
|
-
//
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
586
|
+
// Bounded gate on the canvas mount, which settles (commit or fallback) with
|
|
587
|
+
// an event. The only way to reach GATE_MS is a bundle that has done neither
|
|
588
|
+
// yet; the islands then mount into the server render, and the listener stays
|
|
589
|
+
// so a later settle that moves ownership remounts them where the screen is.
|
|
590
|
+
function awaitCanvasMount() {
|
|
591
|
+
var GATE_MS = ${LIVE_GATE_MS};
|
|
592
|
+
var gateTimer = null;
|
|
593
|
+
window.addEventListener(${JSON.stringify(CANVAS_SETTLED_EVENT)}, function () {
|
|
594
|
+
if (gateTimer !== null) {
|
|
595
|
+
clearTimeout(gateTimer);
|
|
596
|
+
gateTimer = null;
|
|
597
|
+
mountIslands();
|
|
598
|
+
} else if (mountedIn !== null && owner() !== mountedIn) {
|
|
599
|
+
mountIslands();
|
|
694
600
|
}
|
|
695
|
-
}
|
|
696
|
-
return
|
|
601
|
+
});
|
|
602
|
+
if (window.__velloo_canvas_ready === true) { mountIslands(); return; }
|
|
603
|
+
gateTimer = setTimeout(function () {
|
|
604
|
+
gateTimer = null;
|
|
605
|
+
mountIslands();
|
|
606
|
+
}, GATE_MS);
|
|
697
607
|
}
|
|
698
608
|
|
|
699
|
-
|
|
700
|
-
function
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
const at = found.indices.indexOf(str.slice(cut + 1));
|
|
708
|
-
return at === -1 ? null : { parent: parent, node: found.nodes[at] };
|
|
609
|
+
var frozen = false;
|
|
610
|
+
function freezeAnimation() {
|
|
611
|
+
if (frozen) return;
|
|
612
|
+
frozen = true;
|
|
613
|
+
const freeze = document.createElement('style');
|
|
614
|
+
freeze.textContent =
|
|
615
|
+
'[data-live-node] *, .recharts-layer, .recharts-surface * { animation: none !important; transition: none !important; }';
|
|
616
|
+
document.head.appendChild(freeze);
|
|
709
617
|
}
|
|
710
618
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
if (!target) return null;
|
|
715
|
-
let el = target;
|
|
716
|
-
while (el && el.nodeType === 1) {
|
|
717
|
-
const p = el.getAttribute && el.getAttribute('data-node-path');
|
|
718
|
-
if (p !== null && p !== undefined) {
|
|
719
|
-
const text = point ? textPathAt(el, point.clientX, point.clientY) : null;
|
|
720
|
-
return text === null ? p : text;
|
|
721
|
-
}
|
|
722
|
-
el = el.parentElement;
|
|
723
|
-
}
|
|
724
|
-
return null;
|
|
725
|
-
}
|
|
619
|
+
function mount(run, markers) {
|
|
620
|
+
// Freeze chart animation so screenshots capture the final frame.
|
|
621
|
+
freezeAnimation();
|
|
726
622
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
623
|
+
// One deadline for the whole pass \u2014 bundle import, every mount, settling \u2014
|
|
624
|
+
// and a timer that flips the flag at it even if the import hangs, so the
|
|
625
|
+
// pass can never outlast LIVE_ISLANDS_MS.
|
|
626
|
+
var ISLANDS_MS = ${LIVE_ISLANDS_MS};
|
|
627
|
+
var deadline = Date.now() + ISLANDS_MS;
|
|
628
|
+
setTimeout(function () { markReady(run); }, ISLANDS_MS);
|
|
731
629
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
return p === null ? undefined : p;
|
|
739
|
-
}
|
|
740
|
-
// The root of an instance nested in the focused snippet's body: its own
|
|
741
|
-
// snippet re-roots the path, and \`data-snippet-at\` keeps where it sits.
|
|
742
|
-
const at = el.getAttribute && el.getAttribute('data-snippet-at');
|
|
743
|
-
if (at) {
|
|
744
|
-
const token = at.split(' ').find((t) => t.startsWith(focusedSnippet + '#'));
|
|
745
|
-
if (token !== undefined) return token.slice(focusedSnippet.length + 1);
|
|
746
|
-
}
|
|
747
|
-
el = el.parentElement;
|
|
748
|
-
}
|
|
749
|
-
return undefined;
|
|
750
|
-
}
|
|
630
|
+
import(BUNDLE_URL)
|
|
631
|
+
.then(function (mod) {
|
|
632
|
+
if (!mod || !mod.components) {
|
|
633
|
+
settle(run, markers, deadline);
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
751
636
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
637
|
+
const mounts = markers.map(function (marker) {
|
|
638
|
+
return new Promise(function (resolve) {
|
|
639
|
+
// Already mounted by an earlier pass over this same tree.
|
|
640
|
+
if (marker.querySelector(':scope > [data-live-mount]')) { resolve(); return; }
|
|
641
|
+
const ref = marker.getAttribute('data-live-ref');
|
|
642
|
+
const Comp = ref && mod.components[ref];
|
|
643
|
+
// A multi-app loader exports a per-island runtime map \u2014 each
|
|
644
|
+
// island must mount with ITS host app's React copy. A single-app
|
|
645
|
+
// bundle exports React/createRoot at the top level (mod itself).
|
|
646
|
+
const rt = (mod.runtimes && ref && mod.runtimes[ref]) || mod;
|
|
647
|
+
if (!Comp || typeof rt.createRoot !== 'function' || !rt.React) { resolve(); return; }
|
|
648
|
+
const React = rt.React;
|
|
649
|
+
const createRoot = rt.createRoot;
|
|
650
|
+
const ErrorBoundary = rt.ErrorBoundary;
|
|
762
651
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
while (el && el.nodeType === 1) {
|
|
766
|
-
const id = el.getAttribute && el.getAttribute('data-snippet-id');
|
|
767
|
-
if (id) return id;
|
|
768
|
-
el = el.parentElement;
|
|
769
|
-
}
|
|
770
|
-
return undefined;
|
|
771
|
-
}
|
|
652
|
+
let props = {};
|
|
653
|
+
try { props = JSON.parse(marker.getAttribute('data-live-props') || '{}'); } catch (e) {}
|
|
772
654
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
655
|
+
const skeleton = marker.querySelector('[data-velloo-extension]');
|
|
656
|
+
const overlay = document.createElement('div');
|
|
657
|
+
overlay.setAttribute('data-live-mount', '');
|
|
658
|
+
overlay.style.cssText = 'position:absolute;inset:0;pointer-events:none;';
|
|
659
|
+
marker.appendChild(overlay);
|
|
660
|
+
|
|
661
|
+
const root = createRoot(overlay);
|
|
662
|
+
|
|
663
|
+
function onMounted() {
|
|
664
|
+
if (skeleton) skeleton.style.visibility = 'hidden';
|
|
665
|
+
resolve();
|
|
666
|
+
}
|
|
667
|
+
function onError() {
|
|
668
|
+
// Defer DOM teardown out of React's commit phase.
|
|
669
|
+
setTimeout(function () {
|
|
670
|
+
try { root.unmount(); } catch (e) {}
|
|
671
|
+
if (overlay.parentNode) overlay.parentNode.removeChild(overlay);
|
|
672
|
+
if (skeleton) skeleton.style.visibility = '';
|
|
673
|
+
}, 0);
|
|
674
|
+
resolve();
|
|
675
|
+
}
|
|
676
|
+
function Mounted() {
|
|
677
|
+
React.useEffect(function () { onMounted(); }, []);
|
|
678
|
+
return React.createElement(Comp, props);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
root.render(
|
|
682
|
+
React.createElement(
|
|
683
|
+
ErrorBoundary,
|
|
684
|
+
{ onError: onError },
|
|
685
|
+
React.createElement(Mounted, null),
|
|
686
|
+
),
|
|
687
|
+
);
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
Promise.allSettled(mounts).then(function () {
|
|
692
|
+
settle(run, markers, deadline);
|
|
693
|
+
});
|
|
694
|
+
})
|
|
695
|
+
.catch(function () {
|
|
696
|
+
settle(run, markers, deadline);
|
|
697
|
+
});
|
|
807
698
|
}
|
|
808
699
|
|
|
809
|
-
// The
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
700
|
+
// The canvas payload sits AFTER this script in the document, so whether the
|
|
701
|
+
// page has a mount is only knowable once parsing finishes.
|
|
702
|
+
function begin() {
|
|
703
|
+
if (document.getElementById('velloo-canvas-data')) awaitCanvasMount();
|
|
704
|
+
else mountIslands();
|
|
705
|
+
}
|
|
706
|
+
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', begin);
|
|
707
|
+
else begin();
|
|
708
|
+
})();
|
|
709
|
+
`;var NO_RUNTIMES={live:!1,canvas:!1},READY_SLACK_MS=1000,READY_TIMEOUT_MS=LIVE_GATE_MS+LIVE_ISLANDS_MS+READY_SLACK_MS;async function runtimesOf(target){return target.evaluate(()=>({live:document.querySelector("[data-live-node]")!==null,canvas:document.getElementById("velloo-canvas-data")!==null})).catch(()=>NO_RUNTIMES)}async function waitForRuntimes(target,runtimes){if(!runtimes.live&&!runtimes.canvas)return;await target.waitForFunction((want)=>{let w=window;return(!want.live||w.__velloo_live_ready===!0)&&(!want.canvas||w.__velloo_canvas_ready===!0)},runtimes,{timeout:READY_TIMEOUT_MS}).catch(()=>{})}async function missingHostStylesheets(target,html){if(!html.includes(HOST_STYLESHEET_ATTRIBUTE))return;return target.evaluate((attribute)=>[...document.querySelectorAll(`link[${attribute}]`)].flatMap((link)=>{let entry=performance.getEntriesByName(link.href)[0];if(!entry)return[];let status=entry.responseStatus??0,sameOrigin=new URL(link.href).origin===location.origin;return status>=400||sameOrigin&&status===0?[`${status||"blocked"} stylesheet ${link.getAttribute(attribute)}`]:[]}),HOST_STYLESHEET_ATTRIBUTE).catch(()=>{return})}async function waitForFonts(target){await target.evaluate(()=>Promise.race([document.fonts.ready,new Promise((r)=>setTimeout(r,2000))])).catch(()=>{})}async function settleDocument(target){await waitForFonts(target),await waitForRuntimes(target,await runtimesOf(target))}async function settleForCapture(page){await page.waitForLoadState("load",{timeout:5000}).catch(()=>{});let children=page.frames().filter((frame)=>frame!==page.mainFrame());await Promise.all([settleDocument(page),...children.map(settleDocument)]),await Promise.all(page.frames().map(removeEditingChrome))}async function removeEditingChrome(frame){await frame.evaluate(()=>{for(let thumb of document.querySelectorAll(".__velloo-scrollthumb"))thumb.remove()}).catch(()=>{})}var PROTOCOL_VERSION=1,SELECT_RING="#2563eb";var HOVER_RING="#60a5fa";var RENDER_ERROR_META="velloo-render-error",COMPUTED_PROPS=["fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","textAlign","color","backgroundColor","borderTopWidth","borderTopColor","borderTopLeftRadius","paddingTop","paddingRight","paddingBottom","paddingLeft","marginTop","marginRight","marginBottom","marginLeft","columnGap"];var IFRAME_RUNTIME=String.raw`
|
|
710
|
+
(() => {
|
|
711
|
+
if (window.__velloo) return;
|
|
712
|
+
const PROTOCOL_VERSION = ${PROTOCOL_VERSION};
|
|
713
|
+
let port = null;
|
|
714
|
+
let pendingHover = null;
|
|
814
715
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
716
|
+
const SELECT_CLASS = '__velloo-selected';
|
|
717
|
+
const HOVER_CLASS = '__velloo-hover';
|
|
718
|
+
|
|
719
|
+
// Inject highlight styles once. The ring is an outline pulled inside the
|
|
720
|
+
// border box by a negative offset: it lands where an inset shadow would,
|
|
721
|
+
// so an element at the iframe edge still shows a whole ring, but outlines
|
|
722
|
+
// paint on top of the stacking context rather than in the element's own
|
|
723
|
+
// background layer. An inset shadow sits *under* the descendants, so
|
|
724
|
+
// selecting anything whose child fills it \u2014 a Card inside the screen root
|
|
725
|
+
// \u2014 hid all but the few pixels the child didn't cover. Outline also leaves
|
|
726
|
+
// the design's own box-shadow alone, which the !important shadow ate.
|
|
727
|
+
const style = document.createElement('style');
|
|
728
|
+
style.textContent =
|
|
729
|
+
// Widths come from custom properties the parent drives with the board
|
|
730
|
+
// zoom via setChromeScale: the iframe is scaled, so a fixed 2px ring grows
|
|
731
|
+
// into a slab that swallows the parent's zoom-constant resize grips.
|
|
732
|
+
":root { --velloo-ring: 2px; --velloo-ring-hover: 1px; --velloo-ring-select: 0px; }" +
|
|
733
|
+
".__velloo-hover { outline: var(--velloo-ring-hover) solid ${HOVER_RING} !important;" +
|
|
734
|
+
" outline-offset: calc(-1 * var(--velloo-ring-hover)) !important; }" +
|
|
735
|
+
// The SELECTION box is normally not drawn here, hence the 0px default. An
|
|
736
|
+
// outline follows the element's border-radius, so on a rounded card the
|
|
737
|
+
// corner grips \u2014 which mark the bounding box a resize drag actually
|
|
738
|
+
// operates on \u2014 floated outside the visible line by radius x 0.29 x zoom.
|
|
739
|
+
// The board draws a square-cornered box in the parent instead and the grips
|
|
740
|
+
// land on it at any radius. Hover stays an outline: it has no handles to
|
|
741
|
+
// agree with, and hugging the real shape reads better for a transient cue.
|
|
742
|
+
// A preview with no grips and no parent overlay \u2014 the snippet editor \u2014 opts
|
|
743
|
+
// in by widening the property (buildDocument's selectionRing option),
|
|
744
|
+
// because a click there would otherwise select silently.
|
|
745
|
+
".__velloo-selected { outline: var(--velloo-ring-select) solid ${SELECT_RING} !important;" +
|
|
746
|
+
" outline-offset: calc(-1 * var(--velloo-ring-select)) !important; }" +
|
|
747
|
+
// Text beside elements has no box to outline, so it is tinted through the
|
|
748
|
+
// highlight registry instead \u2014 which paints the glyphs' own line boxes
|
|
749
|
+
// and adds nothing to the DOM a selector could match.
|
|
750
|
+
"::highlight(velloo-hover) { background-color: color-mix(in srgb, ${HOVER_RING} 22%, transparent); }" +
|
|
751
|
+
"::highlight(velloo-selected) { background-color: color-mix(in srgb, ${SELECT_RING} 30%, transparent); }" +
|
|
752
|
+
// The rest of the screen while a snippet is being edited in place.
|
|
753
|
+
".__velloo-dimmed { opacity: 0.28 !important; filter: saturate(0.4) !important; }" +
|
|
754
|
+
// Scrollable frames need a *visible* affordance: wheel events forward to
|
|
755
|
+
// the canvas (pan), so dragging a bar is the way to scroll \u2014 but macOS
|
|
756
|
+
// overlay scrollbars stay hidden until scrolled, and (verified in real
|
|
757
|
+
// Chrome) neither ::-webkit-scrollbar styling nor the standard
|
|
758
|
+
// properties reliably force persistent bars there. So the runtime draws
|
|
759
|
+
// its own thumb (below) whenever the native bar takes no layout space,
|
|
760
|
+
// and these rules style the native bar on platforms where it does.
|
|
761
|
+
// Standard properties gated away from engines with the webkit pseudo \u2014
|
|
762
|
+
// in Chrome 121+ they'd override and disable the webkit styling.
|
|
763
|
+
"::-webkit-scrollbar { width: 11px; height: 11px; }" +
|
|
764
|
+
"::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }" +
|
|
765
|
+
"::-webkit-scrollbar-thumb { background: rgba(127,127,127,0.55); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }" +
|
|
766
|
+
"::-webkit-scrollbar-thumb:hover { background: rgba(127,127,127,0.85); }" +
|
|
767
|
+
"@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: rgba(127,127,127,0.55) transparent; } }" +
|
|
768
|
+
".__velloo-scrollthumb { position: fixed; right: 2px; width: 9px; border-radius: 999px;" +
|
|
769
|
+
" background: rgba(127,127,127,0.55); box-shadow: 0 0 0 1px rgba(255,255,255,0.35);" +
|
|
770
|
+
" z-index: 2147483646; display: none; }" +
|
|
771
|
+
".__velloo-scrollthumb:hover, .__velloo-scrollthumb[data-dragging] { background: rgba(127,127,127,0.9); }";
|
|
772
|
+
document.head.appendChild(style);
|
|
773
|
+
|
|
774
|
+
// Persistent scroll indicator, drawn by the runtime (design-mode only).
|
|
775
|
+
// Hidden automatically on platforms whose native scrollbar already takes
|
|
776
|
+
// layout space (classic bars are visible there \u2014 no need to double up).
|
|
777
|
+
const thumb = document.createElement('div');
|
|
778
|
+
thumb.className = '__velloo-scrollthumb';
|
|
779
|
+
thumb.setAttribute('aria-hidden', 'true');
|
|
780
|
+
document.body.appendChild(thumb);
|
|
781
|
+
|
|
782
|
+
const TRACK_PAD = 2;
|
|
783
|
+
function scroller() {
|
|
784
|
+
return document.scrollingElement || document.documentElement;
|
|
818
785
|
}
|
|
819
786
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
787
|
+
function syncThumb() {
|
|
788
|
+
const se = scroller();
|
|
789
|
+
const vh = window.innerHeight;
|
|
790
|
+
const sh = se.scrollHeight;
|
|
791
|
+
const nativeVisible = window.innerWidth - document.documentElement.clientWidth > 0;
|
|
792
|
+
// A few px of overflow (sub-pixel rounding, trailing margins) doesn't
|
|
793
|
+
// warrant a thumb \u2014 only show when there's meaningful scroll range.
|
|
794
|
+
if (sh - vh < 24 || nativeVisible) {
|
|
795
|
+
thumb.style.display = 'none';
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
const trackH = vh - TRACK_PAD * 2;
|
|
799
|
+
const h = Math.max(28, trackH * (vh / sh));
|
|
800
|
+
const maxTop = trackH - h;
|
|
801
|
+
const top = TRACK_PAD + maxTop * (se.scrollTop / (sh - vh));
|
|
802
|
+
thumb.style.display = 'block';
|
|
803
|
+
thumb.style.height = h + 'px';
|
|
804
|
+
thumb.style.top = top + 'px';
|
|
828
805
|
}
|
|
829
806
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
807
|
+
window.addEventListener('scroll', syncThumb, { passive: true });
|
|
808
|
+
window.addEventListener('resize', syncThumb, { passive: true });
|
|
809
|
+
// Content height changes after fonts/images land; track the document itself.
|
|
810
|
+
if (window.ResizeObserver) {
|
|
811
|
+
new ResizeObserver(syncThumb).observe(document.documentElement);
|
|
834
812
|
}
|
|
813
|
+
syncThumb();
|
|
835
814
|
|
|
836
|
-
//
|
|
837
|
-
//
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
815
|
+
// Drag the thumb to scroll. stopPropagation keeps the capture-phase click
|
|
816
|
+
// reporter from treating the gesture as a selection attempt.
|
|
817
|
+
thumb.addEventListener('pointerdown', (ev) => {
|
|
818
|
+
ev.preventDefault();
|
|
819
|
+
ev.stopPropagation();
|
|
820
|
+
try {
|
|
821
|
+
thumb.setPointerCapture(ev.pointerId);
|
|
822
|
+
} catch {
|
|
823
|
+
// synthetic events carry no active pointer; drag still tracks below
|
|
824
|
+
}
|
|
825
|
+
thumb.setAttribute('data-dragging', '');
|
|
826
|
+
const se = scroller();
|
|
827
|
+
const vh = window.innerHeight;
|
|
828
|
+
const startY = ev.clientY;
|
|
829
|
+
const startTop = se.scrollTop;
|
|
830
|
+
const trackH = vh - TRACK_PAD * 2;
|
|
831
|
+
const ratio = (se.scrollHeight - vh) / Math.max(1, trackH - thumb.offsetHeight);
|
|
832
|
+
const move = (e) => {
|
|
833
|
+
se.scrollTop = startTop + (e.clientY - startY) * ratio;
|
|
834
|
+
};
|
|
835
|
+
const up = () => {
|
|
836
|
+
thumb.removeAttribute('data-dragging');
|
|
837
|
+
thumb.removeEventListener('pointermove', move);
|
|
838
|
+
thumb.removeEventListener('pointerup', up);
|
|
839
|
+
thumb.removeEventListener('pointercancel', up);
|
|
840
|
+
};
|
|
841
|
+
thumb.addEventListener('pointermove', move);
|
|
842
|
+
thumb.addEventListener('pointerup', up);
|
|
843
|
+
thumb.addEventListener('pointercancel', up);
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
// \u2500\u2500 Text beside elements \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
847
|
+
// A text node renders as a bare DOM text node: no wrapper, so the design's
|
|
848
|
+
// DOM is the app's and no selector can tell them apart. That leaves it with
|
|
849
|
+
// no element to carry a path. Its parent says which of its children are text
|
|
850
|
+
// (data-node-text="0,2"), and the DOM text nodes that are the parent's own \u2014
|
|
851
|
+
// not inside a child with a path of its own \u2014 are those children, in order.
|
|
852
|
+
// When the counts disagree (a component that writes text of its own around
|
|
853
|
+
// its children) there is no telling which is which, and the text selects as
|
|
854
|
+
// its parent \u2014 what it did before text nodes existed.
|
|
855
|
+
function ownTextNodes(el) {
|
|
841
856
|
const out = [];
|
|
842
|
-
|
|
843
|
-
let
|
|
844
|
-
|
|
845
|
-
|
|
857
|
+
const walk = (node) => {
|
|
858
|
+
for (let child = node.firstChild; child; child = child.nextSibling) {
|
|
859
|
+
if (child.nodeType === 3) {
|
|
860
|
+
if (child.data !== '') out.push(child);
|
|
861
|
+
} else if (child.nodeType === 1 && !child.hasAttribute('data-node-path')) {
|
|
862
|
+
walk(child);
|
|
863
|
+
}
|
|
846
864
|
}
|
|
847
|
-
|
|
848
|
-
|
|
865
|
+
};
|
|
866
|
+
walk(el);
|
|
849
867
|
return out;
|
|
850
868
|
}
|
|
851
869
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
if (
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
} else if (path !== null && path !== undefined) {
|
|
860
|
-
els = document.querySelectorAll(pathSelector(path));
|
|
861
|
-
const text = els.length === 0 ? textNodeFor(path) : null;
|
|
862
|
-
if (text) {
|
|
863
|
-
if (highlights) highlights.set(highlightName(cls), new Highlight(rangeOf(text.node)));
|
|
864
|
-
if (scroll) text.parent.scrollIntoView({ block: 'center', inline: 'nearest' });
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
} else {
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
// Every element inside a snippet body reports the *instance* path, so a
|
|
871
|
-
// plain match would ring all of them. Only the outermost of each nesting
|
|
872
|
-
// chain is the thing the user picked.
|
|
873
|
-
let first = null;
|
|
874
|
-
for (let i = 0; i < els.length; i++) {
|
|
875
|
-
const el = els[i];
|
|
876
|
-
if (el.parentElement && el.parentElement.closest('.' + cls)) continue;
|
|
877
|
-
el.classList.add(cls);
|
|
878
|
-
if (first === null) first = el;
|
|
879
|
-
}
|
|
880
|
-
if (scroll && first) first.scrollIntoView({ block: 'center', inline: 'nearest' });
|
|
870
|
+
// The parent element's text children: their child indices and DOM nodes.
|
|
871
|
+
function textChildren(el) {
|
|
872
|
+
const raw = el.getAttribute && el.getAttribute('data-node-text');
|
|
873
|
+
if (!raw) return null;
|
|
874
|
+
const indices = raw.split(',');
|
|
875
|
+
const nodes = ownTextNodes(el);
|
|
876
|
+
return nodes.length === indices.length ? { indices: indices, nodes: nodes } : null;
|
|
881
877
|
}
|
|
882
878
|
|
|
883
|
-
function
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
.forEach((el) => el.removeAttribute('data-velloo-state'));
|
|
888
|
-
if (!state || state === 'default' || path === null || path === undefined) return;
|
|
889
|
-
const el = document.querySelector(pathSelector(path));
|
|
890
|
-
if (el) el.setAttribute('data-velloo-state', state);
|
|
879
|
+
function rangeOf(textNode) {
|
|
880
|
+
const range = document.createRange();
|
|
881
|
+
range.selectNodeContents(textNode);
|
|
882
|
+
return range;
|
|
891
883
|
}
|
|
892
884
|
|
|
893
|
-
//
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
reportRects(lastRectPaths, lastRectSnippetPaths);
|
|
909
|
-
}, 80);
|
|
885
|
+
// The text child of \`el\` under the pointer, as a path, or null.
|
|
886
|
+
function textPathAt(el, x, y) {
|
|
887
|
+
const found = textChildren(el);
|
|
888
|
+
if (!found) return null;
|
|
889
|
+
for (let i = 0; i < found.nodes.length; i++) {
|
|
890
|
+
const rects = rangeOf(found.nodes[i]).getClientRects();
|
|
891
|
+
for (let j = 0; j < rects.length; j++) {
|
|
892
|
+
const r = rects[j];
|
|
893
|
+
if (x >= r.left && x <= r.right && y >= r.top && y <= r.bottom) {
|
|
894
|
+
const base = el.getAttribute('data-node-path');
|
|
895
|
+
return (base === '' ? '' : base + '.') + found.indices[i];
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
return null;
|
|
910
900
|
}
|
|
911
901
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
902
|
+
// A text node's path, resolved to its DOM node and the element it sits in.
|
|
903
|
+
function textNodeFor(path) {
|
|
904
|
+
const str = String(path);
|
|
905
|
+
if (str === '') return null;
|
|
906
|
+
const cut = str.lastIndexOf('.');
|
|
907
|
+
const parent = document.querySelector(pathSelector(cut === -1 ? '' : str.slice(0, cut)));
|
|
908
|
+
const found = parent ? textChildren(parent) : null;
|
|
909
|
+
if (!found) return null;
|
|
910
|
+
const at = found.indices.indexOf(str.slice(cut + 1));
|
|
911
|
+
return at === -1 ? null : { parent: parent, node: found.nodes[at] };
|
|
912
|
+
}
|
|
917
913
|
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
// Text has no box of its own to observe: it moves when its parent does.
|
|
929
|
-
els.push(el || text.parent);
|
|
930
|
-
const r = el ? el.getBoundingClientRect() : rangeOf(text.node).getBoundingClientRect();
|
|
931
|
-
rects.push({ path: path, x: r.left, y: r.top, w: r.width, h: r.height });
|
|
932
|
-
}
|
|
933
|
-
// A definition path resolves to one box per instance, all of them ringed
|
|
934
|
-
// and all of them draggable \u2014 the edit reaches the definition either way.
|
|
935
|
-
for (let i = 0; i < lastRectSnippetPaths.length && focusedSnippet !== null; i++) {
|
|
936
|
-
const path = lastRectSnippetPaths[i];
|
|
937
|
-
const found = outermost(document.querySelectorAll(snippetSelector(path)));
|
|
938
|
-
for (let j = 0; j < found.length; j++) {
|
|
939
|
-
els.push(found[j]);
|
|
940
|
-
const r = found[j].getBoundingClientRect();
|
|
941
|
-
rects.push({ path: path, x: r.left, y: r.top, w: r.width, h: r.height, snippet: true });
|
|
914
|
+
// \`point\` is the pointer event: with it, text under the pointer resolves
|
|
915
|
+
// to its own path rather than to the element it sits in.
|
|
916
|
+
function findPath(target, point) {
|
|
917
|
+
if (!target) return null;
|
|
918
|
+
let el = target;
|
|
919
|
+
while (el && el.nodeType === 1) {
|
|
920
|
+
const p = el.getAttribute && el.getAttribute('data-node-path');
|
|
921
|
+
if (p !== null && p !== undefined) {
|
|
922
|
+
const text = point ? textPathAt(el, point.clientX, point.clientY) : null;
|
|
923
|
+
return text === null ? p : text;
|
|
942
924
|
}
|
|
925
|
+
el = el.parentElement;
|
|
943
926
|
}
|
|
944
|
-
|
|
945
|
-
// the observer forever.
|
|
946
|
-
if (elObserver && (els.length !== observedEls.length || els.some((el, i) => el !== observedEls[i]))) {
|
|
947
|
-
elObserver.disconnect();
|
|
948
|
-
for (let i = 0; i < els.length; i++) elObserver.observe(els[i]);
|
|
949
|
-
observedEls = els;
|
|
950
|
-
}
|
|
951
|
-
const json = JSON.stringify(rects);
|
|
952
|
-
if (json === lastRectsJson && !force) return;
|
|
953
|
-
lastRectsJson = json;
|
|
954
|
-
send({ type: 'nodeRects', rects: rects });
|
|
927
|
+
return null;
|
|
955
928
|
}
|
|
956
929
|
|
|
957
|
-
|
|
930
|
+
// While a snippet is focused, clicks inside its instances address the
|
|
931
|
+
// definition instead of the instance \u2014 which is what makes an edit show up
|
|
932
|
+
// in every instance at once.
|
|
933
|
+
let focusedSnippet = null;
|
|
958
934
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
935
|
+
function findSnippetPath(target) {
|
|
936
|
+
if (focusedSnippet === null) return undefined;
|
|
937
|
+
let el = target;
|
|
938
|
+
while (el && el.nodeType === 1) {
|
|
939
|
+
if (el.getAttribute && el.getAttribute('data-snippet-id') === focusedSnippet) {
|
|
940
|
+
const p = el.getAttribute('data-snippet-path');
|
|
941
|
+
return p === null ? undefined : p;
|
|
942
|
+
}
|
|
943
|
+
// The root of an instance nested in the focused snippet's body: its own
|
|
944
|
+
// snippet re-roots the path, and \`data-snippet-at\` keeps where it sits.
|
|
945
|
+
const at = el.getAttribute && el.getAttribute('data-snippet-at');
|
|
946
|
+
if (at) {
|
|
947
|
+
const token = at.split(' ').find((t) => t.startsWith(focusedSnippet + '#'));
|
|
948
|
+
if (token !== undefined) return token.slice(focusedSnippet.length + 1);
|
|
949
|
+
}
|
|
950
|
+
el = el.parentElement;
|
|
968
951
|
}
|
|
969
|
-
|
|
952
|
+
return undefined;
|
|
970
953
|
}
|
|
971
954
|
|
|
972
|
-
//
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
document.
|
|
955
|
+
// Which instance the click landed in, as an index into the same outermost set
|
|
956
|
+
// reportRects measures \u2014 so the parent can anchor the grips to the instance
|
|
957
|
+
// the user actually pointed at rather than to whichever one renders first.
|
|
958
|
+
function instanceIndex(target, snippetPath) {
|
|
959
|
+
const all = outermost(document.querySelectorAll(snippetSelector(snippetPath)));
|
|
960
|
+
for (let i = 0; i < all.length; i++) {
|
|
961
|
+
if (all[i] === target || all[i].contains(target)) return i;
|
|
962
|
+
}
|
|
963
|
+
return 0;
|
|
977
964
|
}
|
|
978
965
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
966
|
+
function nearestSnippetId(target) {
|
|
967
|
+
let el = target;
|
|
968
|
+
while (el && el.nodeType === 1) {
|
|
969
|
+
const id = el.getAttribute && el.getAttribute('data-snippet-id');
|
|
970
|
+
if (id) return id;
|
|
971
|
+
el = el.parentElement;
|
|
972
|
+
}
|
|
973
|
+
return undefined;
|
|
983
974
|
}
|
|
984
975
|
|
|
985
|
-
function
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
976
|
+
function applySnippetFocus(snippetId) {
|
|
977
|
+
focusedSnippet = snippetId || null;
|
|
978
|
+
document
|
|
979
|
+
.querySelectorAll('.__velloo-dimmed')
|
|
980
|
+
.forEach((el) => el.classList.remove('__velloo-dimmed'));
|
|
981
|
+
if (focusedSnippet === null) return;
|
|
982
|
+
// Dim by walking down from the root and stopping at the first element that
|
|
983
|
+
// either is, or contains, an instance \u2014 so the instances stay bright
|
|
984
|
+
// without needing to out-stack a full-page overlay.
|
|
985
|
+
// Only instances that are actually rendered count. When a canvas bundle
|
|
986
|
+
// mounts it hides the SSR copy rather than removing it, and a hidden
|
|
987
|
+
// element still matches a selector \u2014 so an unfiltered query finds the
|
|
988
|
+
// stale copy, clears the "no instances" guard below, and then dims the
|
|
989
|
+
// entire visible tree because none of the matches live in it.
|
|
990
|
+
const live = [].filter.call(
|
|
991
|
+
document.querySelectorAll('[data-snippet-id="' + focusedSnippet.replace(/"/g, '\\"') + '"]'),
|
|
992
|
+
(el) => el.getClientRects().length > 0,
|
|
993
|
+
);
|
|
994
|
+
if (live.length === 0) return;
|
|
995
|
+
const dim = (el) => {
|
|
996
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
997
|
+
const child = el.children[i];
|
|
998
|
+
let isLive = false;
|
|
999
|
+
let holdsLive = false;
|
|
1000
|
+
for (let j = 0; j < live.length; j++) {
|
|
1001
|
+
if (child === live[j]) isLive = true;
|
|
1002
|
+
else if (child.contains(live[j])) holdsLive = true;
|
|
1003
|
+
}
|
|
1004
|
+
if (isLive) continue;
|
|
1005
|
+
if (holdsLive) dim(child);
|
|
1006
|
+
else child.classList.add('__velloo-dimmed');
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
dim(document.body);
|
|
998
1010
|
}
|
|
999
1011
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1012
|
+
// The highlight registry name for a ring class: \`__velloo-hover\` \u2192 \`velloo-hover\`.
|
|
1013
|
+
const highlightName = (cls) => cls.replace(/^_+/, '');
|
|
1014
|
+
const highlights = typeof CSS !== 'undefined' && CSS.highlights && typeof Highlight === 'function'
|
|
1015
|
+
? CSS.highlights
|
|
1016
|
+
: null;
|
|
1003
1017
|
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1018
|
+
function clearClass(cls) {
|
|
1019
|
+
document.querySelectorAll('.' + cls).forEach((el) => el.classList.remove(cls));
|
|
1020
|
+
if (highlights) highlights.delete(highlightName(cls));
|
|
1007
1021
|
}
|
|
1008
1022
|
|
|
1009
|
-
//
|
|
1010
|
-
//
|
|
1011
|
-
//
|
|
1012
|
-
//
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
}, true);
|
|
1018
|
-
|
|
1019
|
-
document.addEventListener('click', (ev) => {
|
|
1020
|
-
const path = findPath(ev.target, ev);
|
|
1021
|
-
ev.preventDefault();
|
|
1022
|
-
// Focus mode scopes the screen to one snippet: the dimmed rest of the
|
|
1023
|
-
// screen isn't editable, so clicking it deselects rather than selecting
|
|
1024
|
-
// something the bar can't act on.
|
|
1025
|
-
if (outsideFocus(ev.target)) {
|
|
1026
|
-
send({ type: 'select', path: null });
|
|
1027
|
-
return;
|
|
1028
|
-
}
|
|
1029
|
-
const snippetPath = findSnippetPath(ev.target);
|
|
1030
|
-
// null path = empty space inside the frame \u2192 parent clears selection.
|
|
1031
|
-
if (snippetPath === undefined) send({ type: 'select', path: path });
|
|
1032
|
-
else send({ type: 'select', path: path, snippetPath: snippetPath, instance: instanceIndex(ev.target, snippetPath) });
|
|
1033
|
-
}, true);
|
|
1034
|
-
|
|
1035
|
-
// Double-click is "open up what this is made of" \u2014 the parent turns it into
|
|
1036
|
-
// snippet focus when the target is an instance.
|
|
1037
|
-
document.addEventListener('dblclick', (ev) => {
|
|
1038
|
-
ev.preventDefault();
|
|
1039
|
-
// The way back out: double-clicking anything that isn't the snippet being
|
|
1040
|
-
// edited \u2014 including empty space, which has no path to report.
|
|
1041
|
-
if (outsideFocus(ev.target)) {
|
|
1042
|
-
send({ type: 'exit' });
|
|
1043
|
-
return;
|
|
1044
|
-
}
|
|
1045
|
-
const path = findPath(ev.target, ev);
|
|
1046
|
-
if (path === null) return;
|
|
1047
|
-
const snippetId = nearestSnippetId(ev.target);
|
|
1048
|
-
if (snippetId === undefined) send({ type: 'enter', path: path });
|
|
1049
|
-
else send({ type: 'enter', path: path, snippetId: snippetId });
|
|
1050
|
-
}, true);
|
|
1051
|
-
|
|
1052
|
-
// Clicking a node moves keyboard focus into this document, where the
|
|
1053
|
-
// parent's window listener can't see it \u2014 so every canvas shortcut, Escape
|
|
1054
|
-
// included, went dead the moment you selected something. Forward the keys
|
|
1055
|
-
// the design surface has no use of and let the parent own them.
|
|
1056
|
-
document.addEventListener('keydown', (ev) => {
|
|
1057
|
-
const el = ev.target;
|
|
1058
|
-
const tag = el && el.tagName ? el.tagName.toLowerCase() : '';
|
|
1059
|
-
if (tag === 'input' || tag === 'textarea' || tag === 'select' || (el && el.isContentEditable)) {
|
|
1060
|
-
return;
|
|
1061
|
-
}
|
|
1062
|
-
send({ type: 'key', key: ev.key, metaKey: ev.metaKey === true, ctrlKey: ev.ctrlKey === true, shiftKey: ev.shiftKey === true, altKey: ev.altKey === true });
|
|
1063
|
-
});
|
|
1064
|
-
|
|
1065
|
-
// Hover reports coalesce to one message per animation frame \u2014 sweeping the
|
|
1066
|
-
// cursor across a dense tree otherwise floods the parent with a store
|
|
1067
|
-
// update + a React render pass per crossed node.
|
|
1068
|
-
let hoverRaf = 0;
|
|
1069
|
-
let pendingHoverSnippet;
|
|
1070
|
-
function flushHover() {
|
|
1071
|
-
hoverRaf = 0;
|
|
1072
|
-
if (pendingHoverSnippet === undefined) send({ type: 'hover', path: pendingHover });
|
|
1073
|
-
else send({ type: 'hover', path: pendingHover, snippetPath: pendingHoverSnippet });
|
|
1023
|
+
// The repo-backed canvas mount leaves the SSR tree in the document, hidden,
|
|
1024
|
+
// so a failed mount can restore it \u2014 but it strips the identity attributes
|
|
1025
|
+
// off that copy the moment it commits (CANVAS_RUNTIME's dropIdentity). So a
|
|
1026
|
+
// path resolves to the rendered element and these can be plain lookups; if
|
|
1027
|
+
// that ever stops being true the symptom is a 0x0 rect, which the
|
|
1028
|
+
// canvas-mount e2e suite asserts against.
|
|
1029
|
+
function pathSelector(path) {
|
|
1030
|
+
return '[data-node-path="' + String(path).replace(/"/g, '\\"') + '"]';
|
|
1074
1031
|
}
|
|
1075
1032
|
|
|
1076
|
-
function
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
const snippetPath = findSnippetPath(ev.target);
|
|
1081
|
-
if (path === pendingHover && snippetPath === pendingHoverSnippet) return;
|
|
1082
|
-
pendingHover = path;
|
|
1083
|
-
pendingHoverSnippet = snippetPath;
|
|
1084
|
-
if (!hoverRaf) hoverRaf = requestAnimationFrame(flushHover);
|
|
1033
|
+
function snippetSelector(snippetPath) {
|
|
1034
|
+
const id = focusedSnippet.replace(/"/g, '\\"');
|
|
1035
|
+
const path = String(snippetPath).replace(/"/g, '\\"');
|
|
1036
|
+
return '[data-snippet-id="' + id + '"][data-snippet-path="' + path + '"], [data-snippet-at~="' + id + '#' + path + '"]';
|
|
1085
1037
|
}
|
|
1086
1038
|
|
|
1087
|
-
|
|
1088
|
-
//
|
|
1089
|
-
//
|
|
1090
|
-
//
|
|
1091
|
-
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
cancelAnimationFrame(hoverRaf);
|
|
1100
|
-
hoverRaf = 0;
|
|
1039
|
+
// Every element inside a snippet body carries the body's own path, so a
|
|
1040
|
+
// nested match is a descendant of the instance the user means, not another
|
|
1041
|
+
// instance. Keep only the outermost of each chain \u2014 the same set the ring
|
|
1042
|
+
// draws on, so grips and ring land on the same boxes.
|
|
1043
|
+
function outermost(els) {
|
|
1044
|
+
const out = [];
|
|
1045
|
+
for (let i = 0; i < els.length; i++) {
|
|
1046
|
+
let nested = false;
|
|
1047
|
+
for (let j = 0; j < els.length; j++) {
|
|
1048
|
+
if (i !== j && els[j].contains(els[i]) && els[j] !== els[i]) nested = true;
|
|
1049
|
+
}
|
|
1050
|
+
if (!nested) out.push(els[i]);
|
|
1101
1051
|
}
|
|
1102
|
-
|
|
1103
|
-
}
|
|
1052
|
+
return out;
|
|
1053
|
+
}
|
|
1104
1054
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
return;
|
|
1122
|
-
}
|
|
1123
|
-
// Alt/Option + wheel scrolls the design document itself \u2014 the only wheel
|
|
1124
|
-
// path to the content, since plain wheel pans the canvas.
|
|
1125
|
-
if (ev.altKey) return;
|
|
1126
|
-
if (ev.ctrlKey || ev.metaKey) {
|
|
1127
|
-
ev.preventDefault();
|
|
1128
|
-
send({ type: 'parentZoom', deltaY: ev.deltaY, clientX: ev.clientX, clientY: ev.clientY });
|
|
1055
|
+
function applyHighlight(path, cls, scroll, snippetPath) {
|
|
1056
|
+
clearClass(cls);
|
|
1057
|
+
let els;
|
|
1058
|
+
if (snippetPath !== undefined && snippetPath !== null && focusedSnippet !== null) {
|
|
1059
|
+
// One definition path, every instance of it \u2014 the point of editing in
|
|
1060
|
+
// place is seeing all of them respond.
|
|
1061
|
+
els = document.querySelectorAll(snippetSelector(snippetPath));
|
|
1062
|
+
} else if (path !== null && path !== undefined) {
|
|
1063
|
+
els = document.querySelectorAll(pathSelector(path));
|
|
1064
|
+
const text = els.length === 0 ? textNodeFor(path) : null;
|
|
1065
|
+
if (text) {
|
|
1066
|
+
if (highlights) highlights.set(highlightName(cls), new Highlight(rangeOf(text.node)));
|
|
1067
|
+
if (scroll) text.parent.scrollIntoView({ block: 'center', inline: 'nearest' });
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1070
|
+
} else {
|
|
1129
1071
|
return;
|
|
1130
1072
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
window.addEventListener('scroll', () => {
|
|
1141
|
-
if (scrollTimer) clearTimeout(scrollTimer);
|
|
1142
|
-
scrollTimer = setTimeout(() => {
|
|
1143
|
-
scrollTimer = 0;
|
|
1144
|
-
const se = document.scrollingElement || document.documentElement;
|
|
1145
|
-
send({ type: 'scrollPos', x: se.scrollLeft, y: se.scrollTop });
|
|
1146
|
-
}, 120);
|
|
1147
|
-
}, { passive: true });
|
|
1148
|
-
|
|
1149
|
-
// Wait for the parent to send a port via window.postMessage.
|
|
1150
|
-
window.addEventListener('message', (ev) => {
|
|
1151
|
-
if (ev.data && ev.data.type === '__velloo_init' && ev.ports && ev.ports[0]) {
|
|
1152
|
-
port = ev.ports[0];
|
|
1153
|
-
port.onmessage = handleParentMessage;
|
|
1154
|
-
port.postMessage({ type: 'ready', version: PROTOCOL_VERSION });
|
|
1073
|
+
// Every element inside a snippet body reports the *instance* path, so a
|
|
1074
|
+
// plain match would ring all of them. Only the outermost of each nesting
|
|
1075
|
+
// chain is the thing the user picked.
|
|
1076
|
+
let first = null;
|
|
1077
|
+
for (let i = 0; i < els.length; i++) {
|
|
1078
|
+
const el = els[i];
|
|
1079
|
+
if (el.parentElement && el.parentElement.closest('.' + cls)) continue;
|
|
1080
|
+
el.classList.add(cls);
|
|
1081
|
+
if (first === null) first = el;
|
|
1155
1082
|
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
window.__velloo = { ready: true };
|
|
1159
|
-
})();
|
|
1160
|
-
`;var LIVE_GATE_MS=6000,LIVE_ISLANDS_MS=5000,LIVE_RUNTIME=`
|
|
1161
|
-
(() => {
|
|
1162
|
-
if (window.__velloo_live) return;
|
|
1163
|
-
window.__velloo_live = { ready: false };
|
|
1164
|
-
const BUNDLE_URL = __VELLOO_LIVE_BUNDLE_URL__;
|
|
1165
|
-
|
|
1166
|
-
// Each mount pass owns the flag only while it is the latest one: a pass
|
|
1167
|
-
// superseded by a late canvas commit must not open the gate for its
|
|
1168
|
-
// successor.
|
|
1169
|
-
var pass = 0;
|
|
1170
|
-
function setReady(value) {
|
|
1171
|
-
window.__velloo_live_ready = value;
|
|
1172
|
-
window.__velloo_live.ready = value;
|
|
1173
|
-
}
|
|
1174
|
-
function markReady(run) {
|
|
1175
|
-
if (run === pass) setReady(true);
|
|
1083
|
+
if (scroll && first) first.scrollIntoView({ block: 'center', inline: 'nearest' });
|
|
1176
1084
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
// marker's height, so its scrollHeight reads back the marker height (or the
|
|
1187
|
-
// viewport) and would over-reserve. The children's intrinsic extent is the
|
|
1188
|
-
// real chart height. No-op if it would shrink the marker (never reserve
|
|
1189
|
-
// LESS than already laid out).
|
|
1190
|
-
function reserveContentHeight(marker) {
|
|
1191
|
-
if (marker.getAttribute('data-live-fit') !== 'content') return;
|
|
1192
|
-
var mount = marker.querySelector('[data-live-mount]');
|
|
1193
|
-
if (!mount) return;
|
|
1194
|
-
var mountTop = mount.getBoundingClientRect().top;
|
|
1195
|
-
var measured = 0;
|
|
1196
|
-
var kids = mount.children;
|
|
1197
|
-
for (var i = 0; i < kids.length; i++) {
|
|
1198
|
-
var r = kids[i].getBoundingClientRect();
|
|
1199
|
-
var bottom = r.bottom - mountTop;
|
|
1200
|
-
if (bottom > measured) measured = bottom;
|
|
1201
|
-
}
|
|
1202
|
-
measured = Math.ceil(measured);
|
|
1203
|
-
if (measured <= 0) return;
|
|
1204
|
-
var current = marker.getBoundingClientRect().height;
|
|
1205
|
-
if (measured <= current) return;
|
|
1206
|
-
marker.style.minHeight = measured + 'px';
|
|
1085
|
+
|
|
1086
|
+
function applyVelloState(path, state) {
|
|
1087
|
+
// Clear any prior force-state attributes.
|
|
1088
|
+
document
|
|
1089
|
+
.querySelectorAll('[data-velloo-state]')
|
|
1090
|
+
.forEach((el) => el.removeAttribute('data-velloo-state'));
|
|
1091
|
+
if (!state || state === 'default' || path === null || path === undefined) return;
|
|
1092
|
+
const el = document.querySelector(pathSelector(path));
|
|
1093
|
+
if (el) el.setAttribute('data-velloo-state', state);
|
|
1207
1094
|
}
|
|
1208
1095
|
|
|
1209
|
-
//
|
|
1210
|
-
//
|
|
1211
|
-
//
|
|
1212
|
-
//
|
|
1213
|
-
//
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1096
|
+
// Rects go stale on their own: a webfont swaps and a heading grows a line,
|
|
1097
|
+
// an image decodes and pushes everything down. The parent can't know, so the
|
|
1098
|
+
// last requested set is re-measured whenever the layout moves and re-sent
|
|
1099
|
+
// only when it actually differs \u2014 anchors and the selection handles both
|
|
1100
|
+
// ride on this.
|
|
1101
|
+
let lastRectPaths = [];
|
|
1102
|
+
let lastRectSnippetPaths = [];
|
|
1103
|
+
let lastRectsJson = '';
|
|
1104
|
+
let observedEls = [];
|
|
1105
|
+
let rectTimer = 0;
|
|
1106
|
+
|
|
1107
|
+
function remeasureSoon() {
|
|
1108
|
+
if (rectTimer || (lastRectPaths.length === 0 && lastRectSnippetPaths.length === 0)) return;
|
|
1109
|
+
rectTimer = setTimeout(() => {
|
|
1110
|
+
rectTimer = 0;
|
|
1111
|
+
reportRects(lastRectPaths, lastRectSnippetPaths);
|
|
1112
|
+
}, 80);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
const hasRO = typeof ResizeObserver === 'function';
|
|
1116
|
+
// The document catches reflow from anywhere; the per-element observer catches
|
|
1117
|
+
// a node that changes size without moving the page.
|
|
1118
|
+
if (hasRO) new ResizeObserver(remeasureSoon).observe(document.documentElement);
|
|
1119
|
+
const elObserver = hasRO ? new ResizeObserver(remeasureSoon) : null;
|
|
1120
|
+
|
|
1121
|
+
function reportRects(paths, snippetPaths, force) {
|
|
1122
|
+
lastRectPaths = paths;
|
|
1123
|
+
lastRectSnippetPaths = snippetPaths || [];
|
|
1124
|
+
const rects = [];
|
|
1125
|
+
const els = [];
|
|
1126
|
+
for (let i = 0; i < paths.length; i++) {
|
|
1127
|
+
const path = paths[i];
|
|
1128
|
+
const el = document.querySelector(pathSelector(path));
|
|
1129
|
+
const text = el ? null : textNodeFor(path);
|
|
1130
|
+
if (!el && !text) continue;
|
|
1131
|
+
// Text has no box of its own to observe: it moves when its parent does.
|
|
1132
|
+
els.push(el || text.parent);
|
|
1133
|
+
const r = el ? el.getBoundingClientRect() : rangeOf(text.node).getBoundingClientRect();
|
|
1134
|
+
rects.push({ path: path, x: r.left, y: r.top, w: r.width, h: r.height });
|
|
1238
1135
|
}
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1136
|
+
// A definition path resolves to one box per instance, all of them ringed
|
|
1137
|
+
// and all of them draggable \u2014 the edit reaches the definition either way.
|
|
1138
|
+
for (let i = 0; i < lastRectSnippetPaths.length && focusedSnippet !== null; i++) {
|
|
1139
|
+
const path = lastRectSnippetPaths[i];
|
|
1140
|
+
const found = outermost(document.querySelectorAll(snippetSelector(path)));
|
|
1141
|
+
for (let j = 0; j < found.length; j++) {
|
|
1142
|
+
els.push(found[j]);
|
|
1143
|
+
const r = found[j].getBoundingClientRect();
|
|
1144
|
+
rects.push({ path: path, x: r.left, y: r.top, w: r.width, h: r.height, snippet: true });
|
|
1243
1145
|
}
|
|
1244
|
-
return true;
|
|
1245
1146
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
// DOM is quiet (or we hit the deadline). Reserve content height, then
|
|
1253
|
-
// confirm the layout has actually stopped moving across two frames.
|
|
1254
|
-
markers.forEach(reserveContentHeight);
|
|
1255
|
-
var heights = markerHeights();
|
|
1256
|
-
if (deadlineHit || (prevHeights !== null && sameHeights(prevHeights, heights))) {
|
|
1257
|
-
observer.disconnect();
|
|
1258
|
-
markReady(run);
|
|
1259
|
-
return;
|
|
1260
|
-
}
|
|
1261
|
-
prevHeights = heights;
|
|
1262
|
-
} else {
|
|
1263
|
-
// A mutation reset the quiet window \u2014 restart the stability check.
|
|
1264
|
-
prevHeights = null;
|
|
1265
|
-
}
|
|
1266
|
-
requestAnimationFrame(tick);
|
|
1147
|
+
// Re-observe only when the element set changed, or observing would retrigger
|
|
1148
|
+
// the observer forever.
|
|
1149
|
+
if (elObserver && (els.length !== observedEls.length || els.some((el, i) => el !== observedEls[i]))) {
|
|
1150
|
+
elObserver.disconnect();
|
|
1151
|
+
for (let i = 0; i < els.length; i++) elObserver.observe(els[i]);
|
|
1152
|
+
observedEls = els;
|
|
1267
1153
|
}
|
|
1268
|
-
|
|
1154
|
+
const json = JSON.stringify(rects);
|
|
1155
|
+
if (json === lastRectsJson && !force) return;
|
|
1156
|
+
lastRectsJson = json;
|
|
1157
|
+
send({ type: 'nodeRects', rects: rects });
|
|
1269
1158
|
}
|
|
1270
1159
|
|
|
1271
|
-
|
|
1272
|
-
// committed (the server render is hidden and stripped of identity by then),
|
|
1273
|
-
// the server render otherwise \u2014 before the commit, after a fallback, or on a
|
|
1274
|
-
// page with no mount at all.
|
|
1275
|
-
function owner() {
|
|
1276
|
-
var root = document.getElementById('velloo-canvas-root');
|
|
1277
|
-
var ssr = document.getElementById('velloo-ssr');
|
|
1278
|
-
if (root && ssr && ssr.style.display === 'none') return root;
|
|
1279
|
-
return ssr || document;
|
|
1280
|
-
}
|
|
1160
|
+
var COMPUTED_PROPS = ${JSON.stringify(COMPUTED_PROPS)};
|
|
1281
1161
|
|
|
1282
|
-
|
|
1162
|
+
// What a slot the node says nothing about actually resolves to. The parent
|
|
1163
|
+
// shows it greyed, so the field reads "16" rather than a dash.
|
|
1164
|
+
function reportComputed(path) {
|
|
1165
|
+
const el = document.querySelector(pathSelector(path));
|
|
1166
|
+
if (!el) return;
|
|
1167
|
+
const cs = getComputedStyle(el);
|
|
1168
|
+
const values = {};
|
|
1169
|
+
for (let i = 0; i < COMPUTED_PROPS.length; i++) {
|
|
1170
|
+
values[COMPUTED_PROPS[i]] = cs[COMPUTED_PROPS[i]];
|
|
1171
|
+
}
|
|
1172
|
+
send({ type: 'nodeComputed', computed: { path: path, values: values } });
|
|
1173
|
+
}
|
|
1283
1174
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
setReady(false);
|
|
1290
|
-
mount(run, markers);
|
|
1175
|
+
// The board's zoom, turned into ring widths that stay constant on screen.
|
|
1176
|
+
function setChromeScale(scale) {
|
|
1177
|
+
const s = typeof scale === 'number' && scale > 0 ? scale : 1;
|
|
1178
|
+
document.documentElement.style.setProperty('--velloo-ring', (2 / s) + 'px');
|
|
1179
|
+
document.documentElement.style.setProperty('--velloo-ring-hover', (1 / s) + 'px');
|
|
1291
1180
|
}
|
|
1292
1181
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
// so a later settle that moves ownership remounts them where the screen is.
|
|
1297
|
-
function awaitCanvasMount() {
|
|
1298
|
-
var GATE_MS = ${LIVE_GATE_MS};
|
|
1299
|
-
var gateTimer = null;
|
|
1300
|
-
window.addEventListener(${JSON.stringify(CANVAS_SETTLED_EVENT)}, function () {
|
|
1301
|
-
if (gateTimer !== null) {
|
|
1302
|
-
clearTimeout(gateTimer);
|
|
1303
|
-
gateTimer = null;
|
|
1304
|
-
mountIslands();
|
|
1305
|
-
} else if (mountedIn !== null && owner() !== mountedIn) {
|
|
1306
|
-
mountIslands();
|
|
1307
|
-
}
|
|
1182
|
+
if (document.fonts && document.fonts.ready) {
|
|
1183
|
+
document.fonts.ready.then(() => {
|
|
1184
|
+
if (lastRectPaths.length > 0) reportRects(lastRectPaths);
|
|
1308
1185
|
});
|
|
1309
|
-
if (window.__velloo_canvas_ready === true) { mountIslands(); return; }
|
|
1310
|
-
gateTimer = setTimeout(function () {
|
|
1311
|
-
gateTimer = null;
|
|
1312
|
-
mountIslands();
|
|
1313
|
-
}, GATE_MS);
|
|
1314
1186
|
}
|
|
1315
1187
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
if (
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1188
|
+
function handleParentMessage(ev) {
|
|
1189
|
+
const msg = ev.data;
|
|
1190
|
+
if (!msg || typeof msg !== 'object') return;
|
|
1191
|
+
if (msg.type === 'applyHighlight') applyHighlight(msg.path, SELECT_CLASS, msg.scroll === true, msg.snippetPath);
|
|
1192
|
+
else if (msg.type === 'clearHighlight') clearClass(SELECT_CLASS);
|
|
1193
|
+
else if (msg.type === 'applyHover') applyHighlight(msg.path, HOVER_CLASS, false, msg.snippetPath);
|
|
1194
|
+
else if (msg.type === 'clearHover') clearClass(HOVER_CLASS);
|
|
1195
|
+
else if (msg.type === 'applyVelloState') applyVelloState(msg.path, msg.state);
|
|
1196
|
+
else if (msg.type === 'requestRects') reportRects(msg.paths || [], msg.snippetPaths || [], msg.force === true);
|
|
1197
|
+
else if (msg.type === 'requestComputed') reportComputed(msg.path);
|
|
1198
|
+
else if (msg.type === 'setChromeScale') setChromeScale(msg.scale);
|
|
1199
|
+
else if (msg.type === 'applySnippetFocus') applySnippetFocus(msg.snippetId);
|
|
1200
|
+
else if (msg.type === 'restoreScroll') window.scrollTo(msg.x || 0, msg.y || 0);
|
|
1324
1201
|
}
|
|
1325
1202
|
|
|
1326
|
-
function
|
|
1327
|
-
|
|
1328
|
-
|
|
1203
|
+
function send(msg) {
|
|
1204
|
+
if (port) port.postMessage(msg);
|
|
1205
|
+
}
|
|
1329
1206
|
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1207
|
+
/** In focus mode, only the focused snippet's own nodes are interactive. */
|
|
1208
|
+
function outsideFocus(target) {
|
|
1209
|
+
return focusedSnippet !== null && findSnippetPath(target) === undefined;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// A design isn't a live form: on the canvas nothing in the frame takes
|
|
1213
|
+
// focus \u2014 no typing into a field, no caret, no password manager offering to
|
|
1214
|
+
// fill it, and no autofocus pulling the frame (or the board) around. The
|
|
1215
|
+
// pointer still reaches the click reporter below; only the default goes.
|
|
1216
|
+
document.addEventListener('mousedown', (ev) => ev.preventDefault(), true);
|
|
1217
|
+
document.addEventListener('focusin', (ev) => {
|
|
1218
|
+
const el = ev.target;
|
|
1219
|
+
if (el && el !== document.body && typeof el.blur === 'function') el.blur();
|
|
1220
|
+
}, true);
|
|
1221
|
+
|
|
1222
|
+
document.addEventListener('click', (ev) => {
|
|
1223
|
+
const path = findPath(ev.target, ev);
|
|
1224
|
+
ev.preventDefault();
|
|
1225
|
+
// Focus mode scopes the screen to one snippet: the dimmed rest of the
|
|
1226
|
+
// screen isn't editable, so clicking it deselects rather than selecting
|
|
1227
|
+
// something the bar can't act on.
|
|
1228
|
+
if (outsideFocus(ev.target)) {
|
|
1229
|
+
send({ type: 'select', path: null });
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1232
|
+
const snippetPath = findSnippetPath(ev.target);
|
|
1233
|
+
// null path = empty space inside the frame \u2192 parent clears selection.
|
|
1234
|
+
if (snippetPath === undefined) send({ type: 'select', path: path });
|
|
1235
|
+
else send({ type: 'select', path: path, snippetPath: snippetPath, instance: instanceIndex(ev.target, snippetPath) });
|
|
1236
|
+
}, true);
|
|
1237
|
+
|
|
1238
|
+
// Double-click is "open up what this is made of" \u2014 the parent turns it into
|
|
1239
|
+
// snippet focus when the target is an instance.
|
|
1240
|
+
document.addEventListener('dblclick', (ev) => {
|
|
1241
|
+
ev.preventDefault();
|
|
1242
|
+
// The way back out: double-clicking anything that isn't the snippet being
|
|
1243
|
+
// edited \u2014 including empty space, which has no path to report.
|
|
1244
|
+
if (outsideFocus(ev.target)) {
|
|
1245
|
+
send({ type: 'exit' });
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
const path = findPath(ev.target, ev);
|
|
1249
|
+
if (path === null) return;
|
|
1250
|
+
const snippetId = nearestSnippetId(ev.target);
|
|
1251
|
+
if (snippetId === undefined) send({ type: 'enter', path: path });
|
|
1252
|
+
else send({ type: 'enter', path: path, snippetId: snippetId });
|
|
1253
|
+
}, true);
|
|
1336
1254
|
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1255
|
+
// Clicking a node moves keyboard focus into this document, where the
|
|
1256
|
+
// parent's window listener can't see it \u2014 so every canvas shortcut, Escape
|
|
1257
|
+
// included, went dead the moment you selected something. Forward the keys
|
|
1258
|
+
// the design surface has no use of and let the parent own them.
|
|
1259
|
+
document.addEventListener('keydown', (ev) => {
|
|
1260
|
+
const el = ev.target;
|
|
1261
|
+
const tag = el && el.tagName ? el.tagName.toLowerCase() : '';
|
|
1262
|
+
if (tag === 'input' || tag === 'textarea' || tag === 'select' || (el && el.isContentEditable)) {
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
send({ type: 'key', key: ev.key, metaKey: ev.metaKey === true, ctrlKey: ev.ctrlKey === true, shiftKey: ev.shiftKey === true, altKey: ev.altKey === true });
|
|
1266
|
+
});
|
|
1343
1267
|
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
if (!Comp || typeof rt.createRoot !== 'function' || !rt.React) { resolve(); return; }
|
|
1355
|
-
const React = rt.React;
|
|
1356
|
-
const createRoot = rt.createRoot;
|
|
1357
|
-
const ErrorBoundary = rt.ErrorBoundary;
|
|
1268
|
+
// Hover reports coalesce to one message per animation frame \u2014 sweeping the
|
|
1269
|
+
// cursor across a dense tree otherwise floods the parent with a store
|
|
1270
|
+
// update + a React render pass per crossed node.
|
|
1271
|
+
let hoverRaf = 0;
|
|
1272
|
+
let pendingHoverSnippet;
|
|
1273
|
+
function flushHover() {
|
|
1274
|
+
hoverRaf = 0;
|
|
1275
|
+
if (pendingHoverSnippet === undefined) send({ type: 'hover', path: pendingHover });
|
|
1276
|
+
else send({ type: 'hover', path: pendingHover, snippetPath: pendingHoverSnippet });
|
|
1277
|
+
}
|
|
1358
1278
|
|
|
1359
|
-
|
|
1360
|
-
|
|
1279
|
+
function trackHover(ev) {
|
|
1280
|
+
// Nothing outside the focused snippet is editable, so nothing outside it
|
|
1281
|
+
// should light up as though it were.
|
|
1282
|
+
const path = outsideFocus(ev.target) ? null : findPath(ev.target, ev);
|
|
1283
|
+
const snippetPath = findSnippetPath(ev.target);
|
|
1284
|
+
if (path === pendingHover && snippetPath === pendingHoverSnippet) return;
|
|
1285
|
+
pendingHover = path;
|
|
1286
|
+
pendingHoverSnippet = snippetPath;
|
|
1287
|
+
if (!hoverRaf) hoverRaf = requestAnimationFrame(flushHover);
|
|
1288
|
+
}
|
|
1361
1289
|
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1290
|
+
document.addEventListener('mouseover', trackHover);
|
|
1291
|
+
// Moving from a text run onto the padding beside it never leaves the element
|
|
1292
|
+
// they share, so no mouseover fires. Only an element that holds text nodes
|
|
1293
|
+
// needs the finer event.
|
|
1294
|
+
document.addEventListener('mousemove', (ev) => {
|
|
1295
|
+
const el = ev.target && ev.target.closest ? ev.target.closest('[data-node-path]') : null;
|
|
1296
|
+
if (el && el.hasAttribute('data-node-text')) trackHover(ev);
|
|
1297
|
+
});
|
|
1367
1298
|
|
|
1368
|
-
|
|
1299
|
+
document.addEventListener('mouseleave', () => {
|
|
1300
|
+
pendingHover = null;
|
|
1301
|
+
if (hoverRaf) {
|
|
1302
|
+
cancelAnimationFrame(hoverRaf);
|
|
1303
|
+
hoverRaf = 0;
|
|
1304
|
+
}
|
|
1305
|
+
send({ type: 'hover', path: null });
|
|
1306
|
+
});
|
|
1369
1307
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1308
|
+
// Cmd/Ctrl + wheel inside the iframe is a "zoom the canvas" gesture
|
|
1309
|
+
// for the parent \u2014 without this handler the browser treats it as
|
|
1310
|
+
// page-zoom (especially on macOS pinch-zoom which dispatches as
|
|
1311
|
+
// ctrlKey+wheel). Plain wheel/trackpad-scroll is a "pan the canvas"
|
|
1312
|
+
// gesture \u2014 without forwarding, the iframe absorbs scroll deltas
|
|
1313
|
+
// (often it's smaller than its iframe, so they're a no-op) and the
|
|
1314
|
+
// parent sees nothing.
|
|
1315
|
+
//
|
|
1316
|
+
// We only preventDefault + forward when the parent has established a
|
|
1317
|
+
// channel (port is non-null). Library-tile iframes don't run a
|
|
1318
|
+
// handshake; preventDefault'ing their wheels would freeze the
|
|
1319
|
+
// surrounding masonry's scroll. Their Ctrl+wheel is still cancelled,
|
|
1320
|
+
// or a pinch over a tile zooms the whole canvas page.
|
|
1321
|
+
window.addEventListener('wheel', (ev) => {
|
|
1322
|
+
if (!port) {
|
|
1323
|
+
if (ev.ctrlKey && window.parent !== window) ev.preventDefault();
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
// Alt/Option + wheel scrolls the design document itself \u2014 the only wheel
|
|
1327
|
+
// path to the content, since plain wheel pans the canvas.
|
|
1328
|
+
if (ev.altKey) return;
|
|
1329
|
+
if (ev.ctrlKey || ev.metaKey) {
|
|
1330
|
+
ev.preventDefault();
|
|
1331
|
+
send({ type: 'parentZoom', deltaY: ev.deltaY, clientX: ev.clientX, clientY: ev.clientY });
|
|
1332
|
+
return;
|
|
1333
|
+
}
|
|
1334
|
+
ev.preventDefault();
|
|
1335
|
+
send({ type: 'parentPan', deltaX: ev.deltaX, deltaY: ev.deltaY });
|
|
1336
|
+
}, { passive: false });
|
|
1387
1337
|
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1338
|
+
// Report the document scroll offset (debounced) so the parent can restore
|
|
1339
|
+
// it after a reload \u2014 the iframe src embeds theme/version params, so a
|
|
1340
|
+
// dark-mode toggle or theme edit is a full navigation that would otherwise
|
|
1341
|
+
// reset scroll to the top.
|
|
1342
|
+
let scrollTimer = 0;
|
|
1343
|
+
window.addEventListener('scroll', () => {
|
|
1344
|
+
if (scrollTimer) clearTimeout(scrollTimer);
|
|
1345
|
+
scrollTimer = setTimeout(() => {
|
|
1346
|
+
scrollTimer = 0;
|
|
1347
|
+
const se = document.scrollingElement || document.documentElement;
|
|
1348
|
+
send({ type: 'scrollPos', x: se.scrollLeft, y: se.scrollTop });
|
|
1349
|
+
}, 120);
|
|
1350
|
+
}, { passive: true });
|
|
1397
1351
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
.
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
}
|
|
1352
|
+
// Wait for the parent to send a port via window.postMessage.
|
|
1353
|
+
window.addEventListener('message', (ev) => {
|
|
1354
|
+
if (ev.data && ev.data.type === '__velloo_init' && ev.ports && ev.ports[0]) {
|
|
1355
|
+
port = ev.ports[0];
|
|
1356
|
+
port.onmessage = handleParentMessage;
|
|
1357
|
+
port.postMessage({ type: 'ready', version: PROTOCOL_VERSION });
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1406
1360
|
|
|
1407
|
-
|
|
1408
|
-
// page has a mount is only knowable once parsing finishes.
|
|
1409
|
-
function begin() {
|
|
1410
|
-
if (document.getElementById('velloo-canvas-data')) awaitCanvasMount();
|
|
1411
|
-
else mountIslands();
|
|
1412
|
-
}
|
|
1413
|
-
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', begin);
|
|
1414
|
-
else begin();
|
|
1361
|
+
window.__velloo = { ready: true };
|
|
1415
1362
|
})();
|
|
1416
1363
|
`;function buildDocument(opts){let{viewport,bodyHtml,snapshotCss,themeCss,adapterCss,customCss,googleFonts,baseHref,title="Velloo design",includeRuntime=!0,dark,liveBundleUrl,canvasBundle,selectionRing,scriptNonce,hostStylesheets,appCss}=opts,script=scriptNonce?`<script nonce="${escapeHtml(scriptNonce)}">`:"<script>",runtime=includeRuntime?`${script}${IFRAME_RUNTIME}</script>`:"",live=liveBundleUrl?`${script}${LIVE_RUNTIME.replace("__VELLOO_LIVE_BUNDLE_URL__",JSON.stringify(liveBundleUrl))}</script>`:"",canvas=canvasBundle?`<script type="application/json" id="velloo-canvas-data">${jsonForScript({tree:canvasBundle.tree,themeOptions:canvasBundle.themeOptions,preview:canvasBundle.preview,pathname:canvasBundle.pathname})}</script>${script}${CANVAS_RUNTIME.replace("__VELLOO_CANVAS_BUNDLE_URL__",JSON.stringify(canvasBundle.url))}</script>`:"",hostStyles=(hostStylesheets??[]).map((path)=>{let href=path.startsWith("/")?`${HOST_FILES_PREFIX}${path}`:path;return`
|
|
1417
1364
|
<link rel="stylesheet" href="${escapeHtml(href)}" ${HOST_STYLESHEET_ATTRIBUTE}="${escapeHtml(path)}" />`}).join(""),body=canvasBundle?`<div id="velloo-ssr">${bodyHtml}</div>`:bodyHtml,fontLinks=googleFonts&&googleFonts.length>0?`
|
|
@@ -1431,25 +1378,7 @@ Learn more: https://react.dev/warnings/version-mismatch`));var $renderToReadable
|
|
|
1431
1378
|
<style>${neutralizeCssText(themeCss)}</style>${adapterStyle}${customStyle}${appStyle}
|
|
1432
1379
|
</head>
|
|
1433
1380
|
<body data-1p-ignore="true" data-lpignore="true" data-bwignore="true" data-form-type="other" autocomplete="off">${body}${runtime}${live}${canvas}</body>
|
|
1434
|
-
</html>`}function jsonForScript(value){return JSON.stringify(value).replace(/</g,"\\u003c")}function escapeHtml(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}var import_react2=__toESM(require_react_development(),1);var MAX_STAND_INS=8;class RenderGuardLimitError extends Error{failures;constructor(failures,options){super(`${failures.length} components failed to render \u2014 more than the ${MAX_STAND_INS} the guard will stand in for, so the screen was not drawn.`,options);this.name="RenderGuardLimitError",this.failures=failures}}function blame(error,registry){if(!(error instanceof Error)||typeof error.stack!=="string")return null;for(let match of error.stack.matchAll(/^\s*at ([A-Za-z0-9_$]+)/gm)){let name=match[1];if(name!==void 0&&Object.hasOwn(registry,name))return name}return null}function attr(props,name){let value=props[name];return typeof value==="string"?value:void 0}function standIn(componentId,reason,kind){let missing=kind==="missing";return function(props){return import_react2.createElement("div",{"data-velloo-render-error":componentId,"data-node-path":attr(props,"data-node-path"),"data-snippet-id":attr(props,"data-snippet-id"),"data-snippet-path":attr(props,"data-snippet-path"),"data-snippet-at":attr(props,"data-snippet-at"),title:reason,style:{border:"1px dashed currentColor",borderRadius:"6px",padding:"12px",...missing?{}:{opacity:0.7},font:"12px ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap"}},import_react2.createElement("span",{style:{display:"block",opacity:0.7}},missing?`${componentId} is not in this screen's library`:`${componentId} failed to render \u2014 ${reason}`),missing?props.children:null)}}function locate(registry,toHtml){let open=[];function Close({node}){let at=open.lastIndexOf(node);if(at>=0)open.splice(at,1);return null}let traced={};for(let[componentId,Component]of Object.entries(registry))traced[componentId]=function(props){let nodePath=attr(props,"data-node-path");if(nodePath===void 0)return import_react2.createElement(Component,props);let node={componentId,nodePath,snippetPath:attr(props,"data-snippet-path")};return open.push(node),import_react2.createElement(import_react2.Fragment,null,import_react2.createElement(Component,props),import_react2.createElement(Close,{node}))};try{toHtml(traced)}catch{return open.at(-1)??null}return null}function replaceAt(Component,at,replacement){return function(props){let here=attr(props,"data-node-path")===at.nodePath&&attr(props,"data-snippet-path")===at.snippetPath;return import_react2.createElement(here?replacement:Component,props)}}function renderGuarded(registry,toHtml){let failures=[],active=registry;for(;;)try{return{html:toHtml(active),failures}}catch(error){let unknown=error instanceof UnknownComponentError,reason=error instanceof Error?error.message:String(error),componentId=unknown?error.ref:blame(error,registry),node=componentId===null?locate(active,toHtml):null;if(componentId===null&&node===null)throw error;let failure=node?{componentId:node.componentId,reason,kind:"threw",nodePath:node.nodePath}:{componentId,reason,kind:unknown?"missing":"threw"};if(failures.some((seen)=>seen.componentId===failure.componentId&&seen.nodePath===failure.nodePath))throw error;if(failures.length>=MAX_STAND_INS)throw new RenderGuardLimitError([...failures,failure],{cause:error});failures.push(failure);let replacement=standIn(failure.componentId,reason,failure.kind),Original=active[failure.componentId];active={...active,[failure.componentId]:node&&Original?replaceAt(Original,node,replacement):replacement}}}function isSerializedType(value){return value!==null&&typeof value==="object"&&"$type"in value&&typeof value.$type?.ref==="string"}function collectSerializedRepoRefs(tree){let out=new Map,visitValue=(value)=>{if(Array.isArray(value))for(let item of value)visitValue(item);else if(isSerializedType(value)){if(value.$type.repo&&!out.has(value.$type.ref))out.set(value.$type.ref,{...value.$type.repo,hasProxy:!1})}else if(value&&typeof value==="object"&&"$node"in value)visit(value.$node);else if(value&&typeof value==="object")for(let nested of Object.values(value))visitValue(nested)},visit=(node)=>{if(node.repo&&(!out.has(node.ref)||node.proxy&&!out.get(node.ref)?.hasProxy))out.set(node.ref,{...node.repo,hasProxy:node.proxy!==void 0});if(node.proxy)visit(node.proxy);for(let value of Object.values(node.props??{}))visitValue(value);for(let child of node.children??[])if(typeof child==="object")visit(child)};if(tree)visit(tree);return out}function collectSerializedRefs(tree){if(!tree)return[];let seen=new Set,visitValue=(value)=>{if(Array.isArray(value))for(let item of value)visitValue(item);else if(isSerializedType(value))seen.add(value.$type.ref);else if(value&&typeof value==="object"&&"$node"in value)visit(value.$node);else if(value&&typeof value==="object")for(let nested of Object.values(value))visitValue(nested)},visit=(node)=>{if(seen.add(node.ref),node.proxy)visit(node.proxy);for(let value of Object.values(node.props??{}))visitValue(value);for(let child of node.children??[])if(typeof child==="object")visit(child)};return visit(tree),[...seen]}function serializeTree(node,opts,path=[],stack=[],lockedPath=null,body=null){let shape=nodeShape(node);switch(shape.kind){case"snippet":{let instance=shape.node,snippet=opts.snippets?.get(instance.$snippet);if(!snippet||stack.includes(snippet.id))return null;let resolved=resolveSnippetBody(instance,snippet);return serializeTree(resolved,opts,path,[...stack,snippet.id],lockedPath??path,enterSnippet(body,snippet.id))}case"param":case"invalid":return null;case"text":return null;case"repo":return serializeRepo(shape.node,opts,path,stack,lockedPath,body);case"synthetic":case"named":case"emit-as":{let{node:component,ref}=shape;if(opts.staticFallback?.refs.has(ref)){let html=opts.staticFallback.render(component,path,lockedPath);return{ref:STATIC_REF,props:{html}}}return serializeComponent(component,opts,path,stack,lockedPath,body)}}}function serializeComponent(node,opts,path,stack,lockedPath,body){let{children:childrenProp,...props}=node.props??{};return{ref:node.$ref,props:nodeProps(serializeTypes(props),node,path,lockedPath,body),...serializeChildren(node,childrenProp,opts,path,stack,lockedPath,body)}}function serializeRepo(node,opts,path,stack,lockedPath,body){let{children:childrenProp,...rawProps}=node.props??{},props=serializeSlotProps(serializeTypes(rawProps),opts,path,stack,lockedPath),proxy=serializeProxy(node,opts,path,stack,lockedPath);return{ref:repoKey(node.$repo),repo:{...node.$repo,name:node.$ref},...proxy?{proxy}:{},props:nodeProps(props,node,path,lockedPath,body),...serializeChildren(node,childrenProp,opts,path,stack,lockedPath,body)}}function nodeProps(props,node,path,lockedPath,body){return{...props,"data-node-path":(lockedPath??path).join("."),...textChildrenAttribute(node.children,lockedPath),...bodyAttributes(body)}}function serializeChild(child,opts,path,stack,lockedPath,body){let shape=nodeShape(child);return shape.kind==="text"?shape.text:serializeTree(child,opts,path,stack,lockedPath,body)}function serializeChildren(node,childrenProp,opts,path,stack,lockedPath,body){let children;if(Array.isArray(node.children)&&node.children.length>0)children=node.children.flatMap((child,i)=>Array.isArray(child)?child.map((c,j)=>serializeChild(c,opts,[...path,i,j],stack,lockedPath,null)):serializeChild(child,opts,[...path,i],stack,lockedPath,descend(body,i))).filter((c)=>c!==null);else if(childrenProp!==void 0)children=serializePropChildren(childrenProp,opts,path,stack,lockedPath);return children&&children.length>0?{children}:{}}function serializePropChildren(value,opts,path,stack,lockedPath){if(isNode(value)){let s=serializeTree(value,opts,path,stack,lockedPath);return s?[s]:void 0}if(Array.isArray(value)){let out=[];for(let item of value)if(isNode(item)){let s=serializeTree(item,opts,path,stack,lockedPath);if(s)out.push(s)}else if(typeof item==="string"||typeof item==="number")out.push(item);return out.length>0?out:void 0}if(typeof value==="string"||typeof value==="number")return[value];return}function serializeProxy(node,opts,path,stack,lockedPath){let snippet=node.$repo.proxy?opts.snippets?.get(node.$repo.proxy):void 0;if(!snippet||stack.includes(snippet.id))return null;try{return serializeTree(repoProxyInstance(node,snippet),opts,path,stack,lockedPath??path)}catch{return null}}function serializeTypes(props){return mapComponentTypes(props,serializeType)}function serializeType(type){return type.$repo?{$type:{ref:repoKey(type.$repo),repo:{...type.$repo,name:type.$ref}}}:{$type:{ref:type.$ref}}}function serializeSlotProps(props,opts,path,stack,lockedPath){let out={};for(let[name,value]of Object.entries(props))if(isNode(value)){let s=serializeTree(value,opts,path,stack,lockedPath??path);if(s)out[name]={$node:s}}else out[name]=value;return out}var COLOR_TOKEN_MAP={background:"--color-background",foreground:"--color-foreground",border:"--color-border",input:"--color-input",ring:"--color-ring",primary:["--color-primary","--color-primary-foreground"],secondary:["--color-secondary","--color-secondary-foreground"],muted:["--color-muted","--color-muted-foreground"],accent:["--color-accent","--color-accent-foreground"],destructive:["--color-destructive","--color-destructive-foreground"],card:["--color-card","--color-card-foreground"],popover:["--color-popover","--color-popover-foreground"]};function emit(varName,value,lines){if(typeof value==="number")lines.push(` ${varName}: ${value};`);else if(typeof value==="string")lines.push(` ${varName}: ${sanitizeCssTokenValue(value)};`)}var SEMANTIC_COLOR_VARS=new Set(Object.values(COLOR_TOKEN_MAP).flatMap((target)=>Array.isArray(target)?target:[target]));function emitPalette(palette,lines){if(!palette)return;for(let[name,value]of Object.entries(palette)){if(!isCssIdent(name))continue;if(SEMANTIC_COLOR_VARS.has(`--color-${name}`))continue;emit(`--color-${name}`,value,lines)}}function emitSpacing(spacing,lines){for(let[name,value]of spacingCssTokens(spacing))emit(`--spacing-${name}`,value,lines)}function emitShadows(shadows,lines){if(!shadows)return;for(let[name,value]of Object.entries(shadows)){if(!isCssIdent(name))continue;if(typeof value==="string"||typeof value==="number")emit(`--shadow-${name}`,value,lines)}}function emitContainer(container,lines){if(!container)return;let decls=[" width: 100%;"];if(container.center)decls.push(" margin-inline: auto;");if(container.padding)decls.push(` padding-inline: ${sanitizeCssTokenValue(container.padding)};`);if(container.maxWidth)decls.push(` max-width: ${sanitizeCssTokenValue(container.maxWidth)};`);lines.push("",".container {",...decls,"}")}function emitColorBlock(colors,lines){for(let[token,target]of Object.entries(COLOR_TOKEN_MAP)){let value=colors[token];if(value===void 0)continue;if(Array.isArray(target)){let[defaultVar,foregroundVar]=target;if(typeof value==="object")emit(defaultVar,value.DEFAULT,lines),emit(foregroundVar,value.foreground,lines);else emit(defaultVar,value,lines)}else if(typeof value==="string")emit(target,value,lines)}}var RADIUS_STEPS=["sm","md","lg","xl","2xl","3xl"],RADIUS_LADDER={sm:"max(0px, calc(var(--radius) - 4px))",md:"max(0px, calc(var(--radius) - 2px))",lg:"var(--radius)",xl:"calc(var(--radius) + 4px)"};function emitRadiusScale(radius,lines){let statesScale=radius.lg!==void 0;if(!statesScale&&radius.md===void 0&&radius.sm===void 0)return;for(let step of RADIUS_STEPS){let value=statesScale||step!=="md"?radius[step]:void 0;if(value!==void 0){let css=typeof value==="number"?`${value}px`:sanitizeCssTokenValue(value);lines.push(` --radius-${step}: ${css};`)}else if(!statesScale&&step in RADIUS_LADDER)lines.push(` --radius-${step}: ${RADIUS_LADDER[step]};`)}}function themeToCss(theme){let lines=[":root {"];emitColorBlock(theme.colors,lines),emitPalette(theme.palette,lines),emitSpacing(theme.spacing,lines),emitShadows(theme.shadows,lines);let fontFamily=theme.typography.fontFamily;if(fontFamily)for(let[role,stack]of Object.entries(fontFamily)){if(!isCssIdent(role))continue;emit(`--font-${role}`,stack,lines)}let radiusValue=theme.radius.md??theme.radius.lg??theme.radius.sm;if(radiusValue!==void 0){let formatted=typeof radiusValue==="number"?`${radiusValue}px`:sanitizeCssTokenValue(radiusValue);lines.push(` --radius: ${formatted};`)}if(emitRadiusScale(theme.radius,lines),lines.push("}"),theme.colorsDark||theme.paletteDark)lines.push(""),lines.push(".dark {"),emitColorBlock(theme.colorsDark??{},lines),emitPalette(theme.paletteDark,lines),lines.push("}");return emitContainer(theme.container,lines),[lines.join(`
|
|
1435
|
-
`),typesetCss(theme.typography.typesets)].join(`
|
|
1436
|
-
|
|
1437
|
-
`)}function renderBody(screen,registry,snippets){return renderBodyGuarded(screen,registry,snippets).html}var CANVAS_ATTRIBUTE=/^data-(?:node-path|node-text|snippet-id|snippet-path|velloo-.*)$/;async function renderNativeHtml(screen,registry,snippets){return new HTMLRewriter().on('link[rel="preload"]',{element(element){element.remove()}}).on("*",{element(element){let param=element.getAttribute("data-velloo-param");if(param!==null){element.replace(`$${param}`);return}let html=element.namespaceURI==="http://www.w3.org/1999/xhtml";for(let[name,value]of[...element.attributes])if(CANVAS_ATTRIBUTE.test(name))element.removeAttribute(name);else if(html)element.removeAttribute(name),element.setAttribute(name,value)}}).transform(new Response(renderBody(screen,registry,snippets))).text()}function renderBodyGuarded(screen,registry,snippets){return ScreenSchema.parse(screen),renderGuarded(registry,(active)=>$renderToString(buildRoot(screen.tree,{registry:active,snippets})))}async function renderScreen(screen,theme,options){ScreenSchema.parse(screen),ThemeSchema.parse(theme);let pass=options.renderPass,{html:bodyHtml,failures}=renderGuarded(options.registry,(active)=>{let element=buildRoot(screen.tree,{registry:active,snippets:options.snippets});return $renderToString(pass?pass.wrap(element):element)}),themeCss=themeToCss(theme),staticHtml=[],canvasBundle=options.canvasBundle?(()=>{let staticRefs=options.canvasBundle.staticRefs??[],tree=serializeTree(screen.tree,{snippets:options.snippets,...staticRefs.length>0?{staticFallback:{refs:new Set(staticRefs),render:(node,path,lockedPath)=>{let element=buildTree(node,{registry:options.registry,snippets:options.snippets},path,[],lockedPath),html=$renderToString(pass?pass.wrap(element):element);return staticHtml.push(html),html}}}:{}});return tree?{url:options.canvasBundle.url,tree,themeOptions:options.canvasBundle.themeOptions,preview:options.canvasBundle.preview,...screen.route?{pathname:screen.route}:{}}:void 0})():void 0,adapterCss=pass?pass.css([bodyHtml,...staticHtml].join("")):void 0;return{html:buildDocument({viewport:options.viewport,bodyHtml,snapshotCss:options.snapshotCss,themeCss,adapterCss,customCss:options.customCss,googleFonts:theme.typography.googleFonts,baseHref:options.baseHref,title:screen.name,dark:options.dark,liveBundleUrl:options.liveBundleUrl,canvasBundle,...options.includeRuntime!==void 0?{includeRuntime:options.includeRuntime}:{},...options.selectionRing!==void 0?{selectionRing:options.selectionRing}:{},...options.scriptNonce!==void 0?{scriptNonce:options.scriptNonce}:{},...options.hostStylesheets?{hostStylesheets:options.hostStylesheets}:{},...options.appCss?{appCss:options.appCss}:{}}),bodyHtml,themeCss,failures}}var NO_RUNTIMES={live:!1,canvas:!1},READY_SLACK_MS=1000,READY_TIMEOUT_MS=LIVE_GATE_MS+LIVE_ISLANDS_MS+READY_SLACK_MS;async function runtimesOf(target){return target.evaluate(()=>({live:document.querySelector("[data-live-node]")!==null,canvas:document.getElementById("velloo-canvas-data")!==null})).catch(()=>NO_RUNTIMES)}async function waitForRuntimes(target,runtimes){if(!runtimes.live&&!runtimes.canvas)return;await target.waitForFunction((want)=>{let w=window;return(!want.live||w.__velloo_live_ready===!0)&&(!want.canvas||w.__velloo_canvas_ready===!0)},runtimes,{timeout:READY_TIMEOUT_MS}).catch(()=>{})}async function missingHostStylesheets(target,html){if(!html.includes(HOST_STYLESHEET_ATTRIBUTE))return;return target.evaluate((attribute)=>[...document.querySelectorAll(`link[${attribute}]`)].flatMap((link)=>{let entry=performance.getEntriesByName(link.href)[0];if(!entry)return[];let status=entry.responseStatus??0,sameOrigin=new URL(link.href).origin===location.origin;return status>=400||sameOrigin&&status===0?[`${status||"blocked"} stylesheet ${link.getAttribute(attribute)}`]:[]}),HOST_STYLESHEET_ATTRIBUTE).catch(()=>{return})}async function waitForFonts(target){await target.evaluate(()=>Promise.race([document.fonts.ready,new Promise((r)=>setTimeout(r,2000))])).catch(()=>{})}async function settleDocument(target){await waitForFonts(target),await waitForRuntimes(target,await runtimesOf(target))}async function settleForCapture(page){await page.waitForLoadState("load",{timeout:5000}).catch(()=>{});let children=page.frames().filter((frame)=>frame!==page.mainFrame());await Promise.all([settleDocument(page),...children.map(settleDocument)]),await Promise.all(page.frames().map(removeEditingChrome))}async function removeEditingChrome(frame){await frame.evaluate(()=>{for(let thumb of document.querySelectorAll(".__velloo-scrollthumb"))thumb.remove()}).catch(()=>{})}async function screenshot(opts){return await screenshotInternal(opts),opts.outPath}async function screenshotBuffer(opts){let buf=await screenshotInternal(opts);if(!buf)throw Error("screenshotBuffer: no buffer returned (internal invariant)");return buf}async function openDocument(page,html){let base=/<base href="(http:\/\/(?:127\.0\.0\.1|localhost|\[::1\])(?::\d+)?)\/?"/.exec(html)?.[1];if(!base){await page.setContent(html,{waitUntil:"domcontentloaded",timeout:CAPTURE_TIMEOUT_MS});return}let url=`${base}/__velloo_capture/${crypto.randomUUID()}`;await page.route(url,(route)=>route.fulfill({status:200,contentType:"text/html; charset=utf-8",body:html})),await page.goto(url,{waitUntil:"domcontentloaded",timeout:CAPTURE_TIMEOUT_MS})}async function canvasMountState(page){return page.evaluate(()=>{let w=window;if(!document.getElementById("velloo-canvas-data"))return;let ssr=document.getElementById("velloo-ssr"),mounted=Boolean(ssr&&ssr.style.display==="none");return{mounted,...!mounted&&w.__velloo_canvas_unmounted?{reason:w.__velloo_canvas_unmounted}:{},...w.__velloo_canvas_bundle?{bundle:w.__velloo_canvas_bundle}:{},diagnostics:w.__velloo_canvas_diagnostics??[]}}).catch(()=>{return})}async function probeCanvasMount(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:1},async(context)=>{let page=await context.newPage(),consoleErrors=[];return page.on("console",(message)=>{if(message.type()==="error")consoleErrors.push(message.text().slice(0,400))}),page.on("pageerror",(error)=>consoleErrors.push(error.message.slice(0,400))),await openDocument(page,opts.html),await settleForCapture(page),await page.waitForTimeout(150),{...await canvasMountState(page)??{mounted:!1,diagnostics:[]},consoleErrors:consoleErrors.slice(0,20)}})}async function freezePage(page){return page.evaluate(()=>{let cssOf=(sheet)=>{try{return[...sheet.cssRules].map((rule)=>rule.cssText).join(`
|
|
1438
|
-
`)}catch{return""}},attributesOf=(el)=>Object.fromEntries([...el.attributes].filter((attr)=>!/^on/i.test(attr.name)).map((attr)=>[attr.name,attr.value])),copy=document.documentElement.cloneNode(!0),paired=(selector)=>{let copies=[...copy.querySelectorAll(selector)];return[...document.querySelectorAll(selector)].flatMap((live,at)=>{let twin=copies[at];return twin?[[live,twin]]:[]})};for(let[live,twin]of paired("style"))if((live.textContent??"").trim()===""&&live.sheet)twin.textContent=cssOf(live.sheet);for(let[live,twin]of paired("input"))if(live.type==="checkbox"||live.type==="radio")twin.toggleAttribute("checked",live.checked);else if(live.type!=="file"&&live.type!=="password")twin.setAttribute("value",live.value);for(let[live,twin]of paired("textarea"))twin.textContent=live.value;for(let[live,twin]of paired("option"))twin.toggleAttribute("selected",live.selected);let head=copy.querySelector("head");for(let sheet of document.adoptedStyleSheets??[]){let style=document.createElement("style");style.textContent=cssOf(sheet),head?.append(style)}let ssr=document.getElementById("velloo-ssr"),mounted=Boolean(ssr&&ssr.style.display==="none");if(mounted)copy.querySelector("#velloo-ssr")?.remove();for(let el of copy.querySelectorAll("script, base, link[rel='modulepreload']"))el.remove();let styles=[...head?.querySelectorAll("style, link[rel='stylesheet']")??[]].map((el)=>el instanceof HTMLStyleElement?{tag:"style",attributes:attributesOf(el),css:el.textContent??""}:{tag:"link",attributes:attributesOf(el)}),body=copy.querySelector("body")?.innerHTML??"";for(let el of copy.querySelectorAll("template[data-velloo-anchor], style[data-velloo-pointer]"))el.remove();return{html:`<!doctype html>
|
|
1439
|
-
${copy.outerHTML}`,head:styles,body,htmlAttributes:attributesOf(document.documentElement),bodyAttributes:attributesOf(document.body),mounted:mounted&&document.getElementById("velloo-canvas-data")!==null}})}async function captureMountedDocument(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:1},async(context)=>{let page=await context.newPage();await openDocument(page,opts.html),await settleForCapture(page);let canvas=await canvasMountState(page);return{...await freezePage(page),...canvas?{canvas}:{}}})}async function captureScreenshot(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:opts.deviceScaleFactor??1},async(context)=>{let page=await context.newPage();await openDocument(page,opts.html),await settleForCapture(page);let frozen=opts.freeze?await freezePage(page):void 0,nodeRects=await page.$$eval("[data-node-path]",(els)=>els.map((el)=>{let r=el.getBoundingClientRect();return{path:el.dataset.nodePath??"",x:r.left,y:r.top,w:r.width,h:r.height}})),png=await capturePagePng(page,opts.fullPage??!0,CAPTURE_TIMEOUT_MS),dom=opts.dom?await extractDom(page):void 0,canvas=await canvasMountState(page),missing=await missingHostStylesheets(page,opts.html);return{png,nodeRects,...dom?{dom}:{},...canvas?{canvas}:{},...missing?.length?{missingHostStylesheets:missing}:{},...frozen?{frozen}:{}}})}async function screenshotInternal(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:opts.deviceScaleFactor??1},async(context)=>{let page=await context.newPage();await openDocument(page,opts.html),await settleForCapture(page);let toFile=opts.outPath?{path:opts.outPath}:{};if(opts.clipSelector){let locator=page.locator(opts.clipSelector).first();if(await locator.count()===0)throw Error(`screenshot: no element matches selector ${opts.clipSelector}`);let png=await retryTransientScreenshot(()=>locator.screenshot({...toFile,timeout:CAPTURE_TIMEOUT_MS}));return opts.outPath?null:png}let fullPage=opts.fullPage??!0,png=await retryTransientScreenshot(()=>page.screenshot({...toFile,fullPage,timeout:CAPTURE_TIMEOUT_MS}));return opts.outPath?null:png})}async function measureRendered(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:1},async(context)=>{let page=await context.newPage();return await openDocument(page,opts.html),await settleForCapture(page),extractDom(page)})}function buildBoardComposite(frames,options={}){let maxWidth=options.maxWidth??1600,labelPad=options.labels?26:0,minX=Math.min(...frames.map(({frame})=>frame.x)),minY=Math.min(...frames.map(({frame})=>frame.y)),maxX=Math.max(...frames.map(({frame})=>frame.x+frame.w)),maxY=Math.max(...frames.map(({frame})=>frame.y+frame.h)),w=maxX-minX+48,h=maxY-minY+48+labelPad,scale=Math.min(1,maxWidth/w),outW=Math.max(1,Math.round(w*scale)),outH=Math.max(1,Math.round(h*scale)),esc=(s)=>s.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),pieces=frames.map(({frame,html,label})=>{let left=frame.x-minX+24,top=frame.y-minY+24+labelPad;return(options.labels&&label?`<div class="label" style="left:${left}px;top:${top-26}px">${esc(label)}</div>`:"")+`<iframe scrolling="no" srcdoc="${esc(html)}" style="position:absolute;left:${left}px;top:${top}px;width:${frame.w}px;height:${frame.h}px"></iframe>`}).join(`
|
|
1440
|
-
`);return{html:`<!doctype html>
|
|
1441
|
-
<html><head><meta charset="utf-8"><style>
|
|
1442
|
-
*{box-sizing:border-box}
|
|
1443
|
-
body{margin:0;background:#f4f4f5;width:${outW}px;height:${outH}px;overflow:hidden}
|
|
1444
|
-
.canvas{position:relative;width:${w}px;height:${h}px;transform:scale(${scale});transform-origin:0 0}
|
|
1445
|
-
.label{position:absolute;font:600 12px/1 ui-sans-serif,system-ui,sans-serif;color:#71717a;padding:4px 0}
|
|
1446
|
-
iframe{border:1px solid #e4e4e7;background:#fff;display:block}
|
|
1447
|
-
</style></head>
|
|
1448
|
-
<body>
|
|
1449
|
-
<div class="canvas">
|
|
1450
|
-
${pieces}
|
|
1451
|
-
</div>
|
|
1452
|
-
</body></html>`,viewport:{w:outW,h:outH},scale}}async function screenshotCompareBuffer(opts){let labelLeft=opts.leftLabel??"light",labelRight=opts.rightLabel??"dark",w=opts.viewport.w,h=opts.viewport.h,wrapper=buildCompareWrapper(opts.leftHtml,opts.rightHtml,w,h,labelLeft,labelRight);return withContext({viewport:{width:w*2+24,height:800},deviceScaleFactor:opts.deviceScaleFactor??1},async(context)=>{let page=await context.newPage();return await page.setContent(wrapper,{waitUntil:"domcontentloaded",timeout:CAPTURE_TIMEOUT_MS}),await page.waitForFunction(()=>{let l=document.getElementById("L"),r=document.getElementById("R");return!!(l&&r&&l.dataset.ready==="1"&&r.dataset.ready==="1")},void 0,{timeout:CAPTURE_TIMEOUT_MS}).catch(()=>{}),await settleForCapture(page),await retryTransientScreenshot(()=>page.screenshot({fullPage:!0,timeout:CAPTURE_TIMEOUT_MS}))})}function buildCompareWrapper(leftHtml,rightHtml,panelWidth,panelHeight,leftLabel,rightLabel){let esc=escapeHtml;return`<!doctype html>
|
|
1381
|
+
</html>`}function jsonForScript(value){return JSON.stringify(value).replace(/</g,"\\u003c")}function escapeHtml(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}async function screenshotCompareBuffer(opts){let labelLeft=opts.leftLabel??"light",labelRight=opts.rightLabel??"dark",w=opts.viewport.w,h=opts.viewport.h,wrapper=buildCompareWrapper(opts.leftHtml,opts.rightHtml,w,h,labelLeft,labelRight);return withContext({viewport:{width:w*2+24,height:800},deviceScaleFactor:opts.deviceScaleFactor??1},async(context)=>{let page=await context.newPage();return await page.setContent(wrapper,{waitUntil:"domcontentloaded",timeout:CAPTURE_TIMEOUT_MS}),await page.waitForFunction(()=>{let l=document.getElementById("L"),r=document.getElementById("R");return!!(l&&r&&l.dataset.ready==="1"&&r.dataset.ready==="1")},void 0,{timeout:CAPTURE_TIMEOUT_MS}).catch(()=>{}),await settleForCapture(page),await retryTransientScreenshot(()=>page.screenshot({fullPage:!0,timeout:CAPTURE_TIMEOUT_MS}))})}function buildCompareWrapper(leftHtml,rightHtml,panelWidth,panelHeight,leftLabel,rightLabel){let esc=escapeHtml;return`<!doctype html>
|
|
1453
1382
|
<html><head><meta charset="utf-8"><style>${["*{box-sizing:border-box}","body{margin:0;padding:8px;background:#f4f4f5;font-family:ui-sans-serif,system-ui,sans-serif;color:#27272a}",".row{display:flex;gap:8px;align-items:flex-start}",".panel{display:flex;flex-direction:column;gap:4px}",".label{font-size:11px;text-transform:uppercase;letter-spacing:0.05em;color:#71717a}","iframe{border:1px solid #e4e4e7;background:#fff;display:block}"].join("")}</style></head>
|
|
1454
1383
|
<body>
|
|
1455
1384
|
<div class="row">
|
|
@@ -1488,4 +1417,75 @@ for (let i = 0; i < ${pages.length}; i++) {
|
|
|
1488
1417
|
f.addEventListener("load", () => { f.dataset.ready = "1"; });
|
|
1489
1418
|
}
|
|
1490
1419
|
</script>
|
|
1491
|
-
</body></html>`}class
|
|
1420
|
+
</body></html>`}var import_react2=__toESM(require_react_development(),1);var MAX_STAND_INS=8;class RenderGuardLimitError extends Error{failures;constructor(failures,options){super(`${failures.length} components failed to render \u2014 more than the ${MAX_STAND_INS} the guard will stand in for, so the screen was not drawn.`,options);this.name="RenderGuardLimitError",this.failures=failures}}function blame(error,registry){if(!(error instanceof Error)||typeof error.stack!=="string")return null;for(let match of error.stack.matchAll(/^\s*at ([A-Za-z0-9_$]+)/gm)){let name=match[1];if(name!==void 0&&Object.hasOwn(registry,name))return name}return null}function attr(props,name){let value=props[name];return typeof value==="string"?value:void 0}function standIn(componentId,reason,kind){let missing=kind==="missing";return function(props){return import_react2.createElement("div",{"data-velloo-render-error":componentId,"data-node-path":attr(props,"data-node-path"),"data-snippet-id":attr(props,"data-snippet-id"),"data-snippet-path":attr(props,"data-snippet-path"),"data-snippet-at":attr(props,"data-snippet-at"),title:reason,style:{border:"1px dashed currentColor",borderRadius:"6px",padding:"12px",...missing?{}:{opacity:0.7},font:"12px ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap"}},import_react2.createElement("span",{style:{display:"block",opacity:0.7}},missing?`${componentId} is not in this screen's library`:`${componentId} failed to render \u2014 ${reason}`),missing?props.children:null)}}function locate(registry,toHtml){let open=[];function Close({node}){let at=open.lastIndexOf(node);if(at>=0)open.splice(at,1);return null}let traced={};for(let[componentId,Component]of Object.entries(registry))traced[componentId]=function(props){let nodePath=attr(props,"data-node-path");if(nodePath===void 0)return import_react2.createElement(Component,props);let node={componentId,nodePath,snippetPath:attr(props,"data-snippet-path")};return open.push(node),import_react2.createElement(import_react2.Fragment,null,import_react2.createElement(Component,props),import_react2.createElement(Close,{node}))};try{toHtml(traced)}catch{return open.at(-1)??null}return null}function replaceAt(Component,at,replacement){return function(props){let here=attr(props,"data-node-path")===at.nodePath&&attr(props,"data-snippet-path")===at.snippetPath;return import_react2.createElement(here?replacement:Component,props)}}function renderGuarded(registry,toHtml){let failures=[],active=registry;for(;;)try{return{html:toHtml(active),failures}}catch(error){let unknown=error instanceof UnknownComponentError,reason=error instanceof Error?error.message:String(error),componentId=unknown?error.ref:blame(error,registry),node=componentId===null?locate(active,toHtml):null;if(componentId===null&&node===null)throw error;let failure=node?{componentId:node.componentId,reason,kind:"threw",nodePath:node.nodePath}:{componentId,reason,kind:unknown?"missing":"threw"};if(failures.some((seen)=>seen.componentId===failure.componentId&&seen.nodePath===failure.nodePath))throw error;if(failures.length>=MAX_STAND_INS)throw new RenderGuardLimitError([...failures,failure],{cause:error});failures.push(failure);let replacement=standIn(failure.componentId,reason,failure.kind),Original=active[failure.componentId];active={...active,[failure.componentId]:node&&Original?replaceAt(Original,node,replacement):replacement}}}var React=__toESM(require_react_development()),ReactDOM=__toESM(require_react_dom()),REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_SCOPE_TYPE=Symbol.for("react.scope"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),REACT_LEGACY_HIDDEN_TYPE=Symbol.for("react.legacy_hidden"),REACT_MEMO_CACHE_SENTINEL=Symbol.for("react.memo_cache_sentinel"),REACT_VIEW_TRANSITION_TYPE=Symbol.for("react.view_transition"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator;function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!=="object")return null;return maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"],typeof maybeIterable==="function"?maybeIterable:null}var isArrayImpl=Array.isArray,jsxPropsParents=new WeakMap,jsxChildrenParents=new WeakMap;function objectName(object){return object=Object.prototype.toString.call(object),object.slice(8,object.length-1)}function describeKeyForErrorMessage(key){var encodedKey=JSON.stringify(key);return'"'+key+'"'===encodedKey?key:encodedKey}function describeValueForErrorMessage(value){switch(typeof value){case"string":return JSON.stringify(10>=value.length?value:value.slice(0,10)+"...");case"object":if(isArrayImpl(value))return"[...]";if(value!==null&&value.$$typeof===CLIENT_REFERENCE_TAG)return"client";return value=objectName(value),value==="Object"?"{...}":value;case"function":return value.$$typeof===CLIENT_REFERENCE_TAG?"client":(value=value.displayName||value.name)?"function "+value:"function";default:return String(value)}}function describeElementType(type){if(typeof type==="string")return type;switch(type){case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type==="object")switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:return describeElementType(type.render);case REACT_MEMO_TYPE:return describeElementType(type.type);case REACT_LAZY_TYPE:var payload=type._payload;type=type._init;try{return describeElementType(type(payload))}catch(x){}}return""}var CLIENT_REFERENCE_TAG=Symbol.for("react.client.reference");function describeObjectForErrorMessage(objectOrArray,expandedName){var objKind=objectName(objectOrArray);if(objKind!=="Object"&&objKind!=="Array")return objKind;var start=-1,length=0;if(isArrayImpl(objectOrArray))if(jsxChildrenParents.has(objectOrArray)){var type=jsxChildrenParents.get(objectOrArray);objKind="<"+describeElementType(type)+">";for(var i=0;i<objectOrArray.length;i++){var value=objectOrArray[i];value=typeof value==="string"?value:typeof value==="object"&&value!==null?"{"+describeObjectForErrorMessage(value)+"}":"{"+describeValueForErrorMessage(value)+"}",""+i===expandedName?(start=objKind.length,length=value.length,objKind+=value):objKind=15>value.length&&40>objKind.length+value.length?objKind+value:objKind+"{...}"}objKind+="</"+describeElementType(type)+">"}else{objKind="[";for(type=0;type<objectOrArray.length;type++)0<type&&(objKind+=", "),i=objectOrArray[type],i=typeof i==="object"&&i!==null?describeObjectForErrorMessage(i):describeValueForErrorMessage(i),""+type===expandedName?(start=objKind.length,length=i.length,objKind+=i):objKind=10>i.length&&40>objKind.length+i.length?objKind+i:objKind+"...";objKind+="]"}else if(objectOrArray.$$typeof===REACT_ELEMENT_TYPE)objKind="<"+describeElementType(objectOrArray.type)+"/>";else{if(objectOrArray.$$typeof===CLIENT_REFERENCE_TAG)return"client";if(jsxPropsParents.has(objectOrArray)){objKind=jsxPropsParents.get(objectOrArray),objKind="<"+(describeElementType(objKind)||"..."),type=Object.keys(objectOrArray);for(i=0;i<type.length;i++){objKind+=" ",value=type[i],objKind+=describeKeyForErrorMessage(value)+"=";var _value2=objectOrArray[value],_substr2=value===expandedName&&typeof _value2==="object"&&_value2!==null?describeObjectForErrorMessage(_value2):describeValueForErrorMessage(_value2);typeof _value2!=="string"&&(_substr2="{"+_substr2+"}"),value===expandedName?(start=objKind.length,length=_substr2.length,objKind+=_substr2):objKind=10>_substr2.length&&40>objKind.length+_substr2.length?objKind+_substr2:objKind+"..."}objKind+=">"}else{objKind="{",type=Object.keys(objectOrArray);for(i=0;i<type.length;i++)0<i&&(objKind+=", "),value=type[i],objKind+=describeKeyForErrorMessage(value)+": ",_value2=objectOrArray[value],_value2=typeof _value2==="object"&&_value2!==null?describeObjectForErrorMessage(_value2):describeValueForErrorMessage(_value2),value===expandedName?(start=objKind.length,length=_value2.length,objKind+=_value2):objKind=10>_value2.length&&40>objKind.length+_value2.length?objKind+_value2:objKind+"...";objKind+="}"}}return expandedName===void 0?objKind:-1<start&&0<length?(objectOrArray=" ".repeat(start)+"^".repeat(length),`
|
|
1421
|
+
`+objKind+`
|
|
1422
|
+
`+objectOrArray):`
|
|
1423
|
+
`+objKind}var scheduleMicrotask=queueMicrotask;function flushBuffered(destination){typeof destination.flush==="function"&&destination.flush()}function writeChunk(destination,chunk){chunk.length!==0&&destination.write(chunk)}function byteLengthOfChunk(chunk){return Buffer.byteLength(chunk,"utf8")}function closeWithError(destination,error){typeof destination.error==="function"?destination.error(error):destination.close()}var assign=Object.assign;function typeName(value){return typeof Symbol==="function"&&Symbol.toStringTag&&value[Symbol.toStringTag]||value.constructor.name||"Object"}function willCoercionThrow(value){try{return testStringCoercion(value),!1}catch(e){return!0}}function testStringCoercion(value){return""+value}function checkAttributeStringCoercion(value,attributeName){if(willCoercionThrow(value))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",attributeName,typeName(value)),testStringCoercion(value)}function checkCSSPropertyStringCoercion(value,propName){if(willCoercionThrow(value))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",propName,typeName(value)),testStringCoercion(value)}function checkHtmlStringCoercion(value){if(willCoercionThrow(value))return console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",typeName(value)),testStringCoercion(value)}var hasOwnProperty=Object.prototype.hasOwnProperty,VALID_ATTRIBUTE_NAME_REGEX=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),illegalAttributeNameCache={},validatedAttributeNameCache={};function isAttributeNameSafe(attributeName){if(hasOwnProperty.call(validatedAttributeNameCache,attributeName))return!0;if(hasOwnProperty.call(illegalAttributeNameCache,attributeName))return!1;if(VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))return validatedAttributeNameCache[attributeName]=!0;return illegalAttributeNameCache[attributeName]=!0,console.error("Invalid attribute name: `%s`",attributeName),!1}var unitlessNumbers=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),aliases=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hasReadOnlyValue={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function checkControlledValueProps(tagName,props){hasReadOnlyValue[props.type]||props.onChange||props.onInput||props.readOnly||props.disabled||props.value==null||(tagName==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),props.onChange||props.readOnly||props.disabled||props.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}var ariaProperties={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},warnedProperties$1={},rARIA$1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rARIACamel$1=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function validateProperty$1(tagName,name){if(hasOwnProperty.call(warnedProperties$1,name)&&warnedProperties$1[name])return!0;if(rARIACamel$1.test(name)){if(tagName="aria-"+name.slice(4).toLowerCase(),tagName=ariaProperties.hasOwnProperty(tagName)?tagName:null,tagName==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",name),warnedProperties$1[name]=!0;if(name!==tagName)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",name,tagName),warnedProperties$1[name]=!0}if(rARIA$1.test(name)){if(tagName=name.toLowerCase(),tagName=ariaProperties.hasOwnProperty(tagName)?tagName:null,tagName==null)return warnedProperties$1[name]=!0,!1;name!==tagName&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",name,tagName),warnedProperties$1[name]=!0)}return!0}function validateProperties$2(type,props){var invalidProps=[],key;for(key in props)validateProperty$1(type,key)||invalidProps.push(key);props=invalidProps.map(function(prop){return"`"+prop+"`"}).join(", "),invalidProps.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",props,type):1<invalidProps.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",props,type)}var didWarnValueNull=!1,possibleStandardNames={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},warnedProperties={},EVENT_NAME_REGEX=/^on./,INVALID_EVENT_NAME_REGEX=/^on[^A-Z]/,rARIA=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rARIACamel=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function validateProperty(tagName,name,value,eventRegistry){if(hasOwnProperty.call(warnedProperties,name)&&warnedProperties[name])return!0;var lowerCasedName=name.toLowerCase();if(lowerCasedName==="onfocusin"||lowerCasedName==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),warnedProperties[name]=!0;if(typeof value==="function"&&(tagName==="form"&&name==="action"||tagName==="input"&&name==="formAction"||tagName==="button"&&name==="formAction"))return!0;if(eventRegistry!=null){if(tagName=eventRegistry.possibleRegistrationNames,eventRegistry.registrationNameDependencies.hasOwnProperty(name))return!0;if(eventRegistry=tagName.hasOwnProperty(lowerCasedName)?tagName[lowerCasedName]:null,eventRegistry!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",name,eventRegistry),warnedProperties[name]=!0;if(EVENT_NAME_REGEX.test(name))return console.error("Unknown event handler property `%s`. It will be ignored.",name),warnedProperties[name]=!0}else if(EVENT_NAME_REGEX.test(name))return INVALID_EVENT_NAME_REGEX.test(name)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",name),warnedProperties[name]=!0;if(rARIA.test(name)||rARIACamel.test(name))return!0;if(lowerCasedName==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),warnedProperties[name]=!0;if(lowerCasedName==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),warnedProperties[name]=!0;if(lowerCasedName==="is"&&value!==null&&value!==void 0&&typeof value!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof value),warnedProperties[name]=!0;if(typeof value==="number"&&isNaN(value))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",name),warnedProperties[name]=!0;if(possibleStandardNames.hasOwnProperty(lowerCasedName)){if(lowerCasedName=possibleStandardNames[lowerCasedName],lowerCasedName!==name)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",name,lowerCasedName),warnedProperties[name]=!0}else if(name!==lowerCasedName)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",name,lowerCasedName),warnedProperties[name]=!0;switch(name){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof value){case"boolean":switch(name){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:if(lowerCasedName=name.toLowerCase().slice(0,5),lowerCasedName==="data-"||lowerCasedName==="aria-")return!0;return value?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',value,name,name,value,name):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',value,name,name,value,name,name,name),warnedProperties[name]=!0}case"function":case"symbol":return warnedProperties[name]=!0,!1;case"string":if(value==="false"||value==="true"){switch(name){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",value,name,value==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',name,value),warnedProperties[name]=!0}}return!0}function warnUnknownProperties(type,props,eventRegistry){var unknownProps=[],key;for(key in props)validateProperty(type,key,props[key],eventRegistry)||unknownProps.push(key);props=unknownProps.map(function(prop){return"`"+prop+"`"}).join(", "),unknownProps.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",props,type):1<unknownProps.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",props,type)}var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/,msPattern$1=/^-ms-/,hyphenPattern=/-(.)/g,badStyleValueWithSemicolonPattern=/;\s*$/,warnedStyleNames={},warnedStyleValues={},warnedForNaNValue=!1,warnedForInfinityValue=!1;function camelize(string){return string.replace(hyphenPattern,function(_,character){return character.toUpperCase()})}var matchHtmlRegExp=/["'&<>]/;function escapeTextForBrowser(text){if(typeof text==="boolean"||typeof text==="number"||typeof text==="bigint")return""+text;checkHtmlStringCoercion(text),text=""+text;var match=matchHtmlRegExp.exec(text);if(match){var html="",index,lastIndex=0;for(index=match.index;index<text.length;index++){switch(text.charCodeAt(index)){case 34:match=""";break;case 38:match="&";break;case 39:match="'";break;case 60:match="<";break;case 62:match=">";break;default:continue}lastIndex!==index&&(html+=text.slice(lastIndex,index)),lastIndex=index+1,html+=match}text=lastIndex!==index?html+text.slice(lastIndex,index):html}return text}var uppercasePattern=/([A-Z])/g,msPattern=/^ms-/,isJavaScriptProtocol=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sanitizeURL(url){return isJavaScriptProtocol.test(""+url)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":url}var ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ReactDOMSharedInternals=ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,NotPending=Object.freeze({pending:!1,data:null,method:null,action:null}),previousDispatcher=ReactDOMSharedInternals.d;ReactDOMSharedInternals.d={f:previousDispatcher.f,r:previousDispatcher.r,D:prefetchDNS,C:preconnect,L:preload,m:preloadModule,X:preinitScript,S:preinitStyle,M:preinitModuleScript};var NothingSent=0,SentCompleteSegmentFunction=1,SentCompleteBoundaryFunction=2,SentClientRenderFunction=4,SentStyleInsertionFunction=8,SentCompletedShellId=32,SentMarkShellTime=64,EXISTS=null,PRELOAD_NO_CREDS=[];Object.freeze(PRELOAD_NO_CREDS);var currentlyFlushingRenderState=null,endInlineScript="</script>";function escapeEntireInlineScriptContent(scriptText){return checkHtmlStringCoercion(scriptText),(""+scriptText).replace(scriptRegex,scriptReplacer)}var scriptRegex=/(<\/|<)(s)(cript)/gi;function scriptReplacer(match,prefix,s,suffix){return""+prefix+(s==="s"?"\\u0073":"\\u0053")+suffix}var didWarnForNewBooleanPropsWithEmptyValue;didWarnForNewBooleanPropsWithEmptyValue={};function createRenderState(resumableState,nonce,externalRuntimeConfig,importMap,onHeaders,maxHeadersLength){externalRuntimeConfig=typeof nonce==="string"?nonce:nonce&&nonce.script;var inlineScriptWithNonce=externalRuntimeConfig===void 0?"<script":'<script nonce="'+escapeTextForBrowser(externalRuntimeConfig)+'"',nonceStyle=typeof nonce==="string"?void 0:nonce&&nonce.style,inlineStyleWithNonce=nonceStyle===void 0?"<style":'<style nonce="'+escapeTextForBrowser(nonceStyle)+'"',idPrefix=resumableState.idPrefix,bootstrapChunks=[],{bootstrapScriptContent,bootstrapScripts,bootstrapModules}=resumableState;if(bootstrapScriptContent!==void 0&&(bootstrapChunks.push(inlineScriptWithNonce),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(endOfStartTag,escapeEntireInlineScriptContent(bootstrapScriptContent),endInlineScript)),bootstrapScriptContent=[],importMap!==void 0&&(bootstrapScriptContent.push('<script type="importmap">'),bootstrapScriptContent.push(escapeEntireInlineScriptContent(JSON.stringify(importMap))),bootstrapScriptContent.push("</script>")),onHeaders&&typeof maxHeadersLength==="number"&&0>=maxHeadersLength&&console.error("React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.",maxHeadersLength===0?"zero":maxHeadersLength),importMap=onHeaders?{preconnects:"",fontPreloads:"",highImagePreloads:"",remainingCapacity:2+(typeof maxHeadersLength==="number"?maxHeadersLength:2000)}:null,onHeaders={placeholderPrefix:idPrefix+"P:",segmentPrefix:idPrefix+"S:",boundaryPrefix:idPrefix+"B:",startInlineScript:inlineScriptWithNonce,startInlineStyle:inlineStyleWithNonce,preamble:createPreambleState(),externalRuntimeScript:null,bootstrapChunks,importMapChunks:bootstrapScriptContent,onHeaders,headers:importMap,resets:{font:{},dns:{},connect:{default:{},anonymous:{},credentials:{}},image:{},style:{}},charsetChunks:[],viewportChunks:[],hoistableChunks:[],preconnects:new Set,fontPreloads:new Set,highImagePreloads:new Set,styles:new Map,bootstrapScripts:new Set,scripts:new Set,bulkPreloads:new Set,preloads:{images:new Map,stylesheets:new Map,scripts:new Map,moduleScripts:new Map},nonce:{script:externalRuntimeConfig,style:nonceStyle},hoistableState:null,stylesToHoist:!1},bootstrapScripts!==void 0)for(importMap=0;importMap<bootstrapScripts.length;importMap++)maxHeadersLength=bootstrapScripts[importMap],inlineStyleWithNonce=nonceStyle=void 0,idPrefix={rel:"preload",as:"script",fetchPriority:"low",nonce},typeof maxHeadersLength==="string"?idPrefix.href=inlineScriptWithNonce=maxHeadersLength:(idPrefix.href=inlineScriptWithNonce=maxHeadersLength.src,idPrefix.integrity=inlineStyleWithNonce=typeof maxHeadersLength.integrity==="string"?maxHeadersLength.integrity:void 0,idPrefix.crossOrigin=nonceStyle=typeof maxHeadersLength==="string"||maxHeadersLength.crossOrigin==null?void 0:maxHeadersLength.crossOrigin==="use-credentials"?"use-credentials":""),preloadBootstrapScriptOrModule(resumableState,onHeaders,inlineScriptWithNonce,idPrefix),bootstrapChunks.push('<script src="',escapeTextForBrowser(inlineScriptWithNonce),attributeEnd),externalRuntimeConfig&&bootstrapChunks.push(' nonce="',escapeTextForBrowser(externalRuntimeConfig),attributeEnd),typeof inlineStyleWithNonce==="string"&&bootstrapChunks.push(' integrity="',escapeTextForBrowser(inlineStyleWithNonce),attributeEnd),typeof nonceStyle==="string"&&bootstrapChunks.push(' crossorigin="',escapeTextForBrowser(nonceStyle),attributeEnd),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(' async=""></script>');if(bootstrapModules!==void 0)for(nonce=0;nonce<bootstrapModules.length;nonce++)bootstrapScripts=bootstrapModules[nonce],inlineScriptWithNonce=maxHeadersLength=void 0,nonceStyle={rel:"modulepreload",fetchPriority:"low",nonce:externalRuntimeConfig},typeof bootstrapScripts==="string"?nonceStyle.href=importMap=bootstrapScripts:(nonceStyle.href=importMap=bootstrapScripts.src,nonceStyle.integrity=inlineScriptWithNonce=typeof bootstrapScripts.integrity==="string"?bootstrapScripts.integrity:void 0,nonceStyle.crossOrigin=maxHeadersLength=typeof bootstrapScripts==="string"||bootstrapScripts.crossOrigin==null?void 0:bootstrapScripts.crossOrigin==="use-credentials"?"use-credentials":""),preloadBootstrapScriptOrModule(resumableState,onHeaders,importMap,nonceStyle),bootstrapChunks.push('<script type="module" src="',escapeTextForBrowser(importMap),attributeEnd),externalRuntimeConfig&&bootstrapChunks.push(' nonce="',escapeTextForBrowser(externalRuntimeConfig),attributeEnd),typeof inlineScriptWithNonce==="string"&&bootstrapChunks.push(' integrity="',escapeTextForBrowser(inlineScriptWithNonce),attributeEnd),typeof maxHeadersLength==="string"&&bootstrapChunks.push(' crossorigin="',escapeTextForBrowser(maxHeadersLength),attributeEnd),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(' async=""></script>');return onHeaders}function createResumableState(identifierPrefix,externalRuntimeConfig,bootstrapScriptContent,bootstrapScripts,bootstrapModules){return{idPrefix:identifierPrefix===void 0?"":identifierPrefix,nextFormID:0,streamingFormat:0,bootstrapScriptContent,bootstrapScripts,bootstrapModules,instructions:NothingSent,hasBody:!1,hasHtml:!1,unknownResources:{},dnsResources:{},connectResources:{default:{},anonymous:{},credentials:{}},imageResources:{},styleResources:{},scriptResources:{},moduleUnknownResources:{},moduleScriptResources:{}}}function createPreambleState(){return{htmlChunks:null,headChunks:null,bodyChunks:null}}var ROOT_HTML_MODE=0,HTML_HTML_MODE=1,HTML_MODE=2,HTML_HEAD_MODE=3,SVG_MODE=4,MATHML_MODE=5,HTML_TABLE_MODE=6,HTML_TABLE_BODY_MODE=7,HTML_TABLE_ROW_MODE=8,HTML_COLGROUP_MODE=9;function createFormatContext(insertionMode,selectedValue,tagScope,viewTransition){return{insertionMode,selectedValue,tagScope,viewTransition}}function createRootFormatContext(namespaceURI){return createFormatContext(namespaceURI==="http://www.w3.org/2000/svg"?SVG_MODE:namespaceURI==="http://www.w3.org/1998/Math/MathML"?MATHML_MODE:ROOT_HTML_MODE,null,0,null)}function getChildFormatContext(parentContext,type,props){var subtreeScope=parentContext.tagScope&-25;switch(type){case"noscript":return createFormatContext(HTML_MODE,null,subtreeScope|1,null);case"select":return createFormatContext(HTML_MODE,props.value!=null?props.value:props.defaultValue,subtreeScope,null);case"svg":return createFormatContext(SVG_MODE,null,subtreeScope,null);case"picture":return createFormatContext(HTML_MODE,null,subtreeScope|2,null);case"math":return createFormatContext(MATHML_MODE,null,subtreeScope,null);case"foreignObject":return createFormatContext(HTML_MODE,null,subtreeScope,null);case"table":return createFormatContext(HTML_TABLE_MODE,null,subtreeScope,null);case"thead":case"tbody":case"tfoot":return createFormatContext(HTML_TABLE_BODY_MODE,null,subtreeScope,null);case"colgroup":return createFormatContext(HTML_COLGROUP_MODE,null,subtreeScope,null);case"tr":return createFormatContext(HTML_TABLE_ROW_MODE,null,subtreeScope,null);case"head":if(parentContext.insertionMode<HTML_MODE)return createFormatContext(HTML_HEAD_MODE,null,subtreeScope,null);break;case"html":if(parentContext.insertionMode===ROOT_HTML_MODE)return createFormatContext(HTML_HTML_MODE,null,subtreeScope,null)}return parentContext.insertionMode>=HTML_TABLE_MODE||parentContext.insertionMode<HTML_MODE?createFormatContext(HTML_MODE,null,subtreeScope,null):parentContext.tagScope!==subtreeScope?createFormatContext(parentContext.insertionMode,parentContext.selectedValue,subtreeScope,null):parentContext}function getSuspenseViewTransition(parentViewTransition){return parentViewTransition===null?null:{update:parentViewTransition.update,enter:"none",exit:"none",share:parentViewTransition.update,name:parentViewTransition.autoName,autoName:parentViewTransition.autoName,nameIdx:0}}function getSuspenseFallbackFormatContext(resumableState,parentContext){return parentContext.tagScope&32&&(resumableState.instructions|=128),createFormatContext(parentContext.insertionMode,parentContext.selectedValue,parentContext.tagScope|12,getSuspenseViewTransition(parentContext.viewTransition))}function getSuspenseContentFormatContext(resumableState,parentContext){resumableState=getSuspenseViewTransition(parentContext.viewTransition);var subtreeScope=parentContext.tagScope|16;return resumableState!==null&&resumableState.share!=="none"&&(subtreeScope|=64),createFormatContext(parentContext.insertionMode,parentContext.selectedValue,subtreeScope,resumableState)}function pushTextInstance(target,text,renderState,textEmbedded){if(text==="")return textEmbedded;return textEmbedded&&target.push("<!-- -->"),target.push(escapeTextForBrowser(text)),!0}function pushSegmentFinale(target,renderState,lastPushedText,textEmbedded){lastPushedText&&textEmbedded&&target.push("<!-- -->")}var styleNameCache=new Map,styleAttributeStart=' style="',styleAssign=":",styleSeparator=";";function pushStyleAttribute(target,style){if(typeof style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var isFirst=!0,styleName;for(styleName in style)if(hasOwnProperty.call(style,styleName)){var styleValue=style[styleName];if(styleValue!=null&&typeof styleValue!=="boolean"&&styleValue!==""){if(styleName.indexOf("--")===0){var nameChunk=escapeTextForBrowser(styleName);checkCSSPropertyStringCoercion(styleValue,styleName),styleValue=escapeTextForBrowser((""+styleValue).trim())}else{nameChunk=styleName;var value=styleValue;if(-1<nameChunk.indexOf("-")){var name=nameChunk;warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]||(warnedStyleNames[name]=!0,console.error("Unsupported style property %s. Did you mean %s?",name,camelize(name.replace(msPattern$1,"ms-"))))}else if(badVendoredStyleNamePattern.test(nameChunk))name=nameChunk,warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]||(warnedStyleNames[name]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",name,name.charAt(0).toUpperCase()+name.slice(1)));else if(badStyleValueWithSemicolonPattern.test(value)){name=nameChunk;var value$jscomp$0=value;warnedStyleValues.hasOwnProperty(value$jscomp$0)&&warnedStyleValues[value$jscomp$0]||(warnedStyleValues[value$jscomp$0]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,name,value$jscomp$0.replace(badStyleValueWithSemicolonPattern,"")))}typeof value==="number"&&(isNaN(value)?warnedForNaNValue||(warnedForNaNValue=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",nameChunk)):isFinite(value)||warnedForInfinityValue||(warnedForInfinityValue=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",nameChunk))),nameChunk=styleName,value=styleNameCache.get(nameChunk),value!==void 0?nameChunk=value:(value=escapeTextForBrowser(nameChunk.replace(uppercasePattern,"-$1").toLowerCase().replace(msPattern,"-ms-")),styleNameCache.set(nameChunk,value),nameChunk=value),typeof styleValue==="number"?styleValue=styleValue===0||unitlessNumbers.has(styleName)?""+styleValue:styleValue+"px":(checkCSSPropertyStringCoercion(styleValue,styleName),styleValue=escapeTextForBrowser((""+styleValue).trim()))}isFirst?(isFirst=!1,target.push(styleAttributeStart,nameChunk,styleAssign,styleValue)):target.push(styleSeparator,nameChunk,styleAssign,styleValue)}}isFirst||target.push(attributeEnd)}var attributeSeparator=" ",attributeAssign='="',attributeEnd='"',attributeEmptyString='=""';function pushBooleanAttribute(target,name,value){value&&typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeEmptyString)}function pushStringAttribute(target,name,value){typeof value!=="function"&&typeof value!=="symbol"&&typeof value!=="boolean"&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd)}var actionJavaScriptURL=escapeTextForBrowser("javascript:throw new Error('React form unexpectedly submitted.')");function pushAdditionalFormField(value,key){this.push('<input type="hidden"'),validateAdditionalFormField(value),pushStringAttribute(this,"name",key),pushStringAttribute(this,"value",value),this.push(endOfStartTagSelfClosing)}function validateAdditionalFormField(value){if(typeof value!=="string")throw Error("File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.")}function getCustomFormFields(resumableState,formAction){if(typeof formAction.$$FORM_ACTION==="function"){var id=resumableState.nextFormID++;resumableState=resumableState.idPrefix+id;try{var customFields=formAction.$$FORM_ACTION(resumableState);if(customFields){var formData=customFields.data;formData!=null&&formData.forEach(validateAdditionalFormField)}return customFields}catch(x){if(typeof x==="object"&&x!==null&&typeof x.then==="function")throw x;console.error(`Failed to serialize an action for progressive enhancement:
|
|
1424
|
+
%s`,x)}}return null}function pushFormActionAttribute(target,resumableState,renderState,formAction,formEncType,formMethod,formTarget,name){var formData=null;if(typeof formAction==="function"){name===null||didWarnFormActionName||(didWarnFormActionName=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),formEncType===null&&formMethod===null||didWarnFormActionMethod||(didWarnFormActionMethod=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),formTarget===null||didWarnFormActionTarget||(didWarnFormActionTarget=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."));var customFields=getCustomFormFields(resumableState,formAction);customFields!==null?(name=customFields.name,formAction=customFields.action||"",formEncType=customFields.encType,formMethod=customFields.method,formTarget=customFields.target,formData=customFields.data):(target.push(attributeSeparator,"formAction",attributeAssign,actionJavaScriptURL,attributeEnd),formTarget=formMethod=formEncType=formAction=name=null,injectFormReplayingRuntime(resumableState,renderState))}return name!=null&&pushAttribute(target,"name",name),formAction!=null&&pushAttribute(target,"formAction",formAction),formEncType!=null&&pushAttribute(target,"formEncType",formEncType),formMethod!=null&&pushAttribute(target,"formMethod",formMethod),formTarget!=null&&pushAttribute(target,"formTarget",formTarget),formData}function pushAttribute(target,name,value){switch(name){case"className":pushStringAttribute(target,"class",value);break;case"tabIndex":pushStringAttribute(target,"tabindex",value);break;case"dir":case"role":case"viewBox":case"width":case"height":pushStringAttribute(target,name,value);break;case"style":pushStyleAttribute(target,value);break;case"src":case"href":if(value===""){name==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',name,name):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',name,name);break}case"action":case"formAction":if(value==null||typeof value==="function"||typeof value==="symbol"||typeof value==="boolean")break;checkAttributeStringCoercion(value,name),value=sanitizeURL(""+value),target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"autoFocus":case"multiple":case"muted":pushBooleanAttribute(target,name.toLowerCase(),value);break;case"xlinkHref":if(typeof value==="function"||typeof value==="symbol"||typeof value==="boolean")break;checkAttributeStringCoercion(value,name),value=sanitizeURL(""+value),target.push(attributeSeparator,"xlink:href",attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"inert":value!==""||didWarnForNewBooleanPropsWithEmptyValue[name]||(didWarnForNewBooleanPropsWithEmptyValue[name]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",name));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":value&&typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeEmptyString);break;case"capture":case"download":value===!0?target.push(attributeSeparator,name,attributeEmptyString):value!==!1&&typeof value!=="function"&&typeof value!=="symbol"&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"cols":case"rows":case"size":case"span":typeof value!=="function"&&typeof value!=="symbol"&&!isNaN(value)&&1<=value&&target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"rowSpan":case"start":typeof value==="function"||typeof value==="symbol"||isNaN(value)||target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd);break;case"xlinkActuate":pushStringAttribute(target,"xlink:actuate",value);break;case"xlinkArcrole":pushStringAttribute(target,"xlink:arcrole",value);break;case"xlinkRole":pushStringAttribute(target,"xlink:role",value);break;case"xlinkShow":pushStringAttribute(target,"xlink:show",value);break;case"xlinkTitle":pushStringAttribute(target,"xlink:title",value);break;case"xlinkType":pushStringAttribute(target,"xlink:type",value);break;case"xmlBase":pushStringAttribute(target,"xml:base",value);break;case"xmlLang":pushStringAttribute(target,"xml:lang",value);break;case"xmlSpace":pushStringAttribute(target,"xml:space",value);break;default:if(!(2<name.length)||name[0]!=="o"&&name[0]!=="O"||name[1]!=="n"&&name[1]!=="N"){if(name=aliases.get(name)||name,isAttributeNameSafe(name)){switch(typeof value){case"function":case"symbol":return;case"boolean":var prefix=name.toLowerCase().slice(0,5);if(prefix!=="data-"&&prefix!=="aria-")return}target.push(attributeSeparator,name,attributeAssign,escapeTextForBrowser(value),attributeEnd)}}}}var endOfStartTag=">",endOfStartTagSelfClosing="/>";function pushInnerHTML(target,innerHTML,children){if(innerHTML!=null){if(children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof innerHTML!=="object"||!("__html"in innerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");innerHTML=innerHTML.__html,innerHTML!==null&&innerHTML!==void 0&&(checkHtmlStringCoercion(innerHTML),target.push(""+innerHTML))}}var didWarnDefaultInputValue=!1,didWarnDefaultChecked=!1,didWarnDefaultSelectValue=!1,didWarnDefaultTextareaValue=!1,didWarnInvalidOptionChildren=!1,didWarnInvalidOptionInnerHTML=!1,didWarnSelectedSetOnOption=!1,didWarnFormActionType=!1,didWarnFormActionName=!1,didWarnFormActionTarget=!1,didWarnFormActionMethod=!1;function checkSelectProp(props,propName){var value=props[propName];value!=null&&(value=isArrayImpl(value),props.multiple&&!value?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.",propName):!props.multiple&&value&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",propName))}function flattenOptionChildren(children){var content="";return React.Children.forEach(children,function(child){child!=null&&(content+=child,didWarnInvalidOptionChildren||typeof child==="string"||typeof child==="number"||typeof child==="bigint"||(didWarnInvalidOptionChildren=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),content}var formReplayingRuntimeScript=`addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error('React form unexpectedly submitted.')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});`;function injectFormReplayingRuntime(resumableState,renderState){if((resumableState.instructions&16)===NothingSent){resumableState.instructions|=16;var{preamble,bootstrapChunks}=renderState;(preamble.htmlChunks||preamble.headChunks)&&bootstrapChunks.length===0?(bootstrapChunks.push(renderState.startInlineScript),pushCompletedShellIdAttribute(bootstrapChunks,resumableState),bootstrapChunks.push(endOfStartTag,formReplayingRuntimeScript,endInlineScript)):bootstrapChunks.unshift(renderState.startInlineScript,endOfStartTag,formReplayingRuntimeScript,endInlineScript)}}function pushLinkImpl(target,props){target.push(startChunkForTag("link"));for(var propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":case"dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTagSelfClosing),null}function escapeStyleTextContent(styleText){return checkHtmlStringCoercion(styleText),(""+styleText).replace(styleRegex,styleReplacer)}var styleRegex=/(<\/|<)(s)(tyle)/gi;function styleReplacer(match,prefix,s,suffix){return""+prefix+(s==="s"?"\\73 ":"\\53 ")+suffix}function pushSelfClosing(target,props,tag){target.push(startChunkForTag(tag));for(var propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":case"dangerouslySetInnerHTML":throw Error(tag+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTagSelfClosing),null}function pushTitleImpl(target,props){target.push(startChunkForTag("title"));var children=null,innerHTML=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":children=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),props=Array.isArray(children)?2>children.length?children[0]:null:children,typeof props!=="function"&&typeof props!=="symbol"&&props!==null&&props!==void 0&&target.push(escapeTextForBrowser(""+props)),pushInnerHTML(target,innerHTML,children),target.push(endChunkForTag("title")),null}function pushScriptImpl(target,props){target.push(startChunkForTag("script"));var children=null,innerHTML=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":children=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),children!=null&&typeof children!=="string"&&(props=typeof children==="number"?"a number for children":Array.isArray(children)?"an array for children":"something unexpected for children",console.error("A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.",props)),pushInnerHTML(target,innerHTML,children),typeof children==="string"&&target.push(escapeEntireInlineScriptContent(children)),target.push(endChunkForTag("script")),null}function pushStartSingletonElement(target,props,tag){target.push(startChunkForTag(tag));var innerHTML=tag=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":tag=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),pushInnerHTML(target,innerHTML,tag),tag}function pushStartGenericElement(target,props,tag){target.push(startChunkForTag(tag));var innerHTML=tag=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":tag=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;default:pushAttribute(target,propKey,propValue)}}return target.push(endOfStartTag),pushInnerHTML(target,innerHTML,tag),typeof tag==="string"?(target.push(escapeTextForBrowser(tag)),null):tag}var VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,validatedTagCache=new Map;function startChunkForTag(tag){var tagStartChunk=validatedTagCache.get(tag);if(tagStartChunk===void 0){if(!VALID_TAG_REGEX.test(tag))throw Error("Invalid tag: "+tag);tagStartChunk="<"+tag,validatedTagCache.set(tag,tagStartChunk)}return tagStartChunk}function pushStartInstance(target$jscomp$0,type,props,resumableState,renderState,preambleState,hoistableState,formatContext,textEmbedded){validateProperties$2(type,props),type!=="input"&&type!=="textarea"&&type!=="select"||props==null||props.value!==null||didWarnValueNull||(didWarnValueNull=!0,type==="select"&&props.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",type):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",type));b:if(type.indexOf("-")===-1)var JSCompiler_inline_result=!1;else switch(type){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":JSCompiler_inline_result=!1;break b;default:JSCompiler_inline_result=!0}switch(JSCompiler_inline_result||typeof props.is==="string"||warnUnknownProperties(type,props,null),!props.suppressContentEditableWarning&&props.contentEditable&&props.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),formatContext.insertionMode!==SVG_MODE&&formatContext.insertionMode!==MATHML_MODE&&type.indexOf("-")===-1&&type.toLowerCase()!==type&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",type),type){case"div":case"span":case"svg":case"path":break;case"a":target$jscomp$0.push(startChunkForTag("a"));var children=null,innerHTML=null,propKey;for(propKey in props)if(hasOwnProperty.call(props,propKey)){var propValue=props[propKey];if(propValue!=null)switch(propKey){case"children":children=propValue;break;case"dangerouslySetInnerHTML":innerHTML=propValue;break;case"href":propValue===""?pushStringAttribute(target$jscomp$0,"href",""):pushAttribute(target$jscomp$0,propKey,propValue);break;default:pushAttribute(target$jscomp$0,propKey,propValue)}}if(target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML,children),typeof children==="string"){target$jscomp$0.push(escapeTextForBrowser(children));var JSCompiler_inline_result$jscomp$0=null}else JSCompiler_inline_result$jscomp$0=children;return JSCompiler_inline_result$jscomp$0;case"g":case"p":case"li":break;case"select":checkControlledValueProps("select",props),checkSelectProp(props,"value"),checkSelectProp(props,"defaultValue"),props.value===void 0||props.defaultValue===void 0||didWarnDefaultSelectValue||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),didWarnDefaultSelectValue=!0),target$jscomp$0.push(startChunkForTag("select"));var children$jscomp$0=null,innerHTML$jscomp$0=null,propKey$jscomp$0;for(propKey$jscomp$0 in props)if(hasOwnProperty.call(props,propKey$jscomp$0)){var propValue$jscomp$0=props[propKey$jscomp$0];if(propValue$jscomp$0!=null)switch(propKey$jscomp$0){case"children":children$jscomp$0=propValue$jscomp$0;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$0=propValue$jscomp$0;break;case"defaultValue":case"value":break;default:pushAttribute(target$jscomp$0,propKey$jscomp$0,propValue$jscomp$0)}}return target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$0,children$jscomp$0),children$jscomp$0;case"option":var selectedValue=formatContext.selectedValue;target$jscomp$0.push(startChunkForTag("option"));var children$jscomp$1=null,value=null,selected=null,innerHTML$jscomp$1=null,propKey$jscomp$1;for(propKey$jscomp$1 in props)if(hasOwnProperty.call(props,propKey$jscomp$1)){var propValue$jscomp$1=props[propKey$jscomp$1];if(propValue$jscomp$1!=null)switch(propKey$jscomp$1){case"children":children$jscomp$1=propValue$jscomp$1;break;case"selected":selected=propValue$jscomp$1,didWarnSelectedSetOnOption||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),didWarnSelectedSetOnOption=!0);break;case"dangerouslySetInnerHTML":innerHTML$jscomp$1=propValue$jscomp$1;break;case"value":value=propValue$jscomp$1;default:pushAttribute(target$jscomp$0,propKey$jscomp$1,propValue$jscomp$1)}}if(selectedValue!=null){if(value!==null){checkAttributeStringCoercion(value,"value");var stringValue=""+value}else innerHTML$jscomp$1===null||didWarnInvalidOptionInnerHTML||(didWarnInvalidOptionInnerHTML=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")),stringValue=flattenOptionChildren(children$jscomp$1);if(isArrayImpl(selectedValue)){for(var i=0;i<selectedValue.length;i++)if(checkAttributeStringCoercion(selectedValue[i],"value"),""+selectedValue[i]===stringValue){target$jscomp$0.push(' selected=""');break}}else checkAttributeStringCoercion(selectedValue,"select.value"),""+selectedValue===stringValue&&target$jscomp$0.push(' selected=""')}else selected&&target$jscomp$0.push(' selected=""');return target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$1,children$jscomp$1),children$jscomp$1;case"textarea":checkControlledValueProps("textarea",props),props.value===void 0||props.defaultValue===void 0||didWarnDefaultTextareaValue||(console.error("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components"),didWarnDefaultTextareaValue=!0),target$jscomp$0.push(startChunkForTag("textarea"));var value$jscomp$0=null,defaultValue=null,children$jscomp$2=null,propKey$jscomp$2;for(propKey$jscomp$2 in props)if(hasOwnProperty.call(props,propKey$jscomp$2)){var propValue$jscomp$2=props[propKey$jscomp$2];if(propValue$jscomp$2!=null)switch(propKey$jscomp$2){case"children":children$jscomp$2=propValue$jscomp$2;break;case"value":value$jscomp$0=propValue$jscomp$2;break;case"defaultValue":defaultValue=propValue$jscomp$2;break;case"dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:pushAttribute(target$jscomp$0,propKey$jscomp$2,propValue$jscomp$2)}}if(value$jscomp$0===null&&defaultValue!==null&&(value$jscomp$0=defaultValue),target$jscomp$0.push(endOfStartTag),children$jscomp$2!=null){if(console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),value$jscomp$0!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(isArrayImpl(children$jscomp$2)){if(1<children$jscomp$2.length)throw Error("<textarea> can only have at most one child.");checkHtmlStringCoercion(children$jscomp$2[0]),value$jscomp$0=""+children$jscomp$2[0]}checkHtmlStringCoercion(children$jscomp$2),value$jscomp$0=""+children$jscomp$2}return typeof value$jscomp$0==="string"&&value$jscomp$0[0]===`
|
|
1425
|
+
`&&target$jscomp$0.push(`
|
|
1426
|
+
`),value$jscomp$0!==null&&(checkAttributeStringCoercion(value$jscomp$0,"value"),target$jscomp$0.push(escapeTextForBrowser(""+value$jscomp$0))),null;case"input":checkControlledValueProps("input",props),target$jscomp$0.push(startChunkForTag("input"));var name=null,formAction=null,formEncType=null,formMethod=null,formTarget=null,value$jscomp$1=null,defaultValue$jscomp$0=null,checked=null,defaultChecked=null,propKey$jscomp$3;for(propKey$jscomp$3 in props)if(hasOwnProperty.call(props,propKey$jscomp$3)){var propValue$jscomp$3=props[propKey$jscomp$3];if(propValue$jscomp$3!=null)switch(propKey$jscomp$3){case"children":case"dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"name":name=propValue$jscomp$3;break;case"formAction":formAction=propValue$jscomp$3;break;case"formEncType":formEncType=propValue$jscomp$3;break;case"formMethod":formMethod=propValue$jscomp$3;break;case"formTarget":formTarget=propValue$jscomp$3;break;case"defaultChecked":defaultChecked=propValue$jscomp$3;break;case"defaultValue":defaultValue$jscomp$0=propValue$jscomp$3;break;case"checked":checked=propValue$jscomp$3;break;case"value":value$jscomp$1=propValue$jscomp$3;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$3,propValue$jscomp$3)}}formAction===null||props.type==="image"||props.type==="submit"||didWarnFormActionType||(didWarnFormActionType=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".'));var formData=pushFormActionAttribute(target$jscomp$0,resumableState,renderState,formAction,formEncType,formMethod,formTarget,name);return checked===null||defaultChecked===null||didWarnDefaultChecked||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components","A component",props.type),didWarnDefaultChecked=!0),value$jscomp$1===null||defaultValue$jscomp$0===null||didWarnDefaultInputValue||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components","A component",props.type),didWarnDefaultInputValue=!0),checked!==null?pushBooleanAttribute(target$jscomp$0,"checked",checked):defaultChecked!==null&&pushBooleanAttribute(target$jscomp$0,"checked",defaultChecked),value$jscomp$1!==null?pushAttribute(target$jscomp$0,"value",value$jscomp$1):defaultValue$jscomp$0!==null&&pushAttribute(target$jscomp$0,"value",defaultValue$jscomp$0),target$jscomp$0.push(endOfStartTagSelfClosing),formData!=null&&formData.forEach(pushAdditionalFormField,target$jscomp$0),null;case"button":target$jscomp$0.push(startChunkForTag("button"));var children$jscomp$3=null,innerHTML$jscomp$2=null,name$jscomp$0=null,formAction$jscomp$0=null,formEncType$jscomp$0=null,formMethod$jscomp$0=null,formTarget$jscomp$0=null,propKey$jscomp$4;for(propKey$jscomp$4 in props)if(hasOwnProperty.call(props,propKey$jscomp$4)){var propValue$jscomp$4=props[propKey$jscomp$4];if(propValue$jscomp$4!=null)switch(propKey$jscomp$4){case"children":children$jscomp$3=propValue$jscomp$4;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$2=propValue$jscomp$4;break;case"name":name$jscomp$0=propValue$jscomp$4;break;case"formAction":formAction$jscomp$0=propValue$jscomp$4;break;case"formEncType":formEncType$jscomp$0=propValue$jscomp$4;break;case"formMethod":formMethod$jscomp$0=propValue$jscomp$4;break;case"formTarget":formTarget$jscomp$0=propValue$jscomp$4;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$4,propValue$jscomp$4)}}formAction$jscomp$0===null||props.type==null||props.type==="submit"||didWarnFormActionType||(didWarnFormActionType=!0,console.error('A button can only specify a formAction along with type="submit" or no type.'));var formData$jscomp$0=pushFormActionAttribute(target$jscomp$0,resumableState,renderState,formAction$jscomp$0,formEncType$jscomp$0,formMethod$jscomp$0,formTarget$jscomp$0,name$jscomp$0);if(target$jscomp$0.push(endOfStartTag),formData$jscomp$0!=null&&formData$jscomp$0.forEach(pushAdditionalFormField,target$jscomp$0),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$2,children$jscomp$3),typeof children$jscomp$3==="string"){target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));var JSCompiler_inline_result$jscomp$1=null}else JSCompiler_inline_result$jscomp$1=children$jscomp$3;return JSCompiler_inline_result$jscomp$1;case"form":target$jscomp$0.push(startChunkForTag("form"));var children$jscomp$4=null,innerHTML$jscomp$3=null,formAction$jscomp$1=null,formEncType$jscomp$1=null,formMethod$jscomp$1=null,formTarget$jscomp$1=null,propKey$jscomp$5;for(propKey$jscomp$5 in props)if(hasOwnProperty.call(props,propKey$jscomp$5)){var propValue$jscomp$5=props[propKey$jscomp$5];if(propValue$jscomp$5!=null)switch(propKey$jscomp$5){case"children":children$jscomp$4=propValue$jscomp$5;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$3=propValue$jscomp$5;break;case"action":formAction$jscomp$1=propValue$jscomp$5;break;case"encType":formEncType$jscomp$1=propValue$jscomp$5;break;case"method":formMethod$jscomp$1=propValue$jscomp$5;break;case"target":formTarget$jscomp$1=propValue$jscomp$5;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$5,propValue$jscomp$5)}}var formData$jscomp$1=null,formActionName=null;if(typeof formAction$jscomp$1==="function"){formEncType$jscomp$1===null&&formMethod$jscomp$1===null||didWarnFormActionMethod||(didWarnFormActionMethod=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),formTarget$jscomp$1===null||didWarnFormActionTarget||(didWarnFormActionTarget=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."));var customFields=getCustomFormFields(resumableState,formAction$jscomp$1);customFields!==null?(formAction$jscomp$1=customFields.action||"",formEncType$jscomp$1=customFields.encType,formMethod$jscomp$1=customFields.method,formTarget$jscomp$1=customFields.target,formData$jscomp$1=customFields.data,formActionName=customFields.name):(target$jscomp$0.push(attributeSeparator,"action",attributeAssign,actionJavaScriptURL,attributeEnd),formTarget$jscomp$1=formMethod$jscomp$1=formEncType$jscomp$1=formAction$jscomp$1=null,injectFormReplayingRuntime(resumableState,renderState))}if(formAction$jscomp$1!=null&&pushAttribute(target$jscomp$0,"action",formAction$jscomp$1),formEncType$jscomp$1!=null&&pushAttribute(target$jscomp$0,"encType",formEncType$jscomp$1),formMethod$jscomp$1!=null&&pushAttribute(target$jscomp$0,"method",formMethod$jscomp$1),formTarget$jscomp$1!=null&&pushAttribute(target$jscomp$0,"target",formTarget$jscomp$1),target$jscomp$0.push(endOfStartTag),formActionName!==null&&(target$jscomp$0.push('<input type="hidden"'),pushStringAttribute(target$jscomp$0,"name",formActionName),target$jscomp$0.push(endOfStartTagSelfClosing),formData$jscomp$1!=null&&formData$jscomp$1.forEach(pushAdditionalFormField,target$jscomp$0)),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$3,children$jscomp$4),typeof children$jscomp$4==="string"){target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));var JSCompiler_inline_result$jscomp$2=null}else JSCompiler_inline_result$jscomp$2=children$jscomp$4;return JSCompiler_inline_result$jscomp$2;case"menuitem":target$jscomp$0.push(startChunkForTag("menuitem"));for(var propKey$jscomp$6 in props)if(hasOwnProperty.call(props,propKey$jscomp$6)){var propValue$jscomp$6=props[propKey$jscomp$6];if(propValue$jscomp$6!=null)switch(propKey$jscomp$6){case"children":case"dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:pushAttribute(target$jscomp$0,propKey$jscomp$6,propValue$jscomp$6)}}return target$jscomp$0.push(endOfStartTag),null;case"object":target$jscomp$0.push(startChunkForTag("object"));var children$jscomp$5=null,innerHTML$jscomp$4=null,propKey$jscomp$7;for(propKey$jscomp$7 in props)if(hasOwnProperty.call(props,propKey$jscomp$7)){var propValue$jscomp$7=props[propKey$jscomp$7];if(propValue$jscomp$7!=null)switch(propKey$jscomp$7){case"children":children$jscomp$5=propValue$jscomp$7;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$4=propValue$jscomp$7;break;case"data":checkAttributeStringCoercion(propValue$jscomp$7,"data");var sanitizedValue=sanitizeURL(""+propValue$jscomp$7);if(sanitizedValue===""){console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',propKey$jscomp$7,propKey$jscomp$7);break}target$jscomp$0.push(attributeSeparator,"data",attributeAssign,escapeTextForBrowser(sanitizedValue),attributeEnd);break;default:pushAttribute(target$jscomp$0,propKey$jscomp$7,propValue$jscomp$7)}}if(target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$4,children$jscomp$5),typeof children$jscomp$5==="string"){target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));var JSCompiler_inline_result$jscomp$3=null}else JSCompiler_inline_result$jscomp$3=children$jscomp$5;return JSCompiler_inline_result$jscomp$3;case"title":var noscriptTagInScope=formatContext.tagScope&1,isFallback=formatContext.tagScope&4;if(hasOwnProperty.call(props,"children")){var children$jscomp$6=props.children,child=Array.isArray(children$jscomp$6)?2>children$jscomp$6.length?children$jscomp$6[0]:null:children$jscomp$6;Array.isArray(children$jscomp$6)&&1<children$jscomp$6.length?console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.",children$jscomp$6.length):typeof child==="function"||typeof child==="symbol"?console.error("React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.",typeof child==="function"?"a Function":"a Sybmol"):child&&child.toString==={}.toString&&(child.$$typeof!=null?console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML."):console.error("React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>."))}if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope||props.itemProp!=null)var JSCompiler_inline_result$jscomp$4=pushTitleImpl(target$jscomp$0,props);else isFallback?JSCompiler_inline_result$jscomp$4=null:(pushTitleImpl(renderState.hoistableChunks,props),JSCompiler_inline_result$jscomp$4=void 0);return JSCompiler_inline_result$jscomp$4;case"link":var noscriptTagInScope$jscomp$0=formatContext.tagScope&1,isFallback$jscomp$0=formatContext.tagScope&4,{rel,href,precedence}=props;if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$0||props.itemProp!=null||typeof rel!=="string"||typeof href!=="string"||href===""){rel==="stylesheet"&&typeof props.precedence==="string"&&(typeof href==="string"&&href||console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',href===null?"`null`":href===void 0?"`undefined`":href===""?"an empty string":'something with type "'+typeof href+'"')),pushLinkImpl(target$jscomp$0,props);var JSCompiler_inline_result$jscomp$5=null}else if(props.rel==="stylesheet")if(typeof precedence!=="string"||props.disabled!=null||props.onLoad||props.onError){if(typeof precedence==="string"){if(props.disabled!=null)console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.');else if(props.onLoad||props.onError){var propDescription=props.onLoad&&props.onError?"`onLoad` and `onError` props":props.onLoad?"`onLoad` prop":"`onError` prop";console.error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',propDescription,propDescription)}}JSCompiler_inline_result$jscomp$5=pushLinkImpl(target$jscomp$0,props)}else{var styleQueue=renderState.styles.get(precedence),resourceState=resumableState.styleResources.hasOwnProperty(href)?resumableState.styleResources[href]:void 0;if(resourceState!==EXISTS){resumableState.styleResources[href]=EXISTS,styleQueue||(styleQueue={precedence:escapeTextForBrowser(precedence),rules:[],hrefs:[],sheets:new Map},renderState.styles.set(precedence,styleQueue));var resource={state:PENDING$1,props:assign({},props,{"data-precedence":props.precedence,precedence:null})};if(resourceState){resourceState.length===2&&adoptPreloadCredentials(resource.props,resourceState);var preloadResource=renderState.preloads.stylesheets.get(href);preloadResource&&0<preloadResource.length?preloadResource.length=0:resource.state=PRELOADED}styleQueue.sheets.set(href,resource),hoistableState&&hoistableState.stylesheets.add(resource)}else if(styleQueue){var _resource=styleQueue.sheets.get(href);_resource&&hoistableState&&hoistableState.stylesheets.add(_resource)}textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$5=null}else props.onLoad||props.onError?JSCompiler_inline_result$jscomp$5=pushLinkImpl(target$jscomp$0,props):(textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$5=isFallback$jscomp$0?null:pushLinkImpl(renderState.hoistableChunks,props));return JSCompiler_inline_result$jscomp$5;case"script":var noscriptTagInScope$jscomp$1=formatContext.tagScope&1,asyncProp=props.async;if(typeof props.src!=="string"||!props.src||!asyncProp||typeof asyncProp==="function"||typeof asyncProp==="symbol"||props.onLoad||props.onError||formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$1||props.itemProp!=null)var JSCompiler_inline_result$jscomp$6=pushScriptImpl(target$jscomp$0,props);else{var key=props.src;if(props.type==="module")var resources=resumableState.moduleScriptResources,preloads=renderState.preloads.moduleScripts;else resources=resumableState.scriptResources,preloads=renderState.preloads.scripts;var resourceState$jscomp$0=resources.hasOwnProperty(key)?resources[key]:void 0;if(resourceState$jscomp$0!==EXISTS){resources[key]=EXISTS;var scriptProps=props;if(resourceState$jscomp$0){resourceState$jscomp$0.length===2&&(scriptProps=assign({},props),adoptPreloadCredentials(scriptProps,resourceState$jscomp$0));var preloadResource$jscomp$0=preloads.get(key);preloadResource$jscomp$0&&(preloadResource$jscomp$0.length=0)}var resource$jscomp$0=[];renderState.scripts.add(resource$jscomp$0),pushScriptImpl(resource$jscomp$0,scriptProps)}textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$6=null}return JSCompiler_inline_result$jscomp$6;case"style":var noscriptTagInScope$jscomp$2=formatContext.tagScope&1;if(hasOwnProperty.call(props,"children")){var children$jscomp$7=props.children,child$jscomp$0=Array.isArray(children$jscomp$7)?2>children$jscomp$7.length?children$jscomp$7[0]:null:children$jscomp$7;(typeof child$jscomp$0==="function"||typeof child$jscomp$0==="symbol"||Array.isArray(child$jscomp$0))&&console.error("React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.",typeof child$jscomp$0==="function"?"a Function":typeof child$jscomp$0==="symbol"?"a Sybmol":"an Array")}var{precedence:precedence$jscomp$0,href:href$jscomp$0,nonce}=props;if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$2||props.itemProp!=null||typeof precedence$jscomp$0!=="string"||typeof href$jscomp$0!=="string"||href$jscomp$0===""){target$jscomp$0.push(startChunkForTag("style"));var children$jscomp$8=null,innerHTML$jscomp$5=null,propKey$jscomp$8;for(propKey$jscomp$8 in props)if(hasOwnProperty.call(props,propKey$jscomp$8)){var propValue$jscomp$8=props[propKey$jscomp$8];if(propValue$jscomp$8!=null)switch(propKey$jscomp$8){case"children":children$jscomp$8=propValue$jscomp$8;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$5=propValue$jscomp$8;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$8,propValue$jscomp$8)}}target$jscomp$0.push(endOfStartTag);var child$jscomp$1=Array.isArray(children$jscomp$8)?2>children$jscomp$8.length?children$jscomp$8[0]:null:children$jscomp$8;typeof child$jscomp$1!=="function"&&typeof child$jscomp$1!=="symbol"&&child$jscomp$1!==null&&child$jscomp$1!==void 0&&target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1)),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$5,children$jscomp$8),target$jscomp$0.push(endChunkForTag("style"));var JSCompiler_inline_result$jscomp$7=null}else{href$jscomp$0.includes(" ")&&console.error('React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is "%s".',href$jscomp$0);var styleQueue$jscomp$0=renderState.styles.get(precedence$jscomp$0),resourceState$jscomp$1=resumableState.styleResources.hasOwnProperty(href$jscomp$0)?resumableState.styleResources[href$jscomp$0]:void 0;if(resourceState$jscomp$1!==EXISTS){resumableState.styleResources[href$jscomp$0]=EXISTS,resourceState$jscomp$1&&console.error('React encountered a hoistable style tag for the same href as a preload: "%s". When using a style tag to inline styles you should not also preload it as a stylsheet.',href$jscomp$0),styleQueue$jscomp$0||(styleQueue$jscomp$0={precedence:escapeTextForBrowser(precedence$jscomp$0),rules:[],hrefs:[],sheets:new Map},renderState.styles.set(precedence$jscomp$0,styleQueue$jscomp$0));var nonceStyle=renderState.nonce.style;if(nonceStyle&&nonceStyle!==nonce)console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce "%s" that was included with this render.',precedence$jscomp$0,nonce,nonceStyle);else{!nonceStyle&&nonce&&console.error('React encountered a style tag with `precedence` "%s" and `nonce` "%s". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',precedence$jscomp$0,nonce),styleQueue$jscomp$0.hrefs.push(escapeTextForBrowser(href$jscomp$0));var target=styleQueue$jscomp$0.rules,children$jscomp$9=null,innerHTML$jscomp$6=null,propKey$jscomp$9;for(propKey$jscomp$9 in props)if(hasOwnProperty.call(props,propKey$jscomp$9)){var propValue$jscomp$9=props[propKey$jscomp$9];if(propValue$jscomp$9!=null)switch(propKey$jscomp$9){case"children":children$jscomp$9=propValue$jscomp$9;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$6=propValue$jscomp$9}}var child$jscomp$2=Array.isArray(children$jscomp$9)?2>children$jscomp$9.length?children$jscomp$9[0]:null:children$jscomp$9;typeof child$jscomp$2!=="function"&&typeof child$jscomp$2!=="symbol"&&child$jscomp$2!==null&&child$jscomp$2!==void 0&&target.push(escapeStyleTextContent(child$jscomp$2)),pushInnerHTML(target,innerHTML$jscomp$6,children$jscomp$9)}}styleQueue$jscomp$0&&hoistableState&&hoistableState.styles.add(styleQueue$jscomp$0),textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$7=void 0}return JSCompiler_inline_result$jscomp$7;case"meta":var noscriptTagInScope$jscomp$3=formatContext.tagScope&1,isFallback$jscomp$1=formatContext.tagScope&4;if(formatContext.insertionMode===SVG_MODE||noscriptTagInScope$jscomp$3||props.itemProp!=null)var JSCompiler_inline_result$jscomp$8=pushSelfClosing(target$jscomp$0,props,"meta");else textEmbedded&&target$jscomp$0.push("<!-- -->"),JSCompiler_inline_result$jscomp$8=isFallback$jscomp$1?null:typeof props.charSet==="string"?pushSelfClosing(renderState.charsetChunks,props,"meta"):props.name==="viewport"?pushSelfClosing(renderState.viewportChunks,props,"meta"):pushSelfClosing(renderState.hoistableChunks,props,"meta");return JSCompiler_inline_result$jscomp$8;case"listing":case"pre":target$jscomp$0.push(startChunkForTag(type));var children$jscomp$10=null,innerHTML$jscomp$7=null,propKey$jscomp$10;for(propKey$jscomp$10 in props)if(hasOwnProperty.call(props,propKey$jscomp$10)){var propValue$jscomp$10=props[propKey$jscomp$10];if(propValue$jscomp$10!=null)switch(propKey$jscomp$10){case"children":children$jscomp$10=propValue$jscomp$10;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$7=propValue$jscomp$10;break;default:pushAttribute(target$jscomp$0,propKey$jscomp$10,propValue$jscomp$10)}}if(target$jscomp$0.push(endOfStartTag),innerHTML$jscomp$7!=null){if(children$jscomp$10!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof innerHTML$jscomp$7!=="object"||!("__html"in innerHTML$jscomp$7))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");var html=innerHTML$jscomp$7.__html;html!==null&&html!==void 0&&(typeof html==="string"&&0<html.length&&html[0]===`
|
|
1427
|
+
`?target$jscomp$0.push(`
|
|
1428
|
+
`,html):(checkHtmlStringCoercion(html),target$jscomp$0.push(""+html)))}return typeof children$jscomp$10==="string"&&children$jscomp$10[0]===`
|
|
1429
|
+
`&&target$jscomp$0.push(`
|
|
1430
|
+
`),children$jscomp$10;case"img":var pictureOrNoScriptTagInScope=formatContext.tagScope&3,{src,srcSet}=props;if(!(props.loading==="lazy"||!src&&!srcSet||typeof src!=="string"&&src!=null||typeof srcSet!=="string"&&srcSet!=null||props.fetchPriority==="low"||pictureOrNoScriptTagInScope)&&(typeof src!=="string"||src[4]!==":"||src[0]!=="d"&&src[0]!=="D"||src[1]!=="a"&&src[1]!=="A"||src[2]!=="t"&&src[2]!=="T"||src[3]!=="a"&&src[3]!=="A")&&(typeof srcSet!=="string"||srcSet[4]!==":"||srcSet[0]!=="d"&&srcSet[0]!=="D"||srcSet[1]!=="a"&&srcSet[1]!=="A"||srcSet[2]!=="t"&&srcSet[2]!=="T"||srcSet[3]!=="a"&&srcSet[3]!=="A")){hoistableState!==null&&formatContext.tagScope&64&&(hoistableState.suspenseyImages=!0);var sizes=typeof props.sizes==="string"?props.sizes:void 0,key$jscomp$0=srcSet?srcSet+`
|
|
1431
|
+
`+(sizes||""):src,promotablePreloads=renderState.preloads.images,resource$jscomp$1=promotablePreloads.get(key$jscomp$0);if(resource$jscomp$1){if(props.fetchPriority==="high"||10>renderState.highImagePreloads.size)promotablePreloads.delete(key$jscomp$0),renderState.highImagePreloads.add(resource$jscomp$1)}else if(!resumableState.imageResources.hasOwnProperty(key$jscomp$0)){resumableState.imageResources[key$jscomp$0]=PRELOAD_NO_CREDS;var input=props.crossOrigin,crossOrigin=typeof input==="string"?input==="use-credentials"?input:"":void 0,headers=renderState.headers,header;headers&&0<headers.remainingCapacity&&typeof props.srcSet!=="string"&&(props.fetchPriority==="high"||500>headers.highImagePreloads.length)&&(header=getPreloadAsHeader(src,"image",{imageSrcSet:props.srcSet,imageSizes:props.sizes,crossOrigin,integrity:props.integrity,nonce:props.nonce,type:props.type,fetchPriority:props.fetchPriority,referrerPolicy:props.refererPolicy}),0<=(headers.remainingCapacity-=header.length+2))?(renderState.resets.image[key$jscomp$0]=PRELOAD_NO_CREDS,headers.highImagePreloads&&(headers.highImagePreloads+=", "),headers.highImagePreloads+=header):(resource$jscomp$1=[],pushLinkImpl(resource$jscomp$1,{rel:"preload",as:"image",href:srcSet?void 0:src,imageSrcSet:srcSet,imageSizes:sizes,crossOrigin,integrity:props.integrity,type:props.type,fetchPriority:props.fetchPriority,referrerPolicy:props.referrerPolicy}),props.fetchPriority==="high"||10>renderState.highImagePreloads.size?renderState.highImagePreloads.add(resource$jscomp$1):(renderState.bulkPreloads.add(resource$jscomp$1),promotablePreloads.set(key$jscomp$0,resource$jscomp$1)))}}return pushSelfClosing(target$jscomp$0,props,"img");case"base":case"area":case"br":case"col":case"embed":case"hr":case"keygen":case"param":case"source":case"track":case"wbr":return pushSelfClosing(target$jscomp$0,props,type);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":break;case"head":if(formatContext.insertionMode<HTML_MODE){var preamble=preambleState||renderState.preamble;if(preamble.headChunks)throw Error("The `<head>` tag may only be rendered once.");preambleState!==null&&target$jscomp$0.push("<!--head-->"),preamble.headChunks=[];var JSCompiler_inline_result$jscomp$9=pushStartSingletonElement(preamble.headChunks,props,"head")}else JSCompiler_inline_result$jscomp$9=pushStartGenericElement(target$jscomp$0,props,"head");return JSCompiler_inline_result$jscomp$9;case"body":if(formatContext.insertionMode<HTML_MODE){var preamble$jscomp$0=preambleState||renderState.preamble;if(preamble$jscomp$0.bodyChunks)throw Error("The `<body>` tag may only be rendered once.");preambleState!==null&&target$jscomp$0.push("<!--body-->"),preamble$jscomp$0.bodyChunks=[];var JSCompiler_inline_result$jscomp$10=pushStartSingletonElement(preamble$jscomp$0.bodyChunks,props,"body")}else JSCompiler_inline_result$jscomp$10=pushStartGenericElement(target$jscomp$0,props,"body");return JSCompiler_inline_result$jscomp$10;case"html":if(formatContext.insertionMode===ROOT_HTML_MODE){var preamble$jscomp$1=preambleState||renderState.preamble;if(preamble$jscomp$1.htmlChunks)throw Error("The `<html>` tag may only be rendered once.");preambleState!==null&&target$jscomp$0.push("<!--html-->"),preamble$jscomp$1.htmlChunks=["<!DOCTYPE html>"];var JSCompiler_inline_result$jscomp$11=pushStartSingletonElement(preamble$jscomp$1.htmlChunks,props,"html")}else JSCompiler_inline_result$jscomp$11=pushStartGenericElement(target$jscomp$0,props,"html");return JSCompiler_inline_result$jscomp$11;default:if(type.indexOf("-")!==-1){target$jscomp$0.push(startChunkForTag(type));var children$jscomp$11=null,innerHTML$jscomp$8=null,propKey$jscomp$11;for(propKey$jscomp$11 in props)if(hasOwnProperty.call(props,propKey$jscomp$11)){var propValue$jscomp$11=props[propKey$jscomp$11];if(propValue$jscomp$11!=null){var attributeName=propKey$jscomp$11;switch(propKey$jscomp$11){case"children":children$jscomp$11=propValue$jscomp$11;break;case"dangerouslySetInnerHTML":innerHTML$jscomp$8=propValue$jscomp$11;break;case"style":pushStyleAttribute(target$jscomp$0,propValue$jscomp$11);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"ref":break;case"className":attributeName="class";default:if(isAttributeNameSafe(propKey$jscomp$11)&&typeof propValue$jscomp$11!=="function"&&typeof propValue$jscomp$11!=="symbol"&&propValue$jscomp$11!==!1){if(propValue$jscomp$11===!0)propValue$jscomp$11="";else if(typeof propValue$jscomp$11==="object")continue;target$jscomp$0.push(attributeSeparator,attributeName,attributeAssign,escapeTextForBrowser(propValue$jscomp$11),attributeEnd)}}}}return target$jscomp$0.push(endOfStartTag),pushInnerHTML(target$jscomp$0,innerHTML$jscomp$8,children$jscomp$11),children$jscomp$11}}return pushStartGenericElement(target$jscomp$0,props,type)}var endTagCache=new Map;function endChunkForTag(tag){var chunk=endTagCache.get(tag);return chunk===void 0&&(chunk="</"+tag+">",endTagCache.set(tag,chunk)),chunk}function hoistPreambleState(renderState,preambleState){renderState=renderState.preamble,renderState.htmlChunks===null&&preambleState.htmlChunks&&(renderState.htmlChunks=preambleState.htmlChunks),renderState.headChunks===null&&preambleState.headChunks&&(renderState.headChunks=preambleState.headChunks),renderState.bodyChunks===null&&preambleState.bodyChunks&&(renderState.bodyChunks=preambleState.bodyChunks)}function writeBootstrap(destination,renderState){renderState=renderState.bootstrapChunks;for(var i=0;i<renderState.length-1;i++)writeChunk(destination,renderState[i]);return i<renderState.length?(i=renderState[i],renderState.length=0,!!destination.write(i)):!0}var shellTimeRuntimeScript="requestAnimationFrame(function(){$RT=performance.now()});",placeholder1='<template id="',placeholder2='"></template>',startCompletedSuspenseBoundary="<!--$-->",startPendingSuspenseBoundary1='<!--$?--><template id="',startPendingSuspenseBoundary2='"></template>',startClientRenderedSuspenseBoundary="<!--$!-->",endSuspenseBoundary="<!--/$-->",clientRenderedSuspenseBoundaryError1="<template",clientRenderedSuspenseBoundaryErrorAttrInterstitial='"',clientRenderedSuspenseBoundaryError1A=' data-dgst="',clientRenderedSuspenseBoundaryError1B=' data-msg="',clientRenderedSuspenseBoundaryError1C=' data-stck="',clientRenderedSuspenseBoundaryError1D=' data-cstck="',clientRenderedSuspenseBoundaryError2="></template>";function writeStartPendingSuspenseBoundary(destination,renderState,id){if(writeChunk(destination,startPendingSuspenseBoundary1),id===null)throw Error("An ID must have been assigned before we can complete the boundary.");return writeChunk(destination,renderState.boundaryPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startPendingSuspenseBoundary2)}var startSegmentHTML='<div hidden id="',startSegmentHTML2='">',endSegmentHTML="</div>",startSegmentSVG='<svg aria-hidden="true" style="display:none" id="',startSegmentSVG2='">',endSegmentSVG="</svg>",startSegmentMathML='<math aria-hidden="true" style="display:none" id="',startSegmentMathML2='">',endSegmentMathML="</math>",startSegmentTable='<table hidden id="',startSegmentTable2='">',endSegmentTable="</table>",startSegmentTableBody='<table hidden><tbody id="',startSegmentTableBody2='">',endSegmentTableBody="</tbody></table>",startSegmentTableRow='<table hidden><tr id="',startSegmentTableRow2='">',endSegmentTableRow="</tr></table>",startSegmentColGroup='<table hidden><colgroup id="',startSegmentColGroup2='">',endSegmentColGroup="</colgroup></table>";function writeStartSegment(destination,renderState,formatContext,id){switch(formatContext.insertionMode){case ROOT_HTML_MODE:case HTML_HTML_MODE:case HTML_HEAD_MODE:case HTML_MODE:return writeChunk(destination,startSegmentHTML),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentHTML2);case SVG_MODE:return writeChunk(destination,startSegmentSVG),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentSVG2);case MATHML_MODE:return writeChunk(destination,startSegmentMathML),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentMathML2);case HTML_TABLE_MODE:return writeChunk(destination,startSegmentTable),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentTable2);case HTML_TABLE_BODY_MODE:return writeChunk(destination,startSegmentTableBody),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentTableBody2);case HTML_TABLE_ROW_MODE:return writeChunk(destination,startSegmentTableRow),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentTableRow2);case HTML_COLGROUP_MODE:return writeChunk(destination,startSegmentColGroup),writeChunk(destination,renderState.segmentPrefix),writeChunk(destination,id.toString(16)),!!destination.write(startSegmentColGroup2);default:throw Error("Unknown insertion mode. This is a bug in React.")}}function writeEndSegment(destination,formatContext){switch(formatContext.insertionMode){case ROOT_HTML_MODE:case HTML_HTML_MODE:case HTML_HEAD_MODE:case HTML_MODE:return!!destination.write(endSegmentHTML);case SVG_MODE:return!!destination.write(endSegmentSVG);case MATHML_MODE:return!!destination.write(endSegmentMathML);case HTML_TABLE_MODE:return!!destination.write(endSegmentTable);case HTML_TABLE_BODY_MODE:return!!destination.write(endSegmentTableBody);case HTML_TABLE_ROW_MODE:return!!destination.write(endSegmentTableRow);case HTML_COLGROUP_MODE:return!!destination.write(endSegmentColGroup);default:throw Error("Unknown insertion mode. This is a bug in React.")}}var completeSegmentScript1Full='$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("',completeSegmentScript1Partial='$RS("',completeSegmentScript2='","',completeSegmentScriptEnd='")</script>',completeBoundaryScriptFunctionOnly=`$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
|
|
1432
|
+
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`,completeBoundaryScript1Partial='$RC("',completeBoundaryWithStylesScript1FullPartial=`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
|
|
1433
|
+
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
|
|
1434
|
+
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`,completeBoundaryWithStylesScript1Partial='$RR("',completeBoundaryScript2='","',completeBoundaryScript3a='",',completeBoundaryScript3b='"',completeBoundaryScriptEnd=")</script>",clientRenderScriptFunctionOnly='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};',clientRenderScript1Full='$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("',clientRenderScript1Partial='$RX("',clientRenderScript1A='"',clientRenderErrorScriptArgInterstitial=",",clientRenderScriptEnd=")</script>",regexForJSStringsInInstructionScripts=/[<\u2028\u2029]/g;function escapeJSStringsForInstructionScripts(input){return JSON.stringify(input).replace(regexForJSStringsInInstructionScripts,function(match){switch(match){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var regexForJSStringsInScripts=/[&><\u2028\u2029]/g;function escapeJSObjectForInstructionScripts(input){return JSON.stringify(input).replace(regexForJSStringsInScripts,function(match){switch(match){case"&":return"\\u0026";case">":return"\\u003e";case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var lateStyleTagResourceOpen1=' media="not all" data-precedence="',lateStyleTagResourceOpen2='" data-href="',lateStyleTagResourceOpen3='">',lateStyleTagTemplateClose="</style>",currentlyRenderingBoundaryHasStylesToHoist=!1,destinationHasCapacity=!0;function flushStyleTagsLateForBoundary(styleQueue){var{rules,hrefs}=styleQueue;0<rules.length&&hrefs.length===0&&console.error("React expected to have at least one href for an a hoistable style but found none. This is a bug in React.");var i=0;if(hrefs.length){writeChunk(this,currentlyFlushingRenderState.startInlineStyle),writeChunk(this,lateStyleTagResourceOpen1),writeChunk(this,styleQueue.precedence);for(writeChunk(this,lateStyleTagResourceOpen2);i<hrefs.length-1;i++)writeChunk(this,hrefs[i]),writeChunk(this,spaceSeparator);writeChunk(this,hrefs[i]),writeChunk(this,lateStyleTagResourceOpen3);for(i=0;i<rules.length;i++)writeChunk(this,rules[i]);destinationHasCapacity=!!this.write(lateStyleTagTemplateClose),currentlyRenderingBoundaryHasStylesToHoist=!0,rules.length=0,hrefs.length=0}}function hasStylesToHoist(stylesheet){return stylesheet.state!==PREAMBLE?currentlyRenderingBoundaryHasStylesToHoist=!0:!1}function writeHoistablesForBoundary(destination,hoistableState,renderState){return currentlyRenderingBoundaryHasStylesToHoist=!1,destinationHasCapacity=!0,currentlyFlushingRenderState=renderState,hoistableState.styles.forEach(flushStyleTagsLateForBoundary,destination),currentlyFlushingRenderState=null,hoistableState.stylesheets.forEach(hasStylesToHoist),currentlyRenderingBoundaryHasStylesToHoist&&(renderState.stylesToHoist=!0),destinationHasCapacity}function flushResource(resource){for(var i=0;i<resource.length;i++)writeChunk(this,resource[i]);resource.length=0}var stylesheetFlushingQueue=[];function flushStyleInPreamble(stylesheet){pushLinkImpl(stylesheetFlushingQueue,stylesheet.props);for(var i=0;i<stylesheetFlushingQueue.length;i++)writeChunk(this,stylesheetFlushingQueue[i]);stylesheetFlushingQueue.length=0,stylesheet.state=PREAMBLE}var styleTagResourceOpen1=' data-precedence="',styleTagResourceOpen2='" data-href="',spaceSeparator=" ",styleTagResourceOpen3='">',styleTagResourceClose="</style>";function flushStylesInPreamble(styleQueue){var hasStylesheets=0<styleQueue.sheets.size;styleQueue.sheets.forEach(flushStyleInPreamble,this),styleQueue.sheets.clear();var rules=styleQueue.rules,hrefs=styleQueue.hrefs;if(!hasStylesheets||hrefs.length){if(writeChunk(this,currentlyFlushingRenderState.startInlineStyle),writeChunk(this,styleTagResourceOpen1),writeChunk(this,styleQueue.precedence),styleQueue=0,hrefs.length){for(writeChunk(this,styleTagResourceOpen2);styleQueue<hrefs.length-1;styleQueue++)writeChunk(this,hrefs[styleQueue]),writeChunk(this,spaceSeparator);writeChunk(this,hrefs[styleQueue])}writeChunk(this,styleTagResourceOpen3);for(styleQueue=0;styleQueue<rules.length;styleQueue++)writeChunk(this,rules[styleQueue]);writeChunk(this,styleTagResourceClose),rules.length=0,hrefs.length=0}}function preloadLateStyle(stylesheet){if(stylesheet.state===PENDING$1){stylesheet.state=PRELOADED;var props=stylesheet.props;pushLinkImpl(stylesheetFlushingQueue,{rel:"preload",as:"style",href:stylesheet.props.href,crossOrigin:props.crossOrigin,fetchPriority:props.fetchPriority,integrity:props.integrity,media:props.media,hrefLang:props.hrefLang,referrerPolicy:props.referrerPolicy});for(stylesheet=0;stylesheet<stylesheetFlushingQueue.length;stylesheet++)writeChunk(this,stylesheetFlushingQueue[stylesheet]);stylesheetFlushingQueue.length=0}}function preloadLateStyles(styleQueue){styleQueue.sheets.forEach(preloadLateStyle,this),styleQueue.sheets.clear()}var completedShellIdAttributeStart=' id="';function pushCompletedShellIdAttribute(target,resumableState){(resumableState.instructions&SentCompletedShellId)===NothingSent&&(resumableState.instructions|=SentCompletedShellId,target.push(completedShellIdAttributeStart,escapeTextForBrowser("_"+resumableState.idPrefix+"R_"),attributeEnd))}var arrayFirstOpenBracket="[",arraySubsequentOpenBracket=",[",arrayInterstitial=",",arrayCloseBracket="]";function writeStyleResourceDependenciesInJS(destination,hoistableState){writeChunk(destination,arrayFirstOpenBracket);var nextArrayOpenBrackChunk=arrayFirstOpenBracket;hoistableState.stylesheets.forEach(function(resource){if(resource.state!==PREAMBLE)if(resource.state===LATE)writeChunk(destination,nextArrayOpenBrackChunk),resource=resource.props.href,checkAttributeStringCoercion(resource,"href"),writeChunk(destination,escapeJSObjectForInstructionScripts(""+resource)),writeChunk(destination,arrayCloseBracket),nextArrayOpenBrackChunk=arraySubsequentOpenBracket;else{writeChunk(destination,nextArrayOpenBrackChunk);var precedence=resource.props["data-precedence"],props=resource.props,coercedHref=sanitizeURL(""+resource.props.href);writeChunk(destination,escapeJSObjectForInstructionScripts(coercedHref)),checkAttributeStringCoercion(precedence,"precedence"),precedence=""+precedence,writeChunk(destination,arrayInterstitial),writeChunk(destination,escapeJSObjectForInstructionScripts(precedence));for(var propKey in props)if(hasOwnProperty.call(props,propKey)&&(precedence=props[propKey],precedence!=null))switch(propKey){case"href":case"rel":case"precedence":case"data-precedence":break;case"children":case"dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:writeStyleResourceAttributeInJS(destination,propKey,precedence)}writeChunk(destination,arrayCloseBracket),nextArrayOpenBrackChunk=arraySubsequentOpenBracket,resource.state=LATE}}),writeChunk(destination,arrayCloseBracket)}function writeStyleResourceAttributeInJS(destination,name,value){var attributeName=name.toLowerCase();switch(typeof value){case"function":case"symbol":return}switch(name){case"innerHTML":case"dangerouslySetInnerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"style":case"ref":return;case"className":attributeName="class",checkAttributeStringCoercion(value,attributeName),name=""+value;break;case"hidden":if(value===!1)return;name="";break;case"src":case"href":value=sanitizeURL(value),checkAttributeStringCoercion(value,attributeName),name=""+value;break;default:if(2<name.length&&(name[0]==="o"||name[0]==="O")&&(name[1]==="n"||name[1]==="N")||!isAttributeNameSafe(name))return;checkAttributeStringCoercion(value,attributeName),name=""+value}writeChunk(destination,arrayInterstitial),writeChunk(destination,escapeJSObjectForInstructionScripts(attributeName)),writeChunk(destination,arrayInterstitial),writeChunk(destination,escapeJSObjectForInstructionScripts(name))}var PENDING$1=0,PRELOADED=1,PREAMBLE=2,LATE=3;function createHoistableState(){return{styles:new Set,stylesheets:new Set,suspenseyImages:!1}}function prefetchDNS(href){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(typeof href==="string"&&href){if(!resumableState.dnsResources.hasOwnProperty(href)){resumableState.dnsResources[href]=EXISTS,resumableState=renderState.headers;var header,JSCompiler_temp;if(JSCompiler_temp=resumableState&&0<resumableState.remainingCapacity)JSCompiler_temp=(header="<"+escapeHrefForLinkHeaderURLContext(href)+">; rel=dns-prefetch",0<=(resumableState.remainingCapacity-=header.length+2));JSCompiler_temp?(renderState.resets.dns[href]=EXISTS,resumableState.preconnects&&(resumableState.preconnects+=", "),resumableState.preconnects+=header):(header=[],pushLinkImpl(header,{href,rel:"dns-prefetch"}),renderState.preconnects.add(header))}enqueueFlush(request)}}else previousDispatcher.D(href)}function preconnect(href,crossOrigin){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(typeof href==="string"&&href){var bucket=crossOrigin==="use-credentials"?"credentials":typeof crossOrigin==="string"?"anonymous":"default";if(!resumableState.connectResources[bucket].hasOwnProperty(href)){resumableState.connectResources[bucket][href]=EXISTS,resumableState=renderState.headers;var header,JSCompiler_temp;if(JSCompiler_temp=resumableState&&0<resumableState.remainingCapacity){if(JSCompiler_temp="<"+escapeHrefForLinkHeaderURLContext(href)+">; rel=preconnect",typeof crossOrigin==="string"){var escapedCrossOrigin=escapeStringForLinkHeaderQuotedParamValueContext(crossOrigin,"crossOrigin");JSCompiler_temp+='; crossorigin="'+escapedCrossOrigin+'"'}JSCompiler_temp=(header=JSCompiler_temp,0<=(resumableState.remainingCapacity-=header.length+2))}JSCompiler_temp?(renderState.resets.connect[bucket][href]=EXISTS,resumableState.preconnects&&(resumableState.preconnects+=", "),resumableState.preconnects+=header):(bucket=[],pushLinkImpl(bucket,{rel:"preconnect",href,crossOrigin}),renderState.preconnects.add(bucket))}enqueueFlush(request)}}else previousDispatcher.C(href,crossOrigin)}function preload(href,as,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(as&&href){switch(as){case"image":if(options)var{imageSrcSet,imageSizes,fetchPriority}=options;var key=imageSrcSet?imageSrcSet+`
|
|
1435
|
+
`+(imageSizes||""):href;if(resumableState.imageResources.hasOwnProperty(key))return;resumableState.imageResources[key]=PRELOAD_NO_CREDS,resumableState=renderState.headers;var header;resumableState&&0<resumableState.remainingCapacity&&typeof imageSrcSet!=="string"&&fetchPriority==="high"&&(header=getPreloadAsHeader(href,as,options),0<=(resumableState.remainingCapacity-=header.length+2))?(renderState.resets.image[key]=PRELOAD_NO_CREDS,resumableState.highImagePreloads&&(resumableState.highImagePreloads+=", "),resumableState.highImagePreloads+=header):(resumableState=[],pushLinkImpl(resumableState,assign({rel:"preload",href:imageSrcSet?void 0:href,as},options)),fetchPriority==="high"?renderState.highImagePreloads.add(resumableState):(renderState.bulkPreloads.add(resumableState),renderState.preloads.images.set(key,resumableState)));break;case"style":if(resumableState.styleResources.hasOwnProperty(href))return;imageSrcSet=[],pushLinkImpl(imageSrcSet,assign({rel:"preload",href,as},options)),resumableState.styleResources[href]=!options||typeof options.crossOrigin!=="string"&&typeof options.integrity!=="string"?PRELOAD_NO_CREDS:[options.crossOrigin,options.integrity],renderState.preloads.stylesheets.set(href,imageSrcSet),renderState.bulkPreloads.add(imageSrcSet);break;case"script":if(resumableState.scriptResources.hasOwnProperty(href))return;imageSrcSet=[],renderState.preloads.scripts.set(href,imageSrcSet),renderState.bulkPreloads.add(imageSrcSet),pushLinkImpl(imageSrcSet,assign({rel:"preload",href,as},options)),resumableState.scriptResources[href]=!options||typeof options.crossOrigin!=="string"&&typeof options.integrity!=="string"?PRELOAD_NO_CREDS:[options.crossOrigin,options.integrity];break;default:if(resumableState.unknownResources.hasOwnProperty(as)){if(imageSrcSet=resumableState.unknownResources[as],imageSrcSet.hasOwnProperty(href))return}else imageSrcSet={},resumableState.unknownResources[as]=imageSrcSet;if(imageSrcSet[href]=PRELOAD_NO_CREDS,(resumableState=renderState.headers)&&0<resumableState.remainingCapacity&&as==="font"&&(key=getPreloadAsHeader(href,as,options),0<=(resumableState.remainingCapacity-=key.length+2)))renderState.resets.font[href]=PRELOAD_NO_CREDS,resumableState.fontPreloads&&(resumableState.fontPreloads+=", "),resumableState.fontPreloads+=key;else switch(resumableState=[],href=assign({rel:"preload",href,as},options),pushLinkImpl(resumableState,href),as){case"font":renderState.fontPreloads.add(resumableState);break;default:renderState.bulkPreloads.add(resumableState)}}enqueueFlush(request)}}else previousDispatcher.L(href,as,options)}function preloadModule(href,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(href){var as=options&&typeof options.as==="string"?options.as:"script";switch(as){case"script":if(resumableState.moduleScriptResources.hasOwnProperty(href))return;as=[],resumableState.moduleScriptResources[href]=!options||typeof options.crossOrigin!=="string"&&typeof options.integrity!=="string"?PRELOAD_NO_CREDS:[options.crossOrigin,options.integrity],renderState.preloads.moduleScripts.set(href,as);break;default:if(resumableState.moduleUnknownResources.hasOwnProperty(as)){var resources=resumableState.unknownResources[as];if(resources.hasOwnProperty(href))return}else resources={},resumableState.moduleUnknownResources[as]=resources;as=[],resources[href]=PRELOAD_NO_CREDS}pushLinkImpl(as,assign({rel:"modulepreload",href},options)),renderState.bulkPreloads.add(as),enqueueFlush(request)}}else previousDispatcher.m(href,options)}function preinitStyle(href,precedence,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(href){precedence=precedence||"default";var styleQueue=renderState.styles.get(precedence),resourceState=resumableState.styleResources.hasOwnProperty(href)?resumableState.styleResources[href]:void 0;resourceState!==EXISTS&&(resumableState.styleResources[href]=EXISTS,styleQueue||(styleQueue={precedence:escapeTextForBrowser(precedence),rules:[],hrefs:[],sheets:new Map},renderState.styles.set(precedence,styleQueue)),precedence={state:PENDING$1,props:assign({rel:"stylesheet",href,"data-precedence":precedence},options)},resourceState&&(resourceState.length===2&&adoptPreloadCredentials(precedence.props,resourceState),(renderState=renderState.preloads.stylesheets.get(href))&&0<renderState.length?renderState.length=0:precedence.state=PRELOADED),styleQueue.sheets.set(href,precedence),enqueueFlush(request))}}else previousDispatcher.S(href,precedence,options)}function preinitScript(src,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(src){var resourceState=resumableState.scriptResources.hasOwnProperty(src)?resumableState.scriptResources[src]:void 0;resourceState!==EXISTS&&(resumableState.scriptResources[src]=EXISTS,options=assign({src,async:!0},options),resourceState&&(resourceState.length===2&&adoptPreloadCredentials(options,resourceState),src=renderState.preloads.scripts.get(src))&&(src.length=0),src=[],renderState.scripts.add(src),pushScriptImpl(src,options),enqueueFlush(request))}}else previousDispatcher.X(src,options)}function preinitModuleScript(src,options){var request=currentRequest?currentRequest:null;if(request){var{resumableState,renderState}=request;if(src){var resourceState=resumableState.moduleScriptResources.hasOwnProperty(src)?resumableState.moduleScriptResources[src]:void 0;resourceState!==EXISTS&&(resumableState.moduleScriptResources[src]=EXISTS,options=assign({src,type:"module",async:!0},options),resourceState&&(resourceState.length===2&&adoptPreloadCredentials(options,resourceState),src=renderState.preloads.moduleScripts.get(src))&&(src.length=0),src=[],renderState.scripts.add(src),pushScriptImpl(src,options),enqueueFlush(request))}}else previousDispatcher.M(src,options)}function preloadBootstrapScriptOrModule(resumableState,renderState,href,props){(resumableState.scriptResources.hasOwnProperty(href)||resumableState.moduleScriptResources.hasOwnProperty(href))&&console.error('Internal React Error: React expected bootstrap script or module with src "%s" to not have been preloaded already. please file an issue',href),resumableState.scriptResources[href]=EXISTS,resumableState.moduleScriptResources[href]=EXISTS,resumableState=[],pushLinkImpl(resumableState,props),renderState.bootstrapScripts.add(resumableState)}function adoptPreloadCredentials(target,preloadState){target.crossOrigin==null&&(target.crossOrigin=preloadState[0]),target.integrity==null&&(target.integrity=preloadState[1])}function getPreloadAsHeader(href,as,params){href=escapeHrefForLinkHeaderURLContext(href),as=escapeStringForLinkHeaderQuotedParamValueContext(as,"as"),as="<"+href+'>; rel=preload; as="'+as+'"';for(var paramName in params)hasOwnProperty.call(params,paramName)&&(href=params[paramName],typeof href==="string"&&(as+="; "+paramName.toLowerCase()+'="'+escapeStringForLinkHeaderQuotedParamValueContext(href,paramName)+'"'));return as}var regexForHrefInLinkHeaderURLContext=/[<>\r\n]/g;function escapeHrefForLinkHeaderURLContext(hrefInput){return checkAttributeStringCoercion(hrefInput,"href"),(""+hrefInput).replace(regexForHrefInLinkHeaderURLContext,escapeHrefForLinkHeaderURLContextReplacer)}function escapeHrefForLinkHeaderURLContextReplacer(match){switch(match){case"<":return"%3C";case">":return"%3E";case`
|
|
1436
|
+
`:return"%0A";case"\r":return"%0D";default:throw Error("escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}var regexForLinkHeaderQuotedParamValueContext=/["';,\r\n]/g;function escapeStringForLinkHeaderQuotedParamValueContext(value,name){return willCoercionThrow(value)&&(console.error("The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.",name,typeName(value)),testStringCoercion(value)),(""+value).replace(regexForLinkHeaderQuotedParamValueContext,escapeStringForLinkHeaderQuotedParamValueContextReplacer)}function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match){switch(match){case'"':return"%22";case"'":return"%27";case";":return"%3B";case",":return"%2C";case`
|
|
1437
|
+
`:return"%0A";case"\r":return"%0D";default:throw Error("escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}}function hoistStyleQueueDependency(styleQueue){this.styles.add(styleQueue)}function hoistStylesheetDependency(stylesheet){this.stylesheets.add(stylesheet)}function hoistHoistables(parentState,childState){childState.styles.forEach(hoistStyleQueueDependency,parentState),childState.stylesheets.forEach(hoistStylesheetDependency,parentState),childState.suspenseyImages&&(parentState.suspenseyImages=!0)}function hasSuspenseyContent(hoistableState){return 0<hoistableState.stylesheets.size||hoistableState.suspenseyImages}var bind=Function.prototype.bind,REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference");function getComponentNameFromType(type){if(type==null)return null;if(typeof type==="function")return type.$$typeof===REACT_CLIENT_REFERENCE?null:type.displayName||type.name||null;if(typeof type==="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList";case REACT_ACTIVITY_TYPE:return"Activity"}if(typeof type==="object")switch(typeof type.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),type.$$typeof){case REACT_PORTAL_TYPE:return"Portal";case REACT_CONTEXT_TYPE:return type.displayName||"Context";case REACT_CONSUMER_TYPE:return(type._context.displayName||"Context")+".Consumer";case REACT_FORWARD_REF_TYPE:var innerType=type.render;return type=type.displayName,type||(type=innerType.displayName||innerType.name||"",type=type!==""?"ForwardRef("+type+")":"ForwardRef"),type;case REACT_MEMO_TYPE:return innerType=type.displayName||null,innerType!==null?innerType:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:innerType=type._payload,type=type._init;try{return getComponentNameFromType(type(innerType))}catch(x){}}return null}var emptyContextObject={};Object.freeze(emptyContextObject);var rendererSigil;rendererSigil={};var currentActiveSnapshot=null;function popToNearestCommonAncestor(prev,next){if(prev!==next){prev.context._currentValue=prev.parentValue,prev=prev.parent;var parentNext=next.parent;if(prev===null){if(parentNext!==null)throw Error("The stacks must reach the root at the same time. This is a bug in React.")}else{if(parentNext===null)throw Error("The stacks must reach the root at the same time. This is a bug in React.");popToNearestCommonAncestor(prev,parentNext)}next.context._currentValue=next.value}}function popAllPrevious(prev){prev.context._currentValue=prev.parentValue,prev=prev.parent,prev!==null&&popAllPrevious(prev)}function pushAllNext(next){var parentNext=next.parent;parentNext!==null&&pushAllNext(parentNext),next.context._currentValue=next.value}function popPreviousToCommonLevel(prev,next){if(prev.context._currentValue=prev.parentValue,prev=prev.parent,prev===null)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");prev.depth===next.depth?popToNearestCommonAncestor(prev,next):popPreviousToCommonLevel(prev,next)}function popNextToCommonLevel(prev,next){var parentNext=next.parent;if(parentNext===null)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");prev.depth===parentNext.depth?popToNearestCommonAncestor(prev,parentNext):popNextToCommonLevel(prev,parentNext),next.context._currentValue=next.value}function switchContext(newSnapshot){var prev=currentActiveSnapshot;prev!==newSnapshot&&(prev===null?pushAllNext(newSnapshot):newSnapshot===null?popAllPrevious(prev):prev.depth===newSnapshot.depth?popToNearestCommonAncestor(prev,newSnapshot):prev.depth>newSnapshot.depth?popPreviousToCommonLevel(prev,newSnapshot):popNextToCommonLevel(prev,newSnapshot),currentActiveSnapshot=newSnapshot)}var didWarnAboutNoopUpdateForComponent={},didWarnAboutDeprecatedWillMount={},didWarnAboutUninitializedState,didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate,didWarnAboutLegacyLifecyclesAndDerivedState,didWarnAboutUndefinedDerivedState,didWarnAboutDirectlyAssigningPropsToState,didWarnAboutContextTypes$1,didWarnAboutChildContextTypes,didWarnAboutInvalidateContextType,didWarnOnInvalidCallback;didWarnAboutUninitializedState=new Set;didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate=new Set;didWarnAboutLegacyLifecyclesAndDerivedState=new Set;didWarnAboutDirectlyAssigningPropsToState=new Set;didWarnAboutUndefinedDerivedState=new Set;didWarnAboutContextTypes$1=new Set;didWarnAboutChildContextTypes=new Set;didWarnAboutInvalidateContextType=new Set;didWarnOnInvalidCallback=new Set;function warnOnInvalidCallback(callback){if(callback!==null&&typeof callback!=="function"){var key=String(callback);didWarnOnInvalidCallback.has(key)||(didWarnOnInvalidCallback.add(key),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",callback))}}function warnNoop(publicInstance,callerName){publicInstance=(publicInstance=publicInstance.constructor)&&getComponentNameFromType(publicInstance)||"ReactClass";var warningKey=publicInstance+"."+callerName;didWarnAboutNoopUpdateForComponent[warningKey]||(console.error(`Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.
|
|
1438
|
+
|
|
1439
|
+
Please check the code for the %s component.`,callerName,publicInstance),didWarnAboutNoopUpdateForComponent[warningKey]=!0)}var classComponentUpdater={enqueueSetState:function(inst,payload,callback){var internals=inst._reactInternals;internals.queue===null?warnNoop(inst,"setState"):(internals.queue.push(payload),callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback))},enqueueReplaceState:function(inst,payload,callback){inst=inst._reactInternals,inst.replace=!0,inst.queue=[payload],callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)},enqueueForceUpdate:function(inst,callback){inst._reactInternals.queue===null?warnNoop(inst,"forceUpdate"):callback!==void 0&&callback!==null&&warnOnInvalidCallback(callback)}},emptyTreeContext={id:1,overflow:""};function pushTreeContext(baseContext,totalChildren,index){var baseIdWithLeadingBit=baseContext.id;baseContext=baseContext.overflow;var baseLength=32-clz32(baseIdWithLeadingBit)-1;baseIdWithLeadingBit&=~(1<<baseLength),index+=1;var length=32-clz32(totalChildren)+baseLength;if(30<length){var numberOfOverflowBits=baseLength-baseLength%5;return length=(baseIdWithLeadingBit&(1<<numberOfOverflowBits)-1).toString(32),baseIdWithLeadingBit>>=numberOfOverflowBits,baseLength-=numberOfOverflowBits,{id:1<<32-clz32(totalChildren)+baseLength|index<<baseLength|baseIdWithLeadingBit,overflow:length+baseContext}}return{id:1<<length|index<<baseLength|baseIdWithLeadingBit,overflow:baseContext}}var clz32=Math.clz32?Math.clz32:clz32Fallback,{log,LN2}=Math;function clz32Fallback(x){return x>>>=0,x===0?32:31-(log(x)/LN2|0)|0}function noop(){}var SuspenseException=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.");function trackUsedThenable(thenableState,thenable,index){switch(index=thenableState[index],index===void 0?thenableState.push(thenable):index!==thenable&&(thenable.then(noop,noop),thenable=index),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason;default:switch(typeof thenable.status==="string"?thenable.then(noop,noop):(thenableState=thenable,thenableState.status="pending",thenableState.then(function(fulfilledValue){if(thenable.status==="pending"){var fulfilledThenable=thenable;fulfilledThenable.status="fulfilled",fulfilledThenable.value=fulfilledValue}},function(error){if(thenable.status==="pending"){var rejectedThenable=thenable;rejectedThenable.status="rejected",rejectedThenable.reason=error}})),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason}throw suspendedThenable=thenable,SuspenseException}}var suspendedThenable=null;function getSuspendedThenable(){if(suspendedThenable===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var thenable=suspendedThenable;return suspendedThenable=null,thenable}function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y}var objectIs=typeof Object.is==="function"?Object.is:is,currentlyRenderingComponent=null,currentlyRenderingTask=null,currentlyRenderingRequest=null,currentlyRenderingKeyPath=null,firstWorkInProgressHook=null,workInProgressHook=null,isReRender=!1,didScheduleRenderPhaseUpdate=!1,localIdCounter=0,actionStateCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,thenableState=null,renderPhaseUpdates=null,numberOfReRenders=0,isInHookUserCodeInDev=!1,currentHookNameInDev;function resolveCurrentlyRenderingComponent(){if(currentlyRenderingComponent===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
1440
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
1441
|
+
2. You might be breaking the Rules of Hooks
|
|
1442
|
+
3. You might have more than one copy of React in the same app
|
|
1443
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);return isInHookUserCodeInDev&&console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"),currentlyRenderingComponent}function createHook(){if(0<numberOfReRenders)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function createWorkInProgressHook(){return workInProgressHook===null?firstWorkInProgressHook===null?(isReRender=!1,firstWorkInProgressHook=workInProgressHook=createHook()):(isReRender=!0,workInProgressHook=firstWorkInProgressHook):workInProgressHook.next===null?(isReRender=!1,workInProgressHook=workInProgressHook.next=createHook()):(isReRender=!0,workInProgressHook=workInProgressHook.next),workInProgressHook}function getThenableStateAfterSuspending(){var state=thenableState;return thenableState=null,state}function resetHooksState(){isInHookUserCodeInDev=!1,currentlyRenderingKeyPath=currentlyRenderingRequest=currentlyRenderingTask=currentlyRenderingComponent=null,didScheduleRenderPhaseUpdate=!1,firstWorkInProgressHook=null,numberOfReRenders=0,workInProgressHook=renderPhaseUpdates=null}function readContext(context){return isInHookUserCodeInDev&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),context._currentValue}function basicStateReducer(state,action){return typeof action==="function"?action(state):action}function useReducer(reducer,initialArg,init){if(reducer!==basicStateReducer&&(currentHookNameInDev="useReducer"),currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook(),isReRender){if(init=workInProgressHook.queue,initialArg=init.dispatch,renderPhaseUpdates!==null){var firstRenderPhaseUpdate=renderPhaseUpdates.get(init);if(firstRenderPhaseUpdate!==void 0){renderPhaseUpdates.delete(init),init=workInProgressHook.memoizedState;do{var action=firstRenderPhaseUpdate.action;isInHookUserCodeInDev=!0,init=reducer(init,action),isInHookUserCodeInDev=!1,firstRenderPhaseUpdate=firstRenderPhaseUpdate.next}while(firstRenderPhaseUpdate!==null);return workInProgressHook.memoizedState=init,[init,initialArg]}}return[workInProgressHook.memoizedState,initialArg]}return isInHookUserCodeInDev=!0,reducer=reducer===basicStateReducer?typeof initialArg==="function"?initialArg():initialArg:init!==void 0?init(initialArg):initialArg,isInHookUserCodeInDev=!1,workInProgressHook.memoizedState=reducer,reducer=workInProgressHook.queue={last:null,dispatch:null},reducer=reducer.dispatch=dispatchAction.bind(null,currentlyRenderingComponent,reducer),[workInProgressHook.memoizedState,reducer]}function useMemo(nextCreate,deps){if(currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook(),deps=deps===void 0?null:deps,workInProgressHook!==null){var prevState=workInProgressHook.memoizedState;if(prevState!==null&&deps!==null){a:{var JSCompiler_inline_result=prevState[1];if(JSCompiler_inline_result===null)console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",currentHookNameInDev),JSCompiler_inline_result=!1;else{deps.length!==JSCompiler_inline_result.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
1444
|
+
|
|
1445
|
+
Previous: %s
|
|
1446
|
+
Incoming: %s`,currentHookNameInDev,"["+deps.join(", ")+"]","["+JSCompiler_inline_result.join(", ")+"]");for(var i=0;i<JSCompiler_inline_result.length&&i<deps.length;i++)if(!objectIs(deps[i],JSCompiler_inline_result[i])){JSCompiler_inline_result=!1;break a}JSCompiler_inline_result=!0}}if(JSCompiler_inline_result)return prevState[0]}}return isInHookUserCodeInDev=!0,nextCreate=nextCreate(),isInHookUserCodeInDev=!1,workInProgressHook.memoizedState=[nextCreate,deps],nextCreate}function dispatchAction(componentIdentity,queue,action){if(25<=numberOfReRenders)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(componentIdentity===currentlyRenderingComponent)if(didScheduleRenderPhaseUpdate=!0,componentIdentity={action,next:null},renderPhaseUpdates===null&&(renderPhaseUpdates=new Map),action=renderPhaseUpdates.get(queue),action===void 0)renderPhaseUpdates.set(queue,componentIdentity);else{for(queue=action;queue.next!==null;)queue=queue.next;queue.next=componentIdentity}}function throwOnUseEffectEventCall(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}function unsupportedStartTransition(){throw Error("startTransition cannot be called during server rendering.")}function unsupportedSetOptimisticState(){throw Error("Cannot update optimistic state while rendering.")}function useActionState(action,initialState,permalink){resolveCurrentlyRenderingComponent();var actionStateHookIndex=actionStateCounter++,request=currentlyRenderingRequest;if(typeof action.$$FORM_ACTION==="function"){var nextPostbackStateKey=null,componentKeyPath=currentlyRenderingKeyPath;request=request.formState;var isSignatureEqual=action.$$IS_SIGNATURE_EQUAL;if(request!==null&&typeof isSignatureEqual==="function"){var postbackKey=request[1];isSignatureEqual.call(action,request[2],request[3])&&(nextPostbackStateKey=permalink!==void 0?"p"+permalink:"k"+Bun.hash(JSON.stringify([componentKeyPath,null,actionStateHookIndex])),postbackKey===nextPostbackStateKey&&(actionStateMatchingIndex=actionStateHookIndex,initialState=request[0]))}var boundAction=action.bind(null,initialState);return action=function(payload){boundAction(payload)},typeof boundAction.$$FORM_ACTION==="function"&&(action.$$FORM_ACTION=function(prefix){prefix=boundAction.$$FORM_ACTION(prefix),permalink!==void 0&&(checkAttributeStringCoercion(permalink,"target"),permalink+="",prefix.action=permalink);var formData=prefix.data;return formData&&(nextPostbackStateKey===null&&(nextPostbackStateKey=permalink!==void 0?"p"+permalink:"k"+Bun.hash(JSON.stringify([componentKeyPath,null,actionStateHookIndex]))),formData.append("$ACTION_KEY",nextPostbackStateKey)),prefix}),[initialState,action,!1]}var _boundAction=action.bind(null,initialState);return[initialState,function(payload){_boundAction(payload)},!1]}function unwrapThenable(thenable){var index=thenableIndexCounter;return thenableIndexCounter+=1,thenableState===null&&(thenableState=[]),trackUsedThenable(thenableState,thenable,index)}function unsupportedRefresh(){throw Error("Cache cannot be refreshed during server rendering.")}var HooksDispatcher={readContext,use:function(usable){if(usable!==null&&typeof usable==="object"){if(typeof usable.then==="function")return unwrapThenable(usable);if(usable.$$typeof===REACT_CONTEXT_TYPE)return readContext(usable)}throw Error("An unsupported type was passed to use(): "+String(usable))},useContext:function(context){return currentHookNameInDev="useContext",resolveCurrentlyRenderingComponent(),context._currentValue},useMemo,useReducer,useRef:function(initialValue){currentlyRenderingComponent=resolveCurrentlyRenderingComponent(),workInProgressHook=createWorkInProgressHook();var previousRef=workInProgressHook.memoizedState;return previousRef===null?(initialValue={current:initialValue},Object.seal(initialValue),workInProgressHook.memoizedState=initialValue):previousRef},useState:function(initialState){return currentHookNameInDev="useState",useReducer(basicStateReducer,initialState)},useInsertionEffect:noop,useLayoutEffect:noop,useCallback:function(callback,deps){return useMemo(function(){return callback},deps)},useImperativeHandle:noop,useEffect:noop,useDebugValue:noop,useDeferredValue:function(value,initialValue){return resolveCurrentlyRenderingComponent(),initialValue!==void 0?initialValue:value},useTransition:function(){return resolveCurrentlyRenderingComponent(),[!1,unsupportedStartTransition]},useId:function(){var treeId=currentlyRenderingTask.treeContext,overflow=treeId.overflow;treeId=treeId.id,treeId=(treeId&~(1<<32-clz32(treeId)-1)).toString(32)+overflow;var resumableState=currentResumableState;if(resumableState===null)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");return overflow=localIdCounter++,treeId="_"+resumableState.idPrefix+"R_"+treeId,0<overflow&&(treeId+="H"+overflow.toString(32)),treeId+"_"},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){if(getServerSnapshot===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return getServerSnapshot()},useOptimistic:function(passthrough){return resolveCurrentlyRenderingComponent(),[passthrough,unsupportedSetOptimisticState]},useActionState,useFormState:useActionState,useHostTransitionStatus:function(){return resolveCurrentlyRenderingComponent(),NotPending},useMemoCache:function(size){for(var data=Array(size),i=0;i<size;i++)data[i]=REACT_MEMO_CACHE_SENTINEL;return data},useCacheRefresh:function(){return unsupportedRefresh},useEffectEvent:function(){return throwOnUseEffectEventCall}},currentResumableState=null,currentTaskInDEV=null,DefaultAsyncDispatcher={getCacheForType:function(){throw Error("Not implemented.")},cacheSignal:function(){throw Error("Not implemented.")},getOwner:function(){return currentTaskInDEV===null?null:currentTaskInDEV.componentStack}},disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;function disabledLog(){}disabledLog.__reactDisabledLog=!0;function disableLogs(){if(disabledDepth===0){prevLog=console.log,prevInfo=console.info,prevWarn=console.warn,prevError=console.error,prevGroup=console.group,prevGroupCollapsed=console.groupCollapsed,prevGroupEnd=console.groupEnd;var props={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:props,log:props,warn:props,error:props,group:props,groupCollapsed:props,groupEnd:props})}disabledDepth++}function reenableLogs(){if(disabledDepth--,disabledDepth===0){var props={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:assign({},props,{value:prevLog}),info:assign({},props,{value:prevInfo}),warn:assign({},props,{value:prevWarn}),error:assign({},props,{value:prevError}),group:assign({},props,{value:prevGroup}),groupCollapsed:assign({},props,{value:prevGroupCollapsed}),groupEnd:assign({},props,{value:prevGroupEnd})})}0>disabledDepth&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function formatOwnerStack(error){var prevPrepareStackTrace=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,error=error.stack,Error.prepareStackTrace=prevPrepareStackTrace,error.startsWith(`Error: react-stack-top-frame
|
|
1447
|
+
`)&&(error=error.slice(29)),prevPrepareStackTrace=error.indexOf(`
|
|
1448
|
+
`),prevPrepareStackTrace!==-1&&(error=error.slice(prevPrepareStackTrace+1)),prevPrepareStackTrace=error.indexOf("react_stack_bottom_frame"),prevPrepareStackTrace!==-1&&(prevPrepareStackTrace=error.lastIndexOf(`
|
|
1449
|
+
`,prevPrepareStackTrace)),prevPrepareStackTrace!==-1)error=error.slice(0,prevPrepareStackTrace);else return"";return error}var prefix,suffix;function describeBuiltInComponentFrame(name){if(prefix===void 0)try{throw Error()}catch(x){var match=x.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||"",suffix=-1<x.stack.indexOf(`
|
|
1450
|
+
at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
1451
|
+
`+prefix+name+suffix}var reentry=!1,componentFrameCache;componentFrameCache=new(typeof WeakMap==="function"?WeakMap:Map);function describeNativeComponentFrame(fn,construct){if(!fn||reentry)return"";var frame=componentFrameCache.get(fn);if(frame!==void 0)return frame;reentry=!0,frame=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var previousDispatcher=null;previousDispatcher=ReactSharedInternals.H,ReactSharedInternals.H=null,disableLogs();try{var RunInRootFrame={DetermineComponentFrameRoot:function(){try{if(construct){var Fake=function(){throw Error()};if(Object.defineProperty(Fake.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(Fake,[])}catch(x){var control=x}Reflect.construct(fn,[],Fake)}else{try{Fake.call()}catch(x$0){control=x$0}fn.call(Fake.prototype)}}else{try{throw Error()}catch(x$1){control=x$1}(Fake=fn())&&typeof Fake.catch==="function"&&Fake.catch(function(){})}}catch(sample){if(sample&&control&&typeof sample.stack==="string")return[sample.stack,control.stack]}return[null,null]}};RunInRootFrame.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var namePropDescriptor=Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot,"name");namePropDescriptor&&namePropDescriptor.configurable&&Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _RunInRootFrame$Deter=RunInRootFrame.DetermineComponentFrameRoot(),sampleStack=_RunInRootFrame$Deter[0],controlStack=_RunInRootFrame$Deter[1];if(sampleStack&&controlStack){var sampleLines=sampleStack.split(`
|
|
1452
|
+
`),controlLines=controlStack.split(`
|
|
1453
|
+
`);for(_RunInRootFrame$Deter=namePropDescriptor=0;namePropDescriptor<sampleLines.length&&!sampleLines[namePropDescriptor].includes("DetermineComponentFrameRoot");)namePropDescriptor++;for(;_RunInRootFrame$Deter<controlLines.length&&!controlLines[_RunInRootFrame$Deter].includes("DetermineComponentFrameRoot");)_RunInRootFrame$Deter++;if(namePropDescriptor===sampleLines.length||_RunInRootFrame$Deter===controlLines.length)for(namePropDescriptor=sampleLines.length-1,_RunInRootFrame$Deter=controlLines.length-1;1<=namePropDescriptor&&0<=_RunInRootFrame$Deter&&sampleLines[namePropDescriptor]!==controlLines[_RunInRootFrame$Deter];)_RunInRootFrame$Deter--;for(;1<=namePropDescriptor&&0<=_RunInRootFrame$Deter;namePropDescriptor--,_RunInRootFrame$Deter--)if(sampleLines[namePropDescriptor]!==controlLines[_RunInRootFrame$Deter]){if(namePropDescriptor!==1||_RunInRootFrame$Deter!==1)do if(namePropDescriptor--,_RunInRootFrame$Deter--,0>_RunInRootFrame$Deter||sampleLines[namePropDescriptor]!==controlLines[_RunInRootFrame$Deter]){var _frame=`
|
|
1454
|
+
`+sampleLines[namePropDescriptor].replace(" at new "," at ");return fn.displayName&&_frame.includes("<anonymous>")&&(_frame=_frame.replace("<anonymous>",fn.displayName)),typeof fn==="function"&&componentFrameCache.set(fn,_frame),_frame}while(1<=namePropDescriptor&&0<=_RunInRootFrame$Deter);break}}}finally{reentry=!1,ReactSharedInternals.H=previousDispatcher,reenableLogs(),Error.prepareStackTrace=frame}return sampleLines=(sampleLines=fn?fn.displayName||fn.name:"")?describeBuiltInComponentFrame(sampleLines):"",typeof fn==="function"&&componentFrameCache.set(fn,sampleLines),sampleLines}function describeComponentStackByType(type){if(typeof type==="string")return describeBuiltInComponentFrame(type);if(typeof type==="function")return type.prototype&&type.prototype.isReactComponent?describeNativeComponentFrame(type,!0):describeNativeComponentFrame(type,!1);if(typeof type==="object"&&type!==null){switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:return describeNativeComponentFrame(type.render,!1);case REACT_MEMO_TYPE:return describeNativeComponentFrame(type.type,!1);case REACT_LAZY_TYPE:var lazyComponent=type,payload=lazyComponent._payload;lazyComponent=lazyComponent._init;try{type=lazyComponent(payload)}catch(x){return describeBuiltInComponentFrame("Lazy")}return describeComponentStackByType(type)}if(typeof type.name==="string"){a:{if(payload=type.name,lazyComponent=type.env,type=type.debugLocation,type!=null){type=formatOwnerStack(type);var idx=type.lastIndexOf(`
|
|
1455
|
+
`);if(type=idx===-1?type:type.slice(idx+1),type.indexOf(payload)!==-1){payload=`
|
|
1456
|
+
`+type;break a}}payload=describeBuiltInComponentFrame(payload+(lazyComponent?" ["+lazyComponent+"]":""))}return payload}}switch(type){case REACT_SUSPENSE_LIST_TYPE:return describeBuiltInComponentFrame("SuspenseList");case REACT_SUSPENSE_TYPE:return describeBuiltInComponentFrame("Suspense")}return""}var callComponent={react_stack_bottom_frame:function(Component,props,secondArg){return Component(props,secondArg)}},callComponentInDEV=callComponent.react_stack_bottom_frame.bind(callComponent),callRender={react_stack_bottom_frame:function(instance){return instance.render()}},callRenderInDEV=callRender.react_stack_bottom_frame.bind(callRender),callLazyInit={react_stack_bottom_frame:function(lazy){var init=lazy._init;return init(lazy._payload)}},callLazyInitInDEV=callLazyInit.react_stack_bottom_frame.bind(callLazyInit),lastResetTime=0,getCurrentTime;if(typeof performance==="object"&&typeof performance.now==="function")localPerformance=performance,getCurrentTime=function(){return localPerformance.now()};else localDate=Date,getCurrentTime=function(){return localDate.now()};var localPerformance,localDate,CLIENT_RENDERED=4,PENDING=0,COMPLETED=1,FLUSHED=2,ABORTED=3,ERRORED=4,POSTPONED=5,CLOSED=14;function isEligibleForOutlining(request,boundary){return(500<boundary.byteSize||hasSuspenseyContent(boundary.contentState))&&boundary.contentPreamble===null}function defaultErrorHandler(error){if(typeof error==="object"&&error!==null&&typeof error.environmentName==="string"){var JSCompiler_inline_result=error.environmentName;error=[error].slice(0),typeof error[0]==="string"?error.splice(0,1,"%c%s%c "+error[0],"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px"," "+JSCompiler_inline_result+" ",""):error.splice(0,0,"%c%s%c","background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px"," "+JSCompiler_inline_result+" ",""),error.unshift(console),JSCompiler_inline_result=bind.apply(console.error,error),JSCompiler_inline_result()}else console.error(error);return null}function RequestInstance(resumableState,renderState,rootFormatContext,progressiveChunkSize,onError,onAllReady,onShellReady,onShellError,onFatalError,onPostpone,formState){var abortSet=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=resumableState,this.renderState=renderState,this.rootFormatContext=rootFormatContext,this.progressiveChunkSize=progressiveChunkSize===void 0?12800:progressiveChunkSize,this.status=10,this.fatalError=null,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=abortSet,this.pingedTasks=[],this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.trackedPostpones=null,this.onError=onError===void 0?defaultErrorHandler:onError,this.onPostpone=onPostpone===void 0?noop:onPostpone,this.onAllReady=onAllReady===void 0?noop:onAllReady,this.onShellReady=onShellReady===void 0?noop:onShellReady,this.onShellError=onShellError===void 0?noop:onShellError,this.onFatalError=onFatalError===void 0?noop:onFatalError,this.formState=formState===void 0?null:formState,this.didWarnForKey=null}function createRequest(children,resumableState,renderState,rootFormatContext,progressiveChunkSize,onError,onAllReady,onShellReady,onShellError,onFatalError,onPostpone,formState){var now=getCurrentTime();return 1000<now-lastResetTime&&(ReactSharedInternals.recentlyCreatedOwnerStacks=0,lastResetTime=now),resumableState=new RequestInstance(resumableState,renderState,rootFormatContext,progressiveChunkSize,onError,onAllReady,onShellReady,onShellError,onFatalError,onPostpone,formState),renderState=createPendingSegment(resumableState,0,null,rootFormatContext,!1,!1),renderState.parentFlushed=!0,children=createRenderTask(resumableState,null,children,-1,null,renderState,null,null,resumableState.abortableTasks,null,rootFormatContext,null,emptyTreeContext,null,null,emptyContextObject,null),pushComponentStack(children),resumableState.pingedTasks.push(children),resumableState}var currentRequest=null;function pingTask(request,task){request.pingedTasks.push(task),request.pingedTasks.length===1&&(request.flushScheduled=request.destination!==null,request.trackedPostpones!==null||request.status===10?scheduleMicrotask(function(){return performWork(request)}):setTimeout(function(){return performWork(request)},0))}function createSuspenseBoundary(request,row,fallbackAbortableTasks,contentPreamble,fallbackPreamble){return fallbackAbortableTasks={status:PENDING,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row,completedSegments:[],byteSize:0,fallbackAbortableTasks,errorDigest:null,contentState:createHoistableState(),fallbackState:createHoistableState(),contentPreamble,fallbackPreamble,trackedContentKeyPath:null,trackedFallbackNode:null,errorMessage:null,errorStack:null,errorComponentStack:null},row!==null&&(row.pendingTasks++,contentPreamble=row.boundaries,contentPreamble!==null&&(request.allPendingTasks++,fallbackAbortableTasks.pendingTasks++,contentPreamble.push(fallbackAbortableTasks)),request=row.inheritedHoistables,request!==null&&hoistHoistables(fallbackAbortableTasks.contentState,request)),fallbackAbortableTasks}function createRenderTask(request,thenableState,node,childIndex,blockedBoundary,blockedSegment,blockedPreamble,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,legacyContext,debugTask){request.allPendingTasks++,blockedBoundary===null?request.pendingRootTasks++:blockedBoundary.pendingTasks++,row!==null&&row.pendingTasks++;var task={replay:null,node,childIndex,ping:function(){return pingTask(request,task)},blockedBoundary,blockedSegment,blockedPreamble,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,thenableState};return task.debugTask=debugTask,abortSet.add(task),task}function createReplayTask(request,thenableState,replay,node,childIndex,blockedBoundary,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,legacyContext,debugTask){request.allPendingTasks++,blockedBoundary===null?request.pendingRootTasks++:blockedBoundary.pendingTasks++,row!==null&&row.pendingTasks++,replay.pendingTasks++;var task={replay,node,childIndex,ping:function(){return pingTask(request,task)},blockedBoundary,blockedSegment:null,blockedPreamble:null,hoistableState,abortSet,keyPath,formatContext,context,treeContext,row,componentStack,thenableState};return task.debugTask=debugTask,abortSet.add(task),task}function createPendingSegment(request,index,boundary,parentFormatContext,lastPushedText,textEmbedded){return{status:PENDING,parentFlushed:!1,id:-1,index,chunks:[],children:[],preambleChildren:[],parentFormatContext,boundary,lastPushedText,textEmbedded}}function getCurrentStackInDEV(){if(currentTaskInDEV===null||currentTaskInDEV.componentStack===null)return"";var componentStack=currentTaskInDEV.componentStack;try{var info="";if(typeof componentStack.type==="string")info+=describeBuiltInComponentFrame(componentStack.type);else if(typeof componentStack.type==="function"){if(!componentStack.owner){var JSCompiler_temp_const=info,fn=componentStack.type,name=fn?fn.displayName||fn.name:"",JSCompiler_inline_result=name?describeBuiltInComponentFrame(name):"";info=JSCompiler_temp_const+JSCompiler_inline_result}}else componentStack.owner||(info+=describeComponentStackByType(componentStack.type));for(;componentStack;)JSCompiler_temp_const=null,componentStack.debugStack!=null?JSCompiler_temp_const=formatOwnerStack(componentStack.debugStack):(JSCompiler_inline_result=componentStack,JSCompiler_inline_result.stack!=null&&(JSCompiler_temp_const=typeof JSCompiler_inline_result.stack!=="string"?JSCompiler_inline_result.stack=formatOwnerStack(JSCompiler_inline_result.stack):JSCompiler_inline_result.stack)),(componentStack=componentStack.owner)&&JSCompiler_temp_const&&(info+=`
|
|
1457
|
+
`+JSCompiler_temp_const);var JSCompiler_inline_result$jscomp$0=info}catch(x){JSCompiler_inline_result$jscomp$0=`
|
|
1458
|
+
Error generating stack: `+x.message+`
|
|
1459
|
+
`+x.stack}return JSCompiler_inline_result$jscomp$0}function pushHaltedAwaitOnComponentStack(task,debugInfo){if(debugInfo!=null)for(var i=debugInfo.length-1;0<=i;i--){var info=debugInfo[i];if(typeof info.name==="string")break;if(typeof info.time==="number")break;if(info.awaited!=null){var bestStack=info.debugStack==null?info.awaited:info;if(bestStack.debugStack!==void 0){task.componentStack={parent:task.componentStack,type:info,owner:bestStack.owner,stack:bestStack.debugStack},task.debugTask=bestStack.debugTask;break}}}}function pushServerComponentStack(task,debugInfo){if(debugInfo!=null)for(var i=0;i<debugInfo.length;i++){var componentInfo=debugInfo[i];typeof componentInfo.name==="string"&&componentInfo.debugStack!==void 0&&(task.componentStack={parent:task.componentStack,type:componentInfo,owner:componentInfo.owner,stack:componentInfo.debugStack},task.debugTask=componentInfo.debugTask)}}function pushComponentStack(task){var node=task.node;if(typeof node==="object"&&node!==null)switch(node.$$typeof){case REACT_ELEMENT_TYPE:var{type,_owner:owner,_debugStack:stack}=node;pushServerComponentStack(task,node._debugInfo),task.debugTask=node._debugTask,task.componentStack={parent:task.componentStack,type,owner,stack};break;case REACT_LAZY_TYPE:pushServerComponentStack(task,node._debugInfo);break;default:typeof node.then==="function"&&pushServerComponentStack(task,node._debugInfo)}}function replaceSuspenseComponentStackWithSuspenseFallbackStack(componentStack){return componentStack===null?null:{parent:componentStack.parent,type:"Suspense Fallback",owner:componentStack.owner,stack:componentStack.stack}}function getThrownInfo(node$jscomp$0){var errorInfo={};return node$jscomp$0&&Object.defineProperty(errorInfo,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var info="",node=node$jscomp$0;do info+=describeComponentStackByType(node.type),node=node.parent;while(node);var stack=info}catch(x){stack=`
|
|
1460
|
+
Error generating stack: `+x.message+`
|
|
1461
|
+
`+x.stack}return Object.defineProperty(errorInfo,"componentStack",{value:stack}),stack}}),errorInfo}function encodeErrorForBoundary(boundary,digest,error,thrownInfo,wasAborted){boundary.errorDigest=digest,error instanceof Error?(digest=String(error.message),error=String(error.stack)):(digest=typeof error==="object"&&error!==null?describeObjectForErrorMessage(error):String(error),error=null),wasAborted=wasAborted?`Switched to client rendering because the server rendering aborted due to:
|
|
1462
|
+
|
|
1463
|
+
`:`Switched to client rendering because the server rendering errored:
|
|
1464
|
+
|
|
1465
|
+
`,boundary.errorMessage=wasAborted+digest,boundary.errorStack=error!==null?wasAborted+error:null,boundary.errorComponentStack=thrownInfo.componentStack}function logRecoverableError(request,error,errorInfo,debugTask){if(request=request.onError,error=debugTask?debugTask.run(request.bind(null,error,errorInfo)):request(error,errorInfo),error!=null&&typeof error!=="string")console.error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',typeof error);else return error}function fatalError(request,error,errorInfo,debugTask){errorInfo=request.onShellError;var onFatalError=request.onFatalError;debugTask?(debugTask.run(errorInfo.bind(null,error)),debugTask.run(onFatalError.bind(null,error))):(errorInfo(error),onFatalError(error)),request.destination!==null?(request.status=CLOSED,closeWithError(request.destination,error)):(request.status=13,request.fatalError=error)}function finishSuspenseListRow(request,row){unblockSuspenseListRow(request,row.next,row.hoistables)}function unblockSuspenseListRow(request,unblockedRow,inheritedHoistables){for(;unblockedRow!==null;){inheritedHoistables!==null&&(hoistHoistables(unblockedRow.hoistables,inheritedHoistables),unblockedRow.inheritedHoistables=inheritedHoistables);var unblockedBoundaries=unblockedRow.boundaries;if(unblockedBoundaries!==null){unblockedRow.boundaries=null;for(var i=0;i<unblockedBoundaries.length;i++){var unblockedBoundary=unblockedBoundaries[i];inheritedHoistables!==null&&hoistHoistables(unblockedBoundary.contentState,inheritedHoistables),finishedTask(request,unblockedBoundary,null,null)}}if(unblockedRow.pendingTasks--,0<unblockedRow.pendingTasks)break;inheritedHoistables=unblockedRow.hoistables,unblockedRow=unblockedRow.next}}function tryToResolveTogetherRow(request,togetherRow){var boundaries=togetherRow.boundaries;if(boundaries!==null&&togetherRow.pendingTasks===boundaries.length){for(var allCompleteAndInlinable=!0,i=0;i<boundaries.length;i++){var rowBoundary=boundaries[i];if(rowBoundary.pendingTasks!==1||rowBoundary.parentFlushed||isEligibleForOutlining(request,rowBoundary)){allCompleteAndInlinable=!1;break}}allCompleteAndInlinable&&unblockSuspenseListRow(request,togetherRow,togetherRow.hoistables)}}function createSuspenseListRow(previousRow){var newRow={pendingTasks:1,boundaries:null,hoistables:createHoistableState(),inheritedHoistables:null,together:!1,next:null};return previousRow!==null&&0<previousRow.pendingTasks&&(newRow.pendingTasks++,newRow.boundaries=[],previousRow.next=newRow),newRow}function renderSuspenseListRows(request,task,keyPath,rows,revealOrder){var{keyPath:prevKeyPath,treeContext:prevTreeContext,row:prevRow,componentStack:previousComponentStack,debugTask:previousDebugTask}=task;pushServerComponentStack(task,task.node.props.children._debugInfo),task.keyPath=keyPath,keyPath=rows.length;var previousSuspenseListRow=null;if(task.replay!==null){var resumeSlots=task.replay.slots;if(resumeSlots!==null&&typeof resumeSlots==="object")for(var n=0;n<keyPath;n++){var i=revealOrder!=="backwards"&&revealOrder!=="unstable_legacy-backwards"?n:keyPath-1-n,node=rows[i];task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,i);var resumeSegmentID=resumeSlots[i];typeof resumeSegmentID==="number"?(resumeNode(request,task,resumeSegmentID,node,i),delete resumeSlots[i]):renderNode(request,task,node,i),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow)}else for(resumeSlots=0;resumeSlots<keyPath;resumeSlots++)n=revealOrder!=="backwards"&&revealOrder!=="unstable_legacy-backwards"?resumeSlots:keyPath-1-resumeSlots,i=rows[n],warnForMissingKey(request,task,i),task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,n),renderNode(request,task,i,n),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow)}else if(revealOrder!=="backwards"&&revealOrder!=="unstable_legacy-backwards")for(revealOrder=0;revealOrder<keyPath;revealOrder++)resumeSlots=rows[revealOrder],warnForMissingKey(request,task,resumeSlots),task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,revealOrder),renderNode(request,task,resumeSlots,revealOrder),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow);else{revealOrder=task.blockedSegment,resumeSlots=revealOrder.children.length,n=revealOrder.chunks.length;for(i=keyPath-1;0<=i;i--){node=rows[i],task.row=previousSuspenseListRow=createSuspenseListRow(previousSuspenseListRow),task.treeContext=pushTreeContext(prevTreeContext,keyPath,i),resumeSegmentID=createPendingSegment(request,n,null,task.formatContext,i===0?revealOrder.lastPushedText:!0,!0),revealOrder.children.splice(resumeSlots,0,resumeSegmentID),task.blockedSegment=resumeSegmentID,warnForMissingKey(request,task,node);try{renderNode(request,task,node,i),pushSegmentFinale(resumeSegmentID.chunks,request.renderState,resumeSegmentID.lastPushedText,resumeSegmentID.textEmbedded),resumeSegmentID.status=COMPLETED,finishedSegment(request,task.blockedBoundary,resumeSegmentID),--previousSuspenseListRow.pendingTasks===0&&finishSuspenseListRow(request,previousSuspenseListRow)}catch(thrownValue){throw resumeSegmentID.status=request.status===12?ABORTED:ERRORED,thrownValue}}task.blockedSegment=revealOrder,revealOrder.lastPushedText=!1}prevRow!==null&&previousSuspenseListRow!==null&&0<previousSuspenseListRow.pendingTasks&&(prevRow.pendingTasks++,previousSuspenseListRow.next=prevRow),task.treeContext=prevTreeContext,task.row=prevRow,task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask}function renderWithHooks(request,task,keyPath,Component,props,secondArg){var prevThenableState=task.thenableState;task.thenableState=null,currentlyRenderingComponent={},currentlyRenderingTask=task,currentlyRenderingRequest=request,currentlyRenderingKeyPath=keyPath,isInHookUserCodeInDev=!1,actionStateCounter=localIdCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,thenableState=prevThenableState;for(request=callComponentInDEV(Component,props,secondArg);didScheduleRenderPhaseUpdate;)didScheduleRenderPhaseUpdate=!1,actionStateCounter=localIdCounter=0,actionStateMatchingIndex=-1,thenableIndexCounter=0,numberOfReRenders+=1,workInProgressHook=null,request=Component(props,secondArg);return resetHooksState(),request}var didWarnAboutBadClass={},didWarnAboutContextTypes={},didWarnAboutContextTypeOnFunctionComponent={},didWarnAboutGetDerivedStateOnFunctionComponent={},didWarnAboutReassigningProps=!1,didWarnAboutGenerators=!1,didWarnAboutMaps=!1;function finishFunctionComponent(request,task,keyPath,children,hasId,actionStateCount,actionStateMatchingIndex){var didEmitActionStateMarkers=!1;if(actionStateCount!==0&&request.formState!==null){var segment=task.blockedSegment;if(segment!==null){didEmitActionStateMarkers=!0,segment=segment.chunks;for(var i=0;i<actionStateCount;i++)i===actionStateMatchingIndex?segment.push("<!--F!-->"):segment.push("<!--F-->")}}actionStateCount=task.keyPath,task.keyPath=keyPath,hasId?(keyPath=task.treeContext,task.treeContext=pushTreeContext(keyPath,1,0),renderNode(request,task,children,-1),task.treeContext=keyPath):didEmitActionStateMarkers?renderNode(request,task,children,-1):renderNodeDestructive(request,task,children,-1),task.keyPath=actionStateCount}function renderElement(request,task,keyPath,type,props,ref){if(typeof type==="function")if(type.prototype&&type.prototype.isReactComponent){var newProps=props;if("ref"in props){newProps={};for(var propName in props)propName!=="ref"&&(newProps[propName]=props[propName])}var defaultProps=type.defaultProps;if(defaultProps){newProps===props&&(newProps=assign({},newProps,props));for(var _propName in defaultProps)newProps[_propName]===void 0&&(newProps[_propName]=defaultProps[_propName])}var resolvedProps=newProps,context=emptyContextObject,contextType=type.contextType;if("contextType"in type&&contextType!==null&&(contextType===void 0||contextType.$$typeof!==REACT_CONTEXT_TYPE)&&!didWarnAboutInvalidateContextType.has(type)){didWarnAboutInvalidateContextType.add(type);var addendum=contextType===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof contextType!=="object"?" However, it is set to a "+typeof contextType+".":contextType.$$typeof===REACT_CONSUMER_TYPE?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(contextType).join(", ")+"}.";console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",getComponentNameFromType(type)||"Component",addendum)}typeof contextType==="object"&&contextType!==null&&(context=contextType._currentValue);var instance=new type(resolvedProps,context);if(typeof type.getDerivedStateFromProps==="function"&&(instance.state===null||instance.state===void 0)){var componentName=getComponentNameFromType(type)||"Component";didWarnAboutUninitializedState.has(componentName)||(didWarnAboutUninitializedState.add(componentName),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",componentName,instance.state===null?"null":"undefined",componentName))}if(typeof type.getDerivedStateFromProps==="function"||typeof instance.getSnapshotBeforeUpdate==="function"){var foundWillMountName=null,foundWillReceivePropsName=null,foundWillUpdateName=null;if(typeof instance.componentWillMount==="function"&&instance.componentWillMount.__suppressDeprecationWarning!==!0?foundWillMountName="componentWillMount":typeof instance.UNSAFE_componentWillMount==="function"&&(foundWillMountName="UNSAFE_componentWillMount"),typeof instance.componentWillReceiveProps==="function"&&instance.componentWillReceiveProps.__suppressDeprecationWarning!==!0?foundWillReceivePropsName="componentWillReceiveProps":typeof instance.UNSAFE_componentWillReceiveProps==="function"&&(foundWillReceivePropsName="UNSAFE_componentWillReceiveProps"),typeof instance.componentWillUpdate==="function"&&instance.componentWillUpdate.__suppressDeprecationWarning!==!0?foundWillUpdateName="componentWillUpdate":typeof instance.UNSAFE_componentWillUpdate==="function"&&(foundWillUpdateName="UNSAFE_componentWillUpdate"),foundWillMountName!==null||foundWillReceivePropsName!==null||foundWillUpdateName!==null){var _componentName=getComponentNameFromType(type)||"Component",newApiName=typeof type.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)||(didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
1466
|
+
|
|
1467
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
1468
|
+
|
|
1469
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
1470
|
+
https://react.dev/link/unsafe-component-lifecycles`,_componentName,newApiName,foundWillMountName!==null?`
|
|
1471
|
+
`+foundWillMountName:"",foundWillReceivePropsName!==null?`
|
|
1472
|
+
`+foundWillReceivePropsName:"",foundWillUpdateName!==null?`
|
|
1473
|
+
`+foundWillUpdateName:""))}}var name=getComponentNameFromType(type)||"Component";instance.render||(type.prototype&&typeof type.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",name):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",name)),!instance.getInitialState||instance.getInitialState.isReactClassApproved||instance.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",name),instance.getDefaultProps&&!instance.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",name),instance.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",name),type.childContextTypes&&!didWarnAboutChildContextTypes.has(type)&&(didWarnAboutChildContextTypes.add(type),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",name)),type.contextTypes&&!didWarnAboutContextTypes$1.has(type)&&(didWarnAboutContextTypes$1.add(type),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",name)),typeof instance.componentShouldUpdate==="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",name),type.prototype&&type.prototype.isPureReactComponent&&typeof instance.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",getComponentNameFromType(type)||"A pure component"),typeof instance.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",name),typeof instance.componentDidReceiveProps==="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",name),typeof instance.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",name),typeof instance.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",name);var hasMutatedProps=instance.props!==resolvedProps;instance.props!==void 0&&hasMutatedProps&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",name),instance.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",name,name),typeof instance.getSnapshotBeforeUpdate!=="function"||typeof instance.componentDidUpdate==="function"||didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type)||(didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",getComponentNameFromType(type))),typeof instance.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",name),typeof instance.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",name),typeof type.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",name);var state=instance.state;state&&(typeof state!=="object"||isArrayImpl(state))&&console.error("%s.state: must be set to an object or null",name),typeof instance.getChildContext==="function"&&typeof type.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",name);var initialState=instance.state!==void 0?instance.state:null;instance.updater=classComponentUpdater,instance.props=resolvedProps,instance.state=initialState;var internalInstance={queue:[],replace:!1};instance._reactInternals=internalInstance;var contextType$jscomp$0=type.contextType;if(instance.context=typeof contextType$jscomp$0==="object"&&contextType$jscomp$0!==null?contextType$jscomp$0._currentValue:emptyContextObject,instance.state===resolvedProps){var componentName$jscomp$0=getComponentNameFromType(type)||"Component";didWarnAboutDirectlyAssigningPropsToState.has(componentName$jscomp$0)||(didWarnAboutDirectlyAssigningPropsToState.add(componentName$jscomp$0),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",componentName$jscomp$0))}var getDerivedStateFromProps=type.getDerivedStateFromProps;if(typeof getDerivedStateFromProps==="function"){var partialState=getDerivedStateFromProps(resolvedProps,initialState);if(partialState===void 0){var componentName$jscomp$1=getComponentNameFromType(type)||"Component";didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1)||(didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",componentName$jscomp$1))}var JSCompiler_inline_result=partialState===null||partialState===void 0?initialState:assign({},initialState,partialState);instance.state=JSCompiler_inline_result}if(typeof type.getDerivedStateFromProps!=="function"&&typeof instance.getSnapshotBeforeUpdate!=="function"&&(typeof instance.UNSAFE_componentWillMount==="function"||typeof instance.componentWillMount==="function")){var oldState=instance.state;if(typeof instance.componentWillMount==="function"){if(instance.componentWillMount.__suppressDeprecationWarning!==!0){var componentName$jscomp$2=getComponentNameFromType(type)||"Unknown";didWarnAboutDeprecatedWillMount[componentName$jscomp$2]||(console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
1474
|
+
|
|
1475
|
+
* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.
|
|
1476
|
+
|
|
1477
|
+
Please update the following components: %s`,componentName$jscomp$2),didWarnAboutDeprecatedWillMount[componentName$jscomp$2]=!0)}instance.componentWillMount()}if(typeof instance.UNSAFE_componentWillMount==="function"&&instance.UNSAFE_componentWillMount(),oldState!==instance.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",getComponentNameFromType(type)||"Component"),classComponentUpdater.enqueueReplaceState(instance,instance.state,null)),internalInstance.queue!==null&&0<internalInstance.queue.length){var{queue:oldQueue,replace:oldReplace}=internalInstance;if(internalInstance.queue=null,internalInstance.replace=!1,oldReplace&&oldQueue.length===1)instance.state=oldQueue[0];else{for(var nextState=oldReplace?oldQueue[0]:instance.state,dontMutate=!0,i=oldReplace?1:0;i<oldQueue.length;i++){var partial=oldQueue[i],partialState$jscomp$0=typeof partial==="function"?partial.call(instance,nextState,resolvedProps,void 0):partial;partialState$jscomp$0!=null&&(dontMutate?(dontMutate=!1,nextState=assign({},nextState,partialState$jscomp$0)):assign(nextState,partialState$jscomp$0))}instance.state=nextState}}else internalInstance.queue=null}var nextChildren=callRenderInDEV(instance);if(request.status===12)throw null;instance.props!==resolvedProps&&(didWarnAboutReassigningProps||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",getComponentNameFromType(type)||"a component"),didWarnAboutReassigningProps=!0);var prevKeyPath=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,nextChildren,-1),task.keyPath=prevKeyPath}else{if(type.prototype&&typeof type.prototype.render==="function"){var componentName$jscomp$3=getComponentNameFromType(type)||"Unknown";didWarnAboutBadClass[componentName$jscomp$3]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",componentName$jscomp$3,componentName$jscomp$3),didWarnAboutBadClass[componentName$jscomp$3]=!0)}var value=renderWithHooks(request,task,keyPath,type,props,void 0);if(request.status===12)throw null;var hasId=localIdCounter!==0,actionStateCount=actionStateCounter,actionStateMatchingIndex$jscomp$0=actionStateMatchingIndex;if(type.contextTypes){var _componentName$jscomp$0=getComponentNameFromType(type)||"Unknown";didWarnAboutContextTypes[_componentName$jscomp$0]||(didWarnAboutContextTypes[_componentName$jscomp$0]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",_componentName$jscomp$0))}if(type&&type.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
1478
|
+
%s.childContextTypes = ...`,type.displayName||type.name||"Component"),typeof type.getDerivedStateFromProps==="function"){var componentName$jscomp$4=getComponentNameFromType(type)||"Unknown";didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4]||(console.error("%s: Function components do not support getDerivedStateFromProps.",componentName$jscomp$4),didWarnAboutGetDerivedStateOnFunctionComponent[componentName$jscomp$4]=!0)}if(typeof type.contextType==="object"&&type.contextType!==null){var _componentName2=getComponentNameFromType(type)||"Unknown";didWarnAboutContextTypeOnFunctionComponent[_componentName2]||(console.error("%s: Function components do not support contextType.",_componentName2),didWarnAboutContextTypeOnFunctionComponent[_componentName2]=!0)}finishFunctionComponent(request,task,keyPath,value,hasId,actionStateCount,actionStateMatchingIndex$jscomp$0)}else if(typeof type==="string"){var segment=task.blockedSegment;if(segment===null){var children=props.children,{formatContext:prevContext,keyPath:prevKeyPath$jscomp$0}=task;task.formatContext=getChildFormatContext(prevContext,type,props),task.keyPath=keyPath,renderNode(request,task,children,-1),task.formatContext=prevContext,task.keyPath=prevKeyPath$jscomp$0}else{var _children=pushStartInstance(segment.chunks,type,props,request.resumableState,request.renderState,task.blockedPreamble,task.hoistableState,task.formatContext,segment.lastPushedText);segment.lastPushedText=!1;var{formatContext:_prevContext2,keyPath:_prevKeyPath3}=task;if(task.keyPath=keyPath,(task.formatContext=getChildFormatContext(_prevContext2,type,props)).insertionMode===HTML_HEAD_MODE){var preambleSegment=createPendingSegment(request,0,null,task.formatContext,!1,!1);segment.preambleChildren.push(preambleSegment),task.blockedSegment=preambleSegment;try{preambleSegment.status=6,renderNode(request,task,_children,-1),pushSegmentFinale(preambleSegment.chunks,request.renderState,preambleSegment.lastPushedText,preambleSegment.textEmbedded),preambleSegment.status=COMPLETED,finishedSegment(request,task.blockedBoundary,preambleSegment)}finally{task.blockedSegment=segment}}else renderNode(request,task,_children,-1);task.formatContext=_prevContext2,task.keyPath=_prevKeyPath3;a:{var target=segment.chunks,resumableState=request.resumableState;switch(type){case"title":case"style":case"script":case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break a;case"body":if(_prevContext2.insertionMode<=HTML_HTML_MODE){resumableState.hasBody=!0;break a}break;case"html":if(_prevContext2.insertionMode===ROOT_HTML_MODE){resumableState.hasHtml=!0;break a}break;case"head":if(_prevContext2.insertionMode<=HTML_HTML_MODE)break a}target.push(endChunkForTag(type))}segment.lastPushedText=!1}}else{switch(type){case REACT_LEGACY_HIDDEN_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_PROFILER_TYPE:case REACT_FRAGMENT_TYPE:var prevKeyPath$jscomp$1=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,props.children,-1),task.keyPath=prevKeyPath$jscomp$1;return;case REACT_ACTIVITY_TYPE:var segment$jscomp$0=task.blockedSegment;if(segment$jscomp$0===null){if(props.mode!=="hidden"){var prevKeyPath$jscomp$2=task.keyPath;task.keyPath=keyPath,renderNode(request,task,props.children,-1),task.keyPath=prevKeyPath$jscomp$2}}else if(props.mode!=="hidden"){segment$jscomp$0.chunks.push("<!--&-->"),segment$jscomp$0.lastPushedText=!1;var _prevKeyPath4=task.keyPath;task.keyPath=keyPath,renderNode(request,task,props.children,-1),task.keyPath=_prevKeyPath4,segment$jscomp$0.chunks.push("<!--/&-->"),segment$jscomp$0.lastPushedText=!1}return;case REACT_SUSPENSE_LIST_TYPE:a:{var{children:children$jscomp$0,revealOrder}=props;if(revealOrder==="forwards"||revealOrder==="backwards"||revealOrder==="unstable_legacy-backwards"){if(isArrayImpl(children$jscomp$0)){renderSuspenseListRows(request,task,keyPath,children$jscomp$0,revealOrder);break a}var iteratorFn=getIteratorFn(children$jscomp$0);if(iteratorFn){var iterator=iteratorFn.call(children$jscomp$0);if(iterator){validateIterable(task,children$jscomp$0,-1,iterator,iteratorFn);var step=iterator.next();if(!step.done){var rows=[];do rows.push(step.value),step=iterator.next();while(!step.done);renderSuspenseListRows(request,task,keyPath,children$jscomp$0,revealOrder)}break a}}}if(revealOrder==="together"){var{keyPath:_prevKeyPath2,row:prevRow}=task,newRow=task.row=createSuspenseListRow(null);newRow.boundaries=[],newRow.together=!0,task.keyPath=keyPath,renderNodeDestructive(request,task,children$jscomp$0,-1),--newRow.pendingTasks===0&&finishSuspenseListRow(request,newRow),task.keyPath=_prevKeyPath2,task.row=prevRow,prevRow!==null&&0<newRow.pendingTasks&&(prevRow.pendingTasks++,newRow.next=prevRow)}else{var prevKeyPath$jscomp$3=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,children$jscomp$0,-1),task.keyPath=prevKeyPath$jscomp$3}}return;case REACT_VIEW_TRANSITION_TYPE:case REACT_SCOPE_TYPE:throw Error("ReactDOMServer does not yet support scope components.");case REACT_SUSPENSE_TYPE:a:if(task.replay!==null){var{keyPath:_prevKeyPath,formatContext:_prevContext,row:_prevRow}=task;task.keyPath=keyPath,task.formatContext=getSuspenseContentFormatContext(request.resumableState,_prevContext),task.row=null;var _content=props.children;try{renderNode(request,task,_content,-1)}finally{task.keyPath=_prevKeyPath,task.formatContext=_prevContext,task.row=_prevRow}}else{var{keyPath:prevKeyPath$jscomp$4,formatContext:prevContext$jscomp$0,row:prevRow$jscomp$0,blockedBoundary:parentBoundary,blockedPreamble:parentPreamble,hoistableState:parentHoistableState,blockedSegment:parentSegment}=task,{fallback,children:content}=props,fallbackAbortSet=new Set,newBoundary=task.formatContext.insertionMode<HTML_MODE?createSuspenseBoundary(request,task.row,fallbackAbortSet,createPreambleState(),createPreambleState()):createSuspenseBoundary(request,task.row,fallbackAbortSet,null,null);request.trackedPostpones!==null&&(newBoundary.trackedContentKeyPath=keyPath);var boundarySegment=createPendingSegment(request,parentSegment.chunks.length,newBoundary,task.formatContext,!1,!1);parentSegment.children.push(boundarySegment),parentSegment.lastPushedText=!1;var contentRootSegment=createPendingSegment(request,0,null,task.formatContext,!1,!1);if(contentRootSegment.parentFlushed=!0,request.trackedPostpones!==null){var suspenseComponentStack=task.componentStack,fallbackKeyPath=[keyPath[0],"Suspense Fallback",keyPath[2]],fallbackReplayNode=[fallbackKeyPath[1],fallbackKeyPath[2],[],null];request.trackedPostpones.workingMap.set(fallbackKeyPath,fallbackReplayNode),newBoundary.trackedFallbackNode=fallbackReplayNode,task.blockedSegment=boundarySegment,task.blockedPreamble=newBoundary.fallbackPreamble,task.keyPath=fallbackKeyPath,task.formatContext=getSuspenseFallbackFormatContext(request.resumableState,prevContext$jscomp$0),task.componentStack=replaceSuspenseComponentStackWithSuspenseFallbackStack(suspenseComponentStack),boundarySegment.status=6;try{renderNode(request,task,fallback,-1),pushSegmentFinale(boundarySegment.chunks,request.renderState,boundarySegment.lastPushedText,boundarySegment.textEmbedded),boundarySegment.status=COMPLETED,finishedSegment(request,parentBoundary,boundarySegment)}catch(thrownValue){throw boundarySegment.status=request.status===12?ABORTED:ERRORED,thrownValue}finally{task.blockedSegment=parentSegment,task.blockedPreamble=parentPreamble,task.keyPath=prevKeyPath$jscomp$4,task.formatContext=prevContext$jscomp$0}var suspendedPrimaryTask=createRenderTask(request,null,content,-1,newBoundary,contentRootSegment,newBoundary.contentPreamble,newBoundary.contentState,task.abortSet,keyPath,getSuspenseContentFormatContext(request.resumableState,task.formatContext),task.context,task.treeContext,null,suspenseComponentStack,emptyContextObject,task.debugTask);pushComponentStack(suspendedPrimaryTask),request.pingedTasks.push(suspendedPrimaryTask)}else{task.blockedBoundary=newBoundary,task.blockedPreamble=newBoundary.contentPreamble,task.hoistableState=newBoundary.contentState,task.blockedSegment=contentRootSegment,task.keyPath=keyPath,task.formatContext=getSuspenseContentFormatContext(request.resumableState,prevContext$jscomp$0),task.row=null,contentRootSegment.status=6;try{if(renderNode(request,task,content,-1),pushSegmentFinale(contentRootSegment.chunks,request.renderState,contentRootSegment.lastPushedText,contentRootSegment.textEmbedded),contentRootSegment.status=COMPLETED,finishedSegment(request,newBoundary,contentRootSegment),queueCompletedSegment(newBoundary,contentRootSegment),newBoundary.pendingTasks===0&&newBoundary.status===PENDING){if(newBoundary.status=COMPLETED,!isEligibleForOutlining(request,newBoundary)){prevRow$jscomp$0!==null&&--prevRow$jscomp$0.pendingTasks===0&&finishSuspenseListRow(request,prevRow$jscomp$0),request.pendingRootTasks===0&&task.blockedPreamble&&preparePreamble(request);break a}}else prevRow$jscomp$0!==null&&prevRow$jscomp$0.together&&tryToResolveTogetherRow(request,prevRow$jscomp$0)}catch(thrownValue$2){if(newBoundary.status=CLIENT_RENDERED,request.status===12){contentRootSegment.status=ABORTED;var error=request.fatalError}else contentRootSegment.status=ERRORED,error=thrownValue$2;var thrownInfo=getThrownInfo(task.componentStack),errorDigest=logRecoverableError(request,error,thrownInfo,task.debugTask);encodeErrorForBoundary(newBoundary,errorDigest,error,thrownInfo,!1),untrackBoundary(request,newBoundary)}finally{task.blockedBoundary=parentBoundary,task.blockedPreamble=parentPreamble,task.hoistableState=parentHoistableState,task.blockedSegment=parentSegment,task.keyPath=prevKeyPath$jscomp$4,task.formatContext=prevContext$jscomp$0,task.row=prevRow$jscomp$0}var suspendedFallbackTask=createRenderTask(request,null,fallback,-1,parentBoundary,boundarySegment,newBoundary.fallbackPreamble,newBoundary.fallbackState,fallbackAbortSet,[keyPath[0],"Suspense Fallback",keyPath[2]],getSuspenseFallbackFormatContext(request.resumableState,task.formatContext),task.context,task.treeContext,task.row,replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack),emptyContextObject,task.debugTask);pushComponentStack(suspendedFallbackTask),request.pingedTasks.push(suspendedFallbackTask)}}return}if(typeof type==="object"&&type!==null)switch(type.$$typeof){case REACT_FORWARD_REF_TYPE:if("ref"in props){var propsWithoutRef={};for(var key in props)key!=="ref"&&(propsWithoutRef[key]=props[key])}else propsWithoutRef=props;var children$jscomp$1=renderWithHooks(request,task,keyPath,type.render,propsWithoutRef,ref);finishFunctionComponent(request,task,keyPath,children$jscomp$1,localIdCounter!==0,actionStateCounter,actionStateMatchingIndex);return;case REACT_MEMO_TYPE:renderElement(request,task,keyPath,type.type,props,ref);return;case REACT_CONTEXT_TYPE:var{value:value$jscomp$0,children:children$jscomp$2}=props,{context:prevSnapshot,keyPath:prevKeyPath$jscomp$5}=task,prevValue=type._currentValue;type._currentValue=value$jscomp$0,type._currentRenderer!==void 0&&type._currentRenderer!==null&&type._currentRenderer!==rendererSigil&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),type._currentRenderer=rendererSigil;var prevNode=currentActiveSnapshot,newNode={parent:prevNode,depth:prevNode===null?0:prevNode.depth+1,context:type,parentValue:prevValue,value:value$jscomp$0};currentActiveSnapshot=newNode,task.context=newNode,task.keyPath=keyPath,renderNodeDestructive(request,task,children$jscomp$2,-1);var prevSnapshot$jscomp$0=currentActiveSnapshot;if(prevSnapshot$jscomp$0===null)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");prevSnapshot$jscomp$0.context!==type&&console.error("The parent context is not the expected context. This is probably a bug in React."),prevSnapshot$jscomp$0.context._currentValue=prevSnapshot$jscomp$0.parentValue,type._currentRenderer!==void 0&&type._currentRenderer!==null&&type._currentRenderer!==rendererSigil&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),type._currentRenderer=rendererSigil;var JSCompiler_inline_result$jscomp$0=currentActiveSnapshot=prevSnapshot$jscomp$0.parent;task.context=JSCompiler_inline_result$jscomp$0,task.keyPath=prevKeyPath$jscomp$5,prevSnapshot!==task.context&&console.error("Popping the context provider did not return back to the original snapshot. This is a bug in React.");return;case REACT_CONSUMER_TYPE:var context$jscomp$0=type._context,render=props.children;typeof render!=="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var newChildren=render(context$jscomp$0._currentValue),prevKeyPath$jscomp$6=task.keyPath;task.keyPath=keyPath,renderNodeDestructive(request,task,newChildren,-1),task.keyPath=prevKeyPath$jscomp$6;return;case REACT_LAZY_TYPE:var Component=callLazyInitInDEV(type);if(request.status===12)throw null;renderElement(request,task,keyPath,Component,props,ref);return}var info="";if(type===void 0||typeof type==="object"&&type!==null&&Object.keys(type).length===0)info+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((type==null?type:typeof type)+"."+info))}}function resumeNode(request,task,segmentId,node,childIndex){var{replay:prevReplay,blockedBoundary}=task,resumedSegment=createPendingSegment(request,0,null,task.formatContext,!1,!1);resumedSegment.id=segmentId,resumedSegment.parentFlushed=!0;try{task.replay=null,task.blockedSegment=resumedSegment,renderNode(request,task,node,childIndex),resumedSegment.status=COMPLETED,finishedSegment(request,blockedBoundary,resumedSegment),blockedBoundary===null?request.completedRootSegment=resumedSegment:(queueCompletedSegment(blockedBoundary,resumedSegment),blockedBoundary.parentFlushed&&request.partialBoundaries.push(blockedBoundary))}finally{task.replay=prevReplay,task.blockedSegment=null}}function replayElement(request,task,keyPath,name,keyOrIndex,childIndex,type,props,ref,replay){childIndex=replay.nodes;for(var i=0;i<childIndex.length;i++){var node=childIndex[i];if(keyOrIndex===node[1]){if(node.length===4){if(name!==null&&name!==node[0])throw Error("Expected the resume to render <"+node[0]+"> in this slot but instead it rendered <"+name+">. The tree doesn't match so React will fallback to client rendering.");var childNodes=node[2];name=node[3],keyOrIndex=task.node,task.replay={nodes:childNodes,slots:name,pendingTasks:1};try{if(renderElement(request,task,keyPath,type,props,ref),task.replay.pendingTasks===1&&0<task.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");task.replay.pendingTasks--}catch(x){if(typeof x==="object"&&x!==null&&(x===SuspenseException||typeof x.then==="function"))throw task.node===keyOrIndex?task.replay=replay:childIndex.splice(i,1),x;task.replay.pendingTasks--,type=getThrownInfo(task.componentStack),props=request,request=task.blockedBoundary,keyPath=x,ref=name,name=logRecoverableError(props,keyPath,type,task.debugTask),abortRemainingReplayNodes(props,request,childNodes,ref,keyPath,name,type,!1)}task.replay=replay}else{if(type!==REACT_SUSPENSE_TYPE)throw Error("Expected the resume to render <Suspense> in this slot but instead it rendered <"+(getComponentNameFromType(type)||"Unknown")+">. The tree doesn't match so React will fallback to client rendering.");a:{replay=void 0,name=node[5],type=node[2],ref=node[3],keyOrIndex=node[4]===null?[]:node[4][2],node=node[4]===null?null:node[4][3];var{keyPath:prevKeyPath,formatContext:prevContext,row:prevRow,replay:previousReplaySet,blockedBoundary:parentBoundary,hoistableState:parentHoistableState}=task,content=props.children,fallback=props.fallback,fallbackAbortSet=new Set;props=task.formatContext.insertionMode<HTML_MODE?createSuspenseBoundary(request,task.row,fallbackAbortSet,createPreambleState(),createPreambleState()):createSuspenseBoundary(request,task.row,fallbackAbortSet,null,null),props.parentFlushed=!0,props.rootSegmentID=name,task.blockedBoundary=props,task.hoistableState=props.contentState,task.keyPath=keyPath,task.formatContext=getSuspenseContentFormatContext(request.resumableState,prevContext),task.row=null,task.replay={nodes:type,slots:ref,pendingTasks:1};try{if(renderNode(request,task,content,-1),task.replay.pendingTasks===1&&0<task.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");if(task.replay.pendingTasks--,props.pendingTasks===0&&props.status===PENDING){props.status=COMPLETED,request.completedBoundaries.push(props);break a}}catch(error){props.status=CLIENT_RENDERED,childNodes=getThrownInfo(task.componentStack),replay=logRecoverableError(request,error,childNodes,task.debugTask),encodeErrorForBoundary(props,replay,error,childNodes,!1),task.replay.pendingTasks--,request.clientRenderedBoundaries.push(props)}finally{task.blockedBoundary=parentBoundary,task.hoistableState=parentHoistableState,task.replay=previousReplaySet,task.keyPath=prevKeyPath,task.formatContext=prevContext,task.row=prevRow}props=createReplayTask(request,null,{nodes:keyOrIndex,slots:node,pendingTasks:0},fallback,-1,parentBoundary,props.fallbackState,fallbackAbortSet,[keyPath[0],"Suspense Fallback",keyPath[2]],getSuspenseFallbackFormatContext(request.resumableState,task.formatContext),task.context,task.treeContext,task.row,replaceSuspenseComponentStackWithSuspenseFallbackStack(task.componentStack),emptyContextObject,task.debugTask),pushComponentStack(props),request.pingedTasks.push(props)}}childIndex.splice(i,1);break}}}function validateIterable(task,iterable,childIndex,iterator,iteratorFn){if(iterator===iterable){if(childIndex!==-1||task.componentStack===null||typeof task.componentStack.type!=="function"||Object.prototype.toString.call(task.componentStack.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(iterator)!=="[object Generator]")didWarnAboutGenerators||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),didWarnAboutGenerators=!0}else iterable.entries!==iteratorFn||didWarnAboutMaps||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),didWarnAboutMaps=!0)}function renderNodeDestructive(request,task,node,childIndex){task.replay!==null&&typeof task.replay.slots==="number"?resumeNode(request,task,task.replay.slots,node,childIndex):(task.node=node,task.childIndex=childIndex,node=task.componentStack,childIndex=task.debugTask,pushComponentStack(task),retryNode(request,task),task.componentStack=node,task.debugTask=childIndex)}function retryNode(request,task){var node=task.node,childIndex=task.childIndex;if(node!==null){if(typeof node==="object"){switch(node.$$typeof){case REACT_ELEMENT_TYPE:var type=node.type,key=node.key;node=node.props;var refProp=node.ref;refProp=refProp!==void 0?refProp:null;var debugTask=task.debugTask,name=getComponentNameFromType(type);key=key==null?childIndex===-1?0:childIndex:key;var keyPath=[task.keyPath,name,key];task.replay!==null?debugTask?debugTask.run(replayElement.bind(null,request,task,keyPath,name,key,childIndex,type,node,refProp,task.replay)):replayElement(request,task,keyPath,name,key,childIndex,type,node,refProp,task.replay):debugTask?debugTask.run(renderElement.bind(null,request,task,keyPath,type,node,refProp)):renderElement(request,task,keyPath,type,node,refProp);return;case REACT_PORTAL_TYPE:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case REACT_LAZY_TYPE:if(type=callLazyInitInDEV(node),request.status===12)throw null;renderNodeDestructive(request,task,type,childIndex);return}if(isArrayImpl(node)){renderChildrenArray(request,task,node,childIndex);return}if(key=getIteratorFn(node)){if(type=key.call(node)){if(validateIterable(task,node,childIndex,type,key),node=type.next(),!node.done){key=[];do key.push(node.value),node=type.next();while(!node.done);renderChildrenArray(request,task,key,childIndex)}return}}if(typeof node.then==="function")return task.thenableState=null,renderNodeDestructive(request,task,unwrapThenable(node),childIndex);if(node.$$typeof===REACT_CONTEXT_TYPE)return renderNodeDestructive(request,task,node._currentValue,childIndex);throw request=Object.prototype.toString.call(node),Error("Objects are not valid as a React child (found: "+(request==="[object Object]"?"object with keys {"+Object.keys(node).join(", ")+"}":request)+"). If you meant to render a collection of children, use an array instead.")}typeof node==="string"?(task=task.blockedSegment,task!==null&&(task.lastPushedText=pushTextInstance(task.chunks,node,request.renderState,task.lastPushedText))):typeof node==="number"||typeof node==="bigint"?(task=task.blockedSegment,task!==null&&(task.lastPushedText=pushTextInstance(task.chunks,""+node,request.renderState,task.lastPushedText))):(typeof node==="function"&&(request=node.displayName||node.name||"Component",console.error("Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",request,request)),typeof node==="symbol"&&console.error(`Symbols are not valid as a React child.
|
|
1479
|
+
%s`,String(node)))}}function warnForMissingKey(request,task,child){if(child!==null&&typeof child==="object"&&(child.$$typeof===REACT_ELEMENT_TYPE||child.$$typeof===REACT_PORTAL_TYPE)&&child._store&&(!child._store.validated&&child.key==null||child._store.validated===2)){if(typeof child._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");child._store.validated=1;var didWarnForKey=request.didWarnForKey;if(didWarnForKey==null&&(didWarnForKey=request.didWarnForKey=new WeakSet),request=task.componentStack,request!==null&&!didWarnForKey.has(request)){didWarnForKey.add(request);var componentName=getComponentNameFromType(child.type);didWarnForKey=child._owner;var parentOwner=request.owner;if(request="",parentOwner&&typeof parentOwner.type<"u"){var name=getComponentNameFromType(parentOwner.type);name&&(request=`
|
|
1480
|
+
|
|
1481
|
+
Check the render method of \``+name+"`.")}request||componentName&&(request=`
|
|
1482
|
+
|
|
1483
|
+
Check the top-level render call using <`+componentName+">."),componentName="",didWarnForKey!=null&&parentOwner!==didWarnForKey&&(parentOwner=null,typeof didWarnForKey.type<"u"?parentOwner=getComponentNameFromType(didWarnForKey.type):typeof didWarnForKey.name==="string"&&(parentOwner=didWarnForKey.name),parentOwner&&(componentName=" It was passed a child from "+parentOwner+".")),didWarnForKey=task.componentStack,task.componentStack={parent:task.componentStack,type:child.type,owner:child._owner,stack:child._debugStack},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',request,componentName),task.componentStack=didWarnForKey}}}function renderChildrenArray(request,task,children,childIndex){var{keyPath:prevKeyPath,componentStack:previousComponentStack,debugTask:previousDebugTask}=task;if(pushServerComponentStack(task,task.node._debugInfo),childIndex!==-1&&(task.keyPath=[task.keyPath,"Fragment",childIndex],task.replay!==null)){for(var replay=task.replay,replayNodes=replay.nodes,j=0;j<replayNodes.length;j++){var node=replayNodes[j];if(node[1]===childIndex){childIndex=node[2],node=node[3],task.replay={nodes:childIndex,slots:node,pendingTasks:1};try{if(renderChildrenArray(request,task,children,-1),task.replay.pendingTasks===1&&0<task.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");task.replay.pendingTasks--}catch(x){if(typeof x==="object"&&x!==null&&(x===SuspenseException||typeof x.then==="function"))throw x;task.replay.pendingTasks--;var thrownInfo=getThrownInfo(task.componentStack);children=task.blockedBoundary;var error=x,resumeSlots=node;node=logRecoverableError(request,error,thrownInfo,task.debugTask),abortRemainingReplayNodes(request,children,childIndex,resumeSlots,error,node,thrownInfo,!1)}task.replay=replay,replayNodes.splice(j,1);break}}task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask;return}if(replay=task.treeContext,replayNodes=children.length,task.replay!==null&&(j=task.replay.slots,j!==null&&typeof j==="object")){for(childIndex=0;childIndex<replayNodes;childIndex++)node=children[childIndex],task.treeContext=pushTreeContext(replay,replayNodes,childIndex),error=j[childIndex],typeof error==="number"?(resumeNode(request,task,error,node,childIndex),delete j[childIndex]):renderNode(request,task,node,childIndex);task.treeContext=replay,task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask;return}for(j=0;j<replayNodes;j++)childIndex=children[j],warnForMissingKey(request,task,childIndex),task.treeContext=pushTreeContext(replay,replayNodes,j),renderNode(request,task,childIndex,j);task.treeContext=replay,task.keyPath=prevKeyPath,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask}function trackPostponedBoundary(request,trackedPostpones,boundary){if(boundary.status=POSTPONED,boundary.rootSegmentID=request.nextSegmentId++,request=boundary.trackedContentKeyPath,request===null)throw Error("It should not be possible to postpone at the root. This is a bug in React.");var fallbackReplayNode=boundary.trackedFallbackNode,children=[],boundaryNode=trackedPostpones.workingMap.get(request);if(boundaryNode===void 0)return boundary=[request[1],request[2],children,null,fallbackReplayNode,boundary.rootSegmentID],trackedPostpones.workingMap.set(request,boundary),addToReplayParent(boundary,request[0],trackedPostpones),boundary;return boundaryNode[4]=fallbackReplayNode,boundaryNode[5]=boundary.rootSegmentID,boundaryNode}function trackPostpone(request,trackedPostpones,task,segment){segment.status=POSTPONED;var keyPath=task.keyPath,boundary=task.blockedBoundary;if(boundary===null)segment.id=request.nextSegmentId++,trackedPostpones.rootSlots=segment.id,request.completedRootSegment!==null&&(request.completedRootSegment.status=POSTPONED);else{if(boundary!==null&&boundary.status===PENDING){var boundaryNode=trackPostponedBoundary(request,trackedPostpones,boundary);if(boundary.trackedContentKeyPath===keyPath&&task.childIndex===-1){segment.id===-1&&(segment.id=segment.parentFlushed?boundary.rootSegmentID:request.nextSegmentId++),boundaryNode[3]=segment.id;return}}if(segment.id===-1&&(segment.id=segment.parentFlushed&&boundary!==null?boundary.rootSegmentID:request.nextSegmentId++),task.childIndex===-1)keyPath===null?trackedPostpones.rootSlots=segment.id:(task=trackedPostpones.workingMap.get(keyPath),task===void 0?(task=[keyPath[1],keyPath[2],[],segment.id],addToReplayParent(task,keyPath[0],trackedPostpones)):task[3]=segment.id);else{if(keyPath===null){if(request=trackedPostpones.rootSlots,request===null)request=trackedPostpones.rootSlots={};else if(typeof request==="number")throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.")}else if(boundary=trackedPostpones.workingMap,boundaryNode=boundary.get(keyPath),boundaryNode===void 0)request={},boundaryNode=[keyPath[1],keyPath[2],[],request],boundary.set(keyPath,boundaryNode),addToReplayParent(boundaryNode,keyPath[0],trackedPostpones);else if(request=boundaryNode[3],request===null)request=boundaryNode[3]={};else if(typeof request==="number")throw Error("It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.");request[task.childIndex]=segment.id}}}function untrackBoundary(request,boundary){request=request.trackedPostpones,request!==null&&(boundary=boundary.trackedContentKeyPath,boundary!==null&&(boundary=request.workingMap.get(boundary),boundary!==void 0&&(boundary.length=4,boundary[2]=[],boundary[3]=null)))}function spawnNewSuspendedReplayTask(request,task,thenableState){return createReplayTask(request,thenableState,task.replay,task.node,task.childIndex,task.blockedBoundary,task.hoistableState,task.abortSet,task.keyPath,task.formatContext,task.context,task.treeContext,task.row,task.componentStack,emptyContextObject,task.debugTask)}function spawnNewSuspendedRenderTask(request,task,thenableState){var segment=task.blockedSegment,newSegment=createPendingSegment(request,segment.chunks.length,null,task.formatContext,segment.lastPushedText,!0);return segment.children.push(newSegment),segment.lastPushedText=!1,createRenderTask(request,thenableState,task.node,task.childIndex,task.blockedBoundary,newSegment,task.blockedPreamble,task.hoistableState,task.abortSet,task.keyPath,task.formatContext,task.context,task.treeContext,task.row,task.componentStack,emptyContextObject,task.debugTask)}function renderNode(request,task,node,childIndex){var{formatContext:previousFormatContext,context:previousContext,keyPath:previousKeyPath,treeContext:previousTreeContext,componentStack:previousComponentStack,debugTask:previousDebugTask,blockedSegment:segment}=task;if(segment===null){segment=task.replay;try{return renderNodeDestructive(request,task,node,childIndex)}catch(thrownValue){if(resetHooksState(),node=thrownValue===SuspenseException?getSuspendedThenable():thrownValue,request.status!==12&&typeof node==="object"&&node!==null){if(typeof node.then==="function"){childIndex=thrownValue===SuspenseException?getThenableStateAfterSuspending():null,request=spawnNewSuspendedReplayTask(request,task,childIndex).ping,node.then(request,request),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.replay=segment,task.debugTask=previousDebugTask,switchContext(previousContext);return}if(node.message==="Maximum call stack size exceeded"){node=thrownValue===SuspenseException?getThenableStateAfterSuspending():null,node=spawnNewSuspendedReplayTask(request,task,node),request.pingedTasks.push(node),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.replay=segment,task.debugTask=previousDebugTask,switchContext(previousContext);return}}}}else{var childrenLength=segment.children.length,chunkLength=segment.chunks.length;try{return renderNodeDestructive(request,task,node,childIndex)}catch(thrownValue$3){if(resetHooksState(),segment.children.length=childrenLength,segment.chunks.length=chunkLength,node=thrownValue$3===SuspenseException?getSuspendedThenable():thrownValue$3,request.status!==12&&typeof node==="object"&&node!==null){if(typeof node.then==="function"){segment=node,node=thrownValue$3===SuspenseException?getThenableStateAfterSuspending():null,request=spawnNewSuspendedRenderTask(request,task,node).ping,segment.then(request,request),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask,switchContext(previousContext);return}if(node.message==="Maximum call stack size exceeded"){segment=thrownValue$3===SuspenseException?getThenableStateAfterSuspending():null,segment=spawnNewSuspendedRenderTask(request,task,segment),request.pingedTasks.push(segment),task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,task.componentStack=previousComponentStack,task.debugTask=previousDebugTask,switchContext(previousContext);return}}}}throw task.formatContext=previousFormatContext,task.context=previousContext,task.keyPath=previousKeyPath,task.treeContext=previousTreeContext,switchContext(previousContext),node}function abortTaskSoft(task){var{blockedBoundary:boundary,blockedSegment:segment}=task;segment!==null&&(segment.status=ABORTED,finishedTask(this,boundary,task.row,segment))}function abortRemainingReplayNodes(request$jscomp$0,boundary,nodes,slots,error$jscomp$0,errorDigest$jscomp$0,errorInfo$jscomp$0,aborted){for(var i=0;i<nodes.length;i++){var node=nodes[i];if(node.length===4)abortRemainingReplayNodes(request$jscomp$0,boundary,node[2],node[3],error$jscomp$0,errorDigest$jscomp$0,errorInfo$jscomp$0,aborted);else{var request=request$jscomp$0;node=node[5];var error=error$jscomp$0,errorDigest=errorDigest$jscomp$0,errorInfo=errorInfo$jscomp$0,wasAborted=aborted,resumedBoundary=createSuspenseBoundary(request,null,new Set,null,null);resumedBoundary.parentFlushed=!0,resumedBoundary.rootSegmentID=node,resumedBoundary.status=CLIENT_RENDERED,encodeErrorForBoundary(resumedBoundary,errorDigest,error,errorInfo,wasAborted),resumedBoundary.parentFlushed&&request.clientRenderedBoundaries.push(resumedBoundary)}}if(nodes.length=0,slots!==null){if(boundary===null)throw Error("We should not have any resumable nodes in the shell. This is a bug in React.");if(boundary.status!==CLIENT_RENDERED&&(boundary.status=CLIENT_RENDERED,encodeErrorForBoundary(boundary,errorDigest$jscomp$0,error$jscomp$0,errorInfo$jscomp$0,aborted),boundary.parentFlushed&&request$jscomp$0.clientRenderedBoundaries.push(boundary)),typeof slots==="object")for(var index in slots)delete slots[index]}}function abortTask(task,request,error){var boundary=task.blockedBoundary,segment=task.blockedSegment;if(segment!==null){if(segment.status===6)return;segment.status=ABORTED}var errorInfo=getThrownInfo(task.componentStack),node=task.node;if(node!==null&&typeof node==="object"&&pushHaltedAwaitOnComponentStack(task,node._debugInfo),boundary===null){if(request.status!==13&&request.status!==CLOSED){if(boundary=task.replay,boundary===null){request.trackedPostpones!==null&&segment!==null?(boundary=request.trackedPostpones,logRecoverableError(request,error,errorInfo,task.debugTask),trackPostpone(request,boundary,task,segment),finishedTask(request,null,task.row,segment)):(logRecoverableError(request,error,errorInfo,task.debugTask),fatalError(request,error,errorInfo,task.debugTask));return}boundary.pendingTasks--,boundary.pendingTasks===0&&0<boundary.nodes.length&&(segment=logRecoverableError(request,error,errorInfo,null),abortRemainingReplayNodes(request,null,boundary.nodes,boundary.slots,error,segment,errorInfo,!0)),request.pendingRootTasks--,request.pendingRootTasks===0&&completeShell(request)}}else{if(node=request.trackedPostpones,boundary.status!==CLIENT_RENDERED){if(node!==null&&segment!==null)return logRecoverableError(request,error,errorInfo,task.debugTask),trackPostpone(request,node,task,segment),boundary.fallbackAbortableTasks.forEach(function(fallbackTask){return abortTask(fallbackTask,request,error)}),boundary.fallbackAbortableTasks.clear(),finishedTask(request,boundary,task.row,segment);boundary.status=CLIENT_RENDERED,segment=logRecoverableError(request,error,errorInfo,task.debugTask),boundary.status=CLIENT_RENDERED,encodeErrorForBoundary(boundary,segment,error,errorInfo,!0),untrackBoundary(request,boundary),boundary.parentFlushed&&request.clientRenderedBoundaries.push(boundary)}boundary.pendingTasks--,errorInfo=boundary.row,errorInfo!==null&&--errorInfo.pendingTasks===0&&finishSuspenseListRow(request,errorInfo),boundary.fallbackAbortableTasks.forEach(function(fallbackTask){return abortTask(fallbackTask,request,error)}),boundary.fallbackAbortableTasks.clear()}task=task.row,task!==null&&--task.pendingTasks===0&&finishSuspenseListRow(request,task),request.allPendingTasks--,request.allPendingTasks===0&&completeAll(request)}function safelyEmitEarlyPreloads(request,shellComplete){try{var renderState=request.renderState,onHeaders=renderState.onHeaders;if(onHeaders){var headers=renderState.headers;if(headers){renderState.headers=null;var linkHeader=headers.preconnects;if(headers.fontPreloads&&(linkHeader&&(linkHeader+=", "),linkHeader+=headers.fontPreloads),headers.highImagePreloads&&(linkHeader&&(linkHeader+=", "),linkHeader+=headers.highImagePreloads),!shellComplete){var queueIter=renderState.styles.values(),queueStep=queueIter.next();b:for(;0<headers.remainingCapacity&&!queueStep.done;queueStep=queueIter.next())for(var sheetIter=queueStep.value.sheets.values(),sheetStep=sheetIter.next();0<headers.remainingCapacity&&!sheetStep.done;sheetStep=sheetIter.next()){var sheet=sheetStep.value,props=sheet.props,key=props.href,props$jscomp$0=sheet.props,header=getPreloadAsHeader(props$jscomp$0.href,"style",{crossOrigin:props$jscomp$0.crossOrigin,integrity:props$jscomp$0.integrity,nonce:props$jscomp$0.nonce,type:props$jscomp$0.type,fetchPriority:props$jscomp$0.fetchPriority,referrerPolicy:props$jscomp$0.referrerPolicy,media:props$jscomp$0.media});if(0<=(headers.remainingCapacity-=header.length+2))renderState.resets.style[key]=PRELOAD_NO_CREDS,linkHeader&&(linkHeader+=", "),linkHeader+=header,renderState.resets.style[key]=typeof props.crossOrigin==="string"||typeof props.integrity==="string"?[props.crossOrigin,props.integrity]:PRELOAD_NO_CREDS;else break b}}linkHeader?onHeaders({Link:linkHeader}):onHeaders({})}}}catch(error){logRecoverableError(request,error,{},null)}}function completeShell(request){request.trackedPostpones===null&&safelyEmitEarlyPreloads(request,!0),request.trackedPostpones===null&&preparePreamble(request),request.onShellError=noop,request=request.onShellReady,request()}function completeAll(request){safelyEmitEarlyPreloads(request,request.trackedPostpones===null?!0:request.completedRootSegment===null||request.completedRootSegment.status!==POSTPONED),preparePreamble(request),request=request.onAllReady,request()}function queueCompletedSegment(boundary,segment){if(segment.chunks.length===0&&segment.children.length===1&&segment.children[0].boundary===null&&segment.children[0].id===-1){var childSegment=segment.children[0];childSegment.id=segment.id,childSegment.parentFlushed=!0,childSegment.status!==COMPLETED&&childSegment.status!==ABORTED&&childSegment.status!==ERRORED||queueCompletedSegment(boundary,childSegment)}else boundary.completedSegments.push(segment)}function finishedSegment(request,boundary,segment){if(byteLengthOfChunk!==null){segment=segment.chunks;for(var segmentByteSize=0,i=0;i<segment.length;i++)segmentByteSize+=byteLengthOfChunk(segment[i]);boundary===null?request.byteSize+=segmentByteSize:boundary.byteSize+=segmentByteSize}}function finishedTask(request,boundary,row,segment){if(row!==null&&(--row.pendingTasks===0?finishSuspenseListRow(request,row):row.together&&tryToResolveTogetherRow(request,row)),request.allPendingTasks--,boundary===null){if(segment!==null&&segment.parentFlushed){if(request.completedRootSegment!==null)throw Error("There can only be one root segment. This is a bug in React.");request.completedRootSegment=segment}request.pendingRootTasks--,request.pendingRootTasks===0&&completeShell(request)}else if(boundary.pendingTasks--,boundary.status!==CLIENT_RENDERED)if(boundary.pendingTasks===0){if(boundary.status===PENDING&&(boundary.status=COMPLETED),segment!==null&&segment.parentFlushed&&(segment.status===COMPLETED||segment.status===ABORTED)&&queueCompletedSegment(boundary,segment),boundary.parentFlushed&&request.completedBoundaries.push(boundary),boundary.status===COMPLETED)row=boundary.row,row!==null&&hoistHoistables(row.hoistables,boundary.contentState),isEligibleForOutlining(request,boundary)||(boundary.fallbackAbortableTasks.forEach(abortTaskSoft,request),boundary.fallbackAbortableTasks.clear(),row!==null&&--row.pendingTasks===0&&finishSuspenseListRow(request,row)),request.pendingRootTasks===0&&request.trackedPostpones===null&&boundary.contentPreamble!==null&&preparePreamble(request);else if(boundary.status===POSTPONED&&(boundary=boundary.row,boundary!==null)){if(request.trackedPostpones!==null){row=request.trackedPostpones;var postponedRow=boundary.next;if(postponedRow!==null&&(segment=postponedRow.boundaries,segment!==null))for(postponedRow.boundaries=null,postponedRow=0;postponedRow<segment.length;postponedRow++){var postponedBoundary=segment[postponedRow];trackPostponedBoundary(request,row,postponedBoundary),finishedTask(request,postponedBoundary,null,null)}}--boundary.pendingTasks===0&&finishSuspenseListRow(request,boundary)}}else segment===null||!segment.parentFlushed||segment.status!==COMPLETED&&segment.status!==ABORTED||(queueCompletedSegment(boundary,segment),boundary.completedSegments.length===1&&boundary.parentFlushed&&request.partialBoundaries.push(boundary)),boundary=boundary.row,boundary!==null&&boundary.together&&tryToResolveTogetherRow(request,boundary);request.allPendingTasks===0&&completeAll(request)}function performWork(request$jscomp$2){if(request$jscomp$2.status!==CLOSED&&request$jscomp$2.status!==13){var prevContext=currentActiveSnapshot,prevDispatcher=ReactSharedInternals.H;ReactSharedInternals.H=HooksDispatcher;var prevAsyncDispatcher=ReactSharedInternals.A;ReactSharedInternals.A=DefaultAsyncDispatcher;var prevRequest=currentRequest;currentRequest=request$jscomp$2;var prevGetCurrentStackImpl=ReactSharedInternals.getCurrentStack;ReactSharedInternals.getCurrentStack=getCurrentStackInDEV;var prevResumableState=currentResumableState;currentResumableState=request$jscomp$2.resumableState;try{var pingedTasks=request$jscomp$2.pingedTasks,i;for(i=0;i<pingedTasks.length;i++){var request=request$jscomp$2,task=pingedTasks[i],segment=task.blockedSegment;if(segment===null){var prevTaskInDEV=void 0,request$jscomp$0=request;if(request=task,request.replay.pendingTasks!==0){switchContext(request.context),prevTaskInDEV=currentTaskInDEV,currentTaskInDEV=request;try{if(typeof request.replay.slots==="number"?resumeNode(request$jscomp$0,request,request.replay.slots,request.node,request.childIndex):retryNode(request$jscomp$0,request),request.replay.pendingTasks===1&&0<request.replay.nodes.length)throw Error("Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.");request.replay.pendingTasks--,request.abortSet.delete(request),finishedTask(request$jscomp$0,request.blockedBoundary,request.row,null)}catch(thrownValue){resetHooksState();var x=thrownValue===SuspenseException?getSuspendedThenable():thrownValue;if(typeof x==="object"&&x!==null&&typeof x.then==="function"){var ping=request.ping;x.then(ping,ping),request.thenableState=thrownValue===SuspenseException?getThenableStateAfterSuspending():null}else{request.replay.pendingTasks--,request.abortSet.delete(request);var errorInfo=getThrownInfo(request.componentStack),errorDigest=void 0,request$jscomp$1=request$jscomp$0,boundary=request.blockedBoundary,error$jscomp$0=request$jscomp$0.status===12?request$jscomp$0.fatalError:x,errorInfo$jscomp$0=errorInfo,replayNodes=request.replay.nodes,resumeSlots=request.replay.slots;errorDigest=logRecoverableError(request$jscomp$1,error$jscomp$0,errorInfo$jscomp$0,request.debugTask),abortRemainingReplayNodes(request$jscomp$1,boundary,replayNodes,resumeSlots,error$jscomp$0,errorDigest,errorInfo$jscomp$0,!1),request$jscomp$0.pendingRootTasks--,request$jscomp$0.pendingRootTasks===0&&completeShell(request$jscomp$0),request$jscomp$0.allPendingTasks--,request$jscomp$0.allPendingTasks===0&&completeAll(request$jscomp$0)}}finally{currentTaskInDEV=prevTaskInDEV}}}else if(request$jscomp$0=prevTaskInDEV=void 0,errorDigest=task,request$jscomp$1=segment,request$jscomp$1.status===PENDING){request$jscomp$1.status=6,switchContext(errorDigest.context),request$jscomp$0=currentTaskInDEV,currentTaskInDEV=errorDigest;var childrenLength=request$jscomp$1.children.length,chunkLength=request$jscomp$1.chunks.length;try{retryNode(request,errorDigest),pushSegmentFinale(request$jscomp$1.chunks,request.renderState,request$jscomp$1.lastPushedText,request$jscomp$1.textEmbedded),errorDigest.abortSet.delete(errorDigest),request$jscomp$1.status=COMPLETED,finishedSegment(request,errorDigest.blockedBoundary,request$jscomp$1),finishedTask(request,errorDigest.blockedBoundary,errorDigest.row,request$jscomp$1)}catch(thrownValue){resetHooksState(),request$jscomp$1.children.length=childrenLength,request$jscomp$1.chunks.length=chunkLength;var x$jscomp$0=thrownValue===SuspenseException?getSuspendedThenable():request.status===12?request.fatalError:thrownValue;if(request.status===12&&request.trackedPostpones!==null){var trackedPostpones=request.trackedPostpones,thrownInfo=getThrownInfo(errorDigest.componentStack);errorDigest.abortSet.delete(errorDigest),logRecoverableError(request,x$jscomp$0,thrownInfo,errorDigest.debugTask),trackPostpone(request,trackedPostpones,errorDigest,request$jscomp$1),finishedTask(request,errorDigest.blockedBoundary,errorDigest.row,request$jscomp$1)}else if(typeof x$jscomp$0==="object"&&x$jscomp$0!==null&&typeof x$jscomp$0.then==="function"){request$jscomp$1.status=PENDING,errorDigest.thenableState=thrownValue===SuspenseException?getThenableStateAfterSuspending():null;var ping$jscomp$0=errorDigest.ping;x$jscomp$0.then(ping$jscomp$0,ping$jscomp$0)}else{var errorInfo$jscomp$1=getThrownInfo(errorDigest.componentStack);errorDigest.abortSet.delete(errorDigest),request$jscomp$1.status=ERRORED;var boundary$jscomp$0=errorDigest.blockedBoundary,row=errorDigest.row,debugTask=errorDigest.debugTask;if(row!==null&&--row.pendingTasks===0&&finishSuspenseListRow(request,row),request.allPendingTasks--,prevTaskInDEV=logRecoverableError(request,x$jscomp$0,errorInfo$jscomp$1,debugTask),boundary$jscomp$0===null)fatalError(request,x$jscomp$0,errorInfo$jscomp$1,debugTask);else if(boundary$jscomp$0.pendingTasks--,boundary$jscomp$0.status!==CLIENT_RENDERED){boundary$jscomp$0.status=CLIENT_RENDERED,encodeErrorForBoundary(boundary$jscomp$0,prevTaskInDEV,x$jscomp$0,errorInfo$jscomp$1,!1),untrackBoundary(request,boundary$jscomp$0);var boundaryRow=boundary$jscomp$0.row;boundaryRow!==null&&--boundaryRow.pendingTasks===0&&finishSuspenseListRow(request,boundaryRow),boundary$jscomp$0.parentFlushed&&request.clientRenderedBoundaries.push(boundary$jscomp$0),request.pendingRootTasks===0&&request.trackedPostpones===null&&boundary$jscomp$0.contentPreamble!==null&&preparePreamble(request)}request.allPendingTasks===0&&completeAll(request)}}finally{currentTaskInDEV=request$jscomp$0}}}pingedTasks.splice(0,i),request$jscomp$2.destination!==null&&flushCompletedQueues(request$jscomp$2,request$jscomp$2.destination)}catch(error){pingedTasks={},logRecoverableError(request$jscomp$2,error,pingedTasks,null),fatalError(request$jscomp$2,error,pingedTasks,null)}finally{currentResumableState=prevResumableState,ReactSharedInternals.H=prevDispatcher,ReactSharedInternals.A=prevAsyncDispatcher,ReactSharedInternals.getCurrentStack=prevGetCurrentStackImpl,prevDispatcher===HooksDispatcher&&switchContext(prevContext),currentRequest=prevRequest}}}function preparePreambleFromSubtree(request,segment,collectedPreambleSegments){segment.preambleChildren.length&&collectedPreambleSegments.push(segment.preambleChildren);for(var pendingPreambles=!1,i=0;i<segment.children.length;i++)pendingPreambles=preparePreambleFromSegment(request,segment.children[i],collectedPreambleSegments)||pendingPreambles;return pendingPreambles}function preparePreambleFromSegment(request,segment,collectedPreambleSegments){var boundary=segment.boundary;if(boundary===null)return preparePreambleFromSubtree(request,segment,collectedPreambleSegments);var{contentPreamble:preamble,fallbackPreamble}=boundary;if(preamble===null||fallbackPreamble===null)return!1;switch(boundary.status){case COMPLETED:if(hoistPreambleState(request.renderState,preamble),request.byteSize+=boundary.byteSize,segment=boundary.completedSegments[0],!segment)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");return preparePreambleFromSubtree(request,segment,collectedPreambleSegments);case POSTPONED:if(request.trackedPostpones!==null)return!0;case CLIENT_RENDERED:if(segment.status===COMPLETED)return hoistPreambleState(request.renderState,fallbackPreamble),preparePreambleFromSubtree(request,segment,collectedPreambleSegments);default:return!0}}function preparePreamble(request){if(request.completedRootSegment&&request.completedPreambleSegments===null){var collectedPreambleSegments=[],originalRequestByteSize=request.byteSize,hasPendingPreambles=preparePreambleFromSegment(request,request.completedRootSegment,collectedPreambleSegments),preamble=request.renderState.preamble;hasPendingPreambles===!1||preamble.headChunks&&preamble.bodyChunks?request.completedPreambleSegments=collectedPreambleSegments:request.byteSize=originalRequestByteSize}}function flushSubtree(request,destination,segment,hoistableState){switch(segment.parentFlushed=!0,segment.status){case PENDING:segment.id=request.nextSegmentId++;case POSTPONED:return hoistableState=segment.id,segment.lastPushedText=!1,segment.textEmbedded=!1,request=request.renderState,writeChunk(destination,placeholder1),writeChunk(destination,request.placeholderPrefix),request=hoistableState.toString(16),writeChunk(destination,request),!!destination.write(placeholder2);case COMPLETED:segment.status=FLUSHED;var r=!0,chunks=segment.chunks,chunkIdx=0;segment=segment.children;for(var childIdx=0;childIdx<segment.length;childIdx++){for(r=segment[childIdx];chunkIdx<r.index;chunkIdx++)writeChunk(destination,chunks[chunkIdx]);r=flushSegment(request,destination,r,hoistableState)}for(;chunkIdx<chunks.length-1;chunkIdx++)writeChunk(destination,chunks[chunkIdx]);return chunkIdx<chunks.length&&(r=!!destination.write(chunks[chunkIdx])),r;case ABORTED:return!0;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}var flushedByteSize=0;function flushSegment(request,destination,segment,hoistableState){var boundary=segment.boundary;if(boundary===null)return flushSubtree(request,destination,segment,hoistableState);if(boundary.parentFlushed=!0,boundary.status===CLIENT_RENDERED){var row=boundary.row;row!==null&&--row.pendingTasks===0&&finishSuspenseListRow(request,row),row=boundary.errorDigest;var errorMessage=boundary.errorMessage,errorStack=boundary.errorStack;boundary=boundary.errorComponentStack,destination.write(startClientRenderedSuspenseBoundary),writeChunk(destination,clientRenderedSuspenseBoundaryError1),row&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1A),writeChunk(destination,escapeTextForBrowser(row)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),errorMessage&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1B),writeChunk(destination,escapeTextForBrowser(errorMessage)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),errorStack&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1C),writeChunk(destination,escapeTextForBrowser(errorStack)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),boundary&&(writeChunk(destination,clientRenderedSuspenseBoundaryError1D),writeChunk(destination,escapeTextForBrowser(boundary)),writeChunk(destination,clientRenderedSuspenseBoundaryErrorAttrInterstitial)),destination.write(clientRenderedSuspenseBoundaryError2),flushSubtree(request,destination,segment,hoistableState)}else if(boundary.status!==COMPLETED)boundary.status===PENDING&&(boundary.rootSegmentID=request.nextSegmentId++),0<boundary.completedSegments.length&&request.partialBoundaries.push(boundary),writeStartPendingSuspenseBoundary(destination,request.renderState,boundary.rootSegmentID),hoistableState&&hoistHoistables(hoistableState,boundary.fallbackState),flushSubtree(request,destination,segment,hoistableState);else if(!flushingPartialBoundaries&&isEligibleForOutlining(request,boundary)&&(flushedByteSize+boundary.byteSize>request.progressiveChunkSize||hasSuspenseyContent(boundary.contentState)))boundary.rootSegmentID=request.nextSegmentId++,request.completedBoundaries.push(boundary),writeStartPendingSuspenseBoundary(destination,request.renderState,boundary.rootSegmentID),flushSubtree(request,destination,segment,hoistableState);else{if(flushedByteSize+=boundary.byteSize,hoistableState&&hoistHoistables(hoistableState,boundary.contentState),segment=boundary.row,segment!==null&&isEligibleForOutlining(request,boundary)&&--segment.pendingTasks===0&&finishSuspenseListRow(request,segment),destination.write(startCompletedSuspenseBoundary),segment=boundary.completedSegments,segment.length!==1)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");flushSegment(request,destination,segment[0],hoistableState)}return!!destination.write(endSuspenseBoundary)}function flushSegmentContainer(request,destination,segment,hoistableState){return writeStartSegment(destination,request.renderState,segment.parentFormatContext,segment.id),flushSegment(request,destination,segment,hoistableState),writeEndSegment(destination,segment.parentFormatContext)}function flushCompletedBoundary(request,destination,boundary){flushedByteSize=boundary.byteSize;for(var completedSegments=boundary.completedSegments,i=0;i<completedSegments.length;i++)flushPartiallyCompletedSegment(request,destination,boundary,completedSegments[i]);completedSegments.length=0,completedSegments=boundary.row,completedSegments!==null&&isEligibleForOutlining(request,boundary)&&--completedSegments.pendingTasks===0&&finishSuspenseListRow(request,completedSegments),writeHoistablesForBoundary(destination,boundary.contentState,request.renderState),completedSegments=request.resumableState,request=request.renderState,i=boundary.rootSegmentID,boundary=boundary.contentState;var requiresStyleInsertion=request.stylesToHoist;return request.stylesToHoist=!1,writeChunk(destination,request.startInlineScript),writeChunk(destination,endOfStartTag),requiresStyleInsertion?((completedSegments.instructions&SentClientRenderFunction)===NothingSent&&(completedSegments.instructions|=SentClientRenderFunction,writeChunk(destination,clientRenderScriptFunctionOnly)),(completedSegments.instructions&SentCompleteBoundaryFunction)===NothingSent&&(completedSegments.instructions|=SentCompleteBoundaryFunction,writeChunk(destination,completeBoundaryScriptFunctionOnly)),(completedSegments.instructions&SentStyleInsertionFunction)===NothingSent?(completedSegments.instructions|=SentStyleInsertionFunction,writeChunk(destination,completeBoundaryWithStylesScript1FullPartial)):writeChunk(destination,completeBoundaryWithStylesScript1Partial)):((completedSegments.instructions&SentCompleteBoundaryFunction)===NothingSent&&(completedSegments.instructions|=SentCompleteBoundaryFunction,writeChunk(destination,completeBoundaryScriptFunctionOnly)),writeChunk(destination,completeBoundaryScript1Partial)),completedSegments=i.toString(16),writeChunk(destination,request.boundaryPrefix),writeChunk(destination,completedSegments),writeChunk(destination,completeBoundaryScript2),writeChunk(destination,request.segmentPrefix),writeChunk(destination,completedSegments),requiresStyleInsertion?(writeChunk(destination,completeBoundaryScript3a),writeStyleResourceDependenciesInJS(destination,boundary)):writeChunk(destination,completeBoundaryScript3b),boundary=!!destination.write(completeBoundaryScriptEnd),writeBootstrap(destination,request)&&boundary}function flushPartiallyCompletedSegment(request,destination,boundary,segment){if(segment.status===FLUSHED)return!0;var hoistableState=boundary.contentState,segmentID=segment.id;if(segmentID===-1){if((segment.id=boundary.rootSegmentID)===-1)throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return flushSegmentContainer(request,destination,segment,hoistableState)}if(segmentID===boundary.rootSegmentID)return flushSegmentContainer(request,destination,segment,hoistableState);return flushSegmentContainer(request,destination,segment,hoistableState),boundary=request.resumableState,request=request.renderState,writeChunk(destination,request.startInlineScript),writeChunk(destination,endOfStartTag),(boundary.instructions&SentCompleteSegmentFunction)===NothingSent?(boundary.instructions|=SentCompleteSegmentFunction,writeChunk(destination,completeSegmentScript1Full)):writeChunk(destination,completeSegmentScript1Partial),writeChunk(destination,request.segmentPrefix),segmentID=segmentID.toString(16),writeChunk(destination,segmentID),writeChunk(destination,completeSegmentScript2),writeChunk(destination,request.placeholderPrefix),writeChunk(destination,segmentID),destination=!!destination.write(completeSegmentScriptEnd),destination}var flushingPartialBoundaries=!1;function flushCompletedQueues(request,destination){try{if(!(0<request.pendingRootTasks)){var i,completedRootSegment=request.completedRootSegment;if(completedRootSegment!==null){if(completedRootSegment.status===POSTPONED)return;var completedPreambleSegments=request.completedPreambleSegments;if(completedPreambleSegments===null)return;flushedByteSize=request.byteSize;var{resumableState,renderState}=request,preamble=renderState.preamble,{htmlChunks,headChunks}=preamble,i$jscomp$0;if(htmlChunks){for(i$jscomp$0=0;i$jscomp$0<htmlChunks.length;i$jscomp$0++)writeChunk(destination,htmlChunks[i$jscomp$0]);if(headChunks)for(i$jscomp$0=0;i$jscomp$0<headChunks.length;i$jscomp$0++)writeChunk(destination,headChunks[i$jscomp$0]);else writeChunk(destination,startChunkForTag("head")),writeChunk(destination,endOfStartTag)}else if(headChunks)for(i$jscomp$0=0;i$jscomp$0<headChunks.length;i$jscomp$0++)writeChunk(destination,headChunks[i$jscomp$0]);var charsetChunks=renderState.charsetChunks;for(i$jscomp$0=0;i$jscomp$0<charsetChunks.length;i$jscomp$0++)writeChunk(destination,charsetChunks[i$jscomp$0]);charsetChunks.length=0,renderState.preconnects.forEach(flushResource,destination),renderState.preconnects.clear();var viewportChunks=renderState.viewportChunks;for(i$jscomp$0=0;i$jscomp$0<viewportChunks.length;i$jscomp$0++)writeChunk(destination,viewportChunks[i$jscomp$0]);viewportChunks.length=0,renderState.fontPreloads.forEach(flushResource,destination),renderState.fontPreloads.clear(),renderState.highImagePreloads.forEach(flushResource,destination),renderState.highImagePreloads.clear(),currentlyFlushingRenderState=renderState,renderState.styles.forEach(flushStylesInPreamble,destination),currentlyFlushingRenderState=null;var importMapChunks=renderState.importMapChunks;for(i$jscomp$0=0;i$jscomp$0<importMapChunks.length;i$jscomp$0++)writeChunk(destination,importMapChunks[i$jscomp$0]);importMapChunks.length=0,renderState.bootstrapScripts.forEach(flushResource,destination),renderState.scripts.forEach(flushResource,destination),renderState.scripts.clear(),renderState.bulkPreloads.forEach(flushResource,destination),renderState.bulkPreloads.clear(),htmlChunks||headChunks||(resumableState.instructions|=SentCompletedShellId);var hoistableChunks=renderState.hoistableChunks;for(i$jscomp$0=0;i$jscomp$0<hoistableChunks.length;i$jscomp$0++)writeChunk(destination,hoistableChunks[i$jscomp$0]);for(resumableState=hoistableChunks.length=0;resumableState<completedPreambleSegments.length;resumableState++){var segments=completedPreambleSegments[resumableState];for(renderState=0;renderState<segments.length;renderState++)flushSegment(request,destination,segments[renderState],null)}var preamble$jscomp$0=request.renderState.preamble,headChunks$jscomp$0=preamble$jscomp$0.headChunks;(preamble$jscomp$0.htmlChunks||headChunks$jscomp$0)&&writeChunk(destination,endChunkForTag("head"));var bodyChunks=preamble$jscomp$0.bodyChunks;if(bodyChunks)for(completedPreambleSegments=0;completedPreambleSegments<bodyChunks.length;completedPreambleSegments++)writeChunk(destination,bodyChunks[completedPreambleSegments]);flushSegment(request,destination,completedRootSegment,null),request.completedRootSegment=null;var renderState$jscomp$0=request.renderState;if(request.allPendingTasks!==0||request.clientRenderedBoundaries.length!==0||request.completedBoundaries.length!==0||request.trackedPostpones!==null&&(request.trackedPostpones.rootNodes.length!==0||request.trackedPostpones.rootSlots!==null)){var resumableState$jscomp$0=request.resumableState;if((resumableState$jscomp$0.instructions&SentMarkShellTime)===NothingSent){if(resumableState$jscomp$0.instructions|=SentMarkShellTime,writeChunk(destination,renderState$jscomp$0.startInlineScript),(resumableState$jscomp$0.instructions&SentCompletedShellId)===NothingSent){resumableState$jscomp$0.instructions|=SentCompletedShellId;var shellId="_"+resumableState$jscomp$0.idPrefix+"R_";writeChunk(destination,completedShellIdAttributeStart),writeChunk(destination,escapeTextForBrowser(shellId)),writeChunk(destination,attributeEnd)}writeChunk(destination,endOfStartTag),writeChunk(destination,shellTimeRuntimeScript),destination.write(endInlineScript)}}writeBootstrap(destination,renderState$jscomp$0)}var renderState$jscomp$1=request.renderState;completedRootSegment=0;var viewportChunks$jscomp$0=renderState$jscomp$1.viewportChunks;for(completedRootSegment=0;completedRootSegment<viewportChunks$jscomp$0.length;completedRootSegment++)writeChunk(destination,viewportChunks$jscomp$0[completedRootSegment]);viewportChunks$jscomp$0.length=0,renderState$jscomp$1.preconnects.forEach(flushResource,destination),renderState$jscomp$1.preconnects.clear(),renderState$jscomp$1.fontPreloads.forEach(flushResource,destination),renderState$jscomp$1.fontPreloads.clear(),renderState$jscomp$1.highImagePreloads.forEach(flushResource,destination),renderState$jscomp$1.highImagePreloads.clear(),renderState$jscomp$1.styles.forEach(preloadLateStyles,destination),renderState$jscomp$1.scripts.forEach(flushResource,destination),renderState$jscomp$1.scripts.clear(),renderState$jscomp$1.bulkPreloads.forEach(flushResource,destination),renderState$jscomp$1.bulkPreloads.clear();var hoistableChunks$jscomp$0=renderState$jscomp$1.hoistableChunks;for(completedRootSegment=0;completedRootSegment<hoistableChunks$jscomp$0.length;completedRootSegment++)writeChunk(destination,hoistableChunks$jscomp$0[completedRootSegment]);hoistableChunks$jscomp$0.length=0;var clientRenderedBoundaries=request.clientRenderedBoundaries;for(i=0;i<clientRenderedBoundaries.length;i++){var boundary=clientRenderedBoundaries[i];renderState$jscomp$1=destination;var{resumableState:resumableState$jscomp$1,renderState:renderState$jscomp$2}=request,id=boundary.rootSegmentID,errorDigest=boundary.errorDigest,errorMessage=boundary.errorMessage,errorStack=boundary.errorStack,errorComponentStack=boundary.errorComponentStack;if(writeChunk(renderState$jscomp$1,renderState$jscomp$2.startInlineScript),writeChunk(renderState$jscomp$1,endOfStartTag),(resumableState$jscomp$1.instructions&SentClientRenderFunction)===NothingSent?(resumableState$jscomp$1.instructions|=SentClientRenderFunction,writeChunk(renderState$jscomp$1,clientRenderScript1Full)):writeChunk(renderState$jscomp$1,clientRenderScript1Partial),writeChunk(renderState$jscomp$1,renderState$jscomp$2.boundaryPrefix),writeChunk(renderState$jscomp$1,id.toString(16)),writeChunk(renderState$jscomp$1,clientRenderScript1A),errorDigest||errorMessage||errorStack||errorComponentStack)writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorDigest||""));if(errorMessage||errorStack||errorComponentStack)writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorMessage||""));if(errorStack||errorComponentStack)writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorStack||""));errorComponentStack&&(writeChunk(renderState$jscomp$1,clientRenderErrorScriptArgInterstitial),writeChunk(renderState$jscomp$1,escapeJSStringsForInstructionScripts(errorComponentStack)));var JSCompiler_inline_result=!!renderState$jscomp$1.write(clientRenderScriptEnd);if(!JSCompiler_inline_result){request.destination=null,i++,clientRenderedBoundaries.splice(0,i);return}}clientRenderedBoundaries.splice(0,i);var completedBoundaries=request.completedBoundaries;for(i=0;i<completedBoundaries.length;i++)if(!flushCompletedBoundary(request,destination,completedBoundaries[i])){request.destination=null,i++,completedBoundaries.splice(0,i);return}completedBoundaries.splice(0,i),flushingPartialBoundaries=!0;var partialBoundaries=request.partialBoundaries;for(i=0;i<partialBoundaries.length;i++){a:{clientRenderedBoundaries=request,boundary=destination;var boundary$jscomp$0=partialBoundaries[i];flushedByteSize=boundary$jscomp$0.byteSize;var completedSegments=boundary$jscomp$0.completedSegments;for(JSCompiler_inline_result=0;JSCompiler_inline_result<completedSegments.length;JSCompiler_inline_result++)if(!flushPartiallyCompletedSegment(clientRenderedBoundaries,boundary,boundary$jscomp$0,completedSegments[JSCompiler_inline_result])){JSCompiler_inline_result++,completedSegments.splice(0,JSCompiler_inline_result);var JSCompiler_inline_result$jscomp$0=!1;break a}completedSegments.splice(0,JSCompiler_inline_result);var row=boundary$jscomp$0.row;row!==null&&row.together&&boundary$jscomp$0.pendingTasks===1&&(row.pendingTasks===1?unblockSuspenseListRow(clientRenderedBoundaries,row,row.hoistables):row.pendingTasks--),JSCompiler_inline_result$jscomp$0=writeHoistablesForBoundary(boundary,boundary$jscomp$0.contentState,clientRenderedBoundaries.renderState)}if(!JSCompiler_inline_result$jscomp$0){request.destination=null,i++,partialBoundaries.splice(0,i);return}}partialBoundaries.splice(0,i),flushingPartialBoundaries=!1;var largeBoundaries=request.completedBoundaries;for(i=0;i<largeBoundaries.length;i++)if(!flushCompletedBoundary(request,destination,largeBoundaries[i])){request.destination=null,i++,largeBoundaries.splice(0,i);return}largeBoundaries.splice(0,i)}}finally{flushingPartialBoundaries=!1,request.allPendingTasks===0&&request.clientRenderedBoundaries.length===0&&request.completedBoundaries.length===0?(request.flushScheduled=!1,i=request.resumableState,i.hasBody&&writeChunk(destination,endChunkForTag("body")),i.hasHtml&&writeChunk(destination,endChunkForTag("html")),flushBuffered(destination),request.abortableTasks.size!==0&&console.error("There was still abortable task at the root when we closed. This is a bug in React."),request.status=CLOSED,destination.end(),request.destination=null):flushBuffered(destination)}}function startWork(request){request.flushScheduled=request.destination!==null,scheduleMicrotask(function(){return performWork(request)}),setTimeout(function(){request.status===10&&(request.status=11),request.trackedPostpones===null&&safelyEmitEarlyPreloads(request,request.pendingRootTasks===0)},0)}function enqueueFlush(request){request.flushScheduled===!1&&request.pingedTasks.length===0&&request.destination!==null&&(request.flushScheduled=!0,setTimeout(function(){var destination=request.destination;destination?flushCompletedQueues(request,destination):request.flushScheduled=!1},0))}function abort(request,reason){if(request.status===11||request.status===10)request.status=12;try{var abortableTasks=request.abortableTasks;if(0<abortableTasks.size){var error=reason===void 0?Error("The render was aborted by the server without a reason."):typeof reason==="object"&&reason!==null&&typeof reason.then==="function"?Error("The render was aborted by the server with a promise."):reason;request.fatalError=error,abortableTasks.forEach(function(task){var prevTaskInDEV=currentTaskInDEV,prevGetCurrentStackImpl=ReactSharedInternals.getCurrentStack;currentTaskInDEV=task,ReactSharedInternals.getCurrentStack=getCurrentStackInDEV;try{abortTask(task,request,error)}finally{currentTaskInDEV=prevTaskInDEV,ReactSharedInternals.getCurrentStack=prevGetCurrentStackImpl}}),abortableTasks.clear()}request.destination!==null&&flushCompletedQueues(request,request.destination)}catch(error$4){reason={},logRecoverableError(request,error$4,reason,null),fatalError(request,error$4,reason,null)}}function addToReplayParent(node,parentKeyPath,trackedPostpones){if(parentKeyPath===null)trackedPostpones.rootNodes.push(node);else{var workingMap=trackedPostpones.workingMap,parentNode=workingMap.get(parentKeyPath);parentNode===void 0&&(parentNode=[parentKeyPath[1],parentKeyPath[2],[],null],workingMap.set(parentKeyPath,parentNode),addToReplayParent(parentNode,parentKeyPath[0],trackedPostpones)),parentNode[2].push(node)}}var isomorphicReactPackageVersion$jscomp$inline_766=React.version;if(isomorphicReactPackageVersion$jscomp$inline_766!=="19.2.8")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
1484
|
+
- react: `+(isomorphicReactPackageVersion$jscomp$inline_766+`
|
|
1485
|
+
- react-dom: 19.2.8
|
|
1486
|
+
Learn more: https://react.dev/warnings/version-mismatch`));var $renderToReadableStream=function(children,options){return new Promise(function(resolve,reject){var onFatalError,onAllReady,allReady=new Promise(function(res,rej){onAllReady=res,onFatalError=rej}),onHeaders=options?options.onHeaders:void 0,onHeadersImpl;onHeaders&&(onHeadersImpl=function(headersDescriptor){onHeaders(new Headers(headersDescriptor))});var resumableState=createResumableState(options?options.identifierPrefix:void 0,options?options.unstable_externalRuntimeSrc:void 0,options?options.bootstrapScriptContent:void 0,options?options.bootstrapScripts:void 0,options?options.bootstrapModules:void 0),request$jscomp$0=createRequest(children,resumableState,createRenderState(resumableState,options?options.nonce:void 0,options?options.unstable_externalRuntimeSrc:void 0,options?options.importMap:void 0,onHeadersImpl,options?options.maxHeadersLength:void 0),createRootFormatContext(options?options.namespaceURI:void 0),options?options.progressiveChunkSize:void 0,options?options.onError:void 0,onAllReady,function(){var stream=new ReadableStream({type:"direct",pull:function(controller){var request=request$jscomp$0;if(request.status===13)request.status=CLOSED,closeWithError(controller,request.fatalError);else if(request.status!==CLOSED&&request.destination===null){request.destination=controller;try{flushCompletedQueues(request,controller)}catch(error){controller={},logRecoverableError(request,error,controller,null),fatalError(request,error,controller,null)}}},cancel:function(reason){request$jscomp$0.destination=null,abort(request$jscomp$0,reason)}},{highWaterMark:2048});stream.allReady=allReady,resolve(stream)},function(error){allReady.catch(function(){}),reject(error)},onFatalError,options?options.onPostpone:void 0,options?options.formState:void 0);if(options&&options.signal){var signal=options.signal;if(signal.aborted)abort(request$jscomp$0,signal.reason);else{var listener=function(){abort(request$jscomp$0,signal.reason),signal.removeEventListener("abort",listener)};signal.addEventListener("abort",listener)}}startWork(request$jscomp$0)})},$version="19.2.8";var react_dom_server_legacy_browser_development=__toESM(require_react_dom_server_legacy_browser_development()),b,l;b=exports_react_dom_server_bun_development,l=react_dom_server_legacy_browser_development;var $version2=b.version,$renderToReadableStream2=b.renderToReadableStream,$resume=b.resume,$renderToString=l.renderToString,$renderToStaticMarkup=l.renderToStaticMarkup;function isSerializedType(value){return value!==null&&typeof value==="object"&&"$type"in value&&typeof value.$type?.ref==="string"}function collectSerializedRepoRefs(tree){let out=new Map,visitValue=(value)=>{if(Array.isArray(value))for(let item of value)visitValue(item);else if(isSerializedType(value)){if(value.$type.repo&&!out.has(value.$type.ref))out.set(value.$type.ref,{...value.$type.repo,hasProxy:!1})}else if(value&&typeof value==="object"&&"$node"in value)visit(value.$node);else if(value&&typeof value==="object")for(let nested of Object.values(value))visitValue(nested)},visit=(node)=>{if(node.repo&&(!out.has(node.ref)||node.proxy&&!out.get(node.ref)?.hasProxy))out.set(node.ref,{...node.repo,hasProxy:node.proxy!==void 0});if(node.proxy)visit(node.proxy);for(let value of Object.values(node.props??{}))visitValue(value);for(let child of node.children??[])if(typeof child==="object")visit(child)};if(tree)visit(tree);return out}function collectSerializedRefs(tree){if(!tree)return[];let seen=new Set,visitValue=(value)=>{if(Array.isArray(value))for(let item of value)visitValue(item);else if(isSerializedType(value))seen.add(value.$type.ref);else if(value&&typeof value==="object"&&"$node"in value)visit(value.$node);else if(value&&typeof value==="object")for(let nested of Object.values(value))visitValue(nested)},visit=(node)=>{if(seen.add(node.ref),node.proxy)visit(node.proxy);for(let value of Object.values(node.props??{}))visitValue(value);for(let child of node.children??[])if(typeof child==="object")visit(child)};return visit(tree),[...seen]}function serializeTree(node,opts,path=[],stack=[],lockedPath=null,body=null){let shape=nodeShape(node);switch(shape.kind){case"snippet":{let instance=shape.node,snippet=opts.snippets?.get(instance.$snippet);if(!snippet||stack.includes(snippet.id))return null;let resolved=resolveSnippetBody(instance,snippet);return serializeTree(resolved,opts,path,[...stack,snippet.id],lockedPath??path,enterSnippet(body,snippet.id))}case"param":case"invalid":return null;case"text":return null;case"repo":return serializeRepo(shape.node,opts,path,stack,lockedPath,body);case"synthetic":case"named":case"emit-as":{let{node:component,ref}=shape;if(opts.staticFallback?.refs.has(ref)){let html=opts.staticFallback.render(component,path,lockedPath);return{ref:STATIC_REF,props:{html}}}return serializeComponent(component,opts,path,stack,lockedPath,body)}}}function serializeComponent(node,opts,path,stack,lockedPath,body){let{children:childrenProp,...props}=node.props??{};return{ref:node.$ref,props:nodeProps(serializeTypes(props),node,path,lockedPath,body),...serializeChildren(node,childrenProp,opts,path,stack,lockedPath,body)}}function serializeRepo(node,opts,path,stack,lockedPath,body){let{children:childrenProp,...rawProps}=node.props??{},props=serializeSlotProps(serializeTypes(rawProps),opts,path,stack,lockedPath),proxy=serializeProxy(node,opts,path,stack,lockedPath);return{ref:repoKey(node.$repo),repo:{...node.$repo,name:node.$ref},...proxy?{proxy}:{},props:nodeProps(props,node,path,lockedPath,body),...serializeChildren(node,childrenProp,opts,path,stack,lockedPath,body)}}function nodeProps(props,node,path,lockedPath,body){return{...props,"data-node-path":(lockedPath??path).join("."),...textChildrenAttribute(node.children,lockedPath),...bodyAttributes(body)}}function serializeChild(child,opts,path,stack,lockedPath,body){let shape=nodeShape(child);return shape.kind==="text"?shape.text:serializeTree(child,opts,path,stack,lockedPath,body)}function serializeChildren(node,childrenProp,opts,path,stack,lockedPath,body){let children;if(Array.isArray(node.children)&&node.children.length>0)children=node.children.flatMap((child,i)=>Array.isArray(child)?child.map((c,j)=>serializeChild(c,opts,[...path,i,j],stack,lockedPath,null)):serializeChild(child,opts,[...path,i],stack,lockedPath,descend(body,i))).filter((c)=>c!==null);else if(childrenProp!==void 0)children=serializePropChildren(childrenProp,opts,path,stack,lockedPath);return children&&children.length>0?{children}:{}}function serializePropChildren(value,opts,path,stack,lockedPath){if(isNode(value)){let s=serializeTree(value,opts,path,stack,lockedPath);return s?[s]:void 0}if(Array.isArray(value)){let out=[];for(let item of value)if(isNode(item)){let s=serializeTree(item,opts,path,stack,lockedPath);if(s)out.push(s)}else if(typeof item==="string"||typeof item==="number")out.push(item);return out.length>0?out:void 0}if(typeof value==="string"||typeof value==="number")return[value];return}function serializeProxy(node,opts,path,stack,lockedPath){let snippet=node.$repo.proxy?opts.snippets?.get(node.$repo.proxy):void 0;if(!snippet||stack.includes(snippet.id))return null;try{return serializeTree(repoProxyInstance(node,snippet),opts,path,stack,lockedPath??path)}catch{return null}}function serializeTypes(props){return mapComponentTypes(props,serializeType)}function serializeType(type){return type.$repo?{$type:{ref:repoKey(type.$repo),repo:{...type.$repo,name:type.$ref}}}:{$type:{ref:type.$ref}}}function serializeSlotProps(props,opts,path,stack,lockedPath){let out={};for(let[name,value]of Object.entries(props))if(isNode(value)){let s=serializeTree(value,opts,path,stack,lockedPath??path);if(s)out[name]={$node:s}}else out[name]=value;return out}var COLOR_TOKEN_MAP={background:"--color-background",foreground:"--color-foreground",border:"--color-border",input:"--color-input",ring:"--color-ring",primary:["--color-primary","--color-primary-foreground"],secondary:["--color-secondary","--color-secondary-foreground"],muted:["--color-muted","--color-muted-foreground"],accent:["--color-accent","--color-accent-foreground"],destructive:["--color-destructive","--color-destructive-foreground"],card:["--color-card","--color-card-foreground"],popover:["--color-popover","--color-popover-foreground"]};function emit(varName,value,lines){if(typeof value==="number")lines.push(` ${varName}: ${value};`);else if(typeof value==="string")lines.push(` ${varName}: ${sanitizeCssTokenValue(value)};`)}var SEMANTIC_COLOR_VARS=new Set(Object.values(COLOR_TOKEN_MAP).flatMap((target)=>Array.isArray(target)?target:[target]));function emitPalette(palette,lines){if(!palette)return;for(let[name,value]of Object.entries(palette)){if(!isCssIdent(name))continue;if(SEMANTIC_COLOR_VARS.has(`--color-${name}`))continue;emit(`--color-${name}`,value,lines)}}function emitSpacing(spacing,lines){for(let[name,value]of spacingCssTokens(spacing))emit(`--spacing-${name}`,value,lines)}function emitShadows(shadows,lines){if(!shadows)return;for(let[name,value]of Object.entries(shadows)){if(!isCssIdent(name))continue;if(typeof value==="string"||typeof value==="number")emit(`--shadow-${name}`,value,lines)}}function emitContainer(container,lines){if(!container)return;let decls=[" width: 100%;"];if(container.center)decls.push(" margin-inline: auto;");if(container.padding)decls.push(` padding-inline: ${sanitizeCssTokenValue(container.padding)};`);if(container.maxWidth)decls.push(` max-width: ${sanitizeCssTokenValue(container.maxWidth)};`);lines.push("",".container {",...decls,"}")}function emitColorBlock(colors,lines){for(let[token,target]of Object.entries(COLOR_TOKEN_MAP)){let value=colors[token];if(value===void 0)continue;if(Array.isArray(target)){let[defaultVar,foregroundVar]=target;if(typeof value==="object")emit(defaultVar,value.DEFAULT,lines),emit(foregroundVar,value.foreground,lines);else emit(defaultVar,value,lines)}else if(typeof value==="string")emit(target,value,lines)}}var RADIUS_STEPS=["sm","md","lg","xl","2xl","3xl"],RADIUS_LADDER={sm:"max(0px, calc(var(--radius) - 4px))",md:"max(0px, calc(var(--radius) - 2px))",lg:"var(--radius)",xl:"calc(var(--radius) + 4px)"};function emitRadiusScale(radius,lines){let statesScale=radius.lg!==void 0;if(!statesScale&&radius.md===void 0&&radius.sm===void 0)return;for(let step of RADIUS_STEPS){let value=statesScale||step!=="md"?radius[step]:void 0;if(value!==void 0){let css=typeof value==="number"?`${value}px`:sanitizeCssTokenValue(value);lines.push(` --radius-${step}: ${css};`)}else if(!statesScale&&step in RADIUS_LADDER)lines.push(` --radius-${step}: ${RADIUS_LADDER[step]};`)}}function themeToCss(theme){let lines=[":root {"];emitColorBlock(theme.colors,lines),emitPalette(theme.palette,lines),emitSpacing(theme.spacing,lines),emitShadows(theme.shadows,lines);let fontFamily=theme.typography.fontFamily;if(fontFamily)for(let[role,stack]of Object.entries(fontFamily)){if(!isCssIdent(role))continue;emit(`--font-${role}`,stack,lines)}let radiusValue=theme.radius.md??theme.radius.lg??theme.radius.sm;if(radiusValue!==void 0){let formatted=typeof radiusValue==="number"?`${radiusValue}px`:sanitizeCssTokenValue(radiusValue);lines.push(` --radius: ${formatted};`)}if(emitRadiusScale(theme.radius,lines),lines.push("}"),theme.colorsDark||theme.paletteDark)lines.push(""),lines.push(".dark {"),emitColorBlock(theme.colorsDark??{},lines),emitPalette(theme.paletteDark,lines),lines.push("}");return emitContainer(theme.container,lines),[lines.join(`
|
|
1487
|
+
`),typesetCss(theme.typography.typesets)].join(`
|
|
1488
|
+
|
|
1489
|
+
`)}function renderBody(screen,registry,snippets){return renderBodyGuarded(screen,registry,snippets).html}var CANVAS_ATTRIBUTE=/^data-(?:node-path|node-text|snippet-id|snippet-path|velloo-.*)$/;async function renderNativeHtml(screen,registry,snippets){return new HTMLRewriter().on('link[rel="preload"]',{element(element){element.remove()}}).on("*",{element(element){let param=element.getAttribute("data-velloo-param");if(param!==null){element.replace(`$${param}`);return}let html=element.namespaceURI==="http://www.w3.org/1999/xhtml";for(let[name,value]of[...element.attributes])if(CANVAS_ATTRIBUTE.test(name))element.removeAttribute(name);else if(html)element.removeAttribute(name),element.setAttribute(name,value)}}).transform(new Response(renderBody(screen,registry,snippets))).text()}function renderBodyGuarded(screen,registry,snippets){return ScreenSchema.parse(screen),renderGuarded(registry,(active)=>$renderToString(buildRoot(screen.tree,{registry:active,snippets})))}async function renderScreen(screen,theme,options){ScreenSchema.parse(screen),ThemeSchema.parse(theme);let pass=options.renderPass,{html:bodyHtml,failures}=renderGuarded(options.registry,(active)=>{let element=buildRoot(screen.tree,{registry:active,snippets:options.snippets});return $renderToString(pass?pass.wrap(element):element)}),themeCss=themeToCss(theme),staticHtml=[],canvasBundle=options.canvasBundle?(()=>{let staticRefs=options.canvasBundle.staticRefs??[],tree=serializeTree(screen.tree,{snippets:options.snippets,...staticRefs.length>0?{staticFallback:{refs:new Set(staticRefs),render:(node,path,lockedPath)=>{let element=buildTree(node,{registry:options.registry,snippets:options.snippets},path,[],lockedPath),html=$renderToString(pass?pass.wrap(element):element);return staticHtml.push(html),html}}}:{}});return tree?{url:options.canvasBundle.url,tree,themeOptions:options.canvasBundle.themeOptions,preview:options.canvasBundle.preview,...screen.route?{pathname:screen.route}:{}}:void 0})():void 0,adapterCss=pass?pass.css([bodyHtml,...staticHtml].join("")):void 0;return{html:buildDocument({viewport:options.viewport,bodyHtml,snapshotCss:options.snapshotCss,themeCss,adapterCss,customCss:options.customCss,googleFonts:theme.typography.googleFonts,baseHref:options.baseHref,title:screen.name,dark:options.dark,liveBundleUrl:options.liveBundleUrl,canvasBundle,...options.includeRuntime!==void 0?{includeRuntime:options.includeRuntime}:{},...options.selectionRing!==void 0?{selectionRing:options.selectionRing}:{},...options.scriptNonce!==void 0?{scriptNonce:options.scriptNonce}:{},...options.hostStylesheets?{hostStylesheets:options.hostStylesheets}:{},...options.appCss?{appCss:options.appCss}:{}}),bodyHtml,themeCss,failures}}async function screenshot(opts){return await screenshotInternal(opts),opts.outPath}async function screenshotBuffer(opts){let buf=await screenshotInternal(opts);if(!buf)throw Error("screenshotBuffer: no buffer returned (internal invariant)");return buf}async function openDocument(page,html){let base=/<base href="(http:\/\/(?:127\.0\.0\.1|localhost|\[::1\])(?::\d+)?)\/?"/.exec(html)?.[1];if(!base){await page.setContent(html,{waitUntil:"domcontentloaded",timeout:CAPTURE_TIMEOUT_MS});return}let url=`${base}/__velloo_capture/${crypto.randomUUID()}`;await page.route(url,(route)=>route.fulfill({status:200,contentType:"text/html; charset=utf-8",body:html})),await page.goto(url,{waitUntil:"domcontentloaded",timeout:CAPTURE_TIMEOUT_MS})}async function canvasMountState(page){return page.evaluate(()=>{let w=window;if(!document.getElementById("velloo-canvas-data"))return;let ssr=document.getElementById("velloo-ssr"),mounted=Boolean(ssr&&ssr.style.display==="none");return{mounted,...!mounted&&w.__velloo_canvas_unmounted?{reason:w.__velloo_canvas_unmounted}:{},...w.__velloo_canvas_bundle?{bundle:w.__velloo_canvas_bundle}:{},diagnostics:w.__velloo_canvas_diagnostics??[]}}).catch(()=>{return})}async function probeCanvasMount(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:1},async(context)=>{let page=await context.newPage(),consoleErrors=[];return page.on("console",(message)=>{if(message.type()==="error")consoleErrors.push(message.text().slice(0,400))}),page.on("pageerror",(error)=>consoleErrors.push(error.message.slice(0,400))),await openDocument(page,opts.html),await settleForCapture(page),await page.waitForTimeout(150),{...await canvasMountState(page)??{mounted:!1,diagnostics:[]},consoleErrors:consoleErrors.slice(0,20)}})}async function freezePage(page){return page.evaluate(()=>{let cssOf=(sheet)=>{try{return[...sheet.cssRules].map((rule)=>rule.cssText).join(`
|
|
1490
|
+
`)}catch{return""}},attributesOf=(el)=>Object.fromEntries([...el.attributes].filter((attr)=>!/^on/i.test(attr.name)).map((attr)=>[attr.name,attr.value])),copy=document.documentElement.cloneNode(!0),paired=(selector)=>{let copies=[...copy.querySelectorAll(selector)];return[...document.querySelectorAll(selector)].flatMap((live,at)=>{let twin=copies[at];return twin?[[live,twin]]:[]})};for(let[live,twin]of paired("style"))if((live.textContent??"").trim()===""&&live.sheet)twin.textContent=cssOf(live.sheet);for(let[live,twin]of paired("input"))if(live.type==="checkbox"||live.type==="radio")twin.toggleAttribute("checked",live.checked);else if(live.type!=="file"&&live.type!=="password")twin.setAttribute("value",live.value);for(let[live,twin]of paired("textarea"))twin.textContent=live.value;for(let[live,twin]of paired("option"))twin.toggleAttribute("selected",live.selected);let head=copy.querySelector("head");for(let sheet of document.adoptedStyleSheets??[]){let style=document.createElement("style");style.textContent=cssOf(sheet),head?.append(style)}let ssr=document.getElementById("velloo-ssr"),mounted=Boolean(ssr&&ssr.style.display==="none");if(mounted)copy.querySelector("#velloo-ssr")?.remove();for(let el of copy.querySelectorAll("script, base, link[rel='modulepreload']"))el.remove();let styles=[...head?.querySelectorAll("style, link[rel='stylesheet']")??[]].map((el)=>el instanceof HTMLStyleElement?{tag:"style",attributes:attributesOf(el),css:el.textContent??""}:{tag:"link",attributes:attributesOf(el)}),body=copy.querySelector("body")?.innerHTML??"";for(let el of copy.querySelectorAll("template[data-velloo-anchor], style[data-velloo-pointer]"))el.remove();return{html:`<!doctype html>
|
|
1491
|
+
${copy.outerHTML}`,head:styles,body,htmlAttributes:attributesOf(document.documentElement),bodyAttributes:attributesOf(document.body),mounted:mounted&&document.getElementById("velloo-canvas-data")!==null}})}async function captureMountedDocument(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:1},async(context)=>{let page=await context.newPage();await openDocument(page,opts.html),await settleForCapture(page);let canvas=await canvasMountState(page);return{...await freezePage(page),...canvas?{canvas}:{}}})}async function captureScreenshot(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:opts.deviceScaleFactor??1},async(context)=>{let page=await context.newPage();await openDocument(page,opts.html),await settleForCapture(page);let frozen=opts.freeze?await freezePage(page):void 0,nodeRects=await page.$$eval("[data-node-path]",(els)=>els.map((el)=>{let r=el.getBoundingClientRect();return{path:el.dataset.nodePath??"",x:r.left,y:r.top,w:r.width,h:r.height}})),png=await capturePagePng(page,opts.fullPage??!0,CAPTURE_TIMEOUT_MS),dom=opts.dom?await extractDom(page):void 0,canvas=await canvasMountState(page),missing=await missingHostStylesheets(page,opts.html);return{png,nodeRects,...dom?{dom}:{},...canvas?{canvas}:{},...missing?.length?{missingHostStylesheets:missing}:{},...frozen?{frozen}:{}}})}async function screenshotInternal(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:opts.deviceScaleFactor??1},async(context)=>{let page=await context.newPage();await openDocument(page,opts.html),await settleForCapture(page);let toFile=opts.outPath?{path:opts.outPath}:{};if(opts.clipSelector){let locator=page.locator(opts.clipSelector).first();if(await locator.count()===0)throw Error(`screenshot: no element matches selector ${opts.clipSelector}`);let png=await retryTransientScreenshot(()=>locator.screenshot({...toFile,timeout:CAPTURE_TIMEOUT_MS}));return opts.outPath?null:png}let fullPage=opts.fullPage??!0,png=await retryTransientScreenshot(()=>page.screenshot({...toFile,fullPage,timeout:CAPTURE_TIMEOUT_MS}));return opts.outPath?null:png})}async function measureRendered(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:1},async(context)=>{let page=await context.newPage();return await openDocument(page,opts.html),await settleForCapture(page),extractDom(page)})}class HideSelectorError extends Error{selectors;constructor(selectors){super(`\`hide\` selectors that are not valid CSS: ${selectors.map((s)=>JSON.stringify(s)).join(", ")}`);this.selectors=selectors;this.name="HideSelectorError"}}async function hideSelectors(page,selectors){let outcome=await page.evaluate((list)=>{let invalid=[],matched={};for(let selector of list)try{matched[selector]=document.querySelectorAll(selector).length}catch{invalid.push(selector)}if(invalid.length>0)return{invalid,matched};if(!document.adoptedStyleSheets.some((sheet)=>sheet.vellooHide)){let sheet=new CSSStyleSheet;sheet.vellooHide=!0;for(let selector of list)try{sheet.insertRule(`${selector} { display: none !important; }`)}catch{invalid.push(selector)}document.adoptedStyleSheets=[...document.adoptedStyleSheets,sheet]}return{invalid,matched}},selectors);if(outcome.invalid.length>0)throw new HideSelectorError(outcome.invalid);return outcome.matched}var SCROLL_MAX_STEPS=40,SCROLL_PAUSE_MS=120,SCROLL_IMAGE_WAIT_MS=3000;function keepSeenElementsSeen(){let Native=window.IntersectionObserver;if(!Native)return;window.IntersectionObserver=class extends Native{constructor(callback,options){let seen=new WeakSet;super((entries,observer)=>{let kept=entries.filter((entry)=>{if(entry.isIntersecting)seen.add(entry.target);return entry.isIntersecting||!seen.has(entry.target)});if(kept.length>0)callback(kept,observer)},options)}}}async function scrollThrough(page){return page.evaluate(async({maxSteps,pauseMs,imageWaitMs})=>{let height=()=>Math.max(document.documentElement?.scrollHeight??0,document.body?.scrollHeight??0),pause=(ms)=>new Promise((resolve)=>setTimeout(resolve,ms)),to=(top)=>window.scrollTo({top,left:0,behavior:"instant"}),heightBefore=height(),stride=Math.max(1,Math.floor(window.innerHeight*0.8)),top=0,steps=0;while(top+window.innerHeight<height()&&steps<maxSteps)top+=stride,to(top),await pause(pauseMs),steps+=1;let truncated=top+window.innerHeight<height();to(0);let loading=[...document.images].filter((image)=>!image.complete).map((image)=>new Promise((resolve)=>{image.addEventListener("load",resolve,{once:!0}),image.addEventListener("error",resolve,{once:!0})}));return await Promise.race([Promise.all(loading),pause(imageWaitMs)]),await pause(pauseMs*2),{steps,heightBefore,heightAfter:height(),truncated}},{maxSteps:SCROLL_MAX_STEPS,pauseMs:SCROLL_PAUSE_MS,imageWaitMs:SCROLL_IMAGE_WAIT_MS}).catch(()=>null)}async function captureUrlScreenshot(opts){return withContext({viewport:{width:opts.viewport.w,height:opts.viewport.h},deviceScaleFactor:opts.deviceScaleFactor??1,...opts.dark?{colorScheme:"dark"}:{},...opts.storageStatePath?{storageState:opts.storageStatePath}:{}},async(context)=>{if(opts.cookies&&opts.cookies.length>0)await context.addCookies(opts.cookies.map((cookie)=>({name:cookie.name,value:cookie.value,...cookie.url!==void 0?{url:cookie.url}:{},...cookie.domain!==void 0?{domain:cookie.domain}:{},...cookie.path!==void 0?{path:cookie.path}:{}})));if(opts.localStorage&&Object.keys(opts.localStorage).length>0)await context.addInitScript((entries)=>{try{for(let[k,v]of entries)localStorage.setItem(k,v)}catch{}},Object.entries(opts.localStorage));if(opts.dark)await context.addInitScript(()=>{try{localStorage.setItem("theme","dark")}catch{}});let scrolls=(opts.fullPage??!0)&&opts.scroll!==!1;if(scrolls)await context.addInitScript(keepSeenElementsSeen);let page=await context.newPage();if(await page.goto(opts.url,{waitUntil:"domcontentloaded",timeout:15000}),opts.dark)await page.evaluate(()=>{let el=document.documentElement;el.classList.add("dark"),el.setAttribute("data-theme","dark"),el.style.colorScheme="dark"}).catch(()=>{});let hide=opts.hide?.length?opts.hide:null;if(hide)await hideSelectors(page,hide);let settleMs=opts.settleTimeoutMs??8000,settleStart=Date.now();await page.waitForLoadState("networkidle",{timeout:settleMs}).catch(()=>{});let stillLoading=opts.expectLoading!==!0&&await page.waitForFunction(()=>{let shown=(el)=>el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden";for(let el of document.querySelectorAll('[aria-busy="true"]'))if(shown(el))return!1;for(let el of document.body?.querySelectorAll("*")??[]){if(el.childElementCount>0)continue;if(/^\s*loading[^a-z0-9]*$/i.test(el.textContent??"")&&shown(el))return!1}return!0},void 0,{timeout:Math.max(1000,settleMs-(Date.now()-settleStart)),polling:100}).then(()=>!1).catch(()=>!0),scroll=scrolls&&!stillLoading?await scrollThrough(page):null,finalUrl=page.url(),authWall=await page.locator('input[type="password"]').count().then((n)=>n>0).catch(()=>!1),pageError=stillLoading?"the target was still showing a loading state when it was captured \u2014 its data had not arrived, so the diff isn't about your design. Pass a higher settleTimeoutMs":await page.evaluate(()=>{if(document.querySelector("nextjs-portal, [data-nextjs-dialog], #__next-build-error, vite-error-overlay"))return"the target app is showing a dev error overlay \u2014 it's throwing, so the diff isn't about your design";let txt=(document.body?.innerText??"").trim();if(txt.length===0)return"the target captured as a blank page (no visible text)";let m=txt.match(/Unhandled Runtime Error|Application error: a (?:client|server)-side exception|Internal Server Error|This page (?:could not be|isn't) found|Failed to compile|\b(?:Type|Syntax|Reference)Error:/i);return m?`the target looks like an error page ("${m[0]}")`:null}).catch(()=>null),hidden=hide?await hideSelectors(page,hide):null,png=await capturePagePng(page,opts.fullPage??!0,CAPTURE_TIMEOUT_MS),dom=opts.dom?await extractDom(page).catch(()=>{return}):void 0;return{png,finalUrl,authWall,pageError,...dom?{dom}:{},...scroll?{scroll}:{},...hidden?{hidden}:{}}})}var LOGIN_PATH=/\/(login|signin|sign-in|auth|authenticate|account\/login|users\/sign_in|signup|sign-up|sign_up|register|registration|users\/sign_up|reset-password|forgot-password|users\/password)(\/|$)/i;function classifyCapture(requested,finalUrl){try{let norm=(u)=>u.origin+u.pathname.replace(/\/+$/,""),reqUrl=new URL(requested),finUrl=new URL(finalUrl);return{redirected:norm(reqUrl)!==norm(finUrl),finalLooksLikeLogin:LOGIN_PATH.test(finUrl.pathname),requestedLooksLikeLogin:LOGIN_PATH.test(reqUrl.pathname)}}catch{return{redirected:requested!==finalUrl,finalLooksLikeLogin:LOGIN_PATH.test(finalUrl),requestedLooksLikeLogin:LOGIN_PATH.test(requested)}}}export{TAILWIND_CLASSNAME,SX_PROP,STYLE_PROP,STYLE_CHANNELS,CSS_FRAMEWORK_CHANNEL,catalogFromManifest,identifierRef,styleChannelOf,UnknownProviderError,createProviderLoader,COMPONENT_GROUPS,UNGROUPED_LABEL,ownEntry,resolveNodeIdentity,require_react_development,buildBoardComposite,CHROMIUM_INSTALL_ARGV,CHROMIUM_INSTALL_CMD,CHROMIUM_FULL_INSTALL_ARGV,CHROMIUM_DEPS_INSTALL_ARGV,CHROMIUM_DEPS_INSTALL_CMD,BrowserMissingError,chromiumExecutable,MAX_CONCURRENT_RENDERS,closePooledBrowser,isCaptureTimeout,capturesDir,sessionStatePath,captureDir,listCaptures,readCaptureManifest,deleteCapture,isSafeCaptureId,isSafeCaptureFile,diffPngs,downscalePng,resizePng,pngSize,cropPng,sideBySidePng,unionRegion,HeadedBrowserMissingError,startCaptureSession,resolveSnippetBody,resolveSnippetBodyForEdit,snippetParamPlaceholder,HOST_FILES_PREFIX,RENDER_ERROR_META,screenshotCompareBuffer,paragraphBreaks,pdfPageBuffer,pdfDeckBuffer,RenderGuardLimitError,require_react_dom,collectSerializedRepoRefs,collectSerializedRefs,serializeTree,themeToCss,renderNativeHtml,renderBodyGuarded,renderScreen,screenshot,screenshotBuffer,probeCanvasMount,captureMountedDocument,captureScreenshot,measureRendered,HideSelectorError,captureUrlScreenshot,classifyCapture};
|