json-merge-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 • 314 kB
JavaScript
"use strict";var Ah=Object.create;var Bn=Object.defineProperty;var $h=Object.getOwnPropertyDescriptor;var kh=Object.getOwnPropertyNames;var Ph=Object.getPrototypeOf,Mh=Object.prototype.hasOwnProperty;var Nh=(e,t,n)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ya=(e,t)=>()=>(e&&(t=e(e=0)),t);var Vt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jh=(e,t)=>{for(var n in t)Bn(e,n,{get:t[n],enumerable:!0})},Rh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of kh(t))!Mh.call(e,o)&&o!==n&&Bn(e,o,{get:()=>t[o],enumerable:!(r=$h(t,o))||r.enumerable});return e};var zn=(e,t,n)=>(n=e!=null?Ah(Ph(e)):{},Rh(t||!e||!e.__esModule?Bn(n,"default",{value:e,enumerable:!0}):n,e));var J=(e,t,n)=>Nh(e,typeof t!="symbol"?t+"":t,n);var vu=Vt((L0,Tu)=>{"use strict";var Su,Vr,Xr,Kr,Gr,Yr,On,bs,$n,Hr,Eu,Zr,An,Qr,eo,to,Wt,xu,no,ro,Ng;Qr=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;An=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;Vr=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;to=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;Zr=/(?: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;Wt=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;ro=/[\t\v\f\ufeff\p{Zs}]+/yu;$n=/\r?\n|[\r\u2028\u2029]/y;Hr=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;eo=/\/\/.*/y;Su=/^#!.*/;Kr=/[<>.:={}]|\/(?![\/*])/y;Xr=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;Gr=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;Yr=/[^<>{}]+/y;no=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;xu=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;On=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;bs=/^(?:return|throw|yield)$/;Eu=RegExp($n.source);Tu.exports=Ng=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=Su.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]==="/"&&(no.test(s)||On.test(s))&&(Qr.lastIndex=i,c=Qr.exec(e))){i=Qr.lastIndex,s=c[0],h=!0,yield{type:"RegularExpressionLiteral",value:c[0],closed:c[1]!==void 0&&c[1]!=="\\"};continue}if(An.lastIndex=i,c=An.exec(e)){switch(m=c[0],u=An.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"{":An.lastIndex=0,o=!xu.test(s)&&(no.test(s)||On.test(s)),n.push(o),h=!1;break;case"}":switch(l.tag){case"InterpolationInTemplate":if(n.length===l.nesting){Wt.lastIndex=i,c=Wt.exec(e),i=Wt.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&&(no.test(s)||On.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(Vr.lastIndex=i,c=Vr.exec(e)){switch(i=Vr.lastIndex,f=c[0],c[0]){case"for":case"if":case"while":case"with":s!=="."&&s!=="?."&&(f="?NonExpressionParenKeyword")}s=f,h=!On.test(c[0]),yield{type:c[1]==="#"?"PrivateIdentifier":"IdentifierName",value:c[0]};continue}if(to.lastIndex=i,c=to.exec(e)){i=to.lastIndex,s=c[0],h=!0,yield{type:"StringLiteral",value:c[0],closed:c[2]!==void 0};continue}if(Zr.lastIndex=i,c=Zr.exec(e)){i=Zr.lastIndex,s=c[0],h=!0,yield{type:"NumericLiteral",value:c[0]};continue}if(Wt.lastIndex=i,c=Wt.exec(e)){i=Wt.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(Kr.lastIndex=i,c=Kr.exec(e)){switch(i=Kr.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(Xr.lastIndex=i,c=Xr.exec(e)){i=Xr.lastIndex,s=c[0],yield{type:"JSXIdentifier",value:c[0]};continue}if(Gr.lastIndex=i,c=Gr.exec(e)){i=Gr.lastIndex,s=c[0],yield{type:"JSXString",value:c[0],closed:c[2]!==void 0};continue}break;case"JSXChildren":if(Yr.lastIndex=i,c=Yr.exec(e)){i=Yr.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(ro.lastIndex=i,c=ro.exec(e)){i=ro.lastIndex,yield{type:"WhiteSpace",value:c[0]};continue}if($n.lastIndex=i,c=$n.exec(e)){i=$n.lastIndex,h=!1,bs.test(s)&&(s="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:c[0]};continue}if(Hr.lastIndex=i,c=Hr.exec(e)){i=Hr.lastIndex,Eu.test(c[0])&&(h=!1,bs.test(s)&&(s="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:c[0],closed:c[1]!==void 0};continue}if(eo.lastIndex=i,c=eo.exec(e)){i=eo.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 Mn(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(rf[o])}while(r>0);return t}function of(e){let t=new xy,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(Sy),a.length===0)continue;let c=0;for(let l=0;l<a.length;l++){let u=a[l];l>0&&t.write(wy),c=Mn(t,u[0],c),u.length!==1&&(n=Mn(t,u[1],n),r=Mn(t,u[2],r),o=Mn(t,u[3],o),u.length!==4&&(i=Mn(t,u[4],i)))}}return t.flush()}var wy,Sy,ef,rf,Ey,tf,nf,xy,sf=ya(()=>{"use strict";wy=44,Sy=59,ef="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rf=new Uint8Array(64),Ey=new Uint8Array(128);for(let e=0;e<ef.length;e++){let t=ef.charCodeAt(e);rf[e]=t,Ey[t]=e}tf=1024*16,nf=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}},xy=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(tf)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===tf&&(this.out+=nf.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+nf.decode(e.subarray(0,n)):t}}});var uf={};jh(uf,{Bundle:()=>Ms,SourceMap:()=>jn,default:()=>Rn});function Ty(){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 Cy(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 cf(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 lf(e){return _y.call(e)==="[object Object]"}function Ps(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 fo,ho,vy,jn,_y,Iy,po,Nn,rn,Rn,af,Ms,ff=ya(()=>{"use strict";sf();fo=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))}},ho=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=Ty(),jn=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=of(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())}};_y=Object.prototype.toString;Iy=/\w/,po=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"?Iy.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}},Nn=`
`,rn={insertLeft:!1,insertRight:!1,storeName:!1},Rn=class e{constructor(t,n={}){let r=new ho(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 fo},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 fo(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 po(t.hires),i=Ps(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)}),this.outro&&o.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?cf(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 jn(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Cy(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(lf(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 rn.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),rn.insertLeft=!0),this.appendLeft(t,n)}insertRight(t,n){return rn.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),rn.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&&(rn.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),rn.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 ho(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(Nn);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(Nn),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n}if(r.content.length>0){if(t=r.content.lastIndexOf(Nn),t!==-1)return r.content.substr(t+1)+n;n=r.content+n}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Nn),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n}}while(r=r.previous);return t=this.intro.lastIndexOf(Nn),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=Ps(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&&(typeof n=="function"&&(n=n(t,o,r)),t!==n&&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)){let s=r.slice(i,i+o),a=n;typeof n=="function"&&(a=n(s,i,r)),s!==a&&this.overwrite(i,i+o,a)}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)}},af=Object.prototype.hasOwnProperty,Ms=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 Rn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!lf(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=>{af.call(t,n)||(t[n]=t.content[n])}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!af.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 Rn(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 po(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=Ps(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?cf(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 jn(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 ph=Vt(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0})});var gh=Vt(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var fx=Symbol("inverted"),hx=Symbol("expectNull"),dx=Symbol("expectUndefined"),px=Symbol("expectNumber"),mx=Symbol("expectString"),gx=Symbol("expectBoolean"),yx=Symbol("expectVoid"),bx=Symbol("expectFunction"),wx=Symbol("expectObject"),Sx=Symbol("expectArray"),Ex=Symbol("expectSymbol"),xx=Symbol("expectAny"),Tx=Symbol("expectUnknown"),vx=Symbol("expectNever"),Cx=Symbol("expectNullable"),_x=Symbol("expectBigInt")});var bh=Vt(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0})});var Sh=Vt(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Ax=Symbol("secret"),$x=Symbol("mismatch"),kx=Symbol("avalue")});var Eh=Vt(Se=>{"use strict";var Lw=Se&&Se.__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]})),vo=Se&&Se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Lw(t,e,n)};Object.defineProperty(Se,"__esModule",{value:!0});Se.expectTypeOf=void 0;vo(ph(),Se);vo(gh(),Se);vo(bh(),Se);vo(Sh(),Se);var Ee=()=>!0,Dw=e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:Ee,toBeUnknown:Ee,toBeNever:Ee,toBeFunction:Ee,toBeObject:Ee,toBeArray:Ee,toBeString:Ee,toBeNumber:Ee,toBeBoolean:Ee,toBeVoid:Ee,toBeSymbol:Ee,toBeNull:Ee,toBeUndefined:Ee,toBeNullable:Ee,toBeBigInt:Ee,toMatchTypeOf:Ee,toEqualTypeOf:Ee,toBeConstructibleWith:Ee,toMatchObjectType:Ee,toExtend:Ee,map:Se.expectTypeOf,toBeCallableWith:Se.expectTypeOf,extract:Se.expectTypeOf,exclude:Se.expectTypeOf,pick:Se.expectTypeOf,omit:Se.expectTypeOf,toHaveProperty:Se.expectTypeOf,parameter:Se.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:()=>(0,Se.expectTypeOf)({})})),n};Se.expectTypeOf=Dw});var Fh={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]},Lh=Object.entries(Fh);function Ao(e){return String(e)}Ao.open="";Ao.close="";function ba(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 wa(e=!1){let t=ba(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 Lh)o[s]=t?r(i(a[0]),i(a[1]),a[2]):Ao;return o}var Sa=require("tty"),Dh=process.env.FORCE_TTY!==void 0||(0,Sa.isatty)(1);var pe=wa(Dh);function ja(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 qh(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 fn(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 Po(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 Xn(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 Mo(e,t,n,r,o,i){let s="",a=qh(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 Bh=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Wn=" ",zh=(e,t,n,r,o,i)=>{let s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+Wn}[${Xn(e.sample,t,n,r,o,i)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+Wn}{${Mo(e.sample,t,n,r,o,i)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+Wn+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()},Wh=e=>e&&e.$$typeof===Bh,Uh={serialize:zh,test:Wh},Jh=" ",Ra=new Set(["DOMStringMap","NamedNodeMap"]),Vh=/^(?:HTML\w*Collection|NodeList)$/;function Xh(e){return Ra.has(e)||Vh.test(e)}var Kh=e=>e&&e.constructor&&!!e.constructor.name&&Xh(e.constructor.name);function Gh(e){return e.constructor.name==="NamedNodeMap"}var Yh=(e,t,n,r,o,i)=>{let s=e.constructor.name;return++r>t.maxDepth?`[${s}]`:(t.min?"":s+Jh)+(Ra.has(s)?`{${Mo(Gh(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,o,i)}}`:`[${Xn([...e],t,n,r,o,i)}]`)},Hh={serialize:Yh,test:Kh};function Fa(e){return e.replaceAll("<","<").replaceAll(">",">")}function No(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 jo(e,t,n,r,o,i){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?La(s,t):i(s,t,n,r,o))).join("")}function La(e,t){let n=t.colors.content;return n.open+Fa(e)+n.close}function Zh(e,t){let n=t.colors.comment;return`${n.open}<!--${Fa(e)}-->${n.close}`}function Ro(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 Fo(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var Qh=1,Da=3,qa=8,Ba=11,ed=/^(?:(?:HTML|SVG)\w*)?Element$/;function td(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function nd(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||td(e);return n===Qh&&(ed.test(t)||o)||n===Da&&t==="Text"||n===qa&&t==="Comment"||n===Ba&&t==="DocumentFragment"}var rd=e=>{var t;return(e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&nd(e)};function od(e){return e.nodeType===Da}function id(e){return e.nodeType===qa}function $o(e){return e.nodeType===Ba}var sd=(e,t,n,r,o,i)=>{if(od(e))return La(e.data,t);if(id(e))return Zh(e.data,t);let s=$o(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?Fo(s,t):Ro(s,No($o(e)?[]:Array.from(e.attributes,a=>a.name).sort(),$o(e)?{}:[...e.attributes].reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,r,o,i),jo(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,i),t,n)},ad={serialize:sd,test:rd},cd="@@__IMMUTABLE_ITERABLE__@@",ld="@@__IMMUTABLE_LIST__@@",ud="@@__IMMUTABLE_KEYED__@@",fd="@@__IMMUTABLE_MAP__@@",Ea="@@__IMMUTABLE_ORDERED__@@",hd="@@__IMMUTABLE_RECORD__@@",dd="@@__IMMUTABLE_SEQ__@@",pd="@@__IMMUTABLE_SET__@@",md="@@__IMMUTABLE_STACK__@@",Xt=e=>`Immutable.${e}`,Gn=e=>`[${e}]`,un=" ",xa="\u2026";function gd(e,t,n,r,o,i,s){return++r>t.maxDepth?Gn(Xt(s)):`${Xt(s)+un}{${fn(e.entries(),t,n,r,o,i)}}`}function yd(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 bd(e,t,n,r,o,i){let s=Xt(e._name||"Record");return++r>t.maxDepth?Gn(s):`${s+un}{${fn(yd(e),t,n,r,o,i)}}`}function wd(e,t,n,r,o,i){let s=Xt("Seq");return++r>t.maxDepth?Gn(s):e[ud]?`${s+un}{${e._iter||e._object?fn(e.entries(),t,n,r,o,i):xa}}`:`${s+un}[${e._iter||e._array||e._collection||e._iterable?Po(e.values(),t,n,r,o,i):xa}]`}function ko(e,t,n,r,o,i,s){return++r>t.maxDepth?Gn(Xt(s)):`${Xt(s)+un}[${Po(e.values(),t,n,r,o,i)}]`}var Sd=(e,t,n,r,o,i)=>e[fd]?gd(e,t,n,r,o,i,e[Ea]?"OrderedMap":"Map"):e[ld]?ko(e,t,n,r,o,i,"List"):e[pd]?ko(e,t,n,r,o,i,e[Ea]?"OrderedSet":"Set"):e[md]?ko(e,t,n,r,o,i,"Stack"):e[dd]?wd(e,t,n,r,o,i):bd(e,t,n,r,o,i),Ed=e=>e&&(e[cd]===!0||e[hd]===!0),xd={serialize:Sd,test:Ed};function za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Un={exports:{}},le={};var Ta;function Td(){if(Ta)return le;Ta=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 le.ContextConsumer=i,le.ContextProvider=s,le.Element=e,le.ForwardRef=a,le.Fragment=n,le.Lazy=f,le.Memo=u,le.Portal=t,le.Profiler=o,le.StrictMode=r,le.Suspense=c,le.SuspenseList=l,le.isContextConsumer=function(d){return m(d)===i},le.isContextProvider=function(d){return m(d)===s},le.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},le.isForwardRef=function(d){return m(d)===a},le.isFragment=function(d){return m(d)===n},le.isLazy=function(d){return m(d)===f},le.isMemo=function(d){return m(d)===u},le.isPortal=function(d){return m(d)===t},le.isProfiler=function(d){return m(d)===o},le.isStrictMode=function(d){return m(d)===r},le.isSuspense=function(d){return m(d)===c},le.isSuspenseList=function(d){return m(d)===l},le.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)},le.typeOf=m,le}var ue={};var va;function vd(){return va||(va=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");ue.ContextConsumer=s,ue.ContextProvider=a,ue.Element=t,ue.ForwardRef=c,ue.Fragment=r,ue.Lazy=p,ue.Memo=f,ue.Portal=n,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=l,ue.SuspenseList=u,ue.isContextConsumer=function(d){return e(d)===s},ue.isContextProvider=function(d){return e(d)===a},ue.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},ue.isForwardRef=function(d){return e(d)===c},ue.isFragment=function(d){return e(d)===r},ue.isLazy=function(d){return e(d)===p},ue.isMemo=function(d){return e(d)===f},ue.isPortal=function(d){return e(d)===n},ue.isProfiler=function(d){return e(d)===i},ue.isStrictMode=function(d){return e(d)===o},ue.isSuspense=function(d){return e(d)===l},ue.isSuspenseList=function(d){return e(d)===u},ue.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)},ue.typeOf=e})()),ue}var Ca;function Cd(){return Ca||(Ca=1,process.env.NODE_ENV==="production"?Un.exports=Td():Un.exports=vd()),Un.exports}var Wa=Cd(),_d=za(Wa),Id=ja({__proto__:null,default:_d},[Wa]),Jn={exports:{}},ie={};var _a;function Od(){if(_a)return ie;_a=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 ie.ContextConsumer=s,ie.ContextProvider=i,ie.Element=e,ie.ForwardRef=c,ie.Fragment=n,ie.Lazy=p,ie.Memo=f,ie.Portal=t,ie.Profiler=o,ie.StrictMode=r,ie.Suspense=l,ie.SuspenseList=u,ie.isAsyncMode=function(){return!1},ie.isConcurrentMode=function(){return!1},ie.isContextConsumer=function(b){return d(b)===s},ie.isContextProvider=function(b){return d(b)===i},ie.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ie.isForwardRef=function(b){return d(b)===c},ie.isFragment=function(b){return d(b)===n},ie.isLazy=function(b){return d(b)===p},ie.isMemo=function(b){return d(b)===f},ie.isPortal=function(b){return d(b)===t},ie.isProfiler=function(b){return d(b)===o},ie.isStrictMode=function(b){return d(b)===r},ie.isSuspense=function(b){return d(b)===l},ie.isSuspenseList=function(b){return d(b)===u},ie.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)},ie.typeOf=d,ie}var se={};var Ia;function Ad(){return Ia||(Ia=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,I;I=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===I||q.getModuleId!==void 0))}function $(q){if(typeof q=="object"&&q!==null){var x=q.$$typeof;switch(x){case e:var _=q.type;switch(_){case n:case o:case r:case l:case u:return _;default:var P=_&&_.$$typeof;switch(P){case a:case s:case c:case p:case f:case i:return P;default:return x}}case t:return x}}}var j=s,k=i,A=e,M=c,U=n,C=p,z=f,oe=t,V=o,Y=r,N=l,K=u,F=!1,de=!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 We(q){return de||(de=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Oe(q){return $(q)===s}function ke(q){return $(q)===i}function He(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function De(q){return $(q)===c}function Pe(q){return $(q)===n}function Me(q){return $(q)===p}function gt(q){return $(q)===f}function Ve(q){return $(q)===t}function kt(q){return $(q)===o}function Ce(q){return $(q)===r}function Ze(q){return $(q)===l}function qn(q){return $(q)===u}se.ContextConsumer=j,se.ContextProvider=k,se.Element=A,se.ForwardRef=M,se.Fragment=U,se.Lazy=C,se.Memo=z,se.Portal=oe,se.Profiler=V,se.StrictMode=Y,se.Suspense=N,se.SuspenseList=K,se.isAsyncMode=ve,se.isConcurrentMode=We,se.isContextConsumer=Oe,se.isContextProvider=ke,se.isElement=He,se.isForwardRef=De,se.isFragment=Pe,se.isLazy=Me,se.isMemo=gt,se.isPortal=Ve,se.isProfiler=kt,se.isStrictMode=Ce,se.isSuspense=Ze,se.isSuspenseList=qn,se.isValidElementType=O,se.typeOf=$})()),se}var Oa;function $d(){return Oa||(Oa=1,process.env.NODE_ENV==="production"?Jn.exports=Od():Jn.exports=Ad()),Jn.exports}var Ua=$d(),kd=za(Ua),Pd=ja({__proto__:null,default:kd},[Ua]),Md=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],Pt=Object.fromEntries(Md.map(e=>[e,t=>Pd[e](t)||Id[e](t)]));function Ja(e,t=[]){if(Array.isArray(e))for(let n of e)Ja(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function Aa(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(Pt.isFragment(e))return"React.Fragment";if(Pt.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(Pt.isContextProvider(e))return"Context.Provider";if(Pt.isContextConsumer(e))return"Context.Consumer";if(Pt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(Pt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function Nd(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var jd=(e,t,n,r,o,i)=>++r>t.maxDepth?Fo(Aa(e),t):Ro(Aa(e),No(Nd(e),e.props,t,n+t.indent,r,o,i),jo(Ja(e.props.children),t,n+t.indent,r,o,i),t,n),Rd=e=>e!=null&&Pt.isElement(e),Fd={serialize:jd,test:Rd},Ld=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Dd(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var qd=(e,t,n,r,o,i)=>++r>t.maxDepth?Fo(e.type,t):Ro(e.type,e.props?No(Dd(e),e.props,t,n+t.indent,r,o,i):"",e.children?jo(e.children,t,n+t.indent,r,o,i):"",t,n),Bd=e=>e&&e.$$typeof===Ld,zd={serialize:qd,test:Bd},Va=Object.prototype.toString,Wd=Date.prototype.toISOString,Ud=Error.prototype.toString,$a=RegExp.prototype.toString;function Vn(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function Jd(e){return typeof window!="undefined"&&e===window}var Vd=/^Symbol\((.*)\)(.*)$/,Xd=/\n/g,Kn=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}};function Kd(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 Gd(e){return Object.is(e,-0)?"-0":String(e)}function Yd(e){return`${e}n`}function ka(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Pa(e){return String(e).replace(Vd,"Symbol($1)")}function Ma(e){return`[${Ud.call(e)}]`}function Xa(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 Gd(e);if(o==="bigint")return Yd(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return ka(e,t);if(o==="symbol")return Pa(e);let i=Va.call(e);return i==="[object WeakMap]"?"WeakMap {}":i==="[object WeakSet]"?"WeakSet {}":i==="[object Function]"||i==="[object GeneratorFunction]"?ka(e,t):i==="[object Symbol]"?Pa(e):i==="[object Date]"?Number.isNaN(+e)?"