UNPKG

json-conflict-resolver

Version:

A rules-based JSON conflict resolver that parses Git conflict markers, reconstructs ours/theirs, and merges with deterministic strategies — beyond line-based merges.

14 lines 310 kB
"use strict";var Oh=Object.create;var Vn=Object.defineProperty;var $h=Object.getOwnPropertyDescriptor;var Ah=Object.getOwnPropertyNames;var Ph=Object.getPrototypeOf,kh=Object.prototype.hasOwnProperty;var Mh=(e,t,n)=>t in e?Vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xa=(e,t)=>()=>(e&&(t=e(e=0)),t);var Gt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nh=(e,t)=>{for(var n in t)Vn(e,n,{get:t[n],enumerable:!0})},jh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ah(t))!kh.call(e,o)&&o!==n&&Vn(e,o,{get:()=>t[o],enumerable:!(r=$h(t,o))||r.enumerable});return e};var Yt=(e,t,n)=>(n=e!=null?Oh(Ph(e)):{},jh(t||!e||!e.__esModule?Vn(n,"default",{value:e,enumerable:!0}):n,e));var J=(e,t,n)=>Mh(e,typeof t!="symbol"?t+"":t,n);var Pu=Gt((A0,Au)=>{"use strict";var Iu,Yr,Hr,Zr,Qr,eo,kn,xs,Nn,to,Ou,no,Mn,ro,oo,io,Jt,$u,so,ao,Mg;ro=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;Mn=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;Yr=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;io=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;no=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;Jt=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;ao=/[\t\v\f\ufeff\p{Zs}]+/yu;Nn=/\r?\n|[\r\u2028\u2029]/y;to=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;oo=/\/\/.*/y;Iu=/^#!.*/;Zr=/[<>.:={}]|\/(?![\/*])/y;Hr=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;Qr=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;eo=/[^<>{}]+/y;so=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;$u=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;kn=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;xs=/^(?:return|throw|yield)$/;Ou=RegExp(Nn.source);Au.exports=Mg=function*(e,{jsx:t=!1}={}){var n,r,o,i,s,a,c,l,u,f,p,h,m,d;for({length:a}=e,i=0,s="",d=[{tag:"JS"}],n=[],p=0,h=!1,(c=Iu.exec(e))&&(yield{type:"HashbangComment",value:c[0]},i=c[0].length);i<a;){switch(l=d[d.length-1],l.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(e[i]==="/"&&(so.test(s)||kn.test(s))&&(ro.lastIndex=i,c=ro.exec(e))){i=ro.lastIndex,s=c[0],h=!0,yield{type:"RegularExpressionLiteral",value:c[0],closed:c[1]!==void 0&&c[1]!=="\\"};continue}if(Mn.lastIndex=i,c=Mn.exec(e)){switch(m=c[0],u=Mn.lastIndex,f=m,m){case"(":s==="?NonExpressionParenKeyword"&&d.push({tag:"JSNonExpressionParen",nesting:p}),p++,h=!1;break;case")":p--,h=!0,l.tag==="JSNonExpressionParen"&&p===l.nesting&&(d.pop(),f="?NonExpressionParenEnd",h=!1);break;case"{":Mn.lastIndex=0,o=!$u.test(s)&&(so.test(s)||kn.test(s)),n.push(o),h=!1;break;case"}":switch(l.tag){case"InterpolationInTemplate":if(n.length===l.nesting){Jt.lastIndex=i,c=Jt.exec(e),i=Jt.lastIndex,s=c[0],c[1]==="${"?(s="?InterpolationInTemplate",h=!1,yield{type:"TemplateMiddle",value:c[0]}):(d.pop(),h=!0,yield{type:"TemplateTail",value:c[0],closed:c[1]==="`"});continue}break;case"InterpolationInJSX":if(n.length===l.nesting){d.pop(),i+=1,s="}",yield{type:"JSXPunctuator",value:"}"};continue}}h=n.pop(),f=h?"?ExpressionBraceEnd":"}";break;case"]":h=!0;break;case"++":case"--":f=h?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(t&&(so.test(s)||kn.test(s))){d.push({tag:"JSXTag"}),i+=1,s="<",yield{type:"JSXPunctuator",value:m};continue}h=!1;break;default:h=!1}i=u,s=f,yield{type:"Punctuator",value:m};continue}if(Yr.lastIndex=i,c=Yr.exec(e)){switch(i=Yr.lastIndex,f=c[0],c[0]){case"for":case"if":case"while":case"with":s!=="."&&s!=="?."&&(f="?NonExpressionParenKeyword")}s=f,h=!kn.test(c[0]),yield{type:c[1]==="#"?"PrivateIdentifier":"IdentifierName",value:c[0]};continue}if(io.lastIndex=i,c=io.exec(e)){i=io.lastIndex,s=c[0],h=!0,yield{type:"StringLiteral",value:c[0],closed:c[2]!==void 0};continue}if(no.lastIndex=i,c=no.exec(e)){i=no.lastIndex,s=c[0],h=!0,yield{type:"NumericLiteral",value:c[0]};continue}if(Jt.lastIndex=i,c=Jt.exec(e)){i=Jt.lastIndex,s=c[0],c[1]==="${"?(s="?InterpolationInTemplate",d.push({tag:"InterpolationInTemplate",nesting:n.length}),h=!1,yield{type:"TemplateHead",value:c[0]}):(h=!0,yield{type:"NoSubstitutionTemplate",value:c[0],closed:c[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(Zr.lastIndex=i,c=Zr.exec(e)){switch(i=Zr.lastIndex,f=c[0],c[0]){case"<":d.push({tag:"JSXTag"});break;case">":d.pop(),s==="/"||l.tag==="JSXTagEnd"?(f="?JSX",h=!0):d.push({tag:"JSXChildren"});break;case"{":d.push({tag:"InterpolationInJSX",nesting:n.length}),f="?InterpolationInJSX",h=!1;break;case"/":s==="<"&&(d.pop(),d[d.length-1].tag==="JSXChildren"&&d.pop(),d.push({tag:"JSXTagEnd"}))}s=f,yield{type:"JSXPunctuator",value:c[0]};continue}if(Hr.lastIndex=i,c=Hr.exec(e)){i=Hr.lastIndex,s=c[0],yield{type:"JSXIdentifier",value:c[0]};continue}if(Qr.lastIndex=i,c=Qr.exec(e)){i=Qr.lastIndex,s=c[0],yield{type:"JSXString",value:c[0],closed:c[2]!==void 0};continue}break;case"JSXChildren":if(eo.lastIndex=i,c=eo.exec(e)){i=eo.lastIndex,s=c[0],yield{type:"JSXText",value:c[0]};continue}switch(e[i]){case"<":d.push({tag:"JSXTag"}),i++,s="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":d.push({tag:"InterpolationInJSX",nesting:n.length}),i++,s="?InterpolationInJSX",h=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(ao.lastIndex=i,c=ao.exec(e)){i=ao.lastIndex,yield{type:"WhiteSpace",value:c[0]};continue}if(Nn.lastIndex=i,c=Nn.exec(e)){i=Nn.lastIndex,h=!1,xs.test(s)&&(s="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:c[0]};continue}if(to.lastIndex=i,c=to.exec(e)){i=to.lastIndex,Ou.test(c[0])&&(h=!1,xs.test(s)&&(s="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:c[0],closed:c[1]!==void 0};continue}if(oo.lastIndex=i,c=oo.exec(e)){i=oo.lastIndex,h=!1,yield{type:"SingleLineComment",value:c[0]};continue}r=String.fromCodePoint(e.codePointAt(i)),i+=r.length,s=r,h=!1,yield{type:l.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:r}}}});function Ln(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let o=r&31;r>>>=5,r>0&&(o|=32),e.write(lf[o])}while(r>0);return t}function uf(e){let t=new Sy,n=0,r=0,o=0,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(by),a.length===0)continue;let c=0;for(let l=0;l<a.length;l++){let u=a[l];l>0&&t.write(yy),c=Ln(t,u[0],c),u.length!==1&&(n=Ln(t,u[1],n),r=Ln(t,u[2],r),o=Ln(t,u[3],o),u.length!==4&&(i=Ln(t,u[4],i)))}}return t.flush()}var yy,by,sf,lf,wy,af,cf,Sy,ff=xa(()=>{"use strict";yy=44,by=59,sf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lf=new Uint8Array(64),wy=new Uint8Array(128);for(let e=0;e<sf.length;e++){let t=sf.charCodeAt(e);lf[e]=t,wy[t]=e}af=1024*16,cf=typeof TextDecoder!="undefined"?new TextDecoder:typeof Buffer!="undefined"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Sy=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(af)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===af&&(this.out+=cf.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+cf.decode(e.subarray(0,n)):t}}});var mf={};Nh(mf,{Bundle:()=>Ds,SourceMap:()=>qn,default:()=>Bn});function Ey(){return typeof globalThis!="undefined"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function Ty(e){let t=e.split(` `),n=t.filter(i=>/^\t+/.test(i)),r=t.filter(i=>/^ {2,}/.test(i));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return" ";let o=r.reduce((i,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function df(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let o=n.length;for(;o--;)n[o]=".."}return n.concat(r).join("/")}function pf(e){return xy.call(e)==="[object Object]"}function Ls(e){let t=e.split(` `),n=[];for(let r=0,o=0;r<t.length;r++)n.push(o),o+=t[r].length+1;return function(o){let i=0,s=n.length;for(;i<s;){let l=i+s>>1;o<n[l]?s=l:i=l+1}let a=i-1,c=o-n[a];return{line:a,column:c}}}var bo,wo,vy,qn,xy,Cy,So,Dn,ln,Bn,hf,Ds,gf=xa(()=>{"use strict";ff();bo=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},wo=class e{constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let n=this;for(;n;)t(n),n=n.next}eachPrevious(t){let n=this;for(;n;)t(n),n=n.previous}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let n=t-this.start,r=this.original.slice(0,n),o=this.original.slice(n);this.original=r;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=r,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.content.replace(t,"");if(n.length){if(n!==this.content){let r=this.split(this.end-n.length);this.edited&&r.edit(n,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};vy=Ey(),qn=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=uf(t.mappings),typeof t.x_google_ignoreList!="undefined"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId!="undefined"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+vy(this.toString())}};xy=Object.prototype.toString;Cy=/\w/,So=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,n,r,o){if(n.length){let i=n.length-1,s=n.indexOf(` `,0),a=-1;for(;s>=0&&i>s;){let l=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&l.push(o),this.rawSegments.push(l),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=s,s=n.indexOf(` `,s+1)}let c=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&c.push(o),this.rawSegments.push(c),this.advance(n.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(t,n,r,o,i){let s=n.start,a=!0,c=!1;for(;s<n.end;){if(r[s]===` `)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,c=!1;else{if(this.hires||a||i.has(s)){let l=[this.generatedCodeColumn,t,o.line,o.column];this.hires==="boundary"?Cy.test(r[s])?c||(this.rawSegments.push(l),c=!0):(this.rawSegments.push(l),c=!1):this.rawSegments.push(l)}o.column+=1,this.generatedCodeColumn+=1,a=!1}s+=1}this.pending=null}advance(t){if(!t)return;let n=t.split(` `);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}},Dn=` `,ln={insertLeft:!1,insertRight:!1,storeName:!1},Bn=class e{constructor(t,n={}){let r=new wo(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new bo},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[t.length]=r}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new e(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart[r.start]=r,t.byEnd[r.end]=r;let o=n.next,i=o&&o.clone();i&&(r.next=i,i.previous=r,r=i),n=o}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new bo(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),o=new So(t.hires),i=Ls(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(s=>{let a=i(s.start);s.intro.length&&o.advance(s.intro),s.edited?o.addEdit(n,s.content,a,s.storeName?r.indexOf(s.original):-1):o.addUneditedChunk(n,s,this.original,a,this.sourcemapLocations),s.outro.length&&o.advance(s.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?df(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new qn(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Ty(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(pf(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;n=n||{};let o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(u=>{for(let f=u[0];f<u[1];f+=1)o[f]=!0});let i=n.indentStart!==!1,s=l=>i?`${t}${l}`:(i=!0,l);this.intro=this.intro.replace(r,s);let a=0,c=this.firstChunk;for(;c;){let l=c.end;if(c.edited)o[a]||(c.content=c.content.replace(r,s),c.content.length&&(i=c.content[c.content.length-1]===` `));else for(a=c.start;a<l;){if(!o[a]){let u=this.original[a];u===` `?i=!0:u!=="\r"&&i&&(i=!1,a===c.start||(this._splitChunk(c,a),c=c.next),c.prependRight(t))}a+=1}a=c.end,c=c.next}return this.outro=this.outro.replace(r,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,n){return ln.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),ln.insertLeft=!0),this.appendLeft(t,n)}insertRight(t,n){return ln.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),ln.insertRight=!0),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,r>=t&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let o=this.byStart[t],i=this.byEnd[n],s=o.previous,a=i.next,c=this.byStart[r];if(!c&&i===this.lastChunk)return this;let l=c?c.previous:this.lastChunk;return s&&(s.next=a),a&&(a.previous=s),l&&(l.next=o),c&&(c.previous=i),o.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=l,i.next=c||null,l||(this.firstChunk=o),c||(this.lastChunk=i),this}overwrite(t,n,r,o){return o=o||{},this.update(t,n,r,{...o,overwrite:!o.contentOnly})}update(t,n,r,o){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(t===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(n),o===!0&&(ln.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),ln.storeName=!0),o={storeName:!0});let i=o!==void 0?o.storeName:!1,s=o!==void 0?o.overwrite:!1;if(i){let l=this.original.slice(t,n);Object.defineProperty(this.storedNames,l,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[t],c=this.byEnd[n];if(a){let l=a;for(;l!==c;){if(l.next!==this.byStart[l.end])throw new Error("Cannot overwrite across a split point");l=l.next,l.edit("",!1)}a.edit(r,i,!s)}else{let l=new wo(t,n,"").edit(r,i);c.next=l,l.previous=c}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.reset(),r=n>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(Dn);if(t!==-1)return this.outro.substr(t+1);let n=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(t=r.outro.lastIndexOf(Dn),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n}if(r.content.length>0){if(t=r.content.lastIndexOf(Dn),t!==-1)return r.content.substr(t+1)+n;n=r.content+n}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Dn),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n}}while(r=r.previous);return t=this.intro.lastIndexOf(Dn),t!==-1?this.intro.substr(t+1)+n:this.intro+n}slice(t=0,n=this.original.length-this.offset){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}let r="",o=this.firstChunk;for(;o&&(o.start>t||o.end<=t);){if(o.start<n&&o.end>=n)return r;o=o.next}if(o&&o.edited&&o.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let i=o;for(;o;){o.intro&&(i!==o||o.start===t)&&(r+=o.intro);let s=o.start<n&&o.end>=n;if(s&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);let a=i===o?t-o.start:0,c=s?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(a,c),o.outro&&(!s||o.end===n)&&(r+=o.outro),s)break;o=o.next}return r}snip(t,n){let r=this.clone();return r.remove(0,t),r.remove(n,r.original.length),r}_split(t){if(this.byStart[t]||this.byEnd[t])return;let n=this.lastSearchedChunk,r=n,o=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===r)return;r=n}}_splitChunk(t,n){if(t.edited&&t.content.length){let o=Ls(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${t.original}")`)}let r=t.split(n);return this.byEnd[n]=t,this.byStart[n]=r,this.byEnd[r.end]=r,t===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,n=this.firstChunk;for(;n;)t+=n.toString(),n=n.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,n=0;do n+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let n=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let r=this.lastChunk;do{let o=r.end,i=r.trimEnd(n);if(r.end!==o&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),i)return!0;r=r.previous}while(r);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let r=this.firstChunk;do{let o=r.end,i=r.trimStart(n);if(r.end!==o&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),i)return!0;r=r.next}while(r);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,n){function r(i,s){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(a,c)=>c==="$"?"$":c==="&"?i[0]:+c<i.length?i[+c]:`$${c}`):n(...i,i.index,s,i.groups)}function o(i,s){let a,c=[];for(;a=i.exec(s);)c.push(a);return c}if(t.global)o(t,this.original).forEach(s=>{if(s.index!=null){let a=r(s,this.original);a!==s[0]&&this.overwrite(s.index,s.index+s[0].length,a)}});else{let i=this.original.match(t);if(i&&i.index!=null){let s=r(i,this.original);s!==i[0]&&this.overwrite(i.index,i.index+i[0].length,s)}}return this}_replaceString(t,n){let{original:r}=this,o=r.indexOf(t);return o!==-1&&this.overwrite(o,o+t.length,n),this}replace(t,n){return typeof t=="string"?this._replaceString(t,n):this._replaceRegexp(t,n)}_replaceAllString(t,n){let{original:r}=this,o=t.length;for(let i=r.indexOf(t);i!==-1;i=r.indexOf(t,i+o))r.slice(i,i+o)!==n&&this.overwrite(i,i+o,n);return this}replaceAll(t,n){if(typeof t=="string")return this._replaceAllString(t,n);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,n)}},hf=Object.prototype.hasOwnProperty,Ds=class e{constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:` `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(t){if(t instanceof Bn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!pf(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(n=>{hf.call(t,n)||(t[n]=t.content[n])}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!hf.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else{let n=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==n.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}return this.sources.push(t),this}append(t,n){return this.addSource({content:new Bn(t),separator:n&&n.separator||""}),this}clone(){let t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{t.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator})}),t}generateDecodedMap(t={}){let n=[],r;this.sources.forEach(i=>{Object.keys(i.content.storedNames).forEach(s=>{~n.indexOf(s)||n.push(s)})});let o=new So(t.hires);return this.intro&&o.advance(this.intro),this.sources.forEach((i,s)=>{s>0&&o.advance(this.separator);let a=i.filename?this.uniqueSourceIndexByFilename[i.filename]:-1,c=i.content,l=Ls(c.original);c.intro&&o.advance(c.intro),c.firstChunk.eachNext(u=>{let f=l(u.start);u.intro.length&&o.advance(u.intro),i.filename?u.edited?o.addEdit(a,u.content,f,u.storeName?n.indexOf(u.original):-1):o.addUneditedChunk(a,u,c.original,f,c.sourcemapLocations):o.advance(u.content),u.outro.length&&o.advance(u.outro)}),c.outro&&o.advance(c.outro),i.ignoreList&&a!==-1&&(r===void 0&&(r=[]),r.push(a))}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(i=>t.file?df(t.file,i.filename):i.filename),sourcesContent:this.uniqueSources.map(i=>t.includeContent?i.content:null),names:n,mappings:o.raw,x_google_ignoreList:r}}generateMap(t){return new qn(this.generateDecodedMap(t))}getIndentString(){let t={};return this.sources.forEach(n=>{let r=n.content._getRawIndentString();r!==null&&(t[r]||(t[r]=0),t[r]+=1)}),Object.keys(t).sort((n,r)=>t[n]-t[r])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let n=!this.intro||this.intro.slice(-1)===` `;return this.sources.forEach((r,o)=>{let i=r.separator!==void 0?r.separator:this.separator,s=n||o>0&&/\r?\n$/.test(i);r.content.indent(t,{exclude:r.indentExclusionRanges,indentStart:s}),n=r.content.lastChar()===` `}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(r,o)=>o>0?t+r:r)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((n,r)=>{let o=n.separator!==void 0?n.separator:this.separator;return(r>0?o:"")+n.content.toString()}).join("");return this.intro+t}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,n)=>t+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let r,o=0;do if(r=this.sources[o++],!r)break;while(!r.content.trimStartAborted(t))}return this}trimEnd(t){let n=new RegExp((t||"\\s")+"+$"),r,o=this.sources.length-1;do if(r=this.sources[o--],!r){this.intro=this.intro.replace(n,"");break}while(!r.content.trimEndAborted(t));return this}}});var wh=Gt(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0})});var Eh=Gt(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var tv=Symbol("inverted"),nv=Symbol("expectNull"),rv=Symbol("expectUndefined"),ov=Symbol("expectNumber"),iv=Symbol("expectString"),sv=Symbol("expectBoolean"),av=Symbol("expectVoid"),cv=Symbol("expectFunction"),lv=Symbol("expectObject"),uv=Symbol("expectArray"),fv=Symbol("expectSymbol"),hv=Symbol("expectAny"),dv=Symbol("expectUnknown"),pv=Symbol("expectNever"),mv=Symbol("expectNullable"),gv=Symbol("expectBigInt")});var Th=Gt(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0})});var Ch=Gt(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var wv=Symbol("secret"),Sv=Symbol("mismatch"),Ev=Symbol("avalue")});var _h=Gt(be=>{"use strict";var Rw=be&&be.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ao=be&&be.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Rw(t,e,n)};Object.defineProperty(be,"__esModule",{value:!0});be.expectTypeOf=void 0;Ao(wh(),be);Ao(Eh(),be);Ao(Th(),be);Ao(Ch(),be);var we=()=>!0,Fw=e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:we,toBeUnknown:we,toBeNever:we,toBeFunction:we,toBeObject:we,toBeArray:we,toBeString:we,toBeNumber:we,toBeBoolean:we,toBeVoid:we,toBeSymbol:we,toBeNull:we,toBeUndefined:we,toBeNullable:we,toBeBigInt:we,toMatchTypeOf:we,toEqualTypeOf:we,toBeConstructibleWith:we,toMatchObjectType:we,toExtend:we,map:be.expectTypeOf,toBeCallableWith:be.expectTypeOf,extract:be.expectTypeOf,exclude:be.expectTypeOf,pick:be.expectTypeOf,omit:be.expectTypeOf,toHaveProperty:be.expectTypeOf,parameter:be.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:()=>(0,be.expectTypeOf)({})})),n};be.expectTypeOf=Fw});var Rh={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Fh=Object.entries(Rh);function jo(e){return String(e)}jo.open="";jo.close="";function Ca(e=!1){let t=typeof process!="undefined"?process:void 0,n=(t==null?void 0:t.env)||{},r=(t==null?void 0:t.argv)||[];return!("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||(t==null?void 0:t.platform)==="win32"||e&&n.TERM!=="dumb"||"CI"in n)||typeof window!="undefined"&&!!window.chrome}function _a(e=!1){let t=Ca(e),n=(s,a,c,l)=>{let u="",f=0;do u+=s.substring(f,l)+c,f=l+a.length,l=s.indexOf(a,f);while(~l);return u+s.substring(f)},r=(s,a,c=s)=>{let l=u=>{let f=String(u),p=f.indexOf(a,s.length);return~p?s+n(f,a,c,p)+a:s+f+a};return l.open=s,l.close=a,l},o={isColorSupported:t},i=s=>`\x1B[${s}m`;for(let[s,a]of Fh)o[s]=t?r(i(a[0]),i(a[1]),a[2]):jo;return o}var Ia=require("tty"),Lh=process.env.FORCE_TTY!==void 0||(0,Ia.isatty)(1);var fe=_a(Lh);function za(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function Dh(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}function mn(e,t,n,r,o,i,s=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(a+=u,c++===t.maxWidth){a+="\u2026";break}let f=i(l.value[0],t,u,r,o),p=i(l.value[1],t,u,r,o);a+=f+s+p,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function Lo(e,t,n,r,o,i){let s="",a=0,c=e.next();if(!c.done){s+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(s+=l,a++===t.maxWidth){s+="\u2026";break}s+=i(c.value,t,l,r,o),c=e.next(),c.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function Hn(e,t,n,r,o,i){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;let a=l=>l instanceof DataView,c=a(e)?e.byteLength:e.length;if(c>0){s+=t.spacingOuter;let l=n+t.indent;for(let u=0;u<c;u++){if(s+=l,u===t.maxWidth){s+="\u2026";break}(a(e)||u in e)&&(s+=i(a(e)?e.getInt8(u):e[u],t,l,r,o)),u<c-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}function Do(e,t,n,r,o,i){let s="",a=Dh(e,t.compareKeys);if(a.length>0){s+=t.spacingOuter;let c=n+t.indent;for(let l=0;l<a.length;l++){let u=a[l],f=i(u,t,c,r,o),p=i(e[u],t,c,r,o);s+=`${c+f}: ${p}`,l<a.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}var qh=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Xn=" ",Bh=(e,t,n,r,o,i)=>{let s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+Xn}[${Hn(e.sample,t,n,r,o,i)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+Xn}{${Do(e.sample,t,n,r,o,i)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+Xn+i(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},zh=e=>e&&e.$$typeof===qh,Wh={serialize:Bh,test:zh},Uh=" ",Wa=new Set(["DOMStringMap","NamedNodeMap"]),Jh=/^(?:HTML\w*Collection|NodeList)$/;function Vh(e){return Wa.has(e)||Jh.test(e)}var Xh=e=>e&&e.constructor&&!!e.constructor.name&&Vh(e.constructor.name);function Kh(e){return e.constructor.name==="NamedNodeMap"}var Gh=(e,t,n,r,o,i)=>{let s=e.constructor.name;return++r>t.maxDepth?`[${s}]`:(t.min?"":s+Uh)+(Wa.has(s)?`{${Do(Kh(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,o,i)}}`:`[${Hn([...e],t,n,r,o,i)}]`)},Yh={serialize:Gh,test:Xh};function Ua(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}function qo(e,t,n,r,o,i,s){let a=r+n.indent,c=n.colors;return e.map(l=>{let u=t[l],f=s(u,n,a,o,i);return typeof u!="string"&&(f.includes(` `)&&(f=n.spacingOuter+a+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+c.prop.open+l+c.prop.close}=${c.value.open}${f}${c.value.close}`}).join("")}function Bo(e,t,n,r,o,i){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?Ja(s,t):i(s,t,n,r,o))).join("")}function Ja(e,t){let n=t.colors.content;return n.open+Ua(e)+n.close}function Hh(e,t){let n=t.colors.comment;return`${n.open}<!--${Ua(e)}-->${n.close}`}function zo(e,t,n,r,o){let i=r.colors.tag;return`${i.open}<${e}${t&&i.close+t+r.spacingOuter+o+i.open}${n?`>${i.close}${n}${r.spacingOuter}${o}${i.open}</${e}`:`${t&&!r.min?"":" "}/`}>${i.close}`}function Wo(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var Zh=1,Va=3,Xa=8,Ka=11,Qh=/^(?:(?:HTML|SVG)\w*)?Element$/;function ed(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function td(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||ed(e);return n===Zh&&(Qh.test(t)||o)||n===Va&&t==="Text"||n===Xa&&t==="Comment"||n===Ka&&t==="DocumentFragment"}var nd=e=>{var t;return(e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&td(e)};function rd(e){return e.nodeType===Va}function od(e){return e.nodeType===Xa}function Ro(e){return e.nodeType===Ka}var id=(e,t,n,r,o,i)=>{if(rd(e))return Ja(e.data,t);if(od(e))return Hh(e.data,t);let s=Ro(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?Wo(s,t):zo(s,qo(Ro(e)?[]:Array.from(e.attributes,a=>a.name).sort(),Ro(e)?{}:[...e.attributes].reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,r,o,i),Bo(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,i),t,n)},sd={serialize:id,test:nd},ad="@@__IMMUTABLE_ITERABLE__@@",cd="@@__IMMUTABLE_LIST__@@",ld="@@__IMMUTABLE_KEYED__@@",ud="@@__IMMUTABLE_MAP__@@",Oa="@@__IMMUTABLE_ORDERED__@@",fd="@@__IMMUTABLE_RECORD__@@",hd="@@__IMMUTABLE_SEQ__@@",dd="@@__IMMUTABLE_SET__@@",pd="@@__IMMUTABLE_STACK__@@",Ht=e=>`Immutable.${e}`,Qn=e=>`[${e}]`,pn=" ",$a="\u2026";function md(e,t,n,r,o,i,s){return++r>t.maxDepth?Qn(Ht(s)):`${Ht(s)+pn}{${mn(e.entries(),t,n,r,o,i)}}`}function gd(e){let t=0;return{next(){if(t<e._keys.length){let n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function yd(e,t,n,r,o,i){let s=Ht(e._name||"Record");return++r>t.maxDepth?Qn(s):`${s+pn}{${mn(gd(e),t,n,r,o,i)}}`}function bd(e,t,n,r,o,i){let s=Ht("Seq");return++r>t.maxDepth?Qn(s):e[ld]?`${s+pn}{${e._iter||e._object?mn(e.entries(),t,n,r,o,i):$a}}`:`${s+pn}[${e._iter||e._array||e._collection||e._iterable?Lo(e.values(),t,n,r,o,i):$a}]`}function Fo(e,t,n,r,o,i,s){return++r>t.maxDepth?Qn(Ht(s)):`${Ht(s)+pn}[${Lo(e.values(),t,n,r,o,i)}]`}var wd=(e,t,n,r,o,i)=>e[ud]?md(e,t,n,r,o,i,e[Oa]?"OrderedMap":"Map"):e[cd]?Fo(e,t,n,r,o,i,"List"):e[dd]?Fo(e,t,n,r,o,i,e[Oa]?"OrderedSet":"Set"):e[pd]?Fo(e,t,n,r,o,i,"Stack"):e[hd]?bd(e,t,n,r,o,i):yd(e,t,n,r,o,i),Sd=e=>e&&(e[ad]===!0||e[fd]===!0),Ed={serialize:wd,test:Sd};function Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kn={exports:{}},ae={};var Aa;function vd(){if(Aa)return ae;Aa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(d){if(typeof d=="object"&&d!==null){var b=d.$$typeof;switch(b){case e:switch(d=d.type,d){case n:case o:case r:case c:case l:case p:return d;default:switch(d=d&&d.$$typeof,d){case s:case a:case f:case u:return d;case i:return d;default:return b}}case t:return b}}}return ae.ContextConsumer=i,ae.ContextProvider=s,ae.Element=e,ae.ForwardRef=a,ae.Fragment=n,ae.Lazy=f,ae.Memo=u,ae.Portal=t,ae.Profiler=o,ae.StrictMode=r,ae.Suspense=c,ae.SuspenseList=l,ae.isContextConsumer=function(d){return m(d)===i},ae.isContextProvider=function(d){return m(d)===s},ae.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},ae.isForwardRef=function(d){return m(d)===a},ae.isFragment=function(d){return m(d)===n},ae.isLazy=function(d){return m(d)===f},ae.isMemo=function(d){return m(d)===u},ae.isPortal=function(d){return m(d)===t},ae.isProfiler=function(d){return m(d)===o},ae.isStrictMode=function(d){return m(d)===r},ae.isSuspense=function(d){return m(d)===c},ae.isSuspenseList=function(d){return m(d)===l},ae.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===o||d===r||d===c||d===l||typeof d=="object"&&d!==null&&(d.$$typeof===f||d.$$typeof===u||d.$$typeof===s||d.$$typeof===i||d.$$typeof===a||d.$$typeof===h||d.getModuleId!==void 0)},ae.typeOf=m,ae}var ce={};var Pa;function Td(){return Pa||(Pa=1,process.env.NODE_ENV!=="production"&&(function(){function e(d){if(typeof d=="object"&&d!==null){var b=d.$$typeof;switch(b){case t:switch(d=d.type,d){case r:case i:case o:case l:case u:case h:return d;default:switch(d=d&&d.$$typeof,d){case a:case c:case p:case f:return d;case s:return d;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");ce.ContextConsumer=s,ce.ContextProvider=a,ce.Element=t,ce.ForwardRef=c,ce.Fragment=r,ce.Lazy=p,ce.Memo=f,ce.Portal=n,ce.Profiler=i,ce.StrictMode=o,ce.Suspense=l,ce.SuspenseList=u,ce.isContextConsumer=function(d){return e(d)===s},ce.isContextProvider=function(d){return e(d)===a},ce.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},ce.isForwardRef=function(d){return e(d)===c},ce.isFragment=function(d){return e(d)===r},ce.isLazy=function(d){return e(d)===p},ce.isMemo=function(d){return e(d)===f},ce.isPortal=function(d){return e(d)===n},ce.isProfiler=function(d){return e(d)===i},ce.isStrictMode=function(d){return e(d)===o},ce.isSuspense=function(d){return e(d)===l},ce.isSuspenseList=function(d){return e(d)===u},ce.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===i||d===o||d===l||d===u||typeof d=="object"&&d!==null&&(d.$$typeof===p||d.$$typeof===f||d.$$typeof===a||d.$$typeof===s||d.$$typeof===c||d.$$typeof===m||d.getModuleId!==void 0)},ce.typeOf=e})()),ce}var ka;function xd(){return ka||(ka=1,process.env.NODE_ENV==="production"?Kn.exports=vd():Kn.exports=Td()),Kn.exports}var Ya=xd(),Cd=Ga(Ya),_d=za({__proto__:null,default:Cd},[Ya]),Gn={exports:{}},oe={};var Ma;function Id(){if(Ma)return oe;Ma=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function d(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case n:case o:case r:case l:case u:return b;default:switch(b=b&&b.$$typeof,b){case a:case s:case c:case p:case f:case i:return b;default:return S}}case t:return S}}}return oe.ContextConsumer=s,oe.ContextProvider=i,oe.Element=e,oe.ForwardRef=c,oe.Fragment=n,oe.Lazy=p,oe.Memo=f,oe.Portal=t,oe.Profiler=o,oe.StrictMode=r,oe.Suspense=l,oe.SuspenseList=u,oe.isAsyncMode=function(){return!1},oe.isConcurrentMode=function(){return!1},oe.isContextConsumer=function(b){return d(b)===s},oe.isContextProvider=function(b){return d(b)===i},oe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},oe.isForwardRef=function(b){return d(b)===c},oe.isFragment=function(b){return d(b)===n},oe.isLazy=function(b){return d(b)===p},oe.isMemo=function(b){return d(b)===f},oe.isPortal=function(b){return d(b)===t},oe.isProfiler=function(b){return d(b)===o},oe.isStrictMode=function(b){return d(b)===r},oe.isSuspense=function(b){return d(b)===l},oe.isSuspenseList=function(b){return d(b)===u},oe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===u||b===h||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===f||b.$$typeof===i||b.$$typeof===s||b.$$typeof===c||b.$$typeof===m||b.getModuleId!==void 0)},oe.typeOf=d,oe}var ie={};var Na;function Od(){return Na||(Na=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=!1,d=!1,b=!1,S=!1,v=!1,C;C=Symbol.for("react.module.reference");function O(q){return!!(typeof q=="string"||typeof q=="function"||q===n||q===o||v||q===r||q===l||q===u||S||q===h||m||d||b||typeof q=="object"&&q!==null&&(q.$$typeof===p||q.$$typeof===f||q.$$typeof===i||q.$$typeof===s||q.$$typeof===c||q.$$typeof===C||q.getModuleId!==void 0))}function A(q){if(typeof q=="object"&&q!==null){var T=q.$$typeof;switch(T){case e:var I=q.type;switch(I){case n:case o:case r:case l:case u:return I;default:var k=I&&I.$$typeof;switch(k){case a:case s:case c:case p:case f:case i:return k;default:return T}}case t:return T}}}var N=s,P=i,$=e,M=c,U=n,_=p,z=f,re=t,V=o,Y=r,j=l,K=u,F=!1,ue=!1;function ve(q){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Be(q){return ue||(ue=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function _e(q){return A(q)===s}function Ae(q){return A(q)===i}function Ye(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function Fe(q){return A(q)===c}function Pe(q){return A(q)===n}function ke(q){return A(q)===p}function yt(q){return A(q)===f}function Ue(q){return A(q)===t}function Mt(q){return A(q)===o}function Te(q){return A(q)===r}function He(q){return A(q)===l}function Jn(q){return A(q)===u}ie.ContextConsumer=N,ie.ContextProvider=P,ie.Element=$,ie.ForwardRef=M,ie.Fragment=U,ie.Lazy=_,ie.Memo=z,ie.Portal=re,ie.Profiler=V,ie.StrictMode=Y,ie.Suspense=j,ie.SuspenseList=K,ie.isAsyncMode=ve,ie.isConcurrentMode=Be,ie.isContextConsumer=_e,ie.isContextProvider=Ae,ie.isElement=Ye,ie.isForwardRef=Fe,ie.isFragment=Pe,ie.isLazy=ke,ie.isMemo=yt,ie.isPortal=Ue,ie.isProfiler=Mt,ie.isStrictMode=Te,ie.isSuspense=He,ie.isSuspenseList=Jn,ie.isValidElementType=O,ie.typeOf=A})()),ie}var ja;function $d(){return ja||(ja=1,process.env.NODE_ENV==="production"?Gn.exports=Id():Gn.exports=Od()),Gn.exports}var Ha=$d(),Ad=Ga(Ha),Pd=za({__proto__:null,default:Ad},[Ha]),kd=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],Nt=Object.fromEntries(kd.map(e=>[e,t=>Pd[e](t)||_d[e](t)]));function Za(e,t=[]){if(Array.isArray(e))for(let n of e)Za(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function Ra(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(Nt.isFragment(e))return"React.Fragment";if(Nt.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(Nt.isContextProvider(e))return"Context.Provider";if(Nt.isContextConsumer(e))return"Context.Consumer";if(Nt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(Nt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function Md(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var Nd=(e,t,n,r,o,i)=>++r>t.maxDepth?Wo(Ra(e),t):zo(Ra(e),qo(Md(e),e.props,t,n+t.indent,r,o,i),Bo(Za(e.props.children),t,n+t.indent,r,o,i),t,n),jd=e=>e!=null&&Nt.isElement(e),Rd={serialize:Nd,test:jd},Fd=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Ld(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var Dd=(e,t,n,r,o,i)=>++r>t.maxDepth?Wo(e.type,t):zo(e.type,e.props?qo(Ld(e),e.props,t,n+t.indent,r,o,i):"",e.children?Bo(e.children,t,n+t.indent,r,o,i):"",t,n),qd=e=>e&&e.$$typeof===Fd,Bd={serialize:Dd,test:qd},Qa=Object.prototype.toString,zd=Date.prototype.toISOString,Wd=Error.prototype.toString,Fa=RegExp.prototype.toString;function Yn(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function Ud(e){return typeof window!="undefined"&&e===window}var Jd=/^Symbol\((.*)\)(.*)$/,Vd=/\n/g,Zn=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}};function Xd(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function Kd(e){return Object.is(e,-0)?"-0":String(e)}function Gd(e){return`${e}n`}function La(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Da(e){return String(e).replace(Jd,"Symbol($1)")}function qa(e){return`[${Wd.call(e)}]`}function ec(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";let o=typeof e;if(o==="number")return Kd(e);if(o==="bigint")return Gd(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return La(e,t);if(o==="symbol")return Da(e);let i=Qa.call(e);return i==="[object WeakMap]"?"WeakMap {}":i==="[object WeakSet]"?"WeakSet {}":i==="[object Function]"||i==="[object GeneratorFunction]"?La(e,t):i==="[object Symbol]"?Da(e):i==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":zd.call(e):i==="[object Error]"?qa(e):i==="[object RegExp]"?n?Fa.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"