diff --git a/unstable/index.html b/unstable/index.html
index c76be6e45..69dc8afef 100644
--- a/unstable/index.html
+++ b/unstable/index.html
@@ -323,5 +323,5 @@
What is Melange
diff --git a/unstable/playground/assets/index-c25957a5.js b/unstable/playground/assets/index-3cffadff.js
similarity index 99%
rename from unstable/playground/assets/index-c25957a5.js
rename to unstable/playground/assets/index-3cffadff.js
index 76c4406ff..9f5e5463a 100644
--- a/unstable/playground/assets/index-c25957a5.js
+++ b/unstable/playground/assets/index-3cffadff.js
@@ -19024,7 +19024,7 @@ ReactDOM.querySelector("#preview")
`)},bor=function(C){var S=C.noRelative,G=C.noImportant,r0=C.gapMode,w0=r0===void 0?"margin":r0,Q0=X1.useMemo(function(){return WAr(w0)},[w0]);return ec(xor,{styles:aor(Q0,!S,w0,G?"":"!important")})},xkf=!1;if(typeof window<"u")try{var Sxa=Object.defineProperty({},"passive",{get:function(){return xkf=!0,!0}});window.addEventListener("test",Sxa,Sxa),window.removeEventListener("test",Sxa,Sxa)}catch{xkf=!1}var gW0=xkf?{passive:!1}:!1,eor=function(C){return C.tagName==="TEXTAREA"},ECb=function(C,S){var G=window.getComputedStyle(C);return G[S]!=="hidden"&&!(G.overflowY===G.overflowX&&!eor(C)&&G[S]==="visible")},cor=function(C){return ECb(C,"overflowY")},ror=function(C){return ECb(C,"overflowX")},WBb=function(C,S){var G=S;do{typeof ShadowRoot<"u"&&G instanceof ShadowRoot&&(G=G.host);var r0=$Cb(C,G);if(r0){var w0=MCb(C,G),Q0=w0[1],Dx=w0[2];if(Q0>Dx)return!0}G=G.parentNode}while(G&&G!==document.body);return!1},nor=function(C){var S=C.scrollTop,G=C.scrollHeight,r0=C.clientHeight;return[S,G,r0]},tor=function(C){var S=C.scrollLeft,G=C.scrollWidth,r0=C.clientWidth;return[S,G,r0]},$Cb=function(C,S){return C==="v"?cor(S):ror(S)},MCb=function(C,S){return C==="v"?nor(S):tor(S)},ior=function(C,S){return C==="h"&&S==="rtl"?-1:1},uor=function(C,S,G,r0,w0){var Q0=ior(C,window.getComputedStyle(S).direction),Dx=Q0*r0,Px=G.target,Xx=S.contains(Px),i1=!1,H1=Dx>0,T1=0,la=0;do{var Sa=MCb(C,Px),xa=Sa[0],La=Sa[1],Bf=Sa[2],_a=La-Bf-Q0*xa;(xa||_a)&&$Cb(C,Px)&&(T1+=_a,la+=xa),Px=Px.parentNode}while(!Xx&&Px!==document.body||Xx&&(S.contains(Px)||S===Px));return(H1&&(w0&&T1===0||!w0&&Dx>T1)||!H1&&(w0&&la===0||!w0&&-Dx>la))&&(i1=!0),i1},jxa=function(C){return"changedTouches"in C?[C.changedTouches[0].clientX,C.changedTouches[0].clientY]:[0,0]},xgb=function(C){return[C.deltaX,C.deltaY]},agb=function(C){return C&&"current"in C?C.current:C},dor=function(C,S){return C[0]===S[0]&&C[1]===S[1]},Aor=function(C){return`
.block-interactivity-`.concat(C,` {pointer-events: none;}
.allow-interactivity-`).concat(C,` {pointer-events: all;}
-`)},oor=0,wW0=[];function sor(C){var S=X1.useRef([]),G=X1.useRef([0,0]),r0=X1.useRef(),w0=X1.useState(oor++)[0],Q0=X1.useState(function(){return CCb()})[0],Dx=X1.useRef(C);X1.useEffect(function(){Dx.current=C},[C]),X1.useEffect(function(){if(C.inert){document.body.classList.add("block-interactivity-".concat(w0));var La=PAr([C.lockRef.current],(C.shards||[]).map(agb),!0).filter(Boolean);return La.forEach(function(Bf){return Bf.classList.add("allow-interactivity-".concat(w0))}),function(){document.body.classList.remove("block-interactivity-".concat(w0)),La.forEach(function(Bf){return Bf.classList.remove("allow-interactivity-".concat(w0))})}}},[C.inert,C.lockRef.current,C.shards]);var Px=X1.useCallback(function(La,Bf){if("touches"in La&&La.touches.length===2)return!Dx.current.allowPinchZoom;var _a=jxa(La),aa=G.current,Ra="deltaX"in La?La.deltaX:aa[0]-_a[0],Ba="deltaY"in La?La.deltaY:aa[1]-_a[1],zf,yb=La.target,zb=Math.abs(Ra)>Math.abs(Ba)?"h":"v";if("touches"in La&&zb==="h"&&yb.type==="range")return!1;var he=WBb(zb,yb);if(!he)return!0;if(he?zf=zb:(zf=zb==="v"?"h":"v",he=WBb(zb,yb)),!he)return!1;if(!r0.current&&"changedTouches"in La&&(Ra||Ba)&&(r0.current=zf),!zf)return!0;var g5=r0.current||zf;return uor(g5,Bf,La,g5==="h"?Ra:Ba,!0)},[]),Xx=X1.useCallback(function(La){var Bf=La;if(!(!wW0.length||wW0[wW0.length-1]!==Q0)){var _a="deltaY"in Bf?xgb(Bf):jxa(Bf),aa=S.current.filter(function(zf){return zf.name===Bf.type&&zf.target===Bf.target&&dor(zf.delta,_a)})[0];if(aa&&aa.should){Bf.cancelable&&Bf.preventDefault();return}if(!aa){var Ra=(Dx.current.shards||[]).map(agb).filter(Boolean).filter(function(zf){return zf.contains(Bf.target)}),Ba=Ra.length>0?Px(Bf,Ra[0]):!Dx.current.noIsolation;Ba&&Bf.cancelable&&Bf.preventDefault()}}},[]),i1=X1.useCallback(function(La,Bf,_a,aa){var Ra={name:La,delta:Bf,target:_a,should:aa};S.current.push(Ra),setTimeout(function(){S.current=S.current.filter(function(Ba){return Ba!==Ra})},1)},[]),H1=X1.useCallback(function(La){G.current=jxa(La),r0.current=void 0},[]),T1=X1.useCallback(function(La){i1(La.type,xgb(La),La.target,Px(La,C.lockRef.current))},[]),la=X1.useCallback(function(La){i1(La.type,jxa(La),La.target,Px(La,C.lockRef.current))},[]);X1.useEffect(function(){return wW0.push(Q0),C.setCallbacks({onScrollCapture:T1,onWheelCapture:T1,onTouchMoveCapture:la}),document.addEventListener("wheel",Xx,gW0),document.addEventListener("touchmove",Xx,gW0),document.addEventListener("touchstart",H1,gW0),function(){wW0=wW0.filter(function(La){return La!==Q0}),document.removeEventListener("wheel",Xx,gW0),document.removeEventListener("touchmove",Xx,gW0),document.removeEventListener("touchstart",H1,gW0)}},[]);var Sa=C.removeScrollBar,xa=C.inert;return ci(raa,{children:[xa?ec(Q0,{styles:Aor(w0)}):null,Sa?ec(bor,{gapMode:"margin"}):null]})}const vor=NAr(DCb,sor);var ICb=X1.forwardRef(function(C,S){return ec(iaa,{...Mx0({},C,{ref:S,sideCar:vor})})});ICb.classNames=iaa.classNames;const akf=["Enter"," "],lor=["ArrowDown","PageUp","Home"],SCb=["ArrowUp","PageDown","End"],_or=[...lor,...SCb],jPr={ltr:[...akf,"ArrowRight"],rtl:[...akf,"ArrowLeft"]};const uaa="Menu",[fkf,hor,por]=vyf(uaa),[JC0,jCb]=r0x(uaa,[por,lCb,kCb]),wyf=lCb(),OCb=kCb(),[mor,kHx]=JC0(uaa),[kor,Dyf]=JC0(uaa),yor=C=>{const{__scopeMenu:S,open:G=!1,children:r0,dir:w0,onOpenChange:Q0,modal:Dx=!0}=C,Px=wyf(S),[Xx,i1]=X1.useState(null),H1=X1.useRef(!1),T1=QP(Q0),la=fCb(w0);return X1.useEffect(()=>{const Sa=()=>{H1.current=!0,document.addEventListener("pointerdown",xa,{capture:!0,once:!0}),document.addEventListener("pointermove",xa,{capture:!0,once:!0})},xa=()=>H1.current=!1;return document.addEventListener("keydown",Sa,{capture:!0}),()=>{document.removeEventListener("keydown",Sa,{capture:!0}),document.removeEventListener("pointerdown",xa,{capture:!0}),document.removeEventListener("pointermove",xa,{capture:!0})}},[]),X1.createElement(oAr,Px,X1.createElement(mor,{scope:S,open:G,onOpenChange:T1,content:Xx,onContentChange:i1},X1.createElement(kor,{scope:S,onClose:X1.useCallback(()=>T1(!1),[T1]),isUsingKeyboardRef:H1,dir:la,modal:Dx},r0)))};const Bor=X1.forwardRef((C,S)=>{const{__scopeMenu:G,...r0}=C,w0=wyf(G);return X1.createElement(sAr,ri({},w0,r0,{ref:S}))}),PCb="MenuPortal",[gor,wor]=JC0(PCb,{forceMount:void 0}),Dor=C=>{const{__scopeMenu:S,forceMount:G,children:r0,container:w0}=C,Q0=kHx(PCb,S);return X1.createElement(gor,{scope:S,forceMount:G},X1.createElement(faa,{present:G||Q0.open},X1.createElement(NDb,{asChild:!0,container:w0},r0)))},is0="MenuContent",[Cor,LCb]=JC0(is0),Eor=X1.forwardRef((C,S)=>{const G=wor(is0,C.__scopeMenu),{forceMount:r0=G.forceMount,...w0}=C,Q0=kHx(is0,C.__scopeMenu),Dx=Dyf(is0,C.__scopeMenu);return X1.createElement(fkf.Provider,{scope:C.__scopeMenu},X1.createElement(faa,{present:r0||Q0.open},X1.createElement(fkf.Slot,{scope:C.__scopeMenu},Dx.modal?X1.createElement($or,ri({},w0,{ref:S})):X1.createElement(Mor,ri({},w0,{ref:S})))))}),$or=X1.forwardRef((C,S)=>{const G=kHx(is0,C.__scopeMenu),r0=X1.useRef(null),w0=_j(S,r0);return X1.useEffect(()=>{const Q0=r0.current;if(Q0)return OAr(Q0)},[]),X1.createElement(FCb,ri({},C,{ref:w0,trapFocus:G.open,disableOutsidePointerEvents:G.open,disableOutsideScroll:!0,onFocusOutside:EA(C.onFocusOutside,Q0=>Q0.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>G.onOpenChange(!1)}))}),Mor=X1.forwardRef((C,S)=>{const G=kHx(is0,C.__scopeMenu);return X1.createElement(FCb,ri({},C,{ref:S,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>G.onOpenChange(!1)}))}),FCb=X1.forwardRef((C,S)=>{const{__scopeMenu:G,loop:r0=!1,trapFocus:w0,onOpenAutoFocus:Q0,onCloseAutoFocus:Dx,disableOutsidePointerEvents:Px,onEntryFocus:Xx,onEscapeKeyDown:i1,onPointerDownOutside:H1,onFocusOutside:T1,onInteractOutside:la,onDismiss:Sa,disableOutsideScroll:xa,...La}=C,Bf=kHx(is0,G),_a=Dyf(is0,G),aa=wyf(G),Ra=OCb(G),Ba=hor(G),[zf,yb]=X1.useState(null),zb=X1.useRef(null),he=_j(S,zb,Bf.onContentChange),g5=X1.useRef(0),b5=X1.useRef(""),W5=X1.useRef(0),Yr=X1.useRef(null),kr=X1.useRef("right"),X5=X1.useRef(0),tc=xa?ICb:X1.Fragment,v9=xa?{as:uHx,allowPinchZoom:!0}:void 0,l9=ze=>{var kc,lc;const Yc=b5.current+ze,Sn=Ba().filter(Wd=>!Wd.disabled),Mi=document.activeElement,X9=(kc=Sn.find(Wd=>Wd.ref.current===Mi))===null||kc===void 0?void 0:kc.textValue,hd=Sn.map(Wd=>Wd.textValue),__=qor(hd,Yc,X9),h_=(lc=Sn.find(Wd=>Wd.textValue===__))===null||lc===void 0?void 0:lc.ref.current;(function Wd(qp){b5.current=qp,window.clearTimeout(g5.current),qp!==""&&(g5.current=window.setTimeout(()=>Wd(""),1e3))})(Yc),h_&&setTimeout(()=>h_.focus())};X1.useEffect(()=>()=>window.clearTimeout(g5.current),[]),Mdr();const Re=X1.useCallback(ze=>{var kc,lc;return kr.current===((kc=Yr.current)===null||kc===void 0?void 0:kc.side)&&Jor(ze,(lc=Yr.current)===null||lc===void 0?void 0:lc.area)},[]);return X1.createElement(Cor,{scope:G,searchRef:b5,onItemEnter:X1.useCallback(ze=>{Re(ze)&&ze.preventDefault()},[Re]),onItemLeave:X1.useCallback(ze=>{var kc;Re(ze)||((kc=zb.current)===null||kc===void 0||kc.focus(),yb(null))},[Re]),onTriggerLeave:X1.useCallback(ze=>{Re(ze)&&ze.preventDefault()},[Re]),pointerGraceTimerRef:W5,onPointerGraceIntentChange:X1.useCallback(ze=>{Yr.current=ze},[])},X1.createElement(tc,v9,X1.createElement(Idr,{asChild:!0,trapped:w0,onMountAutoFocus:EA(Q0,ze=>{var kc;ze.preventDefault(),(kc=zb.current)===null||kc===void 0||kc.focus()}),onUnmountAutoFocus:Dx},X1.createElement(UDb,{asChild:!0,disableOutsidePointerEvents:Px,onEscapeKeyDown:i1,onPointerDownOutside:H1,onFocusOutside:T1,onInteractOutside:la,onDismiss:Sa},X1.createElement($Ar,ri({asChild:!0},Ra,{dir:_a.dir,orientation:"vertical",loop:r0,currentTabStopId:zf,onCurrentTabStopIdChange:yb,onEntryFocus:EA(Xx,ze=>{_a.isUsingKeyboardRef.current||ze.preventDefault()})}),X1.createElement(vAr,ri({role:"menu","aria-orientation":"vertical","data-state":Tor(Bf.open),"data-radix-menu-content":"",dir:_a.dir},aa,La,{ref:he,style:{outline:"none",...La.style},onKeyDown:EA(La.onKeyDown,ze=>{const lc=ze.target.closest("[data-radix-menu-content]")===ze.currentTarget,Yc=ze.ctrlKey||ze.altKey||ze.metaKey,Sn=ze.key.length===1;lc&&(ze.key==="Tab"&&ze.preventDefault(),!Yc&&Sn&&l9(ze.key));const Mi=zb.current;if(ze.target!==Mi||!_or.includes(ze.key))return;ze.preventDefault();const hd=Ba().filter(__=>!__.disabled).map(__=>__.ref.current);SCb.includes(ze.key)&&hd.reverse(),Ror(hd)}),onBlur:EA(C.onBlur,ze=>{ze.currentTarget.contains(ze.target)||(window.clearTimeout(g5.current),b5.current="")}),onPointerMove:EA(C.onPointerMove,ekf(ze=>{const kc=ze.target,lc=X5.current!==ze.clientX;if(ze.currentTarget.contains(kc)&&lc){const Yc=ze.clientX>X5.current?"right":"left";kr.current=Yc,X5.current=ze.clientX}}))})))))))});const Ior=X1.forwardRef((C,S)=>{const{__scopeMenu:G,...r0}=C;return X1.createElement(gw.div,ri({role:"group"},r0,{ref:S}))});const Sor=X1.forwardRef((C,S)=>{const{__scopeMenu:G,...r0}=C;return X1.createElement(gw.div,ri({},r0,{ref:S}))}),bkf="MenuItem",fgb="menu.itemSelect",jor=X1.forwardRef((C,S)=>{const{disabled:G=!1,onSelect:r0,...w0}=C,Q0=X1.useRef(null),Dx=Dyf(bkf,C.__scopeMenu),Px=LCb(bkf,C.__scopeMenu),Xx=_j(S,Q0),i1=X1.useRef(!1),H1=()=>{const T1=Q0.current;if(!G&&T1){const la=new CustomEvent(fgb,{bubbles:!0,cancelable:!0});T1.addEventListener(fgb,Sa=>r0==null?void 0:r0(Sa),{once:!0}),lyf(T1,la),la.defaultPrevented?i1.current=!1:Dx.onClose()}};return X1.createElement(Oor,ri({},w0,{ref:Xx,disabled:G,onClick:EA(C.onClick,H1),onPointerDown:T1=>{var la;(la=C.onPointerDown)===null||la===void 0||la.call(C,T1),i1.current=!0},onPointerUp:EA(C.onPointerUp,T1=>{var la;i1.current||(la=T1.currentTarget)===null||la===void 0||la.click()}),onKeyDown:EA(C.onKeyDown,T1=>{const la=Px.searchRef.current!=="";G||la&&T1.key===" "||akf.includes(T1.key)&&(T1.currentTarget.click(),T1.preventDefault())})}))}),Oor=X1.forwardRef((C,S)=>{const{__scopeMenu:G,disabled:r0=!1,textValue:w0,...Q0}=C,Dx=LCb(bkf,G),Px=OCb(G),Xx=X1.useRef(null),i1=_j(S,Xx),[H1,T1]=X1.useState(!1),[la,Sa]=X1.useState("");return X1.useEffect(()=>{const xa=Xx.current;if(xa){var La;Sa(((La=xa.textContent)!==null&&La!==void 0?La:"").trim())}},[Q0.children]),X1.createElement(fkf.ItemSlot,{scope:G,disabled:r0,textValue:w0??la},X1.createElement(MAr,ri({asChild:!0},Px,{focusable:!r0}),X1.createElement(gw.div,ri({role:"menuitem","data-highlighted":H1?"":void 0,"aria-disabled":r0||void 0,"data-disabled":r0?"":void 0},Q0,{ref:i1,onPointerMove:EA(C.onPointerMove,ekf(xa=>{r0?Dx.onItemLeave(xa):(Dx.onItemEnter(xa),xa.defaultPrevented||xa.currentTarget.focus())})),onPointerLeave:EA(C.onPointerLeave,ekf(xa=>Dx.onItemLeave(xa))),onFocus:EA(C.onFocus,()=>T1(!0)),onBlur:EA(C.onBlur,()=>T1(!1))}))))});const Por="MenuRadioGroup",[OPr,PPr]=JC0(Por,{value:void 0,onValueChange:()=>{}});const Lor="MenuItemIndicator",[LPr,FPr]=JC0(Lor,{checked:!1});const For="MenuSub",[TPr,RPr]=JC0(For);function Tor(C){return C?"open":"closed"}function Ror(C){const S=document.activeElement;for(const G of C)if(G===S||(G.focus(),document.activeElement!==S))return}function Hor(C,S){return C.map((G,r0)=>C[(S+r0)%C.length])}function qor(C,S,G){const w0=S.length>1&&Array.from(S).every(i1=>i1===S[0])?S[0]:S,Q0=G?C.indexOf(G):-1;let Dx=Hor(C,Math.max(Q0,0));w0.length===1&&(Dx=Dx.filter(i1=>i1!==G));const Xx=Dx.find(i1=>i1.toLowerCase().startsWith(w0.toLowerCase()));return Xx!==G?Xx:void 0}function Uor(C,S){const{x:G,y:r0}=C;let w0=!1;for(let Q0=0,Dx=S.length-1;Q0r0!=H1>r0&&G<(i1-Px)*(r0-Xx)/(H1-Xx)+Px&&(w0=!w0)}return w0}function Jor(C,S){if(!S)return!1;const G={x:C.clientX,y:C.clientY};return Uor(G,S)}function ekf(C){return S=>S.pointerType==="mouse"?C(S):void 0}const Nor=yor,Yor=Bor,zor=Dor,Gor=Eor,Qor=Ior,Vor=Sor,Kor=jor;const TCb="DropdownMenu",[Xor,HPr]=r0x(TCb,[jCb]),NC0=jCb(),[Zor,RCb]=Xor(TCb),Wor=C=>{const{__scopeDropdownMenu:S,children:G,dir:r0,open:w0,defaultOpen:Q0,onOpenChange:Dx,modal:Px=!0}=C,Xx=NC0(S),i1=X1.useRef(null),[H1=!1,T1]=_yf({prop:w0,defaultProp:Q0,onChange:Dx});return X1.createElement(Zor,{scope:S,triggerId:Vmf(),triggerRef:i1,contentId:Vmf(),open:H1,onOpenChange:T1,onOpenToggle:X1.useCallback(()=>T1(la=>!la),[T1]),modal:Px},X1.createElement(Nor,ri({},Xx,{open:H1,onOpenChange:T1,dir:r0,modal:Px}),G))},xsr="DropdownMenuTrigger",asr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,disabled:r0=!1,...w0}=C,Q0=RCb(xsr,G),Dx=NC0(G);return X1.createElement(Yor,ri({asChild:!0},Dx),X1.createElement(gw.button,ri({type:"button",id:Q0.triggerId,"aria-haspopup":"menu","aria-expanded":Q0.open,"aria-controls":Q0.open?Q0.contentId:void 0,"data-state":Q0.open?"open":"closed","data-disabled":r0?"":void 0,disabled:r0},w0,{ref:syf(S,Q0.triggerRef),onPointerDown:EA(C.onPointerDown,Px=>{!r0&&Px.button===0&&Px.ctrlKey===!1&&(Q0.onOpenToggle(),Q0.open||Px.preventDefault())}),onKeyDown:EA(C.onKeyDown,Px=>{r0||(["Enter"," "].includes(Px.key)&&Q0.onOpenToggle(),Px.key==="ArrowDown"&&Q0.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(Px.key)&&Px.preventDefault())})})))});const fsr=C=>{const{__scopeDropdownMenu:S,...G}=C,r0=NC0(S);return X1.createElement(zor,ri({},r0,G))},bsr="DropdownMenuContent",esr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=RCb(bsr,G),Q0=NC0(G),Dx=X1.useRef(!1);return X1.createElement(Gor,ri({id:w0.contentId,"aria-labelledby":w0.triggerId},Q0,r0,{ref:S,onCloseAutoFocus:EA(C.onCloseAutoFocus,Px=>{var Xx;Dx.current||(Xx=w0.triggerRef.current)===null||Xx===void 0||Xx.focus(),Dx.current=!1,Px.preventDefault()}),onInteractOutside:EA(C.onInteractOutside,Px=>{const Xx=Px.detail.originalEvent,i1=Xx.button===0&&Xx.ctrlKey===!0,H1=Xx.button===2||i1;(!w0.modal||H1)&&(Dx.current=!0)}),style:{...C.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))});const csr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=NC0(G);return X1.createElement(Qor,ri({},w0,r0,{ref:S}))});const rsr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=NC0(G);return X1.createElement(Vor,ri({},w0,r0,{ref:S}))});const nsr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=NC0(G);return X1.createElement(Kor,ri({},w0,r0,{ref:S}))});const tsr=Wor,isr=asr,usr=fsr,dsr=esr,Asr=csr,osr=rsr,ssr=nsr;function vsr(C){return ec("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",style:{fill:"var(--colors-blue10)"},...C,children:ec("path",{d:"M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z"})})}function lsr({isExpanded:C,onExampleClick:S}){return ci(tsr,{children:[ec(isr,{asChild:!0,children:ci("div",{className:"IconButton",children:[ec(iur,{}),C?"Examples":null]})}),ec(usr,{children:ci(dsr,{className:"DropdownContent",align:"start",alignOffset:-5,side:"left",sideOffset:10,children:[ec(osr,{className:"DropdownLabel",children:"Code examples"}),ec(Asr,{className:"DropdownGroup",children:aCb.map(G=>ci(ssr,{className:"DropdownItem",onClick:r0=>S(G),children:[G.name.includes("React")?ec(vsr,{}):null,G.name]},G.name))})]})})]})}function _sr({isExpanded:C}){const{toast:S}=xCb();return ci("button",{className:"IconButton",onClick:()=>{navigator.clipboard.writeText(window.location.href),S({title:"URL copied to your clipboard",description:window.location.href.slice(0,50)+"..."})},children:[ec(dur,{}),C?"Share":null]})}const sj={Reason:"Reason",OCaml:"OCaml"},pC0={ON:"on",OFF:"off"},hsr=new Worker(new URL(""+new URL("worker-d1352ec0.js",import.meta.url).href,self.location),{type:"module"});function psr(){return ec("span",{className:"SquareLogo OCaml"})}function msr(){return ec("span",{className:"SquareLogo Reason"})}const sHx=(...C)=>C.reduce((S,G)=>S.concat(typeof G=="string"?G:Array.isArray(G)?sHx(...G):typeof G=="object"&&G?Object.keys(G).map(r0=>G[r0]?r0:""):""),[]).join(" ");function bgb({when:C,children:S}){return ec("div",{style:C?{position:"absolute",top:"-10000px",left:"-10000px",visibility:"hidden"}:{visibility:"visible",flex:"1"},children:S})}function ksr({count:C}){return ec("span",{className:"Counter",children:C})}function ysr({language:C,onChange:S}){return ci("div",{className:"Tabs",children:[ci("button",{className:sHx(["IconButton",C===sj.OCaml?"active":""]),onClick:()=>S(sj.OCaml),children:[ec(psr,{}),"OCaml"]}),ci("button",{className:sHx(["IconButton",C===sj.Reason?"active":""]),onClick:()=>S(sj.Reason),children:[ec(msr,{}),"Reason"]})]})}function Bsr({onExampleClick:C}){const[S,G]=X1.useState(!1),r0=()=>G(!S),w0=!S;return ec("div",{className:"Sidebar",children:ci("div",{className:"Menu",children:[ci("div",{className:"ActionMenu",children:[ec("hr",{className:"Separator"}),ec("div",{className:"ActionItem",children:ec(_sr,{isExpanded:w0})}),ec("hr",{className:"Separator"}),ec("div",{className:"ActionItem",children:ec(lsr,{isExpanded:w0,onExampleClick:C})}),ec("hr",{className:"Separator"}),ec("div",{className:"ActionItem",children:ci("a",{className:"IconButton",href:"https://github.com/melange-re/melange",target:"_blank",children:[ec(tur,{}),w0?"GitHub":null]})}),ec("div",{className:"ActionItem",children:ci("a",{className:"IconButton",href:"https://opam.ocaml.org/packages/melange",target:"_blank",children:[ec(uur,{}),w0?"OPAM":null]})})]}),ec("div",{className:"ActionItem",children:w0?ec("div",{className:"Info",children:ci("div",{className:"Versions",children:[ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"Melange"}),ec("span",{className:"Text-xs Number",children:"dev"})]}),ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"OCaml"}),ec("span",{className:"Text-xs Number",children:"5.1.1"})]}),ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"Reason"}),ec("span",{className:"Text-xs Number",children:"3.10.0"})]}),ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"ReasonReact"}),ec("span",{className:"Text-xs Number",children:"dev"})]})]})}):null}),ec("hr",{className:"Separator"}),ec("button",{className:"IconButton",onClick:Q0=>r0(),children:S?ec(cur,{}):ec(eur,{})})]})})}function gsr({codeHasReact:C}){return ec("div",{className:"Live",children:C?ec("div",{id:"preview"},"react"):ec("div",{id:"preview",children:ci("div",{className:"EmptyPreview",children:[ci("p",{className:"Text-m",children:["This div has the ID selector ",ec("code",{children:"preview"}),"."]}),ec("br",{}),ci("p",{className:"Text-m",children:['Choose "React Greetings" in the Examples menu to see it in action, or override by rendering into the element with ',ec("code",{children:'ReactDOM.querySelector("#preview")'})]})]})},"empty")})}function wsr({logs:C,clearLogs:S}){const[r0,w0]=X1.useState(!1),Q0=X1.useRef(null),Dx=la=>{const Sa=Q0.current,xa=Sa==null?void 0:Sa.getCollapsed();Sa&&xa?(Sa.expand(),w0(!1)):Sa&&!xa&&(Sa.collapse(),w0(!0))},[Px,Xx]=X1.useState(!0),i1=X1.useRef(null),H1=X1.useRef(null);Ddr(H1,()=>Xx(!1)),X1.useEffect(()=>{Px&&i1.current.scrollIntoView()},[C,Px]);const T1=la=>S();return ci(raa,{children:[ci("div",{className:"ConsoleHeader",children:[ci("div",{className:"Title",children:[ec("span",{className:"Text-xs",children:"Console"}),ec(ksr,{count:C.length})]}),ci("div",{className:"Actions",children:[ec("button",{className:"IconButton Clear",onClick:T1,children:ec(nur,{})}),ec("button",{className:"IconButton",onClick:Dx,children:r0?ec(RDb,{}):ec(TDb,{})})]})]}),ec(DC0,{ref:Q0,collapsible:!0,defaultSize:20,children:ci("div",{ref:H1,className:"Console Scrollbar",children:[C.map((la,Sa)=>ec("div",{className:"Item",children:la},Sa)),ec("div",{className:"EmptyItem",ref:i1})]})})]})}function Dsr({problems:C,warnings:S}){const[r0,w0]=X1.useState(!1),Q0=X1.useRef(null),Dx=i1=>{const H1=Q0.current,T1=H1==null?void 0:H1.getCollapsed();H1&&T1?(H1.expand(),w0(!1)):H1&&!T1&&(H1.collapse(),w0(!0))},Px=C&&C.length>0?C.map(i1=>i1.msg).join(`
+`)},oor=0,wW0=[];function sor(C){var S=X1.useRef([]),G=X1.useRef([0,0]),r0=X1.useRef(),w0=X1.useState(oor++)[0],Q0=X1.useState(function(){return CCb()})[0],Dx=X1.useRef(C);X1.useEffect(function(){Dx.current=C},[C]),X1.useEffect(function(){if(C.inert){document.body.classList.add("block-interactivity-".concat(w0));var La=PAr([C.lockRef.current],(C.shards||[]).map(agb),!0).filter(Boolean);return La.forEach(function(Bf){return Bf.classList.add("allow-interactivity-".concat(w0))}),function(){document.body.classList.remove("block-interactivity-".concat(w0)),La.forEach(function(Bf){return Bf.classList.remove("allow-interactivity-".concat(w0))})}}},[C.inert,C.lockRef.current,C.shards]);var Px=X1.useCallback(function(La,Bf){if("touches"in La&&La.touches.length===2)return!Dx.current.allowPinchZoom;var _a=jxa(La),aa=G.current,Ra="deltaX"in La?La.deltaX:aa[0]-_a[0],Ba="deltaY"in La?La.deltaY:aa[1]-_a[1],zf,yb=La.target,zb=Math.abs(Ra)>Math.abs(Ba)?"h":"v";if("touches"in La&&zb==="h"&&yb.type==="range")return!1;var he=WBb(zb,yb);if(!he)return!0;if(he?zf=zb:(zf=zb==="v"?"h":"v",he=WBb(zb,yb)),!he)return!1;if(!r0.current&&"changedTouches"in La&&(Ra||Ba)&&(r0.current=zf),!zf)return!0;var g5=r0.current||zf;return uor(g5,Bf,La,g5==="h"?Ra:Ba,!0)},[]),Xx=X1.useCallback(function(La){var Bf=La;if(!(!wW0.length||wW0[wW0.length-1]!==Q0)){var _a="deltaY"in Bf?xgb(Bf):jxa(Bf),aa=S.current.filter(function(zf){return zf.name===Bf.type&&zf.target===Bf.target&&dor(zf.delta,_a)})[0];if(aa&&aa.should){Bf.cancelable&&Bf.preventDefault();return}if(!aa){var Ra=(Dx.current.shards||[]).map(agb).filter(Boolean).filter(function(zf){return zf.contains(Bf.target)}),Ba=Ra.length>0?Px(Bf,Ra[0]):!Dx.current.noIsolation;Ba&&Bf.cancelable&&Bf.preventDefault()}}},[]),i1=X1.useCallback(function(La,Bf,_a,aa){var Ra={name:La,delta:Bf,target:_a,should:aa};S.current.push(Ra),setTimeout(function(){S.current=S.current.filter(function(Ba){return Ba!==Ra})},1)},[]),H1=X1.useCallback(function(La){G.current=jxa(La),r0.current=void 0},[]),T1=X1.useCallback(function(La){i1(La.type,xgb(La),La.target,Px(La,C.lockRef.current))},[]),la=X1.useCallback(function(La){i1(La.type,jxa(La),La.target,Px(La,C.lockRef.current))},[]);X1.useEffect(function(){return wW0.push(Q0),C.setCallbacks({onScrollCapture:T1,onWheelCapture:T1,onTouchMoveCapture:la}),document.addEventListener("wheel",Xx,gW0),document.addEventListener("touchmove",Xx,gW0),document.addEventListener("touchstart",H1,gW0),function(){wW0=wW0.filter(function(La){return La!==Q0}),document.removeEventListener("wheel",Xx,gW0),document.removeEventListener("touchmove",Xx,gW0),document.removeEventListener("touchstart",H1,gW0)}},[]);var Sa=C.removeScrollBar,xa=C.inert;return ci(raa,{children:[xa?ec(Q0,{styles:Aor(w0)}):null,Sa?ec(bor,{gapMode:"margin"}):null]})}const vor=NAr(DCb,sor);var ICb=X1.forwardRef(function(C,S){return ec(iaa,{...Mx0({},C,{ref:S,sideCar:vor})})});ICb.classNames=iaa.classNames;const akf=["Enter"," "],lor=["ArrowDown","PageUp","Home"],SCb=["ArrowUp","PageDown","End"],_or=[...lor,...SCb],jPr={ltr:[...akf,"ArrowRight"],rtl:[...akf,"ArrowLeft"]};const uaa="Menu",[fkf,hor,por]=vyf(uaa),[JC0,jCb]=r0x(uaa,[por,lCb,kCb]),wyf=lCb(),OCb=kCb(),[mor,kHx]=JC0(uaa),[kor,Dyf]=JC0(uaa),yor=C=>{const{__scopeMenu:S,open:G=!1,children:r0,dir:w0,onOpenChange:Q0,modal:Dx=!0}=C,Px=wyf(S),[Xx,i1]=X1.useState(null),H1=X1.useRef(!1),T1=QP(Q0),la=fCb(w0);return X1.useEffect(()=>{const Sa=()=>{H1.current=!0,document.addEventListener("pointerdown",xa,{capture:!0,once:!0}),document.addEventListener("pointermove",xa,{capture:!0,once:!0})},xa=()=>H1.current=!1;return document.addEventListener("keydown",Sa,{capture:!0}),()=>{document.removeEventListener("keydown",Sa,{capture:!0}),document.removeEventListener("pointerdown",xa,{capture:!0}),document.removeEventListener("pointermove",xa,{capture:!0})}},[]),X1.createElement(oAr,Px,X1.createElement(mor,{scope:S,open:G,onOpenChange:T1,content:Xx,onContentChange:i1},X1.createElement(kor,{scope:S,onClose:X1.useCallback(()=>T1(!1),[T1]),isUsingKeyboardRef:H1,dir:la,modal:Dx},r0)))};const Bor=X1.forwardRef((C,S)=>{const{__scopeMenu:G,...r0}=C,w0=wyf(G);return X1.createElement(sAr,ri({},w0,r0,{ref:S}))}),PCb="MenuPortal",[gor,wor]=JC0(PCb,{forceMount:void 0}),Dor=C=>{const{__scopeMenu:S,forceMount:G,children:r0,container:w0}=C,Q0=kHx(PCb,S);return X1.createElement(gor,{scope:S,forceMount:G},X1.createElement(faa,{present:G||Q0.open},X1.createElement(NDb,{asChild:!0,container:w0},r0)))},is0="MenuContent",[Cor,LCb]=JC0(is0),Eor=X1.forwardRef((C,S)=>{const G=wor(is0,C.__scopeMenu),{forceMount:r0=G.forceMount,...w0}=C,Q0=kHx(is0,C.__scopeMenu),Dx=Dyf(is0,C.__scopeMenu);return X1.createElement(fkf.Provider,{scope:C.__scopeMenu},X1.createElement(faa,{present:r0||Q0.open},X1.createElement(fkf.Slot,{scope:C.__scopeMenu},Dx.modal?X1.createElement($or,ri({},w0,{ref:S})):X1.createElement(Mor,ri({},w0,{ref:S})))))}),$or=X1.forwardRef((C,S)=>{const G=kHx(is0,C.__scopeMenu),r0=X1.useRef(null),w0=_j(S,r0);return X1.useEffect(()=>{const Q0=r0.current;if(Q0)return OAr(Q0)},[]),X1.createElement(FCb,ri({},C,{ref:w0,trapFocus:G.open,disableOutsidePointerEvents:G.open,disableOutsideScroll:!0,onFocusOutside:EA(C.onFocusOutside,Q0=>Q0.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>G.onOpenChange(!1)}))}),Mor=X1.forwardRef((C,S)=>{const G=kHx(is0,C.__scopeMenu);return X1.createElement(FCb,ri({},C,{ref:S,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>G.onOpenChange(!1)}))}),FCb=X1.forwardRef((C,S)=>{const{__scopeMenu:G,loop:r0=!1,trapFocus:w0,onOpenAutoFocus:Q0,onCloseAutoFocus:Dx,disableOutsidePointerEvents:Px,onEntryFocus:Xx,onEscapeKeyDown:i1,onPointerDownOutside:H1,onFocusOutside:T1,onInteractOutside:la,onDismiss:Sa,disableOutsideScroll:xa,...La}=C,Bf=kHx(is0,G),_a=Dyf(is0,G),aa=wyf(G),Ra=OCb(G),Ba=hor(G),[zf,yb]=X1.useState(null),zb=X1.useRef(null),he=_j(S,zb,Bf.onContentChange),g5=X1.useRef(0),b5=X1.useRef(""),W5=X1.useRef(0),Yr=X1.useRef(null),kr=X1.useRef("right"),X5=X1.useRef(0),tc=xa?ICb:X1.Fragment,v9=xa?{as:uHx,allowPinchZoom:!0}:void 0,l9=ze=>{var kc,lc;const Yc=b5.current+ze,Sn=Ba().filter(Wd=>!Wd.disabled),Mi=document.activeElement,X9=(kc=Sn.find(Wd=>Wd.ref.current===Mi))===null||kc===void 0?void 0:kc.textValue,hd=Sn.map(Wd=>Wd.textValue),__=qor(hd,Yc,X9),h_=(lc=Sn.find(Wd=>Wd.textValue===__))===null||lc===void 0?void 0:lc.ref.current;(function Wd(qp){b5.current=qp,window.clearTimeout(g5.current),qp!==""&&(g5.current=window.setTimeout(()=>Wd(""),1e3))})(Yc),h_&&setTimeout(()=>h_.focus())};X1.useEffect(()=>()=>window.clearTimeout(g5.current),[]),Mdr();const Re=X1.useCallback(ze=>{var kc,lc;return kr.current===((kc=Yr.current)===null||kc===void 0?void 0:kc.side)&&Jor(ze,(lc=Yr.current)===null||lc===void 0?void 0:lc.area)},[]);return X1.createElement(Cor,{scope:G,searchRef:b5,onItemEnter:X1.useCallback(ze=>{Re(ze)&&ze.preventDefault()},[Re]),onItemLeave:X1.useCallback(ze=>{var kc;Re(ze)||((kc=zb.current)===null||kc===void 0||kc.focus(),yb(null))},[Re]),onTriggerLeave:X1.useCallback(ze=>{Re(ze)&&ze.preventDefault()},[Re]),pointerGraceTimerRef:W5,onPointerGraceIntentChange:X1.useCallback(ze=>{Yr.current=ze},[])},X1.createElement(tc,v9,X1.createElement(Idr,{asChild:!0,trapped:w0,onMountAutoFocus:EA(Q0,ze=>{var kc;ze.preventDefault(),(kc=zb.current)===null||kc===void 0||kc.focus()}),onUnmountAutoFocus:Dx},X1.createElement(UDb,{asChild:!0,disableOutsidePointerEvents:Px,onEscapeKeyDown:i1,onPointerDownOutside:H1,onFocusOutside:T1,onInteractOutside:la,onDismiss:Sa},X1.createElement($Ar,ri({asChild:!0},Ra,{dir:_a.dir,orientation:"vertical",loop:r0,currentTabStopId:zf,onCurrentTabStopIdChange:yb,onEntryFocus:EA(Xx,ze=>{_a.isUsingKeyboardRef.current||ze.preventDefault()})}),X1.createElement(vAr,ri({role:"menu","aria-orientation":"vertical","data-state":Tor(Bf.open),"data-radix-menu-content":"",dir:_a.dir},aa,La,{ref:he,style:{outline:"none",...La.style},onKeyDown:EA(La.onKeyDown,ze=>{const lc=ze.target.closest("[data-radix-menu-content]")===ze.currentTarget,Yc=ze.ctrlKey||ze.altKey||ze.metaKey,Sn=ze.key.length===1;lc&&(ze.key==="Tab"&&ze.preventDefault(),!Yc&&Sn&&l9(ze.key));const Mi=zb.current;if(ze.target!==Mi||!_or.includes(ze.key))return;ze.preventDefault();const hd=Ba().filter(__=>!__.disabled).map(__=>__.ref.current);SCb.includes(ze.key)&&hd.reverse(),Ror(hd)}),onBlur:EA(C.onBlur,ze=>{ze.currentTarget.contains(ze.target)||(window.clearTimeout(g5.current),b5.current="")}),onPointerMove:EA(C.onPointerMove,ekf(ze=>{const kc=ze.target,lc=X5.current!==ze.clientX;if(ze.currentTarget.contains(kc)&&lc){const Yc=ze.clientX>X5.current?"right":"left";kr.current=Yc,X5.current=ze.clientX}}))})))))))});const Ior=X1.forwardRef((C,S)=>{const{__scopeMenu:G,...r0}=C;return X1.createElement(gw.div,ri({role:"group"},r0,{ref:S}))});const Sor=X1.forwardRef((C,S)=>{const{__scopeMenu:G,...r0}=C;return X1.createElement(gw.div,ri({},r0,{ref:S}))}),bkf="MenuItem",fgb="menu.itemSelect",jor=X1.forwardRef((C,S)=>{const{disabled:G=!1,onSelect:r0,...w0}=C,Q0=X1.useRef(null),Dx=Dyf(bkf,C.__scopeMenu),Px=LCb(bkf,C.__scopeMenu),Xx=_j(S,Q0),i1=X1.useRef(!1),H1=()=>{const T1=Q0.current;if(!G&&T1){const la=new CustomEvent(fgb,{bubbles:!0,cancelable:!0});T1.addEventListener(fgb,Sa=>r0==null?void 0:r0(Sa),{once:!0}),lyf(T1,la),la.defaultPrevented?i1.current=!1:Dx.onClose()}};return X1.createElement(Oor,ri({},w0,{ref:Xx,disabled:G,onClick:EA(C.onClick,H1),onPointerDown:T1=>{var la;(la=C.onPointerDown)===null||la===void 0||la.call(C,T1),i1.current=!0},onPointerUp:EA(C.onPointerUp,T1=>{var la;i1.current||(la=T1.currentTarget)===null||la===void 0||la.click()}),onKeyDown:EA(C.onKeyDown,T1=>{const la=Px.searchRef.current!=="";G||la&&T1.key===" "||akf.includes(T1.key)&&(T1.currentTarget.click(),T1.preventDefault())})}))}),Oor=X1.forwardRef((C,S)=>{const{__scopeMenu:G,disabled:r0=!1,textValue:w0,...Q0}=C,Dx=LCb(bkf,G),Px=OCb(G),Xx=X1.useRef(null),i1=_j(S,Xx),[H1,T1]=X1.useState(!1),[la,Sa]=X1.useState("");return X1.useEffect(()=>{const xa=Xx.current;if(xa){var La;Sa(((La=xa.textContent)!==null&&La!==void 0?La:"").trim())}},[Q0.children]),X1.createElement(fkf.ItemSlot,{scope:G,disabled:r0,textValue:w0??la},X1.createElement(MAr,ri({asChild:!0},Px,{focusable:!r0}),X1.createElement(gw.div,ri({role:"menuitem","data-highlighted":H1?"":void 0,"aria-disabled":r0||void 0,"data-disabled":r0?"":void 0},Q0,{ref:i1,onPointerMove:EA(C.onPointerMove,ekf(xa=>{r0?Dx.onItemLeave(xa):(Dx.onItemEnter(xa),xa.defaultPrevented||xa.currentTarget.focus())})),onPointerLeave:EA(C.onPointerLeave,ekf(xa=>Dx.onItemLeave(xa))),onFocus:EA(C.onFocus,()=>T1(!0)),onBlur:EA(C.onBlur,()=>T1(!1))}))))});const Por="MenuRadioGroup",[OPr,PPr]=JC0(Por,{value:void 0,onValueChange:()=>{}});const Lor="MenuItemIndicator",[LPr,FPr]=JC0(Lor,{checked:!1});const For="MenuSub",[TPr,RPr]=JC0(For);function Tor(C){return C?"open":"closed"}function Ror(C){const S=document.activeElement;for(const G of C)if(G===S||(G.focus(),document.activeElement!==S))return}function Hor(C,S){return C.map((G,r0)=>C[(S+r0)%C.length])}function qor(C,S,G){const w0=S.length>1&&Array.from(S).every(i1=>i1===S[0])?S[0]:S,Q0=G?C.indexOf(G):-1;let Dx=Hor(C,Math.max(Q0,0));w0.length===1&&(Dx=Dx.filter(i1=>i1!==G));const Xx=Dx.find(i1=>i1.toLowerCase().startsWith(w0.toLowerCase()));return Xx!==G?Xx:void 0}function Uor(C,S){const{x:G,y:r0}=C;let w0=!1;for(let Q0=0,Dx=S.length-1;Q0r0!=H1>r0&&G<(i1-Px)*(r0-Xx)/(H1-Xx)+Px&&(w0=!w0)}return w0}function Jor(C,S){if(!S)return!1;const G={x:C.clientX,y:C.clientY};return Uor(G,S)}function ekf(C){return S=>S.pointerType==="mouse"?C(S):void 0}const Nor=yor,Yor=Bor,zor=Dor,Gor=Eor,Qor=Ior,Vor=Sor,Kor=jor;const TCb="DropdownMenu",[Xor,HPr]=r0x(TCb,[jCb]),NC0=jCb(),[Zor,RCb]=Xor(TCb),Wor=C=>{const{__scopeDropdownMenu:S,children:G,dir:r0,open:w0,defaultOpen:Q0,onOpenChange:Dx,modal:Px=!0}=C,Xx=NC0(S),i1=X1.useRef(null),[H1=!1,T1]=_yf({prop:w0,defaultProp:Q0,onChange:Dx});return X1.createElement(Zor,{scope:S,triggerId:Vmf(),triggerRef:i1,contentId:Vmf(),open:H1,onOpenChange:T1,onOpenToggle:X1.useCallback(()=>T1(la=>!la),[T1]),modal:Px},X1.createElement(Nor,ri({},Xx,{open:H1,onOpenChange:T1,dir:r0,modal:Px}),G))},xsr="DropdownMenuTrigger",asr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,disabled:r0=!1,...w0}=C,Q0=RCb(xsr,G),Dx=NC0(G);return X1.createElement(Yor,ri({asChild:!0},Dx),X1.createElement(gw.button,ri({type:"button",id:Q0.triggerId,"aria-haspopup":"menu","aria-expanded":Q0.open,"aria-controls":Q0.open?Q0.contentId:void 0,"data-state":Q0.open?"open":"closed","data-disabled":r0?"":void 0,disabled:r0},w0,{ref:syf(S,Q0.triggerRef),onPointerDown:EA(C.onPointerDown,Px=>{!r0&&Px.button===0&&Px.ctrlKey===!1&&(Q0.onOpenToggle(),Q0.open||Px.preventDefault())}),onKeyDown:EA(C.onKeyDown,Px=>{r0||(["Enter"," "].includes(Px.key)&&Q0.onOpenToggle(),Px.key==="ArrowDown"&&Q0.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(Px.key)&&Px.preventDefault())})})))});const fsr=C=>{const{__scopeDropdownMenu:S,...G}=C,r0=NC0(S);return X1.createElement(zor,ri({},r0,G))},bsr="DropdownMenuContent",esr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=RCb(bsr,G),Q0=NC0(G),Dx=X1.useRef(!1);return X1.createElement(Gor,ri({id:w0.contentId,"aria-labelledby":w0.triggerId},Q0,r0,{ref:S,onCloseAutoFocus:EA(C.onCloseAutoFocus,Px=>{var Xx;Dx.current||(Xx=w0.triggerRef.current)===null||Xx===void 0||Xx.focus(),Dx.current=!1,Px.preventDefault()}),onInteractOutside:EA(C.onInteractOutside,Px=>{const Xx=Px.detail.originalEvent,i1=Xx.button===0&&Xx.ctrlKey===!0,H1=Xx.button===2||i1;(!w0.modal||H1)&&(Dx.current=!0)}),style:{...C.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))});const csr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=NC0(G);return X1.createElement(Qor,ri({},w0,r0,{ref:S}))});const rsr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=NC0(G);return X1.createElement(Vor,ri({},w0,r0,{ref:S}))});const nsr=X1.forwardRef((C,S)=>{const{__scopeDropdownMenu:G,...r0}=C,w0=NC0(G);return X1.createElement(Kor,ri({},w0,r0,{ref:S}))});const tsr=Wor,isr=asr,usr=fsr,dsr=esr,Asr=csr,osr=rsr,ssr=nsr;function vsr(C){return ec("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",style:{fill:"var(--colors-blue10)"},...C,children:ec("path",{d:"M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z"})})}function lsr({isExpanded:C,onExampleClick:S}){return ci(tsr,{children:[ec(isr,{asChild:!0,children:ci("div",{className:"IconButton",children:[ec(iur,{}),C?"Examples":null]})}),ec(usr,{children:ci(dsr,{className:"DropdownContent",align:"start",alignOffset:-5,side:"left",sideOffset:10,children:[ec(osr,{className:"DropdownLabel",children:"Code examples"}),ec(Asr,{className:"DropdownGroup",children:aCb.map(G=>ci(ssr,{className:"DropdownItem",onClick:r0=>S(G),children:[G.name.includes("React")?ec(vsr,{}):null,G.name]},G.name))})]})})]})}function _sr({isExpanded:C}){const{toast:S}=xCb();return ci("button",{className:"IconButton",onClick:()=>{navigator.clipboard.writeText(window.location.href),S({title:"URL copied to your clipboard",description:window.location.href.slice(0,50)+"..."})},children:[ec(dur,{}),C?"Share":null]})}const sj={Reason:"Reason",OCaml:"OCaml"},pC0={ON:"on",OFF:"off"},hsr=new Worker(new URL(""+new URL("worker-71d2be9f.js",import.meta.url).href,self.location),{type:"module"});function psr(){return ec("span",{className:"SquareLogo OCaml"})}function msr(){return ec("span",{className:"SquareLogo Reason"})}const sHx=(...C)=>C.reduce((S,G)=>S.concat(typeof G=="string"?G:Array.isArray(G)?sHx(...G):typeof G=="object"&&G?Object.keys(G).map(r0=>G[r0]?r0:""):""),[]).join(" ");function bgb({when:C,children:S}){return ec("div",{style:C?{position:"absolute",top:"-10000px",left:"-10000px",visibility:"hidden"}:{visibility:"visible",flex:"1"},children:S})}function ksr({count:C}){return ec("span",{className:"Counter",children:C})}function ysr({language:C,onChange:S}){return ci("div",{className:"Tabs",children:[ci("button",{className:sHx(["IconButton",C===sj.OCaml?"active":""]),onClick:()=>S(sj.OCaml),children:[ec(psr,{}),"OCaml"]}),ci("button",{className:sHx(["IconButton",C===sj.Reason?"active":""]),onClick:()=>S(sj.Reason),children:[ec(msr,{}),"Reason"]})]})}function Bsr({onExampleClick:C}){const[S,G]=X1.useState(!1),r0=()=>G(!S),w0=!S;return ec("div",{className:"Sidebar",children:ci("div",{className:"Menu",children:[ci("div",{className:"ActionMenu",children:[ec("hr",{className:"Separator"}),ec("div",{className:"ActionItem",children:ec(_sr,{isExpanded:w0})}),ec("hr",{className:"Separator"}),ec("div",{className:"ActionItem",children:ec(lsr,{isExpanded:w0,onExampleClick:C})}),ec("hr",{className:"Separator"}),ec("div",{className:"ActionItem",children:ci("a",{className:"IconButton",href:"https://github.com/melange-re/melange",target:"_blank",children:[ec(tur,{}),w0?"GitHub":null]})}),ec("div",{className:"ActionItem",children:ci("a",{className:"IconButton",href:"https://opam.ocaml.org/packages/melange",target:"_blank",children:[ec(uur,{}),w0?"OPAM":null]})})]}),ec("div",{className:"ActionItem",children:w0?ec("div",{className:"Info",children:ci("div",{className:"Versions",children:[ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"Melange"}),ec("span",{className:"Text-xs Number",children:"dev"})]}),ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"OCaml"}),ec("span",{className:"Text-xs Number",children:"5.1.1"})]}),ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"Reason"}),ec("span",{className:"Text-xs Number",children:"3.10.0"})]}),ci("span",{className:"Version",children:[ec("span",{className:"Text-xs",children:"ReasonReact"}),ec("span",{className:"Text-xs Number",children:"dev"})]})]})}):null}),ec("hr",{className:"Separator"}),ec("button",{className:"IconButton",onClick:Q0=>r0(),children:S?ec(cur,{}):ec(eur,{})})]})})}function gsr({codeHasReact:C}){return ec("div",{className:"Live",children:C?ec("div",{id:"preview"},"react"):ec("div",{id:"preview",children:ci("div",{className:"EmptyPreview",children:[ci("p",{className:"Text-m",children:["This div has the ID selector ",ec("code",{children:"preview"}),"."]}),ec("br",{}),ci("p",{className:"Text-m",children:['Choose "React Greetings" in the Examples menu to see it in action, or override by rendering into the element with ',ec("code",{children:'ReactDOM.querySelector("#preview")'})]})]})},"empty")})}function wsr({logs:C,clearLogs:S}){const[r0,w0]=X1.useState(!1),Q0=X1.useRef(null),Dx=la=>{const Sa=Q0.current,xa=Sa==null?void 0:Sa.getCollapsed();Sa&&xa?(Sa.expand(),w0(!1)):Sa&&!xa&&(Sa.collapse(),w0(!0))},[Px,Xx]=X1.useState(!0),i1=X1.useRef(null),H1=X1.useRef(null);Ddr(H1,()=>Xx(!1)),X1.useEffect(()=>{Px&&i1.current.scrollIntoView()},[C,Px]);const T1=la=>S();return ci(raa,{children:[ci("div",{className:"ConsoleHeader",children:[ci("div",{className:"Title",children:[ec("span",{className:"Text-xs",children:"Console"}),ec(ksr,{count:C.length})]}),ci("div",{className:"Actions",children:[ec("button",{className:"IconButton Clear",onClick:T1,children:ec(nur,{})}),ec("button",{className:"IconButton",onClick:Dx,children:r0?ec(RDb,{}):ec(TDb,{})})]})]}),ec(DC0,{ref:Q0,collapsible:!0,defaultSize:20,children:ci("div",{ref:H1,className:"Console Scrollbar",children:[C.map((la,Sa)=>ec("div",{className:"Item",children:la},Sa)),ec("div",{className:"EmptyItem",ref:i1})]})})]})}function Dsr({problems:C,warnings:S}){const[r0,w0]=X1.useState(!1),Q0=X1.useRef(null),Dx=i1=>{const H1=Q0.current,T1=H1==null?void 0:H1.getCollapsed();H1&&T1?(H1.expand(),w0(!1)):H1&&!T1&&(H1.collapse(),w0(!0))},Px=C&&C.length>0?C.map(i1=>i1.msg).join(`
`):"",Xx=S&&S.length>0?S.map(i1=>i1.msg).join(`
`):"";return ci(raa,{children:[ci("div",{className:"ProblemsHeader",children:[ec("span",{className:"Text-xs",children:"Problems"}),ec("button",{className:"IconButton",onClick:Dx,children:r0?ec(RDb,{}):ec(TDb,{})})]}),ec(DC0,{collapsible:!0,defaultSize:20,collapsedSize:10,minSize:10,ref:Q0,children:C&&C.length>0?ec("div",{className:"Problems Scrollbar",children:Px}):S&&S.length>0?ec("div",{className:"Problems Scrollbar",children:Xx}):ec("div",{className:"Problems Empty",children:"No problems!"})})]})}const Csr=C=>{try{let S=btoa((C==null?void 0:C.code)||"");return{...C,code:S}}catch{return C}},Esr=C=>{try{let S=atob((C==null?void 0:C.code)||"");return{...C,code:S}}catch{return C}};function $sr(C){const S="__store",[G,r0]=mur(),[w0,Q0]=wdr(S,C),Dx=Object.keys(C),Xx=(Object.entries(G).map(([la,Sa])=>Dx.includes(la)?[la,Sa]:null).filter(la=>!!la)||[]).reduce((la,[Sa,xa])=>({...la,[Sa]:xa}),{}),i1=Esr({...w0,...Xx}),[H1,T1]=X1.useState(i1);return X1.useEffect(()=>{let la=Csr(H1);r0(la),Q0(la)},[H1]),[H1,T1]}function Msr(C){let S=window.ocamlformat.format(C);if(!Array.isArray(S))return C;const G=S[0],r0=S[1],w0=0,Q0=1;if(G===w0)return r0;if(G===Q0)return console.log(r0),C}const Isr=C=>{try{return ocaml.printRE(ocaml.parseRE(C))}catch(S){return console.log(S),C}};function Ssr({language:C,value:S}){return ec("div",{className:"Editor",children:ec(yDb,{theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1}},height:"100%",language:C,value:S})})}const Ypf=({js_warning_error_msg:C,row:S,column:G,endRow:r0,endColumn:w0,text:Q0})=>({msg:C,loc:{row:S+1,column:G+1,endRow:r0+1,endColumn:w0+1,text:Q0}}),egb=C=>S=>({startLineNumber:S.loc.row,startColumn:S.loc.column,endLineNumber:S.loc.endRow,endColumn:S.loc.endColumn,message:S.msg,severity:C}),jsr=(C,S)=>{let G;try{G=C==sj.Reason?ocaml.compileRE(S):ocaml.compileML(S)}catch(r0){G={js_warning_error_msg:r0.message}}if(G){let r0;return G.js_warning_error_msg?r0=[Ypf(G)]:G.warning_errors&&(r0=G.warning_errors.map(Ypf)),r0?{typeHints:[],warnings:[],problems:r0}:{typeHints:G.type_hints.sort((w0,Q0)=>{let Dx=w0.end.line-w0.start.line,Px=Q0.end.line-Q0.start.line;if(DxPx)return 1;{let Xx=w0.end.col-w0.start.col,i1=Q0.end.col-Q0.start.col;return Xxi1?1:0}}),javascriptCode:G.js_code,warnings:G.warnings.map(Ypf)}}else return{typeHints:[],warnings:[],problems:[{js_warning_error_msg:"No result was returned from compilation",row,column,endRow,endColumn,text:"No result was returned from compilation"}]}};function cgb(C,S,G){if(C&&S.current){const r0="playground";G!=null&&G.problems?C.editor.setModelMarkers(S.current.getModel(),r0,G.problems.map(egb(C.MarkerSeverity.Error))):G!=null&&G.warnings?C.editor.setModelMarkers(S.current.getModel(),r0,G.warnings.map(egb(C.MarkerSeverity.Warning))):C.editor.removeAllMarkers(r0)}}function Osr(){var Ba;const C={language:sj.OCaml,code:aCb[0].ml,live:pC0.OFF},[S,G]=$sr(C),{language:r0,code:w0,live:Q0}=S,[Dx]=xur(w0,300),Px=X1.useMemo(()=>jsr(r0,Dx),[Dx]),[Xx,i1,H1]=Xir(hsr,"bundle",{logs:[]}),T1=zf=>G({...S,live:zf}),la=zf=>G({...S,code:zf}),Sa=({language:zf,code:yb})=>G({...S,language:zf,code:yb}),xa=X1.useRef(null);function La(zf,yb){xa.current=zf,cgb(yb,xa,Px)}function Bf(){i1({type:"clear.logs"}),pur()}const _a=uir();X1.useEffect(()=>{_a&&(_a.languages.register({id:sj.OCaml}),_a.languages.setMonarchTokensProvider(sj.OCaml,Cdr),_a.languages.register({id:sj.Reason}),_a.languages.setMonarchTokensProvider(sj.Reason,Edr))},[_a]),X1.useEffect(()=>{let zf;return _a&&(zf=_a.languages.registerHoverProvider(r0,{provideHover:function(yb,zb){const{lineNumber:he,column:g5}=zb;if(Px!=null&&Px.typeHints){let b5=function(Yr){var kr=Yr.end,X5=Yr.start;return he>=X5.line&&he<=kr.line&&g5>=X5.col+1&&g5<=kr.col+1};const W5=Px==null?void 0:Px.typeHints.find(b5);if(W5){const Yr=new _a.Range(W5.start.line,W5.start.col+1,W5.end.line,W5.end.col+1);let kr=W5.hint;if(r0==sj.Reason)try{if(kr.substring(0,5)==="type ")kr=ocaml.printRE(ocaml.parseML(kr));else{const X5="type t = ";kr=ocaml.printRE(ocaml.parseML(X5+kr)).slice(X5.length).slice(0,-2)}}catch{console.error("Error formatting type hint: ",kr)}return{range:Yr,contents:[{value:`\`\`\`${r0}
${kr}
diff --git a/unstable/playground/assets/worker-d1352ec0.js b/unstable/playground/assets/worker-71d2be9f.js
similarity index 65%
rename from unstable/playground/assets/worker-d1352ec0.js
rename to unstable/playground/assets/worker-71d2be9f.js
index 4a18b3459..3655fe544 100644
--- a/unstable/playground/assets/worker-d1352ec0.js
+++ b/unstable/playground/assets/worker-71d2be9f.js
@@ -1,4 +1,15146 @@
-(function(){"use strict";var ec=`// Generated by Melange
+(function(){"use strict";var tc=`// Generated by Melange
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
+`,rc=`// Generated by Melange
+
+import * as Caml from "melange.js/caml.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+import * as Js__Js_math from "melange.js/js_math.js";
+
+function get(arr, i) {
+ if (i >= 0 && i < arr.length) {
+ return Caml_option.some(arr[i]);
+ }
+
+}
+
+function getExn(arr, i) {
+ if (!(i >= 0 && i < arr.length)) {
+ throw {
+ MEL_EXN_ID: "Assert_failure",
+ _1: [
+ "jscomp/others/belt_Array.ml",
+ 29,
+ 2
+ ],
+ Error: new Error()
+ };
+ }
+ return arr[i];
+}
+
+function set(arr, i, v) {
+ if (i >= 0 && i < arr.length) {
+ arr[i] = v;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function setExn(arr, i, v) {
+ if (!(i >= 0 && i < arr.length)) {
+ throw {
+ MEL_EXN_ID: "Assert_failure",
+ _1: [
+ "jscomp/others/belt_Array.ml",
+ 39,
+ 2
+ ],
+ Error: new Error()
+ };
+ }
+ arr[i] = v;
+}
+
+function swapUnsafe(xs, i, j) {
+ var tmp = xs[i];
+ xs[i] = xs[j];
+ xs[j] = tmp;
+}
+
+function shuffleInPlace(xs) {
+ var len = xs.length;
+ for(var i = 0; i < len; ++i){
+ swapUnsafe(xs, i, Js__Js_math.random_int(i, len));
+ }
+}
+
+function shuffle(xs) {
+ var result = xs.slice(0);
+ shuffleInPlace(result);
+ return result;
+}
+
+function reverseInPlace(xs) {
+ var len = xs.length;
+ var ofs = 0;
+ for(var i = 0 ,i_finish = len / 2 | 0; i < i_finish; ++i){
+ swapUnsafe(xs, ofs + i | 0, ((ofs + len | 0) - i | 0) - 1 | 0);
+ }
+}
+
+function reverse(xs) {
+ var len = xs.length;
+ var result = new Array(len);
+ for(var i = 0; i < len; ++i){
+ result[i] = xs[(len - 1 | 0) - i | 0];
+ }
+ return result;
+}
+
+function make(l, f) {
+ if (l <= 0) {
+ return [];
+ }
+ var res = new Array(l);
+ for(var i = 0; i < l; ++i){
+ res[i] = f;
+ }
+ return res;
+}
+
+function makeByU(l, f) {
+ if (l <= 0) {
+ return [];
+ }
+ var res = new Array(l);
+ for(var i = 0; i < l; ++i){
+ res[i] = f(i);
+ }
+ return res;
+}
+
+function makeBy(l, f) {
+ return makeByU(l, Curry.__1(f));
+}
+
+function makeByAndShuffleU(l, f) {
+ var u = makeByU(l, f);
+ shuffleInPlace(u);
+ return u;
+}
+
+function makeByAndShuffle(l, f) {
+ return makeByAndShuffleU(l, Curry.__1(f));
+}
+
+function range(start, finish) {
+ var cut = finish - start | 0;
+ if (cut < 0) {
+ return [];
+ }
+ var arr = new Array(cut + 1 | 0);
+ for(var i = 0; i <= cut; ++i){
+ arr[i] = start + i | 0;
+ }
+ return arr;
+}
+
+function rangeBy(start, finish, step) {
+ var cut = finish - start | 0;
+ if (cut < 0 || step <= 0) {
+ return [];
+ }
+ var nb = (cut / step | 0) + 1 | 0;
+ var arr = new Array(nb);
+ var cur = start;
+ for(var i = 0; i < nb; ++i){
+ arr[i] = cur;
+ cur = cur + step | 0;
+ }
+ return arr;
+}
+
+function zip(xs, ys) {
+ var lenx = xs.length;
+ var leny = ys.length;
+ var len = lenx < leny ? lenx : leny;
+ var s = new Array(len);
+ for(var i = 0; i < len; ++i){
+ s[i] = [
+ xs[i],
+ ys[i]
+ ];
+ }
+ return s;
+}
+
+function zipByU(xs, ys, f) {
+ var lenx = xs.length;
+ var leny = ys.length;
+ var len = lenx < leny ? lenx : leny;
+ var s = new Array(len);
+ for(var i = 0; i < len; ++i){
+ s[i] = f(xs[i], ys[i]);
+ }
+ return s;
+}
+
+function zipBy(xs, ys, f) {
+ return zipByU(xs, ys, Curry.__2(f));
+}
+
+function concat(a1, a2) {
+ var l1 = a1.length;
+ var l2 = a2.length;
+ var a1a2 = new Array(l1 + l2 | 0);
+ for(var i = 0; i < l1; ++i){
+ a1a2[i] = a1[i];
+ }
+ for(var i$1 = 0; i$1 < l2; ++i$1){
+ a1a2[l1 + i$1 | 0] = a2[i$1];
+ }
+ return a1a2;
+}
+
+function concatMany(arrs) {
+ var lenArrs = arrs.length;
+ var totalLen = 0;
+ for(var i = 0; i < lenArrs; ++i){
+ totalLen = totalLen + arrs[i].length | 0;
+ }
+ var result = new Array(totalLen);
+ totalLen = 0;
+ for(var j = 0; j < lenArrs; ++j){
+ var cur = arrs[j];
+ for(var k = 0 ,k_finish = cur.length; k < k_finish; ++k){
+ result[totalLen] = cur[k];
+ totalLen = totalLen + 1 | 0;
+ }
+ }
+ return result;
+}
+
+function slice(a, offset, len) {
+ if (len <= 0) {
+ return [];
+ }
+ var lena = a.length;
+ var ofs = offset < 0 ? Caml.caml_int_max(lena + offset | 0, 0) : offset;
+ var hasLen = lena - ofs | 0;
+ var copyLength = hasLen < len ? hasLen : len;
+ if (copyLength <= 0) {
+ return [];
+ }
+ var result = new Array(copyLength);
+ for(var i = 0; i < copyLength; ++i){
+ result[i] = a[ofs + i | 0];
+ }
+ return result;
+}
+
+function sliceToEnd(a, offset) {
+ var lena = a.length;
+ var ofs = offset < 0 ? Caml.caml_int_max(lena + offset | 0, 0) : offset;
+ var len = lena > ofs ? lena - ofs | 0 : 0;
+ var result = new Array(len);
+ for(var i = 0; i < len; ++i){
+ result[i] = a[ofs + i | 0];
+ }
+ return result;
+}
+
+function fill(a, offset, len, v) {
+ if (len <= 0) {
+ return ;
+ }
+ var lena = a.length;
+ var ofs = offset < 0 ? Caml.caml_int_max(lena + offset | 0, 0) : offset;
+ var hasLen = lena - ofs | 0;
+ var fillLength = hasLen < len ? hasLen : len;
+ if (fillLength <= 0) {
+ return ;
+ }
+ for(var i = ofs ,i_finish = ofs + fillLength | 0; i < i_finish; ++i){
+ a[i] = v;
+ }
+}
+
+function blitUnsafe(a1, srcofs1, a2, srcofs2, blitLength) {
+ if (srcofs2 <= srcofs1) {
+ for(var j = 0; j < blitLength; ++j){
+ a2[j + srcofs2 | 0] = a1[j + srcofs1 | 0];
+ }
+ return ;
+ }
+ for(var j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1){
+ a2[j$1 + srcofs2 | 0] = a1[j$1 + srcofs1 | 0];
+ }
+}
+
+function blit(a1, ofs1, a2, ofs2, len) {
+ var lena1 = a1.length;
+ var lena2 = a2.length;
+ var srcofs1 = ofs1 < 0 ? Caml.caml_int_max(lena1 + ofs1 | 0, 0) : ofs1;
+ var srcofs2 = ofs2 < 0 ? Caml.caml_int_max(lena2 + ofs2 | 0, 0) : ofs2;
+ var blitLength = Caml.caml_int_min(len, Caml.caml_int_min(lena1 - srcofs1 | 0, lena2 - srcofs2 | 0));
+ if (srcofs2 <= srcofs1) {
+ for(var j = 0; j < blitLength; ++j){
+ a2[j + srcofs2 | 0] = a1[j + srcofs1 | 0];
+ }
+ return ;
+ }
+ for(var j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1){
+ a2[j$1 + srcofs2 | 0] = a1[j$1 + srcofs1 | 0];
+ }
+}
+
+function forEachU(a, f) {
+ for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){
+ f(a[i]);
+ }
+}
+
+function forEach(a, f) {
+ forEachU(a, Curry.__1(f));
+}
+
+function mapU(a, f) {
+ var l = a.length;
+ var r = new Array(l);
+ for(var i = 0; i < l; ++i){
+ r[i] = f(a[i]);
+ }
+ return r;
+}
+
+function map(a, f) {
+ return mapU(a, Curry.__1(f));
+}
+
+function flatMapU(a, f) {
+ return concatMany(mapU(a, f));
+}
+
+function flatMap(a, f) {
+ return concatMany(mapU(a, Curry.__1(f)));
+}
+
+function getByU(a, p) {
+ var l = a.length;
+ var i = 0;
+ var r;
+ while(r === undefined && i < l) {
+ var v = a[i];
+ if (p(v)) {
+ r = Caml_option.some(v);
+ }
+ i = i + 1 | 0;
+ };
+ return r;
+}
+
+function getBy(a, p) {
+ return getByU(a, Curry.__1(p));
+}
+
+function getIndexByU(a, p) {
+ var l = a.length;
+ var i = 0;
+ var r;
+ while(r === undefined && i < l) {
+ var v = a[i];
+ if (p(v)) {
+ r = i;
+ }
+ i = i + 1 | 0;
+ };
+ return r;
+}
+
+function getIndexBy(a, p) {
+ return getIndexByU(a, Curry.__1(p));
+}
+
+function keepU(a, f) {
+ var l = a.length;
+ var r = new Array(l);
+ var j = 0;
+ for(var i = 0; i < l; ++i){
+ var v = a[i];
+ if (f(v)) {
+ r[j] = v;
+ j = j + 1 | 0;
+ }
+
+ }
+ r.length = j;
+ return r;
+}
+
+function keep(a, f) {
+ return keepU(a, Curry.__1(f));
+}
+
+function keepWithIndexU(a, f) {
+ var l = a.length;
+ var r = new Array(l);
+ var j = 0;
+ for(var i = 0; i < l; ++i){
+ var v = a[i];
+ if (f(v, i)) {
+ r[j] = v;
+ j = j + 1 | 0;
+ }
+
+ }
+ r.length = j;
+ return r;
+}
+
+function keepWithIndex(a, f) {
+ return keepWithIndexU(a, Curry.__2(f));
+}
+
+function keepMapU(a, f) {
+ var l = a.length;
+ var r = new Array(l);
+ var j = 0;
+ for(var i = 0; i < l; ++i){
+ var v = a[i];
+ var v$1 = f(v);
+ if (v$1 !== undefined) {
+ r[j] = Caml_option.valFromOption(v$1);
+ j = j + 1 | 0;
+ }
+
+ }
+ r.length = j;
+ return r;
+}
+
+function keepMap(a, f) {
+ return keepMapU(a, Curry.__1(f));
+}
+
+function forEachWithIndexU(a, f) {
+ for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){
+ f(i, a[i]);
+ }
+}
+
+function forEachWithIndex(a, f) {
+ forEachWithIndexU(a, Curry.__2(f));
+}
+
+function mapWithIndexU(a, f) {
+ var l = a.length;
+ var r = new Array(l);
+ for(var i = 0; i < l; ++i){
+ r[i] = f(i, a[i]);
+ }
+ return r;
+}
+
+function mapWithIndex(a, f) {
+ return mapWithIndexU(a, Curry.__2(f));
+}
+
+function reduceU(a, x, f) {
+ var r = x;
+ for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){
+ r = f(r, a[i]);
+ }
+ return r;
+}
+
+function reduce(a, x, f) {
+ return reduceU(a, x, Curry.__2(f));
+}
+
+function reduceReverseU(a, x, f) {
+ var r = x;
+ for(var i = a.length - 1 | 0; i >= 0; --i){
+ r = f(r, a[i]);
+ }
+ return r;
+}
+
+function reduceReverse(a, x, f) {
+ return reduceReverseU(a, x, Curry.__2(f));
+}
+
+function reduceReverse2U(a, b, x, f) {
+ var r = x;
+ var len = Caml.caml_int_min(a.length, b.length);
+ for(var i = len - 1 | 0; i >= 0; --i){
+ r = f(r, a[i], b[i]);
+ }
+ return r;
+}
+
+function reduceReverse2(a, b, x, f) {
+ return reduceReverse2U(a, b, x, Curry.__3(f));
+}
+
+function reduceWithIndexU(a, x, f) {
+ var r = x;
+ for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){
+ r = f(r, a[i], i);
+ }
+ return r;
+}
+
+function reduceWithIndex(a, x, f) {
+ return reduceWithIndexU(a, x, Curry.__3(f));
+}
+
+function everyU(arr, b) {
+ var len = arr.length;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ if (i === len) {
+ return true;
+ }
+ if (!b(arr[i])) {
+ return false;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function every(arr, f) {
+ return everyU(arr, Curry.__1(f));
+}
+
+function someU(arr, b) {
+ var len = arr.length;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ if (i === len) {
+ return false;
+ }
+ if (b(arr[i])) {
+ return true;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function some(arr, f) {
+ return someU(arr, Curry.__1(f));
+}
+
+function everyAux2(arr1, arr2, _i, b, len) {
+ while(true) {
+ var i = _i;
+ if (i === len) {
+ return true;
+ }
+ if (!b(arr1[i], arr2[i])) {
+ return false;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function every2U(a, b, p) {
+ return everyAux2(a, b, 0, p, Caml.caml_int_min(a.length, b.length));
+}
+
+function every2(a, b, p) {
+ return every2U(a, b, Curry.__2(p));
+}
+
+function some2U(a, b, p) {
+ var _i = 0;
+ var len = Caml.caml_int_min(a.length, b.length);
+ while(true) {
+ var i = _i;
+ if (i === len) {
+ return false;
+ }
+ if (p(a[i], b[i])) {
+ return true;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function some2(a, b, p) {
+ return some2U(a, b, Curry.__2(p));
+}
+
+function eqU(a, b, p) {
+ var lena = a.length;
+ var lenb = b.length;
+ if (lena === lenb) {
+ return everyAux2(a, b, 0, p, lena);
+ } else {
+ return false;
+ }
+}
+
+function eq(a, b, p) {
+ return eqU(a, b, Curry.__2(p));
+}
+
+function cmpU(a, b, p) {
+ var lena = a.length;
+ var lenb = b.length;
+ if (lena > lenb) {
+ return 1;
+ } else if (lena < lenb) {
+ return -1;
+ } else {
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ if (i === lena) {
+ return 0;
+ }
+ var c = p(a[i], b[i]);
+ if (c !== 0) {
+ return c;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+ }
+}
+
+function cmp(a, b, p) {
+ return cmpU(a, b, Curry.__2(p));
+}
+
+function partitionU(a, f) {
+ var l = a.length;
+ var i = 0;
+ var j = 0;
+ var a1 = new Array(l);
+ var a2 = new Array(l);
+ for(var ii = 0; ii < l; ++ii){
+ var v = a[ii];
+ if (f(v)) {
+ a1[i] = v;
+ i = i + 1 | 0;
+ } else {
+ a2[j] = v;
+ j = j + 1 | 0;
+ }
+ }
+ a1.length = i;
+ a2.length = j;
+ return [
+ a1,
+ a2
+ ];
+}
+
+function partition(a, f) {
+ return partitionU(a, Curry.__1(f));
+}
+
+function unzip(a) {
+ var l = a.length;
+ var a1 = new Array(l);
+ var a2 = new Array(l);
+ for(var i = 0; i < l; ++i){
+ var match = a[i];
+ a1[i] = match[0];
+ a2[i] = match[1];
+ }
+ return [
+ a1,
+ a2
+ ];
+}
+
+function joinWithU(a, sep, toString) {
+ var l = a.length;
+ if (l === 0) {
+ return "";
+ }
+ var lastIndex = l - 1 | 0;
+ var _i = 0;
+ var _res = "";
+ while(true) {
+ var res = _res;
+ var i = _i;
+ if (i === lastIndex) {
+ return res + toString(a[i]);
+ }
+ _res = res + (toString(a[i]) + sep);
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function joinWith(a, sep, toString) {
+ return joinWithU(a, sep, Curry.__1(toString));
+}
+
+function initU(n, f) {
+ var v = new Array(n);
+ for(var i = 0; i < n; ++i){
+ v[i] = f(i);
+ }
+ return v;
+}
+
+function init(n, f) {
+ return initU(n, Curry.__1(f));
+}
+
+export {
+ get ,
+ getExn ,
+ set ,
+ setExn ,
+ shuffleInPlace ,
+ shuffle ,
+ reverseInPlace ,
+ reverse ,
+ make ,
+ range ,
+ rangeBy ,
+ makeByU ,
+ makeBy ,
+ makeByAndShuffleU ,
+ makeByAndShuffle ,
+ zip ,
+ zipByU ,
+ zipBy ,
+ unzip ,
+ concat ,
+ concatMany ,
+ slice ,
+ sliceToEnd ,
+ fill ,
+ blit ,
+ blitUnsafe ,
+ forEachU ,
+ forEach ,
+ mapU ,
+ map ,
+ flatMapU ,
+ flatMap ,
+ getByU ,
+ getBy ,
+ getIndexByU ,
+ getIndexBy ,
+ keepU ,
+ keep ,
+ keepWithIndexU ,
+ keepWithIndex ,
+ keepMapU ,
+ keepMap ,
+ forEachWithIndexU ,
+ forEachWithIndex ,
+ mapWithIndexU ,
+ mapWithIndex ,
+ partitionU ,
+ partition ,
+ reduceU ,
+ reduce ,
+ reduceReverseU ,
+ reduceReverse ,
+ reduceReverse2U ,
+ reduceReverse2 ,
+ reduceWithIndexU ,
+ reduceWithIndex ,
+ joinWithU ,
+ joinWith ,
+ someU ,
+ some ,
+ everyU ,
+ every ,
+ every2U ,
+ every2 ,
+ some2U ,
+ some2 ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ initU ,
+ init ,
+}
+/* No side effect */
+`,ac=`// Generated by Melange
+
+
+function fromString(i) {
+ var i$1 = parseFloat(i);
+ if (isNaN(i$1)) {
+ return ;
+ } else {
+ return i$1;
+ }
+}
+
+export {
+ fromString ,
+}
+/* No side effect */
+`,ic=`// Generated by Melange
+
+import * as Belt__Belt_internalBuckets from "./belt_internalBuckets.js";
+import * as Belt__Belt_internalBucketsType from "./belt_internalBucketsType.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function size(h) {
+ return h.size;
+}
+
+function copyBucketReHash(hash, h_buckets, ndata_tail, _old_bucket) {
+ while(true) {
+ var old_bucket = _old_bucket;
+ if (old_bucket === undefined) {
+ return ;
+ }
+ var nidx = hash(old_bucket.key) & (h_buckets.length - 1 | 0);
+ var tail = ndata_tail[nidx];
+ if (tail !== undefined) {
+ tail.next = old_bucket;
+ } else {
+ h_buckets[nidx] = old_bucket;
+ }
+ ndata_tail[nidx] = old_bucket;
+ _old_bucket = old_bucket.next;
+ continue ;
+ };
+}
+
+function replaceInBucket(eq, key, info, _cell) {
+ while(true) {
+ var cell = _cell;
+ if (eq(cell.key, key)) {
+ cell.value = info;
+ return false;
+ }
+ var cell$1 = cell.next;
+ if (cell$1 === undefined) {
+ return true;
+ }
+ _cell = cell$1;
+ continue ;
+ };
+}
+
+function set0(h, key, value, eq, hash) {
+ var h_buckets = h.buckets;
+ var buckets_len = h_buckets.length;
+ var i = hash(key) & (buckets_len - 1 | 0);
+ var l = h_buckets[i];
+ if (l !== undefined) {
+ if (replaceInBucket(eq, key, value, l)) {
+ h_buckets[i] = {
+ key: key,
+ value: value,
+ next: l
+ };
+ h.size = h.size + 1 | 0;
+ }
+
+ } else {
+ h_buckets[i] = {
+ key: key,
+ value: value,
+ next: undefined
+ };
+ h.size = h.size + 1 | 0;
+ }
+ if (h.size > (buckets_len << 1)) {
+ var odata = h.buckets;
+ var osize = odata.length;
+ var nsize = (osize << 1);
+ if (nsize < osize) {
+ return ;
+ }
+ var h_buckets$1 = new Array(nsize);
+ var ndata_tail = new Array(nsize);
+ h.buckets = h_buckets$1;
+ for(var i$1 = 0; i$1 < osize; ++i$1){
+ copyBucketReHash(hash, h_buckets$1, ndata_tail, odata[i$1]);
+ }
+ for(var i$2 = 0; i$2 < nsize; ++i$2){
+ var tail = ndata_tail[i$2];
+ if (tail !== undefined) {
+ tail.next = undefined;
+ }
+
+ }
+ return ;
+ }
+
+}
+
+function set(h, key, value) {
+ set0(h, key, value, h.eq, h.hash);
+}
+
+function remove(h, key) {
+ var h_buckets = h.buckets;
+ var i = h.hash(key) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[i];
+ if (bucket === undefined) {
+ return ;
+ }
+ var eq = h.eq;
+ if (eq(bucket.key, key)) {
+ h_buckets[i] = bucket.next;
+ h.size = h.size - 1 | 0;
+ return ;
+ } else {
+ var _prec = bucket;
+ var _bucket = bucket.next;
+ while(true) {
+ var bucket$1 = _bucket;
+ var prec = _prec;
+ if (bucket$1 === undefined) {
+ return ;
+ }
+ var cell_next = bucket$1.next;
+ if (eq(bucket$1.key, key)) {
+ prec.next = cell_next;
+ h.size = h.size - 1 | 0;
+ return ;
+ }
+ _bucket = cell_next;
+ _prec = bucket$1;
+ continue ;
+ };
+ }
+}
+
+function get(h, key) {
+ var h_buckets = h.buckets;
+ var nid = h.hash(key) & (h_buckets.length - 1 | 0);
+ var cell1 = h_buckets[nid];
+ if (cell1 === undefined) {
+ return ;
+ }
+ var eq = h.eq;
+ if (eq(key, cell1.key)) {
+ return Caml_option.some(cell1.value);
+ }
+ var cell2 = cell1.next;
+ if (cell2 === undefined) {
+ return ;
+ }
+ if (eq(key, cell2.key)) {
+ return Caml_option.some(cell2.value);
+ }
+ var cell3 = cell2.next;
+ if (cell3 !== undefined) {
+ if (eq(key, cell3.key)) {
+ return Caml_option.some(cell3.value);
+ } else {
+ var _buckets = cell3.next;
+ while(true) {
+ var buckets = _buckets;
+ if (buckets === undefined) {
+ return ;
+ }
+ if (eq(key, buckets.key)) {
+ return Caml_option.some(buckets.value);
+ }
+ _buckets = buckets.next;
+ continue ;
+ };
+ }
+ }
+
+}
+
+function has(h, key) {
+ var h_buckets = h.buckets;
+ var nid = h.hash(key) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[nid];
+ if (bucket !== undefined) {
+ var _cell = bucket;
+ var eq = h.eq;
+ while(true) {
+ var cell = _cell;
+ if (eq(cell.key, key)) {
+ return true;
+ }
+ var nextCell = cell.next;
+ if (nextCell === undefined) {
+ return false;
+ }
+ _cell = nextCell;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function make(hintSize, id) {
+ return Belt__Belt_internalBucketsType.make(id.hash, id.eq, hintSize);
+}
+
+function fromArray(arr, id) {
+ var hash = id.hash;
+ var eq = id.eq;
+ var len = arr.length;
+ var v = Belt__Belt_internalBucketsType.make(hash, eq, len);
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ set0(v, match[0], match[1], eq, hash);
+ }
+ return v;
+}
+
+function mergeMany(h, arr) {
+ var hash = h.hash;
+ var eq = h.eq;
+ var len = arr.length;
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ set0(h, match[0], match[1], eq, hash);
+ }
+}
+
+var clear = Belt__Belt_internalBucketsType.clear;
+
+var isEmpty = Belt__Belt_internalBucketsType.isEmpty;
+
+var copy = Belt__Belt_internalBuckets.copy;
+
+var forEachU = Belt__Belt_internalBuckets.forEachU;
+
+var forEach = Belt__Belt_internalBuckets.forEach;
+
+var reduceU = Belt__Belt_internalBuckets.reduceU;
+
+var reduce = Belt__Belt_internalBuckets.reduce;
+
+var keepMapInPlaceU = Belt__Belt_internalBuckets.keepMapInPlaceU;
+
+var keepMapInPlace = Belt__Belt_internalBuckets.keepMapInPlace;
+
+var toArray = Belt__Belt_internalBuckets.toArray;
+
+var keysToArray = Belt__Belt_internalBuckets.keysToArray;
+
+var valuesToArray = Belt__Belt_internalBuckets.valuesToArray;
+
+var getBucketHistogram = Belt__Belt_internalBuckets.getBucketHistogram;
+
+var logStats = Belt__Belt_internalBuckets.logStats;
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ set ,
+ copy ,
+ get ,
+ has ,
+ remove ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ keepMapInPlaceU ,
+ keepMapInPlace ,
+ size ,
+ toArray ,
+ keysToArray ,
+ valuesToArray ,
+ fromArray ,
+ mergeMany ,
+ getBucketHistogram ,
+ logStats ,
+}
+/* No side effect */
+`,sc=`// Generated by Melange
+
+import * as Belt__Belt_internalBuckets from "./belt_internalBuckets.js";
+import * as Belt__Belt_internalBucketsType from "./belt_internalBucketsType.js";
+import * as Caml_hash_primitive from "melange.js/caml_hash_primitive.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) {
+ while(true) {
+ var old_bucket = _old_bucket;
+ if (old_bucket === undefined) {
+ return ;
+ }
+ var nidx = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, old_bucket.key)) & (h_buckets.length - 1 | 0);
+ var tail = ndata_tail[nidx];
+ if (tail !== undefined) {
+ tail.next = old_bucket;
+ } else {
+ h_buckets[nidx] = old_bucket;
+ }
+ ndata_tail[nidx] = old_bucket;
+ _old_bucket = old_bucket.next;
+ continue ;
+ };
+}
+
+function replaceInBucket(key, info, _cell) {
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ cell.value = info;
+ return false;
+ }
+ var cell$1 = cell.next;
+ if (cell$1 === undefined) {
+ return true;
+ }
+ _cell = cell$1;
+ continue ;
+ };
+}
+
+function set(h, key, value) {
+ var h_buckets = h.buckets;
+ var buckets_len = h_buckets.length;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (buckets_len - 1 | 0);
+ var l = h_buckets[i];
+ if (l !== undefined) {
+ if (replaceInBucket(key, value, l)) {
+ h_buckets[i] = {
+ key: key,
+ value: value,
+ next: l
+ };
+ h.size = h.size + 1 | 0;
+ }
+
+ } else {
+ h_buckets[i] = {
+ key: key,
+ value: value,
+ next: undefined
+ };
+ h.size = h.size + 1 | 0;
+ }
+ if (h.size > (buckets_len << 1)) {
+ var odata = h.buckets;
+ var osize = odata.length;
+ var nsize = (osize << 1);
+ if (nsize < osize) {
+ return ;
+ }
+ var h_buckets$1 = new Array(nsize);
+ var ndata_tail = new Array(nsize);
+ h.buckets = h_buckets$1;
+ for(var i$1 = 0; i$1 < osize; ++i$1){
+ copyBucketReHash(h_buckets$1, ndata_tail, odata[i$1]);
+ }
+ for(var i$2 = 0; i$2 < nsize; ++i$2){
+ var tail = ndata_tail[i$2];
+ if (tail !== undefined) {
+ tail.next = undefined;
+ }
+
+ }
+ return ;
+ }
+
+}
+
+function remove(h, key) {
+ var h_buckets = h.buckets;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[i];
+ if (bucket !== undefined) {
+ if (bucket.key === key) {
+ h_buckets[i] = bucket.next;
+ h.size = h.size - 1 | 0;
+ return ;
+ } else {
+ var _prec = bucket;
+ var _buckets = bucket.next;
+ while(true) {
+ var buckets = _buckets;
+ var prec = _prec;
+ if (buckets === undefined) {
+ return ;
+ }
+ var cell_next = buckets.next;
+ if (buckets.key === key) {
+ prec.next = cell_next;
+ h.size = h.size - 1 | 0;
+ return ;
+ }
+ _buckets = cell_next;
+ _prec = buckets;
+ continue ;
+ };
+ }
+ }
+
+}
+
+function get(h, key) {
+ var h_buckets = h.buckets;
+ var nid = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (h_buckets.length - 1 | 0);
+ var cell1 = h_buckets[nid];
+ if (cell1 === undefined) {
+ return ;
+ }
+ if (key === cell1.key) {
+ return Caml_option.some(cell1.value);
+ }
+ var cell2 = cell1.next;
+ if (cell2 === undefined) {
+ return ;
+ }
+ if (key === cell2.key) {
+ return Caml_option.some(cell2.value);
+ }
+ var cell3 = cell2.next;
+ if (cell3 !== undefined) {
+ if (key === cell3.key) {
+ return Caml_option.some(cell3.value);
+ } else {
+ var _buckets = cell3.next;
+ while(true) {
+ var buckets = _buckets;
+ if (buckets === undefined) {
+ return ;
+ }
+ if (key === buckets.key) {
+ return Caml_option.some(buckets.value);
+ }
+ _buckets = buckets.next;
+ continue ;
+ };
+ }
+ }
+
+}
+
+function has(h, key) {
+ var h_buckets = h.buckets;
+ var nid = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[nid];
+ if (bucket !== undefined) {
+ var _cell = bucket;
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ return true;
+ }
+ var nextCell = cell.next;
+ if (nextCell === undefined) {
+ return false;
+ }
+ _cell = nextCell;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function make(hintSize) {
+ return Belt__Belt_internalBucketsType.make(undefined, undefined, hintSize);
+}
+
+function size(h) {
+ return h.size;
+}
+
+function fromArray(arr) {
+ var len = arr.length;
+ var v = Belt__Belt_internalBucketsType.make(undefined, undefined, len);
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ set(v, match[0], match[1]);
+ }
+ return v;
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ set(h, match[0], match[1]);
+ }
+}
+
+var clear = Belt__Belt_internalBucketsType.clear;
+
+var isEmpty = Belt__Belt_internalBucketsType.isEmpty;
+
+var copy = Belt__Belt_internalBuckets.copy;
+
+var forEachU = Belt__Belt_internalBuckets.forEachU;
+
+var forEach = Belt__Belt_internalBuckets.forEach;
+
+var reduceU = Belt__Belt_internalBuckets.reduceU;
+
+var reduce = Belt__Belt_internalBuckets.reduce;
+
+var keepMapInPlaceU = Belt__Belt_internalBuckets.keepMapInPlaceU;
+
+var keepMapInPlace = Belt__Belt_internalBuckets.keepMapInPlace;
+
+var toArray = Belt__Belt_internalBuckets.toArray;
+
+var keysToArray = Belt__Belt_internalBuckets.keysToArray;
+
+var valuesToArray = Belt__Belt_internalBuckets.valuesToArray;
+
+var getBucketHistogram = Belt__Belt_internalBuckets.getBucketHistogram;
+
+var logStats = Belt__Belt_internalBuckets.logStats;
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ set ,
+ copy ,
+ get ,
+ has ,
+ remove ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ keepMapInPlaceU ,
+ keepMapInPlace ,
+ size ,
+ toArray ,
+ keysToArray ,
+ valuesToArray ,
+ fromArray ,
+ mergeMany ,
+ getBucketHistogram ,
+ logStats ,
+}
+/* No side effect */
+`,oc=`// Generated by Melange
+
+import * as Belt__Belt_internalBuckets from "./belt_internalBuckets.js";
+import * as Belt__Belt_internalBucketsType from "./belt_internalBucketsType.js";
+import * as Caml_hash_primitive from "melange.js/caml_hash_primitive.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) {
+ while(true) {
+ var old_bucket = _old_bucket;
+ if (old_bucket === undefined) {
+ return ;
+ }
+ var nidx = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, old_bucket.key)) & (h_buckets.length - 1 | 0);
+ var tail = ndata_tail[nidx];
+ if (tail !== undefined) {
+ tail.next = old_bucket;
+ } else {
+ h_buckets[nidx] = old_bucket;
+ }
+ ndata_tail[nidx] = old_bucket;
+ _old_bucket = old_bucket.next;
+ continue ;
+ };
+}
+
+function replaceInBucket(key, info, _cell) {
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ cell.value = info;
+ return false;
+ }
+ var cell$1 = cell.next;
+ if (cell$1 === undefined) {
+ return true;
+ }
+ _cell = cell$1;
+ continue ;
+ };
+}
+
+function set(h, key, value) {
+ var h_buckets = h.buckets;
+ var buckets_len = h_buckets.length;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (buckets_len - 1 | 0);
+ var l = h_buckets[i];
+ if (l !== undefined) {
+ if (replaceInBucket(key, value, l)) {
+ h_buckets[i] = {
+ key: key,
+ value: value,
+ next: l
+ };
+ h.size = h.size + 1 | 0;
+ }
+
+ } else {
+ h_buckets[i] = {
+ key: key,
+ value: value,
+ next: undefined
+ };
+ h.size = h.size + 1 | 0;
+ }
+ if (h.size > (buckets_len << 1)) {
+ var odata = h.buckets;
+ var osize = odata.length;
+ var nsize = (osize << 1);
+ if (nsize < osize) {
+ return ;
+ }
+ var h_buckets$1 = new Array(nsize);
+ var ndata_tail = new Array(nsize);
+ h.buckets = h_buckets$1;
+ for(var i$1 = 0; i$1 < osize; ++i$1){
+ copyBucketReHash(h_buckets$1, ndata_tail, odata[i$1]);
+ }
+ for(var i$2 = 0; i$2 < nsize; ++i$2){
+ var tail = ndata_tail[i$2];
+ if (tail !== undefined) {
+ tail.next = undefined;
+ }
+
+ }
+ return ;
+ }
+
+}
+
+function remove(h, key) {
+ var h_buckets = h.buckets;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[i];
+ if (bucket !== undefined) {
+ if (bucket.key === key) {
+ h_buckets[i] = bucket.next;
+ h.size = h.size - 1 | 0;
+ return ;
+ } else {
+ var _prec = bucket;
+ var _buckets = bucket.next;
+ while(true) {
+ var buckets = _buckets;
+ var prec = _prec;
+ if (buckets === undefined) {
+ return ;
+ }
+ var cell_next = buckets.next;
+ if (buckets.key === key) {
+ prec.next = cell_next;
+ h.size = h.size - 1 | 0;
+ return ;
+ }
+ _buckets = cell_next;
+ _prec = buckets;
+ continue ;
+ };
+ }
+ }
+
+}
+
+function get(h, key) {
+ var h_buckets = h.buckets;
+ var nid = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (h_buckets.length - 1 | 0);
+ var cell1 = h_buckets[nid];
+ if (cell1 === undefined) {
+ return ;
+ }
+ if (key === cell1.key) {
+ return Caml_option.some(cell1.value);
+ }
+ var cell2 = cell1.next;
+ if (cell2 === undefined) {
+ return ;
+ }
+ if (key === cell2.key) {
+ return Caml_option.some(cell2.value);
+ }
+ var cell3 = cell2.next;
+ if (cell3 !== undefined) {
+ if (key === cell3.key) {
+ return Caml_option.some(cell3.value);
+ } else {
+ var _buckets = cell3.next;
+ while(true) {
+ var buckets = _buckets;
+ if (buckets === undefined) {
+ return ;
+ }
+ if (key === buckets.key) {
+ return Caml_option.some(buckets.value);
+ }
+ _buckets = buckets.next;
+ continue ;
+ };
+ }
+ }
+
+}
+
+function has(h, key) {
+ var h_buckets = h.buckets;
+ var nid = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[nid];
+ if (bucket !== undefined) {
+ var _cell = bucket;
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ return true;
+ }
+ var nextCell = cell.next;
+ if (nextCell === undefined) {
+ return false;
+ }
+ _cell = nextCell;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function make(hintSize) {
+ return Belt__Belt_internalBucketsType.make(undefined, undefined, hintSize);
+}
+
+function size(h) {
+ return h.size;
+}
+
+function fromArray(arr) {
+ var len = arr.length;
+ var v = Belt__Belt_internalBucketsType.make(undefined, undefined, len);
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ set(v, match[0], match[1]);
+ }
+ return v;
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ set(h, match[0], match[1]);
+ }
+}
+
+var clear = Belt__Belt_internalBucketsType.clear;
+
+var isEmpty = Belt__Belt_internalBucketsType.isEmpty;
+
+var copy = Belt__Belt_internalBuckets.copy;
+
+var forEachU = Belt__Belt_internalBuckets.forEachU;
+
+var forEach = Belt__Belt_internalBuckets.forEach;
+
+var reduceU = Belt__Belt_internalBuckets.reduceU;
+
+var reduce = Belt__Belt_internalBuckets.reduce;
+
+var keepMapInPlaceU = Belt__Belt_internalBuckets.keepMapInPlaceU;
+
+var keepMapInPlace = Belt__Belt_internalBuckets.keepMapInPlace;
+
+var toArray = Belt__Belt_internalBuckets.toArray;
+
+var keysToArray = Belt__Belt_internalBuckets.keysToArray;
+
+var valuesToArray = Belt__Belt_internalBuckets.valuesToArray;
+
+var getBucketHistogram = Belt__Belt_internalBuckets.getBucketHistogram;
+
+var logStats = Belt__Belt_internalBuckets.logStats;
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ set ,
+ copy ,
+ get ,
+ has ,
+ remove ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ keepMapInPlaceU ,
+ keepMapInPlace ,
+ size ,
+ toArray ,
+ keysToArray ,
+ valuesToArray ,
+ fromArray ,
+ mergeMany ,
+ getBucketHistogram ,
+ logStats ,
+}
+/* No side effect */
+`,lc=`// Generated by Melange
+
+import * as Belt__Belt_internalBucketsType from "./belt_internalBucketsType.js";
+import * as Belt__Belt_internalSetBuckets from "./belt_internalSetBuckets.js";
+
+function copyBucket(hash, h_buckets, ndata_tail, _old_bucket) {
+ while(true) {
+ var old_bucket = _old_bucket;
+ if (old_bucket === undefined) {
+ return ;
+ }
+ var nidx = hash(old_bucket.key) & (h_buckets.length - 1 | 0);
+ var tail = ndata_tail[nidx];
+ if (tail !== undefined) {
+ tail.next = old_bucket;
+ } else {
+ h_buckets[nidx] = old_bucket;
+ }
+ ndata_tail[nidx] = old_bucket;
+ _old_bucket = old_bucket.next;
+ continue ;
+ };
+}
+
+function remove(h, key) {
+ var eq = h.eq;
+ var h_buckets = h.buckets;
+ var i = h.hash(key) & (h_buckets.length - 1 | 0);
+ var l = h_buckets[i];
+ if (l === undefined) {
+ return ;
+ }
+ var next_cell = l.next;
+ if (eq(l.key, key)) {
+ h.size = h.size - 1 | 0;
+ h_buckets[i] = next_cell;
+ return ;
+ } else if (next_cell !== undefined) {
+ var _prec = l;
+ var _cell = next_cell;
+ while(true) {
+ var cell = _cell;
+ var prec = _prec;
+ var cell_next = cell.next;
+ if (eq(cell.key, key)) {
+ prec.next = cell_next;
+ h.size = h.size - 1 | 0;
+ return ;
+ }
+ if (cell_next === undefined) {
+ return ;
+ }
+ _cell = cell_next;
+ _prec = cell;
+ continue ;
+ };
+ } else {
+ return ;
+ }
+}
+
+function addBucket(h, key, _cell, eq) {
+ while(true) {
+ var cell = _cell;
+ if (eq(cell.key, key)) {
+ return ;
+ }
+ var n = cell.next;
+ if (n !== undefined) {
+ _cell = n;
+ continue ;
+ }
+ h.size = h.size + 1 | 0;
+ cell.next = {
+ key: key,
+ next: undefined
+ };
+ return ;
+ };
+}
+
+function add0(h, key, hash, eq) {
+ var h_buckets = h.buckets;
+ var buckets_len = h_buckets.length;
+ var i = hash(key) & (buckets_len - 1 | 0);
+ var l = h_buckets[i];
+ if (l !== undefined) {
+ addBucket(h, key, l, eq);
+ } else {
+ h.size = h.size + 1 | 0;
+ h_buckets[i] = {
+ key: key,
+ next: undefined
+ };
+ }
+ if (h.size > (buckets_len << 1)) {
+ var odata = h.buckets;
+ var osize = odata.length;
+ var nsize = (osize << 1);
+ if (nsize < osize) {
+ return ;
+ }
+ var h_buckets$1 = new Array(nsize);
+ var ndata_tail = new Array(nsize);
+ h.buckets = h_buckets$1;
+ for(var i$1 = 0; i$1 < osize; ++i$1){
+ copyBucket(hash, h_buckets$1, ndata_tail, odata[i$1]);
+ }
+ for(var i$2 = 0; i$2 < nsize; ++i$2){
+ var tail = ndata_tail[i$2];
+ if (tail !== undefined) {
+ tail.next = undefined;
+ }
+
+ }
+ return ;
+ }
+
+}
+
+function add(h, key) {
+ add0(h, key, h.hash, h.eq);
+}
+
+function has(h, key) {
+ var eq = h.eq;
+ var h_buckets = h.buckets;
+ var nid = h.hash(key) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[nid];
+ if (bucket !== undefined) {
+ var _cell = bucket;
+ while(true) {
+ var cell = _cell;
+ if (eq(cell.key, key)) {
+ return true;
+ }
+ var nextCell = cell.next;
+ if (nextCell === undefined) {
+ return false;
+ }
+ _cell = nextCell;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function make(hintSize, id) {
+ return Belt__Belt_internalBucketsType.make(id.hash, id.eq, hintSize);
+}
+
+function size(h) {
+ return h.size;
+}
+
+function fromArray(arr, id) {
+ var eq = id.eq;
+ var hash = id.hash;
+ var len = arr.length;
+ var v = Belt__Belt_internalBucketsType.make(hash, eq, len);
+ for(var i = 0; i < len; ++i){
+ add0(v, arr[i], hash, eq);
+ }
+ return v;
+}
+
+function mergeMany(h, arr) {
+ var eq = h.eq;
+ var hash = h.hash;
+ var len = arr.length;
+ for(var i = 0; i < len; ++i){
+ add0(h, arr[i], hash, eq);
+ }
+}
+
+var clear = Belt__Belt_internalBucketsType.clear;
+
+var isEmpty = Belt__Belt_internalBucketsType.isEmpty;
+
+var copy = Belt__Belt_internalSetBuckets.copy;
+
+var forEachU = Belt__Belt_internalSetBuckets.forEachU;
+
+var forEach = Belt__Belt_internalSetBuckets.forEach;
+
+var reduceU = Belt__Belt_internalSetBuckets.reduceU;
+
+var reduce = Belt__Belt_internalSetBuckets.reduce;
+
+var logStats = Belt__Belt_internalSetBuckets.logStats;
+
+var toArray = Belt__Belt_internalSetBuckets.toArray;
+
+var getBucketHistogram = Belt__Belt_internalSetBuckets.getBucketHistogram;
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ add ,
+ copy ,
+ has ,
+ remove ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ size ,
+ logStats ,
+ toArray ,
+ fromArray ,
+ mergeMany ,
+ getBucketHistogram ,
+}
+/* No side effect */
+`,_c=`// Generated by Melange
+
+import * as Belt__Belt_internalBucketsType from "./belt_internalBucketsType.js";
+import * as Belt__Belt_internalSetBuckets from "./belt_internalSetBuckets.js";
+import * as Caml_hash_primitive from "melange.js/caml_hash_primitive.js";
+
+function copyBucket(h_buckets, ndata_tail, _old_bucket) {
+ while(true) {
+ var old_bucket = _old_bucket;
+ if (old_bucket === undefined) {
+ return ;
+ }
+ var nidx = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, old_bucket.key)) & (h_buckets.length - 1 | 0);
+ var tail = ndata_tail[nidx];
+ if (tail !== undefined) {
+ tail.next = old_bucket;
+ } else {
+ h_buckets[nidx] = old_bucket;
+ }
+ ndata_tail[nidx] = old_bucket;
+ _old_bucket = old_bucket.next;
+ continue ;
+ };
+}
+
+function remove(h, key) {
+ var h_buckets = h.buckets;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (h_buckets.length - 1 | 0);
+ var l = h_buckets[i];
+ if (l === undefined) {
+ return ;
+ }
+ var next_cell = l.next;
+ if (l.key === key) {
+ h.size = h.size - 1 | 0;
+ h_buckets[i] = next_cell;
+ return ;
+ } else if (next_cell !== undefined) {
+ var _prec = l;
+ var _cell = next_cell;
+ while(true) {
+ var cell = _cell;
+ var prec = _prec;
+ var cell_next = cell.next;
+ if (cell.key === key) {
+ prec.next = cell_next;
+ h.size = h.size - 1 | 0;
+ return ;
+ }
+ if (cell_next === undefined) {
+ return ;
+ }
+ _cell = cell_next;
+ _prec = cell;
+ continue ;
+ };
+ } else {
+ return ;
+ }
+}
+
+function addBucket(h, key, _cell) {
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ return ;
+ }
+ var n = cell.next;
+ if (n !== undefined) {
+ _cell = n;
+ continue ;
+ }
+ h.size = h.size + 1 | 0;
+ cell.next = {
+ key: key,
+ next: undefined
+ };
+ return ;
+ };
+}
+
+function add(h, key) {
+ var h_buckets = h.buckets;
+ var buckets_len = h_buckets.length;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (buckets_len - 1 | 0);
+ var l = h_buckets[i];
+ if (l !== undefined) {
+ addBucket(h, key, l);
+ } else {
+ h_buckets[i] = {
+ key: key,
+ next: undefined
+ };
+ h.size = h.size + 1 | 0;
+ }
+ if (h.size > (buckets_len << 1)) {
+ var odata = h.buckets;
+ var osize = odata.length;
+ var nsize = (osize << 1);
+ if (nsize < osize) {
+ return ;
+ }
+ var h_buckets$1 = new Array(nsize);
+ var ndata_tail = new Array(nsize);
+ h.buckets = h_buckets$1;
+ for(var i$1 = 0; i$1 < osize; ++i$1){
+ copyBucket(h_buckets$1, ndata_tail, odata[i$1]);
+ }
+ for(var i$2 = 0; i$2 < nsize; ++i$2){
+ var tail = ndata_tail[i$2];
+ if (tail !== undefined) {
+ tail.next = undefined;
+ }
+
+ }
+ return ;
+ }
+
+}
+
+function has(h, key) {
+ var h_buckets = h.buckets;
+ var nid = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_int(0, key)) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[nid];
+ if (bucket !== undefined) {
+ var _cell = bucket;
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ return true;
+ }
+ var nextCell = cell.next;
+ if (nextCell === undefined) {
+ return false;
+ }
+ _cell = nextCell;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function make(hintSize) {
+ return Belt__Belt_internalBucketsType.make(undefined, undefined, hintSize);
+}
+
+function size(h) {
+ return h.size;
+}
+
+function fromArray(arr) {
+ var len = arr.length;
+ var v = Belt__Belt_internalBucketsType.make(undefined, undefined, len);
+ for(var i = 0; i < len; ++i){
+ add(v, arr[i]);
+ }
+ return v;
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ for(var i = 0; i < len; ++i){
+ add(h, arr[i]);
+ }
+}
+
+var clear = Belt__Belt_internalBucketsType.clear;
+
+var isEmpty = Belt__Belt_internalBucketsType.isEmpty;
+
+var copy = Belt__Belt_internalSetBuckets.copy;
+
+var forEachU = Belt__Belt_internalSetBuckets.forEachU;
+
+var forEach = Belt__Belt_internalSetBuckets.forEach;
+
+var reduceU = Belt__Belt_internalSetBuckets.reduceU;
+
+var reduce = Belt__Belt_internalSetBuckets.reduce;
+
+var logStats = Belt__Belt_internalSetBuckets.logStats;
+
+var toArray = Belt__Belt_internalSetBuckets.toArray;
+
+var getBucketHistogram = Belt__Belt_internalSetBuckets.getBucketHistogram;
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ add ,
+ copy ,
+ has ,
+ remove ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ size ,
+ logStats ,
+ toArray ,
+ fromArray ,
+ mergeMany ,
+ getBucketHistogram ,
+}
+/* No side effect */
+`,cc=`// Generated by Melange
+
+import * as Belt__Belt_internalBucketsType from "./belt_internalBucketsType.js";
+import * as Belt__Belt_internalSetBuckets from "./belt_internalSetBuckets.js";
+import * as Caml_hash_primitive from "melange.js/caml_hash_primitive.js";
+
+function copyBucket(h_buckets, ndata_tail, _old_bucket) {
+ while(true) {
+ var old_bucket = _old_bucket;
+ if (old_bucket === undefined) {
+ return ;
+ }
+ var nidx = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, old_bucket.key)) & (h_buckets.length - 1 | 0);
+ var tail = ndata_tail[nidx];
+ if (tail !== undefined) {
+ tail.next = old_bucket;
+ } else {
+ h_buckets[nidx] = old_bucket;
+ }
+ ndata_tail[nidx] = old_bucket;
+ _old_bucket = old_bucket.next;
+ continue ;
+ };
+}
+
+function remove(h, key) {
+ var h_buckets = h.buckets;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (h_buckets.length - 1 | 0);
+ var l = h_buckets[i];
+ if (l === undefined) {
+ return ;
+ }
+ var next_cell = l.next;
+ if (l.key === key) {
+ h.size = h.size - 1 | 0;
+ h_buckets[i] = next_cell;
+ return ;
+ } else if (next_cell !== undefined) {
+ var _prec = l;
+ var _cell = next_cell;
+ while(true) {
+ var cell = _cell;
+ var prec = _prec;
+ var cell_next = cell.next;
+ if (cell.key === key) {
+ prec.next = cell_next;
+ h.size = h.size - 1 | 0;
+ return ;
+ }
+ if (cell_next === undefined) {
+ return ;
+ }
+ _cell = cell_next;
+ _prec = cell;
+ continue ;
+ };
+ } else {
+ return ;
+ }
+}
+
+function addBucket(h, key, _cell) {
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ return ;
+ }
+ var n = cell.next;
+ if (n !== undefined) {
+ _cell = n;
+ continue ;
+ }
+ h.size = h.size + 1 | 0;
+ cell.next = {
+ key: key,
+ next: undefined
+ };
+ return ;
+ };
+}
+
+function add(h, key) {
+ var h_buckets = h.buckets;
+ var buckets_len = h_buckets.length;
+ var i = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (buckets_len - 1 | 0);
+ var l = h_buckets[i];
+ if (l !== undefined) {
+ addBucket(h, key, l);
+ } else {
+ h_buckets[i] = {
+ key: key,
+ next: undefined
+ };
+ h.size = h.size + 1 | 0;
+ }
+ if (h.size > (buckets_len << 1)) {
+ var odata = h.buckets;
+ var osize = odata.length;
+ var nsize = (osize << 1);
+ if (nsize < osize) {
+ return ;
+ }
+ var h_buckets$1 = new Array(nsize);
+ var ndata_tail = new Array(nsize);
+ h.buckets = h_buckets$1;
+ for(var i$1 = 0; i$1 < osize; ++i$1){
+ copyBucket(h_buckets$1, ndata_tail, odata[i$1]);
+ }
+ for(var i$2 = 0; i$2 < nsize; ++i$2){
+ var tail = ndata_tail[i$2];
+ if (tail !== undefined) {
+ tail.next = undefined;
+ }
+
+ }
+ return ;
+ }
+
+}
+
+function has(h, key) {
+ var h_buckets = h.buckets;
+ var nid = Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, key)) & (h_buckets.length - 1 | 0);
+ var bucket = h_buckets[nid];
+ if (bucket !== undefined) {
+ var _cell = bucket;
+ while(true) {
+ var cell = _cell;
+ if (cell.key === key) {
+ return true;
+ }
+ var nextCell = cell.next;
+ if (nextCell === undefined) {
+ return false;
+ }
+ _cell = nextCell;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function make(hintSize) {
+ return Belt__Belt_internalBucketsType.make(undefined, undefined, hintSize);
+}
+
+function size(h) {
+ return h.size;
+}
+
+function fromArray(arr) {
+ var len = arr.length;
+ var v = Belt__Belt_internalBucketsType.make(undefined, undefined, len);
+ for(var i = 0; i < len; ++i){
+ add(v, arr[i]);
+ }
+ return v;
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ for(var i = 0; i < len; ++i){
+ add(h, arr[i]);
+ }
+}
+
+var clear = Belt__Belt_internalBucketsType.clear;
+
+var isEmpty = Belt__Belt_internalBucketsType.isEmpty;
+
+var copy = Belt__Belt_internalSetBuckets.copy;
+
+var forEachU = Belt__Belt_internalSetBuckets.forEachU;
+
+var forEach = Belt__Belt_internalSetBuckets.forEach;
+
+var reduceU = Belt__Belt_internalSetBuckets.reduceU;
+
+var reduce = Belt__Belt_internalSetBuckets.reduce;
+
+var logStats = Belt__Belt_internalSetBuckets.logStats;
+
+var toArray = Belt__Belt_internalSetBuckets.toArray;
+
+var getBucketHistogram = Belt__Belt_internalSetBuckets.getBucketHistogram;
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ add ,
+ copy ,
+ has ,
+ remove ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ size ,
+ logStats ,
+ toArray ,
+ fromArray ,
+ mergeMany ,
+ getBucketHistogram ,
+}
+/* No side effect */
+`,uc=`// Generated by Melange
+
+import * as Curry from "melange.js/curry.js";
+
+function MakeComparableU(M) {
+ return M;
+}
+
+function MakeComparable(M) {
+ var cmp = M.cmp;
+ var cmp$1 = Curry.__2(cmp);
+ return {
+ cmp: cmp$1
+ };
+}
+
+function comparableU(cmp) {
+ return {
+ cmp: cmp
+ };
+}
+
+function comparable(cmp) {
+ var cmp$1 = Curry.__2(cmp);
+ return {
+ cmp: cmp$1
+ };
+}
+
+function MakeHashableU(M) {
+ return M;
+}
+
+function MakeHashable(M) {
+ var hash = M.hash;
+ var hash$1 = Curry.__1(hash);
+ var eq = M.eq;
+ var eq$1 = Curry.__2(eq);
+ return {
+ hash: hash$1,
+ eq: eq$1
+ };
+}
+
+function hashableU(hash, eq) {
+ return {
+ hash: hash,
+ eq: eq
+ };
+}
+
+function hashable(hash, eq) {
+ var hash$1 = Curry.__1(hash);
+ var eq$1 = Curry.__2(eq);
+ return {
+ hash: hash$1,
+ eq: eq$1
+ };
+}
+
+export {
+ MakeComparableU ,
+ MakeComparable ,
+ comparableU ,
+ comparable ,
+ MakeHashableU ,
+ MakeHashable ,
+ hashableU ,
+ hashable ,
+}
+/* No side effect */
+`,fc=`// Generated by Melange
+
+
+function fromString(i) {
+ var i$1 = parseInt(i, 10);
+ if (isNaN(i$1)) {
+ return ;
+ } else {
+ return i$1;
+ }
+}
+
+export {
+ fromString ,
+}
+/* No side effect */
+`,dc=`// Generated by Melange
+
+import * as Belt__Belt_Array from "./belt_Array.js";
+import * as Belt__Belt_SortArray from "./belt_SortArray.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function head(x) {
+ if (x) {
+ return Caml_option.some(x.hd);
+ }
+
+}
+
+function headExn(x) {
+ if (x) {
+ return x.hd;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+}
+
+function tail(x) {
+ if (x) {
+ return x.tl;
+ }
+
+}
+
+function tailExn(x) {
+ if (x) {
+ return x.tl;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+}
+
+function add(xs, x) {
+ return {
+ hd: x,
+ tl: xs
+ };
+}
+
+function get(x, n) {
+ if (n < 0) {
+ return ;
+ } else {
+ var _x = x;
+ var _n = n;
+ while(true) {
+ var n$1 = _n;
+ var x$1 = _x;
+ if (!x$1) {
+ return ;
+ }
+ if (n$1 === 0) {
+ return Caml_option.some(x$1.hd);
+ }
+ _n = n$1 - 1 | 0;
+ _x = x$1.tl;
+ continue ;
+ };
+ }
+}
+
+function getExn(x, n) {
+ if (n < 0) {
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ }
+ var _x = x;
+ var _n = n;
+ while(true) {
+ var n$1 = _n;
+ var x$1 = _x;
+ if (x$1) {
+ if (n$1 === 0) {
+ return x$1.hd;
+ }
+ _n = n$1 - 1 | 0;
+ _x = x$1.tl;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function partitionAux(p, _cell, _precX, _precY) {
+ while(true) {
+ var precY = _precY;
+ var precX = _precX;
+ var cell = _cell;
+ if (!cell) {
+ return ;
+ }
+ var t = cell.tl;
+ var h = cell.hd;
+ var next = {
+ hd: h,
+ tl: /* [] */0
+ };
+ if (p(h)) {
+ precX.tl = next;
+ _precX = next;
+ _cell = t;
+ continue ;
+ }
+ precY.tl = next;
+ _precY = next;
+ _cell = t;
+ continue ;
+ };
+}
+
+function splitAux(_cell, _precX, _precY) {
+ while(true) {
+ var precY = _precY;
+ var precX = _precX;
+ var cell = _cell;
+ if (!cell) {
+ return ;
+ }
+ var match = cell.hd;
+ var nextA = {
+ hd: match[0],
+ tl: /* [] */0
+ };
+ var nextB = {
+ hd: match[1],
+ tl: /* [] */0
+ };
+ precX.tl = nextA;
+ precY.tl = nextB;
+ _precY = nextB;
+ _precX = nextA;
+ _cell = cell.tl;
+ continue ;
+ };
+}
+
+function copyAuxCont(_cellX, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return prec;
+ }
+ var next = {
+ hd: cellX.hd,
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = cellX.tl;
+ continue ;
+ };
+}
+
+function copyAuxWitFilter(f, _cellX, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return ;
+ }
+ var t = cellX.tl;
+ var h = cellX.hd;
+ if (f(h)) {
+ var next = {
+ hd: h,
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = t;
+ continue ;
+ }
+ _cellX = t;
+ continue ;
+ };
+}
+
+function copyAuxWithFilterIndex(f, _cellX, _prec, _i) {
+ while(true) {
+ var i = _i;
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return ;
+ }
+ var t = cellX.tl;
+ var h = cellX.hd;
+ if (f(h, i)) {
+ var next = {
+ hd: h,
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _i = i + 1 | 0;
+ _prec = next;
+ _cellX = t;
+ continue ;
+ }
+ _i = i + 1 | 0;
+ _cellX = t;
+ continue ;
+ };
+}
+
+function copyAuxWitFilterMap(f, _cellX, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return ;
+ }
+ var t = cellX.tl;
+ var h = f(cellX.hd);
+ if (h !== undefined) {
+ var next = {
+ hd: Caml_option.valFromOption(h),
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = t;
+ continue ;
+ }
+ _cellX = t;
+ continue ;
+ };
+}
+
+function removeAssocAuxWithMap(_cellX, x, _prec, f) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return false;
+ }
+ var t = cellX.tl;
+ var h = cellX.hd;
+ if (f(h[0], x)) {
+ prec.tl = t;
+ return true;
+ }
+ var next = {
+ hd: h,
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = t;
+ continue ;
+ };
+}
+
+function setAssocAuxWithMap(_cellX, x, k, _prec, eq) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return false;
+ }
+ var t = cellX.tl;
+ var h = cellX.hd;
+ if (eq(h[0], x)) {
+ prec.tl = {
+ hd: [
+ x,
+ k
+ ],
+ tl: t
+ };
+ return true;
+ }
+ var next = {
+ hd: h,
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = t;
+ continue ;
+ };
+}
+
+function copyAuxWithMap(_cellX, _prec, f) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ if (!cellX) {
+ return ;
+ }
+ var next = {
+ hd: f(cellX.hd),
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = cellX.tl;
+ continue ;
+ };
+}
+
+function zipAux(_cellX, _cellY, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cellY = _cellY;
+ var cellX = _cellX;
+ if (!cellX) {
+ return ;
+ }
+ if (!cellY) {
+ return ;
+ }
+ var next = {
+ hd: [
+ cellX.hd,
+ cellY.hd
+ ],
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellY = cellY.tl;
+ _cellX = cellX.tl;
+ continue ;
+ };
+}
+
+function copyAuxWithMap2(f, _cellX, _cellY, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cellY = _cellY;
+ var cellX = _cellX;
+ if (!cellX) {
+ return ;
+ }
+ if (!cellY) {
+ return ;
+ }
+ var next = {
+ hd: f(cellX.hd, cellY.hd),
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellY = cellY.tl;
+ _cellX = cellX.tl;
+ continue ;
+ };
+}
+
+function copyAuxWithMapI(f, _i, _cellX, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cellX = _cellX;
+ var i = _i;
+ if (!cellX) {
+ return ;
+ }
+ var next = {
+ hd: f(i, cellX.hd),
+ tl: /* [] */0
+ };
+ prec.tl = next;
+ _prec = next;
+ _cellX = cellX.tl;
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function takeAux(_n, _cell, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cell = _cell;
+ var n = _n;
+ if (n === 0) {
+ return true;
+ }
+ if (!cell) {
+ return false;
+ }
+ var cell$1 = {
+ hd: cell.hd,
+ tl: /* [] */0
+ };
+ prec.tl = cell$1;
+ _prec = cell$1;
+ _cell = cell.tl;
+ _n = n - 1 | 0;
+ continue ;
+ };
+}
+
+function splitAtAux(_n, _cell, _prec) {
+ while(true) {
+ var prec = _prec;
+ var cell = _cell;
+ var n = _n;
+ if (n === 0) {
+ return cell;
+ }
+ if (!cell) {
+ return ;
+ }
+ var cell$1 = {
+ hd: cell.hd,
+ tl: /* [] */0
+ };
+ prec.tl = cell$1;
+ _prec = cell$1;
+ _cell = cell.tl;
+ _n = n - 1 | 0;
+ continue ;
+ };
+}
+
+function take(lst, n) {
+ if (n < 0) {
+ return ;
+ }
+ if (n === 0) {
+ return /* [] */0;
+ }
+ if (!lst) {
+ return ;
+ }
+ var cell = {
+ hd: lst.hd,
+ tl: /* [] */0
+ };
+ var has = takeAux(n - 1 | 0, lst.tl, cell);
+ if (has) {
+ return cell;
+ }
+
+}
+
+function drop(lst, n) {
+ if (n < 0) {
+ return ;
+ } else {
+ var _l = lst;
+ var _n = n;
+ while(true) {
+ var n$1 = _n;
+ var l = _l;
+ if (n$1 === 0) {
+ return l;
+ }
+ if (!l) {
+ return ;
+ }
+ _n = n$1 - 1 | 0;
+ _l = l.tl;
+ continue ;
+ };
+ }
+}
+
+function splitAt(lst, n) {
+ if (n < 0) {
+ return ;
+ }
+ if (n === 0) {
+ return [
+ /* [] */0,
+ lst
+ ];
+ }
+ if (!lst) {
+ return ;
+ }
+ var cell = {
+ hd: lst.hd,
+ tl: /* [] */0
+ };
+ var rest = splitAtAux(n - 1 | 0, lst.tl, cell);
+ if (rest !== undefined) {
+ return [
+ cell,
+ rest
+ ];
+ }
+
+}
+
+function concat(xs, ys) {
+ if (!xs) {
+ return ys;
+ }
+ var cell = {
+ hd: xs.hd,
+ tl: /* [] */0
+ };
+ copyAuxCont(xs.tl, cell).tl = ys;
+ return cell;
+}
+
+function mapU(xs, f) {
+ if (!xs) {
+ return /* [] */0;
+ }
+ var cell = {
+ hd: f(xs.hd),
+ tl: /* [] */0
+ };
+ copyAuxWithMap(xs.tl, cell, f);
+ return cell;
+}
+
+function map(xs, f) {
+ return mapU(xs, Curry.__1(f));
+}
+
+function zipByU(l1, l2, f) {
+ if (!l1) {
+ return /* [] */0;
+ }
+ if (!l2) {
+ return /* [] */0;
+ }
+ var cell = {
+ hd: f(l1.hd, l2.hd),
+ tl: /* [] */0
+ };
+ copyAuxWithMap2(f, l1.tl, l2.tl, cell);
+ return cell;
+}
+
+function zipBy(l1, l2, f) {
+ return zipByU(l1, l2, Curry.__2(f));
+}
+
+function mapWithIndexU(xs, f) {
+ if (!xs) {
+ return /* [] */0;
+ }
+ var cell = {
+ hd: f(0, xs.hd),
+ tl: /* [] */0
+ };
+ copyAuxWithMapI(f, 1, xs.tl, cell);
+ return cell;
+}
+
+function mapWithIndex(xs, f) {
+ return mapWithIndexU(xs, Curry.__2(f));
+}
+
+function makeByU(n, f) {
+ if (n <= 0) {
+ return /* [] */0;
+ }
+ var headX = {
+ hd: f(0),
+ tl: /* [] */0
+ };
+ var cur = headX;
+ var i = 1;
+ while(i < n) {
+ var v = {
+ hd: f(i),
+ tl: /* [] */0
+ };
+ cur.tl = v;
+ cur = v;
+ i = i + 1 | 0;
+ };
+ return headX;
+}
+
+function makeBy(n, f) {
+ return makeByU(n, Curry.__1(f));
+}
+
+function make(n, v) {
+ if (n <= 0) {
+ return /* [] */0;
+ }
+ var headX = {
+ hd: v,
+ tl: /* [] */0
+ };
+ var cur = headX;
+ var i = 1;
+ while(i < n) {
+ var v$1 = {
+ hd: v,
+ tl: /* [] */0
+ };
+ cur.tl = v$1;
+ cur = v$1;
+ i = i + 1 | 0;
+ };
+ return headX;
+}
+
+function length(xs) {
+ var _x = xs;
+ var _acc = 0;
+ while(true) {
+ var acc = _acc;
+ var x = _x;
+ if (!x) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _x = x.tl;
+ continue ;
+ };
+}
+
+function fillAux(arr, _i, _x) {
+ while(true) {
+ var x = _x;
+ var i = _i;
+ if (!x) {
+ return ;
+ }
+ arr[i] = x.hd;
+ _x = x.tl;
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function fromArray(a) {
+ var _i = a.length - 1 | 0;
+ var _res = /* [] */0;
+ while(true) {
+ var res = _res;
+ var i = _i;
+ if (i < 0) {
+ return res;
+ }
+ _res = {
+ hd: a[i],
+ tl: res
+ };
+ _i = i - 1 | 0;
+ continue ;
+ };
+}
+
+function toArray(x) {
+ var len = length(x);
+ var arr = new Array(len);
+ fillAux(arr, 0, x);
+ return arr;
+}
+
+function shuffle(xs) {
+ var v = toArray(xs);
+ Belt__Belt_Array.shuffleInPlace(v);
+ return fromArray(v);
+}
+
+function reverseConcat(_l1, _l2) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ return l2;
+ }
+ _l2 = {
+ hd: l1.hd,
+ tl: l2
+ };
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function reverse(l) {
+ return reverseConcat(l, /* [] */0);
+}
+
+function flattenAux(_prec, _xs) {
+ while(true) {
+ var xs = _xs;
+ var prec = _prec;
+ if (xs) {
+ _xs = xs.tl;
+ _prec = copyAuxCont(xs.hd, prec);
+ continue ;
+ }
+ prec.tl = /* [] */0;
+ return ;
+ };
+}
+
+function flatten(_xs) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return /* [] */0;
+ }
+ var match = xs.hd;
+ if (match) {
+ var cell = {
+ hd: match.hd,
+ tl: /* [] */0
+ };
+ flattenAux(copyAuxCont(match.tl, cell), xs.tl);
+ return cell;
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function concatMany(xs) {
+ var len = xs.length;
+ if (len === 1) {
+ return xs[0];
+ }
+ if (!len) {
+ return /* [] */0;
+ }
+ var len$1 = xs.length;
+ var v = xs[len$1 - 1 | 0];
+ for(var i = len$1 - 2 | 0; i >= 0; --i){
+ v = concat(xs[i], v);
+ }
+ return v;
+}
+
+function mapReverseU(l, f) {
+ var _accu = /* [] */0;
+ var _xs = l;
+ while(true) {
+ var xs = _xs;
+ var accu = _accu;
+ if (!xs) {
+ return accu;
+ }
+ _xs = xs.tl;
+ _accu = {
+ hd: f(xs.hd),
+ tl: accu
+ };
+ continue ;
+ };
+}
+
+function mapReverse(l, f) {
+ return mapReverseU(l, Curry.__1(f));
+}
+
+function forEachU(_xs, f) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return ;
+ }
+ f(xs.hd);
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function forEach(xs, f) {
+ forEachU(xs, Curry.__1(f));
+}
+
+function forEachWithIndexU(l, f) {
+ var _xs = l;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ var xs = _xs;
+ if (!xs) {
+ return ;
+ }
+ f(i, xs.hd);
+ _i = i + 1 | 0;
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function forEachWithIndex(l, f) {
+ forEachWithIndexU(l, Curry.__2(f));
+}
+
+function reduceU(_l, _accu, f) {
+ while(true) {
+ var accu = _accu;
+ var l = _l;
+ if (!l) {
+ return accu;
+ }
+ _accu = f(accu, l.hd);
+ _l = l.tl;
+ continue ;
+ };
+}
+
+function reduce(l, accu, f) {
+ return reduceU(l, accu, Curry.__2(f));
+}
+
+function reduceReverseUnsafeU(l, accu, f) {
+ if (l) {
+ return f(reduceReverseUnsafeU(l.tl, accu, f), l.hd);
+ } else {
+ return accu;
+ }
+}
+
+function reduceReverseU(l, acc, f) {
+ var len = length(l);
+ if (len < 1000) {
+ return reduceReverseUnsafeU(l, acc, f);
+ } else {
+ return Belt__Belt_Array.reduceReverseU(toArray(l), acc, f);
+ }
+}
+
+function reduceReverse(l, accu, f) {
+ return reduceReverseU(l, accu, Curry.__2(f));
+}
+
+function reduceWithIndexU(l, acc, f) {
+ var _l = l;
+ var _acc = acc;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ var acc$1 = _acc;
+ var l$1 = _l;
+ if (!l$1) {
+ return acc$1;
+ }
+ _i = i + 1 | 0;
+ _acc = f(acc$1, l$1.hd, i);
+ _l = l$1.tl;
+ continue ;
+ };
+}
+
+function reduceWithIndex(l, acc, f) {
+ return reduceWithIndexU(l, acc, Curry.__3(f));
+}
+
+function mapReverse2U(l1, l2, f) {
+ var _l1 = l1;
+ var _l2 = l2;
+ var _accu = /* [] */0;
+ while(true) {
+ var accu = _accu;
+ var l2$1 = _l2;
+ var l1$1 = _l1;
+ if (!l1$1) {
+ return accu;
+ }
+ if (!l2$1) {
+ return accu;
+ }
+ _accu = {
+ hd: f(l1$1.hd, l2$1.hd),
+ tl: accu
+ };
+ _l2 = l2$1.tl;
+ _l1 = l1$1.tl;
+ continue ;
+ };
+}
+
+function mapReverse2(l1, l2, f) {
+ return mapReverse2U(l1, l2, Curry.__2(f));
+}
+
+function forEach2U(_l1, _l2, f) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ return ;
+ }
+ if (!l2) {
+ return ;
+ }
+ f(l1.hd, l2.hd);
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function forEach2(l1, l2, f) {
+ forEach2U(l1, l2, Curry.__2(f));
+}
+
+function reduce2U(_l1, _l2, _accu, f) {
+ while(true) {
+ var accu = _accu;
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ return accu;
+ }
+ if (!l2) {
+ return accu;
+ }
+ _accu = f(accu, l1.hd, l2.hd);
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function reduce2(l1, l2, acc, f) {
+ return reduce2U(l1, l2, acc, Curry.__3(f));
+}
+
+function reduceReverse2UnsafeU(l1, l2, accu, f) {
+ if (l1 && l2) {
+ return f(reduceReverse2UnsafeU(l1.tl, l2.tl, accu, f), l1.hd, l2.hd);
+ } else {
+ return accu;
+ }
+}
+
+function reduceReverse2U(l1, l2, acc, f) {
+ var len = length(l1);
+ if (len < 1000) {
+ return reduceReverse2UnsafeU(l1, l2, acc, f);
+ } else {
+ return Belt__Belt_Array.reduceReverse2U(toArray(l1), toArray(l2), acc, f);
+ }
+}
+
+function reduceReverse2(l1, l2, acc, f) {
+ return reduceReverse2U(l1, l2, acc, Curry.__3(f));
+}
+
+function everyU(_xs, p) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return true;
+ }
+ if (!p(xs.hd)) {
+ return false;
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function every(xs, p) {
+ return everyU(xs, Curry.__1(p));
+}
+
+function someU(_xs, p) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return false;
+ }
+ if (p(xs.hd)) {
+ return true;
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function some(xs, p) {
+ return someU(xs, Curry.__1(p));
+}
+
+function every2U(_l1, _l2, p) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ return true;
+ }
+ if (!l2) {
+ return true;
+ }
+ if (!p(l1.hd, l2.hd)) {
+ return false;
+ }
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function every2(l1, l2, p) {
+ return every2U(l1, l2, Curry.__2(p));
+}
+
+function cmpByLength(_l1, _l2) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ if (l2) {
+ return -1;
+ } else {
+ return 0;
+ }
+ }
+ if (!l2) {
+ return 1;
+ }
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function cmpU(_l1, _l2, p) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ if (l2) {
+ return -1;
+ } else {
+ return 0;
+ }
+ }
+ if (!l2) {
+ return 1;
+ }
+ var c = p(l1.hd, l2.hd);
+ if (c !== 0) {
+ return c;
+ }
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function cmp(l1, l2, f) {
+ return cmpU(l1, l2, Curry.__2(f));
+}
+
+function eqU(_l1, _l2, p) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ if (l2) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ if (!l2) {
+ return false;
+ }
+ if (!p(l1.hd, l2.hd)) {
+ return false;
+ }
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function eq(l1, l2, f) {
+ return eqU(l1, l2, Curry.__2(f));
+}
+
+function some2U(_l1, _l2, p) {
+ while(true) {
+ var l2 = _l2;
+ var l1 = _l1;
+ if (!l1) {
+ return false;
+ }
+ if (!l2) {
+ return false;
+ }
+ if (p(l1.hd, l2.hd)) {
+ return true;
+ }
+ _l2 = l2.tl;
+ _l1 = l1.tl;
+ continue ;
+ };
+}
+
+function some2(l1, l2, p) {
+ return some2U(l1, l2, Curry.__2(p));
+}
+
+function hasU(_xs, x, eq) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return false;
+ }
+ if (eq(xs.hd, x)) {
+ return true;
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function has(xs, x, eq) {
+ return hasU(xs, x, Curry.__2(eq));
+}
+
+function getAssocU(_xs, x, eq) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return ;
+ }
+ var match = xs.hd;
+ if (eq(match[0], x)) {
+ return Caml_option.some(match[1]);
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function getAssoc(xs, x, eq) {
+ return getAssocU(xs, x, Curry.__2(eq));
+}
+
+function hasAssocU(_xs, x, eq) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return false;
+ }
+ if (eq(xs.hd[0], x)) {
+ return true;
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function hasAssoc(xs, x, eq) {
+ return hasAssocU(xs, x, Curry.__2(eq));
+}
+
+function removeAssocU(xs, x, eq) {
+ if (!xs) {
+ return /* [] */0;
+ }
+ var l = xs.tl;
+ var pair = xs.hd;
+ if (eq(pair[0], x)) {
+ return l;
+ }
+ var cell = {
+ hd: pair,
+ tl: /* [] */0
+ };
+ var removed = removeAssocAuxWithMap(l, x, cell, eq);
+ if (removed) {
+ return cell;
+ } else {
+ return xs;
+ }
+}
+
+function removeAssoc(xs, x, eq) {
+ return removeAssocU(xs, x, Curry.__2(eq));
+}
+
+function setAssocU(xs, x, k, eq) {
+ if (!xs) {
+ return {
+ hd: [
+ x,
+ k
+ ],
+ tl: /* [] */0
+ };
+ }
+ var l = xs.tl;
+ var pair = xs.hd;
+ if (eq(pair[0], x)) {
+ return {
+ hd: [
+ x,
+ k
+ ],
+ tl: l
+ };
+ }
+ var cell = {
+ hd: pair,
+ tl: /* [] */0
+ };
+ var replaced = setAssocAuxWithMap(l, x, k, cell, eq);
+ if (replaced) {
+ return cell;
+ } else {
+ return {
+ hd: [
+ x,
+ k
+ ],
+ tl: xs
+ };
+ }
+}
+
+function setAssoc(xs, x, k, eq) {
+ return setAssocU(xs, x, k, Curry.__2(eq));
+}
+
+function sortU(xs, cmp) {
+ var arr = toArray(xs);
+ Belt__Belt_SortArray.stableSortInPlaceByU(arr, cmp);
+ return fromArray(arr);
+}
+
+function sort(xs, cmp) {
+ return sortU(xs, Curry.__2(cmp));
+}
+
+function getByU(_xs, p) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return ;
+ }
+ var x = xs.hd;
+ if (p(x)) {
+ return Caml_option.some(x);
+ }
+ _xs = xs.tl;
+ continue ;
+ };
+}
+
+function getBy(xs, p) {
+ return getByU(xs, Curry.__1(p));
+}
+
+function keepU(_xs, p) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return /* [] */0;
+ }
+ var t = xs.tl;
+ var h = xs.hd;
+ if (p(h)) {
+ var cell = {
+ hd: h,
+ tl: /* [] */0
+ };
+ copyAuxWitFilter(p, t, cell);
+ return cell;
+ }
+ _xs = t;
+ continue ;
+ };
+}
+
+function keep(xs, p) {
+ return keepU(xs, Curry.__1(p));
+}
+
+function keepWithIndexU(xs, p) {
+ var _xs = xs;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ var xs$1 = _xs;
+ if (!xs$1) {
+ return /* [] */0;
+ }
+ var t = xs$1.tl;
+ var h = xs$1.hd;
+ if (p(h, i)) {
+ var cell = {
+ hd: h,
+ tl: /* [] */0
+ };
+ copyAuxWithFilterIndex(p, t, cell, i + 1 | 0);
+ return cell;
+ }
+ _i = i + 1 | 0;
+ _xs = t;
+ continue ;
+ };
+}
+
+function keepWithIndex(xs, p) {
+ return keepWithIndexU(xs, Curry.__2(p));
+}
+
+function keepMapU(_xs, p) {
+ while(true) {
+ var xs = _xs;
+ if (!xs) {
+ return /* [] */0;
+ }
+ var t = xs.tl;
+ var h = p(xs.hd);
+ if (h !== undefined) {
+ var cell = {
+ hd: Caml_option.valFromOption(h),
+ tl: /* [] */0
+ };
+ copyAuxWitFilterMap(p, t, cell);
+ return cell;
+ }
+ _xs = t;
+ continue ;
+ };
+}
+
+function keepMap(xs, p) {
+ return keepMapU(xs, Curry.__1(p));
+}
+
+function partitionU(l, p) {
+ if (!l) {
+ return [
+ /* [] */0,
+ /* [] */0
+ ];
+ }
+ var h = l.hd;
+ var nextX = {
+ hd: h,
+ tl: /* [] */0
+ };
+ var nextY = {
+ hd: h,
+ tl: /* [] */0
+ };
+ var b = p(h);
+ partitionAux(p, l.tl, nextX, nextY);
+ if (b) {
+ return [
+ nextX,
+ nextY.tl
+ ];
+ } else {
+ return [
+ nextX.tl,
+ nextY
+ ];
+ }
+}
+
+function partition(l, p) {
+ return partitionU(l, Curry.__1(p));
+}
+
+function unzip(xs) {
+ if (!xs) {
+ return [
+ /* [] */0,
+ /* [] */0
+ ];
+ }
+ var match = xs.hd;
+ var cellX = {
+ hd: match[0],
+ tl: /* [] */0
+ };
+ var cellY = {
+ hd: match[1],
+ tl: /* [] */0
+ };
+ splitAux(xs.tl, cellX, cellY);
+ return [
+ cellX,
+ cellY
+ ];
+}
+
+function zip(l1, l2) {
+ if (!l1) {
+ return /* [] */0;
+ }
+ if (!l2) {
+ return /* [] */0;
+ }
+ var cell = {
+ hd: [
+ l1.hd,
+ l2.hd
+ ],
+ tl: /* [] */0
+ };
+ zipAux(l1.tl, l2.tl, cell);
+ return cell;
+}
+
+var size = length;
+
+export {
+ length ,
+ size ,
+ head ,
+ headExn ,
+ tail ,
+ tailExn ,
+ add ,
+ get ,
+ getExn ,
+ make ,
+ makeByU ,
+ makeBy ,
+ shuffle ,
+ drop ,
+ take ,
+ splitAt ,
+ concat ,
+ concatMany ,
+ reverseConcat ,
+ flatten ,
+ mapU ,
+ map ,
+ zip ,
+ zipByU ,
+ zipBy ,
+ mapWithIndexU ,
+ mapWithIndex ,
+ fromArray ,
+ toArray ,
+ reverse ,
+ mapReverseU ,
+ mapReverse ,
+ forEachU ,
+ forEach ,
+ forEachWithIndexU ,
+ forEachWithIndex ,
+ reduceU ,
+ reduce ,
+ reduceWithIndexU ,
+ reduceWithIndex ,
+ reduceReverseU ,
+ reduceReverse ,
+ mapReverse2U ,
+ mapReverse2 ,
+ forEach2U ,
+ forEach2 ,
+ reduce2U ,
+ reduce2 ,
+ reduceReverse2U ,
+ reduceReverse2 ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ every2U ,
+ every2 ,
+ some2U ,
+ some2 ,
+ cmpByLength ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ hasU ,
+ has ,
+ getByU ,
+ getBy ,
+ keepU ,
+ keep ,
+ keepWithIndexU ,
+ keepWithIndex ,
+ keepMapU ,
+ keepMap ,
+ partitionU ,
+ partition ,
+ unzip ,
+ getAssocU ,
+ getAssoc ,
+ hasAssocU ,
+ hasAssoc ,
+ removeAssocU ,
+ removeAssoc ,
+ setAssocU ,
+ setAssoc ,
+ sortU ,
+ sort ,
+}
+/* No side effect */
+`,mc=`// Generated by Melange
+
+import * as Belt__Belt_MapDict from "./belt_MapDict.js";
+import * as Curry from "melange.js/curry.js";
+
+function fromArray(data, id) {
+ var cmp = id.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_MapDict.fromArray(data, cmp)
+ };
+}
+
+function remove(m, x) {
+ var odata = m.data;
+ var cmp = m.cmp;
+ var newData = Belt__Belt_MapDict.remove(odata, x, cmp);
+ if (newData === odata) {
+ return m;
+ } else {
+ return {
+ cmp: cmp,
+ data: newData
+ };
+ }
+}
+
+function removeMany(m, x) {
+ var cmp = m.cmp;
+ var newData = Belt__Belt_MapDict.removeMany(m.data, x, cmp);
+ return {
+ cmp: cmp,
+ data: newData
+ };
+}
+
+function set(m, key, d) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_MapDict.set(m.data, key, d, cmp)
+ };
+}
+
+function mergeMany(m, e) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_MapDict.mergeMany(m.data, e, cmp)
+ };
+}
+
+function updateU(m, key, f) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_MapDict.updateU(m.data, key, f, cmp)
+ };
+}
+
+function update(m, key, f) {
+ return updateU(m, key, Curry.__1(f));
+}
+
+function split(m, x) {
+ var cmp = m.cmp;
+ var match = Belt__Belt_MapDict.split(m.data, x, cmp);
+ var match$1 = match[0];
+ return [
+ [
+ {
+ cmp: cmp,
+ data: match$1[0]
+ },
+ {
+ cmp: cmp,
+ data: match$1[1]
+ }
+ ],
+ match[1]
+ ];
+}
+
+function mergeU(s1, s2, f) {
+ var cmp = s1.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_MapDict.mergeU(s1.data, s2.data, f, cmp)
+ };
+}
+
+function merge(s1, s2, f) {
+ return mergeU(s1, s2, Curry.__3(f));
+}
+
+function make(id) {
+ return {
+ cmp: id.cmp,
+ data: undefined
+ };
+}
+
+function isEmpty(map) {
+ return Belt__Belt_MapDict.isEmpty(map.data);
+}
+
+function findFirstByU(m, f) {
+ return Belt__Belt_MapDict.findFirstByU(m.data, f);
+}
+
+function findFirstBy(m, f) {
+ return Belt__Belt_MapDict.findFirstByU(m.data, Curry.__2(f));
+}
+
+function forEachU(m, f) {
+ Belt__Belt_MapDict.forEachU(m.data, f);
+}
+
+function forEach(m, f) {
+ Belt__Belt_MapDict.forEachU(m.data, Curry.__2(f));
+}
+
+function reduceU(m, acc, f) {
+ return Belt__Belt_MapDict.reduceU(m.data, acc, f);
+}
+
+function reduce(m, acc, f) {
+ return reduceU(m, acc, Curry.__3(f));
+}
+
+function everyU(m, f) {
+ return Belt__Belt_MapDict.everyU(m.data, f);
+}
+
+function every(m, f) {
+ return Belt__Belt_MapDict.everyU(m.data, Curry.__2(f));
+}
+
+function someU(m, f) {
+ return Belt__Belt_MapDict.someU(m.data, f);
+}
+
+function some(m, f) {
+ return Belt__Belt_MapDict.someU(m.data, Curry.__2(f));
+}
+
+function keepU(m, f) {
+ return {
+ cmp: m.cmp,
+ data: Belt__Belt_MapDict.keepU(m.data, f)
+ };
+}
+
+function keep(m, f) {
+ return keepU(m, Curry.__2(f));
+}
+
+function partitionU(m, p) {
+ var cmp = m.cmp;
+ var match = Belt__Belt_MapDict.partitionU(m.data, p);
+ return [
+ {
+ cmp: cmp,
+ data: match[0]
+ },
+ {
+ cmp: cmp,
+ data: match[1]
+ }
+ ];
+}
+
+function partition(m, p) {
+ return partitionU(m, Curry.__2(p));
+}
+
+function mapU(m, f) {
+ return {
+ cmp: m.cmp,
+ data: Belt__Belt_MapDict.mapU(m.data, f)
+ };
+}
+
+function map(m, f) {
+ return mapU(m, Curry.__1(f));
+}
+
+function mapWithKeyU(m, f) {
+ return {
+ cmp: m.cmp,
+ data: Belt__Belt_MapDict.mapWithKeyU(m.data, f)
+ };
+}
+
+function mapWithKey(m, f) {
+ return mapWithKeyU(m, Curry.__2(f));
+}
+
+function size(map) {
+ return Belt__Belt_MapDict.size(map.data);
+}
+
+function toList(map) {
+ return Belt__Belt_MapDict.toList(map.data);
+}
+
+function toArray(m) {
+ return Belt__Belt_MapDict.toArray(m.data);
+}
+
+function keysToArray(m) {
+ return Belt__Belt_MapDict.keysToArray(m.data);
+}
+
+function valuesToArray(m) {
+ return Belt__Belt_MapDict.valuesToArray(m.data);
+}
+
+function minKey(m) {
+ return Belt__Belt_MapDict.minKey(m.data);
+}
+
+function minKeyUndefined(m) {
+ return Belt__Belt_MapDict.minKeyUndefined(m.data);
+}
+
+function maxKey(m) {
+ return Belt__Belt_MapDict.maxKey(m.data);
+}
+
+function maxKeyUndefined(m) {
+ return Belt__Belt_MapDict.maxKeyUndefined(m.data);
+}
+
+function minimum(m) {
+ return Belt__Belt_MapDict.minimum(m.data);
+}
+
+function minUndefined(m) {
+ return Belt__Belt_MapDict.minUndefined(m.data);
+}
+
+function maximum(m) {
+ return Belt__Belt_MapDict.maximum(m.data);
+}
+
+function maxUndefined(m) {
+ return Belt__Belt_MapDict.maxUndefined(m.data);
+}
+
+function get(map, x) {
+ return Belt__Belt_MapDict.get(map.data, x, map.cmp);
+}
+
+function getUndefined(map, x) {
+ return Belt__Belt_MapDict.getUndefined(map.data, x, map.cmp);
+}
+
+function getWithDefault(map, x, def) {
+ return Belt__Belt_MapDict.getWithDefault(map.data, x, def, map.cmp);
+}
+
+function getExn(map, x) {
+ return Belt__Belt_MapDict.getExn(map.data, x, map.cmp);
+}
+
+function has(map, x) {
+ return Belt__Belt_MapDict.has(map.data, x, map.cmp);
+}
+
+function checkInvariantInternal(m) {
+ Belt__Belt_MapDict.checkInvariantInternal(m.data);
+}
+
+function eqU(m1, m2, veq) {
+ return Belt__Belt_MapDict.eqU(m1.data, m2.data, m1.cmp, veq);
+}
+
+function eq(m1, m2, veq) {
+ return eqU(m1, m2, Curry.__2(veq));
+}
+
+function cmpU(m1, m2, vcmp) {
+ return Belt__Belt_MapDict.cmpU(m1.data, m2.data, m1.cmp, vcmp);
+}
+
+function cmp(m1, m2, vcmp) {
+ return cmpU(m1, m2, Curry.__2(vcmp));
+}
+
+function getData(m) {
+ return m.data;
+}
+
+function getId(m) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp
+ };
+}
+
+function packIdData(id, data) {
+ return {
+ cmp: id.cmp,
+ data: data
+ };
+}
+
+export {
+ make ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ findFirstByU ,
+ findFirstBy ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toArray ,
+ toList ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mergeMany ,
+ mergeU ,
+ merge ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ split ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+ getData ,
+ getId ,
+ packIdData ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,pc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function set(t, newK, newD, cmp) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(newK, newD);
+ }
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ var c = cmp(newK, k);
+ if (c === 0) {
+ return Belt__Belt_internalAVLtree.updateValue(n, newD);
+ }
+ var l = n.l;
+ var r = n.r;
+ var v = n.v;
+ if (c < 0) {
+ return Belt__Belt_internalAVLtree.bal(set(l, newK, newD, cmp), k, v, r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l, k, v, set(r, newK, newD, cmp));
+ }
+}
+
+function updateU(t, newK, f, cmp) {
+ if (t !== undefined) {
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ var c = cmp(newK, k);
+ if (c === 0) {
+ var newD = f(Caml_option.some(n.v));
+ if (newD !== undefined) {
+ return Belt__Belt_internalAVLtree.updateValue(n, Caml_option.valFromOption(newD));
+ }
+ var l = n.l;
+ var r = n.r;
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+ }
+ var l$1 = n.l;
+ var r$2 = n.r;
+ var v = n.v;
+ if (c < 0) {
+ var ll = updateU(l$1, newK, f, cmp);
+ if (l$1 === ll) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(ll, k, v, r$2);
+ }
+ }
+ var rr = updateU(r$2, newK, f, cmp);
+ if (r$2 === rr) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l$1, k, v, rr);
+ }
+ }
+ var newD$1 = f(undefined);
+ if (newD$1 !== undefined) {
+ return Belt__Belt_internalAVLtree.singleton(newK, Caml_option.valFromOption(newD$1));
+ } else {
+ return t;
+ }
+}
+
+function update(t, newK, f, cmp) {
+ return updateU(t, newK, Curry.__1(f), cmp);
+}
+
+function removeAux0(n, x, cmp) {
+ var v = n.k;
+ var l = n.l;
+ var r = n.r;
+ var c = cmp(x, v);
+ if (c === 0) {
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+ }
+ if (c < 0) {
+ if (l === undefined) {
+ return n;
+ }
+ var ll = removeAux0(Caml_option.valFromOption(l), x, cmp);
+ if (ll === l) {
+ return n;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(ll, v, n.v, r);
+ }
+ }
+ if (r === undefined) {
+ return n;
+ }
+ var rr = removeAux0(Caml_option.valFromOption(r), x, cmp);
+ if (rr === r) {
+ return n;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l, v, n.v, rr);
+ }
+}
+
+function remove(n, x, cmp) {
+ if (n !== undefined) {
+ return removeAux0(n, x, cmp);
+ }
+
+}
+
+function mergeMany(h, arr, cmp) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ v = set(v, match[0], match[1], cmp);
+ }
+ return v;
+}
+
+function splitAuxPivot(n, x, pres, cmp) {
+ var v = n.k;
+ var d = n.v;
+ var l = n.l;
+ var r = n.r;
+ var c = cmp(x, v);
+ if (c === 0) {
+ pres.contents = Caml_option.some(d);
+ return [
+ l,
+ r
+ ];
+ }
+ if (c < 0) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxPivot(Caml_option.valFromOption(l), x, pres, cmp);
+ return [
+ match[0],
+ Belt__Belt_internalAVLtree.join(match[1], v, d, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxPivot(Caml_option.valFromOption(r), x, pres, cmp);
+ return [
+ Belt__Belt_internalAVLtree.join(l, v, d, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function split(n, x, cmp) {
+ if (n === undefined) {
+ return [
+ [
+ undefined,
+ undefined
+ ],
+ undefined
+ ];
+ }
+ var pres = {
+ contents: undefined
+ };
+ var v = splitAuxPivot(n, x, pres, cmp);
+ return [
+ v,
+ pres.contents
+ ];
+}
+
+function mergeU(s1, s2, f, cmp) {
+ if (s1 === undefined) {
+ if (s2 !== undefined) {
+ return Belt__Belt_internalAVLtree.keepMapU(s2, (function (k, v) {
+ return f(k, undefined, Caml_option.some(v));
+ }));
+ } else {
+ return ;
+ }
+ }
+ var s1n = Caml_option.valFromOption(s1);
+ if (s2 === undefined) {
+ return Belt__Belt_internalAVLtree.keepMapU(s1, (function (k, v) {
+ return f(k, Caml_option.some(v), undefined);
+ }));
+ }
+ var s2n = Caml_option.valFromOption(s2);
+ if (s1n.h >= s2n.h) {
+ var v1 = s1n.k;
+ var d1 = s1n.v;
+ var l1 = s1n.l;
+ var r1 = s1n.r;
+ var d2 = {
+ contents: undefined
+ };
+ var match = splitAuxPivot(s2n, v1, d2, cmp);
+ var d2$1 = d2.contents;
+ var newLeft = mergeU(l1, match[0], f, cmp);
+ var newD = f(v1, Caml_option.some(d1), d2$1);
+ var newRight = mergeU(r1, match[1], f, cmp);
+ return Belt__Belt_internalAVLtree.concatOrJoin(newLeft, v1, newD, newRight);
+ }
+ var v2 = s2n.k;
+ var d2$2 = s2n.v;
+ var l2 = s2n.l;
+ var r2 = s2n.r;
+ var d1$1 = {
+ contents: undefined
+ };
+ var match$1 = splitAuxPivot(s1n, v2, d1$1, cmp);
+ var d1$2 = d1$1.contents;
+ var newLeft$1 = mergeU(match$1[0], l2, f, cmp);
+ var newD$1 = f(v2, d1$2, Caml_option.some(d2$2));
+ var newRight$1 = mergeU(match$1[1], r2, f, cmp);
+ return Belt__Belt_internalAVLtree.concatOrJoin(newLeft$1, v2, newD$1, newRight$1);
+}
+
+function merge(s1, s2, f, cmp) {
+ return mergeU(s1, s2, Curry.__3(f), cmp);
+}
+
+function removeMany(t, keys, cmp) {
+ var len = keys.length;
+ if (t !== undefined) {
+ var _t = t;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ var t$1 = _t;
+ if (i >= len) {
+ return t$1;
+ }
+ var ele = keys[i];
+ var u = removeAux0(t$1, ele, cmp);
+ if (u === undefined) {
+ return u;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+ }
+
+}
+
+var empty;
+
+var isEmpty = Belt__Belt_internalAVLtree.isEmpty;
+
+var has = Belt__Belt_internalAVLtree.has;
+
+var cmpU = Belt__Belt_internalAVLtree.cmpU;
+
+var cmp = Belt__Belt_internalAVLtree.cmp;
+
+var eqU = Belt__Belt_internalAVLtree.eqU;
+
+var eq = Belt__Belt_internalAVLtree.eq;
+
+var findFirstByU = Belt__Belt_internalAVLtree.findFirstByU;
+
+var findFirstBy = Belt__Belt_internalAVLtree.findFirstBy;
+
+var forEachU = Belt__Belt_internalAVLtree.forEachU;
+
+var forEach = Belt__Belt_internalAVLtree.forEach;
+
+var reduceU = Belt__Belt_internalAVLtree.reduceU;
+
+var reduce = Belt__Belt_internalAVLtree.reduce;
+
+var everyU = Belt__Belt_internalAVLtree.everyU;
+
+var every = Belt__Belt_internalAVLtree.every;
+
+var someU = Belt__Belt_internalAVLtree.someU;
+
+var some = Belt__Belt_internalAVLtree.some;
+
+var size = Belt__Belt_internalAVLtree.size;
+
+var toList = Belt__Belt_internalAVLtree.toList;
+
+var toArray = Belt__Belt_internalAVLtree.toArray;
+
+var fromArray = Belt__Belt_internalAVLtree.fromArray;
+
+var keysToArray = Belt__Belt_internalAVLtree.keysToArray;
+
+var valuesToArray = Belt__Belt_internalAVLtree.valuesToArray;
+
+var minKey = Belt__Belt_internalAVLtree.minKey;
+
+var minKeyUndefined = Belt__Belt_internalAVLtree.minKeyUndefined;
+
+var maxKey = Belt__Belt_internalAVLtree.maxKey;
+
+var maxKeyUndefined = Belt__Belt_internalAVLtree.maxKeyUndefined;
+
+var minimum = Belt__Belt_internalAVLtree.minimum;
+
+var minUndefined = Belt__Belt_internalAVLtree.minUndefined;
+
+var maximum = Belt__Belt_internalAVLtree.maximum;
+
+var maxUndefined = Belt__Belt_internalAVLtree.maxUndefined;
+
+var get = Belt__Belt_internalAVLtree.get;
+
+var getUndefined = Belt__Belt_internalAVLtree.getUndefined;
+
+var getWithDefault = Belt__Belt_internalAVLtree.getWithDefault;
+
+var getExn = Belt__Belt_internalAVLtree.getExn;
+
+var checkInvariantInternal = Belt__Belt_internalAVLtree.checkInvariantInternal;
+
+var keepU = Belt__Belt_internalAVLtree.keepSharedU;
+
+var keep = Belt__Belt_internalAVLtree.keepShared;
+
+var partitionU = Belt__Belt_internalAVLtree.partitionSharedU;
+
+var partition = Belt__Belt_internalAVLtree.partitionShared;
+
+var mapU = Belt__Belt_internalAVLtree.mapU;
+
+var map = Belt__Belt_internalAVLtree.map;
+
+var mapWithKeyU = Belt__Belt_internalAVLtree.mapWithKeyU;
+
+var mapWithKey = Belt__Belt_internalAVLtree.mapWithKey;
+
+export {
+ empty ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ findFirstByU ,
+ findFirstBy ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toList ,
+ toArray ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ checkInvariantInternal ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mergeU ,
+ merge ,
+ mergeMany ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ split ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+}
+/* No side effect */
+`,hc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Belt__Belt_internalMapInt from "./belt_internalMapInt.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function set(t, newK, newD) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(newK, newD);
+ }
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ if (newK === k) {
+ return Belt__Belt_internalAVLtree.updateValue(n, newD);
+ }
+ var v = n.v;
+ if (newK < k) {
+ return Belt__Belt_internalAVLtree.bal(set(n.l, newK, newD), k, v, n.r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(n.l, k, v, set(n.r, newK, newD));
+ }
+}
+
+function updateU(t, x, f) {
+ if (t !== undefined) {
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ if (x === k) {
+ var data = f(Caml_option.some(n.v));
+ if (data !== undefined) {
+ return Belt__Belt_internalAVLtree.updateValue(n, Caml_option.valFromOption(data));
+ }
+ var l = n.l;
+ var r = n.r;
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+ }
+ var v = n.v;
+ var l$1 = n.l;
+ var r$2 = n.r;
+ if (x < k) {
+ var ll = updateU(l$1, x, f);
+ if (l$1 === ll) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(ll, k, v, r$2);
+ }
+ }
+ var rr = updateU(r$2, x, f);
+ if (r$2 === rr) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l$1, k, v, rr);
+ }
+ }
+ var data$1 = f(undefined);
+ if (data$1 !== undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1));
+ } else {
+ return t;
+ }
+}
+
+function update(t, x, f) {
+ return updateU(t, x, Curry.__1(f));
+}
+
+function removeAux(n, x) {
+ var v = n.k;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return n;
+ }
+ var ll = removeAux(Caml_option.valFromOption(l), x);
+ if (ll === l) {
+ return n;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(ll, v, n.v, r);
+ }
+ }
+ if (r === undefined) {
+ return n;
+ }
+ var rr = removeAux(Caml_option.valFromOption(r), x);
+ return Belt__Belt_internalAVLtree.bal(l, v, n.v, rr);
+}
+
+function remove(n, x) {
+ if (n !== undefined) {
+ return removeAux(n, x);
+ }
+
+}
+
+function removeMany(t, keys) {
+ var len = keys.length;
+ if (t !== undefined) {
+ var _t = t;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ var t$1 = _t;
+ if (i >= len) {
+ return t$1;
+ }
+ var ele = keys[i];
+ var u = removeAux(t$1, ele);
+ if (u === undefined) {
+ return u;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+ }
+
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ v = set(v, match[0], match[1]);
+ }
+ return v;
+}
+
+var empty;
+
+var isEmpty = Belt__Belt_internalAVLtree.isEmpty;
+
+var has = Belt__Belt_internalMapInt.has;
+
+var cmpU = Belt__Belt_internalMapInt.cmpU;
+
+var cmp = Belt__Belt_internalMapInt.cmp;
+
+var eqU = Belt__Belt_internalMapInt.eqU;
+
+var eq = Belt__Belt_internalMapInt.eq;
+
+var findFirstByU = Belt__Belt_internalAVLtree.findFirstByU;
+
+var findFirstBy = Belt__Belt_internalAVLtree.findFirstBy;
+
+var forEachU = Belt__Belt_internalAVLtree.forEachU;
+
+var forEach = Belt__Belt_internalAVLtree.forEach;
+
+var reduceU = Belt__Belt_internalAVLtree.reduceU;
+
+var reduce = Belt__Belt_internalAVLtree.reduce;
+
+var everyU = Belt__Belt_internalAVLtree.everyU;
+
+var every = Belt__Belt_internalAVLtree.every;
+
+var someU = Belt__Belt_internalAVLtree.someU;
+
+var some = Belt__Belt_internalAVLtree.some;
+
+var size = Belt__Belt_internalAVLtree.size;
+
+var toList = Belt__Belt_internalAVLtree.toList;
+
+var toArray = Belt__Belt_internalAVLtree.toArray;
+
+var fromArray = Belt__Belt_internalMapInt.fromArray;
+
+var keysToArray = Belt__Belt_internalAVLtree.keysToArray;
+
+var valuesToArray = Belt__Belt_internalAVLtree.valuesToArray;
+
+var minKey = Belt__Belt_internalAVLtree.minKey;
+
+var minKeyUndefined = Belt__Belt_internalAVLtree.minKeyUndefined;
+
+var maxKey = Belt__Belt_internalAVLtree.maxKey;
+
+var maxKeyUndefined = Belt__Belt_internalAVLtree.maxKeyUndefined;
+
+var minimum = Belt__Belt_internalAVLtree.minimum;
+
+var minUndefined = Belt__Belt_internalAVLtree.minUndefined;
+
+var maximum = Belt__Belt_internalAVLtree.maximum;
+
+var maxUndefined = Belt__Belt_internalAVLtree.maxUndefined;
+
+var get = Belt__Belt_internalMapInt.get;
+
+var getUndefined = Belt__Belt_internalMapInt.getUndefined;
+
+var getWithDefault = Belt__Belt_internalMapInt.getWithDefault;
+
+var getExn = Belt__Belt_internalMapInt.getExn;
+
+var checkInvariantInternal = Belt__Belt_internalAVLtree.checkInvariantInternal;
+
+var mergeU = Belt__Belt_internalMapInt.mergeU;
+
+var merge = Belt__Belt_internalMapInt.merge;
+
+var keepU = Belt__Belt_internalAVLtree.keepSharedU;
+
+var keep = Belt__Belt_internalAVLtree.keepShared;
+
+var partitionU = Belt__Belt_internalAVLtree.partitionSharedU;
+
+var partition = Belt__Belt_internalAVLtree.partitionShared;
+
+var split = Belt__Belt_internalMapInt.split;
+
+var mapU = Belt__Belt_internalAVLtree.mapU;
+
+var map = Belt__Belt_internalAVLtree.map;
+
+var mapWithKeyU = Belt__Belt_internalAVLtree.mapWithKeyU;
+
+var mapWithKey = Belt__Belt_internalAVLtree.mapWithKey;
+
+export {
+ empty ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ findFirstByU ,
+ findFirstBy ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toList ,
+ toArray ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ checkInvariantInternal ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mergeU ,
+ merge ,
+ mergeMany ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ split ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+}
+/* No side effect */
+`,vc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Belt__Belt_internalMapString from "./belt_internalMapString.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function set(t, newK, newD) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(newK, newD);
+ }
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ if (newK === k) {
+ return Belt__Belt_internalAVLtree.updateValue(n, newD);
+ }
+ var v = n.v;
+ if (newK < k) {
+ return Belt__Belt_internalAVLtree.bal(set(n.l, newK, newD), k, v, n.r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(n.l, k, v, set(n.r, newK, newD));
+ }
+}
+
+function updateU(t, x, f) {
+ if (t !== undefined) {
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ if (x === k) {
+ var data = f(Caml_option.some(n.v));
+ if (data !== undefined) {
+ return Belt__Belt_internalAVLtree.updateValue(n, Caml_option.valFromOption(data));
+ }
+ var l = n.l;
+ var r = n.r;
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+ }
+ var v = n.v;
+ var l$1 = n.l;
+ var r$2 = n.r;
+ if (x < k) {
+ var ll = updateU(l$1, x, f);
+ if (l$1 === ll) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(ll, k, v, r$2);
+ }
+ }
+ var rr = updateU(r$2, x, f);
+ if (r$2 === rr) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l$1, k, v, rr);
+ }
+ }
+ var data$1 = f(undefined);
+ if (data$1 !== undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1));
+ } else {
+ return t;
+ }
+}
+
+function update(t, x, f) {
+ return updateU(t, x, Curry.__1(f));
+}
+
+function removeAux(n, x) {
+ var v = n.k;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return n;
+ }
+ var ll = removeAux(Caml_option.valFromOption(l), x);
+ if (ll === l) {
+ return n;
+ } else {
+ return Belt__Belt_internalAVLtree.bal(ll, v, n.v, r);
+ }
+ }
+ if (r === undefined) {
+ return n;
+ }
+ var rr = removeAux(Caml_option.valFromOption(r), x);
+ return Belt__Belt_internalAVLtree.bal(l, v, n.v, rr);
+}
+
+function remove(n, x) {
+ if (n !== undefined) {
+ return removeAux(n, x);
+ }
+
+}
+
+function removeMany(t, keys) {
+ var len = keys.length;
+ if (t !== undefined) {
+ var _t = t;
+ var _i = 0;
+ while(true) {
+ var i = _i;
+ var t$1 = _t;
+ if (i >= len) {
+ return t$1;
+ }
+ var ele = keys[i];
+ var u = removeAux(t$1, ele);
+ if (u === undefined) {
+ return u;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+ }
+
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var match = arr[i];
+ v = set(v, match[0], match[1]);
+ }
+ return v;
+}
+
+var empty;
+
+var isEmpty = Belt__Belt_internalAVLtree.isEmpty;
+
+var has = Belt__Belt_internalMapString.has;
+
+var cmpU = Belt__Belt_internalMapString.cmpU;
+
+var cmp = Belt__Belt_internalMapString.cmp;
+
+var eqU = Belt__Belt_internalMapString.eqU;
+
+var eq = Belt__Belt_internalMapString.eq;
+
+var findFirstByU = Belt__Belt_internalAVLtree.findFirstByU;
+
+var findFirstBy = Belt__Belt_internalAVLtree.findFirstBy;
+
+var forEachU = Belt__Belt_internalAVLtree.forEachU;
+
+var forEach = Belt__Belt_internalAVLtree.forEach;
+
+var reduceU = Belt__Belt_internalAVLtree.reduceU;
+
+var reduce = Belt__Belt_internalAVLtree.reduce;
+
+var everyU = Belt__Belt_internalAVLtree.everyU;
+
+var every = Belt__Belt_internalAVLtree.every;
+
+var someU = Belt__Belt_internalAVLtree.someU;
+
+var some = Belt__Belt_internalAVLtree.some;
+
+var size = Belt__Belt_internalAVLtree.size;
+
+var toList = Belt__Belt_internalAVLtree.toList;
+
+var toArray = Belt__Belt_internalAVLtree.toArray;
+
+var fromArray = Belt__Belt_internalMapString.fromArray;
+
+var keysToArray = Belt__Belt_internalAVLtree.keysToArray;
+
+var valuesToArray = Belt__Belt_internalAVLtree.valuesToArray;
+
+var minKey = Belt__Belt_internalAVLtree.minKey;
+
+var minKeyUndefined = Belt__Belt_internalAVLtree.minKeyUndefined;
+
+var maxKey = Belt__Belt_internalAVLtree.maxKey;
+
+var maxKeyUndefined = Belt__Belt_internalAVLtree.maxKeyUndefined;
+
+var minimum = Belt__Belt_internalAVLtree.minimum;
+
+var minUndefined = Belt__Belt_internalAVLtree.minUndefined;
+
+var maximum = Belt__Belt_internalAVLtree.maximum;
+
+var maxUndefined = Belt__Belt_internalAVLtree.maxUndefined;
+
+var get = Belt__Belt_internalMapString.get;
+
+var getUndefined = Belt__Belt_internalMapString.getUndefined;
+
+var getWithDefault = Belt__Belt_internalMapString.getWithDefault;
+
+var getExn = Belt__Belt_internalMapString.getExn;
+
+var checkInvariantInternal = Belt__Belt_internalAVLtree.checkInvariantInternal;
+
+var mergeU = Belt__Belt_internalMapString.mergeU;
+
+var merge = Belt__Belt_internalMapString.merge;
+
+var keepU = Belt__Belt_internalAVLtree.keepSharedU;
+
+var keep = Belt__Belt_internalAVLtree.keepShared;
+
+var partitionU = Belt__Belt_internalAVLtree.partitionSharedU;
+
+var partition = Belt__Belt_internalAVLtree.partitionShared;
+
+var split = Belt__Belt_internalMapString.split;
+
+var mapU = Belt__Belt_internalAVLtree.mapU;
+
+var map = Belt__Belt_internalAVLtree.map;
+
+var mapWithKeyU = Belt__Belt_internalAVLtree.mapWithKeyU;
+
+var mapWithKey = Belt__Belt_internalAVLtree.mapWithKey;
+
+export {
+ empty ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ findFirstByU ,
+ findFirstBy ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toList ,
+ toArray ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ checkInvariantInternal ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mergeU ,
+ merge ,
+ mergeMany ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ split ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+}
+/* No side effect */
+`,gc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function removeMutateAux(nt, x, cmp) {
+ var k = nt.k;
+ var c = cmp(x, k);
+ if (c === 0) {
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLtree.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else if (r !== undefined) {
+ return r;
+ } else {
+ return l;
+ }
+ }
+ if (c < 0) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = removeMutateAux(Caml_option.valFromOption(l$1), x, cmp);
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = removeMutateAux(Caml_option.valFromOption(r$1), x, cmp);
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function remove(d, k) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var newRoot = removeMutateAux(Caml_option.valFromOption(oldRoot), k, d.cmp);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function removeArrayMutateAux(_t, xs, _i, len, cmp) {
+ while(true) {
+ var i = _i;
+ var t = _t;
+ if (i >= len) {
+ return t;
+ }
+ var ele = xs[i];
+ var u = removeMutateAux(t, ele, cmp);
+ if (u === undefined) {
+ return ;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+}
+
+function removeMany(d, xs) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var len = xs.length;
+ var newRoot = removeArrayMutateAux(Caml_option.valFromOption(oldRoot), xs, 0, len, d.cmp);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function updateDone(t, x, f, cmp) {
+ if (t !== undefined) {
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.k;
+ var c = cmp(x, k);
+ if (c === 0) {
+ var data = f(Caml_option.some(nt.v));
+ if (data !== undefined) {
+ nt.v = Caml_option.valFromOption(data);
+ return nt;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLtree.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else if (r !== undefined) {
+ return r;
+ } else {
+ return l;
+ }
+ }
+ if (c < 0) {
+ nt.l = updateDone(nt.l, x, f, cmp);
+ } else {
+ nt.r = updateDone(nt.r, x, f, cmp);
+ }
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ }
+ var data$1 = f(undefined);
+ if (data$1 !== undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1));
+ } else {
+ return t;
+ }
+}
+
+function updateU(t, x, f) {
+ var oldRoot = t.data;
+ var newRoot = updateDone(oldRoot, x, f, t.cmp);
+ if (newRoot !== oldRoot) {
+ t.data = newRoot;
+ return ;
+ }
+
+}
+
+function update(t, x, f) {
+ updateU(t, x, Curry.__1(f));
+}
+
+function make(id) {
+ return {
+ cmp: id.cmp,
+ data: undefined
+ };
+}
+
+function clear(m) {
+ m.data = undefined;
+}
+
+function isEmpty(d) {
+ var x = d.data;
+ return x === undefined;
+}
+
+function minKey(m) {
+ return Belt__Belt_internalAVLtree.minKey(m.data);
+}
+
+function minKeyUndefined(m) {
+ return Belt__Belt_internalAVLtree.minKeyUndefined(m.data);
+}
+
+function maxKey(m) {
+ return Belt__Belt_internalAVLtree.maxKey(m.data);
+}
+
+function maxKeyUndefined(m) {
+ return Belt__Belt_internalAVLtree.maxKeyUndefined(m.data);
+}
+
+function minimum(m) {
+ return Belt__Belt_internalAVLtree.minimum(m.data);
+}
+
+function minUndefined(m) {
+ return Belt__Belt_internalAVLtree.minUndefined(m.data);
+}
+
+function maximum(m) {
+ return Belt__Belt_internalAVLtree.maximum(m.data);
+}
+
+function maxUndefined(m) {
+ return Belt__Belt_internalAVLtree.maxUndefined(m.data);
+}
+
+function forEachU(d, f) {
+ Belt__Belt_internalAVLtree.forEachU(d.data, f);
+}
+
+function forEach(d, f) {
+ Belt__Belt_internalAVLtree.forEachU(d.data, Curry.__2(f));
+}
+
+function reduceU(d, acc, cb) {
+ return Belt__Belt_internalAVLtree.reduceU(d.data, acc, cb);
+}
+
+function reduce(d, acc, cb) {
+ return reduceU(d, acc, Curry.__3(cb));
+}
+
+function everyU(d, p) {
+ return Belt__Belt_internalAVLtree.everyU(d.data, p);
+}
+
+function every(d, p) {
+ return Belt__Belt_internalAVLtree.everyU(d.data, Curry.__2(p));
+}
+
+function someU(d, p) {
+ return Belt__Belt_internalAVLtree.someU(d.data, p);
+}
+
+function some(d, p) {
+ return Belt__Belt_internalAVLtree.someU(d.data, Curry.__2(p));
+}
+
+function size(d) {
+ return Belt__Belt_internalAVLtree.size(d.data);
+}
+
+function toList(d) {
+ return Belt__Belt_internalAVLtree.toList(d.data);
+}
+
+function toArray(d) {
+ return Belt__Belt_internalAVLtree.toArray(d.data);
+}
+
+function keysToArray(d) {
+ return Belt__Belt_internalAVLtree.keysToArray(d.data);
+}
+
+function valuesToArray(d) {
+ return Belt__Belt_internalAVLtree.valuesToArray(d.data);
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_internalAVLtree.checkInvariantInternal(d.data);
+}
+
+function cmpU(m1, m2, cmp) {
+ return Belt__Belt_internalAVLtree.cmpU(m1.data, m2.data, m1.cmp, cmp);
+}
+
+function cmp(m1, m2, cmp$1) {
+ return cmpU(m1, m2, Curry.__2(cmp$1));
+}
+
+function eqU(m1, m2, cmp) {
+ return Belt__Belt_internalAVLtree.eqU(m1.data, m2.data, m1.cmp, cmp);
+}
+
+function eq(m1, m2, cmp) {
+ return eqU(m1, m2, Curry.__2(cmp));
+}
+
+function mapU(m, f) {
+ return {
+ cmp: m.cmp,
+ data: Belt__Belt_internalAVLtree.mapU(m.data, f)
+ };
+}
+
+function map(m, f) {
+ return mapU(m, Curry.__1(f));
+}
+
+function mapWithKeyU(m, f) {
+ return {
+ cmp: m.cmp,
+ data: Belt__Belt_internalAVLtree.mapWithKeyU(m.data, f)
+ };
+}
+
+function mapWithKey(m, f) {
+ return mapWithKeyU(m, Curry.__2(f));
+}
+
+function get(m, x) {
+ return Belt__Belt_internalAVLtree.get(m.data, x, m.cmp);
+}
+
+function getUndefined(m, x) {
+ return Belt__Belt_internalAVLtree.getUndefined(m.data, x, m.cmp);
+}
+
+function getWithDefault(m, x, def) {
+ return Belt__Belt_internalAVLtree.getWithDefault(m.data, x, def, m.cmp);
+}
+
+function getExn(m, x) {
+ return Belt__Belt_internalAVLtree.getExn(m.data, x, m.cmp);
+}
+
+function has(m, x) {
+ return Belt__Belt_internalAVLtree.has(m.data, x, m.cmp);
+}
+
+function fromArray(data, id) {
+ var cmp = id.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLtree.fromArray(data, cmp)
+ };
+}
+
+function set(m, e, v) {
+ var oldRoot = m.data;
+ var newRoot = Belt__Belt_internalAVLtree.updateMutate(oldRoot, e, v, m.cmp);
+ if (newRoot !== oldRoot) {
+ m.data = newRoot;
+ return ;
+ }
+
+}
+
+function mergeManyAux(t, xs, cmp) {
+ var v = t;
+ for(var i = 0 ,i_finish = xs.length; i < i_finish; ++i){
+ var match = xs[i];
+ v = Belt__Belt_internalAVLtree.updateMutate(v, match[0], match[1], cmp);
+ }
+ return v;
+}
+
+function mergeMany(d, xs) {
+ var oldRoot = d.data;
+ var newRoot = mergeManyAux(oldRoot, xs, d.cmp);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toList ,
+ toArray ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ checkInvariantInternal ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mergeMany ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+}
+/* No side effect */
+`,bc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Belt__Belt_internalMapInt from "./belt_internalMapInt.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function make(param) {
+ return {
+ data: undefined
+ };
+}
+
+function isEmpty(m) {
+ var x = m.data;
+ return x === undefined;
+}
+
+function clear(m) {
+ m.data = undefined;
+}
+
+function minKeyUndefined(m) {
+ return Belt__Belt_internalAVLtree.minKeyUndefined(m.data);
+}
+
+function minKey(m) {
+ return Belt__Belt_internalAVLtree.minKey(m.data);
+}
+
+function maxKeyUndefined(m) {
+ return Belt__Belt_internalAVLtree.maxKeyUndefined(m.data);
+}
+
+function maxKey(m) {
+ return Belt__Belt_internalAVLtree.maxKey(m.data);
+}
+
+function minimum(m) {
+ return Belt__Belt_internalAVLtree.minimum(m.data);
+}
+
+function minUndefined(m) {
+ return Belt__Belt_internalAVLtree.minUndefined(m.data);
+}
+
+function maximum(m) {
+ return Belt__Belt_internalAVLtree.maximum(m.data);
+}
+
+function maxUndefined(m) {
+ return Belt__Belt_internalAVLtree.maxUndefined(m.data);
+}
+
+function set(m, k, v) {
+ var old_data = m.data;
+ var v$1 = Belt__Belt_internalMapInt.addMutate(old_data, k, v);
+ if (v$1 !== old_data) {
+ m.data = v$1;
+ return ;
+ }
+
+}
+
+function forEachU(d, f) {
+ Belt__Belt_internalAVLtree.forEachU(d.data, f);
+}
+
+function forEach(d, f) {
+ Belt__Belt_internalAVLtree.forEachU(d.data, Curry.__2(f));
+}
+
+function mapU(d, f) {
+ return {
+ data: Belt__Belt_internalAVLtree.mapU(d.data, f)
+ };
+}
+
+function map(d, f) {
+ return mapU(d, Curry.__1(f));
+}
+
+function mapWithKeyU(d, f) {
+ return {
+ data: Belt__Belt_internalAVLtree.mapWithKeyU(d.data, f)
+ };
+}
+
+function mapWithKey(d, f) {
+ return mapWithKeyU(d, Curry.__2(f));
+}
+
+function reduceU(d, acc, f) {
+ return Belt__Belt_internalAVLtree.reduceU(d.data, acc, f);
+}
+
+function reduce(d, acc, f) {
+ return reduceU(d, acc, Curry.__3(f));
+}
+
+function everyU(d, f) {
+ return Belt__Belt_internalAVLtree.everyU(d.data, f);
+}
+
+function every(d, f) {
+ return Belt__Belt_internalAVLtree.everyU(d.data, Curry.__2(f));
+}
+
+function someU(d, f) {
+ return Belt__Belt_internalAVLtree.someU(d.data, f);
+}
+
+function some(d, f) {
+ return Belt__Belt_internalAVLtree.someU(d.data, Curry.__2(f));
+}
+
+function size(d) {
+ return Belt__Belt_internalAVLtree.size(d.data);
+}
+
+function toList(d) {
+ return Belt__Belt_internalAVLtree.toList(d.data);
+}
+
+function toArray(d) {
+ return Belt__Belt_internalAVLtree.toArray(d.data);
+}
+
+function keysToArray(d) {
+ return Belt__Belt_internalAVLtree.keysToArray(d.data);
+}
+
+function valuesToArray(d) {
+ return Belt__Belt_internalAVLtree.valuesToArray(d.data);
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_internalAVLtree.checkInvariantInternal(d.data);
+}
+
+function has(d, v) {
+ return Belt__Belt_internalMapInt.has(d.data, v);
+}
+
+function removeMutateAux(nt, x) {
+ var k = nt.k;
+ if (x === k) {
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLtree.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (x < k) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = removeMutateAux(Caml_option.valFromOption(l$1), x);
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = removeMutateAux(Caml_option.valFromOption(r$1), x);
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function remove(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var newRoot = removeMutateAux(Caml_option.valFromOption(oldRoot), v);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function updateDone(t, x, f) {
+ if (t !== undefined) {
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.k;
+ if (k === x) {
+ var data = f(Caml_option.some(nt.v));
+ if (data !== undefined) {
+ nt.v = Caml_option.valFromOption(data);
+ return nt;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLtree.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ var l$1 = nt.l;
+ var r$1 = nt.r;
+ if (x < k) {
+ var ll = updateDone(l$1, x, f);
+ nt.l = ll;
+ } else {
+ nt.r = updateDone(r$1, x, f);
+ }
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ }
+ var data$1 = f(undefined);
+ if (data$1 !== undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1));
+ } else {
+ return t;
+ }
+}
+
+function updateU(t, x, f) {
+ var oldRoot = t.data;
+ var newRoot = updateDone(oldRoot, x, f);
+ if (newRoot !== oldRoot) {
+ t.data = newRoot;
+ return ;
+ }
+
+}
+
+function update(t, x, f) {
+ updateU(t, x, Curry.__1(f));
+}
+
+function removeArrayMutateAux(_t, xs, _i, len) {
+ while(true) {
+ var i = _i;
+ var t = _t;
+ if (i >= len) {
+ return t;
+ }
+ var ele = xs[i];
+ var u = removeMutateAux(t, ele);
+ if (u === undefined) {
+ return ;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+}
+
+function removeMany(d, xs) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var len = xs.length;
+ var newRoot = removeArrayMutateAux(Caml_option.valFromOption(oldRoot), xs, 0, len);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function fromArray(xs) {
+ return {
+ data: Belt__Belt_internalMapInt.fromArray(xs)
+ };
+}
+
+function cmpU(d0, d1, f) {
+ return Belt__Belt_internalMapInt.cmpU(d0.data, d1.data, f);
+}
+
+function cmp(d0, d1, f) {
+ return cmpU(d0, d1, Curry.__2(f));
+}
+
+function eqU(d0, d1, f) {
+ return Belt__Belt_internalMapInt.eqU(d0.data, d1.data, f);
+}
+
+function eq(d0, d1, f) {
+ return eqU(d0, d1, Curry.__2(f));
+}
+
+function get(d, x) {
+ return Belt__Belt_internalMapInt.get(d.data, x);
+}
+
+function getUndefined(d, x) {
+ return Belt__Belt_internalMapInt.getUndefined(d.data, x);
+}
+
+function getWithDefault(d, x, def) {
+ return Belt__Belt_internalMapInt.getWithDefault(d.data, x, def);
+}
+
+function getExn(d, x) {
+ return Belt__Belt_internalMapInt.getExn(d.data, x);
+}
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toList ,
+ toArray ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ checkInvariantInternal ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+}
+/* No side effect */
+`,yc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Belt__Belt_internalMapString from "./belt_internalMapString.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function make(param) {
+ return {
+ data: undefined
+ };
+}
+
+function isEmpty(m) {
+ var x = m.data;
+ return x === undefined;
+}
+
+function clear(m) {
+ m.data = undefined;
+}
+
+function minKeyUndefined(m) {
+ return Belt__Belt_internalAVLtree.minKeyUndefined(m.data);
+}
+
+function minKey(m) {
+ return Belt__Belt_internalAVLtree.minKey(m.data);
+}
+
+function maxKeyUndefined(m) {
+ return Belt__Belt_internalAVLtree.maxKeyUndefined(m.data);
+}
+
+function maxKey(m) {
+ return Belt__Belt_internalAVLtree.maxKey(m.data);
+}
+
+function minimum(m) {
+ return Belt__Belt_internalAVLtree.minimum(m.data);
+}
+
+function minUndefined(m) {
+ return Belt__Belt_internalAVLtree.minUndefined(m.data);
+}
+
+function maximum(m) {
+ return Belt__Belt_internalAVLtree.maximum(m.data);
+}
+
+function maxUndefined(m) {
+ return Belt__Belt_internalAVLtree.maxUndefined(m.data);
+}
+
+function set(m, k, v) {
+ var old_data = m.data;
+ var v$1 = Belt__Belt_internalMapString.addMutate(old_data, k, v);
+ if (v$1 !== old_data) {
+ m.data = v$1;
+ return ;
+ }
+
+}
+
+function forEachU(d, f) {
+ Belt__Belt_internalAVLtree.forEachU(d.data, f);
+}
+
+function forEach(d, f) {
+ Belt__Belt_internalAVLtree.forEachU(d.data, Curry.__2(f));
+}
+
+function mapU(d, f) {
+ return {
+ data: Belt__Belt_internalAVLtree.mapU(d.data, f)
+ };
+}
+
+function map(d, f) {
+ return mapU(d, Curry.__1(f));
+}
+
+function mapWithKeyU(d, f) {
+ return {
+ data: Belt__Belt_internalAVLtree.mapWithKeyU(d.data, f)
+ };
+}
+
+function mapWithKey(d, f) {
+ return mapWithKeyU(d, Curry.__2(f));
+}
+
+function reduceU(d, acc, f) {
+ return Belt__Belt_internalAVLtree.reduceU(d.data, acc, f);
+}
+
+function reduce(d, acc, f) {
+ return reduceU(d, acc, Curry.__3(f));
+}
+
+function everyU(d, f) {
+ return Belt__Belt_internalAVLtree.everyU(d.data, f);
+}
+
+function every(d, f) {
+ return Belt__Belt_internalAVLtree.everyU(d.data, Curry.__2(f));
+}
+
+function someU(d, f) {
+ return Belt__Belt_internalAVLtree.someU(d.data, f);
+}
+
+function some(d, f) {
+ return Belt__Belt_internalAVLtree.someU(d.data, Curry.__2(f));
+}
+
+function size(d) {
+ return Belt__Belt_internalAVLtree.size(d.data);
+}
+
+function toList(d) {
+ return Belt__Belt_internalAVLtree.toList(d.data);
+}
+
+function toArray(d) {
+ return Belt__Belt_internalAVLtree.toArray(d.data);
+}
+
+function keysToArray(d) {
+ return Belt__Belt_internalAVLtree.keysToArray(d.data);
+}
+
+function valuesToArray(d) {
+ return Belt__Belt_internalAVLtree.valuesToArray(d.data);
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_internalAVLtree.checkInvariantInternal(d.data);
+}
+
+function has(d, v) {
+ return Belt__Belt_internalMapString.has(d.data, v);
+}
+
+function removeMutateAux(nt, x) {
+ var k = nt.k;
+ if (x === k) {
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLtree.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (x < k) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = removeMutateAux(Caml_option.valFromOption(l$1), x);
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = removeMutateAux(Caml_option.valFromOption(r$1), x);
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function remove(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var newRoot = removeMutateAux(Caml_option.valFromOption(oldRoot), v);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function updateDone(t, x, f) {
+ if (t !== undefined) {
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.k;
+ if (k === x) {
+ var data = f(Caml_option.some(nt.v));
+ if (data !== undefined) {
+ nt.v = Caml_option.valFromOption(data);
+ return nt;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLtree.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ var l$1 = nt.l;
+ var r$1 = nt.r;
+ if (x < k) {
+ var ll = updateDone(l$1, x, f);
+ nt.l = ll;
+ } else {
+ nt.r = updateDone(r$1, x, f);
+ }
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+ }
+ var data$1 = f(undefined);
+ if (data$1 !== undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1));
+ } else {
+ return t;
+ }
+}
+
+function updateU(t, x, f) {
+ var oldRoot = t.data;
+ var newRoot = updateDone(oldRoot, x, f);
+ if (newRoot !== oldRoot) {
+ t.data = newRoot;
+ return ;
+ }
+
+}
+
+function update(t, x, f) {
+ updateU(t, x, Curry.__1(f));
+}
+
+function removeArrayMutateAux(_t, xs, _i, len) {
+ while(true) {
+ var i = _i;
+ var t = _t;
+ if (i >= len) {
+ return t;
+ }
+ var ele = xs[i];
+ var u = removeMutateAux(t, ele);
+ if (u === undefined) {
+ return ;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+}
+
+function removeMany(d, xs) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var len = xs.length;
+ var newRoot = removeArrayMutateAux(Caml_option.valFromOption(oldRoot), xs, 0, len);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function fromArray(xs) {
+ return {
+ data: Belt__Belt_internalMapString.fromArray(xs)
+ };
+}
+
+function cmpU(d0, d1, f) {
+ return Belt__Belt_internalMapString.cmpU(d0.data, d1.data, f);
+}
+
+function cmp(d0, d1, f) {
+ return cmpU(d0, d1, Curry.__2(f));
+}
+
+function eqU(d0, d1, f) {
+ return Belt__Belt_internalMapString.eqU(d0.data, d1.data, f);
+}
+
+function eq(d0, d1, f) {
+ return eqU(d0, d1, Curry.__2(f));
+}
+
+function get(d, x) {
+ return Belt__Belt_internalMapString.get(d.data, x);
+}
+
+function getUndefined(d, x) {
+ return Belt__Belt_internalMapString.getUndefined(d.data, x);
+}
+
+function getWithDefault(d, x, def) {
+ return Belt__Belt_internalMapString.getWithDefault(d.data, x, def);
+}
+
+function getExn(d, x) {
+ return Belt__Belt_internalMapString.getExn(d.data, x);
+}
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ has ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ size ,
+ toList ,
+ toArray ,
+ fromArray ,
+ keysToArray ,
+ valuesToArray ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ checkInvariantInternal ,
+ remove ,
+ removeMany ,
+ set ,
+ updateU ,
+ update ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+}
+/* No side effect */
+`,xc=`// Generated by Melange
+
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function make(param) {
+ return {
+ length: 0,
+ first: undefined,
+ last: undefined
+ };
+}
+
+function clear(q) {
+ q.length = 0;
+ q.first = undefined;
+ q.last = undefined;
+}
+
+function add(q, x) {
+ var cell = {
+ content: x,
+ next: undefined
+ };
+ var last = q.last;
+ if (last !== undefined) {
+ q.length = q.length + 1 | 0;
+ Caml_option.valFromOption(last).next = cell;
+ q.last = cell;
+ } else {
+ q.length = 1;
+ q.first = cell;
+ q.last = cell;
+ }
+}
+
+function peek(q) {
+ var v = q.first;
+ if (v !== undefined) {
+ return Caml_option.some(Caml_option.valFromOption(v).content);
+ }
+
+}
+
+function peekUndefined(q) {
+ var v = q.first;
+ if (v !== undefined) {
+ return Caml_option.valFromOption(v).content;
+ }
+
+}
+
+function peekExn(q) {
+ var v = q.first;
+ if (v !== undefined) {
+ return Caml_option.valFromOption(v).content;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+}
+
+function pop(q) {
+ var x = q.first;
+ if (x === undefined) {
+ return ;
+ }
+ var x$1 = Caml_option.valFromOption(x);
+ var next = x$1.next;
+ if (next === undefined) {
+ clear(q);
+ return Caml_option.some(x$1.content);
+ } else {
+ q.length = q.length - 1 | 0;
+ q.first = next;
+ return Caml_option.some(x$1.content);
+ }
+}
+
+function popExn(q) {
+ var x = q.first;
+ if (x !== undefined) {
+ var x$1 = Caml_option.valFromOption(x);
+ var next = x$1.next;
+ if (next === undefined) {
+ clear(q);
+ return x$1.content;
+ } else {
+ q.length = q.length - 1 | 0;
+ q.first = next;
+ return x$1.content;
+ }
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+}
+
+function popUndefined(q) {
+ var x = q.first;
+ if (x === undefined) {
+ return ;
+ }
+ var x$1 = Caml_option.valFromOption(x);
+ var next = x$1.next;
+ if (next === undefined) {
+ clear(q);
+ return x$1.content;
+ } else {
+ q.length = q.length - 1 | 0;
+ q.first = next;
+ return x$1.content;
+ }
+}
+
+function copy(q) {
+ var qRes = {
+ length: q.length,
+ first: undefined,
+ last: undefined
+ };
+ var _prev;
+ var _cell = q.first;
+ while(true) {
+ var cell = _cell;
+ var prev = _prev;
+ if (cell !== undefined) {
+ var x = Caml_option.valFromOption(cell);
+ var content = x.content;
+ var res = {
+ content: content,
+ next: undefined
+ };
+ if (prev !== undefined) {
+ Caml_option.valFromOption(prev).next = res;
+ } else {
+ qRes.first = res;
+ }
+ _cell = x.next;
+ _prev = res;
+ continue ;
+ }
+ qRes.last = prev;
+ return qRes;
+ };
+}
+
+function mapU(q, f) {
+ var qRes = {
+ length: q.length,
+ first: undefined,
+ last: undefined
+ };
+ var _prev;
+ var _cell = q.first;
+ while(true) {
+ var cell = _cell;
+ var prev = _prev;
+ if (cell !== undefined) {
+ var x = Caml_option.valFromOption(cell);
+ var content = f(x.content);
+ var res = {
+ content: content,
+ next: undefined
+ };
+ if (prev !== undefined) {
+ Caml_option.valFromOption(prev).next = res;
+ } else {
+ qRes.first = res;
+ }
+ _cell = x.next;
+ _prev = res;
+ continue ;
+ }
+ qRes.last = prev;
+ return qRes;
+ };
+}
+
+function map(q, f) {
+ return mapU(q, Curry.__1(f));
+}
+
+function isEmpty(q) {
+ return q.length === 0;
+}
+
+function size(q) {
+ return q.length;
+}
+
+function forEachU(q, f) {
+ var _cell = q.first;
+ while(true) {
+ var cell = _cell;
+ if (cell === undefined) {
+ return ;
+ }
+ var x = Caml_option.valFromOption(cell);
+ f(x.content);
+ _cell = x.next;
+ continue ;
+ };
+}
+
+function forEach(q, f) {
+ forEachU(q, Curry.__1(f));
+}
+
+function reduceU(q, accu, f) {
+ var _accu = accu;
+ var _cell = q.first;
+ while(true) {
+ var cell = _cell;
+ var accu$1 = _accu;
+ if (cell === undefined) {
+ return accu$1;
+ }
+ var x = Caml_option.valFromOption(cell);
+ var accu$2 = f(accu$1, x.content);
+ _cell = x.next;
+ _accu = accu$2;
+ continue ;
+ };
+}
+
+function reduce(q, accu, f) {
+ return reduceU(q, accu, Curry.__2(f));
+}
+
+function transfer(q1, q2) {
+ if (q1.length <= 0) {
+ return ;
+ }
+ var l = q2.last;
+ if (l !== undefined) {
+ q2.length = q2.length + q1.length | 0;
+ Caml_option.valFromOption(l).next = q1.first;
+ q2.last = q1.last;
+ return clear(q1);
+ } else {
+ q2.length = q1.length;
+ q2.first = q1.first;
+ q2.last = q1.last;
+ return clear(q1);
+ }
+}
+
+function fillAux(_i, arr, _cell) {
+ while(true) {
+ var cell = _cell;
+ var i = _i;
+ if (cell === undefined) {
+ return ;
+ }
+ var x = Caml_option.valFromOption(cell);
+ arr[i] = x.content;
+ _cell = x.next;
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function toArray(x) {
+ var v = new Array(x.length);
+ fillAux(0, v, x.first);
+ return v;
+}
+
+function fromArray(arr) {
+ var q = {
+ length: 0,
+ first: undefined,
+ last: undefined
+ };
+ for(var i = 0 ,i_finish = arr.length; i < i_finish; ++i){
+ add(q, arr[i]);
+ }
+ return q;
+}
+
+export {
+ make ,
+ clear ,
+ isEmpty ,
+ fromArray ,
+ add ,
+ peek ,
+ peekUndefined ,
+ peekExn ,
+ pop ,
+ popUndefined ,
+ popExn ,
+ copy ,
+ size ,
+ mapU ,
+ map ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ transfer ,
+ toArray ,
+}
+/* No side effect */
+`,kc=`// Generated by Melange
+
+import * as Belt__Belt_SortArray from "./belt_SortArray.js";
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function remove0(nt, x, cmp) {
+ var k = nt.v;
+ var c = cmp(x, k);
+ if (c === 0) {
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLset.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (c < 0) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = remove0(Caml_option.valFromOption(l$1), x, cmp);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = remove0(Caml_option.valFromOption(r$1), x, cmp);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function remove(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var newRoot = remove0(Caml_option.valFromOption(oldRoot), v, d.cmp);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function removeMany0(_t, xs, _i, len, cmp) {
+ while(true) {
+ var i = _i;
+ var t = _t;
+ if (i >= len) {
+ return t;
+ }
+ var ele = xs[i];
+ var u = remove0(t, ele, cmp);
+ if (u === undefined) {
+ return ;
+ }
+ _i = i + 1 | 0;
+ _t = Caml_option.valFromOption(u);
+ continue ;
+ };
+}
+
+function removeMany(d, xs) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var len = xs.length;
+ d.data = removeMany0(Caml_option.valFromOption(oldRoot), xs, 0, len, d.cmp);
+}
+
+function removeCheck0(nt, x, removed, cmp) {
+ var k = nt.v;
+ var c = cmp(x, k);
+ if (c === 0) {
+ removed.contents = true;
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLset.removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(r));
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (c < 0) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = removeCheck0(Caml_option.valFromOption(l$1), x, removed, cmp);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = removeCheck0(Caml_option.valFromOption(r$1), x, removed, cmp);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function removeCheck(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return false;
+ }
+ var removed = {
+ contents: false
+ };
+ var newRoot = removeCheck0(Caml_option.valFromOption(oldRoot), v, removed, d.cmp);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ }
+ return removed.contents;
+}
+
+function addCheck0(t, x, added, cmp) {
+ if (t !== undefined) {
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.v;
+ var c = cmp(x, k);
+ if (c === 0) {
+ return t;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (c < 0) {
+ var ll = addCheck0(l, x, added, cmp);
+ nt.l = ll;
+ } else {
+ nt.r = addCheck0(r, x, added, cmp);
+ }
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ }
+ added.contents = true;
+ return Belt__Belt_internalAVLset.singleton(x);
+}
+
+function addCheck(m, e) {
+ var oldRoot = m.data;
+ var added = {
+ contents: false
+ };
+ var newRoot = addCheck0(oldRoot, e, added, m.cmp);
+ if (newRoot !== oldRoot) {
+ m.data = newRoot;
+ }
+ return added.contents;
+}
+
+function add(m, e) {
+ var oldRoot = m.data;
+ var newRoot = Belt__Belt_internalAVLset.addMutate(m.cmp, oldRoot, e);
+ if (newRoot !== oldRoot) {
+ m.data = newRoot;
+ return ;
+ }
+
+}
+
+function addArrayMutate(t, xs, cmp) {
+ var v = t;
+ for(var i = 0 ,i_finish = xs.length; i < i_finish; ++i){
+ v = Belt__Belt_internalAVLset.addMutate(cmp, v, xs[i]);
+ }
+ return v;
+}
+
+function mergeMany(d, xs) {
+ d.data = addArrayMutate(d.data, xs, d.cmp);
+}
+
+function make(id) {
+ return {
+ cmp: id.cmp,
+ data: undefined
+ };
+}
+
+function isEmpty(d) {
+ var n = d.data;
+ return n === undefined;
+}
+
+function minimum(d) {
+ return Belt__Belt_internalAVLset.minimum(d.data);
+}
+
+function minUndefined(d) {
+ return Belt__Belt_internalAVLset.minUndefined(d.data);
+}
+
+function maximum(d) {
+ return Belt__Belt_internalAVLset.maximum(d.data);
+}
+
+function maxUndefined(d) {
+ return Belt__Belt_internalAVLset.maxUndefined(d.data);
+}
+
+function forEachU(d, f) {
+ Belt__Belt_internalAVLset.forEachU(d.data, f);
+}
+
+function forEach(d, f) {
+ Belt__Belt_internalAVLset.forEachU(d.data, Curry.__1(f));
+}
+
+function reduceU(d, acc, cb) {
+ return Belt__Belt_internalAVLset.reduceU(d.data, acc, cb);
+}
+
+function reduce(d, acc, cb) {
+ return reduceU(d, acc, Curry.__2(cb));
+}
+
+function everyU(d, p) {
+ return Belt__Belt_internalAVLset.everyU(d.data, p);
+}
+
+function every(d, p) {
+ return Belt__Belt_internalAVLset.everyU(d.data, Curry.__1(p));
+}
+
+function someU(d, p) {
+ return Belt__Belt_internalAVLset.someU(d.data, p);
+}
+
+function some(d, p) {
+ return Belt__Belt_internalAVLset.someU(d.data, Curry.__1(p));
+}
+
+function size(d) {
+ return Belt__Belt_internalAVLset.size(d.data);
+}
+
+function toList(d) {
+ return Belt__Belt_internalAVLset.toList(d.data);
+}
+
+function toArray(d) {
+ return Belt__Belt_internalAVLset.toArray(d.data);
+}
+
+function fromSortedArrayUnsafe(xs, id) {
+ return {
+ cmp: id.cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayUnsafe(xs)
+ };
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_internalAVLset.checkInvariantInternal(d.data);
+}
+
+function fromArray(data, id) {
+ var cmp = id.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromArray(data, cmp)
+ };
+}
+
+function cmp(d0, d1) {
+ return Belt__Belt_internalAVLset.cmp(d0.data, d1.data, d0.cmp);
+}
+
+function eq(d0, d1) {
+ return Belt__Belt_internalAVLset.eq(d0.data, d1.data, d0.cmp);
+}
+
+function get(d, x) {
+ return Belt__Belt_internalAVLset.get(d.data, x, d.cmp);
+}
+
+function getUndefined(d, x) {
+ return Belt__Belt_internalAVLset.getUndefined(d.data, x, d.cmp);
+}
+
+function getExn(d, x) {
+ return Belt__Belt_internalAVLset.getExn(d.data, x, d.cmp);
+}
+
+function split(d, key) {
+ var arr = Belt__Belt_internalAVLset.toArray(d.data);
+ var cmp = d.cmp;
+ var i = Belt__Belt_SortArray.binarySearchByU(arr, key, cmp);
+ var len = arr.length;
+ if (i >= 0) {
+ return [
+ [
+ {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, 0, i)
+ },
+ {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, i + 1 | 0, (len - i | 0) - 1 | 0)
+ }
+ ],
+ true
+ ];
+ }
+ var next = (-i | 0) - 1 | 0;
+ return [
+ [
+ {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, 0, next)
+ },
+ {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, next, len - next | 0)
+ }
+ ],
+ false
+ ];
+}
+
+function keepU(d, p) {
+ return {
+ cmp: d.cmp,
+ data: Belt__Belt_internalAVLset.keepCopyU(d.data, p)
+ };
+}
+
+function keep(d, p) {
+ return keepU(d, Curry.__1(p));
+}
+
+function partitionU(d, p) {
+ var cmp = d.cmp;
+ var match = Belt__Belt_internalAVLset.partitionCopyU(d.data, p);
+ return [
+ {
+ cmp: cmp,
+ data: match[0]
+ },
+ {
+ cmp: cmp,
+ data: match[1]
+ }
+ ];
+}
+
+function partition(d, p) {
+ return partitionU(d, Curry.__1(p));
+}
+
+function subset(a, b) {
+ return Belt__Belt_internalAVLset.subset(a.data, b.data, a.cmp);
+}
+
+function intersect(a, b) {
+ var cmp = a.cmp;
+ var match = a.data;
+ var match$1 = b.data;
+ if (match === undefined) {
+ return {
+ cmp: cmp,
+ data: undefined
+ };
+ }
+ if (match$1 === undefined) {
+ return {
+ cmp: cmp,
+ data: undefined
+ };
+ }
+ var datab0 = Caml_option.valFromOption(match$1);
+ var dataa0 = Caml_option.valFromOption(match);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (cmp(tmp[sizea - 1 | 0], tmp[sizea]) < 0 || cmp(tmp[totalSize - 1 | 0], tmp[0]) < 0) {
+ return {
+ cmp: cmp,
+ data: undefined
+ };
+ }
+ var tmp2 = new Array(sizea < sizeb ? sizea : sizeb);
+ var k = Belt__Belt_SortArray.intersectU(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0, cmp);
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function diff(a, b) {
+ var cmp = a.cmp;
+ var dataa = a.data;
+ var match = b.data;
+ if (dataa === undefined) {
+ return {
+ cmp: cmp,
+ data: undefined
+ };
+ }
+ if (match === undefined) {
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.copy(dataa)
+ };
+ }
+ var datab0 = Caml_option.valFromOption(match);
+ var dataa0 = Caml_option.valFromOption(dataa);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (cmp(tmp[sizea - 1 | 0], tmp[sizea]) < 0 || cmp(tmp[totalSize - 1 | 0], tmp[0]) < 0) {
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.copy(dataa)
+ };
+ }
+ var tmp2 = new Array(sizea);
+ var k = Belt__Belt_SortArray.diffU(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0, cmp);
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function union(a, b) {
+ var cmp = a.cmp;
+ var dataa = a.data;
+ var datab = b.data;
+ if (dataa === undefined) {
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.copy(datab)
+ };
+ }
+ if (datab === undefined) {
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.copy(dataa)
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab);
+ var dataa0 = Caml_option.valFromOption(dataa);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (cmp(tmp[sizea - 1 | 0], tmp[sizea]) < 0) {
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp, 0, totalSize)
+ };
+ }
+ var tmp2 = new Array(totalSize);
+ var k = Belt__Belt_SortArray.unionU(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0, cmp);
+ return {
+ cmp: cmp,
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function has(d, x) {
+ return Belt__Belt_internalAVLset.has(d.data, x, d.cmp);
+}
+
+function copy(d) {
+ return {
+ cmp: d.cmp,
+ data: Belt__Belt_internalAVLset.copy(d.data)
+ };
+}
+
+export {
+ make ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ copy ,
+ isEmpty ,
+ has ,
+ add ,
+ addCheck ,
+ mergeMany ,
+ remove ,
+ removeCheck ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toList ,
+ toArray ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,$c=`// Generated by Melange
+
+import * as Belt__Belt_SortArrayInt from "./belt_SortArrayInt.js";
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Belt__Belt_internalSetInt from "./belt_internalSetInt.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function remove0(nt, x) {
+ var k = nt.v;
+ if (x === k) {
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLset.removeMinAuxWithRootMutate(nt, r);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (x < k) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = remove0(l$1, x);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = remove0(r$1, x);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function remove(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var newRoot = remove0(Caml_option.valFromOption(oldRoot), v);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function removeMany0(_t, xs, _i, len) {
+ while(true) {
+ var i = _i;
+ var t = _t;
+ if (i >= len) {
+ return t;
+ }
+ var ele = xs[i];
+ var u = remove0(t, ele);
+ if (u === undefined) {
+ return ;
+ }
+ _i = i + 1 | 0;
+ _t = u;
+ continue ;
+ };
+}
+
+function removeMany(d, xs) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var len = xs.length;
+ d.data = removeMany0(Caml_option.valFromOption(oldRoot), xs, 0, len);
+}
+
+function removeCheck0(nt, x, removed) {
+ var k = nt.v;
+ if (x === k) {
+ removed.contents = true;
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLset.removeMinAuxWithRootMutate(nt, r);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (x < k) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = removeCheck0(l$1, x, removed);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = removeCheck0(r$1, x, removed);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function removeCheck(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return false;
+ }
+ var removed = {
+ contents: false
+ };
+ var newRoot = removeCheck0(Caml_option.valFromOption(oldRoot), v, removed);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ }
+ return removed.contents;
+}
+
+function addCheck0(t, x, added) {
+ if (t !== undefined) {
+ var k = t.v;
+ if (x === k) {
+ return t;
+ }
+ var l = t.l;
+ var r = t.r;
+ if (x < k) {
+ var ll = addCheck0(l, x, added);
+ t.l = ll;
+ } else {
+ t.r = addCheck0(r, x, added);
+ }
+ return Belt__Belt_internalAVLset.balMutate(t);
+ }
+ added.contents = true;
+ return Belt__Belt_internalAVLset.singleton(x);
+}
+
+function addCheck(m, e) {
+ var oldRoot = m.data;
+ var added = {
+ contents: false
+ };
+ var newRoot = addCheck0(oldRoot, e, added);
+ if (newRoot !== oldRoot) {
+ m.data = newRoot;
+ }
+ return added.contents;
+}
+
+function add(d, k) {
+ var oldRoot = d.data;
+ var v = Belt__Belt_internalSetInt.addMutate(oldRoot, k);
+ if (v !== oldRoot) {
+ d.data = v;
+ return ;
+ }
+
+}
+
+function addArrayMutate(t, xs) {
+ var v = t;
+ for(var i = 0 ,i_finish = xs.length; i < i_finish; ++i){
+ v = Belt__Belt_internalSetInt.addMutate(v, xs[i]);
+ }
+ return v;
+}
+
+function mergeMany(d, arr) {
+ d.data = addArrayMutate(d.data, arr);
+}
+
+function make(param) {
+ return {
+ data: undefined
+ };
+}
+
+function isEmpty(d) {
+ var n = d.data;
+ return n === undefined;
+}
+
+function minimum(d) {
+ return Belt__Belt_internalAVLset.minimum(d.data);
+}
+
+function minUndefined(d) {
+ return Belt__Belt_internalAVLset.minUndefined(d.data);
+}
+
+function maximum(d) {
+ return Belt__Belt_internalAVLset.maximum(d.data);
+}
+
+function maxUndefined(d) {
+ return Belt__Belt_internalAVLset.maxUndefined(d.data);
+}
+
+function forEachU(d, f) {
+ Belt__Belt_internalAVLset.forEachU(d.data, f);
+}
+
+function forEach(d, f) {
+ Belt__Belt_internalAVLset.forEachU(d.data, Curry.__1(f));
+}
+
+function reduceU(d, acc, cb) {
+ return Belt__Belt_internalAVLset.reduceU(d.data, acc, cb);
+}
+
+function reduce(d, acc, cb) {
+ return reduceU(d, acc, Curry.__2(cb));
+}
+
+function everyU(d, p) {
+ return Belt__Belt_internalAVLset.everyU(d.data, p);
+}
+
+function every(d, p) {
+ return Belt__Belt_internalAVLset.everyU(d.data, Curry.__1(p));
+}
+
+function someU(d, p) {
+ return Belt__Belt_internalAVLset.someU(d.data, p);
+}
+
+function some(d, p) {
+ return Belt__Belt_internalAVLset.someU(d.data, Curry.__1(p));
+}
+
+function size(d) {
+ return Belt__Belt_internalAVLset.size(d.data);
+}
+
+function toList(d) {
+ return Belt__Belt_internalAVLset.toList(d.data);
+}
+
+function toArray(d) {
+ return Belt__Belt_internalAVLset.toArray(d.data);
+}
+
+function fromSortedArrayUnsafe(xs) {
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayUnsafe(xs)
+ };
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_internalAVLset.checkInvariantInternal(d.data);
+}
+
+function fromArray(xs) {
+ return {
+ data: Belt__Belt_internalSetInt.fromArray(xs)
+ };
+}
+
+function cmp(d0, d1) {
+ return Belt__Belt_internalSetInt.cmp(d0.data, d1.data);
+}
+
+function eq(d0, d1) {
+ return Belt__Belt_internalSetInt.eq(d0.data, d1.data);
+}
+
+function get(d, x) {
+ return Belt__Belt_internalSetInt.get(d.data, x);
+}
+
+function getUndefined(d, x) {
+ return Belt__Belt_internalSetInt.getUndefined(d.data, x);
+}
+
+function getExn(d, x) {
+ return Belt__Belt_internalSetInt.getExn(d.data, x);
+}
+
+function split(d, key) {
+ var arr = Belt__Belt_internalAVLset.toArray(d.data);
+ var i = Belt__Belt_SortArrayInt.binarySearch(arr, key);
+ var len = arr.length;
+ if (i >= 0) {
+ return [
+ [
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, 0, i)
+ },
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, i + 1 | 0, (len - i | 0) - 1 | 0)
+ }
+ ],
+ true
+ ];
+ }
+ var next = (-i | 0) - 1 | 0;
+ return [
+ [
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, 0, next)
+ },
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, next, len - next | 0)
+ }
+ ],
+ false
+ ];
+}
+
+function keepU(d, p) {
+ return {
+ data: Belt__Belt_internalAVLset.keepCopyU(d.data, p)
+ };
+}
+
+function keep(d, p) {
+ return keepU(d, Curry.__1(p));
+}
+
+function partitionU(d, p) {
+ var match = Belt__Belt_internalAVLset.partitionCopyU(d.data, p);
+ return [
+ {
+ data: match[0]
+ },
+ {
+ data: match[1]
+ }
+ ];
+}
+
+function partition(d, p) {
+ return partitionU(d, Curry.__1(p));
+}
+
+function subset(a, b) {
+ return Belt__Belt_internalSetInt.subset(a.data, b.data);
+}
+
+function intersect(dataa, datab) {
+ var dataa$1 = dataa.data;
+ var datab$1 = datab.data;
+ if (dataa$1 === undefined) {
+ return {
+ data: undefined
+ };
+ }
+ if (datab$1 === undefined) {
+ return {
+ data: undefined
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab$1);
+ var dataa0 = Caml_option.valFromOption(dataa$1);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (tmp[sizea - 1 | 0] < tmp[sizea] || tmp[totalSize - 1 | 0] < tmp[0]) {
+ return {
+ data: undefined
+ };
+ }
+ var tmp2 = new Array(sizea < sizeb ? sizea : sizeb);
+ var k = Belt__Belt_SortArrayInt.intersect(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0);
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function diff(dataa, datab) {
+ var dataa$1 = dataa.data;
+ var datab$1 = datab.data;
+ if (dataa$1 === undefined) {
+ return {
+ data: undefined
+ };
+ }
+ if (datab$1 === undefined) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(dataa$1)
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab$1);
+ var dataa0 = Caml_option.valFromOption(dataa$1);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (tmp[sizea - 1 | 0] < tmp[sizea] || tmp[totalSize - 1 | 0] < tmp[0]) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(dataa$1)
+ };
+ }
+ var tmp2 = new Array(sizea);
+ var k = Belt__Belt_SortArrayInt.diff(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0);
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function union(dataa, datab) {
+ var dataa$1 = dataa.data;
+ var datab$1 = datab.data;
+ if (dataa$1 === undefined) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(datab$1)
+ };
+ }
+ if (datab$1 === undefined) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(dataa$1)
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab$1);
+ var dataa0 = Caml_option.valFromOption(dataa$1);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (tmp[sizea - 1 | 0] < tmp[sizea]) {
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp, 0, totalSize)
+ };
+ }
+ var tmp2 = new Array(totalSize);
+ var k = Belt__Belt_SortArrayInt.union(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0);
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function has(d, x) {
+ return Belt__Belt_internalSetInt.has(d.data, x);
+}
+
+function copy(d) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(d.data)
+ };
+}
+
+export {
+ make ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ copy ,
+ isEmpty ,
+ has ,
+ add ,
+ addCheck ,
+ mergeMany ,
+ remove ,
+ removeCheck ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toList ,
+ toArray ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,Ec=`// Generated by Melange
+
+import * as Belt__Belt_SortArrayString from "./belt_SortArrayString.js";
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Belt__Belt_internalSetString from "./belt_internalSetString.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function remove0(nt, x) {
+ var k = nt.v;
+ if (x === k) {
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLset.removeMinAuxWithRootMutate(nt, r);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (x < k) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = remove0(l$1, x);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = remove0(r$1, x);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function remove(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var newRoot = remove0(Caml_option.valFromOption(oldRoot), v);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ return ;
+ }
+
+}
+
+function removeMany0(_t, xs, _i, len) {
+ while(true) {
+ var i = _i;
+ var t = _t;
+ if (i >= len) {
+ return t;
+ }
+ var ele = xs[i];
+ var u = remove0(t, ele);
+ if (u === undefined) {
+ return ;
+ }
+ _i = i + 1 | 0;
+ _t = u;
+ continue ;
+ };
+}
+
+function removeMany(d, xs) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return ;
+ }
+ var len = xs.length;
+ d.data = removeMany0(Caml_option.valFromOption(oldRoot), xs, 0, len);
+}
+
+function removeCheck0(nt, x, removed) {
+ var k = nt.v;
+ if (x === k) {
+ removed.contents = true;
+ var l = nt.l;
+ var r = nt.r;
+ if (l !== undefined) {
+ if (r !== undefined) {
+ nt.r = Belt__Belt_internalAVLset.removeMinAuxWithRootMutate(nt, r);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return l;
+ }
+ } else {
+ return r;
+ }
+ }
+ if (x < k) {
+ var l$1 = nt.l;
+ if (l$1 !== undefined) {
+ nt.l = removeCheck0(l$1, x, removed);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+ }
+ var r$1 = nt.r;
+ if (r$1 !== undefined) {
+ nt.r = removeCheck0(r$1, x, removed);
+ return Belt__Belt_internalAVLset.balMutate(nt);
+ } else {
+ return nt;
+ }
+}
+
+function removeCheck(d, v) {
+ var oldRoot = d.data;
+ if (oldRoot === undefined) {
+ return false;
+ }
+ var removed = {
+ contents: false
+ };
+ var newRoot = removeCheck0(Caml_option.valFromOption(oldRoot), v, removed);
+ if (newRoot !== oldRoot) {
+ d.data = newRoot;
+ }
+ return removed.contents;
+}
+
+function addCheck0(t, x, added) {
+ if (t !== undefined) {
+ var k = t.v;
+ if (x === k) {
+ return t;
+ }
+ var l = t.l;
+ var r = t.r;
+ if (x < k) {
+ var ll = addCheck0(l, x, added);
+ t.l = ll;
+ } else {
+ t.r = addCheck0(r, x, added);
+ }
+ return Belt__Belt_internalAVLset.balMutate(t);
+ }
+ added.contents = true;
+ return Belt__Belt_internalAVLset.singleton(x);
+}
+
+function addCheck(m, e) {
+ var oldRoot = m.data;
+ var added = {
+ contents: false
+ };
+ var newRoot = addCheck0(oldRoot, e, added);
+ if (newRoot !== oldRoot) {
+ m.data = newRoot;
+ }
+ return added.contents;
+}
+
+function add(d, k) {
+ var oldRoot = d.data;
+ var v = Belt__Belt_internalSetString.addMutate(oldRoot, k);
+ if (v !== oldRoot) {
+ d.data = v;
+ return ;
+ }
+
+}
+
+function addArrayMutate(t, xs) {
+ var v = t;
+ for(var i = 0 ,i_finish = xs.length; i < i_finish; ++i){
+ v = Belt__Belt_internalSetString.addMutate(v, xs[i]);
+ }
+ return v;
+}
+
+function mergeMany(d, arr) {
+ d.data = addArrayMutate(d.data, arr);
+}
+
+function make(param) {
+ return {
+ data: undefined
+ };
+}
+
+function isEmpty(d) {
+ var n = d.data;
+ return n === undefined;
+}
+
+function minimum(d) {
+ return Belt__Belt_internalAVLset.minimum(d.data);
+}
+
+function minUndefined(d) {
+ return Belt__Belt_internalAVLset.minUndefined(d.data);
+}
+
+function maximum(d) {
+ return Belt__Belt_internalAVLset.maximum(d.data);
+}
+
+function maxUndefined(d) {
+ return Belt__Belt_internalAVLset.maxUndefined(d.data);
+}
+
+function forEachU(d, f) {
+ Belt__Belt_internalAVLset.forEachU(d.data, f);
+}
+
+function forEach(d, f) {
+ Belt__Belt_internalAVLset.forEachU(d.data, Curry.__1(f));
+}
+
+function reduceU(d, acc, cb) {
+ return Belt__Belt_internalAVLset.reduceU(d.data, acc, cb);
+}
+
+function reduce(d, acc, cb) {
+ return reduceU(d, acc, Curry.__2(cb));
+}
+
+function everyU(d, p) {
+ return Belt__Belt_internalAVLset.everyU(d.data, p);
+}
+
+function every(d, p) {
+ return Belt__Belt_internalAVLset.everyU(d.data, Curry.__1(p));
+}
+
+function someU(d, p) {
+ return Belt__Belt_internalAVLset.someU(d.data, p);
+}
+
+function some(d, p) {
+ return Belt__Belt_internalAVLset.someU(d.data, Curry.__1(p));
+}
+
+function size(d) {
+ return Belt__Belt_internalAVLset.size(d.data);
+}
+
+function toList(d) {
+ return Belt__Belt_internalAVLset.toList(d.data);
+}
+
+function toArray(d) {
+ return Belt__Belt_internalAVLset.toArray(d.data);
+}
+
+function fromSortedArrayUnsafe(xs) {
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayUnsafe(xs)
+ };
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_internalAVLset.checkInvariantInternal(d.data);
+}
+
+function fromArray(xs) {
+ return {
+ data: Belt__Belt_internalSetString.fromArray(xs)
+ };
+}
+
+function cmp(d0, d1) {
+ return Belt__Belt_internalSetString.cmp(d0.data, d1.data);
+}
+
+function eq(d0, d1) {
+ return Belt__Belt_internalSetString.eq(d0.data, d1.data);
+}
+
+function get(d, x) {
+ return Belt__Belt_internalSetString.get(d.data, x);
+}
+
+function getUndefined(d, x) {
+ return Belt__Belt_internalSetString.getUndefined(d.data, x);
+}
+
+function getExn(d, x) {
+ return Belt__Belt_internalSetString.getExn(d.data, x);
+}
+
+function split(d, key) {
+ var arr = Belt__Belt_internalAVLset.toArray(d.data);
+ var i = Belt__Belt_SortArrayString.binarySearch(arr, key);
+ var len = arr.length;
+ if (i >= 0) {
+ return [
+ [
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, 0, i)
+ },
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, i + 1 | 0, (len - i | 0) - 1 | 0)
+ }
+ ],
+ true
+ ];
+ }
+ var next = (-i | 0) - 1 | 0;
+ return [
+ [
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, 0, next)
+ },
+ {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(arr, next, len - next | 0)
+ }
+ ],
+ false
+ ];
+}
+
+function keepU(d, p) {
+ return {
+ data: Belt__Belt_internalAVLset.keepCopyU(d.data, p)
+ };
+}
+
+function keep(d, p) {
+ return keepU(d, Curry.__1(p));
+}
+
+function partitionU(d, p) {
+ var match = Belt__Belt_internalAVLset.partitionCopyU(d.data, p);
+ return [
+ {
+ data: match[0]
+ },
+ {
+ data: match[1]
+ }
+ ];
+}
+
+function partition(d, p) {
+ return partitionU(d, Curry.__1(p));
+}
+
+function subset(a, b) {
+ return Belt__Belt_internalSetString.subset(a.data, b.data);
+}
+
+function intersect(dataa, datab) {
+ var dataa$1 = dataa.data;
+ var datab$1 = datab.data;
+ if (dataa$1 === undefined) {
+ return {
+ data: undefined
+ };
+ }
+ if (datab$1 === undefined) {
+ return {
+ data: undefined
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab$1);
+ var dataa0 = Caml_option.valFromOption(dataa$1);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (tmp[sizea - 1 | 0] < tmp[sizea] || tmp[totalSize - 1 | 0] < tmp[0]) {
+ return {
+ data: undefined
+ };
+ }
+ var tmp2 = new Array(sizea < sizeb ? sizea : sizeb);
+ var k = Belt__Belt_SortArrayString.intersect(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0);
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function diff(dataa, datab) {
+ var dataa$1 = dataa.data;
+ var datab$1 = datab.data;
+ if (dataa$1 === undefined) {
+ return {
+ data: undefined
+ };
+ }
+ if (datab$1 === undefined) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(dataa$1)
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab$1);
+ var dataa0 = Caml_option.valFromOption(dataa$1);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (tmp[sizea - 1 | 0] < tmp[sizea] || tmp[totalSize - 1 | 0] < tmp[0]) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(dataa$1)
+ };
+ }
+ var tmp2 = new Array(sizea);
+ var k = Belt__Belt_SortArrayString.diff(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0);
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function union(dataa, datab) {
+ var dataa$1 = dataa.data;
+ var datab$1 = datab.data;
+ if (dataa$1 === undefined) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(datab$1)
+ };
+ }
+ if (datab$1 === undefined) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(dataa$1)
+ };
+ }
+ var datab0 = Caml_option.valFromOption(datab$1);
+ var dataa0 = Caml_option.valFromOption(dataa$1);
+ var sizea = Belt__Belt_internalAVLset.lengthNode(dataa0);
+ var sizeb = Belt__Belt_internalAVLset.lengthNode(datab0);
+ var totalSize = sizea + sizeb | 0;
+ var tmp = new Array(totalSize);
+ Belt__Belt_internalAVLset.fillArray(dataa0, 0, tmp);
+ Belt__Belt_internalAVLset.fillArray(datab0, sizea, tmp);
+ if (tmp[sizea - 1 | 0] < tmp[sizea]) {
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp, 0, totalSize)
+ };
+ }
+ var tmp2 = new Array(totalSize);
+ var k = Belt__Belt_SortArrayString.union(tmp, 0, sizea, tmp, sizea, sizeb, tmp2, 0);
+ return {
+ data: Belt__Belt_internalAVLset.fromSortedArrayAux(tmp2, 0, k)
+ };
+}
+
+function has(d, x) {
+ return Belt__Belt_internalSetString.has(d.data, x);
+}
+
+function copy(d) {
+ return {
+ data: Belt__Belt_internalAVLset.copy(d.data)
+ };
+}
+
+export {
+ make ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ copy ,
+ isEmpty ,
+ has ,
+ add ,
+ addCheck ,
+ mergeMany ,
+ remove ,
+ removeCheck ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toList ,
+ toArray ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,Cc=`// Generated by Melange
+
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function make(param) {
+ return {
+ root: undefined
+ };
+}
+
+function clear(s) {
+ s.root = undefined;
+}
+
+function copy(s) {
+ return {
+ root: s.root
+ };
+}
+
+function push(s, x) {
+ s.root = {
+ head: x,
+ tail: s.root
+ };
+}
+
+function topUndefined(s) {
+ var x = s.root;
+ if (x !== undefined) {
+ return Caml_option.valFromOption(x).head;
+ }
+
+}
+
+function top(s) {
+ var x = s.root;
+ if (x !== undefined) {
+ return Caml_option.some(Caml_option.valFromOption(x).head);
+ }
+
+}
+
+function isEmpty(s) {
+ return s.root === undefined;
+}
+
+function popUndefined(s) {
+ var x = s.root;
+ if (x === undefined) {
+ return ;
+ }
+ var x$1 = Caml_option.valFromOption(x);
+ s.root = x$1.tail;
+ return x$1.head;
+}
+
+function pop(s) {
+ var x = s.root;
+ if (x === undefined) {
+ return ;
+ }
+ var x$1 = Caml_option.valFromOption(x);
+ s.root = x$1.tail;
+ return Caml_option.some(x$1.head);
+}
+
+function size(s) {
+ var x = s.root;
+ if (x !== undefined) {
+ var _x = Caml_option.valFromOption(x);
+ var _acc = 0;
+ while(true) {
+ var acc = _acc;
+ var x$1 = _x;
+ var x$2 = x$1.tail;
+ if (x$2 === undefined) {
+ return acc + 1 | 0;
+ }
+ _acc = acc + 1 | 0;
+ _x = Caml_option.valFromOption(x$2);
+ continue ;
+ };
+ } else {
+ return 0;
+ }
+}
+
+function forEachU(s, f) {
+ var _s = s.root;
+ while(true) {
+ var s$1 = _s;
+ if (s$1 === undefined) {
+ return ;
+ }
+ var x = Caml_option.valFromOption(s$1);
+ f(x.head);
+ _s = x.tail;
+ continue ;
+ };
+}
+
+function forEach(s, f) {
+ forEachU(s, Curry.__1(f));
+}
+
+function dynamicPopIterU(s, f) {
+ while(true) {
+ var match = s.root;
+ if (match === undefined) {
+ return ;
+ }
+ var match$1 = Caml_option.valFromOption(match);
+ s.root = match$1.tail;
+ f(match$1.head);
+ continue ;
+ };
+}
+
+function dynamicPopIter(s, f) {
+ dynamicPopIterU(s, Curry.__1(f));
+}
+
+export {
+ make ,
+ clear ,
+ copy ,
+ push ,
+ popUndefined ,
+ pop ,
+ topUndefined ,
+ top ,
+ isEmpty ,
+ size ,
+ forEachU ,
+ forEach ,
+ dynamicPopIterU ,
+ dynamicPopIter ,
+}
+/* No side effect */
+`,wc=`// Generated by Melange
+
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function keepU(opt, p) {
+ if (opt !== undefined && p(Caml_option.valFromOption(opt))) {
+ return opt;
+ }
+
+}
+
+function keep(opt, p) {
+ return keepU(opt, Curry.__1(p));
+}
+
+function forEachU(opt, f) {
+ if (opt !== undefined) {
+ return f(Caml_option.valFromOption(opt));
+ }
+
+}
+
+function forEach(opt, f) {
+ forEachU(opt, Curry.__1(f));
+}
+
+function getExn(param) {
+ if (param !== undefined) {
+ return Caml_option.valFromOption(param);
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+}
+
+function mapWithDefaultU(opt, $$default, f) {
+ if (opt !== undefined) {
+ return f(Caml_option.valFromOption(opt));
+ } else {
+ return $$default;
+ }
+}
+
+function mapWithDefault(opt, $$default, f) {
+ return mapWithDefaultU(opt, $$default, Curry.__1(f));
+}
+
+function mapU(opt, f) {
+ if (opt !== undefined) {
+ return Caml_option.some(f(Caml_option.valFromOption(opt)));
+ }
+
+}
+
+function map(opt, f) {
+ return mapU(opt, Curry.__1(f));
+}
+
+function flatMapU(opt, f) {
+ if (opt !== undefined) {
+ return f(Caml_option.valFromOption(opt));
+ }
+
+}
+
+function flatMap(opt, f) {
+ return flatMapU(opt, Curry.__1(f));
+}
+
+function getWithDefault(opt, $$default) {
+ if (opt !== undefined) {
+ return Caml_option.valFromOption(opt);
+ } else {
+ return $$default;
+ }
+}
+
+function orElse(opt, other) {
+ if (opt !== undefined) {
+ return opt;
+ } else {
+ return other;
+ }
+}
+
+function isSome(param) {
+ return param !== undefined;
+}
+
+function isNone(x) {
+ return x === undefined;
+}
+
+function eqU(a, b, f) {
+ if (a !== undefined) {
+ if (b !== undefined) {
+ return f(Caml_option.valFromOption(a), Caml_option.valFromOption(b));
+ } else {
+ return false;
+ }
+ } else {
+ return b === undefined;
+ }
+}
+
+function eq(a, b, f) {
+ return eqU(a, b, Curry.__2(f));
+}
+
+function cmpU(a, b, f) {
+ if (a !== undefined) {
+ if (b !== undefined) {
+ return f(Caml_option.valFromOption(a), Caml_option.valFromOption(b));
+ } else {
+ return 1;
+ }
+ } else if (b !== undefined) {
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+function cmp(a, b, f) {
+ return cmpU(a, b, Curry.__2(f));
+}
+
+export {
+ keepU ,
+ keep ,
+ forEachU ,
+ forEach ,
+ getExn ,
+ mapWithDefaultU ,
+ mapWithDefault ,
+ mapU ,
+ map ,
+ flatMapU ,
+ flatMap ,
+ getWithDefault ,
+ orElse ,
+ isSome ,
+ isNone ,
+ eqU ,
+ eq ,
+ cmpU ,
+ cmp ,
+}
+/* No side effect */
+`,Ac=`// Generated by Melange
+
+import * as Curry from "melange.js/curry.js";
+
+function forEachU(s, f, action) {
+ for(var i = s; i <= f; ++i){
+ action(i);
+ }
+}
+
+function forEach(s, f, action) {
+ forEachU(s, f, Curry.__1(action));
+}
+
+function everyU(_s, f, p) {
+ while(true) {
+ var s = _s;
+ if (s > f) {
+ return true;
+ }
+ if (!p(s)) {
+ return false;
+ }
+ _s = s + 1 | 0;
+ continue ;
+ };
+}
+
+function every(s, f, p) {
+ return everyU(s, f, Curry.__1(p));
+}
+
+function everyByU(s, f, step, p) {
+ if (step > 0) {
+ var _s = s;
+ while(true) {
+ var s$1 = _s;
+ if (s$1 > f) {
+ return true;
+ }
+ if (!p(s$1)) {
+ return false;
+ }
+ _s = s$1 + step | 0;
+ continue ;
+ };
+ } else {
+ return true;
+ }
+}
+
+function everyBy(s, f, step, p) {
+ return everyByU(s, f, step, Curry.__1(p));
+}
+
+function someU(_s, f, p) {
+ while(true) {
+ var s = _s;
+ if (s > f) {
+ return false;
+ }
+ if (p(s)) {
+ return true;
+ }
+ _s = s + 1 | 0;
+ continue ;
+ };
+}
+
+function some(s, f, p) {
+ return someU(s, f, Curry.__1(p));
+}
+
+function someByU(s, f, step, p) {
+ if (step > 0) {
+ var _s = s;
+ while(true) {
+ var s$1 = _s;
+ if (s$1 > f) {
+ return false;
+ }
+ if (p(s$1)) {
+ return true;
+ }
+ _s = s$1 + step | 0;
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function someBy(s, f, step, p) {
+ return someByU(s, f, step, Curry.__1(p));
+}
+
+export {
+ forEachU ,
+ forEach ,
+ everyU ,
+ every ,
+ everyByU ,
+ everyBy ,
+ someU ,
+ some ,
+ someByU ,
+ someBy ,
+}
+/* No side effect */
+`,Sc=`// Generated by Melange
+
+import * as Curry from "melange.js/curry.js";
+
+function getExn(param) {
+ if (param.TAG === /* Ok */0) {
+ return param._0;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+}
+
+function mapWithDefaultU(opt, $$default, f) {
+ if (opt.TAG === /* Ok */0) {
+ return f(opt._0);
+ } else {
+ return $$default;
+ }
+}
+
+function mapWithDefault(opt, $$default, f) {
+ return mapWithDefaultU(opt, $$default, Curry.__1(f));
+}
+
+function mapU(opt, f) {
+ if (opt.TAG === /* Ok */0) {
+ return {
+ TAG: /* Ok */0,
+ _0: f(opt._0)
+ };
+ } else {
+ return {
+ TAG: /* Error */1,
+ _0: opt._0
+ };
+ }
+}
+
+function map(opt, f) {
+ return mapU(opt, Curry.__1(f));
+}
+
+function flatMapU(opt, f) {
+ if (opt.TAG === /* Ok */0) {
+ return f(opt._0);
+ } else {
+ return {
+ TAG: /* Error */1,
+ _0: opt._0
+ };
+ }
+}
+
+function flatMap(opt, f) {
+ return flatMapU(opt, Curry.__1(f));
+}
+
+function getWithDefault(opt, $$default) {
+ if (opt.TAG === /* Ok */0) {
+ return opt._0;
+ } else {
+ return $$default;
+ }
+}
+
+function isOk(param) {
+ if (param.TAG === /* Ok */0) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function isError(param) {
+ if (param.TAG === /* Ok */0) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+function eqU(a, b, f) {
+ if (a.TAG === /* Ok */0) {
+ if (b.TAG === /* Ok */0) {
+ return f(a._0, b._0);
+ } else {
+ return false;
+ }
+ } else if (b.TAG === /* Ok */0) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+function eq(a, b, f) {
+ return eqU(a, b, Curry.__2(f));
+}
+
+function cmpU(a, b, f) {
+ if (a.TAG === /* Ok */0) {
+ if (b.TAG === /* Ok */0) {
+ return f(a._0, b._0);
+ } else {
+ return 1;
+ }
+ } else if (b.TAG === /* Ok */0) {
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+function cmp(a, b, f) {
+ return cmpU(a, b, Curry.__2(f));
+}
+
+export {
+ getExn ,
+ mapWithDefaultU ,
+ mapWithDefault ,
+ mapU ,
+ map ,
+ flatMapU ,
+ flatMap ,
+ getWithDefault ,
+ isOk ,
+ isError ,
+ eqU ,
+ eq ,
+ cmpU ,
+ cmp ,
+}
+/* No side effect */
+`,Bc=`// Generated by Melange
+
+import * as Belt__Belt_SetDict from "./belt_SetDict.js";
+import * as Curry from "melange.js/curry.js";
+
+function fromArray(data, id) {
+ var cmp = id.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_SetDict.fromArray(data, cmp)
+ };
+}
+
+function remove(m, e) {
+ var data = m.data;
+ var cmp = m.cmp;
+ var newData = Belt__Belt_SetDict.remove(data, e, cmp);
+ if (newData === data) {
+ return m;
+ } else {
+ return {
+ cmp: cmp,
+ data: newData
+ };
+ }
+}
+
+function add(m, e) {
+ var data = m.data;
+ var cmp = m.cmp;
+ var newData = Belt__Belt_SetDict.add(data, e, cmp);
+ if (newData === data) {
+ return m;
+ } else {
+ return {
+ cmp: cmp,
+ data: newData
+ };
+ }
+}
+
+function mergeMany(m, e) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_SetDict.mergeMany(m.data, e, cmp)
+ };
+}
+
+function removeMany(m, e) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_SetDict.removeMany(m.data, e, cmp)
+ };
+}
+
+function union(m, n) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_SetDict.union(m.data, n.data, cmp)
+ };
+}
+
+function intersect(m, n) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_SetDict.intersect(m.data, n.data, cmp)
+ };
+}
+
+function diff(m, n) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp,
+ data: Belt__Belt_SetDict.diff(m.data, n.data, cmp)
+ };
+}
+
+function subset(m, n) {
+ var cmp = m.cmp;
+ return Belt__Belt_SetDict.subset(m.data, n.data, cmp);
+}
+
+function split(m, e) {
+ var cmp = m.cmp;
+ var match = Belt__Belt_SetDict.split(m.data, e, cmp);
+ var match$1 = match[0];
+ return [
+ [
+ {
+ cmp: cmp,
+ data: match$1[0]
+ },
+ {
+ cmp: cmp,
+ data: match$1[1]
+ }
+ ],
+ match[1]
+ ];
+}
+
+function make(id) {
+ return {
+ cmp: id.cmp,
+ data: undefined
+ };
+}
+
+function isEmpty(m) {
+ return Belt__Belt_SetDict.isEmpty(m.data);
+}
+
+function cmp(m, n) {
+ var cmp$1 = m.cmp;
+ return Belt__Belt_SetDict.cmp(m.data, n.data, cmp$1);
+}
+
+function eq(m, n) {
+ return Belt__Belt_SetDict.eq(m.data, n.data, m.cmp);
+}
+
+function forEachU(m, f) {
+ Belt__Belt_SetDict.forEachU(m.data, f);
+}
+
+function forEach(m, f) {
+ Belt__Belt_SetDict.forEachU(m.data, Curry.__1(f));
+}
+
+function reduceU(m, acc, f) {
+ return Belt__Belt_SetDict.reduceU(m.data, acc, f);
+}
+
+function reduce(m, acc, f) {
+ return reduceU(m, acc, Curry.__2(f));
+}
+
+function everyU(m, f) {
+ return Belt__Belt_SetDict.everyU(m.data, f);
+}
+
+function every(m, f) {
+ return Belt__Belt_SetDict.everyU(m.data, Curry.__1(f));
+}
+
+function someU(m, f) {
+ return Belt__Belt_SetDict.someU(m.data, f);
+}
+
+function some(m, f) {
+ return Belt__Belt_SetDict.someU(m.data, Curry.__1(f));
+}
+
+function keepU(m, f) {
+ return {
+ cmp: m.cmp,
+ data: Belt__Belt_SetDict.keepU(m.data, f)
+ };
+}
+
+function keep(m, f) {
+ return keepU(m, Curry.__1(f));
+}
+
+function partitionU(m, f) {
+ var match = Belt__Belt_SetDict.partitionU(m.data, f);
+ var cmp = m.cmp;
+ return [
+ {
+ cmp: cmp,
+ data: match[0]
+ },
+ {
+ cmp: cmp,
+ data: match[1]
+ }
+ ];
+}
+
+function partition(m, f) {
+ return partitionU(m, Curry.__1(f));
+}
+
+function size(m) {
+ return Belt__Belt_SetDict.size(m.data);
+}
+
+function toList(m) {
+ return Belt__Belt_SetDict.toList(m.data);
+}
+
+function toArray(m) {
+ return Belt__Belt_SetDict.toArray(m.data);
+}
+
+function minimum(m) {
+ return Belt__Belt_SetDict.minimum(m.data);
+}
+
+function minUndefined(m) {
+ return Belt__Belt_SetDict.minUndefined(m.data);
+}
+
+function maximum(m) {
+ return Belt__Belt_SetDict.maximum(m.data);
+}
+
+function maxUndefined(m) {
+ return Belt__Belt_SetDict.maxUndefined(m.data);
+}
+
+function get(m, e) {
+ return Belt__Belt_SetDict.get(m.data, e, m.cmp);
+}
+
+function getUndefined(m, e) {
+ return Belt__Belt_SetDict.getUndefined(m.data, e, m.cmp);
+}
+
+function getExn(m, e) {
+ return Belt__Belt_SetDict.getExn(m.data, e, m.cmp);
+}
+
+function has(m, e) {
+ return Belt__Belt_SetDict.has(m.data, e, m.cmp);
+}
+
+function fromSortedArrayUnsafe(xs, id) {
+ return {
+ cmp: id.cmp,
+ data: Belt__Belt_SetDict.fromSortedArrayUnsafe(xs)
+ };
+}
+
+function getData(m) {
+ return m.data;
+}
+
+function getId(m) {
+ var cmp = m.cmp;
+ return {
+ cmp: cmp
+ };
+}
+
+function packIdData(id, data) {
+ return {
+ cmp: id.cmp,
+ data: data
+ };
+}
+
+function checkInvariantInternal(d) {
+ Belt__Belt_SetDict.checkInvariantInternal(d.data);
+}
+
+export {
+ make ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ isEmpty ,
+ has ,
+ add ,
+ mergeMany ,
+ remove ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toArray ,
+ toList ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+ getData ,
+ getId ,
+ packIdData ,
+}
+/* No side effect */
+`,Ic=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function add(t, x, cmp) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLset.singleton(x);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.v;
+ var c = cmp(x, k);
+ if (c === 0) {
+ return t;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (c < 0) {
+ var ll = add(l, x, cmp);
+ if (ll === l) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(ll, k, r);
+ }
+ }
+ var rr = add(r, x, cmp);
+ if (rr === r) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(l, k, rr);
+ }
+}
+
+function remove(t, x, cmp) {
+ if (t === undefined) {
+ return t;
+ }
+ var n = Caml_option.valFromOption(t);
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ var c = cmp(x, v);
+ if (c === 0) {
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var v$1 = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLset.removeMinAuxWithRef(rn, v$1);
+ return Belt__Belt_internalAVLset.bal(l, v$1.contents, r$1);
+ }
+ if (c < 0) {
+ var ll = remove(l, x, cmp);
+ if (ll === l) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(ll, v, r);
+ }
+ }
+ var rr = remove(r, x, cmp);
+ if (rr === r) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(l, v, rr);
+ }
+}
+
+function mergeMany(h, arr, cmp) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var key = arr[i];
+ v = add(v, key, cmp);
+ }
+ return v;
+}
+
+function removeMany(h, arr, cmp) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var key = arr[i];
+ v = remove(v, key, cmp);
+ }
+ return v;
+}
+
+function splitAuxNoPivot(cmp, n, x) {
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return [
+ l,
+ r
+ ];
+ }
+ if (c < 0) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxNoPivot(cmp, Caml_option.valFromOption(l), x);
+ return [
+ match[0],
+ Belt__Belt_internalAVLset.joinShared(match[1], v, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxNoPivot(cmp, Caml_option.valFromOption(r), x);
+ return [
+ Belt__Belt_internalAVLset.joinShared(l, v, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function splitAuxPivot(cmp, n, x, pres) {
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ var c = cmp(x, v);
+ if (c === 0) {
+ pres.contents = true;
+ return [
+ l,
+ r
+ ];
+ }
+ if (c < 0) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxPivot(cmp, Caml_option.valFromOption(l), x, pres);
+ return [
+ match[0],
+ Belt__Belt_internalAVLset.joinShared(match[1], v, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxPivot(cmp, Caml_option.valFromOption(r), x, pres);
+ return [
+ Belt__Belt_internalAVLset.joinShared(l, v, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function split(t, x, cmp) {
+ if (t === undefined) {
+ return [
+ [
+ undefined,
+ undefined
+ ],
+ false
+ ];
+ }
+ var pres = {
+ contents: false
+ };
+ var v = splitAuxPivot(cmp, Caml_option.valFromOption(t), x, pres);
+ return [
+ v,
+ pres.contents
+ ];
+}
+
+function union(s1, s2, cmp) {
+ if (s1 === undefined) {
+ return s2;
+ }
+ if (s2 === undefined) {
+ return s1;
+ }
+ var n2 = Caml_option.valFromOption(s2);
+ var n1 = Caml_option.valFromOption(s1);
+ var h1 = n1.h;
+ var h2 = n2.h;
+ if (h1 >= h2) {
+ if (h2 === 1) {
+ return add(s1, n2.v, cmp);
+ }
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var match = splitAuxNoPivot(cmp, n2, v1);
+ return Belt__Belt_internalAVLset.joinShared(union(l1, match[0], cmp), v1, union(r1, match[1], cmp));
+ }
+ if (h1 === 1) {
+ return add(s2, n1.v, cmp);
+ }
+ var v2 = n2.v;
+ var l2 = n2.l;
+ var r2 = n2.r;
+ var match$1 = splitAuxNoPivot(cmp, n1, v2);
+ return Belt__Belt_internalAVLset.joinShared(union(match$1[0], l2, cmp), v2, union(match$1[1], r2, cmp));
+}
+
+function intersect(s1, s2, cmp) {
+ if (s1 === undefined) {
+ return ;
+ }
+ if (s2 === undefined) {
+ return ;
+ }
+ var n1 = Caml_option.valFromOption(s1);
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var pres = {
+ contents: false
+ };
+ var match = splitAuxPivot(cmp, Caml_option.valFromOption(s2), v1, pres);
+ var ll = intersect(l1, match[0], cmp);
+ var rr = intersect(r1, match[1], cmp);
+ if (pres.contents) {
+ return Belt__Belt_internalAVLset.joinShared(ll, v1, rr);
+ } else {
+ return Belt__Belt_internalAVLset.concatShared(ll, rr);
+ }
+}
+
+function diff(s1, s2, cmp) {
+ if (s1 === undefined) {
+ return s1;
+ }
+ if (s2 === undefined) {
+ return s1;
+ }
+ var n1 = Caml_option.valFromOption(s1);
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var pres = {
+ contents: false
+ };
+ var match = splitAuxPivot(cmp, Caml_option.valFromOption(s2), v1, pres);
+ var ll = diff(l1, match[0], cmp);
+ var rr = diff(r1, match[1], cmp);
+ if (pres.contents) {
+ return Belt__Belt_internalAVLset.concatShared(ll, rr);
+ } else {
+ return Belt__Belt_internalAVLset.joinShared(ll, v1, rr);
+ }
+}
+
+var empty;
+
+var fromArray = Belt__Belt_internalAVLset.fromArray;
+
+var fromSortedArrayUnsafe = Belt__Belt_internalAVLset.fromSortedArrayUnsafe;
+
+var isEmpty = Belt__Belt_internalAVLset.isEmpty;
+
+var has = Belt__Belt_internalAVLset.has;
+
+var subset = Belt__Belt_internalAVLset.subset;
+
+var cmp = Belt__Belt_internalAVLset.cmp;
+
+var eq = Belt__Belt_internalAVLset.eq;
+
+var forEachU = Belt__Belt_internalAVLset.forEachU;
+
+var forEach = Belt__Belt_internalAVLset.forEach;
+
+var reduceU = Belt__Belt_internalAVLset.reduceU;
+
+var reduce = Belt__Belt_internalAVLset.reduce;
+
+var everyU = Belt__Belt_internalAVLset.everyU;
+
+var every = Belt__Belt_internalAVLset.every;
+
+var someU = Belt__Belt_internalAVLset.someU;
+
+var some = Belt__Belt_internalAVLset.some;
+
+var keepU = Belt__Belt_internalAVLset.keepSharedU;
+
+var keep = Belt__Belt_internalAVLset.keepShared;
+
+var partitionU = Belt__Belt_internalAVLset.partitionSharedU;
+
+var partition = Belt__Belt_internalAVLset.partitionShared;
+
+var size = Belt__Belt_internalAVLset.size;
+
+var toList = Belt__Belt_internalAVLset.toList;
+
+var toArray = Belt__Belt_internalAVLset.toArray;
+
+var minimum = Belt__Belt_internalAVLset.minimum;
+
+var minUndefined = Belt__Belt_internalAVLset.minUndefined;
+
+var maximum = Belt__Belt_internalAVLset.maximum;
+
+var maxUndefined = Belt__Belt_internalAVLset.maxUndefined;
+
+var get = Belt__Belt_internalAVLset.get;
+
+var getUndefined = Belt__Belt_internalAVLset.getUndefined;
+
+var getExn = Belt__Belt_internalAVLset.getExn;
+
+var checkInvariantInternal = Belt__Belt_internalAVLset.checkInvariantInternal;
+
+export {
+ empty ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ isEmpty ,
+ has ,
+ add ,
+ mergeMany ,
+ remove ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toList ,
+ toArray ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,Lc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Belt__Belt_internalSetInt from "./belt_internalSetInt.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function add(t, x) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLset.singleton(x);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var v = nt.v;
+ if (x === v) {
+ return t;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (x < v) {
+ var ll = add(l, x);
+ if (ll === l) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(ll, v, r);
+ }
+ }
+ var rr = add(r, x);
+ if (rr === r) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(l, v, rr);
+ }
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var key = arr[i];
+ v = add(v, key);
+ }
+ return v;
+}
+
+function remove(t, x) {
+ if (t === undefined) {
+ return t;
+ }
+ var n = Caml_option.valFromOption(t);
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var v$1 = {
+ contents: r.v
+ };
+ var r$1 = Belt__Belt_internalAVLset.removeMinAuxWithRef(r, v$1);
+ return Belt__Belt_internalAVLset.bal(l, v$1.contents, r$1);
+ }
+ if (x < v) {
+ var ll = remove(l, x);
+ if (ll === l) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(ll, v, r);
+ }
+ }
+ var rr = remove(r, x);
+ if (rr === r) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(l, v, rr);
+ }
+}
+
+function removeMany(h, arr) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var key = arr[i];
+ v = remove(v, key);
+ }
+ return v;
+}
+
+function splitAuxNoPivot(n, x) {
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ return [
+ l,
+ r
+ ];
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxNoPivot(l, x);
+ return [
+ match[0],
+ Belt__Belt_internalAVLset.joinShared(match[1], v, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxNoPivot(r, x);
+ return [
+ Belt__Belt_internalAVLset.joinShared(l, v, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function splitAuxPivot(n, x, pres) {
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ pres.contents = true;
+ return [
+ l,
+ r
+ ];
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxPivot(l, x, pres);
+ return [
+ match[0],
+ Belt__Belt_internalAVLset.joinShared(match[1], v, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxPivot(r, x, pres);
+ return [
+ Belt__Belt_internalAVLset.joinShared(l, v, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function split(t, x) {
+ if (t === undefined) {
+ return [
+ [
+ undefined,
+ undefined
+ ],
+ false
+ ];
+ }
+ var pres = {
+ contents: false
+ };
+ var v = splitAuxPivot(Caml_option.valFromOption(t), x, pres);
+ return [
+ v,
+ pres.contents
+ ];
+}
+
+function union(s1, s2) {
+ if (s1 === undefined) {
+ return s2;
+ }
+ if (s2 === undefined) {
+ return s1;
+ }
+ var n2 = Caml_option.valFromOption(s2);
+ var n1 = Caml_option.valFromOption(s1);
+ var h1 = n1.h;
+ var h2 = n2.h;
+ if (h1 >= h2) {
+ if (h2 === 1) {
+ return add(s1, n2.v);
+ }
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var match = splitAuxNoPivot(n2, v1);
+ return Belt__Belt_internalAVLset.joinShared(union(l1, match[0]), v1, union(r1, match[1]));
+ }
+ if (h1 === 1) {
+ return add(s2, n1.v);
+ }
+ var v2 = n2.v;
+ var l2 = n2.l;
+ var r2 = n2.r;
+ var match$1 = splitAuxNoPivot(n1, v2);
+ return Belt__Belt_internalAVLset.joinShared(union(match$1[0], l2), v2, union(match$1[1], r2));
+}
+
+function intersect(s1, s2) {
+ if (s1 === undefined) {
+ return ;
+ }
+ if (s2 === undefined) {
+ return ;
+ }
+ var n1 = Caml_option.valFromOption(s1);
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var pres = {
+ contents: false
+ };
+ var match = splitAuxPivot(Caml_option.valFromOption(s2), v1, pres);
+ var ll = intersect(l1, match[0]);
+ var rr = intersect(r1, match[1]);
+ if (pres.contents) {
+ return Belt__Belt_internalAVLset.joinShared(ll, v1, rr);
+ } else {
+ return Belt__Belt_internalAVLset.concatShared(ll, rr);
+ }
+}
+
+function diff(s1, s2) {
+ if (s1 === undefined) {
+ return s1;
+ }
+ if (s2 === undefined) {
+ return s1;
+ }
+ var n1 = Caml_option.valFromOption(s1);
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var pres = {
+ contents: false
+ };
+ var match = splitAuxPivot(Caml_option.valFromOption(s2), v1, pres);
+ var ll = diff(l1, match[0]);
+ var rr = diff(r1, match[1]);
+ if (pres.contents) {
+ return Belt__Belt_internalAVLset.concatShared(ll, rr);
+ } else {
+ return Belt__Belt_internalAVLset.joinShared(ll, v1, rr);
+ }
+}
+
+var empty;
+
+var fromArray = Belt__Belt_internalSetInt.fromArray;
+
+var fromSortedArrayUnsafe = Belt__Belt_internalAVLset.fromSortedArrayUnsafe;
+
+var isEmpty = Belt__Belt_internalAVLset.isEmpty;
+
+var has = Belt__Belt_internalSetInt.has;
+
+var subset = Belt__Belt_internalSetInt.subset;
+
+var cmp = Belt__Belt_internalSetInt.cmp;
+
+var eq = Belt__Belt_internalSetInt.eq;
+
+var forEachU = Belt__Belt_internalAVLset.forEachU;
+
+var forEach = Belt__Belt_internalAVLset.forEach;
+
+var reduceU = Belt__Belt_internalAVLset.reduceU;
+
+var reduce = Belt__Belt_internalAVLset.reduce;
+
+var everyU = Belt__Belt_internalAVLset.everyU;
+
+var every = Belt__Belt_internalAVLset.every;
+
+var someU = Belt__Belt_internalAVLset.someU;
+
+var some = Belt__Belt_internalAVLset.some;
+
+var keepU = Belt__Belt_internalAVLset.keepSharedU;
+
+var keep = Belt__Belt_internalAVLset.keepShared;
+
+var partitionU = Belt__Belt_internalAVLset.partitionSharedU;
+
+var partition = Belt__Belt_internalAVLset.partitionShared;
+
+var size = Belt__Belt_internalAVLset.size;
+
+var toList = Belt__Belt_internalAVLset.toList;
+
+var toArray = Belt__Belt_internalAVLset.toArray;
+
+var minimum = Belt__Belt_internalAVLset.minimum;
+
+var minUndefined = Belt__Belt_internalAVLset.minUndefined;
+
+var maximum = Belt__Belt_internalAVLset.maximum;
+
+var maxUndefined = Belt__Belt_internalAVLset.maxUndefined;
+
+var get = Belt__Belt_internalSetInt.get;
+
+var getUndefined = Belt__Belt_internalSetInt.getUndefined;
+
+var getExn = Belt__Belt_internalSetInt.getExn;
+
+var checkInvariantInternal = Belt__Belt_internalAVLset.checkInvariantInternal;
+
+export {
+ empty ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ isEmpty ,
+ has ,
+ add ,
+ mergeMany ,
+ remove ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toList ,
+ toArray ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,Nc=`// Generated by Melange
+
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Belt__Belt_internalSetString from "./belt_internalSetString.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function add(t, x) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLset.singleton(x);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var v = nt.v;
+ if (x === v) {
+ return t;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (x < v) {
+ var ll = add(l, x);
+ if (ll === l) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(ll, v, r);
+ }
+ }
+ var rr = add(r, x);
+ if (rr === r) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(l, v, rr);
+ }
+}
+
+function mergeMany(h, arr) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var key = arr[i];
+ v = add(v, key);
+ }
+ return v;
+}
+
+function remove(t, x) {
+ if (t === undefined) {
+ return t;
+ }
+ var n = Caml_option.valFromOption(t);
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var v$1 = {
+ contents: r.v
+ };
+ var r$1 = Belt__Belt_internalAVLset.removeMinAuxWithRef(r, v$1);
+ return Belt__Belt_internalAVLset.bal(l, v$1.contents, r$1);
+ }
+ if (x < v) {
+ var ll = remove(l, x);
+ if (ll === l) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(ll, v, r);
+ }
+ }
+ var rr = remove(r, x);
+ if (rr === r) {
+ return t;
+ } else {
+ return Belt__Belt_internalAVLset.bal(l, v, rr);
+ }
+}
+
+function removeMany(h, arr) {
+ var len = arr.length;
+ var v = h;
+ for(var i = 0; i < len; ++i){
+ var key = arr[i];
+ v = remove(v, key);
+ }
+ return v;
+}
+
+function splitAuxNoPivot(n, x) {
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ return [
+ l,
+ r
+ ];
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxNoPivot(l, x);
+ return [
+ match[0],
+ Belt__Belt_internalAVLset.joinShared(match[1], v, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxNoPivot(r, x);
+ return [
+ Belt__Belt_internalAVLset.joinShared(l, v, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function splitAuxPivot(n, x, pres) {
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ pres.contents = true;
+ return [
+ l,
+ r
+ ];
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return [
+ undefined,
+ n
+ ];
+ }
+ var match = splitAuxPivot(l, x, pres);
+ return [
+ match[0],
+ Belt__Belt_internalAVLset.joinShared(match[1], v, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined
+ ];
+ }
+ var match$1 = splitAuxPivot(r, x, pres);
+ return [
+ Belt__Belt_internalAVLset.joinShared(l, v, match$1[0]),
+ match$1[1]
+ ];
+}
+
+function split(t, x) {
+ if (t === undefined) {
+ return [
+ [
+ undefined,
+ undefined
+ ],
+ false
+ ];
+ }
+ var pres = {
+ contents: false
+ };
+ var v = splitAuxPivot(Caml_option.valFromOption(t), x, pres);
+ return [
+ v,
+ pres.contents
+ ];
+}
+
+function union(s1, s2) {
+ if (s1 === undefined) {
+ return s2;
+ }
+ if (s2 === undefined) {
+ return s1;
+ }
+ var n2 = Caml_option.valFromOption(s2);
+ var n1 = Caml_option.valFromOption(s1);
+ var h1 = n1.h;
+ var h2 = n2.h;
+ if (h1 >= h2) {
+ if (h2 === 1) {
+ return add(s1, n2.v);
+ }
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var match = splitAuxNoPivot(n2, v1);
+ return Belt__Belt_internalAVLset.joinShared(union(l1, match[0]), v1, union(r1, match[1]));
+ }
+ if (h1 === 1) {
+ return add(s2, n1.v);
+ }
+ var v2 = n2.v;
+ var l2 = n2.l;
+ var r2 = n2.r;
+ var match$1 = splitAuxNoPivot(n1, v2);
+ return Belt__Belt_internalAVLset.joinShared(union(match$1[0], l2), v2, union(match$1[1], r2));
+}
+
+function intersect(s1, s2) {
+ if (s1 === undefined) {
+ return ;
+ }
+ if (s2 === undefined) {
+ return ;
+ }
+ var n1 = Caml_option.valFromOption(s1);
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var pres = {
+ contents: false
+ };
+ var match = splitAuxPivot(Caml_option.valFromOption(s2), v1, pres);
+ var ll = intersect(l1, match[0]);
+ var rr = intersect(r1, match[1]);
+ if (pres.contents) {
+ return Belt__Belt_internalAVLset.joinShared(ll, v1, rr);
+ } else {
+ return Belt__Belt_internalAVLset.concatShared(ll, rr);
+ }
+}
+
+function diff(s1, s2) {
+ if (s1 === undefined) {
+ return s1;
+ }
+ if (s2 === undefined) {
+ return s1;
+ }
+ var n1 = Caml_option.valFromOption(s1);
+ var v1 = n1.v;
+ var l1 = n1.l;
+ var r1 = n1.r;
+ var pres = {
+ contents: false
+ };
+ var match = splitAuxPivot(Caml_option.valFromOption(s2), v1, pres);
+ var ll = diff(l1, match[0]);
+ var rr = diff(r1, match[1]);
+ if (pres.contents) {
+ return Belt__Belt_internalAVLset.concatShared(ll, rr);
+ } else {
+ return Belt__Belt_internalAVLset.joinShared(ll, v1, rr);
+ }
+}
+
+var empty;
+
+var fromArray = Belt__Belt_internalSetString.fromArray;
+
+var fromSortedArrayUnsafe = Belt__Belt_internalAVLset.fromSortedArrayUnsafe;
+
+var isEmpty = Belt__Belt_internalAVLset.isEmpty;
+
+var has = Belt__Belt_internalSetString.has;
+
+var subset = Belt__Belt_internalSetString.subset;
+
+var cmp = Belt__Belt_internalSetString.cmp;
+
+var eq = Belt__Belt_internalSetString.eq;
+
+var forEachU = Belt__Belt_internalAVLset.forEachU;
+
+var forEach = Belt__Belt_internalAVLset.forEach;
+
+var reduceU = Belt__Belt_internalAVLset.reduceU;
+
+var reduce = Belt__Belt_internalAVLset.reduce;
+
+var everyU = Belt__Belt_internalAVLset.everyU;
+
+var every = Belt__Belt_internalAVLset.every;
+
+var someU = Belt__Belt_internalAVLset.someU;
+
+var some = Belt__Belt_internalAVLset.some;
+
+var keepU = Belt__Belt_internalAVLset.keepSharedU;
+
+var keep = Belt__Belt_internalAVLset.keepShared;
+
+var partitionU = Belt__Belt_internalAVLset.partitionSharedU;
+
+var partition = Belt__Belt_internalAVLset.partitionShared;
+
+var size = Belt__Belt_internalAVLset.size;
+
+var toList = Belt__Belt_internalAVLset.toList;
+
+var toArray = Belt__Belt_internalAVLset.toArray;
+
+var minimum = Belt__Belt_internalAVLset.minimum;
+
+var minUndefined = Belt__Belt_internalAVLset.minUndefined;
+
+var maximum = Belt__Belt_internalAVLset.maximum;
+
+var maxUndefined = Belt__Belt_internalAVLset.maxUndefined;
+
+var get = Belt__Belt_internalSetString.get;
+
+var getUndefined = Belt__Belt_internalSetString.getUndefined;
+
+var getExn = Belt__Belt_internalSetString.getExn;
+
+var checkInvariantInternal = Belt__Belt_internalAVLset.checkInvariantInternal;
+
+export {
+ empty ,
+ fromArray ,
+ fromSortedArrayUnsafe ,
+ isEmpty ,
+ has ,
+ add ,
+ mergeMany ,
+ remove ,
+ removeMany ,
+ union ,
+ intersect ,
+ diff ,
+ subset ,
+ cmp ,
+ eq ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ keepU ,
+ keep ,
+ partitionU ,
+ partition ,
+ size ,
+ toList ,
+ toArray ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ get ,
+ getUndefined ,
+ getExn ,
+ split ,
+ checkInvariantInternal ,
+}
+/* No side effect */
+`,Mc=`// Generated by Melange
+
+import * as Belt__Belt_Array from "./belt_Array.js";
+import * as Curry from "melange.js/curry.js";
+
+function sortedLengthAuxMore(xs, _prec, _acc, len, lt) {
+ while(true) {
+ var acc = _acc;
+ var prec = _prec;
+ if (acc >= len) {
+ return acc;
+ }
+ var v = xs[acc];
+ if (!lt(v, prec)) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _prec = v;
+ continue ;
+ };
+}
+
+function strictlySortedLengthU(xs, lt) {
+ var len = xs.length;
+ if (len === 0 || len === 1) {
+ return len;
+ }
+ var x0 = xs[0];
+ var x1 = xs[1];
+ if (lt(x0, x1)) {
+ var _prec = x1;
+ var _acc = 2;
+ while(true) {
+ var acc = _acc;
+ var prec = _prec;
+ if (acc >= len) {
+ return acc;
+ }
+ var v = xs[acc];
+ if (!lt(prec, v)) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _prec = v;
+ continue ;
+ };
+ } else if (lt(x1, x0)) {
+ return -sortedLengthAuxMore(xs, x1, 2, len, lt) | 0;
+ } else {
+ return 1;
+ }
+}
+
+function strictlySortedLength(xs, lt) {
+ return strictlySortedLengthU(xs, Curry.__2(lt));
+}
+
+function isSortedU(a, cmp) {
+ var len = a.length;
+ if (len === 0) {
+ return true;
+ } else {
+ var _i = 0;
+ var last_bound = len - 1 | 0;
+ while(true) {
+ var i = _i;
+ if (i === last_bound) {
+ return true;
+ }
+ if (cmp(a[i], a[i + 1 | 0]) > 0) {
+ return false;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+ }
+}
+
+function isSorted(a, cmp) {
+ return isSortedU(a, Curry.__2(cmp));
+}
+
+function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (cmp(s1, s2) <= 0) {
+ dst[d] = s1;
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return Belt__Belt_Array.blitUnsafe(src2, i2, dst, d + 1 | 0, src2r - i2 | 0);
+ }
+ _d = d + 1 | 0;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ dst[d] = s2;
+ var i2$1 = i2 + 1 | 0;
+ if (i2$1 >= src2r) {
+ return Belt__Belt_Array.blitUnsafe(src, i1, dst, d + 1 | 0, src1r - i1 | 0);
+ }
+ _d = d + 1 | 0;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ continue ;
+ };
+}
+
+function unionU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ var c = cmp(s1, s2);
+ if (c < 0) {
+ dst[d] = s1;
+ var i1$1 = i1 + 1 | 0;
+ var d$1 = d + 1 | 0;
+ if (i1$1 < src1r) {
+ _d = d$1;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src2, i2, dst, d$1, src2r - i2 | 0);
+ return (d$1 + src2r | 0) - i2 | 0;
+ }
+ if (c === 0) {
+ dst[d] = s1;
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ var d$2 = d + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ if (i1$2 === src1r) {
+ Belt__Belt_Array.blitUnsafe(src2, i2$1, dst, d$2, src2r - i2$1 | 0);
+ return (d$2 + src2r | 0) - i2$1 | 0;
+ } else {
+ Belt__Belt_Array.blitUnsafe(src, i1$2, dst, d$2, src1r - i1$2 | 0);
+ return (d$2 + src1r | 0) - i1$2 | 0;
+ }
+ }
+ _d = d$2;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ dst[d] = s2;
+ var i2$2 = i2 + 1 | 0;
+ var d$3 = d + 1 | 0;
+ if (i2$2 < src2r) {
+ _d = d$3;
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src, i1, dst, d$3, src1r - i1 | 0);
+ return (d$3 + src1r | 0) - i1 | 0;
+ };
+}
+
+function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ return unionU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, Curry.__2(cmp));
+}
+
+function intersectU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ var c = cmp(s1, s2);
+ if (c < 0) {
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return d;
+ }
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ if (c === 0) {
+ dst[d] = s1;
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ var d$1 = d + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ return d$1;
+ }
+ _d = d$1;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ var i2$2 = i2 + 1 | 0;
+ if (i2$2 >= src2r) {
+ return d;
+ }
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ };
+}
+
+function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ return intersectU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, Curry.__2(cmp));
+}
+
+function diffU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ var c = cmp(s1, s2);
+ if (c < 0) {
+ dst[d] = s1;
+ var d$1 = d + 1 | 0;
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return d$1;
+ }
+ _d = d$1;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ if (c === 0) {
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ if (i1$2 === src1r) {
+ return d;
+ } else {
+ Belt__Belt_Array.blitUnsafe(src, i1$2, dst, d, src1r - i1$2 | 0);
+ return (d + src1r | 0) - i1$2 | 0;
+ }
+ }
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ var i2$2 = i2 + 1 | 0;
+ if (i2$2 < src2r) {
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src, i1, dst, d, src1r - i1 | 0);
+ return (d + src1r | 0) - i1 | 0;
+ };
+}
+
+function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) {
+ return diffU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, Curry.__2(cmp));
+}
+
+function insertionSort(src, srcofs, dst, dstofs, len, cmp) {
+ for(var i = 0; i < len; ++i){
+ var e = src[srcofs + i | 0];
+ var j = (dstofs + i | 0) - 1 | 0;
+ while(j >= dstofs && cmp(dst[j], e) > 0) {
+ dst[j + 1 | 0] = dst[j];
+ j = j - 1 | 0;
+ };
+ dst[j + 1 | 0] = e;
+ }
+}
+
+function sortTo(src, srcofs, dst, dstofs, len, cmp) {
+ if (len <= 5) {
+ return insertionSort(src, srcofs, dst, dstofs, len, cmp);
+ }
+ var l1 = len / 2 | 0;
+ var l2 = len - l1 | 0;
+ sortTo(src, srcofs + l1 | 0, dst, dstofs + l1 | 0, l2, cmp);
+ sortTo(src, srcofs, src, srcofs + l2 | 0, l1, cmp);
+ merge(src, srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs, cmp);
+}
+
+function stableSortInPlaceByU(a, cmp) {
+ var l = a.length;
+ if (l <= 5) {
+ return insertionSort(a, 0, a, 0, l, cmp);
+ }
+ var l1 = l / 2 | 0;
+ var l2 = l - l1 | 0;
+ var t = new Array(l2);
+ sortTo(a, l1, t, 0, l2, cmp);
+ sortTo(a, 0, a, l2, l1, cmp);
+ merge(a, l2, l1, t, 0, l2, a, 0, cmp);
+}
+
+function stableSortInPlaceBy(a, cmp) {
+ stableSortInPlaceByU(a, Curry.__2(cmp));
+}
+
+function stableSortByU(a, cmp) {
+ var b = a.slice(0);
+ stableSortInPlaceByU(b, cmp);
+ return b;
+}
+
+function stableSortBy(a, cmp) {
+ return stableSortByU(a, Curry.__2(cmp));
+}
+
+function binarySearchByU(sorted, key, cmp) {
+ var len = sorted.length;
+ if (len === 0) {
+ return -1;
+ }
+ var lo = sorted[0];
+ var c = cmp(key, lo);
+ if (c < 0) {
+ return -1;
+ }
+ var hi = sorted[len - 1 | 0];
+ var c2 = cmp(key, hi);
+ if (c2 > 0) {
+ return -(len + 1 | 0) | 0;
+ } else {
+ var _lo = 0;
+ var _hi = len - 1 | 0;
+ while(true) {
+ var hi$1 = _hi;
+ var lo$1 = _lo;
+ var mid = (lo$1 + hi$1 | 0) / 2 | 0;
+ var midVal = sorted[mid];
+ var c$1 = cmp(key, midVal);
+ if (c$1 === 0) {
+ return mid;
+ }
+ if (c$1 < 0) {
+ if (hi$1 === mid) {
+ if (cmp(sorted[lo$1], key) === 0) {
+ return lo$1;
+ } else {
+ return -(hi$1 + 1 | 0) | 0;
+ }
+ }
+ _hi = mid;
+ continue ;
+ }
+ if (lo$1 === mid) {
+ if (cmp(sorted[hi$1], key) === 0) {
+ return hi$1;
+ } else {
+ return -(hi$1 + 1 | 0) | 0;
+ }
+ }
+ _lo = mid;
+ continue ;
+ };
+ }
+}
+
+function binarySearchBy(sorted, key, cmp) {
+ return binarySearchByU(sorted, key, Curry.__2(cmp));
+}
+
+export {
+ strictlySortedLengthU ,
+ strictlySortedLength ,
+ isSortedU ,
+ isSorted ,
+ stableSortInPlaceByU ,
+ stableSortInPlaceBy ,
+ stableSortByU ,
+ stableSortBy ,
+ binarySearchByU ,
+ binarySearchBy ,
+ unionU ,
+ union ,
+ intersectU ,
+ intersect ,
+ diffU ,
+ diff ,
+}
+/* No side effect */
+`,jc=`// Generated by Melange
+
+import * as Belt__Belt_Array from "./belt_Array.js";
+
+function sortedLengthAuxMore(xs, _prec, _acc, len) {
+ while(true) {
+ var acc = _acc;
+ var prec = _prec;
+ if (acc >= len) {
+ return acc;
+ }
+ var v = xs[acc];
+ if (prec <= v) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _prec = v;
+ continue ;
+ };
+}
+
+function strictlySortedLength(xs) {
+ var len = xs.length;
+ if (len === 0 || len === 1) {
+ return len;
+ }
+ var x0 = xs[0];
+ var x1 = xs[1];
+ if (x0 < x1) {
+ var _prec = x1;
+ var _acc = 2;
+ while(true) {
+ var acc = _acc;
+ var prec = _prec;
+ if (acc >= len) {
+ return acc;
+ }
+ var v = xs[acc];
+ if (prec >= v) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _prec = v;
+ continue ;
+ };
+ } else if (x0 > x1) {
+ return -sortedLengthAuxMore(xs, x1, 2, len) | 0;
+ } else {
+ return 1;
+ }
+}
+
+function isSorted(a) {
+ var len = a.length;
+ if (len === 0) {
+ return true;
+ } else {
+ var _i = 0;
+ var last_bound = len - 1 | 0;
+ while(true) {
+ var i = _i;
+ if (i === last_bound) {
+ return true;
+ }
+ if (a[i] > a[i + 1 | 0]) {
+ return false;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+ }
+}
+
+function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 <= s2) {
+ dst[d] = s1;
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return Belt__Belt_Array.blitUnsafe(src2, i2, dst, d + 1 | 0, src2r - i2 | 0);
+ }
+ _d = d + 1 | 0;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ dst[d] = s2;
+ var i2$1 = i2 + 1 | 0;
+ if (i2$1 >= src2r) {
+ return Belt__Belt_Array.blitUnsafe(src, i1, dst, d + 1 | 0, src1r - i1 | 0);
+ }
+ _d = d + 1 | 0;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ continue ;
+ };
+}
+
+function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 < s2) {
+ dst[d] = s1;
+ var i1$1 = i1 + 1 | 0;
+ var d$1 = d + 1 | 0;
+ if (i1$1 < src1r) {
+ _d = d$1;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src2, i2, dst, d$1, src2r - i2 | 0);
+ return (d$1 + src2r | 0) - i2 | 0;
+ }
+ if (s1 === s2) {
+ dst[d] = s1;
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ var d$2 = d + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ if (i1$2 === src1r) {
+ Belt__Belt_Array.blitUnsafe(src2, i2$1, dst, d$2, src2r - i2$1 | 0);
+ return (d$2 + src2r | 0) - i2$1 | 0;
+ } else {
+ Belt__Belt_Array.blitUnsafe(src, i1$2, dst, d$2, src1r - i1$2 | 0);
+ return (d$2 + src1r | 0) - i1$2 | 0;
+ }
+ }
+ _d = d$2;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ dst[d] = s2;
+ var i2$2 = i2 + 1 | 0;
+ var d$3 = d + 1 | 0;
+ if (i2$2 < src2r) {
+ _d = d$3;
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src, i1, dst, d$3, src1r - i1 | 0);
+ return (d$3 + src1r | 0) - i1 | 0;
+ };
+}
+
+function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 < s2) {
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return d;
+ }
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ if (s1 === s2) {
+ dst[d] = s1;
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ var d$1 = d + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ return d$1;
+ }
+ _d = d$1;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ var i2$2 = i2 + 1 | 0;
+ if (i2$2 >= src2r) {
+ return d;
+ }
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ };
+}
+
+function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 < s2) {
+ dst[d] = s1;
+ var d$1 = d + 1 | 0;
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return d$1;
+ }
+ _d = d$1;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ if (s1 === s2) {
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ if (i1$2 === src1r) {
+ return d;
+ } else {
+ Belt__Belt_Array.blitUnsafe(src, i1$2, dst, d, src1r - i1$2 | 0);
+ return (d + src1r | 0) - i1$2 | 0;
+ }
+ }
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ var i2$2 = i2 + 1 | 0;
+ if (i2$2 < src2r) {
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src, i1, dst, d, src1r - i1 | 0);
+ return (d + src1r | 0) - i1 | 0;
+ };
+}
+
+function insertionSort(src, srcofs, dst, dstofs, len) {
+ for(var i = 0; i < len; ++i){
+ var e = src[srcofs + i | 0];
+ var j = (dstofs + i | 0) - 1 | 0;
+ while(j >= dstofs && dst[j] > e) {
+ dst[j + 1 | 0] = dst[j];
+ j = j - 1 | 0;
+ };
+ dst[j + 1 | 0] = e;
+ }
+}
+
+function sortTo(src, srcofs, dst, dstofs, len) {
+ if (len <= 5) {
+ return insertionSort(src, srcofs, dst, dstofs, len);
+ }
+ var l1 = len / 2 | 0;
+ var l2 = len - l1 | 0;
+ sortTo(src, srcofs + l1 | 0, dst, dstofs + l1 | 0, l2);
+ sortTo(src, srcofs, src, srcofs + l2 | 0, l1);
+ merge(src, srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs);
+}
+
+function stableSortInPlace(a) {
+ var l = a.length;
+ if (l <= 5) {
+ return insertionSort(a, 0, a, 0, l);
+ }
+ var l1 = l / 2 | 0;
+ var l2 = l - l1 | 0;
+ var t = new Array(l2);
+ sortTo(a, l1, t, 0, l2);
+ sortTo(a, 0, a, l2, l1);
+ merge(a, l2, l1, t, 0, l2, a, 0);
+}
+
+function stableSort(a) {
+ var b = a.slice(0);
+ stableSortInPlace(b);
+ return b;
+}
+
+function binarySearch(sorted, key) {
+ var len = sorted.length;
+ if (len === 0) {
+ return -1;
+ }
+ var lo = sorted[0];
+ if (key < lo) {
+ return -1;
+ }
+ var hi = sorted[len - 1 | 0];
+ if (key > hi) {
+ return -(len + 1 | 0) | 0;
+ } else {
+ var _lo = 0;
+ var _hi = len - 1 | 0;
+ while(true) {
+ var hi$1 = _hi;
+ var lo$1 = _lo;
+ var mid = (lo$1 + hi$1 | 0) / 2 | 0;
+ var midVal = sorted[mid];
+ if (key === midVal) {
+ return mid;
+ }
+ if (key < midVal) {
+ if (hi$1 === mid) {
+ if (sorted[lo$1] === key) {
+ return lo$1;
+ } else {
+ return -(hi$1 + 1 | 0) | 0;
+ }
+ }
+ _hi = mid;
+ continue ;
+ }
+ if (lo$1 === mid) {
+ if (sorted[hi$1] === key) {
+ return hi$1;
+ } else {
+ return -(hi$1 + 1 | 0) | 0;
+ }
+ }
+ _lo = mid;
+ continue ;
+ };
+ }
+}
+
+export {
+ strictlySortedLength ,
+ isSorted ,
+ stableSortInPlace ,
+ stableSort ,
+ binarySearch ,
+ union ,
+ intersect ,
+ diff ,
+}
+/* No side effect */
+`,Tc=`// Generated by Melange
+
+import * as Belt__Belt_Array from "./belt_Array.js";
+
+function sortedLengthAuxMore(xs, _prec, _acc, len) {
+ while(true) {
+ var acc = _acc;
+ var prec = _prec;
+ if (acc >= len) {
+ return acc;
+ }
+ var v = xs[acc];
+ if (prec <= v) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _prec = v;
+ continue ;
+ };
+}
+
+function strictlySortedLength(xs) {
+ var len = xs.length;
+ if (len === 0 || len === 1) {
+ return len;
+ }
+ var x0 = xs[0];
+ var x1 = xs[1];
+ if (x0 < x1) {
+ var _prec = x1;
+ var _acc = 2;
+ while(true) {
+ var acc = _acc;
+ var prec = _prec;
+ if (acc >= len) {
+ return acc;
+ }
+ var v = xs[acc];
+ if (prec >= v) {
+ return acc;
+ }
+ _acc = acc + 1 | 0;
+ _prec = v;
+ continue ;
+ };
+ } else if (x0 > x1) {
+ return -sortedLengthAuxMore(xs, x1, 2, len) | 0;
+ } else {
+ return 1;
+ }
+}
+
+function isSorted(a) {
+ var len = a.length;
+ if (len === 0) {
+ return true;
+ } else {
+ var _i = 0;
+ var last_bound = len - 1 | 0;
+ while(true) {
+ var i = _i;
+ if (i === last_bound) {
+ return true;
+ }
+ if (a[i] > a[i + 1 | 0]) {
+ return false;
+ }
+ _i = i + 1 | 0;
+ continue ;
+ };
+ }
+}
+
+function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 <= s2) {
+ dst[d] = s1;
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return Belt__Belt_Array.blitUnsafe(src2, i2, dst, d + 1 | 0, src2r - i2 | 0);
+ }
+ _d = d + 1 | 0;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ dst[d] = s2;
+ var i2$1 = i2 + 1 | 0;
+ if (i2$1 >= src2r) {
+ return Belt__Belt_Array.blitUnsafe(src, i1, dst, d + 1 | 0, src1r - i1 | 0);
+ }
+ _d = d + 1 | 0;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ continue ;
+ };
+}
+
+function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 < s2) {
+ dst[d] = s1;
+ var i1$1 = i1 + 1 | 0;
+ var d$1 = d + 1 | 0;
+ if (i1$1 < src1r) {
+ _d = d$1;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src2, i2, dst, d$1, src2r - i2 | 0);
+ return (d$1 + src2r | 0) - i2 | 0;
+ }
+ if (s1 === s2) {
+ dst[d] = s1;
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ var d$2 = d + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ if (i1$2 === src1r) {
+ Belt__Belt_Array.blitUnsafe(src2, i2$1, dst, d$2, src2r - i2$1 | 0);
+ return (d$2 + src2r | 0) - i2$1 | 0;
+ } else {
+ Belt__Belt_Array.blitUnsafe(src, i1$2, dst, d$2, src1r - i1$2 | 0);
+ return (d$2 + src1r | 0) - i1$2 | 0;
+ }
+ }
+ _d = d$2;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ dst[d] = s2;
+ var i2$2 = i2 + 1 | 0;
+ var d$3 = d + 1 | 0;
+ if (i2$2 < src2r) {
+ _d = d$3;
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src, i1, dst, d$3, src1r - i1 | 0);
+ return (d$3 + src1r | 0) - i1 | 0;
+ };
+}
+
+function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 < s2) {
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return d;
+ }
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ if (s1 === s2) {
+ dst[d] = s1;
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ var d$1 = d + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ return d$1;
+ }
+ _d = d$1;
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ var i2$2 = i2 + 1 | 0;
+ if (i2$2 >= src2r) {
+ return d;
+ }
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ };
+}
+
+function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) {
+ var src1r = src1ofs + src1len | 0;
+ var src2r = src2ofs + src2len | 0;
+ var _i1 = src1ofs;
+ var _s1 = src[src1ofs];
+ var _i2 = src2ofs;
+ var _s2 = src2[src2ofs];
+ var _d = dstofs;
+ while(true) {
+ var d = _d;
+ var s2 = _s2;
+ var i2 = _i2;
+ var s1 = _s1;
+ var i1 = _i1;
+ if (s1 < s2) {
+ dst[d] = s1;
+ var d$1 = d + 1 | 0;
+ var i1$1 = i1 + 1 | 0;
+ if (i1$1 >= src1r) {
+ return d$1;
+ }
+ _d = d$1;
+ _s1 = src[i1$1];
+ _i1 = i1$1;
+ continue ;
+ }
+ if (s1 === s2) {
+ var i1$2 = i1 + 1 | 0;
+ var i2$1 = i2 + 1 | 0;
+ if (!(i1$2 < src1r && i2$1 < src2r)) {
+ if (i1$2 === src1r) {
+ return d;
+ } else {
+ Belt__Belt_Array.blitUnsafe(src, i1$2, dst, d, src1r - i1$2 | 0);
+ return (d + src1r | 0) - i1$2 | 0;
+ }
+ }
+ _s2 = src2[i2$1];
+ _i2 = i2$1;
+ _s1 = src[i1$2];
+ _i1 = i1$2;
+ continue ;
+ }
+ var i2$2 = i2 + 1 | 0;
+ if (i2$2 < src2r) {
+ _s2 = src2[i2$2];
+ _i2 = i2$2;
+ continue ;
+ }
+ Belt__Belt_Array.blitUnsafe(src, i1, dst, d, src1r - i1 | 0);
+ return (d + src1r | 0) - i1 | 0;
+ };
+}
+
+function insertionSort(src, srcofs, dst, dstofs, len) {
+ for(var i = 0; i < len; ++i){
+ var e = src[srcofs + i | 0];
+ var j = (dstofs + i | 0) - 1 | 0;
+ while(j >= dstofs && dst[j] > e) {
+ dst[j + 1 | 0] = dst[j];
+ j = j - 1 | 0;
+ };
+ dst[j + 1 | 0] = e;
+ }
+}
+
+function sortTo(src, srcofs, dst, dstofs, len) {
+ if (len <= 5) {
+ return insertionSort(src, srcofs, dst, dstofs, len);
+ }
+ var l1 = len / 2 | 0;
+ var l2 = len - l1 | 0;
+ sortTo(src, srcofs + l1 | 0, dst, dstofs + l1 | 0, l2);
+ sortTo(src, srcofs, src, srcofs + l2 | 0, l1);
+ merge(src, srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs);
+}
+
+function stableSortInPlace(a) {
+ var l = a.length;
+ if (l <= 5) {
+ return insertionSort(a, 0, a, 0, l);
+ }
+ var l1 = l / 2 | 0;
+ var l2 = l - l1 | 0;
+ var t = new Array(l2);
+ sortTo(a, l1, t, 0, l2);
+ sortTo(a, 0, a, l2, l1);
+ merge(a, l2, l1, t, 0, l2, a, 0);
+}
+
+function stableSort(a) {
+ var b = a.slice(0);
+ stableSortInPlace(b);
+ return b;
+}
+
+function binarySearch(sorted, key) {
+ var len = sorted.length;
+ if (len === 0) {
+ return -1;
+ }
+ var lo = sorted[0];
+ if (key < lo) {
+ return -1;
+ }
+ var hi = sorted[len - 1 | 0];
+ if (key > hi) {
+ return -(len + 1 | 0) | 0;
+ } else {
+ var _lo = 0;
+ var _hi = len - 1 | 0;
+ while(true) {
+ var hi$1 = _hi;
+ var lo$1 = _lo;
+ var mid = (lo$1 + hi$1 | 0) / 2 | 0;
+ var midVal = sorted[mid];
+ if (key === midVal) {
+ return mid;
+ }
+ if (key < midVal) {
+ if (hi$1 === mid) {
+ if (sorted[lo$1] === key) {
+ return lo$1;
+ } else {
+ return -(hi$1 + 1 | 0) | 0;
+ }
+ }
+ _hi = mid;
+ continue ;
+ }
+ if (lo$1 === mid) {
+ if (sorted[hi$1] === key) {
+ return hi$1;
+ } else {
+ return -(hi$1 + 1 | 0) | 0;
+ }
+ }
+ _lo = mid;
+ continue ;
+ };
+ }
+}
+
+export {
+ strictlySortedLength ,
+ isSorted ,
+ stableSortInPlace ,
+ stableSort ,
+ binarySearch ,
+ union ,
+ intersect ,
+ diff ,
+}
+/* No side effect */
+`,Dc=`// Generated by Melange
+
+
+var Belt__ = {};
+
+export {
+ Belt__ ,
+}
+/* No side effect */
+`,Oc=`// Generated by Melange
+
+import * as Belt__Belt_SortArray from "./belt_SortArray.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function copy(n) {
+ if (n === undefined) {
+ return n;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ return {
+ v: n$1.v,
+ h: n$1.h,
+ l: copy(n$1.l),
+ r: copy(n$1.r)
+ };
+}
+
+function create(l, v, r) {
+ var hl = l !== undefined ? Caml_option.valFromOption(l).h : 0;
+ var hr = r !== undefined ? Caml_option.valFromOption(r).h : 0;
+ return {
+ v: v,
+ h: (
+ hl >= hr ? hl : hr
+ ) + 1 | 0,
+ l: l,
+ r: r
+ };
+}
+
+function singleton(x) {
+ return {
+ v: x,
+ h: 1,
+ l: undefined,
+ r: undefined
+ };
+}
+
+function heightGe(l, r) {
+ if (r !== undefined) {
+ if (l !== undefined) {
+ return l.h >= r.h;
+ } else {
+ return false;
+ }
+ } else {
+ return true;
+ }
+}
+
+function bal(l, v, r) {
+ var hl = l !== undefined ? Caml_option.valFromOption(l).h : 0;
+ var hr = r !== undefined ? Caml_option.valFromOption(r).h : 0;
+ if (hl > (hr + 2 | 0)) {
+ var l$1 = Caml_option.valFromOption(l);
+ var ll = l$1.l;
+ var lr = l$1.r;
+ if (heightGe(ll, lr)) {
+ return create(ll, l$1.v, create(lr, v, r));
+ }
+ var lr$1 = Caml_option.valFromOption(lr);
+ return create(create(ll, l$1.v, lr$1.l), lr$1.v, create(lr$1.r, v, r));
+ }
+ if (hr <= (hl + 2 | 0)) {
+ return {
+ v: v,
+ h: (
+ hl >= hr ? hl : hr
+ ) + 1 | 0,
+ l: l,
+ r: r
+ };
+ }
+ var r$1 = Caml_option.valFromOption(r);
+ var rl = r$1.l;
+ var rr = r$1.r;
+ if (heightGe(rr, rl)) {
+ return create(create(l, v, rl), r$1.v, rr);
+ }
+ var rl$1 = Caml_option.valFromOption(rl);
+ return create(create(l, v, rl$1.l), rl$1.v, create(rl$1.r, r$1.v, rr));
+}
+
+function min0Aux(_n) {
+ while(true) {
+ var n = _n;
+ var n$1 = n.l;
+ if (n$1 === undefined) {
+ return n.v;
+ }
+ _n = Caml_option.valFromOption(n$1);
+ continue ;
+ };
+}
+
+function minimum(n) {
+ if (n !== undefined) {
+ return Caml_option.some(min0Aux(n));
+ }
+
+}
+
+function minUndefined(n) {
+ if (n !== undefined) {
+ return min0Aux(n);
+ }
+
+}
+
+function max0Aux(_n) {
+ while(true) {
+ var n = _n;
+ var n$1 = n.r;
+ if (n$1 === undefined) {
+ return n.v;
+ }
+ _n = Caml_option.valFromOption(n$1);
+ continue ;
+ };
+}
+
+function maximum(n) {
+ if (n !== undefined) {
+ return Caml_option.some(max0Aux(n));
+ }
+
+}
+
+function maxUndefined(n) {
+ if (n !== undefined) {
+ return max0Aux(n);
+ }
+
+}
+
+function removeMinAuxWithRef(n, v) {
+ var ln = n.l;
+ if (ln !== undefined) {
+ return bal(removeMinAuxWithRef(Caml_option.valFromOption(ln), v), n.v, n.r);
+ } else {
+ v.contents = n.v;
+ return n.r;
+ }
+}
+
+function isEmpty(n) {
+ return n === undefined;
+}
+
+function stackAllLeft(_v, _s) {
+ while(true) {
+ var s = _s;
+ var v = _v;
+ if (v === undefined) {
+ return s;
+ }
+ var x = Caml_option.valFromOption(v);
+ _s = {
+ hd: x,
+ tl: s
+ };
+ _v = x.l;
+ continue ;
+ };
+}
+
+function forEachU(_n, f) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ forEachU(n$1.l, f);
+ f(n$1.v);
+ _n = n$1.r;
+ continue ;
+ };
+}
+
+function forEach(n, f) {
+ forEachU(n, Curry.__1(f));
+}
+
+function reduceU(_s, _accu, f) {
+ while(true) {
+ var accu = _accu;
+ var s = _s;
+ if (s === undefined) {
+ return accu;
+ }
+ var n = Caml_option.valFromOption(s);
+ _accu = f(reduceU(n.l, accu, f), n.v);
+ _s = n.r;
+ continue ;
+ };
+}
+
+function reduce(s, accu, f) {
+ return reduceU(s, accu, Curry.__2(f));
+}
+
+function everyU(_n, p) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return true;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ if (!p(n$1.v)) {
+ return false;
+ }
+ if (!everyU(n$1.l, p)) {
+ return false;
+ }
+ _n = n$1.r;
+ continue ;
+ };
+}
+
+function every(n, p) {
+ return everyU(n, Curry.__1(p));
+}
+
+function someU(_n, p) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return false;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ if (p(n$1.v)) {
+ return true;
+ }
+ if (someU(n$1.l, p)) {
+ return true;
+ }
+ _n = n$1.r;
+ continue ;
+ };
+}
+
+function some(n, p) {
+ return someU(n, Curry.__1(p));
+}
+
+function addMinElement(n, v) {
+ if (n === undefined) {
+ return singleton(v);
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ return bal(addMinElement(n$1.l, v), n$1.v, n$1.r);
+}
+
+function addMaxElement(n, v) {
+ if (n === undefined) {
+ return singleton(v);
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ return bal(n$1.l, n$1.v, addMaxElement(n$1.r, v));
+}
+
+function joinShared(ln, v, rn) {
+ if (ln === undefined) {
+ return addMinElement(rn, v);
+ }
+ if (rn === undefined) {
+ return addMaxElement(ln, v);
+ }
+ var r = Caml_option.valFromOption(rn);
+ var l = Caml_option.valFromOption(ln);
+ var lh = l.h;
+ var rh = r.h;
+ if (lh > (rh + 2 | 0)) {
+ return bal(l.l, l.v, joinShared(l.r, v, rn));
+ } else if (rh > (lh + 2 | 0)) {
+ return bal(joinShared(ln, v, r.l), r.v, r.r);
+ } else {
+ return create(ln, v, rn);
+ }
+}
+
+function concatShared(t1, t2) {
+ if (t1 === undefined) {
+ return t2;
+ }
+ if (t2 === undefined) {
+ return t1;
+ }
+ var t2n = Caml_option.valFromOption(t2);
+ var v = {
+ contents: t2n.v
+ };
+ var t2r = removeMinAuxWithRef(t2n, v);
+ return joinShared(t1, v.contents, t2r);
+}
+
+function partitionSharedU(n, p) {
+ if (n === undefined) {
+ return [
+ undefined,
+ undefined
+ ];
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var value = n$1.v;
+ var match = partitionSharedU(n$1.l, p);
+ var lf = match[1];
+ var lt = match[0];
+ var pv = p(value);
+ var match$1 = partitionSharedU(n$1.r, p);
+ var rf = match$1[1];
+ var rt = match$1[0];
+ if (pv) {
+ return [
+ joinShared(lt, value, rt),
+ concatShared(lf, rf)
+ ];
+ } else {
+ return [
+ concatShared(lt, rt),
+ joinShared(lf, value, rf)
+ ];
+ }
+}
+
+function partitionShared(n, p) {
+ return partitionSharedU(n, Curry.__1(p));
+}
+
+function lengthNode(n) {
+ var l = n.l;
+ var r = n.r;
+ var sizeL = l !== undefined ? lengthNode(Caml_option.valFromOption(l)) : 0;
+ var sizeR = r !== undefined ? lengthNode(Caml_option.valFromOption(r)) : 0;
+ return (1 + sizeL | 0) + sizeR | 0;
+}
+
+function size(n) {
+ if (n !== undefined) {
+ return lengthNode(n);
+ } else {
+ return 0;
+ }
+}
+
+function toListAux(_n, _accu) {
+ while(true) {
+ var accu = _accu;
+ var n = _n;
+ if (n === undefined) {
+ return accu;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ _accu = {
+ hd: n$1.v,
+ tl: toListAux(n$1.r, accu)
+ };
+ _n = n$1.l;
+ continue ;
+ };
+}
+
+function toList(s) {
+ return toListAux(s, /* [] */0);
+}
+
+function checkInvariantInternal(_v) {
+ while(true) {
+ var v = _v;
+ if (v === undefined) {
+ return ;
+ }
+ var n = Caml_option.valFromOption(v);
+ var l = n.l;
+ var r = n.r;
+ var diff = (
+ l !== undefined ? Caml_option.valFromOption(l).h : 0
+ ) - (
+ r !== undefined ? Caml_option.valFromOption(r).h : 0
+ ) | 0;
+ if (!(diff <= 2 && diff >= -2)) {
+ throw {
+ MEL_EXN_ID: "Assert_failure",
+ _1: [
+ "jscomp/others/belt_internalAVLset.ml",
+ 244,
+ 6
+ ],
+ Error: new Error()
+ };
+ }
+ checkInvariantInternal(l);
+ _v = r;
+ continue ;
+ };
+}
+
+function fillArray(_n, _i, arr) {
+ while(true) {
+ var i = _i;
+ var n = _n;
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ var next = l !== undefined ? fillArray(Caml_option.valFromOption(l), i, arr) : i;
+ arr[next] = v;
+ var rnext = next + 1 | 0;
+ if (r === undefined) {
+ return rnext;
+ }
+ _i = rnext;
+ _n = Caml_option.valFromOption(r);
+ continue ;
+ };
+}
+
+function fillArrayWithPartition(_n, cursor, arr, p) {
+ while(true) {
+ var n = _n;
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (l !== undefined) {
+ fillArrayWithPartition(Caml_option.valFromOption(l), cursor, arr, p);
+ }
+ if (p(v)) {
+ var c = cursor.forward;
+ arr[c] = v;
+ cursor.forward = c + 1 | 0;
+ } else {
+ var c$1 = cursor.backward;
+ arr[c$1] = v;
+ cursor.backward = c$1 - 1 | 0;
+ }
+ if (r === undefined) {
+ return ;
+ }
+ _n = Caml_option.valFromOption(r);
+ continue ;
+ };
+}
+
+function fillArrayWithFilter(_n, _i, arr, p) {
+ while(true) {
+ var i = _i;
+ var n = _n;
+ var v = n.v;
+ var l = n.l;
+ var r = n.r;
+ var next = l !== undefined ? fillArrayWithFilter(Caml_option.valFromOption(l), i, arr, p) : i;
+ var rnext = p(v) ? (arr[next] = v, next + 1 | 0) : next;
+ if (r === undefined) {
+ return rnext;
+ }
+ _i = rnext;
+ _n = Caml_option.valFromOption(r);
+ continue ;
+ };
+}
+
+function toArray(n) {
+ if (n === undefined) {
+ return [];
+ }
+ var size = lengthNode(n);
+ var v = new Array(size);
+ fillArray(n, 0, v);
+ return v;
+}
+
+function fromSortedArrayRevAux(arr, off, len) {
+ switch (len) {
+ case 0 :
+ return ;
+ case 1 :
+ return singleton(arr[off]);
+ case 2 :
+ var x0 = arr[off];
+ var x1 = arr[off - 1 | 0];
+ return {
+ v: x1,
+ h: 2,
+ l: singleton(x0),
+ r: undefined
+ };
+ case 3 :
+ var x0$1 = arr[off];
+ var x1$1 = arr[off - 1 | 0];
+ var x2 = arr[off - 2 | 0];
+ return {
+ v: x1$1,
+ h: 2,
+ l: singleton(x0$1),
+ r: singleton(x2)
+ };
+ default:
+ var nl = len / 2 | 0;
+ var left = fromSortedArrayRevAux(arr, off, nl);
+ var mid = arr[off - nl | 0];
+ var right = fromSortedArrayRevAux(arr, (off - nl | 0) - 1 | 0, (len - nl | 0) - 1 | 0);
+ return create(left, mid, right);
+ }
+}
+
+function fromSortedArrayAux(arr, off, len) {
+ switch (len) {
+ case 0 :
+ return ;
+ case 1 :
+ return singleton(arr[off]);
+ case 2 :
+ var x0 = arr[off];
+ var x1 = arr[off + 1 | 0];
+ return {
+ v: x1,
+ h: 2,
+ l: singleton(x0),
+ r: undefined
+ };
+ case 3 :
+ var x0$1 = arr[off];
+ var x1$1 = arr[off + 1 | 0];
+ var x2 = arr[off + 2 | 0];
+ return {
+ v: x1$1,
+ h: 2,
+ l: singleton(x0$1),
+ r: singleton(x2)
+ };
+ default:
+ var nl = len / 2 | 0;
+ var left = fromSortedArrayAux(arr, off, nl);
+ var mid = arr[off + nl | 0];
+ var right = fromSortedArrayAux(arr, (off + nl | 0) + 1 | 0, (len - nl | 0) - 1 | 0);
+ return create(left, mid, right);
+ }
+}
+
+function fromSortedArrayUnsafe(arr) {
+ return fromSortedArrayAux(arr, 0, arr.length);
+}
+
+function keepSharedU(n, p) {
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.v;
+ var l = n$1.l;
+ var r = n$1.r;
+ var newL = keepSharedU(l, p);
+ var pv = p(v);
+ var newR = keepSharedU(r, p);
+ if (pv) {
+ if (l === newL && r === newR) {
+ return n$1;
+ } else {
+ return joinShared(newL, v, newR);
+ }
+ } else {
+ return concatShared(newL, newR);
+ }
+}
+
+function keepShared(n, p) {
+ return keepSharedU(n, Curry.__1(p));
+}
+
+function keepCopyU(n, p) {
+ if (n === undefined) {
+ return ;
+ }
+ var size = lengthNode(n);
+ var v = new Array(size);
+ var last = fillArrayWithFilter(n, 0, v, p);
+ return fromSortedArrayAux(v, 0, last);
+}
+
+function keepCopy(n, p) {
+ return keepCopyU(n, Curry.__1(p));
+}
+
+function partitionCopyU(n, p) {
+ if (n === undefined) {
+ return [
+ undefined,
+ undefined
+ ];
+ }
+ var size = lengthNode(n);
+ var v = new Array(size);
+ var backward = size - 1 | 0;
+ var cursor = {
+ forward: 0,
+ backward: backward
+ };
+ fillArrayWithPartition(n, cursor, v, p);
+ var forwardLen = cursor.forward;
+ return [
+ fromSortedArrayAux(v, 0, forwardLen),
+ fromSortedArrayRevAux(v, backward, size - forwardLen | 0)
+ ];
+}
+
+function partitionCopy(n, p) {
+ return partitionCopyU(n, Curry.__1(p));
+}
+
+function has(_t, x, cmp) {
+ while(true) {
+ var t = _t;
+ if (t === undefined) {
+ return false;
+ }
+ var n = Caml_option.valFromOption(t);
+ var v = n.v;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return true;
+ }
+ _t = c < 0 ? n.l : n.r;
+ continue ;
+ };
+}
+
+function cmp(s1, s2, cmp$1) {
+ var len1 = size(s1);
+ var len2 = size(s2);
+ if (len1 === len2) {
+ var _e1 = stackAllLeft(s1, /* [] */0);
+ var _e2 = stackAllLeft(s2, /* [] */0);
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return 0;
+ }
+ if (!e2) {
+ return 0;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ var c = cmp$1(h1.v, h2.v);
+ if (c !== 0) {
+ return c;
+ }
+ _e2 = stackAllLeft(h2.r, e2.tl);
+ _e1 = stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+ } else if (len1 < len2) {
+ return -1;
+ } else {
+ return 1;
+ }
+}
+
+function eq(s1, s2, c) {
+ return cmp(s1, s2, c) === 0;
+}
+
+function subset(_s1, _s2, cmp) {
+ while(true) {
+ var s2 = _s2;
+ var s1 = _s1;
+ if (s1 === undefined) {
+ return true;
+ }
+ if (s2 === undefined) {
+ return false;
+ }
+ var t2 = Caml_option.valFromOption(s2);
+ var t1 = Caml_option.valFromOption(s1);
+ var v1 = t1.v;
+ var l1 = t1.l;
+ var r1 = t1.r;
+ var v2 = t2.v;
+ var l2 = t2.l;
+ var r2 = t2.r;
+ var c = cmp(v1, v2);
+ if (c === 0) {
+ if (!subset(l1, l2, cmp)) {
+ return false;
+ }
+ _s2 = r2;
+ _s1 = r1;
+ continue ;
+ }
+ if (c < 0) {
+ if (!subset(create(l1, v1, undefined), l2, cmp)) {
+ return false;
+ }
+ _s1 = r1;
+ continue ;
+ }
+ if (!subset(create(undefined, v1, r1), r2, cmp)) {
+ return false;
+ }
+ _s1 = l1;
+ continue ;
+ };
+}
+
+function get(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return Caml_option.some(v);
+ }
+ _n = c < 0 ? t.l : t.r;
+ continue ;
+ };
+}
+
+function getUndefined(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return v;
+ }
+ _n = c < 0 ? t.l : t.r;
+ continue ;
+ };
+}
+
+function getExn(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n !== undefined) {
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return v;
+ }
+ _n = c < 0 ? t.l : t.r;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function rotateWithLeftChild(k2) {
+ var k1 = k2.l;
+ var k1$1 = Caml_option.valFromOption(k1);
+ k2.l = k1$1.r;
+ k1$1.r = k2;
+ var n = k2.l;
+ var hlk2 = n !== undefined ? Caml_option.valFromOption(n).h : 0;
+ var n$1 = k2.r;
+ var hrk2 = n$1 !== undefined ? Caml_option.valFromOption(n$1).h : 0;
+ k2.h = (
+ hlk2 > hrk2 ? hlk2 : hrk2
+ ) + 1 | 0;
+ var n$2 = k1$1.l;
+ var hlk1 = n$2 !== undefined ? Caml_option.valFromOption(n$2).h : 0;
+ var hk2 = k2.h;
+ k1$1.h = (
+ hlk1 > hk2 ? hlk1 : hk2
+ ) + 1 | 0;
+ return k1$1;
+}
+
+function rotateWithRightChild(k1) {
+ var k2 = k1.r;
+ var k2$1 = Caml_option.valFromOption(k2);
+ k1.r = k2$1.l;
+ k2$1.l = k1;
+ var n = k1.l;
+ var hlk1 = n !== undefined ? Caml_option.valFromOption(n).h : 0;
+ var n$1 = k1.r;
+ var hrk1 = n$1 !== undefined ? Caml_option.valFromOption(n$1).h : 0;
+ k1.h = (
+ hlk1 > hrk1 ? hlk1 : hrk1
+ ) + 1 | 0;
+ var n$2 = k2$1.r;
+ var hrk2 = n$2 !== undefined ? Caml_option.valFromOption(n$2).h : 0;
+ var hk1 = k1.h;
+ k2$1.h = (
+ hrk2 > hk1 ? hrk2 : hk1
+ ) + 1 | 0;
+ return k2$1;
+}
+
+function doubleWithLeftChild(k3) {
+ var k3l = k3.l;
+ var v = rotateWithRightChild(Caml_option.valFromOption(k3l));
+ k3.l = v;
+ return rotateWithLeftChild(k3);
+}
+
+function doubleWithRightChild(k2) {
+ var k2r = k2.r;
+ var v = rotateWithLeftChild(Caml_option.valFromOption(k2r));
+ k2.r = v;
+ return rotateWithRightChild(k2);
+}
+
+function heightUpdateMutate(t) {
+ var n = t.l;
+ var hlt = n !== undefined ? Caml_option.valFromOption(n).h : 0;
+ var n$1 = t.r;
+ var hrt = n$1 !== undefined ? Caml_option.valFromOption(n$1).h : 0;
+ t.h = (
+ hlt > hrt ? hlt : hrt
+ ) + 1 | 0;
+ return t;
+}
+
+function balMutate(nt) {
+ var l = nt.l;
+ var r = nt.r;
+ var hl = l !== undefined ? Caml_option.valFromOption(l).h : 0;
+ var hr = r !== undefined ? Caml_option.valFromOption(r).h : 0;
+ if (hl > (2 + hr | 0)) {
+ var match = Caml_option.valFromOption(l);
+ var ll = match.l;
+ var lr = match.r;
+ if (heightGe(ll, lr)) {
+ return heightUpdateMutate(rotateWithLeftChild(nt));
+ } else {
+ return heightUpdateMutate(doubleWithLeftChild(nt));
+ }
+ }
+ if (hr > (2 + hl | 0)) {
+ var match$1 = Caml_option.valFromOption(r);
+ var rl = match$1.l;
+ var rr = match$1.r;
+ if (heightGe(rr, rl)) {
+ return heightUpdateMutate(rotateWithRightChild(nt));
+ } else {
+ return heightUpdateMutate(doubleWithRightChild(nt));
+ }
+ }
+ nt.h = (
+ hl > hr ? hl : hr
+ ) + 1 | 0;
+ return nt;
+}
+
+function addMutate(cmp, t, x) {
+ if (t === undefined) {
+ return singleton(x);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.v;
+ var c = cmp(x, k);
+ if (c === 0) {
+ return t;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (c < 0) {
+ var ll = addMutate(cmp, l, x);
+ nt.l = ll;
+ } else {
+ nt.r = addMutate(cmp, r, x);
+ }
+ return balMutate(nt);
+}
+
+function fromArray(xs, cmp) {
+ var len = xs.length;
+ if (len === 0) {
+ return ;
+ }
+ var next = Belt__Belt_SortArray.strictlySortedLengthU(xs, (function (x, y) {
+ return cmp(x, y) < 0;
+ }));
+ var result;
+ if (next >= 0) {
+ result = fromSortedArrayAux(xs, 0, next);
+ } else {
+ next = -next | 0;
+ result = fromSortedArrayRevAux(xs, next - 1 | 0, next);
+ }
+ for(var i = next; i < len; ++i){
+ result = addMutate(cmp, result, xs[i]);
+ }
+ return result;
+}
+
+function removeMinAuxWithRootMutate(nt, n) {
+ var ln = n.l;
+ var rn = n.r;
+ if (ln !== undefined) {
+ n.l = removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(ln));
+ return balMutate(n);
+ } else {
+ nt.v = n.v;
+ return rn;
+ }
+}
+
+export {
+ copy ,
+ create ,
+ bal ,
+ singleton ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ removeMinAuxWithRef ,
+ isEmpty ,
+ stackAllLeft ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ joinShared ,
+ concatShared ,
+ keepSharedU ,
+ keepShared ,
+ keepCopyU ,
+ keepCopy ,
+ partitionSharedU ,
+ partitionShared ,
+ partitionCopyU ,
+ partitionCopy ,
+ lengthNode ,
+ size ,
+ toList ,
+ checkInvariantInternal ,
+ fillArray ,
+ toArray ,
+ fromSortedArrayAux ,
+ fromSortedArrayRevAux ,
+ fromSortedArrayUnsafe ,
+ has ,
+ cmp ,
+ eq ,
+ subset ,
+ get ,
+ getUndefined ,
+ getExn ,
+ fromArray ,
+ addMutate ,
+ balMutate ,
+ removeMinAuxWithRootMutate ,
+}
+/* No side effect */
+`,zc=`// Generated by Melange
+
+import * as Belt__Belt_SortArray from "./belt_SortArray.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function treeHeight(n) {
+ if (n !== undefined) {
+ return Caml_option.valFromOption(n).h;
+ } else {
+ return 0;
+ }
+}
+
+function copy(n) {
+ if (n === undefined) {
+ return n;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ return {
+ k: n$1.k,
+ v: n$1.v,
+ h: n$1.h,
+ l: copy(n$1.l),
+ r: copy(n$1.r)
+ };
+}
+
+function create(l, x, d, r) {
+ var hl = treeHeight(l);
+ var hr = treeHeight(r);
+ return {
+ k: x,
+ v: d,
+ h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0,
+ l: l,
+ r: r
+ };
+}
+
+function singleton(x, d) {
+ return {
+ k: x,
+ v: d,
+ h: 1,
+ l: undefined,
+ r: undefined
+ };
+}
+
+function heightGe(l, r) {
+ if (r !== undefined) {
+ if (l !== undefined) {
+ return l.h >= r.h;
+ } else {
+ return false;
+ }
+ } else {
+ return true;
+ }
+}
+
+function updateValue(n, newValue) {
+ if (n.v === newValue) {
+ return n;
+ } else {
+ return {
+ k: n.k,
+ v: newValue,
+ h: n.h,
+ l: n.l,
+ r: n.r
+ };
+ }
+}
+
+function bal(l, x, d, r) {
+ var hl = l !== undefined ? Caml_option.valFromOption(l).h : 0;
+ var hr = r !== undefined ? Caml_option.valFromOption(r).h : 0;
+ if (hl > (hr + 2 | 0)) {
+ var ll = l.l;
+ var lr = l.r;
+ if (treeHeight(ll) >= treeHeight(lr)) {
+ return create(ll, l.k, l.v, create(lr, x, d, r));
+ }
+ var lr$1 = Caml_option.valFromOption(lr);
+ return create(create(ll, l.k, l.v, lr$1.l), lr$1.k, lr$1.v, create(lr$1.r, x, d, r));
+ }
+ if (hr <= (hl + 2 | 0)) {
+ return {
+ k: x,
+ v: d,
+ h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0,
+ l: l,
+ r: r
+ };
+ }
+ var r$1 = Caml_option.valFromOption(r);
+ var rl = r$1.l;
+ var rr = r$1.r;
+ if (treeHeight(rr) >= treeHeight(rl)) {
+ return create(create(l, x, d, rl), r$1.k, r$1.v, rr);
+ }
+ var rl$1 = Caml_option.valFromOption(rl);
+ return create(create(l, x, d, rl$1.l), rl$1.k, rl$1.v, create(rl$1.r, r$1.k, r$1.v, rr));
+}
+
+function minKey0Aux(_n) {
+ while(true) {
+ var n = _n;
+ var n$1 = n.l;
+ if (n$1 === undefined) {
+ return n.k;
+ }
+ _n = Caml_option.valFromOption(n$1);
+ continue ;
+ };
+}
+
+function minKey(n) {
+ if (n !== undefined) {
+ return Caml_option.some(minKey0Aux(n));
+ }
+
+}
+
+function minKeyUndefined(n) {
+ if (n !== undefined) {
+ return minKey0Aux(n);
+ }
+
+}
+
+function maxKey0Aux(_n) {
+ while(true) {
+ var n = _n;
+ var n$1 = n.r;
+ if (n$1 === undefined) {
+ return n.k;
+ }
+ _n = Caml_option.valFromOption(n$1);
+ continue ;
+ };
+}
+
+function maxKey(n) {
+ if (n !== undefined) {
+ return Caml_option.some(maxKey0Aux(n));
+ }
+
+}
+
+function maxKeyUndefined(n) {
+ if (n !== undefined) {
+ return maxKey0Aux(n);
+ }
+
+}
+
+function minKV0Aux(_n) {
+ while(true) {
+ var n = _n;
+ var n$1 = n.l;
+ if (n$1 === undefined) {
+ return [
+ n.k,
+ n.v
+ ];
+ }
+ _n = Caml_option.valFromOption(n$1);
+ continue ;
+ };
+}
+
+function minimum(n) {
+ if (n !== undefined) {
+ return minKV0Aux(n);
+ }
+
+}
+
+function minUndefined(n) {
+ if (n !== undefined) {
+ return minKV0Aux(n);
+ }
+
+}
+
+function maxKV0Aux(_n) {
+ while(true) {
+ var n = _n;
+ var n$1 = n.r;
+ if (n$1 === undefined) {
+ return [
+ n.k,
+ n.v
+ ];
+ }
+ _n = Caml_option.valFromOption(n$1);
+ continue ;
+ };
+}
+
+function maximum(n) {
+ if (n !== undefined) {
+ return maxKV0Aux(n);
+ }
+
+}
+
+function maxUndefined(n) {
+ if (n !== undefined) {
+ return maxKV0Aux(n);
+ }
+
+}
+
+function removeMinAuxWithRef(n, kr, vr) {
+ var ln = n.l;
+ if (ln !== undefined) {
+ return bal(removeMinAuxWithRef(Caml_option.valFromOption(ln), kr, vr), n.k, n.v, n.r);
+ } else {
+ kr.contents = n.k;
+ vr.contents = n.v;
+ return n.r;
+ }
+}
+
+function isEmpty(x) {
+ return x === undefined;
+}
+
+function stackAllLeft(_v, _s) {
+ while(true) {
+ var s = _s;
+ var v = _v;
+ if (v === undefined) {
+ return s;
+ }
+ var x = Caml_option.valFromOption(v);
+ _s = {
+ hd: x,
+ tl: s
+ };
+ _v = x.l;
+ continue ;
+ };
+}
+
+function findFirstByU(n, p) {
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var left = findFirstByU(n$1.l, p);
+ if (left !== undefined) {
+ return left;
+ }
+ var v = n$1.k;
+ var d = n$1.v;
+ var pvd = p(v, d);
+ if (pvd) {
+ return [
+ v,
+ d
+ ];
+ }
+ var right = findFirstByU(n$1.r, p);
+ if (right !== undefined) {
+ return right;
+ }
+
+}
+
+function findFirstBy(n, p) {
+ return findFirstByU(n, Curry.__2(p));
+}
+
+function forEachU(_n, f) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ forEachU(n$1.l, f);
+ f(n$1.k, n$1.v);
+ _n = n$1.r;
+ continue ;
+ };
+}
+
+function forEach(n, f) {
+ forEachU(n, Curry.__2(f));
+}
+
+function mapU(n, f) {
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var newLeft = mapU(n$1.l, f);
+ var newD = f(n$1.v);
+ var newRight = mapU(n$1.r, f);
+ return {
+ k: n$1.k,
+ v: newD,
+ h: n$1.h,
+ l: newLeft,
+ r: newRight
+ };
+}
+
+function map(n, f) {
+ return mapU(n, Curry.__1(f));
+}
+
+function mapWithKeyU(n, f) {
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var key = n$1.k;
+ var newLeft = mapWithKeyU(n$1.l, f);
+ var newD = f(key, n$1.v);
+ var newRight = mapWithKeyU(n$1.r, f);
+ return {
+ k: key,
+ v: newD,
+ h: n$1.h,
+ l: newLeft,
+ r: newRight
+ };
+}
+
+function mapWithKey(n, f) {
+ return mapWithKeyU(n, Curry.__2(f));
+}
+
+function reduceU(_m, _accu, f) {
+ while(true) {
+ var accu = _accu;
+ var m = _m;
+ if (m === undefined) {
+ return accu;
+ }
+ var n = Caml_option.valFromOption(m);
+ var v = n.k;
+ var d = n.v;
+ var l = n.l;
+ var r = n.r;
+ _accu = f(reduceU(l, accu, f), v, d);
+ _m = r;
+ continue ;
+ };
+}
+
+function reduce(m, accu, f) {
+ return reduceU(m, accu, Curry.__3(f));
+}
+
+function everyU(_n, p) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return true;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ if (!p(n$1.k, n$1.v)) {
+ return false;
+ }
+ if (!everyU(n$1.l, p)) {
+ return false;
+ }
+ _n = n$1.r;
+ continue ;
+ };
+}
+
+function every(n, p) {
+ return everyU(n, Curry.__2(p));
+}
+
+function someU(_n, p) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return false;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ if (p(n$1.k, n$1.v)) {
+ return true;
+ }
+ if (someU(n$1.l, p)) {
+ return true;
+ }
+ _n = n$1.r;
+ continue ;
+ };
+}
+
+function some(n, p) {
+ return someU(n, Curry.__2(p));
+}
+
+function addMinElement(n, k, v) {
+ if (n === undefined) {
+ return singleton(k, v);
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ return bal(addMinElement(n$1.l, k, v), n$1.k, n$1.v, n$1.r);
+}
+
+function addMaxElement(n, k, v) {
+ if (n === undefined) {
+ return singleton(k, v);
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ return bal(n$1.l, n$1.k, n$1.v, addMaxElement(n$1.r, k, v));
+}
+
+function join(ln, v, d, rn) {
+ if (ln === undefined) {
+ return addMinElement(rn, v, d);
+ }
+ if (rn === undefined) {
+ return addMaxElement(ln, v, d);
+ }
+ var r = Caml_option.valFromOption(rn);
+ var l = Caml_option.valFromOption(ln);
+ var lv = l.k;
+ var ld = l.v;
+ var lh = l.h;
+ var ll = l.l;
+ var lr = l.r;
+ var rv = r.k;
+ var rd = r.v;
+ var rh = r.h;
+ var rl = r.l;
+ var rr = r.r;
+ if (lh > (rh + 2 | 0)) {
+ return bal(ll, lv, ld, join(lr, v, d, rn));
+ } else if (rh > (lh + 2 | 0)) {
+ return bal(join(ln, v, d, rl), rv, rd, rr);
+ } else {
+ return create(ln, v, d, rn);
+ }
+}
+
+function concat(t1, t2) {
+ if (t1 === undefined) {
+ return t2;
+ }
+ if (t2 === undefined) {
+ return t1;
+ }
+ var t2n = Caml_option.valFromOption(t2);
+ var kr = {
+ contents: t2n.k
+ };
+ var vr = {
+ contents: t2n.v
+ };
+ var t2r = removeMinAuxWithRef(t2n, kr, vr);
+ return join(t1, kr.contents, vr.contents, t2r);
+}
+
+function concatOrJoin(t1, v, d, t2) {
+ if (d !== undefined) {
+ return join(t1, v, Caml_option.valFromOption(d), t2);
+ } else {
+ return concat(t1, t2);
+ }
+}
+
+function keepSharedU(n, p) {
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var d = n$1.v;
+ var newLeft = keepSharedU(n$1.l, p);
+ var pvd = p(v, d);
+ var newRight = keepSharedU(n$1.r, p);
+ if (pvd) {
+ return join(newLeft, v, d, newRight);
+ } else {
+ return concat(newLeft, newRight);
+ }
+}
+
+function keepShared(n, p) {
+ return keepSharedU(n, Curry.__2(p));
+}
+
+function keepMapU(n, p) {
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var d = n$1.v;
+ var newLeft = keepMapU(n$1.l, p);
+ var pvd = p(v, d);
+ var newRight = keepMapU(n$1.r, p);
+ if (pvd !== undefined) {
+ return join(newLeft, v, Caml_option.valFromOption(pvd), newRight);
+ } else {
+ return concat(newLeft, newRight);
+ }
+}
+
+function keepMap(n, p) {
+ return keepMapU(n, Curry.__2(p));
+}
+
+function partitionSharedU(n, p) {
+ if (n === undefined) {
+ return [
+ undefined,
+ undefined
+ ];
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var key = n$1.k;
+ var value = n$1.v;
+ var match = partitionSharedU(n$1.l, p);
+ var lf = match[1];
+ var lt = match[0];
+ var pvd = p(key, value);
+ var match$1 = partitionSharedU(n$1.r, p);
+ var rf = match$1[1];
+ var rt = match$1[0];
+ if (pvd) {
+ return [
+ join(lt, key, value, rt),
+ concat(lf, rf)
+ ];
+ } else {
+ return [
+ concat(lt, rt),
+ join(lf, key, value, rf)
+ ];
+ }
+}
+
+function partitionShared(n, p) {
+ return partitionSharedU(n, Curry.__2(p));
+}
+
+function lengthNode(n) {
+ var l = n.l;
+ var r = n.r;
+ var sizeL = l !== undefined ? lengthNode(Caml_option.valFromOption(l)) : 0;
+ var sizeR = r !== undefined ? lengthNode(Caml_option.valFromOption(r)) : 0;
+ return (1 + sizeL | 0) + sizeR | 0;
+}
+
+function size(n) {
+ if (n !== undefined) {
+ return lengthNode(n);
+ } else {
+ return 0;
+ }
+}
+
+function toListAux(_n, _accu) {
+ while(true) {
+ var accu = _accu;
+ var n = _n;
+ if (n === undefined) {
+ return accu;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var k = n$1.k;
+ var v = n$1.v;
+ var l = n$1.l;
+ var r = n$1.r;
+ _accu = {
+ hd: [
+ k,
+ v
+ ],
+ tl: toListAux(r, accu)
+ };
+ _n = l;
+ continue ;
+ };
+}
+
+function toList(s) {
+ return toListAux(s, /* [] */0);
+}
+
+function checkInvariantInternal(_v) {
+ while(true) {
+ var v = _v;
+ if (v === undefined) {
+ return ;
+ }
+ var n = Caml_option.valFromOption(v);
+ var l = n.l;
+ var r = n.r;
+ var diff = treeHeight(l) - treeHeight(r) | 0;
+ if (!(diff <= 2 && diff >= -2)) {
+ throw {
+ MEL_EXN_ID: "Assert_failure",
+ _1: [
+ "jscomp/others/belt_internalAVLtree.ml",
+ 360,
+ 6
+ ],
+ Error: new Error()
+ };
+ }
+ checkInvariantInternal(l);
+ _v = r;
+ continue ;
+ };
+}
+
+function fillArrayKey(_n, _i, arr) {
+ while(true) {
+ var i = _i;
+ var n = _n;
+ var v = n.k;
+ var l = n.l;
+ var r = n.r;
+ var next = l !== undefined ? fillArrayKey(Caml_option.valFromOption(l), i, arr) : i;
+ arr[next] = v;
+ var rnext = next + 1 | 0;
+ if (r === undefined) {
+ return rnext;
+ }
+ _i = rnext;
+ _n = Caml_option.valFromOption(r);
+ continue ;
+ };
+}
+
+function fillArrayValue(_n, _i, arr) {
+ while(true) {
+ var i = _i;
+ var n = _n;
+ var l = n.l;
+ var r = n.r;
+ var next = l !== undefined ? fillArrayValue(Caml_option.valFromOption(l), i, arr) : i;
+ arr[next] = n.v;
+ var rnext = next + 1 | 0;
+ if (r === undefined) {
+ return rnext;
+ }
+ _i = rnext;
+ _n = Caml_option.valFromOption(r);
+ continue ;
+ };
+}
+
+function fillArray(_n, _i, arr) {
+ while(true) {
+ var i = _i;
+ var n = _n;
+ var l = n.l;
+ var v = n.k;
+ var r = n.r;
+ var next = l !== undefined ? fillArray(Caml_option.valFromOption(l), i, arr) : i;
+ arr[next] = [
+ v,
+ n.v
+ ];
+ var rnext = next + 1 | 0;
+ if (r === undefined) {
+ return rnext;
+ }
+ _i = rnext;
+ _n = Caml_option.valFromOption(r);
+ continue ;
+ };
+}
+
+function toArray(n) {
+ if (n === undefined) {
+ return [];
+ }
+ var size = lengthNode(n);
+ var v = new Array(size);
+ fillArray(n, 0, v);
+ return v;
+}
+
+function keysToArray(n) {
+ if (n === undefined) {
+ return [];
+ }
+ var size = lengthNode(n);
+ var v = new Array(size);
+ fillArrayKey(n, 0, v);
+ return v;
+}
+
+function valuesToArray(n) {
+ if (n === undefined) {
+ return [];
+ }
+ var size = lengthNode(n);
+ var v = new Array(size);
+ fillArrayValue(n, 0, v);
+ return v;
+}
+
+function fromSortedArrayRevAux(arr, off, len) {
+ switch (len) {
+ case 0 :
+ return ;
+ case 1 :
+ var match = arr[off];
+ return singleton(match[0], match[1]);
+ case 2 :
+ var match_0 = arr[off];
+ var match_1 = arr[off - 1 | 0];
+ var match$1 = match_1;
+ var match$2 = match_0;
+ return {
+ k: match$1[0],
+ v: match$1[1],
+ h: 2,
+ l: singleton(match$2[0], match$2[1]),
+ r: undefined
+ };
+ case 3 :
+ var match_0$1 = arr[off];
+ var match_1$1 = arr[off - 1 | 0];
+ var match_2 = arr[off - 2 | 0];
+ var match$3 = match_2;
+ var match$4 = match_1$1;
+ var match$5 = match_0$1;
+ return {
+ k: match$4[0],
+ v: match$4[1],
+ h: 2,
+ l: singleton(match$5[0], match$5[1]),
+ r: singleton(match$3[0], match$3[1])
+ };
+ default:
+ var nl = len / 2 | 0;
+ var left = fromSortedArrayRevAux(arr, off, nl);
+ var match$6 = arr[off - nl | 0];
+ var right = fromSortedArrayRevAux(arr, (off - nl | 0) - 1 | 0, (len - nl | 0) - 1 | 0);
+ return create(left, match$6[0], match$6[1], right);
+ }
+}
+
+function fromSortedArrayAux(arr, off, len) {
+ switch (len) {
+ case 0 :
+ return ;
+ case 1 :
+ var match = arr[off];
+ return singleton(match[0], match[1]);
+ case 2 :
+ var match_0 = arr[off];
+ var match_1 = arr[off + 1 | 0];
+ var match$1 = match_1;
+ var match$2 = match_0;
+ return {
+ k: match$1[0],
+ v: match$1[1],
+ h: 2,
+ l: singleton(match$2[0], match$2[1]),
+ r: undefined
+ };
+ case 3 :
+ var match_0$1 = arr[off];
+ var match_1$1 = arr[off + 1 | 0];
+ var match_2 = arr[off + 2 | 0];
+ var match$3 = match_2;
+ var match$4 = match_1$1;
+ var match$5 = match_0$1;
+ return {
+ k: match$4[0],
+ v: match$4[1],
+ h: 2,
+ l: singleton(match$5[0], match$5[1]),
+ r: singleton(match$3[0], match$3[1])
+ };
+ default:
+ var nl = len / 2 | 0;
+ var left = fromSortedArrayAux(arr, off, nl);
+ var match$6 = arr[off + nl | 0];
+ var right = fromSortedArrayAux(arr, (off + nl | 0) + 1 | 0, (len - nl | 0) - 1 | 0);
+ return create(left, match$6[0], match$6[1], right);
+ }
+}
+
+function fromSortedArrayUnsafe(arr) {
+ return fromSortedArrayAux(arr, 0, arr.length);
+}
+
+function cmpU(s1, s2, kcmp, vcmp) {
+ var len1 = size(s1);
+ var len2 = size(s2);
+ if (len1 === len2) {
+ var _e1 = stackAllLeft(s1, /* [] */0);
+ var _e2 = stackAllLeft(s2, /* [] */0);
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return 0;
+ }
+ if (!e2) {
+ return 0;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ var c = kcmp(h1.k, h2.k);
+ if (c !== 0) {
+ return c;
+ }
+ var cx = vcmp(h1.v, h2.v);
+ if (cx !== 0) {
+ return cx;
+ }
+ _e2 = stackAllLeft(h2.r, e2.tl);
+ _e1 = stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+ } else if (len1 < len2) {
+ return -1;
+ } else {
+ return 1;
+ }
+}
+
+function cmp(s1, s2, kcmp, vcmp) {
+ return cmpU(s1, s2, kcmp, Curry.__2(vcmp));
+}
+
+function eqU(s1, s2, kcmp, veq) {
+ var len1 = size(s1);
+ var len2 = size(s2);
+ if (len1 === len2) {
+ var _e1 = stackAllLeft(s1, /* [] */0);
+ var _e2 = stackAllLeft(s2, /* [] */0);
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return true;
+ }
+ if (!e2) {
+ return true;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ if (!(kcmp(h1.k, h2.k) === 0 && veq(h1.v, h2.v))) {
+ return false;
+ }
+ _e2 = stackAllLeft(h2.r, e2.tl);
+ _e1 = stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+ } else {
+ return false;
+ }
+}
+
+function eq(s1, s2, kcmp, veq) {
+ return eqU(s1, s2, kcmp, Curry.__2(veq));
+}
+
+function get(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return Caml_option.some(n$1.v);
+ }
+ _n = c < 0 ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function getUndefined(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return n$1.v;
+ }
+ _n = c < 0 ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function getExn(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n !== undefined) {
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return n$1.v;
+ }
+ _n = c < 0 ? n$1.l : n$1.r;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function getWithDefault(_n, x, def, cmp) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return def;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return n$1.v;
+ }
+ _n = c < 0 ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function has(_n, x, cmp) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return false;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var c = cmp(x, v);
+ if (c === 0) {
+ return true;
+ }
+ _n = c < 0 ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function rotateWithLeftChild(k2) {
+ var k1 = k2.l;
+ var k1$1 = Caml_option.valFromOption(k1);
+ k2.l = k1$1.r;
+ k1$1.r = k2;
+ var hlk2 = treeHeight(k2.l);
+ var hrk2 = treeHeight(k2.r);
+ k2.h = (
+ hlk2 > hrk2 ? hlk2 : hrk2
+ ) + 1 | 0;
+ var hlk1 = treeHeight(k1$1.l);
+ var hk2 = k2.h;
+ k1$1.h = (
+ hlk1 > hk2 ? hlk1 : hk2
+ ) + 1 | 0;
+ return k1$1;
+}
+
+function rotateWithRightChild(k1) {
+ var k2 = k1.r;
+ var k2$1 = Caml_option.valFromOption(k2);
+ k1.r = k2$1.l;
+ k2$1.l = k1;
+ var hlk1 = treeHeight(k1.l);
+ var hrk1 = treeHeight(k1.r);
+ k1.h = (
+ hlk1 > hrk1 ? hlk1 : hrk1
+ ) + 1 | 0;
+ var hrk2 = treeHeight(k2$1.r);
+ var hk1 = k1.h;
+ k2$1.h = (
+ hrk2 > hk1 ? hrk2 : hk1
+ ) + 1 | 0;
+ return k2$1;
+}
+
+function doubleWithLeftChild(k3) {
+ var x = k3.l;
+ var v = rotateWithRightChild(Caml_option.valFromOption(x));
+ k3.l = v;
+ return rotateWithLeftChild(k3);
+}
+
+function doubleWithRightChild(k2) {
+ var x = k2.r;
+ var v = rotateWithLeftChild(Caml_option.valFromOption(x));
+ k2.r = v;
+ return rotateWithRightChild(k2);
+}
+
+function heightUpdateMutate(t) {
+ var hlt = treeHeight(t.l);
+ var hrt = treeHeight(t.r);
+ t.h = (
+ hlt > hrt ? hlt : hrt
+ ) + 1 | 0;
+ return t;
+}
+
+function balMutate(nt) {
+ var l = nt.l;
+ var r = nt.r;
+ var hl = treeHeight(l);
+ var hr = treeHeight(r);
+ if (hl > (2 + hr | 0)) {
+ var match = Caml_option.valFromOption(l);
+ var ll = match.l;
+ var lr = match.r;
+ if (heightGe(ll, lr)) {
+ return heightUpdateMutate(rotateWithLeftChild(nt));
+ } else {
+ return heightUpdateMutate(doubleWithLeftChild(nt));
+ }
+ }
+ if (hr > (2 + hl | 0)) {
+ var match$1 = Caml_option.valFromOption(r);
+ var rl = match$1.l;
+ var rr = match$1.r;
+ if (heightGe(rr, rl)) {
+ return heightUpdateMutate(rotateWithRightChild(nt));
+ } else {
+ return heightUpdateMutate(doubleWithRightChild(nt));
+ }
+ }
+ nt.h = (
+ hl > hr ? hl : hr
+ ) + 1 | 0;
+ return nt;
+}
+
+function updateMutate(t, x, data, cmp) {
+ if (t === undefined) {
+ return singleton(x, data);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.k;
+ var c = cmp(x, k);
+ if (c === 0) {
+ nt.v = data;
+ return nt;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (c < 0) {
+ var ll = updateMutate(l, x, data, cmp);
+ nt.l = ll;
+ } else {
+ nt.r = updateMutate(r, x, data, cmp);
+ }
+ return balMutate(nt);
+}
+
+function fromArray(xs, cmp) {
+ var len = xs.length;
+ if (len === 0) {
+ return ;
+ }
+ var next = Belt__Belt_SortArray.strictlySortedLengthU(xs, (function (param, param$1) {
+ return cmp(param[0], param$1[0]) < 0;
+ }));
+ var result;
+ if (next >= 0) {
+ result = fromSortedArrayAux(xs, 0, next);
+ } else {
+ next = -next | 0;
+ result = fromSortedArrayRevAux(xs, next - 1 | 0, next);
+ }
+ for(var i = next; i < len; ++i){
+ var match = xs[i];
+ result = updateMutate(result, match[0], match[1], cmp);
+ }
+ return result;
+}
+
+function removeMinAuxWithRootMutate(nt, n) {
+ var rn = n.r;
+ var ln = n.l;
+ if (ln !== undefined) {
+ n.l = removeMinAuxWithRootMutate(nt, Caml_option.valFromOption(ln));
+ return balMutate(n);
+ } else {
+ nt.k = n.k;
+ nt.v = n.v;
+ return rn;
+ }
+}
+
+export {
+ copy ,
+ create ,
+ bal ,
+ singleton ,
+ updateValue ,
+ minKey ,
+ minKeyUndefined ,
+ maxKey ,
+ maxKeyUndefined ,
+ minimum ,
+ minUndefined ,
+ maximum ,
+ maxUndefined ,
+ removeMinAuxWithRef ,
+ isEmpty ,
+ stackAllLeft ,
+ findFirstByU ,
+ findFirstBy ,
+ forEachU ,
+ forEach ,
+ mapU ,
+ map ,
+ mapWithKeyU ,
+ mapWithKey ,
+ reduceU ,
+ reduce ,
+ everyU ,
+ every ,
+ someU ,
+ some ,
+ join ,
+ concat ,
+ concatOrJoin ,
+ keepSharedU ,
+ keepShared ,
+ keepMapU ,
+ keepMap ,
+ partitionSharedU ,
+ partitionShared ,
+ lengthNode ,
+ size ,
+ toList ,
+ checkInvariantInternal ,
+ fillArray ,
+ toArray ,
+ keysToArray ,
+ valuesToArray ,
+ fromSortedArrayAux ,
+ fromSortedArrayRevAux ,
+ fromSortedArrayUnsafe ,
+ cmpU ,
+ cmp ,
+ eqU ,
+ eq ,
+ get ,
+ getUndefined ,
+ getWithDefault ,
+ getExn ,
+ has ,
+ fromArray ,
+ updateMutate ,
+ balMutate ,
+ removeMinAuxWithRootMutate ,
+}
+/* No side effect */
+`,Fc=`// Generated by Melange
+
+import * as Belt__Belt_Array from "./belt_Array.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function copyBucket(c) {
+ if (c === undefined) {
+ return c;
+ }
+ var head = {
+ key: c.key,
+ value: c.value,
+ next: undefined
+ };
+ copyAuxCont(c.next, head);
+ return head;
+}
+
+function copyAuxCont(_c, _prec) {
+ while(true) {
+ var prec = _prec;
+ var c = _c;
+ if (c === undefined) {
+ return ;
+ }
+ var ncopy = {
+ key: c.key,
+ value: c.value,
+ next: undefined
+ };
+ prec.next = ncopy;
+ _prec = ncopy;
+ _c = c.next;
+ continue ;
+ };
+}
+
+function copyBuckets(buckets) {
+ var len = buckets.length;
+ var newBuckets = new Array(len);
+ for(var i = 0; i < len; ++i){
+ newBuckets[i] = copyBucket(buckets[i]);
+ }
+ return newBuckets;
+}
+
+function copy(x) {
+ return {
+ size: x.size,
+ buckets: copyBuckets(x.buckets),
+ hash: x.hash,
+ eq: x.eq
+ };
+}
+
+function bucketLength(_accu, _buckets) {
+ while(true) {
+ var buckets = _buckets;
+ var accu = _accu;
+ if (buckets === undefined) {
+ return accu;
+ }
+ _buckets = buckets.next;
+ _accu = accu + 1 | 0;
+ continue ;
+ };
+}
+
+function do_bucket_iter(f, _buckets) {
+ while(true) {
+ var buckets = _buckets;
+ if (buckets === undefined) {
+ return ;
+ }
+ f(buckets.key, buckets.value);
+ _buckets = buckets.next;
+ continue ;
+ };
+}
+
+function forEachU(h, f) {
+ var d = h.buckets;
+ for(var i = 0 ,i_finish = d.length; i < i_finish; ++i){
+ do_bucket_iter(f, d[i]);
+ }
+}
+
+function forEach(h, f) {
+ forEachU(h, Curry.__2(f));
+}
+
+function do_bucket_fold(f, _b, _accu) {
+ while(true) {
+ var accu = _accu;
+ var b = _b;
+ if (b === undefined) {
+ return accu;
+ }
+ _accu = f(accu, b.key, b.value);
+ _b = b.next;
+ continue ;
+ };
+}
+
+function reduceU(h, init, f) {
+ var d = h.buckets;
+ var accu = init;
+ for(var i = 0 ,i_finish = d.length; i < i_finish; ++i){
+ accu = do_bucket_fold(f, d[i], accu);
+ }
+ return accu;
+}
+
+function reduce(h, init, f) {
+ return reduceU(h, init, Curry.__3(f));
+}
+
+function getMaxBucketLength(h) {
+ return Belt__Belt_Array.reduceU(h.buckets, 0, (function (m, b) {
+ var len = bucketLength(0, b);
+ if (m > len) {
+ return m;
+ } else {
+ return len;
+ }
+ }));
+}
+
+function getBucketHistogram(h) {
+ var mbl = getMaxBucketLength(h);
+ var histo = Belt__Belt_Array.makeByU(mbl + 1 | 0, (function (param) {
+ return 0;
+ }));
+ Belt__Belt_Array.forEachU(h.buckets, (function (b) {
+ var l = bucketLength(0, b);
+ histo[l] = histo[l] + 1 | 0;
+ }));
+ return histo;
+}
+
+function logStats(h) {
+ var histogram = getBucketHistogram(h);
+ console.log({
+ bindings: h.size,
+ buckets: h.buckets.length,
+ histogram: histogram
+ });
+}
+
+function filterMapInplaceBucket(f, h, i, _prec, _cell) {
+ while(true) {
+ var cell = _cell;
+ var prec = _prec;
+ var n = cell.next;
+ var data = f(cell.key, cell.value);
+ if (data !== undefined) {
+ if (prec !== undefined) {
+ cell.next = cell;
+ } else {
+ h.buckets[i] = cell;
+ }
+ cell.value = Caml_option.valFromOption(data);
+ if (n === undefined) {
+ cell.next = n;
+ return ;
+ }
+ _cell = n;
+ _prec = cell;
+ continue ;
+ }
+ h.size = h.size - 1 | 0;
+ if (n === undefined) {
+ if (prec !== undefined) {
+ prec.next = n;
+ } else {
+ h.buckets[i] = prec;
+ }
+ return ;
+ }
+ _cell = n;
+ continue ;
+ };
+}
+
+function keepMapInPlaceU(h, f) {
+ var h_buckets = h.buckets;
+ for(var i = 0 ,i_finish = h_buckets.length; i < i_finish; ++i){
+ var v = h_buckets[i];
+ if (v !== undefined) {
+ filterMapInplaceBucket(f, h, i, undefined, v);
+ }
+
+ }
+}
+
+function keepMapInPlace(h, f) {
+ keepMapInPlaceU(h, Curry.__2(f));
+}
+
+function fillArray(_i, arr, _cell) {
+ while(true) {
+ var cell = _cell;
+ var i = _i;
+ arr[i] = [
+ cell.key,
+ cell.value
+ ];
+ var v = cell.next;
+ if (v === undefined) {
+ return i + 1 | 0;
+ }
+ _cell = v;
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function fillArrayMap(_i, arr, _cell, f) {
+ while(true) {
+ var cell = _cell;
+ var i = _i;
+ arr[i] = f(cell);
+ var v = cell.next;
+ if (v === undefined) {
+ return i + 1 | 0;
+ }
+ _cell = v;
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function linear(h, f) {
+ var d = h.buckets;
+ var current = 0;
+ var arr = new Array(h.size);
+ for(var i = 0 ,i_finish = d.length; i < i_finish; ++i){
+ var cell = d[i];
+ if (cell !== undefined) {
+ current = fillArrayMap(current, arr, cell, f);
+ }
+
+ }
+ return arr;
+}
+
+function keysToArray(h) {
+ return linear(h, (function (x) {
+ return x.key;
+ }));
+}
+
+function valuesToArray(h) {
+ return linear(h, (function (x) {
+ return x.value;
+ }));
+}
+
+function toArray(h) {
+ return linear(h, (function (x) {
+ return [
+ x.key,
+ x.value
+ ];
+ }));
+}
+
+export {
+ copy ,
+ forEachU ,
+ forEach ,
+ reduceU ,
+ reduce ,
+ logStats ,
+ keepMapInPlaceU ,
+ keepMapInPlace ,
+ fillArray ,
+ keysToArray ,
+ valuesToArray ,
+ toArray ,
+ getBucketHistogram ,
+}
+/* No side effect */
+`,Pc=`// Generated by Melange
+
+
+function power_2_above(_x, n) {
+ while(true) {
+ var x = _x;
+ if (x >= n) {
+ return x;
+ }
+ if ((x << 1) < x) {
+ return x;
+ }
+ _x = (x << 1);
+ continue ;
+ };
+}
+
+function make(hash, eq, hintSize) {
+ var s = power_2_above(16, hintSize);
+ return {
+ size: 0,
+ buckets: new Array(s),
+ hash: hash,
+ eq: eq
+ };
+}
+
+function clear(h) {
+ h.size = 0;
+ var h_buckets = h.buckets;
+ var len = h_buckets.length;
+ for(var i = 0; i < len; ++i){
+ h_buckets[i] = undefined;
+ }
+}
+
+function isEmpty(h) {
+ return h.size === 0;
+}
+
+var emptyOpt;
+
+export {
+ emptyOpt ,
+ make ,
+ clear ,
+ isEmpty ,
+}
+/* No side effect */
+`,Uc=`// Generated by Melange
+
+import * as Belt__Belt_SortArray from "./belt_SortArray.js";
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Caml from "melange.js/caml.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function add(t, x, data) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, data);
+ }
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ if (x === k) {
+ return Belt__Belt_internalAVLtree.updateValue(n, data);
+ }
+ var v = n.v;
+ if (x < k) {
+ return Belt__Belt_internalAVLtree.bal(add(n.l, x, data), k, v, n.r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(n.l, k, v, add(n.r, x, data));
+ }
+}
+
+function get(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return Caml_option.some(n$1.v);
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function getUndefined(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return n$1.v;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function getExn(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n !== undefined) {
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return n$1.v;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function getWithDefault(_n, x, def) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return def;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return n$1.v;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function has(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return false;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return true;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function remove(n, x) {
+ if (n === undefined) {
+ return n;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var l = n$1.l;
+ var r = n$1.r;
+ if (x !== v) {
+ if (x < v) {
+ return Belt__Belt_internalAVLtree.bal(remove(l, x), v, n$1.v, r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l, v, n$1.v, remove(r, x));
+ }
+ }
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+}
+
+function splitAux(x, n) {
+ var v = n.k;
+ var d = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ return [
+ l,
+ Caml_option.some(d),
+ r
+ ];
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return [
+ undefined,
+ undefined,
+ n
+ ];
+ }
+ var match = splitAux(x, Caml_option.valFromOption(l));
+ return [
+ match[0],
+ match[1],
+ Belt__Belt_internalAVLtree.join(match[2], v, d, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined,
+ undefined
+ ];
+ }
+ var match$1 = splitAux(x, Caml_option.valFromOption(r));
+ return [
+ Belt__Belt_internalAVLtree.join(l, v, d, match$1[0]),
+ match$1[1],
+ match$1[2]
+ ];
+}
+
+function split(x, n) {
+ if (n !== undefined) {
+ return splitAux(x, n);
+ } else {
+ return [
+ undefined,
+ undefined,
+ undefined
+ ];
+ }
+}
+
+function mergeU(s1, s2, f) {
+ if (s1 !== undefined) {
+ var n = Caml_option.valFromOption(s1);
+ if (n.h >= (
+ s2 !== undefined ? s2.h : 0
+ )) {
+ var v1 = n.k;
+ var d1 = n.v;
+ var l1 = n.l;
+ var r1 = n.r;
+ var match = split(v1, s2);
+ return Belt__Belt_internalAVLtree.concatOrJoin(mergeU(l1, match[0], f), v1, f(v1, Caml_option.some(d1), match[1]), mergeU(r1, match[2], f));
+ }
+
+ } else if (s2 === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(s2);
+ var v2 = n$1.k;
+ var d2 = n$1.v;
+ var l2 = n$1.l;
+ var r2 = n$1.r;
+ var match$1 = split(v2, s1);
+ return Belt__Belt_internalAVLtree.concatOrJoin(mergeU(match$1[0], l2, f), v2, f(v2, match$1[1], Caml_option.some(d2)), mergeU(match$1[2], r2, f));
+}
+
+function merge(s1, s2, f) {
+ return mergeU(s1, s2, Curry.__3(f));
+}
+
+function compareAux(_e1, _e2, vcmp) {
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return 0;
+ }
+ if (!e2) {
+ return 0;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ var c = Caml.caml_int_compare(h1.k, h2.k);
+ if (c !== 0) {
+ return c;
+ }
+ var cx = vcmp(h1.v, h2.v);
+ if (cx !== 0) {
+ return cx;
+ }
+ _e2 = Belt__Belt_internalAVLtree.stackAllLeft(h2.r, e2.tl);
+ _e1 = Belt__Belt_internalAVLtree.stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+}
+
+function cmpU(s1, s2, cmp) {
+ var len1 = Belt__Belt_internalAVLtree.size(s1);
+ var len2 = Belt__Belt_internalAVLtree.size(s2);
+ if (len1 === len2) {
+ return compareAux(Belt__Belt_internalAVLtree.stackAllLeft(s1, /* [] */0), Belt__Belt_internalAVLtree.stackAllLeft(s2, /* [] */0), cmp);
+ } else if (len1 < len2) {
+ return -1;
+ } else {
+ return 1;
+ }
+}
+
+function cmp(s1, s2, f) {
+ return cmpU(s1, s2, Curry.__2(f));
+}
+
+function eqAux(_e1, _e2, eq) {
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return true;
+ }
+ if (!e2) {
+ return true;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ if (!(h1.k === h2.k && eq(h1.v, h2.v))) {
+ return false;
+ }
+ _e2 = Belt__Belt_internalAVLtree.stackAllLeft(h2.r, e2.tl);
+ _e1 = Belt__Belt_internalAVLtree.stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+}
+
+function eqU(s1, s2, eq) {
+ var len1 = Belt__Belt_internalAVLtree.size(s1);
+ var len2 = Belt__Belt_internalAVLtree.size(s2);
+ if (len1 === len2) {
+ return eqAux(Belt__Belt_internalAVLtree.stackAllLeft(s1, /* [] */0), Belt__Belt_internalAVLtree.stackAllLeft(s2, /* [] */0), eq);
+ } else {
+ return false;
+ }
+}
+
+function eq(s1, s2, f) {
+ return eqU(s1, s2, Curry.__2(f));
+}
+
+function addMutate(t, x, data) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, data);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.k;
+ if (x === k) {
+ nt.k = x;
+ nt.v = data;
+ return nt;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (x < k) {
+ var ll = addMutate(l, x, data);
+ nt.l = ll;
+ } else {
+ nt.r = addMutate(r, x, data);
+ }
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+}
+
+function fromArray(xs) {
+ var len = xs.length;
+ if (len === 0) {
+ return ;
+ }
+ var next = Belt__Belt_SortArray.strictlySortedLengthU(xs, (function (param, param$1) {
+ return param[0] < param$1[0];
+ }));
+ var result;
+ if (next >= 0) {
+ result = Belt__Belt_internalAVLtree.fromSortedArrayAux(xs, 0, next);
+ } else {
+ next = -next | 0;
+ result = Belt__Belt_internalAVLtree.fromSortedArrayRevAux(xs, next - 1 | 0, next);
+ }
+ for(var i = next; i < len; ++i){
+ var match = xs[i];
+ result = addMutate(result, match[0], match[1]);
+ }
+ return result;
+}
+
+export {
+ add ,
+ get ,
+ getUndefined ,
+ getExn ,
+ getWithDefault ,
+ has ,
+ remove ,
+ splitAux ,
+ split ,
+ mergeU ,
+ merge ,
+ compareAux ,
+ cmpU ,
+ cmp ,
+ eqAux ,
+ eqU ,
+ eq ,
+ addMutate ,
+ fromArray ,
+}
+/* No side effect */
+`,Rc=`// Generated by Melange
+
+import * as Belt__Belt_SortArray from "./belt_SortArray.js";
+import * as Belt__Belt_internalAVLtree from "./belt_internalAVLtree.js";
+import * as Caml from "melange.js/caml.js";
+import * as Caml_option from "melange.js/caml_option.js";
+import * as Curry from "melange.js/curry.js";
+
+function add(t, x, data) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, data);
+ }
+ var n = Caml_option.valFromOption(t);
+ var k = n.k;
+ if (x === k) {
+ return Belt__Belt_internalAVLtree.updateValue(n, data);
+ }
+ var v = n.v;
+ if (x < k) {
+ return Belt__Belt_internalAVLtree.bal(add(n.l, x, data), k, v, n.r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(n.l, k, v, add(n.r, x, data));
+ }
+}
+
+function get(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return Caml_option.some(n$1.v);
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function getUndefined(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return n$1.v;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function getExn(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n !== undefined) {
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return n$1.v;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function getWithDefault(_n, x, def) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return def;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return n$1.v;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function has(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return false;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ if (x === v) {
+ return true;
+ }
+ _n = x < v ? n$1.l : n$1.r;
+ continue ;
+ };
+}
+
+function remove(n, x) {
+ if (n === undefined) {
+ return n;
+ }
+ var n$1 = Caml_option.valFromOption(n);
+ var v = n$1.k;
+ var l = n$1.l;
+ var r = n$1.r;
+ if (x !== v) {
+ if (x < v) {
+ return Belt__Belt_internalAVLtree.bal(remove(l, x), v, n$1.v, r);
+ } else {
+ return Belt__Belt_internalAVLtree.bal(l, v, n$1.v, remove(r, x));
+ }
+ }
+ if (l === undefined) {
+ return r;
+ }
+ if (r === undefined) {
+ return l;
+ }
+ var rn = Caml_option.valFromOption(r);
+ var kr = {
+ contents: rn.k
+ };
+ var vr = {
+ contents: rn.v
+ };
+ var r$1 = Belt__Belt_internalAVLtree.removeMinAuxWithRef(rn, kr, vr);
+ return Belt__Belt_internalAVLtree.bal(l, kr.contents, vr.contents, r$1);
+}
+
+function splitAux(x, n) {
+ var v = n.k;
+ var d = n.v;
+ var l = n.l;
+ var r = n.r;
+ if (x === v) {
+ return [
+ l,
+ Caml_option.some(d),
+ r
+ ];
+ }
+ if (x < v) {
+ if (l === undefined) {
+ return [
+ undefined,
+ undefined,
+ n
+ ];
+ }
+ var match = splitAux(x, Caml_option.valFromOption(l));
+ return [
+ match[0],
+ match[1],
+ Belt__Belt_internalAVLtree.join(match[2], v, d, r)
+ ];
+ }
+ if (r === undefined) {
+ return [
+ n,
+ undefined,
+ undefined
+ ];
+ }
+ var match$1 = splitAux(x, Caml_option.valFromOption(r));
+ return [
+ Belt__Belt_internalAVLtree.join(l, v, d, match$1[0]),
+ match$1[1],
+ match$1[2]
+ ];
+}
+
+function split(x, n) {
+ if (n !== undefined) {
+ return splitAux(x, n);
+ } else {
+ return [
+ undefined,
+ undefined,
+ undefined
+ ];
+ }
+}
+
+function mergeU(s1, s2, f) {
+ if (s1 !== undefined) {
+ var n = Caml_option.valFromOption(s1);
+ if (n.h >= (
+ s2 !== undefined ? s2.h : 0
+ )) {
+ var v1 = n.k;
+ var d1 = n.v;
+ var l1 = n.l;
+ var r1 = n.r;
+ var match = split(v1, s2);
+ return Belt__Belt_internalAVLtree.concatOrJoin(mergeU(l1, match[0], f), v1, f(v1, Caml_option.some(d1), match[1]), mergeU(r1, match[2], f));
+ }
+
+ } else if (s2 === undefined) {
+ return ;
+ }
+ var n$1 = Caml_option.valFromOption(s2);
+ var v2 = n$1.k;
+ var d2 = n$1.v;
+ var l2 = n$1.l;
+ var r2 = n$1.r;
+ var match$1 = split(v2, s1);
+ return Belt__Belt_internalAVLtree.concatOrJoin(mergeU(match$1[0], l2, f), v2, f(v2, match$1[1], Caml_option.some(d2)), mergeU(match$1[2], r2, f));
+}
+
+function merge(s1, s2, f) {
+ return mergeU(s1, s2, Curry.__3(f));
+}
+
+function compareAux(_e1, _e2, vcmp) {
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return 0;
+ }
+ if (!e2) {
+ return 0;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ var c = Caml.caml_string_compare(h1.k, h2.k);
+ if (c !== 0) {
+ return c;
+ }
+ var cx = vcmp(h1.v, h2.v);
+ if (cx !== 0) {
+ return cx;
+ }
+ _e2 = Belt__Belt_internalAVLtree.stackAllLeft(h2.r, e2.tl);
+ _e1 = Belt__Belt_internalAVLtree.stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+}
+
+function cmpU(s1, s2, cmp) {
+ var len1 = Belt__Belt_internalAVLtree.size(s1);
+ var len2 = Belt__Belt_internalAVLtree.size(s2);
+ if (len1 === len2) {
+ return compareAux(Belt__Belt_internalAVLtree.stackAllLeft(s1, /* [] */0), Belt__Belt_internalAVLtree.stackAllLeft(s2, /* [] */0), cmp);
+ } else if (len1 < len2) {
+ return -1;
+ } else {
+ return 1;
+ }
+}
+
+function cmp(s1, s2, f) {
+ return cmpU(s1, s2, Curry.__2(f));
+}
+
+function eqAux(_e1, _e2, eq) {
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return true;
+ }
+ if (!e2) {
+ return true;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ if (!(h1.k === h2.k && eq(h1.v, h2.v))) {
+ return false;
+ }
+ _e2 = Belt__Belt_internalAVLtree.stackAllLeft(h2.r, e2.tl);
+ _e1 = Belt__Belt_internalAVLtree.stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+}
+
+function eqU(s1, s2, eq) {
+ var len1 = Belt__Belt_internalAVLtree.size(s1);
+ var len2 = Belt__Belt_internalAVLtree.size(s2);
+ if (len1 === len2) {
+ return eqAux(Belt__Belt_internalAVLtree.stackAllLeft(s1, /* [] */0), Belt__Belt_internalAVLtree.stackAllLeft(s2, /* [] */0), eq);
+ } else {
+ return false;
+ }
+}
+
+function eq(s1, s2, f) {
+ return eqU(s1, s2, Curry.__2(f));
+}
+
+function addMutate(t, x, data) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLtree.singleton(x, data);
+ }
+ var nt = Caml_option.valFromOption(t);
+ var k = nt.k;
+ if (x === k) {
+ nt.k = x;
+ nt.v = data;
+ return nt;
+ }
+ var l = nt.l;
+ var r = nt.r;
+ if (x < k) {
+ var ll = addMutate(l, x, data);
+ nt.l = ll;
+ } else {
+ nt.r = addMutate(r, x, data);
+ }
+ return Belt__Belt_internalAVLtree.balMutate(nt);
+}
+
+function fromArray(xs) {
+ var len = xs.length;
+ if (len === 0) {
+ return ;
+ }
+ var next = Belt__Belt_SortArray.strictlySortedLengthU(xs, (function (param, param$1) {
+ return param[0] < param$1[0];
+ }));
+ var result;
+ if (next >= 0) {
+ result = Belt__Belt_internalAVLtree.fromSortedArrayAux(xs, 0, next);
+ } else {
+ next = -next | 0;
+ result = Belt__Belt_internalAVLtree.fromSortedArrayRevAux(xs, next - 1 | 0, next);
+ }
+ for(var i = next; i < len; ++i){
+ var match = xs[i];
+ result = addMutate(result, match[0], match[1]);
+ }
+ return result;
+}
+
+export {
+ add ,
+ get ,
+ getUndefined ,
+ getExn ,
+ getWithDefault ,
+ has ,
+ remove ,
+ splitAux ,
+ split ,
+ mergeU ,
+ merge ,
+ compareAux ,
+ cmpU ,
+ cmp ,
+ eqAux ,
+ eqU ,
+ eq ,
+ addMutate ,
+ fromArray ,
+}
+/* No side effect */
+`,Vc=`// Generated by Melange
+
+import * as Belt__Belt_Array from "./belt_Array.js";
+import * as Curry from "melange.js/curry.js";
+
+function copyAuxCont(_c, _prec) {
+ while(true) {
+ var prec = _prec;
+ var c = _c;
+ if (c === undefined) {
+ return ;
+ }
+ var ncopy = {
+ key: c.key,
+ next: undefined
+ };
+ prec.next = ncopy;
+ _prec = ncopy;
+ _c = c.next;
+ continue ;
+ };
+}
+
+function copyBucket(c) {
+ if (c === undefined) {
+ return c;
+ }
+ var head = {
+ key: c.key,
+ next: undefined
+ };
+ copyAuxCont(c.next, head);
+ return head;
+}
+
+function copyBuckets(buckets) {
+ var len = buckets.length;
+ var newBuckets = new Array(len);
+ for(var i = 0; i < len; ++i){
+ newBuckets[i] = copyBucket(buckets[i]);
+ }
+ return newBuckets;
+}
+
+function copy(x) {
+ return {
+ size: x.size,
+ buckets: copyBuckets(x.buckets),
+ hash: x.hash,
+ eq: x.eq
+ };
+}
+
+function bucketLength(_accu, _buckets) {
+ while(true) {
+ var buckets = _buckets;
+ var accu = _accu;
+ if (buckets === undefined) {
+ return accu;
+ }
+ _buckets = buckets.next;
+ _accu = accu + 1 | 0;
+ continue ;
+ };
+}
+
+function doBucketIter(f, _buckets) {
+ while(true) {
+ var buckets = _buckets;
+ if (buckets === undefined) {
+ return ;
+ }
+ f(buckets.key);
+ _buckets = buckets.next;
+ continue ;
+ };
+}
+
+function forEachU(h, f) {
+ var d = h.buckets;
+ for(var i = 0 ,i_finish = d.length; i < i_finish; ++i){
+ doBucketIter(f, d[i]);
+ }
+}
+
+function forEach(h, f) {
+ forEachU(h, Curry.__1(f));
+}
+
+function fillArray(_i, arr, _cell) {
+ while(true) {
+ var cell = _cell;
+ var i = _i;
+ arr[i] = cell.key;
+ var v = cell.next;
+ if (v === undefined) {
+ return i + 1 | 0;
+ }
+ _cell = v;
+ _i = i + 1 | 0;
+ continue ;
+ };
+}
+
+function toArray(h) {
+ var d = h.buckets;
+ var current = 0;
+ var arr = new Array(h.size);
+ for(var i = 0 ,i_finish = d.length; i < i_finish; ++i){
+ var cell = d[i];
+ if (cell !== undefined) {
+ current = fillArray(current, arr, cell);
+ }
+
+ }
+ return arr;
+}
+
+function doBucketFold(f, _b, _accu) {
+ while(true) {
+ var accu = _accu;
+ var b = _b;
+ if (b === undefined) {
+ return accu;
+ }
+ _accu = f(accu, b.key);
+ _b = b.next;
+ continue ;
+ };
+}
+
+function reduceU(h, init, f) {
+ var d = h.buckets;
+ var accu = init;
+ for(var i = 0 ,i_finish = d.length; i < i_finish; ++i){
+ accu = doBucketFold(f, d[i], accu);
+ }
+ return accu;
+}
+
+function reduce(h, init, f) {
+ return reduceU(h, init, Curry.__2(f));
+}
+
+function getMaxBucketLength(h) {
+ return Belt__Belt_Array.reduceU(h.buckets, 0, (function (m, b) {
+ var len = bucketLength(0, b);
+ if (m > len) {
+ return m;
+ } else {
+ return len;
+ }
+ }));
+}
+
+function getBucketHistogram(h) {
+ var mbl = getMaxBucketLength(h);
+ var histo = Belt__Belt_Array.makeByU(mbl + 1 | 0, (function (param) {
+ return 0;
+ }));
+ Belt__Belt_Array.forEachU(h.buckets, (function (b) {
+ var l = bucketLength(0, b);
+ histo[l] = histo[l] + 1 | 0;
+ }));
+ return histo;
+}
+
+function logStats(h) {
+ var histogram = getBucketHistogram(h);
+ console.log({
+ bindings: h.size,
+ buckets: h.buckets.length,
+ histogram: histogram
+ });
+}
+
+export {
+ copy ,
+ forEachU ,
+ forEach ,
+ fillArray ,
+ toArray ,
+ reduceU ,
+ reduce ,
+ logStats ,
+ getBucketHistogram ,
+}
+/* No side effect */
+`,qc=`// Generated by Melange
+
+import * as Belt__Belt_SortArrayInt from "./belt_SortArrayInt.js";
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function has(_t, x) {
+ while(true) {
+ var t = _t;
+ if (t === undefined) {
+ return false;
+ }
+ var n = Caml_option.valFromOption(t);
+ var v = n.v;
+ if (x === v) {
+ return true;
+ }
+ _t = x < v ? n.l : n.r;
+ continue ;
+ };
+}
+
+function compareAux(_e1, _e2) {
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return 0;
+ }
+ if (!e2) {
+ return 0;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ var k1 = h1.v;
+ var k2 = h2.v;
+ if (k1 !== k2) {
+ if (k1 < k2) {
+ return -1;
+ } else {
+ return 1;
+ }
+ }
+ _e2 = Belt__Belt_internalAVLset.stackAllLeft(h2.r, e2.tl);
+ _e1 = Belt__Belt_internalAVLset.stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+}
+
+function cmp(s1, s2) {
+ var len1 = Belt__Belt_internalAVLset.size(s1);
+ var len2 = Belt__Belt_internalAVLset.size(s2);
+ if (len1 === len2) {
+ return compareAux(Belt__Belt_internalAVLset.stackAllLeft(s1, /* [] */0), Belt__Belt_internalAVLset.stackAllLeft(s2, /* [] */0));
+ } else if (len1 < len2) {
+ return -1;
+ } else {
+ return 1;
+ }
+}
+
+function eq(s1, s2) {
+ return cmp(s1, s2) === 0;
+}
+
+function subset(_s1, _s2) {
+ while(true) {
+ var s2 = _s2;
+ var s1 = _s1;
+ if (s1 === undefined) {
+ return true;
+ }
+ if (s2 === undefined) {
+ return false;
+ }
+ var t2 = Caml_option.valFromOption(s2);
+ var t1 = Caml_option.valFromOption(s1);
+ var v1 = t1.v;
+ var l1 = t1.l;
+ var r1 = t1.r;
+ var v2 = t2.v;
+ var l2 = t2.l;
+ var r2 = t2.r;
+ if (v1 === v2) {
+ if (!subset(l1, l2)) {
+ return false;
+ }
+ _s2 = r2;
+ _s1 = r1;
+ continue ;
+ }
+ if (v1 < v2) {
+ if (!subset(Belt__Belt_internalAVLset.create(l1, v1, undefined), l2)) {
+ return false;
+ }
+ _s1 = r1;
+ continue ;
+ }
+ if (!subset(Belt__Belt_internalAVLset.create(undefined, v1, r1), r2)) {
+ return false;
+ }
+ _s1 = l1;
+ continue ;
+ };
+}
+
+function get(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ if (x === v) {
+ return v;
+ }
+ _n = x < v ? t.l : t.r;
+ continue ;
+ };
+}
+
+function getUndefined(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ if (x === v) {
+ return v;
+ }
+ _n = x < v ? t.l : t.r;
+ continue ;
+ };
+}
+
+function getExn(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n !== undefined) {
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ if (x === v) {
+ return v;
+ }
+ _n = x < v ? t.l : t.r;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function addMutate(t, x) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLset.singleton(x);
+ }
+ var k = t.v;
+ if (x === k) {
+ return t;
+ }
+ var l = t.l;
+ var r = t.r;
+ if (x < k) {
+ t.l = addMutate(l, x);
+ } else {
+ t.r = addMutate(r, x);
+ }
+ return Belt__Belt_internalAVLset.balMutate(t);
+}
+
+function fromArray(xs) {
+ var len = xs.length;
+ if (len === 0) {
+ return ;
+ }
+ var next = Belt__Belt_SortArrayInt.strictlySortedLength(xs);
+ var result;
+ if (next >= 0) {
+ result = Belt__Belt_internalAVLset.fromSortedArrayAux(xs, 0, next);
+ } else {
+ next = -next | 0;
+ result = Belt__Belt_internalAVLset.fromSortedArrayRevAux(xs, next - 1 | 0, next);
+ }
+ for(var i = next; i < len; ++i){
+ result = addMutate(result, xs[i]);
+ }
+ return result;
+}
+
+export {
+ has ,
+ compareAux ,
+ cmp ,
+ eq ,
+ subset ,
+ get ,
+ getUndefined ,
+ getExn ,
+ addMutate ,
+ fromArray ,
+}
+/* No side effect */
+`,Gc=`// Generated by Melange
+
+import * as Belt__Belt_SortArrayString from "./belt_SortArrayString.js";
+import * as Belt__Belt_internalAVLset from "./belt_internalAVLset.js";
+import * as Caml_option from "melange.js/caml_option.js";
+
+function has(_t, x) {
+ while(true) {
+ var t = _t;
+ if (t === undefined) {
+ return false;
+ }
+ var n = Caml_option.valFromOption(t);
+ var v = n.v;
+ if (x === v) {
+ return true;
+ }
+ _t = x < v ? n.l : n.r;
+ continue ;
+ };
+}
+
+function compareAux(_e1, _e2) {
+ while(true) {
+ var e2 = _e2;
+ var e1 = _e1;
+ if (!e1) {
+ return 0;
+ }
+ if (!e2) {
+ return 0;
+ }
+ var h2 = e2.hd;
+ var h1 = e1.hd;
+ var k1 = h1.v;
+ var k2 = h2.v;
+ if (k1 !== k2) {
+ if (k1 < k2) {
+ return -1;
+ } else {
+ return 1;
+ }
+ }
+ _e2 = Belt__Belt_internalAVLset.stackAllLeft(h2.r, e2.tl);
+ _e1 = Belt__Belt_internalAVLset.stackAllLeft(h1.r, e1.tl);
+ continue ;
+ };
+}
+
+function cmp(s1, s2) {
+ var len1 = Belt__Belt_internalAVLset.size(s1);
+ var len2 = Belt__Belt_internalAVLset.size(s2);
+ if (len1 === len2) {
+ return compareAux(Belt__Belt_internalAVLset.stackAllLeft(s1, /* [] */0), Belt__Belt_internalAVLset.stackAllLeft(s2, /* [] */0));
+ } else if (len1 < len2) {
+ return -1;
+ } else {
+ return 1;
+ }
+}
+
+function eq(s1, s2) {
+ return cmp(s1, s2) === 0;
+}
+
+function subset(_s1, _s2) {
+ while(true) {
+ var s2 = _s2;
+ var s1 = _s1;
+ if (s1 === undefined) {
+ return true;
+ }
+ if (s2 === undefined) {
+ return false;
+ }
+ var t2 = Caml_option.valFromOption(s2);
+ var t1 = Caml_option.valFromOption(s1);
+ var v1 = t1.v;
+ var l1 = t1.l;
+ var r1 = t1.r;
+ var v2 = t2.v;
+ var l2 = t2.l;
+ var r2 = t2.r;
+ if (v1 === v2) {
+ if (!subset(l1, l2)) {
+ return false;
+ }
+ _s2 = r2;
+ _s1 = r1;
+ continue ;
+ }
+ if (v1 < v2) {
+ if (!subset(Belt__Belt_internalAVLset.create(l1, v1, undefined), l2)) {
+ return false;
+ }
+ _s1 = r1;
+ continue ;
+ }
+ if (!subset(Belt__Belt_internalAVLset.create(undefined, v1, r1), r2)) {
+ return false;
+ }
+ _s1 = l1;
+ continue ;
+ };
+}
+
+function get(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ if (x === v) {
+ return v;
+ }
+ _n = x < v ? t.l : t.r;
+ continue ;
+ };
+}
+
+function getUndefined(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n === undefined) {
+ return ;
+ }
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ if (x === v) {
+ return v;
+ }
+ _n = x < v ? t.l : t.r;
+ continue ;
+ };
+}
+
+function getExn(_n, x) {
+ while(true) {
+ var n = _n;
+ if (n !== undefined) {
+ var t = Caml_option.valFromOption(n);
+ var v = t.v;
+ if (x === v) {
+ return v;
+ }
+ _n = x < v ? t.l : t.r;
+ continue ;
+ }
+ throw {
+ MEL_EXN_ID: "Not_found",
+ Error: new Error()
+ };
+ };
+}
+
+function addMutate(t, x) {
+ if (t === undefined) {
+ return Belt__Belt_internalAVLset.singleton(x);
+ }
+ var k = t.v;
+ if (x === k) {
+ return t;
+ }
+ var l = t.l;
+ var r = t.r;
+ if (x < k) {
+ t.l = addMutate(l, x);
+ } else {
+ t.r = addMutate(r, x);
+ }
+ return Belt__Belt_internalAVLset.balMutate(t);
+}
+
+function fromArray(xs) {
+ var len = xs.length;
+ if (len === 0) {
+ return ;
+ }
+ var next = Belt__Belt_SortArrayString.strictlySortedLength(xs);
+ var result;
+ if (next >= 0) {
+ result = Belt__Belt_internalAVLset.fromSortedArrayAux(xs, 0, next);
+ } else {
+ next = -next | 0;
+ result = Belt__Belt_internalAVLset.fromSortedArrayRevAux(xs, next - 1 | 0, next);
+ }
+ for(var i = next; i < len; ++i){
+ result = addMutate(result, xs[i]);
+ }
+ return result;
+}
+
+export {
+ has ,
+ compareAux ,
+ cmp ,
+ eq ,
+ subset ,
+ get ,
+ getUndefined ,
+ getExn ,
+ addMutate ,
+ fromArray ,
+}
+/* No side effect */
+`,Xc=`// Generated by Melange
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
+`,Wc=`// Generated by Melange
+
+
+var Dom__ = {};
+
+export {
+ Dom__ ,
+}
+/* No side effect */
+`,Hc=`// Generated by Melange
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
+`,Kc=`// Generated by Melange
+/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
+`,Jc=`// Generated by Melange
function caml_int_compare(x, y) {
@@ -212,7 +15354,7 @@ export {
i64_max ,
}
/* No side effect */
-`,rc=`// Generated by Melange
+`,Yc=`// Generated by Melange
function sub(x, offset, len) {
@@ -334,9 +15476,9 @@ export {
set ,
}
/* No side effect */
-`,ac=`// Generated by Melange
+`,Zc=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,ic=`// Generated by Melange
+`,Qc=`// Generated by Melange
import * as Js__Caml_int64 from "./caml_int64.js";
@@ -740,7 +15882,7 @@ export {
set64 ,
}
/* No side effect */
-`,sc=`// Generated by Melange
+`,nu=`// Generated by Melange
var id = {
@@ -785,7 +15927,7 @@ export {
caml_exn_slot_id ,
}
/* No side effect */
-`,oc=`// Generated by Melange
+`,eu=`// Generated by Melange
var getGlobalThis = (function(){
@@ -817,7 +15959,7 @@ export {
register ,
}
/* No side effect */
-`,_c=`// Generated by Melange
+`,tu=`// Generated by Melange
var caml_int32_float_of_bits = (function(x){
@@ -951,9 +16093,9 @@ export {
caml_log10_float ,
}
/* No side effect */
-`,lc=`// Generated by Melange
+`,ru=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,cc=`// Generated by Melange
+`,au=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_int64 from "melange.js/caml_int64.js";
@@ -1784,7 +16926,7 @@ export {
caml_nativeint_of_string ,
}
/* No side effect */
-`,uc=`// Generated by Melange
+`,iu=`// Generated by Melange
function caml_gc_counters(param) {
@@ -1839,7 +16981,7 @@ export {
caml_final_release ,
}
/* No side effect */
-`,fc=`// Generated by Melange
+`,su=`// Generated by Melange
import * as Js__Caml_hash_primitive from "./caml_hash_primitive.js";
@@ -1944,7 +17086,7 @@ export {
caml_hash ,
}
/* No side effect */
-`,mc=`// Generated by Melange
+`,ou=`// Generated by Melange
function rotl32(x, n) {
@@ -1995,7 +17137,7 @@ export {
caml_hash_final_mix ,
}
/* No side effect */
-`,dc=`// Generated by Melange
+`,lu=`// Generated by Melange
function div(x, y) {
@@ -2023,7 +17165,7 @@ export {
mod_ ,
}
/* No side effect */
-`,pc=`// Generated by Melange
+`,_u=`// Generated by Melange
var Ops = {};
@@ -2032,7 +17174,7 @@ export {
Ops ,
}
/* No side effect */
-`,hc=`// Generated by Melange
+`,cu=`// Generated by Melange
import * as Js__Caml from "./caml.js";
@@ -2630,9 +17772,9 @@ export {
to_string ,
}
/* No side effect */
-`,gc=`// Generated by Melange
+`,uu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,bc=`// Generated by Melange
+`,fu=`// Generated by Melange
var stdout = {
@@ -2714,7 +17856,7 @@ export {
caml_ml_out_channels_list ,
}
/* No side effect */
-`,vc=`// Generated by Melange
+`,du=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Caml_option from "melange.js/caml_option.js";
@@ -2746,7 +17888,7 @@ export {
caml_as_js_exn ,
}
/* No side effect */
-`,yc=`// Generated by Melange
+`,mu=`// Generated by Melange
/***********************************************************************/
@@ -3004,7 +18146,7 @@ export {
caml_new_lex_engine ,
}
/* Not a pure module */
-`,xc=`// Generated by Melange
+`,pu=`// Generated by Melange
function cmn(q, a, b, x, s, t) {
@@ -3172,7 +18314,7 @@ export {
caml_md5_string ,
}
/* No side effect */
-`,$c=`// Generated by Melange
+`,hu=`// Generated by Melange
import * as Js__Caml_obj from "./caml_obj.js";
@@ -3289,9 +18431,9 @@ export {
update_mod ,
}
/* No side effect */
-`,Ec=`// Generated by Melange
+`,vu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,kc=`// Generated by Melange
+`,gu=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
@@ -3729,7 +18871,7 @@ export {
caml_max ,
}
/* No side effect */
-`,wc=`// Generated by Melange
+`,bu=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Js__Caml_exceptions from "./caml_exceptions.js";
@@ -3778,7 +18920,7 @@ export {
caml_set_oo_id ,
}
/* No side effect */
-`,Cc=`// Generated by Melange
+`,yu=`// Generated by Melange
import * as Js__Caml_oo from "./caml_oo.js";
import * as Js__Curry from "./curry.js";
@@ -3832,7 +18974,7 @@ export {
js8 ,
}
/* No side effect */
-`,Sc=`// Generated by Melange
+`,xu=`// Generated by Melange
function isNested(x) {
@@ -3918,7 +19060,7 @@ export {
option_unwrap ,
}
/* No side effect */
-`,Ac=`// Generated by Melange
+`,ku=`// Generated by Melange
/***********************************************************************/
@@ -4221,7 +19363,7 @@ export {
caml_set_parser_trace ,
}
/* Not a pure module */
-`,Ic=`// Generated by Melange
+`,$u=`// Generated by Melange
var spliceApply = (function(fn,args){
@@ -4273,7 +19415,7 @@ export {
spliceObjApply ,
}
/* No side effect */
-`,Nc=`// Generated by Melange
+`,Eu=`// Generated by Melange
function get(s, i) {
@@ -4296,9 +19438,9 @@ export {
make ,
}
/* No side effect */
-`,Tc=`// Generated by Melange
+`,Cu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,jc=`// Generated by Melange
+`,wu=`// Generated by Melange
function caml_sys_getenv(s) {
@@ -4406,9 +19548,9 @@ export {
caml_sys_file_exists ,
}
/* No side effect */
-`,Lc=`// Generated by Melange
+`,Au=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Mc=`// Generated by Melange
+`,Su=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
@@ -4934,7 +20076,7 @@ export {
__8 ,
}
/* No side effect */
-`,Dc=`// Generated by Melange
+`,Bu=`// Generated by Melange
import * as Js__Js_OO from "./js_OO.js";
import * as Js__Js_internal from "./js_internal.js";
@@ -4958,7 +20100,7 @@ export {
Private ,
}
/* No side effect */
-`,Pc=`// Generated by Melange
+`,Iu=`// Generated by Melange
var Callback = {};
@@ -4973,7 +20115,7 @@ export {
Internal ,
}
/* No side effect */
-`,Oc=`// Generated by Melange
+`,Lu=`// Generated by Melange
var Js__ = {};
@@ -4982,15 +20124,15 @@ export {
Js__ ,
}
/* No side effect */
-`,zc=`// Generated by Melange
+`,Nu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Bc=`// Generated by Melange
+`,Mu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Fc=`// Generated by Melange
+`,ju=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Gc=`// Generated by Melange
+`,Tu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Rc=`// Generated by Melange
+`,Du=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
@@ -5075,7 +20217,7 @@ export {
map ,
}
/* No side effect */
-`,qc=`// Generated by Melange
+`,Ou=`// Generated by Melange
import * as Js__Caml_js_exceptions from "./caml_js_exceptions.js";
@@ -5123,11 +20265,11 @@ export {
raiseUriError ,
}
/* No side effect */
-`,Vc=`// Generated by Melange
+`,zu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Xc=`// Generated by Melange
+`,Fu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Uc=`// Generated by Melange
+`,Pu=`// Generated by Melange
function equal(x, y) {
@@ -5144,7 +20286,7 @@ export {
min ,
}
/* No side effect */
-`,Hc=`// Generated by Melange
+`,Uu=`// Generated by Melange
var Fn = {};
@@ -5156,7 +20298,7 @@ export {
Internal ,
}
/* No side effect */
-`,Wc=`// Generated by Melange
+`,Ru=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
@@ -5328,9 +20470,9 @@ export {
serializeExn ,
}
/* No side effect */
-`,Jc=`// Generated by Melange
+`,Vu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,Kc=`// Generated by Melange
+`,qu=`// Generated by Melange
function raiseWhenNotFound(x) {
@@ -5384,7 +20526,7 @@ export {
fromIntAssert ,
}
/* No side effect */
-`,Yc=`// Generated by Melange
+`,Gu=`// Generated by Melange
import * as Js__Js_int from "./js_int.js";
@@ -5418,7 +20560,7 @@ export {
random_int ,
}
/* No side effect */
-`,Zc=`// Generated by Melange
+`,Xu=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
@@ -5459,7 +20601,7 @@ export {
fromOption ,
}
/* No side effect */
-`,Qc=`// Generated by Melange
+`,Wu=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
@@ -5491,15 +20633,15 @@ export {
fromOption ,
}
/* No side effect */
-`,nu=`// Generated by Melange
+`,Hu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,tu=`// Generated by Melange
+`,Ku=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,eu=`// Generated by Melange
+`,Ju=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,ru=`// Generated by Melange
+`,Yu=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,au=`// Generated by Melange
+`,Zu=`// Generated by Melange
var $$ArrayBuffer = {};
@@ -5538,7 +20680,7 @@ export {
$$DataView ,
}
/* No side effect */
-`,iu=`// Generated by Melange
+`,Qu=`// Generated by Melange
function classify(x) {
@@ -5615,7 +20757,7 @@ export {
classify ,
}
/* No side effect */
-`,su=`// Generated by Melange
+`,nf=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
@@ -5659,11 +20801,11 @@ export {
fromOption ,
}
/* No side effect */
-`,ou=`// Generated by Melange
+`,ef=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,_u=`// Generated by Melange
+`,tf=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,lu=`// Generated by Melange
+`,rf=`// Generated by Melange
var Obj = {};
@@ -5675,7 +20817,7 @@ export {
Pervasives ,
}
/* No side effect */
-`,cu=`// Generated by Melange
+`,af=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_bytes from "melange.js/caml_bytes.js";
@@ -6702,7 +21844,7 @@ export {
write_arg0 ,
}
/* No side effect */
-`,uu=`// Generated by Melange
+`,sf=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -7488,7 +22630,7 @@ export {
Floatarray ,
}
/* No side effect */
-`,fu=`// Generated by Melange
+`,of=`// Generated by Melange
import * as Stdlib__Array from "./array.js";
@@ -7615,7 +22757,7 @@ export {
Floatarray ,
}
/* No side effect */
-`,mu=`// Generated by Melange
+`,lf=`// Generated by Melange
import * as CamlinternalAtomic from "./camlinternalAtomic.js";
@@ -7646,7 +22788,7 @@ export {
decr ,
}
/* No side effect */
-`,du=`// Generated by Melange
+`,_f=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_hash from "melange.js/caml_hash.js";
@@ -7704,7 +22846,7 @@ export {
hash ,
}
/* No side effect */
-`,pu=`// Generated by Melange
+`,cf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_string from "melange.js/caml_string.js";
@@ -8324,7 +23466,7 @@ export {
add_int64_le ,
}
/* No side effect */
-`,hu=`// Generated by Melange
+`,uf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_js_exceptions from "melange.js/caml_js_exceptions.js";
@@ -9920,7 +25062,7 @@ export {
unsafe_escape ,
}
/* No side effect */
-`,gu=`// Generated by Melange
+`,ff=`// Generated by Melange
import * as Stdlib__Bytes from "./bytes.js";
@@ -10188,7 +25330,7 @@ export {
unsafe_escape ,
}
/* No side effect */
-`,bu=`// Generated by Melange
+`,df=`// Generated by Melange
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
import * as Stdlib__Obj from "./obj.js";
@@ -10207,7 +25349,7 @@ export {
register_exception ,
}
/* No side effect */
-`,vu=`// Generated by Melange
+`,mf=`// Generated by Melange
function make(v) {
@@ -10265,7 +25407,7 @@ export {
decr ,
}
/* No side effect */
-`,yu=`// Generated by Melange
+`,pf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -17760,7 +32902,7 @@ export {
recast ,
}
/* No side effect */
-`,xu=`// Generated by Melange
+`,hf=`// Generated by Melange
function erase_rel(param) {
@@ -18110,7 +33252,7 @@ export {
concat_fmt ,
}
/* No side effect */
-`,$u=`// Generated by Melange
+`,vf=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -18179,9 +33321,9 @@ export {
is_val ,
}
/* No side effect */
-`,Eu=`// Generated by Melange
+`,gf=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,ku=`// Generated by Melange
+`,bf=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_array from "melange.js/caml_array.js";
@@ -19469,7 +34611,7 @@ export {
stats ,
}
/* Vars Not a pure module */
-`,wu=`// Generated by Melange
+`,yf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_hash from "melange.js/caml_hash.js";
@@ -19588,7 +34730,7 @@ export {
hash ,
}
/* No side effect */
-`,Cu=`// Generated by Melange
+`,xf=`// Generated by Melange
import * as Caml_float from "melange.js/caml_float.js";
@@ -19752,7 +34894,7 @@ export {
pow ,
}
/* No side effect */
-`,Su=`// Generated by Melange
+`,kf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
@@ -19894,7 +35036,7 @@ export {
from_hex ,
}
/* No side effect */
-`,Au=`// Generated by Melange
+`,$f=`// Generated by Melange
import * as Caml_js_exceptions from "melange.js/caml_js_exceptions.js";
import * as Caml_option from "melange.js/caml_option.js";
@@ -20193,7 +35335,7 @@ export {
DLS ,
}
/* Stdlib__Fun Not a pure module */
-`,Iu=`// Generated by Melange
+`,Ef=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
import * as Curry from "melange.js/curry.js";
@@ -20336,7 +35478,7 @@ export {
compare ,
}
/* No side effect */
-`,Nu=`// Generated by Melange
+`,Cf=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_js_exceptions from "melange.js/caml_js_exceptions.js";
@@ -23535,7 +38677,7 @@ export {
Kn ,
}
/* Stdlib__Hashtbl Not a pure module */
-`,Tu=`// Generated by Melange
+`,wf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
@@ -24337,7 +39479,7 @@ export {
quote_command$2 as quote_command,
}
/* temp_dir_name Not a pure module */
-`,ju=`// Generated by Melange
+`,Af=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_array from "melange.js/caml_array.js";
@@ -25248,7 +40390,7 @@ export {
$$Array ,
}
/* nan Not a pure module */
-`,Lu=`// Generated by Melange
+`,Sf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -27412,7 +42554,7 @@ export {
kasprintf ,
}
/* blank_line Not a pure module */
-`,Mu=`// Generated by Melange
+`,Bf=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
@@ -27480,7 +42622,7 @@ export {
Finally_raised ,
}
/* Not a pure module */
-`,Du=`// Generated by Melange
+`,If=`// Generated by Melange
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
import * as Curry from "melange.js/curry.js";
@@ -27978,7 +43120,7 @@ export {
Memprof ,
}
/* Stdlib__Fun Not a pure module */
-`,Pu=`// Generated by Melange
+`,Lf=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_hash from "melange.js/caml_hash.js";
@@ -29315,7 +44457,7 @@ export {
seeded_hash_param ,
}
/* randomized Not a pure module */
-`,Ou=`// Generated by Melange
+`,Nf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
@@ -29642,7 +44784,7 @@ export {
isatty ,
}
/* Stdlib__Fun Not a pure module */
-`,zu=`// Generated by Melange
+`,Mf=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_format from "melange.js/caml_format.js";
@@ -29721,7 +44863,7 @@ export {
hash ,
}
/* No side effect */
-`,Bu=`// Generated by Melange
+`,jf=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_format from "melange.js/caml_format.js";
@@ -29882,7 +45024,7 @@ export {
hash ,
}
/* unsigned_to_int Not a pure module */
-`,Fu=`// Generated by Melange
+`,Tf=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_format from "melange.js/caml_format.js";
@@ -30026,7 +45168,7 @@ export {
hash ,
}
/* No side effect */
-`,Gu=`// Generated by Melange
+`,Df=`// Generated by Melange
import * as CamlinternalLazy from "./camlinternalLazy.js";
import * as Curry from "melange.js/curry.js";
@@ -30088,7 +45230,7 @@ export {
force_val ,
}
/* No side effect */
-`,Ru=`// Generated by Melange
+`,Of=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_bytes from "melange.js/caml_bytes.js";
@@ -30348,7 +45490,7 @@ export {
new_engine ,
}
/* No side effect */
-`,qu=`// Generated by Melange
+`,zf=`// Generated by Melange
import * as Caml_obj from "melange.js/caml_obj.js";
import * as Caml_option from "melange.js/caml_option.js";
@@ -32695,7 +47837,7 @@ export {
of_seq ,
}
/* No side effect */
-`,Vu=`// Generated by Melange
+`,Ff=`// Generated by Melange
import * as Stdlib__List from "./list.js";
@@ -32897,7 +48039,7 @@ export {
of_seq ,
}
/* No side effect */
-`,Xu=`// Generated by Melange
+`,Pf=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
import * as Curry from "melange.js/curry.js";
@@ -33984,7 +49126,7 @@ export {
Make ,
}
/* No side effect */
-`,Uu=`// Generated by Melange
+`,Uf=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
@@ -34084,7 +49226,7 @@ export {
compression_supported ,
}
/* No side effect */
-`,Hu=`// Generated by Melange
+`,Rf=`// Generated by Melange
import * as Stdlib__Hashtbl from "./hashtbl.js";
import * as Stdlib__Map from "./map.js";
@@ -34102,7 +49244,7 @@ export {
$$Set ,
}
/* Stdlib__Hashtbl Not a pure module */
-`,Wu=`// Generated by Melange
+`,Vf=`// Generated by Melange
import * as Curry from "melange.js/curry.js";
@@ -34151,7 +49293,7 @@ export {
protect ,
}
/* No side effect */
-`,Ju=`// Generated by Melange
+`,qf=`// Generated by Melange
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
import * as Stdlib__Sys from "./sys.js";
@@ -34378,7 +49520,7 @@ export {
Ephemeron ,
}
/* No side effect */
-`,Ku=`// Generated by Melange
+`,Gf=`// Generated by Melange
import * as CamlinternalOO from "./camlinternalOO.js";
@@ -34394,7 +49536,7 @@ export {
public_method_label ,
}
/* CamlinternalOO Not a pure module */
-`,Yu=`// Generated by Melange
+`,Xf=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
import * as Curry from "melange.js/curry.js";
@@ -34549,7 +49691,7 @@ export {
to_seq ,
}
/* No side effect */
-`,Zu=`// Generated by Melange
+`,Wf=`// Generated by Melange
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
import * as Curry from "melange.js/curry.js";
@@ -34657,7 +49799,7 @@ export {
isatty ,
}
/* Stdlib__Fun Not a pure module */
-`,Qu=`// Generated by Melange
+`,Hf=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -34894,7 +50036,7 @@ export {
parse_error ,
}
/* No side effect */
-`,nf=`// Generated by Melange
+`,Kf=`// Generated by Melange
import * as Caml_array from "melange.js/caml_array.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -35456,7 +50598,7 @@ export {
exn_slot_name ,
}
/* printers Not a pure module */
-`,tf=`// Generated by Melange
+`,Jf=`// Generated by Melange
import * as CamlinternalFormat from "./camlinternalFormat.js";
import * as Curry from "melange.js/curry.js";
@@ -35548,7 +50690,7 @@ export {
kprintf ,
}
/* No side effect */
-`,ef=`// Generated by Melange
+`,Yf=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Caml_option from "melange.js/caml_option.js";
@@ -35796,7 +50938,7 @@ export {
of_seq ,
}
/* No side effect */
-`,rf=`// Generated by Melange
+`,Zf=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_array from "melange.js/caml_array.js";
@@ -36151,7 +51293,7 @@ export {
set_state ,
}
/* Stdlib__Int32 Not a pure module */
-`,af=`// Generated by Melange
+`,Qf=`// Generated by Melange
import * as Caml_option from "melange.js/caml_option.js";
import * as Curry from "melange.js/curry.js";
@@ -36356,7 +51498,7 @@ export {
to_seq ,
}
/* No side effect */
-`,sf=`// Generated by Melange
+`,nd=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -38592,7 +53734,7 @@ export {
unescaped ,
}
/* stdin Not a pure module */
-`,of=`// Generated by Melange
+`,ed=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Caml_option from "melange.js/caml_option.js";
@@ -39795,7 +54937,7 @@ export {
ints ,
}
/* No side effect */
-`,_f=`// Generated by Melange
+`,td=`// Generated by Melange
import * as Caml_obj from "melange.js/caml_obj.js";
import * as Caml_option from "melange.js/caml_option.js";
@@ -40952,7 +56094,7 @@ export {
Make ,
}
/* No side effect */
-`,lf=`// Generated by Melange
+`,rd=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Caml_obj from "melange.js/caml_obj.js";
@@ -41099,9 +56241,9 @@ export {
of_seq ,
}
/* No side effect */
-`,cf=`// Generated by Melange
+`,ad=`// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
-`,uf=`// Generated by Melange
+`,id=`// Generated by Melange
import * as Stdlib from "./stdlib.js";
@@ -41111,7 +56253,7 @@ export {
}
/* Not a pure module */
-`,ff=`// Generated by Melange
+`,sd=`// Generated by Melange
import * as Caml_bytes from "melange.js/caml_bytes.js";
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
@@ -41963,7 +57105,7 @@ export {
do_domain_local_at_exit ,
}
/* No side effect */
-`,mf=`// Generated by Melange
+`,od=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_bytes from "melange.js/caml_bytes.js";
@@ -42525,7 +57667,7 @@ export {
seeded_hash ,
}
/* No side effect */
-`,df=`// Generated by Melange
+`,ld=`// Generated by Melange
import * as Stdlib__String from "./string.js";
@@ -42724,7 +57866,7 @@ export {
get_int64_le ,
}
/* No side effect */
-`,pf=`// Generated by Melange
+`,_d=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Caml_external_polyfill from "melange.js/caml_external_polyfill.js";
@@ -42921,7 +58063,7 @@ export {
Immediate64 ,
}
/* No side effect */
-`,hf=`// Generated by Melange
+`,cd=`// Generated by Melange
import * as Caml_exceptions from "melange.js/caml_exceptions.js";
import * as Stdlib__Obj from "./obj.js";
@@ -42956,7 +58098,7 @@ export {
Id ,
}
/* No side effect */
-`,gf=`// Generated by Melange
+`,ud=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_format from "melange.js/caml_format.js";
@@ -43180,7 +58322,7 @@ export {
utf_16_byte_length ,
}
/* No side effect */
-`,bf=`// Generated by Melange
+`,fd=`// Generated by Melange
function equal(param, param$1) {
@@ -43201,7 +58343,7 @@ export {
to_string ,
}
/* No side effect */
-`,vf=`// Generated by Melange
+`,dd=`// Generated by Melange
import * as Caml from "melange.js/caml.js";
import * as Caml_array from "melange.js/caml_array.js";
@@ -43664,7 +58806,7 @@ export {
Make ,
}
/* No side effect */
-`;function An(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r3?n.i-4:n.i:Array.isArray(t)?1:ir(t)?2:sr(t)?3:0}function ge(t,n){return bt(t)===2?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function ar(t,n){return bt(t)===2?t.get(n):t[n]}function ps(t,n,e){var r=bt(t);r===2?t.set(n,e):r===3?(t.delete(n),t.add(e)):t[n]=e}function yf(t,n){return t===n?t!==0||1/t==1/n:t!=t&&n!=n}function ir(t){return Cf&&t instanceof Map}function sr(t){return Sf&&t instanceof Set}function kn(t){return t.o||t.t}function ga(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var n=If(t);delete n[tn];for(var e=Sa(n),r=0;r1&&(t.set=t.add=t.clear=t.delete=xf),Object.freeze(t),n&&jt(t,function(e,r){return ba(r,!0)},!0)),t}function xf(){An(2)}function va(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function tt(t){var n=Aa[t];return n||An(18,t),n}function hs(t,n){Aa[t]||(Aa[t]=n)}function or(){return ve}function ya(t,n){n&&(tt("Patches"),t.u=[],t.s=[],t.v=n)}function _r(t){xa(t),t.p.forEach($f),t.p=null}function xa(t){t===ve&&(ve=t.l)}function gs(t){return ve={p:[],l:ve,h:t,m:!0,_:0}}function $f(t){var n=t[tn];n.i===0||n.i===1?n.j():n.O=!0}function $a(t,n){n._=n.p.length;var e=n.p[0],r=t!==void 0&&t!==e;return n.h.g||tt("ES5").S(n,t,r),r?(e[tn].P&&(_r(n),An(4)),nt(t)&&(t=lr(n,t),n.l||cr(n,t)),n.u&&tt("Patches").M(e[tn].t,t,n.u,n.s)):t=lr(n,e,[]),_r(n),n.u&&n.v(n.u,n.s),t!==Ca?t:void 0}function lr(t,n,e){if(va(n))return n;var r=n[tn];if(!r)return jt(n,function(i,s){return bs(t,r,n,i,s,e)},!0),n;if(r.A!==t)return n;if(!r.P)return cr(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=r.i===4||r.i===5?r.o=ga(r.k):r.o;jt(r.i===3?new Set(a):a,function(i,s){return bs(t,r,a,i,s,e)}),cr(t,a,!1),e&&t.u&&tt("Patches").R(r,e,t.u,t.s)}return r.o}function bs(t,n,e,r,a,i){if(Tt(a)){var s=lr(t,a,i&&n&&n.i!==3&&!ge(n.D,r)?i.concat(r):void 0);if(ps(e,r,s),!Tt(s))return;t.m=!1}if(nt(a)&&!va(a)){if(!t.h.F&&t._<1)return;lr(t,a),n&&n.A.l||cr(t,a)}}function cr(t,n,e){e===void 0&&(e=!1),t.h.F&&t.m&&ba(n,e)}function Ea(t,n){var e=t[tn];return(e?kn(e):t)[n]}function vs(t,n){if(n in t)for(var e=Object.getPrototypeOf(t);e;){var r=Object.getOwnPropertyDescriptor(e,n);if(r)return r;e=Object.getPrototypeOf(e)}}function ut(t){t.P||(t.P=!0,t.l&&ut(t.l))}function ka(t){t.o||(t.o=ga(t.t))}function be(t,n,e){var r=ir(n)?tt("MapSet").N(n,e):sr(n)?tt("MapSet").T(n,e):t.g?function(a,i){var s=Array.isArray(a),o={i:s?1:0,A:i?i.A:or(),P:!1,I:!1,D:{},l:i,t:a,k:null,o:null,j:null,C:!1},_=o,l=Ia;s&&(_=[o],l=xe);var u=Proxy.revocable(_,l),f=u.revoke,m=u.proxy;return o.k=m,o.j=f,m}(n,e):tt("ES5").J(n,e);return(e?e.A:or()).p.push(r),r}function Ef(t){return Tt(t)||An(22,t),function n(e){if(!nt(e))return e;var r,a=e[tn],i=bt(e);if(a){if(!a.P&&(a.i<4||!tt("ES5").K(a)))return a.t;a.I=!0,r=ys(e,i),a.I=!1}else r=ys(e,i);return jt(r,function(s,o){a&&ar(a.t,s)===o||ps(r,s,n(o))}),i===3?new Set(r):r}(t)}function ys(t,n){switch(n){case 2:return new Map(t);case 3:return Array.from(t)}return ga(t)}function kf(){function t(r){if(!nt(r))return r;if(Array.isArray(r))return r.map(t);if(ir(r))return new Map(Array.from(r.entries()).map(function(s){return[s[0],t(s[1])]}));if(sr(r))return new Set(Array.from(r).map(t));var a=Object.create(Object.getPrototypeOf(r));for(var i in r)a[i]=t(r[i]);return ge(r,ye)&&(a[ye]=r[ye]),a}function n(r){return Tt(r)?t(r):r}var e="add";hs("Patches",{$:function(r,a){return a.forEach(function(i){for(var s=i.path,o=i.op,_=r,l=0;l1?y-1:0),b=1;b1?u-1:0),m=1;m=0;a--){var i=r[a];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}a>-1&&(r=r.slice(a+1));var s=tt("Patches").$;return Tt(e)?s(e,r):this.produce(e,function(o){return s(o,r)})},t}(),On=new Nf,Tf=On.produce;On.produceWithPatches.bind(On),On.setAutoFreeze.bind(On),On.setUseProxies.bind(On),On.applyPatches.bind(On),On.createDraft.bind(On),On.finishDraft.bind(On),kf(),wf();function jf(t,n,e=()=>({})){const r=new Map;function a(o,_){postMessage({__uwrType:"patch",id:o,patches:_})}function i(){let o,_=null;return new WritableStream({async write(l,u){switch(l.__uwrType){case"init":{const{id:f,initialState:m}=l;_=m,o=e(_),a(f,[])}break;case"dispatch":{const{id:f,action:m}=l;_=await Tf(_,async h=>{await n(h,m,o)},h=>a(f,h))}break;case"destroy":{const{name:f}=l;r.delete(f),u.error()}break}}})}function s(o){if(typeof o.data!="object"||!("__uwrType"in o.data))return;const _=o.data;if(_.__uwrType==="init"){const{name:m}=_,[h,v]=JSON.parse(m);if(v!==t||r.has(m))return;const p=i();r.set(m,p)}const{name:l}=_,u=r.get(l);if(!u)return;const f=u.getWriter();f.write(_),f.releaseLock()}addEventListener("message",s)}/*
+`;function Sn(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r3?n.i-4:n.i:Array.isArray(e)?1:ir(e)?2:sr(e)?3:0}function vt(e,n){return ge(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function ar(e,n){return ge(e)===2?e.get(n):e[n]}function ps(e,n,t){var r=ge(e);r===2?e.set(n,t):r===3?(e.delete(n),e.add(t)):e[n]=t}function md(e,n){return e===n?e!==0||1/e==1/n:e!=e&&n!=n}function ir(e){return yd&&e instanceof Map}function sr(e){return xd&&e instanceof Set}function En(e){return e.o||e.t}function va(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var n=$d(e);delete n[en];for(var t=Aa(n),r=0;r1&&(e.set=e.add=e.clear=e.delete=pd),Object.freeze(e),n&&Ne(e,function(t,r){return ga(r,!0)},!0)),e}function pd(){Sn(2)}function ba(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ee(e){var n=Sa[e];return n||Sn(18,e),n}function hs(e,n){Sa[e]||(Sa[e]=n)}function or(){return bt}function ya(e,n){n&&(ee("Patches"),e.u=[],e.s=[],e.v=n)}function lr(e){xa(e),e.p.forEach(hd),e.p=null}function xa(e){e===bt&&(bt=e.l)}function vs(e){return bt={p:[],l:bt,h:e,m:!0,_:0}}function hd(e){var n=e[en];n.i===0||n.i===1?n.j():n.O=!0}function ka(e,n){n._=n.p.length;var t=n.p[0],r=e!==void 0&&e!==t;return n.h.g||ee("ES5").S(n,e,r),r?(t[en].P&&(lr(n),Sn(4)),ne(e)&&(e=_r(n,e),n.l||cr(n,e)),n.u&&ee("Patches").M(t[en].t,e,n.u,n.s)):e=_r(n,t,[]),lr(n),n.u&&n.v(n.u,n.s),e!==wa?e:void 0}function _r(e,n,t){if(ba(n))return n;var r=n[en];if(!r)return Ne(n,function(i,s){return gs(e,r,n,i,s,t)},!0),n;if(r.A!==e)return n;if(!r.P)return cr(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=r.i===4||r.i===5?r.o=va(r.k):r.o;Ne(r.i===3?new Set(a):a,function(i,s){return gs(e,r,a,i,s,t)}),cr(e,a,!1),t&&e.u&&ee("Patches").R(r,t,e.u,e.s)}return r.o}function gs(e,n,t,r,a,i){if(Le(a)){var s=_r(e,a,i&&n&&n.i!==3&&!vt(n.D,r)?i.concat(r):void 0);if(ps(t,r,s),!Le(s))return;e.m=!1}if(ne(a)&&!ba(a)){if(!e.h.F&&e._<1)return;_r(e,a),n&&n.A.l||cr(e,a)}}function cr(e,n,t){t===void 0&&(t=!1),e.h.F&&e.m&&ga(n,t)}function $a(e,n){var t=e[en];return(t?En(t):e)[n]}function bs(e,n){if(n in e)for(var t=Object.getPrototypeOf(e);t;){var r=Object.getOwnPropertyDescriptor(t,n);if(r)return r;t=Object.getPrototypeOf(t)}}function ue(e){e.P||(e.P=!0,e.l&&ue(e.l))}function Ea(e){e.o||(e.o=va(e.t))}function gt(e,n,t){var r=ir(n)?ee("MapSet").N(n,t):sr(n)?ee("MapSet").T(n,t):e.g?function(a,i){var s=Array.isArray(a),o={i:s?1:0,A:i?i.A:or(),P:!1,I:!1,D:{},l:i,t:a,k:null,o:null,j:null,C:!1},l=o,_=Ba;s&&(l=[o],_=xt);var u=Proxy.revocable(l,_),f=u.revoke,d=u.proxy;return o.k=d,o.j=f,d}(n,t):ee("ES5").J(n,t);return(t?t.A:or()).p.push(r),r}function vd(e){return Le(e)||Sn(22,e),function n(t){if(!ne(t))return t;var r,a=t[en],i=ge(t);if(a){if(!a.P&&(a.i<4||!ee("ES5").K(a)))return a.t;a.I=!0,r=ys(t,i),a.I=!1}else r=ys(t,i);return Ne(r,function(s,o){a&&ar(a.t,s)===o||ps(r,s,n(o))}),i===3?new Set(r):r}(e)}function ys(e,n){switch(n){case 2:return new Map(e);case 3:return Array.from(e)}return va(e)}function gd(){function e(r){if(!ne(r))return r;if(Array.isArray(r))return r.map(e);if(ir(r))return new Map(Array.from(r.entries()).map(function(s){return[s[0],e(s[1])]}));if(sr(r))return new Set(Array.from(r).map(e));var a=Object.create(Object.getPrototypeOf(r));for(var i in r)a[i]=e(r[i]);return vt(r,yt)&&(a[yt]=r[yt]),a}function n(r){return Le(r)?e(r):r}var t="add";hs("Patches",{$:function(r,a){return a.forEach(function(i){for(var s=i.path,o=i.op,l=r,_=0;_1?y-1:0),g=1;g1?u-1:0),d=1;d=0;a--){var i=r[a];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}a>-1&&(r=r.slice(a+1));var s=ee("Patches").$;return Le(t)?s(t,r):this.produce(t,function(o){return s(o,r)})},e}(),On=new Ed,Cd=On.produce;On.produceWithPatches.bind(On),On.setAutoFreeze.bind(On),On.setUseProxies.bind(On),On.applyPatches.bind(On),On.createDraft.bind(On),On.finishDraft.bind(On),gd(),bd();function wd(e,n,t=()=>({})){const r=new Map;function a(o,l){postMessage({__uwrType:"patch",id:o,patches:l})}function i(){let o,l=null;return new WritableStream({async write(_,u){switch(_.__uwrType){case"init":{const{id:f,initialState:d}=_;l=d,o=t(l),a(f,[])}break;case"dispatch":{const{id:f,action:d}=_;l=await Cd(l,async h=>{await n(h,d,o)},h=>a(f,h))}break;case"destroy":{const{name:f}=_;r.delete(f),u.error()}break}}})}function s(o){if(typeof o.data!="object"||!("__uwrType"in o.data))return;const l=o.data;if(l.__uwrType==="init"){const{name:d}=l,[h,b]=JSON.parse(d);if(b!==e||r.has(d))return;const p=i();r.set(d,p)}const{name:_}=l,u=r.get(_);if(!u)return;const f=u.getWriter();f.write(l),f.releaseLock()}addEventListener("message",s)}/*
@license
Rollup.js v3.25.1
Mon, 12 Jun 2023 04:38:12 GMT - commit b1341bf9cd719670a670905e0308418b37621d70
@@ -43672,50 +58814,50 @@ export {
https://github.com/rollup/rollup
Released under the MIT License.
- */var Na="3.25.1";function Es(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ks={exports:{}};(function(t){const n=",".charCodeAt(0),e=";".charCodeAt(0),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),i=new Uint8Array(128);for(let p=0;pBuffer.from(p.buffer,p.byteOffset,p.byteLength).toString()}:{decode(p){let g="";for(let y=0;y>>=1,S&&(b=-2147483648|-b),y[E]+=b,g}function u(p,g,y){return!(g>=y)&&p.charCodeAt(g)!==n}function f(p){p.sort(m)}function m(p,g){return p[0]-g[0]}function h(p){const g=new Int32Array(5),y=16384,E=y-36,b=new Uint8Array(y),x=b.subarray(0,E);let $=0,S="";for(let A=0;A0&&($===y&&(S+=s.decode(b),$=0),b[$++]=e),N.length!==0){g[0]=0;for(let k=0;kE&&(S+=s.decode(x),b.copyWithin(0,E,$),$-=E),k>0&&(b[$++]=n),$=v(b,$,g,I,0),I.length!==1&&($=v(b,$,g,I,1),$=v(b,$,g,I,2),$=v(b,$,g,I,3),I.length!==4&&($=v(b,$,g,I,4)))}}}return S+s.decode(b.subarray(0,$))}function v(p,g,y,E,b){const x=E[b];let $=x-y[b];y[b]=x,$=$<0?-$<<1|1:$<<1;do{let S=31&$;$>>>=5,$>0&&(S|=32),p[g++]=a[S]}while($>0);return g}t.decode=o,t.encode=h,Object.defineProperty(t,"__esModule",{value:!0})})(ks.exports);var ws=ks.exports;class fr{constructor(n){this.bits=n instanceof fr?n.bits.slice():[]}add(n){this.bits[n>>5]|=1<<(31&n)}has(n){return!!(this.bits[n>>5]&1<<(31&n))}}let Cs=class ds{constructor(n,e,r){this.start=n,this.end=e,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(n){this.outro+=n}appendRight(n){this.intro=this.intro+n}clone(){const n=new ds(this.start,this.end,this.original);return n.intro=this.intro,n.outro=this.outro,n.content=this.content,n.storeName=this.storeName,n.edited=this.edited,n}contains(n){return this.startwindow.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const Mf=Lf();class mr{constructor(n){this.version=3,this.file=n.file,this.sources=n.sources,this.sourcesContent=n.sourcesContent,this.names=n.names,this.mappings=ws.encode(n.mappings),n.x_google_ignoreList!==void 0&&(this.x_google_ignoreList=n.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Mf(this.toString())}}function Ss(t,n){const e=t.split(/[/\\]/),r=n.split(/[/\\]/);for(e.pop();e[0]===r[0];)e.shift(),r.shift();if(e.length){let a=e.length;for(;a--;)e[a]=".."}return e.concat(r).join("/")}const Df=Object.prototype.toString;function As(t){return Df.call(t)==="[object Object]"}function Ta(t){const n=t.split(`
-`),e=[];for(let r=0,a=0;r>1;r=0&&i.push(a),this.rawSegments.push(i)}else this.pending&&this.rawSegments.push(this.pending);this.advance(e),this.pending=null}addUneditedChunk(n,e,r,a,i){let s=e.start,o=!0;for(;s1){for(let r=0;r{const s=a(i.start);i.intro.length&&r.advance(i.intro),i.edited?r.addEdit(0,i.content,s,i.storeName?e.indexOf(i.original):-1):r.addUneditedChunk(0,i,this.original,s,this.sourcemapLocations),i.outro.length&&r.advance(i.outro)}),{file:n.file?n.file.split(/[/\\]/).pop():void 0,sources:[n.source?Ss(n.file||"",n.source):n.file||""],sourcesContent:n.includeContent?[this.original]:void 0,names:e,mappings:r.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(n){return new mr(this.generateDecodedMap(n))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=function(n){const e=n.split(`
-`),r=e.filter(s=>/^\t+/.test(s)),a=e.filter(s=>/^ {2,}/.test(s));if(r.length===0&&a.length===0)return null;if(r.length>=a.length)return" ";const i=a.reduce((s,o)=>{const _=/^ +/.exec(o)[0].length;return Math.min(_,s)},1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(n,e){const r=/^[^\r\n]/gm;if(As(n)&&(e=n,n=void 0),n===void 0&&(this._ensureindentStr(),n=this.indentStr||" "),n==="")return this;const a={};(e=e||{}).exclude&&(typeof e.exclude[0]=="number"?[e.exclude]:e.exclude).forEach(l=>{for(let u=l[0];ui?`${n}${l}`:(i=!0,l);this.intro=this.intro.replace(r,s);let o=0,_=this.firstChunk;for(;_;){const l=_.end;if(_.edited)a[o]||(_.content=_.content.replace(r,s),_.content.length&&(i=_.content[_.content.length-1]===`
-`));else for(o=_.start;o=n&&r<=e)throw new Error("Cannot move a selection inside itself");this._split(n),this._split(e),this._split(r);const a=this.byStart[n],i=this.byEnd[e],s=a.previous,o=i.next,_=this.byStart[r];if(!_&&i===this.lastChunk)return this;const l=_?_.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),l&&(l.next=a),_&&(_.previous=i),a.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=a.previous,this.lastChunk.next=null),a.previous=l,i.next=_||null,l||(this.firstChunk=a),_||(this.lastChunk=i),this}overwrite(n,e,r,a){return a=a||{},this.update(n,e,r,{...a,overwrite:!a.contentOnly})}update(n,e,r,a){if(typeof r!="string")throw new TypeError("replacement content must be a string");for(;n<0;)n+=this.original.length;for(;e<0;)e+=this.original.length;if(e>this.original.length)throw new Error("end is out of bounds");if(n===e)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(n),this._split(e),a===!0&&(Zt.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Zt.storeName=!0),a={storeName:!0});const i=a!==void 0&&a.storeName,s=a!==void 0&&a.overwrite;if(i){const l=this.original.slice(n,e);Object.defineProperty(this.storedNames,l,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[n],_=this.byEnd[e];if(o){let l=o;for(;l!==_;){if(l.next!==this.byStart[l.end])throw new Error("Cannot overwrite across a split point");l=l.next,l.edit("",!1)}o.edit(r,i,!s)}else{const l=new Cs(n,e,"").edit(r,i);_.next=l,l.previous=_}return this}prepend(n){if(typeof n!="string")throw new TypeError("outro content must be a string");return this.intro=n+this.intro,this}prependLeft(n,e){if(typeof e!="string")throw new TypeError("inserted content must be a string");this._split(n);const r=this.byEnd[n];return r?r.prependLeft(e):this.intro=e+this.intro,this}prependRight(n,e){if(typeof e!="string")throw new TypeError("inserted content must be a string");this._split(n);const r=this.byStart[n];return r?r.prependRight(e):this.outro=e+this.outro,this}remove(n,e){for(;n<0;)n+=this.original.length;for(;e<0;)e+=this.original.length;if(n===e)return this;if(n<0||e>this.original.length)throw new Error("Character is out of bounds");if(n>e)throw new Error("end must be greater than start");this._split(n),this._split(e);let r=this.byStart[n];for(;r;)r.intro="",r.outro="",r.edit(""),r=e>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let n=this.lastChunk;do{if(n.outro.length)return n.outro[n.outro.length-1];if(n.content.length)return n.content[n.content.length-1];if(n.intro.length)return n.intro[n.intro.length-1]}while(n=n.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let n=this.outro.lastIndexOf($e);if(n!==-1)return this.outro.substr(n+1);let e=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(n=r.outro.lastIndexOf($e),n!==-1)return r.outro.substr(n+1)+e;e=r.outro+e}if(r.content.length>0){if(n=r.content.lastIndexOf($e),n!==-1)return r.content.substr(n+1)+e;e=r.content+e}if(r.intro.length>0){if(n=r.intro.lastIndexOf($e),n!==-1)return r.intro.substr(n+1)+e;e=r.intro+e}}while(r=r.previous);return n=this.intro.lastIndexOf($e),n!==-1?this.intro.substr(n+1)+e:this.intro+e}slice(n=0,e=this.original.length){for(;n<0;)n+=this.original.length;for(;e<0;)e+=this.original.length;let r="",a=this.firstChunk;for(;a&&(a.start>n||a.end<=n);){if(a.start=e)return r;a=a.next}if(a&&a.edited&&a.start!==n)throw new Error(`Cannot use replaced character ${n} as slice start anchor.`);const i=a;for(;a;){!a.intro||i===a&&a.start!==n||(r+=a.intro);const s=a.start=e;if(s&&a.edited&&a.end!==e)throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);const o=i===a?n-a.start:0,_=s?a.content.length+e-a.end:a.content.length;if(r+=a.content.slice(o,_),!a.outro||s&&a.end!==e||(r+=a.outro),s)break;a=a.next}return r}snip(n,e){const r=this.clone();return r.remove(0,n),r.remove(e,r.original.length),r}_split(n){if(this.byStart[n]||this.byEnd[n])return;let e=this.lastSearchedChunk;const r=n>e.end;for(;e;){if(e.contains(n))return this._splitChunk(e,n);e=r?this.byStart[e.end]:this.byEnd[e.start]}}_splitChunk(n,e){if(n.edited&&n.content.length){const a=Ta(this.original)(e);throw new Error(`Cannot split a chunk that has already been edited (${a.line}:${a.column} – "${n.original}")`)}const r=n.split(e);return this.byEnd[e]=n,this.byStart[e]=r,this.byEnd[r.end]=r,n===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=n,!0}toString(){let n=this.intro,e=this.firstChunk;for(;e;)n+=e.toString(),e=e.next;return n+this.outro}isEmpty(){let n=this.firstChunk;do if(n.intro.length&&n.intro.trim()||n.content.length&&n.content.trim()||n.outro.length&&n.outro.trim())return!1;while(n=n.next);return!0}length(){let n=this.firstChunk,e=0;do e+=n.intro.length+n.content.length+n.outro.length;while(n=n.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(n){return this.trimStart(n).trimEnd(n)}trimEndAborted(n){const e=new RegExp((n||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.lastChunk;do{const a=r.end,i=r.trimEnd(e);if(r.end!==a&&(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(n){return this.trimEndAborted(n),this}trimStartAborted(n){const e=new RegExp("^"+(n||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.firstChunk;do{const a=r.end,i=r.trimStart(e);if(r.end!==a&&(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(n){return this.trimStartAborted(n),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(n,e){function r(a,i){return typeof e=="string"?e.replace(/\$(\$|&|\d+)/g,(s,o)=>o==="$"?"$":o==="&"?a[0]:+o{a.index!=null&&this.overwrite(a.index,a.index+a[0].length,r(a,this.original))});else{const a=this.original.match(n);a&&a.index!=null&&this.overwrite(a.index,a.index+a[0].length,r(a,this.original))}return this}_replaceString(n,e){const{original:r}=this,a=r.indexOf(n);return a!==-1&&this.overwrite(a,a+n.length,e),this}replace(n,e){return typeof n=="string"?this._replaceString(n,e):this._replaceRegexp(n,e)}_replaceAllString(n,e){const{original:r}=this,a=n.length;for(let i=r.indexOf(n);i!==-1;i=r.indexOf(n,i+a))this.overwrite(i,i+a,e);return this}replaceAll(n,e){if(typeof n=="string")return this._replaceAllString(n,e);if(!n.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(n,e)}}const Ns=Object.prototype.hasOwnProperty,Pf=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,Of=/^\.?\.\//,zf=/\\/g,Qt=/[/\\]/,Bf=/\.[^.]+$/;function vt(t){return Pf.test(t)}function ja(t){return Of.test(t)}function Ee(t){return t.replace(zf,"/")}function ft(t){return t.split(Qt).pop()||""}function Mt(t){const n=/[/\\][^/\\]*$/.exec(t);return n?t.slice(0,-n[0].length)||"/":"."}function yt(t){const n=Bf.exec(ft(t));return n?n[0]:""}function ne(t,n){const e=t.split(Qt).filter(Boolean),r=n.split(Qt).filter(Boolean);for(e[0]==="."&&e.shift(),r[0]==="."&&r.shift();e[0]&&r[0]&&e[0]===r[0];)e.shift(),r.shift();for(;r[0]===".."&&e.length>0;)r.shift(),e.pop();for(;e.pop();)r.unshift("..");return r.join("/")}function Jn(...t){const n=t.shift();if(!n)return"/";let e=n.split(Qt);for(const r of t)if(vt(r))e=r.split(Qt);else{const a=r.split(Qt);for(;a[0]==="."||a[0]==="..";)a.shift()===".."&&e.pop();e.push(...a)}return e.join("/")}const Ff=/[\n\r'\\\u2028\u2029]/,Gf=/([\n\r'\u2028\u2029])/g,Rf=/\\/g;function dr(t){return Ff.test(t)?t.replace(Rf,"\\\\").replace(Gf,"\\$1"):t}function La(t){const n=ft(t);return n.slice(0,Math.max(0,n.length-yt(t).length))}function H(t){return vt(t)?ne(Jn(),t):t}function pr(t){return t[0]==="/"||t[0]==="."&&(t[1]==="/"||t[1]===".")||vt(t)}const qf=/^(\.\.\/)*\.\.$/;function Ts(t,n,e,r){let a=Ee(ne(Mt(t),n));if(e&&a.endsWith(".js")&&(a=a.slice(0,-3)),r){if(a==="")return"../"+ft(n);if(qf.test(a))return[...a.split("/"),"..",ft(n)].join("/")}return a?a.startsWith("..")?a:"./"+a:"."}class te{constructor(n,e,r){this.options=e,this.inputBase=r,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAssertions=null,this.id=n.id,this.moduleInfo=n.info,this.renormalizeRenderPath=n.renormalizeRenderPath,this.suggestedVariableName=n.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:n}=this.options;return this.fileName=(typeof n=="function"?n(this.id):n[this.id])||(this.renormalizeRenderPath?Ee(ne(this.inputBase,this.id)):this.id)}getImportAssertions(n){return this.importAssertions||(this.importAssertions=function(e,{getObject:r}){if(!e)return null;const a=Object.entries(e).map(([i,s])=>[i,`'${s}'`]);return a.length>0?r(a,{lineBreakIndent:null}):null}(this.options.format==="es"&&this.options.externalImportAssertions&&this.moduleInfo.assertions,n))}getImportPath(n){return dr(this.renormalizeRenderPath?Ts(n,this.getFileName(),this.options.format==="amd",!1):this.getFileName())}}function zn(t,n,e){const r=t.get(n);if(r!==void 0)return r;const a=e();return t.set(n,a),a}function Dt(){return new Set}function js(){return[]}const on=Symbol("Unknown Key"),hr=Symbol("Unknown Non-Accessor Key"),ke=Symbol("Unknown Integer"),Ma=Symbol("Symbol.toStringTag"),X=[],nn=[on],Vf=[hr],Da=[ke],ee=Symbol("Entities");class re{constructor(){this.entityPaths=Object.create(null,{[ee]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(n,e){const r=this.getEntities(n);return!!r.has(e)||(r.add(e),!1)}withTrackedEntityAtPath(n,e,r,a){const i=this.getEntities(n);if(i.has(e))return a;i.add(e);const s=r();return i.delete(e),s}getEntities(n){let e=this.entityPaths;for(const r of n)e=e[r]=e[r]||Object.create(null,{[ee]:{value:new Set}});return e[ee]}}const xn=new re;class Ls{constructor(){this.entityPaths=Object.create(null,{[ee]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(n,e,r){let a=this.entityPaths;for(const s of n)a=a[s]=a[s]||Object.create(null,{[ee]:{value:new Map}});const i=zn(a[ee],e,Dt);return!!i.has(r)||(i.add(r),!1)}}const mn=Symbol("Unknown Value"),Ms=Symbol("Unknown Truthy Value");class qn{constructor(){this.included=!1}deoptimizeArgumentsOnInteractionAtPath(n,e,r){xt(n)}deoptimizePath(n){}getLiteralValueAtPath(n,e,r){return mn}getReturnExpressionWhenCalledAtPath(n,e,r,a){return gn}hasEffectsOnInteractionAtPath(n,e,r){return!0}include(n,e,r){this.included=!0}includeCallArguments(n,e){for(const r of e)r.include(n,!1)}shouldBeIncluded(n){return!0}}const U=new class extends qn{},gn=[U,!1],xt=t=>{for(const n of t.args)n==null||n.deoptimizePath(nn)},Pa={args:[null],type:0},Oa={args:[null,U],type:1},gr={args:[null],type:2,withNew:!1};class Pt extends qn{constructor(n){super(),this.name=n,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(n){}forbidName(n){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(n)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(n,e){if(e!=null&&e(this))return this.name;const r=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${n(r)}`:r}hasEffectsOnInteractionAtPath(n,{type:e},r){return e!==0||n.length>0}include(){this.included=!0}markCalledFromTryStatement(){}setRenderNames(n,e){this.renderBaseName=n,this.renderName=e}}class br extends Pt{constructor(n,e){super(e),this.referenced=!1,this.module=n,this.isNamespace=e==="*"}addReference(n){this.referenced=!0,this.name!=="default"&&this.name!=="*"||this.module.suggestName(n.name)}hasEffectsOnInteractionAtPath(n,{type:e}){return e!==0||n.length>(this.isNamespace?1:0)}include(){this.included||(this.included=!0,this.module.used=!0)}}const In=Object.freeze(Object.create(null)),Bn=Object.freeze({}),bn=Object.freeze([]),Ds=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});var vr=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const Ps=/[^\w$]/g,Os=t=>(n=>/\d/.test(n[0]))(t)||vr.has(t)||t==="arguments";function za(t){return t=t.replace(/-(\w)/g,(n,e)=>e.toUpperCase()).replace(Ps,"_"),Os(t)&&(t=`_${t}`),t||"_"}const V="warn",Ot="info",we="debug",zt={[we]:0,[Ot]:1,silent:3,[V]:2};function Ba(t,n,e){if(typeof e=="number")throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument");return function(r,a){a===void 0&&(a={});var i=a.offsetLine||0,s=a.offsetColumn||0,o=r.split(`
-`),_=0,l=o.map(function(h,v){var p=_+h.length+1,g={start:_,end:p,line:v};return _=p,g}),u=0;function f(h,v){return h.start<=v&&v=p.end?1:-1;p;){if(f(p,h))return m(p,h);p=l[u+=g]}}}(t,e)(n,e&&e.startIndex)}function Fa(t){return t.replace(/^\t+/,n=>n.split(" ").join(" "))}const Xf=120,Uf=10,Ga="...";function zs(t,n,e){let r=t.split(`
-`);if(n>r.length)return"";const a=Math.max(Fa(r[n-1].slice(0,e)).length+Uf+Ga.length,Xf),i=Math.max(0,n-3);let s=Math.min(n+2,r.length);for(r=r.slice(i,s);!/\S/.test(r[r.length-1]);)r.pop(),s-=1;const o=String(s).length;return r.map((_,l)=>{const u=i+l+1===n;let f=String(l+i+1);for(;f.lengtha&&(m=`${m.slice(0,a-Ga.length)}${Ga}`),u){const h=function(v){let p="";for(;v--;)p+=" ";return p}(o+2+Fa(_.slice(0,e)).length)+"^";return`${f}: ${m}
-${h}`}return`${f}: ${m}`}).join(`
-`)}function mt(t,n){const e=t.length<=1,r=t.map(i=>`"${i}"`);let a=e?r[0]:`${r.slice(0,-1).join(", ")} and ${r.slice(-1)[0]}`;return n&&(a+=` ${e?n[0]:n[1]}`),a}function wn(t){return`https://rollupjs.org/${t}`}const Hf="troubleshooting/#error-name-is-not-exported-by-module",Wf="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",Bs="configuration-options/#output-amd-id",Ce="configuration-options/#output-dir",Ra="configuration-options/#output-exports",Jf="configuration-options/#output-extend",Fs="configuration-options/#output-format",Kf="configuration-options/#output-experimentaldeepdynamicchunkoptimization",Yf="configuration-options/#output-globals",qa="configuration-options/#output-inlinedynamicimports",Va="configuration-options/#output-interop",Xa="configuration-options/#output-manualchunks",Gs="configuration-options/#output-name",Zf="configuration-options/#output-sourcemapfile",Rs="plugin-development/#this-getmoduleinfo";function L(t){throw t instanceof Error||(t=Object.assign(new Error(t.message),t),Object.defineProperty(t,"name",{value:"RollupError"})),t}function yr(t,n,e,r){if(typeof n=="object"){const{line:a,column:i}=n;t.loc={column:i,file:r,line:a}}else{t.pos=n;const{line:a,column:i}=Ba(e,n,{offsetLine:1});t.loc={column:i,file:r,line:a}}if(t.frame===void 0){const{line:a,column:i}=t.loc;t.frame=zs(e,a,i)}}const Qf="ADDON_ERROR",nm="ALREADY_CLOSED",tm="ANONYMOUS_PLUGIN_CACHE",em="ASSET_NOT_FINALISED",rm="CANNOT_EMIT_FROM_OPTIONS_HOOK",am="CHUNK_NOT_GENERATED",im="CIRCULAR_REEXPORT",sm="DEPRECATED_FEATURE",om="DUPLICATE_PLUGIN_NAME",_m="FILE_NAME_CONFLICT",lm="ILLEGAL_IDENTIFIER_AS_NAME",cm="INVALID_CHUNK",qs="INVALID_EXPORT_OPTION",um="INVALID_LOG_POSITION",fm="INVALID_OPTION",Vs="INVALID_PLUGIN_HOOK",Xs="INVALID_ROLLUP_PHASE",mm="INVALID_SETASSETSOURCE",dm="MISSING_EXPORT",pm="MISSING_GLOBAL_NAME",Ua="MISSING_IMPLICIT_DEPENDANT",Us="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",hm="MISSING_NODE_BUILTINS",gm="MISSING_OPTION",bm="MIXED_EXPORTS",vm="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",ym="OPTIMIZE_CHUNK_STATUS",xm="PLUGIN_ERROR",Hs="SOURCEMAP_BROKEN",Ws="UNEXPECTED_NAMED_IMPORT",$m="UNKNOWN_OPTION",Js="UNRESOLVED_ENTRY",Ks="UNRESOLVED_IMPORT",Em="VALIDATION_ERROR";function Ys(){return{code:nm,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Zs(t){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${t}").`}}function km({fileName:t,code:n},e){const r={code:"CHUNK_INVALID",message:`Chunk "${t}" is not valid JavaScript: ${e.message}.`};return yr(r,e.loc,n,t),r}function wm(t){return{code:"CIRCULAR_DEPENDENCY",ids:t,message:`Circular dependency: ${t.map(H).join(" -> ")}`}}function Cm(t,n,{line:e,column:r}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${H(n)} is at (${e}:${r})
-${zs(t,e,r)}`}}function Qs(t,n){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${t}" in "${H(n)}".`}}function xr(t,n,e,r){return{code:"INCONSISTENT_IMPORT_ASSERTIONS",message:`Module "${H(r)}" tried to import "${H(e)}" with ${no(n)} assertions, but it was already imported elsewhere with ${no(t)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const no=t=>{const n=Object.entries(t);return n.length===0?"no":n.map(([e,r])=>`"${e}": "${r}"`).join(", ")};function to(t,n,e){return{code:qs,message:`"${t}" was specified for "output.exports", but entry module "${H(e)}" has the following exports: ${mt(n)}`,url:wn(Ra)}}function vn(t,n,e,r){return{code:fm,message:`Invalid value ${r===void 0?"":`${JSON.stringify(r)} `}for option "${t}" - ${e}.`,url:wn(n)}}function $r(t,n,e){const r=yt(e)===".json";return{binding:t,code:dm,exporter:e,id:n,message:`"${t}" is not exported by "${H(e)}", imported by "${H(n)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:wn(Hf)}}function Sm(t){const n=[...t.implicitlyLoadedBefore].map(e=>H(e.id)).sort();return{code:Ua,message:`Module "${H(t.id)}" that should be implicitly loaded before ${mt(n)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function eo(t,n,e){return{code:ym,message:`${e}, there are
-${t} chunks, of which
-${n} are below minChunkSize.`}}function Se(t,n,{hook:e,id:r}={}){return!t.code||t.code.startsWith("PLUGIN_")||t.pluginCode||(t.pluginCode=t.code),t.code=xm,t.plugin=n,e&&(t.hook=e),r&&(t.id=r),t}function Am(t){return{code:Hs,message:`Multiple conflicting contents for sourcemap source ${t}`}}function ro(t,n,e){const r=e?"reexport":"import";return{code:Ws,exporter:t,message:`The named export "${n}" was ${r}ed from the external module "${H(t)}" even though its interop type is "defaultOnly". Either remove or change this ${r} or change the value of the "output.interop" option.`,url:wn(Va)}}function Im(t){return{code:Ws,exporter:t,message:`There was a namespace "*" reexport from the external module "${H(t)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:wn(Va)}}function Mn(t){return{code:Em,message:t}}function Bt(t,n,e,r,a){Ae(t,n,e,r.onLog,r.strictDeprecations,a)}function Ae(t,n,e,r,a,i){if(e||a){const s=function(o,_,l){return{code:sm,message:o,url:wn(_),...l?{plugin:l}:{}}}(t,n,i);if(a)return L(s);r(V,s)}}class fn{constructor(n,e,r,a,i,s){this.options=n,this.id=e,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=za(e.split(/[/\\]/).pop());const{importers:o,dynamicImporters:_}=this,l=this.info={assertions:s,ast:null,code:null,dynamicallyImportedIdResolutions:bn,dynamicallyImportedIds:bn,get dynamicImporters(){return _.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){return Bt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Rs,!0,n),l.moduleSideEffects},id:e,implicitlyLoadedAfterOneOf:bn,implicitlyLoadedBefore:bn,importedIdResolutions:bn,importedIds:bn,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:a,moduleSideEffects:r,syntheticNamedExports:!1};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}getVariableForExportName(n){const e=this.declarations.get(n);if(e)return[e];const r=new br(this,n);return this.declarations.set(n,r),this.exportedVariables.set(r,n),[r]}suggestName(n){const e=(this.nameSuggestions.get(n)??0)+1;this.nameSuggestions.set(n,e),e>this.mostCommonSuggestion&&(this.mostCommonSuggestion=e,this.suggestedVariableName=n)}warnUnusedImports(){const n=[...this.declarations].filter(([o,_])=>o!=="*"&&!_.included&&!this.reexported&&!_.referenced).map(([o])=>o);if(n.length===0)return;const e=new Set;for(const o of n)for(const _ of this.declarations.get(o).module.importers)e.add(_);const r=[...e];var a,i,s;this.options.onLog(V,{code:"UNUSED_EXTERNAL_IMPORT",exporter:a=this.id,ids:s=r,message:`${mt(i=n,["is","are"])} imported from external module "${a}" but never used in ${mt(s.map(o=>H(o)))}.`,names:i})}}const ae={ArrayPattern(t,n){for(const e of n.elements)e&&ae[e.type](t,e)},AssignmentPattern(t,n){ae[n.left.type](t,n.left)},Identifier(t,n){t.push(n.name)},MemberExpression(){},ObjectPattern(t,n){for(const e of n.properties)e.type==="RestElement"?ae.RestElement(t,e):ae[e.value.type](t,e.value)},RestElement(t,n){ae[n.argument.type](t,n.argument)}},Nm=function(t){const n=[];return ae[t.type](n,t),n};function Ha(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Er(){return{accessed:new re,assigned:new re,brokenFlow:!1,called:new Ls,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ls,replacedVariableInits:new Map}}function Ie(t,n=null){return Object.create(n,t)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const ie=new class extends qn{getLiteralValueAtPath(){}},Ft={value:{hasEffectsWhenCalled:null,returns:U}},Wa=new class extends qn{getReturnExpressionWhenCalledAtPath(t){return t.length===1?je(Ka,t[0]):gn}hasEffectsOnInteractionAtPath(t,n,e){return n.type===0?t.length>1:n.type!==2||t.length!==1||Te(Ka,t[0],n,e)}},$t={value:{hasEffectsWhenCalled:null,returns:Wa}},se=new class extends qn{getReturnExpressionWhenCalledAtPath(t){return t.length===1?je(Ya,t[0]):gn}hasEffectsOnInteractionAtPath(t,n,e){return n.type===0?t.length>1:n.type!==2||t.length!==1||Te(Ya,t[0],n,e)}},oe={value:{hasEffectsWhenCalled:null,returns:se}},Ja=new class extends qn{getReturnExpressionWhenCalledAtPath(t){return t.length===1?je(Ne,t[0]):gn}hasEffectsOnInteractionAtPath(t,n,e){return n.type===0?t.length>1:n.type!==2||t.length!==1||Te(Ne,t[0],n,e)}},J={value:{hasEffectsWhenCalled:null,returns:Ja}},ao={value:{hasEffectsWhenCalled({args:t},n){const e=t[2];return t.length<3||typeof e.getLiteralValueAtPath(X,xn,{deoptimizeCache(){}})=="symbol"&&e.hasEffectsOnInteractionAtPath(X,gr,n)},returns:Ja}},kr=Ie({hasOwnProperty:$t,isPrototypeOf:$t,propertyIsEnumerable:$t,toLocaleString:J,toString:J,valueOf:Ft}),Ka=Ie({valueOf:$t},kr),Ya=Ie({toExponential:J,toFixed:J,toLocaleString:J,toPrecision:J,valueOf:oe},kr),Tm=Ie({exec:Ft,test:$t},kr),Ne=Ie({anchor:J,at:Ft,big:J,blink:J,bold:J,charAt:J,charCodeAt:oe,codePointAt:Ft,concat:J,endsWith:$t,fixed:J,fontcolor:J,fontsize:J,includes:$t,indexOf:oe,italics:J,lastIndexOf:oe,link:J,localeCompare:oe,match:Ft,matchAll:Ft,normalize:J,padEnd:J,padStart:J,repeat:J,replace:ao,replaceAll:ao,search:oe,slice:J,small:J,split:Ft,startsWith:$t,strike:J,sub:J,substr:J,substring:J,sup:J,toLocaleLowerCase:J,toLocaleUpperCase:J,toLowerCase:J,toString:J,toUpperCase:J,trim:J,trimEnd:J,trimLeft:J,trimRight:J,trimStart:J,valueOf:J},kr);function Te(t,n,e,r){var a,i;return typeof n!="string"||!t[n]||((i=(a=t[n]).hasEffectsWhenCalled)==null?void 0:i.call(a,e,r))||!1}function je(t,n){return typeof n=="string"&&t[n]?[t[n].returns,!1]:gn}function Za(t,n,e){e(t,n)}function Gt(t,n,e){}var j={};j.Program=j.BlockStatement=j.StaticBlock=function(t,n,e){for(var r=0,a=t.body;r=i.end;)Xm(t,i,a),i=r[++n.annotationIndex];if(i&&i.end<=t.end)for(j[e](t,n,co);(i=r[n.annotationIndex])&&i.end<=t.end;)++n.annotationIndex,Sr(t,i,!1)}const Vm=/[^\s(]/g,ti=/\S/g;function Xm(t,n,e){const r=[];let a;if(Cr(e.slice(n.end,t.start),Vm)){const i=t.start;for(;;){switch(r.push(t),t.type){case Vn:case Lm:t=t.expression;continue;case Fm:if(Cr(e.slice(i,t.start),ti)){t=t.expressions[0];continue}a=!0;break;case Mm:if(Cr(e.slice(i,t.start),ti)){t=t.test;continue}a=!0;break;case zm:case jm:if(Cr(e.slice(i,t.start),ti)){t=t.left;continue}a=!0;break;case Pm:case Dm:t=t.declaration;continue;case Rm:{const s=t;if(s.kind==="const"){t=s.declarations[0].init;continue}a=!0;break}case Gm:t=t.init;continue;case Om:case Qa:case so:case Bm:break;default:a=!0}break}}else a=!0;if(a)Sr(t,n,!1);else for(const i of r)Sr(i,n,!0)}function Cr(t,n){let e;for(;(e=n.exec(t))!==null;){if(e[0]==="/"){const r=t.charCodeAt(n.lastIndex);if(r===42){n.lastIndex=t.indexOf("*/",n.lastIndex+1)+2;continue}if(r===47){n.lastIndex=t.indexOf(`
-`,n.lastIndex+1)+1;continue}}return n.lastIndex=0,!1}return!0}const Um=[["pure",/[#@]__PURE__/],["noSideEffects",/[#@]__NO_SIDE_EFFECTS__/]];function Sr(t,n,e){const r=e?_o:lo,a=t[r];a?a.push(n):t[r]=[n]}const ei={ImportExpression:["arguments"],Literal:[],Program:["body"]},uo="variables";class O extends qn{constructor(n,e,r,a=!1){super(),this.deoptimized=!1,this.esTreeNode=a?n:null,this.keys=ei[n.type]||function(i){return ei[i.type]=Object.keys(i).filter(s=>typeof i[s]=="object"&&s.charCodeAt(0)!==95),ei[i.type]}(n),this.parent=e,this.context=e.context,this.createScope(r),this.parseNode(n),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(n,e){}bind(){for(const n of this.keys){const e=this[n];if(Array.isArray(e))for(const r of e)r==null||r.bind();else e&&e.bind()}}createScope(n){this.scope=n}hasEffects(n){this.deoptimized||this.applyDeoptimizations();for(const e of this.keys){const r=this[e];if(r!==null){if(Array.isArray(r)){for(const a of r)if(a!=null&&a.hasEffects(n))return!0}else if(r.hasEffects(n))return!0}}return!1}hasEffectsAsAssignmentTarget(n,e){return this.hasEffects(n)||this.hasEffectsOnInteractionAtPath(X,this.assignmentInteraction,n)}include(n,e,r){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const a of this.keys){const i=this[a];if(i!==null)if(Array.isArray(i))for(const s of i)s==null||s.include(n,e);else i.include(n,e)}}includeAsAssignmentTarget(n,e,r){this.include(n,e)}initialise(){}insertSemicolon(n){n.original[this.end-1]!==";"&&n.appendLeft(this.end,";")}parseNode(n,e){for(const[r,a]of Object.entries(n))if(!this.hasOwnProperty(r))if(r.charCodeAt(0)===95){if(r===_o){const i=a;this.annotations=i,this.context.options.treeshake.annotations&&(this.annotationNoSideEffects=i.some(s=>s.annotationType==="noSideEffects"),this.annotationPure=i.some(s=>s.annotationType==="pure"))}else if(r===lo)for(const{start:i,end:s}of a)this.context.magicString.remove(i,s)}else if(typeof a!="object"||a===null)this[r]=a;else if(Array.isArray(a)){this[r]=[];for(const i of a)this[r].push(i===null?null:new(this.context.getNodeConstructor(i.type))(i,this,this.scope,e==null?void 0:e.includes(r)))}else this[r]=new(this.context.getNodeConstructor(a.type))(a,this,this.scope,e==null?void 0:e.includes(r))}render(n,e){for(const r of this.keys){const a=this[r];if(a!==null)if(Array.isArray(a))for(const i of a)i==null||i.render(n,e);else a.render(n,e)}}setAssignedValue(n){this.assignmentInteraction={args:[null,n],type:1}}shouldBeIncluded(n){return this.included||!n.brokenFlow&&this.hasEffects(Er())}applyDeoptimizations(){this.deoptimized=!0;for(const n of this.keys){const e=this[n];if(e!==null)if(Array.isArray(e))for(const r of e)r==null||r.deoptimizePath(nn);else e.deoptimizePath(nn)}this.context.requestTreeshakingPass()}}class Le extends O{deoptimizeArgumentsOnInteractionAtPath(n,e,r){e.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(n,[on,...e],r)}hasEffects(n){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:e}=this.context.options.treeshake;return this.argument.hasEffects(n)||e&&(e==="always"||this.argument.hasEffectsOnInteractionAtPath(nn,Pa,n))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([on,on]),this.context.requestTreeshakingPass()}}class jn extends qn{constructor(n){super(),this.description=n}deoptimizeArgumentsOnInteractionAtPath({args:n,type:e},r){var a;e===2&&r.length===0&&this.description.mutatesSelfAsArray&&((a=n[0])==null||a.deoptimizePath(Da))}getReturnExpressionWhenCalledAtPath(n,{args:e}){return n.length>0?gn:[this.description.returnsPrimitive||(this.description.returns==="self"?e[0]||U:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(n,e,r){var i,s;const{type:a}=e;if(n.length>(a===0?1:0))return!0;if(a===2){const{args:o}=e;if(this.description.mutatesSelfAsArray===!0&&((i=o[0])!=null&&i.hasEffectsOnInteractionAtPath(Da,Oa,r)))return!0;if(this.description.callsArgs){for(const _ of this.description.callsArgs)if((s=o[_+1])!=null&&s.hasEffectsOnInteractionAtPath(X,gr,r))return!0}}return!1}}const Ar=[new jn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Wa})],Me=[new jn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ja})],fo=[new jn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:se})],mo=[new jn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:U})],De=/^\d+$/;class Fn extends qn{constructor(n,e,r=!1){if(super(),this.prototypeExpression=e,this.immutable=r,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.hasLostTrack=!1,this.hasUnknownDeoptimizedInteger=!1,this.hasUnknownDeoptimizedProperty=!1,this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(n))this.buildPropertyMaps(n);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=n;for(const a of Object.values(n))this.allProperties.push(...a)}}deoptimizeAllProperties(n){var r;const e=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(n?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!e){for(const a of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const i of a)i.deoptimizePath(nn);(r=this.prototypeExpression)==null||r.deoptimizePath([on,on]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(n,e,r){var f;const[a,...i]=e,{args:s,type:o}=n;if(this.hasLostTrack||(o===2||e.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof a=="string"&&this.deoptimizedPaths[a]))return void xt(n);const[_,l,u]=o===2||e.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:o===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof a=="string"){if(_[a]){const m=l[a];if(m)for(const h of m)h.deoptimizeArgumentsOnInteractionAtPath(n,i,r);if(!this.immutable)for(const h of s)h&&this.additionalExpressionsToBeDeoptimized.add(h);return}for(const m of u)m.deoptimizeArgumentsOnInteractionAtPath(n,i,r);if(De.test(a))for(const m of this.unknownIntegerProps)m.deoptimizeArgumentsOnInteractionAtPath(n,i,r)}else{for(const m of[...Object.values(l),u])for(const h of m)h.deoptimizeArgumentsOnInteractionAtPath(n,i,r);for(const m of this.unknownIntegerProps)m.deoptimizeArgumentsOnInteractionAtPath(n,i,r)}if(!this.immutable)for(const m of s)m&&this.additionalExpressionsToBeDeoptimized.add(m);(f=this.prototypeExpression)==null||f.deoptimizeArgumentsOnInteractionAtPath(n,e,r)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[n,e]of Object.entries(this.propertiesAndGettersByKey))if(De.test(n))for(const r of e)r.deoptimizePath(nn);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(n){var a;if(this.hasLostTrack||this.immutable)return;const e=n[0];if(n.length===1){if(typeof e!="string")return e===ke?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(e===hr);if(!this.deoptimizedPaths[e]){this.deoptimizedPaths[e]=!0;const i=this.expressionsToBeDeoptimizedByKey[e];if(i)for(const s of i)s.deoptimizeCache()}}const r=n.length===1?nn:n.slice(1);for(const i of typeof e=="string"?[...this.propertiesAndGettersByKey[e]||this.unmatchablePropertiesAndGetters,...this.settersByKey[e]||this.unmatchableSetters]:this.allProperties)i.deoptimizePath(r);(a=this.prototypeExpression)==null||a.deoptimizePath(n.length===1?[...n,on]:n)}getLiteralValueAtPath(n,e,r){if(n.length===0)return Ms;const a=n[0],i=this.getMemberExpressionAndTrackDeopt(a,r);return i?i.getLiteralValueAtPath(n.slice(1),e,r):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(n,e,r):n.length!==1?mn:void 0}getReturnExpressionWhenCalledAtPath(n,e,r,a){if(n.length===0)return gn;const[i,...s]=n,o=this.getMemberExpressionAndTrackDeopt(i,a);return o?o.getReturnExpressionWhenCalledAtPath(s,e,r,a):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(n,e,r,a):gn}hasEffectsOnInteractionAtPath(n,e,r){const[a,...i]=n;if(i.length>0||e.type===2){const l=this.getMemberExpression(a);return l?l.hasEffectsOnInteractionAtPath(i,e,r):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(n,e,r)}if(a===hr)return!1;if(this.hasLostTrack)return!0;const[s,o,_]=e.type===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof a=="string"){if(s[a]){const l=o[a];if(l){for(const u of l)if(u.hasEffectsOnInteractionAtPath(i,e,r))return!0}return!1}for(const l of _)if(l.hasEffectsOnInteractionAtPath(i,e,r))return!0}else for(const l of[...Object.values(o),_])for(const u of l)if(u.hasEffectsOnInteractionAtPath(i,e,r))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(n,e,r)}buildPropertyMaps(n){const{allProperties:e,propertiesAndGettersByKey:r,propertiesAndSettersByKey:a,settersByKey:i,gettersByKey:s,unknownIntegerProps:o,unmatchablePropertiesAndGetters:_,unmatchableGetters:l,unmatchableSetters:u}=this,f=[];for(let m=n.length-1;m>=0;m--){const{key:h,kind:v,property:p}=n[m];if(e.push(p),typeof h=="string")v==="set"?a[h]||(a[h]=[p,...f],i[h]=[p,...u]):v==="get"?r[h]||(r[h]=[p,..._],s[h]=[p,...l]):(a[h]||(a[h]=[p,...f]),r[h]||(r[h]=[p,..._]));else{if(h===ke){o.push(p);continue}v==="set"&&u.push(p),v==="get"&&l.push(p),v!=="get"&&f.push(p),v!=="set"&&_.push(p)}}}deoptimizeCachedEntities(){for(const n of Object.values(this.expressionsToBeDeoptimizedByKey))for(const e of n)e.deoptimizeCache();for(const n of this.additionalExpressionsToBeDeoptimized)n.deoptimizePath(nn)}deoptimizeCachedIntegerEntities(){for(const[n,e]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(De.test(n))for(const r of e)r.deoptimizeCache();for(const n of this.additionalExpressionsToBeDeoptimized)n.deoptimizePath(Da)}getMemberExpression(n){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof n!="string"||this.hasUnknownDeoptimizedInteger&&De.test(n)||this.deoptimizedPaths[n])return U;const e=this.propertiesAndGettersByKey[n];return(e==null?void 0:e.length)===1?e[0]:e||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&De.test(n)?U:null}getMemberExpressionAndTrackDeopt(n,e){if(typeof n!="string")return U;const r=this.getMemberExpression(n);return r!==U&&!this.immutable&&(this.expressionsToBeDeoptimizedByKey[n]=this.expressionsToBeDeoptimizedByKey[n]||[]).push(e),r}}const po=t=>typeof t=="string"&&/^\d+$/.test(t),Hm=new class extends qn{deoptimizeArgumentsOnInteractionAtPath(t,n){t.type!==2||n.length!==1||po(n[0])||xt(t)}getLiteralValueAtPath(t){return t.length===1&&po(t[0])?void 0:mn}hasEffectsOnInteractionAtPath(t,{type:n}){return t.length>1||n===2}},Et=new Fn({__proto__:null,hasOwnProperty:Ar,isPrototypeOf:Ar,propertyIsEnumerable:Ar,toLocaleString:Me,toString:Me,valueOf:mo},Hm,!0),ri=[{key:ke,kind:"init",property:U},{key:"length",kind:"init",property:se}],ho=[new jn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Wa})],go=[new jn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:se})],Wm=[new jn({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new Fn(ri,Nr),returnsPrimitive:null})],Ir=[new jn({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new Fn(ri,Nr),returnsPrimitive:null})],ai=[new jn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new Fn(ri,Nr),returnsPrimitive:null})],bo=[new jn({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:se})],vo=[new jn({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:U})],yo=[new jn({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:U})],Pe=[new jn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:U})],ii=[new jn({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Jm=[new jn({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Nr=new Fn({__proto__:null,at:yo,concat:Ir,copyWithin:ii,entries:Ir,every:ho,fill:ii,filter:ai,find:Pe,findIndex:go,findLast:Pe,findLastIndex:go,flat:Ir,flatMap:ai,forEach:Pe,includes:Ar,indexOf:fo,join:Me,keys:mo,lastIndexOf:fo,map:ai,pop:vo,push:bo,reduce:Pe,reduceRight:Pe,reverse:ii,shift:vo,slice:Ir,some:ho,sort:Jm,splice:Wm,toLocaleString:Me,toString:Me,unshift:bo,values:yo},Et,!0);class xo extends O{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(n,e,r){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(n,e,r)}deoptimizePath(n){this.getObjectEntity().deoptimizePath(n)}getLiteralValueAtPath(n,e,r){return this.getObjectEntity().getLiteralValueAtPath(n,e,r)}getReturnExpressionWhenCalledAtPath(n,e,r,a){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(n,e,r,a)}hasEffectsOnInteractionAtPath(n,e,r){return this.getObjectEntity().hasEffectsOnInteractionAtPath(n,e,r)}applyDeoptimizations(){this.deoptimized=!0;let n=!1;for(let e=0;ethis.init.deoptimizeArgumentsOnInteractionAtPath(n,e,r),void 0)}deoptimizePath(n){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(n,this))if(n.length===0){if(!this.isReassigned){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=bn;for(const r of e)r.deoptimizeCache();this.init.deoptimizePath(nn)}}else this.init.deoptimizePath(n)}getLiteralValueAtPath(n,e,r){return this.isReassigned?mn:e.withTrackedEntityAtPath(n,this.init,()=>(this.expressionsToBeDeoptimized.push(r),this.init.getLiteralValueAtPath(n,e,r)),mn)}getReturnExpressionWhenCalledAtPath(n,e,r,a){return this.isReassigned?gn:r.withTrackedEntityAtPath(n,this.init,()=>(this.expressionsToBeDeoptimized.push(a),this.init.getReturnExpressionWhenCalledAtPath(n,e,r,a)),gn)}hasEffectsOnInteractionAtPath(n,e,r){switch(e.type){case 0:return!!this.isReassigned||!r.accessed.trackEntityAtPathAndGetIfTracked(n,this)&&this.init.hasEffectsOnInteractionAtPath(n,e,r);case 1:return!!this.included||n.length!==0&&(!!this.isReassigned||!r.assigned.trackEntityAtPathAndGetIfTracked(n,this)&&this.init.hasEffectsOnInteractionAtPath(n,e,r));case 2:return!!this.isReassigned||!(e.withNew?r.instantiated:r.called).trackEntityAtPathAndGetIfTracked(n,e.args,this)&&this.init.hasEffectsOnInteractionAtPath(n,e,r)}}include(){if(!this.included){this.included=!0;for(const n of this.declarations){n.included||n.include(Ha(),!1);let e=n.parent;for(;!e.included&&(e.included=!0,e.type!==wr);)e=e.parent}}}includeCallArguments(n,e){if(this.isReassigned||n.includedCallArguments.has(this.init))for(const r of e)r.include(n,!1);else n.includedCallArguments.add(this.init),this.init.includeCallArguments(n,e),n.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return this.additionalInitializers===null&&(this.additionalInitializers=[this.init],this.init=U,this.isReassigned=!0),this.additionalInitializers}mergeDeclarations(n){const{declarations:e}=this;for(const a of n.declarations)e.push(a);const r=this.markInitializersForDeoptimization();if(r.push(n.init),n.additionalInitializers)for(const a of n.additionalInitializers)r.push(a)}}const Eo=bn,Km=new Set([on]),Ym=new re,Zm=new Set([U]);class ko extends dt{constructor(n,e,r){super(n,e,U,r),this.deoptimizationInteractions=[],this.deoptimizations=new re,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(n){if(n===U){if(!this.entitiesToBeDeoptimized.has(U)){this.entitiesToBeDeoptimized.add(U);for(const{interaction:e}of this.deoptimizationInteractions)xt(e);this.deoptimizationInteractions=Eo}}else if(this.deoptimizedFields.has(on))n.deoptimizePath(nn);else if(!this.entitiesToBeDeoptimized.has(n)){this.entitiesToBeDeoptimized.add(n);for(const e of this.deoptimizedFields)n.deoptimizePath([e]);for(const{interaction:e,path:r}of this.deoptimizationInteractions)n.deoptimizeArgumentsOnInteractionAtPath(e,r,xn)}}deoptimizeArgumentsOnInteractionAtPath(n,e){if(e.length>=2||this.entitiesToBeDeoptimized.has(U)||this.deoptimizationInteractions.length>=20||e.length===1&&(this.deoptimizedFields.has(on)||n.type===2&&this.deoptimizedFields.has(e[0])))xt(n);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(e,n.args)){for(const r of this.entitiesToBeDeoptimized)r.deoptimizeArgumentsOnInteractionAtPath(n,e,xn);this.entitiesToBeDeoptimized.has(U)||this.deoptimizationInteractions.push({interaction:n,path:e})}}deoptimizePath(n){if(n.length===0||this.deoptimizedFields.has(on))return;const e=n[0];if(!this.deoptimizedFields.has(e)){this.deoptimizedFields.add(e);for(const r of this.entitiesToBeDeoptimized)r.deoptimizePath(n);e===on&&(this.deoptimizationInteractions=Eo,this.deoptimizations=Ym,this.deoptimizedFields=Km,this.entitiesToBeDeoptimized=Zm)}}getReturnExpressionWhenCalledAtPath(n){return n.length===0?this.deoptimizePath(nn):this.deoptimizedFields.has(n[0])||this.deoptimizePath([n[0]]),gn}}const Qm="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",wo=64;function Tr(t){let n="";do{const e=t%wo;t=t/wo|0,n=Qm[e]+n}while(t!==0);return n}function et(t,n,e){let r=t,a=1;for(;n.has(r)||vr.has(r)||e!=null&&e.has(r);)r=`${t}$${Tr(a++)}`;return n.add(r),r}let Co=class{constructor(){this.children=[],this.variables=new Map}addDeclaration(t,n,e,r){const a=t.name;let i=this.variables.get(a);return i?i.addDeclaration(t,e):(i=new dt(t.name,t,e||ie,n),this.variables.set(a,i)),i}contains(t){return this.variables.has(t)}findVariable(t){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class Kn extends Co{constructor(n){super(),this.accessedOutsideVariables=new Map,this.parent=n,n.children.push(this)}addAccessedDynamicImport(n){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(n),this.parent instanceof Kn&&this.parent.addAccessedDynamicImport(n)}addAccessedGlobals(n,e){const r=e.get(this)||new Set;for(const a of n)r.add(a);e.set(this,r),this.parent instanceof Kn&&this.parent.addAccessedGlobals(n,e)}addNamespaceMemberAccess(n,e){this.accessedOutsideVariables.set(n,e),this.parent.addNamespaceMemberAccess(n,e)}addReturnExpression(n){this.parent instanceof Kn&&this.parent.addReturnExpression(n)}addUsedOutsideNames(n,e,r,a){for(const s of this.accessedOutsideVariables.values())s.included&&(n.add(s.getBaseVariableName()),e==="system"&&r.has(s)&&n.add("exports"));const i=a.get(this);if(i)for(const s of i)n.add(s)}contains(n){return this.variables.has(n)||this.parent.contains(n)}deconflict(n,e,r){const a=new Set;if(this.addUsedOutsideNames(a,n,e,r),this.accessedDynamicImports)for(const i of this.accessedDynamicImports)i.inlineNamespace&&a.add(i.inlineNamespace.getBaseVariableName());for(const[i,s]of this.variables)(s.included||s.alwaysRendered)&&s.setRenderNames(null,et(i,a,s.forbiddenNames));for(const i of this.children)i.deconflict(n,e,r)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(n){const e=this.variables.get(n)||this.accessedOutsideVariables.get(n);if(e)return e;const r=this.parent.findVariable(n);return this.accessedOutsideVariables.set(n,r),r}}class So extends Kn{constructor(n,e){super(n),this.parameters=[],this.hasRest=!1,this.context=e,this.hoistedBodyVarScope=new Kn(this)}addParameterDeclaration(n){const{name:e}=n,r=new ko(e,n,this.context),a=this.hoistedBodyVarScope.variables.get(e);return a&&(this.hoistedBodyVarScope.variables.set(e,r),r.mergeDeclarations(a)),this.variables.set(e,r),r}addParameterVariables(n,e){this.parameters=n;for(const r of n)for(const a of r)a.alwaysRendered=!0;this.hasRest=e}includeCallArguments(n,e){let r=!1,a=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const s of e)if(s instanceof Le){for(const o of e)o.include(n,!1);break}for(let s=e.length-1;s>=0;s--){const o=this.parameters[s]||i,_=e[s];if(o)if(r=!1,o.length===0)a=!0;else for(const l of o)l.included&&(a=!0),l.calledFromTryStatement&&(r=!0);!a&&_.shouldBeIncluded(n)&&(a=!0),a&&_.include(n,r)}}}class Ao extends So{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(n){this.returnExpressions.push(n)}getReturnExpression(){return this.returnExpression===null&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(this.returnExpressions.length===1)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=U;for(const n of this.returnExpressions)n.deoptimizePath(nn)}}}function Io(t,n){if(t.type==="MemberExpression")return!t.computed&&Io(t.object,t);if(t.type==="Identifier"){if(!n)return!0;switch(n.type){case"MemberExpression":return n.computed||t===n.object;case"MethodDefinition":return n.computed;case"PropertyDefinition":case"Property":return n.computed||t===n.value;case"ExportSpecifier":case"ImportSpecifier":return t===n.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const si=Symbol("PureFunction"),rt=()=>{},pn=Symbol("Value Properties"),jr=()=>Ms,No=()=>!0,at={deoptimizeArgumentsOnCall:rt,getLiteralValue:jr,hasEffectsWhenCalled:()=>!1},kt={deoptimizeArgumentsOnCall:rt,getLiteralValue:jr,hasEffectsWhenCalled:No},C={__proto__:null,[pn]:kt},M={__proto__:null,[pn]:at},oi={__proto__:null,[pn]:{deoptimizeArgumentsOnCall({args:[,t]}){t==null||t.deoptimizePath(nn)},getLiteralValue:jr,hasEffectsWhenCalled:({args:t},n)=>t.length<=1||t[1].hasEffectsOnInteractionAtPath(Vf,Oa,n)}},c={__proto__:null,[pn]:kt,prototype:C},Yn={__proto__:null,[pn]:at,prototype:C},Lr={__proto__:null,[pn]:{deoptimizeArgumentsOnCall:rt,getLiteralValue:jr,hasEffectsWhenCalled:({args:t})=>t.length>1&&!(t[1]instanceof xo)},prototype:C},pt={__proto__:null,[pn]:at,from:C,of:M,prototype:C},_e={__proto__:null,[pn]:at,supportedLocalesOf:Yn},_i={global:C,globalThis:C,self:C,window:C,__proto__:null,[pn]:kt,Array:{__proto__:null,[pn]:kt,from:C,isArray:M,of:M,prototype:C},ArrayBuffer:{__proto__:null,[pn]:at,isView:M,prototype:C},Atomics:C,BigInt:c,BigInt64Array:c,BigUint64Array:c,Boolean:Yn,constructor:c,DataView:Yn,Date:{__proto__:null,[pn]:at,now:M,parse:M,prototype:C,UTC:M},decodeURI:M,decodeURIComponent:M,encodeURI:M,encodeURIComponent:M,Error:Yn,escape:M,eval:C,EvalError:Yn,Float32Array:pt,Float64Array:pt,Function:c,hasOwnProperty:C,Infinity:C,Int16Array:pt,Int32Array:pt,Int8Array:pt,isFinite:M,isNaN:M,isPrototypeOf:C,JSON:C,Map:Lr,Math:{__proto__:null,[pn]:kt,abs:M,acos:M,acosh:M,asin:M,asinh:M,atan:M,atan2:M,atanh:M,cbrt:M,ceil:M,clz32:M,cos:M,cosh:M,exp:M,expm1:M,floor:M,fround:M,hypot:M,imul:M,log:M,log10:M,log1p:M,log2:M,max:M,min:M,pow:M,random:M,round:M,sign:M,sin:M,sinh:M,sqrt:M,tan:M,tanh:M,trunc:M},NaN:C,Number:{__proto__:null,[pn]:at,isFinite:M,isInteger:M,isNaN:M,isSafeInteger:M,parseFloat:M,parseInt:M,prototype:C},Object:{__proto__:null,[pn]:at,create:M,defineProperty:oi,defineProperties:oi,freeze:oi,getOwnPropertyDescriptor:M,getOwnPropertyDescriptors:M,getOwnPropertyNames:M,getOwnPropertySymbols:M,getPrototypeOf:M,hasOwn:M,is:M,isExtensible:M,isFrozen:M,isSealed:M,keys:M,fromEntries:C,entries:M,prototype:C},parseFloat:M,parseInt:M,Promise:{__proto__:null,[pn]:kt,all:C,allSettled:C,any:C,prototype:C,race:C,reject:C,resolve:C},propertyIsEnumerable:C,Proxy:C,RangeError:Yn,ReferenceError:Yn,Reflect:C,RegExp:Yn,Set:Lr,SharedArrayBuffer:c,String:{__proto__:null,[pn]:at,fromCharCode:M,fromCodePoint:M,prototype:C,raw:M},Symbol:{__proto__:null,[pn]:at,for:M,keyFor:M,prototype:C,toStringTag:{__proto__:null,[pn]:{deoptimizeArgumentsOnCall:rt,getLiteralValue:()=>Ma,hasEffectsWhenCalled:No}}},SyntaxError:Yn,toLocaleString:C,toString:C,TypeError:Yn,Uint16Array:pt,Uint32Array:pt,Uint8Array:pt,Uint8ClampedArray:pt,unescape:M,URIError:Yn,valueOf:C,WeakMap:Lr,WeakSet:Lr,clearInterval:c,clearTimeout:c,console:{__proto__:null,[pn]:kt,assert:c,clear:c,count:c,countReset:c,debug:c,dir:c,dirxml:c,error:c,exception:c,group:c,groupCollapsed:c,groupEnd:c,info:c,log:c,table:c,time:c,timeEnd:c,timeLog:c,trace:c,warn:c},Intl:{__proto__:null,[pn]:kt,Collator:_e,DateTimeFormat:_e,ListFormat:_e,NumberFormat:_e,PluralRules:_e,RelativeTimeFormat:_e},setInterval:c,setTimeout:c,TextDecoder:c,TextEncoder:c,URL:c,URLSearchParams:c,AbortController:c,AbortSignal:c,addEventListener:C,alert:C,AnalyserNode:c,Animation:c,AnimationEvent:c,applicationCache:C,ApplicationCache:c,ApplicationCacheErrorEvent:c,atob:C,Attr:c,Audio:c,AudioBuffer:c,AudioBufferSourceNode:c,AudioContext:c,AudioDestinationNode:c,AudioListener:c,AudioNode:c,AudioParam:c,AudioProcessingEvent:c,AudioScheduledSourceNode:c,AudioWorkletNode:c,BarProp:c,BaseAudioContext:c,BatteryManager:c,BeforeUnloadEvent:c,BiquadFilterNode:c,Blob:c,BlobEvent:c,blur:C,BroadcastChannel:c,btoa:C,ByteLengthQueuingStrategy:c,Cache:c,caches:C,CacheStorage:c,cancelAnimationFrame:C,cancelIdleCallback:C,CanvasCaptureMediaStreamTrack:c,CanvasGradient:c,CanvasPattern:c,CanvasRenderingContext2D:c,ChannelMergerNode:c,ChannelSplitterNode:c,CharacterData:c,clientInformation:C,ClipboardEvent:c,close:C,closed:C,CloseEvent:c,Comment:c,CompositionEvent:c,confirm:C,ConstantSourceNode:c,ConvolverNode:c,CountQueuingStrategy:c,createImageBitmap:C,Credential:c,CredentialsContainer:c,crypto:C,Crypto:c,CryptoKey:c,CSS:c,CSSConditionRule:c,CSSFontFaceRule:c,CSSGroupingRule:c,CSSImportRule:c,CSSKeyframeRule:c,CSSKeyframesRule:c,CSSMediaRule:c,CSSNamespaceRule:c,CSSPageRule:c,CSSRule:c,CSSRuleList:c,CSSStyleDeclaration:c,CSSStyleRule:c,CSSStyleSheet:c,CSSSupportsRule:c,CustomElementRegistry:c,customElements:C,CustomEvent:c,DataTransfer:c,DataTransferItem:c,DataTransferItemList:c,defaultstatus:C,defaultStatus:C,DelayNode:c,DeviceMotionEvent:c,DeviceOrientationEvent:c,devicePixelRatio:C,dispatchEvent:C,document:C,Document:c,DocumentFragment:c,DocumentType:c,DOMError:c,DOMException:c,DOMImplementation:c,DOMMatrix:c,DOMMatrixReadOnly:c,DOMParser:c,DOMPoint:c,DOMPointReadOnly:c,DOMQuad:c,DOMRect:c,DOMRectReadOnly:c,DOMStringList:c,DOMStringMap:c,DOMTokenList:c,DragEvent:c,DynamicsCompressorNode:c,Element:c,ErrorEvent:c,Event:c,EventSource:c,EventTarget:c,external:C,fetch:C,File:c,FileList:c,FileReader:c,find:C,focus:C,FocusEvent:c,FontFace:c,FontFaceSetLoadEvent:c,FormData:c,frames:C,GainNode:c,Gamepad:c,GamepadButton:c,GamepadEvent:c,getComputedStyle:C,getSelection:C,HashChangeEvent:c,Headers:c,history:C,History:c,HTMLAllCollection:c,HTMLAnchorElement:c,HTMLAreaElement:c,HTMLAudioElement:c,HTMLBaseElement:c,HTMLBodyElement:c,HTMLBRElement:c,HTMLButtonElement:c,HTMLCanvasElement:c,HTMLCollection:c,HTMLContentElement:c,HTMLDataElement:c,HTMLDataListElement:c,HTMLDetailsElement:c,HTMLDialogElement:c,HTMLDirectoryElement:c,HTMLDivElement:c,HTMLDListElement:c,HTMLDocument:c,HTMLElement:c,HTMLEmbedElement:c,HTMLFieldSetElement:c,HTMLFontElement:c,HTMLFormControlsCollection:c,HTMLFormElement:c,HTMLFrameElement:c,HTMLFrameSetElement:c,HTMLHeadElement:c,HTMLHeadingElement:c,HTMLHRElement:c,HTMLHtmlElement:c,HTMLIFrameElement:c,HTMLImageElement:c,HTMLInputElement:c,HTMLLabelElement:c,HTMLLegendElement:c,HTMLLIElement:c,HTMLLinkElement:c,HTMLMapElement:c,HTMLMarqueeElement:c,HTMLMediaElement:c,HTMLMenuElement:c,HTMLMetaElement:c,HTMLMeterElement:c,HTMLModElement:c,HTMLObjectElement:c,HTMLOListElement:c,HTMLOptGroupElement:c,HTMLOptionElement:c,HTMLOptionsCollection:c,HTMLOutputElement:c,HTMLParagraphElement:c,HTMLParamElement:c,HTMLPictureElement:c,HTMLPreElement:c,HTMLProgressElement:c,HTMLQuoteElement:c,HTMLScriptElement:c,HTMLSelectElement:c,HTMLShadowElement:c,HTMLSlotElement:c,HTMLSourceElement:c,HTMLSpanElement:c,HTMLStyleElement:c,HTMLTableCaptionElement:c,HTMLTableCellElement:c,HTMLTableColElement:c,HTMLTableElement:c,HTMLTableRowElement:c,HTMLTableSectionElement:c,HTMLTemplateElement:c,HTMLTextAreaElement:c,HTMLTimeElement:c,HTMLTitleElement:c,HTMLTrackElement:c,HTMLUListElement:c,HTMLUnknownElement:c,HTMLVideoElement:c,IDBCursor:c,IDBCursorWithValue:c,IDBDatabase:c,IDBFactory:c,IDBIndex:c,IDBKeyRange:c,IDBObjectStore:c,IDBOpenDBRequest:c,IDBRequest:c,IDBTransaction:c,IDBVersionChangeEvent:c,IdleDeadline:c,IIRFilterNode:c,Image:c,ImageBitmap:c,ImageBitmapRenderingContext:c,ImageCapture:c,ImageData:c,indexedDB:C,innerHeight:C,innerWidth:C,InputEvent:c,IntersectionObserver:c,IntersectionObserverEntry:c,isSecureContext:C,KeyboardEvent:c,KeyframeEffect:c,length:C,localStorage:C,location:C,Location:c,locationbar:C,matchMedia:C,MediaDeviceInfo:c,MediaDevices:c,MediaElementAudioSourceNode:c,MediaEncryptedEvent:c,MediaError:c,MediaKeyMessageEvent:c,MediaKeySession:c,MediaKeyStatusMap:c,MediaKeySystemAccess:c,MediaList:c,MediaQueryList:c,MediaQueryListEvent:c,MediaRecorder:c,MediaSettingsRange:c,MediaSource:c,MediaStream:c,MediaStreamAudioDestinationNode:c,MediaStreamAudioSourceNode:c,MediaStreamEvent:c,MediaStreamTrack:c,MediaStreamTrackEvent:c,menubar:C,MessageChannel:c,MessageEvent:c,MessagePort:c,MIDIAccess:c,MIDIConnectionEvent:c,MIDIInput:c,MIDIInputMap:c,MIDIMessageEvent:c,MIDIOutput:c,MIDIOutputMap:c,MIDIPort:c,MimeType:c,MimeTypeArray:c,MouseEvent:c,moveBy:C,moveTo:C,MutationEvent:c,MutationObserver:c,MutationRecord:c,name:C,NamedNodeMap:c,NavigationPreloadManager:c,navigator:C,Navigator:c,NetworkInformation:c,Node:c,NodeFilter:C,NodeIterator:c,NodeList:c,Notification:c,OfflineAudioCompletionEvent:c,OfflineAudioContext:c,offscreenBuffering:C,OffscreenCanvas:c,open:C,openDatabase:C,Option:c,origin:C,OscillatorNode:c,outerHeight:C,outerWidth:C,PageTransitionEvent:c,pageXOffset:C,pageYOffset:C,PannerNode:c,parent:C,Path2D:c,PaymentAddress:c,PaymentRequest:c,PaymentRequestUpdateEvent:c,PaymentResponse:c,performance:C,Performance:c,PerformanceEntry:c,PerformanceLongTaskTiming:c,PerformanceMark:c,PerformanceMeasure:c,PerformanceNavigation:c,PerformanceNavigationTiming:c,PerformanceObserver:c,PerformanceObserverEntryList:c,PerformancePaintTiming:c,PerformanceResourceTiming:c,PerformanceTiming:c,PeriodicWave:c,Permissions:c,PermissionStatus:c,personalbar:C,PhotoCapabilities:c,Plugin:c,PluginArray:c,PointerEvent:c,PopStateEvent:c,postMessage:C,Presentation:c,PresentationAvailability:c,PresentationConnection:c,PresentationConnectionAvailableEvent:c,PresentationConnectionCloseEvent:c,PresentationConnectionList:c,PresentationReceiver:c,PresentationRequest:c,print:C,ProcessingInstruction:c,ProgressEvent:c,PromiseRejectionEvent:c,prompt:C,PushManager:c,PushSubscription:c,PushSubscriptionOptions:c,queueMicrotask:C,RadioNodeList:c,Range:c,ReadableStream:c,RemotePlayback:c,removeEventListener:C,Request:c,requestAnimationFrame:C,requestIdleCallback:C,resizeBy:C,ResizeObserver:c,ResizeObserverEntry:c,resizeTo:C,Response:c,RTCCertificate:c,RTCDataChannel:c,RTCDataChannelEvent:c,RTCDtlsTransport:c,RTCIceCandidate:c,RTCIceTransport:c,RTCPeerConnection:c,RTCPeerConnectionIceEvent:c,RTCRtpReceiver:c,RTCRtpSender:c,RTCSctpTransport:c,RTCSessionDescription:c,RTCStatsReport:c,RTCTrackEvent:c,screen:C,Screen:c,screenLeft:C,ScreenOrientation:c,screenTop:C,screenX:C,screenY:C,ScriptProcessorNode:c,scroll:C,scrollbars:C,scrollBy:C,scrollTo:C,scrollX:C,scrollY:C,SecurityPolicyViolationEvent:c,Selection:c,ServiceWorker:c,ServiceWorkerContainer:c,ServiceWorkerRegistration:c,sessionStorage:C,ShadowRoot:c,SharedWorker:c,SourceBuffer:c,SourceBufferList:c,speechSynthesis:C,SpeechSynthesisEvent:c,SpeechSynthesisUtterance:c,StaticRange:c,status:C,statusbar:C,StereoPannerNode:c,stop:C,Storage:c,StorageEvent:c,StorageManager:c,styleMedia:C,StyleSheet:c,StyleSheetList:c,SubtleCrypto:c,SVGAElement:c,SVGAngle:c,SVGAnimatedAngle:c,SVGAnimatedBoolean:c,SVGAnimatedEnumeration:c,SVGAnimatedInteger:c,SVGAnimatedLength:c,SVGAnimatedLengthList:c,SVGAnimatedNumber:c,SVGAnimatedNumberList:c,SVGAnimatedPreserveAspectRatio:c,SVGAnimatedRect:c,SVGAnimatedString:c,SVGAnimatedTransformList:c,SVGAnimateElement:c,SVGAnimateMotionElement:c,SVGAnimateTransformElement:c,SVGAnimationElement:c,SVGCircleElement:c,SVGClipPathElement:c,SVGComponentTransferFunctionElement:c,SVGDefsElement:c,SVGDescElement:c,SVGDiscardElement:c,SVGElement:c,SVGEllipseElement:c,SVGFEBlendElement:c,SVGFEColorMatrixElement:c,SVGFEComponentTransferElement:c,SVGFECompositeElement:c,SVGFEConvolveMatrixElement:c,SVGFEDiffuseLightingElement:c,SVGFEDisplacementMapElement:c,SVGFEDistantLightElement:c,SVGFEDropShadowElement:c,SVGFEFloodElement:c,SVGFEFuncAElement:c,SVGFEFuncBElement:c,SVGFEFuncGElement:c,SVGFEFuncRElement:c,SVGFEGaussianBlurElement:c,SVGFEImageElement:c,SVGFEMergeElement:c,SVGFEMergeNodeElement:c,SVGFEMorphologyElement:c,SVGFEOffsetElement:c,SVGFEPointLightElement:c,SVGFESpecularLightingElement:c,SVGFESpotLightElement:c,SVGFETileElement:c,SVGFETurbulenceElement:c,SVGFilterElement:c,SVGForeignObjectElement:c,SVGGElement:c,SVGGeometryElement:c,SVGGradientElement:c,SVGGraphicsElement:c,SVGImageElement:c,SVGLength:c,SVGLengthList:c,SVGLinearGradientElement:c,SVGLineElement:c,SVGMarkerElement:c,SVGMaskElement:c,SVGMatrix:c,SVGMetadataElement:c,SVGMPathElement:c,SVGNumber:c,SVGNumberList:c,SVGPathElement:c,SVGPatternElement:c,SVGPoint:c,SVGPointList:c,SVGPolygonElement:c,SVGPolylineElement:c,SVGPreserveAspectRatio:c,SVGRadialGradientElement:c,SVGRect:c,SVGRectElement:c,SVGScriptElement:c,SVGSetElement:c,SVGStopElement:c,SVGStringList:c,SVGStyleElement:c,SVGSVGElement:c,SVGSwitchElement:c,SVGSymbolElement:c,SVGTextContentElement:c,SVGTextElement:c,SVGTextPathElement:c,SVGTextPositioningElement:c,SVGTitleElement:c,SVGTransform:c,SVGTransformList:c,SVGTSpanElement:c,SVGUnitTypes:c,SVGUseElement:c,SVGViewElement:c,TaskAttributionTiming:c,Text:c,TextEvent:c,TextMetrics:c,TextTrack:c,TextTrackCue:c,TextTrackCueList:c,TextTrackList:c,TimeRanges:c,toolbar:C,top:C,Touch:c,TouchEvent:c,TouchList:c,TrackEvent:c,TransitionEvent:c,TreeWalker:c,UIEvent:c,ValidityState:c,visualViewport:C,VisualViewport:c,VTTCue:c,WaveShaperNode:c,WebAssembly:C,WebGL2RenderingContext:c,WebGLActiveInfo:c,WebGLBuffer:c,WebGLContextEvent:c,WebGLFramebuffer:c,WebGLProgram:c,WebGLQuery:c,WebGLRenderbuffer:c,WebGLRenderingContext:c,WebGLSampler:c,WebGLShader:c,WebGLShaderPrecisionFormat:c,WebGLSync:c,WebGLTexture:c,WebGLTransformFeedback:c,WebGLUniformLocation:c,WebGLVertexArrayObject:c,WebSocket:c,WheelEvent:c,Window:c,Worker:c,WritableStream:c,XMLDocument:c,XMLHttpRequest:c,XMLHttpRequestEventTarget:c,XMLHttpRequestUpload:c,XMLSerializer:c,XPathEvaluator:c,XPathExpression:c,XPathResult:c,XSLTProcessor:c};for(const t of["window","global","self","globalThis"])_i[t]=_i;function le(t){let n=_i;for(const e of t)if(typeof e!="string"||(n=n[e],!n))return null;return n[pn]}class li extends Pt{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(n,e,r){switch(n.type){case 0:case 1:return void(le([this.name,...e].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(n,e,r));case 2:{const a=le([this.name,...e]);return void(a?a.deoptimizeArgumentsOnCall(n):super.deoptimizeArgumentsOnInteractionAtPath(n,e,r))}}}getLiteralValueAtPath(n,e,r){const a=le([this.name,...n]);return a?a.getLiteralValue():mn}hasEffectsOnInteractionAtPath(n,e,r){switch(e.type){case 0:return n.length===0?this.name!=="undefined"&&!le([this.name]):!le([this.name,...n].slice(0,-1));case 1:return!0;case 2:{const a=le([this.name,...n]);return!a||a.hasEffectsWhenCalled(e,r)}}}}const nd={__proto__:null,class:!0,const:!0,let:!0,var:!0};class cn extends O{constructor(){super(...arguments),this.variable=null,this.isTDZAccess=null}addExportedVariables(n,e){e.has(this.variable)&&n.push(this.variable)}bind(){!this.variable&&Io(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(n,e){let r;const{treeshake:a}=this.context.options;switch(n){case"var":r=this.scope.addDeclaration(this,this.context,e,!0),a&&a.correctVarValueBeforeDeclaration&&r.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":r=this.scope.addDeclaration(this,this.context,e,!1);break;case"parameter":r=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${n}.`)}return r.kind=n,[this.variable=r]}deoptimizeArgumentsOnInteractionAtPath(n,e,r){this.variable.deoptimizeArgumentsOnInteractionAtPath(n,e,r)}deoptimizePath(n){var e;n.length!==0||this.scope.contains(this.name)||this.disallowImportReassignment(),(e=this.variable)==null||e.deoptimizePath(n)}getLiteralValueAtPath(n,e,r){return this.getVariableRespectingTDZ().getLiteralValueAtPath(n,e,r)}getReturnExpressionWhenCalledAtPath(n,e,r,a){const[i,s]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(n,e,r,a);return[i,s||this.isPureFunction(n)]}hasEffects(n){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||this.variable.kind==="var")||this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof li&&!this.isPureFunction(X)&&this.variable.hasEffectsOnInteractionAtPath(X,Pa,n)}hasEffectsOnInteractionAtPath(n,e,r){switch(e.type){case 0:return this.variable!==null&&!this.isPureFunction(n)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(n,e,r);case 1:return(n.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(n,e,r);case 2:return!this.isPureFunction(n)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(n,e,r)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,this.variable!==null&&this.context.includeVariableInModule(this.variable))}includeCallArguments(n,e){this.variable.includeCallArguments(n,e)}isPossibleTDZ(){if(this.isTDZAccess!==null)return this.isTDZAccess;if(!(this.variable instanceof dt&&this.variable.kind&&this.variable.kind in nd&&this.variable.module===this.context.module))return this.isTDZAccess=!1;let n;return this.variable.declarations&&this.variable.declarations.length===1&&(n=this.variable.declarations[0])&&this.start=r)return r;a=t.charCodeAt(++e),++e,(e=a===47?t.indexOf(`
-`,e)+1:t.indexOf("*/",e)+2)>r&&(r=t.indexOf(n,e))}}const Lo=/\S/g;function wt(t,n){return Lo.lastIndex=n,Lo.exec(t).index}function Oe(t){let n,e,r=0;for(n=t.indexOf(`
-`,r);;){if(r=t.indexOf("/",r),r===-1||r>n)return[n,n+1];if(e=t.charCodeAt(r+1),e===47)return[r,n+1];r=t.indexOf("*/",r+3)+2,r>n&&(n=t.indexOf(`
-`,r))}}function ze(t,n,e,r,a){let i,s,o,_,l=t[0],u=!l.included||l.needsBoundaries;u&&(_=e+Oe(n.original.slice(e,l.start))[1]);for(let f=1;f<=t.length;f++)i=l,s=_,o=u,l=t[f],u=l!==void 0&&(!l.included||l.needsBoundaries),o||u?(_=i.end+Oe(n.original.slice(i.end,l===void 0?r:l.start))[1],i.included?o?i.render(n,a,{end:_,start:s}):i.render(n,a):ci(i,n,s,_)):i.render(n,a)}function Mo(t,n,e,r){const a=[];let i,s,o,_,l=e-1;for(const u of t){for(i!==void 0&&(l=i.end+En(n.original.slice(i.end,u.start),",")),s=o=l+1+Oe(n.original.slice(l+1,u.start))[1];_=n.original.charCodeAt(s),_===32||_===9||_===10||_===13;)s++;i!==void 0&&a.push({contentEnd:o,end:s,node:i,separator:l,start:e}),i=u,e=s}return a.push({contentEnd:r,end:r,node:i,separator:null,start:e}),a}function Mr(t,n,e){for(;;){const[r,a]=Oe(t.original.slice(n,e));if(r===-1)break;t.remove(n+r,n+=a)}}class qt extends Kn{addDeclaration(n,e,r,a){if(a){const i=this.parent.addDeclaration(n,e,r,a);return i.markInitializersForDeoptimization(),i}return super.addDeclaration(n,e,r,!1)}}class Vt extends O{initialise(){var n,e;this.directive&&this.directive!=="use strict"&&this.parent.type===wr&&this.context.log(V,(n=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:e=this.context.module.id,message:`Module level directives cause errors when bundled, "${n}" in "${H(e)}" was ignored.`}),this.start)}render(n,e){super.render(n,e),this.included&&this.insertSemicolon(n)}shouldBeIncluded(n){return this.directive&&this.directive!=="use strict"?this.parent.type!==wr:super.shouldBeIncluded(n)}applyDeoptimizations(){}}class Dr extends O{constructor(){super(...arguments),this.directlyIncluded=!1}addImplicitReturnExpressionToScope(){const n=this.body[this.body.length-1];n&&n.type==="ReturnStatement"||this.scope.addReturnExpression(U)}createScope(n){this.scope=this.parent.preventChildBlockScope?n:new qt(n)}hasEffects(n){if(this.deoptimizeBody)return!0;for(const e of this.body){if(n.brokenFlow)break;if(e.hasEffects(n))return!0}return!1}include(n,e){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(e=!0);for(const r of this.body)(e||r.shouldBeIncluded(n))&&r.include(n,e)}}initialise(){const n=this.body[0];this.deoptimizeBody=n instanceof Vt&&n.directive==="use asm"}render(n,e){this.body.length>0?ze(this.body,n,this.start+1,this.end-1,e):super.render(n,e)}}class ui extends O{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(n,e){this.argument.addExportedVariables(n,e)}declare(n,e){return this.declarationInit=e,this.argument.declare(n,U)}deoptimizePath(n){n.length===0&&this.argument.deoptimizePath(X)}hasEffectsOnInteractionAtPath(n,e,r){return n.length>0||this.argument.hasEffectsOnInteractionAtPath(X,e,r)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,this.declarationInit!==null&&(this.declarationInit.deoptimizePath([on,on]),this.context.requestTreeshakingPass())}}class fi extends O{constructor(){super(...arguments),this.objectEntity=null,this.deoptimizedReturn=!1}deoptimizeArgumentsOnInteractionAtPath(n,e,r){if(n.type===2){const{parameters:a}=this.scope,{args:i}=n;let s=!1;for(let o=0;o0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(n,e,r,a):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(nn),this.context.requestTreeshakingPass()),gn):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(n,e,r){if(n.length>0||e.type!==2)return this.getObjectEntity().hasEffectsOnInteractionAtPath(n,e,r);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:a}=this.context.options.treeshake,i=this.scope.getReturnExpression();if(i.hasEffectsOnInteractionAtPath(["then"],gr,r)||a&&(a==="always"||i.hasEffectsOnInteractionAtPath(["then"],Pa,r)))return!0}for(const a of this.params)if(a.hasEffects(r))return!0;return!1}include(n,e){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:r}=n;n.brokenFlow=!1,this.body.include(n,e),n.brokenFlow=r}includeCallArguments(n,e){this.scope.includeCallArguments(n,e)}initialise(){this.scope.addParameterVariables(this.params.map(n=>n.declare("parameter",U)),this.params[this.params.length-1]instanceof ui),this.body instanceof Dr?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(n){n.body.type===io&&(this.body=new Dr(n.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(n)}addArgumentToBeDeoptimized(n){}applyDeoptimizations(){}}fi.prototype.preventChildBlockScope=!0;class mi extends fi{constructor(){super(...arguments),this.objectEntity=null}createScope(n){this.scope=new Ao(n,this.context)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(n,e,r){if(super.hasEffectsOnInteractionAtPath(n,e,r))return!0;if(this.annotationNoSideEffects)return!1;if(e.type===2){const{ignore:a,brokenFlow:i}=r;if(r.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(r))return!0;r.ignore=a,r.brokenFlow=i}return!1}include(n,e){super.include(n,e);for(const r of this.params)r instanceof cn||r.include(n,e)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new Fn([],Et)}}function Xt(t,{exportNamesByVariable:n,snippets:{_:e,getObject:r,getPropertyAccess:a}},i=""){if(t.length===1&&n.get(t[0]).length===1){const s=t[0];return`exports('${n.get(s)}',${e}${s.getName(a)}${i})`}{const s=[];for(const o of t)for(const _ of n.get(o))s.push([_,o.getName(a)+i]);return`exports(${r(s,{lineBreakIndent:null})})`}}function di(t,n,e,r,{exportNamesByVariable:a,snippets:{_:i}}){r.prependRight(n,`exports('${a.get(t)}',${i}`),r.appendLeft(e,")")}function Do(t,n,e,r,a,i){const{_:s,getPropertyAccess:o}=i.snippets;a.appendLeft(e,`,${s}${Xt([t],i)},${s}${t.getName(o)}`),r&&(a.prependRight(n,"("),a.appendLeft(e,")"))}class Be extends O{addExportedVariables(n,e){for(const r of this.properties)r.type==="Property"?r.value.addExportedVariables(n,e):r.argument.addExportedVariables(n,e)}declare(n,e){const r=[];for(const a of this.properties)r.push(...a.declare(n,e));return r}deoptimizePath(n){if(n.length===0)for(const e of this.properties)e.deoptimizePath(n)}hasEffectsOnInteractionAtPath(n,e,r){for(const a of this.properties)if(a.hasEffectsOnInteractionAtPath(X,e,r))return!0;return!1}markDeclarationReached(){for(const n of this.properties)n.markDeclarationReached()}}class td extends dt{constructor(n){super("arguments",null,U,n),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(n){this.included?n.deoptimizePath(nn):this.deoptimizedArguments.push(n)}hasEffectsOnInteractionAtPath(n,{type:e}){return e!==0||n.length>1}include(){super.include();for(const n of this.deoptimizedArguments)n.deoptimizePath(nn);this.deoptimizedArguments.length=0}}class Po extends ko{constructor(n){super("this",null,n)}hasEffectsOnInteractionAtPath(n,e,r){return(r.replacedVariableInits.get(this)||U).hasEffectsOnInteractionAtPath(n,e,r)}}class ed extends Ao{constructor(n,e){super(n,e),this.variables.set("arguments",this.argumentsVariable=new td(e)),this.variables.set("this",this.thisVariable=new Po(e))}findLexicalBoundary(){return this}includeCallArguments(n,e){if(super.includeCallArguments(n,e),this.argumentsVariable.included)for(const r of e)r.included||r.include(n,!1)}}class pi extends fi{constructor(){super(...arguments),this.objectEntity=null}createScope(n){this.scope=new ed(n,this.context),this.constructedEntity=new Fn(Object.create(null),Et),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(n,e,r){super.deoptimizeArgumentsOnInteractionAtPath(n,e,r),n.type===2&&e.length===0&&n.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(n.args[0])}hasEffects(n){var e;return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!((e=this.id)!=null&&e.hasEffects(n))}hasEffectsOnInteractionAtPath(n,e,r){if(super.hasEffectsOnInteractionAtPath(n,e,r))return!0;if(this.annotationNoSideEffects)return!1;if(e.type===2){const a=r.replacedVariableInits.get(this.scope.thisVariable);r.replacedVariableInits.set(this.scope.thisVariable,e.withNew?this.constructedEntity:U);const{brokenFlow:i,ignore:s,replacedVariableInits:o}=r;if(r.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:e.withNew},this.body.hasEffects(r))return!0;r.brokenFlow=i,a?o.set(this.scope.thisVariable,a):o.delete(this.scope.thisVariable),r.ignore=s}return!1}include(n,e){var a;super.include(n,e),(a=this.id)==null||a.include();const r=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof cn&&!r||i.include(n,e)}initialise(){var n;super.initialise(),(n=this.id)==null||n.declare("function",this)}addArgumentToBeDeoptimized(n){this.scope.argumentsVariable.addArgumentToBeDeoptimized(n)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new Fn([{key:"prototype",kind:"init",property:new Fn([],Et)}],Et)}}class Oo extends O{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(n,e){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;n:if(!this.context.usesTopLevelAwait){let r=this.parent;do if(r instanceof pi||r instanceof mi)break n;while(r=r.parent);this.context.usesTopLevelAwait=!0}}this.argument.include(n,e)}}const rd={"!=":(t,n)=>t!=n,"!==":(t,n)=>t!==n,"%":(t,n)=>t%n,"&":(t,n)=>t&n,"*":(t,n)=>t*n,"**":(t,n)=>t**n,"+":(t,n)=>t+n,"-":(t,n)=>t-n,"/":(t,n)=>t/n,"<":(t,n)=>tt<t<=n,"==":(t,n)=>t==n,"===":(t,n)=>t===n,">":(t,n)=>t>n,">=":(t,n)=>t>=n,">>":(t,n)=>t>>n,">>>":(t,n)=>t>>>n,"^":(t,n)=>t^n,"|":(t,n)=>t|n};function zo(t,n,e){if(e.arguments.length>0)if(e.arguments[e.arguments.length-1].included)for(const r of e.arguments)r.render(t,n);else{let r=e.arguments.length-2;for(;r>=0&&!e.arguments[r].included;)r--;if(r>=0){for(let a=0;a<=r;a++)e.arguments[a].render(t,n);t.remove(En(t.original,",",e.arguments[r].end),e.end-1)}else t.remove(En(t.original,"(",e.callee.end)+1,e.end-1)}}class Ut extends O{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(n){return n.length>0||this.value===null&&this.context.code.charCodeAt(this.start)!==110||typeof this.value=="bigint"||this.context.code.charCodeAt(this.start)===47?mn:this.value}getReturnExpressionWhenCalledAtPath(n){return n.length!==1?gn:je(this.members,n[0])}hasEffectsOnInteractionAtPath(n,e,r){switch(e.type){case 0:return n.length>(this.value===null?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||n.length!==1||Te(this.members,n[0],e,r)}}initialise(){this.members=function(n){if(n instanceof RegExp)return Tm;switch(typeof n){case"boolean":return Ka;case"number":return Ya;case"string":return Ne}return Object.create(null)}(this.value)}parseNode(n){this.value=n.value,this.regex=n.regex,super.parseNode(n)}render(n){typeof this.value=="string"&&n.indentExclusionRanges.push([this.start+1,this.end-1])}}function ad(t){return t.computed?function(n){return n instanceof Ut?String(n.value):null}(t.property):t.property.name}function Bo(t){const n=t.propertyKey,e=t.object;if(typeof n=="string"){if(e instanceof cn)return[{key:e.name,pos:e.start},{key:n,pos:t.property.start}];if(e instanceof Ct){const r=Bo(e);return r&&[...r,{key:n,pos:t.property.start}]}}return null}class Ct extends O{constructor(){super(...arguments),this.variable=null,this.assignmentDeoptimized=!1,this.bound=!1,this.expressionsToBeDeoptimized=[],this.isUndefined=!1}bind(){this.bound=!0;const n=Bo(this),e=n&&this.scope.findVariable(n[0].key);if(e!=null&&e.isNamespace){const r=Fo(e,n.slice(1),this.context);r?r==="undefined"?this.isUndefined=!0:(this.variable=r,this.scope.addNamespaceMemberAccess(function(a){let i=a[0].key;for(let s=1;s!!_&&_!==U);if(o.length!==0)if(i===U)for(const _ of o)_.deoptimizePath(nn);else r.withTrackedEntityAtPath(e,i,()=>{for(const _ of o)this.expressionsToBeDeoptimized.add(_);i.deoptimizeArgumentsOnInteractionAtPath(n,e,r)},null)}deoptimizeCache(){var n;if(((n=this.returnExpression)==null?void 0:n[0])!==U){this.returnExpression=gn;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:r}=this;this.expressionsToBeDeoptimized=Ds,this.deoptimizableDependentExpressions=bn;for(const a of e)a.deoptimizeCache();for(const a of r)a.deoptimizePath(nn)}}deoptimizePath(n){if(n.length===0||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(n,this))return;const[e]=this.getReturnExpression();e!==U&&e.deoptimizePath(n)}getLiteralValueAtPath(n,e,r){const[a]=this.getReturnExpression(e);return a===U?mn:e.withTrackedEntityAtPath(n,a,()=>(this.deoptimizableDependentExpressions.push(r),a.getLiteralValueAtPath(n,e,r)),mn)}getReturnExpressionWhenCalledAtPath(n,e,r,a){const i=this.getReturnExpression(r);return i[0]===U?i:r.withTrackedEntityAtPath(n,i,()=>{this.deoptimizableDependentExpressions.push(a);const[s,o]=i[0].getReturnExpressionWhenCalledAtPath(n,e,r,a);return[s,o||i[1]]},gn)}hasEffectsOnInteractionAtPath(n,e,r){const{type:a}=e;if(a===2){const{args:o,withNew:_}=e;if((_?r.instantiated:r.called).trackEntityAtPathAndGetIfTracked(n,o,this))return!1}else if((a===1?r.assigned:r.accessed).trackEntityAtPathAndGetIfTracked(n,this))return!1;const[i,s]=this.getReturnExpression();return(a===1||!s)&&i.hasEffectsOnInteractionAtPath(n,e,r)}}class Ro extends Go{bind(){super.bind(),this.callee instanceof cn&&(this.scope.findVariable(this.callee.name).isNamespace&&this.context.log(V,Zs(this.callee.name),this.start),this.callee.name==="eval"&&this.context.log(V,{code:"EVAL",id:n=this.context.module.id,message:`Use of eval in "${H(n)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:wn("troubleshooting/#avoiding-eval")},this.start));var n;this.interaction={args:[this.callee instanceof Ct&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(n){try{for(const e of this.arguments)if(e.hasEffects(n))return!0;return!this.annotationPure&&(this.callee.hasEffects(n)||this.callee.hasEffectsOnInteractionAtPath(X,this.interaction,n))}finally{this.deoptimized||this.applyDeoptimizations()}}include(n,e){this.deoptimized||this.applyDeoptimizations(),e?(super.include(n,e),e===uo&&this.callee instanceof cn&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(n,!1)),this.callee.includeCallArguments(n,this.arguments)}isSkippedAsOptional(n){var e,r;return((r=(e=this.callee).isSkippedAsOptional)==null?void 0:r.call(e,n))||this.optional&&this.callee.getLiteralValueAtPath(X,xn,n)==null}render(n,e,{renderedSurroundingElement:r}=In){this.callee.render(n,e,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:r}),zo(n,e,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,X,xn),this.context.requestTreeshakingPass()}getReturnExpression(n=xn){return this.returnExpression===null?(this.returnExpression=gn,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(X,this.interaction,n,this)):this.returnExpression}}class id extends So{addDeclaration(n,e,r,a){const i=this.variables.get(n.name);return i?(this.parent.addDeclaration(n,e,ie,a),i.addDeclaration(n,r),i):this.parent.addDeclaration(n,e,r,a)}}class sd extends Kn{constructor(n,e,r){super(n),this.variables.set("this",this.thisVariable=new dt("this",null,e,r)),this.instanceScope=new Kn(this),this.instanceScope.variables.set("this",new Po(r))}findLexicalBoundary(){return this}}class qo extends O{constructor(){super(...arguments),this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(n,e,r){return n.type===0&&this.kind==="get"&&e.length===0||n.type===1&&this.kind==="set"&&e.length===0?this.value.deoptimizeArgumentsOnInteractionAtPath({args:n.args,type:2,withNew:!1},X,r):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(n,e,r)}deoptimizeCache(){}deoptimizePath(n){this.getAccessedValue()[0].deoptimizePath(n)}getLiteralValueAtPath(n,e,r){return this.getAccessedValue()[0].getLiteralValueAtPath(n,e,r)}getReturnExpressionWhenCalledAtPath(n,e,r,a){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(n,e,r,a)}hasEffects(n){return this.key.hasEffects(n)}hasEffectsOnInteractionAtPath(n,e,r){return this.kind==="get"&&e.type===0&&n.length===0||this.kind==="set"&&e.type===1?this.value.hasEffectsOnInteractionAtPath(X,{args:e.args,type:2,withNew:!1},r):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(n,e,r)}applyDeoptimizations(){}getAccessedValue(){return this.accessedValue===null?this.kind==="get"?(this.accessedValue=gn,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(X,gr,xn,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class hi extends qo{applyDeoptimizations(){}}class od extends qn{constructor(n,e){super(),this.object=n,this.key=e}deoptimizeArgumentsOnInteractionAtPath(n,e,r){this.object.deoptimizeArgumentsOnInteractionAtPath(n,[this.key,...e],r)}deoptimizePath(n){this.object.deoptimizePath([this.key,...n])}getLiteralValueAtPath(n,e,r){return this.object.getLiteralValueAtPath([this.key,...n],e,r)}getReturnExpressionWhenCalledAtPath(n,e,r,a){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...n],e,r,a)}hasEffectsOnInteractionAtPath(n,e,r){return this.object.hasEffectsOnInteractionAtPath([this.key,...n],e,r)}}class Vo extends O{constructor(){super(...arguments),this.objectEntity=null}createScope(n){this.scope=new Kn(n)}deoptimizeArgumentsOnInteractionAtPath(n,e,r){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(n,e,r)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(n){this.getObjectEntity().deoptimizePath(n)}getLiteralValueAtPath(n,e,r){return this.getObjectEntity().getLiteralValueAtPath(n,e,r)}getReturnExpressionWhenCalledAtPath(n,e,r,a){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(n,e,r,a)}hasEffects(n){var r,a;this.deoptimized||this.applyDeoptimizations();const e=((r=this.superClass)==null?void 0:r.hasEffects(n))||this.body.hasEffects(n);return(a=this.id)==null||a.markDeclarationReached(),e||super.hasEffects(n)}hasEffectsOnInteractionAtPath(n,e,r){var a;return e.type===2&&n.length===0?!e.withNew||(this.classConstructor===null?(a=this.superClass)==null?void 0:a.hasEffectsOnInteractionAtPath(n,e,r):this.classConstructor.hasEffectsOnInteractionAtPath(n,e,r))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(n,e,r)}include(n,e){var r;this.deoptimized||this.applyDeoptimizations(),this.included=!0,(r=this.superClass)==null||r.include(n,e),this.body.include(n,e),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){var n;(n=this.id)==null||n.declare("class",this);for(const e of this.body.body)if(e instanceof hi&&e.kind==="constructor")return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const n of this.body.body)n.static||n instanceof hi&&n.kind==="constructor"||n.deoptimizePath(nn);this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;const n=[],e=[];for(const r of this.body.body){const a=r.static?n:e,i=r.kind;if(a===e&&!i)continue;const s=i==="set"||i==="get"?i:"init";let o;if(r.computed){const _=r.key.getLiteralValueAtPath(X,xn,this);if(typeof _=="symbol"){a.push({key:on,kind:s,property:r});continue}o=String(_)}else o=r.key instanceof cn?r.key.name:String(r.key.value);a.push({key:o,kind:s,property:r})}return n.unshift({key:"prototype",kind:"init",property:new Fn(e,this.superClass?new od(this.superClass,"prototype"):Et)}),this.objectEntity=new Fn(n,this.superClass||Et)}}class Pr extends Vo{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}parseNode(n){n.id!==null&&(this.id=new cn(n.id,this,this.scope.parent)),super.parseNode(n)}render(n,e){var o;const{exportNamesByVariable:r,format:a,snippets:{_:i,getPropertyAccess:s}}=e;if(this.id){const{variable:_,name:l}=this.id;a==="system"&&r.has(_)&&n.appendLeft(this.end,`${i}${Xt([_],e)};`);const u=_.getName(s);if(u!==l)return(o=this.superClass)==null||o.render(n,e),this.body.render(n,{...e,useOriginalName:f=>f===_}),n.prependRight(this.start,`let ${u}${i}=${i}`),void n.prependLeft(this.end,";")}super.render(n,e)}applyDeoptimizations(){super.applyDeoptimizations();const{id:n,scope:e}=this;if(n){const{name:r,variable:a}=n;for(const i of e.accessedOutsideVariables.values())i!==a&&i.forbidName(r)}}}class gi extends Vo{render(n,e,{renderedSurroundingElement:r}=In){super.render(n,e),r===Vn&&(n.appendRight(this.start,"("),n.prependLeft(this.end,")"))}}class Or extends qn{constructor(n){super(),this.expressions=n,this.included=!1}deoptimizePath(n){for(const e of this.expressions)e.deoptimizePath(n)}getReturnExpressionWhenCalledAtPath(n,e,r,a){return[new Or(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(n,e,r,a)[0])),!1]}hasEffectsOnInteractionAtPath(n,e,r){for(const a of this.expressions)if(a.hasEffectsOnInteractionAtPath(n,e,r))return!0;return!1}}function zr(t,n){const{brokenFlow:e,hasBreak:r,hasContinue:a,ignore:i}=t,{breaks:s,continues:o}=i;return i.breaks=!0,i.continues=!0,t.hasBreak=!1,t.hasContinue=!1,!!n.hasEffects(t)||(i.breaks=s,i.continues=o,t.hasBreak=r,t.hasContinue=a,t.brokenFlow=e,!1)}function Fe(t,n,e){const{brokenFlow:r,hasBreak:a,hasContinue:i}=t;t.hasBreak=!1,t.hasContinue=!1,n.include(t,e,{asSingleStatement:!0}),t.hasBreak=a,t.hasContinue=i,t.brokenFlow=r}class bi extends O{hasEffects(){return!1}initialise(){this.context.addExport(this)}render(n,e,r){n.remove(r.start,r.end)}applyDeoptimizations(){}}bi.prototype.needsBoundaries=!0;class Ge extends pi{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}parseNode(n){n.id!==null&&(this.id=new cn(n.id,this,this.scope.parent)),super.parseNode(n)}}class Br extends O{include(n,e){super.include(n,e),e&&this.context.includeVariableInModule(this.variable)}initialise(){const n=this.declaration;this.declarationName=n.id&&n.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(n,e,r){const{start:a,end:i}=r,s=function(o,_){return wt(o,En(o,"default",_)+7)}(n.original,this.start);if(this.declaration instanceof Ge)this.renderNamedDeclaration(n,s,this.declaration.id===null?function(o,_){const l=En(o,"function",_)+8;o=o.slice(l,En(o,"(",l));const u=En(o,"*");return u===-1?l:l+u+1}(n.original,s):null,e);else if(this.declaration instanceof Pr)this.renderNamedDeclaration(n,s,this.declaration.id===null?En(n.original,"class",a)+5:null,e);else{if(this.variable.getOriginalVariable()!==this.variable)return void ci(this,n,a,i);if(!this.variable.included)return n.remove(this.start,s),this.declaration.render(n,e,{renderedSurroundingElement:Vn}),void(n.original[this.end-1]!==";"&&n.appendLeft(this.end,";"));this.renderVariableDeclaration(n,s,e)}this.declaration.render(n,e)}applyDeoptimizations(){}renderNamedDeclaration(n,e,r,a){const{exportNamesByVariable:i,format:s,snippets:{getPropertyAccess:o}}=a,_=this.variable.getName(o);n.remove(this.start,e),r!==null&&n.appendLeft(r,` ${_}`),s==="system"&&this.declaration instanceof Pr&&i.has(this.variable)&&n.appendLeft(this.end,` ${Xt([this.variable],a)};`)}renderVariableDeclaration(n,e,{format:r,exportNamesByVariable:a,snippets:{cnst:i,getPropertyAccess:s}}){const o=n.original.charCodeAt(this.end-1)===59,_=r==="system"&&a.get(this.variable);_?(n.overwrite(this.start,e,`${i} ${this.variable.getName(s)} = exports('${_[0]}', `),n.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(n.overwrite(this.start,e,`${i} ${this.variable.getName(s)} = `),o||n.appendLeft(this.end,";"))}}Br.prototype.needsBoundaries=!0;class Xo extends O{bind(){var n;(n=this.declaration)==null||n.bind()}hasEffects(n){var e;return!!((e=this.declaration)!=null&&e.hasEffects(n))}initialise(){this.context.addExport(this)}render(n,e,r){const{start:a,end:i}=r;this.declaration===null?n.remove(a,i):(n.remove(this.start,this.declaration.start),this.declaration.render(n,e,{end:i,start:a}))}applyDeoptimizations(){}}Xo.prototype.needsBoundaries=!0;class Uo extends pi{render(n,e,{renderedSurroundingElement:r}=In){super.render(n,e),r===Vn&&(n.appendRight(this.start,"("),n.prependLeft(this.end,")"))}}class Ho extends qt{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(n,e,r,a){return this.hoistedDeclarations.push(n),super.addDeclaration(n,e,r,a)}}const Wo=Symbol("unset");class vi extends O{constructor(){super(...arguments),this.testValue=Wo}deoptimizeCache(){this.testValue=mn}hasEffects(n){var r;if(this.test.hasEffects(n))return!0;const e=this.getTestValue();if(typeof e=="symbol"){const{brokenFlow:a}=n;if(this.consequent.hasEffects(n))return!0;const i=n.brokenFlow;return n.brokenFlow=a,this.alternate===null?!1:!!this.alternate.hasEffects(n)||(n.brokenFlow=n.brokenFlow&&i,!1)}return e?this.consequent.hasEffects(n):!!((r=this.alternate)!=null&&r.hasEffects(n))}include(n,e){if(this.included=!0,e)this.includeRecursively(e,n);else{const r=this.getTestValue();typeof r=="symbol"?this.includeUnknownTest(n):this.includeKnownTest(n,r)}}parseNode(n){this.consequentScope=new Ho(this.scope),this.consequent=new(this.context.getNodeConstructor(n.consequent.type))(n.consequent,this,this.consequentScope),n.alternate&&(this.alternateScope=new Ho(this.scope),this.alternate=new(this.context.getNodeConstructor(n.alternate.type))(n.alternate,this,this.alternateScope)),super.parseNode(n)}render(n,e){const{snippets:{getPropertyAccess:r}}=e,a=this.getTestValue(),i=[],s=this.test.included,o=!this.context.options.treeshake;s?this.test.render(n,e):n.remove(this.start,this.consequent.start),this.consequent.included&&(o||typeof a=="symbol"||a)?this.consequent.render(n,e):(n.overwrite(this.consequent.start,this.consequent.end,s?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&typeof a!="symbol"&&a?(s&&this.shouldKeepAlternateBranch()?n.overwrite(this.alternate.start,this.end,";"):n.remove(this.consequent.end,this.end),i.push(...this.alternateScope.hoistedDeclarations)):(s?n.original.charCodeAt(this.alternate.start-1)===101&&n.prependLeft(this.alternate.start," "):n.remove(this.consequent.end,this.alternate.start),this.alternate.render(n,e))),this.renderHoistedDeclarations(i,n,r)}applyDeoptimizations(){}getTestValue(){return this.testValue===Wo?this.testValue=this.test.getLiteralValueAtPath(X,xn,this):this.testValue}includeKnownTest(n,e){var r;this.test.shouldBeIncluded(n)&&this.test.include(n,!1),e&&this.consequent.shouldBeIncluded(n)&&this.consequent.include(n,!1,{asSingleStatement:!0}),!e&&((r=this.alternate)!=null&&r.shouldBeIncluded(n))&&this.alternate.include(n,!1,{asSingleStatement:!0})}includeRecursively(n,e){var r;this.test.include(e,n),this.consequent.include(e,n),(r=this.alternate)==null||r.include(e,n)}includeUnknownTest(n){var a;this.test.include(n,!1);const{brokenFlow:e}=n;let r=!1;this.consequent.shouldBeIncluded(n)&&(this.consequent.include(n,!1,{asSingleStatement:!0}),r=n.brokenFlow,n.brokenFlow=e),(a=this.alternate)!=null&&a.shouldBeIncluded(n)&&(this.alternate.include(n,!1,{asSingleStatement:!0}),n.brokenFlow=n.brokenFlow&&r)}renderHoistedDeclarations(n,e,r){const a=[...new Set(n.map(i=>{const s=i.variable;return s.included?s.getName(r):""}))].filter(Boolean).join(", ");if(a){const i=this.parent.type,s=i!==wr&&i!==io;e.prependRight(this.start,`${s?"{ ":""}var ${a}; `),s&&e.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let n=this.parent;do{if(n instanceof vi&&n.alternate)return!0;if(n instanceof Dr)return!1;n=n.parent}while(n);return!1}}class Jo extends O{bind(){}hasEffects(){return!1}initialise(){this.context.addImport(this)}render(n,e,r){n.remove(r.start,r.end)}applyDeoptimizations(){}}Jo.prototype.needsBoundaries=!0;class Ko extends O{applyDeoptimizations(){}}const yi="_interopDefault",xi="_interopDefaultCompat",Fr="_interopNamespace",Gr="_interopNamespaceCompat",Ht="_interopNamespaceDefault",Re="_interopNamespaceDefaultOnly",Rr="_mergeNamespaces",qr={auto:yi,compat:xi,default:null,defaultOnly:null,esModule:null},Vr=(t,n)=>t==="esModule"||n&&(t==="auto"||t==="compat"),qe={auto:Fr,compat:Gr,default:Ht,defaultOnly:Re,esModule:null},_d=(t,n)=>t!=="esModule"&&Vr(t,n),$i=(t,n,e,r,a,i,s)=>{const o=new Set(t);for(const _ of Ci)n.has(_)&&o.add(_);return Ci.map(_=>o.has(_)?Yo[_](e,r,a,i,s,o):"").join("")},Yo={[xi](t,n,e){const{_:r,getDirectReturnFunction:a,n:i}=n,[s,o]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:xi});return`${s}${Ei(n)}${r}?${r}${e?Zo(n):Qo(n)}${o}${i}${i}`},[yi](t,n,e){const{_:r,getDirectReturnFunction:a,n:i}=n,[s,o]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:yi});return`${s}e${r}&&${r}e.__esModule${r}?${r}${e?Zo(n):Qo(n)}${o}${i}${i}`},[Gr](t,n,e,r,a,i){const{_:s,getDirectReturnFunction:o,n:_}=n;if(i.has(Ht)){const[l,u]=o(["e"],{functionReturn:!0,lineBreakIndent:null,name:Gr});return`${l}${Ei(n)}${s}?${s}e${s}:${s}${Ht}(e)${u}${_}${_}`}return`function ${Gr}(e)${s}{${_}${t}if${s}(${Ei(n)})${s}return e;${_}`+ki(t,t,n,e,r,a)+`}${_}${_}`},[Re](t,n,e,r,a){const{getDirectReturnFunction:i,getObject:s,n:o}=n,[_,l]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Re});return`${_}${wi(r,e_(a,s([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),n))}${l}${o}${o}`},[Ht](t,n,e,r,a){const{_:i,n:s}=n;return`function ${Ht}(e)${i}{${s}`+ki(t,t,n,e,r,a)+`}${s}${s}`},[Fr](t,n,e,r,a,i){const{_:s,getDirectReturnFunction:o,n:_}=n;if(i.has(Ht)){const[l,u]=o(["e"],{functionReturn:!0,lineBreakIndent:null,name:Fr});return`${l}e${s}&&${s}e.__esModule${s}?${s}e${s}:${s}${Ht}(e)${u}${_}${_}`}return`function ${Fr}(e)${s}{${_}${t}if${s}(e${s}&&${s}e.__esModule)${s}return e;${_}`+ki(t,t,n,e,r,a)+`}${_}${_}`},[Rr](t,n,e,r,a){const{_:i,cnst:s,n:o}=n,_=s==="var"&&e;return`function ${Rr}(n, m)${i}{${o}${t}${cd(`{${o}${t}${t}${t}if${i}(k${i}!==${i}'default'${i}&&${i}!(k in n))${i}{${o}`+(e?_?n_:fd:t_)(t,t+t+t+t,n)+`${t}${t}${t}}${o}${t}${t}}`,_,t,n)}${o}${t}return ${wi(r,e_(a,"n",n))};${o}}${o}${o}`}},Zo=({_:t,getObject:n})=>`e${t}:${t}${n([["default","e"]],{lineBreakIndent:null})}`,Qo=({_:t,getPropertyAccess:n})=>`e${n("default")}${t}:${t}e`,Ei=({_:t})=>`e${t}&&${t}typeof e${t}===${t}'object'${t}&&${t}'default'${t}in e`,ki=(t,n,e,r,a,i)=>{const{_:s,cnst:o,getObject:_,getPropertyAccess:l,n:u,s:f}=e,m=`{${u}`+(r?ud:t_)(t,n+t+t,e)+`${n}${t}}`;return`${n}${o} n${s}=${s}Object.create(null${i?`,${s}{${s}[Symbol.toStringTag]:${s}${Ve(_)}${s}}`:""});${u}${n}if${s}(e)${s}{${u}${n}${t}${ld(m,!r,e)}${u}${n}}${u}${n}n${l("default")}${s}=${s}e;${u}${n}return ${wi(a,"n")}${f}${u}`},ld=(t,n,{_:e,cnst:r,getFunctionIntro:a,s:i})=>r!=="var"||n?`for${e}(${r} k in e)${e}${t}`:`Object.keys(e).forEach(${a(["k"],{isAsync:!1,name:null})}${t})${i}`,cd=(t,n,e,{_:r,cnst:a,getDirectReturnFunction:i,getFunctionIntro:s,n:o})=>{if(n){const[_,l]=i(["e"],{functionReturn:!1,lineBreakIndent:{base:e,t:e},name:null});return`m.forEach(${_}e${r}&&${r}typeof e${r}!==${r}'string'${r}&&${r}!Array.isArray(e)${r}&&${r}Object.keys(e).forEach(${s(["k"],{isAsync:!1,name:null})}${t})${l});`}return`for${r}(var i${r}=${r}0;${r}i${r}<${r}m.length;${r}i++)${r}{${o}${e}${e}${a} e${r}=${r}m[i];${o}${e}${e}if${r}(typeof e${r}!==${r}'string'${r}&&${r}!Array.isArray(e))${r}{${r}for${r}(${a} k in e)${r}${t}${r}}${o}${e}}`},ud=(t,n,e)=>{const{_:r,n:a}=e;return`${n}if${r}(k${r}!==${r}'default')${r}{${a}`+n_(t,n+t,e)+`${n}}${a}`},n_=(t,n,{_:e,cnst:r,getDirectReturnFunction:a,n:i})=>{const[s,o]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${n}${r} d${e}=${e}Object.getOwnPropertyDescriptor(e,${e}k);${i}${n}Object.defineProperty(n,${e}k,${e}d.get${e}?${e}d${e}:${e}{${i}${n}${t}enumerable:${e}true,${i}${n}${t}get:${e}${s}e[k]${o}${i}${n}});${i}`},fd=(t,n,{_:e,cnst:r,getDirectReturnFunction:a,n:i})=>{const[s,o]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${n}${r} d${e}=${e}Object.getOwnPropertyDescriptor(e,${e}k);${i}${n}if${e}(d)${e}{${i}${n}${t}Object.defineProperty(n,${e}k,${e}d.get${e}?${e}d${e}:${e}{${i}${n}${t}${t}enumerable:${e}true,${i}${n}${t}${t}get:${e}${s}e[k]${o}${i}${n}${t}});${i}${n}}${i}`},t_=(t,n,{_:e,n:r})=>`${n}n[k]${e}=${e}e[k];${r}`,wi=(t,n)=>t?`Object.freeze(${n})`:n,e_=(t,n,{_:e,getObject:r})=>t?`Object.defineProperty(${n},${e}Symbol.toStringTag,${e}${Ve(r)})`:n,Ci=Object.keys(Yo);function Ve(t){return t([["value","'Module'"]],{lineBreakIndent:null})}function r_(t,n){return t.renderBaseName!==null&&n.has(t)&&t.isReassigned}class a_ extends O{declareDeclarator(n){this.id.declare(n,this.init||ie)}deoptimizePath(n){this.id.deoptimizePath(n)}hasEffects(n){var r;this.deoptimized||this.applyDeoptimizations();const e=(r=this.init)==null?void 0:r.hasEffects(n);return this.id.markDeclarationReached(),e||this.id.hasEffects(n)}include(n,e){const{deoptimized:r,id:a,init:i}=this;r||this.applyDeoptimizations(),this.included=!0,i==null||i.include(n,e),a.markDeclarationReached(),(e||a.shouldBeIncluded(n))&&a.include(n,e)}render(n,e){const{exportNamesByVariable:r,snippets:{_:a,getPropertyAccess:i}}=e,{end:s,id:o,init:_,start:l}=this,u=o.included;if(u)o.render(n,e);else{const f=En(n.original,"=",o.end);n.remove(l,wt(n.original,f+1))}_?(o instanceof cn&&_ instanceof gi&&!_.id&&o.variable.getName(i)!==o.name&&n.appendLeft(_.start+5,` ${o.name}`),_.render(n,e,u?In:{renderedSurroundingElement:Vn})):o instanceof cn&&r_(o.variable,r)&&n.appendLeft(s,`${a}=${a}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:n,init:e}=this;if(e&&n instanceof cn&&e instanceof gi&&!e.id){const{name:r,variable:a}=n;for(const i of e.scope.accessedOutsideVariables.values())i!==a&&i.forbidName(r)}}}function i_(t,n,e){return n==="external"?qe[e(t instanceof fn?t.id:null)]:n==="default"?Re:null}const md={amd:["require"],cjs:["require"],system:["module"]};function s_(t){const n=[];for(const e of t.properties){if(e.type==="RestElement"||e.computed||e.key.type!=="Identifier")return;n.push(e.key.name)}return n}class o_ extends O{applyDeoptimizations(){}}const Si="ROLLUP_FILE_URL_",Ai="import",dd={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]},pd={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Xe=(t,n="URL")=>`new ${n}(${t}).href`,Ii=(t,n=!1)=>Xe(`'${dr(t)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Xr=t=>(n,{chunkId:e})=>{const r=t(e);return n===null?`({ url: ${r} })`:n==="url"?r:"undefined"},Ni=t=>`require('u' + 'rl').pathToFileURL(${t}).href`,__=t=>Ni(`__dirname + '/${t}'`),Ti=(t,n=!1)=>`${n?"typeof document === 'undefined' ? location.href : ":""}(document.currentScript && document.currentScript.src || new URL('${dr(t)}', document.baseURI).href)`,hd={amd:t=>(t[0]!=="."&&(t="./"+t),Xe(`require.toUrl('${t}'), document.baseURI`)),cjs:t=>`(typeof document === 'undefined' ? ${__(t)} : ${Ii(t)})`,es:t=>Xe(`'${t}', import.meta.url`),iife:t=>Ii(t),system:t=>Xe(`'${t}', module.meta.url`),umd:t=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${__(t)} : ${Ii(t,!0)})`},ji={amd:Xr(()=>Xe("module.uri, document.baseURI")),cjs:Xr(t=>`(typeof document === 'undefined' ? ${Ni("__filename")} : ${Ti(t)})`),iife:Xr(t=>Ti(t)),system:(t,{snippets:{getPropertyAccess:n}})=>t===null?"module.meta":`module.meta${n(t)}`,umd:Xr(t=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Ni("__filename")} : ${Ti(t,!0)})`)};class l_ extends O{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(this.hasCachedEffect===null?this.hasCachedEffect=this.hasEffects(Er()):this.hasCachedEffect)}hasEffects(n){for(const e of this.body)if(e.hasEffects(n)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:r,log:a,module:i}=this.context;a(Ot,Cm(r,i.id,Ba(r,e.start,{offsetLine:1})),e.start)}return this.hasCachedEffect=!0}return!1}include(n,e){this.included=!0;for(const r of this.body)(e||r.shouldBeIncluded(n))&&r.include(n,e)}render(n,e){let r=this.start;if(n.original.startsWith("#!")&&(r=Math.min(n.original.indexOf(`
-`)+1,this.end),n.remove(0,r)),this.body.length>0){for(;n.original[r]==="/"&&/[*/]/.test(n.original[r+1]);){const a=Oe(n.original.slice(r,this.body[0].start));if(a[0]===-1)break;r+=a[1]}ze(this.body,n,r,this.end,e)}else super.render(n,e)}applyDeoptimizations(){}}class c_ extends O{hasEffects(n){var e;if((e=this.test)!=null&&e.hasEffects(n))return!0;for(const r of this.consequent){if(n.brokenFlow)break;if(r.hasEffects(n))return!0}return!1}include(n,e){var r;this.included=!0,(r=this.test)==null||r.include(n,e);for(const a of this.consequent)(e||a.shouldBeIncluded(n))&&a.include(n,e)}render(n,e,r){if(this.consequent.length>0){this.test&&this.test.render(n,e);const a=this.test?this.test.end:En(n.original,"default",this.start)+7,i=En(n.original,":",a)+1;ze(this.consequent,n,i,r.end,e)}else super.render(n,e)}}c_.prototype.needsBoundaries=!0;class u_ extends O{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(n){return n.length>0||this.quasis.length!==1?mn:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(n){return n.length!==1?gn:je(Ne,n[0])}hasEffectsOnInteractionAtPath(n,e,r){return e.type===0?n.length>1:e.type!==2||n.length!==1||Te(Ne,n[0],e,r)}render(n,e){n.indentExclusionRanges.push([this.start,this.end]),super.render(n,e)}}class f_ extends Pt{constructor(){super("undefined")}getLiteralValueAtPath(){}}class it extends dt{constructor(n,e,r){super(n,e,e.declaration,r),this.hasId=!1,this.originalId=null,this.originalVariable=null;const a=e.declaration;(a instanceof Ge||a instanceof Pr)&&a.id?(this.hasId=!0,this.originalId=a.id):a instanceof cn&&(this.originalId=a)}addReference(n){this.hasId||(this.name=n.name)}forbidName(n){const e=this.getOriginalVariable();e===this?super.forbidName(n):e.forbidName(n)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const n=this.getOriginalVariable();return n===this?super.getBaseVariableName():n.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof f_||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(n){const e=this.getOriginalVariable();return e===this?super.getName(n):e.getName(n)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let n,e=this;const r=new Set;do r.add(e),n=e,e=n.getDirectOriginalVariable();while(e instanceof it&&!r.has(e));return this.originalVariable=e||n}}class m_ extends Kn{constructor(n,e){super(n),this.context=e,this.variables.set("this",new dt("this",null,ie,e))}addExportDefaultDeclaration(n,e,r){const a=new it(n,e,r);return this.variables.set("default",a),a}addNamespaceMemberAccess(){}deconflict(n,e,r){for(const a of this.children)a.deconflict(n,e,r)}findLexicalBoundary(){return this}findVariable(n){const e=this.variables.get(n)||this.accessedOutsideVariables.get(n);if(e)return e;const r=this.context.traceVariable(n)||this.parent.findVariable(n);return r instanceof li&&this.accessedOutsideVariables.set(n,r),r}}const gd={"!":t=>!t,"+":t=>+t,"-":t=>-t,delete:()=>mn,typeof:t=>typeof t,void:()=>{},"~":t=>~t};class d_ extends O{deoptimizePath(){for(const n of this.declarations)n.deoptimizePath(X)}hasEffectsOnInteractionAtPath(){return!1}include(n,e,{asSingleStatement:r}=In){this.included=!0;for(const a of this.declarations){(e||a.shouldBeIncluded(n))&&a.include(n,e);const{id:i,init:s}=a;r&&i.include(n,e),s&&i.included&&!s.included&&(i instanceof Be||i instanceof $o)&&s.include(n,e)}}initialise(){for(const n of this.declarations)n.declareDeclarator(this.kind)}render(n,e,r=In){if(function(a,i){for(const s of a){if(!s.id.included)return!1;if(s.id.type===oo){if(i.has(s.id.variable))return!1}else{const o=[];if(s.id.addExportedVariables(o,i),o.length>0)return!1}}return!0}(this.declarations,e.exportNamesByVariable)){for(const a of this.declarations)a.render(n,e);r.isNoStatement||n.original.charCodeAt(this.end-1)===59||n.appendLeft(this.end,";")}else this.renderReplacedDeclarations(n,e)}applyDeoptimizations(){}renderDeclarationEnd(n,e,r,a,i,s,o){n.original.charCodeAt(this.end-1)===59&&n.remove(this.end-1,this.end),e+=";",r===null?n.appendLeft(i,e):(n.original.charCodeAt(a-1)!==10||n.original.charCodeAt(this.end)!==10&&n.original.charCodeAt(this.end)!==13||(a--,n.original.charCodeAt(a)===13&&a--),a===r+1?n.overwrite(r,i,e):(n.overwrite(r,r+1,e),n.remove(a,i))),s.length>0&&n.appendLeft(i,` ${Xt(s,o)};`)}renderReplacedDeclarations(n,e){const r=Mo(this.declarations,n,this.start+this.kind.length,this.end-(n.original.charCodeAt(this.end-1)===59?1:0));let a,i;i=wt(n.original,this.start+this.kind.length);let s=i-1;n.remove(this.start,s);let o,_=!1,l=!1,u="";const f=[],m=function(h,v,p){var y;let g=null;if(v.format==="system"){for(const{node:E}of h)E.id instanceof cn&&E.init&&p.length===0&&((y=v.exportNamesByVariable.get(E.id.variable))==null?void 0:y.length)===1?(g=E.id.variable,p.push(g)):E.id.addExportedVariables(p,v.exportNamesByVariable);p.length>1?g=null:g&&(p.length=0)}return g}(r,e,f);for(const{node:h,start:v,separator:p,contentEnd:g,end:y}of r)if(h.included){if(h.render(n,e),o="",!h.id.included||h.id instanceof cn&&r_(h.id.variable,e.exportNamesByVariable))l&&(u+=";"),_=!1;else{if(m&&m===h.id.variable){const E=En(n.original,"=",h.id.end);di(m,wt(n.original,E+1),p===null?g:p,n,e)}_?u+=",":(l&&(u+=";"),o+=`${this.kind} `,_=!0)}i===s+1?n.overwrite(s,i,u+o):(n.overwrite(s,s+1,u),n.appendLeft(i,o)),a=g,i=y,l=!0,s=p,u=""}else n.remove(v,y);this.renderDeclarationEnd(n,u,s,a,i,f,e)}}const p_={ArrayExpression:xo,ArrayPattern:$o,ArrowFunctionExpression:mi,AssignmentExpression:class extends O{hasEffects(t){const{deoptimized:n,left:e,operator:r,right:a}=this;return n||this.applyDeoptimizations(),a.hasEffects(t)||e.hasEffectsAsAssignmentTarget(t,r!=="=")}hasEffectsOnInteractionAtPath(t,n,e){return this.right.hasEffectsOnInteractionAtPath(t,n,e)}include(t,n){const{deoptimized:e,left:r,right:a,operator:i}=this;e||this.applyDeoptimizations(),this.included=!0,(n||i!=="="||r.included||r.hasEffectsAsAssignmentTarget(Er(),!1))&&r.includeAsAssignmentTarget(t,n,i!=="="),a.include(t,n)}initialise(){this.left.setAssignedValue(this.right)}render(t,n,{preventASI:e,renderedParentType:r,renderedSurroundingElement:a}=In){const{left:i,right:s,start:o,end:_,parent:l}=this;if(i.included)i.render(t,n),s.render(t,n);else{const u=wt(t.original,En(t.original,"=",i.end)+1);t.remove(o,u),e&&Mr(t,u,s.start),s.render(t,n,{renderedParentType:r||l.type,renderedSurroundingElement:a||l.type})}if(n.format==="system")if(i instanceof cn){const u=i.variable,f=n.exportNamesByVariable.get(u);if(f)return void(f.length===1?di(u,o,_,t,n):Do(u,o,_,l.type!==Vn,t,n))}else{const u=[];if(i.addExportedVariables(u,n.exportNamesByVariable),u.length>0)return void function(f,m,h,v,p,g){const{_:y,getDirectReturnIifeLeft:E}=g.snippets;p.prependRight(m,E(["v"],`${Xt(f,g)},${y}v`,{needsArrowReturnParens:!0,needsWrappedFunction:v})),p.appendLeft(h,")")}(u,o,_,a===Vn,t,n)}i.included&&i instanceof Be&&(a===Vn||a===Qa)&&(t.appendRight(o,"("),t.prependLeft(_,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(X),this.right.deoptimizePath(nn),this.context.requestTreeshakingPass()}},AssignmentPattern:class extends O{addExportedVariables(t,n){this.left.addExportedVariables(t,n)}declare(t,n){return this.left.declare(t,n)}deoptimizePath(t){t.length===0&&this.left.deoptimizePath(t)}hasEffectsOnInteractionAtPath(t,n,e){return t.length>0||this.left.hasEffectsOnInteractionAtPath(X,n,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(t,n,{isShorthandProperty:e}=In){this.left.render(t,n,{isShorthandProperty:e}),this.right.render(t,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(X),this.right.deoptimizePath(nn),this.context.requestTreeshakingPass()}},AwaitExpression:Oo,BinaryExpression:class extends O{deoptimizeCache(){}getLiteralValueAtPath(t,n,e){if(t.length>0)return mn;const r=this.left.getLiteralValueAtPath(X,n,e);if(typeof r=="symbol")return mn;const a=this.right.getLiteralValueAtPath(X,n,e);if(typeof a=="symbol")return mn;const i=rd[this.operator];return i?i(r,a):mn}hasEffects(t){return this.operator==="+"&&this.parent instanceof Vt&&this.left.getLiteralValueAtPath(X,xn,this)===""||super.hasEffects(t)}hasEffectsOnInteractionAtPath(t,{type:n}){return n!==0||t.length>1}render(t,n,{renderedSurroundingElement:e}=In){this.left.render(t,n,{renderedSurroundingElement:e}),this.right.render(t,n)}},BlockStatement:Dr,BreakStatement:class extends O{hasEffects(t){if(this.label){if(!t.ignore.labels.has(this.label.name))return!0;t.includedLabels.add(this.label.name)}else{if(!t.ignore.breaks)return!0;t.hasBreak=!0}return t.brokenFlow=!0,!1}include(t){this.included=!0,this.label?(this.label.include(),t.includedLabels.add(this.label.name)):t.hasBreak=!0,t.brokenFlow=!0}},CallExpression:Ro,CatchClause:class extends O{createScope(t){this.scope=new id(t,this.context)}parseNode(t){const{param:n}=t;n&&(this.param=new(this.context.getNodeConstructor(n.type))(n,this,this.scope),this.param.declare("parameter",U)),super.parseNode(t)}},ChainExpression:class extends O{deoptimizeCache(){}getLiteralValueAtPath(t,n,e){if(!this.expression.isSkippedAsOptional(e))return this.expression.getLiteralValueAtPath(t,n,e)}hasEffects(t){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(t)}},ClassBody:class extends O{createScope(t){this.scope=new sd(t,this.parent,this.context)}include(t,n){this.included=!0,this.context.includeVariableInModule(this.scope.thisVariable);for(const e of this.body)e.include(t,n)}parseNode(t){const n=this.body=[];for(const e of t.body)n.push(new(this.context.getNodeConstructor(e.type))(e,this,e.static?this.scope:this.scope.instanceScope));super.parseNode(t)}applyDeoptimizations(){}},ClassDeclaration:Pr,ClassExpression:gi,ConditionalExpression:class extends O{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(t,n,e){this.consequent.deoptimizeArgumentsOnInteractionAtPath(t,n,e),this.alternate.deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizeCache(){if(this.usedBranch!==null){const t=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,t.deoptimizePath(nn);const{expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=bn;for(const e of n)e.deoptimizeCache()}}deoptimizePath(t){const n=this.getUsedBranch();n?n.deoptimizePath(t):(this.consequent.deoptimizePath(t),this.alternate.deoptimizePath(t))}getLiteralValueAtPath(t,n,e){const r=this.getUsedBranch();return r?(this.expressionsToBeDeoptimized.push(e),r.getLiteralValueAtPath(t,n,e)):mn}getReturnExpressionWhenCalledAtPath(t,n,e,r){const a=this.getUsedBranch();return a?(this.expressionsToBeDeoptimized.push(r),a.getReturnExpressionWhenCalledAtPath(t,n,e,r)):[new Or([this.consequent.getReturnExpressionWhenCalledAtPath(t,n,e,r)[0],this.alternate.getReturnExpressionWhenCalledAtPath(t,n,e,r)[0]]),!1]}hasEffects(t){if(this.test.hasEffects(t))return!0;const n=this.getUsedBranch();return n?n.hasEffects(t):this.consequent.hasEffects(t)||this.alternate.hasEffects(t)}hasEffectsOnInteractionAtPath(t,n,e){const r=this.getUsedBranch();return r?r.hasEffectsOnInteractionAtPath(t,n,e):this.consequent.hasEffectsOnInteractionAtPath(t,n,e)||this.alternate.hasEffectsOnInteractionAtPath(t,n,e)}include(t,n){this.included=!0;const e=this.getUsedBranch();n||this.test.shouldBeIncluded(t)||e===null?(this.test.include(t,n),this.consequent.include(t,n),this.alternate.include(t,n)):e.include(t,n)}includeCallArguments(t,n){const e=this.getUsedBranch();e?e.includeCallArguments(t,n):(this.consequent.includeCallArguments(t,n),this.alternate.includeCallArguments(t,n))}render(t,n,{isCalleeOfRenderedParent:e,preventASI:r,renderedParentType:a,renderedSurroundingElement:i}=In){const s=this.getUsedBranch();if(this.test.included)this.test.render(t,n,{renderedSurroundingElement:i}),this.consequent.render(t,n),this.alternate.render(t,n);else{const o=En(t.original,":",this.consequent.end),_=wt(t.original,(this.consequent.included?En(t.original,"?",this.test.end):o)+1);r&&Mr(t,_,s.start),t.remove(this.start,_),this.consequent.included&&t.remove(o,this.end),jo(this,t),s.render(t,n,{isCalleeOfRenderedParent:e,preventASI:!0,renderedParentType:a||this.parent.type,renderedSurroundingElement:i||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const t=this.test.getLiteralValueAtPath(X,xn,this);return typeof t=="symbol"?null:this.usedBranch=t?this.consequent:this.alternate}},ContinueStatement:class extends O{hasEffects(t){if(this.label){if(!t.ignore.labels.has(this.label.name))return!0;t.includedLabels.add(this.label.name)}else{if(!t.ignore.continues)return!0;t.hasContinue=!0}return t.brokenFlow=!0,!1}include(t){this.included=!0,this.label?(this.label.include(),t.includedLabels.add(this.label.name)):t.hasContinue=!0,t.brokenFlow=!0}},DoWhileStatement:class extends O{hasEffects(t){return!!this.test.hasEffects(t)||zr(t,this.body)}include(t,n){this.included=!0,this.test.include(t,n),Fe(t,this.body,n)}},EmptyStatement:class extends O{hasEffects(){return!1}},ExportAllDeclaration:bi,ExportDefaultDeclaration:Br,ExportNamedDeclaration:Xo,ExportSpecifier:class extends O{applyDeoptimizations(){}},ExpressionStatement:Vt,ForInStatement:class extends O{createScope(t){this.scope=new qt(t)}hasEffects(t){const{body:n,deoptimized:e,left:r,right:a}=this;return e||this.applyDeoptimizations(),!(!r.hasEffectsAsAssignmentTarget(t,!1)&&!a.hasEffects(t))||zr(t,n)}include(t,n){const{body:e,deoptimized:r,left:a,right:i}=this;r||this.applyDeoptimizations(),this.included=!0,a.includeAsAssignmentTarget(t,n||!0,!1),i.include(t,n),Fe(t,e,n)}initialise(){this.left.setAssignedValue(U)}render(t,n){this.left.render(t,n,Rt),this.right.render(t,n,Rt),t.original.charCodeAt(this.right.start-1)===110&&t.prependLeft(this.right.start," "),this.body.render(t,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(X),this.context.requestTreeshakingPass()}},ForOfStatement:class extends O{createScope(t){this.scope=new qt(t)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(t,n){const{body:e,deoptimized:r,left:a,right:i}=this;r||this.applyDeoptimizations(),this.included=!0,a.includeAsAssignmentTarget(t,n||!0,!1),i.include(t,n),Fe(t,e,n)}initialise(){this.left.setAssignedValue(U)}render(t,n){this.left.render(t,n,Rt),this.right.render(t,n,Rt),t.original.charCodeAt(this.right.start-1)===102&&t.prependLeft(this.right.start," "),this.body.render(t,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(X),this.right.deoptimizePath(nn),this.context.requestTreeshakingPass()}},ForStatement:class extends O{createScope(t){this.scope=new qt(t)}hasEffects(t){var n,e,r;return!!((n=this.init)!=null&&n.hasEffects(t)||(e=this.test)!=null&&e.hasEffects(t)||(r=this.update)!=null&&r.hasEffects(t))||zr(t,this.body)}include(t,n){var e,r,a;this.included=!0,(e=this.init)==null||e.include(t,n,{asSingleStatement:!0}),(r=this.test)==null||r.include(t,n),(a=this.update)==null||a.include(t,n),Fe(t,this.body,n)}render(t,n){var e,r,a;(e=this.init)==null||e.render(t,n,Rt),(r=this.test)==null||r.render(t,n,Rt),(a=this.update)==null||a.render(t,n,Rt),this.body.render(t,n)}},FunctionDeclaration:Ge,FunctionExpression:Uo,Identifier:cn,IfStatement:vi,ImportAttribute:class extends O{},ImportDeclaration:Jo,ImportDefaultSpecifier:Ko,ImportExpression:class extends O{constructor(){super(...arguments),this.inlineNamespace=null,this.assertions=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const t=this.parent;if(t instanceof Vt)return bn;if(t instanceof Oo){const n=t.parent;if(n instanceof Vt)return bn;if(n instanceof a_){const e=n.id;return e instanceof Be?s_(e):void 0}if(n instanceof Ct){const e=n.property;if(!n.computed&&e instanceof cn)return[e.name]}}else if(t instanceof Ct){const n=t.parent,e=t.property;if(!(n instanceof Ro&&e instanceof cn))return;const r=e.name;if(n.parent instanceof Vt&&["catch","finally"].includes(r))return bn;if(r!=="then")return;if(n.arguments.length===0)return bn;const a=n.arguments[0];if(n.arguments.length!==1||!(a instanceof mi||a instanceof Uo))return;if(a.params.length===0)return bn;const i=a.params[0];return a.params.length===1&&i instanceof Be?s_(i):void 0}}hasEffects(){return!0}include(t,n){this.included||(this.included=!0,this.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(t,n)}initialise(){this.context.addDynamicImport(this)}parseNode(t){super.parseNode(t,["source"])}render(t,n){const{snippets:{_:e,getDirectReturnFunction:r,getObject:a,getPropertyAccess:i}}=n;if(this.inlineNamespace){const[s,o]=r([],{functionReturn:!0,lineBreakIndent:null,name:null});t.overwrite(this.start,this.end,`Promise.resolve().then(${s}${this.inlineNamespace.getName(i)}${o})`)}else{if(this.mechanism&&(t.overwrite(this.start,En(t.original,"(",this.start+6)+1,this.mechanism.left),t.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(t.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[s,o]=r(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});t.prependLeft(this.end,`.then(${s}n.${this.namespaceExportName}${o})`)}}else this.source.render(t,n);this.assertions!==!0&&(this.arguments&&t.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.assertions&&t.appendLeft(this.end-1,`,${e}${a([["assert",this.assertions]],{lineBreakIndent:null})}`))}}setExternalResolution(t,n,e,r,a,i,s,o,_){const{format:l}=e;this.inlineNamespace=null,this.resolution=n,this.resolutionString=s,this.namespaceExportName=o,this.assertions=_;const u=[...md[l]||[]];let f;({helper:f,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(n,t,e,r,a)),f&&u.push(f),u.length>0&&this.scope.addAccessedGlobals(u,i)}setInternalResolution(t){this.inlineNamespace=t}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(t,n,{compact:e,dynamicImportFunction:r,dynamicImportInCjs:a,format:i,generatedCode:{arrowFunctions:s},interop:o},{_,getDirectReturnFunction:l,getDirectReturnIifeLeft:u},f){const m=f.hookFirstSync("renderDynamicImport",[{customResolution:typeof this.resolution=="string"?this.resolution:null,format:i,moduleId:this.context.module.id,targetModuleId:this.resolution&&typeof this.resolution!="string"?this.resolution.id:null}]);if(m)return{helper:null,mechanism:m};const h=!this.resolution||typeof this.resolution=="string";switch(i){case"cjs":{if(a&&(!t||typeof t=="string"||t instanceof fn))return{helper:null,mechanism:null};const v=i_(t,n,o);let p="require(",g=")";v&&(p=`/*#__PURE__*/${v}(${p}`,g+=")");const[y,E]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return p=`Promise.resolve().then(${y}${p}`,g+=`${E})`,!s&&h&&(p=u(["t"],`${p}t${g}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),g=")"),{helper:v,mechanism:{left:p,right:g}}}case"amd":{const v=e?"c":"resolve",p=e?"e":"reject",g=i_(t,n,o),[y,E]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),b=g?`${y}${v}(/*#__PURE__*/${g}(m))${E}`:v,[x,$]=l([v,p],{functionReturn:!1,lineBreakIndent:null,name:null});let S=`new Promise(${x}require([`,A=`],${_}${b},${_}${p})${$})`;return!s&&h&&(S=u(["t"],`${S}t${A}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),A=")"),{helper:g,mechanism:{left:S,right:A}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(r)return{helper:null,mechanism:{left:`${r}(`,right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:o_,ImportSpecifier:class extends O{applyDeoptimizations(){}},LabeledStatement:class extends O{hasEffects(t){const n=t.brokenFlow;return t.ignore.labels.add(this.label.name),!!this.body.hasEffects(t)||(t.ignore.labels.delete(this.label.name),t.includedLabels.has(this.label.name)&&(t.includedLabels.delete(this.label.name),t.brokenFlow=n),!1)}include(t,n){this.included=!0;const e=t.brokenFlow;this.body.include(t,n),(n||t.includedLabels.has(this.label.name))&&(this.label.include(),t.includedLabels.delete(this.label.name),t.brokenFlow=e)}render(t,n){this.label.included?this.label.render(t,n):t.remove(this.start,wt(t.original,En(t.original,":",this.label.end)+1)),this.body.render(t,n)}},Literal:Ut,LogicalExpression:class extends O{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(t,n,e){this.left.deoptimizeArgumentsOnInteractionAtPath(t,n,e),this.right.deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizeCache(){if(this.usedBranch){const t=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,t.deoptimizePath(nn);const{context:n,expressionsToBeDeoptimized:e}=this;this.expressionsToBeDeoptimized=bn;for(const r of e)r.deoptimizeCache();n.requestTreeshakingPass()}}deoptimizePath(t){const n=this.getUsedBranch();n?n.deoptimizePath(t):(this.left.deoptimizePath(t),this.right.deoptimizePath(t))}getLiteralValueAtPath(t,n,e){const r=this.getUsedBranch();return r?(this.expressionsToBeDeoptimized.push(e),r.getLiteralValueAtPath(t,n,e)):mn}getReturnExpressionWhenCalledAtPath(t,n,e,r){const a=this.getUsedBranch();return a?(this.expressionsToBeDeoptimized.push(r),a.getReturnExpressionWhenCalledAtPath(t,n,e,r)):[new Or([this.left.getReturnExpressionWhenCalledAtPath(t,n,e,r)[0],this.right.getReturnExpressionWhenCalledAtPath(t,n,e,r)[0]]),!1]}hasEffects(t){return!!this.left.hasEffects(t)||this.getUsedBranch()!==this.left&&this.right.hasEffects(t)}hasEffectsOnInteractionAtPath(t,n,e){const r=this.getUsedBranch();return r?r.hasEffectsOnInteractionAtPath(t,n,e):this.left.hasEffectsOnInteractionAtPath(t,n,e)||this.right.hasEffectsOnInteractionAtPath(t,n,e)}include(t,n){this.included=!0;const e=this.getUsedBranch();n||e===this.right&&this.left.shouldBeIncluded(t)||!e?(this.left.include(t,n),this.right.include(t,n)):e.include(t,n)}render(t,n,{isCalleeOfRenderedParent:e,preventASI:r,renderedParentType:a,renderedSurroundingElement:i}=In){if(this.left.included&&this.right.included)this.left.render(t,n,{preventASI:r,renderedSurroundingElement:i}),this.right.render(t,n);else{const s=En(t.original,this.operator,this.left.end);if(this.right.included){const o=wt(t.original,s+2);t.remove(this.start,o),r&&Mr(t,o,this.right.start)}else t.remove(s,this.end);jo(this,t),this.getUsedBranch().render(t,n,{isCalleeOfRenderedParent:e,preventASI:r,renderedParentType:a||this.parent.type,renderedSurroundingElement:i||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const t=this.left.getLiteralValueAtPath(X,xn,this);if(typeof t=="symbol")return null;this.usedBranch=this.operator==="||"&&t||this.operator==="&&"&&!t||this.operator==="??"&&t!=null?this.left:this.right}return this.usedBranch}},MemberExpression:Ct,MetaProperty:class extends O{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(t){const{meta:{name:n},metaProperty:e}=this;return n===Ai&&(e!=null&&e.startsWith(Si))?t.getFileName(e.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(t,{type:n}){return t.length>1||n!==0}include(){if(!this.included&&(this.included=!0,this.meta.name===Ai)){this.context.addImportMeta(this);const t=this.parent,n=this.metaProperty=t instanceof Ct&&typeof t.propertyKey=="string"?t.propertyKey:null;n!=null&&n.startsWith(Si)&&(this.referenceId=n.slice(16))}}render(t,{format:n,pluginDriver:e,snippets:r}){var v;const{context:{module:{id:a}},meta:{name:i},metaProperty:s,parent:o,preliminaryChunkId:_,referenceId:l,start:u,end:f}=this;if(i!==Ai)return;const m=_;if(l){const p=e.getFileName(l),g=Ee(ne(Mt(m),p)),y=e.hookFirstSync("resolveFileUrl",[{chunkId:m,fileName:p,format:n,moduleId:a,referenceId:l,relativePath:g}])||hd[n](g);return void t.overwrite(o.start,o.end,y,{contentOnly:!0})}const h=e.hookFirstSync("resolveImportMeta",[s,{chunkId:m,format:n,moduleId:a}])||((v=ji[n])==null?void 0:v.call(ji,s,{chunkId:m,snippets:r}));typeof h=="string"&&(o instanceof Ct?t.overwrite(o.start,o.end,h,{contentOnly:!0}):t.overwrite(u,f,h,{contentOnly:!0}))}setResolution(t,n,e){var a;this.preliminaryChunkId=e;const r=((a=this.metaProperty)!=null&&a.startsWith(Si)?pd:dd)[t];r.length>0&&this.scope.addAccessedGlobals(r,n)}},MethodDefinition:hi,NewExpression:class extends O{hasEffects(t){try{for(const n of this.arguments)if(n.hasEffects(t))return!0;return!this.annotationPure&&(this.callee.hasEffects(t)||this.callee.hasEffectsOnInteractionAtPath(X,this.interaction,t))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(t,{type:n}){return t.length>0||n!==0}include(t,n){this.deoptimized||this.applyDeoptimizations(),n?super.include(t,n):(this.included=!0,this.callee.include(t,!1)),this.callee.includeCallArguments(t,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(t,n){this.callee.render(t,n),zo(t,n,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,X,xn),this.context.requestTreeshakingPass()}},ObjectExpression:class extends O{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(t,n,e){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(t){this.getObjectEntity().deoptimizePath(t)}getLiteralValueAtPath(t,n,e){return this.getObjectEntity().getLiteralValueAtPath(t,n,e)}getReturnExpressionWhenCalledAtPath(t,n,e,r){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(t,n,e,r)}hasEffectsOnInteractionAtPath(t,n,e){return this.getObjectEntity().hasEffectsOnInteractionAtPath(t,n,e)}render(t,n,{renderedSurroundingElement:e}=In){super.render(t,n),e!==Vn&&e!==Qa||(t.appendRight(this.start,"("),t.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;let t=Et;const n=[];for(const e of this.properties){if(e instanceof Le){n.push({key:on,kind:"init",property:e});continue}let r;if(e.computed){const a=e.key.getLiteralValueAtPath(X,xn,this);if(typeof a=="symbol"){n.push({key:on,kind:e.kind,property:e});continue}r=String(a)}else if(r=e.key instanceof cn?e.key.name:String(e.key.value),r==="__proto__"&&e.kind==="init"){t=e.value instanceof Ut&&e.value.value===null?null:e.value;continue}n.push({key:r,kind:e.kind,property:e})}return this.objectEntity=new Fn(n,t)}},ObjectPattern:Be,PrivateIdentifier:class extends O{},Program:l_,Property:class extends qo{constructor(){super(...arguments),this.declarationInit=null}declare(t,n){return this.declarationInit=n,this.value.declare(t,U)}hasEffects(t){this.deoptimized||this.applyDeoptimizations();const n=this.context.options.treeshake.propertyReadSideEffects;return this.parent.type==="ObjectPattern"&&n==="always"||this.key.hasEffects(t)||this.value.hasEffects(t)}markDeclarationReached(){this.value.markDeclarationReached()}render(t,n){this.shorthand||this.key.render(t,n),this.value.render(t,n,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,this.declarationInit!==null&&(this.declarationInit.deoptimizePath([on,on]),this.context.requestTreeshakingPass())}},PropertyDefinition:class extends O{deoptimizeArgumentsOnInteractionAtPath(t,n,e){var r;(r=this.value)==null||r.deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizePath(t){var n;(n=this.value)==null||n.deoptimizePath(t)}getLiteralValueAtPath(t,n,e){return this.value?this.value.getLiteralValueAtPath(t,n,e):mn}getReturnExpressionWhenCalledAtPath(t,n,e,r){return this.value?this.value.getReturnExpressionWhenCalledAtPath(t,n,e,r):gn}hasEffects(t){var n;return this.key.hasEffects(t)||this.static&&!!((n=this.value)!=null&&n.hasEffects(t))}hasEffectsOnInteractionAtPath(t,n,e){return!this.value||this.value.hasEffectsOnInteractionAtPath(t,n,e)}applyDeoptimizations(){}},RestElement:ui,ReturnStatement:class extends O{hasEffects(t){var n;return!(t.ignore.returnYield&&!((n=this.argument)!=null&&n.hasEffects(t)))||(t.brokenFlow=!0,!1)}include(t,n){var e;this.included=!0,(e=this.argument)==null||e.include(t,n),t.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||U)}render(t,n){this.argument&&(this.argument.render(t,n,{preventASI:!0}),this.argument.start===this.start+6&&t.prependLeft(this.start+6," "))}},SequenceExpression:class extends O{deoptimizeArgumentsOnInteractionAtPath(t,n,e){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizePath(t){this.expressions[this.expressions.length-1].deoptimizePath(t)}getLiteralValueAtPath(t,n,e){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(t,n,e)}hasEffects(t){for(const n of this.expressions)if(n.hasEffects(t))return!0;return!1}hasEffectsOnInteractionAtPath(t,n,e){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(t,n,e)}include(t,n){this.included=!0;const e=this.expressions[this.expressions.length-1];for(const r of this.expressions)(n||r===e&&!(this.parent instanceof Vt)||r.shouldBeIncluded(t))&&r.include(t,n)}render(t,n,{renderedParentType:e,isCalleeOfRenderedParent:r,preventASI:a}=In){let i=0,s=null;const o=this.expressions[this.expressions.length-1];for(const{node:_,separator:l,start:u,end:f}of Mo(this.expressions,t,this.start,this.end))if(_.included)if(i++,s=l,i===1&&a&&Mr(t,u,_.start),i===1){const m=e||this.parent.type;_.render(t,n,{isCalleeOfRenderedParent:r&&_===o,renderedParentType:m,renderedSurroundingElement:m})}else _.render(t,n);else ci(_,t,u,f);s&&t.remove(s,this.end)}},SpreadElement:Le,StaticBlock:class extends O{createScope(t){this.scope=new qt(t)}hasEffects(t){for(const n of this.body)if(n.hasEffects(t))return!0;return!1}include(t,n){this.included=!0;for(const e of this.body)(n||e.shouldBeIncluded(t))&&e.include(t,n)}render(t,n){if(this.body.length>0){const e=En(t.original.slice(this.start,this.end),"{")+1;ze(this.body,t,this.start+e,this.end-1,n)}else super.render(t,n)}},Super:class extends O{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(t,n,e){this.variable.deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizePath(t){this.variable.deoptimizePath(t)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}},SwitchCase:c_,SwitchStatement:class extends O{createScope(t){this.parentScope=t,this.scope=new qt(t)}hasEffects(t){if(this.discriminant.hasEffects(t))return!0;const{brokenFlow:n,hasBreak:e,ignore:r}=t,{breaks:a}=r;r.breaks=!0,t.hasBreak=!1;let i=!0;for(const s of this.cases){if(s.hasEffects(t))return!0;i&&(i=t.brokenFlow&&!t.hasBreak),t.hasBreak=!1,t.brokenFlow=n}return this.defaultCase!==null&&(t.brokenFlow=i),r.breaks=a,t.hasBreak=e,!1}include(t,n){this.included=!0,this.discriminant.include(t,n);const{brokenFlow:e,hasBreak:r}=t;t.hasBreak=!1;let a=!0,i=n||this.defaultCase!==null&&this.defaultCase=0;s--){const o=this.cases[s];if(o.included&&(i=!0),!i){const _=Er();_.ignore.breaks=!0,i=o.hasEffects(_)}i?(o.include(t,n),a&&(a=t.brokenFlow&&!t.hasBreak),t.hasBreak=!1,t.brokenFlow=e):a=e}i&&this.defaultCase!==null&&(t.brokenFlow=a),t.hasBreak=r}initialise(){for(let t=0;t0&&ze(this.cases,t,this.cases[0].start,this.end-1,n)}},TaggedTemplateExpression:class extends Go{bind(){if(super.bind(),this.tag.type===oo){const t=this.tag.name;this.scope.findVariable(t).isNamespace&&this.context.log(V,Zs(t),this.start)}}hasEffects(t){try{for(const n of this.quasi.expressions)if(n.hasEffects(t))return!0;return this.tag.hasEffects(t)||this.tag.hasEffectsOnInteractionAtPath(X,this.interaction,t)}finally{this.deoptimized||this.applyDeoptimizations()}}include(t,n){this.deoptimized||this.applyDeoptimizations(),n?super.include(t,n):(this.included=!0,this.tag.include(t,n),this.quasi.include(t,n)),this.tag.includeCallArguments(t,this.args);const[e]=this.getReturnExpression();e.included||e.include(t,!1)}initialise(){this.args=[U,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Ct&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(t,n){this.tag.render(t,n,{isCalleeOfRenderedParent:!0}),this.quasi.render(t,n)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,X,xn),this.context.requestTreeshakingPass()}getReturnExpression(t=xn){return this.returnExpression===null?(this.returnExpression=gn,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(X,this.interaction,t,this)):this.returnExpression}},TemplateElement:class extends O{bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(t){this.value=t.value,super.parseNode(t)}render(){}},TemplateLiteral:u_,ThisExpression:class extends O{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(t,n,e){this.variable.deoptimizeArgumentsOnInteractionAtPath(t,n,e)}deoptimizePath(t){this.variable.deoptimizePath(t)}hasEffectsOnInteractionAtPath(t,n,e){return t.length===0?n.type!==0:this.variable.hasEffectsOnInteractionAtPath(t,n,e)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof m_?this.context.moduleContext:null,this.alias==="undefined"&&this.context.log(V,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:wn("troubleshooting/#error-this-is-undefined")},this.start)}render(t){this.alias!==null&&t.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends O{hasEffects(){return!0}include(t,n){this.included=!0,this.argument.include(t,n),t.brokenFlow=!0}render(t,n){this.argument.render(t,n,{preventASI:!0}),this.argument.start===this.start+5&&t.prependLeft(this.start+5," ")}},TryStatement:class extends O{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(t){var n;return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(t))||!!((n=this.finalizer)!=null&&n.hasEffects(t))}include(t,n){var i,s;const e=(i=this.context.options.treeshake)==null?void 0:i.tryCatchDeoptimization,{brokenFlow:r,includedLabels:a}=t;if(this.directlyIncluded&&e){if(this.includedLabelsAfterBlock)for(const o of this.includedLabelsAfterBlock)a.add(o)}else this.included=!0,this.directlyIncluded=!0,this.block.include(t,e?uo:n),a.size>0&&(this.includedLabelsAfterBlock=[...a]),t.brokenFlow=r;this.handler!==null&&(this.handler.include(t,n),t.brokenFlow=r),(s=this.finalizer)==null||s.include(t,n)}},UnaryExpression:class extends O{getLiteralValueAtPath(t,n,e){if(t.length>0)return mn;const r=this.argument.getLiteralValueAtPath(X,n,e);return typeof r=="symbol"?mn:gd[this.operator](r)}hasEffects(t){return this.deoptimized||this.applyDeoptimizations(),!(this.operator==="typeof"&&this.argument instanceof cn)&&(this.argument.hasEffects(t)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath(X,Oa,t))}hasEffectsOnInteractionAtPath(t,{type:n}){return n!==0||t.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=!0,this.operator==="delete"&&(this.argument.deoptimizePath(X),this.context.requestTreeshakingPass())}},UnknownNode:class extends O{hasEffects(){return!0}include(t){super.include(t,!0)}},UpdateExpression:class extends O{hasEffects(t){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(t,!0)}hasEffectsOnInteractionAtPath(t,{type:n}){return t.length>1||n!==0}include(t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(t,n,!0)}initialise(){this.argument.setAssignedValue(U)}render(t,n){const{exportNamesByVariable:e,format:r,snippets:{_:a}}=n;if(this.argument.render(t,n),r==="system"){const i=this.argument.variable,s=e.get(i);if(s)if(this.prefix)s.length===1?di(i,this.start,this.end,t,n):Do(i,this.start,this.end,this.parent.type!==Vn,t,n);else{const o=this.operator[0];(function(_,l,u,f,m,h,v){const{_:p}=h.snippets;m.prependRight(l,`${Xt([_],h,v)},${p}`),f&&(m.prependRight(l,"("),m.appendLeft(u,")"))})(i,this.start,this.end,this.parent.type!==Vn,t,n,`${a}${o}${a}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(X),this.argument instanceof cn&&(this.scope.findVariable(this.argument.name).isReassigned=!0),this.context.requestTreeshakingPass()}},VariableDeclaration:d_,VariableDeclarator:a_,WhileStatement:class extends O{hasEffects(t){return!!this.test.hasEffects(t)||zr(t,this.body)}include(t,n){this.included=!0,this.test.include(t,n),Fe(t,this.body,n)}},YieldExpression:class extends O{hasEffects(t){var n;return this.deoptimized||this.applyDeoptimizations(),!(t.ignore.returnYield&&!((n=this.argument)!=null&&n.hasEffects(t)))}render(t,n){this.argument&&(this.argument.render(t,n,{preventASI:!0}),this.argument.start===this.start+5&&t.prependLeft(this.start+5," "))}}},ce="_missingExportShim";class bd extends Pt{constructor(n){super(ce),this.module=n}include(){super.include(),this.module.needsExportShim=!0}}class Ue extends Pt{constructor(n){super(n.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=n,this.module=n.module}addReference(n){this.references.push(n),this.name=n.name}deoptimizeArgumentsOnInteractionAtPath(n,e,r){var a;if(e.length>1||e.length===1&&n.type===2){const i=e[0];typeof i=="string"?(a=this.getMemberVariables()[i])==null||a.deoptimizeArgumentsOnInteractionAtPath(n,e.slice(1),r):xt(n)}}deoptimizePath(n){var e;if(n.length>1){const r=n[0];typeof r=="string"&&((e=this.getMemberVariables()[r])==null||e.deoptimizePath(n.slice(1)))}}getLiteralValueAtPath(n){return n[0]===Ma?"Module":mn}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const n=Object.create(null),e=[...this.context.getExports(),...this.context.getReexports()].sort();for(const r of e)if(r[0]!=="*"&&r!==this.module.info.syntheticNamedExports){const a=this.context.traceExport(r);a&&(n[r]=a)}return this.memberVariables=n}hasEffectsOnInteractionAtPath(n,e,r){const{type:a}=e;if(n.length===0)return!0;if(n.length===1&&a!==2)return a===1;const i=n[0];if(typeof i!="string")return!0;const s=this.getMemberVariables()[i];return!s||s.hasEffectsOnInteractionAtPath(n.slice(1),e,r)}include(){this.included=!0,this.context.includeAllExports()}prepare(n){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Rr],n)}renderBlock(n){const{exportNamesByVariable:e,format:r,freeze:a,indent:i,namespaceToStringTag:s,snippets:{_:o,cnst:_,getObject:l,getPropertyAccess:u,n:f,s:m}}=n,h=this.getMemberVariables(),v=Object.entries(h).filter(([g,y])=>y.included).map(([g,y])=>this.referencedEarly||y.isReassigned||y===this?[null,`get ${g}${o}()${o}{${o}return ${y.getName(u)}${m}${o}}`]:[g,y.getName(u)]);v.unshift([null,`__proto__:${o}null`]);let p=l(v,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const g=this.mergedNamespaces.map(y=>y.getName(u));p=`/*#__PURE__*/${Rr}(${p},${o}[${g.join(`,${o}`)}])`}else s&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${Ve(l)})`),a&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${_} ${this.getName(u)}${o}=${o}${p};`,r==="system"&&e.has(this)&&(p+=`${f}${Xt([this],n)};`),p}renderFirst(){return this.referencedEarly}setMergedNamespaces(n){this.mergedNamespaces=n;const e=this.context.getModuleExecIndex();for(const r of this.references)if(r.context.getModuleExecIndex()<=e){this.referencedEarly=!0;break}}}Ue.prototype.isNamespace=!0;class Dn extends Pt{constructor(n,e,r){super(e),this.baseVariable=null,this.context=n,this.module=n.module,this.syntheticNamespace=r}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let n=this.syntheticNamespace;for(;n instanceof it||n instanceof Dn;){if(n instanceof it){const e=n.getOriginalVariable();if(e===n)break;n=e}n instanceof Dn&&(n=n.syntheticNamespace)}return this.baseVariable=n}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(n){return`${this.syntheticNamespace.getName(n)}${n(this.name)}`}include(){this.included=!0,this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(n,e){super.setRenderNames(n,e)}}var St;function Li(t){return t.id}(function(t){t[t.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",t[t.ANALYSE=1]="ANALYSE",t[t.GENERATE=2]="GENERATE"})(St||(St={}));const Mi=t=>{const n=t.key;return n&&(n.name||n.value)};function Ur(t,n){const e=Object.keys(t);return e.length!==Object.keys(n).length||e.some(r=>t[r]!==n[r])}var h_="performance"in(typeof globalThis>"u"?typeof window>"u"?{}:window:globalThis)?performance:{now:()=>0},g_={memoryUsage:()=>({heapUsed:0})};let He=new Map;function b_(t,n){switch(n){case 1:return`# ${t}`;case 2:return`## ${t}`;case 3:return t;default:return`${" ".repeat(n-4)}- ${t}`}}function vd(t,n=3){t=b_(t,n);const e=g_.memoryUsage().heapUsed,r=h_.now(),a=He.get(t);a===void 0?He.set(t,{memory:0,startMemory:e,startTime:r,time:0,totalMemory:0}):(a.startMemory=e,a.startTime=r)}function yd(t,n=3){t=b_(t,n);const e=He.get(t);if(e!==void 0){const r=g_.memoryUsage().heapUsed;e.memory+=r-e.startMemory,e.time+=h_.now()-e.startTime,e.totalMemory=Math.max(e.totalMemory,r)}}function xd(){const t={};for(const[n,{memory:e,time:r,totalMemory:a}]of He)t[n]=[r,e,a];return t}let $n=rt,yn=rt;const $d=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Ed(t,n){for(const e of $d)if(e in t){let r=`plugin ${n}`;t.name&&(r+=` (${t.name})`),r+=` - ${e}`;const a=function(...s){$n(r,4);const o=i.apply(this,s);return yn(r,4),o};let i;typeof t[e].handler=="function"?(i=t[e].handler,t[e].handler=a):(i=t[e],t[e]=a)}return t}function We(t){t.isExecuted=!0;const n=[t],e=new Set;for(const r of n)for(const a of[...r.dependencies,...r.implicitlyLoadedBefore])a instanceof fn||a.isExecuted||!a.info.moduleSideEffects&&!r.implicitlyLoadedBefore.has(a)||e.has(a.id)||(a.isExecuted=!0,e.add(a.id),n.push(a))}const v_={identifier:null,localName:ce};function Di(t,n,e,r,a=new Map){const i=a.get(n);if(i){if(i.has(t))return r?[null]:L((s=n,o=t.id,{code:im,exporter:o,message:`"${s}" cannot be exported from "${H(o)}" as it is a reexport that references itself.`}));i.add(t)}else a.set(n,new Set([t]));var s,o;return t.getVariableForExportName(n,{importerForSideEffects:e,isExportAllSearch:r,searchedNamesAndModules:a})}function y_(t,n){const e=zn(n.sideEffectDependenciesByVariable,t,Dt);let r=t;const a=new Set([r]);for(;;){const i=r.module;if(r=r instanceof it?r.getDirectOriginalVariable():r instanceof Dn?r.syntheticNamespace:null,!r||a.has(r))break;a.add(r),e.add(i);const s=i.sideEffectDependenciesByVariable.get(r);if(s)for(const o of s)e.add(o)}return e}class hn{constructor(n,e,r,a,i,s,o,_){this.graph=n,this.id=e,this.options=r,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAssertions=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new bd(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(e),this.context=r.moduleContext(e),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:u,dynamicImporters:f,exportAllSources:m,exports:h,implicitlyLoadedAfter:v,implicitlyLoadedBefore:p,importers:g,reexportDescriptions:y,sourcesWithAssertions:E}=this;this.info={assertions:_,ast:null,code:null,get dynamicallyImportedIdResolutions(){return u.map(({argument:b})=>typeof b=="string"&&l.resolvedIds[b]).filter(Boolean)},get dynamicallyImportedIds(){return u.map(({id:b})=>b).filter(b=>b!=null)},get dynamicImporters(){return f.sort()},get exportedBindings(){const b={".":[...h.keys()]};for(const[x,{source:$}]of y)(b[$]??(b[$]=[])).push(x);for(const x of m)(b[x]??(b[x]=[])).push("*");return b},get exports(){return[...h.keys(),...y.keys(),...[...m].map(()=>"*")]},get hasDefaultExport(){return l.ast?l.exports.has("default")||y.has("default"):null},get hasModuleSideEffects(){return Bt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Rs,!0,r),this.moduleSideEffects},id:e,get implicitlyLoadedAfterOneOf(){return Array.from(v,Li).sort()},get implicitlyLoadedBefore(){return Array.from(p,Li).sort()},get importedIdResolutions(){return Array.from(E.keys(),b=>l.resolvedIds[b]).filter(Boolean)},get importedIds(){return Array.from(E.keys(),b=>{var x;return(x=l.resolvedIds[b])==null?void 0:x.id}).filter(Boolean)},get importers(){return g.sort()},isEntry:a,isExternal:!1,get isIncluded(){return n.phase!==St.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:s},Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}basename(){const n=ft(this.id),e=yt(this.id);return za(e?n.slice(0,-e.length):n)}bindReferences(){this.ast.bind()}error(n,e){return this.addLocationToLogProps(n,e),L(n)}estimateSize(){let n=0;for(const e of this.ast.body)e.included&&(n+=e.end-e.start);return n}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const n of this.exportAllModules)if(n instanceof fn)this.allExportNames.add(`*${n.id}`);else for(const e of n.getAllExportNames())e!=="default"&&this.allExportNames.add(e);return typeof this.info.syntheticNamedExports=="string"&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const n=new Set,e=new Set,r=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const a of[...this.getReexports(),...this.getExports()]){const[i]=this.getVariableForExportName(a);i&&r.add(i)}for(let a of r){const i=this.sideEffectDependenciesByVariable.get(a);if(i)for(const s of i)e.add(s);a instanceof Dn?a=a.getBaseVariable():a instanceof it&&(a=a.getOriginalVariable()),n.add(a.module)}if(this.options.treeshake&&this.info.moduleSideEffects!=="no-treeshake")this.addRelevantSideEffectDependencies(this.relevantDependencies,n,e);else for(const a of this.dependencies)this.relevantDependencies.add(a);for(const a of n)this.relevantDependencies.add(a);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const n=new Map;for(const e of this.getAllExportNames()){let[r]=this.getVariableForExportName(e);if(r instanceof it&&(r=r.getOriginalVariable()),!r||!(r.included||r instanceof br))continue;const a=n.get(r);a?a.push(e):n.set(r,[e])}return this.exportNamesByVariable=n}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const n=new Set(this.reexportDescriptions.keys());for(const e of this.exportAllModules)if(e instanceof fn)n.add(`*${e.id}`);else for(const r of[...e.getReexports(),...e.getExports()])r!=="default"&&n.add(r);return this.transitiveReexports=[...n]}getRenderedExports(){const n=[],e=[];for(const r of this.exports.keys()){const[a]=this.getVariableForExportName(r);(a&&a.included?n:e).push(r)}return{removedExports:e,renderedExports:n}}getSyntheticNamespace(){return this.syntheticNamespace===null&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports=="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:L((n=this.id,e=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:n,message:`Module "${H(n)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(e)}\` needs ${typeof e=="string"&&e!=="default"?`an explicit export named "${e}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var n,e}getVariableForExportName(n,{importerForSideEffects:e,isExportAllSearch:r,onlyExplicit:a,searchedNamesAndModules:i}=Bn){if(n[0]==="*")return n.length===1?[this.namespace]:this.graph.modulesById.get(n.slice(1)).getVariableForExportName("*");const s=this.reexportDescriptions.get(n);if(s){const[_]=Di(s.module,s.localName,e,!1,i);return _?(e&&(x_(_,e,this),this.info.moduleSideEffects&&zn(e.sideEffectDependenciesByVariable,_,Dt).add(this)),[_]):this.error($r(s.localName,this.id,s.module.id),s.start)}const o=this.exports.get(n);if(o){if(o===v_)return[this.exportShimVariable];const _=o.localName,l=this.traceVariable(_,{importerForSideEffects:e,searchedNamesAndModules:i});return e&&(x_(l,e,this),zn(e.sideEffectDependenciesByVariable,l,Dt).add(this)),[l]}if(a)return[null];if(n!=="default"){const _=this.namespaceReexportsByName.get(n)??this.getVariableFromNamespaceReexports(n,e,i);if(this.namespaceReexportsByName.set(n,_),_[0])return _}return this.info.syntheticNamedExports?[zn(this.syntheticExports,n,()=>new Dn(this.astContext,n,this.getSyntheticNamespace()))]:!r&&this.options.shimMissingExports?(this.shimMissingExport(n),[this.exportShimVariable]):[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.hasCachedEffects()}include(){const n=Ha();this.ast.shouldBeIncluded(n)&&this.ast.include(n,!1)}includeAllExports(n){this.isExecuted||(We(this),this.graph.needsTreeshakingPass=!0);for(const e of this.exports.keys())if(n||e!==this.info.syntheticNamedExports){const r=this.getVariableForExportName(e)[0];r.deoptimizePath(nn),r.included||this.includeVariable(r)}for(const e of this.getReexports()){const[r]=this.getVariableForExportName(e);r&&(r.deoptimizePath(nn),r.included||this.includeVariable(r),r instanceof br&&(r.module.reexported=!0))}n&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(Ha(),!0),this.includeAllExports(!1)}includeExportsByNames(n){this.isExecuted||(We(this),this.graph.needsTreeshakingPass=!0);let e=!1;for(const r of n){const a=this.getVariableForExportName(r)[0];a&&(a.deoptimizePath(nn),a.included||this.includeVariable(a)),this.exports.has(r)||this.reexportDescriptions.has(r)||(e=!0)}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const n=[];for(const e of this.exportAllSources){const r=this.graph.modulesById.get(this.resolvedIds[e].id);r instanceof fn?n.push(r):this.exportAllModules.push(r)}this.exportAllModules.push(...n)}log(n,e,r){this.addLocationToLogProps(e,r),this.options.onLog(n,e)}render(n){const e=this.magicString.clone();this.ast.render(e,n),e.trim();const{usesTopLevelAwait:r}=this.astContext;return r&&n.format!=="es"&&n.format!=="system"?L((a=this.id,i=n.format,{code:"INVALID_TLA_FORMAT",id:a,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:e,usesTopLevelAwait:r};var a,i}setSource({ast:n,code:e,customTransformCache:r,originalCode:a,originalSourcemap:i,resolvedIds:s,sourcemapChain:o,transformDependencies:_,transformFiles:l,...u}){$n("generate ast",3),this.info.code=e,this.originalCode=a,this.originalSourcemap=i,this.sourcemapChain=o,l&&(this.transformFiles=l),this.transformDependencies=_,this.customTransformCache=r,this.updateOptions(u);const f=n??this.tryParse();yn("generate ast",3),$n("analyze ast",3),this.resolvedIds=s??Object.create(null);const m=this.id;this.magicString=new Lt(e,{filename:this.excludeFromSourcemap?null:m,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:e,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:m,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:h=>p_[h]||p_.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:h=>this.getVariableForExportName(h)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new m_(this.graph.scope,this.astContext),this.namespace=new Ue(this.astContext),this.ast=new l_(f,{context:this.astContext,type:"Module"},this.scope),n||this.options.cache!==!1?this.info.ast=f:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(m))return this.graph.astLru.get(m);{const h=this.tryParse();return this.graph.astLru.set(m,h),h}}}),yn("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Li),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(n,{importerForSideEffects:e,isExportAllSearch:r,searchedNamesAndModules:a}=Bn){const i=this.scope.variables.get(n);if(i)return i;const s=this.importDescriptions.get(n);if(s){const o=s.module;if(o instanceof hn&&s.name==="*")return o.namespace;const[_]=Di(o,s.name,e||this,r,a);return _||this.error($r(s.name,this.id,o.id),s.start)}return null}updateOptions({meta:n,moduleSideEffects:e,syntheticNamedExports:r}){e!=null&&(this.info.moduleSideEffects=e),r!=null&&(this.info.syntheticNamedExports=r),n!=null&&Object.assign(this.info.meta,n)}addDynamicImport(n){let e=n.source;e instanceof u_?e.quasis.length===1&&e.quasis[0].value.cooked&&(e=e.quasis[0].value.cooked):e instanceof Ut&&typeof e.value=="string"&&(e=e.value),this.dynamicImports.push({argument:e,id:null,node:n,resolution:null})}addExport(n){if(n instanceof Br)this.exports.set("default",{identifier:n.variable.getAssignedVariableName(),localName:"default"});else if(n instanceof bi){const e=n.source.value;if(this.addSource(e,n),n.exported){const r=n.exported.name;this.reexportDescriptions.set(r,{localName:"*",module:null,source:e,start:n.start})}else this.exportAllSources.add(e)}else if(n.source instanceof Ut){const e=n.source.value;this.addSource(e,n);for(const{exported:r,local:a,start:i}of n.specifiers){const s=r instanceof Ut?r.value:r.name;this.reexportDescriptions.set(s,{localName:a instanceof Ut?a.value:a.name,module:null,source:e,start:i})}}else if(n.declaration){const e=n.declaration;if(e instanceof d_)for(const r of e.declarations)for(const a of Nm(r.id))this.exports.set(a,{identifier:null,localName:a});else{const r=e.id.name;this.exports.set(r,{identifier:null,localName:r})}}else for(const{local:e,exported:r}of n.specifiers){const a=e.name,i=r instanceof cn?r.name:r.value;this.exports.set(i,{identifier:null,localName:a})}}addImport(n){const e=n.source.value;this.addSource(e,n);for(const r of n.specifiers){const a=r instanceof Ko?"default":r instanceof o_?"*":r.imported instanceof cn?r.imported.name:r.imported.value;this.importDescriptions.set(r.local.name,{module:null,name:a,source:e,start:r.start})}}addImportMeta(n){this.importMetas.push(n)}addLocationToLogProps(n,e){n.id=this.id,n.pos=e;let r=this.info.code;const a=Ba(r,e,{offsetLine:1});if(a){let{column:i,line:s}=a;try{({column:i,line:s}=function(o,_){const l=o.filter(u=>!!u.mappings);n:for(;l.length>0;){const u=l.pop().mappings[_.line-1];if(u){const f=u.filter(h=>h.length>1),m=f[f.length-1];for(const h of f)if(h[0]>=_.column||h===m){_={column:h[3],line:h[2]+1};continue n}}throw new Error("Can't resolve original location of error.")}return _}(this.sourcemapChain,{column:i,line:s})),r=this.originalCode}catch(o){this.options.onLog(V,function(_,l,u,f,m){return{cause:_,code:"SOURCEMAP_ERROR",id:l,loc:{column:u,file:l,line:f},message:`Error when using sourcemap for reporting an error: ${_.message}`,pos:m}}(o,this.id,i,s,e))}yr(n,{column:i,line:s},r,this.id)}}addModulesToImportDescriptions(n){for(const e of n.values()){const{id:r}=this.resolvedIds[e.source];e.module=this.graph.modulesById.get(r)}}addRelevantSideEffectDependencies(n,e,r){const a=new Set,i=s=>{for(const o of s)a.has(o)||(a.add(o),e.has(o)?n.add(o):(o.info.moduleSideEffects||r.has(o))&&(o instanceof fn||o.hasEffects()?n.add(o):i(o.dependencies)))};i(this.dependencies),i(r)}addSource(n,e){const r=(a=e.assertions,a!=null&&a.length?Object.fromEntries(a.map(s=>[Mi(s),s.value.value])):Bn);var a;const i=this.sourcesWithAssertions.get(n);i?Ur(i,r)&&this.log(V,xr(i,r,n,this.id),e.start):this.sourcesWithAssertions.set(n,r)}getVariableFromNamespaceReexports(n,e,r){let a=null;const i=new Map,s=new Set;for(const u of this.exportAllModules){if(u.info.syntheticNamedExports===n)continue;const[f,m]=Di(u,n,e,!0,kd(r));u instanceof fn||m?s.add(f):f instanceof Dn?a||(a=f):f&&i.set(f,u)}if(i.size>0){const u=[...i],f=u[0][0];return u.length===1?[f]:(this.options.onLog(V,(o=n,_=this.id,l=u.map(([,m])=>m.id),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${H(_)}" re-exports "${o}" from one of the modules ${mt(l.map(m=>H(m)))} (will be ignored).`,reexporter:_})),[null])}var o,_,l;if(s.size>0){const u=[...s],f=u[0];return u.length>1&&this.options.onLog(V,function(m,h,v,p){return{binding:m,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:p,message:`Ambiguous external namespace resolution: "${H(h)}" re-exports "${m}" from one of the external modules ${mt(p.map(g=>H(g)))}, guessing "${H(v)}".`,reexporter:h}}(n,this.id,f.module.id,u.map(m=>m.module.id))),[f,!0]}return a?[a]:[null]}includeAndGetAdditionalMergedNamespaces(){const n=new Set,e=new Set;for(const r of[this,...this.exportAllModules])if(r instanceof fn){const[a]=r.getVariableForExportName("*");a.include(),this.includedImports.add(a),n.add(a)}else if(r.info.syntheticNamedExports){const a=r.getSyntheticNamespace();a.include(),this.includedImports.add(a),e.add(a)}return[...e,...n]}includeDynamicImport(n){const e=this.dynamicImports.find(r=>r.node===n).resolution;if(e instanceof hn){e.includedDynamicImporters.push(this);const r=this.options.treeshake?n.getDeterministicImportedNames():void 0;r?e.includeExportsByNames(r):e.includeAllExports(!0)}}includeVariable(n){const e=n.module;if(n.included)e instanceof hn&&e!==this&&y_(n,this);else if(n.include(),this.graph.needsTreeshakingPass=!0,e instanceof hn&&(e.isExecuted||We(e),e!==this)){const r=y_(n,this);for(const a of r)a.isExecuted||We(a)}}includeVariableInModule(n){this.includeVariable(n);const e=n.module;e&&e!==this&&this.includedImports.add(n)}shimMissingExport(n){var e,r;this.options.onLog(V,(e=this.id,{binding:r=n,code:"SHIMMED_EXPORT",exporter:e,message:`Missing export "${r}" has been shimmed in module "${H(e)}".`})),this.exports.set(n,v_)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(n){return this.error(function(e,r){let a=e.message.replace(/ \(\d+:\d+\)$/,"");return r.endsWith(".json")?a+=" (Note that you need @rollup/plugin-json to import JSON files)":r.endsWith(".js")||(a+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:"PARSE_ERROR",id:r,message:a}}(n,this.id),n.pos)}}}function x_(t,n,e){if(t.module instanceof hn&&t.module!==e){const r=t.module.cycles;if(r.size>0){const a=e.cycles;for(const i of a)if(r.has(i)){n.alternativeReexportModules.set(t,e);break}}}}const kd=t=>t&&new Map(Array.from(t,([n,e])=>[n,new Set(e)]));function $_(t){return t.endsWith(".js")?t.slice(0,-3):t}function E_(t,n){return t.autoId?`${t.basePath?t.basePath+"/":""}${$_(n)}`:t.id??""}function Hr(t,n,e,r,a,i,s,o="return "){const{_,getDirectReturnFunction:l,getFunctionIntro:u,getPropertyAccess:f,n:m,s:h}=a;if(!e)return`${m}${m}${o}${function(p,g,y,E,b){if(p.length>0)return p[0].local;for(const{defaultVariableName:x,importPath:$,isChunk:S,name:A,namedExportsMode:N,namespaceVariableName:k,reexports:I}of g)if(I)return k_(A,I[0].imported,N,S,x,k,y,$,E,b)}(t,n,r,s,f)};`;let v="";for(const{defaultVariableName:p,importPath:g,isChunk:y,name:E,namedExportsMode:b,namespaceVariableName:x,reexports:$}of n)if($&&e){for(const S of $)if(S.reexported!=="*"){const A=k_(E,S.imported,b,y,p,x,r,g,s,f);if(v&&(v+=m),S.imported!=="*"&&S.needsLiveBinding){const[N,k]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});v+=`Object.defineProperty(exports,${_}'${S.reexported}',${_}{${m}${i}enumerable:${_}true,${m}${i}get:${_}${N}${A}${k}${m}});`}else v+=`exports${f(S.reexported)}${_}=${_}${A};`}}for(const{exported:p,local:g}of t){const y=`exports${f(p)}`;y!==g&&(v&&(v+=m),v+=`${y}${_}=${_}${g};`)}for(const{name:p,reexports:g}of n)if(g&&e){for(const y of g)if(y.reexported==="*"){v&&(v+=m);const E=`{${m}${i}if${_}(k${_}!==${_}'default'${_}&&${_}!exports.hasOwnProperty(k))${_}${wd(p,y.needsLiveBinding,i,a)}${h}${m}}`;v+=`Object.keys(${p}).forEach(${u(["k"],{isAsync:!1,name:null})}${E});`}}return v?`${m}${m}${v}`:""}function k_(t,n,e,r,a,i,s,o,_,l){if(n==="default"){if(!r){const u=s(o),f=qr[u]?a:t;return Vr(u,_)?`${f}${l("default")}`:f}return e?`${t}${l("default")}`:t}return n==="*"?(r?!e:qe[s(o)])?i:t:`${t}${l(n)}`}function w_(t){return t([["value","true"]],{lineBreakIndent:null})}function Wr(t,n,e,{_:r,getObject:a}){if(t){if(n)return e?`Object.defineProperties(exports,${r}${a([["__esModule",w_(a)],[null,`[Symbol.toStringTag]:${r}${Ve(a)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${r}'__esModule',${r}${w_(a)});`;if(e)return`Object.defineProperty(exports,${r}Symbol.toStringTag,${r}${Ve(a)});`}return""}const wd=(t,n,e,{_:r,getDirectReturnFunction:a,n:i})=>{if(n){const[s,o]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${r}k,${r}{${i}${e}${e}enumerable:${r}true,${i}${e}${e}get:${r}${s}${t}[k]${o}${i}${e}})`}return`exports[k]${r}=${r}${t}[k]`};function Jr(t,n,e,r,a,i,s,o){const{_,cnst:l,n:u}=o,f=new Set,m=[],h=(v,p,g)=>{f.add(p),m.push(`${l} ${v}${_}=${_}/*#__PURE__*/${p}(${g});`)};for(const{defaultVariableName:v,imports:p,importPath:g,isChunk:y,name:E,namedExportsMode:b,namespaceVariableName:x,reexports:$}of t)if(y){for(const{imported:S,reexported:A}of[...p||[],...$||[]])if(S==="*"&&A!=="*"){b||h(x,Re,E);break}}else{const S=n(g);let A=!1,N=!1;for(const{imported:k,reexported:I}of[...p||[],...$||[]]){let R,P;k==="default"?A||(A=!0,v!==x&&(P=v,R=qr[S])):k!=="*"||I==="*"||N||(N=!0,R=qe[S],P=x),R&&h(P,R,E)}}return`${$i(f,i,s,o,e,r,a)}${m.length>0?`${m.join(u)}${u}${u}`:""}`}function C_(t,n){return t[0]!=="."?t:n?(e=t).endsWith(".js")?e:e+".js":$_(t);var e}const Cd=new Set([...Es(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function Pi(t,n){const e=n.map(({importPath:r})=>r).filter(r=>Cd.has(r)||r.startsWith("node:"));e.length!==0&&t(V,function(r){return{code:hm,ids:r,message:`Creating a browser bundle that depends on Node.js built-in modules (${mt(r)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(e))}const Kr=(t,n)=>t.split(".").map(n).join("");function Oi(t,n,e,r,{_:a,getPropertyAccess:i}){const s=t.split(".");s[0]=(typeof e=="function"?e(s[0]):e[s[0]])||s[0];const o=s.pop();let _=n,l=[...s.map(u=>(_+=i(u),`${_}${a}=${a}${_}${a}||${a}{}`)),`${_}${i(o)}`].join(`,${a}`)+`${a}=${a}${r}`;return s.length>0&&(l=`(${l})`),l}function S_(t){let n=t.length;for(;n--;){const{imports:e,reexports:r}=t[n];if(e||r)return t.slice(0,n+1)}return[]}const Sd=({dependencies:t,exports:n})=>{const e=new Set(n.map(r=>r.exported));e.add("default");for(const{reexports:r}of t)if(r)for(const a of r)a.reexported!=="*"&&e.add(a.reexported);return e},Ad=(t,n,{_:e,cnst:r,getObject:a,n:i})=>t?`${i}${n}${r} _starExcludes${e}=${e}${a([...t].map(s=>[s,"1"]),{lineBreakIndent:{base:n,t:n}})};`:"",Id=(t,n,{_:e,n:r})=>t.length>0?`${r}${n}var ${t.join(`,${e}`)};`:"",Nd=(t,n,e)=>zi(t.filter(r=>r.hoisted).map(r=>({name:r.exported,value:r.local})),n,e);function zi(t,n,{_:e,n:r}){return t.length===0?"":t.length===1?`exports('${t[0].name}',${e}${t[0].value});${r}${r}`:`exports({${r}`+t.map(({name:a,value:i})=>`${n}${a}:${e}${i}`).join(`,${r}`)+`${r}});${r}${r}`}const Td=(t,n,e)=>zi(t.filter(r=>r.expression).map(r=>({name:r.exported,value:r.local})),n,e),jd=(t,n,e)=>zi(t.filter(r=>r.local===ce).map(r=>({name:r.exported,value:ce})),n,e);function Bi(t,n,e){return t?`${n}${Kr(t,e)}`:"null"}var Ld={amd:function(t,{accessedGlobals:n,dependencies:e,exports:r,hasDefaultExport:a,hasExports:i,id:s,indent:o,intro:_,isEntryFacade:l,isModuleFacade:u,namedExportsMode:f,log:m,outro:h,snippets:v},{amd:p,esModule:g,externalLiveBindings:y,freeze:E,interop:b,namespaceToStringTag:x,strict:$}){Pi(m,e);const S=e.map(w=>`'${C_(w.importPath,p.forceJsExtensionForImports)}'`),A=e.map(w=>w.name),{n:N,getNonArrowFunctionIntro:k,_:I}=v;f&&i&&(A.unshift("exports"),S.unshift("'exports'")),n.has("require")&&(A.unshift("require"),S.unshift("'require'")),n.has("module")&&(A.unshift("module"),S.unshift("'module'"));const R=E_(p,s),P=(R?`'${R}',${I}`:"")+(S.length>0?`[${S.join(`,${I}`)}],${I}`:""),F=$?`${I}'use strict';`:"";t.prepend(`${_}${Jr(e,b,y,E,x,n,o,v)}`);const D=Hr(r,e,f,b,v,o,y);let z=Wr(f&&i,l&&(g===!0||g==="if-default-prop"&&a),u&&x,v);z&&(z=N+N+z),t.append(`${D}${z}${h}`).indent(o).prepend(`${p.define}(${P}(${k(A,{isAsync:!1,name:null})}{${F}${N}${N}`).append(`${N}${N}}));`)},cjs:function(t,{accessedGlobals:n,dependencies:e,exports:r,hasDefaultExport:a,hasExports:i,indent:s,intro:o,isEntryFacade:_,isModuleFacade:l,namedExportsMode:u,outro:f,snippets:m},{compact:h,esModule:v,externalLiveBindings:p,freeze:g,interop:y,namespaceToStringTag:E,strict:b}){const{_:x,n:$}=m,S=b?`'use strict';${$}${$}`:"";let A=Wr(u&&i,_&&(v===!0||v==="if-default-prop"&&a),l&&E,m);A&&(A+=$+$);const N=function(R,{_:P,cnst:F,n:D},z){let w="",T=!1;for(const{importPath:B,name:K,reexports:rn,imports:an}of R)rn||an?(w+=z&&T?",":`${w?`;${D}`:""}${F} `,T=!0,w+=`${K}${P}=${P}require('${B}')`):(w&&(w+=z&&!T?",":`;${D}`),T=!1,w+=`require('${B}')`);return w?`${w};${D}${D}`:""}(e,m,h),k=Jr(e,y,p,g,E,n,s,m);t.prepend(`${S}${o}${A}${N}${k}`);const I=Hr(r,e,u,y,m,s,p,`module.exports${x}=${x}`);t.append(`${I}${f}`)},es:function(t,{accessedGlobals:n,indent:e,intro:r,outro:a,dependencies:i,exports:s,snippets:o},{externalLiveBindings:_,freeze:l,namespaceToStringTag:u}){const{n:f}=o,m=function(v,{_:p}){const g=[];for(const{importPath:y,reexports:E,imports:b,name:x,assertions:$}of v){const S=`'${y}'${$?`${p}assert${p}${$}`:""};`;if(E||b){if(b){let A=null,N=null;const k=[];for(const I of b)I.imported==="default"?A=I:I.imported==="*"?N=I:k.push(I);N&&g.push(`import${p}*${p}as ${N.local} from${p}${S}`),A&&k.length===0?g.push(`import ${A.local} from${p}${S}`):k.length>0&&g.push(`import ${A?`${A.local},${p}`:""}{${p}${k.map(I=>I.imported===I.local?I.imported:`${I.imported} as ${I.local}`).join(`,${p}`)}${p}}${p}from${p}${S}`)}if(E){let A=null;const N=[],k=[];for(const I of E)I.reexported==="*"?A=I:I.imported==="*"?N.push(I):k.push(I);if(A&&g.push(`export${p}*${p}from${p}${S}`),N.length>0){b&&b.some(I=>I.imported==="*"&&I.local===x)||g.push(`import${p}*${p}as ${x} from${p}${S}`);for(const I of N)g.push(`export${p}{${p}${x===I.reexported?x:`${x} as ${I.reexported}`} };`)}k.length>0&&g.push(`export${p}{${p}${k.map(I=>I.imported===I.reexported?I.imported:`${I.imported} as ${I.reexported}`).join(`,${p}`)}${p}}${p}from${p}${S}`)}}else g.push(`import${p}${S}`)}return g}(i,o);m.length>0&&(r+=m.join(f)+f+f),(r+=$i(null,n,e,o,_,l,u))&&t.prepend(r);const h=function(v,{_:p,cnst:g}){const y=[],E=[];for(const b of v)b.expression&&y.push(`${g} ${b.local}${p}=${p}${b.expression};`),E.push(b.exported===b.local?b.local:`${b.local} as ${b.exported}`);return E.length>0&&y.push(`export${p}{${p}${E.join(`,${p}`)}${p}};`),y}(s,o);h.length>0&&t.append(f+f+h.join(f).trim()),a&&t.append(a),t.trim()},iife:function(t,{accessedGlobals:n,dependencies:e,exports:r,hasDefaultExport:a,hasExports:i,indent:s,intro:o,namedExportsMode:_,log:l,outro:u,snippets:f},{compact:m,esModule:h,extend:v,freeze:p,externalLiveBindings:g,globals:y,interop:E,name:b,namespaceToStringTag:x,strict:$}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:N,n:k}=f,I=b&&b.includes("."),R=!v&&!I;if(b&&R&&(Os(P=b)||Ps.test(P)))return L(function(_n){return{code:lm,message:`Given name "${_n}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:wn(Jf)}}(b));var P;Pi(l,e);const F=S_(e),D=F.map(_n=>_n.globalName||"null"),z=F.map(_n=>_n.name);i&&!b&&l(V,{code:Us,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:wn(Gs)}),_&&i&&(v?(D.unshift(`this${Kr(b,N)}${S}=${S}this${Kr(b,N)}${S}||${S}{}`),z.unshift("exports")):(D.unshift("{}"),z.unshift("exports")));const w=$?`${s}'use strict';${k}`:"",T=Jr(e,E,g,p,x,n,s,f);t.prepend(`${o}${T}`);let B=`(${A(z,{isAsync:!1,name:null})}{${k}${w}${k}`;i&&(!b||v&&_||(B=(R?`var ${b}`:`this${Kr(b,N)}`)+`${S}=${S}${B}`),I&&(B=function(_n,ln,Cn,{_:sn,getPropertyAccess:Nn,s:Yt},Tn){const Sn=_n.split(".");Sn[0]=(typeof Cn=="function"?Cn(Sn[0]):Cn[Sn[0]])||Sn[0],Sn.pop();let he=ln;return Sn.map(fs=>(he+=Nn(fs),`${he}${sn}=${sn}${he}${sn}||${sn}{}${Yt}`)).join(Tn?",":`
-`)+(Tn&&Sn.length>0?";":`
-`)}(b,"this",y,f,m)+B));let K=`${k}${k}})(${D.join(`,${S}`)});`;i&&!v&&_&&(K=`${k}${k}${s}return exports;${K}`);const rn=Hr(r,e,_,E,f,s,g);let an=Wr(_&&i,h===!0||h==="if-default-prop"&&a,x,f);an&&(an=k+k+an),t.append(`${rn}${an}${u}`).indent(s).prepend(B).append(K)},system:function(t,{accessedGlobals:n,dependencies:e,exports:r,hasExports:a,indent:i,intro:s,snippets:o,outro:_,usesTopLevelAwait:l},{externalLiveBindings:u,freeze:f,name:m,namespaceToStringTag:h,strict:v,systemNullSetters:p}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:E,n:b,s:x}=o,{importBindings:$,setters:S,starExcludes:A}=function(P,F,D,{_:z,cnst:w,getObject:T,getPropertyAccess:B,n:K}){const rn=[],an=[];let _n=null;for(const{imports:ln,reexports:Cn}of P){const sn=[];if(ln)for(const Nn of ln)rn.push(Nn.local),Nn.imported==="*"?sn.push(`${Nn.local}${z}=${z}module;`):sn.push(`${Nn.local}${z}=${z}module${B(Nn.imported)};`);if(Cn){const Nn=[];let Yt=!1;for(const{imported:Tn,reexported:Sn}of Cn)Sn==="*"?Yt=!0:Nn.push([Sn,Tn==="*"?"module":`module${B(Tn)}`]);if(Nn.length>1||Yt){const Tn=T(Nn,{lineBreakIndent:null});Yt?(_n||(_n=Sd({dependencies:P,exports:F})),sn.push(`${w} setter${z}=${z}${Tn};`,`for${z}(${w} name in module)${z}{`,`${D}if${z}(!_starExcludes[name])${z}setter[name]${z}=${z}module[name];`,"}","exports(setter);")):sn.push(`exports(${Tn});`)}else{const[Tn,Sn]=Nn[0];sn.push(`exports('${Tn}',${z}${Sn});`)}}an.push(sn.join(`${K}${D}${D}${D}`))}return{importBindings:rn,setters:an,starExcludes:_n}}(e,r,i,o),N=m?`'${m}',${g}`:"",k=n.has("module")?["exports","module"]:a?["exports"]:[];let I=`System.register(${N}[`+e.map(({importPath:P})=>`'${P}'`).join(`,${g}`)+`],${g}(${E(k,{isAsync:!1,name:null})}{${b}${i}${v?"'use strict';":""}`+Ad(A,i,o)+Id($,i,o)+`${b}${i}return${g}{${S.length>0?`${b}${i}${i}setters:${g}[${S.map(P=>P?`${y(["module"],{isAsync:!1,name:null})}{${b}${i}${i}${i}${P}${b}${i}${i}}`:p?"null":`${y([],{isAsync:!1,name:null})}{}`).join(`,${g}`)}],`:""}${b}`;I+=`${i}${i}execute:${g}(${E([],{isAsync:l,name:null})}{${b}${b}`;const R=`${i}${i}})${b}${i}}${x}${b}}));`;t.prepend(s+$i(null,n,i,o,u,f,h)+Nd(r,i,o)).append(`${_}${b}${b}`+Td(r,i,o)+jd(r,i,o)).indent(`${i}${i}${i}`).append(R).prepend(I)},umd:function(t,{accessedGlobals:n,dependencies:e,exports:r,hasDefaultExport:a,hasExports:i,id:s,indent:o,intro:_,namedExportsMode:l,log:u,outro:f,snippets:m},{amd:h,compact:v,esModule:p,extend:g,externalLiveBindings:y,freeze:E,interop:b,name:x,namespaceToStringTag:$,globals:S,noConflict:A,strict:N}){const{_:k,cnst:I,getFunctionIntro:R,getNonArrowFunctionIntro:P,getPropertyAccess:F,n:D,s:z}=m,w=v?"f":"factory",T=v?"g":"global";if(i&&!x)return L({code:Us,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:wn(Gs)});Pi(u,e);const B=e.map(Rn=>`'${C_(Rn.importPath,h.forceJsExtensionForImports)}'`),K=e.map(Rn=>`require('${Rn.importPath}')`),rn=S_(e),an=rn.map(Rn=>Bi(Rn.globalName,T,F)),_n=rn.map(Rn=>Rn.name);l&&(i||A)&&(B.unshift("'exports'"),K.unshift("exports"),an.unshift(Oi(x,T,S,(g?`${Bi(x,T,F)}${k}||${k}`:"")+"{}",m)),_n.unshift("exports"));const ln=E_(h,s),Cn=(ln?`'${ln}',${k}`:"")+(B.length>0?`[${B.join(`,${k}`)}],${k}`:""),sn=h.define,Nn=!l&&i?`module.exports${k}=${k}`:"",Yt=N?`${k}'use strict';${D}`:"";let Tn;if(A){const Rn=v?"e":"exports";let ms;!l&&i?ms=`${I} ${Rn}${k}=${k}${Oi(x,T,S,`${w}(${an.join(`,${k}`)})`,m)};`:ms=`${I} ${Rn}${k}=${k}${an.shift()};${D}${o}${o}${w}(${[Rn,...an].join(`,${k}`)});`,Tn=`(${R([],{isAsync:!1,name:null})}{${D}${o}${o}${I} current${k}=${k}${function(_1,l1,{_:nc,getPropertyAccess:c1}){let u1=l1;return _1.split(".").map(f1=>u1+=c1(f1)).join(`${nc}&&${nc}`)}(x,T,m)};${D}${o}${o}${ms}${D}${o}${o}${Rn}.noConflict${k}=${k}${R([],{isAsync:!1,name:null})}{${k}${Bi(x,T,F)}${k}=${k}current;${k}return ${Rn}${z}${k}};${D}${o}})()`}else Tn=`${w}(${an.join(`,${k}`)})`,!l&&i&&(Tn=Oi(x,T,S,Tn,m));const Sn=i||A&&l||an.length>0,he=[w];Sn&&he.unshift(T);const fs=Sn?`this,${k}`:"",e1=Sn?`(${T}${k}=${k}typeof globalThis${k}!==${k}'undefined'${k}?${k}globalThis${k}:${k}${T}${k}||${k}self,${k}`:"",r1=Sn?")":"",a1=Sn?`${o}typeof exports${k}===${k}'object'${k}&&${k}typeof module${k}!==${k}'undefined'${k}?${k}${Nn}${w}(${K.join(`,${k}`)})${k}:${D}`:"",i1=`(${P(he,{isAsync:!1,name:null})}{${D}`+a1+`${o}typeof ${sn}${k}===${k}'function'${k}&&${k}${sn}.amd${k}?${k}${sn}(${Cn}${w})${k}:${D}${o}${e1}${Tn}${r1};${D}})(${fs}(${P(_n,{isAsync:!1,name:null})}{${Yt}${D}`,s1=D+D+"}));";t.prepend(`${_}${Jr(e,b,y,E,$,n,o,m)}`);const o1=Hr(r,e,l,b,m,o,y);let ha=Wr(l&&i,p===!0||p==="if-default-prop"&&a,$,m);ha&&(ha=D+D+ha),t.append(`${o1}${ha}${f}`).trim().indent(o).append(s1).prepend(i1)}};const A_=(t,n)=>n?`${t}
-${n}`:t,I_=(t,n)=>n?`${t}
-
-${n}`:t;async function Md(t,n,e){try{let[s,o,_,l]=await Promise.all([n.hookReduceValue("banner",t.banner(e),[e],A_),n.hookReduceValue("footer",t.footer(e),[e],A_),n.hookReduceValue("intro",t.intro(e),[e],I_),n.hookReduceValue("outro",t.outro(e),[e],I_)]);return _&&(_+=`
-
-`),l&&(l=`
-
-${l}`),s&&(s+=`
+ */var Ia="3.25.1";function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Es={exports:{}};(function(e){const n=",".charCodeAt(0),t=";".charCodeAt(0),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),i=new Uint8Array(128);for(let p=0;pBuffer.from(p.buffer,p.byteOffset,p.byteLength).toString()}:{decode(p){let v="";for(let y=0;y>>=1,A&&(g=-2147483648|-g),y[$]+=g,v}function u(p,v,y){return!(v>=y)&&p.charCodeAt(v)!==n}function f(p){p.sort(d)}function d(p,v){return p[0]-v[0]}function h(p){const v=new Int32Array(5),y=16384,$=y-36,g=new Uint8Array(y),x=g.subarray(0,$);let k=0,A="";for(let S=0;S0&&(k===y&&(A+=s.decode(g),k=0),g[k++]=t),I.length!==0){v[0]=0;for(let E=0;E$&&(A+=s.decode(x),g.copyWithin(0,$,k),k-=$),E>0&&(g[k++]=n),k=b(g,k,v,B,0),B.length!==1&&(k=b(g,k,v,B,1),k=b(g,k,v,B,2),k=b(g,k,v,B,3),B.length!==4&&(k=b(g,k,v,B,4)))}}}return A+s.decode(g.subarray(0,k))}function b(p,v,y,$,g){const x=$[g];let k=x-y[g];y[g]=x,k=k<0?-k<<1|1:k<<1;do{let A=31&k;k>>>=5,k>0&&(A|=32),p[v++]=a[A]}while(k>0);return v}e.decode=o,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})})(Es.exports);var Cs=Es.exports;class fr{constructor(n){this.bits=n instanceof fr?n.bits.slice():[]}add(n){this.bits[n>>5]|=1<<(31&n)}has(n){return!!(this.bits[n>>5]&1<<(31&n))}}let ws=class ms{constructor(n,t,r){this.start=n,this.end=t,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(n){this.outro+=n}appendRight(n){this.intro=this.intro+n}clone(){const n=new ms(this.start,this.end,this.original);return n.intro=this.intro,n.outro=this.outro,n.content=this.content,n.storeName=this.storeName,n.edited=this.edited,n}contains(n){return this.startwindow.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.")}}const Sd=Ad();class dr{constructor(n){this.version=3,this.file=n.file,this.sources=n.sources,this.sourcesContent=n.sourcesContent,this.names=n.names,this.mappings=Cs.encode(n.mappings),n.x_google_ignoreList!==void 0&&(this.x_google_ignoreList=n.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Sd(this.toString())}}function As(e,n){const t=e.split(/[/\\]/),r=n.split(/[/\\]/);for(t.pop();t[0]===r[0];)t.shift(),r.shift();if(t.length){let a=t.length;for(;a--;)t[a]=".."}return t.concat(r).join("/")}const Bd=Object.prototype.toString;function Ss(e){return Bd.call(e)==="[object Object]"}function La(e){const n=e.split(`
+`),t=[];for(let r=0,a=0;r>1;r=0&&i.push(a),this.rawSegments.push(i)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null}addUneditedChunk(n,t,r,a,i){let s=t.start,o=!0;for(;s1){for(let r=0;r{const s=a(i.start);i.intro.length&&r.advance(i.intro),i.edited?r.addEdit(0,i.content,s,i.storeName?t.indexOf(i.original):-1):r.addUneditedChunk(0,i,this.original,s,this.sourcemapLocations),i.outro.length&&r.advance(i.outro)}),{file:n.file?n.file.split(/[/\\]/).pop():void 0,sources:[n.source?As(n.file||"",n.source):n.file||""],sourcesContent:n.includeContent?[this.original]:void 0,names:t,mappings:r.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(n){return new dr(this.generateDecodedMap(n))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=function(n){const t=n.split(`
+`),r=t.filter(s=>/^\t+/.test(s)),a=t.filter(s=>/^ {2,}/.test(s));if(r.length===0&&a.length===0)return null;if(r.length>=a.length)return" ";const i=a.reduce((s,o)=>{const l=/^ +/.exec(o)[0].length;return Math.min(l,s)},1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(n,t){const r=/^[^\r\n]/gm;if(Ss(n)&&(t=n,n=void 0),n===void 0&&(this._ensureindentStr(),n=this.indentStr||" "),n==="")return this;const a={};(t=t||{}).exclude&&(typeof t.exclude[0]=="number"?[t.exclude]:t.exclude).forEach(_=>{for(let u=_[0];u<_[1];u+=1)a[u]=!0});let i=t.indentStart!==!1;const s=_=>i?`${n}${_}`:(i=!0,_);this.intro=this.intro.replace(r,s);let o=0,l=this.firstChunk;for(;l;){const _=l.end;if(l.edited)a[o]||(l.content=l.content.replace(r,s),l.content.length&&(i=l.content[l.content.length-1]===`
+`));else for(o=l.start;o<_;){if(!a[o]){const u=this.original[o];u===`
+`?i=!0:u!=="\r"&&i&&(i=!1,o===l.start||(this._splitChunk(l,o),l=l.next),l.prependRight(n))}o+=1}o=l.end,l=l.next}return this.outro=this.outro.replace(r,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(n,t){return Ze.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Ze.insertLeft=!0),this.appendLeft(n,t)}insertRight(n,t){return Ze.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Ze.insertRight=!0),this.prependRight(n,t)}move(n,t,r){if(r>=n&&r<=t)throw new Error("Cannot move a selection inside itself");this._split(n),this._split(t),this._split(r);const a=this.byStart[n],i=this.byEnd[t],s=a.previous,o=i.next,l=this.byStart[r];if(!l&&i===this.lastChunk)return this;const _=l?l.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),_&&(_.next=a),l&&(l.previous=i),a.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=a.previous,this.lastChunk.next=null),a.previous=_,i.next=l||null,_||(this.firstChunk=a),l||(this.lastChunk=i),this}overwrite(n,t,r,a){return a=a||{},this.update(n,t,r,{...a,overwrite:!a.contentOnly})}update(n,t,r,a){if(typeof r!="string")throw new TypeError("replacement content must be a string");for(;n<0;)n+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(n===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(n),this._split(t),a===!0&&(Ze.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Ze.storeName=!0),a={storeName:!0});const i=a!==void 0&&a.storeName,s=a!==void 0&&a.overwrite;if(i){const _=this.original.slice(n,t);Object.defineProperty(this.storedNames,_,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[n],l=this.byEnd[t];if(o){let _=o;for(;_!==l;){if(_.next!==this.byStart[_.end])throw new Error("Cannot overwrite across a split point");_=_.next,_.edit("",!1)}o.edit(r,i,!s)}else{const _=new ws(n,t,"").edit(r,i);l.next=_,_.previous=l}return this}prepend(n){if(typeof n!="string")throw new TypeError("outro content must be a string");return this.intro=n+this.intro,this}prependLeft(n,t){if(typeof t!="string")throw new TypeError("inserted content must be a string");this._split(n);const r=this.byEnd[n];return r?r.prependLeft(t):this.intro=t+this.intro,this}prependRight(n,t){if(typeof t!="string")throw new TypeError("inserted content must be a string");this._split(n);const r=this.byStart[n];return r?r.prependRight(t):this.outro=t+this.outro,this}remove(n,t){for(;n<0;)n+=this.original.length;for(;t<0;)t+=this.original.length;if(n===t)return this;if(n<0||t>this.original.length)throw new Error("Character is out of bounds");if(n>t)throw new Error("end must be greater than start");this._split(n),this._split(t);let r=this.byStart[n];for(;r;)r.intro="",r.outro="",r.edit(""),r=t>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let n=this.lastChunk;do{if(n.outro.length)return n.outro[n.outro.length-1];if(n.content.length)return n.content[n.content.length-1];if(n.intro.length)return n.intro[n.intro.length-1]}while(n=n.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let n=this.outro.lastIndexOf(kt);if(n!==-1)return this.outro.substr(n+1);let t=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(n=r.outro.lastIndexOf(kt),n!==-1)return r.outro.substr(n+1)+t;t=r.outro+t}if(r.content.length>0){if(n=r.content.lastIndexOf(kt),n!==-1)return r.content.substr(n+1)+t;t=r.content+t}if(r.intro.length>0){if(n=r.intro.lastIndexOf(kt),n!==-1)return r.intro.substr(n+1)+t;t=r.intro+t}}while(r=r.previous);return n=this.intro.lastIndexOf(kt),n!==-1?this.intro.substr(n+1)+t:this.intro+t}slice(n=0,t=this.original.length){for(;n<0;)n+=this.original.length;for(;t<0;)t+=this.original.length;let r="",a=this.firstChunk;for(;a&&(a.start>n||a.end<=n);){if(a.start=t)return r;a=a.next}if(a&&a.edited&&a.start!==n)throw new Error(`Cannot use replaced character ${n} as slice start anchor.`);const i=a;for(;a;){!a.intro||i===a&&a.start!==n||(r+=a.intro);const s=a.start=t;if(s&&a.edited&&a.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=i===a?n-a.start:0,l=s?a.content.length+t-a.end:a.content.length;if(r+=a.content.slice(o,l),!a.outro||s&&a.end!==t||(r+=a.outro),s)break;a=a.next}return r}snip(n,t){const r=this.clone();return r.remove(0,n),r.remove(t,r.original.length),r}_split(n){if(this.byStart[n]||this.byEnd[n])return;let t=this.lastSearchedChunk;const r=n>t.end;for(;t;){if(t.contains(n))return this._splitChunk(t,n);t=r?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(n,t){if(n.edited&&n.content.length){const a=La(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${a.line}:${a.column} – "${n.original}")`)}const r=n.split(t);return this.byEnd[t]=n,this.byStart[t]=r,this.byEnd[r.end]=r,n===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=n,!0}toString(){let n=this.intro,t=this.firstChunk;for(;t;)n+=t.toString(),t=t.next;return n+this.outro}isEmpty(){let n=this.firstChunk;do if(n.intro.length&&n.intro.trim()||n.content.length&&n.content.trim()||n.outro.length&&n.outro.trim())return!1;while(n=n.next);return!0}length(){let n=this.firstChunk,t=0;do t+=n.intro.length+n.content.length+n.outro.length;while(n=n.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(n){return this.trimStart(n).trimEnd(n)}trimEndAborted(n){const t=new RegExp((n||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.lastChunk;do{const a=r.end,i=r.trimEnd(t);if(r.end!==a&&(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(n){return this.trimEndAborted(n),this}trimStartAborted(n){const t=new RegExp("^"+(n||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.firstChunk;do{const a=r.end,i=r.trimStart(t);if(r.end!==a&&(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(n){return this.trimStartAborted(n),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(n,t){function r(a,i){return typeof t=="string"?t.replace(/\$(\$|&|\d+)/g,(s,o)=>o==="$"?"$":o==="&"?a[0]:+o{a.index!=null&&this.overwrite(a.index,a.index+a[0].length,r(a,this.original))});else{const a=this.original.match(n);a&&a.index!=null&&this.overwrite(a.index,a.index+a[0].length,r(a,this.original))}return this}_replaceString(n,t){const{original:r}=this,a=r.indexOf(n);return a!==-1&&this.overwrite(a,a+n.length,t),this}replace(n,t){return typeof n=="string"?this._replaceString(n,t):this._replaceRegexp(n,t)}_replaceAllString(n,t){const{original:r}=this,a=n.length;for(let i=r.indexOf(n);i!==-1;i=r.indexOf(n,i+a))this.overwrite(i,i+a,t);return this}replaceAll(n,t){if(typeof n=="string")return this._replaceAllString(n,t);if(!n.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(n,t)}}const Is=Object.prototype.hasOwnProperty,Id=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,Ld=/^\.?\.\//,Nd=/\\/g,Qe=/[/\\]/,Md=/\.[^.]+$/;function be(e){return Id.test(e)}function Na(e){return Ld.test(e)}function $t(e){return e.replace(Nd,"/")}function fe(e){return e.split(Qe).pop()||""}function je(e){const n=/[/\\][^/\\]*$/.exec(e);return n?e.slice(0,-n[0].length)||"/":"."}function ye(e){const n=Md.exec(fe(e));return n?n[0]:""}function nt(e,n){const t=e.split(Qe).filter(Boolean),r=n.split(Qe).filter(Boolean);for(t[0]==="."&&t.shift(),r[0]==="."&&r.shift();t[0]&&r[0]&&t[0]===r[0];)t.shift(),r.shift();for(;r[0]===".."&&t.length>0;)r.shift(),t.pop();for(;t.pop();)r.unshift("..");return r.join("/")}function Kn(...e){const n=e.shift();if(!n)return"/";let t=n.split(Qe);for(const r of e)if(be(r))t=r.split(Qe);else{const a=r.split(Qe);for(;a[0]==="."||a[0]==="..";)a.shift()===".."&&t.pop();t.push(...a)}return t.join("/")}const jd=/[\n\r'\\\u2028\u2029]/,Td=/([\n\r'\u2028\u2029])/g,Dd=/\\/g;function mr(e){return jd.test(e)?e.replace(Dd,"\\\\").replace(Td,"\\$1"):e}function Ma(e){const n=fe(e);return n.slice(0,Math.max(0,n.length-ye(e).length))}function W(e){return be(e)?nt(Kn(),e):e}function pr(e){return e[0]==="/"||e[0]==="."&&(e[1]==="/"||e[1]===".")||be(e)}const Od=/^(\.\.\/)*\.\.$/;function Ls(e,n,t,r){let a=$t(nt(je(e),n));if(t&&a.endsWith(".js")&&(a=a.slice(0,-3)),r){if(a==="")return"../"+fe(n);if(Od.test(a))return[...a.split("/"),"..",fe(n)].join("/")}return a?a.startsWith("..")?a:"./"+a:"."}class et{constructor(n,t,r){this.options=t,this.inputBase=r,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAssertions=null,this.id=n.id,this.moduleInfo=n.info,this.renormalizeRenderPath=n.renormalizeRenderPath,this.suggestedVariableName=n.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:n}=this.options;return this.fileName=(typeof n=="function"?n(this.id):n[this.id])||(this.renormalizeRenderPath?$t(nt(this.inputBase,this.id)):this.id)}getImportAssertions(n){return this.importAssertions||(this.importAssertions=function(t,{getObject:r}){if(!t)return null;const a=Object.entries(t).map(([i,s])=>[i,`'${s}'`]);return a.length>0?r(a,{lineBreakIndent:null}):null}(this.options.format==="es"&&this.options.externalImportAssertions&&this.moduleInfo.assertions,n))}getImportPath(n){return mr(this.renormalizeRenderPath?Ls(n,this.getFileName(),this.options.format==="amd",!1):this.getFileName())}}function zn(e,n,t){const r=e.get(n);if(r!==void 0)return r;const a=t();return e.set(n,a),a}function Te(){return new Set}function Ns(){return[]}const on=Symbol("Unknown Key"),hr=Symbol("Unknown Non-Accessor Key"),Et=Symbol("Unknown Integer"),ja=Symbol("Symbol.toStringTag"),G=[],nn=[on],zd=[hr],Ta=[Et],tt=Symbol("Entities");class rt{constructor(){this.entityPaths=Object.create(null,{[tt]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(n,t){const r=this.getEntities(n);return!!r.has(t)||(r.add(t),!1)}withTrackedEntityAtPath(n,t,r,a){const i=this.getEntities(n);if(i.has(t))return a;i.add(t);const s=r();return i.delete(t),s}getEntities(n){let t=this.entityPaths;for(const r of n)t=t[r]=t[r]||Object.create(null,{[tt]:{value:new Set}});return t[tt]}}const xn=new rt;class Ms{constructor(){this.entityPaths=Object.create(null,{[tt]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(n,t,r){let a=this.entityPaths;for(const s of n)a=a[s]=a[s]||Object.create(null,{[tt]:{value:new Map}});const i=zn(a[tt],t,Te);return!!i.has(r)||(i.add(r),!1)}}const dn=Symbol("Unknown Value"),js=Symbol("Unknown Truthy Value");class Vn{constructor(){this.included=!1}deoptimizeArgumentsOnInteractionAtPath(n,t,r){xe(n)}deoptimizePath(n){}getLiteralValueAtPath(n,t,r){return dn}getReturnExpressionWhenCalledAtPath(n,t,r,a){return vn}hasEffectsOnInteractionAtPath(n,t,r){return!0}include(n,t,r){this.included=!0}includeCallArguments(n,t){for(const r of t)r.include(n,!1)}shouldBeIncluded(n){return!0}}const X=new class extends Vn{},vn=[X,!1],xe=e=>{for(const n of e.args)n==null||n.deoptimizePath(nn)},Da={args:[null],type:0},Oa={args:[null,X],type:1},vr={args:[null],type:2,withNew:!1};class De extends Vn{constructor(n){super(),this.name=n,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(n){}forbidName(n){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(n)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(n,t){if(t!=null&&t(this))return this.name;const r=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${n(r)}`:r}hasEffectsOnInteractionAtPath(n,{type:t},r){return t!==0||n.length>0}include(){this.included=!0}markCalledFromTryStatement(){}setRenderNames(n,t){this.renderBaseName=n,this.renderName=t}}class gr extends De{constructor(n,t){super(t),this.referenced=!1,this.module=n,this.isNamespace=t==="*"}addReference(n){this.referenced=!0,this.name!=="default"&&this.name!=="*"||this.module.suggestName(n.name)}hasEffectsOnInteractionAtPath(n,{type:t}){return t!==0||n.length>(this.isNamespace?1:0)}include(){this.included||(this.included=!0,this.module.used=!0)}}const Bn=Object.freeze(Object.create(null)),Fn=Object.freeze({}),gn=Object.freeze([]),Ts=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});var br=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const Ds=/[^\w$]/g,Os=e=>(n=>/\d/.test(n[0]))(e)||br.has(e)||e==="arguments";function za(e){return e=e.replace(/-(\w)/g,(n,t)=>t.toUpperCase()).replace(Ds,"_"),Os(e)&&(e=`_${e}`),e||"_"}const q="warn",Oe="info",Ct="debug",ze={[Ct]:0,[Oe]:1,silent:3,[q]:2};function Fa(e,n,t){if(typeof t=="number")throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument");return function(r,a){a===void 0&&(a={});var i=a.offsetLine||0,s=a.offsetColumn||0,o=r.split(`
+`),l=0,_=o.map(function(h,b){var p=l+h.length+1,v={start:l,end:p,line:b};return l=p,v}),u=0;function f(h,b){return h.start<=b&&b=p.end?1:-1;p;){if(f(p,h))return d(p,h);p=_[u+=v]}}}(e,t)(n,t&&t.startIndex)}function Pa(e){return e.replace(/^\t+/,n=>n.split(" ").join(" "))}const Fd=120,Pd=10,Ua="...";function zs(e,n,t){let r=e.split(`
+`);if(n>r.length)return"";const a=Math.max(Pa(r[n-1].slice(0,t)).length+Pd+Ua.length,Fd),i=Math.max(0,n-3);let s=Math.min(n+2,r.length);for(r=r.slice(i,s);!/\S/.test(r[r.length-1]);)r.pop(),s-=1;const o=String(s).length;return r.map((l,_)=>{const u=i+_+1===n;let f=String(_+i+1);for(;f.lengtha&&(d=`${d.slice(0,a-Ua.length)}${Ua}`),u){const h=function(b){let p="";for(;b--;)p+=" ";return p}(o+2+Pa(l.slice(0,t)).length)+"^";return`${f}: ${d}
+${h}`}return`${f}: ${d}`}).join(`
+`)}function de(e,n){const t=e.length<=1,r=e.map(i=>`"${i}"`);let a=t?r[0]:`${r.slice(0,-1).join(", ")} and ${r.slice(-1)[0]}`;return n&&(a+=` ${t?n[0]:n[1]}`),a}function Cn(e){return`https://rollupjs.org/${e}`}const Ud="troubleshooting/#error-name-is-not-exported-by-module",Rd="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",Fs="configuration-options/#output-amd-id",wt="configuration-options/#output-dir",Ra="configuration-options/#output-exports",Vd="configuration-options/#output-extend",Ps="configuration-options/#output-format",qd="configuration-options/#output-experimentaldeepdynamicchunkoptimization",Gd="configuration-options/#output-globals",Va="configuration-options/#output-inlinedynamicimports",qa="configuration-options/#output-interop",Ga="configuration-options/#output-manualchunks",Us="configuration-options/#output-name",Xd="configuration-options/#output-sourcemapfile",Rs="plugin-development/#this-getmoduleinfo";function M(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError"})),e}function yr(e,n,t,r){if(typeof n=="object"){const{line:a,column:i}=n;e.loc={column:i,file:r,line:a}}else{e.pos=n;const{line:a,column:i}=Fa(t,n,{offsetLine:1});e.loc={column:i,file:r,line:a}}if(e.frame===void 0){const{line:a,column:i}=e.loc;e.frame=zs(t,a,i)}}const Wd="ADDON_ERROR",Hd="ALREADY_CLOSED",Kd="ANONYMOUS_PLUGIN_CACHE",Jd="ASSET_NOT_FINALISED",Yd="CANNOT_EMIT_FROM_OPTIONS_HOOK",Zd="CHUNK_NOT_GENERATED",Qd="CIRCULAR_REEXPORT",nm="DEPRECATED_FEATURE",em="DUPLICATE_PLUGIN_NAME",tm="FILE_NAME_CONFLICT",rm="ILLEGAL_IDENTIFIER_AS_NAME",am="INVALID_CHUNK",Vs="INVALID_EXPORT_OPTION",im="INVALID_LOG_POSITION",sm="INVALID_OPTION",qs="INVALID_PLUGIN_HOOK",Gs="INVALID_ROLLUP_PHASE",om="INVALID_SETASSETSOURCE",lm="MISSING_EXPORT",_m="MISSING_GLOBAL_NAME",Xa="MISSING_IMPLICIT_DEPENDANT",Xs="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",cm="MISSING_NODE_BUILTINS",um="MISSING_OPTION",fm="MIXED_EXPORTS",dm="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",mm="OPTIMIZE_CHUNK_STATUS",pm="PLUGIN_ERROR",Ws="SOURCEMAP_BROKEN",Hs="UNEXPECTED_NAMED_IMPORT",hm="UNKNOWN_OPTION",Ks="UNRESOLVED_ENTRY",Js="UNRESOLVED_IMPORT",vm="VALIDATION_ERROR";function Ys(){return{code:Hd,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Zs(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function gm({fileName:e,code:n},t){const r={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${t.message}.`};return yr(r,t.loc,n,e),r}function bm(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(W).join(" -> ")}`}}function ym(e,n,{line:t,column:r}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${W(n)} is at (${t}:${r})
+${zs(e,t,r)}`}}function Qs(e,n){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${W(n)}".`}}function xr(e,n,t,r){return{code:"INCONSISTENT_IMPORT_ASSERTIONS",message:`Module "${W(r)}" tried to import "${W(t)}" with ${no(n)} assertions, but it was already imported elsewhere with ${no(e)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const no=e=>{const n=Object.entries(e);return n.length===0?"no":n.map(([t,r])=>`"${t}": "${r}"`).join(", ")};function eo(e,n,t){return{code:Vs,message:`"${e}" was specified for "output.exports", but entry module "${W(t)}" has the following exports: ${de(n)}`,url:Cn(Ra)}}function bn(e,n,t,r){return{code:sm,message:`Invalid value ${r===void 0?"":`${JSON.stringify(r)} `}for option "${e}" - ${t}.`,url:Cn(n)}}function kr(e,n,t){const r=ye(t)===".json";return{binding:e,code:lm,exporter:t,id:n,message:`"${e}" is not exported by "${W(t)}", imported by "${W(n)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Cn(Ud)}}function xm(e){const n=[...e.implicitlyLoadedBefore].map(t=>W(t.id)).sort();return{code:Xa,message:`Module "${W(e.id)}" that should be implicitly loaded before ${de(n)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function to(e,n,t){return{code:mm,message:`${t}, there are
+${e} chunks, of which
+${n} are below minChunkSize.`}}function At(e,n,{hook:t,id:r}={}){return!e.code||e.code.startsWith("PLUGIN_")||e.pluginCode||(e.pluginCode=e.code),e.code=pm,e.plugin=n,t&&(e.hook=t),r&&(e.id=r),e}function km(e){return{code:Ws,message:`Multiple conflicting contents for sourcemap source ${e}`}}function ro(e,n,t){const r=t?"reexport":"import";return{code:Hs,exporter:e,message:`The named export "${n}" was ${r}ed from the external module "${W(e)}" even though its interop type is "defaultOnly". Either remove or change this ${r} or change the value of the "output.interop" option.`,url:Cn(qa)}}function $m(e){return{code:Hs,exporter:e,message:`There was a namespace "*" reexport from the external module "${W(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Cn(qa)}}function jn(e){return{code:vm,message:e}}function Fe(e,n,t,r,a){St(e,n,t,r.onLog,r.strictDeprecations,a)}function St(e,n,t,r,a,i){if(t||a){const s=function(o,l,_){return{code:nm,message:o,url:Cn(l),..._?{plugin:_}:{}}}(e,n,i);if(a)return M(s);r(q,s)}}class fn{constructor(n,t,r,a,i,s){this.options=n,this.id=t,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=za(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:l}=this,_=this.info={assertions:s,ast:null,code:null,dynamicallyImportedIdResolutions:gn,dynamicallyImportedIds:gn,get dynamicImporters(){return l.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){return Fe("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Rs,!0,n),_.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:gn,implicitlyLoadedBefore:gn,importedIdResolutions:gn,importedIds:gn,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:a,moduleSideEffects:r,syntheticNamedExports:!1};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}getVariableForExportName(n){const t=this.declarations.get(n);if(t)return[t];const r=new gr(this,n);return this.declarations.set(n,r),this.exportedVariables.set(r,n),[r]}suggestName(n){const t=(this.nameSuggestions.get(n)??0)+1;this.nameSuggestions.set(n,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=n)}warnUnusedImports(){const n=[...this.declarations].filter(([o,l])=>o!=="*"&&!l.included&&!this.reexported&&!l.referenced).map(([o])=>o);if(n.length===0)return;const t=new Set;for(const o of n)for(const l of this.declarations.get(o).module.importers)t.add(l);const r=[...t];var a,i,s;this.options.onLog(q,{code:"UNUSED_EXTERNAL_IMPORT",exporter:a=this.id,ids:s=r,message:`${de(i=n,["is","are"])} imported from external module "${a}" but never used in ${de(s.map(o=>W(o)))}.`,names:i})}}const at={ArrayPattern(e,n){for(const t of n.elements)t&&at[t.type](e,t)},AssignmentPattern(e,n){at[n.left.type](e,n.left)},Identifier(e,n){e.push(n.name)},MemberExpression(){},ObjectPattern(e,n){for(const t of n.properties)t.type==="RestElement"?at.RestElement(e,t):at[t.value.type](e,t.value)},RestElement(e,n){at[n.argument.type](e,n.argument)}},Em=function(e){const n=[];return at[e.type](n,e),n};function Wa(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function $r(){return{accessed:new rt,assigned:new rt,brokenFlow:!1,called:new Ms,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ms,replacedVariableInits:new Map}}function Bt(e,n=null){return Object.create(n,e)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const it=new class extends Vn{getLiteralValueAtPath(){}},Pe={value:{hasEffectsWhenCalled:null,returns:X}},Ha=new class extends Vn{getReturnExpressionWhenCalledAtPath(e){return e.length===1?Nt(Ja,e[0]):vn}hasEffectsOnInteractionAtPath(e,n,t){return n.type===0?e.length>1:n.type!==2||e.length!==1||Lt(Ja,e[0],n,t)}},ke={value:{hasEffectsWhenCalled:null,returns:Ha}},st=new class extends Vn{getReturnExpressionWhenCalledAtPath(e){return e.length===1?Nt(Ya,e[0]):vn}hasEffectsOnInteractionAtPath(e,n,t){return n.type===0?e.length>1:n.type!==2||e.length!==1||Lt(Ya,e[0],n,t)}},ot={value:{hasEffectsWhenCalled:null,returns:st}},Ka=new class extends Vn{getReturnExpressionWhenCalledAtPath(e){return e.length===1?Nt(It,e[0]):vn}hasEffectsOnInteractionAtPath(e,n,t){return n.type===0?e.length>1:n.type!==2||e.length!==1||Lt(It,e[0],n,t)}},K={value:{hasEffectsWhenCalled:null,returns:Ka}},ao={value:{hasEffectsWhenCalled({args:e},n){const t=e[2];return e.length<3||typeof t.getLiteralValueAtPath(G,xn,{deoptimizeCache(){}})=="symbol"&&t.hasEffectsOnInteractionAtPath(G,vr,n)},returns:Ka}},Er=Bt({hasOwnProperty:ke,isPrototypeOf:ke,propertyIsEnumerable:ke,toLocaleString:K,toString:K,valueOf:Pe}),Ja=Bt({valueOf:ke},Er),Ya=Bt({toExponential:K,toFixed:K,toLocaleString:K,toPrecision:K,valueOf:ot},Er),Cm=Bt({exec:Pe,test:ke},Er),It=Bt({anchor:K,at:Pe,big:K,blink:K,bold:K,charAt:K,charCodeAt:ot,codePointAt:Pe,concat:K,endsWith:ke,fixed:K,fontcolor:K,fontsize:K,includes:ke,indexOf:ot,italics:K,lastIndexOf:ot,link:K,localeCompare:ot,match:Pe,matchAll:Pe,normalize:K,padEnd:K,padStart:K,repeat:K,replace:ao,replaceAll:ao,search:ot,slice:K,small:K,split:Pe,startsWith:ke,strike:K,sub:K,substr:K,substring:K,sup:K,toLocaleLowerCase:K,toLocaleUpperCase:K,toLowerCase:K,toString:K,toUpperCase:K,trim:K,trimEnd:K,trimLeft:K,trimRight:K,trimStart:K,valueOf:K},Er);function Lt(e,n,t,r){var a,i;return typeof n!="string"||!e[n]||((i=(a=e[n]).hasEffectsWhenCalled)==null?void 0:i.call(a,t,r))||!1}function Nt(e,n){return typeof n=="string"&&e[n]?[e[n].returns,!1]:vn}function Za(e,n,t){t(e,n)}function Ue(e,n,t){}var N={};N.Program=N.BlockStatement=N.StaticBlock=function(e,n,t){for(var r=0,a=e.body;r=i.end;)Fm(e,i,a),i=r[++n.annotationIndex];if(i&&i.end<=e.end)for(N[t](e,n,co);(i=r[n.annotationIndex])&&i.end<=e.end;)++n.annotationIndex,Ar(e,i,!1)}const zm=/[^\s(]/g,ei=/\S/g;function Fm(e,n,t){const r=[];let a;if(wr(t.slice(n.end,e.start),zm)){const i=e.start;for(;;){switch(r.push(e),e.type){case qn:case Am:e=e.expression;continue;case jm:if(wr(t.slice(i,e.start),ei)){e=e.expressions[0];continue}a=!0;break;case Sm:if(wr(t.slice(i,e.start),ei)){e=e.test;continue}a=!0;break;case Nm:case wm:if(wr(t.slice(i,e.start),ei)){e=e.left;continue}a=!0;break;case Im:case Bm:e=e.declaration;continue;case Dm:{const s=e;if(s.kind==="const"){e=s.declarations[0].init;continue}a=!0;break}case Tm:e=e.init;continue;case Lm:case Qa:case so:case Mm:break;default:a=!0}break}}else a=!0;if(a)Ar(e,n,!1);else for(const i of r)Ar(i,n,!0)}function wr(e,n){let t;for(;(t=n.exec(e))!==null;){if(t[0]==="/"){const r=e.charCodeAt(n.lastIndex);if(r===42){n.lastIndex=e.indexOf("*/",n.lastIndex+1)+2;continue}if(r===47){n.lastIndex=e.indexOf(`
+`,n.lastIndex+1)+1;continue}}return n.lastIndex=0,!1}return!0}const Pm=[["pure",/[#@]__PURE__/],["noSideEffects",/[#@]__NO_SIDE_EFFECTS__/]];function Ar(e,n,t){const r=t?lo:_o,a=e[r];a?a.push(n):e[r]=[n]}const ti={ImportExpression:["arguments"],Literal:[],Program:["body"]},uo="variables";class O extends Vn{constructor(n,t,r,a=!1){super(),this.deoptimized=!1,this.esTreeNode=a?n:null,this.keys=ti[n.type]||function(i){return ti[i.type]=Object.keys(i).filter(s=>typeof i[s]=="object"&&s.charCodeAt(0)!==95),ti[i.type]}(n),this.parent=t,this.context=t.context,this.createScope(r),this.parseNode(n),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(n,t){}bind(){for(const n of this.keys){const t=this[n];if(Array.isArray(t))for(const r of t)r==null||r.bind();else t&&t.bind()}}createScope(n){this.scope=n}hasEffects(n){this.deoptimized||this.applyDeoptimizations();for(const t of this.keys){const r=this[t];if(r!==null){if(Array.isArray(r)){for(const a of r)if(a!=null&&a.hasEffects(n))return!0}else if(r.hasEffects(n))return!0}}return!1}hasEffectsAsAssignmentTarget(n,t){return this.hasEffects(n)||this.hasEffectsOnInteractionAtPath(G,this.assignmentInteraction,n)}include(n,t,r){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const a of this.keys){const i=this[a];if(i!==null)if(Array.isArray(i))for(const s of i)s==null||s.include(n,t);else i.include(n,t)}}includeAsAssignmentTarget(n,t,r){this.include(n,t)}initialise(){}insertSemicolon(n){n.original[this.end-1]!==";"&&n.appendLeft(this.end,";")}parseNode(n,t){for(const[r,a]of Object.entries(n))if(!this.hasOwnProperty(r))if(r.charCodeAt(0)===95){if(r===lo){const i=a;this.annotations=i,this.context.options.treeshake.annotations&&(this.annotationNoSideEffects=i.some(s=>s.annotationType==="noSideEffects"),this.annotationPure=i.some(s=>s.annotationType==="pure"))}else if(r===_o)for(const{start:i,end:s}of a)this.context.magicString.remove(i,s)}else if(typeof a!="object"||a===null)this[r]=a;else if(Array.isArray(a)){this[r]=[];for(const i of a)this[r].push(i===null?null:new(this.context.getNodeConstructor(i.type))(i,this,this.scope,t==null?void 0:t.includes(r)))}else this[r]=new(this.context.getNodeConstructor(a.type))(a,this,this.scope,t==null?void 0:t.includes(r))}render(n,t){for(const r of this.keys){const a=this[r];if(a!==null)if(Array.isArray(a))for(const i of a)i==null||i.render(n,t);else a.render(n,t)}}setAssignedValue(n){this.assignmentInteraction={args:[null,n],type:1}}shouldBeIncluded(n){return this.included||!n.brokenFlow&&this.hasEffects($r())}applyDeoptimizations(){this.deoptimized=!0;for(const n of this.keys){const t=this[n];if(t!==null)if(Array.isArray(t))for(const r of t)r==null||r.deoptimizePath(nn);else t.deoptimizePath(nn)}this.context.requestTreeshakingPass()}}class Mt extends O{deoptimizeArgumentsOnInteractionAtPath(n,t,r){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(n,[on,...t],r)}hasEffects(n){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(n)||t&&(t==="always"||this.argument.hasEffectsOnInteractionAtPath(nn,Da,n))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([on,on]),this.context.requestTreeshakingPass()}}class Nn extends Vn{constructor(n){super(),this.description=n}deoptimizeArgumentsOnInteractionAtPath({args:n,type:t},r){var a;t===2&&r.length===0&&this.description.mutatesSelfAsArray&&((a=n[0])==null||a.deoptimizePath(Ta))}getReturnExpressionWhenCalledAtPath(n,{args:t}){return n.length>0?vn:[this.description.returnsPrimitive||(this.description.returns==="self"?t[0]||X:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(n,t,r){var i,s;const{type:a}=t;if(n.length>(a===0?1:0))return!0;if(a===2){const{args:o}=t;if(this.description.mutatesSelfAsArray===!0&&((i=o[0])!=null&&i.hasEffectsOnInteractionAtPath(Ta,Oa,r)))return!0;if(this.description.callsArgs){for(const l of this.description.callsArgs)if((s=o[l+1])!=null&&s.hasEffectsOnInteractionAtPath(G,vr,r))return!0}}return!1}}const Sr=[new Nn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ha})],jt=[new Nn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ka})],fo=[new Nn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:st})],mo=[new Nn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:X})],Tt=/^\d+$/;class Pn extends Vn{constructor(n,t,r=!1){if(super(),this.prototypeExpression=t,this.immutable=r,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.hasLostTrack=!1,this.hasUnknownDeoptimizedInteger=!1,this.hasUnknownDeoptimizedProperty=!1,this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(n))this.buildPropertyMaps(n);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=n;for(const a of Object.values(n))this.allProperties.push(...a)}}deoptimizeAllProperties(n){var r;const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(n?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const a of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const i of a)i.deoptimizePath(nn);(r=this.prototypeExpression)==null||r.deoptimizePath([on,on]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(n,t,r){var f;const[a,...i]=t,{args:s,type:o}=n;if(this.hasLostTrack||(o===2||t.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof a=="string"&&this.deoptimizedPaths[a]))return void xe(n);const[l,_,u]=o===2||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:o===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof a=="string"){if(l[a]){const d=_[a];if(d)for(const h of d)h.deoptimizeArgumentsOnInteractionAtPath(n,i,r);if(!this.immutable)for(const h of s)h&&this.additionalExpressionsToBeDeoptimized.add(h);return}for(const d of u)d.deoptimizeArgumentsOnInteractionAtPath(n,i,r);if(Tt.test(a))for(const d of this.unknownIntegerProps)d.deoptimizeArgumentsOnInteractionAtPath(n,i,r)}else{for(const d of[...Object.values(_),u])for(const h of d)h.deoptimizeArgumentsOnInteractionAtPath(n,i,r);for(const d of this.unknownIntegerProps)d.deoptimizeArgumentsOnInteractionAtPath(n,i,r)}if(!this.immutable)for(const d of s)d&&this.additionalExpressionsToBeDeoptimized.add(d);(f=this.prototypeExpression)==null||f.deoptimizeArgumentsOnInteractionAtPath(n,t,r)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[n,t]of Object.entries(this.propertiesAndGettersByKey))if(Tt.test(n))for(const r of t)r.deoptimizePath(nn);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(n){var a;if(this.hasLostTrack||this.immutable)return;const t=n[0];if(n.length===1){if(typeof t!="string")return t===Et?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===hr);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const i=this.expressionsToBeDeoptimizedByKey[t];if(i)for(const s of i)s.deoptimizeCache()}}const r=n.length===1?nn:n.slice(1);for(const i of typeof t=="string"?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)i.deoptimizePath(r);(a=this.prototypeExpression)==null||a.deoptimizePath(n.length===1?[...n,on]:n)}getLiteralValueAtPath(n,t,r){if(n.length===0)return js;const a=n[0],i=this.getMemberExpressionAndTrackDeopt(a,r);return i?i.getLiteralValueAtPath(n.slice(1),t,r):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(n,t,r):n.length!==1?dn:void 0}getReturnExpressionWhenCalledAtPath(n,t,r,a){if(n.length===0)return vn;const[i,...s]=n,o=this.getMemberExpressionAndTrackDeopt(i,a);return o?o.getReturnExpressionWhenCalledAtPath(s,t,r,a):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(n,t,r,a):vn}hasEffectsOnInteractionAtPath(n,t,r){const[a,...i]=n;if(i.length>0||t.type===2){const _=this.getMemberExpression(a);return _?_.hasEffectsOnInteractionAtPath(i,t,r):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(n,t,r)}if(a===hr)return!1;if(this.hasLostTrack)return!0;const[s,o,l]=t.type===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof a=="string"){if(s[a]){const _=o[a];if(_){for(const u of _)if(u.hasEffectsOnInteractionAtPath(i,t,r))return!0}return!1}for(const _ of l)if(_.hasEffectsOnInteractionAtPath(i,t,r))return!0}else for(const _ of[...Object.values(o),l])for(const u of _)if(u.hasEffectsOnInteractionAtPath(i,t,r))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(n,t,r)}buildPropertyMaps(n){const{allProperties:t,propertiesAndGettersByKey:r,propertiesAndSettersByKey:a,settersByKey:i,gettersByKey:s,unknownIntegerProps:o,unmatchablePropertiesAndGetters:l,unmatchableGetters:_,unmatchableSetters:u}=this,f=[];for(let d=n.length-1;d>=0;d--){const{key:h,kind:b,property:p}=n[d];if(t.push(p),typeof h=="string")b==="set"?a[h]||(a[h]=[p,...f],i[h]=[p,...u]):b==="get"?r[h]||(r[h]=[p,...l],s[h]=[p,..._]):(a[h]||(a[h]=[p,...f]),r[h]||(r[h]=[p,...l]));else{if(h===Et){o.push(p);continue}b==="set"&&u.push(p),b==="get"&&_.push(p),b!=="get"&&f.push(p),b!=="set"&&l.push(p)}}}deoptimizeCachedEntities(){for(const n of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of n)t.deoptimizeCache();for(const n of this.additionalExpressionsToBeDeoptimized)n.deoptimizePath(nn)}deoptimizeCachedIntegerEntities(){for(const[n,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(Tt.test(n))for(const r of t)r.deoptimizeCache();for(const n of this.additionalExpressionsToBeDeoptimized)n.deoptimizePath(Ta)}getMemberExpression(n){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof n!="string"||this.hasUnknownDeoptimizedInteger&&Tt.test(n)||this.deoptimizedPaths[n])return X;const t=this.propertiesAndGettersByKey[n];return(t==null?void 0:t.length)===1?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&Tt.test(n)?X:null}getMemberExpressionAndTrackDeopt(n,t){if(typeof n!="string")return X;const r=this.getMemberExpression(n);return r!==X&&!this.immutable&&(this.expressionsToBeDeoptimizedByKey[n]=this.expressionsToBeDeoptimizedByKey[n]||[]).push(t),r}}const po=e=>typeof e=="string"&&/^\d+$/.test(e),Um=new class extends Vn{deoptimizeArgumentsOnInteractionAtPath(e,n){e.type!==2||n.length!==1||po(n[0])||xe(e)}getLiteralValueAtPath(e){return e.length===1&&po(e[0])?void 0:dn}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>1||n===2}},$e=new Pn({__proto__:null,hasOwnProperty:Sr,isPrototypeOf:Sr,propertyIsEnumerable:Sr,toLocaleString:jt,toString:jt,valueOf:mo},Um,!0),ri=[{key:Et,kind:"init",property:X},{key:"length",kind:"init",property:st}],ho=[new Nn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ha})],vo=[new Nn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:st})],Rm=[new Nn({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new Pn(ri,Ir),returnsPrimitive:null})],Br=[new Nn({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new Pn(ri,Ir),returnsPrimitive:null})],ai=[new Nn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new Pn(ri,Ir),returnsPrimitive:null})],go=[new Nn({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:st})],bo=[new Nn({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:X})],yo=[new Nn({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:X})],Dt=[new Nn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:X})],ii=[new Nn({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Vm=[new Nn({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ir=new Pn({__proto__:null,at:yo,concat:Br,copyWithin:ii,entries:Br,every:ho,fill:ii,filter:ai,find:Dt,findIndex:vo,findLast:Dt,findLastIndex:vo,flat:Br,flatMap:ai,forEach:Dt,includes:Sr,indexOf:fo,join:jt,keys:mo,lastIndexOf:fo,map:ai,pop:bo,push:go,reduce:Dt,reduceRight:Dt,reverse:ii,shift:bo,slice:Br,some:ho,sort:Vm,splice:Rm,toLocaleString:jt,toString:jt,unshift:go,values:yo},$e,!0);class xo extends O{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(n,t,r){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(n,t,r)}deoptimizePath(n){this.getObjectEntity().deoptimizePath(n)}getLiteralValueAtPath(n,t,r){return this.getObjectEntity().getLiteralValueAtPath(n,t,r)}getReturnExpressionWhenCalledAtPath(n,t,r,a){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(n,t,r,a)}hasEffectsOnInteractionAtPath(n,t,r){return this.getObjectEntity().hasEffectsOnInteractionAtPath(n,t,r)}applyDeoptimizations(){this.deoptimized=!0;let n=!1;for(let t=0;tthis.init.deoptimizeArgumentsOnInteractionAtPath(n,t,r),void 0)}deoptimizePath(n){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(n,this))if(n.length===0){if(!this.isReassigned){this.isReassigned=!0;const t=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=gn;for(const r of t)r.deoptimizeCache();this.init.deoptimizePath(nn)}}else this.init.deoptimizePath(n)}getLiteralValueAtPath(n,t,r){return this.isReassigned?dn:t.withTrackedEntityAtPath(n,this.init,()=>(this.expressionsToBeDeoptimized.push(r),this.init.getLiteralValueAtPath(n,t,r)),dn)}getReturnExpressionWhenCalledAtPath(n,t,r,a){return this.isReassigned?vn:r.withTrackedEntityAtPath(n,this.init,()=>(this.expressionsToBeDeoptimized.push(a),this.init.getReturnExpressionWhenCalledAtPath(n,t,r,a)),vn)}hasEffectsOnInteractionAtPath(n,t,r){switch(t.type){case 0:return!!this.isReassigned||!r.accessed.trackEntityAtPathAndGetIfTracked(n,this)&&this.init.hasEffectsOnInteractionAtPath(n,t,r);case 1:return!!this.included||n.length!==0&&(!!this.isReassigned||!r.assigned.trackEntityAtPathAndGetIfTracked(n,this)&&this.init.hasEffectsOnInteractionAtPath(n,t,r));case 2:return!!this.isReassigned||!(t.withNew?r.instantiated:r.called).trackEntityAtPathAndGetIfTracked(n,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(n,t,r)}}include(){if(!this.included){this.included=!0;for(const n of this.declarations){n.included||n.include(Wa(),!1);let t=n.parent;for(;!t.included&&(t.included=!0,t.type!==Cr);)t=t.parent}}}includeCallArguments(n,t){if(this.isReassigned||n.includedCallArguments.has(this.init))for(const r of t)r.include(n,!1);else n.includedCallArguments.add(this.init),this.init.includeCallArguments(n,t),n.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return this.additionalInitializers===null&&(this.additionalInitializers=[this.init],this.init=X,this.isReassigned=!0),this.additionalInitializers}mergeDeclarations(n){const{declarations:t}=this;for(const a of n.declarations)t.push(a);const r=this.markInitializersForDeoptimization();if(r.push(n.init),n.additionalInitializers)for(const a of n.additionalInitializers)r.push(a)}}const $o=gn,qm=new Set([on]),Gm=new rt,Xm=new Set([X]);class Eo extends me{constructor(n,t,r){super(n,t,X,r),this.deoptimizationInteractions=[],this.deoptimizations=new rt,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(n){if(n===X){if(!this.entitiesToBeDeoptimized.has(X)){this.entitiesToBeDeoptimized.add(X);for(const{interaction:t}of this.deoptimizationInteractions)xe(t);this.deoptimizationInteractions=$o}}else if(this.deoptimizedFields.has(on))n.deoptimizePath(nn);else if(!this.entitiesToBeDeoptimized.has(n)){this.entitiesToBeDeoptimized.add(n);for(const t of this.deoptimizedFields)n.deoptimizePath([t]);for(const{interaction:t,path:r}of this.deoptimizationInteractions)n.deoptimizeArgumentsOnInteractionAtPath(t,r,xn)}}deoptimizeArgumentsOnInteractionAtPath(n,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(X)||this.deoptimizationInteractions.length>=20||t.length===1&&(this.deoptimizedFields.has(on)||n.type===2&&this.deoptimizedFields.has(t[0])))xe(n);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,n.args)){for(const r of this.entitiesToBeDeoptimized)r.deoptimizeArgumentsOnInteractionAtPath(n,t,xn);this.entitiesToBeDeoptimized.has(X)||this.deoptimizationInteractions.push({interaction:n,path:t})}}deoptimizePath(n){if(n.length===0||this.deoptimizedFields.has(on))return;const t=n[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const r of this.entitiesToBeDeoptimized)r.deoptimizePath(n);t===on&&(this.deoptimizationInteractions=$o,this.deoptimizations=Gm,this.deoptimizedFields=qm,this.entitiesToBeDeoptimized=Xm)}}getReturnExpressionWhenCalledAtPath(n){return n.length===0?this.deoptimizePath(nn):this.deoptimizedFields.has(n[0])||this.deoptimizePath([n[0]]),vn}}const Wm="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",Co=64;function Lr(e){let n="";do{const t=e%Co;e=e/Co|0,n=Wm[t]+n}while(e!==0);return n}function te(e,n,t){let r=e,a=1;for(;n.has(r)||br.has(r)||t!=null&&t.has(r);)r=`${e}$${Lr(a++)}`;return n.add(r),r}let wo=class{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,n,t,r){const a=e.name;let i=this.variables.get(a);return i?i.addDeclaration(e,t):(i=new me(e.name,e,t||it,n),this.variables.set(a,i)),i}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class Jn extends wo{constructor(n){super(),this.accessedOutsideVariables=new Map,this.parent=n,n.children.push(this)}addAccessedDynamicImport(n){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(n),this.parent instanceof Jn&&this.parent.addAccessedDynamicImport(n)}addAccessedGlobals(n,t){const r=t.get(this)||new Set;for(const a of n)r.add(a);t.set(this,r),this.parent instanceof Jn&&this.parent.addAccessedGlobals(n,t)}addNamespaceMemberAccess(n,t){this.accessedOutsideVariables.set(n,t),this.parent.addNamespaceMemberAccess(n,t)}addReturnExpression(n){this.parent instanceof Jn&&this.parent.addReturnExpression(n)}addUsedOutsideNames(n,t,r,a){for(const s of this.accessedOutsideVariables.values())s.included&&(n.add(s.getBaseVariableName()),t==="system"&&r.has(s)&&n.add("exports"));const i=a.get(this);if(i)for(const s of i)n.add(s)}contains(n){return this.variables.has(n)||this.parent.contains(n)}deconflict(n,t,r){const a=new Set;if(this.addUsedOutsideNames(a,n,t,r),this.accessedDynamicImports)for(const i of this.accessedDynamicImports)i.inlineNamespace&&a.add(i.inlineNamespace.getBaseVariableName());for(const[i,s]of this.variables)(s.included||s.alwaysRendered)&&s.setRenderNames(null,te(i,a,s.forbiddenNames));for(const i of this.children)i.deconflict(n,t,r)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(n){const t=this.variables.get(n)||this.accessedOutsideVariables.get(n);if(t)return t;const r=this.parent.findVariable(n);return this.accessedOutsideVariables.set(n,r),r}}class Ao extends Jn{constructor(n,t){super(n),this.parameters=[],this.hasRest=!1,this.context=t,this.hoistedBodyVarScope=new Jn(this)}addParameterDeclaration(n){const{name:t}=n,r=new Eo(t,n,this.context),a=this.hoistedBodyVarScope.variables.get(t);return a&&(this.hoistedBodyVarScope.variables.set(t,r),r.mergeDeclarations(a)),this.variables.set(t,r),r}addParameterVariables(n,t){this.parameters=n;for(const r of n)for(const a of r)a.alwaysRendered=!0;this.hasRest=t}includeCallArguments(n,t){let r=!1,a=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const s of t)if(s instanceof Mt){for(const o of t)o.include(n,!1);break}for(let s=t.length-1;s>=0;s--){const o=this.parameters[s]||i,l=t[s];if(o)if(r=!1,o.length===0)a=!0;else for(const _ of o)_.included&&(a=!0),_.calledFromTryStatement&&(r=!0);!a&&l.shouldBeIncluded(n)&&(a=!0),a&&l.include(n,r)}}}class So extends Ao{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(n){this.returnExpressions.push(n)}getReturnExpression(){return this.returnExpression===null&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(this.returnExpressions.length===1)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=X;for(const n of this.returnExpressions)n.deoptimizePath(nn)}}}function Bo(e,n){if(e.type==="MemberExpression")return!e.computed&&Bo(e.object,e);if(e.type==="Identifier"){if(!n)return!0;switch(n.type){case"MemberExpression":return n.computed||e===n.object;case"MethodDefinition":return n.computed;case"PropertyDefinition":case"Property":return n.computed||e===n.value;case"ExportSpecifier":case"ImportSpecifier":return e===n.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const si=Symbol("PureFunction"),re=()=>{},pn=Symbol("Value Properties"),Nr=()=>js,Io=()=>!0,ae={deoptimizeArgumentsOnCall:re,getLiteralValue:Nr,hasEffectsWhenCalled:()=>!1},Ee={deoptimizeArgumentsOnCall:re,getLiteralValue:Nr,hasEffectsWhenCalled:Io},w={__proto__:null,[pn]:Ee},j={__proto__:null,[pn]:ae},oi={__proto__:null,[pn]:{deoptimizeArgumentsOnCall({args:[,e]}){e==null||e.deoptimizePath(nn)},getLiteralValue:Nr,hasEffectsWhenCalled:({args:e},n)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(zd,Oa,n)}},c={__proto__:null,[pn]:Ee,prototype:w},Yn={__proto__:null,[pn]:ae,prototype:w},Mr={__proto__:null,[pn]:{deoptimizeArgumentsOnCall:re,getLiteralValue:Nr,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof xo)},prototype:w},pe={__proto__:null,[pn]:ae,from:w,of:j,prototype:w},lt={__proto__:null,[pn]:ae,supportedLocalesOf:Yn},li={global:w,globalThis:w,self:w,window:w,__proto__:null,[pn]:Ee,Array:{__proto__:null,[pn]:Ee,from:w,isArray:j,of:j,prototype:w},ArrayBuffer:{__proto__:null,[pn]:ae,isView:j,prototype:w},Atomics:w,BigInt:c,BigInt64Array:c,BigUint64Array:c,Boolean:Yn,constructor:c,DataView:Yn,Date:{__proto__:null,[pn]:ae,now:j,parse:j,prototype:w,UTC:j},decodeURI:j,decodeURIComponent:j,encodeURI:j,encodeURIComponent:j,Error:Yn,escape:j,eval:w,EvalError:Yn,Float32Array:pe,Float64Array:pe,Function:c,hasOwnProperty:w,Infinity:w,Int16Array:pe,Int32Array:pe,Int8Array:pe,isFinite:j,isNaN:j,isPrototypeOf:w,JSON:w,Map:Mr,Math:{__proto__:null,[pn]:Ee,abs:j,acos:j,acosh:j,asin:j,asinh:j,atan:j,atan2:j,atanh:j,cbrt:j,ceil:j,clz32:j,cos:j,cosh:j,exp:j,expm1:j,floor:j,fround:j,hypot:j,imul:j,log:j,log10:j,log1p:j,log2:j,max:j,min:j,pow:j,random:j,round:j,sign:j,sin:j,sinh:j,sqrt:j,tan:j,tanh:j,trunc:j},NaN:w,Number:{__proto__:null,[pn]:ae,isFinite:j,isInteger:j,isNaN:j,isSafeInteger:j,parseFloat:j,parseInt:j,prototype:w},Object:{__proto__:null,[pn]:ae,create:j,defineProperty:oi,defineProperties:oi,freeze:oi,getOwnPropertyDescriptor:j,getOwnPropertyDescriptors:j,getOwnPropertyNames:j,getOwnPropertySymbols:j,getPrototypeOf:j,hasOwn:j,is:j,isExtensible:j,isFrozen:j,isSealed:j,keys:j,fromEntries:w,entries:j,prototype:w},parseFloat:j,parseInt:j,Promise:{__proto__:null,[pn]:Ee,all:w,allSettled:w,any:w,prototype:w,race:w,reject:w,resolve:w},propertyIsEnumerable:w,Proxy:w,RangeError:Yn,ReferenceError:Yn,Reflect:w,RegExp:Yn,Set:Mr,SharedArrayBuffer:c,String:{__proto__:null,[pn]:ae,fromCharCode:j,fromCodePoint:j,prototype:w,raw:j},Symbol:{__proto__:null,[pn]:ae,for:j,keyFor:j,prototype:w,toStringTag:{__proto__:null,[pn]:{deoptimizeArgumentsOnCall:re,getLiteralValue:()=>ja,hasEffectsWhenCalled:Io}}},SyntaxError:Yn,toLocaleString:w,toString:w,TypeError:Yn,Uint16Array:pe,Uint32Array:pe,Uint8Array:pe,Uint8ClampedArray:pe,unescape:j,URIError:Yn,valueOf:w,WeakMap:Mr,WeakSet:Mr,clearInterval:c,clearTimeout:c,console:{__proto__:null,[pn]:Ee,assert:c,clear:c,count:c,countReset:c,debug:c,dir:c,dirxml:c,error:c,exception:c,group:c,groupCollapsed:c,groupEnd:c,info:c,log:c,table:c,time:c,timeEnd:c,timeLog:c,trace:c,warn:c},Intl:{__proto__:null,[pn]:Ee,Collator:lt,DateTimeFormat:lt,ListFormat:lt,NumberFormat:lt,PluralRules:lt,RelativeTimeFormat:lt},setInterval:c,setTimeout:c,TextDecoder:c,TextEncoder:c,URL:c,URLSearchParams:c,AbortController:c,AbortSignal:c,addEventListener:w,alert:w,AnalyserNode:c,Animation:c,AnimationEvent:c,applicationCache:w,ApplicationCache:c,ApplicationCacheErrorEvent:c,atob:w,Attr:c,Audio:c,AudioBuffer:c,AudioBufferSourceNode:c,AudioContext:c,AudioDestinationNode:c,AudioListener:c,AudioNode:c,AudioParam:c,AudioProcessingEvent:c,AudioScheduledSourceNode:c,AudioWorkletNode:c,BarProp:c,BaseAudioContext:c,BatteryManager:c,BeforeUnloadEvent:c,BiquadFilterNode:c,Blob:c,BlobEvent:c,blur:w,BroadcastChannel:c,btoa:w,ByteLengthQueuingStrategy:c,Cache:c,caches:w,CacheStorage:c,cancelAnimationFrame:w,cancelIdleCallback:w,CanvasCaptureMediaStreamTrack:c,CanvasGradient:c,CanvasPattern:c,CanvasRenderingContext2D:c,ChannelMergerNode:c,ChannelSplitterNode:c,CharacterData:c,clientInformation:w,ClipboardEvent:c,close:w,closed:w,CloseEvent:c,Comment:c,CompositionEvent:c,confirm:w,ConstantSourceNode:c,ConvolverNode:c,CountQueuingStrategy:c,createImageBitmap:w,Credential:c,CredentialsContainer:c,crypto:w,Crypto:c,CryptoKey:c,CSS:c,CSSConditionRule:c,CSSFontFaceRule:c,CSSGroupingRule:c,CSSImportRule:c,CSSKeyframeRule:c,CSSKeyframesRule:c,CSSMediaRule:c,CSSNamespaceRule:c,CSSPageRule:c,CSSRule:c,CSSRuleList:c,CSSStyleDeclaration:c,CSSStyleRule:c,CSSStyleSheet:c,CSSSupportsRule:c,CustomElementRegistry:c,customElements:w,CustomEvent:c,DataTransfer:c,DataTransferItem:c,DataTransferItemList:c,defaultstatus:w,defaultStatus:w,DelayNode:c,DeviceMotionEvent:c,DeviceOrientationEvent:c,devicePixelRatio:w,dispatchEvent:w,document:w,Document:c,DocumentFragment:c,DocumentType:c,DOMError:c,DOMException:c,DOMImplementation:c,DOMMatrix:c,DOMMatrixReadOnly:c,DOMParser:c,DOMPoint:c,DOMPointReadOnly:c,DOMQuad:c,DOMRect:c,DOMRectReadOnly:c,DOMStringList:c,DOMStringMap:c,DOMTokenList:c,DragEvent:c,DynamicsCompressorNode:c,Element:c,ErrorEvent:c,Event:c,EventSource:c,EventTarget:c,external:w,fetch:w,File:c,FileList:c,FileReader:c,find:w,focus:w,FocusEvent:c,FontFace:c,FontFaceSetLoadEvent:c,FormData:c,frames:w,GainNode:c,Gamepad:c,GamepadButton:c,GamepadEvent:c,getComputedStyle:w,getSelection:w,HashChangeEvent:c,Headers:c,history:w,History:c,HTMLAllCollection:c,HTMLAnchorElement:c,HTMLAreaElement:c,HTMLAudioElement:c,HTMLBaseElement:c,HTMLBodyElement:c,HTMLBRElement:c,HTMLButtonElement:c,HTMLCanvasElement:c,HTMLCollection:c,HTMLContentElement:c,HTMLDataElement:c,HTMLDataListElement:c,HTMLDetailsElement:c,HTMLDialogElement:c,HTMLDirectoryElement:c,HTMLDivElement:c,HTMLDListElement:c,HTMLDocument:c,HTMLElement:c,HTMLEmbedElement:c,HTMLFieldSetElement:c,HTMLFontElement:c,HTMLFormControlsCollection:c,HTMLFormElement:c,HTMLFrameElement:c,HTMLFrameSetElement:c,HTMLHeadElement:c,HTMLHeadingElement:c,HTMLHRElement:c,HTMLHtmlElement:c,HTMLIFrameElement:c,HTMLImageElement:c,HTMLInputElement:c,HTMLLabelElement:c,HTMLLegendElement:c,HTMLLIElement:c,HTMLLinkElement:c,HTMLMapElement:c,HTMLMarqueeElement:c,HTMLMediaElement:c,HTMLMenuElement:c,HTMLMetaElement:c,HTMLMeterElement:c,HTMLModElement:c,HTMLObjectElement:c,HTMLOListElement:c,HTMLOptGroupElement:c,HTMLOptionElement:c,HTMLOptionsCollection:c,HTMLOutputElement:c,HTMLParagraphElement:c,HTMLParamElement:c,HTMLPictureElement:c,HTMLPreElement:c,HTMLProgressElement:c,HTMLQuoteElement:c,HTMLScriptElement:c,HTMLSelectElement:c,HTMLShadowElement:c,HTMLSlotElement:c,HTMLSourceElement:c,HTMLSpanElement:c,HTMLStyleElement:c,HTMLTableCaptionElement:c,HTMLTableCellElement:c,HTMLTableColElement:c,HTMLTableElement:c,HTMLTableRowElement:c,HTMLTableSectionElement:c,HTMLTemplateElement:c,HTMLTextAreaElement:c,HTMLTimeElement:c,HTMLTitleElement:c,HTMLTrackElement:c,HTMLUListElement:c,HTMLUnknownElement:c,HTMLVideoElement:c,IDBCursor:c,IDBCursorWithValue:c,IDBDatabase:c,IDBFactory:c,IDBIndex:c,IDBKeyRange:c,IDBObjectStore:c,IDBOpenDBRequest:c,IDBRequest:c,IDBTransaction:c,IDBVersionChangeEvent:c,IdleDeadline:c,IIRFilterNode:c,Image:c,ImageBitmap:c,ImageBitmapRenderingContext:c,ImageCapture:c,ImageData:c,indexedDB:w,innerHeight:w,innerWidth:w,InputEvent:c,IntersectionObserver:c,IntersectionObserverEntry:c,isSecureContext:w,KeyboardEvent:c,KeyframeEffect:c,length:w,localStorage:w,location:w,Location:c,locationbar:w,matchMedia:w,MediaDeviceInfo:c,MediaDevices:c,MediaElementAudioSourceNode:c,MediaEncryptedEvent:c,MediaError:c,MediaKeyMessageEvent:c,MediaKeySession:c,MediaKeyStatusMap:c,MediaKeySystemAccess:c,MediaList:c,MediaQueryList:c,MediaQueryListEvent:c,MediaRecorder:c,MediaSettingsRange:c,MediaSource:c,MediaStream:c,MediaStreamAudioDestinationNode:c,MediaStreamAudioSourceNode:c,MediaStreamEvent:c,MediaStreamTrack:c,MediaStreamTrackEvent:c,menubar:w,MessageChannel:c,MessageEvent:c,MessagePort:c,MIDIAccess:c,MIDIConnectionEvent:c,MIDIInput:c,MIDIInputMap:c,MIDIMessageEvent:c,MIDIOutput:c,MIDIOutputMap:c,MIDIPort:c,MimeType:c,MimeTypeArray:c,MouseEvent:c,moveBy:w,moveTo:w,MutationEvent:c,MutationObserver:c,MutationRecord:c,name:w,NamedNodeMap:c,NavigationPreloadManager:c,navigator:w,Navigator:c,NetworkInformation:c,Node:c,NodeFilter:w,NodeIterator:c,NodeList:c,Notification:c,OfflineAudioCompletionEvent:c,OfflineAudioContext:c,offscreenBuffering:w,OffscreenCanvas:c,open:w,openDatabase:w,Option:c,origin:w,OscillatorNode:c,outerHeight:w,outerWidth:w,PageTransitionEvent:c,pageXOffset:w,pageYOffset:w,PannerNode:c,parent:w,Path2D:c,PaymentAddress:c,PaymentRequest:c,PaymentRequestUpdateEvent:c,PaymentResponse:c,performance:w,Performance:c,PerformanceEntry:c,PerformanceLongTaskTiming:c,PerformanceMark:c,PerformanceMeasure:c,PerformanceNavigation:c,PerformanceNavigationTiming:c,PerformanceObserver:c,PerformanceObserverEntryList:c,PerformancePaintTiming:c,PerformanceResourceTiming:c,PerformanceTiming:c,PeriodicWave:c,Permissions:c,PermissionStatus:c,personalbar:w,PhotoCapabilities:c,Plugin:c,PluginArray:c,PointerEvent:c,PopStateEvent:c,postMessage:w,Presentation:c,PresentationAvailability:c,PresentationConnection:c,PresentationConnectionAvailableEvent:c,PresentationConnectionCloseEvent:c,PresentationConnectionList:c,PresentationReceiver:c,PresentationRequest:c,print:w,ProcessingInstruction:c,ProgressEvent:c,PromiseRejectionEvent:c,prompt:w,PushManager:c,PushSubscription:c,PushSubscriptionOptions:c,queueMicrotask:w,RadioNodeList:c,Range:c,ReadableStream:c,RemotePlayback:c,removeEventListener:w,Request:c,requestAnimationFrame:w,requestIdleCallback:w,resizeBy:w,ResizeObserver:c,ResizeObserverEntry:c,resizeTo:w,Response:c,RTCCertificate:c,RTCDataChannel:c,RTCDataChannelEvent:c,RTCDtlsTransport:c,RTCIceCandidate:c,RTCIceTransport:c,RTCPeerConnection:c,RTCPeerConnectionIceEvent:c,RTCRtpReceiver:c,RTCRtpSender:c,RTCSctpTransport:c,RTCSessionDescription:c,RTCStatsReport:c,RTCTrackEvent:c,screen:w,Screen:c,screenLeft:w,ScreenOrientation:c,screenTop:w,screenX:w,screenY:w,ScriptProcessorNode:c,scroll:w,scrollbars:w,scrollBy:w,scrollTo:w,scrollX:w,scrollY:w,SecurityPolicyViolationEvent:c,Selection:c,ServiceWorker:c,ServiceWorkerContainer:c,ServiceWorkerRegistration:c,sessionStorage:w,ShadowRoot:c,SharedWorker:c,SourceBuffer:c,SourceBufferList:c,speechSynthesis:w,SpeechSynthesisEvent:c,SpeechSynthesisUtterance:c,StaticRange:c,status:w,statusbar:w,StereoPannerNode:c,stop:w,Storage:c,StorageEvent:c,StorageManager:c,styleMedia:w,StyleSheet:c,StyleSheetList:c,SubtleCrypto:c,SVGAElement:c,SVGAngle:c,SVGAnimatedAngle:c,SVGAnimatedBoolean:c,SVGAnimatedEnumeration:c,SVGAnimatedInteger:c,SVGAnimatedLength:c,SVGAnimatedLengthList:c,SVGAnimatedNumber:c,SVGAnimatedNumberList:c,SVGAnimatedPreserveAspectRatio:c,SVGAnimatedRect:c,SVGAnimatedString:c,SVGAnimatedTransformList:c,SVGAnimateElement:c,SVGAnimateMotionElement:c,SVGAnimateTransformElement:c,SVGAnimationElement:c,SVGCircleElement:c,SVGClipPathElement:c,SVGComponentTransferFunctionElement:c,SVGDefsElement:c,SVGDescElement:c,SVGDiscardElement:c,SVGElement:c,SVGEllipseElement:c,SVGFEBlendElement:c,SVGFEColorMatrixElement:c,SVGFEComponentTransferElement:c,SVGFECompositeElement:c,SVGFEConvolveMatrixElement:c,SVGFEDiffuseLightingElement:c,SVGFEDisplacementMapElement:c,SVGFEDistantLightElement:c,SVGFEDropShadowElement:c,SVGFEFloodElement:c,SVGFEFuncAElement:c,SVGFEFuncBElement:c,SVGFEFuncGElement:c,SVGFEFuncRElement:c,SVGFEGaussianBlurElement:c,SVGFEImageElement:c,SVGFEMergeElement:c,SVGFEMergeNodeElement:c,SVGFEMorphologyElement:c,SVGFEOffsetElement:c,SVGFEPointLightElement:c,SVGFESpecularLightingElement:c,SVGFESpotLightElement:c,SVGFETileElement:c,SVGFETurbulenceElement:c,SVGFilterElement:c,SVGForeignObjectElement:c,SVGGElement:c,SVGGeometryElement:c,SVGGradientElement:c,SVGGraphicsElement:c,SVGImageElement:c,SVGLength:c,SVGLengthList:c,SVGLinearGradientElement:c,SVGLineElement:c,SVGMarkerElement:c,SVGMaskElement:c,SVGMatrix:c,SVGMetadataElement:c,SVGMPathElement:c,SVGNumber:c,SVGNumberList:c,SVGPathElement:c,SVGPatternElement:c,SVGPoint:c,SVGPointList:c,SVGPolygonElement:c,SVGPolylineElement:c,SVGPreserveAspectRatio:c,SVGRadialGradientElement:c,SVGRect:c,SVGRectElement:c,SVGScriptElement:c,SVGSetElement:c,SVGStopElement:c,SVGStringList:c,SVGStyleElement:c,SVGSVGElement:c,SVGSwitchElement:c,SVGSymbolElement:c,SVGTextContentElement:c,SVGTextElement:c,SVGTextPathElement:c,SVGTextPositioningElement:c,SVGTitleElement:c,SVGTransform:c,SVGTransformList:c,SVGTSpanElement:c,SVGUnitTypes:c,SVGUseElement:c,SVGViewElement:c,TaskAttributionTiming:c,Text:c,TextEvent:c,TextMetrics:c,TextTrack:c,TextTrackCue:c,TextTrackCueList:c,TextTrackList:c,TimeRanges:c,toolbar:w,top:w,Touch:c,TouchEvent:c,TouchList:c,TrackEvent:c,TransitionEvent:c,TreeWalker:c,UIEvent:c,ValidityState:c,visualViewport:w,VisualViewport:c,VTTCue:c,WaveShaperNode:c,WebAssembly:w,WebGL2RenderingContext:c,WebGLActiveInfo:c,WebGLBuffer:c,WebGLContextEvent:c,WebGLFramebuffer:c,WebGLProgram:c,WebGLQuery:c,WebGLRenderbuffer:c,WebGLRenderingContext:c,WebGLSampler:c,WebGLShader:c,WebGLShaderPrecisionFormat:c,WebGLSync:c,WebGLTexture:c,WebGLTransformFeedback:c,WebGLUniformLocation:c,WebGLVertexArrayObject:c,WebSocket:c,WheelEvent:c,Window:c,Worker:c,WritableStream:c,XMLDocument:c,XMLHttpRequest:c,XMLHttpRequestEventTarget:c,XMLHttpRequestUpload:c,XMLSerializer:c,XPathEvaluator:c,XPathExpression:c,XPathResult:c,XSLTProcessor:c};for(const e of["window","global","self","globalThis"])li[e]=li;function _t(e){let n=li;for(const t of e)if(typeof t!="string"||(n=n[t],!n))return null;return n[pn]}class _i extends De{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(n,t,r){switch(n.type){case 0:case 1:return void(_t([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(n,t,r));case 2:{const a=_t([this.name,...t]);return void(a?a.deoptimizeArgumentsOnCall(n):super.deoptimizeArgumentsOnInteractionAtPath(n,t,r))}}}getLiteralValueAtPath(n,t,r){const a=_t([this.name,...n]);return a?a.getLiteralValue():dn}hasEffectsOnInteractionAtPath(n,t,r){switch(t.type){case 0:return n.length===0?this.name!=="undefined"&&!_t([this.name]):!_t([this.name,...n].slice(0,-1));case 1:return!0;case 2:{const a=_t([this.name,...n]);return!a||a.hasEffectsWhenCalled(t,r)}}}}const Hm={__proto__:null,class:!0,const:!0,let:!0,var:!0};class cn extends O{constructor(){super(...arguments),this.variable=null,this.isTDZAccess=null}addExportedVariables(n,t){t.has(this.variable)&&n.push(this.variable)}bind(){!this.variable&&Bo(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(n,t){let r;const{treeshake:a}=this.context.options;switch(n){case"var":r=this.scope.addDeclaration(this,this.context,t,!0),a&&a.correctVarValueBeforeDeclaration&&r.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":r=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":r=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${n}.`)}return r.kind=n,[this.variable=r]}deoptimizeArgumentsOnInteractionAtPath(n,t,r){this.variable.deoptimizeArgumentsOnInteractionAtPath(n,t,r)}deoptimizePath(n){var t;n.length!==0||this.scope.contains(this.name)||this.disallowImportReassignment(),(t=this.variable)==null||t.deoptimizePath(n)}getLiteralValueAtPath(n,t,r){return this.getVariableRespectingTDZ().getLiteralValueAtPath(n,t,r)}getReturnExpressionWhenCalledAtPath(n,t,r,a){const[i,s]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(n,t,r,a);return[i,s||this.isPureFunction(n)]}hasEffects(n){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||this.variable.kind==="var")||this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof _i&&!this.isPureFunction(G)&&this.variable.hasEffectsOnInteractionAtPath(G,Da,n)}hasEffectsOnInteractionAtPath(n,t,r){switch(t.type){case 0:return this.variable!==null&&!this.isPureFunction(n)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(n,t,r);case 1:return(n.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(n,t,r);case 2:return!this.isPureFunction(n)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(n,t,r)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,this.variable!==null&&this.context.includeVariableInModule(this.variable))}includeCallArguments(n,t){this.variable.includeCallArguments(n,t)}isPossibleTDZ(){if(this.isTDZAccess!==null)return this.isTDZAccess;if(!(this.variable instanceof me&&this.variable.kind&&this.variable.kind in Hm&&this.variable.module===this.context.module))return this.isTDZAccess=!1;let n;return this.variable.declarations&&this.variable.declarations.length===1&&(n=this.variable.declarations[0])&&this.start=r)return r;a=e.charCodeAt(++t),++t,(t=a===47?e.indexOf(`
+`,t)+1:e.indexOf("*/",t)+2)>r&&(r=e.indexOf(n,t))}}const Mo=/\S/g;function Ce(e,n){return Mo.lastIndex=n,Mo.exec(e).index}function Ot(e){let n,t,r=0;for(n=e.indexOf(`
+`,r);;){if(r=e.indexOf("/",r),r===-1||r>n)return[n,n+1];if(t=e.charCodeAt(r+1),t===47)return[r,n+1];r=e.indexOf("*/",r+3)+2,r>n&&(n=e.indexOf(`
+`,r))}}function zt(e,n,t,r,a){let i,s,o,l,_=e[0],u=!_.included||_.needsBoundaries;u&&(l=t+Ot(n.original.slice(t,_.start))[1]);for(let f=1;f<=e.length;f++)i=_,s=l,o=u,_=e[f],u=_!==void 0&&(!_.included||_.needsBoundaries),o||u?(l=i.end+Ot(n.original.slice(i.end,_===void 0?r:_.start))[1],i.included?o?i.render(n,a,{end:l,start:s}):i.render(n,a):ci(i,n,s,l)):i.render(n,a)}function jo(e,n,t,r){const a=[];let i,s,o,l,_=t-1;for(const u of e){for(i!==void 0&&(_=i.end+$n(n.original.slice(i.end,u.start),",")),s=o=_+1+Ot(n.original.slice(_+1,u.start))[1];l=n.original.charCodeAt(s),l===32||l===9||l===10||l===13;)s++;i!==void 0&&a.push({contentEnd:o,end:s,node:i,separator:_,start:t}),i=u,t=s}return a.push({contentEnd:r,end:r,node:i,separator:null,start:t}),a}function jr(e,n,t){for(;;){const[r,a]=Ot(e.original.slice(n,t));if(r===-1)break;e.remove(n+r,n+=a)}}class Ve extends Jn{addDeclaration(n,t,r,a){if(a){const i=this.parent.addDeclaration(n,t,r,a);return i.markInitializersForDeoptimization(),i}return super.addDeclaration(n,t,r,!1)}}class qe extends O{initialise(){var n,t;this.directive&&this.directive!=="use strict"&&this.parent.type===Cr&&this.context.log(q,(n=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.context.module.id,message:`Module level directives cause errors when bundled, "${n}" in "${W(t)}" was ignored.`}),this.start)}render(n,t){super.render(n,t),this.included&&this.insertSemicolon(n)}shouldBeIncluded(n){return this.directive&&this.directive!=="use strict"?this.parent.type!==Cr:super.shouldBeIncluded(n)}applyDeoptimizations(){}}class Tr extends O{constructor(){super(...arguments),this.directlyIncluded=!1}addImplicitReturnExpressionToScope(){const n=this.body[this.body.length-1];n&&n.type==="ReturnStatement"||this.scope.addReturnExpression(X)}createScope(n){this.scope=this.parent.preventChildBlockScope?n:new Ve(n)}hasEffects(n){if(this.deoptimizeBody)return!0;for(const t of this.body){if(n.brokenFlow)break;if(t.hasEffects(n))return!0}return!1}include(n,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const r of this.body)(t||r.shouldBeIncluded(n))&&r.include(n,t)}}initialise(){const n=this.body[0];this.deoptimizeBody=n instanceof qe&&n.directive==="use asm"}render(n,t){this.body.length>0?zt(this.body,n,this.start+1,this.end-1,t):super.render(n,t)}}class ui extends O{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(n,t){this.argument.addExportedVariables(n,t)}declare(n,t){return this.declarationInit=t,this.argument.declare(n,X)}deoptimizePath(n){n.length===0&&this.argument.deoptimizePath(G)}hasEffectsOnInteractionAtPath(n,t,r){return n.length>0||this.argument.hasEffectsOnInteractionAtPath(G,t,r)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,this.declarationInit!==null&&(this.declarationInit.deoptimizePath([on,on]),this.context.requestTreeshakingPass())}}class fi extends O{constructor(){super(...arguments),this.objectEntity=null,this.deoptimizedReturn=!1}deoptimizeArgumentsOnInteractionAtPath(n,t,r){if(n.type===2){const{parameters:a}=this.scope,{args:i}=n;let s=!1;for(let o=0;o0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(n,t,r,a):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(nn),this.context.requestTreeshakingPass()),vn):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(n,t,r){if(n.length>0||t.type!==2)return this.getObjectEntity().hasEffectsOnInteractionAtPath(n,t,r);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:a}=this.context.options.treeshake,i=this.scope.getReturnExpression();if(i.hasEffectsOnInteractionAtPath(["then"],vr,r)||a&&(a==="always"||i.hasEffectsOnInteractionAtPath(["then"],Da,r)))return!0}for(const a of this.params)if(a.hasEffects(r))return!0;return!1}include(n,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:r}=n;n.brokenFlow=!1,this.body.include(n,t),n.brokenFlow=r}includeCallArguments(n,t){this.scope.includeCallArguments(n,t)}initialise(){this.scope.addParameterVariables(this.params.map(n=>n.declare("parameter",X)),this.params[this.params.length-1]instanceof ui),this.body instanceof Tr?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(n){n.body.type===io&&(this.body=new Tr(n.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(n)}addArgumentToBeDeoptimized(n){}applyDeoptimizations(){}}fi.prototype.preventChildBlockScope=!0;class di extends fi{constructor(){super(...arguments),this.objectEntity=null}createScope(n){this.scope=new So(n,this.context)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(n,t,r){if(super.hasEffectsOnInteractionAtPath(n,t,r))return!0;if(this.annotationNoSideEffects)return!1;if(t.type===2){const{ignore:a,brokenFlow:i}=r;if(r.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(r))return!0;r.ignore=a,r.brokenFlow=i}return!1}include(n,t){super.include(n,t);for(const r of this.params)r instanceof cn||r.include(n,t)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new Pn([],$e)}}function Ge(e,{exportNamesByVariable:n,snippets:{_:t,getObject:r,getPropertyAccess:a}},i=""){if(e.length===1&&n.get(e[0]).length===1){const s=e[0];return`exports('${n.get(s)}',${t}${s.getName(a)}${i})`}{const s=[];for(const o of e)for(const l of n.get(o))s.push([l,o.getName(a)+i]);return`exports(${r(s,{lineBreakIndent:null})})`}}function mi(e,n,t,r,{exportNamesByVariable:a,snippets:{_:i}}){r.prependRight(n,`exports('${a.get(e)}',${i}`),r.appendLeft(t,")")}function To(e,n,t,r,a,i){const{_:s,getPropertyAccess:o}=i.snippets;a.appendLeft(t,`,${s}${Ge([e],i)},${s}${e.getName(o)}`),r&&(a.prependRight(n,"("),a.appendLeft(t,")"))}class Ft extends O{addExportedVariables(n,t){for(const r of this.properties)r.type==="Property"?r.value.addExportedVariables(n,t):r.argument.addExportedVariables(n,t)}declare(n,t){const r=[];for(const a of this.properties)r.push(...a.declare(n,t));return r}deoptimizePath(n){if(n.length===0)for(const t of this.properties)t.deoptimizePath(n)}hasEffectsOnInteractionAtPath(n,t,r){for(const a of this.properties)if(a.hasEffectsOnInteractionAtPath(G,t,r))return!0;return!1}markDeclarationReached(){for(const n of this.properties)n.markDeclarationReached()}}class Km extends me{constructor(n){super("arguments",null,X,n),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(n){this.included?n.deoptimizePath(nn):this.deoptimizedArguments.push(n)}hasEffectsOnInteractionAtPath(n,{type:t}){return t!==0||n.length>1}include(){super.include();for(const n of this.deoptimizedArguments)n.deoptimizePath(nn);this.deoptimizedArguments.length=0}}class Do extends Eo{constructor(n){super("this",null,n)}hasEffectsOnInteractionAtPath(n,t,r){return(r.replacedVariableInits.get(this)||X).hasEffectsOnInteractionAtPath(n,t,r)}}class Jm extends So{constructor(n,t){super(n,t),this.variables.set("arguments",this.argumentsVariable=new Km(t)),this.variables.set("this",this.thisVariable=new Do(t))}findLexicalBoundary(){return this}includeCallArguments(n,t){if(super.includeCallArguments(n,t),this.argumentsVariable.included)for(const r of t)r.included||r.include(n,!1)}}class pi extends fi{constructor(){super(...arguments),this.objectEntity=null}createScope(n){this.scope=new Jm(n,this.context),this.constructedEntity=new Pn(Object.create(null),$e),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(n,t,r){super.deoptimizeArgumentsOnInteractionAtPath(n,t,r),n.type===2&&t.length===0&&n.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(n.args[0])}hasEffects(n){var t;return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!((t=this.id)!=null&&t.hasEffects(n))}hasEffectsOnInteractionAtPath(n,t,r){if(super.hasEffectsOnInteractionAtPath(n,t,r))return!0;if(this.annotationNoSideEffects)return!1;if(t.type===2){const a=r.replacedVariableInits.get(this.scope.thisVariable);r.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:X);const{brokenFlow:i,ignore:s,replacedVariableInits:o}=r;if(r.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(r))return!0;r.brokenFlow=i,a?o.set(this.scope.thisVariable,a):o.delete(this.scope.thisVariable),r.ignore=s}return!1}include(n,t){var a;super.include(n,t),(a=this.id)==null||a.include();const r=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof cn&&!r||i.include(n,t)}initialise(){var n;super.initialise(),(n=this.id)==null||n.declare("function",this)}addArgumentToBeDeoptimized(n){this.scope.argumentsVariable.addArgumentToBeDeoptimized(n)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new Pn([{key:"prototype",kind:"init",property:new Pn([],$e)}],$e)}}class Oo extends O{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(n,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;n:if(!this.context.usesTopLevelAwait){let r=this.parent;do if(r instanceof pi||r instanceof di)break n;while(r=r.parent);this.context.usesTopLevelAwait=!0}}this.argument.include(n,t)}}const Ym={"!=":(e,n)=>e!=n,"!==":(e,n)=>e!==n,"%":(e,n)=>e%n,"&":(e,n)=>e&n,"*":(e,n)=>e*n,"**":(e,n)=>e**n,"+":(e,n)=>e+n,"-":(e,n)=>e-n,"/":(e,n)=>e/n,"<":(e,n)=>ee<e<=n,"==":(e,n)=>e==n,"===":(e,n)=>e===n,">":(e,n)=>e>n,">=":(e,n)=>e>=n,">>":(e,n)=>e>>n,">>>":(e,n)=>e>>>n,"^":(e,n)=>e^n,"|":(e,n)=>e|n};function zo(e,n,t){if(t.arguments.length>0)if(t.arguments[t.arguments.length-1].included)for(const r of t.arguments)r.render(e,n);else{let r=t.arguments.length-2;for(;r>=0&&!t.arguments[r].included;)r--;if(r>=0){for(let a=0;a<=r;a++)t.arguments[a].render(e,n);e.remove($n(e.original,",",t.arguments[r].end),t.end-1)}else e.remove($n(e.original,"(",t.callee.end)+1,t.end-1)}}class Xe extends O{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(n){return n.length>0||this.value===null&&this.context.code.charCodeAt(this.start)!==110||typeof this.value=="bigint"||this.context.code.charCodeAt(this.start)===47?dn:this.value}getReturnExpressionWhenCalledAtPath(n){return n.length!==1?vn:Nt(this.members,n[0])}hasEffectsOnInteractionAtPath(n,t,r){switch(t.type){case 0:return n.length>(this.value===null?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||n.length!==1||Lt(this.members,n[0],t,r)}}initialise(){this.members=function(n){if(n instanceof RegExp)return Cm;switch(typeof n){case"boolean":return Ja;case"number":return Ya;case"string":return It}return Object.create(null)}(this.value)}parseNode(n){this.value=n.value,this.regex=n.regex,super.parseNode(n)}render(n){typeof this.value=="string"&&n.indentExclusionRanges.push([this.start+1,this.end-1])}}function Zm(e){return e.computed?function(n){return n instanceof Xe?String(n.value):null}(e.property):e.property.name}function Fo(e){const n=e.propertyKey,t=e.object;if(typeof n=="string"){if(t instanceof cn)return[{key:t.name,pos:t.start},{key:n,pos:e.property.start}];if(t instanceof we){const r=Fo(t);return r&&[...r,{key:n,pos:e.property.start}]}}return null}class we extends O{constructor(){super(...arguments),this.variable=null,this.assignmentDeoptimized=!1,this.bound=!1,this.expressionsToBeDeoptimized=[],this.isUndefined=!1}bind(){this.bound=!0;const n=Fo(this),t=n&&this.scope.findVariable(n[0].key);if(t!=null&&t.isNamespace){const r=Po(t,n.slice(1),this.context);r?r==="undefined"?this.isUndefined=!0:(this.variable=r,this.scope.addNamespaceMemberAccess(function(a){let i=a[0].key;for(let s=1;s!!l&&l!==X);if(o.length!==0)if(i===X)for(const l of o)l.deoptimizePath(nn);else r.withTrackedEntityAtPath(t,i,()=>{for(const l of o)this.expressionsToBeDeoptimized.add(l);i.deoptimizeArgumentsOnInteractionAtPath(n,t,r)},null)}deoptimizeCache(){var n;if(((n=this.returnExpression)==null?void 0:n[0])!==X){this.returnExpression=vn;const{deoptimizableDependentExpressions:t,expressionsToBeDeoptimized:r}=this;this.expressionsToBeDeoptimized=Ts,this.deoptimizableDependentExpressions=gn;for(const a of t)a.deoptimizeCache();for(const a of r)a.deoptimizePath(nn)}}deoptimizePath(n){if(n.length===0||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(n,this))return;const[t]=this.getReturnExpression();t!==X&&t.deoptimizePath(n)}getLiteralValueAtPath(n,t,r){const[a]=this.getReturnExpression(t);return a===X?dn:t.withTrackedEntityAtPath(n,a,()=>(this.deoptimizableDependentExpressions.push(r),a.getLiteralValueAtPath(n,t,r)),dn)}getReturnExpressionWhenCalledAtPath(n,t,r,a){const i=this.getReturnExpression(r);return i[0]===X?i:r.withTrackedEntityAtPath(n,i,()=>{this.deoptimizableDependentExpressions.push(a);const[s,o]=i[0].getReturnExpressionWhenCalledAtPath(n,t,r,a);return[s,o||i[1]]},vn)}hasEffectsOnInteractionAtPath(n,t,r){const{type:a}=t;if(a===2){const{args:o,withNew:l}=t;if((l?r.instantiated:r.called).trackEntityAtPathAndGetIfTracked(n,o,this))return!1}else if((a===1?r.assigned:r.accessed).trackEntityAtPathAndGetIfTracked(n,this))return!1;const[i,s]=this.getReturnExpression();return(a===1||!s)&&i.hasEffectsOnInteractionAtPath(n,t,r)}}class Ro extends Uo{bind(){super.bind(),this.callee instanceof cn&&(this.scope.findVariable(this.callee.name).isNamespace&&this.context.log(q,Zs(this.callee.name),this.start),this.callee.name==="eval"&&this.context.log(q,{code:"EVAL",id:n=this.context.module.id,message:`Use of eval in "${W(n)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Cn("troubleshooting/#avoiding-eval")},this.start));var n;this.interaction={args:[this.callee instanceof we&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(n){try{for(const t of this.arguments)if(t.hasEffects(n))return!0;return!this.annotationPure&&(this.callee.hasEffects(n)||this.callee.hasEffectsOnInteractionAtPath(G,this.interaction,n))}finally{this.deoptimized||this.applyDeoptimizations()}}include(n,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(n,t),t===uo&&this.callee instanceof cn&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(n,!1)),this.callee.includeCallArguments(n,this.arguments)}isSkippedAsOptional(n){var t,r;return((r=(t=this.callee).isSkippedAsOptional)==null?void 0:r.call(t,n))||this.optional&&this.callee.getLiteralValueAtPath(G,xn,n)==null}render(n,t,{renderedSurroundingElement:r}=Bn){this.callee.render(n,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:r}),zo(n,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,G,xn),this.context.requestTreeshakingPass()}getReturnExpression(n=xn){return this.returnExpression===null?(this.returnExpression=vn,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(G,this.interaction,n,this)):this.returnExpression}}class Qm extends Ao{addDeclaration(n,t,r,a){const i=this.variables.get(n.name);return i?(this.parent.addDeclaration(n,t,it,a),i.addDeclaration(n,r),i):this.parent.addDeclaration(n,t,r,a)}}class np extends Jn{constructor(n,t,r){super(n),this.variables.set("this",this.thisVariable=new me("this",null,t,r)),this.instanceScope=new Jn(this),this.instanceScope.variables.set("this",new Do(r))}findLexicalBoundary(){return this}}class Vo extends O{constructor(){super(...arguments),this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(n,t,r){return n.type===0&&this.kind==="get"&&t.length===0||n.type===1&&this.kind==="set"&&t.length===0?this.value.deoptimizeArgumentsOnInteractionAtPath({args:n.args,type:2,withNew:!1},G,r):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(n,t,r)}deoptimizeCache(){}deoptimizePath(n){this.getAccessedValue()[0].deoptimizePath(n)}getLiteralValueAtPath(n,t,r){return this.getAccessedValue()[0].getLiteralValueAtPath(n,t,r)}getReturnExpressionWhenCalledAtPath(n,t,r,a){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(n,t,r,a)}hasEffects(n){return this.key.hasEffects(n)}hasEffectsOnInteractionAtPath(n,t,r){return this.kind==="get"&&t.type===0&&n.length===0||this.kind==="set"&&t.type===1?this.value.hasEffectsOnInteractionAtPath(G,{args:t.args,type:2,withNew:!1},r):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(n,t,r)}applyDeoptimizations(){}getAccessedValue(){return this.accessedValue===null?this.kind==="get"?(this.accessedValue=vn,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(G,vr,xn,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class hi extends Vo{applyDeoptimizations(){}}class ep extends Vn{constructor(n,t){super(),this.object=n,this.key=t}deoptimizeArgumentsOnInteractionAtPath(n,t,r){this.object.deoptimizeArgumentsOnInteractionAtPath(n,[this.key,...t],r)}deoptimizePath(n){this.object.deoptimizePath([this.key,...n])}getLiteralValueAtPath(n,t,r){return this.object.getLiteralValueAtPath([this.key,...n],t,r)}getReturnExpressionWhenCalledAtPath(n,t,r,a){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...n],t,r,a)}hasEffectsOnInteractionAtPath(n,t,r){return this.object.hasEffectsOnInteractionAtPath([this.key,...n],t,r)}}class qo extends O{constructor(){super(...arguments),this.objectEntity=null}createScope(n){this.scope=new Jn(n)}deoptimizeArgumentsOnInteractionAtPath(n,t,r){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(n,t,r)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(n){this.getObjectEntity().deoptimizePath(n)}getLiteralValueAtPath(n,t,r){return this.getObjectEntity().getLiteralValueAtPath(n,t,r)}getReturnExpressionWhenCalledAtPath(n,t,r,a){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(n,t,r,a)}hasEffects(n){var r,a;this.deoptimized||this.applyDeoptimizations();const t=((r=this.superClass)==null?void 0:r.hasEffects(n))||this.body.hasEffects(n);return(a=this.id)==null||a.markDeclarationReached(),t||super.hasEffects(n)}hasEffectsOnInteractionAtPath(n,t,r){var a;return t.type===2&&n.length===0?!t.withNew||(this.classConstructor===null?(a=this.superClass)==null?void 0:a.hasEffectsOnInteractionAtPath(n,t,r):this.classConstructor.hasEffectsOnInteractionAtPath(n,t,r))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(n,t,r)}include(n,t){var r;this.deoptimized||this.applyDeoptimizations(),this.included=!0,(r=this.superClass)==null||r.include(n,t),this.body.include(n,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){var n;(n=this.id)==null||n.declare("class",this);for(const t of this.body.body)if(t instanceof hi&&t.kind==="constructor")return void(this.classConstructor=t);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const n of this.body.body)n.static||n instanceof hi&&n.kind==="constructor"||n.deoptimizePath(nn);this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;const n=[],t=[];for(const r of this.body.body){const a=r.static?n:t,i=r.kind;if(a===t&&!i)continue;const s=i==="set"||i==="get"?i:"init";let o;if(r.computed){const l=r.key.getLiteralValueAtPath(G,xn,this);if(typeof l=="symbol"){a.push({key:on,kind:s,property:r});continue}o=String(l)}else o=r.key instanceof cn?r.key.name:String(r.key.value);a.push({key:o,kind:s,property:r})}return n.unshift({key:"prototype",kind:"init",property:new Pn(t,this.superClass?new ep(this.superClass,"prototype"):$e)}),this.objectEntity=new Pn(n,this.superClass||$e)}}class Dr extends qo{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}parseNode(n){n.id!==null&&(this.id=new cn(n.id,this,this.scope.parent)),super.parseNode(n)}render(n,t){var o;const{exportNamesByVariable:r,format:a,snippets:{_:i,getPropertyAccess:s}}=t;if(this.id){const{variable:l,name:_}=this.id;a==="system"&&r.has(l)&&n.appendLeft(this.end,`${i}${Ge([l],t)};`);const u=l.getName(s);if(u!==_)return(o=this.superClass)==null||o.render(n,t),this.body.render(n,{...t,useOriginalName:f=>f===l}),n.prependRight(this.start,`let ${u}${i}=${i}`),void n.prependLeft(this.end,";")}super.render(n,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:n,scope:t}=this;if(n){const{name:r,variable:a}=n;for(const i of t.accessedOutsideVariables.values())i!==a&&i.forbidName(r)}}}class vi extends qo{render(n,t,{renderedSurroundingElement:r}=Bn){super.render(n,t),r===qn&&(n.appendRight(this.start,"("),n.prependLeft(this.end,")"))}}class Or extends Vn{constructor(n){super(),this.expressions=n,this.included=!1}deoptimizePath(n){for(const t of this.expressions)t.deoptimizePath(n)}getReturnExpressionWhenCalledAtPath(n,t,r,a){return[new Or(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(n,t,r,a)[0])),!1]}hasEffectsOnInteractionAtPath(n,t,r){for(const a of this.expressions)if(a.hasEffectsOnInteractionAtPath(n,t,r))return!0;return!1}}function zr(e,n){const{brokenFlow:t,hasBreak:r,hasContinue:a,ignore:i}=e,{breaks:s,continues:o}=i;return i.breaks=!0,i.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!n.hasEffects(e)||(i.breaks=s,i.continues=o,e.hasBreak=r,e.hasContinue=a,e.brokenFlow=t,!1)}function Pt(e,n,t){const{brokenFlow:r,hasBreak:a,hasContinue:i}=e;e.hasBreak=!1,e.hasContinue=!1,n.include(e,t,{asSingleStatement:!0}),e.hasBreak=a,e.hasContinue=i,e.brokenFlow=r}class gi extends O{hasEffects(){return!1}initialise(){this.context.addExport(this)}render(n,t,r){n.remove(r.start,r.end)}applyDeoptimizations(){}}gi.prototype.needsBoundaries=!0;class Ut extends pi{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}parseNode(n){n.id!==null&&(this.id=new cn(n.id,this,this.scope.parent)),super.parseNode(n)}}class Fr extends O{include(n,t){super.include(n,t),t&&this.context.includeVariableInModule(this.variable)}initialise(){const n=this.declaration;this.declarationName=n.id&&n.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(n,t,r){const{start:a,end:i}=r,s=function(o,l){return Ce(o,$n(o,"default",l)+7)}(n.original,this.start);if(this.declaration instanceof Ut)this.renderNamedDeclaration(n,s,this.declaration.id===null?function(o,l){const _=$n(o,"function",l)+8;o=o.slice(_,$n(o,"(",_));const u=$n(o,"*");return u===-1?_:_+u+1}(n.original,s):null,t);else if(this.declaration instanceof Dr)this.renderNamedDeclaration(n,s,this.declaration.id===null?$n(n.original,"class",a)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void ci(this,n,a,i);if(!this.variable.included)return n.remove(this.start,s),this.declaration.render(n,t,{renderedSurroundingElement:qn}),void(n.original[this.end-1]!==";"&&n.appendLeft(this.end,";"));this.renderVariableDeclaration(n,s,t)}this.declaration.render(n,t)}applyDeoptimizations(){}renderNamedDeclaration(n,t,r,a){const{exportNamesByVariable:i,format:s,snippets:{getPropertyAccess:o}}=a,l=this.variable.getName(o);n.remove(this.start,t),r!==null&&n.appendLeft(r,` ${l}`),s==="system"&&this.declaration instanceof Dr&&i.has(this.variable)&&n.appendLeft(this.end,` ${Ge([this.variable],a)};`)}renderVariableDeclaration(n,t,{format:r,exportNamesByVariable:a,snippets:{cnst:i,getPropertyAccess:s}}){const o=n.original.charCodeAt(this.end-1)===59,l=r==="system"&&a.get(this.variable);l?(n.overwrite(this.start,t,`${i} ${this.variable.getName(s)} = exports('${l[0]}', `),n.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(n.overwrite(this.start,t,`${i} ${this.variable.getName(s)} = `),o||n.appendLeft(this.end,";"))}}Fr.prototype.needsBoundaries=!0;class Go extends O{bind(){var n;(n=this.declaration)==null||n.bind()}hasEffects(n){var t;return!!((t=this.declaration)!=null&&t.hasEffects(n))}initialise(){this.context.addExport(this)}render(n,t,r){const{start:a,end:i}=r;this.declaration===null?n.remove(a,i):(n.remove(this.start,this.declaration.start),this.declaration.render(n,t,{end:i,start:a}))}applyDeoptimizations(){}}Go.prototype.needsBoundaries=!0;class Xo extends pi{render(n,t,{renderedSurroundingElement:r}=Bn){super.render(n,t),r===qn&&(n.appendRight(this.start,"("),n.prependLeft(this.end,")"))}}class Wo extends Ve{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(n,t,r,a){return this.hoistedDeclarations.push(n),super.addDeclaration(n,t,r,a)}}const Ho=Symbol("unset");class bi extends O{constructor(){super(...arguments),this.testValue=Ho}deoptimizeCache(){this.testValue=dn}hasEffects(n){var r;if(this.test.hasEffects(n))return!0;const t=this.getTestValue();if(typeof t=="symbol"){const{brokenFlow:a}=n;if(this.consequent.hasEffects(n))return!0;const i=n.brokenFlow;return n.brokenFlow=a,this.alternate===null?!1:!!this.alternate.hasEffects(n)||(n.brokenFlow=n.brokenFlow&&i,!1)}return t?this.consequent.hasEffects(n):!!((r=this.alternate)!=null&&r.hasEffects(n))}include(n,t){if(this.included=!0,t)this.includeRecursively(t,n);else{const r=this.getTestValue();typeof r=="symbol"?this.includeUnknownTest(n):this.includeKnownTest(n,r)}}parseNode(n){this.consequentScope=new Wo(this.scope),this.consequent=new(this.context.getNodeConstructor(n.consequent.type))(n.consequent,this,this.consequentScope),n.alternate&&(this.alternateScope=new Wo(this.scope),this.alternate=new(this.context.getNodeConstructor(n.alternate.type))(n.alternate,this,this.alternateScope)),super.parseNode(n)}render(n,t){const{snippets:{getPropertyAccess:r}}=t,a=this.getTestValue(),i=[],s=this.test.included,o=!this.context.options.treeshake;s?this.test.render(n,t):n.remove(this.start,this.consequent.start),this.consequent.included&&(o||typeof a=="symbol"||a)?this.consequent.render(n,t):(n.overwrite(this.consequent.start,this.consequent.end,s?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&typeof a!="symbol"&&a?(s&&this.shouldKeepAlternateBranch()?n.overwrite(this.alternate.start,this.end,";"):n.remove(this.consequent.end,this.end),i.push(...this.alternateScope.hoistedDeclarations)):(s?n.original.charCodeAt(this.alternate.start-1)===101&&n.prependLeft(this.alternate.start," "):n.remove(this.consequent.end,this.alternate.start),this.alternate.render(n,t))),this.renderHoistedDeclarations(i,n,r)}applyDeoptimizations(){}getTestValue(){return this.testValue===Ho?this.testValue=this.test.getLiteralValueAtPath(G,xn,this):this.testValue}includeKnownTest(n,t){var r;this.test.shouldBeIncluded(n)&&this.test.include(n,!1),t&&this.consequent.shouldBeIncluded(n)&&this.consequent.include(n,!1,{asSingleStatement:!0}),!t&&((r=this.alternate)!=null&&r.shouldBeIncluded(n))&&this.alternate.include(n,!1,{asSingleStatement:!0})}includeRecursively(n,t){var r;this.test.include(t,n),this.consequent.include(t,n),(r=this.alternate)==null||r.include(t,n)}includeUnknownTest(n){var a;this.test.include(n,!1);const{brokenFlow:t}=n;let r=!1;this.consequent.shouldBeIncluded(n)&&(this.consequent.include(n,!1,{asSingleStatement:!0}),r=n.brokenFlow,n.brokenFlow=t),(a=this.alternate)!=null&&a.shouldBeIncluded(n)&&(this.alternate.include(n,!1,{asSingleStatement:!0}),n.brokenFlow=n.brokenFlow&&r)}renderHoistedDeclarations(n,t,r){const a=[...new Set(n.map(i=>{const s=i.variable;return s.included?s.getName(r):""}))].filter(Boolean).join(", ");if(a){const i=this.parent.type,s=i!==Cr&&i!==io;t.prependRight(this.start,`${s?"{ ":""}var ${a}; `),s&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let n=this.parent;do{if(n instanceof bi&&n.alternate)return!0;if(n instanceof Tr)return!1;n=n.parent}while(n);return!1}}class Ko extends O{bind(){}hasEffects(){return!1}initialise(){this.context.addImport(this)}render(n,t,r){n.remove(r.start,r.end)}applyDeoptimizations(){}}Ko.prototype.needsBoundaries=!0;class Jo extends O{applyDeoptimizations(){}}const yi="_interopDefault",xi="_interopDefaultCompat",Pr="_interopNamespace",Ur="_interopNamespaceCompat",We="_interopNamespaceDefault",Rt="_interopNamespaceDefaultOnly",Rr="_mergeNamespaces",Vr={auto:yi,compat:xi,default:null,defaultOnly:null,esModule:null},qr=(e,n)=>e==="esModule"||n&&(e==="auto"||e==="compat"),Vt={auto:Pr,compat:Ur,default:We,defaultOnly:Rt,esModule:null},tp=(e,n)=>e!=="esModule"&&qr(e,n),ki=(e,n,t,r,a,i,s)=>{const o=new Set(e);for(const l of wi)n.has(l)&&o.add(l);return wi.map(l=>o.has(l)?Yo[l](t,r,a,i,s,o):"").join("")},Yo={[xi](e,n,t){const{_:r,getDirectReturnFunction:a,n:i}=n,[s,o]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:xi});return`${s}${$i(n)}${r}?${r}${t?Zo(n):Qo(n)}${o}${i}${i}`},[yi](e,n,t){const{_:r,getDirectReturnFunction:a,n:i}=n,[s,o]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:yi});return`${s}e${r}&&${r}e.__esModule${r}?${r}${t?Zo(n):Qo(n)}${o}${i}${i}`},[Ur](e,n,t,r,a,i){const{_:s,getDirectReturnFunction:o,n:l}=n;if(i.has(We)){const[_,u]=o(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ur});return`${_}${$i(n)}${s}?${s}e${s}:${s}${We}(e)${u}${l}${l}`}return`function ${Ur}(e)${s}{${l}${e}if${s}(${$i(n)})${s}return e;${l}`+Ei(e,e,n,t,r,a)+`}${l}${l}`},[Rt](e,n,t,r,a){const{getDirectReturnFunction:i,getObject:s,n:o}=n,[l,_]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Rt});return`${l}${Ci(r,tl(a,s([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),n))}${_}${o}${o}`},[We](e,n,t,r,a){const{_:i,n:s}=n;return`function ${We}(e)${i}{${s}`+Ei(e,e,n,t,r,a)+`}${s}${s}`},[Pr](e,n,t,r,a,i){const{_:s,getDirectReturnFunction:o,n:l}=n;if(i.has(We)){const[_,u]=o(["e"],{functionReturn:!0,lineBreakIndent:null,name:Pr});return`${_}e${s}&&${s}e.__esModule${s}?${s}e${s}:${s}${We}(e)${u}${l}${l}`}return`function ${Pr}(e)${s}{${l}${e}if${s}(e${s}&&${s}e.__esModule)${s}return e;${l}`+Ei(e,e,n,t,r,a)+`}${l}${l}`},[Rr](e,n,t,r,a){const{_:i,cnst:s,n:o}=n,l=s==="var"&&t;return`function ${Rr}(n, m)${i}{${o}${e}${ap(`{${o}${e}${e}${e}if${i}(k${i}!==${i}'default'${i}&&${i}!(k in n))${i}{${o}`+(t?l?nl:sp:el)(e,e+e+e+e,n)+`${e}${e}${e}}${o}${e}${e}}`,l,e,n)}${o}${e}return ${Ci(r,tl(a,"n",n))};${o}}${o}${o}`}},Zo=({_:e,getObject:n})=>`e${e}:${e}${n([["default","e"]],{lineBreakIndent:null})}`,Qo=({_:e,getPropertyAccess:n})=>`e${n("default")}${e}:${e}e`,$i=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Ei=(e,n,t,r,a,i)=>{const{_:s,cnst:o,getObject:l,getPropertyAccess:_,n:u,s:f}=t,d=`{${u}`+(r?ip:el)(e,n+e+e,t)+`${n}${e}}`;return`${n}${o} n${s}=${s}Object.create(null${i?`,${s}{${s}[Symbol.toStringTag]:${s}${qt(l)}${s}}`:""});${u}${n}if${s}(e)${s}{${u}${n}${e}${rp(d,!r,t)}${u}${n}}${u}${n}n${_("default")}${s}=${s}e;${u}${n}return ${Ci(a,"n")}${f}${u}`},rp=(e,n,{_:t,cnst:r,getFunctionIntro:a,s:i})=>r!=="var"||n?`for${t}(${r} k in e)${t}${e}`:`Object.keys(e).forEach(${a(["k"],{isAsync:!1,name:null})}${e})${i}`,ap=(e,n,t,{_:r,cnst:a,getDirectReturnFunction:i,getFunctionIntro:s,n:o})=>{if(n){const[l,_]=i(["e"],{functionReturn:!1,lineBreakIndent:{base:t,t},name:null});return`m.forEach(${l}e${r}&&${r}typeof e${r}!==${r}'string'${r}&&${r}!Array.isArray(e)${r}&&${r}Object.keys(e).forEach(${s(["k"],{isAsync:!1,name:null})}${e})${_});`}return`for${r}(var i${r}=${r}0;${r}i${r}<${r}m.length;${r}i++)${r}{${o}${t}${t}${a} e${r}=${r}m[i];${o}${t}${t}if${r}(typeof e${r}!==${r}'string'${r}&&${r}!Array.isArray(e))${r}{${r}for${r}(${a} k in e)${r}${e}${r}}${o}${t}}`},ip=(e,n,t)=>{const{_:r,n:a}=t;return`${n}if${r}(k${r}!==${r}'default')${r}{${a}`+nl(e,n+e,t)+`${n}}${a}`},nl=(e,n,{_:t,cnst:r,getDirectReturnFunction:a,n:i})=>{const[s,o]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${n}${r} d${t}=${t}Object.getOwnPropertyDescriptor(e,${t}k);${i}${n}Object.defineProperty(n,${t}k,${t}d.get${t}?${t}d${t}:${t}{${i}${n}${e}enumerable:${t}true,${i}${n}${e}get:${t}${s}e[k]${o}${i}${n}});${i}`},sp=(e,n,{_:t,cnst:r,getDirectReturnFunction:a,n:i})=>{const[s,o]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${n}${r} d${t}=${t}Object.getOwnPropertyDescriptor(e,${t}k);${i}${n}if${t}(d)${t}{${i}${n}${e}Object.defineProperty(n,${t}k,${t}d.get${t}?${t}d${t}:${t}{${i}${n}${e}${e}enumerable:${t}true,${i}${n}${e}${e}get:${t}${s}e[k]${o}${i}${n}${e}});${i}${n}}${i}`},el=(e,n,{_:t,n:r})=>`${n}n[k]${t}=${t}e[k];${r}`,Ci=(e,n)=>e?`Object.freeze(${n})`:n,tl=(e,n,{_:t,getObject:r})=>e?`Object.defineProperty(${n},${t}Symbol.toStringTag,${t}${qt(r)})`:n,wi=Object.keys(Yo);function qt(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function rl(e,n){return e.renderBaseName!==null&&n.has(e)&&e.isReassigned}class al extends O{declareDeclarator(n){this.id.declare(n,this.init||it)}deoptimizePath(n){this.id.deoptimizePath(n)}hasEffects(n){var r;this.deoptimized||this.applyDeoptimizations();const t=(r=this.init)==null?void 0:r.hasEffects(n);return this.id.markDeclarationReached(),t||this.id.hasEffects(n)}include(n,t){const{deoptimized:r,id:a,init:i}=this;r||this.applyDeoptimizations(),this.included=!0,i==null||i.include(n,t),a.markDeclarationReached(),(t||a.shouldBeIncluded(n))&&a.include(n,t)}render(n,t){const{exportNamesByVariable:r,snippets:{_:a,getPropertyAccess:i}}=t,{end:s,id:o,init:l,start:_}=this,u=o.included;if(u)o.render(n,t);else{const f=$n(n.original,"=",o.end);n.remove(_,Ce(n.original,f+1))}l?(o instanceof cn&&l instanceof vi&&!l.id&&o.variable.getName(i)!==o.name&&n.appendLeft(l.start+5,` ${o.name}`),l.render(n,t,u?Bn:{renderedSurroundingElement:qn})):o instanceof cn&&rl(o.variable,r)&&n.appendLeft(s,`${a}=${a}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:n,init:t}=this;if(t&&n instanceof cn&&t instanceof vi&&!t.id){const{name:r,variable:a}=n;for(const i of t.scope.accessedOutsideVariables.values())i!==a&&i.forbidName(r)}}}function il(e,n,t){return n==="external"?Vt[t(e instanceof fn?e.id:null)]:n==="default"?Rt:null}const op={amd:["require"],cjs:["require"],system:["module"]};function sl(e){const n=[];for(const t of e.properties){if(t.type==="RestElement"||t.computed||t.key.type!=="Identifier")return;n.push(t.key.name)}return n}class ol extends O{applyDeoptimizations(){}}const Ai="ROLLUP_FILE_URL_",Si="import",lp={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]},_p={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Gt=(e,n="URL")=>`new ${n}(${e}).href`,Bi=(e,n=!1)=>Gt(`'${mr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Gr=e=>(n,{chunkId:t})=>{const r=e(t);return n===null?`({ url: ${r} })`:n==="url"?r:"undefined"},Ii=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,ll=e=>Ii(`__dirname + '/${e}'`),Li=(e,n=!1)=>`${n?"typeof document === 'undefined' ? location.href : ":""}(document.currentScript && document.currentScript.src || new URL('${mr(e)}', document.baseURI).href)`,cp={amd:e=>(e[0]!=="."&&(e="./"+e),Gt(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${ll(e)} : ${Bi(e)})`,es:e=>Gt(`'${e}', import.meta.url`),iife:e=>Bi(e),system:e=>Gt(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${ll(e)} : ${Bi(e,!0)})`},Ni={amd:Gr(()=>Gt("module.uri, document.baseURI")),cjs:Gr(e=>`(typeof document === 'undefined' ? ${Ii("__filename")} : ${Li(e)})`),iife:Gr(e=>Li(e)),system:(e,{snippets:{getPropertyAccess:n}})=>e===null?"module.meta":`module.meta${n(e)}`,umd:Gr(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Ii("__filename")} : ${Li(e,!0)})`)};class _l extends O{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(this.hasCachedEffect===null?this.hasCachedEffect=this.hasEffects($r()):this.hasCachedEffect)}hasEffects(n){for(const t of this.body)if(t.hasEffects(n)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:r,log:a,module:i}=this.context;a(Oe,ym(r,i.id,Fa(r,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(n,t){this.included=!0;for(const r of this.body)(t||r.shouldBeIncluded(n))&&r.include(n,t)}render(n,t){let r=this.start;if(n.original.startsWith("#!")&&(r=Math.min(n.original.indexOf(`
+`)+1,this.end),n.remove(0,r)),this.body.length>0){for(;n.original[r]==="/"&&/[*/]/.test(n.original[r+1]);){const a=Ot(n.original.slice(r,this.body[0].start));if(a[0]===-1)break;r+=a[1]}zt(this.body,n,r,this.end,t)}else super.render(n,t)}applyDeoptimizations(){}}class cl extends O{hasEffects(n){var t;if((t=this.test)!=null&&t.hasEffects(n))return!0;for(const r of this.consequent){if(n.brokenFlow)break;if(r.hasEffects(n))return!0}return!1}include(n,t){var r;this.included=!0,(r=this.test)==null||r.include(n,t);for(const a of this.consequent)(t||a.shouldBeIncluded(n))&&a.include(n,t)}render(n,t,r){if(this.consequent.length>0){this.test&&this.test.render(n,t);const a=this.test?this.test.end:$n(n.original,"default",this.start)+7,i=$n(n.original,":",a)+1;zt(this.consequent,n,i,r.end,t)}else super.render(n,t)}}cl.prototype.needsBoundaries=!0;class ul extends O{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(n){return n.length>0||this.quasis.length!==1?dn:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(n){return n.length!==1?vn:Nt(It,n[0])}hasEffectsOnInteractionAtPath(n,t,r){return t.type===0?n.length>1:t.type!==2||n.length!==1||Lt(It,n[0],t,r)}render(n,t){n.indentExclusionRanges.push([this.start,this.end]),super.render(n,t)}}class fl extends De{constructor(){super("undefined")}getLiteralValueAtPath(){}}class ie extends me{constructor(n,t,r){super(n,t,t.declaration,r),this.hasId=!1,this.originalId=null,this.originalVariable=null;const a=t.declaration;(a instanceof Ut||a instanceof Dr)&&a.id?(this.hasId=!0,this.originalId=a.id):a instanceof cn&&(this.originalId=a)}addReference(n){this.hasId||(this.name=n.name)}forbidName(n){const t=this.getOriginalVariable();t===this?super.forbidName(n):t.forbidName(n)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const n=this.getOriginalVariable();return n===this?super.getBaseVariableName():n.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof fl||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(n){const t=this.getOriginalVariable();return t===this?super.getName(n):t.getName(n)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let n,t=this;const r=new Set;do r.add(t),n=t,t=n.getDirectOriginalVariable();while(t instanceof ie&&!r.has(t));return this.originalVariable=t||n}}class dl extends Jn{constructor(n,t){super(n),this.context=t,this.variables.set("this",new me("this",null,it,t))}addExportDefaultDeclaration(n,t,r){const a=new ie(n,t,r);return this.variables.set("default",a),a}addNamespaceMemberAccess(){}deconflict(n,t,r){for(const a of this.children)a.deconflict(n,t,r)}findLexicalBoundary(){return this}findVariable(n){const t=this.variables.get(n)||this.accessedOutsideVariables.get(n);if(t)return t;const r=this.context.traceVariable(n)||this.parent.findVariable(n);return r instanceof _i&&this.accessedOutsideVariables.set(n,r),r}}const up={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>dn,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class ml extends O{deoptimizePath(){for(const n of this.declarations)n.deoptimizePath(G)}hasEffectsOnInteractionAtPath(){return!1}include(n,t,{asSingleStatement:r}=Bn){this.included=!0;for(const a of this.declarations){(t||a.shouldBeIncluded(n))&&a.include(n,t);const{id:i,init:s}=a;r&&i.include(n,t),s&&i.included&&!s.included&&(i instanceof Ft||i instanceof ko)&&s.include(n,t)}}initialise(){for(const n of this.declarations)n.declareDeclarator(this.kind)}render(n,t,r=Bn){if(function(a,i){for(const s of a){if(!s.id.included)return!1;if(s.id.type===oo){if(i.has(s.id.variable))return!1}else{const o=[];if(s.id.addExportedVariables(o,i),o.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const a of this.declarations)a.render(n,t);r.isNoStatement||n.original.charCodeAt(this.end-1)===59||n.appendLeft(this.end,";")}else this.renderReplacedDeclarations(n,t)}applyDeoptimizations(){}renderDeclarationEnd(n,t,r,a,i,s,o){n.original.charCodeAt(this.end-1)===59&&n.remove(this.end-1,this.end),t+=";",r===null?n.appendLeft(i,t):(n.original.charCodeAt(a-1)!==10||n.original.charCodeAt(this.end)!==10&&n.original.charCodeAt(this.end)!==13||(a--,n.original.charCodeAt(a)===13&&a--),a===r+1?n.overwrite(r,i,t):(n.overwrite(r,r+1,t),n.remove(a,i))),s.length>0&&n.appendLeft(i,` ${Ge(s,o)};`)}renderReplacedDeclarations(n,t){const r=jo(this.declarations,n,this.start+this.kind.length,this.end-(n.original.charCodeAt(this.end-1)===59?1:0));let a,i;i=Ce(n.original,this.start+this.kind.length);let s=i-1;n.remove(this.start,s);let o,l=!1,_=!1,u="";const f=[],d=function(h,b,p){var y;let v=null;if(b.format==="system"){for(const{node:$}of h)$.id instanceof cn&&$.init&&p.length===0&&((y=b.exportNamesByVariable.get($.id.variable))==null?void 0:y.length)===1?(v=$.id.variable,p.push(v)):$.id.addExportedVariables(p,b.exportNamesByVariable);p.length>1?v=null:v&&(p.length=0)}return v}(r,t,f);for(const{node:h,start:b,separator:p,contentEnd:v,end:y}of r)if(h.included){if(h.render(n,t),o="",!h.id.included||h.id instanceof cn&&rl(h.id.variable,t.exportNamesByVariable))_&&(u+=";"),l=!1;else{if(d&&d===h.id.variable){const $=$n(n.original,"=",h.id.end);mi(d,Ce(n.original,$+1),p===null?v:p,n,t)}l?u+=",":(_&&(u+=";"),o+=`${this.kind} `,l=!0)}i===s+1?n.overwrite(s,i,u+o):(n.overwrite(s,s+1,u),n.appendLeft(i,o)),a=v,i=y,_=!0,s=p,u=""}else n.remove(b,y);this.renderDeclarationEnd(n,u,s,a,i,f,t)}}const pl={ArrayExpression:xo,ArrayPattern:ko,ArrowFunctionExpression:di,AssignmentExpression:class extends O{hasEffects(e){const{deoptimized:n,left:t,operator:r,right:a}=this;return n||this.applyDeoptimizations(),a.hasEffects(e)||t.hasEffectsAsAssignmentTarget(e,r!=="=")}hasEffectsOnInteractionAtPath(e,n,t){return this.right.hasEffectsOnInteractionAtPath(e,n,t)}include(e,n){const{deoptimized:t,left:r,right:a,operator:i}=this;t||this.applyDeoptimizations(),this.included=!0,(n||i!=="="||r.included||r.hasEffectsAsAssignmentTarget($r(),!1))&&r.includeAsAssignmentTarget(e,n,i!=="="),a.include(e,n)}initialise(){this.left.setAssignedValue(this.right)}render(e,n,{preventASI:t,renderedParentType:r,renderedSurroundingElement:a}=Bn){const{left:i,right:s,start:o,end:l,parent:_}=this;if(i.included)i.render(e,n),s.render(e,n);else{const u=Ce(e.original,$n(e.original,"=",i.end)+1);e.remove(o,u),t&&jr(e,u,s.start),s.render(e,n,{renderedParentType:r||_.type,renderedSurroundingElement:a||_.type})}if(n.format==="system")if(i instanceof cn){const u=i.variable,f=n.exportNamesByVariable.get(u);if(f)return void(f.length===1?mi(u,o,l,e,n):To(u,o,l,_.type!==qn,e,n))}else{const u=[];if(i.addExportedVariables(u,n.exportNamesByVariable),u.length>0)return void function(f,d,h,b,p,v){const{_:y,getDirectReturnIifeLeft:$}=v.snippets;p.prependRight(d,$(["v"],`${Ge(f,v)},${y}v`,{needsArrowReturnParens:!0,needsWrappedFunction:b})),p.appendLeft(h,")")}(u,o,l,a===qn,e,n)}i.included&&i instanceof Ft&&(a===qn||a===Qa)&&(e.appendRight(o,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(G),this.right.deoptimizePath(nn),this.context.requestTreeshakingPass()}},AssignmentPattern:class extends O{addExportedVariables(e,n){this.left.addExportedVariables(e,n)}declare(e,n){return this.left.declare(e,n)}deoptimizePath(e){e.length===0&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,n,t){return e.length>0||this.left.hasEffectsOnInteractionAtPath(G,n,t)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,n,{isShorthandProperty:t}=Bn){this.left.render(e,n,{isShorthandProperty:t}),this.right.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(G),this.right.deoptimizePath(nn),this.context.requestTreeshakingPass()}},AwaitExpression:Oo,BinaryExpression:class extends O{deoptimizeCache(){}getLiteralValueAtPath(e,n,t){if(e.length>0)return dn;const r=this.left.getLiteralValueAtPath(G,n,t);if(typeof r=="symbol")return dn;const a=this.right.getLiteralValueAtPath(G,n,t);if(typeof a=="symbol")return dn;const i=Ym[this.operator];return i?i(r,a):dn}hasEffects(e){return this.operator==="+"&&this.parent instanceof qe&&this.left.getLiteralValueAtPath(G,xn,this)===""||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>1}render(e,n,{renderedSurroundingElement:t}=Bn){this.left.render(e,n,{renderedSurroundingElement:t}),this.right.render(e,n)}},BlockStatement:Tr,BreakStatement:class extends O{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:Ro,CatchClause:class extends O{createScope(e){this.scope=new Qm(e,this.context)}parseNode(e){const{param:n}=e;n&&(this.param=new(this.context.getNodeConstructor(n.type))(n,this,this.scope),this.param.declare("parameter",X)),super.parseNode(e)}},ChainExpression:class extends O{deoptimizeCache(){}getLiteralValueAtPath(e,n,t){if(!this.expression.isSkippedAsOptional(t))return this.expression.getLiteralValueAtPath(e,n,t)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}},ClassBody:class extends O{createScope(e){this.scope=new np(e,this.parent,this.context)}include(e,n){this.included=!0,this.context.includeVariableInModule(this.scope.thisVariable);for(const t of this.body)t.include(e,n)}parseNode(e){const n=this.body=[];for(const t of e.body)n.push(new(this.context.getNodeConstructor(t.type))(t,this,t.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:Dr,ClassExpression:vi,ConditionalExpression:class extends O{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,n,t){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,n,t),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizeCache(){if(this.usedBranch!==null){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(nn);const{expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=gn;for(const t of n)t.deoptimizeCache()}}deoptimizePath(e){const n=this.getUsedBranch();n?n.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,n,t){const r=this.getUsedBranch();return r?(this.expressionsToBeDeoptimized.push(t),r.getLiteralValueAtPath(e,n,t)):dn}getReturnExpressionWhenCalledAtPath(e,n,t,r){const a=this.getUsedBranch();return a?(this.expressionsToBeDeoptimized.push(r),a.getReturnExpressionWhenCalledAtPath(e,n,t,r)):[new Or([this.consequent.getReturnExpressionWhenCalledAtPath(e,n,t,r)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,n,t,r)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const n=this.getUsedBranch();return n?n.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,t){const r=this.getUsedBranch();return r?r.hasEffectsOnInteractionAtPath(e,n,t):this.consequent.hasEffectsOnInteractionAtPath(e,n,t)||this.alternate.hasEffectsOnInteractionAtPath(e,n,t)}include(e,n){this.included=!0;const t=this.getUsedBranch();n||this.test.shouldBeIncluded(e)||t===null?(this.test.include(e,n),this.consequent.include(e,n),this.alternate.include(e,n)):t.include(e,n)}includeCallArguments(e,n){const t=this.getUsedBranch();t?t.includeCallArguments(e,n):(this.consequent.includeCallArguments(e,n),this.alternate.includeCallArguments(e,n))}render(e,n,{isCalleeOfRenderedParent:t,preventASI:r,renderedParentType:a,renderedSurroundingElement:i}=Bn){const s=this.getUsedBranch();if(this.test.included)this.test.render(e,n,{renderedSurroundingElement:i}),this.consequent.render(e,n),this.alternate.render(e,n);else{const o=$n(e.original,":",this.consequent.end),l=Ce(e.original,(this.consequent.included?$n(e.original,"?",this.test.end):o)+1);r&&jr(e,l,s.start),e.remove(this.start,l),this.consequent.included&&e.remove(o,this.end),No(this,e),s.render(e,n,{isCalleeOfRenderedParent:t,preventASI:!0,renderedParentType:a||this.parent.type,renderedSurroundingElement:i||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(G,xn,this);return typeof e=="symbol"?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends O{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends O{hasEffects(e){return!!this.test.hasEffects(e)||zr(e,this.body)}include(e,n){this.included=!0,this.test.include(e,n),Pt(e,this.body,n)}},EmptyStatement:class extends O{hasEffects(){return!1}},ExportAllDeclaration:gi,ExportDefaultDeclaration:Fr,ExportNamedDeclaration:Go,ExportSpecifier:class extends O{applyDeoptimizations(){}},ExpressionStatement:qe,ForInStatement:class extends O{createScope(e){this.scope=new Ve(e)}hasEffects(e){const{body:n,deoptimized:t,left:r,right:a}=this;return t||this.applyDeoptimizations(),!(!r.hasEffectsAsAssignmentTarget(e,!1)&&!a.hasEffects(e))||zr(e,n)}include(e,n){const{body:t,deoptimized:r,left:a,right:i}=this;r||this.applyDeoptimizations(),this.included=!0,a.includeAsAssignmentTarget(e,n||!0,!1),i.include(e,n),Pt(e,t,n)}initialise(){this.left.setAssignedValue(X)}render(e,n){this.left.render(e,n,Re),this.right.render(e,n,Re),e.original.charCodeAt(this.right.start-1)===110&&e.prependLeft(this.right.start," "),this.body.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(G),this.context.requestTreeshakingPass()}},ForOfStatement:class extends O{createScope(e){this.scope=new Ve(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,n){const{body:t,deoptimized:r,left:a,right:i}=this;r||this.applyDeoptimizations(),this.included=!0,a.includeAsAssignmentTarget(e,n||!0,!1),i.include(e,n),Pt(e,t,n)}initialise(){this.left.setAssignedValue(X)}render(e,n){this.left.render(e,n,Re),this.right.render(e,n,Re),e.original.charCodeAt(this.right.start-1)===102&&e.prependLeft(this.right.start," "),this.body.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(G),this.right.deoptimizePath(nn),this.context.requestTreeshakingPass()}},ForStatement:class extends O{createScope(e){this.scope=new Ve(e)}hasEffects(e){var n,t,r;return!!((n=this.init)!=null&&n.hasEffects(e)||(t=this.test)!=null&&t.hasEffects(e)||(r=this.update)!=null&&r.hasEffects(e))||zr(e,this.body)}include(e,n){var t,r,a;this.included=!0,(t=this.init)==null||t.include(e,n,{asSingleStatement:!0}),(r=this.test)==null||r.include(e,n),(a=this.update)==null||a.include(e,n),Pt(e,this.body,n)}render(e,n){var t,r,a;(t=this.init)==null||t.render(e,n,Re),(r=this.test)==null||r.render(e,n,Re),(a=this.update)==null||a.render(e,n,Re),this.body.render(e,n)}},FunctionDeclaration:Ut,FunctionExpression:Xo,Identifier:cn,IfStatement:bi,ImportAttribute:class extends O{},ImportDeclaration:Ko,ImportDefaultSpecifier:Jo,ImportExpression:class extends O{constructor(){super(...arguments),this.inlineNamespace=null,this.assertions=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof qe)return gn;if(e instanceof Oo){const n=e.parent;if(n instanceof qe)return gn;if(n instanceof al){const t=n.id;return t instanceof Ft?sl(t):void 0}if(n instanceof we){const t=n.property;if(!n.computed&&t instanceof cn)return[t.name]}}else if(e instanceof we){const n=e.parent,t=e.property;if(!(n instanceof Ro&&t instanceof cn))return;const r=t.name;if(n.parent instanceof qe&&["catch","finally"].includes(r))return gn;if(r!=="then")return;if(n.arguments.length===0)return gn;const a=n.arguments[0];if(n.arguments.length!==1||!(a instanceof di||a instanceof Xo))return;if(a.params.length===0)return gn;const i=a.params[0];return a.params.length===1&&i instanceof Ft?sl(i):void 0}}hasEffects(){return!0}include(e,n){this.included||(this.included=!0,this.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,n)}initialise(){this.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,n){const{snippets:{_:t,getDirectReturnFunction:r,getObject:a,getPropertyAccess:i}}=n;if(this.inlineNamespace){const[s,o]=r([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${s}${this.inlineNamespace.getName(i)}${o})`)}else{if(this.mechanism&&(e.overwrite(this.start,$n(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[s,o]=r(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${s}n.${this.namespaceExportName}${o})`)}}else this.source.render(e,n);this.assertions!==!0&&(this.arguments&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.assertions&&e.appendLeft(this.end-1,`,${t}${a([["assert",this.assertions]],{lineBreakIndent:null})}`))}}setExternalResolution(e,n,t,r,a,i,s,o,l){const{format:_}=t;this.inlineNamespace=null,this.resolution=n,this.resolutionString=s,this.namespaceExportName=o,this.assertions=l;const u=[...op[_]||[]];let f;({helper:f,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(n,e,t,r,a)),f&&u.push(f),u.length>0&&this.scope.addAccessedGlobals(u,i)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,n,{compact:t,dynamicImportFunction:r,dynamicImportInCjs:a,format:i,generatedCode:{arrowFunctions:s},interop:o},{_:l,getDirectReturnFunction:_,getDirectReturnIifeLeft:u},f){const d=f.hookFirstSync("renderDynamicImport",[{customResolution:typeof this.resolution=="string"?this.resolution:null,format:i,moduleId:this.context.module.id,targetModuleId:this.resolution&&typeof this.resolution!="string"?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const h=!this.resolution||typeof this.resolution=="string";switch(i){case"cjs":{if(a&&(!e||typeof e=="string"||e instanceof fn))return{helper:null,mechanism:null};const b=il(e,n,o);let p="require(",v=")";b&&(p=`/*#__PURE__*/${b}(${p}`,v+=")");const[y,$]=_([],{functionReturn:!0,lineBreakIndent:null,name:null});return p=`Promise.resolve().then(${y}${p}`,v+=`${$})`,!s&&h&&(p=u(["t"],`${p}t${v}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),v=")"),{helper:b,mechanism:{left:p,right:v}}}case"amd":{const b=t?"c":"resolve",p=t?"e":"reject",v=il(e,n,o),[y,$]=_(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),g=v?`${y}${b}(/*#__PURE__*/${v}(m))${$}`:b,[x,k]=_([b,p],{functionReturn:!1,lineBreakIndent:null,name:null});let A=`new Promise(${x}require([`,S=`],${l}${g},${l}${p})${k})`;return!s&&h&&(A=u(["t"],`${A}t${S}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),S=")"),{helper:v,mechanism:{left:A,right:S}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(r)return{helper:null,mechanism:{left:`${r}(`,right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:ol,ImportSpecifier:class extends O{applyDeoptimizations(){}},LabeledStatement:class extends O{hasEffects(e){const n=e.brokenFlow;return e.ignore.labels.add(this.label.name),!!this.body.hasEffects(e)||(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=n),!1)}include(e,n){this.included=!0;const t=e.brokenFlow;this.body.include(e,n),(n||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=t)}render(e,n){this.label.included?this.label.render(e,n):e.remove(this.start,Ce(e.original,$n(e.original,":",this.label.end)+1)),this.body.render(e,n)}},Literal:Xe,LogicalExpression:class extends O{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,n,t){this.left.deoptimizeArgumentsOnInteractionAtPath(e,n,t),this.right.deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(nn);const{context:n,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=gn;for(const r of t)r.deoptimizeCache();n.requestTreeshakingPass()}}deoptimizePath(e){const n=this.getUsedBranch();n?n.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,n,t){const r=this.getUsedBranch();return r?(this.expressionsToBeDeoptimized.push(t),r.getLiteralValueAtPath(e,n,t)):dn}getReturnExpressionWhenCalledAtPath(e,n,t,r){const a=this.getUsedBranch();return a?(this.expressionsToBeDeoptimized.push(r),a.getReturnExpressionWhenCalledAtPath(e,n,t,r)):[new Or([this.left.getReturnExpressionWhenCalledAtPath(e,n,t,r)[0],this.right.getReturnExpressionWhenCalledAtPath(e,n,t,r)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,t){const r=this.getUsedBranch();return r?r.hasEffectsOnInteractionAtPath(e,n,t):this.left.hasEffectsOnInteractionAtPath(e,n,t)||this.right.hasEffectsOnInteractionAtPath(e,n,t)}include(e,n){this.included=!0;const t=this.getUsedBranch();n||t===this.right&&this.left.shouldBeIncluded(e)||!t?(this.left.include(e,n),this.right.include(e,n)):t.include(e,n)}render(e,n,{isCalleeOfRenderedParent:t,preventASI:r,renderedParentType:a,renderedSurroundingElement:i}=Bn){if(this.left.included&&this.right.included)this.left.render(e,n,{preventASI:r,renderedSurroundingElement:i}),this.right.render(e,n);else{const s=$n(e.original,this.operator,this.left.end);if(this.right.included){const o=Ce(e.original,s+2);e.remove(this.start,o),r&&jr(e,o,this.right.start)}else e.remove(s,this.end);No(this,e),this.getUsedBranch().render(e,n,{isCalleeOfRenderedParent:t,preventASI:r,renderedParentType:a||this.parent.type,renderedSurroundingElement:i||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(G,xn,this);if(typeof e=="symbol")return null;this.usedBranch=this.operator==="||"&&e||this.operator==="&&"&&!e||this.operator==="??"&&e!=null?this.left:this.right}return this.usedBranch}},MemberExpression:we,MetaProperty:class extends O{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:n},metaProperty:t}=this;return n===Si&&(t!=null&&t.startsWith(Ai))?e.getFileName(t.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>1||n!==0}include(){if(!this.included&&(this.included=!0,this.meta.name===Si)){this.context.addImportMeta(this);const e=this.parent,n=this.metaProperty=e instanceof we&&typeof e.propertyKey=="string"?e.propertyKey:null;n!=null&&n.startsWith(Ai)&&(this.referenceId=n.slice(16))}}render(e,{format:n,pluginDriver:t,snippets:r}){var b;const{context:{module:{id:a}},meta:{name:i},metaProperty:s,parent:o,preliminaryChunkId:l,referenceId:_,start:u,end:f}=this;if(i!==Si)return;const d=l;if(_){const p=t.getFileName(_),v=$t(nt(je(d),p)),y=t.hookFirstSync("resolveFileUrl",[{chunkId:d,fileName:p,format:n,moduleId:a,referenceId:_,relativePath:v}])||cp[n](v);return void e.overwrite(o.start,o.end,y,{contentOnly:!0})}const h=t.hookFirstSync("resolveImportMeta",[s,{chunkId:d,format:n,moduleId:a}])||((b=Ni[n])==null?void 0:b.call(Ni,s,{chunkId:d,snippets:r}));typeof h=="string"&&(o instanceof we?e.overwrite(o.start,o.end,h,{contentOnly:!0}):e.overwrite(u,f,h,{contentOnly:!0}))}setResolution(e,n,t){var a;this.preliminaryChunkId=t;const r=((a=this.metaProperty)!=null&&a.startsWith(Ai)?_p:lp)[e];r.length>0&&this.scope.addAccessedGlobals(r,n)}},MethodDefinition:hi,NewExpression:class extends O{hasEffects(e){try{for(const n of this.arguments)if(n.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(G,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>0||n!==0}include(e,n){this.deoptimized||this.applyDeoptimizations(),n?super.include(e,n):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,n){this.callee.render(e,n),zo(e,n,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,G,xn),this.context.requestTreeshakingPass()}},ObjectExpression:class extends O{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,n,t){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,n,t){return this.getObjectEntity().getLiteralValueAtPath(e,n,t)}getReturnExpressionWhenCalledAtPath(e,n,t,r){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,t,r)}hasEffectsOnInteractionAtPath(e,n,t){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,n,t)}render(e,n,{renderedSurroundingElement:t}=Bn){super.render(e,n),t!==qn&&t!==Qa||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;let e=$e;const n=[];for(const t of this.properties){if(t instanceof Mt){n.push({key:on,kind:"init",property:t});continue}let r;if(t.computed){const a=t.key.getLiteralValueAtPath(G,xn,this);if(typeof a=="symbol"){n.push({key:on,kind:t.kind,property:t});continue}r=String(a)}else if(r=t.key instanceof cn?t.key.name:String(t.key.value),r==="__proto__"&&t.kind==="init"){e=t.value instanceof Xe&&t.value.value===null?null:t.value;continue}n.push({key:r,kind:t.kind,property:t})}return this.objectEntity=new Pn(n,e)}},ObjectPattern:Ft,PrivateIdentifier:class extends O{},Program:_l,Property:class extends Vo{constructor(){super(...arguments),this.declarationInit=null}declare(e,n){return this.declarationInit=n,this.value.declare(e,X)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const n=this.context.options.treeshake.propertyReadSideEffects;return this.parent.type==="ObjectPattern"&&n==="always"||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,n){this.shorthand||this.key.render(e,n),this.value.render(e,n,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,this.declarationInit!==null&&(this.declarationInit.deoptimizePath([on,on]),this.context.requestTreeshakingPass())}},PropertyDefinition:class extends O{deoptimizeArgumentsOnInteractionAtPath(e,n,t){var r;(r=this.value)==null||r.deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizePath(e){var n;(n=this.value)==null||n.deoptimizePath(e)}getLiteralValueAtPath(e,n,t){return this.value?this.value.getLiteralValueAtPath(e,n,t):dn}getReturnExpressionWhenCalledAtPath(e,n,t,r){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,n,t,r):vn}hasEffects(e){var n;return this.key.hasEffects(e)||this.static&&!!((n=this.value)!=null&&n.hasEffects(e))}hasEffectsOnInteractionAtPath(e,n,t){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,n,t)}applyDeoptimizations(){}},RestElement:ui,ReturnStatement:class extends O{hasEffects(e){var n;return!(e.ignore.returnYield&&!((n=this.argument)!=null&&n.hasEffects(e)))||(e.brokenFlow=!0,!1)}include(e,n){var t;this.included=!0,(t=this.argument)==null||t.include(e,n),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||X)}render(e,n){this.argument&&(this.argument.render(e,n,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends O{deoptimizeArgumentsOnInteractionAtPath(e,n,t){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,n,t){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,n,t)}hasEffects(e){for(const n of this.expressions)if(n.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,n,t){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,n,t)}include(e,n){this.included=!0;const t=this.expressions[this.expressions.length-1];for(const r of this.expressions)(n||r===t&&!(this.parent instanceof qe)||r.shouldBeIncluded(e))&&r.include(e,n)}render(e,n,{renderedParentType:t,isCalleeOfRenderedParent:r,preventASI:a}=Bn){let i=0,s=null;const o=this.expressions[this.expressions.length-1];for(const{node:l,separator:_,start:u,end:f}of jo(this.expressions,e,this.start,this.end))if(l.included)if(i++,s=_,i===1&&a&&jr(e,u,l.start),i===1){const d=t||this.parent.type;l.render(e,n,{isCalleeOfRenderedParent:r&&l===o,renderedParentType:d,renderedSurroundingElement:d})}else l.render(e,n);else ci(l,e,u,f);s&&e.remove(s,this.end)}},SpreadElement:Mt,StaticBlock:class extends O{createScope(e){this.scope=new Ve(e)}hasEffects(e){for(const n of this.body)if(n.hasEffects(e))return!0;return!1}include(e,n){this.included=!0;for(const t of this.body)(n||t.shouldBeIncluded(e))&&t.include(e,n)}render(e,n){if(this.body.length>0){const t=$n(e.original.slice(this.start,this.end),"{")+1;zt(this.body,e,this.start+t,this.end-1,n)}else super.render(e,n)}},Super:class extends O{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,n,t){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}},SwitchCase:cl,SwitchStatement:class extends O{createScope(e){this.parentScope=e,this.scope=new Ve(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:n,hasBreak:t,ignore:r}=e,{breaks:a}=r;r.breaks=!0,e.hasBreak=!1;let i=!0;for(const s of this.cases){if(s.hasEffects(e))return!0;i&&(i=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=n}return this.defaultCase!==null&&(e.brokenFlow=i),r.breaks=a,e.hasBreak=t,!1}include(e,n){this.included=!0,this.discriminant.include(e,n);const{brokenFlow:t,hasBreak:r}=e;e.hasBreak=!1;let a=!0,i=n||this.defaultCase!==null&&this.defaultCase=0;s--){const o=this.cases[s];if(o.included&&(i=!0),!i){const l=$r();l.ignore.breaks=!0,i=o.hasEffects(l)}i?(o.include(e,n),a&&(a=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=t):a=t}i&&this.defaultCase!==null&&(e.brokenFlow=a),e.hasBreak=r}initialise(){for(let e=0;e0&&zt(this.cases,e,this.cases[0].start,this.end-1,n)}},TaggedTemplateExpression:class extends Uo{bind(){if(super.bind(),this.tag.type===oo){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.context.log(q,Zs(e),this.start)}}hasEffects(e){try{for(const n of this.quasi.expressions)if(n.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(G,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,n){this.deoptimized||this.applyDeoptimizations(),n?super.include(e,n):(this.included=!0,this.tag.include(e,n),this.quasi.include(e,n)),this.tag.includeCallArguments(e,this.args);const[t]=this.getReturnExpression();t.included||t.include(e,!1)}initialise(){this.args=[X,...this.quasi.expressions],this.interaction={args:[this.tag instanceof we&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,n){this.tag.render(e,n,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,G,xn),this.context.requestTreeshakingPass()}getReturnExpression(e=xn){return this.returnExpression===null?(this.returnExpression=vn,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(G,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends O{bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:ul,ThisExpression:class extends O{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,n,t){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,n,t)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,n,t){return e.length===0?n.type!==0:this.variable.hasEffectsOnInteractionAtPath(e,n,t)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof dl?this.context.moduleContext:null,this.alias==="undefined"&&this.context.log(q,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:Cn("troubleshooting/#error-this-is-undefined")},this.start)}render(e){this.alias!==null&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends O{hasEffects(){return!0}include(e,n){this.included=!0,this.argument.include(e,n),e.brokenFlow=!0}render(e,n){this.argument.render(e,n,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends O{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){var n;return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!((n=this.finalizer)!=null&&n.hasEffects(e))}include(e,n){var i,s;const t=(i=this.context.options.treeshake)==null?void 0:i.tryCatchDeoptimization,{brokenFlow:r,includedLabels:a}=e;if(this.directlyIncluded&&t){if(this.includedLabelsAfterBlock)for(const o of this.includedLabelsAfterBlock)a.add(o)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,t?uo:n),a.size>0&&(this.includedLabelsAfterBlock=[...a]),e.brokenFlow=r;this.handler!==null&&(this.handler.include(e,n),e.brokenFlow=r),(s=this.finalizer)==null||s.include(e,n)}},UnaryExpression:class extends O{getLiteralValueAtPath(e,n,t){if(e.length>0)return dn;const r=this.argument.getLiteralValueAtPath(G,n,t);return typeof r=="symbol"?dn:up[this.operator](r)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(this.operator==="typeof"&&this.argument instanceof cn)&&(this.argument.hasEffects(e)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath(G,Oa,e))}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=!0,this.operator==="delete"&&(this.argument.deoptimizePath(G),this.context.requestTreeshakingPass())}},UnknownNode:class extends O{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends O{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>1||n!==0}include(e,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,n,!0)}initialise(){this.argument.setAssignedValue(X)}render(e,n){const{exportNamesByVariable:t,format:r,snippets:{_:a}}=n;if(this.argument.render(e,n),r==="system"){const i=this.argument.variable,s=t.get(i);if(s)if(this.prefix)s.length===1?mi(i,this.start,this.end,e,n):To(i,this.start,this.end,this.parent.type!==qn,e,n);else{const o=this.operator[0];(function(l,_,u,f,d,h,b){const{_:p}=h.snippets;d.prependRight(_,`${Ge([l],h,b)},${p}`),f&&(d.prependRight(_,"("),d.appendLeft(u,")"))})(i,this.start,this.end,this.parent.type!==qn,e,n,`${a}${o}${a}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(G),this.argument instanceof cn&&(this.scope.findVariable(this.argument.name).isReassigned=!0),this.context.requestTreeshakingPass()}},VariableDeclaration:ml,VariableDeclarator:al,WhileStatement:class extends O{hasEffects(e){return!!this.test.hasEffects(e)||zr(e,this.body)}include(e,n){this.included=!0,this.test.include(e,n),Pt(e,this.body,n)}},YieldExpression:class extends O{hasEffects(e){var n;return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!((n=this.argument)!=null&&n.hasEffects(e)))}render(e,n){this.argument&&(this.argument.render(e,n,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},ct="_missingExportShim";class fp extends De{constructor(n){super(ct),this.module=n}include(){super.include(),this.module.needsExportShim=!0}}class Xt extends De{constructor(n){super(n.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=n,this.module=n.module}addReference(n){this.references.push(n),this.name=n.name}deoptimizeArgumentsOnInteractionAtPath(n,t,r){var a;if(t.length>1||t.length===1&&n.type===2){const i=t[0];typeof i=="string"?(a=this.getMemberVariables()[i])==null||a.deoptimizeArgumentsOnInteractionAtPath(n,t.slice(1),r):xe(n)}}deoptimizePath(n){var t;if(n.length>1){const r=n[0];typeof r=="string"&&((t=this.getMemberVariables()[r])==null||t.deoptimizePath(n.slice(1)))}}getLiteralValueAtPath(n){return n[0]===ja?"Module":dn}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const n=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const r of t)if(r[0]!=="*"&&r!==this.module.info.syntheticNamedExports){const a=this.context.traceExport(r);a&&(n[r]=a)}return this.memberVariables=n}hasEffectsOnInteractionAtPath(n,t,r){const{type:a}=t;if(n.length===0)return!0;if(n.length===1&&a!==2)return a===1;const i=n[0];if(typeof i!="string")return!0;const s=this.getMemberVariables()[i];return!s||s.hasEffectsOnInteractionAtPath(n.slice(1),t,r)}include(){this.included=!0,this.context.includeAllExports()}prepare(n){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Rr],n)}renderBlock(n){const{exportNamesByVariable:t,format:r,freeze:a,indent:i,namespaceToStringTag:s,snippets:{_:o,cnst:l,getObject:_,getPropertyAccess:u,n:f,s:d}}=n,h=this.getMemberVariables(),b=Object.entries(h).filter(([v,y])=>y.included).map(([v,y])=>this.referencedEarly||y.isReassigned||y===this?[null,`get ${v}${o}()${o}{${o}return ${y.getName(u)}${d}${o}}`]:[v,y.getName(u)]);b.unshift([null,`__proto__:${o}null`]);let p=_(b,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const v=this.mergedNamespaces.map(y=>y.getName(u));p=`/*#__PURE__*/${Rr}(${p},${o}[${v.join(`,${o}`)}])`}else s&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${qt(_)})`),a&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${l} ${this.getName(u)}${o}=${o}${p};`,r==="system"&&t.has(this)&&(p+=`${f}${Ge([this],n)};`),p}renderFirst(){return this.referencedEarly}setMergedNamespaces(n){this.mergedNamespaces=n;const t=this.context.getModuleExecIndex();for(const r of this.references)if(r.context.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}Xt.prototype.isNamespace=!0;class Tn extends De{constructor(n,t,r){super(t),this.baseVariable=null,this.context=n,this.module=n.module,this.syntheticNamespace=r}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let n=this.syntheticNamespace;for(;n instanceof ie||n instanceof Tn;){if(n instanceof ie){const t=n.getOriginalVariable();if(t===n)break;n=t}n instanceof Tn&&(n=n.syntheticNamespace)}return this.baseVariable=n}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(n){return`${this.syntheticNamespace.getName(n)}${n(this.name)}`}include(){this.included=!0,this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(n,t){super.setRenderNames(n,t)}}var Ae;function Mi(e){return e.id}(function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"})(Ae||(Ae={}));const ji=e=>{const n=e.key;return n&&(n.name||n.value)};function Xr(e,n){const t=Object.keys(e);return t.length!==Object.keys(n).length||t.some(r=>e[r]!==n[r])}var hl="performance"in(typeof globalThis>"u"?typeof window>"u"?{}:window:globalThis)?performance:{now:()=>0},vl={memoryUsage:()=>({heapUsed:0})};let Wt=new Map;function gl(e,n){switch(n){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(n-4)}- ${e}`}}function dp(e,n=3){e=gl(e,n);const t=vl.memoryUsage().heapUsed,r=hl.now(),a=Wt.get(e);a===void 0?Wt.set(e,{memory:0,startMemory:t,startTime:r,time:0,totalMemory:0}):(a.startMemory=t,a.startTime=r)}function mp(e,n=3){e=gl(e,n);const t=Wt.get(e);if(t!==void 0){const r=vl.memoryUsage().heapUsed;t.memory+=r-t.startMemory,t.time+=hl.now()-t.startTime,t.totalMemory=Math.max(t.totalMemory,r)}}function pp(){const e={};for(const[n,{memory:t,time:r,totalMemory:a}]of Wt)e[n]=[r,t,a];return e}let kn=re,yn=re;const hp=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function vp(e,n){for(const t of hp)if(t in e){let r=`plugin ${n}`;e.name&&(r+=` (${e.name})`),r+=` - ${t}`;const a=function(...s){kn(r,4);const o=i.apply(this,s);return yn(r,4),o};let i;typeof e[t].handler=="function"?(i=e[t].handler,e[t].handler=a):(i=e[t],e[t]=a)}return e}function Ht(e){e.isExecuted=!0;const n=[e],t=new Set;for(const r of n)for(const a of[...r.dependencies,...r.implicitlyLoadedBefore])a instanceof fn||a.isExecuted||!a.info.moduleSideEffects&&!r.implicitlyLoadedBefore.has(a)||t.has(a.id)||(a.isExecuted=!0,t.add(a.id),n.push(a))}const bl={identifier:null,localName:ct};function Ti(e,n,t,r,a=new Map){const i=a.get(n);if(i){if(i.has(e))return r?[null]:M((s=n,o=e.id,{code:Qd,exporter:o,message:`"${s}" cannot be exported from "${W(o)}" as it is a reexport that references itself.`}));i.add(e)}else a.set(n,new Set([e]));var s,o;return e.getVariableForExportName(n,{importerForSideEffects:t,isExportAllSearch:r,searchedNamesAndModules:a})}function yl(e,n){const t=zn(n.sideEffectDependenciesByVariable,e,Te);let r=e;const a=new Set([r]);for(;;){const i=r.module;if(r=r instanceof ie?r.getDirectOriginalVariable():r instanceof Tn?r.syntheticNamespace:null,!r||a.has(r))break;a.add(r),t.add(i);const s=i.sideEffectDependenciesByVariable.get(r);if(s)for(const o of s)t.add(o)}return t}class hn{constructor(n,t,r,a,i,s,o,l){this.graph=n,this.id=t,this.options=r,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAssertions=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new fp(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=r.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const _=this,{dynamicImports:u,dynamicImporters:f,exportAllSources:d,exports:h,implicitlyLoadedAfter:b,implicitlyLoadedBefore:p,importers:v,reexportDescriptions:y,sourcesWithAssertions:$}=this;this.info={assertions:l,ast:null,code:null,get dynamicallyImportedIdResolutions(){return u.map(({argument:g})=>typeof g=="string"&&_.resolvedIds[g]).filter(Boolean)},get dynamicallyImportedIds(){return u.map(({id:g})=>g).filter(g=>g!=null)},get dynamicImporters(){return f.sort()},get exportedBindings(){const g={".":[...h.keys()]};for(const[x,{source:k}]of y)(g[k]??(g[k]=[])).push(x);for(const x of d)(g[x]??(g[x]=[])).push("*");return g},get exports(){return[...h.keys(),...y.keys(),...[...d].map(()=>"*")]},get hasDefaultExport(){return _.ast?_.exports.has("default")||y.has("default"):null},get hasModuleSideEffects(){return Fe("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Rs,!0,r),this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(b,Mi).sort()},get implicitlyLoadedBefore(){return Array.from(p,Mi).sort()},get importedIdResolutions(){return Array.from($.keys(),g=>_.resolvedIds[g]).filter(Boolean)},get importedIds(){return Array.from($.keys(),g=>{var x;return(x=_.resolvedIds[g])==null?void 0:x.id}).filter(Boolean)},get importers(){return v.sort()},isEntry:a,isExternal:!1,get isIncluded(){return n.phase!==Ae.GENERATE?null:_.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:s},Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}basename(){const n=fe(this.id),t=ye(this.id);return za(t?n.slice(0,-t.length):n)}bindReferences(){this.ast.bind()}error(n,t){return this.addLocationToLogProps(n,t),M(n)}estimateSize(){let n=0;for(const t of this.ast.body)t.included&&(n+=t.end-t.start);return n}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const n of this.exportAllModules)if(n instanceof fn)this.allExportNames.add(`*${n.id}`);else for(const t of n.getAllExportNames())t!=="default"&&this.allExportNames.add(t);return typeof this.info.syntheticNamedExports=="string"&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const n=new Set,t=new Set,r=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const a of[...this.getReexports(),...this.getExports()]){const[i]=this.getVariableForExportName(a);i&&r.add(i)}for(let a of r){const i=this.sideEffectDependenciesByVariable.get(a);if(i)for(const s of i)t.add(s);a instanceof Tn?a=a.getBaseVariable():a instanceof ie&&(a=a.getOriginalVariable()),n.add(a.module)}if(this.options.treeshake&&this.info.moduleSideEffects!=="no-treeshake")this.addRelevantSideEffectDependencies(this.relevantDependencies,n,t);else for(const a of this.dependencies)this.relevantDependencies.add(a);for(const a of n)this.relevantDependencies.add(a);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const n=new Map;for(const t of this.getAllExportNames()){let[r]=this.getVariableForExportName(t);if(r instanceof ie&&(r=r.getOriginalVariable()),!r||!(r.included||r instanceof gr))continue;const a=n.get(r);a?a.push(t):n.set(r,[t])}return this.exportNamesByVariable=n}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const n=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof fn)n.add(`*${t.id}`);else for(const r of[...t.getReexports(),...t.getExports()])r!=="default"&&n.add(r);return this.transitiveReexports=[...n]}getRenderedExports(){const n=[],t=[];for(const r of this.exports.keys()){const[a]=this.getVariableForExportName(r);(a&&a.included?n:t).push(r)}return{removedExports:t,renderedExports:n}}getSyntheticNamespace(){return this.syntheticNamespace===null&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports=="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:M((n=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:n,message:`Module "${W(n)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${typeof t=="string"&&t!=="default"?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var n,t}getVariableForExportName(n,{importerForSideEffects:t,isExportAllSearch:r,onlyExplicit:a,searchedNamesAndModules:i}=Fn){if(n[0]==="*")return n.length===1?[this.namespace]:this.graph.modulesById.get(n.slice(1)).getVariableForExportName("*");const s=this.reexportDescriptions.get(n);if(s){const[l]=Ti(s.module,s.localName,t,!1,i);return l?(t&&(xl(l,t,this),this.info.moduleSideEffects&&zn(t.sideEffectDependenciesByVariable,l,Te).add(this)),[l]):this.error(kr(s.localName,this.id,s.module.id),s.start)}const o=this.exports.get(n);if(o){if(o===bl)return[this.exportShimVariable];const l=o.localName,_=this.traceVariable(l,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(xl(_,t,this),zn(t.sideEffectDependenciesByVariable,_,Te).add(this)),[_]}if(a)return[null];if(n!=="default"){const l=this.namespaceReexportsByName.get(n)??this.getVariableFromNamespaceReexports(n,t,i);if(this.namespaceReexportsByName.set(n,l),l[0])return l}return this.info.syntheticNamedExports?[zn(this.syntheticExports,n,()=>new Tn(this.astContext,n,this.getSyntheticNamespace()))]:!r&&this.options.shimMissingExports?(this.shimMissingExport(n),[this.exportShimVariable]):[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.hasCachedEffects()}include(){const n=Wa();this.ast.shouldBeIncluded(n)&&this.ast.include(n,!1)}includeAllExports(n){this.isExecuted||(Ht(this),this.graph.needsTreeshakingPass=!0);for(const t of this.exports.keys())if(n||t!==this.info.syntheticNamedExports){const r=this.getVariableForExportName(t)[0];r.deoptimizePath(nn),r.included||this.includeVariable(r)}for(const t of this.getReexports()){const[r]=this.getVariableForExportName(t);r&&(r.deoptimizePath(nn),r.included||this.includeVariable(r),r instanceof gr&&(r.module.reexported=!0))}n&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(Wa(),!0),this.includeAllExports(!1)}includeExportsByNames(n){this.isExecuted||(Ht(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const r of n){const a=this.getVariableForExportName(r)[0];a&&(a.deoptimizePath(nn),a.included||this.includeVariable(a)),this.exports.has(r)||this.reexportDescriptions.has(r)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const n=[];for(const t of this.exportAllSources){const r=this.graph.modulesById.get(this.resolvedIds[t].id);r instanceof fn?n.push(r):this.exportAllModules.push(r)}this.exportAllModules.push(...n)}log(n,t,r){this.addLocationToLogProps(t,r),this.options.onLog(n,t)}render(n){const t=this.magicString.clone();this.ast.render(t,n),t.trim();const{usesTopLevelAwait:r}=this.astContext;return r&&n.format!=="es"&&n.format!=="system"?M((a=this.id,i=n.format,{code:"INVALID_TLA_FORMAT",id:a,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:r};var a,i}setSource({ast:n,code:t,customTransformCache:r,originalCode:a,originalSourcemap:i,resolvedIds:s,sourcemapChain:o,transformDependencies:l,transformFiles:_,...u}){kn("generate ast",3),this.info.code=t,this.originalCode=a,this.originalSourcemap=i,this.sourcemapChain=o,_&&(this.transformFiles=_),this.transformDependencies=l,this.customTransformCache=r,this.updateOptions(u);const f=n??this.tryParse();yn("generate ast",3),kn("analyze ast",3),this.resolvedIds=s??Object.create(null);const d=this.id;this.magicString=new Me(t,{filename:this.excludeFromSourcemap?null:d,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:d,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:h=>pl[h]||pl.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:h=>this.getVariableForExportName(h)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new dl(this.graph.scope,this.astContext),this.namespace=new Xt(this.astContext),this.ast=new _l(f,{context:this.astContext,type:"Module"},this.scope),n||this.options.cache!==!1?this.info.ast=f:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(d))return this.graph.astLru.get(d);{const h=this.tryParse();return this.graph.astLru.set(d,h),h}}}),yn("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Mi),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(n,{importerForSideEffects:t,isExportAllSearch:r,searchedNamesAndModules:a}=Fn){const i=this.scope.variables.get(n);if(i)return i;const s=this.importDescriptions.get(n);if(s){const o=s.module;if(o instanceof hn&&s.name==="*")return o.namespace;const[l]=Ti(o,s.name,t||this,r,a);return l||this.error(kr(s.name,this.id,o.id),s.start)}return null}updateOptions({meta:n,moduleSideEffects:t,syntheticNamedExports:r}){t!=null&&(this.info.moduleSideEffects=t),r!=null&&(this.info.syntheticNamedExports=r),n!=null&&Object.assign(this.info.meta,n)}addDynamicImport(n){let t=n.source;t instanceof ul?t.quasis.length===1&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Xe&&typeof t.value=="string"&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:n,resolution:null})}addExport(n){if(n instanceof Fr)this.exports.set("default",{identifier:n.variable.getAssignedVariableName(),localName:"default"});else if(n instanceof gi){const t=n.source.value;if(this.addSource(t,n),n.exported){const r=n.exported.name;this.reexportDescriptions.set(r,{localName:"*",module:null,source:t,start:n.start})}else this.exportAllSources.add(t)}else if(n.source instanceof Xe){const t=n.source.value;this.addSource(t,n);for(const{exported:r,local:a,start:i}of n.specifiers){const s=r instanceof Xe?r.value:r.name;this.reexportDescriptions.set(s,{localName:a instanceof Xe?a.value:a.name,module:null,source:t,start:i})}}else if(n.declaration){const t=n.declaration;if(t instanceof ml)for(const r of t.declarations)for(const a of Em(r.id))this.exports.set(a,{identifier:null,localName:a});else{const r=t.id.name;this.exports.set(r,{identifier:null,localName:r})}}else for(const{local:t,exported:r}of n.specifiers){const a=t.name,i=r instanceof cn?r.name:r.value;this.exports.set(i,{identifier:null,localName:a})}}addImport(n){const t=n.source.value;this.addSource(t,n);for(const r of n.specifiers){const a=r instanceof Jo?"default":r instanceof ol?"*":r.imported instanceof cn?r.imported.name:r.imported.value;this.importDescriptions.set(r.local.name,{module:null,name:a,source:t,start:r.start})}}addImportMeta(n){this.importMetas.push(n)}addLocationToLogProps(n,t){n.id=this.id,n.pos=t;let r=this.info.code;const a=Fa(r,t,{offsetLine:1});if(a){let{column:i,line:s}=a;try{({column:i,line:s}=function(o,l){const _=o.filter(u=>!!u.mappings);n:for(;_.length>0;){const u=_.pop().mappings[l.line-1];if(u){const f=u.filter(h=>h.length>1),d=f[f.length-1];for(const h of f)if(h[0]>=l.column||h===d){l={column:h[3],line:h[2]+1};continue n}}throw new Error("Can't resolve original location of error.")}return l}(this.sourcemapChain,{column:i,line:s})),r=this.originalCode}catch(o){this.options.onLog(q,function(l,_,u,f,d){return{cause:l,code:"SOURCEMAP_ERROR",id:_,loc:{column:u,file:_,line:f},message:`Error when using sourcemap for reporting an error: ${l.message}`,pos:d}}(o,this.id,i,s,t))}yr(n,{column:i,line:s},r,this.id)}}addModulesToImportDescriptions(n){for(const t of n.values()){const{id:r}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(r)}}addRelevantSideEffectDependencies(n,t,r){const a=new Set,i=s=>{for(const o of s)a.has(o)||(a.add(o),t.has(o)?n.add(o):(o.info.moduleSideEffects||r.has(o))&&(o instanceof fn||o.hasEffects()?n.add(o):i(o.dependencies)))};i(this.dependencies),i(r)}addSource(n,t){const r=(a=t.assertions,a!=null&&a.length?Object.fromEntries(a.map(s=>[ji(s),s.value.value])):Fn);var a;const i=this.sourcesWithAssertions.get(n);i?Xr(i,r)&&this.log(q,xr(i,r,n,this.id),t.start):this.sourcesWithAssertions.set(n,r)}getVariableFromNamespaceReexports(n,t,r){let a=null;const i=new Map,s=new Set;for(const u of this.exportAllModules){if(u.info.syntheticNamedExports===n)continue;const[f,d]=Ti(u,n,t,!0,gp(r));u instanceof fn||d?s.add(f):f instanceof Tn?a||(a=f):f&&i.set(f,u)}if(i.size>0){const u=[...i],f=u[0][0];return u.length===1?[f]:(this.options.onLog(q,(o=n,l=this.id,_=u.map(([,d])=>d.id),{binding:o,code:"NAMESPACE_CONFLICT",ids:_,message:`Conflicting namespaces: "${W(l)}" re-exports "${o}" from one of the modules ${de(_.map(d=>W(d)))} (will be ignored).`,reexporter:l})),[null])}var o,l,_;if(s.size>0){const u=[...s],f=u[0];return u.length>1&&this.options.onLog(q,function(d,h,b,p){return{binding:d,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:p,message:`Ambiguous external namespace resolution: "${W(h)}" re-exports "${d}" from one of the external modules ${de(p.map(v=>W(v)))}, guessing "${W(b)}".`,reexporter:h}}(n,this.id,f.module.id,u.map(d=>d.module.id))),[f,!0]}return a?[a]:[null]}includeAndGetAdditionalMergedNamespaces(){const n=new Set,t=new Set;for(const r of[this,...this.exportAllModules])if(r instanceof fn){const[a]=r.getVariableForExportName("*");a.include(),this.includedImports.add(a),n.add(a)}else if(r.info.syntheticNamedExports){const a=r.getSyntheticNamespace();a.include(),this.includedImports.add(a),t.add(a)}return[...t,...n]}includeDynamicImport(n){const t=this.dynamicImports.find(r=>r.node===n).resolution;if(t instanceof hn){t.includedDynamicImporters.push(this);const r=this.options.treeshake?n.getDeterministicImportedNames():void 0;r?t.includeExportsByNames(r):t.includeAllExports(!0)}}includeVariable(n){const t=n.module;if(n.included)t instanceof hn&&t!==this&&yl(n,this);else if(n.include(),this.graph.needsTreeshakingPass=!0,t instanceof hn&&(t.isExecuted||Ht(t),t!==this)){const r=yl(n,this);for(const a of r)a.isExecuted||Ht(a)}}includeVariableInModule(n){this.includeVariable(n);const t=n.module;t&&t!==this&&this.includedImports.add(n)}shimMissingExport(n){var t,r;this.options.onLog(q,(t=this.id,{binding:r=n,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${r}" has been shimmed in module "${W(t)}".`})),this.exports.set(n,bl)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(n){return this.error(function(t,r){let a=t.message.replace(/ \(\d+:\d+\)$/,"");return r.endsWith(".json")?a+=" (Note that you need @rollup/plugin-json to import JSON files)":r.endsWith(".js")||(a+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:t,code:"PARSE_ERROR",id:r,message:a}}(n,this.id),n.pos)}}}function xl(e,n,t){if(e.module instanceof hn&&e.module!==t){const r=e.module.cycles;if(r.size>0){const a=t.cycles;for(const i of a)if(r.has(i)){n.alternativeReexportModules.set(e,t);break}}}}const gp=e=>e&&new Map(Array.from(e,([n,t])=>[n,new Set(t)]));function kl(e){return e.endsWith(".js")?e.slice(0,-3):e}function $l(e,n){return e.autoId?`${e.basePath?e.basePath+"/":""}${kl(n)}`:e.id??""}function Wr(e,n,t,r,a,i,s,o="return "){const{_:l,getDirectReturnFunction:_,getFunctionIntro:u,getPropertyAccess:f,n:d,s:h}=a;if(!t)return`${d}${d}${o}${function(p,v,y,$,g){if(p.length>0)return p[0].local;for(const{defaultVariableName:x,importPath:k,isChunk:A,name:S,namedExportsMode:I,namespaceVariableName:E,reexports:B}of v)if(B)return El(S,B[0].imported,I,A,x,E,y,k,$,g)}(e,n,r,s,f)};`;let b="";for(const{defaultVariableName:p,importPath:v,isChunk:y,name:$,namedExportsMode:g,namespaceVariableName:x,reexports:k}of n)if(k&&t){for(const A of k)if(A.reexported!=="*"){const S=El($,A.imported,g,y,p,x,r,v,s,f);if(b&&(b+=d),A.imported!=="*"&&A.needsLiveBinding){const[I,E]=_([],{functionReturn:!0,lineBreakIndent:null,name:null});b+=`Object.defineProperty(exports,${l}'${A.reexported}',${l}{${d}${i}enumerable:${l}true,${d}${i}get:${l}${I}${S}${E}${d}});`}else b+=`exports${f(A.reexported)}${l}=${l}${S};`}}for(const{exported:p,local:v}of e){const y=`exports${f(p)}`;y!==v&&(b&&(b+=d),b+=`${y}${l}=${l}${v};`)}for(const{name:p,reexports:v}of n)if(v&&t){for(const y of v)if(y.reexported==="*"){b&&(b+=d);const $=`{${d}${i}if${l}(k${l}!==${l}'default'${l}&&${l}!exports.hasOwnProperty(k))${l}${bp(p,y.needsLiveBinding,i,a)}${h}${d}}`;b+=`Object.keys(${p}).forEach(${u(["k"],{isAsync:!1,name:null})}${$});`}}return b?`${d}${d}${b}`:""}function El(e,n,t,r,a,i,s,o,l,_){if(n==="default"){if(!r){const u=s(o),f=Vr[u]?a:e;return qr(u,l)?`${f}${_("default")}`:f}return t?`${e}${_("default")}`:e}return n==="*"?(r?!t:Vt[s(o)])?i:e:`${e}${_(n)}`}function Cl(e){return e([["value","true"]],{lineBreakIndent:null})}function Hr(e,n,t,{_:r,getObject:a}){if(e){if(n)return t?`Object.defineProperties(exports,${r}${a([["__esModule",Cl(a)],[null,`[Symbol.toStringTag]:${r}${qt(a)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${r}'__esModule',${r}${Cl(a)});`;if(t)return`Object.defineProperty(exports,${r}Symbol.toStringTag,${r}${qt(a)});`}return""}const bp=(e,n,t,{_:r,getDirectReturnFunction:a,n:i})=>{if(n){const[s,o]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${r}k,${r}{${i}${t}${t}enumerable:${r}true,${i}${t}${t}get:${r}${s}${e}[k]${o}${i}${t}})`}return`exports[k]${r}=${r}${e}[k]`};function Kr(e,n,t,r,a,i,s,o){const{_:l,cnst:_,n:u}=o,f=new Set,d=[],h=(b,p,v)=>{f.add(p),d.push(`${_} ${b}${l}=${l}/*#__PURE__*/${p}(${v});`)};for(const{defaultVariableName:b,imports:p,importPath:v,isChunk:y,name:$,namedExportsMode:g,namespaceVariableName:x,reexports:k}of e)if(y){for(const{imported:A,reexported:S}of[...p||[],...k||[]])if(A==="*"&&S!=="*"){g||h(x,Rt,$);break}}else{const A=n(v);let S=!1,I=!1;for(const{imported:E,reexported:B}of[...p||[],...k||[]]){let R,D;E==="default"?S||(S=!0,b!==x&&(D=b,R=Vr[A])):E!=="*"||B==="*"||I||(I=!0,R=Vt[A],D=x),R&&h(D,R,$)}}return`${ki(f,i,s,o,t,r,a)}${d.length>0?`${d.join(u)}${u}${u}`:""}`}function wl(e,n){return e[0]!=="."?e:n?(t=e).endsWith(".js")?t:t+".js":kl(e);var t}const yp=new Set([...$s(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function Di(e,n){const t=n.map(({importPath:r})=>r).filter(r=>yp.has(r)||r.startsWith("node:"));t.length!==0&&e(q,function(r){return{code:cm,ids:r,message:`Creating a browser bundle that depends on Node.js built-in modules (${de(r)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(t))}const Jr=(e,n)=>e.split(".").map(n).join("");function Oi(e,n,t,r,{_:a,getPropertyAccess:i}){const s=e.split(".");s[0]=(typeof t=="function"?t(s[0]):t[s[0]])||s[0];const o=s.pop();let l=n,_=[...s.map(u=>(l+=i(u),`${l}${a}=${a}${l}${a}||${a}{}`)),`${l}${i(o)}`].join(`,${a}`)+`${a}=${a}${r}`;return s.length>0&&(_=`(${_})`),_}function Al(e){let n=e.length;for(;n--;){const{imports:t,reexports:r}=e[n];if(t||r)return e.slice(0,n+1)}return[]}const xp=({dependencies:e,exports:n})=>{const t=new Set(n.map(r=>r.exported));t.add("default");for(const{reexports:r}of e)if(r)for(const a of r)a.reexported!=="*"&&t.add(a.reexported);return t},kp=(e,n,{_:t,cnst:r,getObject:a,n:i})=>e?`${i}${n}${r} _starExcludes${t}=${t}${a([...e].map(s=>[s,"1"]),{lineBreakIndent:{base:n,t:n}})};`:"",$p=(e,n,{_:t,n:r})=>e.length>0?`${r}${n}var ${e.join(`,${t}`)};`:"",Ep=(e,n,t)=>zi(e.filter(r=>r.hoisted).map(r=>({name:r.exported,value:r.local})),n,t);function zi(e,n,{_:t,n:r}){return e.length===0?"":e.length===1?`exports('${e[0].name}',${t}${e[0].value});${r}${r}`:`exports({${r}`+e.map(({name:a,value:i})=>`${n}${a}:${t}${i}`).join(`,${r}`)+`${r}});${r}${r}`}const Cp=(e,n,t)=>zi(e.filter(r=>r.expression).map(r=>({name:r.exported,value:r.local})),n,t),wp=(e,n,t)=>zi(e.filter(r=>r.local===ct).map(r=>({name:r.exported,value:ct})),n,t);function Fi(e,n,t){return e?`${n}${Jr(e,t)}`:"null"}var Ap={amd:function(e,{accessedGlobals:n,dependencies:t,exports:r,hasDefaultExport:a,hasExports:i,id:s,indent:o,intro:l,isEntryFacade:_,isModuleFacade:u,namedExportsMode:f,log:d,outro:h,snippets:b},{amd:p,esModule:v,externalLiveBindings:y,freeze:$,interop:g,namespaceToStringTag:x,strict:k}){Di(d,t);const A=t.map(C=>`'${wl(C.importPath,p.forceJsExtensionForImports)}'`),S=t.map(C=>C.name),{n:I,getNonArrowFunctionIntro:E,_:B}=b;f&&i&&(S.unshift("exports"),A.unshift("'exports'")),n.has("require")&&(S.unshift("require"),A.unshift("'require'")),n.has("module")&&(S.unshift("module"),A.unshift("'module'"));const R=$l(p,s),D=(R?`'${R}',${B}`:"")+(A.length>0?`[${A.join(`,${B}`)}],${B}`:""),P=k?`${B}'use strict';`:"";e.prepend(`${l}${Kr(t,g,y,$,x,n,o,b)}`);const T=Wr(r,t,f,g,b,o,y);let z=Hr(f&&i,_&&(v===!0||v==="if-default-prop"&&a),u&&x,b);z&&(z=I+I+z),e.append(`${T}${z}${h}`).indent(o).prepend(`${p.define}(${D}(${E(S,{isAsync:!1,name:null})}{${P}${I}${I}`).append(`${I}${I}}));`)},cjs:function(e,{accessedGlobals:n,dependencies:t,exports:r,hasDefaultExport:a,hasExports:i,indent:s,intro:o,isEntryFacade:l,isModuleFacade:_,namedExportsMode:u,outro:f,snippets:d},{compact:h,esModule:b,externalLiveBindings:p,freeze:v,interop:y,namespaceToStringTag:$,strict:g}){const{_:x,n:k}=d,A=g?`'use strict';${k}${k}`:"";let S=Hr(u&&i,l&&(b===!0||b==="if-default-prop"&&a),_&&$,d);S&&(S+=k+k);const I=function(R,{_:D,cnst:P,n:T},z){let C="",L=!1;for(const{importPath:F,name:J,reexports:rn,imports:an}of R)rn||an?(C+=z&&L?",":`${C?`;${T}`:""}${P} `,L=!0,C+=`${J}${D}=${D}require('${F}')`):(C&&(C+=z&&!L?",":`;${T}`),L=!1,C+=`require('${F}')`);return C?`${C};${T}${T}`:""}(t,d,h),E=Kr(t,y,p,v,$,n,s,d);e.prepend(`${A}${o}${S}${I}${E}`);const B=Wr(r,t,u,y,d,s,p,`module.exports${x}=${x}`);e.append(`${B}${f}`)},es:function(e,{accessedGlobals:n,indent:t,intro:r,outro:a,dependencies:i,exports:s,snippets:o},{externalLiveBindings:l,freeze:_,namespaceToStringTag:u}){const{n:f}=o,d=function(b,{_:p}){const v=[];for(const{importPath:y,reexports:$,imports:g,name:x,assertions:k}of b){const A=`'${y}'${k?`${p}assert${p}${k}`:""};`;if($||g){if(g){let S=null,I=null;const E=[];for(const B of g)B.imported==="default"?S=B:B.imported==="*"?I=B:E.push(B);I&&v.push(`import${p}*${p}as ${I.local} from${p}${A}`),S&&E.length===0?v.push(`import ${S.local} from${p}${A}`):E.length>0&&v.push(`import ${S?`${S.local},${p}`:""}{${p}${E.map(B=>B.imported===B.local?B.imported:`${B.imported} as ${B.local}`).join(`,${p}`)}${p}}${p}from${p}${A}`)}if($){let S=null;const I=[],E=[];for(const B of $)B.reexported==="*"?S=B:B.imported==="*"?I.push(B):E.push(B);if(S&&v.push(`export${p}*${p}from${p}${A}`),I.length>0){g&&g.some(B=>B.imported==="*"&&B.local===x)||v.push(`import${p}*${p}as ${x} from${p}${A}`);for(const B of I)v.push(`export${p}{${p}${x===B.reexported?x:`${x} as ${B.reexported}`} };`)}E.length>0&&v.push(`export${p}{${p}${E.map(B=>B.imported===B.reexported?B.imported:`${B.imported} as ${B.reexported}`).join(`,${p}`)}${p}}${p}from${p}${A}`)}}else v.push(`import${p}${A}`)}return v}(i,o);d.length>0&&(r+=d.join(f)+f+f),(r+=ki(null,n,t,o,l,_,u))&&e.prepend(r);const h=function(b,{_:p,cnst:v}){const y=[],$=[];for(const g of b)g.expression&&y.push(`${v} ${g.local}${p}=${p}${g.expression};`),$.push(g.exported===g.local?g.local:`${g.local} as ${g.exported}`);return $.length>0&&y.push(`export${p}{${p}${$.join(`,${p}`)}${p}};`),y}(s,o);h.length>0&&e.append(f+f+h.join(f).trim()),a&&e.append(a),e.trim()},iife:function(e,{accessedGlobals:n,dependencies:t,exports:r,hasDefaultExport:a,hasExports:i,indent:s,intro:o,namedExportsMode:l,log:_,outro:u,snippets:f},{compact:d,esModule:h,extend:b,freeze:p,externalLiveBindings:v,globals:y,interop:$,name:g,namespaceToStringTag:x,strict:k}){const{_:A,getNonArrowFunctionIntro:S,getPropertyAccess:I,n:E}=f,B=g&&g.includes("."),R=!b&&!B;if(g&&R&&(Os(D=g)||Ds.test(D)))return M(function(ln){return{code:rm,message:`Given name "${ln}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Cn(Vd)}}(g));var D;Di(_,t);const P=Al(t),T=P.map(ln=>ln.globalName||"null"),z=P.map(ln=>ln.name);i&&!g&&_(q,{code:Xs,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Cn(Us)}),l&&i&&(b?(T.unshift(`this${Jr(g,I)}${A}=${A}this${Jr(g,I)}${A}||${A}{}`),z.unshift("exports")):(T.unshift("{}"),z.unshift("exports")));const C=k?`${s}'use strict';${E}`:"",L=Kr(t,$,v,p,x,n,s,f);e.prepend(`${o}${L}`);let F=`(${S(z,{isAsync:!1,name:null})}{${E}${C}${E}`;i&&(!g||b&&l||(F=(R?`var ${g}`:`this${Jr(g,I)}`)+`${A}=${A}${F}`),B&&(F=function(ln,_n,wn,{_:sn,getPropertyAccess:In,s:Ye},Ln){const An=ln.split(".");An[0]=(typeof wn=="function"?wn(An[0]):wn[An[0]])||An[0],An.pop();let ht=_n;return An.map(fs=>(ht+=In(fs),`${ht}${sn}=${sn}${ht}${sn}||${sn}{}${Ye}`)).join(Ln?",":`
+`)+(Ln&&An.length>0?";":`
+`)}(g,"this",y,f,d)+F));let J=`${E}${E}})(${T.join(`,${A}`)});`;i&&!b&&l&&(J=`${E}${E}${s}return exports;${J}`);const rn=Wr(r,t,l,$,f,s,v);let an=Hr(l&&i,h===!0||h==="if-default-prop"&&a,x,f);an&&(an=E+E+an),e.append(`${rn}${an}${u}`).indent(s).prepend(F).append(J)},system:function(e,{accessedGlobals:n,dependencies:t,exports:r,hasExports:a,indent:i,intro:s,snippets:o,outro:l,usesTopLevelAwait:_},{externalLiveBindings:u,freeze:f,name:d,namespaceToStringTag:h,strict:b,systemNullSetters:p}){const{_:v,getFunctionIntro:y,getNonArrowFunctionIntro:$,n:g,s:x}=o,{importBindings:k,setters:A,starExcludes:S}=function(D,P,T,{_:z,cnst:C,getObject:L,getPropertyAccess:F,n:J}){const rn=[],an=[];let ln=null;for(const{imports:_n,reexports:wn}of D){const sn=[];if(_n)for(const In of _n)rn.push(In.local),In.imported==="*"?sn.push(`${In.local}${z}=${z}module;`):sn.push(`${In.local}${z}=${z}module${F(In.imported)};`);if(wn){const In=[];let Ye=!1;for(const{imported:Ln,reexported:An}of wn)An==="*"?Ye=!0:In.push([An,Ln==="*"?"module":`module${F(Ln)}`]);if(In.length>1||Ye){const Ln=L(In,{lineBreakIndent:null});Ye?(ln||(ln=xp({dependencies:D,exports:P})),sn.push(`${C} setter${z}=${z}${Ln};`,`for${z}(${C} name in module)${z}{`,`${T}if${z}(!_starExcludes[name])${z}setter[name]${z}=${z}module[name];`,"}","exports(setter);")):sn.push(`exports(${Ln});`)}else{const[Ln,An]=In[0];sn.push(`exports('${Ln}',${z}${An});`)}}an.push(sn.join(`${J}${T}${T}${T}`))}return{importBindings:rn,setters:an,starExcludes:ln}}(t,r,i,o),I=d?`'${d}',${v}`:"",E=n.has("module")?["exports","module"]:a?["exports"]:[];let B=`System.register(${I}[`+t.map(({importPath:D})=>`'${D}'`).join(`,${v}`)+`],${v}(${$(E,{isAsync:!1,name:null})}{${g}${i}${b?"'use strict';":""}`+kp(S,i,o)+$p(k,i,o)+`${g}${i}return${v}{${A.length>0?`${g}${i}${i}setters:${v}[${A.map(D=>D?`${y(["module"],{isAsync:!1,name:null})}{${g}${i}${i}${i}${D}${g}${i}${i}}`:p?"null":`${y([],{isAsync:!1,name:null})}{}`).join(`,${v}`)}],`:""}${g}`;B+=`${i}${i}execute:${v}(${$([],{isAsync:_,name:null})}{${g}${g}`;const R=`${i}${i}})${g}${i}}${x}${g}}));`;e.prepend(s+ki(null,n,i,o,u,f,h)+Ep(r,i,o)).append(`${l}${g}${g}`+Cp(r,i,o)+wp(r,i,o)).indent(`${i}${i}${i}`).append(R).prepend(B)},umd:function(e,{accessedGlobals:n,dependencies:t,exports:r,hasDefaultExport:a,hasExports:i,id:s,indent:o,intro:l,namedExportsMode:_,log:u,outro:f,snippets:d},{amd:h,compact:b,esModule:p,extend:v,externalLiveBindings:y,freeze:$,interop:g,name:x,namespaceToStringTag:k,globals:A,noConflict:S,strict:I}){const{_:E,cnst:B,getFunctionIntro:R,getNonArrowFunctionIntro:D,getPropertyAccess:P,n:T,s:z}=d,C=b?"f":"factory",L=b?"g":"global";if(i&&!x)return M({code:Xs,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Cn(Us)});Di(u,t);const F=t.map(Rn=>`'${wl(Rn.importPath,h.forceJsExtensionForImports)}'`),J=t.map(Rn=>`require('${Rn.importPath}')`),rn=Al(t),an=rn.map(Rn=>Fi(Rn.globalName,L,P)),ln=rn.map(Rn=>Rn.name);_&&(i||S)&&(F.unshift("'exports'"),J.unshift("exports"),an.unshift(Oi(x,L,A,(v?`${Fi(x,L,P)}${E}||${E}`:"")+"{}",d)),ln.unshift("exports"));const _n=$l(h,s),wn=(_n?`'${_n}',${E}`:"")+(F.length>0?`[${F.join(`,${E}`)}],${E}`:""),sn=h.define,In=!_&&i?`module.exports${E}=${E}`:"",Ye=I?`${E}'use strict';${T}`:"";let Ln;if(S){const Rn=b?"e":"exports";let ds;!_&&i?ds=`${B} ${Rn}${E}=${E}${Oi(x,L,A,`${C}(${an.join(`,${E}`)})`,d)};`:ds=`${B} ${Rn}${E}=${E}${an.shift()};${T}${o}${o}${C}(${[Rn,...an].join(`,${E}`)});`,Ln=`(${R([],{isAsync:!1,name:null})}{${T}${o}${o}${B} current${E}=${E}${function(t1,r1,{_:nc,getPropertyAccess:a1}){let i1=r1;return t1.split(".").map(s1=>i1+=a1(s1)).join(`${nc}&&${nc}`)}(x,L,d)};${T}${o}${o}${ds}${T}${o}${o}${Rn}.noConflict${E}=${E}${R([],{isAsync:!1,name:null})}{${E}${Fi(x,L,P)}${E}=${E}current;${E}return ${Rn}${z}${E}};${T}${o}})()`}else Ln=`${C}(${an.join(`,${E}`)})`,!_&&i&&(Ln=Oi(x,L,A,Ln,d));const An=i||S&&_||an.length>0,ht=[C];An&&ht.unshift(L);const fs=An?`this,${E}`:"",Jv=An?`(${L}${E}=${E}typeof globalThis${E}!==${E}'undefined'${E}?${E}globalThis${E}:${E}${L}${E}||${E}self,${E}`:"",Yv=An?")":"",Zv=An?`${o}typeof exports${E}===${E}'object'${E}&&${E}typeof module${E}!==${E}'undefined'${E}?${E}${In}${C}(${J.join(`,${E}`)})${E}:${T}`:"",Qv=`(${D(ht,{isAsync:!1,name:null})}{${T}`+Zv+`${o}typeof ${sn}${E}===${E}'function'${E}&&${E}${sn}.amd${E}?${E}${sn}(${wn}${C})${E}:${T}${o}${Jv}${Ln}${Yv};${T}})(${fs}(${D(ln,{isAsync:!1,name:null})}{${Ye}${T}`,n1=T+T+"}));";e.prepend(`${l}${Kr(t,g,y,$,k,n,o,d)}`);const e1=Wr(r,t,_,g,d,o,y);let ha=Hr(_&&i,p===!0||p==="if-default-prop"&&a,k,d);ha&&(ha=T+T+ha),e.append(`${e1}${ha}${f}`).trim().indent(o).append(n1).prepend(Qv)}};const Sl=(e,n)=>n?`${e}
+${n}`:e,Bl=(e,n)=>n?`${e}
+
+${n}`:e;async function Sp(e,n,t){try{let[s,o,l,_]=await Promise.all([n.hookReduceValue("banner",e.banner(t),[t],Sl),n.hookReduceValue("footer",e.footer(t),[t],Sl),n.hookReduceValue("intro",e.intro(t),[t],Bl),n.hookReduceValue("outro",e.outro(t),[t],Bl)]);return l&&(l+=`
+
+`),_&&(_=`
+
+${_}`),s&&(s+=`
`),o&&(o=`
-`+o),{banner:s,footer:o,intro:_,outro:l}}catch(s){return L((r=s.message,a=s.hook,i=s.plugin,{code:Qf,message:`Could not retrieve "${a}". Check configuration of plugin "${i}".
- Error Message: ${r}`}))}var r,a,i}const Dd={amd:Yr,cjs:Yr,es:N_,iife:Yr,system:N_,umd:Yr};function Pd(t,n,e,r,a,i,s,o,_,l,u,f,m,h){const v=[...t].reverse();for(const p of v)p.scope.addUsedOutsideNames(r,a,f,m);(function(p,g,y){for(const E of g){for(const b of E.scope.variables.values())b.included&&!(b.renderBaseName||b instanceof it&&b.getOriginalVariable()!==b)&&b.setRenderNames(null,et(b.name,p,b.forbiddenNames));if(y.has(E)){const b=E.namespace;b.setRenderNames(null,et(b.name,p,b.forbiddenNames))}}})(r,v,h),Dd[a](r,e,n,i,s,o,_,l,u);for(const p of v)p.scope.deconflict(a,f,m)}function N_(t,n,e,r,a,i,s,o,_){for(const l of e.dependencies)(a||l instanceof te)&&(l.variableName=et(l.suggestedVariableName,t,null));for(const l of n){const u=l.module,f=l.name;l.isNamespace&&(a||u instanceof fn)?l.setRenderNames(null,(u instanceof fn?o.get(u):s.get(u)).variableName):u instanceof fn&&f==="default"?l.setRenderNames(null,et([...u.exportedVariables].some(([m,h])=>h==="*"&&m.included)?u.suggestedVariableName+"__default":u.suggestedVariableName,t,l.forbiddenNames)):l.setRenderNames(null,et(f,t,l.forbiddenNames))}for(const l of _)l.setRenderNames(null,et(l.name,t,l.forbiddenNames))}function Yr(t,n,{deconflictedDefault:e,deconflictedNamespace:r,dependencies:a},i,s,o,_,l){for(const u of a)u.variableName=et(u.suggestedVariableName,t,null);for(const u of r)u.namespaceVariableName=et(`${u.suggestedVariableName}__namespace`,t,null);for(const u of e)u.defaultVariableName=r.has(u)&&_d(i(u.id),o)?u.namespaceVariableName:et(`${u.suggestedVariableName}__default`,t,null);for(const u of n){const f=u.module;if(f instanceof fn){const m=l.get(f),h=u.name;if(h==="default"){const v=i(f.id),p=qr[v]?m.defaultVariableName:m.variableName;Vr(v,o)?u.setRenderNames(p,"default"):u.setRenderNames(null,p)}else h==="*"?u.setRenderNames(null,qe[i(f.id)]?m.namespaceVariableName:m.variableName):u.setRenderNames(m.variableName,null)}else{const m=_.get(f);s&&u.isNamespace?u.setRenderNames(null,m.exportMode==="default"?m.namespaceVariableName:m.variableName):m.exportMode==="default"?u.setRenderNames(null,m.variableName):u.setRenderNames(m.variableName,m.getVariableExportName(u))}}}function Od(t,{exports:n,name:e,format:r},a,i){const s=t.getExportNames();if(n==="default"){if(s.length!==1||s[0]!=="default")return L(to("default",s,a))}else if(n==="none"&&s.length>0)return L(to("none",s,a));return n==="auto"&&(s.length===0?n="none":s.length===1&&s[0]==="default"?n="default":(r!=="es"&&r!=="system"&&s.includes("default")&&i(V,function(o,_){return{code:bm,id:o,message:`Entry module "${H(o)}" is using named and default exports together. Consumers of your bundle will have to use \`${_||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:wn(Ra)}}(a,e)),n="named")),n}function zd(t){const n=t.split(`
-`),e=n.filter(i=>/^\t+/.test(i)),r=n.filter(i=>/^ {2,}/.test(i));if(e.length===0&&r.length===0)return null;if(e.length>=r.length)return" ";const a=r.reduce((i,s)=>{const o=/^ +/.exec(s)[0].length;return Math.min(o,i)},1/0);return" ".repeat(a)}function T_(t,n,e,r,a,i){const s=t.getDependenciesToBeIncluded();for(const o of s){if(o instanceof fn){n.push(i.get(o));continue}const _=a.get(o);_===r?e.has(o)||(e.add(o),T_(o,n,e,r,a,i)):n.push(_)}}const Fi="!~{",Gi="}~",Ri=new RegExp(`${Fi}[0-9a-zA-Z_$]{1,59}${Gi}`,"g"),Je=(t,n)=>t.replace(Ri,e=>n.get(e)||e),Bd=(t,n,e)=>t.replace(Ri,r=>r===n?e:r),Fd=(t,n)=>{const e=new Set,r=t.replace(Ri,a=>n.has(a)?(e.add(a),`${Fi}${"0".repeat(a.length-5)}${Gi}`):a);return{containedPlaceholders:e,transformedCode:r}},Zr=Symbol("bundleKeys"),qi={type:"placeholder"};function j_(t,n,e){return pr(t)?L(Mn(`Invalid pattern "${t}" for "${n}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):t.replace(/\[(\w+)(:\d+)?]/g,(r,a,i)=>{if(!e.hasOwnProperty(a)||i&&a!=="hash")return L(Mn(`"[${a}${i||""}]" is not a valid placeholder in the "${n}" pattern.`));const s=e[a](i&&Number.parseInt(i.slice(1)));return pr(s)?L(Mn(`Invalid substitution "${s}" for placeholder "[${a}]" in "${n}" pattern, can be neither absolute nor relative path.`)):s})}function L_(t,{[Zr]:n}){if(!n.has(t.toLowerCase()))return t;const e=yt(t);t=t.slice(0,Math.max(0,t.length-e.length));let r,a=1;for(;n.has((r=t+ ++a+e).toLowerCase()););return r}const Gd=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Rd(t,n,e,r){return(typeof n=="function"?n(t.id):n[t.id])||(e?(r(V,(i=t.id,s=t.variableName,{code:pm,id:i,message:`No name was provided for external module "${i}" in "output.globals" – guessing "${s}".`,names:[s],url:wn(Yf)})),t.variableName):void 0);var i,s}class At{constructor(n,e,r,a,i,s,o,_,l,u,f,m,h,v,p){this.orderedModules=n,this.inputOptions=e,this.outputOptions=r,this.unsetOptions=a,this.pluginDriver=i,this.modulesById=s,this.chunkByModule=o,this.externalChunkByModule=_,this.facadeChunkByModule=l,this.includedNamespaces=u,this.manualChunkAlias=f,this.getPlaceholder=m,this.bundle=h,this.inputBase=v,this.snippets=p,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=n.length>0?n[0].execIndex:1/0;const g=new Set(n);for(const y of n){o.set(y,this),y.namespace.included&&!r.preserveModules&&u.add(y),this.isEmpty&&y.isIncluded()&&(this.isEmpty=!1),(y.info.isEntry||r.preserveModules)&&this.entryModules.push(y);for(const E of y.includedDynamicImporters)g.has(E)||(this.dynamicEntryModules.push(y),y.info.syntheticNamedExports&&(u.add(y),this.exports.add(y.namespace)));y.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(y)}this.suggestedVariableName=za(this.generateVariableName())}static generateFacade(n,e,r,a,i,s,o,_,l,u,f,m,h,v,p){const g=new At([],n,e,r,a,i,s,o,_,l,null,m,h,v,p);g.assignFacadeName(f,u),_.has(u)||_.set(u,g);for(const y of u.getDependenciesToBeIncluded())g.dependencies.add(y instanceof hn?s.get(y):o.get(y));return!g.dependencies.has(s.get(u))&&u.info.moduleSideEffects&&u.hasEffects()&&g.dependencies.add(s.get(u)),g.ensureReexportsAreAvailableForModule(u),g.facadeModule=u,g.strictFacade=!0,g}canModuleBeFacade(n,e){const r=n.getExportNamesByVariable();for(const a of this.exports)if(!r.has(a))return!1;for(const a of e)if(!(a.module===n||r.has(a)||a instanceof Dn&&r.has(a.getBaseVariable())))return!1;return!0}finalizeChunk(n,e,r){const a=this.getRenderedChunkInfo(),i=o=>Je(o,r),s=this.fileName=i(a.fileName);return{...a,code:n,dynamicImports:a.dynamicImports.map(i),fileName:s,implicitlyLoadedBefore:a.implicitlyLoadedBefore.map(i),importedBindings:Object.fromEntries(Object.entries(a.importedBindings).map(([o,_])=>[i(o),_])),imports:a.imports.map(i),map:e,referencedFiles:a.referencedFiles.map(i)}}generateExports(){this.sortedExportNames=null;const n=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==!1||this.strictFacade)){const e=this.facadeModule.getExportNamesByVariable();for(const[r,a]of e){this.exportNamesByVariable.set(r,[...a]);for(const i of a)this.exportsByName.set(i,r);n.delete(r)}}this.outputOptions.minifyInternalExports?function(e,r,a){let i=0;for(const s of e){let[o]=s.name;if(r.has(o))do o=Tr(++i),o.charCodeAt(0)===49&&(i+=9*64**(o.length-1),o=Tr(i));while(vr.has(o)||r.has(o));r.set(o,s),a.set(s,[o])}}(n,this.exportsByName,this.exportNamesByVariable):function(e,r,a){for(const i of e){let s=0,o=i.name;for(;r.has(o);)o=i.name+"$"+ ++s;r.set(o,i),a.set(i,[o])}}(n,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Od(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){var a;const n=[],e=new Set([...this.entryModules,...this.implicitEntryModules]),r=new Set(this.dynamicEntryModules.map(({namespace:i})=>i));for(const i of e)if(i.preserveSignature)for(const s of i.getExportNamesByVariable().keys())this.chunkByModule.get(s.module)===this&&r.add(s);for(const i of e){const s=Array.from(new Set(i.chunkNames.filter(({isUserDefined:o})=>o).map(({name:o})=>o)),o=>({name:o}));if(s.length===0&&i.isUserDefinedEntryPoint&&s.push({}),s.push(...Array.from(i.chunkFileNames,o=>({fileName:o}))),s.length===0&&s.push({}),!this.facadeModule){const o=!this.outputOptions.preserveModules&&(i.preserveSignature==="strict"||i.preserveSignature==="exports-only"&&i.getExportNamesByVariable().size>0);o&&!this.canModuleBeFacade(i,r)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=o),this.assignFacadeName(s.shift(),i,this.outputOptions.preserveModules))}for(const o of s)n.push(At.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,o,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const i of this.dynamicEntryModules)i.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(i,r)?(this.facadeModule=i,this.facadeChunkByModule.set(i,this),this.strictFacade=!0,this.dynamicName=Vi(i)):this.facadeModule===i&&!this.strictFacade&&this.canModuleBeFacade(i,r)?this.strictFacade=!0:(a=this.facadeChunkByModule.get(i))!=null&&a.strictFacade||(this.includedNamespaces.add(i),this.exports.add(i.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),n}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(n){return dr(Ts(n,this.getFileName(),this.outputOptions.format==="amd"&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){var _;if(this.preliminaryFileName)return this.preliminaryFileName;let n,e=null;const{chunkFileNames:r,entryFileNames:a,file:i,format:s,preserveModules:o}=this.outputOptions;if(i)n=ft(i);else if(this.fileName===null){const[l,u]=o||(_=this.facadeModule)!=null&&_.isUserDefinedEntryPoint?[a,"output.entryFileNames"]:[r,"output.chunkFileNames"];n=j_(typeof l=="function"?l(this.getPreRenderedChunkInfo()):l,u,{format:()=>s,hash:f=>e||(e=this.getPlaceholder(u,f)),name:()=>this.getChunkName()}),e||(n=L_(n,this.bundle))}else n=this.fileName;return e||(this.bundle[n]=qi),this.preliminaryFileName={fileName:n,hashPlaceholder:e}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Qr),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Qr),importedBindings:qd(this.getRenderedDependencies(),Qr),imports:Array.from(this.dependencies,Qr),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(n){return this.outputOptions.preserveModules&&n instanceof Ue?"*":this.exportNamesByVariable.get(n)[0]}link(){this.dependencies=function(n,e,r,a){const i=[],s=new Set;for(let _=e.length-1;_>=0;_--){const l=e[_];if(!s.has(l)){const u=[];T_(l,u,s,n,r,a),i.unshift(u)}}const o=new Set;for(const _ of i)for(const l of _)o.add(l);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const n of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(n),this.setUpChunkImportsAndExportsForModule(n)}async render(){const{dependencies:n,exportMode:e,facadeModule:r,inputOptions:{onLog:a},outputOptions:i,pluginDriver:s,snippets:o}=this,{format:_,hoistTransitiveImports:l,preserveModules:u}=i;if(l&&!u&&r!==null)for(const I of n)I instanceof At&&this.inlineChunkDependencies(I);const f=this.getPreliminaryFileName(),{accessedGlobals:m,indent:h,magicString:v,renderedSource:p,usedModules:g,usesTopLevelAwait:y}=this.renderModules(f.fileName),E=[...this.getRenderedDependencies().values()],b=e==="none"?[]:this.getChunkExportDeclarations(_);let x=b.length>0,$=!1;for(const I of E){const{reexports:R}=I;R!=null&&R.length&&(x=!0,!$&&R.some(P=>P.reexported==="default")&&($=!0),_==="es"&&(I.reexports=R.filter(({reexported:P})=>!b.find(({exported:F})=>F===P))))}if(!$){for(const{exported:I}of b)if(I==="default"){$=!0;break}}const{intro:S,outro:A,banner:N,footer:k}=await Md(i,s,this.getRenderedChunkInfo());return Ld[_](p,{accessedGlobals:m,dependencies:E,exports:b,hasDefaultExport:$,hasExports:x,id:f.fileName,indent:h,intro:S,isEntryFacade:u||r!==null&&r.info.isEntry,isModuleFacade:r!==null,log:a,namedExportsMode:e!=="default",outro:A,snippets:o,usesTopLevelAwait:y},i),N&&v.prepend(N),k&&v.append(k),{chunk:this,magicString:v,preliminaryFileName:f,usedModules:g}}addImplicitlyLoadedBeforeFromModule(n){const{chunkByModule:e,implicitlyLoadedBefore:r}=this;for(const a of n.implicitlyLoadedBefore){const i=e.get(a);i&&i!==this&&r.add(i)}}addNecessaryImportsForFacades(){for(const[n,e]of this.includedReexportsByModule)if(this.includedNamespaces.has(n))for(const r of e)this.imports.add(r)}assignFacadeName({fileName:n,name:e},r,a){n?this.fileName=n:this.name=this.outputOptions.sanitizeFileName(e||(a?this.getPreserveModulesChunkNameFromModule(r):Vi(r)))}checkCircularDependencyImport(n,e){var l;const r=n.module;if(r instanceof hn){const u=this.chunkByModule.get(r);let f;do f=e.alternativeReexportModules.get(n),f&&(this.chunkByModule.get(f)!==u&&this.inputOptions.onLog(V,(a=((l=r.getExportNamesByVariable().get(n))==null?void 0:l[0])||"*",i=r.id,s=f.id,o=e.id,_=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${a}" of module "${H(i)}" was reexported through module "${H(s)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
-Either change the import in "${H(o)}" to point directly to the exporting module or ${_?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:s})),e=f);while(f)}var a,i,s,o,_}ensureReexportsAreAvailableForModule(n){const e=[],r=n.getExportNamesByVariable();for(const a of r.keys()){const i=a instanceof Dn,s=i?a.getBaseVariable():a;if(this.checkCircularDependencyImport(s,n),!(s instanceof Ue&&this.outputOptions.preserveModules)){const o=s.module;if(o instanceof hn){const _=this.chunkByModule.get(o);_&&_!==this&&(_.exports.add(s),e.push(s),i&&this.imports.add(s))}}}e.length>0&&this.includedReexportsByModule.set(n,e)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const n=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return n?Vi(n):"chunk"}getChunkExportDeclarations(n){const e=[];for(const r of this.getExportNames()){if(r[0]==="*")continue;const a=this.exportsByName.get(r);if(!(a instanceof Dn)){const _=a.module;if(_){const l=this.chunkByModule.get(_);if(l!==this){if(!l||n!=="es")continue;const u=this.renderedDependencies.get(l);if(!u)continue;const{imports:f,reexports:m}=u,h=m==null?void 0:m.find(({reexported:p})=>p===r);if(!(f==null?void 0:f.find(({imported:p})=>p===(h==null?void 0:h.imported))))continue}}}let i=null,s=!1,o=a.getName(this.snippets.getPropertyAccess);if(a instanceof dt){for(const _ of a.declarations)if(_.parent instanceof Ge||_ instanceof Br&&_.declaration instanceof Ge){s=!0;break}}else a instanceof Dn&&(i=o,n==="es"&&(o=a.renderName));e.push({exported:r,expression:i,hoisted:s,local:o})}return e}getDependenciesToBeDeconflicted(n,e,r){const a=new Set,i=new Set,s=new Set;for(const o of[...this.exportNamesByVariable.keys(),...this.imports])if(n||o.isNamespace){const _=o.module;if(_ instanceof fn){const l=this.externalChunkByModule.get(_);a.add(l),n&&(o.name==="default"?qr[r(_.id)]&&i.add(l):o.name==="*"&&qe[r(_.id)]&&s.add(l))}else{const l=this.chunkByModule.get(_);l!==this&&(a.add(l),n&&l.exportMode==="default"&&o.isNamespace&&s.add(l))}}if(e)for(const o of this.dependencies)a.add(o);return{deconflictedDefault:i,deconflictedNamespace:s,dependencies:a}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(n=>n.facadeChunk||n.chunk||n.externalChunk||n.resolution).filter(n=>n!==this&&(n instanceof At||n instanceof te))}getDynamicImportStringAndAssertions(n,e){if(n instanceof fn){const r=this.externalChunkByModule.get(n);return[`'${r.getImportPath(e)}'`,r.getImportAssertions(this.snippets)]}return[n||"",this.outputOptions.format==="es"&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?La(this.fileName):La(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:n}=this.outputOptions,e=new Map;for(const r of this.imports){const a=r.module;let i,s;if(a instanceof fn){if(i=this.externalChunkByModule.get(a),s=r.name,s!=="default"&&s!=="*"&&n(a.id)==="defaultOnly")return L(ro(a.id,s,!1))}else i=this.chunkByModule.get(a),s=i.getVariableExportName(r);zn(e,i,js).push({imported:s,local:r.getName(this.snippets.getPropertyAccess)})}return e}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const n=[];for(const e of this.orderedModules)for(const{node:r,resolution:a}of e.dynamicImports)r.included&&n.push(a instanceof hn?{chunk:this.chunkByModule.get(a),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(a),node:r,resolution:a}:a instanceof fn?{chunk:null,externalChunk:this.externalChunkByModule.get(a),facadeChunk:null,node:r,resolution:a}:{chunk:null,externalChunk:null,facadeChunk:null,node:r,resolution:a});return this.includedDynamicImports=n}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:n,facadeModule:e,implicitEntryModules:r,orderedModules:a}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:e&&e.id,isDynamicEntry:n.length>0,isEntry:!!(e!=null&&e.info.isEntry),isImplicitEntry:r.length>0,moduleIds:a.map(({id:i})=>i),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(n){const e=M_(n);if(e)return e;const{preserveModulesRoot:r,sanitizeFileName:a}=this.outputOptions,i=a(Ee(n.id.split(Vd,1)[0])),s=yt(i),o=Gd.has(s)?i.slice(0,-s.length):i;return vt(o)?r&&Jn(o).startsWith(r)?o.slice(r.length).replace(/^[/\\]/,""):ne(this.inputBase,o):`_virtual/${ft(o)}`}getReexportSpecifiers(){const{externalLiveBindings:n,interop:e}=this.outputOptions,r=new Map;for(let a of this.getExportNames()){let i,s,o=!1;if(a[0]==="*"){const _=a.slice(1);e(_)==="defaultOnly"&&this.inputOptions.onLog(V,Im(_)),o=n,i=this.externalChunkByModule.get(this.modulesById.get(_)),s=a="*"}else{const _=this.exportsByName.get(a);if(_ instanceof Dn)continue;const l=_.module;if(l instanceof hn){if(i=this.chunkByModule.get(l),i===this)continue;s=i.getVariableExportName(_),o=_.isReassigned}else{if(i=this.externalChunkByModule.get(l),s=_.name,s!=="default"&&s!=="*"&&e(l.id)==="defaultOnly")return L(ro(l.id,s,!0));o=n&&(s!=="default"||Vr(e(l.id),!0))}}zn(r,i,js).push({imported:s,needsLiveBinding:o,reexported:a})}return r}getReferencedFiles(){const n=new Set;for(const e of this.orderedModules)for(const r of e.importMetas){const a=r.getReferencedFileName(this.pluginDriver);a&&n.add(a)}return[...n]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const n=this.getImportSpecifiers(),e=this.getReexportSpecifiers(),r=new Map,a=this.getFileName();for(const i of this.dependencies){const s=n.get(i)||null,o=e.get(i)||null,_=i instanceof te||i.exportMode!=="default",l=i.getImportPath(a);r.set(i,{assertions:i instanceof te?i.getImportAssertions(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof te&&(this.outputOptions.format==="umd"||this.outputOptions.format==="iife")&&Rd(i,this.outputOptions.globals,(s||o)!==null,this.inputOptions.onLog),importPath:l,imports:s,isChunk:i instanceof At,name:i.variableName,namedExportsMode:_,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=r}inlineChunkDependencies(n){for(const e of n.dependencies)this.dependencies.has(e)||(this.dependencies.add(e),e instanceof At&&this.inlineChunkDependencies(e))}renderModules(n){const{accessedGlobalsByScope:e,dependencies:r,exportNamesByVariable:a,includedNamespaces:i,inputOptions:{onLog:s},isEmpty:o,orderedModules:_,outputOptions:l,pluginDriver:u,renderedModules:f,snippets:m}=this,{compact:h,dynamicImportFunction:v,format:p,freeze:g,namespaceToStringTag:y}=l,{_:E,cnst:b,n:x}=m;this.setDynamicImportResolutions(n),this.setImportMetaResolutions(n),this.setIdentifierRenderResolutions();const $=new class tc{constructor(w={}){this.intro=w.intro||"",this.separator=w.separator!==void 0?w.separator:`
-`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(w){if(w instanceof Lt)return this.addSource({content:w,filename:w.filename,separator:this.separator});if(!As(w)||!w.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(T=>{Ns.call(w,T)||(w[T]=w.content[T])}),w.separator===void 0&&(w.separator=this.separator),w.filename)if(Ns.call(this.uniqueSourceIndexByFilename,w.filename)){const T=this.uniqueSources[this.uniqueSourceIndexByFilename[w.filename]];if(w.content.original!==T.content)throw new Error(`Illegal source: same filename (${w.filename}), different contents`)}else this.uniqueSourceIndexByFilename[w.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:w.filename,content:w.content.original});return this.sources.push(w),this}append(w,T){return this.addSource({content:new Lt(w),separator:T&&T.separator||""}),this}clone(){const w=new tc({intro:this.intro,separator:this.separator});return this.sources.forEach(T=>{w.addSource({filename:T.filename,content:T.content.clone(),separator:T.separator})}),w}generateDecodedMap(w={}){const T=[];let B;this.sources.forEach(rn=>{Object.keys(rn.content.storedNames).forEach(an=>{~T.indexOf(an)||T.push(an)})});const K=new Is(w.hires);return this.intro&&K.advance(this.intro),this.sources.forEach((rn,an)=>{an>0&&K.advance(this.separator);const _n=rn.filename?this.uniqueSourceIndexByFilename[rn.filename]:-1,ln=rn.content,Cn=Ta(ln.original);ln.intro&&K.advance(ln.intro),ln.firstChunk.eachNext(sn=>{const Nn=Cn(sn.start);sn.intro.length&&K.advance(sn.intro),rn.filename?sn.edited?K.addEdit(_n,sn.content,Nn,sn.storeName?T.indexOf(sn.original):-1):K.addUneditedChunk(_n,sn,ln.original,Nn,ln.sourcemapLocations):K.advance(sn.content),sn.outro.length&&K.advance(sn.outro)}),ln.outro&&K.advance(ln.outro),rn.ignoreList&&_n!==-1&&(B===void 0&&(B=[]),B.push(_n))}),{file:w.file?w.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(rn=>w.file?Ss(w.file,rn.filename):rn.filename),sourcesContent:this.uniqueSources.map(rn=>w.includeContent?rn.content:null),names:T,mappings:K.raw,x_google_ignoreList:B}}generateMap(w){return new mr(this.generateDecodedMap(w))}getIndentString(){const w={};return this.sources.forEach(T=>{const B=T.content._getRawIndentString();B!==null&&(w[B]||(w[B]=0),w[B]+=1)}),Object.keys(w).sort((T,B)=>w[T]-w[B])[0]||" "}indent(w){if(arguments.length||(w=this.getIndentString()),w==="")return this;let T=!this.intro||this.intro.slice(-1)===`
-`;return this.sources.forEach((B,K)=>{const rn=B.separator!==void 0?B.separator:this.separator,an=T||K>0&&/\r?\n$/.test(rn);B.content.indent(w,{exclude:B.indentExclusionRanges,indentStart:an}),T=B.content.lastChar()===`
-`}),this.intro&&(this.intro=w+this.intro.replace(/^[^\n]/gm,(B,K)=>K>0?w+B:B)),this}prepend(w){return this.intro=w+this.intro,this}toString(){const w=this.sources.map((T,B)=>{const K=T.separator!==void 0?T.separator:this.separator;return(B>0?K:"")+T.content.toString()}).join("");return this.intro+w}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some(w=>!w.content.isEmpty()))}length(){return this.sources.reduce((w,T)=>w+T.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(w){return this.trimStart(w).trimEnd(w)}trimStart(w){const T=new RegExp("^"+(w||"\\s")+"+");if(this.intro=this.intro.replace(T,""),!this.intro){let B,K=0;do if(B=this.sources[K++],!B)break;while(!B.content.trimStartAborted(w))}return this}trimEnd(w){const T=new RegExp((w||"\\s")+"+$");let B,K=this.sources.length-1;do if(B=this.sources[K--],!B){this.intro=this.intro.replace(T,"");break}while(!B.content.trimEndAborted(w));return this}}({separator:`${x}${x}`}),S=function(z,w){if(w.indent!==!0)return w.indent;for(const T of z){const B=zd(T.originalCode);if(B!==null)return B}return" "}(_,l),A=[];let N="";const k=new Set,I=new Map,R={dynamicImportFunction:v,exportNamesByVariable:a,format:p,freeze:g,indent:S,namespaceToStringTag:y,pluginDriver:u,snippets:m,useOriginalName:null};let P=!1;for(const z of _){let w,T=0;if(z.isIncluded()||i.has(z)){const rn=z.render(R);({source:w}=rn),P||(P=rn.usesTopLevelAwait),T=w.length(),T&&(h&&w.lastLine().includes("//")&&w.append(`
-`),I.set(z,w),$.addSource(w),A.push(z));const an=z.namespace;if(i.has(z)){const ln=an.renderBlock(R);an.renderFirst()?N+=x+ln:$.addSource(new Lt(ln))}const _n=e.get(z.scope);if(_n)for(const ln of _n)k.add(ln)}const{renderedExports:B,removedExports:K}=z.getRenderedExports();f[z.id]={get code(){return(w==null?void 0:w.toString())??null},originalLength:z.originalCode.length,removedExports:K,renderedExports:B,renderedLength:T}}N&&$.prepend(N+x+x),this.needsExportsShim&&$.prepend(`${x}${b} ${ce}${E}=${E}void 0;${x}${x}`);const F=h?$:$.trim();var D;return o&&this.getExportNames().length===0&&r.size===0&&s(V,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${D=this.getChunkName()}".`,names:[D]}),{accessedGlobals:k,indent:S,magicString:$,renderedSource:F,usedModules:A,usesTopLevelAwait:P}}setDynamicImportResolutions(n){const{accessedGlobalsByScope:e,outputOptions:r,pluginDriver:a,snippets:i}=this;for(const s of this.getIncludedDynamicImports())if(s.chunk){const{chunk:o,facadeChunk:_,node:l,resolution:u}=s;o===this?l.setInternalResolution(u.namespace):l.setExternalResolution((_||o).exportMode,u,r,i,a,e,`'${(_||o).getImportPath(n)}'`,!(_!=null&&_.strictFacade)&&o.exportNamesByVariable.get(u.namespace)[0],null)}else{const{node:o,resolution:_}=s,[l,u]=this.getDynamicImportStringAndAssertions(_,n);o.setExternalResolution("external",_,r,i,a,e,l,!1,u)}}setIdentifierRenderResolutions(){const{format:n,interop:e,namespaceToStringTag:r,preserveModules:a,externalLiveBindings:i}=this.outputOptions,s=new Set;for(const _ of this.getExportNames()){const l=this.exportsByName.get(_);n!=="es"&&n!=="system"&&l.isReassigned&&!l.isId?l.setRenderNames("exports",_):l instanceof Dn?s.add(l):l.setRenderNames(null,null)}for(const _ of this.orderedModules)if(_.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(ce),r&&o.add("Symbol"),n){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const _ of Ci)o.add(_)}Pd(this.orderedModules,this.getDependenciesToBeDeconflicted(n!=="es"&&n!=="system",n==="amd"||n==="umd"||n==="iife",e),this.imports,o,n,e,a,i,this.chunkByModule,this.externalChunkByModule,s,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(n){const{accessedGlobalsByScope:e,includedNamespaces:r,orderedModules:a,outputOptions:{format:i}}=this;for(const s of a){for(const o of s.importMetas)o.setResolution(i,e,n);r.has(s)&&s.namespace.prepare(e)}}setUpChunkImportsAndExportsForModule(n){const e=new Set(n.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(n)){const r=n.namespace.getMemberVariables();for(const a of Object.values(r))e.add(a)}for(let r of e){r instanceof it&&(r=r.getOriginalVariable()),r instanceof Dn&&(r=r.getBaseVariable());const a=this.chunkByModule.get(r.module);a!==this&&(this.imports.add(r),r.module instanceof hn&&(this.checkCircularDependencyImport(r,n),r instanceof Ue&&this.outputOptions.preserveModules||a.exports.add(r)))}(this.includedNamespaces.has(n)||n.info.isEntry&&n.preserveSignature!==!1||n.includedDynamicImporters.some(r=>this.chunkByModule.get(r)!==this))&&this.ensureReexportsAreAvailableForModule(n);for(const{node:r,resolution:a}of n.dynamicImports)r.included&&a instanceof hn&&this.chunkByModule.get(a)===this&&!this.includedNamespaces.has(a)&&(this.includedNamespaces.add(a),this.ensureReexportsAreAvailableForModule(a))}}function Vi(t){return M_(t)??La(t.id)}function M_(t){var n,e;return((n=t.chunkNames.find(({isUserDefined:r})=>r))==null?void 0:n.name)??((e=t.chunkNames[0])==null?void 0:e.name)}function qd(t,n){const e={};for(const[r,a]of t){const i=new Set;if(a.imports)for(const{imported:s}of a.imports)i.add(s);if(a.reexports)for(const{imported:s}of a.reexports)i.add(s);e[n(r)]=[...i]}return e}const Vd=/[#?]/,Qr=t=>t.getFileName();function*D_(t){for(const n of t)yield*n}function Xd(t,n,e,r){const{chunkDefinitions:a,modulesInManualChunks:i}=function(f){const m=[],h=new Set(f.keys()),v=Object.create(null);for(const[p,g]of f)Ud(p,v[g]||(v[g]=[]),h);for(const[p,g]of Object.entries(v))m.push({alias:p,modules:g});return{chunkDefinitions:m,modulesInManualChunks:h}}(n),{allEntries:s,dependentEntriesByModule:o,dynamicallyDependentEntriesByDynamicEntry:_,dynamicImportsByEntry:l}=function(f){const m=new Set,h=new Map,v=[],p=new Set(f);let g=0;for(const x of p){const $=new Set;v.push($);const S=new Set([x]);for(const A of S){zn(h,A,Dt).add(g);for(const N of A.getDependenciesToBeIncluded())N instanceof fn||S.add(N);for(const{resolution:N}of A.dynamicImports)N instanceof hn&&N.includedDynamicImporters.length>0&&!p.has(N)&&(m.add(N),p.add(N),$.add(N));for(const N of A.implicitlyLoadedBefore)p.has(N)||(m.add(N),p.add(N))}g++}const y=[...p],{dynamicEntries:E,dynamicImportsByEntry:b}=function(x,$,S){const A=new Map,N=new Set;for(const[I,R]of x.entries())A.set(R,I),$.has(R)&&N.add(I);const k=[];for(const I of S){const R=new Set;for(const P of I)R.add(A.get(P));k.push(R)}return{dynamicEntries:N,dynamicImportsByEntry:k}}(y,m,v);return{allEntries:y,dependentEntriesByModule:h,dynamicallyDependentEntriesByDynamicEntry:Hd(h,E,y),dynamicImportsByEntry:b}}(t),u=P_(function*(f,m){for(const[h,v]of f)m.has(h)||(yield{dependentEntries:v,modules:[h]})}(o,i));return function(f,m,h,v){const p=v.map(()=>0n),g=v.map((b,x)=>m.has(x)?-1n:0n);let y=1n;for(const{dependentEntries:b}of f){for(const x of b)p[x]|=y;y<<=1n}const E=m;for(const[b,x]of E){E.delete(b);const $=g[b];let S=$;for(const A of x)S&=p[A]|g[A];if(S!==$){g[b]=S;for(const A of h[b])zn(E,A,Dt).add(b)}}y=1n;for(const{dependentEntries:b}of f){for(const x of b)(g[x]&y)===y&&b.delete(x);y<<=1n}}(u,_,l,s),a.push(...function(f,m,h,v){$n("optimize chunks",3);const p=function(g,y,E){const b=[],x=[],$=new Map,S=[];let A=0n,N=1n;for(const{dependentEntries:k,modules:I}of g){const R={containedAtoms:N,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:k,modules:I,pure:!0,size:0};let P=0,F=!0;for(const D of I)$.set(D,R),D.isIncluded()&&(F&&(F=!D.hasEffects()),P+=E>1?D.estimateSize():1);R.pure=F,R.size=P,S.push(P),F||(A|=N),(P{const Cn=P;return P<<=1n,D|=Cn,Cn}));else{const Cn=I.get(ln);Cn&&Cn!==T&&(B.add(Cn),Cn.dependentChunks.add(T))}const{containedAtoms:an}=T;for(const _n of K)z[_n]|=an}}for(const w of k)for(const T of w){const{dependentEntries:B}=T;T.correlatedAtoms=-1n;for(const K of B)T.correlatedAtoms&=z[K]}return D}([x,b],$,y,N),{big:new Set(x),sideEffectAtoms:A,sizeByAtom:S,small:new Set(b)})}(f,m,h);return p?(h>1&&v("info",eo(f.length,p.small.size,"Initially")),function(g,y){const{small:E}=g;for(const b of E){const x=Wd(b,g,y<=1?1:1/0);if(x){const{containedAtoms:$,correlatedAtoms:S,modules:A,pure:N,size:k}=b;E.delete(b),O_(x,y,g).delete(x),x.modules.push(...A),x.size+=k,x.pure&&(x.pure=N);const{dependencies:I,dependentChunks:R,dependentEntries:P}=x;x.correlatedAtoms&=S,x.containedAtoms|=$;for(const F of b.dependentEntries)P.add(F);for(const F of b.dependencies)I.add(F),F.dependentChunks.delete(b),F.dependentChunks.add(x);for(const F of b.dependentChunks)R.add(F),F.dependencies.delete(b),F.dependencies.add(x);I.delete(x),R.delete(x),O_(x,y,g).add(x)}}}(p,h),h>1&&v("info",eo(p.small.size+p.big.size,p.small.size,"After merging chunks")),yn("optimize chunks",3),[...p.small,...p.big]):(yn("optimize chunks",3),f)}(P_(u),s.length,e,r).map(({modules:f})=>({alias:null,modules:f}))),a}function Ud(t,n,e){const r=new Set([t]);for(const a of r){e.add(a),n.push(a);for(const i of a.dependencies)i instanceof fn||e.has(i)||r.add(i)}}function Hd(t,n,e){const r=new Map;for(const a of n){const i=zn(r,a,Dt),s=e[a];for(const o of D_([s.includedDynamicImporters,s.implicitlyLoadedAfter]))for(const _ of t.get(o))i.add(_)}return r}function P_(t){var n;const e=Object.create(null);for(const{dependentEntries:r,modules:a}of t){let i=0n;for(const s of r)i|=1n<=u)return 1/0;return m}(s&~i,e,a)}const Yd=(t,n)=>t.execIndex>n.execIndex?1:-1;function Zd(t,n,e){const r=Symbol(t.id),a=[t.id];let i=n;for(t.cycles.add(r);i!==t;)i.cycles.add(r),a.push(i.id),i=e.get(i);return a.push(a[0]),a.reverse(),a}const B_=(t,n)=>n?`(${t})`:t,F_=/^(?!\d)[\w$]+$/;class G_{constructor(n,e){this.isOriginal=!0,this.filename=n,this.content=e}traceSegment(n,e,r){return{column:e,line:n,name:r,source:this}}}class na{constructor(n,e){this.sources=e,this.names=n.names,this.mappings=n.mappings}traceMappings(){const n=[],e=new Map,r=[],a=[],i=new Map,s=[];for(const o of this.mappings){const _=[];for(const l of o){if(l.length===1)continue;const u=this.sources[l[1]];if(!u)continue;const f=u.traceSegment(l[2],l[3],l.length===5?this.names[l[4]]:"");if(f){const{column:m,line:h,name:v,source:{content:p,filename:g}}=f;let y=e.get(g);if(y===void 0)y=n.length,n.push(g),e.set(g,y),r[y]=p;else if(r[y]==null)r[y]=p;else if(p!=null&&r[y]!==p)return L(Am(g));const E=[l[0],y,h,m];if(v){let b=i.get(v);b===void 0&&(b=a.length,a.push(v),i.set(v,b)),E[4]=b}_.push(E)}}s.push(_)}return{mappings:s,names:a,sources:n,sourcesContent:r}}traceSegment(n,e,r){const a=this.mappings[n];if(!a)return null;let i=0,s=a.length-1;for(;i<=s;){const o=i+s>>1,_=a[o];if(_[0]===e||i===s){if(_.length==1)return null;const l=this.sources[_[1]];return l?l.traceSegment(_[2],_[3],_.length===5?this.names[_[4]]:r):null}_[0]>e?s=o-1:i=o+1}return null}}function R_(t){return function(n,e){return e.mappings?new na(e,[n]):(t(V,(r=e.plugin,{code:Hs,message:`Sourcemap is likely to be incorrect: a plugin (${r}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:r,url:wn(Wf)})),new na({mappings:[],names:[]},[n]));var r}}function q_(t,n,e,r,a){let i;if(e){const s=e.sources,o=e.sourcesContent||[],_=Mt(t)||".",l=e.sourceRoot||".",u=s.map((f,m)=>new G_(Jn(_,l,f),o[m]));i=new na(e,u)}else i=new G_(t,n);return r.reduce(a,i)}var en={},Xi=V_;function V_(t,n){if(!t)throw new Error(n||"Assertion failed")}V_.equal=function(t,n,e){if(t!=n)throw new Error(e||"Assertion failed: "+t+" != "+n)};var Ui={exports:{}};typeof Object.create=="function"?Ui.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Ui.exports=function(t,n){if(n){t.super_=n;var e=function(){};e.prototype=n.prototype,t.prototype=new e,t.prototype.constructor=t}};var Qd=Ui.exports,np=Xi,tp=Qd;function ep(t,n){return(64512&t.charCodeAt(n))==55296&&!(n<0||n+1>=t.length)&&(64512&t.charCodeAt(n+1))==56320}function X_(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function U_(t){return t.length===1?"0"+t:t}function H_(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}en.inherits=tp,en.toArray=function(t,n){if(Array.isArray(t))return t.slice();if(!t)return[];var e=[];if(typeof t=="string")if(n){if(n==="hex")for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),a=0;a>6|192,e[r++]=63&i|128):ep(t,a)?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++a)),e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128)}else for(a=0;a>>0}return i},en.split32=function(t,n){for(var e=new Array(4*t.length),r=0,a=0;r>>24,e[a+1]=i>>>16&255,e[a+2]=i>>>8&255,e[a+3]=255&i):(e[a+3]=i>>>24,e[a+2]=i>>>16&255,e[a+1]=i>>>8&255,e[a]=255&i)}return e},en.rotr32=function(t,n){return t>>>n|t<<32-n},en.rotl32=function(t,n){return t<>>32-n},en.sum32=function(t,n){return t+n>>>0},en.sum32_3=function(t,n,e){return t+n+e>>>0},en.sum32_4=function(t,n,e,r){return t+n+e+r>>>0},en.sum32_5=function(t,n,e,r,a){return t+n+e+r+a>>>0},en.sum64=function(t,n,e,r){var a=t[n],i=r+t[n+1]>>>0,s=(i>>0,t[n+1]=i},en.sum64_hi=function(t,n,e,r){return(n+r>>>0>>0},en.sum64_lo=function(t,n,e,r){return n+r>>>0},en.sum64_4_hi=function(t,n,e,r,a,i,s,o){var _=0,l=n;return _+=(l=l+r>>>0)>>0)>>0)>>0},en.sum64_4_lo=function(t,n,e,r,a,i,s,o){return n+r+i+o>>>0},en.sum64_5_hi=function(t,n,e,r,a,i,s,o,_,l){var u=0,f=n;return u+=(f=f+r>>>0)>>0)>>0)>>0)>>0},en.sum64_5_lo=function(t,n,e,r,a,i,s,o,_,l){return n+r+i+o+l>>>0},en.rotr64_hi=function(t,n,e){return(n<<32-e|t>>>e)>>>0},en.rotr64_lo=function(t,n,e){return(t<<32-e|n>>>e)>>>0},en.shr64_hi=function(t,n,e){return t>>>e},en.shr64_lo=function(t,n,e){return(t<<32-e|n>>>e)>>>0};var W_={},J_=en,rp=Xi;function ta(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}W_.BlockHash=ta,ta.prototype.update=function(t,n){if(t=J_.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var e=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-e,t.length),this.pending.length===0&&(this.pending=null),t=J_.join32(t,0,t.length-e,this.endian);for(var r=0;r>>24&255,r[a++]=t>>>16&255,r[a++]=t>>>8&255,r[a++]=255&t}else for(r[a++]=255&t,r[a++]=t>>>8&255,r[a++]=t>>>16&255,r[a++]=t>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,i=8;i>>3},ht.g1_256=function(t){return st(t,17)^st(t,19)^t>>>10};var ue=en,ap=W_,fe=ht,ip=Xi,Zn=ue.sum32,sp=ue.sum32_4,op=ue.sum32_5,_p=fe.ch32,lp=fe.maj32,cp=fe.s0_256,up=fe.s1_256,fp=fe.g0_256,mp=fe.g1_256,Q_=ap.BlockHash,dp=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ot(){if(!(this instanceof ot))return new ot;Q_.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=dp,this.W=new Array(64)}ue.inherits(ot,Q_);var pp=ot;ot.blockSize=512,ot.outSize=256,ot.hmacStrength=192,ot.padLength=64,ot.prototype._update=function(t,n){for(var e=this.W,r=0;r<16;r++)e[r]=t[n+r];for(;rhp();function Hi(t){if(!t)return null;if(typeof t=="string"&&(t=JSON.parse(t)),t.mappings==="")return{mappings:[],names:[],sources:[],version:3};const n=typeof t.mappings=="string"?ws.decode(t.mappings):t.mappings;return{...t,mappings:n}}async function gp(t,n,e,r,a){$n("render chunks",2),function(f){for(const m of f)m.facadeModule&&m.facadeModule.isUserDefinedEntryPoint&&m.getPreliminaryFileName()}(t);const i=await Promise.all(t.map(f=>f.render()));yn("render chunks",2),$n("transform chunks",2);const s=function(f){return Object.fromEntries(f.map(m=>{const h=m.getRenderedChunkInfo();return[h.fileName,h]}))}(t),{nonHashedChunksWithPlaceholders:o,renderedChunksByPlaceholder:_,hashDependenciesByPlaceholder:l}=await async function(f,m,h,v,p){const g=[],y=new Map,E=new Map,b=new Set;for(const{preliminaryFileName:{hashPlaceholder:x}}of f)x&&b.add(x);return await Promise.all(f.map(async({chunk:x,preliminaryFileName:{fileName:$,hashPlaceholder:S},magicString:A,usedModules:N})=>{const k={chunk:x,fileName:$,...await bp(A,$,N,m,h,v,p)},{code:I}=k;if(S){const{containedPlaceholders:R,transformedCode:P}=Fd(I,b),F=Ke().update(P),D=v.hookReduceValueSync("augmentChunkHash","",[x.getRenderedChunkInfo()],(z,w)=>(w&&(z+=w),z));D&&F.update(D),y.set(S,k),E.set(S,{containedPlaceholders:R,contentHash:F.digest("hex")})}else g.push(k)})),{hashDependenciesByPlaceholder:E,nonHashedChunksWithPlaceholders:g,renderedChunksByPlaceholder:y}}(i,s,r,e,a),u=function(f,m,h){const v=new Map;for(const[p,{fileName:g}]of f){let y=Ke();const E=new Set([p]);for(const $ of E){const{containedPlaceholders:S,contentHash:A}=m.get($);y.update(A);for(const N of S)E.add(N)}let b,x;do x&&(y=Ke().update(x)),x=y.digest("hex").slice(0,p.length),b=Bd(g,p,x);while(h[Zr].has(b.toLowerCase()));h[b]=qi,v.set(p,x)}return v}(_,l,n);(function(f,m,h,v,p,g){for(const{chunk:y,code:E,fileName:b,map:x}of f.values()){let $=Je(E,m);const S=Je(b,m);x&&(x.file=Je(x.file,m),$+=nl(S,x,p,g)),h[S]=y.finalizeChunk($,x,m)}for(const{chunk:y,code:E,fileName:b,map:x}of v){let $=m.size>0?Je(E,m):E;x&&($+=nl(b,x,p,g)),h[b]=y.finalizeChunk($,x,m)}})(_,u,n,o,e,r),yn("transform chunks",2)}async function bp(t,n,e,r,a,i,s){let o=null;const _=[];let l=await i.hookReduceArg0("renderChunk",[t.toString(),r[n],a,{chunks:r}],(E,b,x)=>{if(b==null)return E;if(typeof b=="string"&&(b={code:b,map:void 0}),b.map!==null){const $=Hi(b.map);_.push($||{missing:!0,plugin:x.name})}return b.code});const{compact:u,dir:f,file:m,sourcemap:h,sourcemapExcludeSources:v,sourcemapFile:p,sourcemapPathTransform:g,sourcemapIgnoreList:y}=a;if(u||l[l.length-1]===`
-`||(l+=`
-`),h){let E;$n("sourcemaps",3),E=m?Jn(p||m):f?Jn(f,n):Jn(n),o=function(b,x,$,S,A,N){const k=R_(N),I=$.filter(T=>!T.excludeFromSourcemap).map(T=>q_(T.id,T.originalCode,T.originalSourcemap,T.sourcemapChain,k)),R=new na(x,I),P=S.reduce(k,R);let{sources:F,sourcesContent:D,names:z,mappings:w}=P.traceMappings();if(b){const T=Mt(b);F=F.map(B=>ne(T,B)),b=ft(b)}return D=A?null:D,new mr({file:b,mappings:w,names:z,sources:F,sourcesContent:D})}(E,t.generateDecodedMap({}),e,_,v,s);for(let b=0;b{const i=new Set;return new Proxy(a,{deleteProperty:(s,o)=>(typeof o=="string"&&i.delete(o.toLowerCase()),Reflect.deleteProperty(s,o)),get:(s,o)=>o===Zr?i:Reflect.get(s,o),set:(s,o,_)=>(typeof o=="string"&&i.add(o.toLowerCase()),Reflect.set(s,o,_))})})(e);this.pluginDriver.setOutputBundle(r,this.outputOptions);try{$n("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),yn("initialize render",2),$n("generate chunks",2);const a=(()=>{let s=0;return(o,_=8)=>{if(_>64)return L(Mn(`Hashes cannot be longer than 64 characters, received ${_}. Check the "${o}" option.`));const l=`${Fi}${Tr(++s).padStart(_-5,"0")}${Gi}`;return l.length>_?L(Mn(`To generate hashes for this number of chunks (currently ${s}), you need a minimum hash size of ${l.length}, received ${_}. Check the "${o}" option.`)):l}})(),i=await this.generateChunks(r,a);i.length>1&&function(s,o){if(s.format==="umd"||s.format==="iife")return L(vn("output.format",Fs,"UMD and IIFE output formats are not supported for code-splitting builds",s.format));if(typeof s.file=="string")return L(vn("output.file",Ce,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(s.sourcemapFile)return L(vn("output.sourcemapFile",Zf,'"output.sourcemapFile" is only supported for single-file builds'));!s.amd.autoId&&s.amd.id&&o(V,vn("output.amd.id",Bs,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const s of i)s.generateExports();yn("generate chunks",2),await gp(i,r,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(a){throw await this.pluginDriver.hookParallel("renderError",[a]),a}return(a=>{const i=new Set,s=Object.values(a);for(const o of s)o.type==="asset"&&o.needsCodeReference&&i.add(o.fileName);for(const o of s)if(o.type==="chunk")for(const _ of o.referencedFiles)i.has(_)&&i.delete(_);for(const o of i)delete a[o]})(r),$n("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,r,n]),this.finaliseAssets(r),yn("generate bundle",2),yn("GENERATE",1),e}async addManualChunks(n){const e=new Map,r=await Promise.all(Object.entries(n).map(async([a,i])=>({alias:a,entries:await this.graph.moduleLoader.addAdditionalModules(i)})));for(const{alias:a,entries:i}of r)for(const s of i)tl(a,s,e);return e}assignManualChunks(n){const e=[],r={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values())if(i instanceof hn){const s=n(i.id,r);typeof s=="string"&&e.push([s,i])}e.sort(([i],[s])=>i>s?1:i`${F?"async ":""}function${D?` ${D}`:""}${x}(${P.join(`,${x}`)})${x}`,k=g?(P,{isAsync:F,name:D})=>{const z=P.length===1;return`${D?`${A} ${D}${x}=${x}`:""}${F?`async${z?" ":x}`:""}${z?P[0]:`(${P.join(`,${x}`)})`}${x}=>${x}`}:N,I=(P,{functionReturn:F,lineBreakIndent:D,name:z})=>[`${k(P,{isAsync:!1,name:z})}${g?D?`${$}${D.base}${D.t}`:"":`{${D?`${$}${D.base}${D.t}`:x}${F?"return ":""}`}`,g?`${z?";":""}${D?`${$}${D.base}`:""}`:`${S}${D?`${$}${D.base}`:x}}`],R=b?P=>F_.test(P):P=>!vr.has(P)&&F_.test(P);return{_:x,cnst:A,getDirectReturnFunction:I,getDirectReturnIifeLeft:(P,F,{needsArrowReturnParens:D,needsWrappedFunction:z})=>{const[w,T]=I(P,{functionReturn:!0,lineBreakIndent:null,name:null});return`${B_(`${w}${B_(F,g&&D)}${T}`,g||z)}(`},getFunctionIntro:k,getNonArrowFunctionIntro:N,getObject(P,{lineBreakIndent:F}){const D=F?`${$}${F.base}${F.t}`:x;return`{${P.map(([z,w])=>{if(z===null)return`${D}${w}`;const T=!R(z);return z===w&&E&&!T?D+z:`${D}${T?`'${z}'`:z}:${x}${w}`}).join(",")}${P.length===0?"":F?`${$}${F.base}`:x}}`},getPropertyAccess:P=>R(P)?`.${P}`:`[${JSON.stringify(P)}]`,n:$,s:S}}(this.outputOptions),l=function(p){const g=[];for(const y of p.values())y instanceof hn&&(y.isIncluded()||y.info.isEntry||y.includedDynamicImporters.length>0)&&g.push(y);return g}(this.graph.modulesById),u=function(p){if(p.length===0)return"/";if(p.length===1)return Mt(p[0]);const g=p.slice(1).reduce((y,E)=>{const b=E.split(/\/+|\\+/);let x;for(x=0;y[x]===b[x]&&x1?g.join("/"):"/"}(function(p,g){const y=[];for(const E of p)(E.info.isEntry||g)&&vt(E.id)&&y.push(E.id);return y}(l,s)),f=function(p,g,y){const E=new Map;for(const b of p.values())b instanceof fn&&E.set(b,new te(b,g,y));return E}(this.graph.modulesById,this.outputOptions,u),m=[],h=new Map;for(const{alias:p,modules:g}of a?[{alias:null,modules:l}]:s?l.map(y=>({alias:null,modules:[y]})):Xd(this.graph.entryModules,o,r,this.inputOptions.onLog)){g.sort(Yd);const y=new At(g,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,f,this.facadeChunkByModule,this.includedNamespaces,p,e,n,u,_);m.push(y)}for(const p of m)p.link();const v=[];for(const p of m)v.push(...p.generateFacades());return[...m,...v]}}function tl(t,n,e){const r=e.get(n);if(typeof r=="string"&&r!==t)return L((a=n.id,i=t,s=r,{code:cm,message:`Cannot assign "${H(a)}" to the "${i}" chunk as it is already in the "${s}" chunk.`}));var a,i,s;e.set(n,t)}var yp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],el=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],rl="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Wi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ji="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",xp={5:Ji,"5module":Ji+" export import",6:Ji+" const class extends export import super"},$p=/^in(stanceof)?$/,Ep=new RegExp("["+rl+"]"),kp=new RegExp("["+rl+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function Ki(t,n){for(var e=65536,r=0;rt)return!1;if((e+=n[r+1])>=t)return!0}return!1}function _t(t,n){return t<65?t===36:t<91||(t<97?t===95:t<123||(t<=65535?t>=170&&Ep.test(String.fromCharCode(t)):n!==!1&&Ki(t,el)))}function Wt(t,n){return t<48?t===36:t<58||!(t<65)&&(t<91||(t<97?t===95:t<123||(t<=65535?t>=170&&kp.test(String.fromCharCode(t)):n!==!1&&(Ki(t,el)||Ki(t,yp)))))}var Q=function(t,n){n===void 0&&(n={}),this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function Xn(t,n){return new Q(t,{beforeExpr:!0,binop:n})}var Un={beforeExpr:!0},Pn={startsExpr:!0},ea={};function Z(t,n){return n===void 0&&(n={}),n.keyword=t,ea[t]=new Q(t,n)}var d={num:new Q("num",Pn),regexp:new Q("regexp",Pn),string:new Q("string",Pn),name:new Q("name",Pn),privateId:new Q("privateId",Pn),eof:new Q("eof"),bracketL:new Q("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Q("]"),braceL:new Q("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Q("}"),parenL:new Q("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Q(")"),comma:new Q(",",Un),semi:new Q(";",Un),colon:new Q(":",Un),dot:new Q("."),question:new Q("?",Un),questionDot:new Q("?."),arrow:new Q("=>",Un),template:new Q("template"),invalidTemplate:new Q("invalidTemplate"),ellipsis:new Q("...",Un),backQuote:new Q("`",Pn),dollarBraceL:new Q("${",{beforeExpr:!0,startsExpr:!0}),eq:new Q("=",{beforeExpr:!0,isAssign:!0}),assign:new Q("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Q("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Q("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Xn("||",1),logicalAND:Xn("&&",2),bitwiseOR:Xn("|",3),bitwiseXOR:Xn("^",4),bitwiseAND:Xn("&",5),equality:Xn("==/!=/===/!==",6),relational:Xn(">/<=/>=",7),bitShift:Xn("<>>/>>>",8),plusMin:new Q("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Xn("%",10),star:Xn("*",10),slash:Xn("/",10),starstar:new Q("**",{beforeExpr:!0}),coalesce:Xn("??",1),_break:Z("break"),_case:Z("case",Un),_catch:Z("catch"),_continue:Z("continue"),_debugger:Z("debugger"),_default:Z("default",Un),_do:Z("do",{isLoop:!0,beforeExpr:!0}),_else:Z("else",Un),_finally:Z("finally"),_for:Z("for",{isLoop:!0}),_function:Z("function",Pn),_if:Z("if"),_return:Z("return",Un),_switch:Z("switch"),_throw:Z("throw",Un),_try:Z("try"),_var:Z("var"),_const:Z("const"),_while:Z("while",{isLoop:!0}),_with:Z("with"),_new:Z("new",{beforeExpr:!0,startsExpr:!0}),_this:Z("this",Pn),_super:Z("super",Pn),_class:Z("class",Pn),_extends:Z("extends",Un),_export:Z("export"),_import:Z("import",Pn),_null:Z("null",Pn),_true:Z("true",Pn),_false:Z("false",Pn),_in:Z("in",{beforeExpr:!0,binop:7}),_instanceof:Z("instanceof",{beforeExpr:!0,binop:7}),_typeof:Z("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Z("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Z("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Gn=/\r\n?|\n|\u2028|\u2029/,al=new RegExp(Gn.source,"g");function Jt(t){return t===10||t===13||t===8232||t===8233}function il(t,n,e){e===void 0&&(e=t.length);for(var r=n;r>10),56320+(1023&t)))}var Sp=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,me=function(t,n){this.line=t,this.column=n};me.prototype.offset=function(t){return new me(this.line,this.column+t)};var Ze=function(t,n,e){this.start=n,this.end=e,t.sourceFile!==null&&(this.source=t.sourceFile)};function Zi(t,n){for(var e=1,r=0;;){var a=il(t,r,n);if(a<0)return new me(e,n-r);++e,r=a}}var ra={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},_l=!1;function Ap(t){var n={};for(var e in ra)n[e]=t&&Ye(t,e)?t[e]:ra[e];if(n.ecmaVersion==="latest"?n.ecmaVersion=1e8:n.ecmaVersion==null?(!_l&&typeof console=="object"&&console.warn&&(_l=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
-Defaulting to 2020, but this will stop working in the future.`)),n.ecmaVersion=11):n.ecmaVersion>=2015&&(n.ecmaVersion-=2009),n.allowReserved==null&&(n.allowReserved=n.ecmaVersion<5),t&&t.allowHashBang!=null||(n.allowHashBang=n.ecmaVersion>=14),ol(n.onToken)){var r=n.onToken;n.onToken=function(a){return r.push(a)}}return ol(n.onComment)&&(n.onComment=function(a,i){return function(s,o,_,l,u,f){var m={type:s?"Block":"Line",value:o,start:_,end:l};a.locations&&(m.loc=new Ze(this,u,f)),a.ranges&&(m.range=[_,l]),i.push(m)}}(n,n.onComment)),n}var ll=256;function Qi(t,n){return 2|(t?4:0)|(n?8:0)}var dn=function(t,n,e){this.options=t=Ap(t),this.sourceFile=t.sourceFile,this.keywords=Kt(xp[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Wi[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=Kt(r);var a=(r?r+" ":"")+Wi.strict;this.reservedWordsStrict=Kt(a),this.reservedWordsStrictBind=Kt(a+" "+Wi.strictBind),this.input=String(n),this.containsEsc=!1,e?(this.pos=e,this.lineStart=this.input.lastIndexOf(`
-`,e-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Gn).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=d.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},lt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};dn.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},lt.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},lt.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},lt.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},lt.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var n=this.scopeStack[t];if(n.inClassFieldInit||n.flags&ll)return!1;if(2&n.flags)return(4&n.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},lt.allowSuper.get=function(){var t=this.currentThisScope(),n=t.flags,e=t.inClassFieldInit;return(64&n)>0||e||this.options.allowSuperOutsideMethod},lt.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},lt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},lt.allowNewDotTarget.get=function(){var t=this.currentThisScope(),n=t.flags,e=t.inClassFieldInit;return(258&n)>0||e},lt.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ll)>0},dn.extend=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];for(var e=this,r=0;r=,?^&]/.test(a)||a==="!"&&this.input.charAt(r+1)==="=")}t+=n[0].length,Hn.lastIndex=t,t+=Hn.exec(this.input)[0].length,this.input[t]===";"&&t++}},Ln.eat=function(t){return this.type===t&&(this.next(),!0)},Ln.isContextual=function(t){return this.type===d.name&&this.value===t&&!this.containsEsc},Ln.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},Ln.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},Ln.canInsertSemicolon=function(){return this.type===d.eof||this.type===d.braceR||Gn.test(this.input.slice(this.lastTokEnd,this.start))},Ln.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ln.semicolon=function(){this.eat(d.semi)||this.insertSemicolon()||this.unexpected()},Ln.afterTrailingComma=function(t,n){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),n||this.next(),!0},Ln.expect=function(t){this.eat(t)||this.unexpected()},Ln.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};var aa=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ln.checkPatternErrors=function(t,n){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var e=n?t.parenthesizedAssign:t.parenthesizedBind;e>-1&&this.raiseRecoverable(e,n?"Assigning to rvalue":"Parenthesized pattern")}},Ln.checkExpressionErrors=function(t,n){if(!t)return!1;var e=t.shorthandAssign,r=t.doubleProto;if(!n)return e>=0||r>=0;e>=0&&this.raise(e,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Ln.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&r<56320)return!0;if(_t(r,!0)){for(var a=e+1;Wt(r=this.input.charCodeAt(a),!0);)++a;if(r===92||r>55295&&r<56320)return!0;var i=this.input.slice(e,a);if(!$p.test(i))return!0}return!1},q.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Hn.lastIndex=this.pos;var t,n=Hn.exec(this.input),e=this.pos+n[0].length;return!(Gn.test(this.input.slice(this.pos,e))||this.input.slice(e,e+8)!=="function"||e+8!==this.input.length&&(Wt(t=this.input.charCodeAt(e+8))||t>55295&&t<56320))},q.parseStatement=function(t,n,e){var r,a=this.type,i=this.startNode();switch(this.isLet(t)&&(a=d._var,r="let"),a){case d._break:case d._continue:return this.parseBreakContinueStatement(i,a.keyword);case d._debugger:return this.parseDebuggerStatement(i);case d._do:return this.parseDoStatement(i);case d._for:return this.parseForStatement(i);case d._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!t);case d._class:return t&&this.unexpected(),this.parseClass(i,!0);case d._if:return this.parseIfStatement(i);case d._return:return this.parseReturnStatement(i);case d._switch:return this.parseSwitchStatement(i);case d._throw:return this.parseThrowStatement(i);case d._try:return this.parseTryStatement(i);case d._const:case d._var:return r=r||this.value,t&&r!=="var"&&this.unexpected(),this.parseVarStatement(i,r);case d._while:return this.parseWhileStatement(i);case d._with:return this.parseWithStatement(i);case d.braceL:return this.parseBlock(!0,i);case d.semi:return this.parseEmptyStatement(i);case d._export:case d._import:if(this.options.ecmaVersion>10&&a===d._import){Hn.lastIndex=this.pos;var s=Hn.exec(this.input),o=this.pos+s[0].length,_=this.input.charCodeAt(o);if(_===40||_===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(n||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===d._import?this.parseImport(i):this.parseExport(i,e);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!t);var l=this.value,u=this.parseExpression();return a===d.name&&u.type==="Identifier"&&this.eat(d.colon)?this.parseLabeledStatement(i,l,u,t):this.parseExpressionStatement(i,u)}},q.parseBreakContinueStatement=function(t,n){var e=n==="break";this.next(),this.eat(d.semi)||this.insertSemicolon()?t.label=null:this.type!==d.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(d.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},q.parseForStatement=function(t){this.next();var n=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ns),this.enterScope(0),this.expect(d.parenL),this.type===d.semi)return n>-1&&this.unexpected(n),this.parseFor(t,null);var e=this.isLet();if(this.type===d._var||this.type===d._const||e){var r=this.startNode(),a=e?"let":this.value;return this.next(),this.parseVar(r,!0,a),this.finishNode(r,"VariableDeclaration"),(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===d._in?n>-1&&this.unexpected(n):t.await=n>-1),this.parseForIn(t,r)):(n>-1&&this.unexpected(n),this.parseFor(t,r))}var i=this.isContextual("let"),s=!1,o=new aa,_=this.parseExpression(!(n>-1)||"await",o);return this.type===d._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===d._in?n>-1&&this.unexpected(n):t.await=n>-1),i&&s&&this.raise(_.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(_,!1,o),this.checkLValPattern(_),this.parseForIn(t,_)):(this.checkExpressionErrors(o,!0),n>-1&&this.unexpected(n),this.parseFor(t,_))},q.parseFunctionStatement=function(t,n,e){return this.next(),this.parseFunction(t,Qe|(e?0:ts),!1,n)},q.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(d._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},q.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(d.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},q.parseSwitchStatement=function(t){var n;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(d.braceL),this.labels.push(Np),this.enterScope(0);for(var e=!1;this.type!==d.braceR;)if(this.type===d._case||this.type===d._default){var r=this.type===d._case;n&&this.finishNode(n,"SwitchCase"),t.cases.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(e&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),e=!0,n.test=null),this.expect(d.colon)}else n||this.unexpected(),n.consequent.push(this.parseStatement(null));return this.exitScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},q.parseThrowStatement=function(t){return this.next(),Gn.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Tp=[];q.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===d._catch){var n=this.startNode();if(this.next(),this.eat(d.parenL)){n.param=this.parseBindingAtom();var e=n.param.type==="Identifier";this.enterScope(e?32:0),this.checkLValPattern(n.param,e?4:2),this.expect(d.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),n.param=null,this.enterScope(0);n.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(n,"CatchClause")}return t.finalizer=this.eat(d._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},q.parseVarStatement=function(t,n){return this.next(),this.parseVar(t,!1,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")},q.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ns),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},q.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},q.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},q.parseLabeledStatement=function(t,n,e,r){for(var a=0,i=this.labels;a=0;o--){var _=this.labels[o];if(_.statementStart!==t.start)break;_.statementStart=this.start,_.kind=s}return this.labels.push({name:n,kind:s,statementStart:this.start}),t.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),t.label=e,this.finishNode(t,"LabeledStatement")},q.parseExpressionStatement=function(t,n){return t.expression=n,this.semicolon(),this.finishNode(t,"ExpressionStatement")},q.parseBlock=function(t,n,e){for(t===void 0&&(t=!0),n===void 0&&(n=this.startNode()),n.body=[],this.expect(d.braceL),t&&this.enterScope(0);this.type!==d.braceR;){var r=this.parseStatement(null);n.body.push(r)}return e&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(n,"BlockStatement")},q.parseFor=function(t,n){return t.init=n,this.expect(d.semi),t.test=this.type===d.semi?null:this.parseExpression(),this.expect(d.semi),t.update=this.type===d.parenR?null:this.parseExpression(),this.expect(d.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},q.parseForIn=function(t,n){var e=this.type===d._in;return this.next(),n.type==="VariableDeclaration"&&n.declarations[0].init!=null&&(!e||this.options.ecmaVersion<8||this.strict||n.kind!=="var"||n.declarations[0].id.type!=="Identifier")&&this.raise(n.start,(e?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=n,t.right=e?this.parseExpression():this.parseMaybeAssign(),this.expect(d.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,e?"ForInStatement":"ForOfStatement")},q.parseVar=function(t,n,e){for(t.declarations=[],t.kind=e;;){var r=this.startNode();if(this.parseVarId(r,e),this.eat(d.eq)?r.init=this.parseMaybeAssign(n):e!=="const"||this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r.id.type==="Identifier"||n&&(this.type===d._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(d.comma))break}return t},q.parseVarId=function(t,n){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,n==="var"?1:2,!1)};var Qe=1,ts=2;function jp(t,n){var e=n.key.name,r=t[e],a="true";return n.type!=="MethodDefinition"||n.kind!=="get"&&n.kind!=="set"||(a=(n.static?"s":"i")+n.kind),r==="iget"&&a==="iset"||r==="iset"&&a==="iget"||r==="sget"&&a==="sset"||r==="sset"&&a==="sget"?(t[e]="true",!1):!!r||(t[e]=a,!1)}function ia(t,n){var e=t.computed,r=t.key;return!e&&(r.type==="Identifier"&&r.name===n||r.type==="Literal"&&r.value===n)}q.parseFunction=function(t,n,e,r,a){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===d.star&&n&ts&&this.unexpected(),t.generator=this.eat(d.star)),this.options.ecmaVersion>=8&&(t.async=!!r),n&Qe&&(t.id=4&n&&this.type!==d.name?null:this.parseIdent(),!t.id||n&ts||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Qi(t.async,t.generator)),n&Qe||(t.id=this.type===d.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,e,!1,a),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,n&Qe?"FunctionDeclaration":"FunctionExpression")},q.parseFunctionParams=function(t){this.expect(d.parenL),t.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},q.parseClass=function(t,n){this.next();var e=this.strict;this.strict=!0,this.parseClassId(t,n),this.parseClassSuper(t);var r=this.enterClassBody(),a=this.startNode(),i=!1;for(a.body=[],this.expect(d.braceL);this.type!==d.braceR;){var s=this.parseClassElement(t.superClass!==null);s&&(a.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0):s.key&&s.key.type==="PrivateIdentifier"&&jp(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=e,this.next(),t.body=this.finishNode(a,"ClassBody"),this.exitClassBody(),this.finishNode(t,n?"ClassDeclaration":"ClassExpression")},q.parseClassElement=function(t){if(this.eat(d.semi))return null;var n=this.options.ecmaVersion,e=this.startNode(),r="",a=!1,i=!1,s="method",o=!1;if(this.eatContextual("static")){if(n>=13&&this.eat(d.braceL))return this.parseClassStaticBlock(e),e;this.isClassElementNameStart()||this.type===d.star?o=!0:r="static"}if(e.static=o,!r&&n>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==d.star||this.canInsertSemicolon()?r="async":i=!0),!r&&(n>=9||!i)&&this.eat(d.star)&&(a=!0),!r&&!i&&!a){var _=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=_:r=_)}if(r?(e.computed=!1,e.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),e.key.name=r,this.finishNode(e.key,"Identifier")):this.parseClassElementName(e),n<13||this.type===d.parenL||s!=="method"||a||i){var l=!e.static&&ia(e,"constructor"),u=l&&t;l&&s!=="method"&&this.raise(e.key.start,"Constructor can't have get/set modifier"),e.kind=l?"constructor":s,this.parseClassMethod(e,a,i,u)}else this.parseClassField(e);return e},q.isClassElementNameStart=function(){return this.type===d.name||this.type===d.privateId||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword},q.parseClassElementName=function(t){this.type===d.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},q.parseClassMethod=function(t,n,e,r){var a=t.key;t.kind==="constructor"?(n&&this.raise(a.start,"Constructor can't be a generator"),e&&this.raise(a.start,"Constructor can't be an async method")):t.static&&ia(t,"prototype")&&this.raise(a.start,"Classes may not have a static property named prototype");var i=t.value=this.parseMethod(n,e,r);return t.kind==="get"&&i.params.length!==0&&this.raiseRecoverable(i.start,"getter should have no params"),t.kind==="set"&&i.params.length!==1&&this.raiseRecoverable(i.start,"setter should have exactly one param"),t.kind==="set"&&i.params[0].type==="RestElement"&&this.raiseRecoverable(i.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},q.parseClassField=function(t){if(ia(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&ia(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(d.eq)){var n=this.currentThisScope(),e=n.inClassFieldInit;n.inClassFieldInit=!0,t.value=this.parseMaybeAssign(),n.inClassFieldInit=e}else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")},q.parseClassStaticBlock=function(t){t.body=[];var n=this.labels;for(this.labels=[],this.enterScope(320);this.type!==d.braceR;){var e=this.parseStatement(null);t.body.push(e)}return this.next(),this.exitScope(),this.labels=n,this.finishNode(t,"StaticBlock")},q.parseClassId=function(t,n){this.type===d.name?(t.id=this.parseIdent(),n&&this.checkLValSimple(t.id,2,!1)):(n===!0&&this.unexpected(),t.id=null)},q.parseClassSuper=function(t){t.superClass=this.eat(d._extends)?this.parseExprSubscripts(null,!1):null},q.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},q.exitClassBody=function(){for(var t=this.privateNameStack.pop(),n=t.declared,e=t.used,r=this.privateNameStack.length,a=r===0?null:this.privateNameStack[r-1],i=0;i=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(n,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==d.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(d._default)){var e;if(this.checkExport(n,"default",this.lastTokStart),this.type===d._function||(e=this.isAsyncFunction())){var r=this.startNode();this.next(),e&&this.next(),t.declaration=this.parseFunction(r,4|Qe,!1,e)}else if(this.type===d._class){var a=this.startNode();t.declaration=this.parseClass(a,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(n,t.declaration.declarations):this.checkExport(n,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(n),this.eatContextual("from"))this.type!==d.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var i=0,s=t.specifiers;i=13&&this.type===d.string){var t=this.parseLiteral(this.value);return Sp.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},q.adaptDirectivePrologue=function(t){for(var n=0;n=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var Qn=dn.prototype;Qn.toAssignable=function(t,n,e){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",e&&this.checkPatternErrors(e,!0);for(var r=0,a=t.properties;r=6)switch(this.type){case d.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(d.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case d.braceL:return this.parseObj(!0)}return this.parseIdent()},Qn.parseBindingList=function(t,n,e){for(var r=[],a=!0;!this.eat(t);)if(a?a=!1:this.expect(d.comma),n&&this.type===d.comma)r.push(null);else{if(e&&this.afterTrailingComma(t))break;if(this.type===d.ellipsis){var i=this.parseRestBinding();this.parseBindingListItem(i),r.push(i),this.type===d.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}var s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),r.push(s)}return r},Qn.parseBindingListItem=function(t){return t},Qn.parseMaybeDefault=function(t,n,e){if(e=e||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(d.eq))return e;var r=this.startNodeAt(t,n);return r.left=e,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},Qn.checkLValSimple=function(t,n,e){n===void 0&&(n=0);var r=n!==0;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(n===2&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),e&&(Ye(e,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),e[t.name]=!0),n!==5&&this.declareName(t.name,n,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,n,e);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}},Qn.checkLValPattern=function(t,n,e){switch(n===void 0&&(n=0),t.type){case"ObjectPattern":for(var r=0,a=t.properties;r=1;t--){var n=this.context[t];if(n.token==="function")return n.generator}return!1},de.updateContext=function(t){var n,e=this.type;e.keyword&&t===d.dot?this.exprAllowed=!1:(n=e.updateContext)?n.call(this,t):this.exprAllowed=e.beforeExpr},de.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length!==1){var t=this.context.pop();t===un.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},d.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?un.b_stat:un.b_expr),this.exprAllowed=!0},d.dollarBraceL.updateContext=function(){this.context.push(un.b_tmpl),this.exprAllowed=!0},d.parenL.updateContext=function(t){var n=t===d._if||t===d._for||t===d._with||t===d._while;this.context.push(n?un.p_stat:un.p_expr),this.exprAllowed=!0},d.incDec.updateContext=function(){},d._function.updateContext=d._class.updateContext=function(t){!t.beforeExpr||t===d._else||t===d.semi&&this.curContext()!==un.p_stat||t===d._return&&Gn.test(this.input.slice(this.lastTokEnd,this.start))||(t===d.colon||t===d.braceL)&&this.curContext()===un.b_stat?this.context.push(un.f_stat):this.context.push(un.f_expr),this.exprAllowed=!1},d.backQuote.updateContext=function(){this.curContext()===un.q_tmpl?this.context.pop():this.context.push(un.q_tmpl),this.exprAllowed=!1},d.star.updateContext=function(t){if(t===d._function){var n=this.context.length-1;this.context[n]===un.f_expr?this.context[n]=un.f_expr_gen:this.context[n]=un.f_gen}this.exprAllowed=!0},d.name.updateContext=function(t){var n=!1;this.options.ecmaVersion>=6&&t!==d.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(n=!0),this.exprAllowed=n};var W=dn.prototype;function cl(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&cl(t.expression)}W.checkPropClash=function(t,n,e){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement"||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var r,a=t.key;switch(a.type){case"Identifier":r=a.name;break;case"Literal":r=String(a.value);break;default:return}var i=t.kind;if(this.options.ecmaVersion>=6)r==="__proto__"&&i==="init"&&(n.proto&&(e?e.doubleProto<0&&(e.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),n.proto=!0);else{var s=n[r="$"+r];s?(i==="init"?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(a.start,"Redefinition of property"):s=n[r]={init:!1,get:!1,set:!1},s[i]=!0}}},W.parseExpression=function(t,n){var e=this.start,r=this.startLoc,a=this.parseMaybeAssign(t,n);if(this.type===d.comma){var i=this.startNodeAt(e,r);for(i.expressions=[a];this.eat(d.comma);)i.expressions.push(this.parseMaybeAssign(t,n));return this.finishNode(i,"SequenceExpression")}return a},W.parseMaybeAssign=function(t,n,e){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var r=!1,a=-1,i=-1,s=-1;n?(a=n.parenthesizedAssign,i=n.trailingComma,s=n.doubleProto,n.parenthesizedAssign=n.trailingComma=-1):(n=new aa,r=!0);var o=this.start,_=this.startLoc;this.type!==d.parenL&&this.type!==d.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");var l=this.parseMaybeConditional(t,n);if(e&&(l=e.call(this,l,o,_)),this.type.isAssign){var u=this.startNodeAt(o,_);return u.operator=this.value,this.type===d.eq&&(l=this.toAssignable(l,!1,n)),r||(n.parenthesizedAssign=n.trailingComma=n.doubleProto=-1),n.shorthandAssign>=l.start&&(n.shorthandAssign=-1),this.type===d.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(t),s>-1&&(n.doubleProto=s),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(n,!0),a>-1&&(n.parenthesizedAssign=a),i>-1&&(n.trailingComma=i),l},W.parseMaybeConditional=function(t,n){var e=this.start,r=this.startLoc,a=this.parseExprOps(t,n);if(this.checkExpressionErrors(n))return a;if(this.eat(d.question)){var i=this.startNodeAt(e,r);return i.test=a,i.consequent=this.parseMaybeAssign(),this.expect(d.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return a},W.parseExprOps=function(t,n){var e=this.start,r=this.startLoc,a=this.parseMaybeUnary(n,!1,!1,t);return this.checkExpressionErrors(n)||a.start===e&&a.type==="ArrowFunctionExpression"?a:this.parseExprOp(a,e,r,-1,t)},W.parseExprOp=function(t,n,e,r,a){var i=this.type.binop;if(i!=null&&(!a||this.type!==d._in)&&i>r){var s=this.type===d.logicalOR||this.type===d.logicalAND,o=this.type===d.coalesce;o&&(i=d.logicalAND.binop);var _=this.value;this.next();var l=this.start,u=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,a),l,u,i,a),m=this.buildBinary(n,e,t,f,_,s||o);return(s&&this.type===d.coalesce||o&&(this.type===d.logicalOR||this.type===d.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(m,n,e,r,a)}return t},W.buildBinary=function(t,n,e,r,a,i){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(t,n);return s.left=e,s.operator=a,s.right=r,this.finishNode(s,i?"LogicalExpression":"BinaryExpression")},W.parseMaybeUnary=function(t,n,e,r){var a,i=this.start,s=this.startLoc;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(r),n=!0;else if(this.type.prefix){var o=this.startNode(),_=this.type===d.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,_,r),this.checkExpressionErrors(t,!0),_?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&o.argument.type==="Identifier"?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&cl(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):n=!0,a=this.finishNode(o,_?"UpdateExpression":"UnaryExpression")}else if(n||this.type!==d.privateId){if(a=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,s);l.operator=this.value,l.prefix=!1,l.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(l,"UpdateExpression")}}else(r||this.privateNameStack.length===0)&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==d._in&&this.unexpected();return e||!this.eat(d.starstar)?a:n?void this.unexpected(this.lastTokStart):this.buildBinary(i,s,a,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},W.parseExprSubscripts=function(t,n){var e=this.start,r=this.startLoc,a=this.parseExprAtom(t,n);if(a.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return a;var i=this.parseSubscripts(a,e,r,!1,n);return t&&i.type==="MemberExpression"&&(t.parenthesizedAssign>=i.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=i.start&&(t.parenthesizedBind=-1),t.trailingComma>=i.start&&(t.trailingComma=-1)),i},W.parseSubscripts=function(t,n,e,r,a){for(var i=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,s=!1;;){var o=this.parseSubscript(t,n,e,r,i,s,a);if(o.optional&&(s=!0),o===t||o.type==="ArrowFunctionExpression"){if(s){var _=this.startNodeAt(n,e);_.expression=o,o=this.finishNode(_,"ChainExpression")}return o}t=o}},W.parseSubscript=function(t,n,e,r,a,i,s){var o=this.options.ecmaVersion>=11,_=o&&this.eat(d.questionDot);r&&_&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(d.bracketL);if(l||_&&this.type!==d.parenL&&this.type!==d.backQuote||this.eat(d.dot)){var u=this.startNodeAt(n,e);u.object=t,l?(u.property=this.parseExpression(),this.expect(d.bracketR)):this.type===d.privateId&&t.type!=="Super"?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!=="never"),u.computed=!!l,o&&(u.optional=_),t=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat(d.parenL)){var f=new aa,m=this.yieldPos,h=this.awaitPos,v=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var p=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1,f);if(a&&!_&&!this.canInsertSemicolon()&&this.eat(d.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=m,this.awaitPos=h,this.awaitIdentPos=v,this.parseArrowExpression(this.startNodeAt(n,e),p,!0,s);this.checkExpressionErrors(f,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=v||this.awaitIdentPos;var g=this.startNodeAt(n,e);g.callee=t,g.arguments=p,o&&(g.optional=_),t=this.finishNode(g,"CallExpression")}else if(this.type===d.backQuote){(_||i)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(n,e);y.tag=t,y.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(y,"TaggedTemplateExpression")}return t},W.parseExprAtom=function(t,n){this.type===d.slash&&this.readRegexp();var e,r=this.potentialArrowAt===this.start;switch(this.type){case d._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),e=this.startNode(),this.next(),this.type!==d.parenL||this.allowDirectSuper||this.raise(e.start,"super() call outside constructor of a subclass"),this.type!==d.dot&&this.type!==d.bracketL&&this.type!==d.parenL&&this.unexpected(),this.finishNode(e,"Super");case d._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case d.name:var a=this.start,i=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&o.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function))return this.overrideContext(un.f_expr),this.parseFunction(this.startNodeAt(a,i),0,!1,!0,n);if(r&&!this.canInsertSemicolon()){if(this.eat(d.arrow))return this.parseArrowExpression(this.startNodeAt(a,i),[o],!1,n);if(this.options.ecmaVersion>=8&&o.name==="async"&&this.type===d.name&&!s&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(d.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,i),[o],!0,n)}return o;case d.regexp:var _=this.value;return(e=this.parseLiteral(_.value)).regex={pattern:_.pattern,flags:_.flags},e;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:return(e=this.startNode()).value=this.type===d._null?null:this.type===d._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case d.parenL:var l=this.start,u=this.parseParenAndDistinguishExpression(r,n);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(t.parenthesizedAssign=l),t.parenthesizedBind<0&&(t.parenthesizedBind=l)),u;case d.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(d.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case d.braceL:return this.overrideContext(un.b_expr),this.parseObj(!1,t);case d._function:return e=this.startNode(),this.next(),this.parseFunction(e,0);case d._class:return this.parseClass(this.startNode(),!1);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},W.parseExprImport=function(){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var n=this.parseIdent(!0);switch(this.type){case d.parenL:return this.parseDynamicImport(t);case d.dot:return t.meta=n,this.parseImportMeta(t);default:this.unexpected()}},W.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(d.parenR)){var n=this.start;this.eat(d.comma)&&this.eat(d.parenR)?this.raiseRecoverable(n,"Trailing comma is not allowed in import()"):this.unexpected(n)}return this.finishNode(t,"ImportExpression")},W.parseImportMeta=function(t){this.next();var n=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),n&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},W.parseLiteral=function(t){var n=this.startNode();return n.value=t,n.raw=this.input.slice(this.start,this.end),n.raw.charCodeAt(n.raw.length-1)===110&&(n.bigint=n.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(n,"Literal")},W.parseParenExpression=function(){this.expect(d.parenL);var t=this.parseExpression();return this.expect(d.parenR),t},W.parseParenAndDistinguishExpression=function(t,n){var e,r=this.start,a=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,_=this.startLoc,l=[],u=!0,f=!1,m=new aa,h=this.yieldPos,v=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==d.parenR;){if(u?u=!1:this.expect(d.comma),i&&this.afterTrailingComma(d.parenR,!0)){f=!0;break}if(this.type===d.ellipsis){s=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===d.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,m,this.parseParenItem))}var p=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(d.parenR),t&&!this.canInsertSemicolon()&&this.eat(d.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=v,this.parseParenArrowList(r,a,l,n);l.length&&!f||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(m,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=v||this.awaitPos,l.length>1?((e=this.startNodeAt(o,_)).expressions=l,this.finishNodeAt(e,"SequenceExpression",p,g)):e=l[0]}else e=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,a);return y.expression=e,this.finishNode(y,"ParenthesizedExpression")}return e},W.parseParenItem=function(t){return t},W.parseParenArrowList=function(t,n,e,r){return this.parseArrowExpression(this.startNodeAt(t,n),e,!1,r)};var Lp=[];W.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode(),n=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(d.dot)){t.meta=n;var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),e&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var r=this.start,a=this.startLoc,i=this.type===d._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),r,a,!0,!1),i&&t.callee.type==="ImportExpression"&&this.raise(r,"Cannot use new with import()"),this.eat(d.parenL)?t.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Lp,this.finishNode(t,"NewExpression")},W.parseTemplateElement=function(t){var n=t.isTagged,e=this.startNode();return this.type===d.invalidTemplate?(n||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),e.value={raw:this.value,cooked:null}):e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
-`),cooked:this.value},this.next(),e.tail=this.type===d.backQuote,this.finishNode(e,"TemplateElement")},W.parseTemplate=function(t){t===void 0&&(t={});var n=t.isTagged;n===void 0&&(n=!1);var e=this.startNode();this.next(),e.expressions=[];var r=this.parseTemplateElement({isTagged:n});for(e.quasis=[r];!r.tail;)this.type===d.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(d.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(d.braceR),e.quasis.push(r=this.parseTemplateElement({isTagged:n}));return this.next(),this.finishNode(e,"TemplateLiteral")},W.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!Gn.test(this.input.slice(this.lastTokEnd,this.start))},W.parseObj=function(t,n){var e=this.startNode(),r=!0,a={};for(e.properties=[],this.next();!this.eat(d.braceR);){if(r)r=!1;else if(this.expect(d.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR))break;var i=this.parseProperty(t,n);t||this.checkPropClash(i,a,n),e.properties.push(i)}return this.finishNode(e,t?"ObjectPattern":"ObjectExpression")},W.parseProperty=function(t,n){var e,r,a,i,s=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis))return t?(s.argument=this.parseIdent(!1),this.type===d.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,n),this.type===d.comma&&n&&n.trailingComma<0&&(n.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(t||n)&&(a=this.start,i=this.startLoc),t||(e=this.eat(d.star)));var o=this.containsEsc;return this.parsePropertyName(s),!t&&!o&&this.options.ecmaVersion>=8&&!e&&this.isAsyncProp(s)?(r=!0,e=this.options.ecmaVersion>=9&&this.eat(d.star),this.parsePropertyName(s)):r=!1,this.parsePropertyValue(s,t,e,r,a,i,n,o),this.finishNode(s,"Property")},W.parsePropertyValue=function(t,n,e,r,a,i,s,o){if((e||r)&&this.type===d.colon&&this.unexpected(),this.eat(d.colon))t.value=n?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===d.parenL)n&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(e,r);else if(n||o||!(this.options.ecmaVersion>=5)||t.computed||t.key.type!=="Identifier"||t.key.name!=="get"&&t.key.name!=="set"||this.type===d.comma||this.type===d.braceR||this.type===d.eq)this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((e||r)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=a),t.kind="init",n?t.value=this.parseMaybeDefault(a,i,this.copyNode(t.key)):this.type===d.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),t.value=this.parseMaybeDefault(a,i,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.shorthand=!0):this.unexpected();else{(e||r)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var _=t.kind==="get"?0:1;if(t.value.params.length!==_){var l=t.value.start;t.kind==="get"?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}},W.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(d.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(d.bracketR),t.key;t.computed=!1}return t.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},W.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},W.parseMethod=function(t,n,e){var r=this.startNode(),a=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=t),this.options.ecmaVersion>=8&&(r.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Qi(n,r.generator)|(e?128:0)),this.expect(d.parenL),r.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=a,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")},W.parseArrowExpression=function(t,n,e,r){var a=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|Qi(e,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(n,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=a,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(t,"ArrowFunctionExpression")},W.parseFunctionBody=function(t,n,e,r){var a=n&&this.type!==d.braceL,i=this.strict,s=!1;if(a)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);i&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var _=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!i&&!s&&!n&&!e&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,s&&!i),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=_}this.exitScope()},W.isSimpleParamList=function(t){for(var n=0,e=t;n-1||a.functions.indexOf(t)>-1||a.var.indexOf(t)>-1,a.lexical.push(t),this.inModule&&1&a.flags&&delete this.undefinedExports[t]}else if(n===4)this.currentScope().lexical.push(t);else if(n===3){var i=this.currentScope();r=this.treatFunctionsAsVar?i.lexical.indexOf(t)>-1:i.lexical.indexOf(t)>-1||i.var.indexOf(t)>-1,i.functions.push(t)}else for(var s=this.scopeStack.length-1;s>=0;--s){var o=this.scopeStack[s];if(o.lexical.indexOf(t)>-1&&!(32&o.flags&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){r=!0;break}if(o.var.push(t),this.inModule&&1&o.flags&&delete this.undefinedExports[t],259&o.flags)break}r&&this.raiseRecoverable(e,"Identifier '"+t+"' has already been declared")},Nt.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)},Nt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Nt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var n=this.scopeStack[t];if(259&n.flags)return n}},Nt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var n=this.scopeStack[t];if(259&n.flags&&!(16&n.flags))return n}};var nr=function(t,n,e){this.type="",this.start=n,this.end=0,t.options.locations&&(this.loc=new Ze(t,e)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[n,0])},tr=dn.prototype;function ul(t,n,e,r){return t.type=n,t.end=e,this.options.locations&&(t.loc.end=r),this.options.ranges&&(t.range[1]=e),t}tr.startNode=function(){return new nr(this,this.start,this.startLoc)},tr.startNodeAt=function(t,n){return new nr(this,t,n)},tr.finishNode=function(t,n){return ul.call(this,t,n,this.lastTokEnd,this.lastTokEndLoc)},tr.finishNodeAt=function(t,n,e,r){return ul.call(this,t,n,e,r)},tr.copyNode=function(t){var n=new nr(this,t.start,this.startLoc);for(var e in t)n[e]=t[e];return n};var fl="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",es=fl+" Extended_Pictographic",rs=es+" EBase EComp EMod EPres ExtPict",Dp={9:fl,10:es,11:es,12:rs,13:rs,14:rs},ml="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",dl="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",pl=dl+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",hl=pl+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",gl=hl+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",bl=gl+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Pp={9:dl,10:pl,11:hl,12:gl,13:bl,14:bl+" Kawi Nag_Mundari Nagm"},vl={};function Op(t){var n=vl[t]={binary:Kt(Dp[t]+" "+ml),nonBinary:{General_Category:Kt(ml),Script:Kt(Pp[t])}};n.nonBinary.Script_Extensions=n.nonBinary.Script,n.nonBinary.gc=n.nonBinary.General_Category,n.nonBinary.sc=n.nonBinary.Script,n.nonBinary.scx=n.nonBinary.Script_Extensions}for(var as=0,yl=[9,10,11,12,13,14];as=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":""),this.unicodeProperties=vl[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function xl(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}function $l(t){return t>=65&&t<=90||t>=97&&t<=122}function El(t){return $l(t)||t===95}function zp(t){return El(t)||oa(t)}function oa(t){return t>=48&&t<=57}function kl(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function wl(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Cl(t){return t>=48&&t<=55}gt.prototype.reset=function(t,n,e){var r=e.indexOf("u")!==-1;this.start=0|t,this.source=n+"",this.flags=e,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},gt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},gt.prototype.at=function(t,n){n===void 0&&(n=!1);var e=this.source,r=e.length;if(t>=r)return-1;var a=e.charCodeAt(t);if(!n&&!this.switchU||a<=55295||a>=57344||t+1>=r)return a;var i=e.charCodeAt(t+1);return i>=56320&&i<=57343?(a<<10)+i-56613888:a},gt.prototype.nextIndex=function(t,n){n===void 0&&(n=!1);var e=this.source,r=e.length;if(t>=r)return r;var a,i=e.charCodeAt(t);return!n&&!this.switchU||i<=55295||i>=57344||t+1>=r||(a=e.charCodeAt(t+1))<56320||a>57343?t+1:t+2},gt.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},gt.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},gt.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},gt.prototype.eat=function(t,n){return n===void 0&&(n=!1),this.current(n)===t&&(this.advance(n),!0)},G.validateRegExpFlags=function(t){for(var n=t.validFlags,e=t.flags,r=0;r-1&&this.raise(t.start,"Duplicate regular expression flag")}},G.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&t.groupNames.length>0&&(t.switchN=!0,this.regexp_pattern(t))},G.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames.length=0,t.backReferenceNames.length=0,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var n=0,e=t.backReferenceNames;n=9&&(e=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!e,!0}return t.pos=n,!1},G.regexp_eatQuantifier=function(t,n){return n===void 0&&(n=!1),!!this.regexp_eatQuantifierPrefix(t,n)&&(t.eat(63),!0)},G.regexp_eatQuantifierPrefix=function(t,n){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,n)},G.regexp_eatBracedQuantifier=function(t,n){var e=t.pos;if(t.eat(123)){var r=0,a=-1;if(this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(a=t.lastIntValue),t.eat(125)))return a!==-1&&a=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},G.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},G.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},G.regexp_eatSyntaxCharacter=function(t){var n=t.current();return!!xl(n)&&(t.lastIntValue=n,t.advance(),!0)},G.regexp_eatPatternCharacters=function(t){for(var n=t.pos,e=0;(e=t.current())!==-1&&!xl(e);)t.advance();return t.pos!==n},G.regexp_eatExtendedPatternCharacter=function(t){var n=t.current();return!(n===-1||n===36||n>=40&&n<=43||n===46||n===63||n===91||n===94||n===124)&&(t.advance(),!0)},G.regexp_groupSpecifier=function(t){if(t.eat(63)){if(this.regexp_eatGroupName(t))return t.groupNames.indexOf(t.lastStringValue)!==-1&&t.raise("Duplicate capture group name"),void t.groupNames.push(t.lastStringValue);t.raise("Invalid group")}},G.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},G.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=It(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=It(t.lastIntValue);return!0}return!1},G.regexp_eatRegExpIdentifierStart=function(t){var n=t.pos,e=this.options.ecmaVersion>=11,r=t.current(e);return t.advance(e),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,e)&&(r=t.lastIntValue),function(a){return _t(a,!0)||a===36||a===95}(r)?(t.lastIntValue=r,!0):(t.pos=n,!1)},G.regexp_eatRegExpIdentifierPart=function(t){var n=t.pos,e=this.options.ecmaVersion>=11,r=t.current(e);return t.advance(e),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,e)&&(r=t.lastIntValue),function(a){return Wt(a,!0)||a===36||a===95||a===8204||a===8205}(r)?(t.lastIntValue=r,!0):(t.pos=n,!1)},G.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},G.regexp_eatBackReference=function(t){var n=t.pos;if(this.regexp_eatDecimalEscape(t)){var e=t.lastIntValue;if(t.switchU)return e>t.maxBackReference&&(t.maxBackReference=e),!0;if(e<=t.numCapturingParens)return!0;t.pos=n}return!1},G.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},G.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},G.regexp_eatCControlLetter=function(t){var n=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=n}return!1},G.regexp_eatZero=function(t){return t.current()===48&&!oa(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},G.regexp_eatControlEscape=function(t){var n=t.current();return n===116?(t.lastIntValue=9,t.advance(),!0):n===110?(t.lastIntValue=10,t.advance(),!0):n===118?(t.lastIntValue=11,t.advance(),!0):n===102?(t.lastIntValue=12,t.advance(),!0):n===114&&(t.lastIntValue=13,t.advance(),!0)},G.regexp_eatControlLetter=function(t){var n=t.current();return!!$l(n)&&(t.lastIntValue=n%32,t.advance(),!0)},G.regexp_eatRegExpUnicodeEscapeSequence=function(t,n){n===void 0&&(n=!1);var e,r=t.pos,a=n||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var i=t.lastIntValue;if(a&&i>=55296&&i<=56319){var s=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=1024*(i-55296)+(o-56320)+65536,!0}t.pos=s,t.lastIntValue=i}return!0}if(a&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&(e=t.lastIntValue)>=0&&e<=1114111)return!0;a&&t.raise("Invalid unicode escape"),t.pos=r}return!1},G.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var n=t.current();return!(n===99||t.switchN&&n===107)&&(t.lastIntValue=n,t.advance(),!0)},G.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var n=t.current();if(n>=49&&n<=57){do t.lastIntValue=10*t.lastIntValue+(n-48),t.advance();while((n=t.current())>=48&&n<=57);return!0}return!1},G.regexp_eatCharacterClassEscape=function(t){var n=t.current();if(function(e){return e===100||e===68||e===115||e===83||e===119||e===87}(n))return t.lastIntValue=-1,t.advance(),!0;if(t.switchU&&this.options.ecmaVersion>=9&&(n===80||n===112)){if(t.lastIntValue=-1,t.advance(),t.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(t)&&t.eat(125))return!0;t.raise("Invalid property name")}return!1},G.regexp_eatUnicodePropertyValueExpression=function(t){var n=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var e=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,e,r),!0}}if(t.pos=n,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var a=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,a),!0}return!1},G.regexp_validateUnicodePropertyNameAndValue=function(t,n,e){Ye(t.unicodeProperties.nonBinary,n)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[n].test(e)||t.raise("Invalid property value")},G.regexp_validateUnicodePropertyNameOrValue=function(t,n){t.unicodeProperties.binary.test(n)||t.raise("Invalid property name")},G.regexp_eatUnicodePropertyName=function(t){var n=0;for(t.lastStringValue="";El(n=t.current());)t.lastStringValue+=It(n),t.advance();return t.lastStringValue!==""},G.regexp_eatUnicodePropertyValue=function(t){var n=0;for(t.lastStringValue="";zp(n=t.current());)t.lastStringValue+=It(n),t.advance();return t.lastStringValue!==""},G.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},G.regexp_eatCharacterClass=function(t){if(t.eat(91)){if(t.eat(94),this.regexp_classRanges(t),t.eat(93))return!0;t.raise("Unterminated character class")}return!1},G.regexp_classRanges=function(t){for(;this.regexp_eatClassAtom(t);){var n=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var e=t.lastIntValue;!t.switchU||n!==-1&&e!==-1||t.raise("Invalid character class"),n!==-1&&e!==-1&&n>e&&t.raise("Range out of order in character class")}}},G.regexp_eatClassAtom=function(t){var n=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var e=t.current();(e===99||Cl(e))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=n}var r=t.current();return r!==93&&(t.lastIntValue=r,t.advance(),!0)},G.regexp_eatClassEscape=function(t){var n=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=n}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},G.regexp_eatClassControlLetter=function(t){var n=t.current();return!(!oa(n)&&n!==95)&&(t.lastIntValue=n%32,t.advance(),!0)},G.regexp_eatHexEscapeSequence=function(t){var n=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=n}return!1},G.regexp_eatDecimalDigits=function(t){var n=t.pos,e=0;for(t.lastIntValue=0;oa(e=t.current());)t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();return t.pos!==n},G.regexp_eatHexDigits=function(t){var n=t.pos,e=0;for(t.lastIntValue=0;kl(e=t.current());)t.lastIntValue=16*t.lastIntValue+wl(e),t.advance();return t.pos!==n},G.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var n=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;n<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*n+8*e+t.lastIntValue:t.lastIntValue=8*n+e}else t.lastIntValue=n;return!0}return!1},G.regexp_eatOctalDigit=function(t){var n=t.current();return Cl(n)?(t.lastIntValue=n-48,t.advance(),!0):(t.lastIntValue=0,!1)},G.regexp_eatFixedHexDigits=function(t,n){var e=t.pos;t.lastIntValue=0;for(var r=0;r=this.input.length?this.finishToken(d.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Y.readToken=function(t){return _t(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)},Y.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(this.pos+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},Y.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),n=this.pos,e=this.input.indexOf("*/",this.pos+=2);if(e===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=e+2,this.options.locations)for(var r=void 0,a=n;(r=il(this.input,a,this.pos))>-1;)++this.curLine,a=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,e),n,this.pos,t,this.curPosition())},Y.skipLineComment=function(t){for(var n=this.pos,e=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);this.pos8&&t<14||t>=5760&&Yi.test(String.fromCharCode(t))))break n;++this.pos}}},Y.finishToken=function(t,n){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var e=this.type;this.type=t,this.value=n,this.updateContext(e)},Y.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var n=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&n===46?(this.pos+=3,this.finishToken(d.ellipsis)):(++this.pos,this.finishToken(d.dot))},Y.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(d.assign,2):this.finishOp(d.slash,1)},Y.readToken_mult_modulo_exp=function(t){var n=this.input.charCodeAt(this.pos+1),e=1,r=t===42?d.star:d.modulo;return this.options.ecmaVersion>=7&&t===42&&n===42&&(++e,r=d.starstar,n=this.input.charCodeAt(this.pos+2)),n===61?this.finishOp(d.assign,e+1):this.finishOp(r,e)},Y.readToken_pipe_amp=function(t){var n=this.input.charCodeAt(this.pos+1);return n===t?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(d.assign,3):this.finishOp(t===124?d.logicalOR:d.logicalAND,2):n===61?this.finishOp(d.assign,2):this.finishOp(t===124?d.bitwiseOR:d.bitwiseAND,1)},Y.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(d.assign,2):this.finishOp(d.bitwiseXOR,1)},Y.readToken_plus_min=function(t){var n=this.input.charCodeAt(this.pos+1);return n===t?n!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!Gn.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(d.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):n===61?this.finishOp(d.assign,2):this.finishOp(d.plusMin,1)},Y.readToken_lt_gt=function(t){var n=this.input.charCodeAt(this.pos+1),e=1;return n===t?(e=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+e)===61?this.finishOp(d.assign,e+1):this.finishOp(d.bitShift,e)):n!==33||t!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(n===61&&(e=2),this.finishOp(d.relational,e)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Y.readToken_eq_excl=function(t){var n=this.input.charCodeAt(this.pos+1);return n===61?this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&n===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(d.arrow)):this.finishOp(t===61?d.eq:d.prefix,1)},Y.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var n=this.input.charCodeAt(this.pos+1);if(n===46){var e=this.input.charCodeAt(this.pos+2);if(e<48||e>57)return this.finishOp(d.questionDot,2)}if(n===63)return t>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(d.assign,3):this.finishOp(d.coalesce,2)}return this.finishOp(d.question,1)},Y.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,_t(t=this.fullCharCodeAtPos(),!0)||t===92))return this.finishToken(d.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+It(t)+"'")},Y.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(d.parenL);case 41:return++this.pos,this.finishToken(d.parenR);case 59:return++this.pos,this.finishToken(d.semi);case 44:return++this.pos,this.finishToken(d.comma);case 91:return++this.pos,this.finishToken(d.bracketL);case 93:return++this.pos,this.finishToken(d.bracketR);case 123:return++this.pos,this.finishToken(d.braceL);case 125:return++this.pos,this.finishToken(d.braceR);case 58:return++this.pos,this.finishToken(d.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(d.backQuote);case 48:var n=this.input.charCodeAt(this.pos+1);if(n===120||n===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(n===111||n===79)return this.readRadixNumber(8);if(n===98||n===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(d.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+It(t)+"'")},Y.finishOp=function(t,n){var e=this.input.slice(this.pos,this.pos+n);return this.pos+=n,this.finishToken(t,e)},Y.readRegexp=function(){for(var t,n,e=this.pos;;){this.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Gn.test(r)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if(r==="[")n=!0;else if(r==="]"&&n)n=!1;else if(r==="/"&&!n)break;t=r==="\\"}++this.pos}var a=this.input.slice(e,this.pos);++this.pos;var i=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(i);var o=this.regexpState||(this.regexpState=new gt(this));o.reset(e,a,s),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var _=null;try{_=new RegExp(a,s)}catch{}return this.finishToken(d.regexp,{pattern:a,flags:s,value:_})},Y.readInt=function(t,n,e){for(var r=this.options.ecmaVersion>=12&&n===void 0,a=e&&this.input.charCodeAt(this.pos)===48,i=this.pos,s=0,o=0,_=0,l=n??1/0;_=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=t)break;o=u,s=s*t+f}}return r&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===i||n!=null&&this.pos-i!==n?null:s},Y.readRadixNumber=function(t){var n=this.pos;this.pos+=2;var e=this.readInt(t);return e==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(e=Sl(this.input.slice(n,this.pos)),++this.pos):_t(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(d.num,e)},Y.readNumber=function(t){var n=this.pos;t||this.readInt(10,void 0,!0)!==null||this.raise(n,"Invalid number");var e=this.pos-n>=2&&this.input.charCodeAt(n)===48;e&&this.strict&&this.raise(n,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!e&&!t&&this.options.ecmaVersion>=11&&r===110){var a=Sl(this.input.slice(n,this.pos));return++this.pos,_t(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(d.num,a)}e&&/[89]/.test(this.input.slice(n,this.pos))&&(e=!1),r!==46||e||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),r!==69&&r!==101||e||((r=this.input.charCodeAt(++this.pos))!==43&&r!==45||++this.pos,this.readInt(10)===null&&this.raise(n,"Invalid number")),_t(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i,s=(i=this.input.slice(n,this.pos),e?parseInt(i,8):parseFloat(i.replace(/_/g,"")));return this.finishToken(d.num,s)},Y.readCodePoint=function(){var t;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t},Y.readString=function(t){for(var n="",e=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;r===92?(n+=this.input.slice(e,this.pos),n+=this.readEscapedChar(!1),e=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Jt(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return n+=this.input.slice(e,this.pos++),this.finishToken(d.string,n)};var Al={};Y.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Al)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Y.invalidStringToken=function(t,n){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Al;this.raise(t,n)},Y.readTmplToken=function(){for(var t="",n=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var e=this.input.charCodeAt(this.pos);if(e===96||e===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==d.template&&this.type!==d.invalidTemplate?(t+=this.input.slice(n,this.pos),this.finishToken(d.template,t)):e===36?(this.pos+=2,this.finishToken(d.dollarBraceL)):(++this.pos,this.finishToken(d.backQuote));if(e===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!0),n=this.pos;else if(Jt(e)){switch(t+=this.input.slice(n,this.pos),++this.pos,e){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
-`;break;default:t+=String.fromCharCode(e)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),n=this.pos}else++this.pos}},Y.readInvalidTemplateToken=function(){for(;this.pos=48&&n<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(r,8);return a>255&&(r=r.slice(0,-1),a=parseInt(r,8)),this.pos+=r.length-1,n=this.input.charCodeAt(this.pos),r==="0"&&n!==56&&n!==57||!this.strict&&!t||this.invalidStringToken(this.pos-1-r.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return Jt(n)?"":String.fromCharCode(n)}},Y.readHexChar=function(t){var n=this.pos,e=this.readInt(16,t);return e===null&&this.invalidStringToken(n,"Bad character escape sequence"),e},Y.readWord1=function(){this.containsEsc=!1;for(var t="",n=!0,e=this.pos,r=this.options.ecmaVersion>=6;this.pos()=>L(function(n){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${n}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:wn("plugin-development/#a-simple-example")}}(t)),Fp=la("fs.mkdir"),Gp=la("fs.readFile"),Rp=la("fs.writeFile");async function Nl(t,n,e,r,a,i,s,o,_){const l=await function(u,f,m,h,v,p,g,y){let E=null,b=null;if(v){E=new Set;for(const x of v)u===x.source&&f===x.importer&&E.add(x.plugin);b=(x,$)=>({...x,resolve:(S,A,{assertions:N,custom:k,isEntry:I,skipSelf:R}=In)=>h(S,A,k,I,N||Bn,R?[...v,{importer:A,plugin:$,source:S}]:v)})}return m.hookFirstAndGetPlugin("resolveId",[u,f,{assertions:y,custom:p,isEntry:g}],b,E)}(t,n,r,a,i,s,o,_);return l==null?la("path.resolve")():l[0]}const is="at position ",ss="at output position ",qp={delete:()=>!1,get(){},has:()=>!1,set(){}};function ca(t){return t.startsWith(is)||t.startsWith(ss)?L({code:tm,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):L({code:om,message:`The plugin name ${t} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const Tl=(t,n,e=Xp)=>{const{onwarn:r,onLog:a}=t,i=Vp(e,r);if(a){const s=zt[n];return(o,_)=>a(o,jl(_),(l,u)=>{if(l==="error")return L(ct(u));zt[l]>=s&&i(l,ct(u))})}return i},Vp=(t,n)=>n?(e,r)=>{e===V?n(jl(r),a=>t(V,ct(a))):t(e,r)}:t,jl=t=>(Object.defineProperty(t,"toString",{value:()=>Ll(t),writable:!0}),t),ct=t=>typeof t=="string"?{message:t}:typeof t=="function"?ct(t()):t,Ll=t=>{let n="";return t.plugin&&(n+=`(${t.plugin} plugin) `),t.loc&&(n+=`${H(t.loc.file)} (${t.loc.line}:${t.loc.column}) `),n+t.message},Xp=(t,n)=>{const e=Ll(n);switch(t){case V:return console.warn(e);case we:return console.debug(e);default:return console.info(e)}};function Ml(t,n,e,r,a=/$./){const i=new Set(n),s=Object.keys(t).filter(o=>!(i.has(o)||a.test(o)));s.length>0&&r(V,function(o,_,l){return{code:$m,message:`Unknown ${o}: ${_.join(", ")}. Allowed options: ${l.join(", ")}`}}(e,s,[...i].sort()))}const Up={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:bn,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:bn,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:bn,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Hp={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Dl=(t,n,e,r,a)=>{const i=t==null?void 0:t.preset;if(i){const s=n[i];if(s)return{...s,...t};L(vn(`${e}.preset`,r,`valid values are ${mt(Object.keys(n))}`,i))}return((s,o,_,l)=>u=>{if(typeof u=="string"){const f=s[u];if(f)return f;L(vn(o,_,`valid values are ${l}${mt(Object.keys(s))}. You can also supply an object for more fine-grained control`,u))}return(f=>f&&typeof f=="object"?f:{})(u)})(n,e,r,a)(t)},ua=async t=>(await async function(n){do n=(await Promise.all(n)).flat(1/0);while(n.some(e=>e==null?void 0:e.then));return n}([t])).filter(Boolean);async function Wp(t,n,e,r){const a=n.id,i=[];let s=t.map===null?null:Hi(t.map);const o=t.code;let _=t.ast;const l=[],u=[];let f=!1;const m=()=>f=!0;let h="";const v=t.code,p=y=>(E,b)=>{E=ct(E),b&&yr(E,b,v,a),E.id=a,E.hook="transform",y(E)};let g;try{g=await e.hookReduceArg0("transform",[v,a],function(y,E,b){let x,$;if(typeof E=="string")x=E;else{if(!E||typeof E!="object")return y;if(n.updateOptions(E),E.code==null)return(E.map||E.ast)&&r(V,function(S){return{code:vm,message:`The plugin "${S}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(b.name)),y;({code:x,map:$,ast:_}=E)}return $!==null&&i.push(Hi(typeof $=="string"?JSON.parse($):$)||{missing:!0,plugin:b.name}),x},(y,E)=>{return h=E.name,{...y,addWatchFile($){l.push($),y.addWatchFile($)},cache:f?y.cache:(b=y.cache,x=m,{delete:$=>(x(),b.delete($)),get:$=>(x(),b.get($)),has:$=>(x(),b.has($)),set:($,S)=>(x(),b.set($,S))}),debug:p(y.debug),emitFile:$=>(u.push($),e.emitFile($)),error:($,S)=>(typeof $=="string"&&($={message:$}),S&&yr($,S,v,a),$.id=a,$.hook="transform",y.error($)),getCombinedSourcemap(){const $=function(S,A,N,k,I){return k.length===0?N:{version:3,...q_(S,A,N,k,R_(I)).traceMappings()}}(a,o,s,i,r);return $?(s!==$&&(s=$,i.length=0),new mr({...$,file:null,sourcesContent:$.sourcesContent})):new Lt(o).generateMap({hires:!0,includeContent:!0,source:a})},info:p(y.info),setAssetSource(){return this.error({code:mm,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:p(y.warn)};var b,x})}catch(y){return L(Se(y,h,{hook:"transform",id:a}))}return!f&&u.length>0&&(n.transformFiles=u),{ast:_,code:g,customTransformCache:f,originalCode:o,originalSourcemap:s,sourcemapChain:i,transformDependencies:l}}const os="resolveDependencies";class Jp{constructor(n,e,r,a){this.graph=n,this.modulesById=e,this.options=r,this.pluginDriver=a,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(i,s,o,_,l,u=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(i,s,!1)&&await Nl(i,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,u,o,typeof _=="boolean"?_:!s,l),s,i),l),this.hasModuleSideEffects=r.treeshake?r.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(n){const e=this.extendLoadModulesPromise(Promise.all(n.map(r=>this.loadEntryModule(r,!1,void 0,null))));return await this.awaitLoadModulesPromise(),e}async addEntryModules(n,e){const r=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=n.length;const a=this.nextChunkNamePriority;this.nextChunkNamePriority+=n.length;const i=await this.extendLoadModulesPromise(Promise.all(n.map(({id:s,importer:o})=>this.loadEntryModule(s,!0,o,null))).then(s=>{for(const[o,_]of s.entries()){_.isUserDefinedEntryPoint=_.isUserDefinedEntryPoint||e,Ol(_,n[o],e,a+o);const l=this.indexedEntryModules.find(u=>u.module===_);l?l.index=Math.min(l.index,r+o):this.indexedEntryModules.push({index:r+o,module:_})}return this.indexedEntryModules.sort(({index:o},{index:_})=>o>_?1:-1),s}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:s})=>s),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:n,id:e,importer:r,name:a,implicitlyLoadedAfterOneOf:i,preserveSignature:s}){const o={fileName:n||null,id:e,importer:r,name:a||null},_=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return s!=null&&(_.preserveSignature=s),_}async preloadModule(n){return(await this.fetchModule(this.getResolvedIdWithDefaults(n,Bn),void 0,!1,!n.resolveDependencies||os)).info}addEntryWithImplicitDependants(n,e){const r=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(n.id,!1,n.importer,null).then(async a=>{if(Ol(a,n,!1,r),!a.info.isEntry){this.implicitEntryModules.add(a);const i=await Promise.all(e.map(s=>this.loadEntryModule(s,!1,n.importer,a.id)));for(const s of i)a.implicitlyLoadedAfter.add(s);for(const s of a.implicitlyLoadedAfter)s.implicitlyLoadedBefore.add(a)}return a}))}async addModuleSource(n,e,r){let a;try{a=await this.graph.fileOperationQueue.run(async()=>await this.pluginDriver.hookFirst("load",[n])??await Gp(n,"utf8"))}catch(o){let _=`Could not load ${n}`;throw e&&(_+=` (imported by ${H(e)})`),_+=`: ${o.message}`,o.message=_,o}const i=typeof a=="string"?{code:a}:a!=null&&typeof a=="object"&&typeof a.code=="string"?a:L(function(o){return{code:"BAD_LOADER",message:`Error loading "${H(o)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(n)),s=this.graph.cachedModules.get(n);if(!s||s.customTransformCache||s.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:s.ast,code:s.code,id:s.id,meta:s.meta,moduleSideEffects:s.moduleSideEffects,resolvedSources:s.resolvedIds,syntheticNamedExports:s.syntheticNamedExports}]))r.updateOptions(i),r.setSource(await Wp(i,r,this.pluginDriver,this.options.onLog));else{if(s.transformFiles)for(const o of s.transformFiles)this.pluginDriver.emitFile(o);r.setSource(s)}}async awaitLoadModulesPromise(){let n;do n=this.latestLoadModulesPromise,await n;while(n!==this.latestLoadModulesPromise)}extendLoadModulesPromise(n){return this.latestLoadModulesPromise=Promise.all([n,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch(()=>{}),n}async fetchDynamicDependencies(n,e){const r=await Promise.all(e.map(a=>a.then(async([i,s])=>s===null?null:typeof s=="string"?(i.resolution=s,null):i.resolution=await this.fetchResolvedDependency(H(s.id),n.id,s))));for(const a of r)a&&(n.dynamicDependencies.add(a),a.dynamicImporters.push(n.id))}async fetchModule({assertions:n,id:e,meta:r,moduleSideEffects:a,syntheticNamedExports:i},s,o,_){const l=this.modulesById.get(e);if(l instanceof hn)return s&&Ur(n,l.info.assertions)&&this.options.onLog(V,xr(l.info.assertions,n,e,s)),await this.handleExistingModule(l,o,_),l;const u=new hn(this.graph,e,this.options,o,a,i,r,n);this.modulesById.set(e,u),this.graph.watchFiles[e]=!0;const f=this.addModuleSource(e,s,u).then(()=>[this.getResolveStaticDependencyPromises(u),this.getResolveDynamicImportPromises(u),m]),m=zl(f).then(()=>this.pluginDriver.hookParallel("moduleParsed",[u.info]));m.catch(()=>{}),this.moduleLoadPromises.set(u,f);const h=await f;return _?_===os&&await m:await this.fetchModuleDependencies(u,...h),u}async fetchModuleDependencies(n,e,r,a){this.modulesWithLoadedDependencies.has(n)||(this.modulesWithLoadedDependencies.add(n),await Promise.all([this.fetchStaticDependencies(n,e),this.fetchDynamicDependencies(n,r)]),n.linkImports(),await a)}fetchResolvedDependency(n,e,r){if(r.external){const{assertions:a,external:i,id:s,moduleSideEffects:o,meta:_}=r;let l=this.modulesById.get(s);if(l){if(!(l instanceof fn))return L(function(u,f){return{code:"INVALID_EXTERNAL_ID",message:`"${u}" is imported as an external by "${H(f)}", but is already an existing non-external module id.`}}(n,e));Ur(l.info.assertions,a)&&this.options.onLog(V,xr(l.info.assertions,a,n,e))}else l=new fn(this.options,s,o,_,i!=="absolute"&&vt(s),a),this.modulesById.set(s,l);return Promise.resolve(l)}return this.fetchModule(r,e,!1,!1)}async fetchStaticDependencies(n,e){for(const r of await Promise.all(e.map(a=>a.then(([i,s])=>this.fetchResolvedDependency(i,n.id,s)))))n.dependencies.add(r),r.importers.push(n.id);if(!this.options.treeshake||n.info.moduleSideEffects==="no-treeshake")for(const r of n.dependencies)r instanceof hn&&(r.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(n,e,r){const{makeAbsoluteExternalsRelative:a}=this.options;if(n){if(typeof n=="object"){const o=n.external||this.options.external(n.id,e,!0);return{...n,external:o&&(o==="relative"||!vt(n.id)||o===!0&&_s(n.id,r,a)||"absolute")}}const s=this.options.external(n,e,!0);return{external:s&&(_s(n,r,a)||"absolute"),id:s&&a?Pl(n,e):n}}const i=a?Pl(r,e):r;return n===!1||this.options.external(i,e,!0)?{external:_s(i,r,a)||"absolute",id:i}:null}getResolveDynamicImportPromises(n){return n.dynamicImports.map(async e=>{const r=await this.resolveDynamicImport(n,typeof e.argument=="string"?e.argument:e.argument.esTreeNode,n.id,function(a){var o,_,l;const i=(l=(_=(o=a.arguments)==null?void 0:o[0])==null?void 0:_.properties.find(u=>Mi(u)==="assert"))==null?void 0:l.value;if(!i)return Bn;const s=i.properties.map(u=>{const f=Mi(u);return typeof f=="string"&&typeof u.value.value=="string"?[f,u.value.value]:null}).filter(u=>!!u);return s.length>0?Object.fromEntries(s):Bn}(e.node));return r&&typeof r=="object"&&(e.id=r.id),[e,r]})}getResolveStaticDependencyPromises(n){return Array.from(n.sourcesWithAssertions,async([e,r])=>[e,n.resolvedIds[e]=n.resolvedIds[e]||this.handleInvalidResolvedId(await this.resolveId(e,n.id,Bn,!1,r),e,n.id,r)])}getResolvedIdWithDefaults(n,e){if(!n)return null;const r=n.external||!1;return{assertions:n.assertions||e,external:r,id:n.id,meta:n.meta||{},moduleSideEffects:n.moduleSideEffects??this.hasModuleSideEffects(n.id,!!r),resolvedBy:n.resolvedBy??"rollup",syntheticNamedExports:n.syntheticNamedExports??!1}}async handleExistingModule(n,e,r){const a=this.moduleLoadPromises.get(n);if(r)return r===os?zl(a):a;if(e){n.info.isEntry=!0,this.implicitEntryModules.delete(n);for(const i of n.implicitlyLoadedAfter)i.implicitlyLoadedBefore.delete(n);n.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(n,...await a)}handleInvalidResolvedId(n,e,r,a){return n===null?ja(e)?L(function(i,s){return{code:Ks,exporter:i,id:s,message:`Could not resolve "${i}" from "${H(s)}"`}}(e,r)):(this.options.onLog(V,function(i,s){return{code:Ks,exporter:i,id:s,message:`"${i}" is imported by "${H(s)}", but could not be resolved – treating it as an external dependency.`,url:wn("troubleshooting/#warning-treating-module-as-external-dependency")}}(e,r)),{assertions:a,external:!0,id:e,meta:{},moduleSideEffects:this.hasModuleSideEffects(e,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(n.external&&n.syntheticNamedExports&&this.options.onLog(V,function(i,s){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:i,message:`External "${i}" cannot have "syntheticNamedExports" enabled (imported by "${H(s)}").`}}(e,r)),n)}async loadEntryModule(n,e,r,a){const i=await Nl(n,r,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Bn,!0,Bn);return i==null?L(a===null?function(s){return{code:Js,message:`Could not resolve entry module "${H(s)}".`}}(n):function(s,o){return{code:Ua,message:`Module "${H(s)}" that should be implicitly loaded before "${H(o)}" could not be resolved.`}}(n,a)):i===!1||typeof i=="object"&&i.external?L(a===null?function(s){return{code:Js,message:`Entry module "${H(s)}" cannot be external.`}}(n):function(s,o){return{code:Ua,message:`Module "${H(s)}" that should be implicitly loaded before "${H(o)}" cannot be external.`}}(n,a)):this.fetchModule(this.getResolvedIdWithDefaults(typeof i=="object"?i:{id:i},Bn),void 0,e,!1)}async resolveDynamicImport(n,e,r,a){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[e,r,{assertions:a}]);if(typeof e!="string")return typeof i=="string"?i:i?this.getResolvedIdWithDefaults(i,a):null;if(i==null){const s=n.resolvedIds[e];return s?(Ur(s.assertions,a)&&this.options.onLog(V,xr(s.assertions,a,e,r)),s):n.resolvedIds[e]=this.handleInvalidResolvedId(await this.resolveId(e,n.id,Bn,!1,a),e,n.id,a)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,r,e),a),e,r,a)}}function Pl(t,n){return ja(t)?n?Jn(n,"..",t):Jn(t):t}function Ol(t,{fileName:n,name:e},r,a){var i;if(n!==null)t.chunkFileNames.add(n);else if(e!==null){let s=0;for(;((i=t.chunkNames[s])==null?void 0:i.priority)yt(i).slice(1),extname:()=>yt(i),hash:s=>e.slice(0,Math.max(0,s||8)),name:()=>i.slice(0,Math.max(0,i.length-yt(i).length))}),a)}function Gl(t,{bundle:n},e){n[Zr].has(t.toLowerCase())?e(V,function(r){return{code:_m,message:`The emitted file "${r}" overwrites a previously emitted file of the same name.`}}(t)):n[t]=qi}const Yp=new Set(["chunk","asset","prebuilt-chunk"]);function Rl(t,n,e){if(!(typeof t=="string"||t instanceof Uint8Array)){const r=n.fileName||n.name||e;return L(Mn(`Could not set source for ${typeof r=="string"?`asset "${r}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return t}function Zp(t,n){return typeof t.fileName!="string"?L((e=t.name||n,{code:em,message:`Plugin error - Unable to get file name for asset "${e}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):t.fileName;var e}function Qp(t,n){return t.fileName?t.fileName:n?n.get(t.module).getFileName():L((e=t.fileName||t.name,{code:am,message:`Plugin error - Unable to get file name for emitted chunk "${e}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var e}class nh{constructor(n,e,r){this.graph=n,this.options=e,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=a=>function(i){return!!(i&&Yp.has(i.type))}(a)?a.type==="prebuilt-chunk"?this.emitPrebuiltChunk(a):function(i){const s=i.fileName||i.name;return!s||typeof s=="string"&&!pr(s)}(a)?a.type==="chunk"?this.emitChunk(a):this.emitAsset(a):L(Mn(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${a.fileName||a.name}".`)):L(Mn(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${a&&a.type}".`)),this.finaliseAssets=()=>{for(const[a,i]of this.filesByReferenceId)if(i.type==="asset"&&typeof i.fileName!="string")return L({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${i.name||a}" - no asset source set.`})},this.getFileName=a=>{const i=this.filesByReferenceId.get(a);return i?i.type==="chunk"?Qp(i,this.facadeChunkByModule):i.type==="prebuilt-chunk"?i.fileName:Zp(i,a):L({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${a}".`})},this.setAssetSource=(a,i)=>{const s=this.filesByReferenceId.get(a);if(!s)return L({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${a}".`});if(s.type!=="asset")return L(Mn(`Asset sources can only be set for emitted assets but "${a}" is an emitted chunk.`));if(s.source!==void 0)return L({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${s.name||a}", source already set.`});const o=Rl(i,s,a);if(this.output)this.finalizeAdditionalAsset(s,o,this.output);else{s.source=o;for(const _ of this.outputFileEmitters)_.finalizeAdditionalAsset(s,o,_.output)}},this.setChunkInformation=a=>{this.facadeChunkByModule=a},this.setOutputBundle=(a,i)=>{const s=this.output={bundle:a,fileNamesBySource:new Map,outputOptions:i};for(const _ of this.filesByReferenceId.values())_.fileName&&Gl(_.fileName,s,this.options.onLog);const o=new Map;for(const _ of this.filesByReferenceId.values())_.type==="asset"&&_.source!==void 0?_.fileName?this.finalizeAdditionalAsset(_,_.source,s):zn(o,Bl(_.source),()=>[]).push(_):_.type==="prebuilt-chunk"&&(this.output.bundle[_.fileName]=this.createPrebuiltChunk(_));for(const[_,l]of o)this.finalizeAssetsWithSameSource(l,_,s)},this.filesByReferenceId=r?new Map(r.filesByReferenceId):new Map,r==null||r.addOutputFileEmitter(this)}addOutputFileEmitter(n){this.outputFileEmitters.push(n)}assignReferenceId(n,e){let r=e;do r=Ke().update(r).digest("hex").slice(0,8);while(this.filesByReferenceId.has(r)||this.outputFileEmitters.some(({filesByReferenceId:a})=>a.has(r)));n.referenceId=r,this.filesByReferenceId.set(r,n);for(const{filesByReferenceId:a}of this.outputFileEmitters)a.set(r,n);return r}createPrebuiltChunk(n){return{code:n.code,dynamicImports:[],exports:n.exports||[],facadeModuleId:null,fileName:n.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:n.map||null,moduleIds:[],modules:{},name:n.fileName,referencedFiles:[],type:"chunk"}}emitAsset(n){const e=n.source===void 0?void 0:Rl(n.source,n,null),r={fileName:n.fileName,name:n.name,needsCodeReference:!!n.needsCodeReference,referenceId:"",source:e,type:"asset"},a=this.assignReferenceId(r,n.fileName||n.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(r,this.output);else for(const i of this.outputFileEmitters)i.emitAssetWithReferenceId(r,i.output);return a}emitAssetWithReferenceId(n,e){const{fileName:r,source:a}=n;r&&Gl(r,e,this.options.onLog),a!==void 0&&this.finalizeAdditionalAsset(n,a,e)}emitChunk(n){if(this.graph.phase>St.LOAD_AND_PARSE)return L({code:Xs,message:"Cannot emit chunks after module loading has finished."});if(typeof n.id!="string")return L(Mn(`Emitted chunks need to have a valid string id, received "${n.id}"`));const e={fileName:n.fileName,module:null,name:n.name||n.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(n).then(r=>e.module=r).catch(()=>{}),this.assignReferenceId(e,n.id)}emitPrebuiltChunk(n){if(typeof n.code!="string")return L(Mn(`Emitted prebuilt chunks need to have a valid string code, received "${n.code}".`));if(typeof n.fileName!="string"||pr(n.fileName))return L(Mn(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${n.fileName}".`));const e={code:n.code,exports:n.exports,fileName:n.fileName,map:n.map,referenceId:"",type:"prebuilt-chunk"},r=this.assignReferenceId(e,e.fileName);return this.output&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e)),r}finalizeAdditionalAsset(n,e,{bundle:r,fileNamesBySource:a,outputOptions:i}){let{fileName:s,needsCodeReference:o,referenceId:_}=n;if(!s){const f=Bl(e);s=a.get(f),s||(s=Fl(n.name,e,f,i,r),a.set(f,s))}const l={...n,fileName:s,source:e};this.filesByReferenceId.set(_,l);const u=r[s];(u==null?void 0:u.type)==="asset"?u.needsCodeReference&&(u.needsCodeReference=o):r[s]={fileName:s,name:n.name,needsCodeReference:o,source:e,type:"asset"}}finalizeAssetsWithSameSource(n,e,{bundle:r,fileNamesBySource:a,outputOptions:i}){let s,o="",_=!0;for(const l of n){_&&(_=l.needsCodeReference);const u=Fl(l.name,l.source,e,i,r);(!o||u.length{s!=null&&e(V,{code:um,message:`Plugin "${r}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=ct(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=n,i.plugin=r,e(t,i)}}function th(t,n,e,r,a,i){const{logLevel:s,onLog:o}=r;let _,l=!0;if(typeof t.cacheKey!="string"&&(t.name.startsWith(is)||t.name.startsWith(ss)||i.has(t.name)?l=!1:i.add(t.name)),n)if(l){const m=t.cacheKey||t.name;f=n[m]||(n[m]=Object.create(null)),_={delete:h=>delete f[h],get(h){const v=f[h];if(v)return v[0]=0,v[1]},has(h){const v=f[h];return!!v&&(v[0]=0,!0)},set(h,v){f[h]=[0,v]}}}else u=t.name,_={delete:()=>ca(u),get:()=>ca(u),has:()=>ca(u),set:()=>ca(u)};else _=qp;var u,f;return{addWatchFile(m){if(e.phase>=St.GENERATE)return this.error({code:Xs,message:'Cannot call "addWatchFile" after the build has finished.'});e.watchFiles[m]=!0},cache:_,debug:pe(we,"PLUGIN_LOG",o,t.name,s),emitFile:a.emitFile.bind(a),error:m=>L(Se(ct(m),t.name)),getFileName:a.getFileName,getModuleIds:()=>e.modulesById.keys(),getModuleInfo:e.getModuleInfo,getWatchFiles:()=>Object.keys(e.watchFiles),info:pe(Ot,"PLUGIN_LOG",o,t.name,s),load:m=>e.moduleLoader.preloadModule(m),meta:{rollupVersion:Na,watchMode:e.watchMode},get moduleIds(){const m=e.modulesById.keys();return function*(){Bt(`Accessing "this.moduleIds" on the plugin context by plugin ${t.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,"plugin-development/#this-getmoduleids",!0,r,t.name),yield*m}()},parse:e.contextParse.bind(e),resolve:(m,h,{assertions:v,custom:p,isEntry:g,skipSelf:y}=In)=>e.moduleLoader.resolveId(m,h,p,g,v||Bn,y?[{importer:h,plugin:t,source:m}]:null),setAssetSource:a.setAssetSource,warn:pe(V,"PLUGIN_WARNING",o,t.name,s)}}const eh=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class ls{constructor(n,e,r,a,i){this.graph=n,this.options=e,this.pluginCache=a,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new nh(n,e,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...r];const s=new Set;if(this.pluginContexts=new Map(this.plugins.map(_=>[_,th(_,a,n,e,this.fileEmitter,s)])),i)for(const _ of r)for(const l of eh)l in _&&e.onLog(V,(o=_.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${l}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(n){return new ls(this.graph,this.options,n,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(n,e,r,a){return this.hookFirstAndGetPlugin(n,e,r,a).then(i=>i&&i[0])}async hookFirstAndGetPlugin(n,e,r,a){for(const i of this.getSortedPlugins(n)){if(a!=null&&a.has(i))continue;const s=await this.runHook(n,e,i,r);if(s!=null)return[s,i]}return null}hookFirstSync(n,e,r){for(const a of this.getSortedPlugins(n)){const i=this.runHookSync(n,e,a,r);if(i!=null)return i}return null}async hookParallel(n,e,r){const a=[];for(const i of this.getSortedPlugins(n))i[n].sequential?(await Promise.all(a),a.length=0,await this.runHook(n,e,i,r)):a.push(this.runHook(n,e,i,r));await Promise.all(a)}hookReduceArg0(n,[e,...r],a,i){let s=Promise.resolve(e);for(const o of this.getSortedPlugins(n))s=s.then(_=>this.runHook(n,[_,...r],o,i).then(l=>a.call(this.pluginContexts.get(o),_,l,o)));return s}hookReduceArg0Sync(n,[e,...r],a,i){for(const s of this.getSortedPlugins(n)){const o=[e,...r],_=this.runHookSync(n,o,s,i);e=a.call(this.pluginContexts.get(s),e,_,s)}return e}async hookReduceValue(n,e,r,a){const i=[],s=[];for(const o of this.getSortedPlugins(n,ah))o[n].sequential?(i.push(...await Promise.all(s)),s.length=0,i.push(await this.runHook(n,r,o))):s.push(this.runHook(n,r,o));return i.push(...await Promise.all(s)),i.reduce(a,await e)}hookReduceValueSync(n,e,r,a,i){let s=e;for(const o of this.getSortedPlugins(n)){const _=this.runHookSync(n,r,o,i);s=a.call(this.pluginContexts.get(o),s,_,o)}return s}hookSeq(n,e,r){let a=Promise.resolve();for(const i of this.getSortedPlugins(n))a=a.then(()=>this.runHook(n,e,i,r));return a.then(ih)}getSortedPlugins(n,e){return zn(this.sortedPlugins,n,()=>cs(n,this.plugins,e))}runHook(n,e,r,a){const i=r[n],s=typeof i=="object"?i.handler:i;let o=this.pluginContexts.get(r);a&&(o=a(o,r));let _=null;return Promise.resolve().then(()=>{if(typeof s!="function")return s;const l=s.apply(o,e);return l!=null&&l.then?(_=[r.name,n,e],this.unfulfilledActions.add(_),Promise.resolve(l).then(u=>(this.unfulfilledActions.delete(_),u))):l}).catch(l=>(_!==null&&this.unfulfilledActions.delete(_),L(Se(l,r.name,{hook:n}))))}runHookSync(n,e,r,a){const i=r[n],s=typeof i=="object"?i.handler:i;let o=this.pluginContexts.get(r);a&&(o=a(o,r));try{return s.apply(o,e)}catch(_){return L(Se(_,r.name,{hook:n}))}}}function cs(t,n,e=rh){const r=[],a=[],i=[];for(const s of n){const o=s[t];if(o){if(typeof o=="object"){if(e(o.handler,t,s),o.order==="pre"){r.push(s);continue}if(o.order==="post"){i.push(s);continue}}else e(o,t,s);a.push(s)}}return[...r,...a,...i]}function rh(t,n,e){typeof t!="function"&&L(function(r,a){return{code:Vs,hook:r,message:`Error running plugin hook "${r}" for plugin "${a}", expected a function hook or an object with a "handler" function.`,plugin:a}}(n,e.name))}function ah(t,n,e){if(typeof t!="string"&&typeof t!="function")return L(function(r,a){return{code:Vs,hook:r,message:`Error running plugin hook "${r}" for plugin "${a}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:a}}(n,e.name))}function ih(){}class sh{constructor(n){this.maxParallel=n,this.queue=[],this.workerCount=0}run(n){return new Promise((e,r)=>{this.queue.push({reject:r,resolve:e,task:n}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let n;for(this.workerCount++;n=this.queue.shift();){const{reject:e,resolve:r,task:a}=n;try{r(await a())}catch(i){e(i)}}this.workerCount--}}class oh{constructor(n,e){var r,a;if(this.options=n,this.astLru=function(i){var s,o,_,l=i||1;function u(m,h){++s>l&&(_=o,f(1),++s),o[m]=h}function f(m){s=0,o=Object.create(null),m||(_=Object.create(null))}return f(),{clear:f,has:function(m){return o[m]!==void 0||_[m]!==void 0},get:function(m){var h=o[m];return h!==void 0?h:(h=_[m])!==void 0?(u(m,h),h):void 0},set:function(m,h){o[m]!==void 0?o[m]=h:u(m,h)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new re,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=St.LOAD_AND_PARSE,this.scope=new Kp,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=i=>{const s=this.modulesById.get(i);return s?s.info:null},n.cache!==!1){if((r=n.cache)!=null&&r.modules)for(const i of n.cache.modules)this.cachedModules.set(i.id,i);this.pluginCache=((a=n.cache)==null?void 0:a.plugins)||Object.create(null);for(const i in this.pluginCache){const s=this.pluginCache[i];for(const o of Object.values(s))o[0]++}}if(e){this.watchMode=!0;const i=(...o)=>this.pluginDriver.hookParallel("watchChange",o),s=()=>this.pluginDriver.hookParallel("closeWatcher",[]);e.onCurrentRun("change",i),e.onCurrentRun("close",s)}this.pluginDriver=new ls(this,n,n.plugins,this.pluginCache),this.acornParser=dn.extend(...n.acornInjectPlugins),this.moduleLoader=new Jp(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new sh(n.maxParallelFileOps),this.pureFunctions=(({treeshake:i})=>{const s=Object.create(null);for(const o of i?i.manualPureFunctions:[]){let _=s;for(const l of o.split("."))_=_[l]||(_[l]=Object.create(null));_[si]=!0}return s})(n)}async build(){$n("generate module graph",2),await this.generateModuleGraph(),yn("generate module graph",2),$n("sort and bind modules",2),this.phase=St.ANALYSE,this.sortModules(),yn("sort and bind modules",2),$n("mark included statements",2),this.includeStatements(),yn("mark included statements",2),this.phase=St.GENERATE}contextParse(n,e={}){const r=e.onComment,a=[];e.onComment=r&&typeof r=="function"?(s,o,_,l,...u)=>(a.push({end:l,start:_,type:s?"Block":"Line",value:o}),r.call(e,s,o,_,l,...u)):a;const i=this.acornParser.parse(n,{...this.options.acorn,...e});return typeof r=="object"&&r.push(...a),e.onComment=r,function(s,o,_){const l=[],u=[];for(const f of s){for(const[m,h]of Um)h.test(f.value)&&l.push({...f,annotationType:m});qm.test(f.value)&&u.push(f)}for(const f of u)Sr(o,f,!1);co(o,{annotationIndex:0,annotations:l,code:_})}(a,i,n),i}getCache(){for(const n in this.pluginCache){const e=this.pluginCache[n];let r=!0;for(const[a,i]of Object.entries(e))i[0]>=this.options.experimentalCacheExpiry?delete e[a]:r=!1;r&&delete this.pluginCache[n]}return{modules:this.modules.map(n=>n.toJSON()),plugins:this.pluginCache}}async generateModuleGraph(){var n;if({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((n=this.options.input,Array.isArray(n)?n.map(e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(n).map(([e,r])=>({fileName:null,id:r,implicitlyLoadedAfter:[],importer:void 0,name:e}))),!0),this.entryModules.length===0)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof hn?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const n=[...this.entryModules,...this.implicitEntryModules];for(const e of n)We(e);if(this.options.treeshake){let e=1;do{$n(`treeshaking pass ${e}`,3),this.needsTreeshakingPass=!1;for(const r of this.modules)r.isExecuted&&(r.info.moduleSideEffects==="no-treeshake"?r.includeAllInBundle():r.include());if(e===1)for(const r of n)r.preserveSignature!==!1&&(r.includeAllExports(!1),this.needsTreeshakingPass=!0);yn("treeshaking pass "+e++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const r of e.implicitlyLoadedAfter)r.info.isEntry||r.isIncluded()||L(Sm(r))}sortModules(){const{orderedModules:n,cyclePaths:e}=function(r){let a=0;const i=[],s=new Set,o=new Set,_=new Map,l=[],u=f=>{if(f instanceof hn){for(const m of f.dependencies)_.has(m)?s.has(m)||i.push(Zd(m,f,_)):(_.set(m,f),u(m));for(const m of f.implicitlyLoadedBefore)o.add(m);for(const{resolution:m}of f.dynamicImports)m instanceof hn&&o.add(m);l.push(f)}f.execIndex=a++,s.add(f)};for(const f of r)_.has(f)||(_.set(f,null),u(f));for(const f of o)_.has(f)||(_.set(f,null),u(f));return{cyclePaths:i,orderedModules:l}}(this.entryModules);for(const r of e)this.options.onLog(V,wm(r));this.modules=n;for(const r of this.modules)r.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const n of this.modules)for(const e of n.importDescriptions.values())e.name==="*"||e.module.getVariableForExportName(e.name)[0]||n.log(V,$r(e.name,n.id,e.module.id),e.start)}}function ql(t,n){return n()}function Vl(t,n,e,r){t=cs("onLog",t);const a=zt[r],i=(s,o,_=Ds)=>{if(!(zt[s]zt[m]i(m,ct(h),new Set(_).add(l));if(("handler"in u?u.handler:u).call({debug:f(we),error:m=>L(ct(m)),info:f(Ot),meta:{rollupVersion:Na,watchMode:e},warn:f(V)},s,o)===!1)return}n(s,o)}};return i}const _h="{".charCodeAt(0),lh=" ".charCodeAt(0),Xl="assert";function ch(t){const n=t.acorn||Bp,{tokTypes:e,TokenType:r}=n;return class extends t{constructor(...a){super(...a),this.assertToken=new r(Xl)}_codeAt(a){return this.input.charCodeAt(a)}_eat(a){this.type!==a&&this.unexpected(),this.next()}readToken(a){let i=0;for(;i<6;i++)if(this._codeAt(this.pos+i)!==Xl.charCodeAt(i))return super.readToken(a);for(;this._codeAt(this.pos+i)!==_h;i++)if(this._codeAt(this.pos+i)!==lh)return super.readToken(a);return this.type.label==="{"?super.readToken(a):(this.pos+=6,this.finishToken(this.assertToken))}parseDynamicImport(a){if(this.next(),a.source=this.parseMaybeAssign(),this.eat(e.comma)){const i=this.parseObj(!1);a.arguments=[i]}return this._eat(e.parenR),this.finishNode(a,"ImportExpression")}parseExport(a,i){if(this.next(),this.eat(e.star)){if(this.options.ecmaVersion>=11&&(this.eatContextual("as")?(a.exported=this.parseIdent(!0),this.checkExport(i,a.exported.name,this.lastTokStart)):a.exported=null),this.expectContextual("from"),this.type!==e.string&&this.unexpected(),a.source=this.parseExprAtom(),this.type===this.assertToken||this.type===e._with){this.next();const m=this.parseImportAssertions();m&&(a.assertions=m)}return this.semicolon(),this.finishNode(a,"ExportAllDeclaration")}if(this.eat(e._default)){var s;if(this.checkExport(i,"default",this.lastTokStart),this.type===e._function||(s=this.isAsyncFunction())){var o=this.startNode();this.next(),s&&this.next(),a.declaration=this.parseFunction(o,5,!1,s)}else if(this.type===e._class){var _=this.startNode();a.declaration=this.parseClass(_,"nullableID")}else a.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(a,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())a.declaration=this.parseStatement(null),a.declaration.type==="VariableDeclaration"?this.checkVariableExport(i,a.declaration.declarations):this.checkExport(i,a.declaration.id.name,a.declaration.id.start),a.specifiers=[],a.source=null;else{if(a.declaration=null,a.specifiers=this.parseExportSpecifiers(i),this.eatContextual("from")){if(this.type!==e.string&&this.unexpected(),a.source=this.parseExprAtom(),this.type===this.assertToken||this.type===e._with){this.next();const m=this.parseImportAssertions();m&&(a.assertions=m)}}else{for(var l=0,u=a.specifiers;l({ecmaVersion:"latest",sourceType:"module",...t.acorn}),fh=t=>[ch,...Ul(t.acornInjectPlugins)],mh=t=>{var n;return t.cache===!0?void 0:((n=t.cache)==null?void 0:n.cache)||t.cache},dh=t=>{if(t===!0)return()=>!0;if(typeof t=="function")return(n,...e)=>!n.startsWith("\0")&&t(n,...e)||!1;if(t){const n=new Set,e=[];for(const r of Ul(t))r instanceof RegExp?e.push(r):n.add(r);return(r,...a)=>n.has(r)||e.some(i=>i.test(r))}return()=>!1},ph=(t,n,e)=>{const r=t.inlineDynamicImports;return r&&Ae('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',qa,!0,n,e),r},hh=t=>{const n=t.input;return n==null?[]:typeof n=="string"?[n]:n},gh=(t,n,e)=>{const r=t.manualChunks;return r&&Ae('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',Xa,!0,n,e),r},bh=(t,n,e)=>{const r=t.maxParallelFileReads;typeof r=="number"&&Ae('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',"configuration-options/#maxparallelfileops",!0,n,e);const a=t.maxParallelFileOps??r;return typeof a=="number"?a<=0?1/0:a:20},vh=(t,n)=>{const e=t.moduleContext;if(typeof e=="function")return r=>e(r)??n;if(e){const r=Object.create(null);for(const[a,i]of Object.entries(e))r[Jn(a)]=i;return a=>r[a]??n}return()=>n},yh=(t,n,e)=>{const r=t.preserveModules;return r&&Ae('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',"configuration-options/#output-preservemodules",!0,n,e),r},xh=t=>{if(t.treeshake===!1)return!1;const n=Dl(t.treeshake,Up,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:n.annotations!==!1,correctVarValueBeforeDeclaration:n.correctVarValueBeforeDeclaration===!0,manualPureFunctions:n.manualPureFunctions??bn,moduleSideEffects:$h(n.moduleSideEffects),propertyReadSideEffects:n.propertyReadSideEffects==="always"?"always":n.propertyReadSideEffects!==!1,tryCatchDeoptimization:n.tryCatchDeoptimization!==!1,unknownGlobalSideEffects:n.unknownGlobalSideEffects!==!1}},$h=t=>{if(typeof t=="boolean")return()=>t;if(t==="no-external")return(n,e)=>!e;if(typeof t=="function")return(n,e)=>!!n.startsWith("\0")||t(n,e)!==!1;if(Array.isArray(t)){const n=new Set(t);return e=>n.has(e)}return t&&L(vn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Eh=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,kh=/^[a-z]:/i;function wh(t){const n=kh.exec(t),e=n?n[0]:"";return e+t.slice(e.length).replace(Eh,"_")}const Ch=(t,n,e)=>{const{file:r}=t;if(typeof r=="string"){if(n)return L(vn("output.file",Ce,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(e.input))return L(vn("output.file",Ce,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return r},Sh=t=>{const n=t.format;switch(n){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return n;default:return L(vn("output.format",Fs,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',n))}},Ah=(t,n)=>{const e=(t.inlineDynamicImports??n.inlineDynamicImports)||!1,{input:r}=n;return e&&(Array.isArray(r)?r:Object.keys(r)).length>1?L(vn("output.inlineDynamicImports",qa,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):e},Ih=(t,n,e)=>{const r=(t.preserveModules??e.preserveModules)||!1;if(r){if(n)return L(vn("output.inlineDynamicImports",qa,'this option is not supported for "output.preserveModules"'));if(e.preserveEntrySignatures===!1)return L(vn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return r},Nh=(t,n)=>{const e=t.preferConst;return e!=null&&Bt('The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.',"configuration-options/#output-generatedcode-constbindings",!0,n),!!e},Th=t=>{const{preserveModulesRoot:n}=t;if(n!=null)return Jn(n)},jh=t=>{const n={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...t.amd};return(n.autoId||n.basePath)&&n.id?L(vn("output.amd.id",Bs,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):n.basePath&&!n.autoId?L(vn("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):n.autoId?{autoId:!0,basePath:n.basePath,define:n.define,forceJsExtensionForImports:n.forceJsExtensionForImports}:{autoId:!1,define:n.define,forceJsExtensionForImports:n.forceJsExtensionForImports,id:n.id}},fa=(t,n)=>{const e=t[n];return typeof e=="function"?e:()=>e||""},Lh=(t,n)=>{const{dir:e}=t;return typeof e=="string"&&typeof n=="string"?L(vn("output.dir",Ce,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):e},Mh=(t,n,e)=>{const r=t.dynamicImportFunction;return r&&(Bt('The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.',"plugin-development/#renderdynamicimport",!0,n),e!=="es"&&n.onLog(V,vn("output.dynamicImportFunction","configuration-options/#output-dynamicimportfunction",'this option is ignored for formats other than "es"'))),r},Dh=(t,n)=>{const e=t.entryFileNames;return e==null&&n.add("entryFileNames"),e??"[name].js"};function Ph(t,n){const e=t.experimentalDeepDynamicChunkOptimization;return e!=null&&Bt('The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.',Kf,!0,n),e||!1}function Oh(t,n){const e=t.exports;if(e==null)n.add("exports");else if(!["default","named","none","auto"].includes(e))return L({code:qs,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${e}".`,url:wn(Ra)});return e||"auto"}const zh=(t,n)=>{const e=Dl(t.generatedCode,Hp,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:e.arrowFunctions===!0,constBindings:e.constBindings===!0||n,objectShorthand:e.objectShorthand===!0,reservedNamesAsProps:e.reservedNamesAsProps!==!1,symbols:e.symbols===!0}},Bh=(t,n)=>{if(n)return"";const e=t.indent;return e===!1?"":e??!0},Hl=new Set(["compat","auto","esModule","default","defaultOnly"]),Fh=t=>{const n=t.interop;if(typeof n=="function"){const e=Object.create(null);let r=null;return a=>a===null?r||us(r=n(a)):a in e?e[a]:us(e[a]=n(a))}return n===void 0?()=>"default":()=>us(n)},us=t=>Hl.has(t)?t:L(vn("output.interop",Va,`use one of ${Array.from(Hl,n=>JSON.stringify(n)).join(", ")}`,t)),Gh=(t,n,e,r)=>{const a=t.manualChunks||r.manualChunks;if(a){if(n)return L(vn("output.manualChunks",Xa,'this option is not supported for "output.inlineDynamicImports"'));if(e)return L(vn("output.manualChunks",Xa,'this option is not supported for "output.preserveModules"'))}return a||{}},Rh=(t,n,e)=>t.minifyInternalExports??(e||n==="es"||n==="system"),qh=(t,n,e)=>{const r=t.namespaceToStringTag;return r!=null?(Bt('The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.',"configuration-options/#output-generatedcode-symbols",!0,e),r):n.symbols||!1},Vh=t=>{const{sourcemapBaseUrl:n}=t;if(n)return function(r){try{new URL(r)}catch{return!1}return!0}(n)?(e=n).endsWith("/")?e:e+"/":L(vn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(n)}`));var e};function Xh(t){return async function(n,e){const{options:r,unsetOptions:a}=await async function(_,l){if(!_)throw new Error("You must supply an options object to rollup");const u=await async function(h,v){const p=cs("options",await ua(h.plugins)),g=h.logLevel||Ot,y=Vl(p,Tl(h,g),v,g);for(const E of p){const{name:b,options:x}=E,$="handler"in x?x.handler:x,S=await $.call({debug:pe(we,"PLUGIN_LOG",y,b,g),error:A=>L(Se(ct(A),b,{hook:"onLog"})),info:pe(Ot,"PLUGIN_LOG",y,b,g),meta:{rollupVersion:Na,watchMode:v},warn:pe(V,"PLUGIN_WARNING",y,b,g)},h);S&&(h=S)}return h}(_,l),{options:f,unsetOptions:m}=await async function(h,v){const p=new Set,g=h.context??"undefined",y=await ua(h.plugins),E=h.logLevel||Ot,b=Vl(y,Tl(h,E),v,E),x=h.strictDeprecations||!1,$=bh(h,b,x),S={acorn:uh(h),acornInjectPlugins:fh(h),cache:mh(h),context:g,experimentalCacheExpiry:h.experimentalCacheExpiry??10,experimentalLogSideEffects:h.experimentalLogSideEffects||!1,external:dh(h.external),inlineDynamicImports:ph(h,b,x),input:hh(h),logLevel:E,makeAbsoluteExternalsRelative:h.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:gh(h,b,x),maxParallelFileOps:$,maxParallelFileReads:$,moduleContext:vh(h,g),onLog:b,onwarn:A=>b(V,A),perf:h.perf||!1,plugins:y,preserveEntrySignatures:h.preserveEntrySignatures??"exports-only",preserveModules:yh(h,b,x),preserveSymlinks:h.preserveSymlinks||!1,shimMissingExports:h.shimMissingExports||!1,strictDeprecations:x,treeshake:xh(h)};return Ml(h,[...Object.keys(S),"watch"],"input options",b,/^(output)$/),{options:S,unsetOptions:p}}(u,l);return Wl(f.plugins,is),{options:f,unsetOptions:m}}(n,e!==null);(function(_){_.perf?(He=new Map,$n=vd,yn=yd,_.plugins=_.plugins.map(Ed)):($n=rt,yn=rt)})(r);const i=new oh(r,e),s=n.cache!==!1;n.cache&&(r.cache=void 0,n.cache=void 0),$n("BUILD",1),await ql(i.pluginDriver,async()=>{try{$n("initialize",2),await i.pluginDriver.hookParallel("buildStart",[r]),yn("initialize",2),await i.build()}catch(_){const l=Object.keys(i.watchFiles);throw l.length>0&&(_.watchFiles=l),await i.pluginDriver.hookParallel("buildEnd",[_]),await i.pluginDriver.hookParallel("closeBundle",[]),_}await i.pluginDriver.hookParallel("buildEnd",[])}),yn("BUILD",1);const o={cache:s?i.getCache():void 0,async close(){o.closed||(o.closed=!0,await i.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async _=>o.closed?L(Ys()):Jl(!1,r,a,_,i),watchFiles:Object.keys(i.watchFiles),write:async _=>o.closed?L(Ys()):Jl(!0,r,a,_,i)};return r.perf&&(o.getTimings=xd),o}(t,null)}function Wl(t,n){for(const[e,r]of t.entries())r.name||(r.name=`${n}${e+1}`)}async function Jl(t,n,e,r,a){const{options:i,outputPluginDriver:s,unsetOptions:o}=await async function(_,l,u,f){if(!_)throw new Error("You must supply an options object");const m=await ua(_.plugins);Wl(m,ss);const h=l.createOutputPluginDriver(m);return{...await Uh(u,f,_,h),outputPluginDriver:h}}(r,a.pluginDriver,n,e);return ql(0,async()=>{const _=new vp(i,o,n,s,a),l=await _.generate(t);if(t){if($n("WRITE",1),!i.dir&&!i.file)return L({code:gm,message:'You must specify "output.file" or "output.dir" for the build.',url:wn(Ce)});await Promise.all(Object.values(l).map(f=>a.fileOperationQueue.run(()=>async function(m,h){const v=Jn(h.dir||Mt(h.file),m.fileName);return await Fp(Mt(v),{recursive:!0}),Rp(v,m.type==="asset"?m.source:m.code)}(f,i)))),await s.hookParallel("writeBundle",[i,l]),yn("WRITE",1)}return u=l,{output:Object.values(u).filter(f=>Object.keys(f).length>0).sort((f,m)=>Kl(f)-Kl(m))};var u})}function Uh(t,n,e,r){return async function(a,i,s){const o=new Set(s),_=a.compact||!1,l=Sh(a),u=Ah(a,i),f=Ih(a,u,i),m=Ch(a,f,i),h=Nh(a,i),v=zh(a,h),p={amd:jh(a),assetFileNames:a.assetFileNames??"assets/[name]-[hash][extname]",banner:fa(a,"banner"),chunkFileNames:a.chunkFileNames??"[name]-[hash].js",compact:_,dir:Lh(a,m),dynamicImportFunction:Mh(a,i,l),dynamicImportInCjs:a.dynamicImportInCjs??!0,entryFileNames:Dh(a,o),esModule:a.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:Ph(a,i),experimentalMinChunkSize:a.experimentalMinChunkSize??1,exports:Oh(a,o),extend:a.extend||!1,externalImportAssertions:a.externalImportAssertions??!0,externalLiveBindings:a.externalLiveBindings??!0,file:m,footer:fa(a,"footer"),format:l,freeze:a.freeze??!0,generatedCode:v,globals:a.globals||{},hoistTransitiveImports:a.hoistTransitiveImports??!0,indent:Bh(a,_),inlineDynamicImports:u,interop:Fh(a),intro:fa(a,"intro"),manualChunks:Gh(a,u,f,i),minifyInternalExports:Rh(a,l,_),name:a.name,namespaceToStringTag:qh(a,v,i),noConflict:a.noConflict||!1,outro:fa(a,"outro"),paths:a.paths||{},plugins:await ua(a.plugins),preferConst:h,preserveModules:f,preserveModulesRoot:Th(a),sanitizeFileName:typeof a.sanitizeFileName=="function"?a.sanitizeFileName:a.sanitizeFileName===!1?g=>g:wh,sourcemap:a.sourcemap||!1,sourcemapBaseUrl:Vh(a),sourcemapExcludeSources:a.sourcemapExcludeSources||!1,sourcemapFile:a.sourcemapFile,sourcemapIgnoreList:typeof a.sourcemapIgnoreList=="function"?a.sourcemapIgnoreList:a.sourcemapIgnoreList===!1?()=>!1:g=>g.includes("node_modules"),sourcemapPathTransform:a.sourcemapPathTransform,strict:a.strict??!0,systemNullSetters:a.systemNullSetters??!0,validate:a.validate||!1};return Ml(a,Object.keys(p),"output options",i.onLog),{options:p,unsetOptions:o}}(r.hookReduceArg0Sync("outputOptions",[e],(a,i)=>i||a,a=>{const i=()=>a.error({code:rm,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...a,emitFile:i,setAssetSource:i}}),t,n)}var er;function Kl(t){return t.type==="asset"?er.ASSET:t.isEntry?er.ENTRY_CHUNK:er.SECONDARY_CHUNK}(function(t){t[t.ENTRY_CHUNK=0]="ENTRY_CHUNK",t[t.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",t[t.ASSET=2]="ASSET"})(er||(er={}));const Yl=["log","warn","info","debug","error"];console.original={};let ma=[],da=!1,Hh=(t,n)=>{const e=n.map(r=>typeof r=="object"?r instanceof Error?JSON.stringify(r,Object.getOwnPropertyNames(r)):JSON.stringify(r):r);ma.push({kind:t,args:e,date:Date.now()})},Wh=(t=!1)=>{const n={apply:(e,r,a)=>{if(Hh(e.name,a),e.bind(r),t)return e(...a)}};Yl.forEach(e=>{da||(console.original[e]=console[e]),console[e]=new Proxy(console[e],n)}),da=!0},Jh=()=>{da&&Yl.forEach(t=>{console[t]=console.original[t]}),da=!1},Kh=(t=!1)=>{ma=[],Wh(t)},Yh=()=>{Jh()},Zl=()=>{ma=[]},Zh=()=>ma,Qh=t=>t.map(n=>n.args.join(" "));const rr={},Ql=Object.assign({"../../_build/default/playground/output/node_modules/melange.js/caml.js":ec,"../../_build/default/playground/output/node_modules/melange.js/caml_array.js":rc,"../../_build/default/playground/output/node_modules/melange.js/caml_array_extern.js":ac,"../../_build/default/playground/output/node_modules/melange.js/caml_bytes.js":ic,"../../_build/default/playground/output/node_modules/melange.js/caml_exceptions.js":sc,"../../_build/default/playground/output/node_modules/melange.js/caml_external_polyfill.js":oc,"../../_build/default/playground/output/node_modules/melange.js/caml_float.js":_c,"../../_build/default/playground/output/node_modules/melange.js/caml_float_extern.js":lc,"../../_build/default/playground/output/node_modules/melange.js/caml_format.js":cc,"../../_build/default/playground/output/node_modules/melange.js/caml_gc.js":uc,"../../_build/default/playground/output/node_modules/melange.js/caml_hash.js":fc,"../../_build/default/playground/output/node_modules/melange.js/caml_hash_primitive.js":mc,"../../_build/default/playground/output/node_modules/melange.js/caml_int32.js":dc,"../../_build/default/playground/output/node_modules/melange.js/caml_int32_extern.js":pc,"../../_build/default/playground/output/node_modules/melange.js/caml_int64.js":hc,"../../_build/default/playground/output/node_modules/melange.js/caml_int64_extern.js":gc,"../../_build/default/playground/output/node_modules/melange.js/caml_io.js":bc,"../../_build/default/playground/output/node_modules/melange.js/caml_js_exceptions.js":vc,"../../_build/default/playground/output/node_modules/melange.js/caml_lexer.js":yc,"../../_build/default/playground/output/node_modules/melange.js/caml_md5.js":xc,"../../_build/default/playground/output/node_modules/melange.js/caml_module.js":$c,"../../_build/default/playground/output/node_modules/melange.js/caml_nativeint_extern.js":Ec,"../../_build/default/playground/output/node_modules/melange.js/caml_obj.js":kc,"../../_build/default/playground/output/node_modules/melange.js/caml_oo.js":wc,"../../_build/default/playground/output/node_modules/melange.js/caml_oo_curry.js":Cc,"../../_build/default/playground/output/node_modules/melange.js/caml_option.js":Sc,"../../_build/default/playground/output/node_modules/melange.js/caml_parser.js":Ac,"../../_build/default/playground/output/node_modules/melange.js/caml_splice_call.js":Ic,"../../_build/default/playground/output/node_modules/melange.js/caml_string.js":Nc,"../../_build/default/playground/output/node_modules/melange.js/caml_string_extern.js":Tc,"../../_build/default/playground/output/node_modules/melange.js/caml_sys.js":jc,"../../_build/default/playground/output/node_modules/melange.js/caml_undefined_extern.js":Lc,"../../_build/default/playground/output/node_modules/melange.js/curry.js":Mc,"../../_build/default/playground/output/node_modules/melange.js/js.js":Dc,"../../_build/default/playground/output/node_modules/melange.js/js_OO.js":Pc,"../../_build/default/playground/output/node_modules/melange.js/js__.js":Oc,"../../_build/default/playground/output/node_modules/melange.js/js_array.js":zc,"../../_build/default/playground/output/node_modules/melange.js/js_bigint.js":Bc,"../../_build/default/playground/output/node_modules/melange.js/js_console.js":Fc,"../../_build/default/playground/output/node_modules/melange.js/js_date.js":Gc,"../../_build/default/playground/output/node_modules/melange.js/js_dict.js":Rc,"../../_build/default/playground/output/node_modules/melange.js/js_exn.js":qc,"../../_build/default/playground/output/node_modules/melange.js/js_float.js":Vc,"../../_build/default/playground/output/node_modules/melange.js/js_global.js":Xc,"../../_build/default/playground/output/node_modules/melange.js/js_int.js":Uc,"../../_build/default/playground/output/node_modules/melange.js/js_internal.js":Hc,"../../_build/default/playground/output/node_modules/melange.js/js_json.js":Wc,"../../_build/default/playground/output/node_modules/melange.js/js_map.js":Jc,"../../_build/default/playground/output/node_modules/melange.js/js_mapper_runtime.js":Kc,"../../_build/default/playground/output/node_modules/melange.js/js_math.js":Yc,"../../_build/default/playground/output/node_modules/melange.js/js_null.js":Zc,"../../_build/default/playground/output/node_modules/melange.js/js_nullable.js":Qc,"../../_build/default/playground/output/node_modules/melange.js/js_promise.js":nu,"../../_build/default/playground/output/node_modules/melange.js/js_re.js":tu,"../../_build/default/playground/output/node_modules/melange.js/js_set.js":eu,"../../_build/default/playground/output/node_modules/melange.js/js_string.js":ru,"../../_build/default/playground/output/node_modules/melange.js/js_typed_array.js":au,"../../_build/default/playground/output/node_modules/melange.js/js_types.js":iu,"../../_build/default/playground/output/node_modules/melange.js/js_undefined.js":su,"../../_build/default/playground/output/node_modules/melange.js/js_weakmap.js":ou,"../../_build/default/playground/output/node_modules/melange.js/js_weakset.js":_u,"../../_build/default/playground/output/node_modules/melange.js/melange_mini_stdlib.js":lu,"../../_build/default/playground/output/node_modules/melange/arg.js":cu,"../../_build/default/playground/output/node_modules/melange/array.js":uu,"../../_build/default/playground/output/node_modules/melange/arrayLabels.js":fu,"../../_build/default/playground/output/node_modules/melange/atomic.js":mu,"../../_build/default/playground/output/node_modules/melange/bool.js":du,"../../_build/default/playground/output/node_modules/melange/buffer.js":pu,"../../_build/default/playground/output/node_modules/melange/bytes.js":hu,"../../_build/default/playground/output/node_modules/melange/bytesLabels.js":gu,"../../_build/default/playground/output/node_modules/melange/callback.js":bu,"../../_build/default/playground/output/node_modules/melange/camlinternalAtomic.js":vu,"../../_build/default/playground/output/node_modules/melange/camlinternalFormat.js":yu,"../../_build/default/playground/output/node_modules/melange/camlinternalFormatBasics.js":xu,"../../_build/default/playground/output/node_modules/melange/camlinternalLazy.js":$u,"../../_build/default/playground/output/node_modules/melange/camlinternalMod.js":Eu,"../../_build/default/playground/output/node_modules/melange/camlinternalOO.js":ku,"../../_build/default/playground/output/node_modules/melange/char.js":wu,"../../_build/default/playground/output/node_modules/melange/complex.js":Cu,"../../_build/default/playground/output/node_modules/melange/digest.js":Su,"../../_build/default/playground/output/node_modules/melange/domain.js":Au,"../../_build/default/playground/output/node_modules/melange/either.js":Iu,"../../_build/default/playground/output/node_modules/melange/ephemeron.js":Nu,"../../_build/default/playground/output/node_modules/melange/filename.js":Tu,"../../_build/default/playground/output/node_modules/melange/float.js":ju,"../../_build/default/playground/output/node_modules/melange/format.js":Lu,"../../_build/default/playground/output/node_modules/melange/fun.js":Mu,"../../_build/default/playground/output/node_modules/melange/gc.js":Du,"../../_build/default/playground/output/node_modules/melange/hashtbl.js":Pu,"../../_build/default/playground/output/node_modules/melange/in_channel.js":Ou,"../../_build/default/playground/output/node_modules/melange/int.js":zu,"../../_build/default/playground/output/node_modules/melange/int32.js":Bu,"../../_build/default/playground/output/node_modules/melange/int64.js":Fu,"../../_build/default/playground/output/node_modules/melange/lazy.js":Gu,"../../_build/default/playground/output/node_modules/melange/lexing.js":Ru,"../../_build/default/playground/output/node_modules/melange/list.js":qu,"../../_build/default/playground/output/node_modules/melange/listLabels.js":Vu,"../../_build/default/playground/output/node_modules/melange/map.js":Xu,"../../_build/default/playground/output/node_modules/melange/marshal.js":Uu,"../../_build/default/playground/output/node_modules/melange/moreLabels.js":Hu,"../../_build/default/playground/output/node_modules/melange/mutex.js":Wu,"../../_build/default/playground/output/node_modules/melange/obj.js":Ju,"../../_build/default/playground/output/node_modules/melange/oo.js":Ku,"../../_build/default/playground/output/node_modules/melange/option.js":Yu,"../../_build/default/playground/output/node_modules/melange/out_channel.js":Zu,"../../_build/default/playground/output/node_modules/melange/parsing.js":Qu,"../../_build/default/playground/output/node_modules/melange/printexc.js":nf,"../../_build/default/playground/output/node_modules/melange/printf.js":tf,"../../_build/default/playground/output/node_modules/melange/queue.js":ef,"../../_build/default/playground/output/node_modules/melange/random.js":rf,"../../_build/default/playground/output/node_modules/melange/result.js":af,"../../_build/default/playground/output/node_modules/melange/scanf.js":sf,"../../_build/default/playground/output/node_modules/melange/seq.js":of,"../../_build/default/playground/output/node_modules/melange/set.js":_f,"../../_build/default/playground/output/node_modules/melange/stack.js":lf,"../../_build/default/playground/output/node_modules/melange/stdLabels.js":cf,"../../_build/default/playground/output/node_modules/melange/std_exit.js":uf,"../../_build/default/playground/output/node_modules/melange/stdlib.js":ff,"../../_build/default/playground/output/node_modules/melange/string.js":mf,"../../_build/default/playground/output/node_modules/melange/stringLabels.js":df,"../../_build/default/playground/output/node_modules/melange/sys.js":pf,"../../_build/default/playground/output/node_modules/melange/type.js":hf,"../../_build/default/playground/output/node_modules/melange/uchar.js":gf,"../../_build/default/playground/output/node_modules/melange/unit.js":bf,"../../_build/default/playground/output/node_modules/melange/weak.js":vf});Object.keys(Ql).forEach(t=>{const n=Ql[t];rr[t.replace("../../_build/default/playground/output/node_modules/","")]=n});const n1=eval,pa=new Map;async function t1(t){if(pa.has(t))return pa.get(t);const n=fetch(t).then(async e=>{if(!e.ok)throw new Error(await e.text());return{url:e.url,body:await e.text()}}).catch(e=>{throw pa.delete(t),e});return pa.set(t,n),n}jf("bundle",async(t,n)=>{switch(n.type){case"clear.logs":Zl(),t.logs=[];break;case"bundle":const e=n.code;if(!e)return;Kh(),Zl(),rr["main.js"]=e;const r=await Xh({input:"main.js",plugins:[{name:"loader",resolveId(i,s){var o=i;return i.substring(0,2)=="./"&&s&&(o=s.substring(0,s.lastIndexOf("/")+1)+o.substring(2,i.length)),rr.hasOwnProperty(o)?o:i[0]=="/"?"https://esm.sh"+i:i.substring(0,8)!="https://"?"https://esm.sh/"+i:i},async load(i){if(rr.hasOwnProperty(i))return rr[i];{const s=await t1(i);return s==null?void 0:s.body}}}]}),{output:a}=await r.generate({format:"iife",name:"MelangeApp"});try{const i="import * as React";e.indexOf(i)>=0?t.bundledCode=a[0].code:(t.bundledCode=void 0,n1(a[0].code))}catch(i){console.log(i)}t.logs=Qh(Zh()),Yh();break;default:throw new Error}})})();
+`+o),{banner:s,footer:o,intro:l,outro:_}}catch(s){return M((r=s.message,a=s.hook,i=s.plugin,{code:Wd,message:`Could not retrieve "${a}". Check configuration of plugin "${i}".
+ Error Message: ${r}`}))}var r,a,i}const Bp={amd:Yr,cjs:Yr,es:Il,iife:Yr,system:Il,umd:Yr};function Ip(e,n,t,r,a,i,s,o,l,_,u,f,d,h){const b=[...e].reverse();for(const p of b)p.scope.addUsedOutsideNames(r,a,f,d);(function(p,v,y){for(const $ of v){for(const g of $.scope.variables.values())g.included&&!(g.renderBaseName||g instanceof ie&&g.getOriginalVariable()!==g)&&g.setRenderNames(null,te(g.name,p,g.forbiddenNames));if(y.has($)){const g=$.namespace;g.setRenderNames(null,te(g.name,p,g.forbiddenNames))}}})(r,b,h),Bp[a](r,t,n,i,s,o,l,_,u);for(const p of b)p.scope.deconflict(a,f,d)}function Il(e,n,t,r,a,i,s,o,l){for(const _ of t.dependencies)(a||_ instanceof et)&&(_.variableName=te(_.suggestedVariableName,e,null));for(const _ of n){const u=_.module,f=_.name;_.isNamespace&&(a||u instanceof fn)?_.setRenderNames(null,(u instanceof fn?o.get(u):s.get(u)).variableName):u instanceof fn&&f==="default"?_.setRenderNames(null,te([...u.exportedVariables].some(([d,h])=>h==="*"&&d.included)?u.suggestedVariableName+"__default":u.suggestedVariableName,e,_.forbiddenNames)):_.setRenderNames(null,te(f,e,_.forbiddenNames))}for(const _ of l)_.setRenderNames(null,te(_.name,e,_.forbiddenNames))}function Yr(e,n,{deconflictedDefault:t,deconflictedNamespace:r,dependencies:a},i,s,o,l,_){for(const u of a)u.variableName=te(u.suggestedVariableName,e,null);for(const u of r)u.namespaceVariableName=te(`${u.suggestedVariableName}__namespace`,e,null);for(const u of t)u.defaultVariableName=r.has(u)&&tp(i(u.id),o)?u.namespaceVariableName:te(`${u.suggestedVariableName}__default`,e,null);for(const u of n){const f=u.module;if(f instanceof fn){const d=_.get(f),h=u.name;if(h==="default"){const b=i(f.id),p=Vr[b]?d.defaultVariableName:d.variableName;qr(b,o)?u.setRenderNames(p,"default"):u.setRenderNames(null,p)}else h==="*"?u.setRenderNames(null,Vt[i(f.id)]?d.namespaceVariableName:d.variableName):u.setRenderNames(d.variableName,null)}else{const d=l.get(f);s&&u.isNamespace?u.setRenderNames(null,d.exportMode==="default"?d.namespaceVariableName:d.variableName):d.exportMode==="default"?u.setRenderNames(null,d.variableName):u.setRenderNames(d.variableName,d.getVariableExportName(u))}}}function Lp(e,{exports:n,name:t,format:r},a,i){const s=e.getExportNames();if(n==="default"){if(s.length!==1||s[0]!=="default")return M(eo("default",s,a))}else if(n==="none"&&s.length>0)return M(eo("none",s,a));return n==="auto"&&(s.length===0?n="none":s.length===1&&s[0]==="default"?n="default":(r!=="es"&&r!=="system"&&s.includes("default")&&i(q,function(o,l){return{code:fm,id:o,message:`Entry module "${W(o)}" is using named and default exports together. Consumers of your bundle will have to use \`${l||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Cn(Ra)}}(a,t)),n="named")),n}function Np(e){const n=e.split(`
+`),t=n.filter(i=>/^\t+/.test(i)),r=n.filter(i=>/^ {2,}/.test(i));if(t.length===0&&r.length===0)return null;if(t.length>=r.length)return" ";const a=r.reduce((i,s)=>{const o=/^ +/.exec(s)[0].length;return Math.min(o,i)},1/0);return" ".repeat(a)}function Ll(e,n,t,r,a,i){const s=e.getDependenciesToBeIncluded();for(const o of s){if(o instanceof fn){n.push(i.get(o));continue}const l=a.get(o);l===r?t.has(o)||(t.add(o),Ll(o,n,t,r,a,i)):n.push(l)}}const Pi="!~{",Ui="}~",Ri=new RegExp(`${Pi}[0-9a-zA-Z_$]{1,59}${Ui}`,"g"),Kt=(e,n)=>e.replace(Ri,t=>n.get(t)||t),Mp=(e,n,t)=>e.replace(Ri,r=>r===n?t:r),jp=(e,n)=>{const t=new Set,r=e.replace(Ri,a=>n.has(a)?(t.add(a),`${Pi}${"0".repeat(a.length-5)}${Ui}`):a);return{containedPlaceholders:t,transformedCode:r}},Zr=Symbol("bundleKeys"),Vi={type:"placeholder"};function Nl(e,n,t){return pr(e)?M(jn(`Invalid pattern "${e}" for "${n}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,(r,a,i)=>{if(!t.hasOwnProperty(a)||i&&a!=="hash")return M(jn(`"[${a}${i||""}]" is not a valid placeholder in the "${n}" pattern.`));const s=t[a](i&&Number.parseInt(i.slice(1)));return pr(s)?M(jn(`Invalid substitution "${s}" for placeholder "[${a}]" in "${n}" pattern, can be neither absolute nor relative path.`)):s})}function Ml(e,{[Zr]:n}){if(!n.has(e.toLowerCase()))return e;const t=ye(e);e=e.slice(0,Math.max(0,e.length-t.length));let r,a=1;for(;n.has((r=e+ ++a+t).toLowerCase()););return r}const Tp=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Dp(e,n,t,r){return(typeof n=="function"?n(e.id):n[e.id])||(t?(r(q,(i=e.id,s=e.variableName,{code:_m,id:i,message:`No name was provided for external module "${i}" in "output.globals" – guessing "${s}".`,names:[s],url:Cn(Gd)})),e.variableName):void 0);var i,s}class Se{constructor(n,t,r,a,i,s,o,l,_,u,f,d,h,b,p){this.orderedModules=n,this.inputOptions=t,this.outputOptions=r,this.unsetOptions=a,this.pluginDriver=i,this.modulesById=s,this.chunkByModule=o,this.externalChunkByModule=l,this.facadeChunkByModule=_,this.includedNamespaces=u,this.manualChunkAlias=f,this.getPlaceholder=d,this.bundle=h,this.inputBase=b,this.snippets=p,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=n.length>0?n[0].execIndex:1/0;const v=new Set(n);for(const y of n){o.set(y,this),y.namespace.included&&!r.preserveModules&&u.add(y),this.isEmpty&&y.isIncluded()&&(this.isEmpty=!1),(y.info.isEntry||r.preserveModules)&&this.entryModules.push(y);for(const $ of y.includedDynamicImporters)v.has($)||(this.dynamicEntryModules.push(y),y.info.syntheticNamedExports&&(u.add(y),this.exports.add(y.namespace)));y.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(y)}this.suggestedVariableName=za(this.generateVariableName())}static generateFacade(n,t,r,a,i,s,o,l,_,u,f,d,h,b,p){const v=new Se([],n,t,r,a,i,s,o,l,_,null,d,h,b,p);v.assignFacadeName(f,u),l.has(u)||l.set(u,v);for(const y of u.getDependenciesToBeIncluded())v.dependencies.add(y instanceof hn?s.get(y):o.get(y));return!v.dependencies.has(s.get(u))&&u.info.moduleSideEffects&&u.hasEffects()&&v.dependencies.add(s.get(u)),v.ensureReexportsAreAvailableForModule(u),v.facadeModule=u,v.strictFacade=!0,v}canModuleBeFacade(n,t){const r=n.getExportNamesByVariable();for(const a of this.exports)if(!r.has(a))return!1;for(const a of t)if(!(a.module===n||r.has(a)||a instanceof Tn&&r.has(a.getBaseVariable())))return!1;return!0}finalizeChunk(n,t,r){const a=this.getRenderedChunkInfo(),i=o=>Kt(o,r),s=this.fileName=i(a.fileName);return{...a,code:n,dynamicImports:a.dynamicImports.map(i),fileName:s,implicitlyLoadedBefore:a.implicitlyLoadedBefore.map(i),importedBindings:Object.fromEntries(Object.entries(a.importedBindings).map(([o,l])=>[i(o),l])),imports:a.imports.map(i),map:t,referencedFiles:a.referencedFiles.map(i)}}generateExports(){this.sortedExportNames=null;const n=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==!1||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[r,a]of t){this.exportNamesByVariable.set(r,[...a]);for(const i of a)this.exportsByName.set(i,r);n.delete(r)}}this.outputOptions.minifyInternalExports?function(t,r,a){let i=0;for(const s of t){let[o]=s.name;if(r.has(o))do o=Lr(++i),o.charCodeAt(0)===49&&(i+=9*64**(o.length-1),o=Lr(i));while(br.has(o)||r.has(o));r.set(o,s),a.set(s,[o])}}(n,this.exportsByName,this.exportNamesByVariable):function(t,r,a){for(const i of t){let s=0,o=i.name;for(;r.has(o);)o=i.name+"$"+ ++s;r.set(o,i),a.set(i,[o])}}(n,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Lp(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){var a;const n=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),r=new Set(this.dynamicEntryModules.map(({namespace:i})=>i));for(const i of t)if(i.preserveSignature)for(const s of i.getExportNamesByVariable().keys())this.chunkByModule.get(s.module)===this&&r.add(s);for(const i of t){const s=Array.from(new Set(i.chunkNames.filter(({isUserDefined:o})=>o).map(({name:o})=>o)),o=>({name:o}));if(s.length===0&&i.isUserDefinedEntryPoint&&s.push({}),s.push(...Array.from(i.chunkFileNames,o=>({fileName:o}))),s.length===0&&s.push({}),!this.facadeModule){const o=!this.outputOptions.preserveModules&&(i.preserveSignature==="strict"||i.preserveSignature==="exports-only"&&i.getExportNamesByVariable().size>0);o&&!this.canModuleBeFacade(i,r)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=o),this.assignFacadeName(s.shift(),i,this.outputOptions.preserveModules))}for(const o of s)n.push(Se.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,o,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const i of this.dynamicEntryModules)i.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(i,r)?(this.facadeModule=i,this.facadeChunkByModule.set(i,this),this.strictFacade=!0,this.dynamicName=qi(i)):this.facadeModule===i&&!this.strictFacade&&this.canModuleBeFacade(i,r)?this.strictFacade=!0:(a=this.facadeChunkByModule.get(i))!=null&&a.strictFacade||(this.includedNamespaces.add(i),this.exports.add(i.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),n}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(n){return mr(Ls(n,this.getFileName(),this.outputOptions.format==="amd"&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){var l;if(this.preliminaryFileName)return this.preliminaryFileName;let n,t=null;const{chunkFileNames:r,entryFileNames:a,file:i,format:s,preserveModules:o}=this.outputOptions;if(i)n=fe(i);else if(this.fileName===null){const[_,u]=o||(l=this.facadeModule)!=null&&l.isUserDefinedEntryPoint?[a,"output.entryFileNames"]:[r,"output.chunkFileNames"];n=Nl(typeof _=="function"?_(this.getPreRenderedChunkInfo()):_,u,{format:()=>s,hash:f=>t||(t=this.getPlaceholder(u,f)),name:()=>this.getChunkName()}),t||(n=Ml(n,this.bundle))}else n=this.fileName;return t||(this.bundle[n]=Vi),this.preliminaryFileName={fileName:n,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Qr),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Qr),importedBindings:Op(this.getRenderedDependencies(),Qr),imports:Array.from(this.dependencies,Qr),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(n){return this.outputOptions.preserveModules&&n instanceof Xt?"*":this.exportNamesByVariable.get(n)[0]}link(){this.dependencies=function(n,t,r,a){const i=[],s=new Set;for(let l=t.length-1;l>=0;l--){const _=t[l];if(!s.has(_)){const u=[];Ll(_,u,s,n,r,a),i.unshift(u)}}const o=new Set;for(const l of i)for(const _ of l)o.add(_);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const n of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(n),this.setUpChunkImportsAndExportsForModule(n)}async render(){const{dependencies:n,exportMode:t,facadeModule:r,inputOptions:{onLog:a},outputOptions:i,pluginDriver:s,snippets:o}=this,{format:l,hoistTransitiveImports:_,preserveModules:u}=i;if(_&&!u&&r!==null)for(const B of n)B instanceof Se&&this.inlineChunkDependencies(B);const f=this.getPreliminaryFileName(),{accessedGlobals:d,indent:h,magicString:b,renderedSource:p,usedModules:v,usesTopLevelAwait:y}=this.renderModules(f.fileName),$=[...this.getRenderedDependencies().values()],g=t==="none"?[]:this.getChunkExportDeclarations(l);let x=g.length>0,k=!1;for(const B of $){const{reexports:R}=B;R!=null&&R.length&&(x=!0,!k&&R.some(D=>D.reexported==="default")&&(k=!0),l==="es"&&(B.reexports=R.filter(({reexported:D})=>!g.find(({exported:P})=>P===D))))}if(!k){for(const{exported:B}of g)if(B==="default"){k=!0;break}}const{intro:A,outro:S,banner:I,footer:E}=await Sp(i,s,this.getRenderedChunkInfo());return Ap[l](p,{accessedGlobals:d,dependencies:$,exports:g,hasDefaultExport:k,hasExports:x,id:f.fileName,indent:h,intro:A,isEntryFacade:u||r!==null&&r.info.isEntry,isModuleFacade:r!==null,log:a,namedExportsMode:t!=="default",outro:S,snippets:o,usesTopLevelAwait:y},i),I&&b.prepend(I),E&&b.append(E),{chunk:this,magicString:b,preliminaryFileName:f,usedModules:v}}addImplicitlyLoadedBeforeFromModule(n){const{chunkByModule:t,implicitlyLoadedBefore:r}=this;for(const a of n.implicitlyLoadedBefore){const i=t.get(a);i&&i!==this&&r.add(i)}}addNecessaryImportsForFacades(){for(const[n,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(n))for(const r of t)this.imports.add(r)}assignFacadeName({fileName:n,name:t},r,a){n?this.fileName=n:this.name=this.outputOptions.sanitizeFileName(t||(a?this.getPreserveModulesChunkNameFromModule(r):qi(r)))}checkCircularDependencyImport(n,t){var _;const r=n.module;if(r instanceof hn){const u=this.chunkByModule.get(r);let f;do f=t.alternativeReexportModules.get(n),f&&(this.chunkByModule.get(f)!==u&&this.inputOptions.onLog(q,(a=((_=r.getExportNamesByVariable().get(n))==null?void 0:_[0])||"*",i=r.id,s=f.id,o=t.id,l=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${a}" of module "${W(i)}" was reexported through module "${W(s)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
+Either change the import in "${W(o)}" to point directly to the exporting module or ${l?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:s})),t=f);while(f)}var a,i,s,o,l}ensureReexportsAreAvailableForModule(n){const t=[],r=n.getExportNamesByVariable();for(const a of r.keys()){const i=a instanceof Tn,s=i?a.getBaseVariable():a;if(this.checkCircularDependencyImport(s,n),!(s instanceof Xt&&this.outputOptions.preserveModules)){const o=s.module;if(o instanceof hn){const l=this.chunkByModule.get(o);l&&l!==this&&(l.exports.add(s),t.push(s),i&&this.imports.add(s))}}}t.length>0&&this.includedReexportsByModule.set(n,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const n=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return n?qi(n):"chunk"}getChunkExportDeclarations(n){const t=[];for(const r of this.getExportNames()){if(r[0]==="*")continue;const a=this.exportsByName.get(r);if(!(a instanceof Tn)){const l=a.module;if(l){const _=this.chunkByModule.get(l);if(_!==this){if(!_||n!=="es")continue;const u=this.renderedDependencies.get(_);if(!u)continue;const{imports:f,reexports:d}=u,h=d==null?void 0:d.find(({reexported:p})=>p===r);if(!(f==null?void 0:f.find(({imported:p})=>p===(h==null?void 0:h.imported))))continue}}}let i=null,s=!1,o=a.getName(this.snippets.getPropertyAccess);if(a instanceof me){for(const l of a.declarations)if(l.parent instanceof Ut||l instanceof Fr&&l.declaration instanceof Ut){s=!0;break}}else a instanceof Tn&&(i=o,n==="es"&&(o=a.renderName));t.push({exported:r,expression:i,hoisted:s,local:o})}return t}getDependenciesToBeDeconflicted(n,t,r){const a=new Set,i=new Set,s=new Set;for(const o of[...this.exportNamesByVariable.keys(),...this.imports])if(n||o.isNamespace){const l=o.module;if(l instanceof fn){const _=this.externalChunkByModule.get(l);a.add(_),n&&(o.name==="default"?Vr[r(l.id)]&&i.add(_):o.name==="*"&&Vt[r(l.id)]&&s.add(_))}else{const _=this.chunkByModule.get(l);_!==this&&(a.add(_),n&&_.exportMode==="default"&&o.isNamespace&&s.add(_))}}if(t)for(const o of this.dependencies)a.add(o);return{deconflictedDefault:i,deconflictedNamespace:s,dependencies:a}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(n=>n.facadeChunk||n.chunk||n.externalChunk||n.resolution).filter(n=>n!==this&&(n instanceof Se||n instanceof et))}getDynamicImportStringAndAssertions(n,t){if(n instanceof fn){const r=this.externalChunkByModule.get(n);return[`'${r.getImportPath(t)}'`,r.getImportAssertions(this.snippets)]}return[n||"",this.outputOptions.format==="es"&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?Ma(this.fileName):Ma(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:n}=this.outputOptions,t=new Map;for(const r of this.imports){const a=r.module;let i,s;if(a instanceof fn){if(i=this.externalChunkByModule.get(a),s=r.name,s!=="default"&&s!=="*"&&n(a.id)==="defaultOnly")return M(ro(a.id,s,!1))}else i=this.chunkByModule.get(a),s=i.getVariableExportName(r);zn(t,i,Ns).push({imported:s,local:r.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const n=[];for(const t of this.orderedModules)for(const{node:r,resolution:a}of t.dynamicImports)r.included&&n.push(a instanceof hn?{chunk:this.chunkByModule.get(a),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(a),node:r,resolution:a}:a instanceof fn?{chunk:null,externalChunk:this.externalChunkByModule.get(a),facadeChunk:null,node:r,resolution:a}:{chunk:null,externalChunk:null,facadeChunk:null,node:r,resolution:a});return this.includedDynamicImports=n}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:n,facadeModule:t,implicitEntryModules:r,orderedModules:a}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:n.length>0,isEntry:!!(t!=null&&t.info.isEntry),isImplicitEntry:r.length>0,moduleIds:a.map(({id:i})=>i),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(n){const t=jl(n);if(t)return t;const{preserveModulesRoot:r,sanitizeFileName:a}=this.outputOptions,i=a($t(n.id.split(zp,1)[0])),s=ye(i),o=Tp.has(s)?i.slice(0,-s.length):i;return be(o)?r&&Kn(o).startsWith(r)?o.slice(r.length).replace(/^[/\\]/,""):nt(this.inputBase,o):`_virtual/${fe(o)}`}getReexportSpecifiers(){const{externalLiveBindings:n,interop:t}=this.outputOptions,r=new Map;for(let a of this.getExportNames()){let i,s,o=!1;if(a[0]==="*"){const l=a.slice(1);t(l)==="defaultOnly"&&this.inputOptions.onLog(q,$m(l)),o=n,i=this.externalChunkByModule.get(this.modulesById.get(l)),s=a="*"}else{const l=this.exportsByName.get(a);if(l instanceof Tn)continue;const _=l.module;if(_ instanceof hn){if(i=this.chunkByModule.get(_),i===this)continue;s=i.getVariableExportName(l),o=l.isReassigned}else{if(i=this.externalChunkByModule.get(_),s=l.name,s!=="default"&&s!=="*"&&t(_.id)==="defaultOnly")return M(ro(_.id,s,!0));o=n&&(s!=="default"||qr(t(_.id),!0))}}zn(r,i,Ns).push({imported:s,needsLiveBinding:o,reexported:a})}return r}getReferencedFiles(){const n=new Set;for(const t of this.orderedModules)for(const r of t.importMetas){const a=r.getReferencedFileName(this.pluginDriver);a&&n.add(a)}return[...n]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const n=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),r=new Map,a=this.getFileName();for(const i of this.dependencies){const s=n.get(i)||null,o=t.get(i)||null,l=i instanceof et||i.exportMode!=="default",_=i.getImportPath(a);r.set(i,{assertions:i instanceof et?i.getImportAssertions(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof et&&(this.outputOptions.format==="umd"||this.outputOptions.format==="iife")&&Dp(i,this.outputOptions.globals,(s||o)!==null,this.inputOptions.onLog),importPath:_,imports:s,isChunk:i instanceof Se,name:i.variableName,namedExportsMode:l,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=r}inlineChunkDependencies(n){for(const t of n.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Se&&this.inlineChunkDependencies(t))}renderModules(n){const{accessedGlobalsByScope:t,dependencies:r,exportNamesByVariable:a,includedNamespaces:i,inputOptions:{onLog:s},isEmpty:o,orderedModules:l,outputOptions:_,pluginDriver:u,renderedModules:f,snippets:d}=this,{compact:h,dynamicImportFunction:b,format:p,freeze:v,namespaceToStringTag:y}=_,{_:$,cnst:g,n:x}=d;this.setDynamicImportResolutions(n),this.setImportMetaResolutions(n),this.setIdentifierRenderResolutions();const k=new class ec{constructor(C={}){this.intro=C.intro||"",this.separator=C.separator!==void 0?C.separator:`
+`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(C){if(C instanceof Me)return this.addSource({content:C,filename:C.filename,separator:this.separator});if(!Ss(C)||!C.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(L=>{Is.call(C,L)||(C[L]=C.content[L])}),C.separator===void 0&&(C.separator=this.separator),C.filename)if(Is.call(this.uniqueSourceIndexByFilename,C.filename)){const L=this.uniqueSources[this.uniqueSourceIndexByFilename[C.filename]];if(C.content.original!==L.content)throw new Error(`Illegal source: same filename (${C.filename}), different contents`)}else this.uniqueSourceIndexByFilename[C.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:C.filename,content:C.content.original});return this.sources.push(C),this}append(C,L){return this.addSource({content:new Me(C),separator:L&&L.separator||""}),this}clone(){const C=new ec({intro:this.intro,separator:this.separator});return this.sources.forEach(L=>{C.addSource({filename:L.filename,content:L.content.clone(),separator:L.separator})}),C}generateDecodedMap(C={}){const L=[];let F;this.sources.forEach(rn=>{Object.keys(rn.content.storedNames).forEach(an=>{~L.indexOf(an)||L.push(an)})});const J=new Bs(C.hires);return this.intro&&J.advance(this.intro),this.sources.forEach((rn,an)=>{an>0&&J.advance(this.separator);const ln=rn.filename?this.uniqueSourceIndexByFilename[rn.filename]:-1,_n=rn.content,wn=La(_n.original);_n.intro&&J.advance(_n.intro),_n.firstChunk.eachNext(sn=>{const In=wn(sn.start);sn.intro.length&&J.advance(sn.intro),rn.filename?sn.edited?J.addEdit(ln,sn.content,In,sn.storeName?L.indexOf(sn.original):-1):J.addUneditedChunk(ln,sn,_n.original,In,_n.sourcemapLocations):J.advance(sn.content),sn.outro.length&&J.advance(sn.outro)}),_n.outro&&J.advance(_n.outro),rn.ignoreList&&ln!==-1&&(F===void 0&&(F=[]),F.push(ln))}),{file:C.file?C.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(rn=>C.file?As(C.file,rn.filename):rn.filename),sourcesContent:this.uniqueSources.map(rn=>C.includeContent?rn.content:null),names:L,mappings:J.raw,x_google_ignoreList:F}}generateMap(C){return new dr(this.generateDecodedMap(C))}getIndentString(){const C={};return this.sources.forEach(L=>{const F=L.content._getRawIndentString();F!==null&&(C[F]||(C[F]=0),C[F]+=1)}),Object.keys(C).sort((L,F)=>C[L]-C[F])[0]||" "}indent(C){if(arguments.length||(C=this.getIndentString()),C==="")return this;let L=!this.intro||this.intro.slice(-1)===`
+`;return this.sources.forEach((F,J)=>{const rn=F.separator!==void 0?F.separator:this.separator,an=L||J>0&&/\r?\n$/.test(rn);F.content.indent(C,{exclude:F.indentExclusionRanges,indentStart:an}),L=F.content.lastChar()===`
+`}),this.intro&&(this.intro=C+this.intro.replace(/^[^\n]/gm,(F,J)=>J>0?C+F:F)),this}prepend(C){return this.intro=C+this.intro,this}toString(){const C=this.sources.map((L,F)=>{const J=L.separator!==void 0?L.separator:this.separator;return(F>0?J:"")+L.content.toString()}).join("");return this.intro+C}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some(C=>!C.content.isEmpty()))}length(){return this.sources.reduce((C,L)=>C+L.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(C){return this.trimStart(C).trimEnd(C)}trimStart(C){const L=new RegExp("^"+(C||"\\s")+"+");if(this.intro=this.intro.replace(L,""),!this.intro){let F,J=0;do if(F=this.sources[J++],!F)break;while(!F.content.trimStartAborted(C))}return this}trimEnd(C){const L=new RegExp((C||"\\s")+"+$");let F,J=this.sources.length-1;do if(F=this.sources[J--],!F){this.intro=this.intro.replace(L,"");break}while(!F.content.trimEndAborted(C));return this}}({separator:`${x}${x}`}),A=function(z,C){if(C.indent!==!0)return C.indent;for(const L of z){const F=Np(L.originalCode);if(F!==null)return F}return" "}(l,_),S=[];let I="";const E=new Set,B=new Map,R={dynamicImportFunction:b,exportNamesByVariable:a,format:p,freeze:v,indent:A,namespaceToStringTag:y,pluginDriver:u,snippets:d,useOriginalName:null};let D=!1;for(const z of l){let C,L=0;if(z.isIncluded()||i.has(z)){const rn=z.render(R);({source:C}=rn),D||(D=rn.usesTopLevelAwait),L=C.length(),L&&(h&&C.lastLine().includes("//")&&C.append(`
+`),B.set(z,C),k.addSource(C),S.push(z));const an=z.namespace;if(i.has(z)){const _n=an.renderBlock(R);an.renderFirst()?I+=x+_n:k.addSource(new Me(_n))}const ln=t.get(z.scope);if(ln)for(const _n of ln)E.add(_n)}const{renderedExports:F,removedExports:J}=z.getRenderedExports();f[z.id]={get code(){return(C==null?void 0:C.toString())??null},originalLength:z.originalCode.length,removedExports:J,renderedExports:F,renderedLength:L}}I&&k.prepend(I+x+x),this.needsExportsShim&&k.prepend(`${x}${g} ${ct}${$}=${$}void 0;${x}${x}`);const P=h?k:k.trim();var T;return o&&this.getExportNames().length===0&&r.size===0&&s(q,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${T=this.getChunkName()}".`,names:[T]}),{accessedGlobals:E,indent:A,magicString:k,renderedSource:P,usedModules:S,usesTopLevelAwait:D}}setDynamicImportResolutions(n){const{accessedGlobalsByScope:t,outputOptions:r,pluginDriver:a,snippets:i}=this;for(const s of this.getIncludedDynamicImports())if(s.chunk){const{chunk:o,facadeChunk:l,node:_,resolution:u}=s;o===this?_.setInternalResolution(u.namespace):_.setExternalResolution((l||o).exportMode,u,r,i,a,t,`'${(l||o).getImportPath(n)}'`,!(l!=null&&l.strictFacade)&&o.exportNamesByVariable.get(u.namespace)[0],null)}else{const{node:o,resolution:l}=s,[_,u]=this.getDynamicImportStringAndAssertions(l,n);o.setExternalResolution("external",l,r,i,a,t,_,!1,u)}}setIdentifierRenderResolutions(){const{format:n,interop:t,namespaceToStringTag:r,preserveModules:a,externalLiveBindings:i}=this.outputOptions,s=new Set;for(const l of this.getExportNames()){const _=this.exportsByName.get(l);n!=="es"&&n!=="system"&&_.isReassigned&&!_.isId?_.setRenderNames("exports",l):_ instanceof Tn?s.add(_):_.setRenderNames(null,null)}for(const l of this.orderedModules)if(l.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(ct),r&&o.add("Symbol"),n){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const l of wi)o.add(l)}Ip(this.orderedModules,this.getDependenciesToBeDeconflicted(n!=="es"&&n!=="system",n==="amd"||n==="umd"||n==="iife",t),this.imports,o,n,t,a,i,this.chunkByModule,this.externalChunkByModule,s,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(n){const{accessedGlobalsByScope:t,includedNamespaces:r,orderedModules:a,outputOptions:{format:i}}=this;for(const s of a){for(const o of s.importMetas)o.setResolution(i,t,n);r.has(s)&&s.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(n){const t=new Set(n.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(n)){const r=n.namespace.getMemberVariables();for(const a of Object.values(r))t.add(a)}for(let r of t){r instanceof ie&&(r=r.getOriginalVariable()),r instanceof Tn&&(r=r.getBaseVariable());const a=this.chunkByModule.get(r.module);a!==this&&(this.imports.add(r),r.module instanceof hn&&(this.checkCircularDependencyImport(r,n),r instanceof Xt&&this.outputOptions.preserveModules||a.exports.add(r)))}(this.includedNamespaces.has(n)||n.info.isEntry&&n.preserveSignature!==!1||n.includedDynamicImporters.some(r=>this.chunkByModule.get(r)!==this))&&this.ensureReexportsAreAvailableForModule(n);for(const{node:r,resolution:a}of n.dynamicImports)r.included&&a instanceof hn&&this.chunkByModule.get(a)===this&&!this.includedNamespaces.has(a)&&(this.includedNamespaces.add(a),this.ensureReexportsAreAvailableForModule(a))}}function qi(e){return jl(e)??Ma(e.id)}function jl(e){var n,t;return((n=e.chunkNames.find(({isUserDefined:r})=>r))==null?void 0:n.name)??((t=e.chunkNames[0])==null?void 0:t.name)}function Op(e,n){const t={};for(const[r,a]of e){const i=new Set;if(a.imports)for(const{imported:s}of a.imports)i.add(s);if(a.reexports)for(const{imported:s}of a.reexports)i.add(s);t[n(r)]=[...i]}return t}const zp=/[#?]/,Qr=e=>e.getFileName();function*Tl(e){for(const n of e)yield*n}function Fp(e,n,t,r){const{chunkDefinitions:a,modulesInManualChunks:i}=function(f){const d=[],h=new Set(f.keys()),b=Object.create(null);for(const[p,v]of f)Pp(p,b[v]||(b[v]=[]),h);for(const[p,v]of Object.entries(b))d.push({alias:p,modules:v});return{chunkDefinitions:d,modulesInManualChunks:h}}(n),{allEntries:s,dependentEntriesByModule:o,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:_}=function(f){const d=new Set,h=new Map,b=[],p=new Set(f);let v=0;for(const x of p){const k=new Set;b.push(k);const A=new Set([x]);for(const S of A){zn(h,S,Te).add(v);for(const I of S.getDependenciesToBeIncluded())I instanceof fn||A.add(I);for(const{resolution:I}of S.dynamicImports)I instanceof hn&&I.includedDynamicImporters.length>0&&!p.has(I)&&(d.add(I),p.add(I),k.add(I));for(const I of S.implicitlyLoadedBefore)p.has(I)||(d.add(I),p.add(I))}v++}const y=[...p],{dynamicEntries:$,dynamicImportsByEntry:g}=function(x,k,A){const S=new Map,I=new Set;for(const[B,R]of x.entries())S.set(R,B),k.has(R)&&I.add(B);const E=[];for(const B of A){const R=new Set;for(const D of B)R.add(S.get(D));E.push(R)}return{dynamicEntries:I,dynamicImportsByEntry:E}}(y,d,b);return{allEntries:y,dependentEntriesByModule:h,dynamicallyDependentEntriesByDynamicEntry:Up(h,$,y),dynamicImportsByEntry:g}}(e),u=Dl(function*(f,d){for(const[h,b]of f)d.has(h)||(yield{dependentEntries:b,modules:[h]})}(o,i));return function(f,d,h,b){const p=b.map(()=>0n),v=b.map((g,x)=>d.has(x)?-1n:0n);let y=1n;for(const{dependentEntries:g}of f){for(const x of g)p[x]|=y;y<<=1n}const $=d;for(const[g,x]of $){$.delete(g);const k=v[g];let A=k;for(const S of x)A&=p[S]|v[S];if(A!==k){v[g]=A;for(const S of h[g])zn($,S,Te).add(g)}}y=1n;for(const{dependentEntries:g}of f){for(const x of g)(v[x]&y)===y&&g.delete(x);y<<=1n}}(u,l,_,s),a.push(...function(f,d,h,b){kn("optimize chunks",3);const p=function(v,y,$){const g=[],x=[],k=new Map,A=[];let S=0n,I=1n;for(const{dependentEntries:E,modules:B}of v){const R={containedAtoms:I,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:E,modules:B,pure:!0,size:0};let D=0,P=!0;for(const T of B)k.set(T,R),T.isIncluded()&&(P&&(P=!T.hasEffects()),D+=$>1?T.estimateSize():1);R.pure=P,R.size=D,A.push(D),P||(S|=I),(D<$?g:x).push(R),I<<=1n}return g.length===0?null:(S|=function(E,B,R,D){const P=new Map;let T=0n;const z=[];for(let C=0;C{const wn=D;return D<<=1n,T|=wn,wn}));else{const wn=B.get(_n);wn&&wn!==L&&(F.add(wn),wn.dependentChunks.add(L))}const{containedAtoms:an}=L;for(const ln of J)z[ln]|=an}}for(const C of E)for(const L of C){const{dependentEntries:F}=L;L.correlatedAtoms=-1n;for(const J of F)L.correlatedAtoms&=z[J]}return T}([x,g],k,y,I),{big:new Set(x),sideEffectAtoms:S,sizeByAtom:A,small:new Set(g)})}(f,d,h);return p?(h>1&&b("info",to(f.length,p.small.size,"Initially")),function(v,y){const{small:$}=v;for(const g of $){const x=Rp(g,v,y<=1?1:1/0);if(x){const{containedAtoms:k,correlatedAtoms:A,modules:S,pure:I,size:E}=g;$.delete(g),Ol(x,y,v).delete(x),x.modules.push(...S),x.size+=E,x.pure&&(x.pure=I);const{dependencies:B,dependentChunks:R,dependentEntries:D}=x;x.correlatedAtoms&=A,x.containedAtoms|=k;for(const P of g.dependentEntries)D.add(P);for(const P of g.dependencies)B.add(P),P.dependentChunks.delete(g),P.dependentChunks.add(x);for(const P of g.dependentChunks)R.add(P),P.dependencies.delete(g),P.dependencies.add(x);B.delete(x),R.delete(x),Ol(x,y,v).add(x)}}}(p,h),h>1&&b("info",to(p.small.size+p.big.size,p.small.size,"After merging chunks")),yn("optimize chunks",3),[...p.small,...p.big]):(yn("optimize chunks",3),f)}(Dl(u),s.length,t,r).map(({modules:f})=>({alias:null,modules:f}))),a}function Pp(e,n,t){const r=new Set([e]);for(const a of r){t.add(a),n.push(a);for(const i of a.dependencies)i instanceof fn||t.has(i)||r.add(i)}}function Up(e,n,t){const r=new Map;for(const a of n){const i=zn(r,a,Te),s=t[a];for(const o of Tl([s.includedDynamicImporters,s.implicitlyLoadedAfter]))for(const l of e.get(o))i.add(l)}return r}function Dl(e){var n;const t=Object.create(null);for(const{dependentEntries:r,modules:a}of e){let i=0n;for(const s of r)i|=1n<=u)return 1/0;return d}(s&~i,t,a)}const Gp=(e,n)=>e.execIndex>n.execIndex?1:-1;function Xp(e,n,t){const r=Symbol(e.id),a=[e.id];let i=n;for(e.cycles.add(r);i!==e;)i.cycles.add(r),a.push(i.id),i=t.get(i);return a.push(a[0]),a.reverse(),a}const Fl=(e,n)=>n?`(${e})`:e,Pl=/^(?!\d)[\w$]+$/;class Ul{constructor(n,t){this.isOriginal=!0,this.filename=n,this.content=t}traceSegment(n,t,r){return{column:t,line:n,name:r,source:this}}}class na{constructor(n,t){this.sources=t,this.names=n.names,this.mappings=n.mappings}traceMappings(){const n=[],t=new Map,r=[],a=[],i=new Map,s=[];for(const o of this.mappings){const l=[];for(const _ of o){if(_.length===1)continue;const u=this.sources[_[1]];if(!u)continue;const f=u.traceSegment(_[2],_[3],_.length===5?this.names[_[4]]:"");if(f){const{column:d,line:h,name:b,source:{content:p,filename:v}}=f;let y=t.get(v);if(y===void 0)y=n.length,n.push(v),t.set(v,y),r[y]=p;else if(r[y]==null)r[y]=p;else if(p!=null&&r[y]!==p)return M(km(v));const $=[_[0],y,h,d];if(b){let g=i.get(b);g===void 0&&(g=a.length,a.push(b),i.set(b,g)),$[4]=g}l.push($)}}s.push(l)}return{mappings:s,names:a,sources:n,sourcesContent:r}}traceSegment(n,t,r){const a=this.mappings[n];if(!a)return null;let i=0,s=a.length-1;for(;i<=s;){const o=i+s>>1,l=a[o];if(l[0]===t||i===s){if(l.length==1)return null;const _=this.sources[l[1]];return _?_.traceSegment(l[2],l[3],l.length===5?this.names[l[4]]:r):null}l[0]>t?s=o-1:i=o+1}return null}}function Rl(e){return function(n,t){return t.mappings?new na(t,[n]):(e(q,(r=t.plugin,{code:Ws,message:`Sourcemap is likely to be incorrect: a plugin (${r}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:r,url:Cn(Rd)})),new na({mappings:[],names:[]},[n]));var r}}function Vl(e,n,t,r,a){let i;if(t){const s=t.sources,o=t.sourcesContent||[],l=je(e)||".",_=t.sourceRoot||".",u=s.map((f,d)=>new Ul(Kn(l,_,f),o[d]));i=new na(t,u)}else i=new Ul(e,n);return r.reduce(a,i)}var tn={},Gi=ql;function ql(e,n){if(!e)throw new Error(n||"Assertion failed")}ql.equal=function(e,n,t){if(e!=n)throw new Error(t||"Assertion failed: "+e+" != "+n)};var Xi={exports:{}};typeof Object.create=="function"?Xi.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xi.exports=function(e,n){if(n){e.super_=n;var t=function(){};t.prototype=n.prototype,e.prototype=new t,e.prototype.constructor=e}};var Wp=Xi.exports,Hp=Gi,Kp=Wp;function Jp(e,n){return(64512&e.charCodeAt(n))==55296&&!(n<0||n+1>=e.length)&&(64512&e.charCodeAt(n+1))==56320}function Gl(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function Xl(e){return e.length===1?"0"+e:e}function Wl(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}tn.inherits=Kp,tn.toArray=function(e,n){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if(typeof e=="string")if(n){if(n==="hex")for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a>6|192,t[r++]=63&i|128):Jp(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128)}else for(a=0;a>>0}return i},tn.split32=function(e,n){for(var t=new Array(4*e.length),r=0,a=0;r>>24,t[a+1]=i>>>16&255,t[a+2]=i>>>8&255,t[a+3]=255&i):(t[a+3]=i>>>24,t[a+2]=i>>>16&255,t[a+1]=i>>>8&255,t[a]=255&i)}return t},tn.rotr32=function(e,n){return e>>>n|e<<32-n},tn.rotl32=function(e,n){return e<>>32-n},tn.sum32=function(e,n){return e+n>>>0},tn.sum32_3=function(e,n,t){return e+n+t>>>0},tn.sum32_4=function(e,n,t,r){return e+n+t+r>>>0},tn.sum32_5=function(e,n,t,r,a){return e+n+t+r+a>>>0},tn.sum64=function(e,n,t,r){var a=e[n],i=r+e[n+1]>>>0,s=(i>>0,e[n+1]=i},tn.sum64_hi=function(e,n,t,r){return(n+r>>>0>>0},tn.sum64_lo=function(e,n,t,r){return n+r>>>0},tn.sum64_4_hi=function(e,n,t,r,a,i,s,o){var l=0,_=n;return l+=(_=_+r>>>0)>>0)>>0)>>0},tn.sum64_4_lo=function(e,n,t,r,a,i,s,o){return n+r+i+o>>>0},tn.sum64_5_hi=function(e,n,t,r,a,i,s,o,l,_){var u=0,f=n;return u+=(f=f+r>>>0)>>0)>>0)>>0)<_?1:0)>>>0},tn.sum64_5_lo=function(e,n,t,r,a,i,s,o,l,_){return n+r+i+o+_>>>0},tn.rotr64_hi=function(e,n,t){return(n<<32-t|e>>>t)>>>0},tn.rotr64_lo=function(e,n,t){return(e<<32-t|n>>>t)>>>0},tn.shr64_hi=function(e,n,t){return e>>>t},tn.shr64_lo=function(e,n,t){return(e<<32-t|n>>>t)>>>0};var Hl={},Kl=tn,Yp=Gi;function ea(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Hl.BlockHash=ea,ea.prototype.update=function(e,n){if(e=Kl.toArray(e,n),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),this.pending.length===0&&(this.pending=null),e=Kl.join32(e,0,e.length-t,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,i=8;i>>3},he.g1_256=function(e){return se(e,17)^se(e,19)^e>>>10};var ut=tn,Zp=Hl,ft=he,Qp=Gi,Zn=ut.sum32,nh=ut.sum32_4,eh=ut.sum32_5,th=ft.ch32,rh=ft.maj32,ah=ft.s0_256,ih=ft.s1_256,sh=ft.g0_256,oh=ft.g1_256,Ql=Zp.BlockHash,lh=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function oe(){if(!(this instanceof oe))return new oe;Ql.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=lh,this.W=new Array(64)}ut.inherits(oe,Ql);var _h=oe;oe.blockSize=512,oe.outSize=256,oe.hmacStrength=192,oe.padLength=64,oe.prototype._update=function(e,n){for(var t=this.W,r=0;r<16;r++)t[r]=e[n+r];for(;rch();function Wi(e){if(!e)return null;if(typeof e=="string"&&(e=JSON.parse(e)),e.mappings==="")return{mappings:[],names:[],sources:[],version:3};const n=typeof e.mappings=="string"?Cs.decode(e.mappings):e.mappings;return{...e,mappings:n}}async function uh(e,n,t,r,a){kn("render chunks",2),function(f){for(const d of f)d.facadeModule&&d.facadeModule.isUserDefinedEntryPoint&&d.getPreliminaryFileName()}(e);const i=await Promise.all(e.map(f=>f.render()));yn("render chunks",2),kn("transform chunks",2);const s=function(f){return Object.fromEntries(f.map(d=>{const h=d.getRenderedChunkInfo();return[h.fileName,h]}))}(e),{nonHashedChunksWithPlaceholders:o,renderedChunksByPlaceholder:l,hashDependenciesByPlaceholder:_}=await async function(f,d,h,b,p){const v=[],y=new Map,$=new Map,g=new Set;for(const{preliminaryFileName:{hashPlaceholder:x}}of f)x&&g.add(x);return await Promise.all(f.map(async({chunk:x,preliminaryFileName:{fileName:k,hashPlaceholder:A},magicString:S,usedModules:I})=>{const E={chunk:x,fileName:k,...await fh(S,k,I,d,h,b,p)},{code:B}=E;if(A){const{containedPlaceholders:R,transformedCode:D}=jp(B,g),P=Jt().update(D),T=b.hookReduceValueSync("augmentChunkHash","",[x.getRenderedChunkInfo()],(z,C)=>(C&&(z+=C),z));T&&P.update(T),y.set(A,E),$.set(A,{containedPlaceholders:R,contentHash:P.digest("hex")})}else v.push(E)})),{hashDependenciesByPlaceholder:$,nonHashedChunksWithPlaceholders:v,renderedChunksByPlaceholder:y}}(i,s,r,t,a),u=function(f,d,h){const b=new Map;for(const[p,{fileName:v}]of f){let y=Jt();const $=new Set([p]);for(const k of $){const{containedPlaceholders:A,contentHash:S}=d.get(k);y.update(S);for(const I of A)$.add(I)}let g,x;do x&&(y=Jt().update(x)),x=y.digest("hex").slice(0,p.length),g=Mp(v,p,x);while(h[Zr].has(g.toLowerCase()));h[g]=Vi,b.set(p,x)}return b}(l,_,n);(function(f,d,h,b,p,v){for(const{chunk:y,code:$,fileName:g,map:x}of f.values()){let k=Kt($,d);const A=Kt(g,d);x&&(x.file=Kt(x.file,d),k+=n_(A,x,p,v)),h[A]=y.finalizeChunk(k,x,d)}for(const{chunk:y,code:$,fileName:g,map:x}of b){let k=d.size>0?Kt($,d):$;x&&(k+=n_(g,x,p,v)),h[g]=y.finalizeChunk(k,x,d)}})(l,u,n,o,t,r),yn("transform chunks",2)}async function fh(e,n,t,r,a,i,s){let o=null;const l=[];let _=await i.hookReduceArg0("renderChunk",[e.toString(),r[n],a,{chunks:r}],($,g,x)=>{if(g==null)return $;if(typeof g=="string"&&(g={code:g,map:void 0}),g.map!==null){const k=Wi(g.map);l.push(k||{missing:!0,plugin:x.name})}return g.code});const{compact:u,dir:f,file:d,sourcemap:h,sourcemapExcludeSources:b,sourcemapFile:p,sourcemapPathTransform:v,sourcemapIgnoreList:y}=a;if(u||_[_.length-1]===`
+`||(_+=`
+`),h){let $;kn("sourcemaps",3),$=d?Kn(p||d):f?Kn(f,n):Kn(n),o=function(g,x,k,A,S,I){const E=Rl(I),B=k.filter(L=>!L.excludeFromSourcemap).map(L=>Vl(L.id,L.originalCode,L.originalSourcemap,L.sourcemapChain,E)),R=new na(x,B),D=A.reduce(E,R);let{sources:P,sourcesContent:T,names:z,mappings:C}=D.traceMappings();if(g){const L=je(g);P=P.map(F=>nt(L,F)),g=fe(g)}return T=S?null:T,new dr({file:g,mappings:C,names:z,sources:P,sourcesContent:T})}($,e.generateDecodedMap({}),t,l,b,s);for(let g=0;g{const i=new Set;return new Proxy(a,{deleteProperty:(s,o)=>(typeof o=="string"&&i.delete(o.toLowerCase()),Reflect.deleteProperty(s,o)),get:(s,o)=>o===Zr?i:Reflect.get(s,o),set:(s,o,l)=>(typeof o=="string"&&i.add(o.toLowerCase()),Reflect.set(s,o,l))})})(t);this.pluginDriver.setOutputBundle(r,this.outputOptions);try{kn("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),yn("initialize render",2),kn("generate chunks",2);const a=(()=>{let s=0;return(o,l=8)=>{if(l>64)return M(jn(`Hashes cannot be longer than 64 characters, received ${l}. Check the "${o}" option.`));const _=`${Pi}${Lr(++s).padStart(l-5,"0")}${Ui}`;return _.length>l?M(jn(`To generate hashes for this number of chunks (currently ${s}), you need a minimum hash size of ${_.length}, received ${l}. Check the "${o}" option.`)):_}})(),i=await this.generateChunks(r,a);i.length>1&&function(s,o){if(s.format==="umd"||s.format==="iife")return M(bn("output.format",Ps,"UMD and IIFE output formats are not supported for code-splitting builds",s.format));if(typeof s.file=="string")return M(bn("output.file",wt,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(s.sourcemapFile)return M(bn("output.sourcemapFile",Xd,'"output.sourcemapFile" is only supported for single-file builds'));!s.amd.autoId&&s.amd.id&&o(q,bn("output.amd.id",Fs,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const s of i)s.generateExports();yn("generate chunks",2),await uh(i,r,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(a){throw await this.pluginDriver.hookParallel("renderError",[a]),a}return(a=>{const i=new Set,s=Object.values(a);for(const o of s)o.type==="asset"&&o.needsCodeReference&&i.add(o.fileName);for(const o of s)if(o.type==="chunk")for(const l of o.referencedFiles)i.has(l)&&i.delete(l);for(const o of i)delete a[o]})(r),kn("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,r,n]),this.finaliseAssets(r),yn("generate bundle",2),yn("GENERATE",1),t}async addManualChunks(n){const t=new Map,r=await Promise.all(Object.entries(n).map(async([a,i])=>({alias:a,entries:await this.graph.moduleLoader.addAdditionalModules(i)})));for(const{alias:a,entries:i}of r)for(const s of i)e_(a,s,t);return t}assignManualChunks(n){const t=[],r={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values())if(i instanceof hn){const s=n(i.id,r);typeof s=="string"&&t.push([s,i])}t.sort(([i],[s])=>i>s?1:i`${P?"async ":""}function${T?` ${T}`:""}${x}(${D.join(`,${x}`)})${x}`,E=v?(D,{isAsync:P,name:T})=>{const z=D.length===1;return`${T?`${S} ${T}${x}=${x}`:""}${P?`async${z?" ":x}`:""}${z?D[0]:`(${D.join(`,${x}`)})`}${x}=>${x}`}:I,B=(D,{functionReturn:P,lineBreakIndent:T,name:z})=>[`${E(D,{isAsync:!1,name:z})}${v?T?`${k}${T.base}${T.t}`:"":`{${T?`${k}${T.base}${T.t}`:x}${P?"return ":""}`}`,v?`${z?";":""}${T?`${k}${T.base}`:""}`:`${A}${T?`${k}${T.base}`:x}}`],R=g?D=>Pl.test(D):D=>!br.has(D)&&Pl.test(D);return{_:x,cnst:S,getDirectReturnFunction:B,getDirectReturnIifeLeft:(D,P,{needsArrowReturnParens:T,needsWrappedFunction:z})=>{const[C,L]=B(D,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Fl(`${C}${Fl(P,v&&T)}${L}`,v||z)}(`},getFunctionIntro:E,getNonArrowFunctionIntro:I,getObject(D,{lineBreakIndent:P}){const T=P?`${k}${P.base}${P.t}`:x;return`{${D.map(([z,C])=>{if(z===null)return`${T}${C}`;const L=!R(z);return z===C&&$&&!L?T+z:`${T}${L?`'${z}'`:z}:${x}${C}`}).join(",")}${D.length===0?"":P?`${k}${P.base}`:x}}`},getPropertyAccess:D=>R(D)?`.${D}`:`[${JSON.stringify(D)}]`,n:k,s:A}}(this.outputOptions),_=function(p){const v=[];for(const y of p.values())y instanceof hn&&(y.isIncluded()||y.info.isEntry||y.includedDynamicImporters.length>0)&&v.push(y);return v}(this.graph.modulesById),u=function(p){if(p.length===0)return"/";if(p.length===1)return je(p[0]);const v=p.slice(1).reduce((y,$)=>{const g=$.split(/\/+|\\+/);let x;for(x=0;y[x]===g[x]&&x1?v.join("/"):"/"}(function(p,v){const y=[];for(const $ of p)($.info.isEntry||v)&&be($.id)&&y.push($.id);return y}(_,s)),f=function(p,v,y){const $=new Map;for(const g of p.values())g instanceof fn&&$.set(g,new et(g,v,y));return $}(this.graph.modulesById,this.outputOptions,u),d=[],h=new Map;for(const{alias:p,modules:v}of a?[{alias:null,modules:_}]:s?_.map(y=>({alias:null,modules:[y]})):Fp(this.graph.entryModules,o,r,this.inputOptions.onLog)){v.sort(Gp);const y=new Se(v,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,f,this.facadeChunkByModule,this.includedNamespaces,p,t,n,u,l);d.push(y)}for(const p of d)p.link();const b=[];for(const p of d)b.push(...p.generateFacades());return[...d,...b]}}function e_(e,n,t){const r=t.get(n);if(typeof r=="string"&&r!==e)return M((a=n.id,i=e,s=r,{code:am,message:`Cannot assign "${W(a)}" to the "${i}" chunk as it is already in the "${s}" chunk.`}));var a,i,s;t.set(n,e)}var mh=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],t_=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],r_="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Hi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ki="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ph={5:Ki,"5module":Ki+" export import",6:Ki+" const class extends export import super"},hh=/^in(stanceof)?$/,vh=new RegExp("["+r_+"]"),gh=new RegExp("["+r_+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function Ji(e,n){for(var t=65536,r=0;re)return!1;if((t+=n[r+1])>=e)return!0}return!1}function le(e,n){return e<65?e===36:e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&vh.test(String.fromCharCode(e)):n!==!1&&Ji(e,t_)))}function He(e,n){return e<48?e===36:e<58||!(e<65)&&(e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&gh.test(String.fromCharCode(e)):n!==!1&&(Ji(e,t_)||Ji(e,mh)))))}var Q=function(e,n){n===void 0&&(n={}),this.label=e,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function Gn(e,n){return new Q(e,{beforeExpr:!0,binop:n})}var Xn={beforeExpr:!0},Dn={startsExpr:!0},ta={};function Z(e,n){return n===void 0&&(n={}),n.keyword=e,ta[e]=new Q(e,n)}var m={num:new Q("num",Dn),regexp:new Q("regexp",Dn),string:new Q("string",Dn),name:new Q("name",Dn),privateId:new Q("privateId",Dn),eof:new Q("eof"),bracketL:new Q("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Q("]"),braceL:new Q("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Q("}"),parenL:new Q("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Q(")"),comma:new Q(",",Xn),semi:new Q(";",Xn),colon:new Q(":",Xn),dot:new Q("."),question:new Q("?",Xn),questionDot:new Q("?."),arrow:new Q("=>",Xn),template:new Q("template"),invalidTemplate:new Q("invalidTemplate"),ellipsis:new Q("...",Xn),backQuote:new Q("`",Dn),dollarBraceL:new Q("${",{beforeExpr:!0,startsExpr:!0}),eq:new Q("=",{beforeExpr:!0,isAssign:!0}),assign:new Q("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Q("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Q("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Gn("||",1),logicalAND:Gn("&&",2),bitwiseOR:Gn("|",3),bitwiseXOR:Gn("^",4),bitwiseAND:Gn("&",5),equality:Gn("==/!=/===/!==",6),relational:Gn(">/<=/>=",7),bitShift:Gn("<>>/>>>",8),plusMin:new Q("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Gn("%",10),star:Gn("*",10),slash:Gn("/",10),starstar:new Q("**",{beforeExpr:!0}),coalesce:Gn("??",1),_break:Z("break"),_case:Z("case",Xn),_catch:Z("catch"),_continue:Z("continue"),_debugger:Z("debugger"),_default:Z("default",Xn),_do:Z("do",{isLoop:!0,beforeExpr:!0}),_else:Z("else",Xn),_finally:Z("finally"),_for:Z("for",{isLoop:!0}),_function:Z("function",Dn),_if:Z("if"),_return:Z("return",Xn),_switch:Z("switch"),_throw:Z("throw",Xn),_try:Z("try"),_var:Z("var"),_const:Z("const"),_while:Z("while",{isLoop:!0}),_with:Z("with"),_new:Z("new",{beforeExpr:!0,startsExpr:!0}),_this:Z("this",Dn),_super:Z("super",Dn),_class:Z("class",Dn),_extends:Z("extends",Xn),_export:Z("export"),_import:Z("import",Dn),_null:Z("null",Dn),_true:Z("true",Dn),_false:Z("false",Dn),_in:Z("in",{beforeExpr:!0,binop:7}),_instanceof:Z("instanceof",{beforeExpr:!0,binop:7}),_typeof:Z("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Z("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Z("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Un=/\r\n?|\n|\u2028|\u2029/,a_=new RegExp(Un.source,"g");function Ke(e){return e===10||e===13||e===8232||e===8233}function i_(e,n,t){t===void 0&&(t=e.length);for(var r=n;r>10),56320+(1023&e)))}var xh=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,dt=function(e,n){this.line=e,this.column=n};dt.prototype.offset=function(e){return new dt(this.line,this.column+e)};var Zt=function(e,n,t){this.start=n,this.end=t,e.sourceFile!==null&&(this.source=e.sourceFile)};function Zi(e,n){for(var t=1,r=0;;){var a=i_(e,r,n);if(a<0)return new dt(t,n-r);++t,r=a}}var ra={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},l_=!1;function kh(e){var n={};for(var t in ra)n[t]=e&&Yt(e,t)?e[t]:ra[t];if(n.ecmaVersion==="latest"?n.ecmaVersion=1e8:n.ecmaVersion==null?(!l_&&typeof console=="object"&&console.warn&&(l_=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
+Defaulting to 2020, but this will stop working in the future.`)),n.ecmaVersion=11):n.ecmaVersion>=2015&&(n.ecmaVersion-=2009),n.allowReserved==null&&(n.allowReserved=n.ecmaVersion<5),e&&e.allowHashBang!=null||(n.allowHashBang=n.ecmaVersion>=14),o_(n.onToken)){var r=n.onToken;n.onToken=function(a){return r.push(a)}}return o_(n.onComment)&&(n.onComment=function(a,i){return function(s,o,l,_,u,f){var d={type:s?"Block":"Line",value:o,start:l,end:_};a.locations&&(d.loc=new Zt(this,u,f)),a.ranges&&(d.range=[l,_]),i.push(d)}}(n,n.onComment)),n}var __=256;function Qi(e,n){return 2|(e?4:0)|(n?8:0)}var mn=function(e,n,t){this.options=e=kh(e),this.sourceFile=e.sourceFile,this.keywords=Je(ph[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var r="";e.allowReserved!==!0&&(r=Hi[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(r+=" await")),this.reservedWords=Je(r);var a=(r?r+" ":"")+Hi.strict;this.reservedWordsStrict=Je(a),this.reservedWordsStrictBind=Je(a+" "+Hi.strictBind),this.input=String(n),this.containsEsc=!1,t?(this.pos=t,this.lineStart=this.input.lastIndexOf(`
+`,t-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Un).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=m.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},_e={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};mn.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},_e.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},_e.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},_e.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},_e.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var n=this.scopeStack[e];if(n.inClassFieldInit||n.flags&__)return!1;if(2&n.flags)return(4&n.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},_e.allowSuper.get=function(){var e=this.currentThisScope(),n=e.flags,t=e.inClassFieldInit;return(64&n)>0||t||this.options.allowSuperOutsideMethod},_e.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},_e.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},_e.allowNewDotTarget.get=function(){var e=this.currentThisScope(),n=e.flags,t=e.inClassFieldInit;return(258&n)>0||t},_e.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&__)>0},mn.extend=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var t=this,r=0;r=,?^&]/.test(a)||a==="!"&&this.input.charAt(r+1)==="=")}e+=n[0].length,Wn.lastIndex=e,e+=Wn.exec(this.input)[0].length,this.input[e]===";"&&e++}},Mn.eat=function(e){return this.type===e&&(this.next(),!0)},Mn.isContextual=function(e){return this.type===m.name&&this.value===e&&!this.containsEsc},Mn.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Mn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Mn.canInsertSemicolon=function(){return this.type===m.eof||this.type===m.braceR||Un.test(this.input.slice(this.lastTokEnd,this.start))},Mn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Mn.semicolon=function(){this.eat(m.semi)||this.insertSemicolon()||this.unexpected()},Mn.afterTrailingComma=function(e,n){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),n||this.next(),!0},Mn.expect=function(e){this.eat(e)||this.unexpected()},Mn.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var aa=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Mn.checkPatternErrors=function(e,n){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var t=n?e.parenthesizedAssign:e.parenthesizedBind;t>-1&&this.raiseRecoverable(t,n?"Assigning to rvalue":"Parenthesized pattern")}},Mn.checkExpressionErrors=function(e,n){if(!e)return!1;var t=e.shorthandAssign,r=e.doubleProto;if(!n)return t>=0||r>=0;t>=0&&this.raise(t,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Mn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&r<56320)return!0;if(le(r,!0)){for(var a=t+1;He(r=this.input.charCodeAt(a),!0);)++a;if(r===92||r>55295&&r<56320)return!0;var i=this.input.slice(t,a);if(!hh.test(i))return!0}return!1},V.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Wn.lastIndex=this.pos;var e,n=Wn.exec(this.input),t=this.pos+n[0].length;return!(Un.test(this.input.slice(this.pos,t))||this.input.slice(t,t+8)!=="function"||t+8!==this.input.length&&(He(e=this.input.charCodeAt(t+8))||e>55295&&e<56320))},V.parseStatement=function(e,n,t){var r,a=this.type,i=this.startNode();switch(this.isLet(e)&&(a=m._var,r="let"),a){case m._break:case m._continue:return this.parseBreakContinueStatement(i,a.keyword);case m._debugger:return this.parseDebuggerStatement(i);case m._do:return this.parseDoStatement(i);case m._for:return this.parseForStatement(i);case m._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case m._class:return e&&this.unexpected(),this.parseClass(i,!0);case m._if:return this.parseIfStatement(i);case m._return:return this.parseReturnStatement(i);case m._switch:return this.parseSwitchStatement(i);case m._throw:return this.parseThrowStatement(i);case m._try:return this.parseTryStatement(i);case m._const:case m._var:return r=r||this.value,e&&r!=="var"&&this.unexpected(),this.parseVarStatement(i,r);case m._while:return this.parseWhileStatement(i);case m._with:return this.parseWithStatement(i);case m.braceL:return this.parseBlock(!0,i);case m.semi:return this.parseEmptyStatement(i);case m._export:case m._import:if(this.options.ecmaVersion>10&&a===m._import){Wn.lastIndex=this.pos;var s=Wn.exec(this.input),o=this.pos+s[0].length,l=this.input.charCodeAt(o);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(n||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===m._import?this.parseImport(i):this.parseExport(i,t);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var _=this.value,u=this.parseExpression();return a===m.name&&u.type==="Identifier"&&this.eat(m.colon)?this.parseLabeledStatement(i,_,u,e):this.parseExpressionStatement(i,u)}},V.parseBreakContinueStatement=function(e,n){var t=n==="break";this.next(),this.eat(m.semi)||this.insertSemicolon()?e.label=null:this.type!==m.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(m.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},V.parseForStatement=function(e){this.next();var n=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ns),this.enterScope(0),this.expect(m.parenL),this.type===m.semi)return n>-1&&this.unexpected(n),this.parseFor(e,null);var t=this.isLet();if(this.type===m._var||this.type===m._const||t){var r=this.startNode(),a=t?"let":this.value;return this.next(),this.parseVar(r,!0,a),this.finishNode(r,"VariableDeclaration"),(this.type===m._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===m._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,r)):(n>-1&&this.unexpected(n),this.parseFor(e,r))}var i=this.isContextual("let"),s=!1,o=new aa,l=this.parseExpression(!(n>-1)||"await",o);return this.type===m._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===m._in?n>-1&&this.unexpected(n):e.await=n>-1),i&&s&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,o),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(o,!0),n>-1&&this.unexpected(n),this.parseFor(e,l))},V.parseFunctionStatement=function(e,n,t){return this.next(),this.parseFunction(e,Qt|(t?0:es),!1,n)},V.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(m._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},V.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(m.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},V.parseSwitchStatement=function(e){var n;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(m.braceL),this.labels.push(Eh),this.enterScope(0);for(var t=!1;this.type!==m.braceR;)if(this.type===m._case||this.type===m._default){var r=this.type===m._case;n&&this.finishNode(n,"SwitchCase"),e.cases.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(t&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),t=!0,n.test=null),this.expect(m.colon)}else n||this.unexpected(),n.consequent.push(this.parseStatement(null));return this.exitScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},V.parseThrowStatement=function(e){return this.next(),Un.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ch=[];V.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===m._catch){var n=this.startNode();if(this.next(),this.eat(m.parenL)){n.param=this.parseBindingAtom();var t=n.param.type==="Identifier";this.enterScope(t?32:0),this.checkLValPattern(n.param,t?4:2),this.expect(m.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),n.param=null,this.enterScope(0);n.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(n,"CatchClause")}return e.finalizer=this.eat(m._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},V.parseVarStatement=function(e,n){return this.next(),this.parseVar(e,!1,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},V.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ns),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},V.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},V.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},V.parseLabeledStatement=function(e,n,t,r){for(var a=0,i=this.labels;a=0;o--){var l=this.labels[o];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=s}return this.labels.push({name:n,kind:s,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=t,this.finishNode(e,"LabeledStatement")},V.parseExpressionStatement=function(e,n){return e.expression=n,this.semicolon(),this.finishNode(e,"ExpressionStatement")},V.parseBlock=function(e,n,t){for(e===void 0&&(e=!0),n===void 0&&(n=this.startNode()),n.body=[],this.expect(m.braceL),e&&this.enterScope(0);this.type!==m.braceR;){var r=this.parseStatement(null);n.body.push(r)}return t&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(n,"BlockStatement")},V.parseFor=function(e,n){return e.init=n,this.expect(m.semi),e.test=this.type===m.semi?null:this.parseExpression(),this.expect(m.semi),e.update=this.type===m.parenR?null:this.parseExpression(),this.expect(m.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},V.parseForIn=function(e,n){var t=this.type===m._in;return this.next(),n.type==="VariableDeclaration"&&n.declarations[0].init!=null&&(!t||this.options.ecmaVersion<8||this.strict||n.kind!=="var"||n.declarations[0].id.type!=="Identifier")&&this.raise(n.start,(t?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=n,e.right=t?this.parseExpression():this.parseMaybeAssign(),this.expect(m.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,t?"ForInStatement":"ForOfStatement")},V.parseVar=function(e,n,t){for(e.declarations=[],e.kind=t;;){var r=this.startNode();if(this.parseVarId(r,t),this.eat(m.eq)?r.init=this.parseMaybeAssign(n):t!=="const"||this.type===m._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r.id.type==="Identifier"||n&&(this.type===m._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(m.comma))break}return e},V.parseVarId=function(e,n){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,n==="var"?1:2,!1)};var Qt=1,es=2;function wh(e,n){var t=n.key.name,r=e[t],a="true";return n.type!=="MethodDefinition"||n.kind!=="get"&&n.kind!=="set"||(a=(n.static?"s":"i")+n.kind),r==="iget"&&a==="iset"||r==="iset"&&a==="iget"||r==="sget"&&a==="sset"||r==="sset"&&a==="sget"?(e[t]="true",!1):!!r||(e[t]=a,!1)}function ia(e,n){var t=e.computed,r=e.key;return!t&&(r.type==="Identifier"&&r.name===n||r.type==="Literal"&&r.value===n)}V.parseFunction=function(e,n,t,r,a){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===m.star&&n&es&&this.unexpected(),e.generator=this.eat(m.star)),this.options.ecmaVersion>=8&&(e.async=!!r),n&Qt&&(e.id=4&n&&this.type!==m.name?null:this.parseIdent(),!e.id||n&es||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Qi(e.async,e.generator)),n&Qt||(e.id=this.type===m.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,t,!1,a),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,n&Qt?"FunctionDeclaration":"FunctionExpression")},V.parseFunctionParams=function(e){this.expect(m.parenL),e.params=this.parseBindingList(m.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},V.parseClass=function(e,n){this.next();var t=this.strict;this.strict=!0,this.parseClassId(e,n),this.parseClassSuper(e);var r=this.enterClassBody(),a=this.startNode(),i=!1;for(a.body=[],this.expect(m.braceL);this.type!==m.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(a.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0):s.key&&s.key.type==="PrivateIdentifier"&&wh(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=t,this.next(),e.body=this.finishNode(a,"ClassBody"),this.exitClassBody(),this.finishNode(e,n?"ClassDeclaration":"ClassExpression")},V.parseClassElement=function(e){if(this.eat(m.semi))return null;var n=this.options.ecmaVersion,t=this.startNode(),r="",a=!1,i=!1,s="method",o=!1;if(this.eatContextual("static")){if(n>=13&&this.eat(m.braceL))return this.parseClassStaticBlock(t),t;this.isClassElementNameStart()||this.type===m.star?o=!0:r="static"}if(t.static=o,!r&&n>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==m.star||this.canInsertSemicolon()?r="async":i=!0),!r&&(n>=9||!i)&&this.eat(m.star)&&(a=!0),!r&&!i&&!a){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=l:r=l)}if(r?(t.computed=!1,t.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),t.key.name=r,this.finishNode(t.key,"Identifier")):this.parseClassElementName(t),n<13||this.type===m.parenL||s!=="method"||a||i){var _=!t.static&&ia(t,"constructor"),u=_&&e;_&&s!=="method"&&this.raise(t.key.start,"Constructor can't have get/set modifier"),t.kind=_?"constructor":s,this.parseClassMethod(t,a,i,u)}else this.parseClassField(t);return t},V.isClassElementNameStart=function(){return this.type===m.name||this.type===m.privateId||this.type===m.num||this.type===m.string||this.type===m.bracketL||this.type.keyword},V.parseClassElementName=function(e){this.type===m.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},V.parseClassMethod=function(e,n,t,r){var a=e.key;e.kind==="constructor"?(n&&this.raise(a.start,"Constructor can't be a generator"),t&&this.raise(a.start,"Constructor can't be an async method")):e.static&&ia(e,"prototype")&&this.raise(a.start,"Classes may not have a static property named prototype");var i=e.value=this.parseMethod(n,t,r);return e.kind==="get"&&i.params.length!==0&&this.raiseRecoverable(i.start,"getter should have no params"),e.kind==="set"&&i.params.length!==1&&this.raiseRecoverable(i.start,"setter should have exactly one param"),e.kind==="set"&&i.params[0].type==="RestElement"&&this.raiseRecoverable(i.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},V.parseClassField=function(e){if(ia(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ia(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(m.eq)){var n=this.currentThisScope(),t=n.inClassFieldInit;n.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),n.inClassFieldInit=t}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},V.parseClassStaticBlock=function(e){e.body=[];var n=this.labels;for(this.labels=[],this.enterScope(320);this.type!==m.braceR;){var t=this.parseStatement(null);e.body.push(t)}return this.next(),this.exitScope(),this.labels=n,this.finishNode(e,"StaticBlock")},V.parseClassId=function(e,n){this.type===m.name?(e.id=this.parseIdent(),n&&this.checkLValSimple(e.id,2,!1)):(n===!0&&this.unexpected(),e.id=null)},V.parseClassSuper=function(e){e.superClass=this.eat(m._extends)?this.parseExprSubscripts(null,!1):null},V.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},V.exitClassBody=function(){for(var e=this.privateNameStack.pop(),n=e.declared,t=e.used,r=this.privateNameStack.length,a=r===0?null:this.privateNameStack[r-1],i=0;i=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(n,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==m.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(m._default)){var t;if(this.checkExport(n,"default",this.lastTokStart),this.type===m._function||(t=this.isAsyncFunction())){var r=this.startNode();this.next(),t&&this.next(),e.declaration=this.parseFunction(r,4|Qt,!1,t)}else if(this.type===m._class){var a=this.startNode();e.declaration=this.parseClass(a,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(n,e.declaration.declarations):this.checkExport(n,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(n),this.eatContextual("from"))this.type!==m.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,s=e.specifiers;i=13&&this.type===m.string){var e=this.parseLiteral(this.value);return xh.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},V.adaptDirectivePrologue=function(e){for(var n=0;n=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Qn=mn.prototype;Qn.toAssignable=function(e,n,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",t&&this.checkPatternErrors(t,!0);for(var r=0,a=e.properties;r=6)switch(this.type){case m.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(m.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case m.braceL:return this.parseObj(!0)}return this.parseIdent()},Qn.parseBindingList=function(e,n,t){for(var r=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(m.comma),n&&this.type===m.comma)r.push(null);else{if(t&&this.afterTrailingComma(e))break;if(this.type===m.ellipsis){var i=this.parseRestBinding();this.parseBindingListItem(i),r.push(i),this.type===m.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),r.push(s)}return r},Qn.parseBindingListItem=function(e){return e},Qn.parseMaybeDefault=function(e,n,t){if(t=t||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(m.eq))return t;var r=this.startNodeAt(e,n);return r.left=t,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},Qn.checkLValSimple=function(e,n,t){n===void 0&&(n=0);var r=n!==0;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(n===2&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),t&&(Yt(t,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),t[e.name]=!0),n!==5&&this.declareName(e.name,n,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,n,t);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},Qn.checkLValPattern=function(e,n,t){switch(n===void 0&&(n=0),e.type){case"ObjectPattern":for(var r=0,a=e.properties;r=1;e--){var n=this.context[e];if(n.token==="function")return n.generator}return!1},mt.updateContext=function(e){var n,t=this.type;t.keyword&&e===m.dot?this.exprAllowed=!1:(n=t.updateContext)?n.call(this,e):this.exprAllowed=t.beforeExpr},mt.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},m.parenR.updateContext=m.braceR.updateContext=function(){if(this.context.length!==1){var e=this.context.pop();e===un.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},m.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?un.b_stat:un.b_expr),this.exprAllowed=!0},m.dollarBraceL.updateContext=function(){this.context.push(un.b_tmpl),this.exprAllowed=!0},m.parenL.updateContext=function(e){var n=e===m._if||e===m._for||e===m._with||e===m._while;this.context.push(n?un.p_stat:un.p_expr),this.exprAllowed=!0},m.incDec.updateContext=function(){},m._function.updateContext=m._class.updateContext=function(e){!e.beforeExpr||e===m._else||e===m.semi&&this.curContext()!==un.p_stat||e===m._return&&Un.test(this.input.slice(this.lastTokEnd,this.start))||(e===m.colon||e===m.braceL)&&this.curContext()===un.b_stat?this.context.push(un.f_stat):this.context.push(un.f_expr),this.exprAllowed=!1},m.backQuote.updateContext=function(){this.curContext()===un.q_tmpl?this.context.pop():this.context.push(un.q_tmpl),this.exprAllowed=!1},m.star.updateContext=function(e){if(e===m._function){var n=this.context.length-1;this.context[n]===un.f_expr?this.context[n]=un.f_expr_gen:this.context[n]=un.f_gen}this.exprAllowed=!0},m.name.updateContext=function(e){var n=!1;this.options.ecmaVersion>=6&&e!==m.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(n=!0),this.exprAllowed=n};var H=mn.prototype;function c_(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&c_(e.expression)}H.checkPropClash=function(e,n,t){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement"||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,a=e.key;switch(a.type){case"Identifier":r=a.name;break;case"Literal":r=String(a.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)r==="__proto__"&&i==="init"&&(n.proto&&(t?t.doubleProto<0&&(t.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),n.proto=!0);else{var s=n[r="$"+r];s?(i==="init"?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(a.start,"Redefinition of property"):s=n[r]={init:!1,get:!1,set:!1},s[i]=!0}}},H.parseExpression=function(e,n){var t=this.start,r=this.startLoc,a=this.parseMaybeAssign(e,n);if(this.type===m.comma){var i=this.startNodeAt(t,r);for(i.expressions=[a];this.eat(m.comma);)i.expressions.push(this.parseMaybeAssign(e,n));return this.finishNode(i,"SequenceExpression")}return a},H.parseMaybeAssign=function(e,n,t){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,a=-1,i=-1,s=-1;n?(a=n.parenthesizedAssign,i=n.trailingComma,s=n.doubleProto,n.parenthesizedAssign=n.trailingComma=-1):(n=new aa,r=!0);var o=this.start,l=this.startLoc;this.type!==m.parenL&&this.type!==m.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var _=this.parseMaybeConditional(e,n);if(t&&(_=t.call(this,_,o,l)),this.type.isAssign){var u=this.startNodeAt(o,l);return u.operator=this.value,this.type===m.eq&&(_=this.toAssignable(_,!1,n)),r||(n.parenthesizedAssign=n.trailingComma=n.doubleProto=-1),n.shorthandAssign>=_.start&&(n.shorthandAssign=-1),this.type===m.eq?this.checkLValPattern(_):this.checkLValSimple(_),u.left=_,this.next(),u.right=this.parseMaybeAssign(e),s>-1&&(n.doubleProto=s),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(n,!0),a>-1&&(n.parenthesizedAssign=a),i>-1&&(n.trailingComma=i),_},H.parseMaybeConditional=function(e,n){var t=this.start,r=this.startLoc,a=this.parseExprOps(e,n);if(this.checkExpressionErrors(n))return a;if(this.eat(m.question)){var i=this.startNodeAt(t,r);return i.test=a,i.consequent=this.parseMaybeAssign(),this.expect(m.colon),i.alternate=this.parseMaybeAssign(e),this.finishNode(i,"ConditionalExpression")}return a},H.parseExprOps=function(e,n){var t=this.start,r=this.startLoc,a=this.parseMaybeUnary(n,!1,!1,e);return this.checkExpressionErrors(n)||a.start===t&&a.type==="ArrowFunctionExpression"?a:this.parseExprOp(a,t,r,-1,e)},H.parseExprOp=function(e,n,t,r,a){var i=this.type.binop;if(i!=null&&(!a||this.type!==m._in)&&i>r){var s=this.type===m.logicalOR||this.type===m.logicalAND,o=this.type===m.coalesce;o&&(i=m.logicalAND.binop);var l=this.value;this.next();var _=this.start,u=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,a),_,u,i,a),d=this.buildBinary(n,t,e,f,l,s||o);return(s&&this.type===m.coalesce||o&&(this.type===m.logicalOR||this.type===m.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,n,t,r,a)}return e},H.buildBinary=function(e,n,t,r,a,i){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,n);return s.left=t,s.operator=a,s.right=r,this.finishNode(s,i?"LogicalExpression":"BinaryExpression")},H.parseMaybeUnary=function(e,n,t,r){var a,i=this.start,s=this.startLoc;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(r),n=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===m.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&o.argument.type==="Identifier"?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&c_(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):n=!0,a=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(n||this.type!==m.privateId){if(a=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var _=this.startNodeAt(i,s);_.operator=this.value,_.prefix=!1,_.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(_,"UpdateExpression")}}else(r||this.privateNameStack.length===0)&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==m._in&&this.unexpected();return t||!this.eat(m.starstar)?a:n?void this.unexpected(this.lastTokStart):this.buildBinary(i,s,a,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},H.parseExprSubscripts=function(e,n){var t=this.start,r=this.startLoc,a=this.parseExprAtom(e,n);if(a.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return a;var i=this.parseSubscripts(a,t,r,!1,n);return e&&i.type==="MemberExpression"&&(e.parenthesizedAssign>=i.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=i.start&&(e.parenthesizedBind=-1),e.trailingComma>=i.start&&(e.trailingComma=-1)),i},H.parseSubscripts=function(e,n,t,r,a){for(var i=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,s=!1;;){var o=this.parseSubscript(e,n,t,r,i,s,a);if(o.optional&&(s=!0),o===e||o.type==="ArrowFunctionExpression"){if(s){var l=this.startNodeAt(n,t);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}},H.parseSubscript=function(e,n,t,r,a,i,s){var o=this.options.ecmaVersion>=11,l=o&&this.eat(m.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var _=this.eat(m.bracketL);if(_||l&&this.type!==m.parenL&&this.type!==m.backQuote||this.eat(m.dot)){var u=this.startNodeAt(n,t);u.object=e,_?(u.property=this.parseExpression(),this.expect(m.bracketR)):this.type===m.privateId&&e.type!=="Super"?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!=="never"),u.computed=!!_,o&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat(m.parenL)){var f=new aa,d=this.yieldPos,h=this.awaitPos,b=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var p=this.parseExprList(m.parenR,this.options.ecmaVersion>=8,!1,f);if(a&&!l&&!this.canInsertSemicolon()&&this.eat(m.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=h,this.awaitIdentPos=b,this.parseArrowExpression(this.startNodeAt(n,t),p,!0,s);this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=b||this.awaitIdentPos;var v=this.startNodeAt(n,t);v.callee=e,v.arguments=p,o&&(v.optional=l),e=this.finishNode(v,"CallExpression")}else if(this.type===m.backQuote){(l||i)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(n,t);y.tag=e,y.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(y,"TaggedTemplateExpression")}return e},H.parseExprAtom=function(e,n){this.type===m.slash&&this.readRegexp();var t,r=this.potentialArrowAt===this.start;switch(this.type){case m._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==m.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==m.dot&&this.type!==m.bracketL&&this.type!==m.parenL&&this.unexpected(),this.finishNode(t,"Super");case m._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case m.name:var a=this.start,i=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&o.name==="async"&&!this.canInsertSemicolon()&&this.eat(m._function))return this.overrideContext(un.f_expr),this.parseFunction(this.startNodeAt(a,i),0,!1,!0,n);if(r&&!this.canInsertSemicolon()){if(this.eat(m.arrow))return this.parseArrowExpression(this.startNodeAt(a,i),[o],!1,n);if(this.options.ecmaVersion>=8&&o.name==="async"&&this.type===m.name&&!s&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(m.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,i),[o],!0,n)}return o;case m.regexp:var l=this.value;return(t=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},t;case m.num:case m.string:return this.parseLiteral(this.value);case m._null:case m._true:case m._false:return(t=this.startNode()).value=this.type===m._null?null:this.type===m._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case m.parenL:var _=this.start,u=this.parseParenAndDistinguishExpression(r,n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=_),e.parenthesizedBind<0&&(e.parenthesizedBind=_)),u;case m.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(m.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case m.braceL:return this.overrideContext(un.b_expr),this.parseObj(!1,e);case m._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case m._class:return this.parseClass(this.startNode(),!1);case m._new:return this.parseNew();case m.backQuote:return this.parseTemplate();case m._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},H.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var n=this.parseIdent(!0);switch(this.type){case m.parenL:return this.parseDynamicImport(e);case m.dot:return e.meta=n,this.parseImportMeta(e);default:this.unexpected()}},H.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(m.parenR)){var n=this.start;this.eat(m.comma)&&this.eat(m.parenR)?this.raiseRecoverable(n,"Trailing comma is not allowed in import()"):this.unexpected(n)}return this.finishNode(e,"ImportExpression")},H.parseImportMeta=function(e){this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),n&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},H.parseLiteral=function(e){var n=this.startNode();return n.value=e,n.raw=this.input.slice(this.start,this.end),n.raw.charCodeAt(n.raw.length-1)===110&&(n.bigint=n.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(n,"Literal")},H.parseParenExpression=function(){this.expect(m.parenL);var e=this.parseExpression();return this.expect(m.parenR),e},H.parseParenAndDistinguishExpression=function(e,n){var t,r=this.start,a=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,l=this.startLoc,_=[],u=!0,f=!1,d=new aa,h=this.yieldPos,b=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==m.parenR;){if(u?u=!1:this.expect(m.comma),i&&this.afterTrailingComma(m.parenR,!0)){f=!0;break}if(this.type===m.ellipsis){s=this.start,_.push(this.parseParenItem(this.parseRestBinding())),this.type===m.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}_.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var p=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(m.parenR),e&&!this.canInsertSemicolon()&&this.eat(m.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=b,this.parseParenArrowList(r,a,_,n);_.length&&!f||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=b||this.awaitPos,_.length>1?((t=this.startNodeAt(o,l)).expressions=_,this.finishNodeAt(t,"SequenceExpression",p,v)):t=_[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(r,a);return y.expression=t,this.finishNode(y,"ParenthesizedExpression")}return t},H.parseParenItem=function(e){return e},H.parseParenArrowList=function(e,n,t,r){return this.parseArrowExpression(this.startNodeAt(e,n),t,!1,r)};var Ah=[];H.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),n=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(m.dot)){e.meta=n;var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),t&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,a=this.startLoc,i=this.type===m._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,a,!0,!1),i&&e.callee.type==="ImportExpression"&&this.raise(r,"Cannot use new with import()"),this.eat(m.parenL)?e.arguments=this.parseExprList(m.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ah,this.finishNode(e,"NewExpression")},H.parseTemplateElement=function(e){var n=e.isTagged,t=this.startNode();return this.type===m.invalidTemplate?(n||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),t.value={raw:this.value,cooked:null}):t.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
+`),cooked:this.value},this.next(),t.tail=this.type===m.backQuote,this.finishNode(t,"TemplateElement")},H.parseTemplate=function(e){e===void 0&&(e={});var n=e.isTagged;n===void 0&&(n=!1);var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement({isTagged:n});for(t.quasis=[r];!r.tail;)this.type===m.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(m.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(m.braceR),t.quasis.push(r=this.parseTemplateElement({isTagged:n}));return this.next(),this.finishNode(t,"TemplateLiteral")},H.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===m.name||this.type===m.num||this.type===m.string||this.type===m.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===m.star)&&!Un.test(this.input.slice(this.lastTokEnd,this.start))},H.parseObj=function(e,n){var t=this.startNode(),r=!0,a={};for(t.properties=[],this.next();!this.eat(m.braceR);){if(r)r=!1;else if(this.expect(m.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(m.braceR))break;var i=this.parseProperty(e,n);e||this.checkPropClash(i,a,n),t.properties.push(i)}return this.finishNode(t,e?"ObjectPattern":"ObjectExpression")},H.parseProperty=function(e,n){var t,r,a,i,s=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(m.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===m.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,n),this.type===m.comma&&n&&n.trailingComma<0&&(n.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||n)&&(a=this.start,i=this.startLoc),e||(t=this.eat(m.star)));var o=this.containsEsc;return this.parsePropertyName(s),!e&&!o&&this.options.ecmaVersion>=8&&!t&&this.isAsyncProp(s)?(r=!0,t=this.options.ecmaVersion>=9&&this.eat(m.star),this.parsePropertyName(s)):r=!1,this.parsePropertyValue(s,e,t,r,a,i,n,o),this.finishNode(s,"Property")},H.parsePropertyValue=function(e,n,t,r,a,i,s,o){if((t||r)&&this.type===m.colon&&this.unexpected(),this.eat(m.colon))e.value=n?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===m.parenL)n&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(t,r);else if(n||o||!(this.options.ecmaVersion>=5)||e.computed||e.key.type!=="Identifier"||e.key.name!=="get"&&e.key.name!=="set"||this.type===m.comma||this.type===m.braceR||this.type===m.eq)this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((t||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=a),e.kind="init",n?e.value=this.parseMaybeDefault(a,i,this.copyNode(e.key)):this.type===m.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,i,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var l=e.kind==="get"?0:1;if(e.value.params.length!==l){var _=e.value.start;e.kind==="get"?this.raiseRecoverable(_,"getter should have no params"):this.raiseRecoverable(_,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},H.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(m.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(m.bracketR),e.key;e.computed=!1}return e.key=this.type===m.num||this.type===m.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},H.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},H.parseMethod=function(e,n,t){var r=this.startNode(),a=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Qi(n,r.generator)|(t?128:0)),this.expect(m.parenL),r.params=this.parseBindingList(m.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=a,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")},H.parseArrowExpression=function(e,n,t,r){var a=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|Qi(t,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(n,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=a,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},H.parseFunctionBody=function(e,n,t,r){var a=n&&this.type!==m.braceL,i=this.strict,s=!1;if(a)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!i&&!s&&!n&&!t&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,s&&!i),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},H.isSimpleParamList=function(e){for(var n=0,t=e;n-1||a.functions.indexOf(e)>-1||a.var.indexOf(e)>-1,a.lexical.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e]}else if(n===4)this.currentScope().lexical.push(e);else if(n===3){var i=this.currentScope();r=this.treatFunctionsAsVar?i.lexical.indexOf(e)>-1:i.lexical.indexOf(e)>-1||i.var.indexOf(e)>-1,i.functions.push(e)}else for(var s=this.scopeStack.length-1;s>=0;--s){var o=this.scopeStack[s];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}r&&this.raiseRecoverable(t,"Identifier '"+e+"' has already been declared")},Ie.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},Ie.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Ie.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var n=this.scopeStack[e];if(259&n.flags)return n}},Ie.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var n=this.scopeStack[e];if(259&n.flags&&!(16&n.flags))return n}};var nr=function(e,n,t){this.type="",this.start=n,this.end=0,e.options.locations&&(this.loc=new Zt(e,t)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[n,0])},er=mn.prototype;function u_(e,n,t,r){return e.type=n,e.end=t,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=t),e}er.startNode=function(){return new nr(this,this.start,this.startLoc)},er.startNodeAt=function(e,n){return new nr(this,e,n)},er.finishNode=function(e,n){return u_.call(this,e,n,this.lastTokEnd,this.lastTokEndLoc)},er.finishNodeAt=function(e,n,t,r){return u_.call(this,e,n,t,r)},er.copyNode=function(e){var n=new nr(this,e.start,this.startLoc);for(var t in e)n[t]=e[t];return n};var f_="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ts=f_+" Extended_Pictographic",rs=ts+" EBase EComp EMod EPres ExtPict",Bh={9:f_,10:ts,11:ts,12:rs,13:rs,14:rs},d_="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",m_="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",p_=m_+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",h_=p_+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",v_=h_+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",g_=v_+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ih={9:m_,10:p_,11:h_,12:v_,13:g_,14:g_+" Kawi Nag_Mundari Nagm"},b_={};function Lh(e){var n=b_[e]={binary:Je(Bh[e]+" "+d_),nonBinary:{General_Category:Je(d_),Script:Je(Ih[e])}};n.nonBinary.Script_Extensions=n.nonBinary.Script,n.nonBinary.gc=n.nonBinary.General_Category,n.nonBinary.sc=n.nonBinary.Script,n.nonBinary.scx=n.nonBinary.Script_Extensions}for(var as=0,y_=[9,10,11,12,13,14];as=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=b_[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function x_(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}function k_(e){return e>=65&&e<=90||e>=97&&e<=122}function $_(e){return k_(e)||e===95}function Nh(e){return $_(e)||oa(e)}function oa(e){return e>=48&&e<=57}function E_(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function C_(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function w_(e){return e>=48&&e<=55}ve.prototype.reset=function(e,n,t){var r=t.indexOf("u")!==-1;this.start=0|e,this.source=n+"",this.flags=t,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},ve.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},ve.prototype.at=function(e,n){n===void 0&&(n=!1);var t=this.source,r=t.length;if(e>=r)return-1;var a=t.charCodeAt(e);if(!n&&!this.switchU||a<=55295||a>=57344||e+1>=r)return a;var i=t.charCodeAt(e+1);return i>=56320&&i<=57343?(a<<10)+i-56613888:a},ve.prototype.nextIndex=function(e,n){n===void 0&&(n=!1);var t=this.source,r=t.length;if(e>=r)return r;var a,i=t.charCodeAt(e);return!n&&!this.switchU||i<=55295||i>=57344||e+1>=r||(a=t.charCodeAt(e+1))<56320||a>57343?e+1:e+2},ve.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},ve.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},ve.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},ve.prototype.eat=function(e,n){return n===void 0&&(n=!1),this.current(n)===e&&(this.advance(n),!0)},U.validateRegExpFlags=function(e){for(var n=e.validFlags,t=e.flags,r=0;r-1&&this.raise(e.start,"Duplicate regular expression flag")}},U.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},U.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var n=0,t=e.backReferenceNames;n=9&&(t=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!t,!0}return e.pos=n,!1},U.regexp_eatQuantifier=function(e,n){return n===void 0&&(n=!1),!!this.regexp_eatQuantifierPrefix(e,n)&&(e.eat(63),!0)},U.regexp_eatQuantifierPrefix=function(e,n){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,n)},U.regexp_eatBracedQuantifier=function(e,n){var t=e.pos;if(e.eat(123)){var r=0,a=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue),e.eat(125)))return a!==-1&&a=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},U.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},U.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},U.regexp_eatSyntaxCharacter=function(e){var n=e.current();return!!x_(n)&&(e.lastIntValue=n,e.advance(),!0)},U.regexp_eatPatternCharacters=function(e){for(var n=e.pos,t=0;(t=e.current())!==-1&&!x_(t);)e.advance();return e.pos!==n},U.regexp_eatExtendedPatternCharacter=function(e){var n=e.current();return!(n===-1||n===36||n>=40&&n<=43||n===46||n===63||n===91||n===94||n===124)&&(e.advance(),!0)},U.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},U.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},U.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Be(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Be(e.lastIntValue);return!0}return!1},U.regexp_eatRegExpIdentifierStart=function(e){var n=e.pos,t=this.options.ecmaVersion>=11,r=e.current(t);return e.advance(t),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,t)&&(r=e.lastIntValue),function(a){return le(a,!0)||a===36||a===95}(r)?(e.lastIntValue=r,!0):(e.pos=n,!1)},U.regexp_eatRegExpIdentifierPart=function(e){var n=e.pos,t=this.options.ecmaVersion>=11,r=e.current(t);return e.advance(t),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,t)&&(r=e.lastIntValue),function(a){return He(a,!0)||a===36||a===95||a===8204||a===8205}(r)?(e.lastIntValue=r,!0):(e.pos=n,!1)},U.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},U.regexp_eatBackReference=function(e){var n=e.pos;if(this.regexp_eatDecimalEscape(e)){var t=e.lastIntValue;if(e.switchU)return t>e.maxBackReference&&(e.maxBackReference=t),!0;if(t<=e.numCapturingParens)return!0;e.pos=n}return!1},U.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},U.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},U.regexp_eatCControlLetter=function(e){var n=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=n}return!1},U.regexp_eatZero=function(e){return e.current()===48&&!oa(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},U.regexp_eatControlEscape=function(e){var n=e.current();return n===116?(e.lastIntValue=9,e.advance(),!0):n===110?(e.lastIntValue=10,e.advance(),!0):n===118?(e.lastIntValue=11,e.advance(),!0):n===102?(e.lastIntValue=12,e.advance(),!0):n===114&&(e.lastIntValue=13,e.advance(),!0)},U.regexp_eatControlLetter=function(e){var n=e.current();return!!k_(n)&&(e.lastIntValue=n%32,e.advance(),!0)},U.regexp_eatRegExpUnicodeEscapeSequence=function(e,n){n===void 0&&(n=!1);var t,r=e.pos,a=n||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(a&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(i-55296)+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(t=e.lastIntValue)>=0&&t<=1114111)return!0;a&&e.raise("Invalid unicode escape"),e.pos=r}return!1},U.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var n=e.current();return!(n===99||e.switchN&&n===107)&&(e.lastIntValue=n,e.advance(),!0)},U.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var n=e.current();if(n>=49&&n<=57){do e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();while((n=e.current())>=48&&n<=57);return!0}return!1},U.regexp_eatCharacterClassEscape=function(e){var n=e.current();if(function(t){return t===100||t===68||t===115||t===83||t===119||t===87}(n))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(n===80||n===112)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},U.regexp_eatUnicodePropertyValueExpression=function(e){var n=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var t=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,t,r),!0}}if(e.pos=n,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,a),!0}return!1},U.regexp_validateUnicodePropertyNameAndValue=function(e,n,t){Yt(e.unicodeProperties.nonBinary,n)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[n].test(t)||e.raise("Invalid property value")},U.regexp_validateUnicodePropertyNameOrValue=function(e,n){e.unicodeProperties.binary.test(n)||e.raise("Invalid property name")},U.regexp_eatUnicodePropertyName=function(e){var n=0;for(e.lastStringValue="";$_(n=e.current());)e.lastStringValue+=Be(n),e.advance();return e.lastStringValue!==""},U.regexp_eatUnicodePropertyValue=function(e){var n=0;for(e.lastStringValue="";Nh(n=e.current());)e.lastStringValue+=Be(n),e.advance();return e.lastStringValue!==""},U.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},U.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},U.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var t=e.lastIntValue;!e.switchU||n!==-1&&t!==-1||e.raise("Invalid character class"),n!==-1&&t!==-1&&n>t&&e.raise("Range out of order in character class")}}},U.regexp_eatClassAtom=function(e){var n=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var t=e.current();(t===99||w_(t))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=n}var r=e.current();return r!==93&&(e.lastIntValue=r,e.advance(),!0)},U.regexp_eatClassEscape=function(e){var n=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=n}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},U.regexp_eatClassControlLetter=function(e){var n=e.current();return!(!oa(n)&&n!==95)&&(e.lastIntValue=n%32,e.advance(),!0)},U.regexp_eatHexEscapeSequence=function(e){var n=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=n}return!1},U.regexp_eatDecimalDigits=function(e){var n=e.pos,t=0;for(e.lastIntValue=0;oa(t=e.current());)e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();return e.pos!==n},U.regexp_eatHexDigits=function(e){var n=e.pos,t=0;for(e.lastIntValue=0;E_(t=e.current());)e.lastIntValue=16*e.lastIntValue+C_(t),e.advance();return e.pos!==n},U.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;n<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*n+8*t+e.lastIntValue:e.lastIntValue=8*n+t}else e.lastIntValue=n;return!0}return!1},U.regexp_eatOctalDigit=function(e){var n=e.current();return w_(n)?(e.lastIntValue=n-48,e.advance(),!0):(e.lastIntValue=0,!1)},U.regexp_eatFixedHexDigits=function(e,n){var t=e.pos;e.lastIntValue=0;for(var r=0;r=this.input.length?this.finishToken(m.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Y.readToken=function(e){return le(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},Y.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var n=this.input.charCodeAt(this.pos+1);return n<=56319||n>=57344?e:(e<<10)+n-56613888},Y.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),n=this.pos,t=this.input.indexOf("*/",this.pos+=2);if(t===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=t+2,this.options.locations)for(var r=void 0,a=n;(r=i_(this.input,a,this.pos))>-1;)++this.curLine,a=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,t),n,this.pos,e,this.curPosition())},Y.skipLineComment=function(e){for(var n=this.pos,t=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&Yi.test(String.fromCharCode(e))))break n;++this.pos}}},Y.finishToken=function(e,n){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var t=this.type;this.type=e,this.value=n,this.updateContext(t)},Y.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var n=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&n===46?(this.pos+=3,this.finishToken(m.ellipsis)):(++this.pos,this.finishToken(m.dot))},Y.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(m.assign,2):this.finishOp(m.slash,1)},Y.readToken_mult_modulo_exp=function(e){var n=this.input.charCodeAt(this.pos+1),t=1,r=e===42?m.star:m.modulo;return this.options.ecmaVersion>=7&&e===42&&n===42&&(++t,r=m.starstar,n=this.input.charCodeAt(this.pos+2)),n===61?this.finishOp(m.assign,t+1):this.finishOp(r,t)},Y.readToken_pipe_amp=function(e){var n=this.input.charCodeAt(this.pos+1);return n===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(m.assign,3):this.finishOp(e===124?m.logicalOR:m.logicalAND,2):n===61?this.finishOp(m.assign,2):this.finishOp(e===124?m.bitwiseOR:m.bitwiseAND,1)},Y.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(m.assign,2):this.finishOp(m.bitwiseXOR,1)},Y.readToken_plus_min=function(e){var n=this.input.charCodeAt(this.pos+1);return n===e?n!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!Un.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(m.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):n===61?this.finishOp(m.assign,2):this.finishOp(m.plusMin,1)},Y.readToken_lt_gt=function(e){var n=this.input.charCodeAt(this.pos+1),t=1;return n===e?(t=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+t)===61?this.finishOp(m.assign,t+1):this.finishOp(m.bitShift,t)):n!==33||e!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(n===61&&(t=2),this.finishOp(m.relational,t)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Y.readToken_eq_excl=function(e){var n=this.input.charCodeAt(this.pos+1);return n===61?this.finishOp(m.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&n===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(m.arrow)):this.finishOp(e===61?m.eq:m.prefix,1)},Y.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var n=this.input.charCodeAt(this.pos+1);if(n===46){var t=this.input.charCodeAt(this.pos+2);if(t<48||t>57)return this.finishOp(m.questionDot,2)}if(n===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(m.assign,3):this.finishOp(m.coalesce,2)}return this.finishOp(m.question,1)},Y.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,le(e=this.fullCharCodeAtPos(),!0)||e===92))return this.finishToken(m.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Be(e)+"'")},Y.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(m.parenL);case 41:return++this.pos,this.finishToken(m.parenR);case 59:return++this.pos,this.finishToken(m.semi);case 44:return++this.pos,this.finishToken(m.comma);case 91:return++this.pos,this.finishToken(m.bracketL);case 93:return++this.pos,this.finishToken(m.bracketR);case 123:return++this.pos,this.finishToken(m.braceL);case 125:return++this.pos,this.finishToken(m.braceR);case 58:return++this.pos,this.finishToken(m.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(m.backQuote);case 48:var n=this.input.charCodeAt(this.pos+1);if(n===120||n===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(n===111||n===79)return this.readRadixNumber(8);if(n===98||n===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(m.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Be(e)+"'")},Y.finishOp=function(e,n){var t=this.input.slice(this.pos,this.pos+n);return this.pos+=n,this.finishToken(e,t)},Y.readRegexp=function(){for(var e,n,t=this.pos;;){this.pos>=this.input.length&&this.raise(t,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Un.test(r)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if(r==="[")n=!0;else if(r==="]"&&n)n=!1;else if(r==="/"&&!n)break;e=r==="\\"}++this.pos}var a=this.input.slice(t,this.pos);++this.pos;var i=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(i);var o=this.regexpState||(this.regexpState=new ve(this));o.reset(t,a,s),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(a,s)}catch{}return this.finishToken(m.regexp,{pattern:a,flags:s,value:l})},Y.readInt=function(e,n,t){for(var r=this.options.ecmaVersion>=12&&n===void 0,a=t&&this.input.charCodeAt(this.pos)===48,i=this.pos,s=0,o=0,l=0,_=n??1/0;l<_;++l,++this.pos){var u=this.input.charCodeAt(this.pos),f=void 0;if(r&&u===95)a&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),o===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),l===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=u;else{if((f=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;o=u,s=s*e+f}}return r&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===i||n!=null&&this.pos-i!==n?null:s},Y.readRadixNumber=function(e){var n=this.pos;this.pos+=2;var t=this.readInt(e);return t==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(t=A_(this.input.slice(n,this.pos)),++this.pos):le(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(m.num,t)},Y.readNumber=function(e){var n=this.pos;e||this.readInt(10,void 0,!0)!==null||this.raise(n,"Invalid number");var t=this.pos-n>=2&&this.input.charCodeAt(n)===48;t&&this.strict&&this.raise(n,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!t&&!e&&this.options.ecmaVersion>=11&&r===110){var a=A_(this.input.slice(n,this.pos));return++this.pos,le(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(m.num,a)}t&&/[89]/.test(this.input.slice(n,this.pos))&&(t=!1),r!==46||t||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),r!==69&&r!==101||t||((r=this.input.charCodeAt(++this.pos))!==43&&r!==45||++this.pos,this.readInt(10)===null&&this.raise(n,"Invalid number")),le(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i,s=(i=this.input.slice(n,this.pos),t?parseInt(i,8):parseFloat(i.replace(/_/g,"")));return this.finishToken(m.num,s)},Y.readCodePoint=function(){var e;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},Y.readString=function(e){for(var n="",t=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(n+=this.input.slice(t,this.pos),n+=this.readEscapedChar(!1),t=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ke(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return n+=this.input.slice(t,this.pos++),this.finishToken(m.string,n)};var S_={};Y.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==S_)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Y.invalidStringToken=function(e,n){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw S_;this.raise(e,n)},Y.readTmplToken=function(){for(var e="",n=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var t=this.input.charCodeAt(this.pos);if(t===96||t===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==m.template&&this.type!==m.invalidTemplate?(e+=this.input.slice(n,this.pos),this.finishToken(m.template,e)):t===36?(this.pos+=2,this.finishToken(m.dollarBraceL)):(++this.pos,this.finishToken(m.backQuote));if(t===92)e+=this.input.slice(n,this.pos),e+=this.readEscapedChar(!0),n=this.pos;else if(Ke(t)){switch(e+=this.input.slice(n,this.pos),++this.pos,t){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
+`;break;default:e+=String.fromCharCode(t)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),n=this.pos}else++this.pos}},Y.readInvalidTemplateToken=function(){for(;this.pos=48&&n<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(r,8);return a>255&&(r=r.slice(0,-1),a=parseInt(r,8)),this.pos+=r.length-1,n=this.input.charCodeAt(this.pos),r==="0"&&n!==56&&n!==57||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return Ke(n)?"":String.fromCharCode(n)}},Y.readHexChar=function(e){var n=this.pos,t=this.readInt(16,e);return t===null&&this.invalidStringToken(n,"Bad character escape sequence"),t},Y.readWord1=function(){this.containsEsc=!1;for(var e="",n=!0,t=this.pos,r=this.options.ecmaVersion>=6;this.pos()=>M(function(n){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${n}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Cn("plugin-development/#a-simple-example")}}(e)),jh=_a("fs.mkdir"),Th=_a("fs.readFile"),Dh=_a("fs.writeFile");async function I_(e,n,t,r,a,i,s,o,l){const _=await function(u,f,d,h,b,p,v,y){let $=null,g=null;if(b){$=new Set;for(const x of b)u===x.source&&f===x.importer&&$.add(x.plugin);g=(x,k)=>({...x,resolve:(A,S,{assertions:I,custom:E,isEntry:B,skipSelf:R}=Bn)=>h(A,S,E,B,I||Fn,R?[...b,{importer:S,plugin:k,source:A}]:b)})}return d.hookFirstAndGetPlugin("resolveId",[u,f,{assertions:y,custom:p,isEntry:v}],g,$)}(e,n,r,a,i,s,o,l);return _==null?_a("path.resolve")():_[0]}const is="at position ",ss="at output position ",Oh={delete:()=>!1,get(){},has:()=>!1,set(){}};function ca(e){return e.startsWith(is)||e.startsWith(ss)?M({code:Kd,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):M({code:em,message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const L_=(e,n,t=Fh)=>{const{onwarn:r,onLog:a}=e,i=zh(t,r);if(a){const s=ze[n];return(o,l)=>a(o,N_(l),(_,u)=>{if(_==="error")return M(ce(u));ze[_]>=s&&i(_,ce(u))})}return i},zh=(e,n)=>n?(t,r)=>{t===q?n(N_(r),a=>e(q,ce(a))):e(t,r)}:e,N_=e=>(Object.defineProperty(e,"toString",{value:()=>M_(e),writable:!0}),e),ce=e=>typeof e=="string"?{message:e}:typeof e=="function"?ce(e()):e,M_=e=>{let n="";return e.plugin&&(n+=`(${e.plugin} plugin) `),e.loc&&(n+=`${W(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),n+e.message},Fh=(e,n)=>{const t=M_(n);switch(e){case q:return console.warn(t);case Ct:return console.debug(t);default:return console.info(t)}};function j_(e,n,t,r,a=/$./){const i=new Set(n),s=Object.keys(e).filter(o=>!(i.has(o)||a.test(o)));s.length>0&&r(q,function(o,l,_){return{code:hm,message:`Unknown ${o}: ${l.join(", ")}. Allowed options: ${_.join(", ")}`}}(t,s,[...i].sort()))}const Ph={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:gn,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:gn,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:gn,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Uh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},T_=(e,n,t,r,a)=>{const i=e==null?void 0:e.preset;if(i){const s=n[i];if(s)return{...s,...e};M(bn(`${t}.preset`,r,`valid values are ${de(Object.keys(n))}`,i))}return((s,o,l,_)=>u=>{if(typeof u=="string"){const f=s[u];if(f)return f;M(bn(o,l,`valid values are ${_}${de(Object.keys(s))}. You can also supply an object for more fine-grained control`,u))}return(f=>f&&typeof f=="object"?f:{})(u)})(n,t,r,a)(e)},ua=async e=>(await async function(n){do n=(await Promise.all(n)).flat(1/0);while(n.some(t=>t==null?void 0:t.then));return n}([e])).filter(Boolean);async function Rh(e,n,t,r){const a=n.id,i=[];let s=e.map===null?null:Wi(e.map);const o=e.code;let l=e.ast;const _=[],u=[];let f=!1;const d=()=>f=!0;let h="";const b=e.code,p=y=>($,g)=>{$=ce($),g&&yr($,g,b,a),$.id=a,$.hook="transform",y($)};let v;try{v=await t.hookReduceArg0("transform",[b,a],function(y,$,g){let x,k;if(typeof $=="string")x=$;else{if(!$||typeof $!="object")return y;if(n.updateOptions($),$.code==null)return($.map||$.ast)&&r(q,function(A){return{code:dm,message:`The plugin "${A}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(g.name)),y;({code:x,map:k,ast:l}=$)}return k!==null&&i.push(Wi(typeof k=="string"?JSON.parse(k):k)||{missing:!0,plugin:g.name}),x},(y,$)=>{return h=$.name,{...y,addWatchFile(k){_.push(k),y.addWatchFile(k)},cache:f?y.cache:(g=y.cache,x=d,{delete:k=>(x(),g.delete(k)),get:k=>(x(),g.get(k)),has:k=>(x(),g.has(k)),set:(k,A)=>(x(),g.set(k,A))}),debug:p(y.debug),emitFile:k=>(u.push(k),t.emitFile(k)),error:(k,A)=>(typeof k=="string"&&(k={message:k}),A&&yr(k,A,b,a),k.id=a,k.hook="transform",y.error(k)),getCombinedSourcemap(){const k=function(A,S,I,E,B){return E.length===0?I:{version:3,...Vl(A,S,I,E,Rl(B)).traceMappings()}}(a,o,s,i,r);return k?(s!==k&&(s=k,i.length=0),new dr({...k,file:null,sourcesContent:k.sourcesContent})):new Me(o).generateMap({hires:!0,includeContent:!0,source:a})},info:p(y.info),setAssetSource(){return this.error({code:om,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:p(y.warn)};var g,x})}catch(y){return M(At(y,h,{hook:"transform",id:a}))}return!f&&u.length>0&&(n.transformFiles=u),{ast:l,code:v,customTransformCache:f,originalCode:o,originalSourcemap:s,sourcemapChain:i,transformDependencies:_}}const os="resolveDependencies";class Vh{constructor(n,t,r,a){this.graph=n,this.modulesById=t,this.options=r,this.pluginDriver=a,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(i,s,o,l,_,u=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(i,s,!1)&&await I_(i,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,u,o,typeof l=="boolean"?l:!s,_),s,i),_),this.hasModuleSideEffects=r.treeshake?r.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(n){const t=this.extendLoadModulesPromise(Promise.all(n.map(r=>this.loadEntryModule(r,!1,void 0,null))));return await this.awaitLoadModulesPromise(),t}async addEntryModules(n,t){const r=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=n.length;const a=this.nextChunkNamePriority;this.nextChunkNamePriority+=n.length;const i=await this.extendLoadModulesPromise(Promise.all(n.map(({id:s,importer:o})=>this.loadEntryModule(s,!0,o,null))).then(s=>{for(const[o,l]of s.entries()){l.isUserDefinedEntryPoint=l.isUserDefinedEntryPoint||t,O_(l,n[o],t,a+o);const _=this.indexedEntryModules.find(u=>u.module===l);_?_.index=Math.min(_.index,r+o):this.indexedEntryModules.push({index:r+o,module:l})}return this.indexedEntryModules.sort(({index:o},{index:l})=>o>l?1:-1),s}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:s})=>s),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:n,id:t,importer:r,name:a,implicitlyLoadedAfterOneOf:i,preserveSignature:s}){const o={fileName:n||null,id:t,importer:r,name:a||null},l=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return s!=null&&(l.preserveSignature=s),l}async preloadModule(n){return(await this.fetchModule(this.getResolvedIdWithDefaults(n,Fn),void 0,!1,!n.resolveDependencies||os)).info}addEntryWithImplicitDependants(n,t){const r=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(n.id,!1,n.importer,null).then(async a=>{if(O_(a,n,!1,r),!a.info.isEntry){this.implicitEntryModules.add(a);const i=await Promise.all(t.map(s=>this.loadEntryModule(s,!1,n.importer,a.id)));for(const s of i)a.implicitlyLoadedAfter.add(s);for(const s of a.implicitlyLoadedAfter)s.implicitlyLoadedBefore.add(a)}return a}))}async addModuleSource(n,t,r){let a;try{a=await this.graph.fileOperationQueue.run(async()=>await this.pluginDriver.hookFirst("load",[n])??await Th(n,"utf8"))}catch(o){let l=`Could not load ${n}`;throw t&&(l+=` (imported by ${W(t)})`),l+=`: ${o.message}`,o.message=l,o}const i=typeof a=="string"?{code:a}:a!=null&&typeof a=="object"&&typeof a.code=="string"?a:M(function(o){return{code:"BAD_LOADER",message:`Error loading "${W(o)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(n)),s=this.graph.cachedModules.get(n);if(!s||s.customTransformCache||s.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:s.ast,code:s.code,id:s.id,meta:s.meta,moduleSideEffects:s.moduleSideEffects,resolvedSources:s.resolvedIds,syntheticNamedExports:s.syntheticNamedExports}]))r.updateOptions(i),r.setSource(await Rh(i,r,this.pluginDriver,this.options.onLog));else{if(s.transformFiles)for(const o of s.transformFiles)this.pluginDriver.emitFile(o);r.setSource(s)}}async awaitLoadModulesPromise(){let n;do n=this.latestLoadModulesPromise,await n;while(n!==this.latestLoadModulesPromise)}extendLoadModulesPromise(n){return this.latestLoadModulesPromise=Promise.all([n,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch(()=>{}),n}async fetchDynamicDependencies(n,t){const r=await Promise.all(t.map(a=>a.then(async([i,s])=>s===null?null:typeof s=="string"?(i.resolution=s,null):i.resolution=await this.fetchResolvedDependency(W(s.id),n.id,s))));for(const a of r)a&&(n.dynamicDependencies.add(a),a.dynamicImporters.push(n.id))}async fetchModule({assertions:n,id:t,meta:r,moduleSideEffects:a,syntheticNamedExports:i},s,o,l){const _=this.modulesById.get(t);if(_ instanceof hn)return s&&Xr(n,_.info.assertions)&&this.options.onLog(q,xr(_.info.assertions,n,t,s)),await this.handleExistingModule(_,o,l),_;const u=new hn(this.graph,t,this.options,o,a,i,r,n);this.modulesById.set(t,u),this.graph.watchFiles[t]=!0;const f=this.addModuleSource(t,s,u).then(()=>[this.getResolveStaticDependencyPromises(u),this.getResolveDynamicImportPromises(u),d]),d=z_(f).then(()=>this.pluginDriver.hookParallel("moduleParsed",[u.info]));d.catch(()=>{}),this.moduleLoadPromises.set(u,f);const h=await f;return l?l===os&&await d:await this.fetchModuleDependencies(u,...h),u}async fetchModuleDependencies(n,t,r,a){this.modulesWithLoadedDependencies.has(n)||(this.modulesWithLoadedDependencies.add(n),await Promise.all([this.fetchStaticDependencies(n,t),this.fetchDynamicDependencies(n,r)]),n.linkImports(),await a)}fetchResolvedDependency(n,t,r){if(r.external){const{assertions:a,external:i,id:s,moduleSideEffects:o,meta:l}=r;let _=this.modulesById.get(s);if(_){if(!(_ instanceof fn))return M(function(u,f){return{code:"INVALID_EXTERNAL_ID",message:`"${u}" is imported as an external by "${W(f)}", but is already an existing non-external module id.`}}(n,t));Xr(_.info.assertions,a)&&this.options.onLog(q,xr(_.info.assertions,a,n,t))}else _=new fn(this.options,s,o,l,i!=="absolute"&&be(s),a),this.modulesById.set(s,_);return Promise.resolve(_)}return this.fetchModule(r,t,!1,!1)}async fetchStaticDependencies(n,t){for(const r of await Promise.all(t.map(a=>a.then(([i,s])=>this.fetchResolvedDependency(i,n.id,s)))))n.dependencies.add(r),r.importers.push(n.id);if(!this.options.treeshake||n.info.moduleSideEffects==="no-treeshake")for(const r of n.dependencies)r instanceof hn&&(r.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(n,t,r){const{makeAbsoluteExternalsRelative:a}=this.options;if(n){if(typeof n=="object"){const o=n.external||this.options.external(n.id,t,!0);return{...n,external:o&&(o==="relative"||!be(n.id)||o===!0&&ls(n.id,r,a)||"absolute")}}const s=this.options.external(n,t,!0);return{external:s&&(ls(n,r,a)||"absolute"),id:s&&a?D_(n,t):n}}const i=a?D_(r,t):r;return n===!1||this.options.external(i,t,!0)?{external:ls(i,r,a)||"absolute",id:i}:null}getResolveDynamicImportPromises(n){return n.dynamicImports.map(async t=>{const r=await this.resolveDynamicImport(n,typeof t.argument=="string"?t.argument:t.argument.esTreeNode,n.id,function(a){var o,l,_;const i=(_=(l=(o=a.arguments)==null?void 0:o[0])==null?void 0:l.properties.find(u=>ji(u)==="assert"))==null?void 0:_.value;if(!i)return Fn;const s=i.properties.map(u=>{const f=ji(u);return typeof f=="string"&&typeof u.value.value=="string"?[f,u.value.value]:null}).filter(u=>!!u);return s.length>0?Object.fromEntries(s):Fn}(t.node));return r&&typeof r=="object"&&(t.id=r.id),[t,r]})}getResolveStaticDependencyPromises(n){return Array.from(n.sourcesWithAssertions,async([t,r])=>[t,n.resolvedIds[t]=n.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,n.id,Fn,!1,r),t,n.id,r)])}getResolvedIdWithDefaults(n,t){if(!n)return null;const r=n.external||!1;return{assertions:n.assertions||t,external:r,id:n.id,meta:n.meta||{},moduleSideEffects:n.moduleSideEffects??this.hasModuleSideEffects(n.id,!!r),resolvedBy:n.resolvedBy??"rollup",syntheticNamedExports:n.syntheticNamedExports??!1}}async handleExistingModule(n,t,r){const a=this.moduleLoadPromises.get(n);if(r)return r===os?z_(a):a;if(t){n.info.isEntry=!0,this.implicitEntryModules.delete(n);for(const i of n.implicitlyLoadedAfter)i.implicitlyLoadedBefore.delete(n);n.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(n,...await a)}handleInvalidResolvedId(n,t,r,a){return n===null?Na(t)?M(function(i,s){return{code:Js,exporter:i,id:s,message:`Could not resolve "${i}" from "${W(s)}"`}}(t,r)):(this.options.onLog(q,function(i,s){return{code:Js,exporter:i,id:s,message:`"${i}" is imported by "${W(s)}", but could not be resolved – treating it as an external dependency.`,url:Cn("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,r)),{assertions:a,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(n.external&&n.syntheticNamedExports&&this.options.onLog(q,function(i,s){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:i,message:`External "${i}" cannot have "syntheticNamedExports" enabled (imported by "${W(s)}").`}}(t,r)),n)}async loadEntryModule(n,t,r,a){const i=await I_(n,r,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Fn,!0,Fn);return i==null?M(a===null?function(s){return{code:Ks,message:`Could not resolve entry module "${W(s)}".`}}(n):function(s,o){return{code:Xa,message:`Module "${W(s)}" that should be implicitly loaded before "${W(o)}" could not be resolved.`}}(n,a)):i===!1||typeof i=="object"&&i.external?M(a===null?function(s){return{code:Ks,message:`Entry module "${W(s)}" cannot be external.`}}(n):function(s,o){return{code:Xa,message:`Module "${W(s)}" that should be implicitly loaded before "${W(o)}" cannot be external.`}}(n,a)):this.fetchModule(this.getResolvedIdWithDefaults(typeof i=="object"?i:{id:i},Fn),void 0,t,!1)}async resolveDynamicImport(n,t,r,a){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,r,{assertions:a}]);if(typeof t!="string")return typeof i=="string"?i:i?this.getResolvedIdWithDefaults(i,a):null;if(i==null){const s=n.resolvedIds[t];return s?(Xr(s.assertions,a)&&this.options.onLog(q,xr(s.assertions,a,t,r)),s):n.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,n.id,Fn,!1,a),t,n.id,a)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,r,t),a),t,r,a)}}function D_(e,n){return Na(e)?n?Kn(n,"..",e):Kn(e):e}function O_(e,{fileName:n,name:t},r,a){var i;if(n!==null)e.chunkFileNames.add(n);else if(t!==null){let s=0;for(;((i=e.chunkNames[s])==null?void 0:i.priority)ye(i).slice(1),extname:()=>ye(i),hash:s=>t.slice(0,Math.max(0,s||8)),name:()=>i.slice(0,Math.max(0,i.length-ye(i).length))}),a)}function U_(e,{bundle:n},t){n[Zr].has(e.toLowerCase())?t(q,function(r){return{code:tm,message:`The emitted file "${r}" overwrites a previously emitted file of the same name.`}}(e)):n[e]=Vi}const Gh=new Set(["chunk","asset","prebuilt-chunk"]);function R_(e,n,t){if(!(typeof e=="string"||e instanceof Uint8Array)){const r=n.fileName||n.name||t;return M(jn(`Could not set source for ${typeof r=="string"?`asset "${r}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function Xh(e,n){return typeof e.fileName!="string"?M((t=e.name||n,{code:Jd,message:`Plugin error - Unable to get file name for asset "${t}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var t}function Wh(e,n){return e.fileName?e.fileName:n?n.get(e.module).getFileName():M((t=e.fileName||e.name,{code:Zd,message:`Plugin error - Unable to get file name for emitted chunk "${t}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var t}class Hh{constructor(n,t,r){this.graph=n,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=a=>function(i){return!!(i&&Gh.has(i.type))}(a)?a.type==="prebuilt-chunk"?this.emitPrebuiltChunk(a):function(i){const s=i.fileName||i.name;return!s||typeof s=="string"&&!pr(s)}(a)?a.type==="chunk"?this.emitChunk(a):this.emitAsset(a):M(jn(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${a.fileName||a.name}".`)):M(jn(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${a&&a.type}".`)),this.finaliseAssets=()=>{for(const[a,i]of this.filesByReferenceId)if(i.type==="asset"&&typeof i.fileName!="string")return M({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${i.name||a}" - no asset source set.`})},this.getFileName=a=>{const i=this.filesByReferenceId.get(a);return i?i.type==="chunk"?Wh(i,this.facadeChunkByModule):i.type==="prebuilt-chunk"?i.fileName:Xh(i,a):M({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${a}".`})},this.setAssetSource=(a,i)=>{const s=this.filesByReferenceId.get(a);if(!s)return M({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${a}".`});if(s.type!=="asset")return M(jn(`Asset sources can only be set for emitted assets but "${a}" is an emitted chunk.`));if(s.source!==void 0)return M({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${s.name||a}", source already set.`});const o=R_(i,s,a);if(this.output)this.finalizeAdditionalAsset(s,o,this.output);else{s.source=o;for(const l of this.outputFileEmitters)l.finalizeAdditionalAsset(s,o,l.output)}},this.setChunkInformation=a=>{this.facadeChunkByModule=a},this.setOutputBundle=(a,i)=>{const s=this.output={bundle:a,fileNamesBySource:new Map,outputOptions:i};for(const l of this.filesByReferenceId.values())l.fileName&&U_(l.fileName,s,this.options.onLog);const o=new Map;for(const l of this.filesByReferenceId.values())l.type==="asset"&&l.source!==void 0?l.fileName?this.finalizeAdditionalAsset(l,l.source,s):zn(o,F_(l.source),()=>[]).push(l):l.type==="prebuilt-chunk"&&(this.output.bundle[l.fileName]=this.createPrebuiltChunk(l));for(const[l,_]of o)this.finalizeAssetsWithSameSource(_,l,s)},this.filesByReferenceId=r?new Map(r.filesByReferenceId):new Map,r==null||r.addOutputFileEmitter(this)}addOutputFileEmitter(n){this.outputFileEmitters.push(n)}assignReferenceId(n,t){let r=t;do r=Jt().update(r).digest("hex").slice(0,8);while(this.filesByReferenceId.has(r)||this.outputFileEmitters.some(({filesByReferenceId:a})=>a.has(r)));n.referenceId=r,this.filesByReferenceId.set(r,n);for(const{filesByReferenceId:a}of this.outputFileEmitters)a.set(r,n);return r}createPrebuiltChunk(n){return{code:n.code,dynamicImports:[],exports:n.exports||[],facadeModuleId:null,fileName:n.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:n.map||null,moduleIds:[],modules:{},name:n.fileName,referencedFiles:[],type:"chunk"}}emitAsset(n){const t=n.source===void 0?void 0:R_(n.source,n,null),r={fileName:n.fileName,name:n.name,needsCodeReference:!!n.needsCodeReference,referenceId:"",source:t,type:"asset"},a=this.assignReferenceId(r,n.fileName||n.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(r,this.output);else for(const i of this.outputFileEmitters)i.emitAssetWithReferenceId(r,i.output);return a}emitAssetWithReferenceId(n,t){const{fileName:r,source:a}=n;r&&U_(r,t,this.options.onLog),a!==void 0&&this.finalizeAdditionalAsset(n,a,t)}emitChunk(n){if(this.graph.phase>Ae.LOAD_AND_PARSE)return M({code:Gs,message:"Cannot emit chunks after module loading has finished."});if(typeof n.id!="string")return M(jn(`Emitted chunks need to have a valid string id, received "${n.id}"`));const t={fileName:n.fileName,module:null,name:n.name||n.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(n).then(r=>t.module=r).catch(()=>{}),this.assignReferenceId(t,n.id)}emitPrebuiltChunk(n){if(typeof n.code!="string")return M(jn(`Emitted prebuilt chunks need to have a valid string code, received "${n.code}".`));if(typeof n.fileName!="string"||pr(n.fileName))return M(jn(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${n.fileName}".`));const t={code:n.code,exports:n.exports,fileName:n.fileName,map:n.map,referenceId:"",type:"prebuilt-chunk"},r=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),r}finalizeAdditionalAsset(n,t,{bundle:r,fileNamesBySource:a,outputOptions:i}){let{fileName:s,needsCodeReference:o,referenceId:l}=n;if(!s){const f=F_(t);s=a.get(f),s||(s=P_(n.name,t,f,i,r),a.set(f,s))}const _={...n,fileName:s,source:t};this.filesByReferenceId.set(l,_);const u=r[s];(u==null?void 0:u.type)==="asset"?u.needsCodeReference&&(u.needsCodeReference=o):r[s]={fileName:s,name:n.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(n,t,{bundle:r,fileNamesBySource:a,outputOptions:i}){let s,o="",l=!0;for(const _ of n){l&&(l=_.needsCodeReference);const u=P_(_.name,_.source,t,i,r);(!o||u.length{s!=null&&t(q,{code:im,message:`Plugin "${r}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=ce(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=n,i.plugin=r,t(e,i)}}function Kh(e,n,t,r,a,i){const{logLevel:s,onLog:o}=r;let l,_=!0;if(typeof e.cacheKey!="string"&&(e.name.startsWith(is)||e.name.startsWith(ss)||i.has(e.name)?_=!1:i.add(e.name)),n)if(_){const d=e.cacheKey||e.name;f=n[d]||(n[d]=Object.create(null)),l={delete:h=>delete f[h],get(h){const b=f[h];if(b)return b[0]=0,b[1]},has(h){const b=f[h];return!!b&&(b[0]=0,!0)},set(h,b){f[h]=[0,b]}}}else u=e.name,l={delete:()=>ca(u),get:()=>ca(u),has:()=>ca(u),set:()=>ca(u)};else l=Oh;var u,f;return{addWatchFile(d){if(t.phase>=Ae.GENERATE)return this.error({code:Gs,message:'Cannot call "addWatchFile" after the build has finished.'});t.watchFiles[d]=!0},cache:l,debug:pt(Ct,"PLUGIN_LOG",o,e.name,s),emitFile:a.emitFile.bind(a),error:d=>M(At(ce(d),e.name)),getFileName:a.getFileName,getModuleIds:()=>t.modulesById.keys(),getModuleInfo:t.getModuleInfo,getWatchFiles:()=>Object.keys(t.watchFiles),info:pt(Oe,"PLUGIN_LOG",o,e.name,s),load:d=>t.moduleLoader.preloadModule(d),meta:{rollupVersion:Ia,watchMode:t.watchMode},get moduleIds(){const d=t.modulesById.keys();return function*(){Fe(`Accessing "this.moduleIds" on the plugin context by plugin ${e.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,"plugin-development/#this-getmoduleids",!0,r,e.name),yield*d}()},parse:t.contextParse.bind(t),resolve:(d,h,{assertions:b,custom:p,isEntry:v,skipSelf:y}=Bn)=>t.moduleLoader.resolveId(d,h,p,v,b||Fn,y?[{importer:h,plugin:e,source:d}]:null),setAssetSource:a.setAssetSource,warn:pt(q,"PLUGIN_WARNING",o,e.name,s)}}const Jh=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class _s{constructor(n,t,r,a,i){this.graph=n,this.options=t,this.pluginCache=a,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new Hh(n,t,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...r];const s=new Set;if(this.pluginContexts=new Map(this.plugins.map(l=>[l,Kh(l,a,n,t,this.fileEmitter,s)])),i)for(const l of r)for(const _ of Jh)_ in l&&t.onLog(q,(o=l.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${_}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(n){return new _s(this.graph,this.options,n,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(n,t,r,a){return this.hookFirstAndGetPlugin(n,t,r,a).then(i=>i&&i[0])}async hookFirstAndGetPlugin(n,t,r,a){for(const i of this.getSortedPlugins(n)){if(a!=null&&a.has(i))continue;const s=await this.runHook(n,t,i,r);if(s!=null)return[s,i]}return null}hookFirstSync(n,t,r){for(const a of this.getSortedPlugins(n)){const i=this.runHookSync(n,t,a,r);if(i!=null)return i}return null}async hookParallel(n,t,r){const a=[];for(const i of this.getSortedPlugins(n))i[n].sequential?(await Promise.all(a),a.length=0,await this.runHook(n,t,i,r)):a.push(this.runHook(n,t,i,r));await Promise.all(a)}hookReduceArg0(n,[t,...r],a,i){let s=Promise.resolve(t);for(const o of this.getSortedPlugins(n))s=s.then(l=>this.runHook(n,[l,...r],o,i).then(_=>a.call(this.pluginContexts.get(o),l,_,o)));return s}hookReduceArg0Sync(n,[t,...r],a,i){for(const s of this.getSortedPlugins(n)){const o=[t,...r],l=this.runHookSync(n,o,s,i);t=a.call(this.pluginContexts.get(s),t,l,s)}return t}async hookReduceValue(n,t,r,a){const i=[],s=[];for(const o of this.getSortedPlugins(n,Zh))o[n].sequential?(i.push(...await Promise.all(s)),s.length=0,i.push(await this.runHook(n,r,o))):s.push(this.runHook(n,r,o));return i.push(...await Promise.all(s)),i.reduce(a,await t)}hookReduceValueSync(n,t,r,a,i){let s=t;for(const o of this.getSortedPlugins(n)){const l=this.runHookSync(n,r,o,i);s=a.call(this.pluginContexts.get(o),s,l,o)}return s}hookSeq(n,t,r){let a=Promise.resolve();for(const i of this.getSortedPlugins(n))a=a.then(()=>this.runHook(n,t,i,r));return a.then(Qh)}getSortedPlugins(n,t){return zn(this.sortedPlugins,n,()=>cs(n,this.plugins,t))}runHook(n,t,r,a){const i=r[n],s=typeof i=="object"?i.handler:i;let o=this.pluginContexts.get(r);a&&(o=a(o,r));let l=null;return Promise.resolve().then(()=>{if(typeof s!="function")return s;const _=s.apply(o,t);return _!=null&&_.then?(l=[r.name,n,t],this.unfulfilledActions.add(l),Promise.resolve(_).then(u=>(this.unfulfilledActions.delete(l),u))):_}).catch(_=>(l!==null&&this.unfulfilledActions.delete(l),M(At(_,r.name,{hook:n}))))}runHookSync(n,t,r,a){const i=r[n],s=typeof i=="object"?i.handler:i;let o=this.pluginContexts.get(r);a&&(o=a(o,r));try{return s.apply(o,t)}catch(l){return M(At(l,r.name,{hook:n}))}}}function cs(e,n,t=Yh){const r=[],a=[],i=[];for(const s of n){const o=s[e];if(o){if(typeof o=="object"){if(t(o.handler,e,s),o.order==="pre"){r.push(s);continue}if(o.order==="post"){i.push(s);continue}}else t(o,e,s);a.push(s)}}return[...r,...a,...i]}function Yh(e,n,t){typeof e!="function"&&M(function(r,a){return{code:qs,hook:r,message:`Error running plugin hook "${r}" for plugin "${a}", expected a function hook or an object with a "handler" function.`,plugin:a}}(n,t.name))}function Zh(e,n,t){if(typeof e!="string"&&typeof e!="function")return M(function(r,a){return{code:qs,hook:r,message:`Error running plugin hook "${r}" for plugin "${a}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:a}}(n,t.name))}function Qh(){}class nv{constructor(n){this.maxParallel=n,this.queue=[],this.workerCount=0}run(n){return new Promise((t,r)=>{this.queue.push({reject:r,resolve:t,task:n}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let n;for(this.workerCount++;n=this.queue.shift();){const{reject:t,resolve:r,task:a}=n;try{r(await a())}catch(i){t(i)}}this.workerCount--}}class ev{constructor(n,t){var r,a;if(this.options=n,this.astLru=function(i){var s,o,l,_=i||1;function u(d,h){++s>_&&(l=o,f(1),++s),o[d]=h}function f(d){s=0,o=Object.create(null),d||(l=Object.create(null))}return f(),{clear:f,has:function(d){return o[d]!==void 0||l[d]!==void 0},get:function(d){var h=o[d];return h!==void 0?h:(h=l[d])!==void 0?(u(d,h),h):void 0},set:function(d,h){o[d]!==void 0?o[d]=h:u(d,h)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new rt,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=Ae.LOAD_AND_PARSE,this.scope=new qh,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=i=>{const s=this.modulesById.get(i);return s?s.info:null},n.cache!==!1){if((r=n.cache)!=null&&r.modules)for(const i of n.cache.modules)this.cachedModules.set(i.id,i);this.pluginCache=((a=n.cache)==null?void 0:a.plugins)||Object.create(null);for(const i in this.pluginCache){const s=this.pluginCache[i];for(const o of Object.values(s))o[0]++}}if(t){this.watchMode=!0;const i=(...o)=>this.pluginDriver.hookParallel("watchChange",o),s=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",i),t.onCurrentRun("close",s)}this.pluginDriver=new _s(this,n,n.plugins,this.pluginCache),this.acornParser=mn.extend(...n.acornInjectPlugins),this.moduleLoader=new Vh(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new nv(n.maxParallelFileOps),this.pureFunctions=(({treeshake:i})=>{const s=Object.create(null);for(const o of i?i.manualPureFunctions:[]){let l=s;for(const _ of o.split("."))l=l[_]||(l[_]=Object.create(null));l[si]=!0}return s})(n)}async build(){kn("generate module graph",2),await this.generateModuleGraph(),yn("generate module graph",2),kn("sort and bind modules",2),this.phase=Ae.ANALYSE,this.sortModules(),yn("sort and bind modules",2),kn("mark included statements",2),this.includeStatements(),yn("mark included statements",2),this.phase=Ae.GENERATE}contextParse(n,t={}){const r=t.onComment,a=[];t.onComment=r&&typeof r=="function"?(s,o,l,_,...u)=>(a.push({end:_,start:l,type:s?"Block":"Line",value:o}),r.call(t,s,o,l,_,...u)):a;const i=this.acornParser.parse(n,{...this.options.acorn,...t});return typeof r=="object"&&r.push(...a),t.onComment=r,function(s,o,l){const _=[],u=[];for(const f of s){for(const[d,h]of Pm)h.test(f.value)&&_.push({...f,annotationType:d});Om.test(f.value)&&u.push(f)}for(const f of u)Ar(o,f,!1);co(o,{annotationIndex:0,annotations:_,code:l})}(a,i,n),i}getCache(){for(const n in this.pluginCache){const t=this.pluginCache[n];let r=!0;for(const[a,i]of Object.entries(t))i[0]>=this.options.experimentalCacheExpiry?delete t[a]:r=!1;r&&delete this.pluginCache[n]}return{modules:this.modules.map(n=>n.toJSON()),plugins:this.pluginCache}}async generateModuleGraph(){var n;if({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((n=this.options.input,Array.isArray(n)?n.map(t=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(n).map(([t,r])=>({fileName:null,id:r,implicitlyLoadedAfter:[],importer:void 0,name:t}))),!0),this.entryModules.length===0)throw new Error("You must supply options.input to rollup");for(const t of this.modulesById.values())t instanceof hn?this.modules.push(t):this.externalModules.push(t)}includeStatements(){const n=[...this.entryModules,...this.implicitEntryModules];for(const t of n)Ht(t);if(this.options.treeshake){let t=1;do{kn(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const r of this.modules)r.isExecuted&&(r.info.moduleSideEffects==="no-treeshake"?r.includeAllInBundle():r.include());if(t===1)for(const r of n)r.preserveSignature!==!1&&(r.includeAllExports(!1),this.needsTreeshakingPass=!0);yn("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const t of this.modules)t.includeAllInBundle();for(const t of this.externalModules)t.warnUnusedImports();for(const t of this.implicitEntryModules)for(const r of t.implicitlyLoadedAfter)r.info.isEntry||r.isIncluded()||M(xm(r))}sortModules(){const{orderedModules:n,cyclePaths:t}=function(r){let a=0;const i=[],s=new Set,o=new Set,l=new Map,_=[],u=f=>{if(f instanceof hn){for(const d of f.dependencies)l.has(d)?s.has(d)||i.push(Xp(d,f,l)):(l.set(d,f),u(d));for(const d of f.implicitlyLoadedBefore)o.add(d);for(const{resolution:d}of f.dynamicImports)d instanceof hn&&o.add(d);_.push(f)}f.execIndex=a++,s.add(f)};for(const f of r)l.has(f)||(l.set(f,null),u(f));for(const f of o)l.has(f)||(l.set(f,null),u(f));return{cyclePaths:i,orderedModules:_}}(this.entryModules);for(const r of t)this.options.onLog(q,bm(r));this.modules=n;for(const r of this.modules)r.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const n of this.modules)for(const t of n.importDescriptions.values())t.name==="*"||t.module.getVariableForExportName(t.name)[0]||n.log(q,kr(t.name,n.id,t.module.id),t.start)}}function V_(e,n){return n()}function q_(e,n,t,r){e=cs("onLog",e);const a=ze[r],i=(s,o,l=Ts)=>{if(!(ze[s]ze[d]i(d,ce(h),new Set(l).add(_));if(("handler"in u?u.handler:u).call({debug:f(Ct),error:d=>M(ce(d)),info:f(Oe),meta:{rollupVersion:Ia,watchMode:t},warn:f(q)},s,o)===!1)return}n(s,o)}};return i}const tv="{".charCodeAt(0),rv=" ".charCodeAt(0),G_="assert";function av(e){const n=e.acorn||Mh,{tokTypes:t,TokenType:r}=n;return class extends e{constructor(...a){super(...a),this.assertToken=new r(G_)}_codeAt(a){return this.input.charCodeAt(a)}_eat(a){this.type!==a&&this.unexpected(),this.next()}readToken(a){let i=0;for(;i<6;i++)if(this._codeAt(this.pos+i)!==G_.charCodeAt(i))return super.readToken(a);for(;this._codeAt(this.pos+i)!==tv;i++)if(this._codeAt(this.pos+i)!==rv)return super.readToken(a);return this.type.label==="{"?super.readToken(a):(this.pos+=6,this.finishToken(this.assertToken))}parseDynamicImport(a){if(this.next(),a.source=this.parseMaybeAssign(),this.eat(t.comma)){const i=this.parseObj(!1);a.arguments=[i]}return this._eat(t.parenR),this.finishNode(a,"ImportExpression")}parseExport(a,i){if(this.next(),this.eat(t.star)){if(this.options.ecmaVersion>=11&&(this.eatContextual("as")?(a.exported=this.parseIdent(!0),this.checkExport(i,a.exported.name,this.lastTokStart)):a.exported=null),this.expectContextual("from"),this.type!==t.string&&this.unexpected(),a.source=this.parseExprAtom(),this.type===this.assertToken||this.type===t._with){this.next();const d=this.parseImportAssertions();d&&(a.assertions=d)}return this.semicolon(),this.finishNode(a,"ExportAllDeclaration")}if(this.eat(t._default)){var s;if(this.checkExport(i,"default",this.lastTokStart),this.type===t._function||(s=this.isAsyncFunction())){var o=this.startNode();this.next(),s&&this.next(),a.declaration=this.parseFunction(o,5,!1,s)}else if(this.type===t._class){var l=this.startNode();a.declaration=this.parseClass(l,"nullableID")}else a.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(a,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())a.declaration=this.parseStatement(null),a.declaration.type==="VariableDeclaration"?this.checkVariableExport(i,a.declaration.declarations):this.checkExport(i,a.declaration.id.name,a.declaration.id.start),a.specifiers=[],a.source=null;else{if(a.declaration=null,a.specifiers=this.parseExportSpecifiers(i),this.eatContextual("from")){if(this.type!==t.string&&this.unexpected(),a.source=this.parseExprAtom(),this.type===this.assertToken||this.type===t._with){this.next();const d=this.parseImportAssertions();d&&(a.assertions=d)}}else{for(var _=0,u=a.specifiers;_({ecmaVersion:"latest",sourceType:"module",...e.acorn}),sv=e=>[av,...X_(e.acornInjectPlugins)],ov=e=>{var n;return e.cache===!0?void 0:((n=e.cache)==null?void 0:n.cache)||e.cache},lv=e=>{if(e===!0)return()=>!0;if(typeof e=="function")return(n,...t)=>!n.startsWith("\0")&&e(n,...t)||!1;if(e){const n=new Set,t=[];for(const r of X_(e))r instanceof RegExp?t.push(r):n.add(r);return(r,...a)=>n.has(r)||t.some(i=>i.test(r))}return()=>!1},_v=(e,n,t)=>{const r=e.inlineDynamicImports;return r&&St('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',Va,!0,n,t),r},cv=e=>{const n=e.input;return n==null?[]:typeof n=="string"?[n]:n},uv=(e,n,t)=>{const r=e.manualChunks;return r&&St('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',Ga,!0,n,t),r},fv=(e,n,t)=>{const r=e.maxParallelFileReads;typeof r=="number"&&St('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',"configuration-options/#maxparallelfileops",!0,n,t);const a=e.maxParallelFileOps??r;return typeof a=="number"?a<=0?1/0:a:20},dv=(e,n)=>{const t=e.moduleContext;if(typeof t=="function")return r=>t(r)??n;if(t){const r=Object.create(null);for(const[a,i]of Object.entries(t))r[Kn(a)]=i;return a=>r[a]??n}return()=>n},mv=(e,n,t)=>{const r=e.preserveModules;return r&&St('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',"configuration-options/#output-preservemodules",!0,n,t),r},pv=e=>{if(e.treeshake===!1)return!1;const n=T_(e.treeshake,Ph,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:n.annotations!==!1,correctVarValueBeforeDeclaration:n.correctVarValueBeforeDeclaration===!0,manualPureFunctions:n.manualPureFunctions??gn,moduleSideEffects:hv(n.moduleSideEffects),propertyReadSideEffects:n.propertyReadSideEffects==="always"?"always":n.propertyReadSideEffects!==!1,tryCatchDeoptimization:n.tryCatchDeoptimization!==!1,unknownGlobalSideEffects:n.unknownGlobalSideEffects!==!1}},hv=e=>{if(typeof e=="boolean")return()=>e;if(e==="no-external")return(n,t)=>!t;if(typeof e=="function")return(n,t)=>!!n.startsWith("\0")||e(n,t)!==!1;if(Array.isArray(e)){const n=new Set(e);return t=>n.has(t)}return e&&M(bn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},vv=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,gv=/^[a-z]:/i;function bv(e){const n=gv.exec(e),t=n?n[0]:"";return t+e.slice(t.length).replace(vv,"_")}const yv=(e,n,t)=>{const{file:r}=e;if(typeof r=="string"){if(n)return M(bn("output.file",wt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(t.input))return M(bn("output.file",wt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return r},xv=e=>{const n=e.format;switch(n){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return n;default:return M(bn("output.format",Ps,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',n))}},kv=(e,n)=>{const t=(e.inlineDynamicImports??n.inlineDynamicImports)||!1,{input:r}=n;return t&&(Array.isArray(r)?r:Object.keys(r)).length>1?M(bn("output.inlineDynamicImports",Va,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):t},$v=(e,n,t)=>{const r=(e.preserveModules??t.preserveModules)||!1;if(r){if(n)return M(bn("output.inlineDynamicImports",Va,'this option is not supported for "output.preserveModules"'));if(t.preserveEntrySignatures===!1)return M(bn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return r},Ev=(e,n)=>{const t=e.preferConst;return t!=null&&Fe('The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.',"configuration-options/#output-generatedcode-constbindings",!0,n),!!t},Cv=e=>{const{preserveModulesRoot:n}=e;if(n!=null)return Kn(n)},wv=e=>{const n={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(n.autoId||n.basePath)&&n.id?M(bn("output.amd.id",Fs,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):n.basePath&&!n.autoId?M(bn("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):n.autoId?{autoId:!0,basePath:n.basePath,define:n.define,forceJsExtensionForImports:n.forceJsExtensionForImports}:{autoId:!1,define:n.define,forceJsExtensionForImports:n.forceJsExtensionForImports,id:n.id}},fa=(e,n)=>{const t=e[n];return typeof t=="function"?t:()=>t||""},Av=(e,n)=>{const{dir:t}=e;return typeof t=="string"&&typeof n=="string"?M(bn("output.dir",wt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):t},Sv=(e,n,t)=>{const r=e.dynamicImportFunction;return r&&(Fe('The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.',"plugin-development/#renderdynamicimport",!0,n),t!=="es"&&n.onLog(q,bn("output.dynamicImportFunction","configuration-options/#output-dynamicimportfunction",'this option is ignored for formats other than "es"'))),r},Bv=(e,n)=>{const t=e.entryFileNames;return t==null&&n.add("entryFileNames"),t??"[name].js"};function Iv(e,n){const t=e.experimentalDeepDynamicChunkOptimization;return t!=null&&Fe('The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.',qd,!0,n),t||!1}function Lv(e,n){const t=e.exports;if(t==null)n.add("exports");else if(!["default","named","none","auto"].includes(t))return M({code:Vs,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${t}".`,url:Cn(Ra)});return t||"auto"}const Nv=(e,n)=>{const t=T_(e.generatedCode,Uh,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:t.arrowFunctions===!0,constBindings:t.constBindings===!0||n,objectShorthand:t.objectShorthand===!0,reservedNamesAsProps:t.reservedNamesAsProps!==!1,symbols:t.symbols===!0}},Mv=(e,n)=>{if(n)return"";const t=e.indent;return t===!1?"":t??!0},W_=new Set(["compat","auto","esModule","default","defaultOnly"]),jv=e=>{const n=e.interop;if(typeof n=="function"){const t=Object.create(null);let r=null;return a=>a===null?r||us(r=n(a)):a in t?t[a]:us(t[a]=n(a))}return n===void 0?()=>"default":()=>us(n)},us=e=>W_.has(e)?e:M(bn("output.interop",qa,`use one of ${Array.from(W_,n=>JSON.stringify(n)).join(", ")}`,e)),Tv=(e,n,t,r)=>{const a=e.manualChunks||r.manualChunks;if(a){if(n)return M(bn("output.manualChunks",Ga,'this option is not supported for "output.inlineDynamicImports"'));if(t)return M(bn("output.manualChunks",Ga,'this option is not supported for "output.preserveModules"'))}return a||{}},Dv=(e,n,t)=>e.minifyInternalExports??(t||n==="es"||n==="system"),Ov=(e,n,t)=>{const r=e.namespaceToStringTag;return r!=null?(Fe('The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.',"configuration-options/#output-generatedcode-symbols",!0,t),r):n.symbols||!1},zv=e=>{const{sourcemapBaseUrl:n}=e;if(n)return function(r){try{new URL(r)}catch{return!1}return!0}(n)?(t=n).endsWith("/")?t:t+"/":M(bn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(n)}`));var t};function Fv(e){return async function(n,t){const{options:r,unsetOptions:a}=await async function(l,_){if(!l)throw new Error("You must supply an options object to rollup");const u=await async function(h,b){const p=cs("options",await ua(h.plugins)),v=h.logLevel||Oe,y=q_(p,L_(h,v),b,v);for(const $ of p){const{name:g,options:x}=$,k="handler"in x?x.handler:x,A=await k.call({debug:pt(Ct,"PLUGIN_LOG",y,g,v),error:S=>M(At(ce(S),g,{hook:"onLog"})),info:pt(Oe,"PLUGIN_LOG",y,g,v),meta:{rollupVersion:Ia,watchMode:b},warn:pt(q,"PLUGIN_WARNING",y,g,v)},h);A&&(h=A)}return h}(l,_),{options:f,unsetOptions:d}=await async function(h,b){const p=new Set,v=h.context??"undefined",y=await ua(h.plugins),$=h.logLevel||Oe,g=q_(y,L_(h,$),b,$),x=h.strictDeprecations||!1,k=fv(h,g,x),A={acorn:iv(h),acornInjectPlugins:sv(h),cache:ov(h),context:v,experimentalCacheExpiry:h.experimentalCacheExpiry??10,experimentalLogSideEffects:h.experimentalLogSideEffects||!1,external:lv(h.external),inlineDynamicImports:_v(h,g,x),input:cv(h),logLevel:$,makeAbsoluteExternalsRelative:h.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:uv(h,g,x),maxParallelFileOps:k,maxParallelFileReads:k,moduleContext:dv(h,v),onLog:g,onwarn:S=>g(q,S),perf:h.perf||!1,plugins:y,preserveEntrySignatures:h.preserveEntrySignatures??"exports-only",preserveModules:mv(h,g,x),preserveSymlinks:h.preserveSymlinks||!1,shimMissingExports:h.shimMissingExports||!1,strictDeprecations:x,treeshake:pv(h)};return j_(h,[...Object.keys(A),"watch"],"input options",g,/^(output)$/),{options:A,unsetOptions:p}}(u,_);return H_(f.plugins,is),{options:f,unsetOptions:d}}(n,t!==null);(function(l){l.perf?(Wt=new Map,kn=dp,yn=mp,l.plugins=l.plugins.map(vp)):(kn=re,yn=re)})(r);const i=new ev(r,t),s=n.cache!==!1;n.cache&&(r.cache=void 0,n.cache=void 0),kn("BUILD",1),await V_(i.pluginDriver,async()=>{try{kn("initialize",2),await i.pluginDriver.hookParallel("buildStart",[r]),yn("initialize",2),await i.build()}catch(l){const _=Object.keys(i.watchFiles);throw _.length>0&&(l.watchFiles=_),await i.pluginDriver.hookParallel("buildEnd",[l]),await i.pluginDriver.hookParallel("closeBundle",[]),l}await i.pluginDriver.hookParallel("buildEnd",[])}),yn("BUILD",1);const o={cache:s?i.getCache():void 0,async close(){o.closed||(o.closed=!0,await i.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async l=>o.closed?M(Ys()):K_(!1,r,a,l,i),watchFiles:Object.keys(i.watchFiles),write:async l=>o.closed?M(Ys()):K_(!0,r,a,l,i)};return r.perf&&(o.getTimings=pp),o}(e,null)}function H_(e,n){for(const[t,r]of e.entries())r.name||(r.name=`${n}${t+1}`)}async function K_(e,n,t,r,a){const{options:i,outputPluginDriver:s,unsetOptions:o}=await async function(l,_,u,f){if(!l)throw new Error("You must supply an options object");const d=await ua(l.plugins);H_(d,ss);const h=_.createOutputPluginDriver(d);return{...await Pv(u,f,l,h),outputPluginDriver:h}}(r,a.pluginDriver,n,t);return V_(0,async()=>{const l=new dh(i,o,n,s,a),_=await l.generate(e);if(e){if(kn("WRITE",1),!i.dir&&!i.file)return M({code:um,message:'You must specify "output.file" or "output.dir" for the build.',url:Cn(wt)});await Promise.all(Object.values(_).map(f=>a.fileOperationQueue.run(()=>async function(d,h){const b=Kn(h.dir||je(h.file),d.fileName);return await jh(je(b),{recursive:!0}),Dh(b,d.type==="asset"?d.source:d.code)}(f,i)))),await s.hookParallel("writeBundle",[i,_]),yn("WRITE",1)}return u=_,{output:Object.values(u).filter(f=>Object.keys(f).length>0).sort((f,d)=>J_(f)-J_(d))};var u})}function Pv(e,n,t,r){return async function(a,i,s){const o=new Set(s),l=a.compact||!1,_=xv(a),u=kv(a,i),f=$v(a,u,i),d=yv(a,f,i),h=Ev(a,i),b=Nv(a,h),p={amd:wv(a),assetFileNames:a.assetFileNames??"assets/[name]-[hash][extname]",banner:fa(a,"banner"),chunkFileNames:a.chunkFileNames??"[name]-[hash].js",compact:l,dir:Av(a,d),dynamicImportFunction:Sv(a,i,_),dynamicImportInCjs:a.dynamicImportInCjs??!0,entryFileNames:Bv(a,o),esModule:a.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:Iv(a,i),experimentalMinChunkSize:a.experimentalMinChunkSize??1,exports:Lv(a,o),extend:a.extend||!1,externalImportAssertions:a.externalImportAssertions??!0,externalLiveBindings:a.externalLiveBindings??!0,file:d,footer:fa(a,"footer"),format:_,freeze:a.freeze??!0,generatedCode:b,globals:a.globals||{},hoistTransitiveImports:a.hoistTransitiveImports??!0,indent:Mv(a,l),inlineDynamicImports:u,interop:jv(a),intro:fa(a,"intro"),manualChunks:Tv(a,u,f,i),minifyInternalExports:Dv(a,_,l),name:a.name,namespaceToStringTag:Ov(a,b,i),noConflict:a.noConflict||!1,outro:fa(a,"outro"),paths:a.paths||{},plugins:await ua(a.plugins),preferConst:h,preserveModules:f,preserveModulesRoot:Cv(a),sanitizeFileName:typeof a.sanitizeFileName=="function"?a.sanitizeFileName:a.sanitizeFileName===!1?v=>v:bv,sourcemap:a.sourcemap||!1,sourcemapBaseUrl:zv(a),sourcemapExcludeSources:a.sourcemapExcludeSources||!1,sourcemapFile:a.sourcemapFile,sourcemapIgnoreList:typeof a.sourcemapIgnoreList=="function"?a.sourcemapIgnoreList:a.sourcemapIgnoreList===!1?()=>!1:v=>v.includes("node_modules"),sourcemapPathTransform:a.sourcemapPathTransform,strict:a.strict??!0,systemNullSetters:a.systemNullSetters??!0,validate:a.validate||!1};return j_(a,Object.keys(p),"output options",i.onLog),{options:p,unsetOptions:o}}(r.hookReduceArg0Sync("outputOptions",[t],(a,i)=>i||a,a=>{const i=()=>a.error({code:Yd,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...a,emitFile:i,setAssetSource:i}}),e,n)}var tr;function J_(e){return e.type==="asset"?tr.ASSET:e.isEntry?tr.ENTRY_CHUNK:tr.SECONDARY_CHUNK}(function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"})(tr||(tr={}));const Y_=["log","warn","info","debug","error"];console.original={};let da=[],ma=!1,Uv=(e,n)=>{const t=n.map(r=>typeof r=="object"?r instanceof Error?JSON.stringify(r,Object.getOwnPropertyNames(r)):JSON.stringify(r):r);da.push({kind:e,args:t,date:Date.now()})},Rv=(e=!1)=>{const n={apply:(t,r,a)=>{if(Uv(t.name,a),t.bind(r),e)return t(...a)}};Y_.forEach(t=>{ma||(console.original[t]=console[t]),console[t]=new Proxy(console[t],n)}),ma=!0},Vv=()=>{ma&&Y_.forEach(e=>{console[e]=console.original[e]}),ma=!1},qv=(e=!1)=>{da=[],Rv(e)},Gv=()=>{Vv()},Z_=()=>{da=[]},Xv=()=>da,Wv=e=>e.map(n=>n.args.join(" "));const rr={},Q_=Object.assign({"../../_build/default/playground/output/node_modules/melange.belt/belt.js":tc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Array.js":rc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Float.js":ac,"../../_build/default/playground/output/node_modules/melange.belt/belt_HashMap.js":ic,"../../_build/default/playground/output/node_modules/melange.belt/belt_HashMapInt.js":sc,"../../_build/default/playground/output/node_modules/melange.belt/belt_HashMapString.js":oc,"../../_build/default/playground/output/node_modules/melange.belt/belt_HashSet.js":lc,"../../_build/default/playground/output/node_modules/melange.belt/belt_HashSetInt.js":_c,"../../_build/default/playground/output/node_modules/melange.belt/belt_HashSetString.js":cc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Id.js":uc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Int.js":fc,"../../_build/default/playground/output/node_modules/melange.belt/belt_List.js":dc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Map.js":mc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MapDict.js":pc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MapInt.js":hc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MapString.js":vc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableMap.js":gc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableMapInt.js":bc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableMapString.js":yc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableQueue.js":xc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableSet.js":kc,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableSetInt.js":$c,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableSetString.js":Ec,"../../_build/default/playground/output/node_modules/melange.belt/belt_MutableStack.js":Cc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Option.js":wc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Range.js":Ac,"../../_build/default/playground/output/node_modules/melange.belt/belt_Result.js":Sc,"../../_build/default/playground/output/node_modules/melange.belt/belt_Set.js":Bc,"../../_build/default/playground/output/node_modules/melange.belt/belt_SetDict.js":Ic,"../../_build/default/playground/output/node_modules/melange.belt/belt_SetInt.js":Lc,"../../_build/default/playground/output/node_modules/melange.belt/belt_SetString.js":Nc,"../../_build/default/playground/output/node_modules/melange.belt/belt_SortArray.js":Mc,"../../_build/default/playground/output/node_modules/melange.belt/belt_SortArrayInt.js":jc,"../../_build/default/playground/output/node_modules/melange.belt/belt_SortArrayString.js":Tc,"../../_build/default/playground/output/node_modules/melange.belt/belt__.js":Dc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalAVLset.js":Oc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalAVLtree.js":zc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalBuckets.js":Fc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalBucketsType.js":Pc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalMapInt.js":Uc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalMapString.js":Rc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalSetBuckets.js":Vc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalSetInt.js":qc,"../../_build/default/playground/output/node_modules/melange.belt/belt_internalSetString.js":Gc,"../../_build/default/playground/output/node_modules/melange.dom/dom.js":Xc,"../../_build/default/playground/output/node_modules/melange.dom/dom__.js":Wc,"../../_build/default/playground/output/node_modules/melange.dom/dom_storage.js":Hc,"../../_build/default/playground/output/node_modules/melange.dom/dom_storage2.js":Kc,"../../_build/default/playground/output/node_modules/melange.js/caml.js":Jc,"../../_build/default/playground/output/node_modules/melange.js/caml_array.js":Yc,"../../_build/default/playground/output/node_modules/melange.js/caml_array_extern.js":Zc,"../../_build/default/playground/output/node_modules/melange.js/caml_bytes.js":Qc,"../../_build/default/playground/output/node_modules/melange.js/caml_exceptions.js":nu,"../../_build/default/playground/output/node_modules/melange.js/caml_external_polyfill.js":eu,"../../_build/default/playground/output/node_modules/melange.js/caml_float.js":tu,"../../_build/default/playground/output/node_modules/melange.js/caml_float_extern.js":ru,"../../_build/default/playground/output/node_modules/melange.js/caml_format.js":au,"../../_build/default/playground/output/node_modules/melange.js/caml_gc.js":iu,"../../_build/default/playground/output/node_modules/melange.js/caml_hash.js":su,"../../_build/default/playground/output/node_modules/melange.js/caml_hash_primitive.js":ou,"../../_build/default/playground/output/node_modules/melange.js/caml_int32.js":lu,"../../_build/default/playground/output/node_modules/melange.js/caml_int32_extern.js":_u,"../../_build/default/playground/output/node_modules/melange.js/caml_int64.js":cu,"../../_build/default/playground/output/node_modules/melange.js/caml_int64_extern.js":uu,"../../_build/default/playground/output/node_modules/melange.js/caml_io.js":fu,"../../_build/default/playground/output/node_modules/melange.js/caml_js_exceptions.js":du,"../../_build/default/playground/output/node_modules/melange.js/caml_lexer.js":mu,"../../_build/default/playground/output/node_modules/melange.js/caml_md5.js":pu,"../../_build/default/playground/output/node_modules/melange.js/caml_module.js":hu,"../../_build/default/playground/output/node_modules/melange.js/caml_nativeint_extern.js":vu,"../../_build/default/playground/output/node_modules/melange.js/caml_obj.js":gu,"../../_build/default/playground/output/node_modules/melange.js/caml_oo.js":bu,"../../_build/default/playground/output/node_modules/melange.js/caml_oo_curry.js":yu,"../../_build/default/playground/output/node_modules/melange.js/caml_option.js":xu,"../../_build/default/playground/output/node_modules/melange.js/caml_parser.js":ku,"../../_build/default/playground/output/node_modules/melange.js/caml_splice_call.js":$u,"../../_build/default/playground/output/node_modules/melange.js/caml_string.js":Eu,"../../_build/default/playground/output/node_modules/melange.js/caml_string_extern.js":Cu,"../../_build/default/playground/output/node_modules/melange.js/caml_sys.js":wu,"../../_build/default/playground/output/node_modules/melange.js/caml_undefined_extern.js":Au,"../../_build/default/playground/output/node_modules/melange.js/curry.js":Su,"../../_build/default/playground/output/node_modules/melange.js/js.js":Bu,"../../_build/default/playground/output/node_modules/melange.js/js_OO.js":Iu,"../../_build/default/playground/output/node_modules/melange.js/js__.js":Lu,"../../_build/default/playground/output/node_modules/melange.js/js_array.js":Nu,"../../_build/default/playground/output/node_modules/melange.js/js_bigint.js":Mu,"../../_build/default/playground/output/node_modules/melange.js/js_console.js":ju,"../../_build/default/playground/output/node_modules/melange.js/js_date.js":Tu,"../../_build/default/playground/output/node_modules/melange.js/js_dict.js":Du,"../../_build/default/playground/output/node_modules/melange.js/js_exn.js":Ou,"../../_build/default/playground/output/node_modules/melange.js/js_float.js":zu,"../../_build/default/playground/output/node_modules/melange.js/js_global.js":Fu,"../../_build/default/playground/output/node_modules/melange.js/js_int.js":Pu,"../../_build/default/playground/output/node_modules/melange.js/js_internal.js":Uu,"../../_build/default/playground/output/node_modules/melange.js/js_json.js":Ru,"../../_build/default/playground/output/node_modules/melange.js/js_map.js":Vu,"../../_build/default/playground/output/node_modules/melange.js/js_mapper_runtime.js":qu,"../../_build/default/playground/output/node_modules/melange.js/js_math.js":Gu,"../../_build/default/playground/output/node_modules/melange.js/js_null.js":Xu,"../../_build/default/playground/output/node_modules/melange.js/js_nullable.js":Wu,"../../_build/default/playground/output/node_modules/melange.js/js_promise.js":Hu,"../../_build/default/playground/output/node_modules/melange.js/js_re.js":Ku,"../../_build/default/playground/output/node_modules/melange.js/js_set.js":Ju,"../../_build/default/playground/output/node_modules/melange.js/js_string.js":Yu,"../../_build/default/playground/output/node_modules/melange.js/js_typed_array.js":Zu,"../../_build/default/playground/output/node_modules/melange.js/js_types.js":Qu,"../../_build/default/playground/output/node_modules/melange.js/js_undefined.js":nf,"../../_build/default/playground/output/node_modules/melange.js/js_weakmap.js":ef,"../../_build/default/playground/output/node_modules/melange.js/js_weakset.js":tf,"../../_build/default/playground/output/node_modules/melange.js/melange_mini_stdlib.js":rf,"../../_build/default/playground/output/node_modules/melange/arg.js":af,"../../_build/default/playground/output/node_modules/melange/array.js":sf,"../../_build/default/playground/output/node_modules/melange/arrayLabels.js":of,"../../_build/default/playground/output/node_modules/melange/atomic.js":lf,"../../_build/default/playground/output/node_modules/melange/bool.js":_f,"../../_build/default/playground/output/node_modules/melange/buffer.js":cf,"../../_build/default/playground/output/node_modules/melange/bytes.js":uf,"../../_build/default/playground/output/node_modules/melange/bytesLabels.js":ff,"../../_build/default/playground/output/node_modules/melange/callback.js":df,"../../_build/default/playground/output/node_modules/melange/camlinternalAtomic.js":mf,"../../_build/default/playground/output/node_modules/melange/camlinternalFormat.js":pf,"../../_build/default/playground/output/node_modules/melange/camlinternalFormatBasics.js":hf,"../../_build/default/playground/output/node_modules/melange/camlinternalLazy.js":vf,"../../_build/default/playground/output/node_modules/melange/camlinternalMod.js":gf,"../../_build/default/playground/output/node_modules/melange/camlinternalOO.js":bf,"../../_build/default/playground/output/node_modules/melange/char.js":yf,"../../_build/default/playground/output/node_modules/melange/complex.js":xf,"../../_build/default/playground/output/node_modules/melange/digest.js":kf,"../../_build/default/playground/output/node_modules/melange/domain.js":$f,"../../_build/default/playground/output/node_modules/melange/either.js":Ef,"../../_build/default/playground/output/node_modules/melange/ephemeron.js":Cf,"../../_build/default/playground/output/node_modules/melange/filename.js":wf,"../../_build/default/playground/output/node_modules/melange/float.js":Af,"../../_build/default/playground/output/node_modules/melange/format.js":Sf,"../../_build/default/playground/output/node_modules/melange/fun.js":Bf,"../../_build/default/playground/output/node_modules/melange/gc.js":If,"../../_build/default/playground/output/node_modules/melange/hashtbl.js":Lf,"../../_build/default/playground/output/node_modules/melange/in_channel.js":Nf,"../../_build/default/playground/output/node_modules/melange/int.js":Mf,"../../_build/default/playground/output/node_modules/melange/int32.js":jf,"../../_build/default/playground/output/node_modules/melange/int64.js":Tf,"../../_build/default/playground/output/node_modules/melange/lazy.js":Df,"../../_build/default/playground/output/node_modules/melange/lexing.js":Of,"../../_build/default/playground/output/node_modules/melange/list.js":zf,"../../_build/default/playground/output/node_modules/melange/listLabels.js":Ff,"../../_build/default/playground/output/node_modules/melange/map.js":Pf,"../../_build/default/playground/output/node_modules/melange/marshal.js":Uf,"../../_build/default/playground/output/node_modules/melange/moreLabels.js":Rf,"../../_build/default/playground/output/node_modules/melange/mutex.js":Vf,"../../_build/default/playground/output/node_modules/melange/obj.js":qf,"../../_build/default/playground/output/node_modules/melange/oo.js":Gf,"../../_build/default/playground/output/node_modules/melange/option.js":Xf,"../../_build/default/playground/output/node_modules/melange/out_channel.js":Wf,"../../_build/default/playground/output/node_modules/melange/parsing.js":Hf,"../../_build/default/playground/output/node_modules/melange/printexc.js":Kf,"../../_build/default/playground/output/node_modules/melange/printf.js":Jf,"../../_build/default/playground/output/node_modules/melange/queue.js":Yf,"../../_build/default/playground/output/node_modules/melange/random.js":Zf,"../../_build/default/playground/output/node_modules/melange/result.js":Qf,"../../_build/default/playground/output/node_modules/melange/scanf.js":nd,"../../_build/default/playground/output/node_modules/melange/seq.js":ed,"../../_build/default/playground/output/node_modules/melange/set.js":td,"../../_build/default/playground/output/node_modules/melange/stack.js":rd,"../../_build/default/playground/output/node_modules/melange/stdLabels.js":ad,"../../_build/default/playground/output/node_modules/melange/std_exit.js":id,"../../_build/default/playground/output/node_modules/melange/stdlib.js":sd,"../../_build/default/playground/output/node_modules/melange/string.js":od,"../../_build/default/playground/output/node_modules/melange/stringLabels.js":ld,"../../_build/default/playground/output/node_modules/melange/sys.js":_d,"../../_build/default/playground/output/node_modules/melange/type.js":cd,"../../_build/default/playground/output/node_modules/melange/uchar.js":ud,"../../_build/default/playground/output/node_modules/melange/unit.js":fd,"../../_build/default/playground/output/node_modules/melange/weak.js":dd});Object.keys(Q_).forEach(e=>{const n=Q_[e];rr[e.replace("../../_build/default/playground/output/node_modules/","")]=n});const Hv=eval,pa=new Map;async function Kv(e){if(pa.has(e))return pa.get(e);const n=fetch(e).then(async t=>{if(!t.ok)throw new Error(await t.text());return{url:t.url,body:await t.text()}}).catch(t=>{throw pa.delete(e),t});return pa.set(e,n),n}wd("bundle",async(e,n)=>{switch(n.type){case"clear.logs":Z_(),e.logs=[];break;case"bundle":const t=n.code;if(!t)return;qv(),Z_(),rr["main.js"]=t;const r=await Fv({input:"main.js",plugins:[{name:"loader",resolveId(i,s){var o=i;return i.substring(0,2)=="./"&&s&&(o=s.substring(0,s.lastIndexOf("/")+1)+o.substring(2,i.length)),rr.hasOwnProperty(o)?o:i[0]=="/"?"https://esm.sh"+i:i.substring(0,8)!="https://"?"https://esm.sh/"+i:i},async load(i){if(rr.hasOwnProperty(i))return rr[i];{const s=await Kv(i);return s==null?void 0:s.body}}}]}),{output:a}=await r.generate({format:"iife",name:"MelangeApp"});try{const i="import * as React";t.indexOf(i)>=0?e.bundledCode=a[0].code:(e.bundledCode=void 0,Hv(a[0].code))}catch(i){console.log(i)}e.logs=Wv(Xv()),Gv();break;default:throw new Error}})})();
diff --git a/unstable/playground/index.html b/unstable/playground/index.html
index 1f645d64b..adb82f4b0 100644
--- a/unstable/playground/index.html
+++ b/unstable/playground/index.html
@@ -6,7 +6,7 @@
Melange Playground
-
+
diff --git a/unstable/sitemap.xml.gz b/unstable/sitemap.xml.gz
index 1e0bec1dd..208118aa2 100644
Binary files a/unstable/sitemap.xml.gz and b/unstable/sitemap.xml.gz differ